Skip to content

Commit

Permalink
Merge pull request NebulaSS13#4804 from MistakeNot4892/stagingupdate
Browse files Browse the repository at this point in the history
Updating staging from stable.
  • Loading branch information
MistakeNot4892 committed Jan 25, 2025
2 parents 01133c3 + 3e47c07 commit 1b64afb
Show file tree
Hide file tree
Showing 181 changed files with 2,372 additions and 1,562 deletions.
1 change: 1 addition & 0 deletions code/__defines/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define SPECIES_FLAG_NO_BLOCK BITFLAG(6) // Unable to block or defend itself from attackers.
#define SPECIES_FLAG_NEED_DIRECT_ABSORB BITFLAG(7) // This species can only have their DNA taken by direct absorption.
#define SPECIES_FLAG_LOW_GRAV_ADAPTED BITFLAG(8) // This species is used to lower than standard gravity, affecting stamina in high-grav
#define SPECIES_FLAG_ABSORB_ELECTRICITY BITFLAG(9) // This species can absorb electricity; snowflake flag for old slime people.

// Species spawn flags
#define SPECIES_IS_WHITELISTED BITFLAG(0) // Must be whitelisted to play.
Expand Down
5 changes: 4 additions & 1 deletion code/_global_vars/lists/flavor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ var/global/list/music_tracks = list(
"Human" = /decl/music_track/human,
"Memories of Lysendraa" = /decl/music_track/lysendraa,
"Marhaba" = /decl/music_track/marhaba,
"Space Asshole" = /decl/music_track/space_asshole,
"Space Oddity" = /decl/music_track/space_oddity,
"THUNDERDOME" = /decl/music_track/thunderdome,
"Treacherous Voyage" = /decl/music_track/treacherous_voyage,
Expand All @@ -101,7 +102,9 @@ var/global/list/music_tracks = list(
"80s All Over Again" = /decl/music_track/eighties,
"Wild Encounters" = /decl/music_track/wildencounters,
"Torn" = /decl/music_track/torn,
"Nebula" = /decl/music_track/nebula
"Nebula" = /decl/music_track/nebula,
"Tintin" = /decl/music_track/tintin,
"Unatco" = /decl/music_track/unatco
)

/proc/setup_music_tracks(var/list/tracks)
Expand Down
72 changes: 72 additions & 0 deletions code/controllers/subsystems/plants.dm
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
25 changes: 25 additions & 0 deletions code/controllers/subsystems/processing/overmap.dm
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
1 change: 0 additions & 1 deletion code/datums/extensions/storage/subtypes_backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
open_sound = 'sound/effects/storage/unzip.ogg'

/datum/storage/backpack/holding
max_w_class = ITEM_SIZE_NORMAL
max_storage_space = 56

/datum/storage/backpack/holding/can_be_inserted(obj/item/W, mob/user, stop_messages = 0, click_params)
Expand Down
12 changes: 6 additions & 6 deletions code/datums/mind/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@

if(href_list["add_goal"])

var/mob/caller = locate(href_list["add_goal_caller"])
if(caller && caller == current) can_modify = TRUE
var/mob/calling_proc = locate(href_list["add_goal_caller"])
if(calling_proc && calling_proc == current) can_modify = TRUE

if(can_modify)
if(is_admin)
Expand All @@ -171,8 +171,8 @@
if(href_list["abandon_goal"])
var/datum/goal/goal = get_goal_from_href(href_list["abandon_goal"])

var/mob/caller = locate(href_list["abandon_goal_caller"])
if(caller && caller == current) can_modify = TRUE
var/mob/calling_proc = locate(href_list["abandon_goal_caller"])
if(calling_proc && calling_proc == current) can_modify = TRUE

if(goal && can_modify)
if(usr == current)
Expand All @@ -186,8 +186,8 @@
if(href_list["reroll_goal"])
var/datum/goal/goal = get_goal_from_href(href_list["reroll_goal"])

var/mob/caller = locate(href_list["reroll_goal_caller"])
if(caller && caller == current) can_modify = TRUE
var/mob/calling_proc = locate(href_list["reroll_goal_caller"])
if(calling_proc && calling_proc == current) can_modify = TRUE

if(goal && (goal in goals) && can_modify)
qdel(goal)
Expand Down
6 changes: 6 additions & 0 deletions code/datums/music_tracks/deus.dm
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"
6 changes: 6 additions & 0 deletions code/datums/music_tracks/space_asshole.dm
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"
5 changes: 5 additions & 0 deletions code/datums/music_tracks/title3.dm
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
4 changes: 2 additions & 2 deletions code/datums/outfits/outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@
if(!ispath(uniform, /obj/item/clothing))
. += "outfit is flagged for sensors, but uniform cannot take accessories"
var/succeeded = FALSE
var/obj/item/sensor = new /obj/item/clothing/sensor/vitals
if(uniform)
var/obj/item/sensor = new /obj/item/clothing/sensor/vitals
var/obj/item/clothing/wear_uniform = new uniform // sadly we need to read a list
if(wear_uniform.can_attach_accessory(sensor))
succeeded = TRUE
qdel(wear_uniform)
qdel(sensor)
if(!succeeded)
. += "outfit is flagged for sensors, but uniform does not accept sensors"
qdel(sensor)

/decl/outfit/proc/pre_equip(mob/living/wearer)
if(outfit_flags & OUTFIT_RESET_EQUIPMENT)
Expand Down
3 changes: 3 additions & 0 deletions code/datums/supplypacks/dispcarts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ PACK(syrup_chocolate, /obj/item/chems/chem_disp_cartridge/syrup_chocolate, "Reag
PACK(syrup_caramel, /obj/item/chems/chem_disp_cartridge/syrup_caramel, "Reagent refill - Caramel Syrup", "caramel syrup reagent cartridge crate")
PACK(syrup_vanilla, /obj/item/chems/chem_disp_cartridge/syrup_vanilla, "Reagent refill - Vanilla Syrup", "vanilla syrup reagent cartridge crate")
PACK(syrup_pumpkin, /obj/item/chems/chem_disp_cartridge/syrup_pumpkin, "Reagent refill - Pumpkin Spice Syrup", "pumpkin spice syrup reagent cartridge crate")
PACK(syrup_lavender, /obj/item/chems/chem_disp_cartridge/syrup_lavender, "Reagent refill - Lavender Syrup", "lavender syrup reagent cartridge crate")
PACK(cinnamon, /obj/item/chems/chem_disp_cartridge/cinnamon, "Reagent refill - Cinnamon", "cinnamon reagent cartridge crate")


#undef SEC_PACK
#undef PACK
13 changes: 10 additions & 3 deletions code/datums/supplypacks/livecargo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@
containername = "monkey crate"

/decl/hierarchy/supply_pack/livecargo/spidercubes
name = "Inert - Spiders"
name = "Inert - Spider Cubes"
contains = list(/obj/item/box/animal_cubes/spiders)
containertype = /obj/structure/closet/crate/secure
containername = "spiderling crate"
contraband = 1
security_level = null
access = access_research

/decl/hierarchy/supply_pack/livecargo/carpcubes
name = "Inert - Space Carp Cubes"
contains = list(/obj/item/box/animal_cubes/carp)
containertype = /obj/structure/closet/crate/secure
containername = "space carp crate"
access = access_chemistry


//actual live animals
/decl/hierarchy/supply_pack/livecargo/corgi
Expand Down
78 changes: 39 additions & 39 deletions code/datums/wires/smes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,68 @@
new /datum/wire_description(SMES_WIRE_FAILSAFES, "This wire appears to connect to a failsafe mechanism.")
)

var/global/const/SMES_WIRE_RCON = 1 // Remote control (AI and consoles), cut to disable
var/global/const/SMES_WIRE_INPUT = 2 // Input wire, cut to disable input, pulse to disable for 60s
var/global/const/SMES_WIRE_OUTPUT = 4 // Output wire, cut to disable output, pulse to disable for 60s
var/global/const/SMES_WIRE_GROUNDING = 8 // Cut to quickly discharge causing sparks, pulse to only create few sparks
var/global/const/SMES_WIRE_FAILSAFES = 16 // Cut to disable failsafes, mend to reenable


/datum/wires/smes/CanUse(var/mob/living/L)
var/obj/machinery/power/smes/buildable/S = holder
if(!S.grounding && S.powernet && S.powernet.avail)
electrocute_mob(L, S.powernet, S, S.safeties_enabled? 0.1 : 1)
if(S.panel_open)
return 1
return 0
/// Remote control (AI and consoles), cut to disable
var/global/const/SMES_WIRE_RCON = BITFLAG(0)
/// Input wire, cut to disable input, pulse to disable for 60s
var/global/const/SMES_WIRE_INPUT = BITFLAG(1)
/// Output wire, cut to disable output, pulse to disable for 60s
var/global/const/SMES_WIRE_OUTPUT = BITFLAG(2)
/// Cut to quickly discharge causing sparks, pulse to only create few sparks
var/global/const/SMES_WIRE_GROUNDING = BITFLAG(3)
/// Cut to disable failsafes, mend to reenable
var/global/const/SMES_WIRE_FAILSAFES = BITFLAG(4)

/datum/wires/smes/CanUse(var/mob/living/user)
var/obj/machinery/power/smes/buildable/storage = holder
if(!storage.grounding && storage.powernet && storage.powernet.avail)
electrocute_mob(user, storage.powernet, storage, (storage.safeties_enabled? 0.1 : 1))
return storage.panel_open

/datum/wires/smes/GetInteractWindow(mob/user)
var/obj/machinery/power/smes/buildable/S = holder
var/obj/machinery/power/smes/buildable/storage = holder
. += ..()
. += "The green light is [(S.input_cut || S.input_pulsed || S.output_cut || S.output_pulsed) ? "off" : "on"]<br>"
. += "The red light is [(S.safeties_enabled || S.grounding) ? "off" : "blinking"]<br>"
. += "The blue light is [S.RCon ? "on" : "off"]"

. += "The green light is [(storage.input_cut || storage.input_pulsed || storage.output_cut || storage.output_pulsed) ? "off" : "on"]<br>"
. += "The red light is [(storage.safeties_enabled || storage.grounding) ? "off" : "blinking"]<br>"
. += "The blue light is [storage.RCon ? "on" : "off"]"

/datum/wires/smes/UpdateCut(var/index, var/mended)
var/obj/machinery/power/smes/buildable/S = holder
var/obj/machinery/power/smes/buildable/storage = holder
switch(index)
if(SMES_WIRE_RCON)
S.RCon = mended
storage.RCon = mended
if(SMES_WIRE_INPUT)
S.input_cut = !mended
storage.input_cut = !mended
if(SMES_WIRE_OUTPUT)
S.output_cut = !mended
storage.output_cut = !mended
if(SMES_WIRE_GROUNDING)
S.grounding = mended
storage.grounding = mended
if(SMES_WIRE_FAILSAFES)
S.safeties_enabled = mended
storage.safeties_enabled = mended

/datum/wires/smes/proc/reset_rcon()
var/obj/machinery/power/smes/buildable/S = holder
if(S)
S.RCon = TRUE
var/obj/machinery/power/smes/buildable/storage = holder
if(storage)
storage.RCon = TRUE

/datum/wires/smes/proc/reset_safeties()
var/obj/machinery/power/smes/buildable/S = holder
if(S)
S.safeties_enabled = TRUE
var/obj/machinery/power/smes/buildable/storage = holder
if(storage)
storage.safeties_enabled = TRUE

/datum/wires/smes/UpdatePulsed(var/index)
var/obj/machinery/power/smes/buildable/S = holder
var/obj/machinery/power/smes/buildable/storage = holder
switch(index)
if(SMES_WIRE_RCON)
if(S.RCon)
S.RCon = 0
if(storage.RCon)
storage.RCon = 0
addtimer(CALLBACK(src, PROC_REF(reset_rcon)), 1 SECOND)
if(SMES_WIRE_INPUT)
S.toggle_input()
storage.toggle_input()
if(SMES_WIRE_OUTPUT)
S.toggle_output()
storage.toggle_output()
if(SMES_WIRE_GROUNDING)
S.grounding = 0
storage.grounding = 0
if(SMES_WIRE_FAILSAFES)
if(S.safeties_enabled)
S.safeties_enabled = 0
if(storage.safeties_enabled)
storage.safeties_enabled = 0
addtimer(CALLBACK(src, PROC_REF(reset_safeties)), 1 SECOND)
1 change: 0 additions & 1 deletion code/game/gamemodes/wizard/servant_items/caretaker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
ARMOR_ENERGY = ARMOR_ENERGY_SMALL,
ARMOR_RAD = ARMOR_RAD_SHIELDED
)
bodytype_equip_flags = BODY_EQUIP_FLAG_HUMANOID
flags_inv = HIDEEARS | BLOCK_HEAD_HAIR

/obj/item/clothing/suit/caretakercloak
Expand Down
1 change: 0 additions & 1 deletion code/game/gamemodes/wizard/servant_items/champion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
ARMOR_BOMB = ARMOR_BOMB_RESISTANT,
ARMOR_BIO = ARMOR_BIO_MINOR
)
bodytype_equip_flags = BODY_EQUIP_FLAG_HUMANOID

/obj/item/clothing/suit/champarmor
name = "champion's armor"
Expand Down
2 changes: 0 additions & 2 deletions code/game/gamemodes/wizard/servant_items/fiend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
ARMOR_ENERGY = ARMOR_ENERGY_SMALL,
ARMOR_RAD = ARMOR_RAD_SHIELDED
)
bodytype_equip_flags = BODY_EQUIP_FLAG_HUMANOID
flags_inv = HIDEEARS | BLOCK_HEAD_HAIR

/obj/item/clothing/suit/fiendcowl
Expand All @@ -29,7 +28,6 @@
name = "black suit"
desc = "A snappy black suit with red trim. The undershirt's stained with something, though..."
icon = 'icons/clothing/suits/suit_fiend.dmi'
bodytype_equip_flags = BODY_EQUIP_FLAG_HUMANOID

/obj/item/clothing/shoes/dress/devilshoes
desc = "Off-colour leather dress shoes. Their footsteps are silent."
Expand Down
1 change: 0 additions & 1 deletion code/game/gamemodes/wizard/servant_items/overseer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
item_flags = ITEM_FLAG_AIRTIGHT
max_pressure_protection = FIRESUIT_MAX_PRESSURE
min_pressure_protection = 0
bodytype_equip_flags = BODY_EQUIP_FLAG_HUMANOID
flags_inv = HIDEEARS | BLOCK_HEAD_HAIR

/obj/item/clothing/suit/straight_jacket/overseercloak
Expand Down
3 changes: 0 additions & 3 deletions code/game/machinery/suit_cycler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,8 @@
if(helmet)
target_modification.RefitItem(helmet)
helmet.refit_for_bodytype(target_bodytype)
helmet.SetName("refitted [helmet.name]")
if(suit)
target_modification.RefitItem(suit)
suit.refit_for_bodytype(target_bodytype)
suit.SetName("refitted [suit.name]")
if(boots)
boots.refit_for_bodytype(target_bodytype)
boots.SetName("refitted [initial(boots.name)]")
Loading

0 comments on commit 1b64afb

Please sign in to comment.