forked from NebulaSS13/Nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NebulaSS13#4804 from MistakeNot4892/stagingupdate
Updating staging from stable.
- Loading branch information
Showing
181 changed files
with
2,372 additions
and
1,562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
PROCESSING_SUBSYSTEM_DEF(plants) | ||
name = "Plants" | ||
priority = SS_PRIORITY_PLANTS | ||
runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME | ||
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING | ||
init_order = SS_INIT_PLANTS | ||
wait = 60 | ||
|
||
/// Stores generated fruit descs. | ||
var/list/product_descs = list() | ||
/// All seed data stored here. | ||
var/list/seeds = list() | ||
/// Stores images of growth, fruits and seeds. | ||
var/list/plant_icon_cache = list() | ||
/// List of all harvested product sprites. | ||
var/list/plant_sprites = list() | ||
/// List of all growth sprites plus number of growth stages. | ||
var/list/plant_product_sprites = list() | ||
/// Precalculated gene decl/mask list for use in botany machine UI. | ||
var/list/gene_masked_list = list() | ||
|
||
/datum/controller/subsystem/processing/plants/Initialize() | ||
// Build the icon lists. | ||
for(var/icostate in icon_states('icons/obj/hydroponics/hydroponics_growing.dmi')) | ||
var/split = findtext(icostate,"-") | ||
if(!split) | ||
// invalid icon_state | ||
continue | ||
|
||
var/ikey = copytext(icostate,(split+1)) | ||
if(ikey == "dead") | ||
// don't count dead icons | ||
continue | ||
ikey = text2num(ikey) | ||
var/base = copytext(icostate,1,split) | ||
|
||
if(!(plant_sprites[base]) || (plant_sprites[base]<ikey)) | ||
plant_sprites[base] = ikey | ||
|
||
for(var/icostate in icon_states('icons/obj/hydroponics/hydroponics_products.dmi')) | ||
var/split = findtext(icostate,"-") | ||
if(split) | ||
plant_product_sprites |= copytext(icostate,1,split) | ||
|
||
// Pre-init all our gene master datums. This generates mask strings and prepares us for trait copying/mutation. | ||
// We'll also populate our masked gene list here for the botany machine UI. | ||
for(var/decl/plant_gene/gene in decls_repository.get_decls_of_type_unassociated(/decl/plant_gene)) | ||
gene_masked_list.Add(list(list("tag" = "\ref[gene]", "mask" = gene.name))) | ||
|
||
// Populate the global seed datum list. | ||
for(var/type in subtypesof(/datum/seed)) | ||
var/datum/seed/S = new type | ||
S.update_growth_stages() | ||
seeds[S.name] = S | ||
S.roundstart = 1 | ||
|
||
. = ..() | ||
|
||
// Proc for creating a random seed type. | ||
/datum/controller/subsystem/processing/plants/proc/create_random_seed(var/survive_on_station) | ||
var/datum/seed/seed = new() | ||
seed.randomize() | ||
seed.name = "[seed.uid]" | ||
seed.base_seed_value = rand(10, 15) | ||
seeds[seed.name] = seed | ||
if(survive_on_station) | ||
seed.consume_gasses = null | ||
for(var/decl/plant_trait/plant_trait in decls_repository.get_decls_of_type_unassociated(/decl/plant_trait)) | ||
var/val = plant_trait.get_station_survivable_value() | ||
if(!isnull(val)) | ||
seed.set_trait(plant_trait.type, val) | ||
return seed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Some duplicated behavior from SSprocessing in here so atoms can | ||
// still process normally as well as handling overmap movement. | ||
|
||
SUBSYSTEM_DEF(overmap) | ||
name = "Overmap" | ||
priority = SS_PRIORITY_OVERMAP | ||
wait = 2 | ||
flags = SS_BACKGROUND | SS_POST_FIRE_TIMING | SS_NO_INIT | ||
var/list/moving_entities = list() | ||
var/list/current_run = list() | ||
|
||
// Processing boilerplate. | ||
/datum/controller/subsystem/overmap/fire(resumed = 0) | ||
if(!resumed) | ||
src.current_run = moving_entities.Copy() | ||
var/list/current_run = src.current_run | ||
var/wait = src.wait | ||
var/times_fired = src.times_fired | ||
while(current_run.len) | ||
var/obj/effect/overmap/entity = current_run[current_run.len] | ||
current_run.len-- | ||
if(QDELETED(entity) || entity.ProcessOvermap(wait, times_fired) == PROCESS_KILL) | ||
moving_entities -= entity | ||
if (MC_TICK_CHECK) | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/decl/music_track/unatco | ||
title = "Unatco" | ||
artist = "Alexander Brandon" | ||
song = 'sound/music/deus_ex_unatco_nervous_testpilot_remix.ogg' | ||
license = /decl/license/grandfathered | ||
url = "https://soundcloud.com/nervous_testpilot/deus-ex-unatco-remix" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/decl/music_track/space_asshole | ||
artist = "Chris Remo" | ||
title = "Space Asshole" | ||
song = 'sound/music/space_asshole.ogg' | ||
license = /decl/license/grandfathered | ||
url = "https://idlethumbs.bandcamp.com/album/the-music-of-idle-thumbs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/decl/music_track/tintin | ||
title = "Tintin on the Moon" | ||
artist = "Cuboos" | ||
song = 'sound/music/title3.ogg' | ||
license = /decl/license/grandfathered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.