Empire research initialisation
* When an empire is created, all technologies that have no dependencies will be added as ongoing research with default priority and no points in the empire research table.
This commit is contained in:
parent
1f3c7a9202
commit
8c0b4abd1e
2 changed files with 40 additions and 1 deletions
legacyworlds-server-data/db-structure/parts/040-functions
|
@ -45,6 +45,14 @@ BEGIN
|
|||
INSERT INTO emp.resources ( empire_id , resource_name_id )
|
||||
SELECT _name_id , resource_name_id FROM defs.resources;
|
||||
|
||||
-- Insert technologies that have no dependencies as research in progress
|
||||
INSERT INTO emp.technologies_v2 ( empire_id , technology_name_id )
|
||||
SELECT _name_id , technology_name_id
|
||||
FROM defs.technologies
|
||||
LEFT OUTER JOIN defs.technology_dependencies
|
||||
USING ( technology_name_id )
|
||||
WHERE techdep_id IS NULL;
|
||||
|
||||
-- Update resource mining quantities
|
||||
UPDATE verse.planet_resources
|
||||
SET pres_income = emp.mining_compute_extraction( _update_row )
|
||||
|
|
Reference in a new issue