"
diff --git a/code/modules/antagonists/bloodsucker/datum_hunter.dm b/code/modules/antagonists/bloodsucker/datum_hunter.dm
index c0933d8a3c..b221a83a60 100644
--- a/code/modules/antagonists/bloodsucker/datum_hunter.dm
+++ b/code/modules/antagonists/bloodsucker/datum_hunter.dm
@@ -109,13 +109,13 @@
/datum/status_effect/agent_pinpointer/hunter_edition
- alert_type = /obj/screen/alert/status_effect/agent_pinpointer/hunter_edition
+ alert_type = /atom/movable/screen/alert/status_effect/agent_pinpointer/hunter_edition
minimum_range = HUNTER_SCAN_MIN_DISTANCE
tick_interval = HUNTER_SCAN_PING_TIME
duration = 160 // Lasts 10s
range_fuzz_factor = 5//PINPOINTER_EXTRA_RANDOM_RANGE
-/obj/screen/alert/status_effect/agent_pinpointer/hunter_edition
+/atom/movable/screen/alert/status_effect/agent_pinpointer/hunter_edition
name = "Monster Tracking"
desc = "You always know where the hellspawn are."
diff --git a/code/modules/antagonists/bloodsucker/datum_vassal.dm b/code/modules/antagonists/bloodsucker/datum_vassal.dm
index 91e89e71e6..5162897d60 100644
--- a/code/modules/antagonists/bloodsucker/datum_vassal.dm
+++ b/code/modules/antagonists/bloodsucker/datum_vassal.dm
@@ -110,13 +110,13 @@
/datum/status_effect/agent_pinpointer/vassal_edition
id = "agent_pinpointer"
- alert_type = /obj/screen/alert/status_effect/agent_pinpointer/vassal_edition
+ alert_type = /atom/movable/screen/alert/status_effect/agent_pinpointer/vassal_edition
minimum_range = VASSAL_SCAN_MIN_DISTANCE
tick_interval = VASSAL_SCAN_PING_TIME
duration = -1 // runs out fast
range_fuzz_factor = 0
-/obj/screen/alert/status_effect/agent_pinpointer/vassal_edition
+/atom/movable/screen/alert/status_effect/agent_pinpointer/vassal_edition
name = "Blood Bond"
desc = "You always know where your master is."
//icon = 'icons/obj/device.dmi'
diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm
index 843e5c6db2..8e6b5c9060 100644
--- a/code/modules/antagonists/changeling/changeling.dm
+++ b/code/modules/antagonists/changeling/changeling.dm
@@ -297,8 +297,14 @@
prof.socks = H.socks
prof.socks_color = H.socks_color
- var/list/slots = list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store")
- for(var/slot in slots)
+ var/datum/icon_snapshot/entry = new
+ entry.name = H.name
+ entry.icon = H.icon
+ entry.icon_state = H.icon_state
+ entry.overlays = H.get_overlays_copy(list(HANDS_LAYER, HANDCUFF_LAYER, LEGCUFF_LAYER))
+ prof.profile_snapshot = entry
+
+ for(var/slot in GLOB.slots)
if(slot in H.vars)
var/obj/item/I = H.vars[slot]
if(!I)
@@ -518,6 +524,9 @@
var/socks
var/socks_color
+ /// Icon snapshot of the profile
+ var/datum/icon_snapshot/profile_snapshot
+
/datum/changelingprofile/Destroy()
qdel(dna)
. = ..()
@@ -535,13 +544,14 @@
newprofile.underwear = underwear
newprofile.undershirt = undershirt
newprofile.socks = socks
-
+ newprofile.profile_snapshot = profile_snapshot
/datum/antagonist/changeling/xenobio
name = "Xenobio Changeling"
give_objectives = FALSE
show_in_roundend = FALSE //These are here for admin tracking purposes only
you_are_greet = FALSE
+ antag_moodlet = FALSE
/datum/antagonist/changeling/roundend_report()
var/list/parts = list()
diff --git a/code/modules/antagonists/changeling/powers/adrenaline.dm b/code/modules/antagonists/changeling/powers/adrenaline.dm
index 32171a036a..643458d05a 100644
--- a/code/modules/antagonists/changeling/powers/adrenaline.dm
+++ b/code/modules/antagonists/changeling/powers/adrenaline.dm
@@ -13,5 +13,5 @@
//Recover from stuns.
/obj/effect/proc_holder/changeling/adrenaline/sting_action(mob/living/user)
- user.do_adrenaline(0, FALSE, 70, 0, TRUE, list(/datum/reagent/medicine/epinephrine = 3, /datum/reagent/drug/methamphetamine/changeling = 10, /datum/reagent/medicine/changelingadrenaline = 5), "Energy rushes through us.", 0, 0.75, 0)
+ user.do_adrenaline(0, FALSE, 70, 0, TRUE, list(/datum/reagent/medicine/epinephrine = 3, /datum/reagent/medicine/changelinghaste = 10, /datum/reagent/medicine/changelingadrenaline = 5), "Energy rushes through us.", 0, 0.75, 0)
return TRUE
diff --git a/code/modules/antagonists/changeling/powers/humanform.dm b/code/modules/antagonists/changeling/powers/humanform.dm
index c38bfe3b5b..c9edc12eeb 100644
--- a/code/modules/antagonists/changeling/powers/humanform.dm
+++ b/code/modules/antagonists/changeling/powers/humanform.dm
@@ -10,15 +10,8 @@
//Transform into a human.
/obj/effect/proc_holder/changeling/humanform/sting_action(mob/living/carbon/user)
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
- var/list/names = list()
- for(var/datum/changelingprofile/prof in changeling.stored_profiles)
- names += "[prof.name]"
- var/chosen_name = input("Select the target DNA: ", "Target DNA", null) as null|anything in names
- if(!chosen_name)
- return
-
- var/datum/changelingprofile/chosen_prof = changeling.get_dna(chosen_name)
+ var/datum/changelingprofile/chosen_prof = changeling.select_dna()
if(!chosen_prof)
return
if(!user || user.mob_transforming)
diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm
index 3857d1206c..f4b74c5567 100644
--- a/code/modules/antagonists/changeling/powers/mutations.dm
+++ b/code/modules/antagonists/changeling/powers/mutations.dm
@@ -466,7 +466,7 @@
block_return[BLOCK_RETURN_BLOCK_CAPACITY] = (block_return[BLOCK_RETURN_BLOCK_CAPACITY] || 0) + remaining_uses
return ..()
-/obj/item/shield/changeling/active_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
+/obj/item/shield/changeling/directional_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
. = ..()
if(--remaining_uses < 1)
if(ishuman(loc))
diff --git a/code/modules/antagonists/changeling/powers/pheromone_receptors.dm b/code/modules/antagonists/changeling/powers/pheromone_receptors.dm
index 3d54c19350..3bda7335a1 100644
--- a/code/modules/antagonists/changeling/powers/pheromone_receptors.dm
+++ b/code/modules/antagonists/changeling/powers/pheromone_receptors.dm
@@ -30,7 +30,7 @@
//Modified IA pinpointer - Points to the NEAREST changeling, but will only get you within a few tiles of the target.
//You'll still have to rely on intuition and observation to make the identification. Lings can 'hide' in public places.
/datum/status_effect/agent_pinpointer/changeling
- alert_type = /obj/screen/alert/status_effect/agent_pinpointer/changeling
+ alert_type = /atom/movable/screen/alert/status_effect/agent_pinpointer/changeling
minimum_range = CHANGELING_PHEROMONE_MIN_DISTANCE
tick_interval = CHANGELING_PHEROMONE_PING_TIME
range_fuzz_factor = 0
@@ -55,6 +55,6 @@
scan_target = null
-/obj/screen/alert/status_effect/agent_pinpointer/changeling
+/atom/movable/screen/alert/status_effect/agent_pinpointer/changeling
name = "Pheromone Scent"
desc = "The nose always knows."
diff --git a/code/modules/antagonists/changeling/powers/tiny_prick.dm b/code/modules/antagonists/changeling/powers/tiny_prick.dm
index a8fe56aae7..9bda1bf5b9 100644
--- a/code/modules/antagonists/changeling/powers/tiny_prick.dm
+++ b/code/modules/antagonists/changeling/powers/tiny_prick.dm
@@ -78,7 +78,7 @@
if(changeling.chosen_sting)
unset_sting(user)
return
- selected_dna = changeling.select_dna("Select the target DNA: ", "Target DNA")
+ selected_dna = changeling.select_dna()
if(!selected_dna)
return
if(NOTRANSSTING in selected_dna.dna.species.species_traits)
diff --git a/code/modules/antagonists/changeling/powers/transform.dm b/code/modules/antagonists/changeling/powers/transform.dm
index 8e3a36740b..cfd42f05cf 100644
--- a/code/modules/antagonists/changeling/powers/transform.dm
+++ b/code/modules/antagonists/changeling/powers/transform.dm
@@ -134,7 +134,7 @@
//Change our DNA to that of somebody we've absorbed.
/obj/effect/proc_holder/changeling/transform/sting_action(mob/living/carbon/human/user)
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
- var/datum/changelingprofile/chosen_prof = changeling.select_dna("Select the target DNA: ", "Target DNA")
+ var/datum/changelingprofile/chosen_prof = changeling.select_dna()
if(!chosen_prof)
return
@@ -142,15 +142,21 @@
changeling_transform(user, chosen_prof)
return TRUE
-/datum/antagonist/changeling/proc/select_dna(var/prompt, var/title)
+/**
+ * Gives a changeling a list of all possible dnas in their profiles to choose from and returns profile containing their chosen dna
+ */
+/datum/antagonist/changeling/proc/select_dna()
var/mob/living/carbon/user = owner.current
if(!istype(user))
return
- var/list/names = list("Drop Flesh Disguise")
- for(var/datum/changelingprofile/prof in stored_profiles)
- names += "[prof.name]"
+ var/list/disguises = list("Drop Flesh Disguise" = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_drop"))
+ for(var/datum/changelingprofile/current_profile in stored_profiles)
+ var/datum/icon_snapshot/snap = current_profile.profile_snapshot
+ var/image/disguise_image = image(icon = snap.icon, icon_state = snap.icon_state)
+ disguise_image.overlays = snap.overlays
+ disguises[current_profile.name] = disguise_image
- var/chosen_name = input(prompt, title, null) as null|anything in names
+ var/chosen_name = show_radial_menu(user, user, disguises, custom_check = CALLBACK(src, .proc/check_menu, user), radius = 40, require_near = TRUE, tooltips = TRUE)
if(!chosen_name)
return
@@ -158,6 +164,21 @@
for(var/slot in GLOB.slots)
if(istype(user.vars[slot], GLOB.slot2type[slot]))
qdel(user.vars[slot])
+ return
var/datum/changelingprofile/prof = get_dna(chosen_name)
return prof
+
+/**
+ * Checks if we are allowed to interact with a radial menu
+ *
+ * Arguments:
+ * * user The carbon mob interacting with the menu
+ */
+/datum/antagonist/changeling/proc/check_menu(mob/living/carbon/user)
+ if(!istype(user))
+ return FALSE
+ var/datum/antagonist/changeling/changeling_datum = user.mind.has_antag_datum(/datum/antagonist/changeling)
+ if(!changeling_datum)
+ return FALSE
+ return TRUE
diff --git a/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm b/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm
index 1da49efe3c..3609037f58 100644
--- a/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm
@@ -69,7 +69,7 @@
do_sparks(5, TRUE, AM)
if(isliving(AM))
var/mob/living/L = AM
- L.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/static)
+ L.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
L.clear_fullscreen("flash", 5)
var/obj/item/transfer_valve/TTV = locate() in L.GetAllContents()
if(TTV)
diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
index 34370faa0a..4b88d203d6 100644
--- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
@@ -225,18 +225,22 @@
return ..()
/obj/effect/clockwork/sigil/transmission/process()
- var/power_drained = 0
- var/power_mod = 0.005
- for(var/t in spiral_range_turfs(SIGIL_ACCESS_RANGE, src))
- var/turf/T = t
- for(var/M in T)
- var/atom/movable/A = M
- power_drained += A.power_drain(TRUE)
+ do_process()
- CHECK_TICK
+/obj/effect/clockwork/sigil/transmission/proc/do_process()
+ set waitfor = FALSE
+ var/power_drained = 0
+ var/power_mod = 0.005
+ for(var/t in spiral_range_turfs(SIGIL_ACCESS_RANGE, src))
+ var/turf/T = t
+ for(var/M in T)
+ var/atom/movable/A = M
+ power_drained += A.power_drain(TRUE)
- adjust_clockwork_power(power_drained * power_mod * 15)
- new /obj/effect/temp_visual/ratvar/sigil/transmission(loc, 1 + (power_drained * 0.0035))
+ CHECK_TICK
+
+ adjust_clockwork_power(power_drained * power_mod * 15)
+ new /obj/effect/temp_visual/ratvar/sigil/transmission(loc, 1 + (power_drained * 0.0035))
/obj/effect/clockwork/sigil/transmission/proc/charge_cyborg(mob/living/silicon/robot/cyborg)
if(!cyborg_checks(cyborg))
diff --git a/code/modules/antagonists/clockcult/clock_effects/servant_blocker.dm b/code/modules/antagonists/clockcult/clock_effects/servant_blocker.dm
index 12b2af3f64..ce6e315cd8 100644
--- a/code/modules/antagonists/clockcult/clock_effects/servant_blocker.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/servant_blocker.dm
@@ -29,7 +29,7 @@
return
return TRUE
-/obj/effect/clockwork/servant_blocker/BlockSuperconductivity()
+/obj/effect/clockwork/servant_blocker/BlockThermalConductivity()
return TRUE
/obj/effect/clockwork/servant_blocker/singularity_act()
diff --git a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
index aa69478217..b702b19566 100644
--- a/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
+++ b/code/modules/antagonists/clockcult/clock_items/clock_weapons/ratvarian_spear.dm
@@ -90,7 +90,6 @@
parry_time_perfect = 2
parry_efficiency_perfect = 110 //Very low leeway for counterattacks...
parry_efficiency_considered_successful = 0.8
- parry_efficiency_to_counterattack = 1
+ parry_efficiency_to_counterattack = 110
parry_cooldown = 15 //But also very low cooldown..
parry_failed_stagger_duration = 2 SECONDS //And relatively small penalties for failing.
- parry_failed_clickcd_duration = 1 SECONDS
diff --git a/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm b/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm
index 2a916c7a2f..5e25b8de82 100644
--- a/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm
+++ b/code/modules/antagonists/clockcult/clock_items/wraith_spectacles.dm
@@ -97,18 +97,18 @@
id = "wraith_spectacles"
duration = -1 //remains until eye damage done reaches 0 while the glasses are not worn
tick_interval = 20
- alert_type = /obj/screen/alert/status_effect/wraith_spectacles
+ alert_type = /atom/movable/screen/alert/status_effect/wraith_spectacles
var/eye_damage_done = 0
var/nearsight_breakpoint = 30
var/blind_breakpoint = 45
-/obj/screen/alert/status_effect/wraith_spectacles
+/atom/movable/screen/alert/status_effect/wraith_spectacles
name = "Wraith Spectacles"
desc = "You shouldn't actually see this, as it should be procedurally generated."
icon_state = "wraithspecs"
alerttooltipstyle = "clockcult"
-/obj/screen/alert/status_effect/wraith_spectacles/MouseEntered(location,control,params)
+/atom/movable/screen/alert/status_effect/wraith_spectacles/MouseEntered(location,control,params)
var/mob/living/carbon/human/L = usr
if(istype(L)) //this is probably more safety than actually needed
var/datum/status_effect/wraith_spectacles/W = attached_effect
diff --git a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm
index 025306dae4..973b615f4a 100644
--- a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm
@@ -141,7 +141,7 @@
if(isliving(M.current) && M.current.stat != DEAD)
var/turf/t_turf = isAI(M.current) ? get_step(get_step(src, NORTH),NORTH) : get_turf(src) // AI too fat, must make sure it always ends up a 2 tiles north instead of on the ark.
do_teleport(M.current, t_turf, channel = TELEPORT_CHANNEL_CULT, forced = TRUE)
- M.current.overlay_fullscreen("flash", /obj/screen/fullscreen/flash)
+ M.current.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash)
M.current.clear_fullscreen("flash", 5)
playsound(src, 'sound/magic/clockwork/invoke_general.ogg', 50, FALSE)
recalls_remaining--
@@ -181,9 +181,15 @@
make_glow()
glow.icon_state = "clockwork_gateway_disrupted"
resistance_flags |= INDESTRUCTIBLE
- sleep(27)
- explosion(src, 1, 3, 8, 8)
- sound_to_playing_players('sound/effects/explosion_distant.ogg', volume = 50)
+ addtimer(CALLBACK(src, .proc/go_boom), 2.7 SECONDS)
+ return
+ qdel(src)
+
+/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/go_boom()
+ if(QDELETED(src))
+ return
+ explosion(src, 1, 3, 8, 8)
+ sound_to_playing_players('sound/effects/explosion_distant.ogg', volume = 50)
qdel(src)
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/make_glow()
@@ -240,6 +246,36 @@
if(GATEWAY_RATVAR_COMING to INFINITY)
. += "The anomaly is stable! Something is coming through!"
+/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/fulfill_purpose()
+ set waitfor = FALSE
+ countdown.stop()
+ resistance_flags |= INDESTRUCTIBLE
+ purpose_fulfilled = TRUE
+ make_glow()
+ animate(glow, transform = matrix() * 1.5, alpha = 255, time = 125)
+ sound_to_playing_players(volume = 100, channel = CHANNEL_JUSTICAR_ARK, S = sound('sound/effects/ratvar_rises.ogg')) //End the sounds
+ sleep(125)
+ make_glow()
+ animate(glow, transform = matrix() * 3, alpha = 0, time = 5)
+ QDEL_IN(src, 3)
+ sleep(3)
+ GLOB.clockwork_gateway_activated = TRUE
+ var/turf/T = SSmapping.get_station_center()
+ new /obj/structure/destructible/clockwork/massive/ratvar(T)
+ var/x0 = T.x
+ var/y0 = T.y
+ for(var/I in spiral_range_turfs(255, T, tick_checked = TRUE))
+ var/turf/T2 = I
+ if(!T2)
+ continue
+ var/dist = cheap_hypotenuse(T2.x, T2.y, x0, y0)
+ if(dist < 100)
+ dist = TRUE
+ else
+ dist = FALSE
+ T.ratvar_act(dist)
+ CHECK_TICK
+
/obj/structure/destructible/clockwork/massive/celestial_gateway/process()
adjust_clockwork_power(2.5) //Provides weak power generation on its own
if(seconds_until_activation)
@@ -275,7 +311,7 @@
var/turf/T = get_turf(M)
if(is_servant_of_ratvar(M) && (!T || T.z != z))
M.forceMove(get_step(src, SOUTH))
- M.overlay_fullscreen("flash", /obj/screen/fullscreen/flash)
+ M.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash)
M.clear_fullscreen("flash", 5)
progress_in_seconds += GATEWAY_SUMMON_RATE
switch(progress_in_seconds)
@@ -300,33 +336,7 @@
glow.icon_state = "clockwork_gateway_closing"
if(GATEWAY_RATVAR_ARRIVAL to INFINITY)
if(!purpose_fulfilled)
- countdown.stop()
- resistance_flags |= INDESTRUCTIBLE
- purpose_fulfilled = TRUE
- make_glow()
- animate(glow, transform = matrix() * 1.5, alpha = 255, time = 125)
- sound_to_playing_players(volume = 100, channel = CHANNEL_JUSTICAR_ARK, S = sound('sound/effects/ratvar_rises.ogg')) //End the sounds
- sleep(125)
- make_glow()
- animate(glow, transform = matrix() * 3, alpha = 0, time = 5)
- QDEL_IN(src, 3)
- sleep(3)
- GLOB.clockwork_gateway_activated = TRUE
- var/turf/T = SSmapping.get_station_center()
- new /obj/structure/destructible/clockwork/massive/ratvar(T)
- var/x0 = T.x
- var/y0 = T.y
- for(var/I in spiral_range_turfs(255, T, tick_checked = TRUE))
- var/turf/T2 = I
- if(!T2)
- continue
- var/dist = cheap_hypotenuse(T2.x, T2.y, x0, y0)
- if(dist < 100)
- dist = TRUE
- else
- dist = FALSE
- T.ratvar_act(dist)
- CHECK_TICK
+ fulfill_purpose()
//Converts nearby turfs into their clockwork equivalent, with ever-increasing range the closer the ark is to summoning Ratvar
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/conversion_pulse()
diff --git a/code/modules/antagonists/clockcult/clock_structures/prolonging_prism.dm b/code/modules/antagonists/clockcult/clock_structures/prolonging_prism.dm
index 73488d736a..ededd0174c 100644
--- a/code/modules/antagonists/clockcult/clock_structures/prolonging_prism.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/prolonging_prism.dm
@@ -60,12 +60,8 @@
delay_remaining += PRISM_DELAY_DURATION
toggle(0, user)
-/obj/structure/destructible/clockwork/powered/prolonging_prism/process()
- var/turf/own_turf = get_turf(src)
- if(SSshuttle.emergency.mode != SHUTTLE_CALL || delay_remaining <= 0 || !own_turf || !is_station_level(own_turf.z))
- forced_disable(FALSE)
- return
- . = ..()
+/obj/structure/destructible/clockwork/powered/prolonging_prism/proc/do_process()
+ set waitfor = FALSE
var/delay_amount = 40
delay_remaining -= delay_amount
var/efficiency = get_efficiency_mod()
@@ -114,6 +110,14 @@
new /obj/effect/temp_visual/ratvar/prolonging_prism(T)
CHECK_TICK //we may be going over a hell of a lot of turfs
+/obj/structure/destructible/clockwork/powered/prolonging_prism/process()
+ var/turf/own_turf = get_turf(src)
+ if(SSshuttle.emergency.mode != SHUTTLE_CALL || delay_remaining <= 0 || !own_turf || !is_station_level(own_turf.z))
+ forced_disable(FALSE)
+ return
+ . = ..()
+ do_process()
+
/obj/structure/destructible/clockwork/powered/prolonging_prism/proc/get_delay_cost()
return FLOOR(delay_cost, MIN_CLOCKCULT_POWER)
diff --git a/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
index 24ad1af88a..51f8dc7101 100644
--- a/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/ratvar_the_clockwork_justicar.dm
@@ -110,6 +110,7 @@
//Put me in Reebe, will you? Ratvar has found and is going to do a hecking murder on Nar'Sie
/obj/structure/destructible/clockwork/massive/ratvar/proc/clash_of_the_titans(obj/singularity/narsie/narsie)
+ set waitfor = FALSE
var/winner = "Undeclared"
var/base_victory_chance = 1
while(src && narsie)
diff --git a/code/modules/antagonists/clockcult/clockcult.dm b/code/modules/antagonists/clockcult/clockcult.dm
index 6f91299cdb..8bf26d6397 100644
--- a/code/modules/antagonists/clockcult/clockcult.dm
+++ b/code/modules/antagonists/clockcult/clockcult.dm
@@ -136,7 +136,7 @@
hierophant_network.span_for_name = "nezbere"
hierophant_network.span_for_message = "brass"
hierophant_network.Grant(current)
- current.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump)
+ current.throw_alert("clockinfo", /atom/movable/screen/alert/clockwork/infodump)
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar
if(G && G.active && ishuman(current))
current.add_overlay(mutable_appearance('icons/effects/genetics.dmi', "servitude", -ANTAG_LAYER))
diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm
index 568f01ab83..9bd1030685 100644
--- a/code/modules/antagonists/cult/blood_magic.dm
+++ b/code/modules/antagonists/cult/blood_magic.dm
@@ -687,10 +687,10 @@
if(H.stat == DEAD)
to_chat(user,"Only a revive rune can bring back the dead!")
return
- if(H.blood_volume < (BLOOD_VOLUME_SAFE*H.blood_ratio))
+ if(H.functional_blood() < (BLOOD_VOLUME_SAFE*H.blood_ratio))
var/restore_blood = (BLOOD_VOLUME_SAFE*H.blood_ratio) - H.blood_volume
- if(uses*2 < restore_blood)
- H.blood_volume += uses*2
+ if(uses * 2 < restore_blood)
+ H.adjust_integration_blood(uses * 2)
to_chat(user,"You use the last of your blood rites to restore what blood you could!")
uses = 0
return ..()
diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm
index 0cc0ed133e..a18523069e 100644
--- a/code/modules/antagonists/cult/cult.dm
+++ b/code/modules/antagonists/cult/cult.dm
@@ -124,7 +124,7 @@
communion.Grant(current)
if(ishuman(current))
magic.Grant(current)
- current.throw_alert("bloodsense", /obj/screen/alert/bloodsense)
+ current.throw_alert("bloodsense", /atom/movable/screen/alert/bloodsense)
if(cult_team?.cult_risen)
cult_team.rise(current)
if(cult_team.cult_ascendent)
diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm
index 25fd446b06..a2f283ec67 100644
--- a/code/modules/antagonists/cult/cult_structures.dm
+++ b/code/modules/antagonists/cult/cult_structures.dm
@@ -204,26 +204,31 @@
STOP_PROCESSING(SSfastprocess, src)
return ..()
+/obj/structure/destructible/cult/pylon/proc/heal_friends()
+ set waitfor = FALSE
+ for(var/mob/living/L in range(5, src))
+ if(iscultist(L) || isshade(L) || isconstruct(L))
+ if(L.health != L.maxHealth)
+ new /obj/effect/temp_visual/heal(get_turf(src), "#960000")
+ if(ishuman(L))
+ L.adjustBruteLoss(-1, 0, only_organic = FALSE)
+ L.adjustFireLoss(-1, 0, only_organic = FALSE)
+ L.updatehealth()
+ if(isshade(L) || isconstruct(L))
+ var/mob/living/simple_animal/M = L
+ if(M.health < M.maxHealth)
+ M.adjustHealth(-3)
+ if(ishuman(L) && L.blood_volume < (BLOOD_VOLUME_NORMAL * L.blood_ratio))
+ L.adjust_integration_blood(1.0)
+ CHECK_TICK
+
+
/obj/structure/destructible/cult/pylon/process()
if(!anchored)
return
if(last_heal <= world.time)
last_heal = world.time + heal_delay
- for(var/mob/living/L in range(5, src))
- if(iscultist(L) || isshade(L) || isconstruct(L))
- if(L.health != L.maxHealth)
- new /obj/effect/temp_visual/heal(get_turf(src), "#960000")
- if(ishuman(L))
- L.adjustBruteLoss(-1, 0, only_organic = FALSE)
- L.adjustFireLoss(-1, 0, only_organic = FALSE)
- L.updatehealth()
- if(isshade(L) || isconstruct(L))
- var/mob/living/simple_animal/M = L
- if(M.health < M.maxHealth)
- M.adjustHealth(-3)
- if(ishuman(L) && L.blood_volume < (BLOOD_VOLUME_NORMAL * L.blood_ratio))
- L.blood_volume += 1.0
- CHECK_TICK
+ heal_friends()
if(last_corrupt <= world.time)
var/list/validturfs = list()
var/list/cultturfs = list()
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index 276729b359..7981a10701 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -647,7 +647,7 @@ structure_check() searches for nearby cultist structures required for the invoca
GLOB.wall_runes -= src
return ..()
-/obj/effect/rune/wall/BlockSuperconductivity()
+/obj/effect/rune/wall/BlockThermalConductivity()
return density
/obj/effect/rune/wall/invoke(var/list/invokers)
diff --git a/code/modules/antagonists/devil/devil.dm b/code/modules/antagonists/devil/devil.dm
index 3b6dc68986..65ce89d33f 100644
--- a/code/modules/antagonists/devil/devil.dm
+++ b/code/modules/antagonists/devil/devil.dm
@@ -515,7 +515,6 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
var/mob/living/silicon/robot_devil = owner.current
var/laws = list("You may not use violence to coerce someone into selling their soul.", "You may not directly and knowingly physically harm a devil, other than yourself.", GLOB.lawlorify[LAW][ban], GLOB.lawlorify[LAW][obligation], "Accomplish your objectives at all costs.")
robot_devil.set_law_sixsixsix(laws)
- sleep(10)
if(owner.assigned_role == "Clown" && ishuman(owner.current))
var/mob/living/carbon/human/S = owner.current
to_chat(S, "Your infernal nature has allowed you to overcome your clownishness.")
diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm
index 069080170e..ac1e5630da 100644
--- a/code/modules/antagonists/devil/true_devil/_true_devil.dm
+++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm
@@ -104,7 +104,7 @@
/mob/living/carbon/true_devil/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
return 666
-/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash, override_protection = 0)
+/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash, override_protection = 0)
if(mind && has_bane(BANE_LIGHT))
mind.disrupt_spells(-500)
return ..() //flashes don't stop devils UNLESS it's their bane.
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
index 4d6576ee92..158acc0071 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_magic.dm
@@ -147,7 +147,7 @@
carbon_target.blood_volume -= 20
if(carbon_user.blood_volume < BLOOD_VOLUME_MAXIMUM) //we dont want to explode after all
- carbon_user.blood_volume += 20
+ carbon_user.adjust_integration_blood(20)
return
/obj/effect/proc_holder/spell/pointed/blood_siphon/can_target(atom/target, mob/user, silent)
diff --git a/code/modules/antagonists/morph/morph.dm b/code/modules/antagonists/morph/morph.dm
index 077c380ef0..8352b8f238 100644
--- a/code/modules/antagonists/morph/morph.dm
+++ b/code/modules/antagonists/morph/morph.dm
@@ -38,7 +38,7 @@
var/atom/movable/form = null
var/morph_time = 0
var/static/list/blacklist_typecache = typecacheof(list(
- /obj/screen,
+ /atom/movable/screen,
/obj/singularity,
/mob/living/simple_animal/hostile/morph,
/obj/effect,
diff --git a/code/modules/antagonists/traitor/IAA/internal_affairs.dm b/code/modules/antagonists/traitor/IAA/internal_affairs.dm
index ff012e556a..4414fe8257 100644
--- a/code/modules/antagonists/traitor/IAA/internal_affairs.dm
+++ b/code/modules/antagonists/traitor/IAA/internal_affairs.dm
@@ -42,12 +42,12 @@
id = "agent_pinpointer"
duration = -1
tick_interval = PINPOINTER_PING_TIME
- alert_type = /obj/screen/alert/status_effect/agent_pinpointer
+ alert_type = /atom/movable/screen/alert/status_effect/agent_pinpointer
var/minimum_range = PINPOINTER_MINIMUM_RANGE
var/range_fuzz_factor = PINPOINTER_EXTRA_RANDOM_RANGE
var/mob/scan_target = null
-/obj/screen/alert/status_effect/agent_pinpointer
+/atom/movable/screen/alert/status_effect/agent_pinpointer
name = "Internal Affairs Integrated Pinpointer"
desc = "Even stealthier than a normal implant."
icon = 'icons/obj/device.dmi'
diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
index 0659655da5..fcc8bcade8 100644
--- a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
+++ b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm
@@ -401,6 +401,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
next_announce += DOOMSDAY_ANNOUNCE_INTERVAL
/obj/machinery/doomsday_device/proc/detonate()
+ set waitfor = FALSE
sound_to_playing_players('sound/machines/alarm.ogg')
sleep(100)
for(var/i in GLOB.mob_living_list)
diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm
index c328fa232d..d4d70cd053 100644
--- a/code/modules/antagonists/wizard/equipment/soulstone.dm
+++ b/code/modules/antagonists/wizard/equipment/soulstone.dm
@@ -224,7 +224,7 @@
if(target.type == /mob/living/simple_animal/hostile/construct/shade) //Make sure we remember which body belonged to the shade
var/mob/living/simple_animal/hostile/construct/shade/shade = target
newstruct.original_mind = shade.original_mind
- var/obj/screen/alert/bloodsense/BS
+ var/atom/movable/screen/alert/bloodsense/BS
if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && SSticker?.mode)
SSticker.mode.add_cultist(newstruct.mind, 0)
if(iscultist(stoner) || cultoverride)
@@ -232,7 +232,7 @@
else if(stoner)
to_chat(newstruct, "You are still bound to serve your creator, [stoner], follow [stoner.p_their()] orders and help [stoner.p_them()] complete [stoner.p_their()] goals at all costs.")
newstruct.clear_alert("bloodsense")
- BS = newstruct.throw_alert("bloodsense", /obj/screen/alert/bloodsense)
+ BS = newstruct.throw_alert("bloodsense", /atom/movable/screen/alert/bloodsense)
if(BS)
BS.Cviewer = newstruct
newstruct.cancel_camera()
diff --git a/code/modules/arousal/arousal.dm b/code/modules/arousal/arousal.dm
index bd8b5dbf7a..36da6c73ba 100644
--- a/code/modules/arousal/arousal.dm
+++ b/code/modules/arousal/arousal.dm
@@ -197,6 +197,7 @@
//Here's the main proc itself
/mob/living/carbon/human/proc/mob_climax(forced_climax=FALSE,cause = "") //Forced is instead of the other proc, makes you cum if you have the tools for it, ignoring restraints
+ set waitfor = FALSE
if(mb_cd_timer > world.time)
if(!forced_climax) //Don't spam the message to the victim if forced to come too fast
to_chat(src, "You need to wait [DisplayTimeText((mb_cd_timer - world.time), TRUE)] before you can do that again!")
diff --git a/code/modules/arousal/genitals.dm b/code/modules/arousal/genitals.dm
index 723049a784..bfcaff7d56 100644
--- a/code/modules/arousal/genitals.dm
+++ b/code/modules/arousal/genitals.dm
@@ -27,6 +27,12 @@
if(do_update)
update()
+/obj/item/organ/genital/Destroy()
+ if(linked_organ?.linked_organ == src)
+ linked_organ.linked_organ = null
+ linked_organ = null
+ . = ..()
+
/obj/item/organ/genital/proc/set_aroused_state(new_state,cause = "manual toggle")
if(!(genital_flags & GENITAL_CAN_AROUSE))
return FALSE
@@ -150,7 +156,7 @@
/obj/item/organ/genital/proc/update_size()
return
-/obj/item/organ/genital/proc/update_appearance()
+/obj/item/organ/genital/proc/update_appearance_genitals()
if(!owner || owner.stat == DEAD)
aroused_state = FALSE
@@ -187,7 +193,7 @@
. = ..()
if(.)
update()
- RegisterSignal(owner, COMSIG_MOB_DEATH, .proc/update_appearance)
+ RegisterSignal(owner, COMSIG_MOB_DEATH, .proc/update_appearance_genitals)
if(genital_flags & GENITAL_THROUGH_CLOTHES)
owner.exposed_genitals += src
diff --git a/code/modules/arousal/toys/dildos.dm b/code/modules/arousal/toys/dildos.dm
index 2482b93300..4de6877915 100644
--- a/code/modules/arousal/toys/dildos.dm
+++ b/code/modules/arousal/toys/dildos.dm
@@ -20,7 +20,7 @@
var/is_knotted = FALSE
//Lists moved to _cit_helpers.dm as globals so they're not instanced individually
-/obj/item/dildo/proc/update_appearance()
+/obj/item/dildo/update_appearance()
icon_state = "[dildo_type]_[dildo_shape]_[dildo_size]"
var/sizeword = ""
switch(dildo_size)
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index 1c814fa193..8c025e2ab4 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -146,7 +146,7 @@
return
/obj/item/tank/proc/ignite() //This happens when a bomb is told to explode
- var/fuel_moles = air_contents.get_moles(/datum/gas/plasma) + air_contents.get_moles(/datum/gas/oxygen)/6
+ var/fuel_moles = air_contents.get_moles(GAS_PLASMA) + air_contents.get_moles(GAS_O2)/6
var/datum/gas_mixture/bomb_mixture = air_contents.copy()
var/strength = 1
@@ -196,9 +196,8 @@
ground_zero.air_update_turf()
/obj/item/tank/proc/release() //This happens when the bomb is not welded. Tank contents are just spat out.
- var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
var/turf/T = get_turf(src)
if(!T)
return
- T.assume_air(removed)
+ T.assume_air(air_contents)
air_update_turf()
diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm
index 899eb12511..d0ed0f2436 100644
--- a/code/modules/assembly/infrared.dm
+++ b/code/modules/assembly/infrared.dm
@@ -81,6 +81,7 @@
return
/obj/item/assembly/infra/proc/refreshBeam()
+ set waitfor = FALSE
QDEL_LIST(beams)
if(throwing || !on || !secured)
return
diff --git a/code/modules/atmospherics/auxgm/breathing_classes.dm b/code/modules/atmospherics/auxgm/breathing_classes.dm
new file mode 100644
index 0000000000..4abfab58ee
--- /dev/null
+++ b/code/modules/atmospherics/auxgm/breathing_classes.dm
@@ -0,0 +1,37 @@
+// Breathing classes are, yes, just a list of gases, associated with numbers.
+// But they're very simple: pluoxium's status as O2 * 8 is represented here,
+// with a single line of code, no hardcoding and special-casing across the codebase.
+// Not only that, but they're very general: you could have a negative value
+// to simulate asphyxiants, e.g. if I add krypton it could go into the oxygen
+// breathing class at -7, simulating krypton narcosis.
+
+/datum/breathing_class
+ var/list/gases = null
+ var/list/products = null
+ var/danger_reagent = null
+ var/low_alert_category = "not_enough_oxy"
+ var/low_alert_datum = /atom/movable/screen/alert/not_enough_oxy
+ var/high_alert_category = "too_much_oxy"
+ var/high_alert_datum = /atom/movable/screen/alert/too_much_oxy
+
+/datum/breathing_class/oxygen
+ gases = list(
+ GAS_O2 = 1,
+ GAS_PLUOXIUM = 8,
+ GAS_CO2 = -0.7, // CO2 isn't actually toxic, just an asphyxiant
+ )
+ products = list(
+ GAS_CO2 = 1,
+ )
+
+/datum/breathing_class/plasma
+ gases = list(
+ GAS_PLASMA = 1
+ )
+ products = list(
+ GAS_CO2 = 1
+ )
+ low_alert_category = "not_enough_tox"
+ low_alert_datum = /atom/movable/screen/alert/not_enough_tox
+ high_alert_category = "too_much_tox"
+ high_alert_datum = /atom/movable/screen/alert/too_much_tox
diff --git a/code/modules/atmospherics/auxgm/gas_types.dm b/code/modules/atmospherics/auxgm/gas_types.dm
new file mode 100644
index 0000000000..6d30d7ed92
--- /dev/null
+++ b/code/modules/atmospherics/auxgm/gas_types.dm
@@ -0,0 +1,194 @@
+/datum/gas/oxygen
+ id = GAS_O2
+ specific_heat = 20
+ name = "Oxygen"
+ oxidation_temperature = T0C - 100 // it checks max of this and fire temperature, so rarely will things spontaneously combust
+ powermix = 1
+ heat_penalty = 1
+ transmit_modifier = 1.5
+
+/datum/gas/nitrogen
+ id = GAS_N2
+ specific_heat = 20
+ name = "Nitrogen"
+ powermix = -1
+ heat_penalty = -1.5
+ breath_alert_info = list(
+ not_enough_alert = list(
+ alert_category = "not_enough_nitro",
+ alert_type = /atom/movable/screen/alert/not_enough_nitro
+ ),
+ too_much_alert = list(
+ alert_category = "too_much_nitro",
+ alert_type = /atom/movable/screen/alert/too_much_nitro
+ )
+ )
+
+/datum/gas/carbon_dioxide //what the fuck is this?
+ id = GAS_CO2
+ specific_heat = 30
+ name = "Carbon Dioxide"
+ powermix = 1
+ heat_penalty = 0.1
+ powerloss_inhibition = 1
+ breath_results = GAS_O2
+ breath_alert_info = list(
+ not_enough_alert = list(
+ alert_category = "not_enough_co2",
+ alert_type = /atom/movable/screen/alert/not_enough_co2
+ ),
+ too_much_alert = list(
+ alert_category = "too_much_co2",
+ alert_type = /atom/movable/screen/alert/too_much_co2
+ )
+ )
+ fusion_power = 3
+
+/datum/gas/plasma
+ id = GAS_PLASMA
+ specific_heat = 200
+ name = "Plasma"
+ gas_overlay = "plasma"
+ moles_visible = MOLES_GAS_VISIBLE
+ flags = GAS_FLAG_DANGEROUS
+ heat_penalty = 15
+ transmit_modifier = 4
+ powermix = 1
+ // no fire info cause it has its own bespoke reaction for trit generation reasons
+
+/datum/gas/water_vapor
+ id = GAS_H2O
+ specific_heat = 40
+ name = "Water Vapor"
+ gas_overlay = "water_vapor"
+ moles_visible = MOLES_GAS_VISIBLE
+ fusion_power = 8
+ heat_penalty = 8
+ powermix = 1
+ breath_reagent = /datum/reagent/water
+
+/datum/gas/hypernoblium
+ id = GAS_HYPERNOB
+ specific_heat = 2000
+ name = "Hyper-noblium"
+ gas_overlay = "freon"
+ moles_visible = MOLES_GAS_VISIBLE
+
+/datum/gas/nitrous_oxide
+ id = GAS_NITROUS
+ specific_heat = 40
+ name = "Nitrous Oxide"
+ gas_overlay = "nitrous_oxide"
+ moles_visible = MOLES_GAS_VISIBLE * 2
+ flags = GAS_FLAG_DANGEROUS
+ fire_products = list(GAS_N2 = 1)
+ oxidation_rate = 0.5
+ oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST + 100
+ heat_resistance = 6
+
+/datum/gas/nitryl
+ id = GAS_NITRYL
+ specific_heat = 20
+ name = "Nitryl"
+ gas_overlay = "nitryl"
+ moles_visible = MOLES_GAS_VISIBLE
+ flags = GAS_FLAG_DANGEROUS
+ fusion_power = 15
+ fire_products = list(GAS_N2 = 0.5)
+ oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50
+
+/datum/gas/tritium
+ id = GAS_TRITIUM
+ specific_heat = 10
+ name = "Tritium"
+ gas_overlay = "tritium"
+ moles_visible = MOLES_GAS_VISIBLE
+ flags = GAS_FLAG_DANGEROUS
+ fusion_power = 1
+ powermix = 1
+ heat_penalty = 10
+ transmit_modifier = 30
+ /*
+ these are for when we add hydrogen, trit gets to keep its hardcoded fire for legacy reasons
+ fire_provides = list(GAS_H2O = 2)
+ fire_burn_rate = 2
+ fire_energy_released = FIRE_HYDROGEN_ENERGY_RELEASED
+ fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50
+ */
+
+/datum/gas/bz
+ id = GAS_BZ
+ specific_heat = 20
+ name = "BZ"
+ flags = GAS_FLAG_DANGEROUS
+ fusion_power = 8
+ powermix = 1
+ heat_penalty = 5
+ transmit_modifier = -2
+ radioactivity_modifier = 5
+
+/datum/gas/stimulum
+ id = GAS_STIMULUM
+ specific_heat = 5
+ name = "Stimulum"
+ fusion_power = 7
+
+/datum/gas/pluoxium
+ id = GAS_PLUOXIUM
+ specific_heat = 80
+ name = "Pluoxium"
+ fusion_power = 10
+ oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST * 1000 // it is VERY stable
+ oxidation_rate = 8
+ powermix = -1
+ heat_penalty = -1
+ transmit_modifier = -5
+ heat_resistance = 3
+
+/datum/gas/miasma
+ id = GAS_MIASMA
+ specific_heat = 20
+ fusion_power = 50
+ name = "Miasma"
+ gas_overlay = "miasma"
+ moles_visible = MOLES_GAS_VISIBLE * 60
+
+/datum/gas/methane
+ id = GAS_METHANE
+ specific_heat = 30
+ name = "Methane"
+ breath_results = GAS_METHYL_BROMIDE
+ fire_products = list(GAS_CO2 = 1, GAS_H2O = 2)
+ fire_burn_rate = 0.5
+ breath_alert_info = list(
+ not_enough_alert = list(
+ alert_category = "not_enough_ch4",
+ alert_type = /atom/movable/screen/alert/not_enough_ch4
+ ),
+ too_much_alert = list(
+ alert_category = "too_much_ch4",
+ alert_type = /atom/movable/screen/alert/too_much_ch4
+ )
+ )
+ fire_energy_released = FIRE_CARBON_ENERGY_RELEASED
+ fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
+
+/datum/gas/methyl_bromide
+ id = GAS_METHYL_BROMIDE
+ specific_heat = 42
+ name = "Methyl Bromide"
+ flags = GAS_FLAG_DANGEROUS
+ breath_alert_info = list(
+ not_enough_alert = list(
+ alert_category = "not_enough_ch3br",
+ alert_type = /atom/movable/screen/alert/not_enough_ch3br
+ ),
+ too_much_alert = list(
+ alert_category = "too_much_ch3br",
+ alert_type = /atom/movable/screen/alert/too_much_ch3br
+ )
+ )
+ fire_products = list(GAS_CO2 = 1, GAS_H2O = 1.5, GAS_BZ = 0.5)
+ fire_energy_released = FIRE_CARBON_ENERGY_RELEASED
+ fire_burn_rate = 0.5
+ fire_temperature = 808 // its autoignition, it apparently doesn't spark readily, so i don't put it lower
diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm
index 81e103fba2..cfa3e7eb14 100644
--- a/code/modules/atmospherics/environmental/LINDA_fire.dm
+++ b/code/modules/atmospherics/environmental/LINDA_fire.dm
@@ -13,28 +13,21 @@
if(!air)
return
- var/oxy = air.get_moles(/datum/gas/oxygen)
- if (oxy < 0.5)
+ if (air.get_oxidation_power(exposed_temperature) < 0.5 || air.get_moles(GAS_HYPERNOB) > 5)
return
- var/tox = air.get_moles(/datum/gas/plasma)
- var/trit = air.get_moles(/datum/gas/tritium)
+ var/has_fuel = air.get_moles(GAS_PLASMA) > 0.5 || air.get_moles(GAS_TRITIUM) > 0.5 || air.get_fuel_amount(exposed_temperature) > 0.5
if(active_hotspot)
if(soh)
- if(tox > 0.5 || trit > 0.5)
+ if(has_fuel)
if(active_hotspot.temperature < exposed_temperature)
active_hotspot.temperature = exposed_temperature
if(active_hotspot.volume < exposed_volume)
active_hotspot.volume = exposed_volume
return
- if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && (tox > 0.5 || trit > 0.5))
-
+ if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && has_fuel)
active_hotspot = new /obj/effect/hotspot(src, exposed_volume*25, exposed_temperature)
- active_hotspot.just_spawned = (current_cycle < SSair.times_fired)
- //remove just_spawned protection if no longer processing this cell
- SSair.add_to_active(src, 0)
-
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
/obj/effect/hotspot
anchored = TRUE
@@ -48,7 +41,6 @@
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
- var/just_spawned = TRUE
var/bypassing = FALSE
var/visual_update_tick = 0
@@ -70,7 +62,7 @@
location.active_hotspot = src
- bypassing = !just_spawned && (volume > CELL_VOLUME*0.95)
+ bypassing = volume > CELL_VOLUME*0.95
if(bypassing)
volume = location.air.reaction_results["fire"]*FIRE_GROWTH_RATE
@@ -150,10 +142,6 @@
#define INSUFFICIENT(path) (location.air.get_moles(path) < 0.5)
/obj/effect/hotspot/process()
- if(just_spawned)
- just_spawned = FALSE
- return
-
var/turf/open/location = loc
if(!istype(location))
qdel(src)
@@ -164,13 +152,7 @@
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
qdel(src)
return
- if(!location.air || (INSUFFICIENT(/datum/gas/plasma) && INSUFFICIENT(/datum/gas/tritium)) || INSUFFICIENT(/datum/gas/oxygen))
- qdel(src)
- return
-
- //Not enough to burn
- // god damn it previous coder you made the INSUFFICIENT macro for a fucking reason why didn't you use it here smh
- if((INSUFFICIENT(/datum/gas/plasma) && INSUFFICIENT(/datum/gas/tritium)) || INSUFFICIENT(/datum/gas/oxygen))
+ if(!location.air || location.air.get_moles(GAS_HYPERNOB) > 5 || location.air.get_oxidation_power() < 0.5 || (INSUFFICIENT(GAS_PLASMA) && INSUFFICIENT(GAS_TRITIUM) && location.air.get_fuel_amount() < 0.5))
qdel(src)
return
diff --git a/code/modules/atmospherics/environmental/LINDA_system.dm b/code/modules/atmospherics/environmental/LINDA_system.dm
index f714a94646..8d063825f1 100644
--- a/code/modules/atmospherics/environmental/LINDA_system.dm
+++ b/code/modules/atmospherics/environmental/LINDA_system.dm
@@ -19,57 +19,58 @@
/turf/open/CanAtmosPass(turf/T, vertical = FALSE)
var/dir = vertical? get_dir_multiz(src, T) : get_dir(src, T)
var/opp = REVERSE_DIR(dir)
- var/R = FALSE
+ . = TRUE
if(vertical && !(zAirOut(dir, T) && T.zAirIn(dir, src)))
- R = TRUE
+ . = FALSE
if(blocks_air || T.blocks_air)
- R = TRUE
+ . = FALSE
if (T == src)
- return !R
+ return .
for(var/obj/O in contents+T.contents)
var/turf/other = (O.loc == src ? T : src)
if(!(vertical? (CANVERTICALATMOSPASS(O, other)) : (CANATMOSPASS(O, other))))
- R = TRUE
- if(O.BlockSuperconductivity()) //the direction and open/closed are already checked on CanAtmosPass() so there are no arguments
- atmos_supeconductivity |= dir
- T.atmos_supeconductivity |= opp
- return FALSE //no need to keep going, we got all we asked
+ . = FALSE
+ if(O.BlockThermalConductivity()) //the direction and open/closed are already checked on CanAtmosPass() so there are no arguments
+ conductivity_blocked_directions |= dir
+ T.conductivity_blocked_directions |= opp
+ if(!.)
+ return .
- atmos_supeconductivity &= ~dir
- T.atmos_supeconductivity &= ~opp
-
- return !R
-
-/atom/movable/proc/BlockSuperconductivity() // objects that block air and don't let superconductivity act. Only firelocks atm.
+/atom/movable/proc/BlockThermalConductivity() // Objects that don't let heat through.
return FALSE
/turf/proc/ImmediateCalculateAdjacentTurfs()
+ if(SSair.thread_running())
+ CALCULATE_ADJACENT_TURFS(src)
+ return
var/canpass = CANATMOSPASS(src, src)
var/canvpass = CANVERTICALATMOSPASS(src, src)
for(var/direction in GLOB.cardinals_multiz)
var/turf/T = get_step_multiz(src, direction)
- var/opp_dir = REVERSE_DIR(direction)
- if(!isopenturf(T))
+ if(!istype(T))
continue
- if(!(blocks_air || T.blocks_air) && ((direction & (UP|DOWN))? (canvpass && CANVERTICALATMOSPASS(T, src)) : (canpass && CANATMOSPASS(T, src))) )
+ var/opp_dir = REVERSE_DIR(direction)
+ if(isopenturf(T) && !(blocks_air || T.blocks_air) && ((direction & (UP|DOWN))? (canvpass && CANVERTICALATMOSPASS(T, src)) : (canpass && CANATMOSPASS(T, src))) )
LAZYINITLIST(atmos_adjacent_turfs)
LAZYINITLIST(T.atmos_adjacent_turfs)
atmos_adjacent_turfs[T] = direction
T.atmos_adjacent_turfs[src] = opp_dir
- T.__update_extools_adjacent_turfs()
else
if (atmos_adjacent_turfs)
atmos_adjacent_turfs -= T
if (T.atmos_adjacent_turfs)
T.atmos_adjacent_turfs -= src
- T.__update_extools_adjacent_turfs()
UNSETEMPTY(T.atmos_adjacent_turfs)
+ T.set_sleeping(T.blocks_air)
+ T.__update_auxtools_turf_adjacency_info(isspaceturf(T.get_z_base_turf()), -1)
UNSETEMPTY(atmos_adjacent_turfs)
src.atmos_adjacent_turfs = atmos_adjacent_turfs
- __update_extools_adjacent_turfs()
+ set_sleeping(blocks_air)
+ __update_auxtools_turf_adjacency_info(isspaceturf(get_z_base_turf()))
-/turf/proc/__update_extools_adjacent_turfs()
+/turf/proc/set_sleeping(should_sleep)
+/turf/proc/__update_auxtools_turf_adjacency_info()
//returns a list of adjacent turfs that can share air with this one.
//alldir includes adjacent diagonal tiles that can share
@@ -111,7 +112,6 @@
/turf/air_update_turf(command = 0)
if(command)
ImmediateCalculateAdjacentTurfs()
- SSair.add_to_active(src,command)
/atom/movable/proc/move_update_air(turf/T)
if(isturf(T))
@@ -130,7 +130,4 @@
var/datum/gas_mixture/G = new
G.parse_gas_string(text)
-
- air.merge(G)
- archive()
- SSair.add_to_active(src, 0)
+ assume_air(G)
diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
index 244b51bd2b..3a3ba555de 100644
--- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
+++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
@@ -1,18 +1,13 @@
/turf
//used for temperature calculations
- var/thermal_conductivity = 0.005
+ //conductivity is divided by 10 when interacting with air for balance purposes
+ var/thermal_conductivity = 0.05
var/heat_capacity = 1
- var/temperature_archived
//list of open turfs adjacent to us
var/list/atmos_adjacent_turfs
- //bitfield of dirs in which we are superconducitng
- var/atmos_supeconductivity = NONE
- var/is_openturf = FALSE // used by extools shizz.
-
- //used to determine whether we should archive
- var/archived_cycle = 0
- var/current_cycle = 0
+ //bitfield of dirs in which we thermal conductivity is blocked
+ var/conductivity_blocked_directions = NONE
//used for mapping and for breathing while in walls (because that's a thing that needs to be accounted for...)
//string parsed by /datum/gas/proc/copy_from_turf
@@ -32,21 +27,17 @@
var/planetary_atmos = FALSE //air will revert to initial_gas_mix over time
var/list/atmos_overlay_types //gas IDs of current active gas overlays
- is_openturf = TRUE
/turf/open/Initialize()
if(!blocks_air)
- air = new
+ air = new(2500,src)
air.copy_from_turf(src)
- update_air_ref()
+ update_air_ref(planetary_atmos ? 1 : 2)
. = ..()
/turf/open/Destroy()
if(active_hotspot)
QDEL_NULL(active_hotspot)
- // Adds the adjacent turfs to the current atmos processing
- for(var/T in atmos_adjacent_turfs)
- SSair.add_to_active(T)
return ..()
/// Function for Extools Atmos
@@ -55,10 +46,46 @@
/////////////////GAS MIXTURE PROCS///////////////////
/turf/open/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
+ return assume_air_ratio(giver, 1)
+
+/turf/open/assume_air_moles(datum/gas_mixture/giver, moles)
if(!giver)
return FALSE
- air.merge(giver)
- update_visuals()
+ if(SSair.thread_running())
+ SSair.deferred_airs += list(list(giver, air, moles / giver.total_moles()))
+ else
+ giver.transfer_to(air, moles)
+ update_visuals()
+ return TRUE
+
+/turf/open/assume_air_ratio(datum/gas_mixture/giver, ratio)
+ if(!giver)
+ return FALSE
+ if(SSair.thread_running())
+ SSair.deferred_airs += list(list(giver, air, ratio))
+ else
+ giver.transfer_ratio_to(air, ratio)
+ update_visuals()
+ return TRUE
+
+/turf/open/transfer_air(datum/gas_mixture/taker, moles)
+ if(!taker || !return_air()) // shouldn't transfer from space
+ return FALSE
+ if(SSair.thread_running())
+ SSair.deferred_airs += list(list(air, taker, moles / air.total_moles()))
+ else
+ air.transfer_to(taker, moles)
+ update_visuals()
+ return TRUE
+
+/turf/open/transfer_air_ratio(datum/gas_mixture/taker, ratio)
+ if(!taker || !return_air())
+ return FALSE
+ if(SSair.thread_running())
+ SSair.deferred_airs += list(list(air, taker, ratio))
+ else
+ air.transfer_ratio_to(taker, ratio)
+ update_visuals()
return TRUE
/turf/open/remove_air(amount)
@@ -67,6 +94,12 @@
update_visuals()
return removed
+/turf/open/remove_air_ratio(ratio)
+ var/datum/gas_mixture/ours = return_air()
+ var/datum/gas_mixture/removed = ours.remove_ratio(ratio)
+ update_visuals()
+ return removed
+
/turf/open/proc/copy_air_with_tile(turf/open/T)
if(istype(T))
air.copy_from(T.air)
@@ -86,17 +119,9 @@
return air
/turf/temperature_expose()
- if(temperature > heat_capacity)
+ if(return_temperature() > heat_capacity)
to_be_destroyed = TRUE
-/turf/proc/archive()
- temperature_archived = temperature
-
-/turf/open/archive()
- air.archive()
- archived_cycle = SSair.times_fired
- temperature_archived = temperature
-
/turf/open/proc/eg_reset_cooldowns()
/turf/open/proc/eg_garbage_collect()
/turf/open/proc/get_excited()
@@ -121,8 +146,8 @@
for(var/id in air.get_gases())
if (nonoverlaying_gases[id])
continue
- var/gas_overlay = GLOB.meta_gas_overlays[id]
- if(gas_overlay && air.get_moles(id) > GLOB.meta_gas_visibility[META_GAS_MOLES_VISIBLE])
+ var/gas_overlay = GLOB.gas_data.overlays[id]
+ if(gas_overlay && air.get_moles(id) > GLOB.gas_data.visibility[id])
new_overlay_types += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(air.get_moles(id) / MOLES_GAS_VISIBLE_STEP, 1))]
if (atmos_overlay_types)
@@ -156,7 +181,7 @@
for (var/gastype in subtypesof(/datum/gas))
var/datum/gas/gasvar = gastype
if (!initial(gasvar.gas_overlay))
- .[gastype] = TRUE
+ .[initial(gasvar.id)] = TRUE
/////////////////////////////SIMULATION///////////////////////////////////
@@ -171,7 +196,6 @@
}
*/
/turf/proc/process_cell(fire_count)
- SSair.remove_from_active(src)
/turf/open/proc/equalize_pressure_in_zone(cyclenum)
/turf/open/proc/consider_firelocks(turf/T2)
@@ -198,7 +222,10 @@
//////////////////////////SPACEWIND/////////////////////////////
-/turf/open/proc/consider_pressure_difference(turf/T, difference)
+/turf/proc/consider_pressure_difference()
+ return
+
+/turf/open/consider_pressure_difference(turf/T, difference)
if(difference > pressure_difference)
pressure_direction = get_dir(src, T)
pressure_difference = difference
@@ -236,117 +263,3 @@
if (move_prob > PROBABILITY_OFFSET && prob(move_prob) && (move_resist != INFINITY) && (!anchored && (max_force >= (move_resist * MOVE_FORCE_PUSH_RATIO))) || (anchored && (max_force >= (move_resist * MOVE_FORCE_FORCEPUSH_RATIO))))
step(src, direction)
-////////////////////////SUPERCONDUCTIVITY/////////////////////////////
-/turf/proc/conductivity_directions()
- if(archived_cycle < SSair.times_fired)
- archive()
- return NORTH|SOUTH|EAST|WEST
-
-/turf/open/conductivity_directions()
- if(blocks_air)
- return ..()
- for(var/direction in GLOB.cardinals)
- var/turf/T = get_step(src, direction)
- if(!(T in atmos_adjacent_turfs) && !(atmos_supeconductivity & direction))
- . |= direction
-
-/turf/proc/neighbor_conduct_with_src(turf/open/other)
- if(!other.blocks_air) //Open but neighbor is solid
- other.temperature_share_open_to_solid(src)
- else //Both tiles are solid
- other.share_temperature_mutual_solid(src, thermal_conductivity)
- temperature_expose(null, temperature, null)
-
-/turf/open/neighbor_conduct_with_src(turf/other)
- if(blocks_air)
- ..()
- return
-
- if(!other.blocks_air) //Both tiles are open
- var/turf/open/T = other
- T.air.temperature_share(air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
- else //Solid but neighbor is open
- temperature_share_open_to_solid(other)
- SSair.add_to_active(src, 0)
-
-/turf/proc/super_conduct()
- var/conductivity_directions = conductivity_directions()
- archive()
- if(conductivity_directions)
- //Conduct with tiles around me
- for(var/direction in GLOB.cardinals)
- if(conductivity_directions & direction)
- var/turf/neighbor = get_step(src,direction)
-
- if(!neighbor.thermal_conductivity)
- continue
-
- if(neighbor.archived_cycle < SSair.times_fired)
- neighbor.archive()
-
- neighbor.neighbor_conduct_with_src(src)
-
- neighbor.consider_superconductivity()
-
- radiate_to_spess()
-
- finish_superconduction()
-
-/turf/proc/finish_superconduction(temp = temperature)
- //Make sure still hot enough to continue conducting heat
- if(temp < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
- SSair.active_super_conductivity -= src
- return FALSE
-
-/turf/open/finish_superconduction()
- //Conduct with air on my tile if I have it
- if(!blocks_air)
- temperature = air.temperature_share(null, thermal_conductivity, temperature, heat_capacity)
- ..((blocks_air ? temperature : air.return_temperature()))
-
-/turf/proc/consider_superconductivity()
- if(!thermal_conductivity)
- return FALSE
-
- SSair.active_super_conductivity[src] = TRUE
-
- return TRUE
-
-/turf/open/consider_superconductivity(starting)
- if(planetary_atmos)
- return FALSE
- if(air.return_temperature() < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
- return FALSE
- if(air.heat_capacity() < M_CELL_WITH_RATIO) // Was: MOLES_CELLSTANDARD*0.1*0.05 Since there are no variables here we can make this a constant.
- return FALSE
- return ..()
-
-/turf/closed/consider_superconductivity(starting)
- if(temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
- return FALSE
- return ..()
-
-/turf/proc/radiate_to_spess() //Radiate excess tile heat to space
- if(temperature > T0C) //Considering 0 degC as te break even point for radiation in and out
- var/delta_temperature = (temperature_archived - TCMB) //hardcoded space temperature
- if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))
-
- var/heat = thermal_conductivity*delta_temperature* \
- (heat_capacity*HEAT_CAPACITY_VACUUM/(heat_capacity+HEAT_CAPACITY_VACUUM))
- temperature -= heat/heat_capacity
- temperature = max(temperature,T0C) //otherwise we just sorta get stuck at super cold temps forever
-
-/turf/open/proc/temperature_share_open_to_solid(turf/sharer)
- sharer.temperature = air.temperature_share(null, sharer.thermal_conductivity, sharer.temperature, sharer.heat_capacity)
-
-/turf/proc/share_temperature_mutual_solid(turf/sharer, conduction_coefficient) //to be understood
- var/delta_temperature = (temperature_archived - sharer.temperature_archived)
- if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER && heat_capacity && sharer.heat_capacity)
-
- var/heat = conduction_coefficient*delta_temperature* \
- (heat_capacity*sharer.heat_capacity/(heat_capacity+sharer.heat_capacity))
-
- temperature -= heat/heat_capacity
- sharer.temperature += heat/sharer.heat_capacity
- temperature = max(temperature,T0C)
- sharer.temperature = max(sharer.temperature,T0C)
diff --git a/code/modules/atmospherics/gasmixtures/auxgm.dm b/code/modules/atmospherics/gasmixtures/auxgm.dm
new file mode 100644
index 0000000000..4aa68aa710
--- /dev/null
+++ b/code/modules/atmospherics/gasmixtures/auxgm.dm
@@ -0,0 +1,146 @@
+GLOBAL_LIST_INIT(hardcoded_gases, list(GAS_O2, GAS_N2, GAS_CO2, GAS_PLASMA)) //the main four gases, which were at one time hardcoded
+GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(GAS_O2, GAS_N2, GAS_CO2, GAS_PLUOXIUM, GAS_STIMULUM, GAS_NITRYL))) //unable to react amongst themselves
+
+// Auxgm
+// It's a send-up of XGM, like what baystation got.
+// It's got the same architecture as XGM, but it's structured
+// differently to make it more convenient for auxmos.
+
+// Most important compared to TG is that it does away with hardcoded typepaths,
+// which lead to problems on the auxmos end anyway. We cache the string value
+// references on the Rust end, so no performance is lost here.
+
+// Also allows you to add new gases at runtime
+
+/proc/_auxtools_register_gas(datum/gas/gas) // makes sure auxtools knows stuff about this gas
+
+/datum/auxgm
+ var/list/datums = list()
+ var/list/specific_heats = list()
+ var/list/names = list()
+ var/list/visibility = list()
+ var/list/overlays = list()
+ var/list/flags = list()
+ var/list/ids = list()
+ var/list/typepaths = list()
+ var/list/fusion_powers = list()
+ var/list/breathing_classes = list()
+ var/list/breath_results = list()
+ var/list/breath_reagents = list()
+ var/list/breath_reagents_dangerous = list()
+ var/list/breath_alert_info = list()
+ var/list/oxidation_temperatures = list()
+ var/list/oxidation_rates = list()
+ var/list/fire_temperatures = list()
+ var/list/fire_enthalpies = list()
+ var/list/fire_products = list()
+ var/list/fire_burn_rates = list()
+ var/list/supermatter = list()
+
+
+/datum/gas
+ var/id = ""
+ var/specific_heat = 0
+ var/name = ""
+ var/gas_overlay = "" //icon_state in icons/effects/atmospherics.dmi
+ var/moles_visible = null
+ var/flags = NONE //currently used by canisters
+ var/fusion_power = 0 // How much the gas destabilizes a fusion reaction
+ var/breath_results = GAS_CO2 // what breathing this breathes out
+ var/breath_reagent = null // what breathing this adds to your reagents
+ var/breath_reagent_dangerous = null // what breathing this adds to your reagents IF it's above a danger threshold
+ var/list/breath_alert_info = null // list for alerts that pop up when you have too much/not enough of something
+ var/oxidation_temperature = null // temperature above which this gas is an oxidizer; null for none
+ var/oxidation_rate = 1 // how many moles of this can oxidize how many moles of material
+ var/fire_temperature = null // temperature above which gas may catch fire; null for none
+ var/list/fire_products = null // what results when this gas is burned (oxidizer or fuel); null for none
+ var/fire_energy_released = 0 // how much energy is released per mole of fuel burned
+ var/fire_burn_rate = 1 // how many moles are burned per product released
+ var/powermix = 0 // how much this gas contributes to the supermatter's powermix ratio
+ var/heat_penalty = 0 // heat and waste penalty from having the supermatter crystal surrounded by this gas; negative numbers reduce
+ var/transmit_modifier = 0 // bonus to supermatter power generation (multiplicative, since it's % based, and divided by 10)
+ var/radioactivity_modifier = 0 // improves effect of transmit modifiers, must be from -10 to 10
+ var/heat_resistance = 0 // makes the crystal more resistant against heat damage.
+ var/powerloss_inhibition = 0 // Reduces how much power the supermatter loses each tick
+
+/datum/gas/proc/breath(partial_pressure, light_threshold, heavy_threshold, moles, mob/living/carbon/C, obj/item/organ/lungs/lungs)
+ // This is only called on gases with the GAS_FLAG_BREATH_PROC flag. When possible, do NOT use this--
+ // greatly prefer just adding a reagent. This is mostly around for legacy reasons.
+ return null
+
+/datum/auxgm/proc/add_gas(datum/gas/gas)
+ var/g = gas.id
+ if(g)
+ datums[g] = gas
+ specific_heats[g] = gas.specific_heat
+ names[g] = gas.name
+ if(gas.moles_visible)
+ visibility[g] = gas.moles_visible
+ overlays[g] = new /list(FACTOR_GAS_VISIBLE_MAX)
+ for(var/i in 1 to FACTOR_GAS_VISIBLE_MAX)
+ overlays[g][i] = new /obj/effect/overlay/gas(gas.gas_overlay, i * 255 / FACTOR_GAS_VISIBLE_MAX)
+ else
+ visibility[g] = 0
+ overlays[g] = 0
+ flags[g] = gas.flags
+ ids[g] = g
+ typepaths[g] = gas.type
+ fusion_powers[g] = gas.fusion_power
+
+ if(gas.breath_alert_info)
+ breath_alert_info[g] = gas.breath_alert_info
+ breath_results[g] = gas.breath_results
+ if(gas.breath_reagent)
+ breath_reagents[g] = gas.breath_reagent
+ if(gas.breath_reagent_dangerous)
+ breath_reagents_dangerous[g] = gas.breath_reagent_dangerous
+
+ if(gas.oxidation_temperature)
+ oxidation_temperatures[g] = gas.oxidation_temperature
+ oxidation_rates[g] = gas.oxidation_rate
+ if(gas.fire_products)
+ fire_products[g] = gas.fire_products
+ fire_enthalpies[g] = gas.fire_energy_released
+ else if(gas.fire_temperature)
+ fire_temperatures[g] = gas.fire_temperature
+ fire_burn_rates[g] = gas.fire_burn_rate
+ if(gas.fire_products)
+ fire_products[g] = gas.fire_products
+ fire_enthalpies[g] = gas.fire_energy_released
+ add_supermatter_properties(gas)
+ _auxtools_register_gas(gas)
+
+/proc/finalize_gas_refs()
+
+/datum/auxgm/New()
+ src.supermatter[HEAT_PENALTY] = list()
+ src.supermatter[TRANSMIT_MODIFIER] = list()
+ src.supermatter[RADIOACTIVITY_MODIFIER] = list()
+ src.supermatter[HEAT_RESISTANCE] = list()
+ src.supermatter[POWERLOSS_INHIBITION] = list()
+ src.supermatter[POWER_MIX] = list()
+ src.supermatter[ALL_SUPERMATTER_GASES] = list()
+
+ for(var/gas_path in subtypesof(/datum/gas))
+ var/datum/gas/gas = new gas_path
+ add_gas(gas)
+ for(var/breathing_class_path in subtypesof(/datum/breathing_class))
+ var/datum/breathing_class/class = new breathing_class_path
+ breathing_classes[breathing_class_path] = class
+ finalize_gas_refs()
+
+
+GLOBAL_DATUM_INIT(gas_data, /datum/auxgm, new)
+
+/obj/effect/overlay/gas
+ icon = 'icons/effects/atmospherics.dmi'
+ mouse_opacity = MOUSE_OPACITY_TRANSPARENT
+ anchored = TRUE // should only appear in vis_contents, but to be safe
+ layer = FLY_LAYER
+ appearance_flags = TILE_BOUND
+ vis_flags = NONE
+
+/obj/effect/overlay/gas/New(state, alph)
+ . = ..()
+ icon_state = state
+ alpha = alph
diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
index f310f17b04..ed4b1f63c2 100644
--- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
@@ -6,27 +6,24 @@ What are the archived variables for?
#define MINIMUM_HEAT_CAPACITY 0.0003
#define MINIMUM_MOLE_COUNT 0.01
-//Unomos - global list inits for all of the meta gas lists.
-//This setup allows procs to only look at one list instead of trying to dig around in lists-within-lists
-GLOBAL_LIST_INIT(meta_gas_specific_heats, meta_gas_heat_list())
-GLOBAL_LIST_INIT(meta_gas_names, meta_gas_name_list())
-GLOBAL_LIST_INIT(meta_gas_visibility, meta_gas_visibility_list())
-GLOBAL_LIST_INIT(meta_gas_overlays, meta_gas_overlay_list())
-GLOBAL_LIST_INIT(meta_gas_dangers, meta_gas_danger_list())
-GLOBAL_LIST_INIT(meta_gas_ids, meta_gas_id_list())
-GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture
/// Never ever set this variable, hooked into vv_get_var for view variables viewing.
var/gas_list_view_only
var/initial_volume = CELL_VOLUME //liters
var/list/reaction_results
var/list/analyzer_results //used for analyzer feedback - not initialized until its used
- var/_extools_pointer_gasmixture = 0 // Contains the memory address of the shared_ptr object for this gas mixture in c++ land. Don't. Touch. This. Var.
+ var/_extools_pointer_gasmixture // Contains the index in the gas vector for this gas mixture in rust land. Don't. Touch. This. Var.
+
+GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE)
+
+/proc/auxtools_atmos_init()
/datum/gas_mixture/New(volume)
if (!isnull(volume))
initial_volume = volume
- ATMOS_EXTOOLS_CHECK
+ AUXTOOLS_CHECK(AUXMOS)
+ if(!GLOB.auxtools_atmos_initialized && auxtools_atmos_init())
+ GLOB.auxtools_atmos_initialized = TRUE
__gasmixture_register()
reaction_results = new
@@ -43,6 +40,7 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
var/list/dummy = get_gases()
for(var/gas in dummy)
dummy[gas] = get_moles(gas)
+ dummy["CAP [gas]"] = partial_heat_capacity(gas)
dummy["TEMP"] = return_temperature()
dummy["PRESSURE"] = return_pressure()
dummy["HEAT CAPACITY"] = heat_capacity()
@@ -79,16 +77,16 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
var/list/gases = get_gases()
for(var/gas in gases)
gases[gas] = get_moles(gas)
- var/gastype = input(usr, "What kind of gas?", "Set Gas") as null|anything in subtypesof(/datum/gas)
- if(!ispath(gastype, /datum/gas))
+ var/gasid = input(usr, "What kind of gas?", "Set Gas") as null|anything in GLOB.gas_data.ids
+ if(!gasid)
return
- var/amount = input(usr, "Input amount", "Set Gas", gases[gastype] || 0) as num|null
+ var/amount = input(usr, "Input amount", "Set Gas", gases[gasid] || 0) as num|null
if(!isnum(amount))
return
amount = max(0, amount)
- log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Set gas type [gastype] to [amount] moles.")
- message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Set gas type [gastype] to [amount] moles.")
- set_moles(gastype, amount)
+ log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Set gas [gasid] to [amount] moles.")
+ message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Set gas [gasid] to [amount] moles.")
+ set_moles(gasid, amount)
if(href_list[VV_HK_SET_TEMPERATURE])
var/temp = input(usr, "Set the temperature of this mixture to?", "Set Temperature", return_temperature()) as num|null
if(!isnum(temp))
@@ -107,9 +105,11 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
set_volume(volume)
/*
+we use a hook instead
/datum/gas_mixture/Del()
__gasmixture_unregister()
- . = ..()*/
+ . = ..()
+ */
/datum/gas_mixture/proc/__gasmixture_unregister()
/datum/gas_mixture/proc/__gasmixture_register()
@@ -123,6 +123,8 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture/proc/heat_capacity() //joules per kelvin
+/datum/gas_mixture/proc/partial_heat_capacity(gas_type)
+
/datum/gas_mixture/proc/total_moles()
/datum/gas_mixture/proc/return_pressure() //kilopascals
@@ -147,7 +149,7 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture/proc/vv_react(datum/holder)
return react(holder)
-/datum/gas_mixture/proc/scrub_into(datum/gas_mixture/target, list/gases)
+/datum/gas_mixture/proc/scrub_into(datum/gas_mixture/target, ratio, list/gases)
/datum/gas_mixture/proc/mark_immutable()
/datum/gas_mixture/proc/get_gases()
/datum/gas_mixture/proc/multiply(factor)
@@ -155,7 +157,7 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture/proc/clear()
/datum/gas_mixture/proc/adjust_moles(gas_type, amt = 0)
- set_moles(gas_type, get_moles(gas_type) + amt)
+ set_moles(gas_type, clamp(get_moles(gas_type) + amt,0,INFINITY))
/datum/gas_mixture/proc/return_volume() //liters
@@ -175,7 +177,9 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture/proc/transfer_to(datum/gas_mixture/target, amount)
//Transfers amount of gas to target. Equivalent to target.merge(remove(amount)) but faster.
- //Removes amount of gas from the gas_mixture
+
+/datum/gas_mixture/proc/transfer_ratio_to(datum/gas_mixture/target, ratio)
+ //Transfers ratio of gas to target. Equivalent to target.merge(remove_ratio(amount)) but faster.
/datum/gas_mixture/proc/remove_ratio(ratio)
//Proportionally removes amount of gas from the gas_mixture
@@ -213,6 +217,24 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
//Performs various reactions such as combustion or fusion (LOL)
//Returns: 1 if any reaction took place; 0 otherwise
+/datum/gas_mixture/proc/adjust_heat(amt)
+ //Adjusts the thermal energy of the gas mixture, rather than having to do the full calculation.
+ //Returns: null
+
+/datum/gas_mixture/proc/equalize_with(datum/gas_mixture/giver)
+ //Makes this mix have the same temperature and gas ratios as the giver, but with the same pressure, accounting for volume.
+ //Returns: null
+
+/datum/gas_mixture/proc/get_oxidation_power(temp)
+ //Gets how much oxidation this gas can do, optionally at a given temperature.
+
+/datum/gas_mixture/proc/get_fuel_amount(temp)
+ //Gets how much fuel for fires (not counting trit/plasma!) this gas has, optionally at a given temperature.
+
+/proc/equalize_all_gases_in_list(list/L)
+ //Makes every gas in the given list have the same pressure, temperature and gas proportions.
+ //Returns: null
+
/datum/gas_mixture/proc/__remove()
/datum/gas_mixture/remove(amount)
var/datum/gas_mixture/removed = new type
@@ -234,26 +256,21 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
return copy
/datum/gas_mixture/copy_from_turf(turf/model)
+ set_temperature(initial(model.initial_temperature))
parse_gas_string(model.initial_gas_mix)
-
- //acounts for changes in temperature
- var/turf/model_parent = model.parent_type
- if(model.temperature != initial(model.temperature) || model.temperature != initial(model_parent.temperature))
- set_temperature(model.temperature)
-
return 1
/datum/gas_mixture/parse_gas_string(gas_string)
var/list/gas = params2list(gas_string)
if(gas["TEMP"])
- set_temperature(text2num(gas["TEMP"]))
+ var/temp = text2num(gas["TEMP"])
gas -= "TEMP"
+ if(!isnum(temp) || temp < 2.7)
+ temp = 2.7
+ set_temperature(temp)
clear()
for(var/id in gas)
- var/path = id
- if(!ispath(path))
- path = gas_id2path(path) //a lot of these strings can't have embedded expressions (especially for mappers), so support for IDs needs to stick around
- set_moles(path, text2num(gas[id]))
+ set_moles(id, text2num(gas[id]))
archive()
return 1
/*
@@ -305,17 +322,11 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
if (. & STOP_REACTIONS)
break
*/
-//Takes the amount of the gas you want to PP as an argument
-//So I don't have to do some hacky switches/defines/magic strings
-//eg:
-//Tox_PP = get_partial_pressure(gas_mixture.toxins)
-//O2_PP = get_partial_pressure(gas_mixture.oxygen)
-/datum/gas_mixture/proc/get_breath_partial_pressure(gas_pressure)
- return (gas_pressure * R_IDEAL_GAS_EQUATION * return_temperature()) / BREATH_VOLUME
-//inverse
-/datum/gas_mixture/proc/get_true_breath_pressure(partial_pressure)
- return (partial_pressure * BREATH_VOLUME) / (R_IDEAL_GAS_EQUATION * return_temperature())
+/datum/gas_mixture/proc/set_analyzer_results(instability)
+ if(!analyzer_results)
+ analyzer_results = new
+ analyzer_results["fusion"] = instability
//Mathematical proofs:
/*
@@ -379,8 +390,7 @@ get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles()
var/transfer_moles = pressure_delta*output_air.return_volume()/(input_air.return_temperature() * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
- var/datum/gas_mixture/removed = input_air.remove(transfer_moles)
- output_air.merge(removed)
+ input_air.transfer_to(output_air, transfer_moles)
return TRUE
return FALSE
diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm
deleted file mode 100644
index fa5641254e..0000000000
--- a/code/modules/atmospherics/gasmixtures/gas_types.dm
+++ /dev/null
@@ -1,214 +0,0 @@
-GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/plasma)) //the main four gases, which were at one time hardcoded
-GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/pluoxium, /datum/gas/stimulum, /datum/gas/nitryl))) //unable to react amongst themselves
-
-/proc/gas_id2path(id)
- var/list/meta_gas = GLOB.meta_gas_ids
- if(id in meta_gas)
- return id
- for(var/path in meta_gas)
- if(meta_gas[path] == id)
- return path
- return ""
-
-//Unomos - oh god oh fuck oh shit oh lord have mercy this is messy as fuck oh god
-//my addiction to seeing better performance numbers isn't healthy, kids
-//you see this shit, children?
-//i am not a good idol. don't take after me.
-//this is literally worse than my alcohol addiction
-/proc/meta_gas_heat_list()
- . = subtypesof(/datum/gas)
- for(var/gas_path in .)
- var/datum/gas/gas = gas_path
- .[gas_path] = initial(gas.specific_heat)
-
-/proc/meta_gas_name_list()
- . = subtypesof(/datum/gas)
- for(var/gas_path in .)
- var/datum/gas/gas = gas_path
- .[gas_path] = initial(gas.name)
-
-/proc/meta_gas_visibility_list()
- . = subtypesof(/datum/gas)
- for(var/gas_path in .)
- var/datum/gas/gas = gas_path
- .[gas_path] = initial(gas.moles_visible)
-
-/proc/meta_gas_overlay_list()
- . = subtypesof(/datum/gas)
- for(var/gas_path in .)
- var/datum/gas/gas = gas_path
- .[gas_path] = 0 //gotta make sure if(GLOB.meta_gas_overlays[gaspath]) doesn't break
- if(initial(gas.moles_visible) != null)
- .[gas_path] = new /list(FACTOR_GAS_VISIBLE_MAX)
- for(var/i in 1 to FACTOR_GAS_VISIBLE_MAX)
- .[gas_path][i] = new /obj/effect/overlay/gas(initial(gas.gas_overlay), i * 255 / FACTOR_GAS_VISIBLE_MAX)
-
-/proc/meta_gas_danger_list()
- . = subtypesof(/datum/gas)
- for(var/gas_path in .)
- var/datum/gas/gas = gas_path
- .[gas_path] = initial(gas.dangerous)
-
-/proc/meta_gas_id_list()
- . = subtypesof(/datum/gas)
- for(var/gas_path in .)
- var/datum/gas/gas = gas_path
- .[gas_path] = initial(gas.id)
-
-/proc/meta_gas_fusion_list()
- . = subtypesof(/datum/gas)
- for(var/gas_path in .)
- var/datum/gas/gas = gas_path
- .[gas_path] = initial(gas.fusion_power)
-
-/*||||||||||||||/----------\||||||||||||||*\
-||||||||||||||||[GAS DATUMS]||||||||||||||||
-||||||||||||||||\__________/||||||||||||||||
-||||These should never be instantiated. ||||
-||||They exist only to make it easier ||||
-||||to add a new gas. They are accessed ||||
-||||only by meta_gas_list(). ||||
-\*||||||||||||||||||||||||||||||||||||||||*/
-
-/datum/gas
- var/id = ""
- var/specific_heat = 0
- var/name = ""
- var/gas_overlay = "" //icon_state in icons/effects/atmospherics.dmi
- var/moles_visible = null
- var/dangerous = FALSE //currently used by canisters
- var/fusion_power = 0 //How much the gas accelerates a fusion reaction
- var/rarity = 0 // relative rarity compared to other gases, used when setting up the reactions list.
-
-/datum/gas/oxygen
- id = "o2"
- specific_heat = 20
- name = "Oxygen"
- rarity = 900
-
-/datum/gas/nitrogen
- id = "n2"
- specific_heat = 20
- name = "Nitrogen"
- rarity = 1000
-
-/datum/gas/carbon_dioxide //what the fuck is this?
- id = "co2"
- specific_heat = 30
- name = "Carbon Dioxide"
- fusion_power = 3
- rarity = 700
-
-/datum/gas/plasma
- id = "plasma"
- specific_heat = 200
- name = "Plasma"
- gas_overlay = "plasma"
- moles_visible = MOLES_GAS_VISIBLE
- dangerous = TRUE
- rarity = 800
-
-/datum/gas/water_vapor
- id = "water_vapor"
- specific_heat = 40
- name = "Water Vapor"
- gas_overlay = "water_vapor"
- moles_visible = MOLES_GAS_VISIBLE
- fusion_power = 8
- rarity = 500
-
-/datum/gas/hypernoblium
- id = "nob"
- specific_heat = 2000
- name = "Hyper-noblium"
- gas_overlay = "freon"
- moles_visible = MOLES_GAS_VISIBLE
- dangerous = TRUE
- rarity = 50
-
-/datum/gas/nitrous_oxide
- id = "n2o"
- specific_heat = 40
- name = "Nitrous Oxide"
- gas_overlay = "nitrous_oxide"
- moles_visible = MOLES_GAS_VISIBLE * 2
- dangerous = TRUE
- rarity = 600
-
-/datum/gas/nitryl
- id = "no2"
- specific_heat = 20
- name = "Nitryl"
- gas_overlay = "nitryl"
- moles_visible = MOLES_GAS_VISIBLE
- dangerous = TRUE
- fusion_power = 15
- rarity = 100
-
-/datum/gas/tritium
- id = "tritium"
- specific_heat = 10
- name = "Tritium"
- gas_overlay = "tritium"
- moles_visible = MOLES_GAS_VISIBLE
- dangerous = TRUE
- fusion_power = 1
- rarity = 300
-
-/datum/gas/bz
- id = "bz"
- specific_heat = 20
- name = "BZ"
- dangerous = TRUE
- fusion_power = 8
- rarity = 400
-
-/datum/gas/stimulum
- id = "stim"
- specific_heat = 5
- name = "Stimulum"
- fusion_power = 7
- rarity = 1
-
-/datum/gas/pluoxium
- id = "pluox"
- specific_heat = 80
- name = "Pluoxium"
- fusion_power = 10
- rarity = 200
-
-/datum/gas/miasma
- id = "miasma"
- specific_heat = 20
- fusion_power = 50
- name = "Miasma"
- gas_overlay = "miasma"
- moles_visible = MOLES_GAS_VISIBLE * 60
- rarity = 250
-
-/datum/gas/methane
- id = "methane"
- specific_heat = 30
- name = "Methane"
- rarity = 320
-
-/datum/gas/methyl_bromide
- id = "methyl_bromide"
- specific_heat = 42
- name = "Methyl Bromide"
- dangerous = TRUE
- rarity = 310
-
-
-/obj/effect/overlay/gas
- icon = 'icons/effects/atmospherics.dmi'
- mouse_opacity = MOUSE_OPACITY_TRANSPARENT
- anchored = TRUE // should only appear in vis_contents, but to be safe
- layer = FLY_LAYER
- appearance_flags = TILE_BOUND
- vis_flags = NONE
-
-/obj/effect/overlay/gas/New(state, alph)
- . = ..()
- icon_state = state
- alpha = alph
diff --git a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
index eefad7c970..300f5c2b4f 100644
--- a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
+++ b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
@@ -27,4 +27,4 @@
/datum/gas_mixture/immutable/cloner/populate()
..()
- set_moles(/datum/gas/nitrogen, MOLES_O2STANDARD + MOLES_N2STANDARD)
+ set_moles(GAS_N2, MOLES_O2STANDARD + MOLES_N2STANDARD)
diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm
index 5f425d87ff..b523d333df 100644
--- a/code/modules/atmospherics/gasmixtures/reactions.dm
+++ b/code/modules/atmospherics/gasmixtures/reactions.dm
@@ -8,13 +8,6 @@
if(initial(reaction.exclude))
continue
reaction = new r
- var/datum/gas/reaction_key
- for (var/req in reaction.min_requirements)
- if (ispath(req))
- var/datum/gas/req_gas = req
- if (!reaction_key || initial(reaction_key.rarity) > initial(req_gas.rarity))
- reaction_key = req_gas
- reaction.major_gas = reaction_key
. += reaction
sortTim(., /proc/cmp_gas_reaction)
@@ -26,7 +19,6 @@
//when in doubt, use MINIMUM_MOLE_COUNT.
var/list/min_requirements
var/list/max_requirements
- var/major_gas //the highest rarity gas used in the reaction.
var/exclude = FALSE //do it this way to allow for addition/removal of reactions midmatch in the future
var/priority = 100 //lower numbers are checked/react later than higher numbers. if two reactions have the same priority they may happen in either order
var/name = "reaction"
@@ -49,7 +41,7 @@
id = "nobstop"
/datum/gas_reaction/nobliumsupression/init_reqs()
- min_requirements = list(/datum/gas/hypernoblium = REACTION_OPPRESSION_THRESHOLD)
+ min_requirements = list(GAS_HYPERNOB = REACTION_OPPRESSION_THRESHOLD)
/datum/gas_reaction/nobliumsupression/react()
return STOP_REACTIONS
@@ -61,7 +53,7 @@
id = "vapor"
/datum/gas_reaction/water_vapor/init_reqs()
- min_requirements = list(/datum/gas/water_vapor = MOLES_GAS_VISIBLE)
+ min_requirements = list(GAS_H2O = MOLES_GAS_VISIBLE)
/datum/gas_reaction/water_vapor/react(datum/gas_mixture/air, datum/holder)
var/turf/open/location = isturf(holder) ? holder : null
@@ -70,7 +62,7 @@
if(location && location.freon_gas_act())
. = REACTING
else if(location && location.water_vapor_gas_act())
- air.adjust_moles(/datum/gas/water_vapor,-MOLES_GAS_VISIBLE)
+ air.adjust_moles(GAS_H2O,-MOLES_GAS_VISIBLE)
. = REACTING
// no test cause it's entirely based on location
@@ -84,10 +76,22 @@
/datum/gas_reaction/tritfire/init_reqs()
min_requirements = list(
"TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST,
- /datum/gas/tritium = MINIMUM_MOLE_COUNT,
- /datum/gas/oxygen = MINIMUM_MOLE_COUNT
+ GAS_TRITIUM = MINIMUM_MOLE_COUNT,
+ GAS_O2 = MINIMUM_MOLE_COUNT
)
+/proc/fire_expose(turf/open/location, datum/gas_mixture/air, temperature)
+ if(istype(location) && temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
+ location.hotspot_expose(temperature, CELL_VOLUME)
+ for(var/I in location)
+ var/atom/movable/item = I
+ item.temperature_expose(air, temperature, CELL_VOLUME)
+ location.temperature_expose(air, temperature, CELL_VOLUME)
+
+/proc/radiation_burn(turf/open/location, energy_released)
+ if(istype(location) && prob(10))
+ radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR)
+
/datum/gas_reaction/tritfire/react(datum/gas_mixture/air, datum/holder)
var/energy_released = 0
var/old_heat_capacity = air.heat_capacity()
@@ -97,20 +101,20 @@
var/turf/open/location = isturf(holder) ? holder : null
var/burned_fuel = 0
- if(air.get_moles(/datum/gas/oxygen) < air.get_moles(/datum/gas/tritium))
- burned_fuel = air.get_moles(/datum/gas/oxygen)/TRITIUM_BURN_OXY_FACTOR
- air.adjust_moles(/datum/gas/tritium, -burned_fuel)
+ if(air.get_moles(GAS_O2) < air.get_moles(GAS_TRITIUM))
+ burned_fuel = air.get_moles(GAS_O2)/TRITIUM_BURN_OXY_FACTOR
+ air.adjust_moles(GAS_TRITIUM, -burned_fuel)
else
- burned_fuel = air.get_moles(/datum/gas/tritium)*TRITIUM_BURN_TRIT_FACTOR
- air.adjust_moles(/datum/gas/tritium, -air.get_moles(/datum/gas/tritium)/TRITIUM_BURN_TRIT_FACTOR)
- air.adjust_moles(/datum/gas/oxygen,-air.get_moles(/datum/gas/tritium))
+ burned_fuel = air.get_moles(GAS_TRITIUM)*TRITIUM_BURN_TRIT_FACTOR
+ air.adjust_moles(GAS_TRITIUM, -air.get_moles(GAS_TRITIUM)/TRITIUM_BURN_TRIT_FACTOR)
+ air.adjust_moles(GAS_O2,-air.get_moles(GAS_TRITIUM))
if(burned_fuel)
energy_released += (FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel)
if(location && prob(10) && burned_fuel > TRITIUM_MINIMUM_RADIATION_ENERGY) //woah there let's not crash the server
radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR)
- air.adjust_moles(/datum/gas/water_vapor, burned_fuel/TRITIUM_BURN_OXY_FACTOR)
+ air.adjust_moles(GAS_H2O, burned_fuel/TRITIUM_BURN_OXY_FACTOR)
cached_results["fire"] += burned_fuel
@@ -133,8 +137,8 @@
/datum/gas_reaction/tritfire/test()
var/datum/gas_mixture/G = new
- G.set_moles(/datum/gas/tritium,50)
- G.set_moles(/datum/gas/oxygen,50)
+ G.set_moles(GAS_TRITIUM,50)
+ G.set_moles(GAS_O2,50)
G.set_temperature(500)
var/result = G.react()
if(result != REACTING)
@@ -152,8 +156,8 @@
/datum/gas_reaction/plasmafire/init_reqs()
min_requirements = list(
"TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST,
- /datum/gas/plasma = MINIMUM_MOLE_COUNT,
- /datum/gas/oxygen = MINIMUM_MOLE_COUNT
+ GAS_PLASMA = MINIMUM_MOLE_COUNT,
+ GAS_O2 = MINIMUM_MOLE_COUNT
)
/datum/gas_reaction/plasmafire/react(datum/gas_mixture/air, datum/holder)
@@ -178,21 +182,21 @@
temperature_scale = (temperature-PLASMA_MINIMUM_BURN_TEMPERATURE)/(PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE)
if(temperature_scale > 0)
oxygen_burn_rate = OXYGEN_BURN_RATE_BASE - temperature_scale
- if(air.get_moles(/datum/gas/oxygen) / air.get_moles(/datum/gas/plasma) > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium.
+ if(air.get_moles(GAS_O2) / air.get_moles(GAS_PLASMA) > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium.
super_saturation = TRUE
- if(air.get_moles(/datum/gas/oxygen) > air.get_moles(/datum/gas/plasma)*PLASMA_OXYGEN_FULLBURN)
- plasma_burn_rate = (air.get_moles(/datum/gas/plasma)*temperature_scale)/PLASMA_BURN_RATE_DELTA
+ if(air.get_moles(GAS_O2) > air.get_moles(GAS_PLASMA)*PLASMA_OXYGEN_FULLBURN)
+ plasma_burn_rate = (air.get_moles(GAS_PLASMA)*temperature_scale)/PLASMA_BURN_RATE_DELTA
else
- plasma_burn_rate = (temperature_scale*(air.get_moles(/datum/gas/oxygen)/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
+ plasma_burn_rate = (temperature_scale*(air.get_moles(GAS_O2)/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY)
- plasma_burn_rate = min(plasma_burn_rate,air.get_moles(/datum/gas/plasma),air.get_moles(/datum/gas/oxygen)/oxygen_burn_rate) //Ensures matter is conserved properly
- air.set_moles(/datum/gas/plasma, QUANTIZE(air.get_moles(/datum/gas/plasma) - plasma_burn_rate))
- air.set_moles(/datum/gas/oxygen, QUANTIZE(air.get_moles(/datum/gas/oxygen) - (plasma_burn_rate * oxygen_burn_rate)))
+ plasma_burn_rate = min(plasma_burn_rate,air.get_moles(GAS_PLASMA),air.get_moles(GAS_O2)/oxygen_burn_rate) //Ensures matter is conserved properly
+ air.set_moles(GAS_PLASMA, QUANTIZE(air.get_moles(GAS_PLASMA) - plasma_burn_rate))
+ air.set_moles(GAS_O2, QUANTIZE(air.get_moles(GAS_O2) - (plasma_burn_rate * oxygen_burn_rate)))
if (super_saturation)
- air.adjust_moles(/datum/gas/tritium, plasma_burn_rate)
+ air.adjust_moles(GAS_TRITIUM, plasma_burn_rate)
else
- air.adjust_moles(/datum/gas/carbon_dioxide, plasma_burn_rate)
+ air.adjust_moles(GAS_CO2, plasma_burn_rate)
energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate)
@@ -217,8 +221,8 @@
/datum/gas_reaction/plasmafire/test()
var/datum/gas_mixture/G = new
- G.set_moles(/datum/gas/plasma,50)
- G.set_moles(/datum/gas/oxygen,50)
+ G.set_moles(GAS_PLASMA,50)
+ G.set_moles(GAS_O2,50)
G.set_volume(1000)
G.set_temperature(500)
var/result = G.react()
@@ -226,21 +230,114 @@
return list("success" = FALSE, "message" = "Reaction didn't go at all!")
if(!G.reaction_results["fire"])
return list("success" = FALSE, "message" = "Plasma fires aren't setting fire results correctly!")
- if(!G.get_moles(/datum/gas/carbon_dioxide))
+ if(!G.get_moles(GAS_CO2))
return list("success" = FALSE, "message" = "Plasma fires aren't making CO2!")
G.clear()
- G.set_moles(/datum/gas/plasma,10)
- G.set_moles(/datum/gas/oxygen,1000)
+ G.set_moles(GAS_PLASMA,10)
+ G.set_moles(GAS_O2,1000)
G.set_temperature(500)
result = G.react()
- if(!G.get_moles(/datum/gas/tritium))
+ if(!G.get_moles(GAS_TRITIUM))
return list("success" = FALSE, "message" = "Plasma fires aren't making trit!")
return ..()
+/datum/gas_reaction/genericfire
+ priority = -3 // very last reaction
+ name = "Combustion"
+ id = "genericfire"
+
+/datum/gas_reaction/genericfire/init_reqs()
+ var/lowest_fire_temp = INFINITY
+ var/list/fire_temperatures = GLOB.gas_data.fire_temperatures
+ for(var/gas in fire_temperatures)
+ lowest_fire_temp = min(lowest_fire_temp, fire_temperatures[gas])
+ var/lowest_oxi_temp = INFINITY
+ var/list/oxidation_temperatures = GLOB.gas_data.oxidation_temperatures
+ for(var/gas in oxidation_temperatures)
+ lowest_oxi_temp = min(lowest_oxi_temp, oxidation_temperatures[gas])
+ min_requirements = list(
+ "TEMP" = max(lowest_oxi_temp, lowest_fire_temp),
+ "FIRE_REAGENTS" = MINIMUM_MOLE_COUNT
+ )
+
+// no requirements, always runs
+// bad idea? maybe
+// this is overridden by auxmos but, hey, good idea to have it readable
+
+/datum/gas_reaction/genericfire/react(datum/gas_mixture/air, datum/holder)
+ var/temperature = air.return_temperature()
+ var/list/oxidation_temps = GLOB.gas_data.oxidation_temperatures
+ var/list/oxidation_rates = GLOB.gas_data.oxidation_rates
+ var/oxidation_power = 0
+ var/list/burn_results = list()
+ var/list/fuels = list()
+ var/list/oxidizers = list()
+ var/list/fuel_rates = GLOB.gas_data.fire_burn_rates
+ var/list/fuel_temps = GLOB.gas_data.fire_temperatures
+ var/total_fuel = 0
+ var/energy_released = 0
+ for(var/G in air.get_gases())
+ var/oxidation_temp = oxidation_temps[G]
+ if(oxidation_temp && oxidation_temp > temperature)
+ var/temperature_scale = max(0, 1-(temperature / oxidation_temp))
+ var/amt = air.get_moles(G) * temperature_scale
+ oxidizers[G] = amt
+ oxidation_power += amt * oxidation_rates[G]
+ else
+ var/fuel_temp = fuel_temps[G]
+ if(fuel_temp && fuel_temp > temperature)
+ var/amt = (air.get_moles(G) / fuel_rates[G]) * max(0, 1-(temperature / fuel_temp))
+ fuels[G] = amt // we have to calculate the actual amount we're using after we get all oxidation together
+ total_fuel += amt
+ if(oxidation_power <= 0 || total_fuel <= 0)
+ return NO_REACTION
+ var/oxidation_ratio = oxidation_power / total_fuel
+ if(oxidation_ratio > 1)
+ for(var/oxidizer in oxidizers)
+ oxidizers[oxidizer] /= oxidation_ratio
+ else if(oxidation_ratio < 1)
+ for(var/fuel in fuels)
+ fuels[fuel] *= oxidation_ratio
+ fuels += oxidizers
+ var/list/fire_products = GLOB.gas_data.fire_products
+ var/list/fire_enthalpies = GLOB.gas_data.fire_enthalpies
+ for(var/fuel in fuels + oxidizers)
+ var/amt = fuels[fuel]
+ if(!burn_results[fuel])
+ burn_results[fuel] = 0
+ burn_results[fuel] -= amt
+ energy_released += amt * fire_enthalpies[fuel]
+ for(var/product in fire_products[fuel])
+ if(!burn_results[product])
+ burn_results[product] = 0
+ burn_results[product] += amt
+ var/final_energy = air.thermal_energy() + energy_released
+ for(var/result in burn_results)
+ air.adjust_moles(result, burn_results[result])
+ air.set_temperature(final_energy / air.heat_capacity())
+ var/list/cached_results = air.reaction_results
+ cached_results["fire"] = min(total_fuel, oxidation_power) * 2
+ return cached_results["fire"] ? REACTING : NO_REACTION
+
+
//fusion: a terrible idea that was fun but broken. Now reworked to be less broken and more interesting. Again (and again, and again). Again!
//Fusion Rework Counter: Please increment this if you make a major overhaul to this system again.
//6 reworks
+/proc/fusion_ball(datum/holder, reaction_energy, instability)
+ var/turf/open/location
+ if (istype(holder,/datum/pipeline)) //Find the tile the reaction is occuring on, or a random part of the network if it's a pipenet.
+ var/datum/pipeline/fusion_pipenet = holder
+ location = get_turf(pick(fusion_pipenet.members))
+ else
+ location = get_turf(holder)
+ if(location)
+ var/particle_chance = ((PARTICLE_CHANCE_CONSTANT)/(reaction_energy-PARTICLE_CHANCE_CONSTANT)) + 1//Asymptopically approaches 100% as the energy of the reaction goes up.
+ if(prob(PERCENT(particle_chance)))
+ location.fire_nuclear_particle()
+ var/rad_power = max((FUSION_RAD_COEFFICIENT/instability) + FUSION_RAD_MAX,0)
+ radiation_pulse(location,rad_power)
+
/datum/gas_reaction/fusion
exclude = FALSE
priority = 2
@@ -250,9 +347,9 @@
/datum/gas_reaction/fusion/init_reqs()
min_requirements = list(
"TEMP" = FUSION_TEMPERATURE_THRESHOLD,
- /datum/gas/tritium = FUSION_TRITIUM_MOLES_USED,
- /datum/gas/plasma = FUSION_MOLE_THRESHOLD,
- /datum/gas/carbon_dioxide = FUSION_MOLE_THRESHOLD)
+ GAS_TRITIUM = FUSION_TRITIUM_MOLES_USED,
+ GAS_PLASMA = FUSION_MOLE_THRESHOLD,
+ GAS_CO2 = FUSION_MOLE_THRESHOLD)
/datum/gas_reaction/fusion/react(datum/gas_mixture/air, datum/holder)
var/turf/open/location
@@ -268,12 +365,12 @@
var/list/cached_scan_results = air.analyzer_results
var/old_heat_capacity = air.heat_capacity()
var/reaction_energy = 0 //Reaction energy can be negative or positive, for both exothermic and endothermic reactions.
- var/initial_plasma = air.get_moles(/datum/gas/plasma)
- var/initial_carbon = air.get_moles(/datum/gas/carbon_dioxide)
+ var/initial_plasma = air.get_moles(GAS_PLASMA)
+ var/initial_carbon = air.get_moles(GAS_CO2)
var/scale_factor = (air.return_volume())/(PI) //We scale it down by volume/Pi because for fusion conditions, moles roughly = 2*volume, but we want it to be based off something constant between reactions.
var/toroidal_size = (2*PI)+TORADIANS(arctan((air.return_volume()-TOROID_VOLUME_BREAKEVEN)/TOROID_VOLUME_BREAKEVEN)) //The size of the phase space hypertorus
var/gas_power = 0
- var/list/gas_fusion_powers = GLOB.meta_gas_fusions
+ var/list/gas_fusion_powers = GLOB.gas_data.fusion_powers
for (var/gas_id in air.get_gases())
gas_power += (gas_fusion_powers[gas_id]*air.get_moles(gas_id))
var/instability = MODULUS((gas_power*INSTABILITY_GAS_POWER_FACTOR)**2,toroidal_size) //Instability effects how chaotic the behavior of the reaction is
@@ -287,9 +384,9 @@
carbon = MODULUS(carbon - plasma, toroidal_size)
- air.set_moles(/datum/gas/plasma, plasma*scale_factor + FUSION_MOLE_THRESHOLD) //Scales the gases back up
- air.set_moles(/datum/gas/carbon_dioxide , carbon*scale_factor + FUSION_MOLE_THRESHOLD)
- var/delta_plasma = initial_plasma - air.get_moles(/datum/gas/plasma)
+ air.set_moles(GAS_PLASMA, plasma*scale_factor + FUSION_MOLE_THRESHOLD) //Scales the gases back up
+ air.set_moles(GAS_CO2 , carbon*scale_factor + FUSION_MOLE_THRESHOLD)
+ var/delta_plasma = initial_plasma - air.get_moles(GAS_PLASMA)
reaction_energy += delta_plasma*PLASMA_BINDING_ENERGY //Energy is gained or lost corresponding to the creation or destruction of mass.
if(instability < FUSION_INSTABILITY_ENDOTHERMALITY)
@@ -298,17 +395,17 @@
reaction_energy *= (instability-FUSION_INSTABILITY_ENDOTHERMALITY)**0.5
if(air.thermal_energy() + reaction_energy < 0) //No using energy that doesn't exist.
- air.set_moles(/datum/gas/plasma,initial_plasma)
- air.set_moles(/datum/gas/carbon_dioxide, initial_carbon)
+ air.set_moles(GAS_PLASMA,initial_plasma)
+ air.set_moles(GAS_CO2, initial_carbon)
return NO_REACTION
- air.adjust_moles(/datum/gas/tritium, -FUSION_TRITIUM_MOLES_USED)
+ air.adjust_moles(GAS_TRITIUM, -FUSION_TRITIUM_MOLES_USED)
//The decay of the tritium and the reaction's energy produces waste gases, different ones depending on whether the reaction is endo or exothermic
if(reaction_energy > 0)
- air.adjust_moles(/datum/gas/oxygen, FUSION_TRITIUM_MOLES_USED*(reaction_energy*FUSION_TRITIUM_CONVERSION_COEFFICIENT))
- air.adjust_moles(/datum/gas/nitrous_oxide, FUSION_TRITIUM_MOLES_USED*(reaction_energy*FUSION_TRITIUM_CONVERSION_COEFFICIENT))
+ air.adjust_moles(GAS_O2, FUSION_TRITIUM_MOLES_USED*(reaction_energy*FUSION_TRITIUM_CONVERSION_COEFFICIENT))
+ air.adjust_moles(GAS_NITROUS, FUSION_TRITIUM_MOLES_USED*(reaction_energy*FUSION_TRITIUM_CONVERSION_COEFFICIENT))
else
- air.adjust_moles(/datum/gas/bz, FUSION_TRITIUM_MOLES_USED*(reaction_energy*-FUSION_TRITIUM_CONVERSION_COEFFICIENT))
- air.adjust_moles(/datum/gas/nitryl, FUSION_TRITIUM_MOLES_USED*(reaction_energy*-FUSION_TRITIUM_CONVERSION_COEFFICIENT))
+ air.adjust_moles(GAS_BZ, FUSION_TRITIUM_MOLES_USED*(reaction_energy*-FUSION_TRITIUM_CONVERSION_COEFFICIENT))
+ air.adjust_moles(GAS_NITRYL, FUSION_TRITIUM_MOLES_USED*(reaction_energy*-FUSION_TRITIUM_CONVERSION_COEFFICIENT))
if(reaction_energy)
if(location)
@@ -325,10 +422,10 @@
/datum/gas_reaction/fusion/test()
var/datum/gas_mixture/G = new
- G.set_moles(/datum/gas/carbon_dioxide,300)
- G.set_moles(/datum/gas/plasma,1000)
- G.set_moles(/datum/gas/tritium,100.61)
- G.set_moles(/datum/gas/nitryl,1)
+ G.set_moles(GAS_CO2,300)
+ G.set_moles(GAS_PLASMA,1000)
+ G.set_moles(GAS_TRITIUM,100.61)
+ G.set_moles(GAS_NITRYL,1)
G.set_temperature(15000)
G.set_volume(1000)
var/result = G.react()
@@ -337,11 +434,11 @@
if(abs(G.analyzer_results["fusion"] - 3) > 0.0000001)
var/instability = G.analyzer_results["fusion"]
return list("success" = FALSE, "message" = "Fusion is not calculating analyzer results correctly, should be 3.000000045, is instead [instability]")
- if(abs(G.get_moles(/datum/gas/plasma) - 850.616) > 0.5)
- var/plas = G.get_moles(/datum/gas/plasma)
+ if(abs(G.get_moles(GAS_PLASMA) - 850.616) > 0.5)
+ var/plas = G.get_moles(GAS_PLASMA)
return list("success" = FALSE, "message" = "Fusion is not calculating plasma correctly, should be 850.616, is instead [plas]")
- if(abs(G.get_moles(/datum/gas/carbon_dioxide) - 1699.384) > 0.5)
- var/co2 = G.get_moles(/datum/gas/carbon_dioxide)
+ if(abs(G.get_moles(GAS_CO2) - 1699.384) > 0.5)
+ var/co2 = G.get_moles(GAS_CO2)
return list("success" = FALSE, "message" = "Fusion is not calculating co2 correctly, should be 1699.384, is instead [co2]")
if(abs(G.return_temperature() - 27600) > 200) // calculating this manually sucks dude
var/temp = G.return_temperature()
@@ -355,9 +452,9 @@
/datum/gas_reaction/nitrylformation/init_reqs()
min_requirements = list(
- /datum/gas/oxygen = 20,
- /datum/gas/nitrogen = 20,
- /datum/gas/nitrous_oxide = 5,
+ GAS_O2 = 20,
+ GAS_N2 = 20,
+ GAS_NITROUS = 5,
"TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST*25
)
@@ -365,13 +462,13 @@
var/temperature = air.return_temperature()
var/old_heat_capacity = air.heat_capacity()
- var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100),air.get_moles(/datum/gas/oxygen),air.get_moles(/datum/gas/nitrogen))
+ var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100),air.get_moles(GAS_O2),air.get_moles(GAS_N2))
var/energy_used = heat_efficency*NITRYL_FORMATION_ENERGY
- if ((air.get_moles(/datum/gas/oxygen) - heat_efficency < 0 )|| (air.get_moles(/datum/gas/nitrogen) - heat_efficency < 0)) //Shouldn't produce gas from nothing.
+ if ((air.get_moles(GAS_O2) - heat_efficency < 0 )|| (air.get_moles(GAS_N2) - heat_efficency < 0)) //Shouldn't produce gas from nothing.
return NO_REACTION
- air.adjust_moles(/datum/gas/oxygen, -heat_efficency)
- air.adjust_moles(/datum/gas/nitrogen, -heat_efficency)
- air.adjust_moles(/datum/gas/nitryl, heat_efficency*2)
+ air.adjust_moles(GAS_O2, -heat_efficency)
+ air.adjust_moles(GAS_N2, -heat_efficency)
+ air.adjust_moles(GAS_NITRYL, heat_efficency*2)
if(energy_used > 0)
var/new_heat_capacity = air.heat_capacity()
@@ -381,15 +478,15 @@
/datum/gas_reaction/nitrylformation/test()
var/datum/gas_mixture/G = new
- G.set_moles(/datum/gas/oxygen,30)
- G.set_moles(/datum/gas/nitrogen,30)
- G.set_moles(/datum/gas/nitrous_oxide,10)
+ G.set_moles(GAS_O2,30)
+ G.set_moles(GAS_N2,30)
+ G.set_moles(GAS_NITROUS,10)
G.set_volume(1000)
G.set_temperature(150000)
var/result = G.react()
if(result != REACTING)
return list("success" = FALSE, "message" = "Reaction didn't go at all!")
- if(!G.get_moles(/datum/gas/nitryl) < 0.8)
+ if(!G.get_moles(GAS_NITRYL) < 0.8)
return list("success" = FALSE, "message" = "Nitryl isn't being generated correctly!")
return ..()
@@ -400,8 +497,8 @@
/datum/gas_reaction/bzformation/init_reqs()
min_requirements = list(
- /datum/gas/nitrous_oxide = 10,
- /datum/gas/plasma = 10
+ GAS_NITROUS = 10,
+ GAS_PLASMA = 10
)
@@ -409,16 +506,16 @@
var/temperature = air.return_temperature()
var/pressure = air.return_pressure()
var/old_heat_capacity = air.heat_capacity()
- var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(air.get_moles(/datum/gas/plasma)/air.get_moles(/datum/gas/nitrous_oxide),1))),air.get_moles(/datum/gas/nitrous_oxide),air.get_moles(/datum/gas/plasma)/2)
+ var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(air.get_moles(GAS_PLASMA)/air.get_moles(GAS_NITROUS),1))),air.get_moles(GAS_NITROUS),air.get_moles(GAS_PLASMA)/2)
var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED
- if ((air.get_moles(/datum/gas/nitrous_oxide) - reaction_efficency < 0 )|| (air.get_moles(/datum/gas/plasma) - (2*reaction_efficency) < 0) || energy_released <= 0) //Shouldn't produce gas from nothing.
+ if ((air.get_moles(GAS_NITROUS) - reaction_efficency < 0 )|| (air.get_moles(GAS_PLASMA) - (2*reaction_efficency) < 0) || energy_released <= 0) //Shouldn't produce gas from nothing.
return NO_REACTION
- air.adjust_moles(/datum/gas/bz, reaction_efficency)
- if(reaction_efficency == air.get_moles(/datum/gas/nitrous_oxide))
- air.adjust_moles(/datum/gas/bz, -min(pressure,1))
- air.adjust_moles(/datum/gas/oxygen, min(pressure,1))
- air.adjust_moles(/datum/gas/nitrous_oxide, -reaction_efficency)
- air.adjust_moles(/datum/gas/plasma, -2*reaction_efficency)
+ air.adjust_moles(GAS_BZ, reaction_efficency)
+ if(reaction_efficency == air.get_moles(GAS_NITROUS))
+ air.adjust_moles(GAS_BZ, -min(pressure,1))
+ air.adjust_moles(GAS_O2, min(pressure,1))
+ air.adjust_moles(GAS_NITROUS, -reaction_efficency)
+ air.adjust_moles(GAS_PLASMA, -2*reaction_efficency)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((reaction_efficency**2)*BZ_RESEARCH_SCALE),BZ_RESEARCH_MAX_AMOUNT)
@@ -430,14 +527,14 @@
/datum/gas_reaction/bzformation/test()
var/datum/gas_mixture/G = new
- G.set_moles(/datum/gas/plasma,15)
- G.set_moles(/datum/gas/nitrous_oxide,15)
+ G.set_moles(GAS_PLASMA,15)
+ G.set_moles(GAS_NITROUS,15)
G.set_volume(1000)
G.set_temperature(10)
var/result = G.react()
if(result != REACTING)
return list("success" = FALSE, "message" = "Reaction didn't go at all!")
- if(!G.get_moles(/datum/gas/bz) < 4) // efficiency is 4.0643 and bz generation == efficiency
+ if(!G.get_moles(GAS_BZ) < 4) // efficiency is 4.0643 and bz generation == efficiency
return list("success" = FALSE, "message" = "Nitryl isn't being generated correctly!")
return ..()
@@ -448,23 +545,23 @@
/datum/gas_reaction/stimformation/init_reqs()
min_requirements = list(
- /datum/gas/tritium = 30,
- /datum/gas/plasma = 10,
- /datum/gas/bz = 20,
- /datum/gas/nitryl = 30,
+ GAS_TRITIUM = 30,
+ GAS_PLASMA = 10,
+ GAS_BZ = 20,
+ GAS_NITRYL = 30,
"TEMP" = STIMULUM_HEAT_SCALE/2)
/datum/gas_reaction/stimformation/react(datum/gas_mixture/air)
var/old_heat_capacity = air.heat_capacity()
- var/heat_scale = min(air.return_temperature()/STIMULUM_HEAT_SCALE,air.get_moles(/datum/gas/tritium),air.get_moles(/datum/gas/plasma),air.get_moles(/datum/gas/nitryl))
+ var/heat_scale = min(air.return_temperature()/STIMULUM_HEAT_SCALE,air.get_moles(GAS_TRITIUM),air.get_moles(GAS_PLASMA),air.get_moles(GAS_NITRYL))
var/stim_energy_change = heat_scale + STIMULUM_FIRST_RISE*(heat_scale**2) - STIMULUM_FIRST_DROP*(heat_scale**3) + STIMULUM_SECOND_RISE*(heat_scale**4) - STIMULUM_ABSOLUTE_DROP*(heat_scale**5)
- if ((air.get_moles(/datum/gas/tritium) - heat_scale < 0 )|| (air.get_moles(/datum/gas/plasma) - heat_scale < 0) || (air.get_moles(/datum/gas/nitryl) - heat_scale < 0)) //Shouldn't produce gas from nothing.
+ if ((air.get_moles(GAS_TRITIUM) - heat_scale < 0 )|| (air.get_moles(GAS_PLASMA) - heat_scale < 0) || (air.get_moles(GAS_NITRYL) - heat_scale < 0)) //Shouldn't produce gas from nothing.
return NO_REACTION
- air.adjust_moles(/datum/gas/stimulum, heat_scale/10)
- air.adjust_moles(/datum/gas/tritium, -heat_scale)
- air.adjust_moles(/datum/gas/plasma, -heat_scale)
- air.adjust_moles(/datum/gas/nitryl, -heat_scale)
+ air.adjust_moles(GAS_STIMULUM, heat_scale/10)
+ air.adjust_moles(GAS_TRITIUM, -heat_scale)
+ air.adjust_moles(GAS_PLASMA, -heat_scale)
+ air.adjust_moles(GAS_NITRYL, -heat_scale)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, STIMULUM_RESEARCH_AMOUNT*max(stim_energy_change,0))
if(stim_energy_change)
@@ -476,17 +573,17 @@
/datum/gas_reaction/stimformation/test()
//above mentioned "strange pattern" is a basic quintic polynomial, it's fine, can calculate it manually
var/datum/gas_mixture/G = new
- G.set_moles(/datum/gas/bz,30)
- G.set_moles(/datum/gas/plasma,1000)
- G.set_moles(/datum/gas/tritium,1000)
- G.set_moles(/datum/gas/nitryl,1000)
+ G.set_moles(GAS_BZ,30)
+ G.set_moles(GAS_PLASMA,1000)
+ G.set_moles(GAS_TRITIUM,1000)
+ G.set_moles(GAS_NITRYL,1000)
G.set_volume(1000)
G.set_temperature(12998000) // yeah, really
var/result = G.react()
if(result != REACTING)
return list("success" = FALSE, "message" = "Reaction didn't go at all!")
- if(!G.get_moles(/datum/gas/stimulum) < 900)
+ if(!G.get_moles(GAS_STIMULUM) < 900)
return list("success" = FALSE, "message" = "Stimulum isn't being generated correctly!")
return ..()
@@ -497,19 +594,19 @@
/datum/gas_reaction/nobliumformation/init_reqs()
min_requirements = list(
- /datum/gas/nitrogen = 10,
- /datum/gas/tritium = 5,
+ GAS_N2 = 10,
+ GAS_TRITIUM = 5,
"ENER" = NOBLIUM_FORMATION_ENERGY)
/datum/gas_reaction/nobliumformation/react(datum/gas_mixture/air)
var/old_heat_capacity = air.heat_capacity()
- var/nob_formed = min((air.get_moles(/datum/gas/nitrogen)+air.get_moles(/datum/gas/tritium))/100,air.get_moles(/datum/gas/tritium)/10,air.get_moles(/datum/gas/nitrogen)/20)
- var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(air.get_moles(/datum/gas/bz),1)))
- if ((air.get_moles(/datum/gas/tritium) - 10*nob_formed < 0) || (air.get_moles(/datum/gas/nitrogen) - 20*nob_formed < 0))
+ var/nob_formed = min((air.get_moles(GAS_N2)+air.get_moles(GAS_TRITIUM))/100,air.get_moles(GAS_TRITIUM)/10,air.get_moles(GAS_N2)/20)
+ var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(air.get_moles(GAS_BZ),1)))
+ if ((air.get_moles(GAS_TRITIUM) - 10*nob_formed < 0) || (air.get_moles(GAS_N2) - 20*nob_formed < 0))
return NO_REACTION
- air.adjust_moles(/datum/gas/tritium, -10*nob_formed)
- air.adjust_moles(/datum/gas/nitrogen, -20*nob_formed)
- air.adjust_moles(/datum/gas/hypernoblium,nob_formed)
+ air.adjust_moles(GAS_TRITIUM, -10*nob_formed)
+ air.adjust_moles(GAS_N2, -20*nob_formed)
+ air.adjust_moles(GAS_HYPERNOB,nob_formed)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, nob_formed*NOBLIUM_RESEARCH_AMOUNT)
@@ -520,8 +617,8 @@
/datum/gas_reaction/nobliumformation/test()
var/datum/gas_mixture/G = new
- G.set_moles(/datum/gas/nitrogen,100)
- G.set_moles(/datum/gas/tritium,500)
+ G.set_moles(GAS_N2,100)
+ G.set_moles(GAS_TRITIUM,500)
G.set_volume(1000)
G.set_temperature(5000000) // yeah, really
var/result = G.react()
@@ -540,18 +637,18 @@
/datum/gas_reaction/miaster/init_reqs()
min_requirements = list(
"TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST+70,
- /datum/gas/miasma = MINIMUM_MOLE_COUNT
+ GAS_MIASMA = MINIMUM_MOLE_COUNT
)
/datum/gas_reaction/miaster/react(datum/gas_mixture/air, datum/holder)
// As the name says it, it needs to be dry
- if(air.get_moles(/datum/gas/water_vapor) && air.get_moles(/datum/gas/water_vapor)/air.total_moles() > 0.1)
+ if(air.get_moles(GAS_H2O) && air.get_moles(GAS_H2O)/air.total_moles() > 0.1)
return
//Replace miasma with oxygen
- var/cleaned_air = min(air.get_moles(/datum/gas/miasma), 20 + (air.return_temperature() - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20)
- air.adjust_moles(/datum/gas/miasma, -cleaned_air)
- air.adjust_moles(/datum/gas/oxygen, cleaned_air)
+ var/cleaned_air = min(air.get_moles(GAS_MIASMA), 20 + (air.return_temperature() - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20)
+ air.adjust_moles(GAS_MIASMA, -cleaned_air)
+ air.adjust_moles(GAS_O2, cleaned_air)
//Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable
air.set_temperature(air.return_temperature() + cleaned_air * 0.002)
@@ -559,16 +656,16 @@
/datum/gas_reaction/miaster/test()
var/datum/gas_mixture/G = new
- G.set_moles(/datum/gas/miasma,1)
+ G.set_moles(GAS_MIASMA,1)
G.set_volume(1000)
G.set_temperature(450)
var/result = G.react()
if(result != REACTING)
return list("success" = FALSE, "message" = "Reaction didn't go at all!")
G.clear()
- G.set_moles(/datum/gas/miasma,1)
+ G.set_moles(GAS_MIASMA,1)
G.set_temperature(450)
- G.set_moles(/datum/gas/water_vapor,0.5)
+ G.set_moles(GAS_H2O,0.5)
result = G.react()
if(result != NO_REACTION)
return list("success" = FALSE, "message" = "Miasma sterilization not stopping due to water vapor correctly!")
diff --git a/code/modules/atmospherics/gasmixtures/zextools_broke.dm b/code/modules/atmospherics/gasmixtures/zextools_broke.dm
index eef6933edb..fe7b1c462b 100644
--- a/code/modules/atmospherics/gasmixtures/zextools_broke.dm
+++ b/code/modules/atmospherics/gasmixtures/zextools_broke.dm
@@ -9,14 +9,14 @@
/datum/gas_mixture/heat_capacity() //joules per kelvin
var/list/cached_gases = gases
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ var/list/cached_gasheats = GLOB.gas_data.specific_heats
. = 0
for(var/id in cached_gases)
. += cached_gases[id] * cached_gasheats[id]
/datum/gas_mixture/turf/heat_capacity() // Same as above except vacuums return HEAT_CAPACITY_VACUUM
var/list/cached_gases = gases
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ var/list/cached_gasheats = GLOB.gas_data.specific_heats
for(var/id in cached_gases)
. += cached_gases[id] * cached_gasheats[id]
if(!.)
@@ -56,20 +56,20 @@
return gases[gas_type]
/datum/gas_mixture/set_moles(gas_type, moles)
gases[gas_type] = moles
-/datum/gas_mixture/scrub_into(datum/gas_mixture/target, list/gases)
+/datum/gas_mixture/scrub_into(datum/gas_mixture/target, ratio, list/gases)
if(isnull(target))
return FALSE
- var/list/removed_gases = target.gases
+ var/list/removed_gases = gases
//Filter it
var/datum/gas_mixture/filtered_out = new
var/list/filtered_gases = filtered_out.gases
filtered_out.temperature = removed.temperature
for(var/gas in filter_types & removed_gases)
- filtered_gases[gas] = removed_gases[gas]
- removed_gases[gas] = 0
- merge(filtered_out)
+ filtered_gases[gas] = removed_gases[gas] * ratio
+ removed_gases[gas] = removed_gases[gas] * (1 - ratio)
+ target.merge(filtered_out)
/datum/gas_mixture/mark_immutable()
return
/datum/gas_mixture/get_gases()
@@ -208,7 +208,7 @@
var/delta
var/gas_heat_capacity
//and also cache this shit rq because that results in sanic speed for reasons byond explanation
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ var/list/cached_gasheats = GLOB.gas_data.specific_heats
//GAS TRANSFER
for(var/id in cached_gases | sharer_gases) // transfer gases
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index c63797282d..806126e684 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -94,63 +94,63 @@
var/list/TLV = list( // Breathable air.
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa
"temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66),
- /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
- /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000),
- /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10),
- /datum/gas/miasma = new/datum/tlv(-1, -1, 2, 5),
- /datum/gas/plasma = new/datum/tlv/dangerous,
- /datum/gas/nitrous_oxide = new/datum/tlv/dangerous,
- /datum/gas/bz = new/datum/tlv/dangerous,
- /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic
- /datum/gas/water_vapor = new/datum/tlv/dangerous,
- /datum/gas/tritium = new/datum/tlv/dangerous,
- /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects
- /datum/gas/nitryl = new/datum/tlv/dangerous,
- /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000), // Unlike oxygen, pluoxium does not fuel plasma/tritium fires
- /datum/gas/methane = new/datum/tlv(-1, -1, 3, 6),
- /datum/gas/methyl_bromide = new/datum/tlv/dangerous
+ GAS_O2 = new/datum/tlv(16, 19, 40, 50), // Partial pressure, kpa
+ GAS_N2 = new/datum/tlv(-1, -1, 1000, 1000),
+ GAS_CO2 = new/datum/tlv(-1, -1, 5, 10),
+ GAS_MIASMA = new/datum/tlv(-1, -1, 2, 5),
+ GAS_PLASMA = new/datum/tlv/dangerous,
+ GAS_NITROUS = new/datum/tlv/dangerous,
+ GAS_BZ = new/datum/tlv/dangerous,
+ GAS_HYPERNOB = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic
+ GAS_H2O = new/datum/tlv/dangerous,
+ GAS_TRITIUM = new/datum/tlv/dangerous,
+ GAS_STIMULUM = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects
+ GAS_NITRYL = new/datum/tlv/dangerous,
+ GAS_PLUOXIUM = new/datum/tlv(-1, -1, 5, 6), // Unlike oxygen, pluoxium does not fuel plasma/tritium fires
+ GAS_METHANE = new/datum/tlv(-1, -1, 3, 6),
+ GAS_METHYL_BROMIDE = new/datum/tlv/dangerous
)
/obj/machinery/airalarm/server // No checks here.
TLV = list(
"pressure" = new/datum/tlv/no_checks,
"temperature" = new/datum/tlv/no_checks,
- /datum/gas/oxygen = new/datum/tlv/no_checks,
- /datum/gas/nitrogen = new/datum/tlv/no_checks,
- /datum/gas/carbon_dioxide = new/datum/tlv/no_checks,
- /datum/gas/miasma = new/datum/tlv/no_checks,
- /datum/gas/plasma = new/datum/tlv/no_checks,
- /datum/gas/nitrous_oxide = new/datum/tlv/no_checks,
- /datum/gas/bz = new/datum/tlv/no_checks,
- /datum/gas/hypernoblium = new/datum/tlv/no_checks,
- /datum/gas/water_vapor = new/datum/tlv/no_checks,
- /datum/gas/tritium = new/datum/tlv/no_checks,
- /datum/gas/stimulum = new/datum/tlv/no_checks,
- /datum/gas/nitryl = new/datum/tlv/no_checks,
- /datum/gas/pluoxium = new/datum/tlv/no_checks,
- /datum/gas/methane = new/datum/tlv/no_checks,
- /datum/gas/methyl_bromide = new/datum/tlv/no_checks
+ GAS_O2 = new/datum/tlv/no_checks,
+ GAS_N2 = new/datum/tlv/no_checks,
+ GAS_CO2 = new/datum/tlv/no_checks,
+ GAS_MIASMA = new/datum/tlv/no_checks,
+ GAS_PLASMA = new/datum/tlv/no_checks,
+ GAS_NITROUS = new/datum/tlv/no_checks,
+ GAS_BZ = new/datum/tlv/no_checks,
+ GAS_HYPERNOB = new/datum/tlv/no_checks,
+ GAS_H2O = new/datum/tlv/no_checks,
+ GAS_TRITIUM = new/datum/tlv/no_checks,
+ GAS_STIMULUM = new/datum/tlv/no_checks,
+ GAS_NITRYL = new/datum/tlv/no_checks,
+ GAS_PLUOXIUM = new/datum/tlv/no_checks,
+ GAS_METHANE = new/datum/tlv/no_checks,
+ GAS_METHYL_BROMIDE = new/datum/tlv/no_checks
)
/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures.
TLV = list(
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa
"temperature" = new/datum/tlv(T0C-73.15, T0C-63.15, T0C, T0C+10),
- /datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
- /datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000),
- /datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10),
- /datum/gas/miasma = new/datum/tlv/(-1, -1, 2, 5),
- /datum/gas/plasma = new/datum/tlv/dangerous,
- /datum/gas/nitrous_oxide = new/datum/tlv/dangerous,
- /datum/gas/bz = new/datum/tlv/dangerous,
- /datum/gas/hypernoblium = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic
- /datum/gas/water_vapor = new/datum/tlv/dangerous,
- /datum/gas/tritium = new/datum/tlv/dangerous,
- /datum/gas/stimulum = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects
- /datum/gas/nitryl = new/datum/tlv/dangerous,
- /datum/gas/pluoxium = new/datum/tlv(-1, -1, 1000, 1000), // Unlike oxygen, pluoxium does not fuel plasma/tritium fires
- /datum/gas/methane = new/datum/tlv(-1, -1, 3, 6),
- /datum/gas/methyl_bromide = new/datum/tlv/dangerous
+ GAS_O2 = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
+ GAS_N2 = new/datum/tlv(-1, -1, 1000, 1000),
+ GAS_CO2 = new/datum/tlv(-1, -1, 5, 10),
+ GAS_MIASMA = new/datum/tlv/(-1, -1, 2, 5),
+ GAS_PLASMA = new/datum/tlv/dangerous,
+ GAS_NITROUS = new/datum/tlv/dangerous,
+ GAS_BZ = new/datum/tlv/dangerous,
+ GAS_HYPERNOB = new/datum/tlv(-1, -1, 1000, 1000), // Hyper-Noblium is inert and nontoxic
+ GAS_H2O = new/datum/tlv/dangerous,
+ GAS_TRITIUM = new/datum/tlv/dangerous,
+ GAS_STIMULUM = new/datum/tlv(-1, -1, 1000, 1000), // Stimulum has only positive effects
+ GAS_NITRYL = new/datum/tlv/dangerous,
+ GAS_PLUOXIUM = new/datum/tlv(-1, -1, 1000, 1000), // Unlike oxygen, pluoxium does not fuel plasma/tritium fires
+ GAS_METHANE = new/datum/tlv(-1, -1, 3, 6),
+ GAS_METHYL_BROMIDE = new/datum/tlv/dangerous
)
/obj/machinery/airalarm/unlocked
@@ -298,7 +298,7 @@
continue
cur_tlv = TLV[gas_id]
data["environment_data"] += list(list(
- "name" = GLOB.meta_gas_names[gas_id],
+ "name" = GLOB.gas_data.names[gas_id],
"value" = environment.get_moles(gas_id) / total_moles * 100,
"unit" = "%",
"danger_level" = cur_tlv.get_danger_level(environment.get_moles(gas_id) * partial_pressure)
@@ -368,11 +368,11 @@
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1))
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2))
- for(var/gas_id in GLOB.meta_gas_names)
+ for(var/gas_id in GLOB.gas_data.names)
if(!(gas_id in TLV)) // We're not interested in this gas, it seems.
continue
selected = TLV[gas_id]
- thresholds += list(list("name" = GLOB.meta_gas_names[gas_id], "settings" = list()))
+ thresholds += list(list("name" = GLOB.gas_data.names[gas_id], "settings" = list()))
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min2", "selected" = selected.min2))
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min1", "selected" = selected.min1))
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max1", "selected" = selected.max1))
@@ -532,7 +532,7 @@
for(var/device_id in A.air_scrub_names)
send_signal(device_id, list(
"power" = 1,
- "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma),
+ "set_filters" = list(GAS_CO2, GAS_MIASMA),
"scrubbing" = 1,
"widenet" = 0,
))
@@ -547,19 +547,19 @@
send_signal(device_id, list(
"power" = 1,
"set_filters" = list(
- /datum/gas/carbon_dioxide,
- /datum/gas/miasma,
- /datum/gas/plasma,
- /datum/gas/water_vapor,
- /datum/gas/hypernoblium,
- /datum/gas/nitrous_oxide,
- /datum/gas/nitryl,
- /datum/gas/tritium,
- /datum/gas/bz,
- /datum/gas/stimulum,
- /datum/gas/pluoxium,
- /datum/gas/methane,
- /datum/gas/methyl_bromide
+ GAS_CO2,
+ GAS_MIASMA,
+ GAS_PLASMA,
+ GAS_H2O,
+ GAS_HYPERNOB,
+ GAS_NITROUS,
+ GAS_NITRYL,
+ GAS_TRITIUM,
+ GAS_BZ,
+ GAS_STIMULUM,
+ GAS_PLUOXIUM,
+ GAS_METHANE,
+ GAS_METHYL_BROMIDE
),
"scrubbing" = 1,
"widenet" = 1,
@@ -587,7 +587,7 @@
for(var/device_id in A.air_scrub_names)
send_signal(device_id, list(
"power" = 1,
- "set_filters" = list(/datum/gas/carbon_dioxide, /datum/gas/miasma),
+ "set_filters" = list(GAS_CO2, GAS_MIASMA),
"scrubbing" = 1,
"widenet" = 0,
))
diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm
index 7f4a8cd794..6f45599463 100644
--- a/code/modules/atmospherics/machinery/atmosmachinery.dm
+++ b/code/modules/atmospherics/machinery/atmosmachinery.dm
@@ -39,6 +39,7 @@
var/construction_type
var/pipe_state //icon_state as a pipe item
var/on = FALSE
+ var/interacts_with_air = FALSE
/obj/machinery/atmospherics/examine(mob/user)
. = ..()
@@ -57,7 +58,10 @@
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 70)
..()
if(process)
- SSair.atmos_machinery += src
+ if(interacts_with_air)
+ SSair.atmos_air_machinery += src
+ else
+ SSair.atmos_machinery += src
SetInitDirections()
/obj/machinery/atmospherics/Destroy()
@@ -65,6 +69,7 @@
nullifyNode(i)
SSair.atmos_machinery -= src
+ SSair.atmos_air_machinery -= src
SSair.pipenets_needing_rebuilt -= src
dropContents()
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
index d1bb58b99a..4dd7b672a7 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
@@ -15,6 +15,9 @@
desc = "Has a valve and pump attached to it. There are two ports."
level = 1
+
+ interacts_with_air = TRUE
+
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
@@ -69,12 +72,7 @@
if(air1.return_temperature() > 0)
var/transfer_moles = pressure_delta*environment.return_volume()/(air1.return_temperature() * R_IDEAL_GAS_EQUATION)
- var/datum/gas_mixture/removed = air1.remove(transfer_moles)
- //Removed can be null if there is no atmosphere in air1
- if(!removed)
- return
-
- loc.assume_air(removed)
+ loc.assume_air_moles(air1, transfer_moles)
air_update_turf()
var/datum/pipeline/parent1 = parents[1]
@@ -90,11 +88,7 @@
moles_delta = min(moles_delta, (input_pressure_min - air2.return_pressure()) * our_multiplier)
if(moles_delta > 0)
- var/datum/gas_mixture/removed = loc.remove_air(moles_delta)
- if (isnull(removed)) // in space
- return
-
- air2.merge(removed)
+ loc.transfer_air(air2, moles_delta)
air_update_turf()
var/datum/pipeline/parent2 = parents[2]
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
index eb00e432b7..dc5a6eccd4 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
@@ -81,9 +81,7 @@
var/pressure_delta = target_pressure - output_starting_pressure
var/transfer_moles = pressure_delta*air2.return_volume()/(air1.return_temperature() * R_IDEAL_GAS_EQUATION)
- //Actually transfer the gas
- var/datum/gas_mixture/removed = air1.remove(transfer_moles)
- air2.merge(removed)
+ air1.transfer_to(air2,transfer_moles)
update_parents()
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
index 1b049322a1..46d584339b 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
@@ -67,9 +67,7 @@
var/transfer_ratio = transfer_rate/air1.return_volume()
- var/datum/gas_mixture/removed = air1.remove_ratio(transfer_ratio)
-
- air2.merge(removed)
+ air1.transfer_ratio_to(air2,transfer_ratio)
update_parents()
diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm
index b6911a1709..f8866877fe 100644
--- a/code/modules/atmospherics/machinery/components/components_base.dm
+++ b/code/modules/atmospherics/machinery/components/components_base.dm
@@ -120,14 +120,9 @@
times_lost++
var/shared_loss = lost/times_lost
- var/datum/gas_mixture/to_release
for(var/i in 1 to device_type)
var/datum/gas_mixture/air = airs[i]
- if(!to_release)
- to_release = air.remove(shared_loss)
- continue
- to_release.merge(air.remove(shared_loss))
- T.assume_air(to_release)
+ T.assume_air_moles(air, shared_loss)
air_update_turf(1)
/obj/machinery/atmospherics/components/proc/safe_input(var/title, var/text, var/default_set)
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
index 11c54409f6..4182f5ceca 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
@@ -98,33 +98,11 @@
//Actually transfer the gas
if(transfer_ratio > 0)
- var/datum/gas_mixture/removed = air1.remove_ratio(transfer_ratio)
-
- if(!removed)
- return
-
- var/filtering = TRUE
- if(!ispath(filter_type))
- if(filter_type)
- filter_type = gas_id2path(filter_type) //support for mappers so they don't need to type out paths
- else
- filtering = FALSE
-
- if(filtering && removed.get_moles(filter_type))
- var/datum/gas_mixture/filtered_out = new
-
- filtered_out.set_temperature(removed.return_temperature())
- filtered_out.set_moles(filter_type, removed.get_moles(filter_type))
-
- removed.set_moles(filter_type, 0)
-
- var/datum/gas_mixture/target = (air2.return_pressure() < 9000 ? air2 : air1)
- target.merge(filtered_out)
+ if(filter_type && air2.return_pressure() <= 9000)
+ air1.scrub_into(air2, transfer_ratio, list(filter_type))
if(air3.return_pressure() <= 9000)
- air3.merge(removed)
- else
- air1.merge(removed) // essentially just leaving it in
+ air1.transfer_ratio_to(air3, transfer_ratio)
update_parents()
@@ -145,9 +123,9 @@
data["max_rate"] = round(MAX_TRANSFER_RATE)
data["filter_types"] = list()
- data["filter_types"] += list(list("name" = "Nothing", "path" = "", "selected" = !filter_type))
- for(var/path in GLOB.meta_gas_ids)
- data["filter_types"] += list(list("name" = GLOB.meta_gas_names[path], "id" = GLOB.meta_gas_ids[path], "selected" = (path == gas_id2path(filter_type))))
+ data["filter_types"] += list(list("name" = "Nothing", "id" = "", "selected" = !filter_type))
+ for(var/id in GLOB.gas_data.ids)
+ data["filter_types"] += list(list("name" = GLOB.gas_data.names[id], "id" = id, "selected" = (id == filter_type)))
return data
@@ -177,10 +155,10 @@
if("filter")
filter_type = null
var/filter_name = "nothing"
- var/gas = gas_id2path(params["mode"])
- if(gas in GLOB.meta_gas_names)
+ var/gas = params["mode"]
+ if(gas in GLOB.gas_data.names)
filter_type = gas
- filter_name = GLOB.meta_gas_names[gas]
+ filter_name = GLOB.gas_data.names[gas]
investigate_log("was set to filter [filter_name] by [key_name(usr)]", INVESTIGATE_ATMOS)
. = TRUE
update_icon()
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
index 7dac6d540e..3296981e5e 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
@@ -110,14 +110,12 @@
//Actually transfer the gas
if(transfer_moles1)
- var/datum/gas_mixture/removed1 = air1.remove(transfer_moles1)
- air3.merge(removed1)
+ air1.transfer_to(air3, transfer_moles1)
var/datum/pipeline/parent1 = parents[1]
parent1.update = TRUE
if(transfer_moles2)
- var/datum/gas_mixture/removed2 = air2.remove(transfer_moles2)
- air3.merge(removed2)
+ air2.transfer_to(air3, transfer_moles2)
var/datum/pipeline/parent2 = parents[2]
parent2.update = TRUE
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index cf2cdd80a7..efafc1c9a8 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -210,7 +210,7 @@
if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic.
beaker.reagents.trans_to(occupant, 1, efficiency * 0.25) // Transfer reagents.
beaker.reagents.reaction(occupant, VAPOR)
- air1.adjust_moles(/datum/gas/oxygen, -max(0,air1.get_moles(/datum/gas/oxygen) - 2 / efficiency)) //Let's use gas for this
+ air1.adjust_moles(GAS_O2, -max(0,air1.get_moles(GAS_O2) - 2 / efficiency)) //Let's use gas for this
if(++reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker).
reagent_transfer = 0
@@ -224,7 +224,7 @@
var/datum/gas_mixture/air1 = airs[1]
- if(!nodes[1] || !airs[1] || air1.get_moles(/datum/gas/oxygen) < 5) // Turn off if the machine won't work.
+ if(!nodes[1] || !airs[1] || air1.get_moles(GAS_O2) < 5) // Turn off if the machine won't work.
on = FALSE
update_icon()
return
@@ -439,7 +439,7 @@
return // we don't see the pipe network while inside cryo.
/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
- user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
+ user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
/obj/machinery/atmospherics/components/unary/cryo_cell/can_crawl_through()
return // can't ventcrawl in or out of cryo.
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
index 9aa3c8c16d..b2fa26edba 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
@@ -16,6 +16,7 @@
var/datum/radio_frequency/radio_connection
level = 1
+ interacts_with_air = TRUE
layer = GAS_SCRUBBER_LAYER
pipe_state = "injector"
@@ -65,11 +66,7 @@
var/datum/gas_mixture/air_contents = airs[1]
if(air_contents.return_temperature() > 0)
- var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
-
- var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
-
- loc.assume_air(removed)
+ loc.assume_air_ratio(air_contents, volume_rate / air_contents.return_volume())
air_update_turf()
update_parents()
@@ -84,9 +81,7 @@
injecting = 1
if(air_contents.return_temperature() > 0)
- var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
- var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
- loc.assume_air(removed)
+ loc.assume_air_ratio(air_contents, volume_rate / air_contents.return_volume())
update_parents()
flick("inje_inject", src)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm
index 3f5bb818ce..7cfdb9d63c 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm
@@ -6,6 +6,7 @@
can_unwrench = TRUE
level = 1
+ interacts_with_air = TRUE
layer = GAS_SCRUBBER_LAYER
pipe_state = "pvent"
@@ -29,23 +30,10 @@
var/pressure_delta = abs(external_pressure - internal_pressure)
if(pressure_delta > 0.5)
- if(external_pressure < internal_pressure)
- var/air_temperature = (external.return_temperature() > 0) ? external.return_temperature() : internal.return_temperature()
- var/transfer_moles = (pressure_delta * external.return_volume()) / (air_temperature * R_IDEAL_GAS_EQUATION)
- var/datum/gas_mixture/removed = internal.remove(transfer_moles)
- external.merge(removed)
- else
- var/air_temperature = (internal.return_temperature() > 0) ? internal.return_temperature() : external.return_temperature()
- var/transfer_moles = (pressure_delta * internal.return_volume()) / (air_temperature * R_IDEAL_GAS_EQUATION)
- transfer_moles = min(transfer_moles, external.total_moles() * internal.return_volume() / external.return_volume())
- var/datum/gas_mixture/removed = external.remove(transfer_moles)
- if(isnull(removed))
- return
- internal.merge(removed)
-
+ equalize_all_gases_in_list(list(internal,external))
active = TRUE
- active = internal.temperature_share(external, OPEN_HEAT_TRANSFER_COEFFICIENT) ? TRUE : active
+ active = internal.temperature_share(external, OPEN_HEAT_TRANSFER_COEFFICIENT) || active
if(active)
air_update_turf()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
index f0d0d1d856..ee4223b157 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
@@ -5,6 +5,7 @@
icon_state = "relief_valve-e-map"
can_unwrench = TRUE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
+ interacts_with_air = TRUE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
@@ -49,14 +50,11 @@
else if(!opened && our_pressure >= open_pressure)
opened = TRUE
update_icon_nopipes()
- if(opened && air_contents.return_temperature() > 0)
+ if(opened)
var/datum/gas_mixture/environment = loc.return_air()
- var/pressure_delta = our_pressure - environment.return_pressure()
- var/transfer_moles = pressure_delta*200/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
- if(transfer_moles > 0)
- var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
-
- loc.assume_air(removed)
+ var/pressure_delta = abs(our_pressure - environment.return_pressure())
+ if(pressure_delta > 0.1)
+ equalize_all_gases_in_list(list(air_contents,environment))
air_update_turf()
update_parents()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
index d6c18b1beb..9a77b386ba 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
@@ -21,8 +21,8 @@
air_contents.set_volume(volume)
air_contents.set_temperature(T20C)
if(gas_type)
- air_contents.set_moles(gas_type, AIR_CONTENTS)
- name = "[name] ([GLOB.meta_gas_names[gas_type]])"
+ air_contents.set_moles(gas_type,AIR_CONTENTS)
+ name = "[name] ([GLOB.gas_data.names[gas_type]])"
setPipingLayer(piping_layer)
/obj/machinery/atmospherics/components/unary/tank/air
@@ -32,30 +32,30 @@
/obj/machinery/atmospherics/components/unary/tank/air/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
- air_contents.set_moles(/datum/gas/oxygen, AIR_CONTENTS * 0.21)
- air_contents.set_moles(/datum/gas/nitrogen, AIR_CONTENTS * 0.79)
+ air_contents.set_moles(GAS_O2, AIR_CONTENTS * 0.21)
+ air_contents.set_moles(GAS_N2, AIR_CONTENTS * 0.79)
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
- gas_type = /datum/gas/carbon_dioxide
+ gas_type = GAS_CO2
/obj/machinery/atmospherics/components/unary/tank/toxins
icon_state = "orange"
- gas_type = /datum/gas/plasma
+ gas_type = GAS_PLASMA
/obj/machinery/atmospherics/components/unary/tank/nitrogen
icon_state = "red"
- gas_type = /datum/gas/nitrogen
+ gas_type = GAS_N2
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
- gas_type = /datum/gas/oxygen
+ gas_type = GAS_O2
/obj/machinery/atmospherics/components/unary/tank/nitrous
icon_state = "red_white"
- gas_type = /datum/gas/nitrous_oxide
+ gas_type = GAS_NITROUS
/obj/machinery/atmospherics/components/unary/tank/bz
- gas_type = /datum/gas/bz
+ gas_type = GAS_BZ
// /obj/machinery/atmospherics/components/unary/tank/freon
// icon_state = "blue"
@@ -75,17 +75,17 @@
/obj/machinery/atmospherics/components/unary/tank/hypernoblium
icon_state = "blue"
- gas_type = /datum/gas/hypernoblium
+ gas_type = GAS_HYPERNOB
/obj/machinery/atmospherics/components/unary/tank/miasma
- gas_type = /datum/gas/miasma
+ gas_type = GAS_MIASMA
/obj/machinery/atmospherics/components/unary/tank/nitryl
- gas_type = /datum/gas/nitryl
+ gas_type = GAS_NITRYL
/obj/machinery/atmospherics/components/unary/tank/pluoxium
icon_state = "blue"
- gas_type = /datum/gas/pluoxium
+ gas_type = GAS_PLUOXIUM
// /obj/machinery/atmospherics/components/unary/tank/proto_nitrate
// icon_state = "red"
@@ -93,14 +93,14 @@
/obj/machinery/atmospherics/components/unary/tank/stimulum
icon_state = "red"
- gas_type = /datum/gas/stimulum
+ gas_type = GAS_STIMULUM
/obj/machinery/atmospherics/components/unary/tank/tritium
- gas_type = /datum/gas/tritium
+ gas_type = GAS_TRITIUM
/obj/machinery/atmospherics/components/unary/tank/water_vapor
icon_state = "grey"
- gas_type = /datum/gas/water_vapor
+ gas_type = GAS_H2O
// /obj/machinery/atmospherics/components/unary/tank/zauker
// gas_type = /datum/gas/zauker
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
index 1a86898f1f..1a53a5299f 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
@@ -15,6 +15,8 @@
level = 1
layer = GAS_SCRUBBER_LAYER
+ interacts_with_air = TRUE
+
var/id_tag = null
var/pump_direction = RELEASING
@@ -107,9 +109,7 @@
if(air_contents.return_temperature() > 0)
var/transfer_moles = pressure_delta*environment.return_volume()/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
- var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
-
- loc.assume_air(removed)
+ loc.assume_air_moles(air_contents, transfer_moles)
air_update_turf()
else // external -> internal
@@ -122,11 +122,7 @@
moles_delta = min(moles_delta, (internal_pressure_bound - air_contents.return_pressure()) * our_multiplier)
if(moles_delta > 0)
- var/datum/gas_mixture/removed = loc.remove_air(moles_delta)
- if (isnull(removed)) // in space
- return
-
- air_contents.merge(removed)
+ loc.transfer_air(air_contents, moles_delta)
air_update_turf()
update_parents()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
index 025c9734ca..90d5f077a5 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
@@ -13,10 +13,12 @@
level = 1
layer = GAS_SCRUBBER_LAYER
+ interacts_with_air = TRUE
+
var/id_tag = null
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
- var/filter_types = list(/datum/gas/carbon_dioxide)
+ var/filter_types = list(GAS_CO2)
var/volume_rate = 200
var/widenet = 0 //is this scrubber acting on the 3x3 area around it.
var/list/turf/adjacent_turfs = list()
@@ -33,11 +35,6 @@
if(!id_tag)
id_tag = assign_uid_vents()
- for(var/f in filter_types)
- if(istext(f))
- filter_types -= f
- filter_types += gas_id2path(f)
-
/obj/machinery/atmospherics/components/unary/vent_scrubber/Destroy()
var/area/A = get_base_area(src)
if (A)
@@ -97,8 +94,8 @@
return FALSE
var/list/f_types = list()
- for(var/path in GLOB.meta_gas_ids)
- f_types += list(list("gas_id" = GLOB.meta_gas_ids[path], "gas_name" = GLOB.meta_gas_names[path], "enabled" = (path in filter_types)))
+ for(var/id in GLOB.gas_data.ids)
+ f_types += list(list("gas_id" = id, "gas_name" = GLOB.gas_data.names[id], "enabled" = (id in filter_types)))
var/datum/signal/signal = new(list(
"tag" = id_tag,
@@ -150,32 +147,17 @@
var/datum/gas_mixture/environment = tile.return_air()
var/datum/gas_mixture/air_contents = airs[1]
- if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE)
+ if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE || !islist(filter_types))
return FALSE
if(scrubbing & SCRUBBING)
- var/transfer_moles = min(1, volume_rate/environment.return_volume())*environment.total_moles()
+ environment.scrub_into(air_contents, volume_rate/environment.return_volume(), filter_types)
- //Take a gas sample
- var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
-
- //Nothing left to remove from the tile
- if(isnull(removed))
- return FALSE
-
- removed.scrub_into(air_contents, filter_types)
-
- //Remix the resulting gases
- tile.assume_air(removed)
tile.air_update_turf()
else //Just siphoning all air
- var/transfer_moles = environment.total_moles()*(volume_rate/environment.return_volume())
-
- var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
-
- air_contents.merge(removed)
+ environment.transfer_ratio_to(air_contents, volume_rate/environment.return_volume())
tile.air_update_turf()
update_parents()
@@ -222,12 +204,12 @@
investigate_log(" was toggled to [scrubbing ? "scrubbing" : "siphon"] mode by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
if("toggle_filter" in signal.data)
- filter_types ^= gas_id2path(signal.data["toggle_filter"])
+ filter_types ^= signal.data["toggle_filter"]
if("set_filters" in signal.data)
filter_types = list()
for(var/gas in signal.data["set_filters"])
- filter_types += gas_id2path(gas)
+ filter_types += gas
if("init" in signal.data)
name = signal.data["init"]
diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm
index bd7dd6d297..1d0c59f789 100644
--- a/code/modules/atmospherics/machinery/datum_pipeline.dm
+++ b/code/modules/atmospherics/machinery/datum_pipeline.dm
@@ -241,25 +241,4 @@
/datum/pipeline/proc/reconcile_air()
var/list/datum/gas_mixture/GL = get_all_connected_airs()
-
- var/total_thermal_energy = 0
- var/total_heat_capacity = 0
- var/datum/gas_mixture/total_gas_mixture = new(0)
-
- for(var/i in GL)
- var/datum/gas_mixture/G = i
- total_gas_mixture.set_volume(total_gas_mixture.return_volume() + G.return_volume())
-
- total_gas_mixture.merge(G)
-
- total_thermal_energy += G.thermal_energy()
- total_heat_capacity += G.heat_capacity()
-
- total_gas_mixture.set_temperature(total_heat_capacity ? total_thermal_energy/total_heat_capacity : 0)
-
- if(total_gas_mixture.return_volume() > 0)
- //Update individual gas_mixtures by volume ratio
- for(var/i in GL)
- var/datum/gas_mixture/G = i
- G.copy_from(total_gas_mixture)
- G.multiply(G.return_volume()/total_gas_mixture.return_volume())
+ equalize_all_gases_in_list(GL)
diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm
index 1842211fd2..1caae1376f 100644
--- a/code/modules/atmospherics/machinery/other/miner.dm
+++ b/code/modules/atmospherics/machinery/other/miner.dm
@@ -12,6 +12,7 @@
icon_state = "miner"
density = FALSE
resistance_flags = INDESTRUCTIBLE|ACID_PROOF|FIRE_PROOF
+ interacts_with_air = TRUE
var/spawn_id = null
var/spawn_temp = T20C
var/spawn_mol = MOLES_CELLSTANDARD * 10
@@ -117,7 +118,7 @@
on_overlay.color = overlay_color
add_overlay(on_overlay)
-/obj/machinery/atmospherics/miner/process()
+/obj/machinery/atmospherics/miner/process_atmos()
update_power()
check_operation()
if(active && !broken)
@@ -144,34 +145,34 @@
/obj/machinery/atmospherics/miner/n2o
name = "\improper N2O Gas Miner"
overlay_color = "#FFCCCC"
- spawn_id = /datum/gas/nitrous_oxide
+ spawn_id = GAS_NITROUS
/obj/machinery/atmospherics/miner/nitrogen
name = "\improper N2 Gas Miner"
overlay_color = "#CCFFCC"
- spawn_id = /datum/gas/nitrogen
+ spawn_id = GAS_N2
/obj/machinery/atmospherics/miner/oxygen
name = "\improper O2 Gas Miner"
overlay_color = "#007FFF"
- spawn_id = /datum/gas/oxygen
+ spawn_id = GAS_O2
/obj/machinery/atmospherics/miner/toxins
name = "\improper Plasma Gas Miner"
overlay_color = "#FF0000"
- spawn_id = /datum/gas/plasma
+ spawn_id = GAS_PLASMA
/obj/machinery/atmospherics/miner/carbon_dioxide
name = "\improper CO2 Gas Miner"
overlay_color = "#CDCDCD"
- spawn_id = /datum/gas/carbon_dioxide
+ spawn_id = GAS_CO2
/obj/machinery/atmospherics/miner/bz
name = "\improper BZ Gas Miner"
overlay_color = "#FAFF00"
- spawn_id = /datum/gas/bz
+ spawn_id = GAS_BZ
/obj/machinery/atmospherics/miner/water_vapor
name = "\improper Water Vapor Gas Miner"
overlay_color = "#99928E"
- spawn_id = /datum/gas/water_vapor
+ spawn_id = GAS_H2O
diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm
index 7c170f8afc..5fdedd5be7 100644
--- a/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm
+++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm
@@ -1,11 +1,12 @@
/obj/machinery/atmospherics/pipe/heat_exchanging
level = 2
- var/minimum_temperature_difference = 20
+ var/minimum_temperature_difference = 0.01
var/thermal_conductivity = WINDOW_HEAT_TRANSFER_COEFFICIENT
color = "#404040"
buckle_lying = 1
var/icon_temperature = T20C //stop small changes in temperature causing icon refresh
resistance_flags = LAVA_PROOF | FIRE_PROOF
+ interacts_with_air = TRUE
/obj/machinery/atmospherics/pipe/heat_exchanging/Initialize()
. = ..()
diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm
index 23fd2292ff..e05502dbad 100644
--- a/code/modules/atmospherics/machinery/pipes/pipes.dm
+++ b/code/modules/atmospherics/machinery/pipes/pipes.dm
@@ -54,6 +54,9 @@
/obj/machinery/atmospherics/pipe/remove_air(amount)
return parent.air.remove(amount)
+/obj/machinery/atmospherics/pipe/remove_air_ratio(ratio)
+ return parent.air.remove_ratio(ratio)
+
/obj/machinery/atmospherics/pipe/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pipe_meter))
var/obj/item/pipe_meter/meter = W
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 90f8680da9..15c6475033 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -28,7 +28,7 @@
// var/pressure_limit = 50000
var/temperature_resistance = 1000 + T0C
- var/starter_temp
+ var/starter_temp = T20C
// Prototype vars
var/prototype = FALSE
var/valve_timer = null
@@ -74,37 +74,37 @@
name = "n2 canister"
desc = "Nitrogen. Reportedly useful for something."
icon_state = "red"
- gas_type = /datum/gas/nitrogen
+ gas_type = GAS_N2
/obj/machinery/portable_atmospherics/canister/oxygen
name = "o2 canister"
desc = "Oxygen. Necessary for human life."
icon_state = "blue"
- gas_type = /datum/gas/oxygen
+ gas_type = GAS_O2
/obj/machinery/portable_atmospherics/canister/carbon_dioxide
name = "co2 canister"
desc = "Carbon dioxide. What the fuck is carbon dioxide?"
icon_state = "black"
- gas_type = /datum/gas/carbon_dioxide
+ gas_type = GAS_CO2
/obj/machinery/portable_atmospherics/canister/toxins
name = "plasma canister"
desc = "Plasma. The reason YOU are here. Highly toxic."
icon_state = "orange"
- gas_type = /datum/gas/plasma
+ gas_type = GAS_PLASMA
/obj/machinery/portable_atmospherics/canister/bz
name = "\improper BZ canister"
desc = "BZ. A powerful hallucinogenic nerve agent."
icon_state = "purple"
- gas_type = /datum/gas/bz
+ gas_type = GAS_BZ
/obj/machinery/portable_atmospherics/canister/nitrous_oxide
name = "n2o canister"
desc = "Nitrous oxide. Known to cause drowsiness."
icon_state = "redws"
- gas_type = /datum/gas/nitrous_oxide
+ gas_type = GAS_NITROUS
/obj/machinery/portable_atmospherics/canister/air
name = "air canister"
@@ -115,57 +115,57 @@
name = "tritium canister"
desc = "Tritium. Inhalation might cause irradiation."
icon_state = "green"
- gas_type = /datum/gas/tritium
+ gas_type = GAS_TRITIUM
/obj/machinery/portable_atmospherics/canister/nob
name = "hyper-noblium canister"
desc = "Hyper-Noblium. More noble than all other gases."
icon_state = "freon"
- gas_type = /datum/gas/hypernoblium
+ gas_type = GAS_HYPERNOB
/obj/machinery/portable_atmospherics/canister/nitryl
name = "nitryl canister"
desc = "Nitryl. Feels great 'til the acid eats your lungs."
icon_state = "brown"
- gas_type = /datum/gas/nitryl
+ gas_type = GAS_NITRYL
/obj/machinery/portable_atmospherics/canister/stimulum
name = "stimulum canister"
desc = "Stimulum. High energy gas, high energy people."
icon_state = "darkpurple"
- gas_type = /datum/gas/stimulum
+ gas_type = GAS_STIMULUM
/obj/machinery/portable_atmospherics/canister/pluoxium
name = "pluoxium canister"
desc = "Pluoxium. Like oxygen, but more bang for your buck."
icon_state = "darkblue"
- gas_type = /datum/gas/pluoxium
+ gas_type = GAS_PLUOXIUM
/obj/machinery/portable_atmospherics/canister/water_vapor
name = "water vapor canister"
desc = "Water vapor. We get it, you vape."
icon_state = "water_vapor"
- gas_type = /datum/gas/water_vapor
+ gas_type = GAS_H2O
filled = 1
/obj/machinery/portable_atmospherics/canister/miasma
name = "miasma canister"
desc = "Miasma. Makes you wish your nose were blocked."
icon_state = "miasma"
- gas_type = /datum/gas/miasma
+ gas_type = GAS_MIASMA
filled = 1
/obj/machinery/portable_atmospherics/canister/methane
name = "methane canister"
desc = "Methane. The simplest of hydrocarbons. Non-toxic but highly flammable."
icon_state = "greyblackred"
- gas_type = /datum/gas/methane
+ gas_type = GAS_METHANE
/obj/machinery/portable_atmospherics/canister/methyl_bromide
name = "methyl bromide canister"
desc = "Methyl bromide. A potent toxin to most, essential for the Kharmaan to live."
icon_state = "purplecyan"
- gas_type = /datum/gas/methyl_bromide
+ gas_type = GAS_METHYL_BROMIDE
/obj/machinery/portable_atmospherics/canister/proc/get_time_left()
if(timing)
@@ -198,7 +198,7 @@
name = "prototype canister"
desc = "A prototype canister for a prototype bike, what could go wrong?"
icon_state = "proto"
- gas_type = /datum/gas/oxygen
+ gas_type = GAS_O2
filled = 1
release_pressure = ONE_ATMOSPHERE*2
@@ -217,13 +217,13 @@
// air_contents.add_gas(gas_type)
if(starter_temp)
air_contents.set_temperature(starter_temp)
+ if(!air_contents.return_volume())
+ CRASH("Auxtools is failing somehow! Gas with pointer [air_contents._extools_pointer_gasmixture] is not valid.")
air_contents.set_moles(gas_type,(maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
- if(starter_temp)
- air_contents.set_temperature(starter_temp)
/obj/machinery/portable_atmospherics/canister/air/create_gas()
- air_contents.set_moles(/datum/gas/oxygen, (O2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
- air_contents.set_moles(/datum/gas/nitrogen, (N2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
+ air_contents.set_moles(GAS_O2, (O2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
+ air_contents.set_moles(GAS_N2, (N2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
/obj/machinery/portable_atmospherics/canister/update_icon_state()
if(stat & BROKEN)
@@ -287,9 +287,8 @@
/obj/machinery/portable_atmospherics/canister/proc/canister_break()
disconnect()
- var/datum/gas_mixture/expelled_gas = air_contents.remove(air_contents.total_moles())
var/turf/T = get_turf(src)
- T.assume_air(expelled_gas)
+ T.assume_air(air_contents)
air_update_turf()
obj_break()
@@ -434,10 +433,10 @@
var/list/danger = list()
for(var/id in air_contents.get_gases())
var/gas = air_contents.get_moles(id)
- if(!GLOB.meta_gas_dangers[id])
+ if(!(GLOB.gas_data.flags[id] & GAS_FLAG_DANGEROUS))
continue
- if(gas > (GLOB.meta_gas_visibility[id] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility
- danger[GLOB.meta_gas_names[id]] = gas //ex. "plasma" = 20
+ if(gas > (GLOB.gas_data.visibility[id] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility
+ danger[GLOB.gas_data.names[id]] = gas //ex. "plasma" = 20
if(danger.len)
message_admins("[ADMIN_LOOKUPFLW(usr)] opened a canister that contains the following at [ADMIN_VERBOSEJMP(src)]:")
diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
index 166727f6ae..93dc414968 100644
--- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
+++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
@@ -16,7 +16,7 @@
/obj/machinery/portable_atmospherics/New()
..()
- SSair.atmos_machinery += src
+ SSair.atmos_air_machinery += src
air_contents = new(volume)
air_contents.set_temperature(T20C)
@@ -24,7 +24,7 @@
return 1
/obj/machinery/portable_atmospherics/Destroy()
- SSair.atmos_machinery -= src
+ SSair.atmos_air_machinery -= src
disconnect()
qdel(air_contents)
diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm
index 2c9bcdc1a7..68708c3233 100644
--- a/code/modules/atmospherics/machinery/portable/pump.dm
+++ b/code/modules/atmospherics/machinery/portable/pump.dm
@@ -112,8 +112,8 @@
if("power")
on = !on
if(on && !holding)
- var/plasma = air_contents.get_moles(/datum/gas/plasma)
- var/n2o = air_contents.get_moles(/datum/gas/nitrous_oxide)
+ var/plasma = air_contents.get_moles(GAS_PLASMA)
+ var/n2o = air_contents.get_moles(GAS_NITROUS)
if(n2o || plasma)
message_admins("[ADMIN_LOOKUPFLW(usr)] turned on a pump that contains [n2o ? "N2O" : ""][n2o && plasma ? " & " : ""][plasma ? "Plasma" : ""] at [ADMIN_VERBOSEJMP(src)]")
log_admin("[key_name(usr)] turned on a pump that contains [n2o ? "N2O" : ""][n2o && plasma ? " & " : ""][plasma ? "Plasma" : ""] at [AREACOORD(src)]")
diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm
index 7fd50158ca..7e27d64c7a 100644
--- a/code/modules/atmospherics/machinery/portable/scrubber.dm
+++ b/code/modules/atmospherics/machinery/portable/scrubber.dm
@@ -10,7 +10,7 @@
var/use_overlays = TRUE
volume = 1000
- var/list/scrubbing = list(/datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitryl, /datum/gas/tritium, /datum/gas/hypernoblium, /datum/gas/water_vapor)
+ var/list/scrubbing = list(GAS_PLASMA, GAS_CO2, GAS_NITROUS, GAS_BZ, GAS_NITRYL, GAS_TRITIUM, GAS_HYPERNOB, GAS_H2O)
/obj/machinery/portable_atmospherics/scrubber/Destroy()
var/turf/T = get_turf(src)
@@ -42,14 +42,7 @@
scrub(T.return_air())
/obj/machinery/portable_atmospherics/scrubber/proc/scrub(var/datum/gas_mixture/mixture)
- var/transfer_moles = min(1, volume_rate / mixture.return_volume()) * mixture.total_moles()
-
- var/datum/gas_mixture/filtering = mixture.remove(transfer_moles) // Remove part of the mixture to filter.
- if(!filtering)
- return
-
- filtering.scrub_into(air_contents,scrubbing)
- mixture.merge(filtering) // Returned the cleaned gas.
+ mixture.scrub_into(air_contents, volume_rate / mixture.return_volume(), scrubbing)
if(!holding)
air_update_turf()
@@ -76,8 +69,8 @@
data["id_tag"] = -1 //must be defined in order to reuse code between portable and vent scrubbers
data["filter_types"] = list()
- for(var/path in GLOB.meta_gas_ids)
- data["filter_types"] += list(list("gas_id" = GLOB.meta_gas_ids[path], "gas_name" = GLOB.meta_gas_names[path], "enabled" = (path in scrubbing)))
+ for(var/id in GLOB.gas_data.ids)
+ data["filter_types"] += list(list("gas_id" = id, "gas_name" = GLOB.gas_data.names[id], "enabled" = (id in scrubbing)))
if(holding)
data["holding"] = list()
@@ -100,7 +93,7 @@
holding = null
. = TRUE
if("toggle_filter")
- scrubbing ^= gas_id2path(params["val"])
+ scrubbing ^= params["val"]
. = TRUE
update_icon()
diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm
index 551c1c5536..c67bbb8a4d 100644
--- a/code/modules/awaymissions/gateway.dm
+++ b/code/modules/awaymissions/gateway.dm
@@ -205,6 +205,12 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
deactivate()
return
+/obj/machinery/gateway/update_icon_state()
+ if(target)
+ icon_state = "on_old"
+ else
+ icon_state = "portal_frame"
+
/obj/machinery/gateway/safe_throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE)
return
diff --git a/code/modules/awaymissions/mission_code/snowdin.dm b/code/modules/awaymissions/mission_code/snowdin.dm
index d873b42d33..5d30ccd907 100644
--- a/code/modules/awaymissions/mission_code/snowdin.dm
+++ b/code/modules/awaymissions/mission_code/snowdin.dm
@@ -156,13 +156,13 @@
/turf/open/floor/plasteel/dark/snowdin
initial_gas_mix = FROZEN_ATMOS
planetary_atmos = 1
- temperature = 180
+ initial_temperature = 180
/turf/open/lava/plasma
name = "liquid plasma"
desc = "A flowing stream of chilled liquid plasma. You probably shouldn't get in."
icon_state = "liquidplasma"
- initial_gas_mix = "o2=0;n2=82;plasma=24;TEMP=120"
+ initial_gas_mix = "n2=82;plasma=24;TEMP=120"
baseturfs = /turf/open/lava/plasma
slowdown = 2
diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm
index 4a56257882..e0703201a1 100644
--- a/code/modules/buildmode/buildmode.dm
+++ b/code/modules/buildmode/buildmode.dm
@@ -17,10 +17,10 @@
var/switch_state = BM_SWITCHSTATE_NONE
var/switch_width = 5
// modeswitch UI
- var/obj/screen/buildmode/mode/modebutton
+ var/atom/movable/screen/buildmode/mode/modebutton
var/list/modeswitch_buttons = list()
// dirswitch UI
- var/obj/screen/buildmode/bdir/dirbutton
+ var/atom/movable/screen/buildmode/bdir/dirbutton
var/list/dirswitch_buttons = list()
/datum/buildmode/New(client/c)
@@ -34,7 +34,7 @@
holder.screen += buttons
holder.click_intercept = src
mode.enter_mode(src)
-
+
/datum/buildmode/proc/quit()
mode.exit_mode(src)
holder.screen -= buttons
@@ -63,16 +63,16 @@
/datum/buildmode/proc/create_buttons()
// keep a reference so we can update it upon mode switch
- modebutton = new /obj/screen/buildmode/mode(src)
+ modebutton = new /atom/movable/screen/buildmode/mode(src)
buttons += modebutton
- buttons += new /obj/screen/buildmode/help(src)
+ buttons += new /atom/movable/screen/buildmode/help(src)
// keep a reference so we can update it upon dir switch
- dirbutton = new /obj/screen/buildmode/bdir(src)
+ dirbutton = new /atom/movable/screen/buildmode/bdir(src)
buttons += dirbutton
- buttons += new /obj/screen/buildmode/quit(src)
+ buttons += new /atom/movable/screen/buildmode/quit(src)
// build the lists of switching buttons
- build_options_grid(subtypesof(/datum/buildmode_mode), modeswitch_buttons, /obj/screen/buildmode/modeswitch)
- build_options_grid(list(SOUTH,EAST,WEST,NORTH,NORTHWEST), dirswitch_buttons, /obj/screen/buildmode/dirswitch)
+ build_options_grid(subtypesof(/datum/buildmode_mode), modeswitch_buttons, /atom/movable/screen/buildmode/modeswitch)
+ build_options_grid(list(SOUTH,EAST,WEST,NORTH,NORTHWEST), dirswitch_buttons, /atom/movable/screen/buildmode/dirswitch)
// this creates a nice offset grid for choosing between buildmode options,
// because going "click click click ah hell" sucks.
@@ -81,7 +81,7 @@
for(var/thing in elements)
var/x = pos_idx % switch_width
var/y = FLOOR(pos_idx / switch_width, 1)
- var/obj/screen/buildmode/B = new buttontype(src, thing)
+ var/atom/movable/screen/buildmode/B = new buttontype(src, thing)
// extra .5 for a nice offset look
B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]"
buttonslist += B
@@ -100,7 +100,7 @@
else
close_switchstates()
open_modeswitch()
-
+
/datum/buildmode/proc/open_modeswitch()
switch_state = BM_SWITCHSTATE_MODE
holder.screen += modeswitch_buttons
@@ -115,7 +115,7 @@
else
close_switchstates()
open_dirswitch()
-
+
/datum/buildmode/proc/open_dirswitch()
switch_state = BM_SWITCHSTATE_DIR
holder.screen += dirswitch_buttons
@@ -155,7 +155,7 @@
new /datum/buildmode(M.client)
message_admins("[key_name_admin(usr)] has entered build mode.")
log_admin("[key_name(usr)] has entered build mode.")
-
+
#undef BM_SWITCHSTATE_NONE
#undef BM_SWITCHSTATE_MODE
#undef BM_SWITCHSTATE_DIR
diff --git a/code/modules/buildmode/buttons.dm b/code/modules/buildmode/buttons.dm
index 6901a0e42e..5c5c0000d1 100644
--- a/code/modules/buildmode/buttons.dm
+++ b/code/modules/buildmode/buttons.dm
@@ -1,23 +1,23 @@
-/obj/screen/buildmode
+/atom/movable/screen/buildmode
icon = 'icons/misc/buildmode.dmi'
var/datum/buildmode/bd
// If we don't do this, we get occluded by item action buttons
layer = ABOVE_HUD_LAYER
-/obj/screen/buildmode/New(bld)
+/atom/movable/screen/buildmode/New(bld)
bd = bld
return ..()
-/obj/screen/buildmode/Destroy()
+/atom/movable/screen/buildmode/Destroy()
bd = null
return ..()
-/obj/screen/buildmode/mode
+/atom/movable/screen/buildmode/mode
name = "Toggle Mode"
icon_state = "buildmode_basic"
screen_loc = "NORTH,WEST"
-/obj/screen/buildmode/mode/Click(location, control, params)
+/atom/movable/screen/buildmode/mode/Click(location, control, params)
var/list/pa = params2list(params)
if(pa.Find("left"))
@@ -27,63 +27,63 @@
update_icon()
return 1
-/obj/screen/buildmode/mode/update_icon_state()
+/atom/movable/screen/buildmode/mode/update_icon_state()
icon_state = bd.mode.get_button_iconstate()
-/obj/screen/buildmode/help
+/atom/movable/screen/buildmode/help
icon_state = "buildhelp"
screen_loc = "NORTH,WEST+1"
name = "Buildmode Help"
-/obj/screen/buildmode/help/Click(location, control, params)
+/atom/movable/screen/buildmode/help/Click(location, control, params)
bd.mode.show_help(usr.client)
return 1
-/obj/screen/buildmode/bdir
+/atom/movable/screen/buildmode/bdir
icon_state = "build"
screen_loc = "NORTH,WEST+2"
name = "Change Dir"
-/obj/screen/buildmode/bdir/update_icon_state()
+/atom/movable/screen/buildmode/bdir/update_icon_state()
dir = bd.build_dir
-/obj/screen/buildmode/bdir/Click()
+/atom/movable/screen/buildmode/bdir/Click()
bd.toggle_dirswitch()
update_icon()
return 1
// used to switch between modes
-/obj/screen/buildmode/modeswitch
+/atom/movable/screen/buildmode/modeswitch
var/datum/buildmode_mode/modetype
-/obj/screen/buildmode/modeswitch/New(bld, mt)
+/atom/movable/screen/buildmode/modeswitch/New(bld, mt)
modetype = mt
icon_state = "buildmode_[initial(modetype.key)]"
name = initial(modetype.key)
return ..(bld)
-/obj/screen/buildmode/modeswitch/Click()
+/atom/movable/screen/buildmode/modeswitch/Click()
bd.change_mode(modetype)
return 1
// used to switch between dirs
-/obj/screen/buildmode/dirswitch
+/atom/movable/screen/buildmode/dirswitch
icon_state = "build"
-/obj/screen/buildmode/dirswitch/New(bld, dir)
+/atom/movable/screen/buildmode/dirswitch/New(bld, dir)
src.dir = dir
name = dir2text(dir)
return ..(bld)
-/obj/screen/buildmode/dirswitch/Click()
+/atom/movable/screen/buildmode/dirswitch/Click()
bd.change_dir(dir)
return 1
-/obj/screen/buildmode/quit
+/atom/movable/screen/buildmode/quit
icon_state = "buildquit"
screen_loc = "NORTH,WEST+3"
name = "Quit Buildmode"
-/obj/screen/buildmode/quit/Click()
+/atom/movable/screen/buildmode/quit/Click()
bd.quit()
return 1
diff --git a/code/modules/cargo/bounties/engineering.dm b/code/modules/cargo/bounties/engineering.dm
index b84fd2ca2c..5ddce8fb2c 100644
--- a/code/modules/cargo/bounties/engineering.dm
+++ b/code/modules/cargo/bounties/engineering.dm
@@ -4,7 +4,7 @@
reward = 7500
wanted_types = list(/obj/item/tank)
var/moles_required = 20 // A full tank is 28 moles, but CentCom ignores that fact.
- var/gas_type = /datum/gas/pluoxium
+ var/gas_type = GAS_PLUOXIUM
/datum/bounty/item/engineering/gas/applies_to(obj/O)
if(!..())
@@ -15,12 +15,12 @@
//datum/bounty/item/engineering/gas/nitryl_tank
// name = "Full Tank of Nitryl"
// description = "The non-human staff of Station 88 has been volunteered to test performance enhancing drugs. Ship them a tank full of Nitryl so they can get started."
-// gas_type = /datum/gas/nitryl
+// gas_type = GAS_NITRYL
/datum/bounty/item/engineering/gas/tritium_tank
name = "Full Tank of Tritium"
description = "Station 49 is looking to kickstart their research program. Ship them a tank full of Tritium."
- gas_type = /datum/gas/tritium
+ gas_type = GAS_TRITIUM
/datum/bounty/item/engineering/pacman
name = "P.A.C.M.A.N.-type portable generator"
diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm
index 05a9eef4f2..e4060de1a2 100644
--- a/code/modules/cargo/centcom_podlauncher.dm
+++ b/code/modules/cargo/centcom_podlauncher.dm
@@ -51,9 +51,9 @@
var/obj/structure/closet/supplypod/centcompod/temp_pod //The temporary pod that is modified by this datum, then cloned. The buildObject() clone of this pod is what is launched
// Stuff needed to render the map
var/map_name
- var/obj/screen/map_view/cam_screen
+ var/atom/movable/screen/map_view/cam_screen
var/list/cam_plane_masters
- var/obj/screen/background/cam_background
+ var/atom/movable/screen/background/cam_background
var/tabIndex = 1
var/renderLighting = FALSE
@@ -92,8 +92,8 @@
cam_screen.del_on_map_removal = TRUE
cam_screen.screen_loc = "[map_name]:1,1"
cam_plane_masters = list()
- for(var/plane in subtypesof(/obj/screen/plane_master))
- var/obj/screen/instance = new plane()
+ for(var/plane in subtypesof(/atom/movable/screen/plane_master))
+ var/atom/movable/screen/instance = new plane()
if (!renderLighting && instance.plane == LIGHTING_PLANE)
instance.alpha = 100
instance.assigned_map = map_name
@@ -581,7 +581,7 @@
var/left_click = pa.Find("left")
if (launcherActivated)
//Clicking on UI elements shouldn't launch a pod
- if(istype(target,/obj/screen))
+ if(istype(target,/atom/movable/screen))
return FALSE
. = TRUE
@@ -616,7 +616,7 @@
sleep(rand()*2) //looks cooler than them all appearing at once. Gives the impression of burst fire.
else if (picking_dropoff_turf)
//Clicking on UI elements shouldn't pick a dropoff turf
- if(istype(target,/obj/screen))
+ if(istype(target,/atom/movable/screen))
return FALSE
. = TRUE
diff --git a/code/modules/cargo/exports.dm b/code/modules/cargo/exports.dm
index 12a5002ac7..b72e497a5f 100644
--- a/code/modules/cargo/exports.dm
+++ b/code/modules/cargo/exports.dm
@@ -84,17 +84,19 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
/datum/export/New()
..()
- SSprocessing.processing += src
+ START_PROCESSING(SSprocessing, src)
init_cost = cost
export_types = typecacheof(export_types)
exclude_types = typecacheof(exclude_types)
/datum/export/Destroy()
- SSprocessing.processing -= src
+ STOP_PROCESSING(SSprocessing, src)
return ..()
/datum/export/process()
- ..()
+ . = ..()
+ if(!k_elasticity)
+ return PROCESS_KILL
cost *= NUM_E**(k_elasticity * (1/30))
if(cost > init_cost)
cost = init_cost
diff --git a/code/modules/cargo/exports/large_objects.dm b/code/modules/cargo/exports/large_objects.dm
index 9202fd1f81..dca23c9f22 100644
--- a/code/modules/cargo/exports/large_objects.dm
+++ b/code/modules/cargo/exports/large_objects.dm
@@ -169,13 +169,13 @@
/datum/export/large/gas_canister/get_cost(obj/O)
var/obj/machinery/portable_atmospherics/canister/C = O
var/worth = 10
- worth += C.air_contents.get_moles(/datum/gas/bz)*3
- worth += C.air_contents.get_moles(/datum/gas/stimulum)*25
- worth += C.air_contents.get_moles(/datum/gas/hypernoblium)*20
- worth += C.air_contents.get_moles(/datum/gas/miasma)*2
- worth += C.air_contents.get_moles(/datum/gas/tritium)*7
- worth += C.air_contents.get_moles(/datum/gas/pluoxium)*6
- worth += C.air_contents.get_moles(/datum/gas/nitryl)*10
+ worth += C.air_contents.get_moles(GAS_BZ)*3
+ worth += C.air_contents.get_moles(GAS_STIMULUM)*25
+ worth += C.air_contents.get_moles(GAS_HYPERNOB)*20
+ worth += C.air_contents.get_moles(GAS_MIASMA)*2
+ worth += C.air_contents.get_moles(GAS_TRITIUM)*7
+ worth += C.air_contents.get_moles(GAS_PLUOXIUM)*6
+ worth += C.air_contents.get_moles(GAS_NITRYL)*10
return worth
diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm
index 241cd6be93..99f24107c7 100644
--- a/code/modules/client/client_defines.dm
+++ b/code/modules/client/client_defines.dm
@@ -60,7 +60,7 @@
preload_rsc = PRELOAD_RSC
- var/obj/screen/click_catcher/void
+ var/atom/movable/screen/click_catcher/void
//These two vars are used to make a special mouse cursor, with a unique icon for clicking
var/mouse_up_icon = null
@@ -88,7 +88,7 @@
var/datum/player_details/player_details //these persist between logins/logouts during the same round.
- var/list/char_render_holders //Should only be a key-value list of north/south/east/west = obj/screen.
+ var/list/char_render_holders //Should only be a key-value list of north/south/east/west = atom/movable/screen.
/// Last time they used fix macros
var/last_macro_fix = 0
@@ -168,7 +168,7 @@
* Assoc list with all the active maps - when a screen obj is added to
* a map, it's put in here as well.
*
- * Format: list( = list(/obj/screen))
+ * Format: list( = list(/atom/movable/screen))
*/
var/list/screen_maps = list()
@@ -183,3 +183,7 @@
//world.time of when the crew manifest can be accessed
var/crew_manifest_delay
+ /// Should go in persistent round player data sometime. This tracks what items have already warned the user on pickup that they can block/parry.
+ var/list/block_parry_hinted = list()
+ /// moused over objects, currently capped at 7. this is awful, and should be replaced with a component to track it using signals for parrying at some point.
+ var/list/moused_over_objects = list()
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index 8add693d48..571adb406b 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -1029,7 +1029,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
var/pos = 0
for(var/D in GLOB.cardinals)
pos++
- var/obj/screen/O = LAZYACCESS(char_render_holders, "[D]")
+ var/atom/movable/screen/O = LAZYACCESS(char_render_holders, "[D]")
if(!O)
O = new
LAZYSET(char_render_holders, "[D]", O)
@@ -1040,7 +1040,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
/client/proc/clear_character_previews()
for(var/index in char_render_holders)
- var/obj/screen/S = char_render_holders[index]
+ var/atom/movable/screen/S = char_render_holders[index]
screen -= S
qdel(S)
char_render_holders = null
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 251bcc72ad..5bc0440b77 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -187,6 +187,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/vore_flags = 0
var/list/belly_prefs = list()
var/vore_taste = "nothing in particular"
+ var/vore_smell = null
var/toggleeatingnoise = TRUE
var/toggledigestionnoise = TRUE
var/hound_sleeper = TRUE
@@ -1068,6 +1069,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Voracious MediHound sleepers:[(cit_toggles & MEDIHOUND_SLEEPER) ? "Yes" : "No"] "
dat += "Hear Vore Sounds:[(cit_toggles & EATING_NOISES) ? "Yes" : "No"] "
dat += "Hear Vore Digestion Sounds:[(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"] "
+ dat += "Allow trash forcefeeding (requires Trashcan quirk)[(cit_toggles & TRASH_FORCEFEED) ? "Yes" : "No"] "
dat += "Forced Feminization:[(cit_toggles & FORCED_FEM) ? "Allowed" : "Disallowed"] "
dat += "Forced Masculinization:[(cit_toggles & FORCED_MASC) ? "Allowed" : "Disallowed"] "
dat += "Lewd Hypno:[(cit_toggles & HYPNO) ? "Allowed" : "Disallowed"] "
@@ -2800,6 +2802,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("toggledigestionnoise")
cit_toggles ^= DIGESTION_NOISES
+ if("toggleforcefeedtrash")
+ cit_toggles ^= TRASH_FORCEFEED
+
if("breast_enlargement")
cit_toggles ^= BREAST_ENLARGEMENT
@@ -2835,9 +2840,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("ambientocclusion")
ambientocclusion = !ambientocclusion
if(parent && parent.screen && parent.screen.len)
- var/obj/screen/plane_master/game_world/G = parent.mob.hud_used.plane_masters["[GAME_PLANE]"]
- var/obj/screen/plane_master/above_wall/A = parent.mob.hud_used.plane_masters["[ABOVE_WALL_PLANE]"]
- var/obj/screen/plane_master/wall/W = parent.mob.hud_used.plane_masters["[WALL_PLANE]"]
+ var/atom/movable/screen/plane_master/game_world/G = parent.mob.hud_used.plane_masters["[GAME_PLANE]"]
+ var/atom/movable/screen/plane_master/above_wall/A = parent.mob.hud_used.plane_masters["[ABOVE_WALL_PLANE]"]
+ var/atom/movable/screen/plane_master/wall/W = parent.mob.hud_used.plane_masters["[WALL_PLANE]"]
G.backdrop(parent.mob)
A.backdrop(parent.mob)
W.backdrop(parent.mob)
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 45c5357c4d..d4d13dc40f 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -821,6 +821,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["vore_flags"] >> vore_flags
S["vore_taste"] >> vore_taste
+ S["vore_smell"] >> vore_smell
var/char_vr_path = "[vr_path]/character_[default_slot]_v2.json"
if(fexists(char_vr_path))
var/list/json_from_file = json_decode(file2text(char_vr_path))
@@ -994,6 +995,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
vore_flags = sanitize_integer(vore_flags, 0, MAX_VORE_FLAG, 0)
vore_taste = copytext(vore_taste, 1, MAX_TASTE_LEN)
+ vore_smell = copytext(vore_smell, 1, MAX_TASTE_LEN)
belly_prefs = SANITIZE_LIST(belly_prefs)
cit_character_pref_load(S)
@@ -1147,6 +1149,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["vore_flags"] , vore_flags)
WRITE_FILE(S["vore_taste"] , vore_taste)
+ WRITE_FILE(S["vore_smell"] , vore_smell)
var/char_vr_path = "[vr_path]/character_[default_slot]_v2.json"
var/belly_prefs_json = safe_json_encode(list("belly_prefs" = belly_prefs))
if(fexists(char_vr_path))
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 416c6309d4..56ddb5f5f1 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -79,8 +79,8 @@
if(ismecha(M.loc)) // stops inventory actions in a mech
return
- if(!. && !M.incapacitated() && loc == M && istype(over_object, /obj/screen/inventory/hand))
- var/obj/screen/inventory/hand/H = over_object
+ if(!. && !M.incapacitated() && loc == M && istype(over_object, /atom/movable/screen/inventory/hand))
+ var/atom/movable/screen/inventory/hand/H = over_object
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
add_fingerprint(usr)
diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm
index 86468a0269..8c8400a45d 100644
--- a/code/modules/clothing/gloves/miscellaneous.dm
+++ b/code/modules/clothing/gloves/miscellaneous.dm
@@ -236,10 +236,9 @@
parry_efficiency_considered_successful = 0.01
parry_efficiency_to_counterattack = INFINITY // no auto counter
parry_max_attacks = INFINITY
- parry_failed_cooldown_duration = 2.25 SECONDS
- parry_failed_stagger_duration = 2.25 SECONDS
+ parry_failed_cooldown_duration = 1.5 SECONDS
+ parry_failed_stagger_duration = 1.5 SECONDS
parry_cooldown = 0
- parry_failed_clickcd_duration = 0
/obj/item/clothing/gloves/fingerless/pugilist/mauler
name = "mauler gauntlets"
diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm
index 124ece8fdc..fd181779f1 100644
--- a/code/modules/clothing/head/misc.dm
+++ b/code/modules/clothing/head/misc.dm
@@ -482,3 +482,9 @@
icon_state = "kabuto"
item_state = "kabuto"
flags_inv = HIDEHAIR|HIDEEARS
+
+/obj/item/clothing/head/human_leather
+ name = "human skin hat"
+ desc = "This will scare them. All will know my power."
+ icon_state = "human_leather"
+ item_state = "human_leather"
diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm
index 49256b490d..7a1e6b14f3 100644
--- a/code/modules/clothing/shoes/_shoes.dm
+++ b/code/modules/clothing/shoes/_shoes.dm
@@ -27,7 +27,7 @@
///How long it takes to lace/unlace these shoes
var/lace_time = 5 SECONDS
///any alerts we have active
- var/obj/screen/alert/our_alert
+ var/atom/movable/screen/alert/our_alert
/obj/item/clothing/shoes/ComponentInitialize()
. = ..()
@@ -93,7 +93,7 @@
user.update_inv_shoes()
equipped_before_drop = TRUE
if(can_be_tied && tied == SHOES_UNTIED)
- our_alert = user.throw_alert("shoealert", /obj/screen/alert/shoes/untied)
+ our_alert = user.throw_alert("shoealert", /atom/movable/screen/alert/shoes/untied)
RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/check_trip, override=TRUE)
/obj/item/clothing/shoes/proc/restore_offsets(mob/user)
@@ -150,7 +150,7 @@
UnregisterSignal(src, COMSIG_SHOES_STEP_ACTION)
else
if(tied == SHOES_UNTIED && our_guy && user == our_guy)
- our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/untied) // if we're the ones unknotting our own laces, of course we know they're untied
+ our_alert = our_guy.throw_alert("shoealert", /atom/movable/screen/alert/shoes/untied) // if we're the ones unknotting our own laces, of course we know they're untied
RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/check_trip, override=TRUE)
/**
@@ -233,7 +233,7 @@
our_guy.Knockdown(10)
our_guy.visible_message("[our_guy] trips on [our_guy.p_their()] knotted shoelaces and falls! What a klutz!", "You trip on your knotted shoelaces and fall over!")
SEND_SIGNAL(our_guy, COMSIG_ADD_MOOD_EVENT, "trip", /datum/mood_event/tripped) // well we realized they're knotted now!
- our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/knotted)
+ our_alert = our_guy.throw_alert("shoealert", /atom/movable/screen/alert/shoes/knotted)
else if(tied == SHOES_UNTIED)
var/wiser = TRUE // did we stumble and realize our laces are undone?
@@ -263,7 +263,7 @@
wiser = FALSE
if(wiser)
SEND_SIGNAL(our_guy, COMSIG_ADD_MOOD_EVENT, "untied", /datum/mood_event/untied) // well we realized they're untied now!
- our_alert = our_guy.throw_alert("shoealert", /obj/screen/alert/shoes/untied)
+ our_alert = our_guy.throw_alert("shoealert", /atom/movable/screen/alert/shoes/untied)
/obj/item/clothing/shoes/on_attack_hand(mob/living/user, act_intent, unarmed_attack_flags)
diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm
index 57659a70c4..6642731d8b 100644
--- a/code/modules/clothing/spacesuits/chronosuit.dm
+++ b/code/modules/clothing/spacesuits/chronosuit.dm
@@ -238,7 +238,7 @@
var/mob/holder = null
var/phase_time = 0
var/phase_time_length = 3
- var/obj/screen/chronos_target/target_ui = null
+ var/atom/movable/screen/chronos_target/target_ui = null
var/obj/item/clothing/suit/space/chronos/chronosuit
/obj/effect/chronos_cam/singularity_act()
@@ -299,13 +299,13 @@
holder.unset_machine()
return ..()
-/obj/screen/chronos_target
+/atom/movable/screen/chronos_target
name = "target display"
screen_loc = "CENTER,CENTER"
color = "#ff3311"
blend_mode = BLEND_SUBTRACT
-/obj/screen/chronos_target/New(loc, var/mob/living/carbon/human/user)
+/atom/movable/screen/chronos_target/New(loc, var/mob/living/carbon/human/user)
if(user)
var/icon/user_icon = getFlatIcon(user)
icon = user_icon
diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm
index b56f689979..a58b218c1a 100644
--- a/code/modules/clothing/suits/cloaks.dm
+++ b/code/modules/clothing/suits/cloaks.dm
@@ -103,14 +103,14 @@
. = ..()
AddElement(/datum/element/polychromic, poly_colors, 3)
-/obj/item/clothing/neck/cancloak/polychromic
+/obj/item/clothing/neck/cloak/cancloak/polychromic
name = "canvas cloak"
desc = "A rugged cloak made of canvas."
icon_state = "cancloak"
item_state = "cloak"
var/list/poly_colors = list("#585858", "#373737", "#BEBEBE")
-/obj/item/clothing/neck/cancloak/polychromic/ComponentInitialize()
+/obj/item/clothing/neck/cloak/cancloak/polychromic/ComponentInitialize()
. = ..()
AddElement(/datum/element/polychromic, poly_colors, 3)
diff --git a/code/modules/clothing/under/costume.dm b/code/modules/clothing/under/costume.dm
index 60d82292ef..4e5be1306c 100644
--- a/code/modules/clothing/under/costume.dm
+++ b/code/modules/clothing/under/costume.dm
@@ -280,23 +280,21 @@
item_state = "qipao"
body_parts_covered = CHEST|GROIN
can_adjust = FALSE
+ fitted = FEMALE_UNIFORM_TOP
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_NO_ANTHRO_ICON
+
/obj/item/clothing/under/costume/qipao/white
name = "White Qipao"
desc = "A Qipao, traditionally worn in ancient Earth China by women during social events and lunar new years. This one is white."
icon_state = "qipao_white"
item_state = "qipao_white"
- body_parts_covered = CHEST|GROIN
- can_adjust = FALSE
/obj/item/clothing/under/costume/qipao/red
name = "Red Qipao"
desc = "A Qipao, traditionally worn in ancient Earth China by women during social events and lunar new years. This one is red."
icon_state = "qipao_red"
item_state = "qipao_red"
- body_parts_covered = CHEST|GROIN
- can_adjust = FALSE
/obj/item/clothing/under/costume/cheongsam
name = "Black Cheongsam"
@@ -332,9 +330,11 @@
/obj/item/clothing/under/costume/kimono
name = "Kimono"
- desc = "A traditional piece of clothing from japan"
+ desc = "A traditional piece of clothing from Japan."
icon_state = "kimono"
item_state = "kimono"
+ fitted = FEMALE_UNIFORM_TOP
+ can_adjust = FALSE
/obj/item/clothing/under/costume/kimono/black
name = "Black Kimono"
diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm
index e01ceba0bf..4dac5f1961 100644
--- a/code/modules/clothing/under/miscellaneous.dm
+++ b/code/modules/clothing/under/miscellaneous.dm
@@ -319,37 +319,46 @@
/obj/item/clothing/under/misc/black_dress
name = "little black dress"
- desc = "A small black dress"
+ desc = "A small black dress."
icon_state = "littleblackdress_s"
item_state = "littleblackdress_s"
+ fitted = FEMALE_UNIFORM_TOP
+ can_adjust = FALSE
/obj/item/clothing/under/misc/pinktutu
name = "pink tutu"
- desc = "A pink tutu"
+ desc = "A pink tutu."
icon_state = "pinktutu_s"
item_state = "pinktutu_s"
+ fitted = FEMALE_UNIFORM_TOP
+ can_adjust = FALSE
/obj/item/clothing/under/misc/bathrobe
name = "bathrobe"
desc = "A blue bathrobe."
icon_state = "bathrobe"
item_state = "bathrobe"
+ fitted = FEMALE_UNIFORM_TOP
+ can_adjust = FALSE
/obj/item/clothing/under/misc/mechsuitred
name = "red mech suit"
desc = "What are you, stupid?"
icon_state = "red_mech_suit"
item_state = "red_mech_suit"
+ can_adjust = FALSE
/obj/item/clothing/under/misc/mechsuitwhite
name = "white mech suit"
desc = "...Mom?"
icon_state = "white_mech_suit"
item_state = "white_mech_suit"
+ can_adjust = FALSE
/obj/item/clothing/under/misc/mechsuitblue
name = "blue mech suit"
desc = "Get in the damn robot already!"
icon_state = "blue_mech_suit"
item_state = "blue_mech_suit"
+ can_adjust = FALSE
diff --git a/code/modules/events/cat_surgeon.dm b/code/modules/events/cat_surgeon.dm
index d968e5e1f8..2d5651b9b1 100644
--- a/code/modules/events/cat_surgeon.dm
+++ b/code/modules/events/cat_surgeon.dm
@@ -2,8 +2,11 @@
name = "Cat Surgeon"
typepath = /datum/round_event/cat_surgeon
max_occurrences = 1
- weight = 10
+ weight = 8
+/datum/round_event/cat_surgeon/announce(fake)
+ priority_announce("One of our... ahem... 'special' cases has escaped. As it happens their last known location before their tracker went dead is your station so keep an eye out for them. On an unrelated note, has anyone seen our cats?",
+ sender_override = "Nanotrasen Psych Ward")
/datum/round_event/cat_surgeon/start()
var/list/spawn_locs = list()
@@ -16,7 +19,7 @@
var/turf/T = get_turf(pick(spawn_locs))
var/mob/living/simple_animal/hostile/cat_butcherer/S = new(T)
- playsound(S, 'sound/misc/catscream.ogg', 50, 1, -1)
+ playsound(S, 'sound/misc/catscream.ogg', 75, 1, -1)
message_admins("A cat surgeon has been spawned at [COORD(T)][ADMIN_JMP(T)]")
log_game("A cat surgeon has been spawned at [COORD(T)]")
return SUCCESSFUL_SPAWN
diff --git a/code/modules/events/portal_storm.dm b/code/modules/events/portal_storm.dm
index 5ef30d0030..59bb22e9af 100644
--- a/code/modules/events/portal_storm.dm
+++ b/code/modules/events/portal_storm.dm
@@ -56,7 +56,10 @@
next_boss_spawn = startWhen + CEILING(2 * number_of_hostiles / number_of_bosses, 1)
/datum/round_event/portal_storm/announce(fake)
- set waitfor = 0
+ do_announce()
+
+/datum/round_event/portal_storm/proc/do_announce()
+ set waitfor = FALSE
sound_to_playing_players('sound/magic/lightning_chargeup.ogg')
sleep(80)
priority_announce("Massive bluespace anomaly detected en route to [station_name()]. Brace for impact.")
diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm
index ba14a5307f..d90792c88f 100644
--- a/code/modules/events/sentience.dm
+++ b/code/modules/events/sentience.dm
@@ -37,7 +37,7 @@
continue
if(L.mob_biotypes & blacklisted_biotypes) //hey can you don't
continue
- if(!(L in GLOB.player_list) && !L.mind)
+ if(!(L in GLOB.player_list) && !L.mind && !L.incapacitated())
potential += L
if(!potential.len)
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index c8679447b8..6fcaa5e6b0 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -171,7 +171,7 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
- GM.set_moles(/datum/gas/oxygen, max(GM.get_moles(/datum/gas/oxygen) - severity * holder.energy, 0))
+ GM.set_moles(GAS_O2, max(GM.get_moles(GAS_O2) - severity * holder.energy, 0))
/datum/spacevine_mutation/nitro_eater
name = "nitrogen consuming"
@@ -183,7 +183,7 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
- GM.set_moles(/datum/gas/nitrogen, max(GM.get_moles(/datum/gas/nitrogen) - severity * holder.energy, 0))
+ GM.set_moles(GAS_N2, max(GM.get_moles(GAS_N2) - severity * holder.energy, 0))
/datum/spacevine_mutation/carbondioxide_eater
name = "CO2 consuming"
@@ -195,7 +195,7 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
- GM.set_moles(/datum/gas/carbon_dioxide, max(GM.get_moles(/datum/gas/carbon_dioxide) - severity * holder.energy, 0))
+ GM.set_moles(GAS_CO2, max(GM.get_moles(GAS_CO2) - severity * holder.energy, 0))
/datum/spacevine_mutation/plasma_eater
name = "toxins consuming"
@@ -207,7 +207,7 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
- GM.set_moles(/datum/gas/plasma, max(GM.get_moles(/datum/gas/plasma) - severity * holder.energy, 0))
+ GM.set_moles(GAS_PLASMA, max(GM.get_moles(GAS_PLASMA) - severity * holder.energy, 0))
/datum/spacevine_mutation/thorns
name = "thorny"
diff --git a/code/modules/events/supernova.dm b/code/modules/events/supernova.dm
index ca64984cde..e1d6991c89 100644
--- a/code/modules/events/supernova.dm
+++ b/code/modules/events/supernova.dm
@@ -12,6 +12,7 @@
var/power = 1
var/datum/sun/supernova
var/storm_count = 0
+ var/announced = FALSE
/datum/round_event/supernova/setup()
announceWhen = rand(4, 60)
@@ -30,9 +31,10 @@
supernova.power_mod = 0
/datum/round_event/supernova/announce()
- var/message = "[station_name()]: Our tachyon-doppler array has detected a supernova in your vicinity. Peak flux from the supernova estimated to be [round(power,0.1)] times current solar flux; if the supernova is close to your sun in the sky, your solars may receive this as a power boost.[power > 1 ? " Short burts of radiation may be possible, so please prepare accordingly." : ""] We hope you enjoy the light."
+ var/message = "[station_name()]: Our tachyon-doppler array has detected a supernova in your vicinity. Peak flux from the supernova estimated to be [round(power,0.1)] times current solar flux; if the supernova is close to your sun in the sky, your solars may receive this as a power boost.[power > 1 ? " Short burts of radiation may be possible, so please prepare accordingly." : "We expect no radiation bursts from this one."] We hope you enjoy the light."
if(prob(power * 25))
priority_announce(message, sender_override = "Nanotrasen Meteorology Division")
+ announced = TRUE
else
print_command_report(message)
@@ -56,15 +58,16 @@
supernova.power_mod = min(supernova.power_mod*1.2, power)
if(activeFor > endWhen-10)
supernova.power_mod /= 4
- if(prob(round(supernova.power_mod*2)) && prob(3) && storm_count < 5 && !SSweather.get_weather_by_type(/datum/weather/rad_storm))
+ if(prob(round(supernova.power_mod)) && prob(3) && storm_count < 5 && !SSweather.get_weather_by_type(/datum/weather/rad_storm))
SSweather.run_weather(/datum/weather/rad_storm/supernova)
storm_count++
/datum/round_event/supernova/end()
SSsun.suns -= supernova
qdel(supernova)
- priority_announce("The supernova's flux is now negligible. Radiation storms have ceased. Have a pleasant shift, [station_name()], and thank you for bearing with nature.",
- sender_override = "Nanotrasen Meteorology Division")
+ if(announced)
+ priority_announce("The supernova's flux is now negligible. Radiation storms have ceased. Have a pleasant shift, [station_name()], and thank you for bearing with nature.",
+ sender_override = "Nanotrasen Meteorology Division")
/datum/weather/rad_storm/supernova
weather_duration_lower = 50
diff --git a/code/modules/events/wizard/fakeexplosion.dm b/code/modules/events/wizard/fakeexplosion.dm
index 5858064819..3ba20f4768 100644
--- a/code/modules/events/wizard/fakeexplosion.dm
+++ b/code/modules/events/wizard/fakeexplosion.dm
@@ -7,5 +7,4 @@
/datum/round_event/wizard/fake_explosion/start()
sound_to_playing_players('sound/machines/alarm.ogg')
- sleep(100)
- Cinematic(CINEMATIC_NUKE_FAKE,world)
+ addtimer(CALLBACK(GLOBAL_PROC,.proc/Cinematic, CINEMATIC_NUKE_FAKE, world), 100)
diff --git a/code/modules/fields/fields.dm b/code/modules/fields/fields.dm
index cb8d3e8dcf..8c7b414996 100644
--- a/code/modules/fields/fields.dm
+++ b/code/modules/fields/fields.dm
@@ -64,7 +64,8 @@
pass = FALSE
return pass
-/datum/proximity_monitor/advanced/process()
+/datum/proximity_monitor/advanced/proc/lag_checked_process()
+ set waitfor = FALSE
if(process_inner_turfs)
for(var/turf/T in field_turfs)
process_inner_turf(T)
@@ -72,7 +73,10 @@
if(process_edge_turfs)
for(var/turf/T in edge_turfs)
process_edge_turf(T)
- CHECK_TICK //Same here.
+ CHECK_TICK //Same here.
+
+/datum/proximity_monitor/advanced/process()
+ lag_checked_process()
/datum/proximity_monitor/advanced/proc/process_inner_turf(turf/T)
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index cc18207a29..adbf48470d 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -31,7 +31,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
if(!hallucination)
return
- hallucination--
+ hallucination = max(hallucination-1, 0)
if(world.time < next_hallucination)
return
@@ -933,46 +933,46 @@ GLOBAL_LIST_INIT(hallucination_list, list(
feedback_details += "Type: [alert_type]"
switch(alert_type)
if("not_enough_oxy")
- target.throw_alert(alert_type, /obj/screen/alert/not_enough_oxy, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/not_enough_oxy, override = TRUE)
if("not_enough_tox")
- target.throw_alert(alert_type, /obj/screen/alert/not_enough_tox, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/not_enough_tox, override = TRUE)
if("not_enough_co2")
- target.throw_alert(alert_type, /obj/screen/alert/not_enough_co2, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/not_enough_co2, override = TRUE)
if("too_much_oxy")
- target.throw_alert(alert_type, /obj/screen/alert/too_much_oxy, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/too_much_oxy, override = TRUE)
if("too_much_co2")
- target.throw_alert(alert_type, /obj/screen/alert/too_much_co2, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/too_much_co2, override = TRUE)
if("too_much_tox")
- target.throw_alert(alert_type, /obj/screen/alert/too_much_tox, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/too_much_tox, override = TRUE)
if("nutrition")
if(prob(50))
- target.throw_alert(alert_type, /obj/screen/alert/fat, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/fat, override = TRUE)
else
- target.throw_alert(alert_type, /obj/screen/alert/starving, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/starving, override = TRUE)
if("gravity")
- target.throw_alert(alert_type, /obj/screen/alert/weightless, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/weightless, override = TRUE)
if("fire")
- target.throw_alert(alert_type, /obj/screen/alert/fire, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/fire, override = TRUE)
if("temphot")
alert_type = "temp"
- target.throw_alert(alert_type, /obj/screen/alert/hot, 3, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/hot, 3, override = TRUE)
if("tempcold")
alert_type = "temp"
- target.throw_alert(alert_type, /obj/screen/alert/cold, 3, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/cold, 3, override = TRUE)
if("pressure")
if(prob(50))
- target.throw_alert(alert_type, /obj/screen/alert/highpressure, 2, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/highpressure, 2, override = TRUE)
else
- target.throw_alert(alert_type, /obj/screen/alert/lowpressure, 2, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/lowpressure, 2, override = TRUE)
//BEEP BOOP I AM A ROBOT
if("newlaw")
- target.throw_alert(alert_type, /obj/screen/alert/newlaw, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/newlaw, override = TRUE)
if("locked")
- target.throw_alert(alert_type, /obj/screen/alert/locked, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/locked, override = TRUE)
if("hacked")
- target.throw_alert(alert_type, /obj/screen/alert/hacked, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/hacked, override = TRUE)
if("charge")
- target.throw_alert(alert_type, /obj/screen/alert/emptycell, override = TRUE)
+ target.throw_alert(alert_type, /atom/movable/screen/alert/emptycell, override = TRUE)
sleep(duration)
target.clear_alert(alert_type, clear_override = TRUE)
qdel(src)
@@ -1181,7 +1181,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
if(target.client)
target.client.images += fire_overlay
to_chat(target, "You're set on fire!")
- target.throw_alert("fire", /obj/screen/alert/fire, override = TRUE)
+ target.throw_alert("fire", /atom/movable/screen/alert/fire, override = TRUE)
sleep(20)
for(var/i in 1 to 3)
if(target.fire_stacks <= 0)
@@ -1203,7 +1203,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
target.clear_alert("temp", clear_override = TRUE)
else
target.clear_alert("temp", clear_override = TRUE)
- target.throw_alert("temp", /obj/screen/alert/hot, stage, override = TRUE)
+ target.throw_alert("temp", /atom/movable/screen/alert/hot, stage, override = TRUE)
/datum/hallucination/fire/proc/clear_fire()
if(!active)
diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm
index 7377913c15..f650a935ea 100644
--- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm
+++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm
@@ -497,6 +497,72 @@
/obj/item/reagent_containers/food/drinks/bottle/grenadine/empty
list_reagents = null
+/obj/item/reagent_containers/food/drinks/bottle/blank //Don't let players print these from a lathe, bottles should be obtained in mass from the bar only.
+ name = "glass bottle"
+ desc = "This blank bottle is unyieldingly anonymous, offering no clues to it's contents."
+ icon_state = "glassbottle"
+ volume = 90
+ spillable = TRUE
+ obj_flags = UNIQUE_RENAME
+
+/obj/item/reagent_containers/food/drinks/bottle/blank/update_icon()
+ ..()
+ add_overlay("[initial(icon_state)]shine")
+
+/obj/item/reagent_containers/food/drinks/bottle/blank/Initialize()
+ . = ..()
+ update_icon()
+
+/obj/item/reagent_containers/food/drinks/bottle/blank/get_part_rating()
+ return reagents.maximum_volume
+
+/obj/item/reagent_containers/food/drinks/bottle/blank/on_reagent_change(changetype)
+ update_icon()
+
+/obj/item/reagent_containers/food/drinks/bottle/blank/update_overlays()
+ . = ..()
+ if(!cached_icon)
+ cached_icon = icon_state
+
+ if(reagents.total_volume)
+ var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[cached_icon]10", color = mix_color_from_reagents(reagents.reagent_list))
+
+ var/percent = round((reagents.total_volume / volume) * 100)
+ switch(percent)
+ if(0 to 9)
+ filling.icon_state = "[cached_icon]0"
+ if(10 to 19)
+ filling.icon_state = "[cached_icon]10"
+ if(20 to 29)
+ filling.icon_state = "[cached_icon]20"
+ if(30 to 39)
+ filling.icon_state = "[cached_icon]30"
+ if(40 to 49)
+ filling.icon_state = "[cached_icon]40"
+ if(50 to 59)
+ filling.icon_state = "[cached_icon]50"
+ if(60 to 69)
+ filling.icon_state = "[cached_icon]60"
+ if(70 to 79)
+ filling.icon_state = "[cached_icon]70"
+ if(80 to 89)
+ filling.icon_state = "[cached_icon]80"
+ if(90 to INFINITY)
+ filling.icon_state = "[cached_icon]90"
+ . += filling
+
+/obj/item/reagent_containers/food/drinks/bottle/blank/small
+ name = "small glass bottle"
+ desc = "This small bottle is unyieldingly anonymous, offering no clues to it's contents."
+ icon_state = "glassbottlesmall"
+ volume = 60
+
+/obj/item/reagent_containers/food/drinks/bottle/blank/pitcher
+ name = "glass pitcher"
+ desc = "This is a pitcher for large amounts of liquid of any kind."
+ icon_state = "unipitcher"
+ volume = 120
+
////////////////////////// MOLOTOV ///////////////////////
/obj/item/reagent_containers/food/drinks/bottle/molotov
name = "molotov cocktail"
diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm
index 0e2bdc63c8..42f536c4f3 100644
--- a/code/modules/food_and_drinks/food/customizables.dm
+++ b/code/modules/food_and_drinks/food/customizables.dm
@@ -66,7 +66,7 @@
. = ..()
-/obj/item/reagent_containers/food/snacks/customizable/proc/update_name(obj/item/reagent_containers/food/snacks/S)
+/obj/item/reagent_containers/food/snacks/customizable/update_name(obj/item/reagent_containers/food/snacks/S)
for(var/obj/item/I in ingredients)
if(!istype(S, I.type))
customname = "custom"
diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
index f97ef17364..58769cebf1 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
@@ -59,6 +59,10 @@
else
icon_state = "[initial(icon_state)]-off"
+/obj/machinery/smartfridge/update_overlays()
+ . = ..()
+ if(!stat)
+ . += emissive_appearance(icon, "smartfridge-light-mask", alpha = src.alpha)
/*******************
@@ -468,7 +472,7 @@
/obj/item/reagent_containers/medspray/sterilizine = 1)
/obj/machinery/smartfridge/organ/preloaded/Initialize()
- ..()
+ . = ..()
var/list = list(/obj/item/organ/tongue, /obj/item/organ/brain, /obj/item/organ/heart, /obj/item/organ/liver, /obj/item/organ/ears, /obj/item/organ/eyes, /obj/item/organ/tail, /obj/item/organ/stomach)
var/newtype = pick(list)
load(new newtype(src.loc))
diff --git a/code/modules/holiday/halloween/jacqueen.dm b/code/modules/holiday/halloween/jacqueen.dm
index 11bd330112..ed7453ad3e 100644
--- a/code/modules/holiday/halloween/jacqueen.dm
+++ b/code/modules/holiday/halloween/jacqueen.dm
@@ -57,7 +57,7 @@
/obj/mafia_game_board,
/obj/docking_port,
/obj/shapeshift_holder,
- /obj/screen
+ /atom/movable/screen
))
/mob/living/simple_animal/jacq/Initialize()
diff --git a/code/modules/holodeck/area_copy.dm b/code/modules/holodeck/area_copy.dm
index cb9965d34a..738d10665a 100644
--- a/code/modules/holodeck/area_copy.dm
+++ b/code/modules/holodeck/area_copy.dm
@@ -139,7 +139,6 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars_by_type, typecacheof_assoc_list(list(
if(toupdate.len)
for(var/turf/T1 in toupdate)
CALCULATE_ADJACENT_TURFS(T1)
- SSair.add_to_active(T1,1)
return copiedobjs
diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm
index 09dcd7fa64..c37ccf657b 100644
--- a/code/modules/holodeck/holo_effect.dm
+++ b/code/modules/holodeck/holo_effect.dm
@@ -61,7 +61,7 @@
var/datum/effect_system/spark_spread/s = new
s.set_up(3, 1, T)
s.start()
- T.temperature = 5000
+ T.set_temperature(5000)
T.hotspot_expose(50000, 50000, TRUE, TRUE)
diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm
index 76e36a1725..3d6b90eb2d 100644
--- a/code/modules/hydroponics/fermenting_barrel.dm
+++ b/code/modules/hydroponics/fermenting_barrel.dm
@@ -73,3 +73,40 @@
icon_state = "barrel_open"
else
icon_state = "barrel"
+
+/obj/structure/custom_keg
+ name = "Plasteel Keg"
+ desc = "A large plasteel keg. You can use it to hold liquids. You may wanna label this, too."
+ icon = 'icons/obj/objects.dmi'
+ icon_state = "keg"
+ density = TRUE
+ anchored = FALSE
+ pressure_resistance = 2 * ONE_ATMOSPHERE
+ max_integrity = 300
+ var/open = FALSE
+
+/obj/structure/custom_keg/Initialize()
+ create_reagents(1000, DRAINABLE | AMOUNT_VISIBLE)
+ . = ..()
+
+/obj/structure/custom_keg/examine(mob/user)
+ . = ..()
+ . += "It is currently [open?"open, letting you pour liquids in.":"closed, letting you draw liquids from the tap."]"
+
+/obj/structure/custom_keg/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
+ open = !open
+ if(open)
+ DISABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
+ ENABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
+ to_chat(user, "You open [src], letting you fill it.")
+ else
+ DISABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
+ ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
+ to_chat(user, "You close [src], letting you draw from its tap.")
+ update_icon()
+
+/obj/structure/custom_keg/update_icon_state()
+ if(open)
+ icon_state = "keg_open"
+ else
+ icon_state = "keg"
diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm
index a0c273613f..a6ba5ec461 100644
--- a/code/modules/hydroponics/gene_modder.dm
+++ b/code/modules/hydroponics/gene_modder.dm
@@ -430,7 +430,7 @@
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
-/obj/item/disk/plantgene/proc/update_name()
+/obj/item/disk/plantgene/update_name()
if(gene)
name = "[gene.get_name()] (plant data disk)"
else
diff --git a/code/modules/hydroponics/grown/misc.dm b/code/modules/hydroponics/grown/misc.dm
index 74b5c19b88..733d973832 100644
--- a/code/modules/hydroponics/grown/misc.dm
+++ b/code/modules/hydroponics/grown/misc.dm
@@ -58,7 +58,7 @@
return
var/datum/gas_mixture/stank = new
- stank.adjust_moles(/datum/gas/miasma,(yield + 6)*7*0.02) // this process is only being called about 2/7 as much as corpses so this is 12-32 times a corpses
+ stank.adjust_moles(GAS_MIASMA,(yield + 6)*0.14) // 0.14 = 7*0.02, this process is only being called about 2/7 as much as corpses so this is 12-32 times a corpses
stank.set_temperature(T20C) // without this the room would eventually freeze and miasma mining would be easier
T.assume_air(stank)
T.air_update_turf()
diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm
index e6d2484632..c001d6cb3b 100644
--- a/code/modules/hydroponics/grown/mushrooms.dm
+++ b/code/modules/hydroponics/grown/mushrooms.dm
@@ -149,6 +149,7 @@
endurance = 30
maturation = 5
yield = 1
+ genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/trait/eyes)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
mutatelist = list()
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.05, /datum/reagent/consumable/nutriment = 0.15)
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index ecbfa7584b..9c82cf34d3 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -226,7 +226,7 @@
var/turf/open/O = loc
if(O.air)
var/datum/gas_mixture/loc_air = O.air
- if(loc_air.get_moles(/datum/gas/oxygen) > 13)
+ if(loc_air.get_moles(GAS_O2) > 13)
return TRUE
return FALSE
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index aca727ad8d..fa7decc437 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -391,6 +391,7 @@
mutate(4, 10, 2, 4, 50, 4, 10, 3)
/obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant!
+ set waitfor = FALSE
if(!myseed || dead)
return
diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm
index da19fa11f8..8485e20f61 100644
--- a/code/modules/hydroponics/plant_genes.dm
+++ b/code/modules/hydroponics/plant_genes.dm
@@ -419,6 +419,15 @@
else
to_chat(user, "You need five lengths of cable to make a [G] battery!")
+/datum/plant_gene/trait/eyes
+ name = "Oculary Mimicry"
+ /// Our googly eyes appearance.
+ var/mutable_appearance/googly
+
+/datum/plant_gene/trait/eyes/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc)
+ googly = mutable_appearance('icons/obj/hydroponics/harvest.dmi', "eyes")
+ googly.appearance_flags = RESET_COLOR
+ G.add_overlay(googly)
/datum/plant_gene/trait/stinging
name = "Hypodermic Prickles"
diff --git a/code/modules/integrated_electronics/subtypes/atmospherics.dm b/code/modules/integrated_electronics/subtypes/atmospherics.dm
index d449775bd1..b3056d46cf 100644
--- a/code/modules/integrated_electronics/subtypes/atmospherics.dm
+++ b/code/modules/integrated_electronics/subtypes/atmospherics.dm
@@ -19,7 +19,7 @@
/obj/item/integrated_circuit/atmospherics/Initialize()
air_contents = new(volume)
- ..()
+ return ..()
/obj/item/integrated_circuit/atmospherics/return_air()
return air_contents
@@ -131,11 +131,10 @@
var/pressure_delta = target_pressure - target_air.return_pressure()
if(pressure_delta > 0.1)
var/transfer_moles = (pressure_delta*target_air.return_volume()/(source_air.return_temperature() * R_IDEAL_GAS_EQUATION))*PUMP_EFFICIENCY
- var/datum/gas_mixture/removed = source_air.remove(transfer_moles)
if(istype(snowflake)) //Snowflake check for tanks specifically, because tank ruptures are handled in a very snowflakey way that expects all tank interactions to be handled via the tank's procs
- snowflake.assume_air(removed)
+ snowflake.assume_air_moles(source_air, transfer_moles)
else
- target_air.merge(removed)
+ source_air.transfer_to(target_air, transfer_moles)
// - volume pump - // **Works**
@@ -183,12 +182,10 @@
//The second part of the min caps the pressure built by the volume pumps to the max pump pressure
var/transfer_ratio = min(transfer_rate,target_air.return_volume()*PUMP_MAX_PRESSURE/source_air.return_pressure())/source_air.return_volume()
- var/datum/gas_mixture/removed = source_air.remove_ratio(transfer_ratio * PUMP_EFFICIENCY)
-
if(istype(snowflake))
- snowflake.assume_air(removed)
+ snowflake.assume_air_ratio(source_air, transfer_ratio * PUMP_EFFICIENCY)
else
- target_air.merge(removed)
+ source_air.transfer_ratio_to(target_air, transfer_ratio * PUMP_EFFICIENCY)
// - gas vent - // **works**
@@ -376,7 +373,7 @@
for(var/filtered_gas in removed.get_gases())
//Get the name of the gas and see if it is in the list
- if(GLOB.meta_gas_names[filtered_gas] in wanted)
+ if(GLOB.gas_data.names[filtered_gas] in wanted)
//The gas that is put in all the filtered out gases
filtered_out.set_temperature(removed.return_temperature())
filtered_out.set_moles(filtered_gas, removed.get_moles(filtered_gas))
@@ -468,16 +465,12 @@
var/snowflakecheck = istype(gas_output, /obj/item/tank)
- var/datum/gas_mixture/mix = source_1_gases.remove(transfer_moles * gas_percentage)
if(snowflakecheck)
- gas_output.assume_air(mix)
+ gas_output.assume_air_moles(source_1_gases, transfer_moles * gas_percentage)
+ gas_output.assume_air_moles(source_2_gases, transfer_moles * (1-gas_percentage))
else
- output_gases.merge(mix)
- mix = source_2_gases.remove(transfer_moles * (1-gas_percentage))
- if(snowflakecheck)
- gas_output.assume_air(mix)
- else
- output_gases.merge(mix)
+ source_1_gases.transfer_to(output_gases, transfer_moles * gas_percentage)
+ source_2_gases.transfer_to(output_gases, transfer_moles * (1-gas_percentage))
// - integrated tank - // **works**
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index 9abf5d86a0..f66931e253 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -1163,7 +1163,7 @@
var/list/gas_names = list()
var/list/gas_amounts = list()
for(var/id in air_contents.get_gases())
- var/name = GLOB.meta_gas_names[id]
+ var/name = GLOB.gas_data.names[id]
var/amt = round(air_contents.get_moles(id), 0.001)
gas_names.Add(name)
gas_amounts.Add(amt)
diff --git a/code/modules/integrated_electronics/subtypes/weaponized.dm b/code/modules/integrated_electronics/subtypes/weaponized.dm
index 25fa7058fb..54b14cccbc 100644
--- a/code/modules/integrated_electronics/subtypes/weaponized.dm
+++ b/code/modules/integrated_electronics/subtypes/weaponized.dm
@@ -292,10 +292,7 @@
if(!source_air || !target_air)
return
- var/datum/gas_mixture/removed = source_air.remove(gas_per_throw)
- if(!removed)
- return
- target_air.merge(removed)
+ source_air.transfer_to(target_air, gas_per_throw)
// If the item is in a grabber circuit we'll update the grabber's outputs after we've thrown it.
var/obj/item/integrated_circuit/manipulation/grabber/G = A.loc
diff --git a/code/modules/jobs/job_types/head_of_personnel.dm b/code/modules/jobs/job_types/head_of_personnel.dm
index f1b7d3e8c4..07c1a12ced 100644
--- a/code/modules/jobs/job_types/head_of_personnel.dm
+++ b/code/modules/jobs/job_types/head_of_personnel.dm
@@ -23,14 +23,14 @@
ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS,
ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE,
ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_HYDROPONICS, ACCESS_LAWYER,
- ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION,
- ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM)
+ ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_VAULT,
+ ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY)
minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS,
ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS,
ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE,
ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_HYDROPONICS, ACCESS_LAWYER,
- ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION,
- ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM)
+ ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_VAULT,
+ ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY)
paycheck = PAYCHECK_COMMAND
paycheck_department = ACCOUNT_SRV
diff --git a/code/modules/jobs/job_types/quartermaster.dm b/code/modules/jobs/job_types/quartermaster.dm
index 301acff5c4..ff811d30d1 100644
--- a/code/modules/jobs/job_types/quartermaster.dm
+++ b/code/modules/jobs/job_types/quartermaster.dm
@@ -25,7 +25,7 @@
minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING,
ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_KEYCARD_AUTH, ACCESS_RC_ANNOUNCE,
ACCESS_SEC_DOORS, ACCESS_HEADS)
- paycheck = PAYCHECK_HARD //They can already buy stuff using cargo budget, don't give em a command-level paycheck.
+ paycheck = PAYCHECK_HARD //They can already buy stuff using cargo budget, don't give em a command-level paycheck. //alright i'll agree to that -qweq
paycheck_department = ACCOUNT_CAR
display_order = JOB_DISPLAY_ORDER_QUARTERMASTER
diff --git a/code/modules/keybindings/keybind/mob.dm b/code/modules/keybindings/keybind/mob.dm
index 257ccc37e6..15911d831e 100644
--- a/code/modules/keybindings/keybind/mob.dm
+++ b/code/modules/keybindings/keybind/mob.dm
@@ -76,3 +76,15 @@
else
user.mob.dropItemToGround(I)
return TRUE
+
+/datum/keybinding/mob/examine_immediate
+ hotkey_keys = list()
+ classic_keys = list()
+ name = "examine_immediate"
+ full_name = "Examine (Immediate)"
+ description = "Immediately examine anything you're hovering your mouse over."
+
+/datum/keybinding/mob/examine_immediate/down(client/user)
+ var/atom/A = user.mouseObject
+ if(A)
+ A.attempt_examinate(user.mob)
diff --git a/code/modules/lighting/emissive_blocker.dm b/code/modules/lighting/emissive_blocker.dm
index 04c1bb7302..46dc44792b 100644
--- a/code/modules/lighting/emissive_blocker.dm
+++ b/code/modules/lighting/emissive_blocker.dm
@@ -7,9 +7,9 @@
* almost guaranteed to be doing something wrong.
*/
/atom/movable/emissive_blocker
- name = ""
- plane = EMISSIVE_BLOCKER_PLANE
- layer = EMISSIVE_BLOCKER_LAYER
+ name = "emissive blocker"
+ plane = EMISSIVE_PLANE
+ layer = FLOAT_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
rad_flags = RAD_NO_CONTAMINATE | RAD_PROTECT_CONTENTS
//Why?
@@ -23,6 +23,8 @@
verbs.Cut() //Cargo culting from lighting object, this maybe affects memory usage?
render_source = source
+ color = GLOB.em_block_color
+
/atom/movable/emissive_blocker/ex_act(severity)
return FALSE
diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm
index 71702bef12..f9df19d2ac 100644
--- a/code/modules/lighting/lighting_atom.dm
+++ b/code/modules/lighting/lighting_atom.dm
@@ -132,3 +132,54 @@
/mob/living/proc/mob_light(_color, _range, _power, _duration)
var/obj/effect/dummy/lighting_obj/moblight/mob_light_obj = new (src, _color, _range, _power, _duration)
return mob_light_obj
+
+// Setter for the light power of this atom.
+/atom/proc/set_light_power(new_power)
+ if(new_power == light_power)
+ return
+ if(SEND_SIGNAL(src, COMSIG_ATOM_SET_LIGHT_POWER, new_power) & COMPONENT_BLOCK_LIGHT_UPDATE)
+ return
+ . = light_power
+ light_power = new_power
+ SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_LIGHT_POWER, .)
+
+/// Setter for the light range of this atom.
+/atom/proc/set_light_range(new_range)
+ if(new_range == light_range)
+ return
+ if(SEND_SIGNAL(src, COMSIG_ATOM_SET_LIGHT_RANGE, new_range) & COMPONENT_BLOCK_LIGHT_UPDATE)
+ return
+ . = light_range
+ light_range = new_range
+ SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_LIGHT_RANGE, .)
+
+/// Setter for the light color of this atom.
+/atom/proc/set_light_color(new_color)
+ if(new_color == light_color)
+ return
+ if(SEND_SIGNAL(src, COMSIG_ATOM_SET_LIGHT_COLOR, new_color) & COMPONENT_BLOCK_LIGHT_UPDATE)
+ return
+ . = light_color
+ light_color = new_color
+ SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_LIGHT_COLOR, .)
+/*
+/// Setter for whether or not this atom's light is on.
+/atom/proc/set_light_on(new_value)
+ if(new_value == )
+ return
+ if(SEND_SIGNAL(src, COMSIG_ATOM_SET_LIGHT_ON, new_value) & COMPONENT_BLOCK_LIGHT_UPDATE)
+ return
+ . = light_on
+ light_on = new_value
+ SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_LIGHT_ON, .)
+
+/// Setter for the light flags of this atom.
+/atom/proc/set_light_flags(new_value)
+ if(new_value == light_flags)
+ return
+ if(SEND_SIGNAL(src, COMSIG_ATOM_SET_LIGHT_FLAGS, new_value) & COMPONENT_BLOCK_LIGHT_UPDATE)
+ return
+ . = light_flags
+ light_flags = new_value
+ SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_LIGHT_FLAGS, .)
+*/
diff --git a/code/modules/mapping/map_template.dm b/code/modules/mapping/map_template.dm
index cc3bfc201e..c7bbef44c9 100644
--- a/code/modules/mapping/map_template.dm
+++ b/code/modules/mapping/map_template.dm
@@ -152,7 +152,6 @@
locate(min(T.x + width + 1, world.maxx), min(T.y + height + 1, world.maxy), T.z))
for(var/i in border)
var/turf/turf_to_disable = i
- SSair.remove_from_active(turf_to_disable) //stop processing turfs along the border to prevent runtimes, we return it in initTemplateBounds()
turf_to_disable.atmos_adjacent_turfs?.Cut()
if(annihilate == MAP_TEMPLATE_ANNIHILATE_PRELOAD)
diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm
index 859ea58d26..ddec9232ce 100644
--- a/code/modules/mining/equipment/kinetic_crusher.dm
+++ b/code/modules/mining/equipment/kinetic_crusher.dm
@@ -196,7 +196,6 @@
parry_imperfect_falloff_percent = 20
parry_efficiency_to_counterattack = 100 // perfect parry or you're cringe
parry_failed_stagger_duration = 1.5 SECONDS // a good time to reconsider your actions...
- parry_failed_clickcd_duration = 1.5 SECONDS // or your failures
/obj/item/kinetic_crusher/glaive/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time) // if you're dumb enough to go for a parry...
var/turf/proj_turf = owner.loc // destabilizer bolt, ignoring cooldown
diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm
index f780d889ea..2452beb0e1 100644
--- a/code/modules/mining/equipment/survival_pod.dm
+++ b/code/modules/mining/equipment/survival_pod.dm
@@ -89,6 +89,11 @@
name = "large empty capsule"
desc = "An extremly large capsule which requires power. Useful for projects all over."
template_id = "shelter_delta"
+
+/obj/item/survivalcapsule/luxury/penthouse
+ name = "penthouse bluespace sheler capsule"
+ desc = "The absolute pinnacle of luxury in terms of survival capsules. While exuberantly expensive it has everything needed to make a small home in lavaland."
+ template_id = "shelter_epsilon"
//Pod objects
//Window
@@ -307,7 +312,7 @@
/obj/item/energy_katana,
/obj/item/hierophant_club,
/obj/item/his_grace,
- /obj/item/gun/ballistic/minigun,
+ /obj/item/gun/energy/minigun,
/obj/item/gun/ballistic/automatic/l6_saw,
/obj/item/gun/magic/staff/chaos,
/obj/item/gun/magic/staff/spellblade,
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index a915a89c73..e64505df7e 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -61,37 +61,32 @@
new /obj/item/guardiancreator(src)
/obj/structure/closet/crate/necropolis/tendril/weapon_armor/PopulateContents()
- var/loot = rand(1,11)
+ var/loot = rand(1,10)
switch(loot)
if(1)
new /obj/item/clothing/suit/space/hardsuit/cult(src)
if(2)
new /obj/item/katana/lavaland(src)
if(3)
- if(prob(50))
- new /obj/item/disk/design_disk/modkit_disc/resonator_blast(src)
- else
- new /obj/item/disk/design_disk/modkit_disc/rapid_repeater(src)
- if(4)
new /obj/item/clothing/suit/space/hardsuit/ert/paranormal/beserker/old(src)
- if(5)
+ if(4)
new /obj/item/nullrod/scythe/talking(src)
- if(6)
+ if(5)
new /obj/item/nullrod/armblade(src)
- if(7)
+ if(6)
new /obj/item/reagent_containers/food/drinks/bottle/holywater/hell(src)
new /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor/old(src)
- if(8)
+ if(7)
new /obj/item/grenade/clusterbuster/inferno(src)
- if(9)
+ if(8)
new /obj/item/gun/magic/wand/book/shock(src)
- if(10)
+ if(9)
new /obj/item/gun/magic/wand/book/page(src)
- if(11)
+ if(10)
new /obj/item/gun/magic/wand/book/spark(src)
/obj/structure/closet/crate/necropolis/tendril/misc/PopulateContents()
- var/loot = rand(1,14)
+ var/loot = rand(1,12)
switch(loot)
if(1)
new /obj/item/shared_storage/red(src)
@@ -106,31 +101,21 @@
if(6)
new /obj/item/jacobs_ladder(src)
if(7)
- if(prob(50))
- new /obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe(src)
- else
- new /obj/item/disk/design_disk/modkit_disc/bounty(src)
- if(8)
new /obj/item/wisp_lantern(src)
- if(9)
+ if(8)
new /obj/item/pickaxe/rosegold(src)
- if(10)
+ if(9)
new /obj/item/bedsheet/cosmos(src)
new /obj/item/melee/skateboard/hoverboard(src)
- if(11)
+ if(10)
new /obj/item/disk/tech_disk/illegal(src)
- if(12)
+ if(11)
new /obj/item/clothing/suit/space/hardsuit/cult(src)
- if(13)
+ if(12)
new /obj/item/katana/lavaland(src)
- if(14)
- if(prob(50))
- new /obj/item/disk/design_disk/modkit_disc/resonator_blast(src)
- else
- new /obj/item/disk/design_disk/modkit_disc/rapid_repeater(src)
/obj/structure/closet/crate/necropolis/tendril/all/PopulateContents()
- var/loot = rand(1,29)
+ var/loot = rand(1,28)
switch(loot)
if(1)
new /obj/item/shared_storage/red(src)
@@ -145,56 +130,51 @@
if(6)
new /obj/item/jacobs_ladder(src)
if(7)
- if(prob(50))
- new /obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe(src)
- else
- new /obj/item/disk/design_disk/modkit_disc/bounty(src)
- if(8)
new /obj/item/wisp_lantern(src)
- if(9)
+ if(8)
new /obj/item/pickaxe/rosegold(src)
- if(10)
+ if(9)
new /obj/item/bedsheet/cosmos(src)
new /obj/item/melee/skateboard/hoverboard(src)
- if(11)
+ if(10)
new /obj/item/disk/tech_disk/illegal(src)
- if(12)
+ if(11)
new /obj/item/clothing/suit/space/hardsuit/ert/paranormal/beserker/old(src)
- if(13)
+ if(12)
new /obj/item/nullrod/scythe/talking(src)
- if(14)
+ if(13)
new /obj/item/nullrod/armblade(src)
- if(15)
+ if(14)
new /obj/item/reagent_containers/food/drinks/bottle/holywater/hell(src)
new /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor/old(src)
- if(16)
+ if(15)
new /obj/item/grenade/clusterbuster/inferno(src)
- if(17)
+ if(16)
new /obj/item/gun/magic/wand/book/shock(src)
- if(18)
+ if(17)
new /obj/item/gun/magic/wand/book/page(src)
- if(19)
+ if(18)
new /obj/item/gun/magic/wand/book/spark(src)
- if(20)
+ if(19)
new /obj/item/soulstone/anybody(src)
- if(21)
+ if(20)
new /obj/item/rod_of_asclepius(src)
- if(22)
+ if(21)
new /obj/item/organ/heart/cursed/wizard(src)
- if(23)
+ if(22)
new /obj/item/book/granter/spell/summonitem(src)
- if(24)
+ if(23)
new /obj/item/borg/upgrade/modkit/lifesteal(src)
new /obj/item/bedsheet/cult(src)
- if(25)
+ if(24)
new /obj/item/clothing/neck/necklace/memento_mori(src)
- if(26)
+ if(25)
new /obj/item/warp_cube/red(src)
- if(27)
+ if(26)
new /obj/item/immortality_talisman(src)
- if(28)
+ if(27)
new /obj/item/gun/magic/wand/book/healing(src)
- if(29)
+ if(28)
new /obj/item/guardiancreator(src)
//KA modkit design discs
diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm
index 6cba540ca0..1adc951447 100644
--- a/code/modules/mining/machine_redemption.dm
+++ b/code/modules/mining/machine_redemption.dm
@@ -145,8 +145,11 @@
D.createmessage("Ore Redemption Machine", "New minerals available!", msg, 1, 0)
/obj/machinery/mineral/ore_redemption/process()
- if(!materials.mat_container || panel_open || !powered())
- return
+ if(materials.mat_container && !panel_open && powered())
+ process_all_ores()
+
+/obj/machinery/mineral/ore_redemption/proc/process_all_ores()
+ set waitfor = FALSE
var/atom/input = get_step(src, input_dir)
var/obj/structure/ore_box/OB = locate() in input
if(OB)
@@ -165,6 +168,7 @@
else if(!message_sent)
send_console_message()
+
/obj/machinery/mineral/ore_redemption/attackby(obj/item/W, mob/user, params)
if(default_unfasten_wrench(user, W))
return
diff --git a/code/modules/mining/machine_unloading.dm b/code/modules/mining/machine_unloading.dm
index dc7caa12c8..b39b0df6ab 100644
--- a/code/modules/mining/machine_unloading.dm
+++ b/code/modules/mining/machine_unloading.dm
@@ -10,22 +10,25 @@
output_dir = EAST
speed_process = TRUE
-/obj/machinery/mineral/unloading_machine/process()
- var/turf/T = get_step(src,input_dir)
- if(T)
- var/limit
- for(var/obj/structure/ore_box/B in T)
- for (var/obj/item/stack/ore/O in B)
- B.contents -= O
- unload_mineral(O)
- limit++
- if (limit>=10)
- return
- CHECK_TICK
- CHECK_TICK
- for(var/obj/item/I in T)
- unload_mineral(I)
+/obj/machinery/mineral/unloading_machine/proc/horrible_quadratic_monster(var/turf/T)
+ set waitfor = FALSE
+ var/limit = 0
+ for(var/obj/structure/ore_box/B in T)
+ for (var/obj/item/stack/ore/O in B)
+ B.contents -= O
+ unload_mineral(O)
limit++
if (limit>=10)
return
CHECK_TICK
+ for(var/obj/item/I in T)
+ unload_mineral(I)
+ limit++
+ if (limit>=10)
+ return
+ CHECK_TICK
+
+/obj/machinery/mineral/unloading_machine/process()
+ var/turf/T = get_step(src,input_dir)
+ if(T)
+ horrible_quadratic_monster(T)
diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm
index 8a7c3a81bd..7a3cd9140b 100644
--- a/code/modules/mining/machine_vending.dm
+++ b/code/modules/mining/machine_vending.dm
@@ -57,6 +57,7 @@
new /datum/data/mining_equipment("Luxury Shelter Capsule", /obj/item/survivalcapsule/luxury, 3000),
new /datum/data/mining_equipment("Luxury Bar Capsule", /obj/item/survivalcapsule/luxury/elitebar, 10000),
new /datum/data/mining_equipment("Empty Capsule", /obj/item/survivalcapsule/luxury/empty, 5000),
+ new /datum/data/mining_equipment("Penthouse Capsule", /obj/item/survivalcapsule/luxury/penthouse, 15000),
new /datum/data/mining_equipment("Nanotrasen Minebot", /mob/living/simple_animal/hostile/mining_drone, 800),
new /datum/data/mining_equipment("Minebot Melee Upgrade", /obj/item/mine_bot_upgrade, 400),
new /datum/data/mining_equipment("Minebot Armor Upgrade", /obj/item/mine_bot_upgrade/health, 400),
diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm
index 2a8e0f2516..f8a4ba4a72 100644
--- a/code/modules/mining/mint.dm
+++ b/code/modules/mining/mint.dm
@@ -64,8 +64,6 @@
if(materials.use_amount_mat(coin_mat, chosen))
for(var/coin_to_make in 1 to 5)
create_coins()
- produced_coins++
- CHECK_TICK
else
var/found_new = FALSE
for(var/datum/material/inserted_material in materials.materials)
@@ -131,6 +129,7 @@
return TRUE
/obj/machinery/mineral/mint/proc/create_coins()
+ set waitfor = FALSE
var/turf/T = get_step(src,output_dir)
var/temp_list = list()
temp_list[chosen] = 400
@@ -143,3 +142,5 @@
O.forceMove(bag_to_use) //don't bother sending the signal, the new bag is empty and all that.
SSblackbox.record_feedback("amount", "coins_minted", 1)
+ produced_coins++
+ CHECK_TICK
diff --git a/code/modules/mining/shelters.dm b/code/modules/mining/shelters.dm
index 6bd04ffd6d..83a8412ca8 100644
--- a/code/modules/mining/shelters.dm
+++ b/code/modules/mining/shelters.dm
@@ -85,3 +85,14 @@
. = ..()
whitelisted_turfs = typecacheof(/turf/closed/mineral)
banned_objects = typecacheof(/obj/structure/stone_tile)
+
+/datum/map_template/shelter/epsilon
+ name = "Shelter Epsilon"
+ shelter_id = "shelter_epsilon"
+ description = "A small apartment in the palm of your hand."
+ mappath = "_maps/templates/shelter_5.dmm"
+
+/datum/map_template/shelter/epsilon/New()
+ . = ..()
+ whitelisted_turfs = typecacheof(/turf/closed/mineral)
+ banned_objects = typecacheof(/obj/structure/stone_tile)
diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm
index 223366c7ab..5647bc2305 100644
--- a/code/modules/mob/dead/dead.dm
+++ b/code/modules/mob/dead/dead.dm
@@ -91,7 +91,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
var/client/C = client
to_chat(C, "Sending you to [pick].")
- new /obj/screen/splash(C)
+ new /atom/movable/screen/splash(C)
mob_transforming = TRUE
sleep(29) //let the animation play
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index 11f1d58c0c..f7f3450f6e 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -21,7 +21,7 @@
/mob/dead/new_player/Initialize()
if(client && SSticker.state == GAME_STATE_STARTUP)
- var/obj/screen/splash/S = new(client, TRUE, TRUE)
+ var/atom/movable/screen/splash/S = new(client, TRUE, TRUE)
S.Fade(TRUE)
if(length(GLOB.newplayer_start))
@@ -567,7 +567,7 @@
if(job && !job.override_latejoin_spawn(character))
SSjob.SendToLateJoin(character)
if(!arrivals_docked)
- var/obj/screen/splash/Spl = new(character.client, TRUE)
+ var/atom/movable/screen/splash/Spl = new(character.client, TRUE)
Spl.Fade(TRUE)
character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25)
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm
index e17dc43950..b5ba7f0732 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm
@@ -436,13 +436,27 @@
/datum/sprite_accessory/tails/human/shark
name = "Shark"
- icon_state = "shark"
+ icon_state = "carp"
color_src = MATRIXED
icon = 'modular_citadel/icons/mob/mam_tails.dmi'
matrixed_sections = MATRIX_RED
/datum/sprite_accessory/tails_animated/human/shark
name = "Shark"
+ icon_state = "carp"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ matrixed_sections = MATRIX_RED
+
+/datum/sprite_accessory/tails/human/sharkalt
+ name = "Shark (alt)"
+ icon_state = "shark"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ matrixed_sections = MATRIX_RED
+
+/datum/sprite_accessory/tails_animated/human/sharkalt
+ name = "Shark (alt)"
icon_state = "shark"
color_src = MATRIXED
icon = 'modular_citadel/icons/mob/mam_tails.dmi'
@@ -679,7 +693,7 @@
icon_state = "crow"
matrixed_sections = MATRIX_RED
-/datum/sprite_accessory/tails/mam_tail/cow
+/datum/sprite_accessory/tails/mam_tails/cow
name = "Cow"
icon_state = "cow"
matrixed_sections = MATRIX_RED
@@ -897,11 +911,21 @@
/datum/sprite_accessory/tails/mam_tails/shark
name = "Shark"
- icon_state = "shark"
+ icon_state = "carp"
matrixed_sections = MATRIX_RED
/datum/sprite_accessory/tails_animated/mam_tails_animated/shark
name = "Shark"
+ icon_state = "carp"
+ matrixed_sections = MATRIX_RED
+
+/datum/sprite_accessory/tails/mam_tails/sharkalt
+ name = "Shark (alt)"
+ icon_state = "shark"
+ matrixed_sections = MATRIX_RED
+
+/datum/sprite_accessory/tails_animated/mam_tails_animated/sharkalt
+ name = "Shark (alt)"
icon_state = "shark"
matrixed_sections = MATRIX_RED
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 6c464c3cd1..429f00161b 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -447,7 +447,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(message)
to_chat(src, "[message]")
if(source)
- var/obj/screen/alert/A = throw_alert("[REF(source)]_notify_cloning", /obj/screen/alert/notify_cloning)
+ var/atom/movable/screen/alert/A = throw_alert("[REF(source)]_notify_cloning", /atom/movable/screen/alert/notify_cloning)
if(A)
if(client && client.prefs && client.prefs.UI_style)
A.icon = ui_style2icon(client.prefs.UI_style)
diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm
index cf1a158fc5..7615792028 100644
--- a/code/modules/mob/living/blood.dm
+++ b/code/modules/mob/living/blood.dm
@@ -39,29 +39,35 @@
return
if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_HUSK))) //cryosleep or husked people do not pump the blood.
-
- //Blood regeneration if there is some space
- if(blood_volume < BLOOD_VOLUME_NORMAL && !HAS_TRAIT(src, TRAIT_NOHUNGER))
+ if(integrating_blood > 0)
+ var/blood_integrated = max(integrating_blood - 1, 0)
+ var/blood_diff = integrating_blood - blood_integrated
+ integrating_blood = blood_integrated
+ if(blood_volume < BLOOD_VOLUME_MAXIMUM)
+ blood_volume += blood_diff
+ if(blood_volume < BLOOD_VOLUME_NORMAL)
var/nutrition_ratio = 0
- switch(nutrition)
- if(0 to NUTRITION_LEVEL_STARVING)
- nutrition_ratio = 0.2
- if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
- nutrition_ratio = 0.4
- if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
- nutrition_ratio = 0.6
- if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
- nutrition_ratio = 0.8
- else
- nutrition_ratio = 1
- if(satiety > 80)
- nutrition_ratio *= 1.25
- adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
- blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
+ if(!HAS_TRAIT(src, TRAIT_NOHUNGER))
+ switch(nutrition)
+ if(0 to NUTRITION_LEVEL_STARVING)
+ nutrition_ratio = 0.2
+ if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
+ nutrition_ratio = 0.4
+ if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
+ nutrition_ratio = 0.6
+ if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
+ nutrition_ratio = 0.8
+ else
+ nutrition_ratio = 1
+ if(satiety > 80)
+ nutrition_ratio *= 1.25
+ adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
+ blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
//Effects of bloodloss
var/word = pick("dizzy","woozy","faint")
- switch(blood_volume)
+ var/blood_effect_volume = blood_volume + integrating_blood
+ switch(blood_effect_volume)
if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
if(prob(10))
to_chat(src, "You feel terribly bloated.")
@@ -94,14 +100,22 @@
bleed(temp_bleed)
//Makes a blood drop, leaking amt units of blood from the mob
-/mob/living/carbon/proc/bleed(amt)
- if(blood_volume)
+/mob/living/carbon/proc/bleed(amt, force)
+ var/bled = FALSE //Have we bled amnt?
+ if(blood_volume > amt || force && blood_volume)
blood_volume = max(blood_volume - amt, 0)
- if(isturf(src.loc)) //Blood loss still happens in locker, floor stays clean
- if(amt >= 10)
- add_splatter_floor(src.loc)
- else
- add_splatter_floor(src.loc, 1)
+ bled = TRUE
+ if(integrating_blood > amt || force && integrating_blood)
+ integrating_blood = max(integrating_blood - amt, 0)
+ bled = TRUE
+ if(!bled && !force) //If we are already cycling back through, don't do this again
+ bleed(amt, TRUE) //we cycle back through to try to bleed SOMETHING, not neccesarily the required amount
+ return
+ if(isturf(src.loc)) //Blood loss still happens in locker, floor stays clean
+ if(amt >= 10)
+ add_splatter_floor(src.loc)
+ else
+ add_splatter_floor(src.loc, TRUE)
/mob/living/carbon/human/bleed(amt)
amt *= physiology.bleed_mod
@@ -114,6 +128,7 @@
/mob/living/proc/restore_blood()
blood_volume = initial(blood_volume)
+ integrating_blood = 0
/mob/living/carbon/restore_blood()
blood_volume = (BLOOD_VOLUME_NORMAL * blood_ratio)
@@ -368,10 +383,17 @@
return
blood_ratio = 1
-/mob/living/proc/AdjustBloodVol(var/value)
+/mob/living/proc/AdjustBloodVol(value)
if(blood_ratio == value)
return
blood_ratio = value
if(ishuman(src))
var/mob/living/carbon/human/H = src
H.handle_blood()
+
+/mob/living/proc/adjust_integration_blood(value, remove_actual_blood, force)
+ if(integrating_blood + value < 0 && remove_actual_blood)
+ blood_volume += value + integrating_blood
+ blood_volume = max(blood_volume, 0)
+ integrating_blood += value
+ integrating_blood = clamp(integrating_blood, 0, force ? INFINITY : (BLOOD_VOLUME_MAXIMUM - (integrating_blood + blood_volume)))
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index f5970d9da2..e9a62d209b 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -78,7 +78,7 @@
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
//Body temperature is too hot.
- throw_alert("alien_fire", /obj/screen/alert/alien_fire)
+ throw_alert("alien_fire", /atom/movable/screen/alert/alien_fire)
switch(bodytemperature)
if(360 to 400)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
index 0ce8482ca1..a7044174b0 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
@@ -7,7 +7,7 @@
meleeKnockdownPower = 75
meleeSlashHumanPower = 20
meleeSlashSAPower = 45
- var/obj/screen/leap_icon = null
+ var/atom/movable/screen/leap_icon = null
/mob/living/carbon/alien/humanoid/hunter/create_internal_organs()
internal_organs += new /obj/item/organ/alien/plasmavessel/small
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index 0a2434055f..530d2acd63 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -16,20 +16,20 @@
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.return_temperature())/BREATH_VOLUME
//Partial pressure of the toxins in our breath
- var/Toxins_pp = (breath.get_moles(/datum/gas/plasma)/breath.total_moles())*breath_pressure
+ var/Toxins_pp = (breath.get_moles(GAS_PLASMA)/breath.total_moles())*breath_pressure
if(Toxins_pp > tox_detect_threshold) // Detect toxins in air
- adjustPlasma(breath.get_moles(/datum/gas/plasma)*250)
- throw_alert("alien_tox", /obj/screen/alert/alien_tox)
+ adjustPlasma(breath.get_moles(GAS_PLASMA)*250)
+ throw_alert("alien_tox", /atom/movable/screen/alert/alien_tox)
- toxins_used = breath.get_moles(/datum/gas/plasma)
+ toxins_used = breath.get_moles(GAS_PLASMA)
else
clear_alert("alien_tox")
//Breathe in toxins and out oxygen
- breath.adjust_moles(/datum/gas/plasma, -toxins_used)
- breath.adjust_moles(/datum/gas/oxygen, toxins_used)
+ breath.adjust_moles(GAS_PLASMA, -toxins_used)
+ breath.adjust_moles(GAS_O2, toxins_used)
//BREATH TEMPERATURE
handle_breath_temperature(breath)
diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm
index 8e3966eb03..41c3882de6 100644
--- a/code/modules/mob/living/carbon/alien/organs.dm
+++ b/code/modules/mob/living/carbon/alien/organs.dm
@@ -85,7 +85,7 @@
owner.adjustOxyLoss(-heal_amt)
owner.adjustCloneLoss(-heal_amt)
if(owner.blood_volume && (owner.blood_volume < BLOOD_VOLUME_NORMAL))
- owner.blood_volume += 5
+ owner.adjust_integration_blood(5)
else
owner.adjustPlasma(plasma_rate * 0.1)
@@ -141,7 +141,7 @@
owner.stuttering += 30
recent_queen_death = 1
- owner.throw_alert("alien_noqueen", /obj/screen/alert/alien_vulnerable)
+ owner.throw_alert("alien_noqueen", /atom/movable/screen/alert/alien_vulnerable)
addtimer(CALLBACK(src, .proc/clear_queen_death), QUEEN_DEATH_DEBUFF_DURATION)
diff --git a/code/modules/mob/living/carbon/alien/status_procs.dm b/code/modules/mob/living/carbon/alien/status_procs.dm
index 71d61cab25..e20b20ef3d 100644
--- a/code/modules/mob/living/carbon/alien/status_procs.dm
+++ b/code/modules/mob/living/carbon/alien/status_procs.dm
@@ -2,7 +2,7 @@
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, TRAIT_BLIND trait, and TRAIT_NEARSIGHT trait.
-/mob/living/carbon/alien/DefaultCombatKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg)
+/mob/living/carbon/alien/DefaultCombatKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg, knocktofloor)
return //no
/////////////////////////////////// STUN ////////////////////////////////////
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index a0beb07fab..f6ef8e8177 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -57,7 +57,7 @@
var/oindex = active_hand_index
active_hand_index = held_index
if(hud_used)
- var/obj/screen/inventory/hand/H
+ var/atom/movable/screen/inventory/hand/H
H = hud_used.hand_slots["[oindex]"]
if(H)
H.update_icon()
@@ -158,7 +158,7 @@
throw_mode_off()
if(!target || !isturf(loc))
return
- if(istype(target, /obj/screen))
+ if(istype(target, /atom/movable/screen))
return
//CIT CHANGES - makes it impossible to throw while in stamina softcrit
@@ -358,10 +358,11 @@
return
I.item_flags |= BEING_REMOVED
breakouttime = I.breakouttime
+ var/datum/cuffbreak_checker/cuffbreak_checker = new(get_turf(src), istype(I, /obj/item/restraints)? I : null)
if(!cuff_break)
visible_message("[src] attempts to remove [I]!")
to_chat(src, "You attempt to remove [I]... (This will take around [DisplayTimeText(breakouttime)] and you need to stand still.)")
- if(do_after(src, breakouttime, 0, target = src, required_mobility_flags = MOBILITY_RESIST))
+ if(do_after_advanced(src, breakouttime, src, NONE, CALLBACK(cuffbreak_checker, /datum/cuffbreak_checker.proc/check_movement), required_mobility_flags = MOBILITY_RESIST))
clear_cuffs(I, cuff_break)
else
to_chat(src, "You fail to remove [I]!")
@@ -370,15 +371,36 @@
breakouttime = 50
visible_message("[src] is trying to break [I]!")
to_chat(src, "You attempt to break [I]... (This will take around 5 seconds and you need to stand still.)")
- if(do_after(src, breakouttime, 0, target = src, required_mobility_flags = MOBILITY_RESIST))
+ if(do_after_advanced(src, breakouttime, src, NONE, CALLBACK(cuffbreak_checker, /datum/cuffbreak_checker.proc/check_movement), required_mobility_flags = MOBILITY_RESIST))
clear_cuffs(I, cuff_break)
else
to_chat(src, "You fail to break [I]!")
else if(cuff_break == INSTANT_CUFFBREAK)
clear_cuffs(I, cuff_break)
+
+ QDEL_NULL(cuffbreak_checker)
I.item_flags &= ~BEING_REMOVED
+/datum/cuffbreak_checker
+ var/turf/last
+ var/obj/item/restraints/cuffs
+
+/datum/cuffbreak_checker/New(turf/initial_turf, obj/item/restraints/R)
+ last = initial_turf
+ if(R)
+ cuffs = R
+
+/datum/cuffbreak_checker/proc/check_movement(atom/user, delay, atom/target, time_left, do_after_flags, required_mobility_flags, required_combat_flags, mob_redirect, stage, initially_held_item, tool, list/passed_in)
+ if(get_turf(user) != last)
+ last = get_turf(user)
+ passed_in[1] = 0.5
+ if(cuffs && !cuffs.allow_breakout_movement)
+ return DO_AFTER_STOP
+ else
+ passed_in[1] = 1
+ return DO_AFTER_CONTINUE
+
/mob/living/carbon/proc/uncuff()
if (handcuffed)
var/obj/item/W = handcuffed
@@ -459,10 +481,6 @@
if(HAS_TRAIT(src, TRAIT_CLUMSY))
modifier -= 40 //Clumsy people are more likely to hit themselves -Honk!
- //CIT CHANGES START HERE
- else if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
- modifier -= 50
-
if(modifier < 100)
dropItemToGround(I)
//END OF CIT CHANGES
@@ -503,7 +521,7 @@
return ..()
/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, vomit_type = VOMIT_TOXIC, harm = TRUE, force = FALSE, purge_ratio = 0.1)
- if((HAS_TRAIT(src, TRAIT_NOHUNGER) || HAS_TRAIT(src, TRAIT_TOXINLOVER)) && !force)
+ if(HAS_TRAIT(src, TRAIT_NOHUNGER) && !force)
return TRUE
if(nutrition < 100 && !blood && !force)
@@ -681,7 +699,7 @@
become_blind(EYES_COVERED)
else if(tinttotal >= TINT_DARKENED)
cure_blind(EYES_COVERED)
- overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
+ overlay_fullscreen("tint", /atom/movable/screen/fullscreen/impaired, 2)
else
cure_blind(EYES_COVERED)
clear_fullscreen("tint", 0)
@@ -757,10 +775,10 @@
visionseverity = 9
if(-INFINITY to -24)
visionseverity = 10
- overlay_fullscreen("critvision", /obj/screen/fullscreen/crit/vision, visionseverity)
+ overlay_fullscreen("critvision", /atom/movable/screen/fullscreen/crit/vision, visionseverity)
else
clear_fullscreen("critvision")
- overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity)
+ overlay_fullscreen("crit", /atom/movable/screen/fullscreen/crit, severity)
else
clear_fullscreen("crit")
clear_fullscreen("critvision")
@@ -784,7 +802,7 @@
severity = 6
if(45 to INFINITY)
severity = 7
- overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity)
+ overlay_fullscreen("oxy", /atom/movable/screen/fullscreen/oxy, severity)
else
clear_fullscreen("oxy")
@@ -805,7 +823,7 @@
severity = 5
if(85 to INFINITY)
severity = 6
- overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
+ overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
else
clear_fullscreen("brute")
@@ -870,7 +888,7 @@
if(handcuffed)
drop_all_held_items()
stop_pulling()
- throw_alert("handcuffed", /obj/screen/alert/restrained/handcuffed, new_master = src.handcuffed)
+ throw_alert("handcuffed", /atom/movable/screen/alert/restrained/handcuffed, new_master = src.handcuffed)
if(handcuffed.demoralize_criminals)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "handcuffed", /datum/mood_event/handcuffed)
else
@@ -949,7 +967,9 @@
/mob/living/carbon/ExtinguishMob()
for(var/X in get_equipped_items())
var/obj/item/I = X
- I.acid_level = 0 //washes off the acid on our clothes
+ var/datum/component/acid/acid = I.GetComponent(/datum/component/acid)
+ if(acid)
+ acid.level = 0
I.extinguish() //extinguishes our clothes
..()
@@ -1253,3 +1273,6 @@
var/mob/living/carbon/C = usr
if(I.can_give())
C.give(src)
+
+/mob/living/carbon/proc/functional_blood()
+ return blood_volume + integrating_blood
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index b2c14c30fe..46ba9a5eb0 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -361,7 +361,7 @@
return embeds
-/mob/living/carbon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash, override_protection = 0)
+/mob/living/carbon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash, override_protection = 0)
. = ..()
var/damage = override_protection ? intensity : intensity - get_eye_protection()
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 05eefd4482..d13a0f1149 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -797,6 +797,7 @@
dna.remove_mutation(HM.name)
if(blood_volume < (BLOOD_VOLUME_NORMAL*blood_ratio))
blood_volume = (BLOOD_VOLUME_NORMAL*blood_ratio)
+ integrating_blood = 0
..()
/mob/living/carbon/human/check_weakness(obj/item/weapon, mob/living/attacker)
@@ -813,7 +814,7 @@
..()
/mob/living/carbon/human/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, vomit_type = VOMIT_TOXIC, harm = TRUE, force = FALSE, purge_ratio = 0.1)
- if(blood && dna?.species && (NOBLOOD in dna.species.species_traits) && !HAS_TRAIT(src, TRAIT_TOXINLOVER))
+ if(blood && dna?.species && (NOBLOOD in dna.species.species_traits))
if(message)
visible_message("[src] dry heaves!", \
"You try to throw up, but there's nothing in your stomach!")
@@ -1027,10 +1028,10 @@
return
if(!HAS_TRAIT(src, TRAIT_IGNOREDAMAGESLOWDOWN)) //if we want to ignore slowdown from damage, but not from equipment
var/scaling = maxHealth / 100
- var/health_deficiency = ((maxHealth / scaling) - (health / scaling) + (getStaminaLoss()*0.75))//CIT CHANGE - reduces the impact of staminaloss and makes stamina buffer influence it
+ var/health_deficiency = max(((maxHealth / scaling) - (health / scaling)), (getStaminaLoss()*0.75))
if(health_deficiency >= 40)
- add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown, TRUE, (health_deficiency-39) / 75)
- add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown_flying, TRUE, (health_deficiency-39) / 25)
+ add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown, TRUE, (health_deficiency - 15) / 75)
+ add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown_flying, TRUE, (health_deficiency - 15) / 25)
else
remove_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown)
remove_movespeed_modifier(/datum/movespeed_modifier/damage_slowdown_flying)
@@ -1073,9 +1074,9 @@
if(HAS_TRAIT(src, TRAIT_TOXINLOVER))
return ""
if(isplasmaman(src))
- return ""
if(isgolem(src))
- return ""
return ""
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index a74afc10f5..1174fcba70 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -409,7 +409,7 @@
return
var/informed = FALSE
if(isrobotic(src))
- apply_status_effect(/datum/status_effect/no_combat_mode/robotic_emp, severity / 20)
+ apply_status_effect(/datum/status_effect/robotic_emp, severity / 20)
severity *= 0.5
var/do_not_stun = FALSE
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm
index 102f3df65d..de934318b3 100644
--- a/code/modules/mob/living/carbon/human/human_defines.dm
+++ b/code/modules/mob/living/carbon/human/human_defines.dm
@@ -15,7 +15,6 @@
block_parry_data = /datum/block_parry_data/unarmed/human
default_block_parry_data = /datum/block_parry_data/unarmed/human
- causes_dirt_buildup_on_floor = TRUE
//Hair colour and style
var/hair_color = "000"
@@ -52,6 +51,9 @@
var/obj/item/l_store = null
var/obj/item/s_store = null
+ /// When an braindead player has their equipment fiddled with, we log that info here for when they come back so they know who took their ID while they were DC'd for 30 seconds
+ var/list/afk_thefts
+
var/special_voice = "" // For changing our voice. Used by a symptom.
var/bleedsuppress = 0 //for stopping bloodloss, eventually this will be limb-based like bleeding
@@ -143,7 +145,7 @@
)
parry_efficiency_considered_successful = 0.01
- parry_efficiency_to_counterattack = 0.01
+ parry_efficiency_to_counterattack = INFINITY // no counterattacks
parry_max_attacks = INFINITY
parry_failed_cooldown_duration = 1.5 SECONDS
parry_failed_stagger_duration = 1 SECONDS
diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm
index 7e3b2ab015..2e530226c8 100644
--- a/code/modules/mob/living/carbon/human/human_helpers.dm
+++ b/code/modules/mob/living/carbon/human/human_helpers.dm
@@ -182,3 +182,8 @@
destination.underwear = underwear
destination.undershirt = undershirt
destination.socks = socks
+
+/mob/living/carbon/human/adjust_integration_blood(value, force)
+ if(NOBLOOD in dna.species.species_traits) //Can't lose blood if your species doesn't have any
+ return
+ . = ..()
diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm
index 1619d0f6de..54d6771c6c 100644
--- a/code/modules/mob/living/carbon/human/human_movement.dm
+++ b/code/modules/mob/living/carbon/human/human_movement.dm
@@ -90,13 +90,31 @@
//End bloody footprints
S.step_action()
+ if(movement_type & GROUND)
+ dirt_buildup()
/mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee.
if(dna.species.space_move(src))
return TRUE
return ..()
-/mob/living/carbon/human/dirt_buildup(strength)
+/mob/living/carbon/human/proc/dirt_buildup(strength = 1)
if(!shoes || !(shoes.body_parts_covered & FEET))
return // barefoot advantage
- return ..()
+ var/turf/open/T = loc
+ if(!istype(T) || !T.dirt_buildup_allowed)
+ return
+ var/area/A = T.loc
+ if(!A.dirt_buildup_allowed)
+ return
+ var/multiplier = CONFIG_GET(number/turf_dirty_multiplier)
+ strength *= multiplier
+ var/obj/effect/decal/cleanable/dirt/D = locate() in T
+ if(D)
+ D.dirty(strength)
+ else
+ T.dirtyness += strength
+ if(T.dirtyness >= (isnull(T.dirt_spawn_threshold)? CONFIG_GET(number/turf_dirt_threshold) : T.dirt_spawn_threshold))
+ D = new /obj/effect/decal/cleanable/dirt(T)
+ D.dirty(T.dirt_spawn_threshold - T.dirtyness)
+ T.dirtyness = 0 // reset.
diff --git a/code/modules/mob/living/carbon/human/innate_abilities/blobform.dm b/code/modules/mob/living/carbon/human/innate_abilities/blobform.dm
index f2ffaec84c..c8f870bf2a 100644
--- a/code/modules/mob/living/carbon/human/innate_abilities/blobform.dm
+++ b/code/modules/mob/living/carbon/human/innate_abilities/blobform.dm
@@ -56,7 +56,6 @@
ADD_TRAIT(H, TRAIT_MOBILITY_NOPICKUP, SLIMEPUDDLE_TRAIT)
ADD_TRAIT(H, TRAIT_MOBILITY_NOUSE, SLIMEPUDDLE_TRAIT)
ADD_TRAIT(H, TRAIT_SPRINT_LOCKED, SLIMEPUDDLE_TRAIT)
- ADD_TRAIT(H, TRAIT_COMBAT_MODE_LOCKED, SLIMEPUDDLE_TRAIT)
ADD_TRAIT(H, TRAIT_MOBILITY_NOREST, SLIMEPUDDLE_TRAIT)
ADD_TRAIT(H, TRAIT_ARMOR_BROKEN, SLIMEPUDDLE_TRAIT)
H.update_disabled_bodyparts(silent = TRUE) //silently update arms to be paralysed
@@ -99,7 +98,6 @@
REMOVE_TRAIT(H, TRAIT_MOBILITY_NOPICKUP, SLIMEPUDDLE_TRAIT)
REMOVE_TRAIT(H, TRAIT_MOBILITY_NOUSE, SLIMEPUDDLE_TRAIT)
REMOVE_TRAIT(H, TRAIT_SPRINT_LOCKED, SLIMEPUDDLE_TRAIT)
- REMOVE_TRAIT(H, TRAIT_COMBAT_MODE_LOCKED, SLIMEPUDDLE_TRAIT)
REMOVE_TRAIT(H, TRAIT_MOBILITY_NOREST, SLIMEPUDDLE_TRAIT)
REMOVE_TRAIT(H, TRAIT_ARMOR_BROKEN, SLIMEPUDDLE_TRAIT)
REMOVE_TRAIT(H, TRAIT_HUMAN_NO_RENDER, SLIMEPUDDLE_TRAIT)
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index c4d023da58..b135ae9cd8 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -209,7 +209,7 @@
update_tint()
if(G.vision_correction)
if(HAS_TRAIT(src, TRAIT_NEARSIGHT))
- overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
+ overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/impaired, 1)
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha))
update_sight()
if(!QDELETED(src))
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 767250c863..b43cd266be 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -89,15 +89,15 @@
var/datum/species/S = dna.species
if(S.breathid == "o2")
- throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
+ throw_alert("not_enough_oxy", /atom/movable/screen/alert/not_enough_oxy)
else if(S.breathid == "tox")
- throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
+ throw_alert("not_enough_tox", /atom/movable/screen/alert/not_enough_tox)
else if(S.breathid == "co2")
- throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
+ throw_alert("not_enough_co2", /atom/movable/screen/alert/not_enough_co2)
else if(S.breathid == "n2")
- throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
+ throw_alert("not_enough_nitro", /atom/movable/screen/alert/not_enough_nitro)
else if(S.breathid == "ch3br")
- throw_alert("not_enough_ch3br", /obj/screen/alert/not_enough_ch3br)
+ throw_alert("not_enough_ch3br", /atom/movable/screen/alert/not_enough_ch3br)
return FALSE
else
diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm
index a89921143a..ebf76eeafa 100644
--- a/code/modules/mob/living/carbon/human/login.dm
+++ b/code/modules/mob/living/carbon/human/login.dm
@@ -2,3 +2,33 @@
..()
if(dna?.species?.has_field_of_vision && CONFIG_GET(flag/use_field_of_vision))
LoadComponent(/datum/component/field_of_vision, field_of_vision_type)
+
+ if(!LAZYLEN(afk_thefts))
+ return
+
+ var/list/print_msg = list()
+ print_msg += "*---------*"
+ print_msg += "As you snap back to consciousness, you recall people messing with your stuff..."
+
+ afk_thefts = reverseRange(afk_thefts)
+
+ for(var/list/iter_theft as anything in afk_thefts)
+ if(!islist(iter_theft) || LAZYLEN(iter_theft) != AFK_THEFT_TIME)
+ stack_trace("[src] ([ckey]) returned to their body and had a null/malformed afk_theft entry. Contents: [json_encode(iter_theft)]")
+ continue
+
+ var/thief_name = iter_theft[AFK_THEFT_NAME]
+ var/theft_message = iter_theft[AFK_THEFT_MESSAGE]
+ var/time_since = world.time - iter_theft[AFK_THEFT_TIME]
+
+ if(time_since > AFK_THEFT_FORGET_DETAILS_TIME)
+ print_msg += "\tSomeone [theft_message], but it was at least [DisplayTimeText(AFK_THEFT_FORGET_DETAILS_TIME)] ago."
+ else
+ print_msg += "\t[thief_name] [theft_message] roughly [DisplayTimeText(time_since, 10)] ago."
+
+ if(LAZYLEN(afk_thefts) >= AFK_THEFT_MAX_MESSAGES)
+ print_msg += "There may have been more, but that's all you can remember..."
+ print_msg += "*---------*"
+
+ to_chat(src, print_msg.Join("\n"))
+ LAZYNULL(afk_thefts)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 96a44792a8..6f94be2d41 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -439,6 +439,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
* * pref_load - Preferences to be loaded from character setup, loads in preferred mutant things like bodyparts, digilegs, skin color, etc.
*/
/datum/species/proc/on_species_gain(mob/living/carbon/C, datum/species/old_species, pref_load)
+ set waitfor = FALSE
// Drop the items the new species can't wear
for(var/slot_id in no_equip)
var/obj/item/thing = C.get_item_by_slot(slot_id)
@@ -679,7 +680,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/mutable_appearance/hair_overlay = mutable_appearance(layer = -HAIR_LAYER)
if(!hair_hidden && !H.getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
if(!(NOBLOOD in species_traits))
- hair_overlay.icon = 'icons/mob/hair.dmi'
+ hair_overlay.icon = 'icons/mob/human_parts.dmi'
hair_overlay.icon_state = "debrained"
else if(H.hair_style && (HAIR in species_traits))
@@ -1364,7 +1365,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
/datum/species/proc/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.type == exotic_blood && !istype(exotic_blood, /datum/reagent/blood))
- H.blood_volume = min(H.blood_volume + round(chem.volume, 0.1), BLOOD_VOLUME_MAXIMUM)
+ H.adjust_integration_blood(round(chem.volume, 0.1))
H.reagents.del_reagent(chem.type)
return TRUE
return FALSE
@@ -1458,13 +1459,13 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
switch(H.nutrition)
if(NUTRITION_LEVEL_FULL to INFINITY)
- H.throw_alert("nutrition", /obj/screen/alert/fat)
+ H.throw_alert("nutrition", /atom/movable/screen/alert/fat)
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FULL)
H.clear_alert("nutrition")
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
- H.throw_alert("nutrition", /obj/screen/alert/hungry)
+ H.throw_alert("nutrition", /atom/movable/screen/alert/hungry)
if(0 to NUTRITION_LEVEL_STARVING)
- H.throw_alert("nutrition", /obj/screen/alert/starving)
+ H.throw_alert("nutrition", /atom/movable/screen/alert/starving)
/datum/species/proc/update_health_hud(mob/living/carbon/human/H)
return 0
@@ -1589,12 +1590,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/punchedbrute = target.getBruteLoss()
//CITADEL CHANGES - makes resting and disabled combat mode reduce punch damage, makes being out of combat mode result in you taking more damage
- if(!SEND_SIGNAL(target, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
- damage *= 1.2
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
damage *= 0.65
- if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
- damage *= 0.8
//END OF CITADEL CHANGES
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
@@ -1718,12 +1715,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
else
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
- if(HAS_TRAIT(user, TRAIT_PUGILIST))//CITADEL CHANGE - makes disarmspam cause staminaloss, pugilists can do it almost effortlessly
- if(!user.UseStaminaBuffer(1, warn = TRUE))
- return
- else
- if(!user.UseStaminaBuffer(1, warn = TRUE))
- return
+ if(!user.UseStaminaBuffer(1, warn = TRUE))
+ return
if(attacker_style && attacker_style.disarm_act(user,target))
return TRUE
@@ -1741,12 +1734,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
log_combat(user, target, "disarmed out of grab from")
return
var/randn = rand(1, 100)
- if(SEND_SIGNAL(target, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) // CITADEL CHANGE
- randn += -10 //CITADEL CHANGE - being out of combat mode makes it easier for you to get disarmed
if(!CHECK_MOBILITY(user, MOBILITY_STAND)) //CITADEL CHANGE
randn += 100 //CITADEL CHANGE - No kosher disarming if you're resting
- if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) //CITADEL CHANGE
- randn += 25 //CITADEL CHANGE - Makes it harder to disarm outside of combat mode
if(user.pulling == target)
randn -= 20 //If you have the time to get someone in a grab, you should have a greater chance at snatching the thing in their hand. Will be made completely obsolete by the grab rework but i've got a poor track record for releasing big projects on time so w/e i guess
if(HAS_TRAIT(user, TRAIT_PUGILIST))
@@ -1951,9 +1940,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(IS_STAMCRIT(user))
to_chat(user, "You're too exhausted for that.")
return
- if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
- to_chat(user, "You need combat mode to be active to that!")
- return
if(user.IsKnockdown() || user.IsParalyzed() || user.IsStun())
to_chat(user, "You can't seem to force yourself up right now!")
return
@@ -1993,6 +1979,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(CHECK_MOBILITY(target, MOBILITY_STAND))
target.adjustStaminaLoss(5)
+ else
+ target.adjustStaminaLoss(target.getStaminaLoss() > 75? 5 : 75)
if(target.is_shove_knockdown_blocked())
return
@@ -2035,7 +2023,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
target.visible_message("[user.name] shoves [target.name]!",
"[user.name] shoves you!", null, COMBAT_MESSAGE_RANGE, null,
user, "You shove [target.name]!")
- target.Stagger(SHOVE_STAGGER_DURATION)
var/obj/item/target_held_item = target.get_active_held_item()
if(!target.has_status_effect(STATUS_EFFECT_OFF_BALANCE))
if(target_held_item)
@@ -2182,19 +2169,19 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
H.adjust_bodytemperature(natural*(1/(thermal_protection+1)) + min(thermal_protection * (loc_temp - H.bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX))
switch((loc_temp - H.bodytemperature)*thermal_protection)
if(-INFINITY to -50)
- H.throw_alert("tempfeel", /obj/screen/alert/cold, 3)
+ H.throw_alert("tempfeel", /atom/movable/screen/alert/cold, 3)
if(-50 to -35)
- H.throw_alert("tempfeel", /obj/screen/alert/cold, 2)
+ H.throw_alert("tempfeel", /atom/movable/screen/alert/cold, 2)
if(-35 to -20)
- H.throw_alert("tempfeel", /obj/screen/alert/cold, 1)
+ H.throw_alert("tempfeel", /atom/movable/screen/alert/cold, 1)
if(-20 to 0) //This is the sweet spot where air is considered normal
H.clear_alert("tempfeel")
if(0 to 15) //When the air around you matches your body's temperature, you'll start to feel warm.
- H.throw_alert("tempfeel", /obj/screen/alert/hot, 1)
+ H.throw_alert("tempfeel", /atom/movable/screen/alert/hot, 1)
if(15 to 30)
- H.throw_alert("tempfeel", /obj/screen/alert/hot, 2)
+ H.throw_alert("tempfeel", /atom/movable/screen/alert/hot, 2)
if(30 to INFINITY)
- H.throw_alert("tempfeel", /obj/screen/alert/hot, 3)
+ H.throw_alert("tempfeel", /atom/movable/screen/alert/hot, 3)
// +/- 50 degrees from 310K is the 'safe' zone, where no damage is dealt.
if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTHEAT))
@@ -2215,11 +2202,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if (burn_damage)
switch(burn_damage)
if(0 to 2)
- H.throw_alert("temp", /obj/screen/alert/sweat, 1)
+ H.throw_alert("temp", /atom/movable/screen/alert/sweat, 1)
if(2 to 4)
- H.throw_alert("temp", /obj/screen/alert/sweat, 2)
+ H.throw_alert("temp", /atom/movable/screen/alert/sweat, 2)
else
- H.throw_alert("temp", /obj/screen/alert/sweat, 3)
+ H.throw_alert("temp", /atom/movable/screen/alert/sweat, 3)
burn_damage = burn_damage * heatmod * H.physiology.heat_mod
if (H.stat < UNCONSCIOUS && (prob(burn_damage) * 10) / 4) //40% for level 3 damage on humans
H.emote("scream")
@@ -2232,13 +2219,13 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/cold, multiplicative_slowdown = ((BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR))
switch(H.bodytemperature)
if(200 to BODYTEMP_COLD_DAMAGE_LIMIT)
- H.throw_alert("temp", /obj/screen/alert/shiver, 1)
+ H.throw_alert("temp", /atom/movable/screen/alert/shiver, 1)
H.apply_damage(COLD_DAMAGE_LEVEL_1*coldmod*H.physiology.cold_mod, BURN)
if(120 to 200)
- H.throw_alert("temp", /obj/screen/alert/shiver, 2)
+ H.throw_alert("temp", /atom/movable/screen/alert/shiver, 2)
H.apply_damage(COLD_DAMAGE_LEVEL_2*coldmod*H.physiology.cold_mod, BURN)
else
- H.throw_alert("temp", /obj/screen/alert/shiver, 3)
+ H.throw_alert("temp", /atom/movable/screen/alert/shiver, 3)
H.apply_damage(COLD_DAMAGE_LEVEL_3*coldmod*H.physiology.cold_mod, BURN)
else
@@ -2253,21 +2240,21 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(HAZARD_HIGH_PRESSURE to INFINITY)
if(!HAS_TRAIT(H, TRAIT_RESISTHIGHPRESSURE))
H.adjustBruteLoss(min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 ) * PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod)
- H.throw_alert("pressure", /obj/screen/alert/highpressure, 2)
+ H.throw_alert("pressure", /atom/movable/screen/alert/highpressure, 2)
else
H.clear_alert("pressure")
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
- H.throw_alert("pressure", /obj/screen/alert/highpressure, 1)
+ H.throw_alert("pressure", /atom/movable/screen/alert/highpressure, 1)
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
H.clear_alert("pressure")
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
- H.throw_alert("pressure", /obj/screen/alert/lowpressure, 1)
+ H.throw_alert("pressure", /atom/movable/screen/alert/lowpressure, 1)
else
if(HAS_TRAIT(H, TRAIT_RESISTLOWPRESSURE))
H.clear_alert("pressure")
else
H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod)
- H.throw_alert("pressure", /obj/screen/alert/lowpressure, 2)
+ H.throw_alert("pressure", /atom/movable/screen/alert/lowpressure, 2)
//////////
// FIRE //
diff --git a/code/modules/mob/living/carbon/human/species_types/bugmen.dm b/code/modules/mob/living/carbon/human/species_types/bugmen.dm
index c649339fe3..f87f425b5f 100644
--- a/code/modules/mob/living/carbon/human/species_types/bugmen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/bugmen.dm
@@ -6,7 +6,7 @@
species_traits = list(LIPS,EYECOLOR,HAIR,FACEHAIR,MUTCOLORS,HORNCOLOR,WINGCOLOR,HAS_FLESH,HAS_BONE)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG
mutant_bodyparts = list("mcolor" = "FFFFFF","mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_tail" = "None", "mam_ears" = "None",
- "insect_wings" = "None", "insect_fluff" = "None", "mam_snouts" = "None", "taur" = "None", "insect_markings" = "None")
+ "insect_wings" = "None", "insect_fluff" = "None", "mam_snouts" = "None", "taur" = "None", "insect_markings" = "None", "mam_body_markings" = list())
attack_verb = "slash"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm
index d92f4ab14a..ae7a7546e1 100644
--- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm
+++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm
@@ -124,21 +124,21 @@
brutemod = 1.25
switch(get_charge(H))
if(ETHEREAL_CHARGE_NONE)
- H.throw_alert("ethereal_charge", /obj/screen/alert/etherealcharge, 3)
+ H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 3)
if(ETHEREAL_CHARGE_NONE to ETHEREAL_CHARGE_LOWPOWER)
- H.throw_alert("ethereal_charge", /obj/screen/alert/etherealcharge, 2)
+ H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 2)
if(H.health > 10.5)
apply_damage(0.65, TOX, null, null, H)
brutemod = 1.75
if(ETHEREAL_CHARGE_LOWPOWER to ETHEREAL_CHARGE_NORMAL)
- H.throw_alert("ethereal_charge", /obj/screen/alert/etherealcharge, 1)
+ H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 1)
brutemod = 1.5
if(ETHEREAL_CHARGE_FULL to ETHEREAL_CHARGE_OVERLOAD)
- H.throw_alert("ethereal_overcharge", /obj/screen/alert/ethereal_overcharge, 1)
+ H.throw_alert("ethereal_overcharge", /atom/movable/screen/alert/ethereal_overcharge, 1)
apply_damage(0.2, TOX, null, null, H)
brutemod = 1.5
if(ETHEREAL_CHARGE_OVERLOAD to ETHEREAL_CHARGE_DANGEROUS)
- H.throw_alert("ethereal_overcharge", /obj/screen/alert/ethereal_overcharge, 2)
+ H.throw_alert("ethereal_overcharge", /atom/movable/screen/alert/ethereal_overcharge, 2)
apply_damage(0.65, TOX, null, null, H)
brutemod = 1.75
if(prob(10)) //10% each tick for ethereals to explosively release excess energy if it reaches dangerous levels
diff --git a/code/modules/mob/living/carbon/human/species_types/felinid.dm b/code/modules/mob/living/carbon/human/species_types/felinid.dm
index 6327375bb5..eee5757b46 100644
--- a/code/modules/mob/living/carbon/human/species_types/felinid.dm
+++ b/code/modules/mob/living/carbon/human/species_types/felinid.dm
@@ -4,7 +4,7 @@
id = SPECIES_FELINID
limbs_id = SPECIES_HUMAN
- mutant_bodyparts = list("mam_tail" = "Cat", "mam_ears" = "Cat", "deco_wings" = "None")
+ mutant_bodyparts = list("mam_tail" = "Cat", "mam_ears" = "Cat", "deco_wings" = "None", "mam_body_markings" = list())
mutantears = /obj/item/organ/ears/cat
mutanttail = /obj/item/organ/tail/cat
diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm
index d0f6c64550..e0558e6533 100644
--- a/code/modules/mob/living/carbon/human/species_types/humans.dm
+++ b/code/modules/mob/living/carbon/human/species_types/humans.dm
@@ -4,7 +4,7 @@
default_color = "FFFFFF"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS_PARTSONLY,WINGCOLOR,HAS_FLESH,HAS_BONE)
- mutant_bodyparts = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF","mcolor3" = "FFFFFF","tail_human" = "None", "ears" = "None", "taur" = "None", "deco_wings" = "None", "legs" = "Plantigrade")
+ mutant_bodyparts = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF","mcolor3" = "FFFFFF","tail_human" = "None", "ears" = "None", "taur" = "None", "deco_wings" = "None", "legs" = "Plantigrade", "mam_body_markings" = list())
use_skintones = USE_SKINTONES_GRAYSCALE_CUSTOM
skinned_type = /obj/item/stack/sheet/animalhide/human
disliked_food = GROSS | RAW
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index 2f463fa8bc..04c69a4138 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -53,16 +53,16 @@
exotic_blood_color = "#" + H.dna.features["mcolor"]
/datum/species/jelly/spec_life(mob/living/carbon/human/H)
- if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_NOMARROW)) //can't farm slime jelly from a dead slime/jelly person indefinitely, and no regeneration for blooduskers
+ if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_NOMARROW)) //can't farm slime jelly from a dead slime/jelly person indefinitely, and no regeneration for bloodsuckers
return
if(!H.blood_volume)
- H.blood_volume += 5
+ H.adjust_integration_blood(5)
H.adjustBruteLoss(5)
to_chat(H, "You feel empty!")
if(H.blood_volume < (BLOOD_VOLUME_NORMAL * H.blood_ratio))
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
- H.blood_volume += 3
+ H.adjust_integration_blood(3)
H.nutrition -= 2.5
if(H.blood_volume < (BLOOD_VOLUME_OKAY*H.blood_ratio))
if(prob(5))
@@ -82,7 +82,7 @@
consumed_limb.drop_limb()
to_chat(H, "Your [consumed_limb] is drawn back into your body, unable to maintain its shape!")
qdel(consumed_limb)
- H.blood_volume += 20
+ H.adjust_integration_blood(20)
////////////////////////////////////////////////////////SLIMEPEOPLE///////////////////////////////////////////////////////////////////
@@ -151,7 +151,7 @@
if(prob(5))
to_chat(H, "You feel very bloated!")
else if(H.nutrition >= NUTRITION_LEVEL_WELL_FED)
- H.blood_volume += 3
+ H.adjust_integration_blood(3)
H.nutrition -= 2.5
..()
@@ -505,7 +505,7 @@
button_icon_state = "slimeeject"
..()
-/datum/action/innate/integrate_extract/ApplyIcon(obj/screen/movable/action_button/current_button, force)
+/datum/action/innate/integrate_extract/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force)
..(current_button, TRUE)
if(species && species.current_extract)
current_button.add_overlay(mutable_appearance(species.current_extract.icon, species.current_extract.icon_state))
@@ -559,7 +559,7 @@
return TRUE
return FALSE
-/datum/action/innate/use_extract/ApplyIcon(obj/screen/movable/action_button/current_button, force)
+/datum/action/innate/use_extract/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force)
..(current_button, TRUE)
if(species && species.current_extract)
current_button.add_overlay(mutable_appearance(species.current_extract.icon, species.current_extract.icon_state))
diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
index e368489c57..547d017c23 100644
--- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
@@ -37,7 +37,7 @@
if((!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman)) && !atmos_sealed)
if(environment)
if(environment.total_moles())
- if(environment.get_moles(/datum/gas/oxygen) >= 1) //Same threshhold that extinguishes fire
+ if(environment.get_moles(GAS_O2) >= 1) //Same threshhold that extinguishes fire
H.adjust_fire_stacks(0.5)
if(!H.on_fire && H.fire_stacks > 0)
H.visible_message("[H]'s body reacts with the atmosphere and bursts into flames!","Your body reacts with the atmosphere and bursts into flame!")
diff --git a/code/modules/mob/living/carbon/human/status_procs.dm b/code/modules/mob/living/carbon/human/status_procs.dm
index 7892380d8b..ec961da4dd 100644
--- a/code/modules/mob/living/carbon/human/status_procs.dm
+++ b/code/modules/mob/living/carbon/human/status_procs.dm
@@ -3,7 +3,7 @@
amount = dna.species.spec_stun(src,amount)
return ..()
-/mob/living/carbon/human/DefaultCombatKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg)
+/mob/living/carbon/human/DefaultCombatKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg, knocktofloor)
amount = dna.species.spec_stun(src,amount)
return ..()
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index f18d768df3..52d736f9ce 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -128,7 +128,7 @@ There are several things that need to be remembered:
remove_overlay(UNIFORM_LAYER)
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_W_UNIFORM]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_W_UNIFORM]
inv.update_icon()
if(istype(w_uniform, /obj/item/clothing/under))
@@ -180,7 +180,7 @@ There are several things that need to be remembered:
remove_overlay(ID_LAYER)
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_ID]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_ID]
inv.update_icon()
var/mutable_appearance/id_overlay = overlays_standing[ID_LAYER]
@@ -205,7 +205,7 @@ There are several things that need to be remembered:
remove_overlay(GLOVES_LAYER)
if(client && hud_used && hud_used.inv_slots[SLOT_GLOVES])
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_GLOVES]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_GLOVES]
inv.update_icon()
if(!gloves && bloody_hands)
@@ -242,7 +242,7 @@ There are several things that need to be remembered:
return
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_GLASSES]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_GLASSES]
inv.update_icon()
if(glasses)
@@ -269,7 +269,7 @@ There are several things that need to be remembered:
return
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_EARS]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_EARS]
inv.update_icon()
if(ears)
@@ -295,7 +295,7 @@ There are several things that need to be remembered:
return
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_SHOES]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_SHOES]
inv.update_icon()
if(dna.species.mutant_bodyparts["taur"])
@@ -330,7 +330,7 @@ There are several things that need to be remembered:
remove_overlay(SUIT_STORE_LAYER)
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_S_STORE]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_S_STORE]
inv.update_icon()
if(s_store)
@@ -357,7 +357,7 @@ There are several things that need to be remembered:
return
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
inv.update_icon()
if(head)
@@ -394,7 +394,7 @@ There are several things that need to be remembered:
remove_overlay(BELT_LAYER)
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BELT]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_BELT]
inv.update_icon()
if(belt)
@@ -416,7 +416,7 @@ There are several things that need to be remembered:
remove_overlay(SUIT_LAYER)
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_SUIT]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_SUIT]
inv.update_icon()
if(wear_suit)
@@ -477,7 +477,7 @@ There are several things that need to be remembered:
/mob/living/carbon/human/update_inv_pockets()
if(client && hud_used)
- var/obj/screen/inventory/inv
+ var/atom/movable/screen/inventory/inv
inv = hud_used.inv_slots[SLOT_L_STORE]
inv.update_icon()
@@ -506,7 +506,7 @@ There are several things that need to be remembered:
return
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
inv.update_icon()
if(wear_mask)
diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm
index 0447de6064..fca7c1f72c 100644
--- a/code/modules/mob/living/carbon/inventory.dm
+++ b/code/modules/mob/living/carbon/inventory.dm
@@ -183,7 +183,7 @@
if(!targets)
return
for(var/mob/living/carbon/C in targets)
- var/obj/screen/alert/give/G = C.throw_alert("[src]", /obj/screen/alert/give)
+ var/atom/movable/screen/alert/give/G = C.throw_alert("[src]", /atom/movable/screen/alert/give)
if(!G)
return
G.setup(C, src, receiving)
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 9885efd7c7..6f0f5453da 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -1,6 +1,6 @@
/mob/living/carbon/BiologicalLife(seconds, times_fired)
//Reagent processing needs to come before breathing, to prevent edge cases.
- handle_organs()
+ handle_organs(seconds, times_fired)
. = ..() // if . is false, we are dead.
if(stat == DEAD)
stop_sound_channel(CHANNEL_HEARTBEAT)
@@ -23,7 +23,7 @@
handle_brain_damage()
if(stat != DEAD)
- handle_liver()
+ handle_liver(seconds, times_fired)
if(stat != DEAD)
handle_corruption()
@@ -115,16 +115,18 @@
breath = loc_as_obj.handle_internal_lifeform(src, BREATH_VOLUME)
else if(isturf(loc)) //Breathe from loc as turf
- var/breath_moles = 0
+ var/breath_ratio = 0
if(environment)
- breath_moles = environment.total_moles()*BREATH_PERCENTAGE
+ breath_ratio = BREATH_VOLUME/environment.return_volume()
- breath = loc.remove_air(breath_moles)
+ breath = loc.remove_air_ratio(breath_ratio)
else //Breathe from loc as obj again
if(istype(loc, /obj/))
var/obj/loc_as_obj = loc
loc_as_obj.handle_internal_lifeform(src,0)
+ if(breath)
+ breath.set_volume(BREATH_VOLUME)
check_breath(breath)
if(breath)
@@ -153,7 +155,7 @@
adjustOxyLoss(1)
failed_last_breath = 1
- throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
+ throw_alert("not_enough_oxy", /atom/movable/screen/alert/not_enough_oxy)
return 0
var/safe_oxy_min = 16
@@ -163,11 +165,11 @@
var/SA_para_min = 1
var/SA_sleep_min = 5
var/oxygen_used = 0
- var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.return_temperature())/BREATH_VOLUME
-
- var/O2_partialpressure = (breath.get_moles(/datum/gas/oxygen)/breath.total_moles())*breath_pressure
- var/Toxins_partialpressure = (breath.get_moles(/datum/gas/plasma)/breath.total_moles())*breath_pressure
- var/CO2_partialpressure = (breath.get_moles(/datum/gas/carbon_dioxide)/breath.total_moles())*breath_pressure
+ var/moles = breath.total_moles()
+ var/breath_pressure = (moles*R_IDEAL_GAS_EQUATION*breath.return_temperature())/BREATH_VOLUME
+ var/O2_partialpressure = ((breath.get_moles(GAS_O2)/moles)*breath_pressure) + (((breath.get_moles(GAS_PLUOXIUM)*8)/moles)*breath_pressure)
+ var/Toxins_partialpressure = (breath.get_moles(GAS_PLASMA)/moles)*breath_pressure
+ var/CO2_partialpressure = (breath.get_moles(GAS_CO2)/moles)*breath_pressure
//OXYGEN
@@ -181,7 +183,7 @@
adjustOxyLoss(8)
if(prob(20))
emote("cough")
- throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
+ throw_alert("too_much_oxy", /atom/movable/screen/alert/too_much_oxy)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "suffocation", /datum/mood_event/suffocation)
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
@@ -191,11 +193,11 @@
var/ratio = 1 - O2_partialpressure/safe_oxy_min
adjustOxyLoss(min(5*ratio, 3))
failed_last_breath = 1
- oxygen_used = breath.get_moles(/datum/gas/oxygen)*ratio
+ oxygen_used = breath.get_moles(GAS_O2)*ratio
else
adjustOxyLoss(3)
failed_last_breath = 1
- throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
+ throw_alert("not_enough_oxy", /atom/movable/screen/alert/not_enough_oxy)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "suffocation", /datum/mood_event/suffocation)
else //Enough oxygen
@@ -203,12 +205,12 @@
o2overloadtime = 0 //reset our counter for this too
if(health >= crit_threshold)
adjustOxyLoss(-5)
- oxygen_used = breath.get_moles(/datum/gas/oxygen)
+ oxygen_used = breath.get_moles(GAS_O2)
clear_alert("not_enough_oxy")
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "suffocation")
- breath.adjust_moles(/datum/gas/oxygen, -oxygen_used)
- breath.adjust_moles(/datum/gas/carbon_dioxide, oxygen_used)
+ breath.adjust_moles(GAS_O2, -oxygen_used)
+ breath.adjust_moles(GAS_CO2, oxygen_used)
//CARBON DIOXIDE
if(CO2_partialpressure > safe_co2_max)
@@ -227,15 +229,15 @@
//TOXINS/PLASMA
if(Toxins_partialpressure > safe_tox_max)
- var/ratio = (breath.get_moles(/datum/gas/plasma)/safe_tox_max) * 10
+ var/ratio = (breath.get_moles(GAS_PLASMA)/safe_tox_max) * 10
adjustToxLoss(clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
- throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
+ throw_alert("too_much_tox", /atom/movable/screen/alert/too_much_tox)
else
clear_alert("too_much_tox")
//NITROUS OXIDE
- if(breath.get_moles(/datum/gas/nitrous_oxide))
- var/SA_partialpressure = (breath.get_moles(/datum/gas/nitrous_oxide)/breath.total_moles())*breath_pressure
+ if(breath.get_moles(GAS_NITROUS))
+ var/SA_partialpressure = (breath.get_moles(GAS_NITROUS)/breath.total_moles())*breath_pressure
if(SA_partialpressure > SA_para_min)
Unconscious(60)
if(SA_partialpressure > SA_sleep_min)
@@ -248,26 +250,26 @@
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "chemical_euphoria")
//BZ (Facepunch port of their Agent B)
- if(breath.get_moles(/datum/gas/bz))
- var/bz_partialpressure = (breath.get_moles(/datum/gas/bz)/breath.total_moles())*breath_pressure
+ if(breath.get_moles(GAS_BZ))
+ var/bz_partialpressure = (breath.get_moles(GAS_BZ)/breath.total_moles())*breath_pressure
if(bz_partialpressure > 1)
hallucination += 10
else if(bz_partialpressure > 0.01)
hallucination += 5
//TRITIUM
- if(breath.get_moles(/datum/gas/tritium))
- var/tritium_partialpressure = (breath.get_moles(/datum/gas/tritium)/breath.total_moles())*breath_pressure
+ if(breath.get_moles(GAS_TRITIUM))
+ var/tritium_partialpressure = (breath.get_moles(GAS_TRITIUM)/breath.total_moles())*breath_pressure
radiation += tritium_partialpressure/10
//NITRYL
- if(breath.get_moles(/datum/gas/nitryl))
- var/nitryl_partialpressure = (breath.get_moles(/datum/gas/nitryl)/breath.total_moles())*breath_pressure
+ if(breath.get_moles(GAS_NITRYL))
+ var/nitryl_partialpressure = (breath.get_moles(GAS_NITRYL)/breath.total_moles())*breath_pressure
adjustFireLoss(nitryl_partialpressure/4)
//MIASMA
- if(breath.get_moles(/datum/gas/miasma))
- var/miasma_partialpressure = (breath.get_moles(/datum/gas/miasma)/breath.total_moles())*breath_pressure
+ if(breath.get_moles(GAS_MIASMA))
+ var/miasma_partialpressure = (breath.get_moles(GAS_MIASMA)/breath.total_moles())*breath_pressure
if(miasma_partialpressure > MINIMUM_MOLES_DELTA_TO_MOVE)
if(prob(0.05 * miasma_partialpressure))
@@ -365,7 +367,7 @@
var/datum/gas_mixture/stank = new
- stank.set_moles(/datum/gas/miasma,0.1)
+ stank.set_moles(GAS_MIASMA,0.1)
stank.set_temperature(BODYTEMP_NORMAL)
@@ -376,25 +378,25 @@
/mob/living/carbon/proc/handle_blood()
return
-/mob/living/carbon/proc/handle_bodyparts()
+/mob/living/carbon/proc/handle_bodyparts(seconds, times_fired)
for(var/I in bodyparts)
var/obj/item/bodypart/BP = I
if(BP.needs_processing)
- . |= BP.on_life()
+ . |= BP.on_life(seconds, times_fired)
-/mob/living/carbon/proc/handle_organs()
+/mob/living/carbon/proc/handle_organs(seconds, times_fired)
if(stat != DEAD)
for(var/V in internal_organs)
var/obj/item/organ/O = V
if(O)
- O.on_life()
+ O.on_life(seconds, times_fired)
else
if(reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 1) || reagents.has_reagent(/datum/reagent/preservahyde, 1)) // No organ decay if the body contains formaldehyde. Or preservahyde.
return
for(var/V in internal_organs)
var/obj/item/organ/O = V
if(O)
- O.on_death() //Needed so organs decay while inside the body.
+ O.on_death(seconds, times_fired) //Needed so organs decay while inside the body.
/mob/living/carbon/handle_diseases()
for(var/thing in diseases)
@@ -510,9 +512,8 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
//this updates all special effects: stun, sleeping, knockdown, druggy, stuttering, etc..
/mob/living/carbon/handle_status_effects()
..()
- var/combat_mode = SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)
if(getStaminaLoss() && !HAS_TRAIT(src, TRAIT_NO_STAMINA_REGENERATION))
- adjustStaminaLoss((!CHECK_MOBILITY(src, MOBILITY_STAND) ? ((combat_flags & COMBAT_FLAG_HARD_STAMCRIT) ? STAM_RECOVERY_STAM_CRIT : STAM_RECOVERY_RESTING) : STAM_RECOVERY_NORMAL) * (combat_mode? 0.25 : 1))
+ adjustStaminaLoss((!CHECK_MOBILITY(src, MOBILITY_STAND) ? ((combat_flags & COMBAT_FLAG_HARD_STAMCRIT) ? STAM_RECOVERY_STAM_CRIT : STAM_RECOVERY_RESTING) : STAM_RECOVERY_NORMAL))
if(!(combat_flags & COMBAT_FLAG_HARD_STAMCRIT) && incomingstammult != 1)
incomingstammult = max(0.01, incomingstammult)
@@ -686,16 +687,16 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
//LIVER//
/////////
-/mob/living/carbon/proc/handle_liver()
+/mob/living/carbon/proc/handle_liver(seconds, times_fired)
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if((!dna && !liver) || (NOLIVER in dna.species.species_traits))
return
if(!liver || liver.organ_flags & ORGAN_FAILING)
- liver_failure()
+ liver_failure(seconds, times_fired)
-/mob/living/carbon/proc/liver_failure()
+/mob/living/carbon/proc/liver_failure(seconds, times_fired)
reagents.end_metabolization(src, keep_liverless = TRUE) //Stops trait-based effects on reagents, to prevent permanent buffs
- reagents.metabolize(src, can_overdose=FALSE, liverless = TRUE)
+ reagents.metabolize(src, seconds, times_fired, can_overdose=FALSE, liverless = TRUE)
if(HAS_TRAIT(src, TRAIT_STABLELIVER))
return
adjustToxLoss(4, TRUE, TRUE)
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index 9e6431985c..480cbebe11 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -80,13 +80,13 @@
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !HAS_TRAIT(src, TRAIT_RESISTHEAT))
switch(bodytemperature)
if(360 to 400)
- throw_alert("temp", /obj/screen/alert/hot, 1)
+ throw_alert("temp", /atom/movable/screen/alert/hot, 1)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
if(400 to 460)
- throw_alert("temp", /obj/screen/alert/hot, 2)
+ throw_alert("temp", /atom/movable/screen/alert/hot, 2)
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
if(460 to INFINITY)
- throw_alert("temp", /obj/screen/alert/hot, 3)
+ throw_alert("temp", /atom/movable/screen/alert/hot, 3)
if(on_fire)
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
else
@@ -96,13 +96,13 @@
if(!istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
switch(bodytemperature)
if(200 to 260)
- throw_alert("temp", /obj/screen/alert/cold, 1)
+ throw_alert("temp", /atom/movable/screen/alert/cold, 1)
apply_damage(COLD_DAMAGE_LEVEL_1, BURN)
if(120 to 200)
- throw_alert("temp", /obj/screen/alert/cold, 2)
+ throw_alert("temp", /atom/movable/screen/alert/cold, 2)
apply_damage(COLD_DAMAGE_LEVEL_2, BURN)
if(-INFINITY to 120)
- throw_alert("temp", /obj/screen/alert/cold, 3)
+ throw_alert("temp", /atom/movable/screen/alert/cold, 3)
apply_damage(COLD_DAMAGE_LEVEL_3, BURN)
else
clear_alert("temp")
@@ -117,16 +117,16 @@
switch(adjusted_pressure)
if(HAZARD_HIGH_PRESSURE to INFINITY)
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
- throw_alert("pressure", /obj/screen/alert/highpressure, 2)
+ throw_alert("pressure", /atom/movable/screen/alert/highpressure, 2)
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
- throw_alert("pressure", /obj/screen/alert/highpressure, 1)
+ throw_alert("pressure", /atom/movable/screen/alert/highpressure, 1)
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
clear_alert("pressure")
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
- throw_alert("pressure", /obj/screen/alert/lowpressure, 1)
+ throw_alert("pressure", /atom/movable/screen/alert/lowpressure, 1)
else
adjustBruteLoss( LOW_PRESSURE_DAMAGE )
- throw_alert("pressure", /obj/screen/alert/lowpressure, 2)
+ throw_alert("pressure", /atom/movable/screen/alert/lowpressure, 2)
return
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index d49059f839..4ab24c31dd 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -173,4 +173,4 @@
if(prob(10))
var/obj/item/clothing/head/helmet/justice/escape/helmet = new(src)
equip_to_slot_or_del(helmet,SLOT_HEAD)
- helmet.attack_self(src) // todo encapsulate toggle
+ INVOKE_ASYNC(helmet, /obj/item.proc/attack_self, src) // todo encapsulate toggle
diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm
index 43f57ea40d..cd1a5896eb 100644
--- a/code/modules/mob/living/carbon/monkey/update_icons.dm
+++ b/code/modules/mob/living/carbon/monkey/update_icons.dm
@@ -51,7 +51,7 @@
overlays_standing[HANDCUFF_LAYER] = legcuffs
apply_overlay(LEGCUFF_LAYER)
- throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
+ throw_alert("legcuffed", /atom/movable/screen/alert/restrained/legcuffed, new_master = legcuffed)
//monkey HUD updates for items in our inventory
diff --git a/code/modules/mob/living/carbon/status_procs.dm b/code/modules/mob/living/carbon/status_procs.dm
index d602c25331..5b5aa9d5c0 100644
--- a/code/modules/mob/living/carbon/status_procs.dm
+++ b/code/modules/mob/living/carbon/status_procs.dm
@@ -5,8 +5,8 @@
/mob/living/carbon/adjust_drugginess(amount)
druggy = max(druggy+amount, 0)
if(druggy)
- overlay_fullscreen("high", /obj/screen/fullscreen/high)
- throw_alert("high", /obj/screen/alert/high)
+ overlay_fullscreen("high", /atom/movable/screen/fullscreen/high)
+ throw_alert("high", /atom/movable/screen/alert/high)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "high", /datum/mood_event/high)
sound_environment_override = SOUND_ENVIRONMENT_DRUGGED
else
@@ -18,8 +18,8 @@
/mob/living/carbon/set_drugginess(amount)
druggy = max(amount, 0)
if(druggy)
- overlay_fullscreen("high", /obj/screen/fullscreen/high)
- throw_alert("high", /obj/screen/alert/high)
+ overlay_fullscreen("high", /atom/movable/screen/fullscreen/high)
+ throw_alert("high", /atom/movable/screen/alert/high)
else
clear_fullscreen("high")
clear_alert("high")
diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm
index a1ea18a8b9..43e0db1f08 100644
--- a/code/modules/mob/living/carbon/update_icons.dm
+++ b/code/modules/mob/living/carbon/update_icons.dm
@@ -91,7 +91,7 @@
return
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
inv?.update_icon()
if(wear_mask)
@@ -105,7 +105,7 @@
remove_overlay(NECK_LAYER)
if(client && hud_used && hud_used.inv_slots[SLOT_NECK])
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_NECK]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_NECK]
inv.update_icon()
if(wear_neck)
@@ -119,7 +119,7 @@
remove_overlay(BACK_LAYER)
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK]
inv?.update_icon()
if(back)
@@ -135,7 +135,7 @@
return
if(client && hud_used)
- var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
+ var/atom/movable/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
inv?.update_icon()
if(head)
@@ -163,7 +163,7 @@
overlays_standing[LEGCUFF_LAYER] = legcuffs
apply_overlay(LEGCUFF_LAYER)
- throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
+ throw_alert("legcuffed", /atom/movable/screen/alert/restrained/legcuffed, new_master = legcuffed)
//mob HUD updates for items in our inventory
@@ -171,7 +171,7 @@
/mob/living/carbon/proc/update_hud_handcuffed()
if(hud_used)
for(var/hand in hud_used.hand_slots)
- var/obj/screen/inventory/hand/H = hud_used.hand_slots[hand]
+ var/atom/movable/screen/inventory/hand/H = hud_used.hand_slots[hand]
if(H)
H.update_icon()
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 0ce5af12b9..43a5d9c2c8 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -141,7 +141,7 @@
ExtinguishMob()
return
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
- if(!G.get_moles(/datum/gas/oxygen, 1))
+ if(!G.get_moles(GAS_O2, 1))
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return
var/turf/location = get_turf(src)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index ae716efc71..5603801dce 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -548,7 +548,7 @@
var/severity = 0
var/healthpercent = (health/maxHealth) * 100
if(hud_used?.healthdoll) //to really put you in the boots of a simplemob
- var/obj/screen/healthdoll/living/livingdoll = hud_used.healthdoll
+ var/atom/movable/screen/healthdoll/living/livingdoll = hud_used.healthdoll
switch(healthpercent)
if(100 to INFINITY)
livingdoll.icon_state = "living0"
@@ -579,7 +579,7 @@
UNLINT(livingdoll.filters += filter(type="alpha", icon = mob_mask))
livingdoll.filters += filter(type="drop_shadow", size = -1)
if(severity > 0)
- overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
+ overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
else
clear_fullscreen("brute")
@@ -869,11 +869,11 @@
clear_alert("gravity")
else
if(has_gravity >= GRAVITY_DAMAGE_TRESHOLD)
- throw_alert("gravity", /obj/screen/alert/veryhighgravity)
+ throw_alert("gravity", /atom/movable/screen/alert/veryhighgravity)
else
- throw_alert("gravity", /obj/screen/alert/highgravity)
+ throw_alert("gravity", /atom/movable/screen/alert/highgravity)
else
- throw_alert("gravity", /obj/screen/alert/weightless)
+ throw_alert("gravity", /atom/movable/screen/alert/weightless)
if(!override && !is_flying())
INVOKE_ASYNC(src, /atom/movable.proc/float, !has_gravity)
@@ -911,6 +911,12 @@
"[src] tries to remove your [what.name].", target = src,
target_message = "You try to remove [who]'s [what.name].")
what.add_fingerprint(src)
+ if(ishuman(who))
+ var/mob/living/carbon/human/victim_human = who
+ if(victim_human.key && !victim_human.client) // AKA braindead
+ if(victim_human.stat <= SOFT_CRIT && LAZYLEN(victim_human.afk_thefts) <= AFK_THEFT_MAX_MESSAGES)
+ var/list/new_entry = list(list(src.name, "tried unequipping your [what]", world.time))
+ LAZYADD(victim_human.afk_thefts, new_entry)
else
to_chat(src,"You try to remove [who]'s [what.name].")
what.add_fingerprint(src)
@@ -957,6 +963,13 @@
to_chat(src, "\The [what.name] doesn't fit in that place!")
return
+ if(ishuman(who))
+ var/mob/living/carbon/human/victim_human = who
+ if(victim_human.key && !victim_human.client) // AKA braindead
+ if(victim_human.stat <= SOFT_CRIT && LAZYLEN(victim_human.afk_thefts) <= AFK_THEFT_MAX_MESSAGES)
+ var/list/new_entry = list(list(src.name, "tried equipping you with [what]", world.time))
+ LAZYADD(victim_human.afk_thefts, new_entry)
+
who.visible_message("[src] tries to put [what] on [who].",
"[src] tries to put [what] on you.", target = src,
target_message = "You try to put [what] on [who].")
@@ -995,7 +1008,7 @@
loc_temp = obj_temp
else if(isspaceturf(get_turf(src)))
var/turf/heat_turf = get_turf(src)
- loc_temp = heat_turf.temperature
+ loc_temp = heat_turf.return_temperature()
return loc_temp
/mob/living/proc/get_standard_pixel_x_offset(lying = 0)
@@ -1146,7 +1159,7 @@
visible_message("[src] catches fire!", \
"You're set on fire!")
new/obj/effect/dummy/lighting_obj/moblight/fire(src)
- throw_alert("fire", /obj/screen/alert/fire)
+ throw_alert("fire", /atom/movable/screen/alert/fire)
update_fire()
SEND_SIGNAL(src, COMSIG_LIVING_IGNITED,src)
return TRUE
diff --git a/code/modules/mob/living/living_active_block.dm b/code/modules/mob/living/living_active_block.dm
index db472df388..9ccaeb6c59 100644
--- a/code/modules/mob/living/living_active_block.dm
+++ b/code/modules/mob/living/living_active_block.dm
@@ -48,25 +48,23 @@
animate(src, pixel_x = get_standard_pixel_x_offset(), pixel_y = get_standard_pixel_y_offset(), time = 2.5, FALSE, SINE_EASING | EASE_IN)
/mob/living/proc/continue_starting_active_block()
- if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
- return DO_AFTER_STOP
return (combat_flags & COMBAT_FLAG_ACTIVE_BLOCK_STARTING)? DO_AFTER_CONTINUE : DO_AFTER_STOP
/mob/living/get_standard_pixel_x_offset()
. = ..()
if(combat_flags & (COMBAT_FLAG_ACTIVE_BLOCK_STARTING | COMBAT_FLAG_ACTIVE_BLOCKING))
if(dir & EAST)
- . += 8
+ . += 4
if(dir & WEST)
- . -= 8
+ . -= 4
/mob/living/get_standard_pixel_y_offset()
. = ..()
if(combat_flags & (COMBAT_FLAG_ACTIVE_BLOCK_STARTING | COMBAT_FLAG_ACTIVE_BLOCKING))
if(dir & NORTH)
- . += 8
+ . += 4
if(dir & SOUTH)
- . -= 8
+ . -= 4
/**
* Proc called by keybindings to toggle active blocking.
@@ -100,11 +98,6 @@
if(!I.can_active_block())
to_chat(src, "[I] is either not capable of being used to actively block, or is not currently in a state that can! (Try wielding it if it's twohanded, for example.)")
return
- // QOL: Attempt to toggle on combat mode if it isn't already
- SEND_SIGNAL(src, COMSIG_ENABLE_COMBAT_MODE)
- if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
- to_chat(src, "You must be in combat mode to actively block!")
- return FALSE
var/datum/block_parry_data/data = I.get_block_parry_data()
var/delay = data.block_start_delay
combat_flags |= COMBAT_FLAG_ACTIVE_BLOCK_STARTING
@@ -147,7 +140,7 @@
/**
* Calculates FINAL ATTACK DAMAGE after mitigation
*/
-/obj/item/proc/active_block_calculate_final_damage(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
+/obj/item/proc/active_block_calculate_final_damage(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, passive = FALSE)
var/datum/block_parry_data/data = get_block_parry_data()
var/absorption = data.attack_type_list_scan(data.block_damage_absorption_override, attack_type)
var/efficiency = data.attack_type_list_scan(data.block_damage_multiplier_override, attack_type)
@@ -156,7 +149,7 @@
if(isnull(absorption))
absorption = data.block_damage_absorption
if(isnull(efficiency))
- efficiency = data.block_damage_multiplier
+ efficiency = data.block_damage_multiplier * (passive? (1 / data.block_automatic_mitigation_multiplier) : 1)
if(isnull(limit))
limit = data.block_damage_limit
// now we calculate damage to reduce.
@@ -172,7 +165,7 @@
return final_damage
/// Amount of stamina from damage blocked. Note that the damage argument is damage_blocked.
-/obj/item/proc/active_block_stamina_cost(mob/living/owner, atom/object, damage_blocked, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
+/obj/item/proc/active_block_stamina_cost(mob/living/owner, atom/object, damage_blocked, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, passive = FALSE)
var/datum/block_parry_data/data = get_block_parry_data()
var/efficiency = data.attack_type_list_scan(data.block_stamina_efficiency_override, attack_type)
if(isnull(efficiency))
@@ -182,7 +175,7 @@
multiplier = data.attack_type_list_scan(data.block_resting_stamina_penalty_multiplier_override, attack_type)
if(isnull(multiplier))
multiplier = data.block_resting_stamina_penalty_multiplier
- return (damage_blocked / efficiency) * multiplier
+ return (damage_blocked / efficiency) * multiplier * (passive? data.block_automatic_stamina_multiplier : 1)
/// Apply the stamina damage to our user, notice how damage argument is stamina_amount.
/obj/item/proc/active_block_do_stamina_damage(mob/living/owner, atom/object, stamina_amount, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
@@ -214,6 +207,18 @@
return
/obj/item/proc/active_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
+ return directional_block(owner, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return, override_direction)
+
+/obj/item/proc/can_passive_block()
+ if(!block_parry_data || !(item_flags & ITEM_CAN_BLOCK))
+ return FALSE
+ var/datum/block_parry_data/data = return_block_parry_datum(block_parry_data)
+ return data.block_automatic_enabled
+
+/obj/item/proc/passive_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
+ return directional_block(owner, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return, override_direction, TRUE)
+
+/obj/item/proc/directional_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction, passive = FALSE)
if(!can_active_block())
return BLOCK_NONE
var/datum/block_parry_data/data = get_block_parry_data()
@@ -228,12 +233,12 @@
incoming_direction = get_dir(get_turf(attacker) || get_turf(object), src)
if(!CHECK_MOBILITY(owner, MOBILITY_STAND) && !(data.block_resting_attack_types_anydir & attack_type) && (!(data.block_resting_attack_types_directional & attack_type) || !can_block_direction(owner.dir, incoming_direction)))
return BLOCK_NONE
- else if(!can_block_direction(owner.dir, incoming_direction))
+ else if(!can_block_direction(owner.dir, incoming_direction, passive))
return BLOCK_NONE
block_return[BLOCK_RETURN_ACTIVE_BLOCK] = TRUE
- var/final_damage = active_block_calculate_final_damage(owner, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return)
+ var/final_damage = active_block_calculate_final_damage(owner, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return, passive)
var/damage_blocked = damage - final_damage
- var/stamina_cost = active_block_stamina_cost(owner, object, damage_blocked, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return)
+ var/stamina_cost = active_block_stamina_cost(owner, object, damage_blocked, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return, passive)
active_block_do_stamina_damage(owner, object, stamina_cost, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, block_return)
block_return[BLOCK_RETURN_ACTIVE_BLOCK_DAMAGE_MITIGATED] = damage - final_damage
block_return[BLOCK_RETURN_SET_DAMAGE_TO] = final_damage
@@ -261,9 +266,9 @@
/**
* Gets the block direction bitflags of what we can block.
*/
-/obj/item/proc/blockable_directions()
+/obj/item/proc/blockable_directions(passive = FALSE)
var/datum/block_parry_data/data = get_block_parry_data()
- return data.can_block_directions
+ return (!isnull(data.block_automatic_directions) && passive)? data.block_automatic_directions : data.can_block_directions
/**
* Checks if we can block from a specific direction from our direction.
@@ -272,14 +277,14 @@
* * our_dir - our direction.
* * their_dir - their direction. Must be a single direction, or NONE for an attack from the same tile. This is incoming direction.
*/
-/obj/item/proc/can_block_direction(our_dir, their_dir)
+/obj/item/proc/can_block_direction(our_dir, their_dir, passive = FALSE)
their_dir = turn(their_dir, 180)
if(our_dir != NORTH)
var/turn_angle = dir2angle(our_dir)
// dir2angle(), ss13 proc is clockwise so dir2angle(EAST) == 90
// turn(), byond proc is counterclockwise so turn(NORTH, 90) == WEST
their_dir = turn(their_dir, turn_angle)
- return (DIR2BLOCKDIR(their_dir) & blockable_directions())
+ return (DIR2BLOCKDIR(their_dir) & blockable_directions(passive))
/**
* can_block_direction but for "compound" directions to check all of them and return the number of directions that were blocked.
diff --git a/code/modules/mob/living/living_active_parry.dm b/code/modules/mob/living/living_active_parry.dm
index 10f8aaf2f4..e34c5ce053 100644
--- a/code/modules/mob/living/living_active_parry.dm
+++ b/code/modules/mob/living/living_active_parry.dm
@@ -14,18 +14,58 @@
/**
* Initiates a parrying sequence.
*/
-/mob/living/proc/initiate_parry_sequence()
+/mob/living/proc/initiate_parry_sequence(silent = FALSE, list/override_method_data)
if(parrying)
- return // already parrying
+ return FALSE // already parrying
if(!(mobility_flags & MOBILITY_USE))
- to_chat(src, "You can't move your arms!")
- return
+ if(!silent)
+ to_chat(src, "You can't move your arms!")
+ return FALSE
if(!(combat_flags & COMBAT_FLAG_PARRY_CAPABLE))
- to_chat(src, "You are not something that can parry attacks.")
- return
+ if(!silent)
+ to_chat(src, "You are not something that can parry attacks.")
+ return FALSE
if(!(mobility_flags & MOBILITY_STAND))
- to_chat(src, "You aren't able to parry without solid footing!")
- return
+ if(!silent)
+ to_chat(src, "You aren't able to parry without solid footing!")
+ return FALSE
+ var/datum/block_parry_data/data
+ var/list/determined = override_method_data || determine_parry_method(FALSE, FALSE)
+ if(!islist(determined))
+ return FALSE
+ var/method = determined[1]
+ data = return_block_parry_datum(determined[2])
+ var/datum/tool = determined[3]
+ var/full_parry_duration = data.parry_time_windup + data.parry_time_active + data.parry_time_spindown
+ // no system in place to "fallback" if out of the 3 the top priority one can't parry due to constraints but something else can.
+ // can always implement it later, whatever.
+ if((data.parry_respect_clickdelay && !CheckActionCooldown()) || ((parry_end_time_last + data.parry_cooldown) > world.time))
+ if(!silent)
+ to_chat(src, "You are not ready to parry (again)!")
+ return FALSE
+ // Point of no return, make sure everything is set.
+ parrying = method
+ if(method == ITEM_PARRY)
+ active_parry_item = tool
+ if(!UseStaminaBuffer(data.parry_stamina_cost, TRUE))
+ return FALSE
+ parry_start_time = world.time
+ successful_parries = list()
+ successful_parry_counterattacks = list()
+ addtimer(CALLBACK(src, .proc/end_parry_sequence), full_parry_duration)
+ if(data.parry_flags & PARRY_LOCK_ATTACKING)
+ ADD_TRAIT(src, TRAIT_MOBILITY_NOUSE, ACTIVE_PARRY_TRAIT)
+ if(data.parry_flags & PARRY_LOCK_SPRINTING)
+ ADD_TRAIT(src, TRAIT_SPRINT_LOCKED, ACTIVE_PARRY_TRAIT)
+ handle_parry_starting_effects(data)
+ return TRUE
+
+/**
+ * Massive snowflake proc for getting something to parry with.
+ *
+ * @return list of [method, data, tool], where method is the parry method define, data is the block_parry_data var that must be run through return_block_parry_data, and tool is the concept/object/martial art/etc used.
+ */
+/mob/living/proc/determine_parry_method(silent = TRUE, autoparry = FALSE)
// Prioritize item, then martial art, then unarmed.
// yanderedev else if time
var/obj/item/using_item = get_active_held_item()
@@ -55,7 +95,8 @@
var/list/other_items = list()
var/list/override = list()
if(SEND_SIGNAL(src, COMSIG_LIVING_ACTIVE_PARRY_START, method, tool, other_items, override) & COMPONENT_PREVENT_PARRY_START)
- to_chat(src, "Something is preventing you from parrying!")
+ if(!silent)
+ to_chat(src, "Something is preventing you from parrying!")
return
if(length(override))
var/datum/thing = override[1]
@@ -72,35 +113,10 @@
method = ITEM_PARRY
data = using_item.block_parry_data
if(!method)
- to_chat(src, "You have nothing to parry with!")
+ if(!silent)
+ to_chat(src, "You have nothing to parry with!")
return FALSE
- //QOL: Try to enable combat mode if it isn't already
- SEND_SIGNAL(src, COMSIG_ENABLE_COMBAT_MODE)
- if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
- to_chat(src, "You must be in combat mode to parry!")
- return FALSE
- data = return_block_parry_datum(data)
- var/full_parry_duration = data.parry_time_windup + data.parry_time_active + data.parry_time_spindown
- // no system in place to "fallback" if out of the 3 the top priority one can't parry due to constraints but something else can.
- // can always implement it later, whatever.
- if((data.parry_respect_clickdelay && !CheckActionCooldown()) || ((parry_end_time_last + data.parry_cooldown) > world.time))
- to_chat(src, "You are not ready to parry (again)!")
- return FALSE
- // Point of no return, make sure everything is set.
- parrying = method
- if(method == ITEM_PARRY)
- active_parry_item = using_item
- if(!UseStaminaBuffer(data.parry_stamina_cost, TRUE))
- return FALSE
- parry_start_time = world.time
- successful_parries = list()
- addtimer(CALLBACK(src, .proc/end_parry_sequence), full_parry_duration)
- if(data.parry_flags & PARRY_LOCK_ATTACKING)
- ADD_TRAIT(src, TRAIT_MOBILITY_NOUSE, ACTIVE_PARRY_TRAIT)
- if(data.parry_flags & PARRY_LOCK_SPRINTING)
- ADD_TRAIT(src, TRAIT_SPRINT_LOCKED, ACTIVE_PARRY_TRAIT)
- handle_parry_starting_effects(data)
- return TRUE
+ return list(method, data, tool)
/**
* Tries to find a backup parry item.
@@ -146,6 +162,7 @@
parry_start_time = 0
parry_end_time_last = world.time + (successful? 0 : data.parry_failed_cooldown_duration)
successful_parries = null
+ successful_parry_counterattacks = null
/**
* Handles starting effects for parrying.
@@ -178,17 +195,17 @@
/**
* Called when an attack is parried using this, whether or not the parry was successful.
*/
-/obj/item/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time)
+/obj/item/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time, autoparry = FALSE)
/**
* Called when an attack is parried innately, whether or not the parry was successful.
*/
-/mob/living/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time)
+/mob/living/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time, autoparry = FALSE)
/**
* Called when an attack is parried using this, whether or not the parry was successful.
*/
-/datum/martial_art/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time)
+/datum/martial_art/proc/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time, autoparry = FALSE)
/**
* Called when an attack is parried and block_parra_data indicates to use a proc to handle counterattack.
@@ -205,6 +222,94 @@
*/
/datum/martial_art/proc/active_parry_reflex_counter(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list, parry_efficiency, list/effect_text)
+/**
+ * Attempts to automatically parry an attacker.
+ */
+/mob/living/proc/attempt_auto_parry(atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list())
+ // determine how we'll parry
+ var/list/determined = determine_parry_method(TRUE, TRUE)
+ if(!islist(determined))
+ return BLOCK_NONE
+ var/datum/block_parry_data/data = return_block_parry_datum(determined[2])
+ if(!data.parry_automatic_enabled || (last_autoparry > (world.time - data.autoparry_cooldown_absolute)))
+ return BLOCK_NONE
+ if(attack_type && !(attack_type & data.parry_attack_types))
+ return BLOCK_NONE
+ // before doing anything, check if the user moused over them properly
+ if(!client)
+ return BLOCK_NONE
+ var/found = attacker == client.mouseObject
+ if(!found)
+ for(var/i in client.moused_over_objects)
+ if(i == object)
+ if((client.moused_over_objects[i] + (data.autoparry_mouse_delay_maximum)) >= world.time)
+ found = TRUE
+ break
+ if(!found)
+ return BLOCK_NONE
+
+ // if that works, try to start parry
+ // first, check cooldowns
+
+ // now, depending on if we're doing a single simulation or a full sequence
+ last_autoparry = world.time
+ if(data.autoparry_sequence_simulation)
+ // for full sequence simulation
+ initiate_parry_sequence(TRUE, determined)
+ if(data.autoparry_sequence_start_time == -1)
+ parry_start_time = world.time - data.parry_time_windup
+ else
+ parry_start_time = world.time - data.autoparry_sequence_start_time
+ // recurse back to original
+ return run_parry(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, FALSE)
+ else
+ // yes, this is mostly a copypaste of run_parry.
+ var/efficiency = data.attack_type_list_scan(data.autoparry_single_efficiency_override, attack_type)
+ if(isnull(efficiency))
+ efficiency = data.autoparry_single_efficiency
+ var/method = determined[1]
+ switch(method)
+ if(ITEM_PARRY)
+ var/obj/item/I = determined[3]
+ . = I.on_active_parry(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, null, TRUE)
+ if(UNARMED_PARRY)
+ . = on_active_parry(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, null, TRUE)
+ if(MARTIAL_PARRY)
+ . = mind.martial_art.on_active_parry(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, null, TRUE)
+ if(!isnull(return_list[BLOCK_RETURN_OVERRIDE_PARRY_EFFICIENCY])) // one of our procs overrode
+ efficiency = return_list[BLOCK_RETURN_OVERRIDE_PARRY_EFFICIENCY]
+ if(efficiency <= 0) // Do not allow automatically handled/standardized parries that increase damage for now.
+ return
+ . |= BLOCK_SHOULD_PARTIAL_MITIGATE
+ if(efficiency >= data.parry_efficiency_perfect)
+ . |= data.perfect_parry_block_return_flags
+ if(data.perfect_parry_block_return_list)
+ return_list |= data.perfect_parry_block_return_list
+ else if(efficiency >= data.parry_efficiency_considered_successful)
+ . |= data.imperfect_parry_block_return_flags
+ if(data.imperfect_parry_block_return_list)
+ return_list |= data.imperfect_parry_block_return_list
+ else
+ . |= data.failed_parry_block_return_flags
+ if(data.failed_parry_block_return_list)
+ return_list |= data.failed_parry_block_return_list
+ if(isnull(return_list[BLOCK_RETURN_MITIGATION_PERCENT])) // if one of the on_active_parry procs overrode. We don't have to worry about interference since parries are the first thing checked in the [do_run_block()] sequence.
+ return_list[BLOCK_RETURN_MITIGATION_PERCENT] = clamp(efficiency, 0, 100) // do not allow > 100% or < 0% for now.
+ if((return_list[BLOCK_RETURN_MITIGATION_PERCENT] >= 100) || (damage <= 0))
+ . |= BLOCK_SUCCESS
+ var/list/effect_text
+ var/pacifist_counter_check = TRUE
+ if(HAS_TRAIT(src, TRAIT_PACIFISM))
+ switch(parrying)
+ if(ITEM_PARRY)
+ pacifist_counter_check = (!active_parry_item.force || active_parry_item.damtype == STAMINA)
+ else
+ pacifist_counter_check = FALSE //Both martial and unarmed counter attacks generally are harmful, so no need to have the same line twice.
+ if(efficiency >= data.parry_efficiency_to_counterattack && pacifist_counter_check && !return_list[BLOCK_RETURN_FORCE_NO_PARRY_COUNTERATTACK] && (!(attacker in successful_parry_counterattacks) && !data.parry_allow_repeated_counterattacks))
+ effect_text = run_parry_countereffects(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, data)
+ if(data.parry_flags & PARRY_DEFAULT_HANDLE_FEEDBACK)
+ handle_parry_feedback(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, effect_text, data)
+
/**
* Gets the stage of our parry sequence we're currently in.
*/
@@ -235,12 +340,20 @@
return world.time - parry_start_time
/// same return values as normal blocking, called with absolute highest priority in the block "chain".
-/mob/living/proc/run_parry(atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list())
+/mob/living/proc/run_parry(atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list(), allow_auto = TRUE)
var/stage = get_parry_stage()
+ if(attack_type & ATTACK_TYPE_PARRY_COUNTERATTACK)
+ return BLOCK_NONE // don't infinite loop
if(stage != PARRY_ACTIVE)
- return BLOCK_NONE
+ // If they're not currently parrying, attempt auto parry
+ if(stage == NOT_PARRYING)
+ if(!allow_auto || SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
+ return BLOCK_NONE
+ return attempt_auto_parry(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list)
+ else
+ return BLOCK_NONE
var/datum/block_parry_data/data = get_parry_data()
- if(attack_type && (!(attack_type & data.parry_attack_types) || (attack_type & ATTACK_TYPE_PARRY_COUNTERATTACK))) // if this attack is from a parry do not parry it lest we infinite loop.
+ if(attack_type && !(attack_type & data.parry_attack_types))
return BLOCK_NONE
var/efficiency = data.get_parry_efficiency(attack_type, get_parry_time())
switch(parrying)
@@ -281,7 +394,7 @@
pacifist_counter_check = (!active_parry_item.force || active_parry_item.damtype == STAMINA)
else
pacifist_counter_check = FALSE //Both martial and unarmed counter attacks generally are harmful, so no need to have the same line twice.
- if(efficiency >= data.parry_efficiency_to_counterattack && pacifist_counter_check)
+ if(efficiency >= data.parry_efficiency_to_counterattack && pacifist_counter_check && !return_list[BLOCK_RETURN_FORCE_NO_PARRY_COUNTERATTACK] && (!(attacker in successful_parry_counterattacks) && !data.parry_allow_repeated_counterattacks))
effect_text = run_parry_countereffects(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency)
if(data.parry_flags & PARRY_DEFAULT_HANDLE_FEEDBACK)
handle_parry_feedback(object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, return_list, efficiency, effect_text)
@@ -289,8 +402,9 @@
if(length(successful_parries) >= data.parry_max_attacks)
end_parry_sequence()
-/mob/living/proc/handle_parry_feedback(atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list(), parry_efficiency, list/effect_text)
- var/datum/block_parry_data/data = get_parry_data()
+/mob/living/proc/handle_parry_feedback(atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list(), parry_efficiency, list/effect_text, datum/block_parry_data/data)
+ if(!data)
+ data = get_parry_data()
var/knockdown_check = FALSE
if(data.parry_data[PARRY_KNOCKDOWN_ATTACKER] && parry_efficiency >= data.parry_efficiency_to_counterattack)
knockdown_check = TRUE
@@ -299,12 +413,14 @@
visible_message("[src] parries [attack_text][length(effect_text)? ", [english_list(effect_text)] [attacker]" : ""][length(effect_text) && knockdown_check? " and" : ""][knockdown_check? " knocking them to the ground" : ""]!")
/// Run counterattack if any
-/mob/living/proc/run_parry_countereffects(atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list(), parry_efficiency)
+/mob/living/proc/run_parry_countereffects(atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list = list(), parry_efficiency, datum/block_parry_data/data)
if(!isliving(attacker))
return
var/mob/living/L = attacker
- var/datum/block_parry_data/data = get_parry_data()
+ if(!data)
+ data = get_parry_data()
var/list/effect_text = list()
+ successful_parry_counterattacks |= attacker
// Always proc so items can override behavior easily
switch(parrying)
if(ITEM_PARRY)
diff --git a/code/modules/mob/living/living_block.dm b/code/modules/mob/living/living_block.dm
index d32265e478..99e74916da 100644
--- a/code/modules/mob/living/living_block.dm
+++ b/code/modules/mob/living/living_block.dm
@@ -37,6 +37,8 @@
var/results
if(I == active_block_item)
results = I.active_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list, attack_direction)
+ else if(I.can_passive_block() && !SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
+ results = I.passive_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list, attack_direction)
else
results = I.run_block(src, object, damage, attack_text, attack_type, armour_penetration, attacker, def_zone, final_block_chance, return_list)
. |= results
diff --git a/code/modules/mob/living/living_blocking_parrying.dm b/code/modules/mob/living/living_blocking_parrying.dm
index 9e974177e5..0ccc03982a 100644
--- a/code/modules/mob/living/living_blocking_parrying.dm
+++ b/code/modules/mob/living/living_blocking_parrying.dm
@@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(block_parry_data)
var/block_stamina_buffer_ratio = 1
/// Stamina dealt directly via UseStaminaBuffer() per SECOND of block.
- var/block_stamina_cost_per_second = 1.5
+ var/block_stamina_cost_per_second = 1
/// Prevent stamina buffer regeneration while block?
var/block_no_stambuffer_regeneration = TRUE
/// Prevent stamina regeneration while block?
@@ -93,20 +93,31 @@ GLOBAL_LIST_EMPTY(block_parry_data)
/// Sounds for blocking
var/list/block_sounds = list('sound/block_parry/block_metal1.ogg' = 1, 'sound/block_parry/block_metal1.ogg' = 1)
+ // Autoblock
+ // Other than for overrides, this mostly just reads from the above vars
+ /// Can this item automatically block?
+ var/block_automatic_enabled = TRUE
+ /// Directions that you can autoblock in. Null to default to normal directions.
+ var/block_automatic_directions = null
+ /// Effectiveness multiplier for automated block. Only applies to efficiency, absorption and limits stay the same!
+ var/block_automatic_mitigation_multiplier = 0.33
+ /// Stamina cost multiplier for automated block
+ var/block_automatic_stamina_multiplier = 1
+
/////////// PARRYING ////////////
- /// Prioriry for [mob/do_run_block()] while we're being used to parry.
+ /// Priority for [mob/do_run_block()] while we're being used to parry.
// None - Parry is always highest priority!
/// Parry doesn't work if you aren't able to otherwise attack due to clickdelay
- var/parry_respect_clickdelay = TRUE
+ var/parry_respect_clickdelay = FALSE
/// Parry stamina cost
var/parry_stamina_cost = 5
/// Attack types we can block
var/parry_attack_types = ALL
/// Parry flags
- var/parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK | PARRY_LOCK_ATTACKING
+ var/parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK
/// Parry windup duration in deciseconds. 0 to this is windup, afterwards is main stage.
- var/parry_time_windup = 2
+ var/parry_time_windup = 0
/// Parry spindown duration in deciseconds. main stage end to this is the spindown stage, afterwards the parry fully ends.
var/parry_time_spindown = 3
/// Main parry window in deciseconds. This is between [parry_time_windup] and [parry_time_spindown]
@@ -139,7 +150,7 @@ GLOBAL_LIST_EMPTY(block_parry_data)
/// Efficiency must be at least this to be considered successful
var/parry_efficiency_considered_successful = 0.1
/// Efficiency must be at least this to run automatic counterattack
- var/parry_efficiency_to_counterattack = 0.1
+ var/parry_efficiency_to_counterattack = INFINITY
/// Maximum attacks to parry successfully or unsuccessfully (but not efficiency < 0) during active period, hitting this immediately ends the sequence.
var/parry_max_attacks = INFINITY
/// Visual icon state override for parrying
@@ -153,7 +164,7 @@ GLOBAL_LIST_EMPTY(block_parry_data)
/// Stagger duration post-parry if you fail to parry an attack
var/parry_failed_stagger_duration = 3.5 SECONDS
/// Clickdelay duration post-parry if you fail to parry an attack
- var/parry_failed_clickcd_duration = 2 SECONDS
+ var/parry_failed_clickcd_duration = 0 SECONDS
/// Parry cooldown post-parry if failed. This is ADDED to parry_cooldown!!!
var/parry_failed_cooldown_duration = 0 SECONDS
@@ -166,6 +177,29 @@ GLOBAL_LIST_EMPTY(block_parry_data)
var/perfect_parry_block_return_list
var/imperfect_parry_block_return_list
var/failed_parry_block_return_list
+ /// Allow multiple counterattacks per parry sequence. Bad idea.
+ var/parry_allow_repeated_counterattacks = FALSE
+
+ // Auto parry
+ // Anything not specified like cooldowns/clickdelay respecting is pulled from above.
+ /// Can this data automatically parry? This is off by default because this is something that requires thought to balance.
+ var/parry_automatic_enabled = FALSE
+ /// Hard autoparry cooldown
+ var/autoparry_cooldown_absolute = 7.5 SECONDS
+ /// Autoparry : Simulate a parry sequence starting at a certain tick, or simply simulate a single attack parry?
+ var/autoparry_sequence_simulation = FALSE
+ // Single attack simulation:
+ /// Single attack autoparry - efficiency
+ var/autoparry_single_efficiency = 75
+ /// Single attack autoparry - efficiency overrides by attack type, see above
+ var/list/autoparry_single_efficiency_override
+ // Parry sequence simulation:
+ /// Decisecond of sequence to start on. -1 to start to 0th tick of active parry window.
+ var/autoparry_sequence_start_time = -1
+ // Clickdelay/cooldown settings not included, as well as whether or not to lock attack/sprinting/etc. They will be pulled from the above.
+
+ /// ADVANCED - Autoparry requirement for time since last moused over for a specific object
+ var/autoparry_mouse_delay_maximum = 0.35 SECONDS
/**
* Quirky proc to get average of flags in list that are in attack_type because why is attack_type a flag.
@@ -308,6 +342,7 @@ GLOBAL_LIST_EMPTY(block_parry_data)
RENDER_VARIABLE_SIMPLE(parry_cooldown, "Deciseconds it has to be since the last time a parry sequence ended for you before you can parry again.")
RENDER_VARIABLE_SIMPLE(parry_failed_stagger_duration, "Deciseconds you are staggered for at the of the parry sequence if you do not successfully parry anything.")
RENDER_VARIABLE_SIMPLE(parry_failed_clickcd_duration, "Deciseconds you are put on attack cooldown at the end of the parry sequence if you do not successfully parry anything.")
+ dat += ""
dat += ""
return dat.Join("")
#undef RENDER_VARIABLE_SIMPLE
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 4c6ede3904..2888507baa 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -539,7 +539,7 @@
//called when the mob receives a bright flash
-/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash, override_protection = 0)
+/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash, override_protection = 0)
if((override_protection || get_eye_protection() < intensity) && (override_blindness_check || !(HAS_TRAIT(src, TRAIT_BLIND))))
overlay_fullscreen("flash", type)
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index f5919f389c..7b07dfb487 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -50,8 +50,12 @@
var/obj/effect/abstract/parry/parry_visual_effect
/// world.time of last parry end
var/parry_end_time_last = 0
+ /// Last autoparry
+ var/last_autoparry = 0
/// Successful parries within the current parry cycle. It's a list of efficiency percentages.
var/list/successful_parries
+ /// Current parry counterattacks. Makes sure we can only counterattack someone once per parry.
+ var/list/successful_parry_counterattacks
var/confused = 0 //Makes the mob move in random directions.
@@ -63,8 +67,6 @@
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
var/incorporeal_move = FALSE //FALSE is off, INCORPOREAL_MOVE_BASIC is normal, INCORPOREAL_MOVE_SHADOW is for ninjas
//and INCORPOREAL_MOVE_JAUNT is blocked by holy water/salt
- /// Do we make floors dirty as we move?
- var/causes_dirt_buildup_on_floor = FALSE
var/list/roundstart_quirks = list()
@@ -110,6 +112,7 @@
var/stun_absorption = null //converted to a list of stun absorption sources this mob has when one is added
var/blood_volume = 0 //how much blood the mob has
+ var/integrating_blood = 0 //this is the variable you want to affect if you want to give the mob blood, this will slowly turn into normal blood, preventing some cheesyness, use adjust_integration_blood() instead of modifying directly
var/blood_ratio = 1 //How much blood the mob needs, in terms of ratio (i.e 1.2 will require BLOOD_VOLUME_NORMAL of 672) DO NOT GO ABOVE 3.55 Well, actually you can but, then they can't get enough blood.
var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override
diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm
index bafa38ec5e..07b40b3ab1 100644
--- a/code/modules/mob/living/living_movement.dm
+++ b/code/modules/mob/living/living_movement.dm
@@ -102,31 +102,6 @@
if(lying && !buckled && prob(getBruteLoss()*200/maxHealth))
makeTrail(newloc, T, old_direction)
- if(causes_dirt_buildup_on_floor && (movement_type & GROUND))
- dirt_buildup()
-
-/**
- * Attempts to make the floor dirty.
- */
-/mob/living/proc/dirt_buildup(strength = 1)
- var/turf/open/T = loc
- if(!istype(T) || !T.dirt_buildup_allowed)
- return
- var/area/A = T.loc
- if(!A.dirt_buildup_allowed)
- return
- var/multiplier = CONFIG_GET(number/turf_dirty_multiplier)
- strength *= multiplier
- var/obj/effect/decal/cleanable/dirt/D = locate() in T
- if(D)
- D.dirty(strength)
- else
- T.dirtyness += strength
- if(T.dirtyness >= (isnull(T.dirt_spawn_threshold)? CONFIG_GET(number/turf_dirt_threshold) : T.dirt_spawn_threshold))
- D = new /obj/effect/decal/cleanable/dirt(T)
- D.dirty(T.dirt_spawn_threshold - T.dirtyness)
- T.dirtyness = 0 // reset.
-
/mob/living/Move_Pulled(atom/A)
. = ..()
if(!. || !isliving(A))
diff --git a/code/modules/mob/living/living_sprint.dm b/code/modules/mob/living/living_sprint.dm
index 728645c3eb..3fbc229385 100644
--- a/code/modules/mob/living/living_sprint.dm
+++ b/code/modules/mob/living/living_sprint.dm
@@ -3,7 +3,7 @@
RegisterSignal(src, SIGNAL_TRAIT(TRAIT_SPRINT_LOCKED), .proc/update_sprint_lock)
/mob/living/proc/update_sprint_icon()
- var/obj/screen/sprintbutton/S = locate() in hud_used?.static_inventory
+ var/atom/movable/screen/sprintbutton/S = locate() in hud_used?.static_inventory
S?.update_icon()
/mob/living/proc/update_hud_sprint_bar()
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index 7ca2234081..1a925e8eaf 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -267,16 +267,10 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
eavesdrop_range = EAVESDROP_EXTRA_RANGE
var/list/listening = get_hearers_in_view(message_range+eavesdrop_range, source)
var/list/the_dead = list()
- var/list/yellareas //CIT CHANGE - adds the ability for yelling to penetrate walls and echo throughout areas
- if(!eavesdrop_range && say_test(message) == "2") //CIT CHANGE - ditto
- yellareas = get_areas_in_range(message_range*0.5, source) //CIT CHANGE - ditto
+
for(var/_M in GLOB.player_list)
var/mob/M = _M
if(M.stat != DEAD) //not dead, not important
- if(yellareas) //CIT CHANGE - see above. makes yelling penetrate walls
- var/area/A = get_area(M) //CIT CHANGE - ditto
- if(istype(A) && A.ambientsounds != SPACE && (A in yellareas)) //CIT CHANGE - ditto
- listening |= M //CIT CHANGE - ditto
continue
if(!M.client || !client) //client is so that ghosts don't have to listen to mice
continue
@@ -303,6 +297,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
AM.Hear(rendered, src, message_language, message, null, spans, message_mode, source)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_LIVING_SAY_SPECIAL, src, message)
+ if(!eavesdrop_range && say_test(message) == "2") // Yell hook
+ process_yelling(listening, rendered, src, message_language, message, spans, message_mode, source)
+
//speech bubble
var/list/speech_bubble_recipients = list()
for(var/mob/M in listening)
@@ -312,6 +309,30 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_recipients, 30)
+/atom/movable/proc/process_yelling(list/already_heard, rendered, atom/movable/speaker, datum/language/message_language, message, list/spans, message_mode, obj/source)
+ if(last_yell > (world.time - 10))
+ to_chat(src, "Your voice doesn't project as far as you try to yell in such quick succession.") // yeah no, no spamming an expensive floodfill.
+ return
+ last_yell = world.time
+ var/list/overhearing = list()
+ var/list/overhearing_text = list()
+ overhearing = yelling_wavefill(src, yell_power)
+ if(!overhearing.len)
+ overhearing_text = "none"
+ else
+ for(var/mob/M as anything in overhearing)
+ overhearing_text += key_name(M)
+ overhearing_text = english_list(overhearing_text)
+ log_say("YELL: [ismob(src)? key_name(src) : src] yelled [message] with overhearing mobs [overhearing_text]")
+ // overhearing = get_hearers_in_view(35, src) | get_hearers_in_range(5, src)
+ overhearing -= already_heard
+ if(!overhearing.len)
+ return
+ // to_chat(world, "DEBUG: overhearing [english_list(overhearing)]")
+ for(var/_AM in overhearing)
+ var/atom/movable/AM = _AM
+ AM.Hear(rendered, speaker, message_language, message, null, spans, message_mode, source)
+
/mob/proc/binarycheck()
return FALSE
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index ce6a5dcda1..b2b1d2fb5f 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -91,7 +91,7 @@
var/multicam_on = FALSE
- var/obj/screen/movable/pic_in_pic/ai/master_multicam
+ var/atom/movable/screen/movable/pic_in_pic/ai/master_multicam
var/list/multicam_screens = list()
var/list/all_eyes = list()
var/max_multicams = 6
@@ -182,6 +182,7 @@
. = ..()
/mob/living/silicon/ai/proc/set_core_display_icon(input, client/C)
+ set waitfor = FALSE
if(client && !C)
C = client
if(!input && !C?.prefs?.preferred_ai_core_display)
diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm
index ba92932579..54713acac4 100644
--- a/code/modules/mob/living/silicon/ai/multicam.dm
+++ b/code/modules/mob/living/silicon/ai/multicam.dm
@@ -1,34 +1,34 @@
//Picture in picture
-/obj/screen/movable/pic_in_pic/ai
+/atom/movable/screen/movable/pic_in_pic/ai
var/mob/living/silicon/ai/ai
var/mutable_appearance/highlighted_background
var/highlighted = FALSE
var/mob/camera/aiEye/pic_in_pic/aiEye
-/obj/screen/movable/pic_in_pic/ai/Initialize()
+/atom/movable/screen/movable/pic_in_pic/ai/Initialize()
. = ..()
aiEye = new /mob/camera/aiEye/pic_in_pic()
aiEye.screen = src
-/obj/screen/movable/pic_in_pic/ai/Destroy()
+/atom/movable/screen/movable/pic_in_pic/ai/Destroy()
set_ai(null)
QDEL_NULL(aiEye)
return ..()
-/obj/screen/movable/pic_in_pic/ai/Click()
+/atom/movable/screen/movable/pic_in_pic/ai/Click()
..()
if(ai)
ai.select_main_multicam_window(src)
-/obj/screen/movable/pic_in_pic/ai/make_backgrounds()
+/atom/movable/screen/movable/pic_in_pic/ai/make_backgrounds()
..()
highlighted_background = new /mutable_appearance()
highlighted_background.icon = 'icons/misc/pic_in_pic.dmi'
highlighted_background.icon_state = "background_highlight"
highlighted_background.layer = SPACE_LAYER
-/obj/screen/movable/pic_in_pic/ai/add_background()
+/atom/movable/screen/movable/pic_in_pic/ai/add_background()
if((width > 0) && (height > 0))
var/matrix/M = matrix()
M.Scale(width + 0.5, height + 0.5)
@@ -37,35 +37,35 @@
standard_background.transform = M
add_overlay(highlighted ? highlighted_background : standard_background)
-/obj/screen/movable/pic_in_pic/ai/set_view_size(width, height, do_refresh = TRUE)
+/atom/movable/screen/movable/pic_in_pic/ai/set_view_size(width, height, do_refresh = TRUE)
aiEye.static_visibility_range = (round(max(width, height) / 2) + 1)
if(ai)
ai.camera_visibility(aiEye)
..()
-/obj/screen/movable/pic_in_pic/ai/set_view_center(atom/target, do_refresh = TRUE)
+/atom/movable/screen/movable/pic_in_pic/ai/set_view_center(atom/target, do_refresh = TRUE)
..()
aiEye.setLoc(get_turf(target))
-/obj/screen/movable/pic_in_pic/ai/refresh_view()
+/atom/movable/screen/movable/pic_in_pic/ai/refresh_view()
..()
aiEye.setLoc(get_turf(center))
-/obj/screen/movable/pic_in_pic/ai/proc/highlight()
+/atom/movable/screen/movable/pic_in_pic/ai/proc/highlight()
if(highlighted)
return
highlighted = TRUE
cut_overlay(standard_background)
add_overlay(highlighted_background)
-/obj/screen/movable/pic_in_pic/ai/proc/unhighlight()
+/atom/movable/screen/movable/pic_in_pic/ai/proc/unhighlight()
if(!highlighted)
return
highlighted = FALSE
cut_overlay(highlighted_background)
add_overlay(standard_background)
-/obj/screen/movable/pic_in_pic/ai/proc/set_ai(mob/living/silicon/ai/new_ai)
+/atom/movable/screen/movable/pic_in_pic/ai/proc/set_ai(mob/living/silicon/ai/new_ai)
if(ai)
ai.multicam_screens -= src
ai.all_eyes -= aiEye
@@ -120,7 +120,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
invisibility = INVISIBILITY_OBSERVER
mouse_opacity = MOUSE_OPACITY_ICON
icon_state = "ai_pip_camera"
- var/obj/screen/movable/pic_in_pic/ai/screen
+ var/atom/movable/screen/movable/pic_in_pic/ai/screen
var/list/cameras_telegraphed = list()
var/telegraph_cameras = TRUE
var/telegraph_range = 7
@@ -204,7 +204,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
if(!silent)
to_chat(src, "Cannot place more than [max_multicams] multicamera windows.")
return
- var/obj/screen/movable/pic_in_pic/ai/C = new /obj/screen/movable/pic_in_pic/ai()
+ var/atom/movable/screen/movable/pic_in_pic/ai/C = new /atom/movable/screen/movable/pic_in_pic/ai()
C.set_view_size(3, 3, FALSE)
C.set_view_center(get_turf(eyeobj))
C.set_ai(src)
@@ -235,7 +235,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
reset_perspective(GLOB.ai_camera_room_landmark)
if(client)
for(var/V in multicam_screens)
- var/obj/screen/movable/pic_in_pic/P = V
+ var/atom/movable/screen/movable/pic_in_pic/P = V
P.show_to(client)
/mob/living/silicon/ai/proc/end_multicam()
@@ -245,13 +245,13 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
select_main_multicam_window(null)
if(client)
for(var/V in multicam_screens)
- var/obj/screen/movable/pic_in_pic/P = V
+ var/atom/movable/screen/movable/pic_in_pic/P = V
P.unshow_to(client)
reset_perspective()
to_chat(src, "Multiple-camera viewing mode deactivated.")
-/mob/living/silicon/ai/proc/select_main_multicam_window(obj/screen/movable/pic_in_pic/ai/P)
+/mob/living/silicon/ai/proc/select_main_multicam_window(atom/movable/screen/movable/pic_in_pic/ai/P)
if(master_multicam == P)
return
diff --git a/code/modules/mob/living/silicon/examine.dm b/code/modules/mob/living/silicon/examine.dm
index 0840ea1191..7de281de5f 100644
--- a/code/modules/mob/living/silicon/examine.dm
+++ b/code/modules/mob/living/silicon/examine.dm
@@ -1,4 +1,5 @@
/mob/living/silicon/examine(mob/user) //Displays a silicon's laws to ghosts
+ . = ..()
if(laws && isobserver(user))
. += "[src] has the following laws:"
for(var/law in laws.get_law_list(include_zeroth = TRUE))
diff --git a/code/modules/mob/living/silicon/laws.dm b/code/modules/mob/living/silicon/laws.dm
index acaee05cc6..d92f4a5999 100644
--- a/code/modules/mob/living/silicon/laws.dm
+++ b/code/modules/mob/living/silicon/laws.dm
@@ -6,7 +6,7 @@
make_laws()
/mob/living/silicon/proc/post_lawchange(announce = TRUE)
- throw_alert("newlaw", /obj/screen/alert/newlaw)
+ throw_alert("newlaw", /atom/movable/screen/alert/newlaw)
if(announce && last_lawchange_announce != world.time)
to_chat(src, "Your laws have been changed.")
addtimer(CALLBACK(src, .proc/show_laws), 0)
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index 92f46e24bc..04665401c5 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -575,7 +575,7 @@
for(var/id in environment.get_gases())
var/gas_level = environment.get_moles(id)/total_moles
if(gas_level > 0.01)
- dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100)]% "
+ dat += "[GLOB.gas_data.names[id]]: [round(gas_level*100)]% "
dat += "Temperature: [round(environment.return_temperature()-T0C)]°C "
dat += "Refresh Reading "
dat += " "
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index 9075af2dbd..d1eaeeacc5 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -58,15 +58,15 @@
if(0.75 to INFINITY)
clear_alert("charge")
if(0.5 to 0.75)
- throw_alert("charge", /obj/screen/alert/lowcell, 1)
+ throw_alert("charge", /atom/movable/screen/alert/lowcell, 1)
if(0.25 to 0.5)
- throw_alert("charge", /obj/screen/alert/lowcell, 2)
+ throw_alert("charge", /atom/movable/screen/alert/lowcell, 2)
if(0.01 to 0.25)
- throw_alert("charge", /obj/screen/alert/lowcell, 3)
+ throw_alert("charge", /atom/movable/screen/alert/lowcell, 3)
else
- throw_alert("charge", /obj/screen/alert/emptycell)
+ throw_alert("charge", /atom/movable/screen/alert/emptycell)
else
- throw_alert("charge", /obj/screen/alert/nocell)
+ throw_alert("charge", /atom/movable/screen/alert/nocell)
//Robots on fire
/mob/living/silicon/robot/handle_fire()
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index a4b12f8834..7ab826cae3 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -23,9 +23,9 @@
robot_modules_background.layer = HUD_LAYER //Objects that appear on screen are on layer ABOVE_HUD_LAYER, UI should be just below it.
robot_modules_background.plane = HUD_PLANE
- inv1 = new /obj/screen/robot/module1()
- inv2 = new /obj/screen/robot/module2()
- inv3 = new /obj/screen/robot/module3()
+ inv1 = new /atom/movable/screen/robot/module1()
+ inv2 = new /atom/movable/screen/robot/module2()
+ inv3 = new /atom/movable/screen/robot/module3()
previous_health = health
@@ -598,7 +598,7 @@
if(wires.is_cut(WIRE_LOCKDOWN))
state = TRUE
if(state)
- throw_alert("locked", /obj/screen/alert/locked)
+ throw_alert("locked", /atom/movable/screen/alert/locked)
else
clear_alert("locked")
locked_down = state
@@ -611,7 +611,7 @@
module.rebuild_modules()
update_icons()
if(emagged)
- throw_alert("hacked", /obj/screen/alert/hacked)
+ throw_alert("hacked", /atom/movable/screen/alert/hacked)
else
clear_alert("hacked")
@@ -992,7 +992,8 @@
upgrades.Cut()
- speed = 0
+ vtec = 0
+ vtec_disabled = FALSE
ionpulse = FALSE
revert_shell()
diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm
index 36f291bf36..5342638c03 100644
--- a/code/modules/mob/living/silicon/robot/robot_defense.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defense.dm
@@ -82,6 +82,18 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
if(!opened)
return ..()
+/mob/living/silicon/robot/disarm_shove(mob/living/carbon/human/H)
+ visible_message(span_danger("[src]'s motors grind as they are shoved by [H]!"))
+ vtec_disable(10 SECONDS)
+
+/mob/living/silicon/robot/proc/vtec_disable(time)
+ var/datum/status_effect/vtec_disabled/V = has_status_effect(/datum/status_effect/vtec_disabled)
+ if(V)
+ V.duration = max(V.duration, world.time + time)
+ else
+ apply_status_effect(/datum/status_effect/vtec_disabled, time)
+ update_movespeed()
+
/mob/living/silicon/robot/fire_act()
if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them
IgniteMob()
diff --git a/code/modules/mob/living/silicon/robot/robot_defines.dm b/code/modules/mob/living/silicon/robot/robot_defines.dm
index fe22ec1236..612298e526 100644
--- a/code/modules/mob/living/silicon/robot/robot_defines.dm
+++ b/code/modules/mob/living/silicon/robot/robot_defines.dm
@@ -26,15 +26,15 @@
var/previous_health
//Hud stuff
- var/obj/screen/inv1 = null
- var/obj/screen/inv2 = null
- var/obj/screen/inv3 = null
- var/obj/screen/lamp_button = null
- var/obj/screen/thruster_button = null
- var/obj/screen/hands = null
+ var/atom/movable/screen/inv1 = null
+ var/atom/movable/screen/inv2 = null
+ var/atom/movable/screen/inv3 = null
+ var/atom/movable/screen/lamp_button = null
+ var/atom/movable/screen/thruster_button = null
+ var/atom/movable/screen/hands = null
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
- var/obj/screen/robot_modules_background
+ var/atom/movable/screen/robot_modules_background
//3 Modules can be activated at any one time.
var/obj/item/robot_module/module = null
@@ -61,7 +61,9 @@
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
- var/speed = 0 // VTEC speed boost.
+ var/vtec = 0 // VTEC speed boost.
+ /// vtec shorted out
+ var/vtec_disabled = FALSE
var/magpulse = FALSE // Magboot-like effect.
var/ionpulse = FALSE // Jetpack-like effect.
var/ionpulse_on = FALSE // Jetpack-like effect.
@@ -88,14 +90,14 @@
///Lamp brightness. Starts at 3, but can be 1 - 5.
var/lamp_intensity = 3
///Lamp button reference
- var/obj/screen/robot/lamp/lampButton
+ var/atom/movable/screen/robot/lamp/lampButton
var/sight_mode = 0
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD)
///The reference to the built-in tablet that borgs carry.
var/obj/item/modular_computer/tablet/integrated/modularInterface
- var/obj/screen/robot/modPC/interfaceButton
+ var/atom/movable/screen/robot/modPC/interfaceButton
var/list/upgrades = list()
diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm
index e3a640bca0..23500688ae 100644
--- a/code/modules/mob/living/silicon/robot/robot_movement.dm
+++ b/code/modules/mob/living/silicon/robot/robot_movement.dm
@@ -23,4 +23,4 @@
. = ..()
if(!resting && !(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
. += 1
- . += speed
+ . += vtec_disabled? 0 : vtec
diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm
index 3377bf9601..6c9d508fd8 100644
--- a/code/modules/mob/living/silicon/silicon_defense.dm
+++ b/code/modules/mob/living/silicon/silicon_defense.dm
@@ -79,6 +79,8 @@
M.visible_message("[M] pets [src].", \
"You pet [src].", target = src,
target_message = "[M] pets you.")
+ if(INTENT_DISARM)
+ disarm_shove(M)
if(INTENT_GRAB)
grabbedby(M)
else
@@ -88,6 +90,9 @@
"[M] punches you, but doesn't leave a dent.", null, COMBAT_MESSAGE_RANGE, null, M,
"You punch [src], but don't leave a dent.")
+/mob/living/silicon/proc/disarm_shove(mob/living/carbon/human/H)
+ visible_message(span_danger("[H] shoves [src], but doesn't manage to make much of an effect."))
+
/mob/living/silicon/attack_drone(mob/living/simple_animal/drone/M)
if(M.a_intent == INTENT_HARM)
return
@@ -139,6 +144,6 @@
P.on_hit(src, 0, def_zone)
return BULLET_ACT_HIT
-/mob/living/silicon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash/static)
+/mob/living/silicon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /atom/movable/screen/fullscreen/flash/static)
if(affect_silicon)
return ..()
diff --git a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm
index a5d36b5ba9..99048b4e9f 100644
--- a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm
+++ b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm
@@ -33,7 +33,7 @@
/mob/living/simple_animal/bot/secbot/grievous/Initialize()
. = ..()
weapon = new baton_type(src)
- weapon.attack_self(src)
+ INVOKE_ASYNC(weapon, /obj/item.proc/attack_self, src)
/mob/living/simple_animal/bot/secbot/grievous/Destroy()
QDEL_NULL(weapon)
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 9176f410c3..b287b854a3 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -753,6 +753,12 @@
else
return null
+/mob/living/simple_animal/bot/mulebot/remove_air_ratio(ratio)
+ if(loc)
+ return loc.remove_air_ratio(ratio)
+ else
+ return null
+
/mob/living/simple_animal/bot/mulebot/do_resist()
. = ..()
if(load)
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index e3486a40e2..fb3d009a72 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -381,6 +381,7 @@
..()
/mob/living/simple_animal/pet/dog/corgi/Ian/proc/Read_Memory()
+ set waitfor = FALSE
if(fexists("data/npc_saves/Ian.sav")) //legacy compatability to convert old format to new
var/savefile/S = new /savefile("data/npc_saves/Ian.sav")
S["age"] >> age
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index 7c7ff3779c..b85c0ee643 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -55,7 +55,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
var/cooldown = 0
var/mob/living/carbon/summoner
var/range = 13 //how far from the user the spirit can be
- var/toggle_button_type = /obj/screen/guardian/ToggleMode/Inactive //what sort of toggle button the hud uses
+ var/toggle_button_type = /atom/movable/screen/guardian/ToggleMode/Inactive //what sort of toggle button the hud uses
var/playstyle_string = "You are a standard Guardian. You shouldn't exist!"
var/magic_fluff_string = "You draw the Coder, symbolizing bugs and errors. This shouldn't happen! Submit a bug report!"
var/tech_fluff_string = "BOOT SEQUENCE COMPLETE. ERROR MODULE LOADED. THIS SHOULDN'T HAPPEN. Submit a bug report!"
diff --git a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm
index b5bb91d34f..7083f891b8 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm
@@ -11,11 +11,11 @@
tech_fluff_string = "Boot sequence complete. Assassin modules loaded. Holoparasite swarm online."
carp_fluff_string = "CARP CARP CARP! Caught one! It's an assassin carp! Just when you thought it was safe to go back to the water... which is unhelpful, because we're in space."
- toggle_button_type = /obj/screen/guardian/ToggleMode/Assassin
+ toggle_button_type = /atom/movable/screen/guardian/ToggleMode/Assassin
var/toggle = FALSE
var/stealthcooldown = 100
- var/obj/screen/alert/canstealthalert
- var/obj/screen/alert/instealthalert
+ var/atom/movable/screen/alert/canstealthalert
+ var/atom/movable/screen/alert/instealthalert
/mob/living/simple_animal/hostile/guardian/assassin/Initialize()
. = ..()
@@ -86,12 +86,12 @@
if(stealthcooldown <= world.time)
if(toggle)
if(!instealthalert)
- instealthalert = throw_alert("instealth", /obj/screen/alert/instealth)
+ instealthalert = throw_alert("instealth", /atom/movable/screen/alert/instealth)
clear_alert("canstealth")
canstealthalert = null
else
if(!canstealthalert)
- canstealthalert = throw_alert("canstealth", /obj/screen/alert/canstealth)
+ canstealthalert = throw_alert("canstealth", /atom/movable/screen/alert/canstealth)
clear_alert("instealth")
instealthalert = null
else
diff --git a/code/modules/mob/living/simple_animal/guardian/types/charger.dm b/code/modules/mob/living/simple_animal/guardian/types/charger.dm
index 9060350df4..ee5a648067 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/charger.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/charger.dm
@@ -12,14 +12,14 @@
tech_fluff_string = "Boot sequence complete. Charge modules loaded. Holoparasite swarm online."
carp_fluff_string = "CARP CARP CARP! Caught one! It's a charger carp, that likes running at people. But it doesn't have any legs..."
var/charging = 0
- var/obj/screen/alert/chargealert
+ var/atom/movable/screen/alert/chargealert
/mob/living/simple_animal/hostile/guardian/charger/BiologicalLife(seconds, times_fired)
if(!(. = ..()))
return
if(ranged_cooldown <= world.time)
if(!chargealert)
- chargealert = throw_alert("charge", /obj/screen/alert/cancharge)
+ chargealert = throw_alert("charge", /atom/movable/screen/alert/cancharge)
else
clear_alert("charge")
chargealert = null
diff --git a/code/modules/mob/living/simple_animal/guardian/types/protector.dm b/code/modules/mob/living/simple_animal/guardian/types/protector.dm
index 99272a6d3f..b3d9f01ebb 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/protector.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/protector.dm
@@ -8,7 +8,7 @@
magic_fluff_string = "..And draw the Guardian, a stalwart protector that never leaves the side of its charge."
tech_fluff_string = "Boot sequence complete. Protector modules loaded. Holoparasite swarm online."
carp_fluff_string = "CARP CARP CARP! You caught one! Wait, no... it caught you! The fisher has become the fishy."
- toggle_button_type = /obj/screen/guardian/ToggleMode
+ toggle_button_type = /atom/movable/screen/guardian/ToggleMode
var/toggle = FALSE
/mob/living/simple_animal/hostile/guardian/protector/ex_act(severity)
diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
index e2bcdd5684..5df446085a 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
@@ -23,7 +23,7 @@
carp_fluff_string = "CARP CARP CARP! Caught one, it's a ranged carp. This fishy can watch people pee in the ocean."
see_invisible = SEE_INVISIBLE_LIVING
see_in_dark = 8
- toggle_button_type = /obj/screen/guardian/ToggleMode
+ toggle_button_type = /atom/movable/screen/guardian/ToggleMode
var/list/snares = list()
var/toggle = FALSE
diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm
index b51552acd2..fc2912ec2f 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/support.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm
@@ -10,7 +10,7 @@
magic_fluff_string = "..And draw the CMO, a potent force of life... and death."
carp_fluff_string = "CARP CARP CARP! You caught a support carp. It's a kleptocarp!"
tech_fluff_string = "Boot sequence complete. Support modules active. Holoparasite swarm online."
- toggle_button_type = /obj/screen/guardian/ToggleMode
+ toggle_button_type = /atom/movable/screen/guardian/ToggleMode
var/obj/structure/receiving_pad/beacon
var/beacon_cooldown = 0
var/toggle = FALSE
diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
index 98700ffaf0..1b0d210d9c 100644
--- a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm
@@ -133,6 +133,10 @@
chance_to_hold_onto_points = highest_cost*0.5
if(points != max_points && prob(chance_to_hold_onto_points))
return //Let's save our points for a better ability (unless we're at max points, in which case we can't save anymore!)
+ do_ability()
+
+/datum/boss_active_timed_battle/proc/do_ability()
+ set waitfor = FALSE
if(!boss.client)
abilities = shuffle(abilities)
for(var/ab in abilities)
diff --git a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
index 6950c6409f..78697cb4fe 100644
--- a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
+++ b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
@@ -94,7 +94,7 @@
L.SetUnconscious(0, FALSE)
L.adjustOxyLoss(-50)// do CPR first
if(L.blood_volume <= 500) //bandage them up and give em some blood if they're bleeding
- L.blood_volume += 30
+ L.adjust_integration_blood(30)
L.bleedsuppress = 0
if(L.getBruteLoss() >= 50)// first, did we beat them into crit? if so, heal that
var/healing = min(L.getBruteLoss(), 120)
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 95f8f2acc1..01a30bb90a 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -364,11 +364,10 @@
/mob/living/simple_animal/hostile/proc/AttackingTarget()
SEND_SIGNAL(src, COMSIG_HOSTILE_ATTACKINGTARGET, target)
in_melee = TRUE
- /* sorry for the simplemob vore fans
if(vore_active)
if(isliving(target))
var/mob/living/L = target
- if(!client && L.Adjacent(src) && CHECK_BITFIELD(L.vore_flags,DEVOURABLE)) // aggressive check to ensure vore attacks can be made
+ if(!client && L.Adjacent(src) && CHECK_BITFIELD(L.vore_flags, DEVOURABLE) && CHECK_BITFIELD(L.vore_flags, MOBVORE)) // aggressive check to ensure vore attacks can be made
if(prob(voracious_chance))
vore_attack(src,L,src)
else
@@ -379,7 +378,6 @@
return target.attack_animal(src)
else
return target.attack_animal(src)
- */
return target.attack_animal(src)
/mob/living/simple_animal/hostile/proc/Aggro()
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/seedling.dm b/code/modules/mob/living/simple_animal/hostile/jungle/seedling.dm
index 7565a686bf..0f25688b6a 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/seedling.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/seedling.dm
@@ -69,7 +69,7 @@
status_type = STATUS_EFFECT_MULTIPLE
alert_type = null
tick_interval = 1
- var/obj/screen/seedling/seedling_screen_object
+ var/atom/movable/screen/seedling/seedling_screen_object
var/atom/target
@@ -81,7 +81,7 @@
/datum/status_effect/seedling_beam_indicator/on_apply()
if(owner.client)
- seedling_screen_object = new /obj/screen/seedling()
+ seedling_screen_object = new /atom/movable/screen/seedling()
owner.client.screen += seedling_screen_object
tick()
return ..()
@@ -98,7 +98,7 @@
final.Turn(target_angle)
seedling_screen_object.transform = final
-/obj/screen/seedling
+/atom/movable/screen/seedling
icon = 'icons/mob/jungle/arachnid.dmi'
icon_state = "seedling_beam_indicator"
screen_loc = "CENTER:-16,CENTER:-16"
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
index a60c5504e6..e6c5e7c22b 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
@@ -40,8 +40,10 @@ Difficulty: Medium
ranged = 1
ranged_cooldown_time = 16
pixel_x = -16
- crusher_loot = list(/obj/item/melee/transforming/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator/premiumka, /obj/item/crusher_trophy/miner_eye)
- loot = list(/obj/item/melee/transforming/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator/premiumka)
+ crusher_loot = list(/obj/item/melee/transforming/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator/premiumka, /obj/item/crusher_trophy/miner_eye, /obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe,
+ /obj/item/disk/design_disk/modkit_disc/bounty,/obj/item/disk/design_disk/modkit_disc/resonator_blast,/obj/item/disk/design_disk/modkit_disc/rapid_repeater)
+ loot = list(/obj/item/melee/transforming/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator/premiumka,/obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe,
+ /obj/item/disk/design_disk/modkit_disc/bounty,/obj/item/disk/design_disk/modkit_disc/resonator_blast,/obj/item/disk/design_disk/modkit_disc/rapid_repeater)
wander = FALSE
del_on_death = TRUE
blood_volume = BLOOD_VOLUME_NORMAL
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm
index 2bcca74f30..1aa0957fee 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm
@@ -26,8 +26,10 @@ Difficulty: Extremely Hard
speed = 20
move_to_delay = 20
ranged = TRUE
- crusher_loot = list(/obj/effect/decal/remains/plasma, /obj/item/crusher_trophy/ice_block_talisman)
- loot = list(/obj/effect/decal/remains/plasma)
+ crusher_loot = list(/obj/effect/decal/remains/plasma, /obj/item/crusher_trophy/ice_block_talisman, ,/obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe,
+ /obj/item/disk/design_disk/modkit_disc/bounty,/obj/item/disk/design_disk/modkit_disc/resonator_blast,/obj/item/disk/design_disk/modkit_disc/rapid_repeater)
+ loot = list(/obj/effect/decal/remains/plasma, ,/obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe,
+ /obj/item/disk/design_disk/modkit_disc/bounty,/obj/item/disk/design_disk/modkit_disc/resonator_blast,/obj/item/disk/design_disk/modkit_disc/rapid_repeater)
wander = FALSE
del_on_death = TRUE
blood_volume = BLOOD_VOLUME_NORMAL
@@ -337,11 +339,11 @@ Difficulty: Extremely Hard
id = "ice_block_talisman"
duration = 25
status_type = STATUS_EFFECT_REFRESH
- alert_type = /obj/screen/alert/status_effect/ice_block_talisman
+ alert_type = /atom/movable/screen/alert/status_effect/ice_block_talisman
/// Stored icon overlay for the hit mob, removed when effect is removed
var/icon/cube
-/obj/screen/alert/status_effect/ice_block_talisman
+/atom/movable/screen/alert/status_effect/ice_block_talisman
name = "Frozen Solid"
desc = "You're frozen inside an ice cube, and cannot move!"
icon_state = "frozen"
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
index f2ece50af2..24e595ef7e 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
@@ -102,23 +102,13 @@
consume_bait()
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/proc/consume_bait()
- var/list/L = list()
- for(var/obj/O in view(src, 9))
- L += O
- var/obj/item/stack/ore/diamond/diamonds = locate(/obj/item/stack/ore/diamond) in L
- if(diamonds)
- var/distanced = 0
- distanced = get_dist(loc,diamonds.loc)
- if(distanced <= 1 && diamonds)
- qdel(diamonds)
- src.visible_message("[src] consumes [diamonds], and it disappears! ...At least, you think.")
- var/obj/item/pen/survival/bait = locate(/obj/item/pen/survival) in L
- if(bait)
- var/distanceb = 0
- distanceb = get_dist(loc,bait.loc)
- if(distanceb <= 1 && bait)
- qdel(bait)
- visible_message("[src] examines [bait] closer, and telekinetically shatters the pen.")
+ for(var/obj/O in view(1, src))
+ if(istype(O, /obj/item/stack/ore/diamond))
+ qdel(O)
+ src.visible_message("[src] consumes [O], and it disappears! ...At least, you think.")
+ else if(istype(O, /obj/item/pen/survival))
+ qdel(O)
+ src.visible_message("[src] examines [O] closer, and telekinetically shatters the pen.")
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random/Initialize()
. = ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
index e347056924..d677f59440 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
@@ -113,7 +113,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
severity = 7
hud_used.healths.icon_state = "elite_health[severity]"
if(severity > 0)
- overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
+ overlay_fullscreen("brute", /atom/movable/screen/fullscreen/brute, severity)
else
clear_fullscreen("brute")
diff --git a/code/modules/mob/living/simple_animal/hostile/regalrat.dm b/code/modules/mob/living/simple_animal/hostile/regalrat.dm
index 77731f0ea4..950da865f6 100644
--- a/code/modules/mob/living/simple_animal/hostile/regalrat.dm
+++ b/code/modules/mob/living/simple_animal/hostile/regalrat.dm
@@ -35,14 +35,16 @@
coffer.Grant(src)
riot = new /datum/action/cooldown/riot
riot.Grant(src)
+ AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS)
+ INVOKE_ASYNC(src, .proc/poll_for_player)
+
+/mob/living/simple_animal/hostile/regalrat/proc/poll_for_player()
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as the Royal Rat, cheesey be his crown?", ROLE_SENTIENCE, null, FALSE, 100, POLL_IGNORE_SENTIENCE_POTION)
if(LAZYLEN(candidates) && !mind)
var/mob/dead/observer/C = pick(candidates)
key = C.key
notify_ghosts("All rise for the rat king, ascendant to the throne in \the [get_area(src)].", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE)
- AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS)
-
/mob/living/simple_animal/hostile/regalrat/handle_automated_action()
if(prob(20))
riot.Trigger()
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
index 5750d1ecb9..e2f83677d8 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
@@ -45,10 +45,10 @@
/mob/living/simple_animal/hostile/retaliate/clown/handle_temperature_damage()
if(bodytemperature < minbodytemp)
adjustBruteLoss(10)
- throw_alert("temp", /obj/screen/alert/cold, 2)
+ throw_alert("temp", /atom/movable/screen/alert/cold, 2)
else if(bodytemperature > maxbodytemp)
adjustBruteLoss(15)
- throw_alert("temp", /obj/screen/alert/hot, 3)
+ throw_alert("temp", /atom/movable/screen/alert/hot, 3)
else
clear_alert("temp")
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index 0e106caf46..978d58339d 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -50,12 +50,12 @@
if(isopenturf(loc))
var/turf/open/T = src.loc
if(T.air)
- var/co2 = T.air.get_moles(/datum/gas/carbon_dioxide)
+ var/co2 = T.air.get_moles(GAS_CO2)
if(co2 > 0)
if(prob(25))
var/amt = min(co2, 9)
- T.air.adjust_moles(/datum/gas/carbon_dioxide, -amt)
- T.atmos_spawn_air("o2=[amt]")
+ T.air.adjust_moles(GAS_CO2, -amt)
+ T.atmos_spawn_air("o2=[amt];TEMP=293.15")
/mob/living/simple_animal/hostile/tree/AttackingTarget()
. = ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/zombie.dm b/code/modules/mob/living/simple_animal/hostile/zombie.dm
index 1217084ce3..ecb5cd2290 100644
--- a/code/modules/mob/living/simple_animal/hostile/zombie.dm
+++ b/code/modules/mob/living/simple_animal/hostile/zombie.dm
@@ -30,6 +30,7 @@
setup_visuals()
/mob/living/simple_animal/hostile/zombie/proc/setup_visuals()
+ set waitfor = FALSE
var/datum/preferences/dummy_prefs = new
dummy_prefs.pref_species = new /datum/species/zombie
dummy_prefs.be_random_body = TRUE
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index e46c57f245..65c553b11d 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -264,10 +264,10 @@
var/turf/open/ST = src.loc
if(ST.air)
- var/tox = ST.air.get_moles(/datum/gas/plasma)
- var/oxy = ST.air.get_moles(/datum/gas/oxygen)
- var/n2 = ST.air.get_moles(/datum/gas/nitrogen)
- var/co2 = ST.air.get_moles(/datum/gas/carbon_dioxide)
+ var/tox = ST.air.get_moles(GAS_PLASMA)
+ var/oxy = ST.air.get_moles(GAS_O2)
+ var/n2 = ST.air.get_moles(GAS_N2)
+ var/co2 = ST.air.get_moles(GAS_CO2)
if(atmos_requirements["min_oxy"] && oxy < atmos_requirements["min_oxy"])
. = FALSE
@@ -554,7 +554,7 @@
var/oindex = active_hand_index
active_hand_index = hand_index
if(hud_used)
- var/obj/screen/inventory/hand/H
+ var/atom/movable/screen/inventory/hand/H
H = hud_used.hand_slots["[hand_index]"]
if(H)
H.update_icon()
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index 600222df68..2ce355a0ef 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -129,7 +129,7 @@
Tempstun = 0
if(stat != DEAD)
- var/bz_percentage = environment.total_moles() ? (environment.get_moles(/datum/gas/bz) / environment.total_moles()) : 0
+ var/bz_percentage = environment.total_moles() ? (environment.get_moles(GAS_BZ) / environment.total_moles()) : 0
var/stasis = (bz_percentage >= 0.05 && bodytemperature < (T0C + 100)) || force_stasis
if(stat == CONSCIOUS && stasis)
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index f6169be902..68de074e07 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -129,7 +129,7 @@
coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
regenerate_icons()
-/mob/living/simple_animal/slime/proc/update_name()
+/mob/living/simple_animal/slime/update_name()
if(slime_name_regex.Find(name))
number = rand(1, 1000)
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
diff --git a/code/modules/mob/living/stamina_buffer.dm b/code/modules/mob/living/stamina_buffer.dm
index a410df582b..91811e048a 100644
--- a/code/modules/mob/living/stamina_buffer.dm
+++ b/code/modules/mob/living/stamina_buffer.dm
@@ -35,11 +35,10 @@
return
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/out_of_combat_timer, out_of_combat_timer)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/base_regeneration, base_regeneration)
- CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/combat_regeneration, combat_regeneration)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/percent_regeneration_out_of_combat, percent_regeneration_out_of_combat)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/post_action_penalty_delay, post_action_penalty_delay)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/post_action_penalty_factor, post_action_penalty_factor)
- var/base_regen = (SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))? base_regeneration : combat_regeneration
+ var/base_regen = base_regeneration
var/time_since_last_action = world.time - stamina_buffer_last_use
var/action_penalty = ((time_since_last_action) < (post_action_penalty_delay * 10))? post_action_penalty_factor : 1
var/out_of_combat_bonus = (time_since_last_action < (out_of_combat_timer * 10))? 0 : ((buffer_max * percent_regeneration_out_of_combat * 0.01))
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
index 87fd0cf609..02e88e3741 100644
--- a/code/modules/mob/living/status_procs.dm
+++ b/code/modules/mob/living/status_procs.dm
@@ -4,7 +4,8 @@
// ignore_castun = same logic as Paralyze() in general
// override_duration = If this is set, does Paralyze() for this duration.
// override_stam = If this is set, does this amount of stamina damage.
-/mob/living/proc/DefaultCombatKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg)
+// knocktofloor - whether to knock them to the ground
+/mob/living/proc/DefaultCombatKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg, knocktofloor = TRUE)
if(!iscarbon(src))
return Paralyze(amount, updating, ignore_canknockdown)
if(!ignore_canknockdown && !(status_flags & CANKNOCKDOWN))
@@ -13,7 +14,8 @@
buckled.unbuckle_mob(src)
var/drop_items = amount > 80 //80 is cutoff for old item dropping behavior
var/stamdmg = isnull(override_stamdmg)? (amount * 0.25) : override_stamdmg
- KnockToFloor(drop_items, TRUE, updating)
+ if(knocktofloor)
+ KnockToFloor(drop_items, TRUE, updating)
adjustStaminaLoss(stamdmg)
if(!isnull(override_hardstun))
Paralyze(override_hardstun)
@@ -597,7 +599,7 @@
/mob/living/proc/become_nearsighted(source)
if(!HAS_TRAIT(src, TRAIT_NEARSIGHT))
- overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
+ overlay_fullscreen("nearsighted", /atom/movable/screen/fullscreen/impaired, 1)
ADD_TRAIT(src, TRAIT_NEARSIGHT, source)
/mob/living/proc/cure_husk(source)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 824e262ae1..efb4512bca 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -70,7 +70,7 @@
t += "Temperature: [environment.return_temperature()] \n"
for(var/id in environment.get_gases())
if(environment.get_moles(id))
- t+="[GLOB.meta_gas_names[id]]: [environment.get_moles(id)] \n"
+ t+="[GLOB.gas_data.names[id]]: [environment.get_moles(id)] \n"
to_chat(usr, t)
@@ -884,7 +884,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
/mob/proc/sync_lighting_plane_alpha()
if(hud_used)
- var/obj/screen/plane_master/lighting/L = hud_used.plane_masters["[LIGHTING_PLANE]"]
+ var/atom/movable/screen/plane_master/lighting/L = hud_used.plane_masters["[LIGHTING_PLANE]"]
if (L)
L.alpha = lighting_alpha
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index ba2399b831..b77b9913ba 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -142,7 +142,7 @@
var/registered_z
- var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly
+ var/list/alerts = list() // contains /atom/movable/screen/alert only // On /mob so clientless mobs will throw alerts properly
var/list/screens = list()
var/list/client_colours = list()
var/hud_type = /datum/hud
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 4b0f505067..5bfc6fe652 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -362,7 +362,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(flashwindow)
window_flash(O.client)
if(source)
- var/obj/screen/alert/notify_action/A = O.throw_alert("[REF(source)]_notify_action", /obj/screen/alert/notify_action)
+ var/atom/movable/screen/alert/notify_action/A = O.throw_alert("[REF(source)]_notify_action", /atom/movable/screen/alert/notify_action)
if(A)
if(O.client.prefs && O.client.prefs.UI_style)
A.icon = ui_style2icon(O.client.prefs.UI_style)
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index 2af68eab46..bfd4cfcd29 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -95,7 +95,7 @@
. = ..()
if((direction & (direction - 1)) && mob.loc == n) //moved diagonally successfully
- add_delay *= 2
+ add_delay *= SQRT_2
mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay), FALSE)
move_delay += add_delay
if(.) // If mob is null here, we deserve the runtime
@@ -267,7 +267,7 @@
//1: r-leg 2: groin 3: l-leg
/client/proc/check_has_body_select()
- return mob && mob.hud_used && mob.hud_used.zone_select && istype(mob.hud_used.zone_select, /obj/screen/zone_sel)
+ return mob && mob.hud_used && mob.hud_used.zone_select && istype(mob.hud_used.zone_select, /atom/movable/screen/zone_sel)
/client/verb/body_toggle_head()
set name = "body-toggle-head"
@@ -285,7 +285,7 @@
else
next_in_line = BODY_ZONE_HEAD
- var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
+ var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(next_in_line, mob)
/client/verb/body_r_arm()
@@ -295,7 +295,7 @@
if(!check_has_body_select())
return
- var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
+ var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(BODY_ZONE_R_ARM, mob)
/client/verb/body_chest()
@@ -305,7 +305,7 @@
if(!check_has_body_select())
return
- var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
+ var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(BODY_ZONE_CHEST, mob)
/client/verb/body_l_arm()
@@ -315,7 +315,7 @@
if(!check_has_body_select())
return
- var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
+ var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(BODY_ZONE_L_ARM, mob)
/client/verb/body_r_leg()
@@ -325,7 +325,7 @@
if(!check_has_body_select())
return
- var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
+ var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(BODY_ZONE_R_LEG, mob)
/client/verb/body_groin()
@@ -335,7 +335,7 @@
if(!check_has_body_select())
return
- var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
+ var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(BODY_ZONE_PRECISE_GROIN, mob)
/client/verb/body_l_leg()
@@ -345,7 +345,7 @@
if(!check_has_body_select())
return
- var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
+ var/atom/movable/screen/zone_sel/selector = mob.hud_used.zone_select
selector.set_selected_zone(BODY_ZONE_L_LEG, mob)
/client/verb/toggle_walk_run()
@@ -364,7 +364,7 @@
return FALSE
m_intent = MOVE_INTENT_RUN
if(hud_used && hud_used.static_inventory)
- for(var/obj/screen/mov_intent/selector in hud_used.static_inventory)
+ for(var/atom/movable/screen/mov_intent/selector in hud_used.static_inventory)
selector.update_icon()
/mob/verb/up()
diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm
index 94bf45c1b0..88bb526188 100644
--- a/code/modules/mob/say_vr.dm
+++ b/code/modules/mob/say_vr.dm
@@ -144,33 +144,14 @@
message = "[user][user.say_emphasis(message)]"
var/list/show_to = list()
- var/list/processing = list()
- var/safety = 25
+ var/list/processed = list()
for(var/obj/structure/table/T in range(user, 1))
- processing |= T
- for(var/i = 1; i <= processing.len; ++i)
- var/obj/structure/table/T = processing[i]
- if(safety-- <= 0)
- to_chat(user, "Table scan aborted early, some people might have not received the message (max 25)")
- break
- if(get_dist(T, user) > 7)
- continue // nah
- processing |= T
- for(var/mob/living/M in range(T, 1)) // no ghosts/cameramobs
- show_to |= M
- var/obj/structure/table/other
- other = locate() in get_step(T, NORTH)
- if(other)
- processing |= other
- other = locate() in get_step(T, SOUTH)
- if(other)
- processing |= other
- other = locate() in get_step(T, WEST)
- if(other)
- processing |= other
- other = locate() in get_step(T, EAST)
- if(other)
- processing |= other
+ if(processed[T])
+ continue
+ for(var/obj/structure/table/T2 in T.connected_floodfill(25))
+ processed[T2] = TRUE
+ for(var/mob/living/L in range(T2, 1))
+ show_to |= L
for(var/i in show_to)
var/mob/M = i
diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm
index fbef8fd244..089484ea9f 100644
--- a/code/modules/mob/status_procs.dm
+++ b/code/modules/mob/status_procs.dm
@@ -52,8 +52,8 @@
/mob/proc/update_blindness()
if(eye_blind) // UNCONSCIOUS or has blind trait, or has temporary blindness
if(stat == CONSCIOUS || stat == SOFT_CRIT)
- throw_alert("blind", /obj/screen/alert/blind)
- overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
+ throw_alert("blind", /atom/movable/screen/alert/blind)
+ overlay_fullscreen("blind", /atom/movable/screen/fullscreen/blind)
// You are blind why should you be able to make out details like color, only shapes near you
// add_client_colour(/datum/client_colour/monochrome/blind)
else // CONSCIOUS no blind trait, no blindness
@@ -91,7 +91,7 @@
var/list/screens = list(hud_used.plane_masters["[GAME_PLANE]"], hud_used.plane_masters["[FLOOR_PLANE]"],
hud_used.plane_masters["[WALL_PLANE]"], hud_used.plane_masters["[ABOVE_WALL_PLANE]"])
for(var/A in screens)
- var/obj/screen/plane_master/P = A
+ var/atom/movable/screen/plane_master/P = A
P.add_filter("blurry_eyes", 2, EYE_BLUR(clamp(eye_blurry*0.1,0.6,3)))
/mob/proc/remove_eyeblur()
@@ -100,7 +100,7 @@
var/list/screens = list(hud_used.plane_masters["[GAME_PLANE]"], hud_used.plane_masters["[FLOOR_PLANE]"],
hud_used.plane_masters["[WALL_PLANE]"], hud_used.plane_masters["[ABOVE_WALL_PLANE]"])
for(var/A in screens)
- var/obj/screen/plane_master/P = A
+ var/atom/movable/screen/plane_master/P = A
P.remove_filter("blurry_eyes")
///Adjust the drugginess of a mob
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index 131a098258..635ec2e54c 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -123,7 +123,7 @@
/obj/item/modular_computer/MouseDrop(obj/over_object, src_location, over_location)
var/mob/M = usr
- if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src, BE_CLOSE))
+ if((!istype(over_object, /atom/movable/screen)) && usr.canUseTopic(src, BE_CLOSE))
return attack_self(M)
return ..()
@@ -349,6 +349,7 @@
// Relays kill program request to currently active program. Use this to quit current program.
/obj/item/modular_computer/proc/kill_program(forced = FALSE)
+ set waitfor = FALSE
if(active_program)
active_program.kill_program(forced)
active_program = null
diff --git a/code/modules/modular_computers/computers/item/laptop.dm b/code/modules/modular_computers/computers/item/laptop.dm
index aee5dd4229..5686dec8d0 100644
--- a/code/modules/modular_computers/computers/item/laptop.dm
+++ b/code/modules/modular_computers/computers/item/laptop.dm
@@ -68,11 +68,11 @@
try_toggle_open(usr)
/obj/item/modular_computer/laptop/MouseDrop(obj/over_object, src_location, over_location)
- if(istype(over_object, /obj/screen/inventory/hand) || over_object == usr)
- var/obj/screen/inventory/hand/H = over_object
+ if(istype(over_object, /atom/movable/screen/inventory/hand) || over_object == usr)
+ var/atom/movable/screen/inventory/hand/H = over_object
var/mob/M = usr
- if(!istype(over_object, /obj/screen/inventory/hand))
+ if(!istype(over_object, /atom/movable/screen/inventory/hand))
M.put_in_active_hand(src)
return
diff --git a/code/modules/modular_computers/file_system/programs/atmosscan.dm b/code/modules/modular_computers/file_system/programs/atmosscan.dm
index 7c491712fe..1576a5b4b7 100644
--- a/code/modules/modular_computers/file_system/programs/atmosscan.dm
+++ b/code/modules/modular_computers/file_system/programs/atmosscan.dm
@@ -31,7 +31,7 @@
for(var/id in env_gases)
var/gas_level = environment.get_moles(id)/total_moles
if(gas_level > 0)
- airlist += list(list("name" = "[GLOB.meta_gas_names[id]]", "percentage" = round(gas_level*100, 0.01)))
+ airlist += list(list("name" = "[GLOB.gas_data.names[id]]", "percentage" = round(gas_level*100, 0.01)))
data["AirData"] = airlist
else
data["AirPressure"] = 0
diff --git a/code/modules/modular_computers/file_system/programs/secureye.dm b/code/modules/modular_computers/file_system/programs/secureye.dm
index 78e72640ed..92275b1e8b 100644
--- a/code/modules/modular_computers/file_system/programs/secureye.dm
+++ b/code/modules/modular_computers/file_system/programs/secureye.dm
@@ -21,10 +21,10 @@
// Stuff needed to render the map
var/map_name
- var/obj/screen/map_view/cam_screen
+ var/atom/movable/screen/map_view/cam_screen
/// All the plane masters that need to be applied.
var/list/cam_plane_masters
- var/obj/screen/background/cam_background
+ var/atom/movable/screen/background/cam_background
/datum/computer_file/program/secureye/New()
. = ..()
@@ -42,8 +42,8 @@
cam_screen.del_on_map_removal = FALSE
cam_screen.screen_loc = "[map_name]:1,1"
cam_plane_masters = list()
- for(var/plane in subtypesof(/obj/screen/plane_master))
- var/obj/screen/instance = new plane()
+ for(var/plane in subtypesof(/atom/movable/screen/plane_master))
+ var/atom/movable/screen/instance = new plane()
instance.assigned_map = map_name
instance.del_on_map_removal = FALSE
instance.screen_loc = "[map_name]:CENTER"
diff --git a/code/modules/modular_computers/file_system/programs/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/sm_monitor.dm
index 7ef2f7416a..6c9ce59c72 100644
--- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm
+++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm
@@ -139,13 +139,13 @@
var/amount = air.get_moles(gasid)
if(amount)
gasdata.Add(list(list(
- "name"= GLOB.meta_gas_names[gasid],
+ "name"= GLOB.gas_data.names[gasid],
"amount" = round(100*amount/air.total_moles(),0.01))))
else
for(var/gasid in air.get_gases())
gasdata.Add(list(list(
- "name"= GLOB.meta_gas_names[gasid],
+ "name"= GLOB.gas_data.names[gasid],
"amount" = 0)))
data["gases"] = gasdata
diff --git a/code/modules/movespeed/modifiers/reagents.dm b/code/modules/movespeed/modifiers/reagents.dm
index 1a03e8a602..ca0a74d749 100644
--- a/code/modules/movespeed/modifiers/reagents.dm
+++ b/code/modules/movespeed/modifiers/reagents.dm
@@ -2,17 +2,53 @@
blacklisted_movetypes = (FLYING|FLOATING)
/datum/movespeed_modifier/reagent/stimulants
- multiplicative_slowdown = -0.5
+ multiplicative_slowdown = -0.55
+
+/datum/movespeed_modifier/reagent/ephedrine
+ // strong painkiller effect that caps out at slightly above runspeed
+ multiplicative_slowdown = -1.5
+ priority = -100
+ complex_calculation = TRUE
+ absolute_max_tiles_per_second = 7
+
+/datum/movespeed_modifier/reagent/pepperspray
+ multiplicative_slowdown = 0.25
+
+/datum/movespeed_modifier/reagent/monkey_energy
+ multiplicative_slowdown = -0.35
/datum/movespeed_modifier/reagent/changelinghaste
- multiplicative_slowdown = -2
+ // extremely strong painkiller effect: allows user to run at old sprint speeds but not over by cancelling out slowdowns.
+ // however, will not make user go faster than that
+ multiplicative_slowdown = -4
+ priority = -100
+ complex_calculation = TRUE
+ absolute_max_tiles_per_second = 8
+
+/datum/movespeed_modifier/reagent/methamphetamine
+ // very strong painkiller effect that caps out at slightly above runspeed
+ multiplicative_slowdown = -2.5
+ priority = -100
+ complex_calculation = TRUE
+ absolute_max_tiles_per_second = 7.5
+
+/datum/movespeed_modifier/reagent/nitryl
+ multiplicative_slowdown = -0.65
+
+/datum/movespeed_modifier/reagent/freon
+ multiplicative_slowdown = 1.6
+
+/datum/movespeed_modifier/reagent/halon
+ multiplicative_slowdown = 1.8
+
+/datum/movespeed_modifier/reagent/lenturi
+ multiplicative_slowdown = 1.5
+
+/datum/movespeed_modifier/reagent/nuka_cola
+ multiplicative_slowdown = -0.35
+
+/datum/movespeed_modifier/reagent/nooartrium
+ multiplicative_slowdown = 2
/datum/movespeed_modifier/reagent/skooma
multiplicative_slowdown = -1
-
-/datum/movespeed_modifier/reagent/nitryl
- multiplicative_slowdown = -1
-
-/datum/movespeed_modifier/reagent/meth
- multiplicative_slowdown = -0.5
- absolute_max_tiles_per_second = 11
diff --git a/code/modules/movespeed/modifiers/status_effects.dm b/code/modules/movespeed/modifiers/status_effects.dm
index 1a017c25b0..260ee17c21 100644
--- a/code/modules/movespeed/modifiers/status_effects.dm
+++ b/code/modules/movespeed/modifiers/status_effects.dm
@@ -45,3 +45,17 @@
/datum/movespeed_modifier/status_effect/mkultra
multiplicative_slowdown = -2
blacklisted_movetypes= FLYING|FLOATING
+
+/datum/movespeed_modifier/status_effect/stagger
+ variable = TRUE
+
+/datum/movespeed_modifier/status_effect/off_balance
+ variable = TRUE
+
+/datum/movespeed_modifier/status_effect/slime/light_pink
+ // decently good painkiller + speedup effect
+ blacklisted_movetypes = FLYING | FLOATING
+ priority = -150 // someday we really need to make these defines lmao
+ multiplicative_slowdown = -2
+ complex_calculation = TRUE
+ absolute_max_tiles_per_second = 7
diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm
index f5cb6e1a10..2bb743abbd 100644
--- a/code/modules/paperwork/paper_cutter.dm
+++ b/code/modules/paperwork/paper_cutter.dm
@@ -101,8 +101,8 @@
if(over_object == M)
M.put_in_hands(src)
- else if(istype(over_object, /obj/screen/inventory/hand))
- var/obj/screen/inventory/hand/H = over_object
+ else if(istype(over_object, /atom/movable/screen/inventory/hand))
+ var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
add_fingerprint(M)
diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm
index 16a9ed33ed..6775532614 100644
--- a/code/modules/paperwork/paperbin.dm
+++ b/code/modules/paperwork/paperbin.dm
@@ -52,8 +52,8 @@
if(over_object == M)
M.put_in_hands(src)
- else if(istype(over_object, /obj/screen/inventory/hand))
- var/obj/screen/inventory/hand/H = over_object
+ else if(istype(over_object, /atom/movable/screen/inventory/hand))
+ var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
add_fingerprint(M)
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index ccb841dec8..515349d666 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -1,44 +1,104 @@
-//update_state
-#define UPSTATE_CELL_IN (1<<0)
-#define UPSTATE_OPENED1 (1<<1)
-#define UPSTATE_OPENED2 (1<<2)
-#define UPSTATE_MAINT (1<<3)
-#define UPSTATE_BROKE (1<<4)
-#define UPSTATE_BLUESCREEN (1<<5)
-#define UPSTATE_WIREEXP (1<<6)
-#define UPSTATE_ALLGOOD (1<<7)
-
-#define APC_RESET_EMP "emp"
-
-//update_overlay
-#define APC_UPOVERLAY_CHARGEING0 (1<<0)
-#define APC_UPOVERLAY_CHARGEING1 (1<<1)
-#define APC_UPOVERLAY_CHARGEING2 (1<<2)
-#define APC_UPOVERLAY_EQUIPMENT0 (1<<3)
-#define APC_UPOVERLAY_EQUIPMENT1 (1<<4)
-#define APC_UPOVERLAY_EQUIPMENT2 (1<<5)
-#define APC_UPOVERLAY_LIGHTING0 (1<<6)
-#define APC_UPOVERLAY_LIGHTING1 (1<<7)
-#define APC_UPOVERLAY_LIGHTING2 (1<<8)
-#define APC_UPOVERLAY_ENVIRON0 (1<<9)
-#define APC_UPOVERLAY_ENVIRON1 (1<<10)
-#define APC_UPOVERLAY_ENVIRON2 (1<<11)
-#define APC_UPOVERLAY_LOCKED (1<<12)
-#define APC_UPOVERLAY_OPERATING (1<<13)
-
-#define APC_ELECTRONICS_MISSING 0 // None
-#define APC_ELECTRONICS_INSTALLED 1 // Installed but not secured
-#define APC_ELECTRONICS_SECURED 2 // Installed and secured
+// APC electronics status:
+/// There are no electronics in the APC.
+#define APC_ELECTRONICS_MISSING 0
+/// The electronics are installed but not secured.
+#define APC_ELECTRONICS_INSTALLED 1
+/// The electronics are installed and secured.
+#define APC_ELECTRONICS_SECURED 2
+// APC cover status:
+/// The APCs cover is closed.
#define APC_COVER_CLOSED 0
+/// The APCs cover is open.
#define APC_COVER_OPENED 1
+/// The APCs cover is missing.
#define APC_COVER_REMOVED 2
+// APC charging status:
+/// The APC is not charging.
#define APC_NOT_CHARGING 0
+/// The APC is charging.
#define APC_CHARGING 1
+/// The APC is fully charged.
#define APC_FULLY_CHARGED 2
#define MAXIMUM_COG_REGAIN 100 //How much charge drained by an integration cog can be priority-recharged in one processing-tick
+// APC channel status:
+/// The APCs power channel is manually set off.
+#define APC_CHANNEL_OFF 0
+/// The APCs power channel is automatically off.
+#define APC_CHANNEL_AUTO_OFF 1
+/// The APCs power channel is manually set on.
+#define APC_CHANNEL_ON 2
+/// The APCs power channel is automatically on.
+#define APC_CHANNEL_AUTO_ON 3
+
+
+// APC autoset enums:
+/// The APC turns automated and manual power channels off.
+#define AUTOSET_FORCE_OFF 0
+/// The APC turns automated power channels off.
+#define AUTOSET_OFF 2
+/// The APC turns automated power channels on.
+#define AUTOSET_ON 1
+
+// External power status:
+/// The APC either isn't attached to a powernet or there is no power on the external powernet.
+#define APC_NO_POWER 0
+/// The APCs external powernet does not have enough power to charge the APC.
+#define APC_LOW_POWER 1
+/// The APCs external powernet has enough power to charge the APC.
+#define APC_HAS_POWER 2
+
+// Ethereals:
+/// How long it takes an ethereal to drain or charge APCs. Also used as a spam limiter.
+#define APC_DRAIN_TIME (7.5 SECONDS)
+/// How much power ethereals gain/drain from APCs.
+#define APC_POWER_GAIN 200
+
+// Wires & EMPs:
+/// The wire value used to reset the APCs wires after one's EMPed.
+#define APC_RESET_EMP "emp"
+
+// update_state
+// Bitshifts: (If you change the status values to be something other than an int or able to exceed 3 you will need to change these too)
+/// The bit shift for the APCs cover status.
+#define UPSTATE_COVER_SHIFT (0)
+ /// The bitflag representing the APCs cover being open for icon purposes.
+ #define UPSTATE_OPENED1 (APC_COVER_OPENED << UPSTATE_COVER_SHIFT)
+ /// The bitflag representing the APCs cover being missing for icon purposes.
+ #define UPSTATE_OPENED2 (APC_COVER_REMOVED << UPSTATE_COVER_SHIFT)
+
+// Bitflags:
+/// The APC has a power cell.
+#define UPSTATE_CELL_IN (1<<2)
+/// The APC is broken or damaged.
+#define UPSTATE_BROKE (1<<3)
+/// The APC is undergoing maintenance.
+#define UPSTATE_MAINT (1<<4)
+/// The APC is emagged or malfed.
+#define UPSTATE_BLUESCREEN (1<<5)
+/// The APCs wires are exposed.
+#define UPSTATE_WIREEXP (1<<6)
+
+// update_overlay
+// Bitflags:
+/// Bitflag indicating that the APCs operating status overlay should be shown.
+#define UPOVERLAY_OPERATING (1<<0)
+/// Bitflag indicating that the APCs locked status overlay should be shown.
+#define UPOVERLAY_LOCKED (1<<1)
+
+// Bitshifts: (If you change the status values to be something other than an int or able to exceed 3 you will need to change these too)
+/// Bit shift for the charging status of the APC.
+#define UPOVERLAY_CHARGING_SHIFT (2)
+/// Bit shift for the equipment status of the APC.
+#define UPOVERLAY_EQUIPMENT_SHIFT (4)
+/// Bit shift for the lighting channel status of the APC.
+#define UPOVERLAY_LIGHTING_SHIFT (6)
+/// Bit shift for the environment channel status of the APC.
+#define UPOVERLAY_ENVIRON_SHIFT (8)
+///Update for hijack overlays
+#define UPOVERLAY_HIJACKED (10)
// the Area Power Controller (APC), formerly Power Distribution Unit (PDU)
// one per area, needs wire connection to power network through a terminal
@@ -51,12 +111,13 @@
name = "area power controller"
desc = "A control terminal for the area's electrical systems."
plane = ABOVE_WALL_PLANE
+
icon_state = "apc0"
use_power = NO_POWER_USE
req_access = null
max_integrity = 300
integrity_failure = 0.17
- var/damage_deflection = 10
+ damage_deflection = 10
resistance_flags = FIRE_PROOF
armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 100, "bomb" = 30, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50)
req_access = list(ACCESS_ENGINE_EQUIP)
@@ -66,29 +127,29 @@
var/area/area
var/areastring = null
var/obj/item/stock_parts/cell/cell
- var/start_charge = 90 // initial cell charge %
- var/cell_type = /obj/item/stock_parts/cell/upgraded //Base cell has 2500 capacity. Enter the path of a different cell you want to use. cell determines charge rates, max capacity, ect. These can also be changed with other APC vars, but isn't recommended to minimize the risk of accidental usage of dirty editted APCs
+ var/start_charge = 90 // initial cell charge %
+ var/cell_type = /obj/item/stock_parts/cell/upgraded //Base cell has 2500 capacity. Enter the path of a different cell you want to use. cell determines charge rates, max capacity, ect. These can also be changed with other APC vars, but isn't recommended to minimize the risk of accidental usage of dirty editted APCs
var/opened = APC_COVER_CLOSED
- var/shorted = 0
- var/lighting = 3
- var/equipment = 3
- var/environ = 3
+ var/shorted = FALSE
+ var/lighting = APC_CHANNEL_AUTO_ON
+ var/equipment = APC_CHANNEL_AUTO_ON
+ var/environ = APC_CHANNEL_AUTO_ON
var/operating = TRUE
var/charging = APC_NOT_CHARGING
var/chargemode = 1
var/chargecount = 0
var/locked = TRUE
var/coverlocked = TRUE
- var/aidisabled = 0
+ var/aidisabled = FALSE
var/tdir = null
var/obj/machinery/power/terminal/terminal = null
var/lastused_light = 0
var/lastused_equip = 0
var/lastused_environ = 0
var/lastused_total = 0
- var/main_status = 0 // Whether or not there's external power. 0 is "none", 1 is "insufficient", 2 is "charging".
- powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
- var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
+ var/main_status = 0
+ powernet = FALSE // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
+ var/malfhack = FALSE //New var for my changes to AI malf. --NeoFite
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
var/has_electronics = APC_ELECTRONICS_MISSING // 0 - none, 1 - plugged in, 2 - secured by screwdriver
var/overload = 1 //used for the Blackout malf module
@@ -98,9 +159,9 @@
var/obj/item/clockwork/integration_cog/integration_cog //Is there a cog siphoning power?
var/cog_drained = 0 //How much of the cell's charge was drained by an integration cog, recovering this amount takes priority over the normal APC cell recharge calculations, but comes after powering Essentials.
var/longtermpower = 10
- var/auto_name = 0
+ var/auto_name = FALSE
var/failure_timer = 0
- var/force_update = 0
+ var/force_update = FALSE
var/emergency_lights = FALSE
var/nightshift_lights = FALSE
var/nightshift_requires_auth = FALSE
@@ -119,6 +180,9 @@
/obj/machinery/power/apc/syndicate //general syndicate access
req_access = list(ACCESS_SYNDICATE)
+/obj/machinery/power/apc/away //general away mission access
+ req_access = list(ACCESS_AWAY_GENERAL)
+
/obj/machinery/power/apc/highcap/five_k
cell_type = /obj/item/stock_parts/cell/upgraded/plus
@@ -177,7 +241,6 @@
area = A
if(auto_name)
name = "\improper [A.name] APC"
- update_icon()
make_terminal()
update_nightshift_auth_requirement()
@@ -187,8 +250,9 @@
opened = APC_COVER_OPENED
operating = FALSE
name = "\improper [A.name] APC"
- stat |= MAINT
- update_icon()
+ set_machine_stat(stat | MAINT)
+
+ update_appearance()
addtimer(CALLBACK(src, .proc/update), 5)
GLOB.apcs_list += src
@@ -196,21 +260,36 @@
wires = new /datum/wires/apc(src)
// offset 24 pixels in direction of dir
// this allows the APC to be embedded in a wall, yet still inside an area
+ if (building)
+ setDir(ndir)
+ tdir = dir // to fix Vars bug
setDir(SOUTH)
switch(tdir)
if(NORTH)
- pixel_x = 0
+ if((pixel_y != initial(pixel_y)) && (pixel_y != 23))
+ log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([tdir] | [uppertext(dir2text(tdir))]) has pixel_y value ([pixel_y] - should be 23.)")
pixel_y = 23
if(SOUTH)
- pixel_x = 0
+ if((pixel_y != initial(pixel_y)) && (pixel_y != -23))
+ log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([tdir] | [uppertext(dir2text(tdir))]) has pixel_y value ([pixel_y] - should be -23.)")
pixel_y = -23
if(EAST)
- pixel_y = 0
+ if((pixel_y != initial(pixel_x)) && (pixel_x != 24))
+ log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([tdir] | [uppertext(dir2text(tdir))]) has pixel_x value ([pixel_x] - should be 24.)")
pixel_x = 24
if(WEST)
- pixel_y = 0
+ if((pixel_y != initial(pixel_x)) && (pixel_x != -25))
+ log_mapping("APC: ([src]) at [AREACOORD(src)] with dir ([tdir] | [uppertext(dir2text(tdir))]) has pixel_x value ([pixel_x] - should be -25.)")
pixel_x = -25
+ if (building)
+ area = get_area(src)
+ opened = APC_COVER_OPENED
+ operating = FALSE
+ name = "\improper [get_area_name(area, TRUE)] APC"
+ set_machine_stat(stat | MAINT)
+ update_appearance()
+ addtimer(CALLBACK(src, .proc/update), 5)
/obj/machinery/power/apc/Destroy()
GLOB.apcs_list -= src
@@ -221,6 +300,7 @@
area.power_equip = FALSE
area.power_environ = FALSE
area.power_change()
+ area.poweralert(FALSE, src)
if(occupier)
malfvacate(1)
qdel(wires)
@@ -234,7 +314,7 @@
/obj/machinery/power/apc/handle_atom_del(atom/A)
if(A == cell)
cell = null
- update_icon()
+ update_appearance()
updateUsrDialog()
/obj/machinery/power/apc/proc/make_terminal()
@@ -275,157 +355,130 @@
// update the APC icon to show the three base states
// also add overlays for indicator lights
-/obj/machinery/power/apc/update_icon()
- var/update = check_updates() //returns 0 if no need to update icons.
- // 1 if we need to update the icon_state
- // 2 if we need to update the overlays
- if(!update)
- icon_update_needed = FALSE
+/obj/machinery/power/apc/update_appearance(updates=check_updates())
+ icon_update_needed = FALSE
+ if(!updates)
return
- if(update & 1) // Updating the icon state
- if(update_state & UPSTATE_ALLGOOD)
- icon_state = "apc0"
- else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2))
- var/basestate = "apc[ cell ? "2" : "1" ]"
- if(update_state & UPSTATE_OPENED1)
- if(update_state & (UPSTATE_MAINT|UPSTATE_BROKE))
- icon_state = "apcmaint" //disabled APC cannot hold cell
- else
- icon_state = basestate
- else if(update_state & UPSTATE_OPENED2)
- if (update_state & UPSTATE_BROKE || malfhack)
- icon_state = "[basestate]-b-nocover"
- else
- icon_state = "[basestate]-nocover"
- else if(update_state & UPSTATE_BROKE)
- icon_state = "apc-b"
- else if(update_state & UPSTATE_BLUESCREEN)
- icon_state = "apcemag"
- else if(update_state & UPSTATE_WIREEXP)
- icon_state = "apcewires"
- else if(update_state & UPSTATE_MAINT)
- icon_state = "apc0"
-
- if(!(update_state & UPSTATE_ALLGOOD))
- SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
- var/hijackerreturn
- if (hijacker)
- var/obj/item/implant/hijack/H = hijacker.getImplant(/obj/item/implant/hijack)
- hijackerreturn = H && !H.stealthmode
- if(update & 2)
- SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
- if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD)
- SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", layer, plane, dir)
- SSvis_overlays.add_vis_overlay(src, icon, "apcox-[locked]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
- SSvis_overlays.add_vis_overlay(src, icon, "apco3-[hijackerreturn ? "3" : charging]", layer, plane, dir)
- SSvis_overlays.add_vis_overlay(src, icon, "apco3-[hijackerreturn ? "3" : charging]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
- if(operating)
- SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", layer, plane, dir)
- SSvis_overlays.add_vis_overlay(src, icon, "apco0-[equipment]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
- SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", layer, plane, dir)
- SSvis_overlays.add_vis_overlay(src, icon, "apco1-[lighting]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
- SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", layer, plane, dir)
- SSvis_overlays.add_vis_overlay(src, icon, "apco2-[environ]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
-
+ . = ..()
// And now, separately for cleanness, the lighting changing
- if(update_state & UPSTATE_ALLGOOD)
+ if(!update_state)
switch(charging)
if(APC_NOT_CHARGING)
- light_color = LIGHT_COLOR_RED
+ set_light_color(COLOR_SOFT_RED)
if(APC_CHARGING)
- light_color = LIGHT_COLOR_BLUE
+ set_light_color(LIGHT_COLOR_BLUE)
if(APC_FULLY_CHARGED)
- light_color = LIGHT_COLOR_GREEN
- if (hijackerreturn)
- light_color = LIGHT_COLOR_YELLOW
+ set_light_color(LIGHT_COLOR_GREEN)
set_light(lon_range)
- else if(update_state & UPSTATE_BLUESCREEN)
- light_color = LIGHT_COLOR_BLUE
+ return
+
+ if(update_state & UPSTATE_BLUESCREEN)
+ set_light_color(LIGHT_COLOR_BLUE)
set_light(lon_range)
- else
- set_light(0)
+ return
- icon_update_needed = FALSE
+ set_light(0)
+// update the APC icon to show the three base states
+// also add overlays for indicator lights
+/obj/machinery/power/apc/update_icon_state()
+ if(!update_state)
+ icon_state = "apc0"
+ return ..()
+ if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2))
+ var/basestate = "apc[cell ? 2 : 1]"
+ if(update_state & UPSTATE_OPENED1)
+ icon_state = (update_state & (UPSTATE_MAINT|UPSTATE_BROKE)) ? "apcmaint" : basestate
+ else if(update_state & UPSTATE_OPENED2)
+ icon_state = "[basestate][((update_state & UPSTATE_BROKE) || malfhack) ? "-b" : null]-nocover"
+ return ..()
+ if(update_state & UPSTATE_BROKE)
+ icon_state = "apc-b"
+ return ..()
+ if(update_state & UPSTATE_BLUESCREEN)
+ icon_state = "apcemag"
+ return ..()
+ if(update_state & UPSTATE_WIREEXP)
+ icon_state = "apcewires"
+ return ..()
+ if(update_state & UPSTATE_MAINT)
+ icon_state = "apc0"
+ return ..()
+
+/obj/machinery/power/apc/update_overlays()
+ . = ..()
+ if((stat & (BROKEN|MAINT)) || update_state)
+ return
+
+ . += mutable_appearance(icon, "apcox-[locked]")
+ . += emissive_appearance(icon, "apcox-[locked]")
+ . += mutable_appearance(icon, "apco3-[hijackerreturn() ? "3" : charging]")
+ . += emissive_appearance(icon, "apco3-[hijackerreturn() ? "3" : charging]")
+ if(!operating)
+ return
+
+ . += mutable_appearance(icon, "apco0-[equipment]")
+ . += emissive_appearance(icon, "apco0-[equipment]")
+ . += mutable_appearance(icon, "apco1-[lighting]")
+ . += emissive_appearance(icon, "apco1-[lighting]")
+ . += mutable_appearance(icon, "apco2-[environ]")
+ . += emissive_appearance(icon, "apco2-[environ]")
+
+/// Checks for what icon updates we will need to handle
/obj/machinery/power/apc/proc/check_updates()
- var/last_update_state = update_state
- var/last_update_overlay = update_overlay
- update_state = 0
- update_overlay = 0
+ SIGNAL_HANDLER
+ . = NONE
- if(cell)
- update_state |= UPSTATE_CELL_IN
+ // Handle icon status:
+ var/new_update_state = NONE
if(stat & BROKEN)
- update_state |= UPSTATE_BROKE
+ new_update_state |= UPSTATE_BROKE
if(stat & MAINT)
- update_state |= UPSTATE_MAINT
+ new_update_state |= UPSTATE_MAINT
+
if(opened)
- if(opened==APC_COVER_OPENED)
- update_state |= UPSTATE_OPENED1
- if(opened==APC_COVER_REMOVED)
- update_state |= UPSTATE_OPENED2
+ new_update_state |= (opened << UPSTATE_COVER_SHIFT)
+ if(cell)
+ new_update_state |= UPSTATE_CELL_IN
+
else if((obj_flags & EMAGGED) || malfai)
- update_state |= UPSTATE_BLUESCREEN
+ new_update_state |= UPSTATE_BLUESCREEN
else if(panel_open)
- update_state |= UPSTATE_WIREEXP
- if(update_state <= 1)
- update_state |= UPSTATE_ALLGOOD
+ new_update_state |= UPSTATE_WIREEXP
+ if(new_update_state != update_state)
+ update_state = new_update_state
+ . |= UPDATE_ICON_STATE
+
+ // Handle overlay status:
+ var/new_update_overlay = NONE
if(operating)
- update_overlay |= APC_UPOVERLAY_OPERATING
-
- if(update_state & UPSTATE_ALLGOOD)
+ new_update_overlay |= UPOVERLAY_OPERATING
+ if(!update_state)
if(locked)
- update_overlay |= APC_UPOVERLAY_LOCKED
+ new_update_overlay |= UPOVERLAY_LOCKED
- if(!charging)
- update_overlay |= APC_UPOVERLAY_CHARGEING0
- else if(charging == APC_CHARGING)
- update_overlay |= APC_UPOVERLAY_CHARGEING1
- else if(charging == APC_FULLY_CHARGED)
- update_overlay |= APC_UPOVERLAY_CHARGEING2
+ new_update_overlay |= (charging << UPOVERLAY_CHARGING_SHIFT)
+ new_update_overlay |= (equipment << UPOVERLAY_EQUIPMENT_SHIFT)
+ new_update_overlay |= (lighting << UPOVERLAY_LIGHTING_SHIFT)
+ new_update_overlay |= (environ << UPOVERLAY_ENVIRON_SHIFT)
+ new_update_overlay |= (hijackerreturn() << UPOVERLAY_HIJACKED)
- if (!equipment)
- update_overlay |= APC_UPOVERLAY_EQUIPMENT0
- else if(equipment == 1)
- update_overlay |= APC_UPOVERLAY_EQUIPMENT1
- else if(equipment == 2)
- update_overlay |= APC_UPOVERLAY_EQUIPMENT2
-
- if(!lighting)
- update_overlay |= APC_UPOVERLAY_LIGHTING0
- else if(lighting == 1)
- update_overlay |= APC_UPOVERLAY_LIGHTING1
- else if(lighting == 2)
- update_overlay |= APC_UPOVERLAY_LIGHTING2
-
- if(!environ)
- update_overlay |= APC_UPOVERLAY_ENVIRON0
- else if(environ==1)
- update_overlay |= APC_UPOVERLAY_ENVIRON1
- else if(environ==2)
- update_overlay |= APC_UPOVERLAY_ENVIRON2
-
- var/results = 0
- var/hijackerreturn
- if (hijacker)
- var/obj/item/implant/hijack/H = hijacker.getImplant(/obj/item/implant/hijack)
- hijackerreturn = H && !H.stealthmode
- if(last_update_state == update_state && last_update_overlay == update_overlay && hijackerreturn == hijackerlast)
- return 0
- if(last_update_state != update_state)
- results += 1
- if(last_update_overlay != update_overlay || hijackerreturn != hijackerlast)
- results += 2
- if (hijackerreturn != hijackerlast)
- hijackerlast = hijackerreturn
- return results
+ if(new_update_overlay != update_overlay)
+ update_overlay = new_update_overlay
+ . |= UPDATE_OVERLAYS
// Used in process so it doesn't update the icon too much
/obj/machinery/power/apc/proc/queue_icon_update()
icon_update_needed = TRUE
+/obj/machinery/power/apc/proc/hijackerreturn()
+ if(!hijacker)
+ return FALSE
+ var/obj/item/implant/hijack/implant = hijacker.getImplant(/obj/item/implant/hijack)
+ if(implant && !implant.stealthmode)
+ return TRUE
//attack with an item - open/close cover, insert cell, or (un)lock interface
/obj/machinery/power/apc/crowbar_act(mob/user, obj/item/W)
@@ -478,7 +531,7 @@
else if (opened!=APC_COVER_REMOVED)
opened = APC_COVER_CLOSED
coverlocked = TRUE //closing cover relocks it
- update_icon()
+ update_appearance()
return
else if (!(stat & BROKEN))
if(coverlocked && !(stat & MAINT)) // locked...
@@ -489,7 +542,7 @@
return
else
opened = APC_COVER_OPENED
- update_icon()
+ update_appearance()
return
/obj/machinery/power/apc/screwdriver_act(mob/living/user, obj/item/W)
@@ -501,11 +554,11 @@
user.visible_message("[user] removes \the [cell] from [src]!","You remove \the [cell].")
var/turf/T = get_turf(user)
cell.forceMove(T)
- cell.update_icon()
+ cell.update_appearance()
cell = null
cog_drained = 0 //No more cell means no more averting celldrain
charging = APC_NOT_CHARGING
- update_icon()
+ update_appearance()
return
else
switch (has_electronics)
@@ -516,28 +569,30 @@
to_chat(user, "You screw the circuit electronics into place.")
if (APC_ELECTRONICS_SECURED)
has_electronics = APC_ELECTRONICS_INSTALLED
- stat |= MAINT
+ set_machine_stat(stat | MAINT)
W.play_tool_sound(src)
to_chat(user, "You unfasten the electronics.")
else
to_chat(user, "There is nothing to secure!")
return
- update_icon()
+ update_appearance()
else if(obj_flags & EMAGGED)
to_chat(user, "The interface is broken!")
return
else
panel_open = !panel_open
to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]")
- update_icon()
+ update_appearance()
/obj/machinery/power/apc/wirecutter_act(mob/living/user, obj/item/W)
+ . = ..()
if (terminal && opened)
terminal.dismantle(user, W)
return TRUE
/obj/machinery/power/apc/welder_act(mob/living/user, obj/item/W)
+ . = ..()
if (opened && !has_electronics && !terminal)
if(!W.tool_start_check(user, amount=3))
return
@@ -563,12 +618,12 @@
if(area.hasSiliconAccessInArea(user) && get_dist(src,user)>1)
return attack_hand(user)
- if (istype(W, /obj/item/stock_parts/cell) && opened)
+ if(istype(W, /obj/item/stock_parts/cell) && opened)
if(cell)
to_chat(user, "There is a power cell already installed!")
return
else
- if (stat & MAINT)
+ if(stat & MAINT)
to_chat(user, "There is no connector for your power cell!")
return
if(!user.transferItemToLoc(W, src))
@@ -578,7 +633,7 @@
"[user.name] has inserted the power cell to [src.name]!",\
"You insert the power cell.")
chargecount = 0
- update_icon()
+ update_appearance()
else if (W.GetID())
togglelock(user)
else if (istype(W, /obj/item/stack/cable_coil) && opened)
@@ -601,16 +656,20 @@
return
user.visible_message("[user.name] adds cables to the APC frame.", \
"You start adding cables to the APC frame...")
- playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
- if(C.use_tool(src, user, 20, 10) && !terminal && opened && has_electronics)
- var/turf/T = get_turf(src)
- var/obj/structure/cable/N = T.get_cable_node()
- if (prob(50) && electrocute_mob(usr, N, N, 1, TRUE))
- do_sparks(5, TRUE, src)
+ playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
+ if(do_after(user, 20, target = src))
+ if (C.get_amount() < 10 || !C)
return
- to_chat(user, "You add cables to the APC frame.")
- make_terminal()
- terminal.connect_to_network()
+ if (C.get_amount() >= 10 && !terminal && opened && has_electronics)
+ var/turf/T = get_turf(src)
+ var/obj/structure/cable/N = T.get_cable_node()
+ if (prob(50) && electrocute_mob(usr, N, N, 1, TRUE))
+ do_sparks(5, TRUE, src)
+ return
+ C.use(10)
+ to_chat(user, "You add cables to the APC frame.")
+ make_terminal()
+ terminal.connect_to_network()
else if (istype(W, /obj/item/electronics/apc) && opened)
if (has_electronics)
to_chat(user, "There is already a board inside the [src]!")
@@ -621,7 +680,7 @@
user.visible_message("[user.name] inserts the power control board into [src].", \
"You start to insert the power control board into the frame...")
- playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
+ playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if(do_after(user, 10, target = src))
if(!has_electronics)
has_electronics = APC_ELECTRONICS_INSTALLED
@@ -652,7 +711,7 @@
chargecount = 0
user.visible_message("[user] fabricates a weak power cell and places it into [src].", \
"Your [P.name] whirrs with strain as you create a weak power cell and place it into [src]!")
- update_icon()
+ update_appearance()
else
to_chat(user, "[src] has both electronics and a cell.")
return
@@ -667,7 +726,7 @@
to_chat(user, "You replace missing APC's cover.")
qdel(W)
opened = APC_COVER_OPENED
- update_icon()
+ update_appearance()
return
if (has_electronics)
to_chat(user, "You cannot repair this APC until you remove the electronics still inside!")
@@ -681,7 +740,7 @@
obj_integrity = max_integrity
if (opened==APC_COVER_REMOVED)
opened = APC_COVER_OPENED
- update_icon()
+ update_appearance()
else if(istype(W, /obj/item/clockwork/integration_cog) && is_servant_of_ratvar(user))
if(integration_cog)
to_chat(user, "This APC already has a cog.")
@@ -690,7 +749,7 @@
user.visible_message("[user] slices [src]'s cover lock, and it swings wide open!", \
"You slice [src]'s cover lock apart with [W], and the cover swings open.")
opened = APC_COVER_OPENED
- update_icon()
+ update_appearance()
else
user.visible_message("[user] presses [W] into [src]!", \
"You hold [W] in place within [src], and it slowly begins to warm up...")
@@ -707,7 +766,7 @@
playsound(src, 'sound/machines/clockcult/steam_whoosh.ogg', 50, FALSE)
opened = APC_COVER_CLOSED
locked = TRUE //Clockies get full APC access on cogged APCs, but they can't lock or unlock em unless they steal some ID to give all of them APC access, soo this is pretty much just QoL for them and makes cogs a tiny bit more stealthy
- update_icon()
+ update_appearance()
return
else if(panel_open && !opened && is_wire_tool(W))
wires.interact(user)
@@ -745,7 +804,7 @@
return TRUE
else if(!cell)
if(stat & MAINT)
- to_chat(user, "There's no connector for a power cell.")
+ to_chat(user, span_warning("There's no connector for a power cell."))
return FALSE
var/obj/item/stock_parts/cell/crap/empty/C = new(src)
C.forceMove(src)
@@ -753,7 +812,7 @@
chargecount = 0
user.visible_message("[user] fabricates a weak power cell and places it into [src].", \
"Your [the_rcd.name] whirrs with strain as you create a weak power cell and place it into [src]!")
- update_icon()
+ update_appearance()
return TRUE
else
to_chat(user, "[src] has both electronics and a cell.")
@@ -777,10 +836,10 @@
else if(stat & (BROKEN|MAINT))
to_chat(user, "Nothing happens!")
else
- if((allowed(usr) || area.hasSiliconAccessInArea(usr)) && !wires.is_cut(WIRE_IDSCAN) && !malfhack)
+ if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack)
locked = !locked
to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.")
- update_icon()
+ update_appearance()
updateUsrDialog()
else
to_chat(user, "Access denied.")
@@ -799,13 +858,9 @@
/obj/machinery/power/apc/obj_break(damage_flag)
- if(!(flags_1 & NODECONSTRUCT_1))
- set_broken()
-
-/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
- if(damage_flag == "melee" && damage_amount < damage_deflection)
- return 0
. = ..()
+ if(.)
+ set_broken()
/obj/machinery/power/apc/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -815,7 +870,7 @@
opened = APC_COVER_REMOVED
coverlocked = FALSE
visible_message("The APC cover is knocked down!")
- update_icon()
+ update_appearance()
/obj/machinery/power/apc/emag_act(mob/user)
. = ..()
@@ -833,7 +888,7 @@
obj_flags |= EMAGGED
locked = FALSE
to_chat(user, "You emag the APC interface.")
- update_icon()
+ update_appearance()
return TRUE
// attack with hand - remove cell (if cover open) or interact with the APC
@@ -883,10 +938,10 @@
if(cell)
user.visible_message("[user] removes \the [cell] from [src]!","You remove \the [cell].")
user.put_in_hands(cell)
- cell.update_icon()
+ cell.update_appearance()
src.cell = null
charging = APC_NOT_CHARGING
- src.update_icon()
+ src.update_appearance()
return
if((stat & MAINT) && !opened) //no board; no interface
return
@@ -975,19 +1030,15 @@
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
/obj/machinery/power/apc/proc/update()
- var/old_light = area.power_light
- var/old_equip = area.power_equip
- var/old_environ = area.power_environ
if(operating && !shorted && !failure_timer)
- area.power_light = (lighting > 1)
- area.power_equip = (equipment > 1)
- area.power_environ = (environ > 1)
+ area.power_light = (lighting > APC_CHANNEL_AUTO_OFF)
+ area.power_equip = (equipment > APC_CHANNEL_AUTO_OFF)
+ area.power_environ = (environ > APC_CHANNEL_AUTO_OFF)
else
area.power_light = FALSE
area.power_equip = FALSE
area.power_environ = FALSE
- if(old_light != area.power_light || old_equip != area.power_equip || old_environ != area.power_environ)
- area.power_change()
+ area.power_change()
/obj/machinery/power/apc/proc/can_use(mob/user, loud = 0) //used by attack_hand() and Topic()
if(IsAdminGhost(user))
@@ -1032,7 +1083,7 @@
to_chat(usr, "The APC does not respond to the command!")
else
locked = !locked
- update_icon()
+ update_appearance()
. = TRUE
if("cover")
coverlocked = !coverlocked
@@ -1047,20 +1098,20 @@
chargemode = !chargemode
if(!chargemode)
charging = APC_NOT_CHARGING
- update_icon()
+ update_appearance()
. = TRUE
if("channel")
if(params["eqp"])
equipment = setsubsystem(text2num(params["eqp"]))
- update_icon()
+ update_appearance()
update()
else if(params["lgt"])
lighting = setsubsystem(text2num(params["lgt"]))
- update_icon()
+ update_appearance()
update()
else if(params["env"])
environ = setsubsystem(text2num(params["env"]))
- update_icon()
+ update_appearance()
update()
. = TRUE
if("overload")
@@ -1075,7 +1126,7 @@
hijacker.toggleSiliconAccessArea(area)
hijacker = null
set_hijacked_lighting()
- update_icon()
+ update_appearance()
var/obj/item/implant/hijack/H = usr.getImplant(/obj/item/implant/hijack)
H.stealthcooldown = world.time + 2 MINUTES
energy_fail(30 SECONDS * (cell.charge / cell.maxcharge))
@@ -1098,7 +1149,7 @@
malfvacate()
if("reboot")
failure_timer = 0
- update_icon()
+ update_appearance()
update()
if("emergency_lighting")
emergency_lights = !emergency_lights
@@ -1116,7 +1167,7 @@
add_hiddenprint(user) //delete when runtime
log_game("[key_name(user)] turned [operating ? "on" : "off"] the [src] in [AREACOORD(src)]")
update()
- update_icon()
+ update_appearance()
/obj/machinery/power/apc/proc/hijack(mob/living/L)
if (!istype(L))
@@ -1133,7 +1184,7 @@
hijacker.toggleSiliconAccessArea(area)
if (L.toggleSiliconAccessArea(area))
hijacker = L
- update_icon()
+ update_appearance()
set_hijacked_lighting()
H.hijacking = FALSE
being_hijacked = FALSE
@@ -1150,7 +1201,7 @@
if (do_after(L,H.stealthmode ? 12 SECONDS : 5 SECONDS,target=src))
if (L.toggleSiliconAccessArea(area))
hijacker = L
- update_icon()
+ update_appearance()
set_hijacked_lighting()
H.hijacking = FALSE
being_hijacked = FALSE
@@ -1176,8 +1227,8 @@
malf.malfhack = src
malf.malfhacking = addtimer(CALLBACK(malf, /mob/living/silicon/ai/.proc/malfhacked, src), 600, TIMER_STOPPABLE)
- var/obj/screen/alert/hackingapc/A
- A = malf.throw_alert("hackingapc", /obj/screen/alert/hackingapc)
+ var/atom/movable/screen/alert/hackingapc/A
+ A = malf.throw_alert("hackingapc", /atom/movable/screen/alert/hackingapc)
A.target = src
/obj/machinery/power/apc/proc/malfoccupy(mob/living/silicon/ai/malf)
@@ -1207,7 +1258,6 @@
add_verb(occupier, /mob/living/silicon/ai/proc/corereturn)
occupier.cancel_camera()
-
/obj/machinery/power/apc/proc/malfvacate(forced)
if(!occupier)
return
@@ -1251,11 +1301,11 @@
return
transfer_in_progress = TRUE
user.visible_message("[user] slots [card] into [src]...", "Transfer process initiated. Sending request for AI approval...")
- playsound(src, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, TRUE)
SEND_SOUND(occupier, sound('sound/misc/notice2.ogg')) //To alert the AI that someone's trying to card them if they're tabbed out
if(alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", "Yes - Transfer Me", "No - Keep Me Here") == "No - Keep Me Here")
to_chat(user, "AI denied transfer request. Process terminated.")
- playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
transfer_in_progress = FALSE
return
if(user.loc != T)
@@ -1300,16 +1350,16 @@
/obj/machinery/power/apc/process()
if(icon_update_needed)
- update_icon()
+ update_appearance()
if(stat & (BROKEN|MAINT))
return
- if(!area.requires_power)
+ if(!area || !area.requires_power)
return
if(failure_timer)
update()
queue_icon_update()
failure_timer--
- force_update = 1
+ force_update = TRUE
return
lastused_light = area.usage(STATIC_LIGHT)
@@ -1327,116 +1377,117 @@
var/last_eq = equipment
var/last_en = environ
var/last_ch = charging
+
var/excess = surplus()
+
if(!avail())
- main_status = 0
+ main_status = APC_NO_POWER
else if(excess < 0)
- main_status = 1
+ main_status = APC_LOW_POWER
else
- main_status = 2
+ main_status = APC_HAS_POWER
- var/cur_excess = excess
- var/cur_used = lastused_total
-
- // first: if we have enough power, power the essentials DIRECTLY
-
- var/environ_satisfied = FALSE
- var/equipment_satisfied = FALSE
- var/lighting_satisfied = FALSE
-
- if(cur_excess >= lastused_environ)
- autoset(environ, 1)
- add_load(lastused_environ)
- cur_excess -= lastused_environ
- cur_used -= lastused_environ
- environ_satisfied = TRUE
-
- if(cur_excess >= lastused_equip)
- autoset(equipment, 1)
- add_load(lastused_equip)
- cur_excess -= lastused_equip
- cur_used -= lastused_equip
- equipment_satisfied = TRUE
-
- if(cur_excess >= lastused_light)
- autoset(lighting, 1)
- add_load(lastused_light)
- cur_excess -= lastused_light
- cur_used -= lastused_light
- lighting_satisfied = TRUE
-
- //If drained by an integration cog: Forcefully avert as much of the powerdrain as possible, though a maximum of MAXIMUM_COG_REGAIN
- if(cur_excess && cog_drained && cell)
- var/cog_regain = cell.give(min(min(cog_drained, cur_excess), MAXIMUM_COG_REGAIN))
- cur_excess -= cog_regain
- cog_drained = max(0, cog_drained - cog_regain)
-
- // next: take from or charge to the cell, depending on how much is left
if(cell && !shorted)
- if(cur_excess > 0)
- var/charging_cell = min(min(cur_excess*GLOB.CELLRATE, cell.maxcharge * GLOB.CHARGELEVEL), cell.maxcharge - cell.charge)
- cell.give(charging_cell)
- add_load(charging_cell/GLOB.CELLRATE)
- lastused_total += charging_cell
- longtermpower = min(10,longtermpower + 1)
- if(chargemode && !charging)
- chargecount++
- if(chargecount == 10)
+ // draw power from cell as before to power the area
+ var/cellused = min(cell.charge, lastused_total JOULES) // clamp deduction to a max, amount left in cell
+ cell.use(cellused)
+ //If drained by an integration cog: Forcefully avert as much of the powerdrain as possible, though a maximum of MAXIMUM_COG_REGAIN
+ if(excess && cog_drained)
+ var/cog_regain = cell.give(min(min(cog_drained, excess), MAXIMUM_COG_REGAIN))
+ excess -= cog_regain
+ cog_drained = max(0, cog_drained - cog_regain)
- chargecount = 0
- charging = APC_CHARGING
- else // not enough power available to run the last tick!
- charging = APC_NOT_CHARGING
- chargecount = 0
- longtermpower = max(-10,longtermpower - 2)
- if(cell.charge >= cur_used)
- cell.use(GLOB.CELLRATE * cur_used)
- else
+ if(excess > lastused_total) // if power excess recharge the cell
+ // by the same amount just used
+ cell.give(cellused)
+ add_load(cellused WATTS) // add the load used to recharge the cell
+ else // no excess, and not enough per-apc
+ if((cell.charge WATTS + excess) >= lastused_total) // can we draw enough from cell+grid to cover last usage?
+ cell.charge = min(cell.maxcharge, cell.charge + excess JOULES) //recharge with what we can
+ add_load(excess) // so draw what we can from the grid
+ charging = APC_NOT_CHARGING
+
+ else // not enough power available to run the last tick!
+ charging = APC_NOT_CHARGING
+ chargecount = 0
// This turns everything off in the case that there is still a charge left on the battery, just not enough to run the room.
- equipment = autoset(equipment, 0)
- lighting = autoset(lighting, 0)
- environ = autoset(environ, 0)
+ equipment = autoset(equipment, AUTOSET_FORCE_OFF)
+ lighting = autoset(lighting, AUTOSET_FORCE_OFF)
+ environ = autoset(environ, AUTOSET_FORCE_OFF)
- // set channels based on remaining charge
- var/cell_percent = cell.percent()
+ // set channels depending on how much charge we have left
- if(cell.charge <= 0) // zero charge, turn all off
- equipment = autoset(equipment, 0)
- lighting = autoset(lighting, 0)
- environ = autoset(environ, 0)
- area.poweralert(0, src)
+ // Allow the APC to operate as normal if the cell can charge
+ if(charging && longtermpower < 10)
+ longtermpower += 1
+ else if(longtermpower > -10)
+ longtermpower -= 2
- else if(cell_percent < 15 && longtermpower < 0) // <15%, turn off lighting & equipment
- equipment = autoset(equipment, 2)
- lighting = autoset(lighting, 2)
- environ = autoset(environ, 1)
- area.poweralert(0, src)
- else if(cell_percent < 30 && longtermpower < 0) // <30%, turn off lighting
- equipment = autoset(equipment, 1)
- lighting = autoset(lighting, 2)
- environ = autoset(environ, 1)
- area.poweralert(0, src)
- else // otherwise all can be on
- equipment = autoset(equipment, 1)
- lighting = autoset(lighting, 1)
- environ = autoset(environ, 1)
- area.poweralert(1, src)
- if(cell_percent > 75)
- area.poweralert(1, src)
+ if(cell.charge <= 0) // zero charge, turn all off
+ equipment = autoset(equipment, AUTOSET_FORCE_OFF)
+ lighting = autoset(lighting, AUTOSET_FORCE_OFF)
+ environ = autoset(environ, AUTOSET_FORCE_OFF)
+ area.poweralert(TRUE, src)
+ else if(cell.percent() < 15 && longtermpower < 0) // <15%, turn off lighting & equipment
+ equipment = autoset(equipment, AUTOSET_OFF)
+ lighting = autoset(lighting, AUTOSET_OFF)
+ environ = autoset(environ, AUTOSET_ON)
+ area.poweralert(TRUE, src)
+ else if(cell.percent() < 30 && longtermpower < 0) // <30%, turn off equipment
+ equipment = autoset(equipment, AUTOSET_OFF)
+ lighting = autoset(lighting, AUTOSET_ON)
+ environ = autoset(environ, AUTOSET_ON)
+ area.poweralert(TRUE, src)
+ else // otherwise all can be on
+ equipment = autoset(equipment, AUTOSET_ON)
+ lighting = autoset(lighting, AUTOSET_ON)
+ environ = autoset(environ, AUTOSET_ON)
+ area.poweralert(FALSE, src)
+ if(cell.percent() > 75)
+ area.poweralert(FALSE, src)
+ // now trickle-charge the cell
+ if(chargemode && charging == APC_CHARGING && operating)
+ if(excess > 0) // check to make sure we have enough to charge
+ // Max charge is capped to % per second constant
+ var/ch = min(excess JOULES, cell.maxcharge JOULES)
+ add_load(ch WATTS) // Removes the power we're taking from the grid
+ cell.give(ch) // actually recharge the cell
+
+ else
+ charging = APC_NOT_CHARGING // stop charging
+ chargecount = 0
// show cell as fully charged if so
if(cell.charge >= cell.maxcharge)
cell.charge = cell.maxcharge
charging = APC_FULLY_CHARGED
- else // no cell, can still run but not very well
+ if(chargemode)
+ if(!charging)
+ if(excess > cell.maxcharge*GLOB.CHARGELEVEL)
+ chargecount++
+ else
+ chargecount = 0
+
+ if(chargecount == 10)
+
+ chargecount = 0
+ charging = APC_CHARGING
+
+ else // chargemode off
+ charging = APC_NOT_CHARGING
+ chargecount = 0
+
+ else // no cell, switch everything off
+
charging = APC_NOT_CHARGING
chargecount = 0
- environ = autoset(environ, environ_satisfied)
- equipment = autoset(equipment, equipment_satisfied)
- lighting = autoset(lighting, lighting_satisfied)
+ equipment = autoset(equipment, AUTOSET_FORCE_OFF)
+ lighting = autoset(lighting, AUTOSET_FORCE_OFF)
+ environ = autoset(environ, AUTOSET_FORCE_OFF)
+ area.poweralert(TRUE, src)
// update icon & area power if anything changed
@@ -1447,19 +1498,54 @@
else if (last_ch != charging)
queue_icon_update()
-// val 0=off, 1=off(auto) 2=on 3=on(auto)
-// on 0=off, 1=on, 2=autooff
-
+/**
+ * Returns the new status value for an APC channel.
+ *
+ * // val 0=off, 1=off(auto) 2=on 3=on(auto)
+ * // on 0=off, 1=on, 2=autooff
+ * TODO: Make this use bitflags instead. It should take at most three lines, but it's out of scope for now.
+ *
+ * Arguments:
+ * - val: The current status of the power channel.
+ * - [APC_CHANNEL_OFF]: The APCs channel has been manually set to off. This channel will not automatically change.
+ * - [APC_CHANNEL_AUTO_OFF]: The APCs channel is running on automatic and is currently off. Can be automatically set to [APC_CHANNEL_AUTO_ON].
+ * - [APC_CHANNEL_ON]: The APCs channel has been manually set to on. This will be automatically changed only if the APC runs completely out of power or is disabled.
+ * - [APC_CHANNEL_AUTO_ON]: The APCs channel is running on automatic and is currently on. Can be automatically set to [APC_CHANNEL_AUTO_OFF].
+ * - on: An enum dictating how to change the channel's status.
+ * - [AUTOSET_FORCE_OFF]: The APC forces the channel to turn off. This includes manually set channels.
+ * - [AUTOSET_ON]: The APC allows automatic channels to turn back on.
+ * - [AUTOSET_OFF]: The APC turns automatic channels off.
+ */
/obj/machinery/power/apc/proc/autoset(val, on)
- if(val == 3 && (on == 2 || !on)) // if auto-on, return auto-off
- return 1
- else if(val == 2 && !on) // if on, return off
- return 0
- else if(on == 1 && val == 1) // if auto-off, return auto-on
- return 3
- // no, i don't understand these comments either
+ if(on == AUTOSET_FORCE_OFF)
+ if(val == APC_CHANNEL_ON) // if on, return off
+ return APC_CHANNEL_OFF
+ else if(val == APC_CHANNEL_AUTO_ON) // if auto-on, return auto-off
+ return APC_CHANNEL_AUTO_OFF
+ else if(on == AUTOSET_ON)
+ if(val == APC_CHANNEL_AUTO_OFF) // if auto-off, return auto-on
+ return APC_CHANNEL_AUTO_ON
+ else if(on == AUTOSET_OFF)
+ if(val == APC_CHANNEL_AUTO_ON) // if auto-on, return auto-off
+ return APC_CHANNEL_AUTO_OFF
return val
+/**
+ * Used by external forces to set the APCs channel status's.
+ *
+ * Arguments:
+ * - val: The desired value of the subsystem:
+ * - 1: Manually sets the APCs channel to be [APC_CHANNEL_OFF].
+ * - 2: Manually sets the APCs channel to be [APC_CHANNEL_AUTO_ON]. If the APC doesn't have any power this defaults to [APC_CHANNEL_OFF] instead.
+ * - 3: Sets the APCs channel to be [APC_CHANNEL_AUTO_ON]. If the APC doesn't have enough power this defaults to [APC_CHANNEL_AUTO_OFF] instead.
+ */
+/obj/machinery/power/apc/proc/setsubsystem(val)
+ if(cell && cell.charge > 0)
+ return (val == 1) ? APC_CHANNEL_OFF : val
+ if(val == 3)
+ return APC_CHANNEL_AUTO_OFF
+ return APC_CHANNEL_OFF
+
/obj/machinery/power/apc/proc/reset(wire)
switch(wire)
if(WIRE_IDSCAN)
@@ -1467,14 +1553,13 @@
if(WIRE_POWER1, WIRE_POWER2)
if(!wires.is_cut(WIRE_POWER1) && !wires.is_cut(WIRE_POWER2))
shorted = FALSE
- update()
if(WIRE_AI)
if(!wires.is_cut(WIRE_AI))
aidisabled = FALSE
if(APC_RESET_EMP)
- equipment = 3
- environ = 3
- update_icon()
+ equipment = APC_CHANNEL_AUTO_ON
+ environ = APC_CHANNEL_AUTO_ON
+ update_appearance()
update()
// damage and destruction acts
@@ -1487,12 +1572,12 @@
occupier.emp_act(severity)
if(. & EMP_PROTECT_SELF)
return
- lighting = 0
- equipment = 0
- environ = 0
- update_icon()
+ lighting = APC_CHANNEL_OFF
+ equipment = APC_CHANNEL_OFF
+ environ = APC_CHANNEL_OFF
+ update_appearance()
update()
- addtimer(CALLBACK(src, .proc/reset, APC_RESET_EMP), severity*8)
+ addtimer(CALLBACK(src, .proc/reset, APC_RESET_EMP), 600)
/obj/machinery/power/apc/blob_act(obj/structure/blob/B)
set_broken()
@@ -1505,11 +1590,10 @@
/obj/machinery/power/apc/proc/set_broken()
if(malfai && operating)
malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000)
- stat |= BROKEN
operating = FALSE
+ obj_break()
if(occupier)
malfvacate(1)
- update_icon()
update()
// overload all the lights in this APC area
@@ -1530,23 +1614,14 @@
/obj/machinery/power/apc/proc/shock(mob/user, prb)
if(!prob(prb))
- return 0
+ return FALSE
do_sparks(5, TRUE, src)
if(isalien(user))
- return 0
+ return FALSE
if(electrocute_mob(user, src, src, 1, TRUE))
- return 1
+ return TRUE
else
- return 0
-
-/obj/machinery/power/apc/proc/setsubsystem(val)
- if(cell && cell.charge > 0)
- return (val==1) ? 0 : val
- else if(val == 3)
- return 1
- else
- return 0
-
+ return FALSE
/obj/machinery/power/apc/proc/energy_fail(duration)
for(var/obj/machinery/M in area.contents)
@@ -1572,12 +1647,8 @@
/obj/machinery/power/apc/proc/set_hijacked_lighting()
set waitfor = FALSE
- var/hijackerreturn
- if (hijacker)
- var/obj/item/implant/hijack/H = hijacker.getImplant(/obj/item/implant/hijack)
- hijackerreturn = H && !H.stealthmode
for(var/obj/machinery/light/L in area)
- L.hijacked = hijackerreturn
+ L.hijacked = hijackerreturn()
L.update(FALSE)
CHECK_TICK
@@ -1593,16 +1664,19 @@
var/normal_requires_auth = CONFIG_GET(flag/nightshift_toggle_requires_auth)
return (configured_level && our_level && ((our_level <= configured_level)? public_requires_auth : normal_requires_auth))
-#undef UPSTATE_CELL_IN
-#undef UPSTATE_OPENED1
-#undef UPSTATE_OPENED2
-#undef UPSTATE_MAINT
-#undef UPSTATE_BROKE
-#undef UPSTATE_BLUESCREEN
-#undef UPSTATE_WIREEXP
-#undef UPSTATE_ALLGOOD
-#undef APC_RESET_EMP
+#undef APC_CHANNEL_OFF
+#undef APC_CHANNEL_AUTO_OFF
+#undef APC_CHANNEL_ON
+#undef APC_CHANNEL_AUTO_ON
+
+#undef AUTOSET_FORCE_OFF
+#undef AUTOSET_OFF
+#undef AUTOSET_ON
+
+#undef APC_NO_POWER
+#undef APC_LOW_POWER
+#undef APC_HAS_POWER
#undef APC_ELECTRONICS_MISSING
#undef APC_ELECTRONICS_INSTALLED
@@ -1616,22 +1690,26 @@
#undef APC_CHARGING
#undef APC_FULLY_CHARGED
-//update_overlay
-#undef APC_UPOVERLAY_CHARGEING0
-#undef APC_UPOVERLAY_CHARGEING1
-#undef APC_UPOVERLAY_CHARGEING2
-#undef APC_UPOVERLAY_EQUIPMENT0
-#undef APC_UPOVERLAY_EQUIPMENT1
-#undef APC_UPOVERLAY_EQUIPMENT2
-#undef APC_UPOVERLAY_LIGHTING0
-#undef APC_UPOVERLAY_LIGHTING1
-#undef APC_UPOVERLAY_LIGHTING2
-#undef APC_UPOVERLAY_ENVIRON0
-#undef APC_UPOVERLAY_ENVIRON1
-#undef APC_UPOVERLAY_ENVIRON2
-#undef APC_UPOVERLAY_LOCKED
-#undef APC_UPOVERLAY_OPERATING
+#undef APC_DRAIN_TIME
+#undef APC_POWER_GAIN
+#undef APC_RESET_EMP
+
+// update_state
+#undef UPSTATE_CELL_IN
+#undef UPSTATE_COVER_SHIFT
+#undef UPSTATE_BROKE
+#undef UPSTATE_MAINT
+#undef UPSTATE_BLUESCREEN
+#undef UPSTATE_WIREEXP
+
+//update_overlay
+#undef UPOVERLAY_OPERATING
+#undef UPOVERLAY_LOCKED
+#undef UPOVERLAY_CHARGING_SHIFT
+#undef UPOVERLAY_EQUIPMENT_SHIFT
+#undef UPOVERLAY_LIGHTING_SHIFT
+#undef UPOVERLAY_ENVIRON_SHIFT
#undef MAXIMUM_COG_REGAIN
/*Power module, used for APC construction*/
diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm
index e37ae56e71..3fe03978bd 100644
--- a/code/modules/power/gravitygenerator.dm
+++ b/code/modules/power/gravitygenerator.dm
@@ -32,7 +32,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
return FALSE
/obj/machinery/gravity_generator/ex_act(severity, target)
- if(severity == 1) // Very sturdy.
+ if(severity >= EXPLODE_DEVASTATE) // Very sturdy.
set_broken()
/obj/machinery/gravity_generator/blob_act(obj/structure/blob/B)
@@ -40,12 +40,13 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
set_broken()
/obj/machinery/gravity_generator/zap_act(power, zap_flags)
- ..()
+ . = ..()
if(zap_flags & ZAP_MACHINE_EXPLOSIVE)
qdel(src)//like the singulo, tesla deletes it. stops it from exploding over and over
/obj/machinery/gravity_generator/update_icon_state()
icon_state = "[get_status()]_[sprite_number]"
+ return ..()
/obj/machinery/gravity_generator/proc/get_status()
return "off"
@@ -80,14 +81,19 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/part/get_status()
return main_part?.get_status()
-/obj/machinery/gravity_generator/part/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
- return main_part.attack_hand(user)
+/obj/machinery/gravity_generator/part/attack_hand(mob/user, list/modifiers)
+ return main_part.attack_hand(user, modifiers)
/obj/machinery/gravity_generator/part/set_broken()
..()
if(main_part && !(main_part.stat & BROKEN))
main_part.set_broken()
+/// Used to eat args
+/obj/machinery/gravity_generator/part/proc/on_update_icon(obj/machinery/gravity_generator/source, updates, updated)
+ SIGNAL_HANDLER
+ return update_appearance(updates)
+
//
// Generator which spawns with the station.
//
@@ -124,7 +130,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
var/charge_count = 100
var/current_overlay = null
var/broken_state = 0
- var/setting = 1 //Gravity value when on
+ var/setting = 1 //Gravity value when on
/obj/machinery/gravity_generator/main/Destroy() // If we somehow get deleted, remove all of our other parts.
investigate_log("was destroyed!", INVESTIGATE_GRAVITY)
@@ -149,13 +155,13 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
if(count == 5) // Middle
middle = part
if(count <= 3) // Their sprite is the top part of the generator
- part.density = FALSE
+ part.density= 0
part.layer = WALL_OBJ_LAYER
part.sprite_number = count
part.main_part = src
parts += part
- part.update_icon()
- part.RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, /atom/proc/update_icon)
+ part.update_appearance()
+ part.RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, /obj/machinery/gravity_generator/part/proc/on_update_icon)
/obj/machinery/gravity_generator/main/proc/connected_parts()
return parts.len == 8
@@ -178,7 +184,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
if(M.stat & BROKEN)
M.set_fix()
broken_state = FALSE
- update_icon()
+ update_appearance()
set_power()
// Interaction
@@ -188,33 +194,33 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
switch(broken_state)
if(GRAV_NEEDS_SCREWDRIVER)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
- to_chat(user, "You secure the screws of the framework.")
+ to_chat(user, span_notice("You secure the screws of the framework."))
I.play_tool_sound(src)
broken_state++
- update_icon()
+ update_appearance()
return
if(GRAV_NEEDS_WELDING)
if(I.tool_behaviour == TOOL_WELDER)
if(I.use_tool(src, user, 0, volume=50, amount=1))
- to_chat(user, "You mend the damaged framework.")
+ to_chat(user, span_notice("You mend the damaged framework."))
broken_state++
- update_icon()
+ update_appearance()
return
if(GRAV_NEEDS_PLASTEEL)
if(istype(I, /obj/item/stack/sheet/plasteel))
var/obj/item/stack/sheet/plasteel/PS = I
if(PS.get_amount() >= 10)
PS.use(10)
- to_chat(user, "You add the plating to the framework.")
+ to_chat(user, span_notice("You add the plating to the framework."))
playsound(src.loc, 'sound/machines/click.ogg', 75, TRUE)
broken_state++
- update_icon()
+ update_appearance()
else
- to_chat(user, "You need 10 sheets of plasteel!")
+ to_chat(user, span_warning("You need 10 sheets of plasteel!"))
return
if(GRAV_NEEDS_WRENCH)
if(I.tool_behaviour == TOOL_WRENCH)
- to_chat(user, "You secure the plating to the framework.")
+ to_chat(user, span_notice("You secure the plating to the framework."))
I.play_tool_sound(src)
set_fix()
return
@@ -238,7 +244,8 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
return data
/obj/machinery/gravity_generator/main/ui_act(action, params)
- if(..())
+ . = ..()
+ if(.)
return
switch(action)
@@ -270,7 +277,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
charging_state = new_state ? POWER_UP : POWER_DOWN // Startup sequence animation.
investigate_log("is now [charging_state == POWER_UP ? "charging" : "discharging"].", INVESTIGATE_GRAVITY)
- update_icon()
+ update_appearance()
// Set the state of the gravity.
/obj/machinery/gravity_generator/main/proc/set_state(new_state)
@@ -291,7 +298,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
investigate_log("was brought offline and there is now no gravity for this level.", INVESTIGATE_GRAVITY)
message_admins("The gravity generator was brought offline with no backup generator. [ADMIN_VERBOSEJMP(src)]")
- update_icon()
+ update_appearance()
update_list()
src.updateUsrDialog()
if(alert)
@@ -391,13 +398,16 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
// Misc
/obj/item/paper/guides/jobs/engi/gravity_gen
- info = {"
-# Gravity Generator Instructions For Dummies
-Surprisingly, gravity isn't that hard to make! All you have to do is inject deadly radioactive minerals into a ball of energy and you have yourself gravity! You can turn the machine on or off when required but you must remember that the generator will EMIT RADIATION when charging or discharging, you can tell it is charging or discharging by the noise it makes, so please WEAR PROTECTIVE CLOTHING.
-### It blew up!
-Don't panic! The gravity generator was designed to be easily repaired. If, somehow, the sturdy framework did not survive then please proceed to panic; otherwise follow these steps.
-1. Secure the screws of the framework with a screwdriver.
-2. Mend the damaged framework with a welding tool.
-3. Add additional plasteel plating.
-4. Secure the additional plating with a wrench.
-"}
+ name = "paper- 'Generate your own gravity!'"
+ info = {"
Gravity Generator Instructions For Dummies
+
Surprisingly, gravity isn't that hard to make! All you have to do is inject deadly radioactive minerals into a ball of
+ energy and you have yourself gravity! You can turn the machine on or off when required but you must remember that the generator
+ will EMIT RADIATION when charging or discharging, you can tell it is charging or discharging by the noise it makes, so please WEAR PROTECTIVE CLOTHING.
+
+
It blew up!
+
Don't panic! The gravity generator was designed to be easily repaired. If, somehow, the sturdy framework did not survive then
+ please proceed to panic; otherwise follow these steps.
+
Secure the screws of the framework with a screwdriver.
+
Mend the damaged framework with a welding tool.
+
Add additional plasteel plating.
+
Secure the additional plating with a wrench.
"}
diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm
index 9bbdcf4f66..c2dd77290a 100644
--- a/code/modules/power/power.dm
+++ b/code/modules/power/power.dm
@@ -104,15 +104,23 @@
/obj/machinery/proc/removeStaticPower(value, powerchannel)
addStaticPower(-value, powerchannel)
-/obj/machinery/proc/power_change() // called whenever the power settings of the containing area change
- // by default, check equipment channel & set flag
- // can override if needed
- if(powered(power_channel))
- stat &= ~NOPOWER
- else
+/obj/machinery/proc/power_change()
+ //SIGNAL_HANDLER
+ //SHOULD_CALL_PARENT(TRUE)
- stat |= NOPOWER
- return
+ if(stat & BROKEN)
+ return
+ if(powered(power_channel))
+ if(stat & NOPOWER)
+ SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_RESTORED)
+ . = TRUE
+ set_machine_stat(stat & ~NOPOWER)
+ else
+ if(!(stat & NOPOWER))
+ SEND_SIGNAL(src, COMSIG_MACHINERY_POWER_LOST)
+ . = TRUE
+ set_machine_stat(stat | NOPOWER)
+ update_appearance()
// connect the machine to a powernet if a node cable is present on the turf
/obj/machinery/power/proc/connect_to_network()
diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm
index 2d189338e5..a6b144ebe6 100644
--- a/code/modules/power/singularity/collector.dm
+++ b/code/modules/power/singularity/collector.dm
@@ -47,29 +47,29 @@
if(!loaded_tank)
return
if(!bitcoinmining)
- if(loaded_tank.air_contents.get_moles(/datum/gas/plasma) < 0.0001)
+ if(loaded_tank.air_contents.get_moles(GAS_PLASMA) < 0.0001)
investigate_log("out of fuel.", INVESTIGATE_SINGULO)
playsound(src, 'sound/machines/ding.ogg', 50, 1)
Radio.talk_into(src, "Insufficient plasma in [get_area(src)] [src], ejecting \the [loaded_tank].", FREQ_ENGINEERING)
eject()
else
- var/gasdrained = min(powerproduction_drain*drainratio,loaded_tank.air_contents.get_moles(/datum/gas/plasma))
- loaded_tank.air_contents.adjust_moles(/datum/gas/plasma, -gasdrained)
- loaded_tank.air_contents.adjust_moles(/datum/gas/tritium, gasdrained)
+ var/gasdrained = min(powerproduction_drain*drainratio,loaded_tank.air_contents.get_moles(GAS_PLASMA))
+ loaded_tank.air_contents.adjust_moles(GAS_PLASMA, -gasdrained)
+ loaded_tank.air_contents.adjust_moles(GAS_TRITIUM, gasdrained)
var/power_produced = RAD_COLLECTOR_OUTPUT
add_avail(power_produced)
stored_power-=power_produced
else if(is_station_level(z) && SSresearch.science_tech)
- if(!loaded_tank.air_contents.get_moles(/datum/gas/tritium) || !loaded_tank.air_contents.get_moles(/datum/gas/oxygen))
+ if(!loaded_tank.air_contents.get_moles(GAS_TRITIUM) || !loaded_tank.air_contents.get_moles(GAS_O2))
playsound(src, 'sound/machines/ding.ogg', 50, 1)
Radio.talk_into(src, "Insufficient oxygen and tritium in [get_area(src)] [src] to produce research points, ejecting \the [loaded_tank].", FREQ_ENGINEERING)
eject()
else
var/gasdrained = bitcoinproduction_drain*drainratio
- loaded_tank.air_contents.adjust_moles(/datum/gas/tritium, -gasdrained)
- loaded_tank.air_contents.adjust_moles(/datum/gas/oxygen, -gasdrained)
- loaded_tank.air_contents.adjust_moles(/datum/gas/carbon_dioxide, gasdrained*2)
+ loaded_tank.air_contents.adjust_moles(GAS_TRITIUM, -gasdrained)
+ loaded_tank.air_contents.adjust_moles(GAS_O2, -gasdrained)
+ loaded_tank.air_contents.adjust_moles(GAS_CO2, gasdrained*2)
var/bitcoins_mined = stored_power*RAD_COLLECTOR_MINING_CONVERSION_RATE
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG)
if(D)
@@ -84,7 +84,7 @@
toggle_power()
user.visible_message("[user.name] turns the [src.name] [active? "on":"off"].", \
"You turn the [src.name] [active? "on":"off"].")
- var/fuel = loaded_tank.air_contents.get_moles(/datum/gas/plasma)
+ var/fuel = loaded_tank.air_contents.get_moles(GAS_PLASMA)
investigate_log("turned [active?"on":"off"] by [key_name(user)]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"It is empty"].", INVESTIGATE_SINGULO)
return
else
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 9cc289b06d..907c4e7d65 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -63,7 +63,7 @@
assembly = S
assembly.glass_type.on_solar_construction(src)
obj_integrity = max_integrity
- update_icon()
+ update_appearance()
/obj/machinery/power/solar/crowbar_act(mob/user, obj/item/I)
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
@@ -86,11 +86,10 @@
/obj/machinery/power/solar/obj_break(damage_flag)
- if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
+ . = ..()
+ if(.)
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
- stat |= BROKEN
unset_control()
- update_icon()
/obj/machinery/power/solar/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -99,7 +98,7 @@
assembly.forceMove(loc)
assembly.give_glass(stat & BROKEN)
else
- playsound(src, "shatter", 70, 1)
+ playsound(src, "shatter", 70, TRUE)
var/shard = assembly?.glass_type ? assembly.glass_type.shard_type : /obj/item/shard
new shard(loc)
new shard(loc)
@@ -110,16 +109,15 @@
var/matrix/turner = matrix()
turner.Turn(azimuth_current)
panel.transform = turner
- if(stat & BROKEN)
- panel.icon_state = "solar_panel-b"
- else
- panel.icon_state = "solar_panel"
+ panel.icon_state = "solar_panel[(stat & BROKEN) ? "-b" : null]"
/obj/machinery/power/solar/proc/queue_turn(azimuth)
needs_to_turn = TRUE
azimuth_target = azimuth
/obj/machinery/power/solar/proc/queue_update_solar_exposure()
+ SIGNAL_HANDLER
+
needs_to_update_solar_exposure = TRUE //updating right away would be wasteful if we're also turning later
/obj/machinery/power/solar/proc/update_turn()
@@ -127,7 +125,7 @@
if(azimuth_current != azimuth_target)
azimuth_current = azimuth_target
occlusion_setup()
- update_icon()
+ update_appearance()
needs_to_update_solar_exposure = TRUE
///trace towards sun to see if we're in shadow
@@ -173,7 +171,7 @@
control.gen += sgen
//Bit of a hack but this whole type is a hack
-/obj/machinery/power/solar/fake/Initialize(turf/loc, obj/item/solar_assembly/S)
+/obj/machinery/power/solar/fake/Initialize(mapload, obj/item/solar_assembly/S)
. = ..()
UnregisterSignal(SSsun, COMSIG_SUN_MOVED)
@@ -199,6 +197,16 @@
var/static/list/allowed_sheets = typecacheof(list(/obj/item/stack/sheet/glass, /obj/item/stack/sheet/rglass,
/obj/item/stack/sheet/plasmaglass, /obj/item/stack/sheet/plasmarglass,
/obj/item/stack/sheet/titaniumglass, /obj/item/stack/sheet/plastitaniumglass))
+ var/random_offset = 6 //amount in pixels an unanchored assembly may be offset by
+
+/obj/item/solar_assembly/Initialize(mapload)
+ . = ..()
+ if(!anchored && !pixel_x && !pixel_y)
+ randomise_offset(random_offset)
+
+/obj/item/solar_assembly/proc/randomise_offset(amount)
+ pixel_x = rand(-amount, amount)
+ pixel_y = rand(-amount, amount)
// Give back the glass type we were supplied with
/obj/item/solar_assembly/proc/give_glass(device_broken)
@@ -212,20 +220,21 @@
glass_type.forceMove(Tsec)
glass_type = null
+/obj/item/solar_assembly/set_anchored(anchorvalue)
+ . = ..()
+ if(isnull(.))
+ return
+ randomise_offset(anchored ? 0 : random_offset)
/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour == TOOL_WRENCH && isturf(loc))
if(isinspace())
to_chat(user, "You can't secure [src] here.")
return
- anchored = !anchored
- if(anchored)
- user.visible_message("[user] wrenches the solar assembly into place.", "You wrench the solar assembly into place.")
- W.play_tool_sound(src, 75)
- else
- user.visible_message("[user] unwrenches the solar assembly from its place.", "You unwrench the solar assembly from its place.")
- W.play_tool_sound(src, 75)
- return 1
+ set_anchored(!anchored)
+ user.visible_message("[user] [anchored ? null : "un"]wrenches the solar assembly into place.", "You [anchored ? null : "un"]wrench the solar assembly into place.")
+ W.play_tool_sound(src, 75)
+ return TRUE
if(is_type_in_typecache(W, allowed_sheets))
if(!anchored)
@@ -249,16 +258,16 @@
if(istype(W, /obj/item/electronics/tracker))
if(!user.temporarilyRemoveItemFromInventory(W))
return
- tracker = 1
+ tracker = TRUE
qdel(W)
user.visible_message("[user] inserts the electronics into the solar assembly.", "You insert the electronics into the solar assembly.")
return 1
else
if(W.tool_behaviour == TOOL_CROWBAR)
new /obj/item/electronics/tracker(src.loc)
- tracker = 0
+ tracker = FALSE
user.visible_message("[user] takes out the electronics from the solar assembly.", "You take out the electronics from the solar assembly.")
- return 1
+ return TRUE
return ..()
//
@@ -322,11 +331,12 @@
if(stat & NOPOWER)
. += mutable_appearance(icon, "[icon_keyboard]_off")
return
+
. += mutable_appearance(icon, icon_keyboard)
if(stat & BROKEN)
. += mutable_appearance(icon, "[icon_state]_broken")
- else
- . += mutable_appearance(icon, icon_screen)
+ return
+ . += mutable_appearance(icon, icon_screen)
/obj/machinery/power/solar_control/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -347,7 +357,8 @@
return data
/obj/machinery/power/solar_control/ui_act(action, params)
- if(..())
+ . = ..()
+ if(.)
return
if(action == "azimuth")
var/adjust = text2num(params["adjust"])
@@ -381,10 +392,10 @@
return TRUE
return FALSE
-/obj/machinery/power/solar_control/attackby(obj/item/I, mob/user, params)
+/obj/machinery/power/solar_control/attackby(obj/item/I, mob/living/user, params)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
- if(I.use_tool(src, user, 20, volume = 50))
- if(src.stat & BROKEN)
+ if(I.use_tool(src, user, 20, volume=50))
+ if (src.stat & BROKEN)
to_chat(user, "The broken glass falls out.")
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer( src.loc )
new /obj/item/shard( src.loc )
@@ -394,7 +405,7 @@
A.circuit = M
A.state = 3
A.icon_state = "3"
- A.anchored = TRUE
+ A.set_anchored(TRUE)
qdel(src)
else
to_chat(user, "You disconnect the monitor.")
@@ -405,7 +416,7 @@
A.circuit = M
A.state = 4
A.icon_state = "4"
- A.anchored = TRUE
+ A.set_anchored(TRUE)
qdel(src)
else if(user.a_intent != INTENT_HARM && !(I.item_flags & NOBLUDGEON))
attack_hand(user)
@@ -423,10 +434,9 @@
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
/obj/machinery/power/solar_control/obj_break(damage_flag)
- if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
+ . = ..()
+ if(.)
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
- stat |= BROKEN
- update_icon()
/obj/machinery/power/solar_control/process()
lastgen = gen
@@ -437,6 +447,8 @@
///Ran every time the sun updates.
/obj/machinery/power/solar_control/proc/timed_track()
+ SIGNAL_HANDLER
+
if(track == SOLAR_TRACK_TIMED)
azimuth_target += azimuth_rate
set_panels(azimuth_target)
@@ -453,20 +465,12 @@
for(var/obj/machinery/power/solar/S in connected_panels)
S.queue_turn(azimuth)
-/obj/machinery/power/solar_control/power_change()
- ..()
- update_icon()
-
//
// MISC
//
/obj/item/paper/guides/jobs/engi/solars
- info = {"
-# Welcome!
-At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.
-You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!
Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.
-Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.
That's all to it, be safe, be green!
-"}
+ name = "paper- 'Going green! Setup your own solar array instructions.'"
+ info = "
Welcome
At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.
You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!
Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.
Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.
That's all to it, be safe, be green!
"
#undef SOLAR_GEN_RATE
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 87adcefeb3..b460cfea51 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -12,33 +12,17 @@
#define OBJECT (LOWEST + 1)
#define LOWEST (1)
-#define PLASMA_HEAT_PENALTY 15 // Higher == Bigger heat and waste penalty from having the crystal surrounded by this gas. Negative numbers reduce penalty.
-#define OXYGEN_HEAT_PENALTY 1
-#define PLUOXIUM_HEAT_PENALTY -1
-#define TRITIUM_HEAT_PENALTY 10
-#define CO2_HEAT_PENALTY 0.1
-#define NITROGEN_HEAT_PENALTY -1.5
-#define BZ_HEAT_PENALTY 5
-#define H2O_HEAT_PENALTY 8
-//#define FREON_HEAT_PENALTY -10 //very good heat absorbtion and less plasma and o2 generation
-//#define HYDROGEN_HEAT_PENALTY 10 // similar heat penalty as tritium (dangerous)
-
-
-//All of these get divided by 10-bzcomp * 5 before having 1 added and being multiplied with power to determine rads
-//Keep the negative values here above -10 and we won't get negative rads
-#define OXYGEN_TRANSMIT_MODIFIER 1.5 //Higher == Bigger bonus to power generation.
-#define PLASMA_TRANSMIT_MODIFIER 4
-#define BZ_TRANSMIT_MODIFIER -2
-#define TRITIUM_TRANSMIT_MODIFIER 30 //We divide by 10, so this works out to 3
-#define PLUOXIUM_TRANSMIT_MODIFIER -5 //Should halve the power output
-#define H2O_TRANSMIT_MODIFIER 2
-//#define HYDROGEN_TRANSMIT_MODIFIER 25 //increase the radiation emission, but less than the trit (2.5)
-
-#define BZ_RADIOACTIVITY_MODIFIER 5 //Improves the effect of transmit modifiers
-
-#define N2O_HEAT_RESISTANCE 6 //Higher == Gas makes the crystal more resistant against heat damage.
-#define PLUOXIUM_HEAT_RESISTANCE 3
-//#define HYDROGEN_HEAT_RESISTANCE 2 // just a bit of heat resistance to spice it up
+/datum/auxgm/proc/add_supermatter_properties(datum/gas/gas)
+ var/g = gas.id
+ var/list/props = src.supermatter
+ if(gas.powermix || gas.heat_penalty || gas.transmit_modifier || gas.radioactivity_modifier || gas.heat_resistance || gas.powerloss_inhibition)
+ props[HEAT_PENALTY][g] = gas.heat_penalty
+ props[TRANSMIT_MODIFIER][g] = gas.transmit_modifier
+ props[RADIOACTIVITY_MODIFIER][g] = gas.radioactivity_modifier
+ props[HEAT_RESISTANCE][g] = gas.heat_resistance
+ props[POWERLOSS_INHIBITION][g] = gas.powerloss_inhibition
+ props[POWER_MIX][g] = gas.powermix
+ props[ALL_SUPERMATTER_GASES] += g
#define POWERLOSS_INHIBITION_GAS_THRESHOLD 0.20 //Higher == Higher percentage of inhibitor gas needed before the charge inertia chain reaction effect starts.
#define POWERLOSS_INHIBITION_MOLE_THRESHOLD 20 //Higher == More moles of the gas are needed before the charge inertia chain reaction effect starts. //Scales powerloss inhibition down until this amount of moles is reached
@@ -116,7 +100,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
///The portion of the gasmix we're on that we should remove
var/gasefficency = 0.15
///Used for changing icon states for diff base sprites
- var/base_icon_state = "darkmatter"
+ base_icon_state = "darkmatter"
///Are we exploding?
var/final_countdown = FALSE
@@ -148,90 +132,17 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/power = 0
///Determines the rate of positve change in gas comp values
var/gas_change_rate = 0.05
- ///The list of gases we will be interacting with in process_atoms()
- var/list/gases_we_care_about = list(
- /datum/gas/oxygen,
- /datum/gas/water_vapor,
- /datum/gas/plasma,
- /datum/gas/carbon_dioxide,
- /datum/gas/nitrous_oxide,
- /datum/gas/nitrogen,
- /datum/gas/pluoxium,
- /datum/gas/tritium,
- /datum/gas/bz,
-// /datum/gas/freon,
-// /datum/gas/hydrogen,
- )
- ///The list of gases mapped against their current comp. We use this to calculate different values the supermatter uses, like power or heat resistance. It doesn't perfectly match the air around the sm, instead moving up at a rate determined by gas_change_rate per call. Ranges from 0 to 1
- var/list/gas_comp = list(
- /datum/gas/oxygen = 0,
- /datum/gas/water_vapor = 0,
- /datum/gas/plasma = 0,
- /datum/gas/carbon_dioxide = 0,
- /datum/gas/nitrous_oxide = 0,
- /datum/gas/nitrogen = 0,
- /datum/gas/pluoxium = 0,
- /datum/gas/tritium = 0,
- /datum/gas/bz = 0,
-// /datum/gas/freon = 0,
-// /datum/gas/hydrogen = 0,
- )
- ///The list of gases mapped against their transmit values. We use it to determine the effect different gases have on radiation
- var/list/gas_trans = list(
- /datum/gas/oxygen = OXYGEN_TRANSMIT_MODIFIER,
- /datum/gas/water_vapor = H2O_TRANSMIT_MODIFIER,
- /datum/gas/plasma = PLASMA_TRANSMIT_MODIFIER,
- /datum/gas/pluoxium = PLUOXIUM_TRANSMIT_MODIFIER,
- /datum/gas/tritium = TRITIUM_TRANSMIT_MODIFIER,
- /datum/gas/bz = BZ_TRANSMIT_MODIFIER,
-// /datum/gas/hydrogen = HYDROGEN_TRANSMIT_MODIFIER,
- )
- ///The list of gases mapped against their heat penaltys. We use it to determin molar and heat output
- var/list/gas_heat = list(
- /datum/gas/oxygen = OXYGEN_HEAT_PENALTY,
- /datum/gas/water_vapor = H2O_HEAT_PENALTY,
- /datum/gas/plasma = PLASMA_HEAT_PENALTY,
- /datum/gas/carbon_dioxide = CO2_HEAT_PENALTY,
- /datum/gas/nitrogen = NITROGEN_HEAT_PENALTY,
- /datum/gas/pluoxium = PLUOXIUM_HEAT_PENALTY,
- /datum/gas/tritium = TRITIUM_HEAT_PENALTY,
- /datum/gas/bz = BZ_HEAT_PENALTY,
-// /datum/gas/freon = FREON_HEAT_PENALTY,
-// /datum/gas/hydrogen = HYDROGEN_HEAT_PENALTY,
- )
- ///The list of gases mapped against their heat resistance. We use it to moderate heat damage.
- var/list/gas_resist = list(
- /datum/gas/nitrous_oxide = N2O_HEAT_RESISTANCE,
- /datum/gas/pluoxium = PLUOXIUM_HEAT_RESISTANCE,
-// /datum/gas/hydrogen = HYDROGEN_HEAT_RESISTANCE,
- )
- ///The list of gases mapped against their powermix ratio
- var/list/gas_powermix = list(
- /datum/gas/oxygen = 1,
- /datum/gas/water_vapor = 1,
- /datum/gas/plasma = 1,
- /datum/gas/carbon_dioxide = 1,
- /datum/gas/nitrogen = -1,
- /datum/gas/pluoxium = -1,
- /datum/gas/tritium = 1,
- /datum/gas/bz = 1,
-// /datum/gas/freon = -1,
-// /datum/gas/hydrogen = 1,
- )
+ var/list/gas_comp = list()
///The last air sample's total molar count, will always be above or equal to 0
var/combined_gas = 0
///Affects the power gain the sm experiances from heat
var/gasmix_power_ratio = 0
- ///Affects the amount of o2 and plasma the sm outputs, along with the heat it makes.
- var/dynamic_heat_modifier = 1
///Affects the amount of damage and minimum point at which the sm takes heat damage
var/dynamic_heat_resistance = 1
///Uses powerloss_dynamic_scaling and combined_gas to lessen the effects of our powerloss functions
var/powerloss_inhibitor = 1
///Based on co2 percentage, slowly moves between 0 and 1. We use it to calc the powerloss_inhibitor
var/powerloss_dynamic_scaling= 0
- ///Affects the amount of radiation the sm makes. We multiply this with power to find the rads.
- var/power_transmission_bonus = 0
///Used to increase or lessen the amount of damage the sm takes from heat based on molar counts.
var/mole_heat_penalty = 0
///Takes the energy throwing things into the sm generates and slowly turns it into actual power
@@ -241,7 +152,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
///How much the bullets damage should be multiplied by when it is added to the internal variables
var/bullet_energy = 2
///How much hallucination should we produce per unit of power?
- var/hallucination_power = 0.1
+ var/hallucination_power = 0.05 // 2 seconds per second at a distance of 7 with a typical nitrogen setup
///Our internal radio
var/obj/item/radio/radio
@@ -283,7 +194,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/Initialize()
. = ..()
uid = gl_uid++
- SSair.atmos_machinery += src
+ SSair.atmos_air_machinery += src
countdown = new(src)
countdown.start()
GLOB.poi_list |= src
@@ -302,7 +213,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/Destroy()
investigate_log("has been destroyed.", INVESTIGATE_SUPERMATTER)
- SSair.atmos_machinery -= src
+ SSair.atmos_air_machinery -= src
QDEL_NULL(radio)
GLOB.poi_list -= src
QDEL_NULL(countdown)
@@ -475,12 +386,16 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/datum/gas_mixture/removed
if(produces_gas)
//Remove gas from surrounding area
- removed = env.remove(gasefficency * env.total_moles())
+ removed = env.remove_ratio(gasefficency)
else
// Pass all the gas related code an empty gas container
removed = new()
damage_archived = damage
+ var/list/gas_info = GLOB.gas_data.supermatter
+
+ var/list/gases_we_care_about = gas_info[ALL_SUPERMATTER_GASES]
+
/********
EXPERIMENTAL, HUGBOXY AS HELL CITADEL CHANGES: Even in a vaccum, update gas composition and modifiers.
This means that the SM will usually have a very small explosion if it ends up being breached to space,
@@ -491,7 +406,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(takes_damage)
damage += max((power / 1000) * DAMAGE_INCREASE_MULTIPLIER, 0.1) // always does at least some damage
combined_gas = max(0, combined_gas - 0.5) // Slowly wear off.
- for(var/gasID in gases_we_care_about)
+ for(var/gasID in gas_comp)
gas_comp[gasID] = max(0, gas_comp[gasID] - 0.05) //slowly ramp down
else
if(takes_damage)
@@ -531,46 +446,49 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//Prevents huge bursts of gas/heat when a large amount of something is introduced
//They range between 0 and 1
for(var/gasID in gases_we_care_about)
+ if(!(gasID in gas_comp))
+ gas_comp[gasID] = 0
gas_comp[gasID] += clamp(max(removed.get_moles(gasID)/combined_gas, 0) - gas_comp[gasID], -1, gas_change_rate)
- var/list/heat_mod = gases_we_care_about.Copy()
- var/list/transit_mod = gases_we_care_about.Copy()
- var/list/resistance_mod = gases_we_care_about.Copy()
+ var/list/threshold_mod = gases_we_care_about.Copy()
+
+ var/list/powermix = gas_info[POWER_MIX]
+ var/list/heat = gas_info[HEAT_PENALTY]
+ var/list/transmit = gas_info[TRANSMIT_MODIFIER]
+ var/list/resist = gas_info[HEAT_RESISTANCE]
+ var/list/radioactivity = gas_info[RADIOACTIVITY_MODIFIER]
+ var/list/inhibition = gas_info[POWERLOSS_INHIBITION]
//We're concerned about pluoxium being too easy to abuse at low percents, so we make sure there's a substantial amount.
- var/pluoxiumbonus = (gas_comp[/datum/gas/pluoxium] >= 0.15) //makes pluoxium only work at 15%+
- var/h2obonus = 1 - (gas_comp[/datum/gas/water_vapor] * 0.25)//At max this value should be 0.75
+ var/pluoxiumbonus = (gas_comp[GAS_PLUOXIUM] >= 0.15) //makes pluoxium only work at 15%+
+ var/h2obonus = 1 - (gas_comp[GAS_H2O] * 0.25)//At min this value should be 0.75
// var/freonbonus = (gas_comp[/datum/gas/freon] <= 0.03) //Let's just yeet power output if this shit is high
- heat_mod[/datum/gas/pluoxium] = pluoxiumbonus
- transit_mod[/datum/gas/pluoxium] = pluoxiumbonus
- resistance_mod[/datum/gas/pluoxium] = pluoxiumbonus
+ threshold_mod[GAS_PLUOXIUM] = pluoxiumbonus
//No less then zero, and no greater then one, we use this to do explosions and heat to power transfer
//Be very careful with modifing this var by large amounts, and for the love of god do not push it past 1
gasmix_power_ratio = 0
- for(var/gasID in gas_powermix)
- gasmix_power_ratio += gas_comp[gasID] * gas_powermix[gasID]
- gasmix_power_ratio = clamp(gasmix_power_ratio, 0, 1)
-
- //Minimum value of -10, maximum value of 23. Effects plasma and o2 output and the output heat
- dynamic_heat_modifier = 0
- for(var/gasID in gas_heat)
- dynamic_heat_modifier += gas_comp[gasID] * gas_heat[gasID] * (isnull(heat_mod[gasID]) ? 1 : heat_mod[gasID])
- dynamic_heat_modifier *= h2obonus
- dynamic_heat_modifier = max(dynamic_heat_modifier, 0.5)
-
- //Value between 1 and 10. Effects the damage heat does to the crystal
+ //Affects the amount of o2 and plasma the sm outputs, along with the heat it makes.
+ var/dynamic_heat_modifier = 0
+ //Effects the damage heat does to the crystal.
dynamic_heat_resistance = 0
- for(var/gasID in gas_resist)
- dynamic_heat_resistance += gas_comp[gasID] * gas_resist[gasID] * (isnull(resistance_mod[gasID]) ? 1 : resistance_mod[gasID])
- dynamic_heat_resistance = max(dynamic_heat_resistance, 1)
-
- //Value between -5 and 30, used to determine radiation output as it concerns things like collectors.
- power_transmission_bonus = 0
- for(var/gasID in gas_trans)
- power_transmission_bonus += gas_comp[gasID] * gas_trans[gasID] * (isnull(transit_mod[gasID]) ? 1 : transit_mod[gasID])
+ //We multiply this with power to find the rads.
+ var/power_transmission_bonus = 0
+ var/powerloss_inhibition_gas = 0
+ var/radioactivity_modifier = 0
+ for(var/gasID in gas_comp)
+ var/this_comp = gas_comp[gasID] * (isnull(threshold_mod[gasID] ? 1 : threshold_mod[gasID]))
+ gasmix_power_ratio += this_comp * powermix[gasID]
+ dynamic_heat_modifier += this_comp * heat[gasID]
+ dynamic_heat_resistance += this_comp * resist[gasID]
+ power_transmission_bonus += this_comp * transmit[gasID]
+ powerloss_inhibition_gas += this_comp * inhibition[gasID]
+ radioactivity_modifier += this_comp * radioactivity[gasID]
+ dynamic_heat_modifier *= h2obonus
power_transmission_bonus *= h2obonus
+ gasmix_power_ratio = clamp(gasmix_power_ratio, 0, 1)
+ dynamic_heat_modifier = max(dynamic_heat_modifier, 0.5)
//more moles of gases are harder to heat than fewer, so let's scale heat damage around them
mole_heat_penalty = max(combined_gas / MOLE_HEAT_PENALTY, 0.25)
@@ -578,8 +496,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//Ramps up or down in increments of 0.02 up to the proportion of co2
//Given infinite time, powerloss_dynamic_scaling = co2comp
//Some value between 0 and 1
- if (combined_gas > POWERLOSS_INHIBITION_MOLE_THRESHOLD && gas_comp[/datum/gas/carbon_dioxide] > POWERLOSS_INHIBITION_GAS_THRESHOLD) //If there are more then 20 mols, and more then 20% co2
- powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling + clamp(gas_comp[/datum/gas/carbon_dioxide] - powerloss_dynamic_scaling, -0.02, 0.02), 0, 1)
+ if (combined_gas > POWERLOSS_INHIBITION_MOLE_THRESHOLD && powerloss_inhibition_gas > POWERLOSS_INHIBITION_GAS_THRESHOLD) //If there are more then 20 mols, and more then 20% co2
+ powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling + clamp(powerloss_inhibition_gas - powerloss_dynamic_scaling, -0.02, 0.02), 0, 1)
else
powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling - 0.05, 0, 1)
//Ranges from 0 to 1(1-(value between 0 and 1 * ranges from 1 to 1.5(mol / 500)))
@@ -611,30 +529,22 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(prob(50))
//(1 + (tritRad + pluoxDampen * bzDampen * o2Rad * plasmaRad / (10 - bzrads))) * freonbonus
- radiation_pulse(src, power * max(0, (1 + (power_transmission_bonus/(10-(gas_comp[/datum/gas/bz] * BZ_RADIOACTIVITY_MODIFIER)))) * 1))//freonbonus))// RadModBZ(500%)
- if(gas_comp[/datum/gas/bz] >= 0.4 && prob(30 * gas_comp[/datum/gas/bz]))
- src.fire_nuclear_particle() // Start to emit radballs at a maximum of 30% chance per tick
+ radiation_pulse(src, power * max(0, (1 + (power_transmission_bonus/(10-radioactivity_modifier)))))//freonbonus))// RadModBZ(500%)
+ if(radioactivity_modifier >= 2 && prob(6 * radioactivity_modifier))
+ src.fire_nuclear_particle()
//Power * 0.55 * a value between 1 and 0.8
var/device_energy = power * REACTION_POWER_MODIFIER
- //To figure out how much temperature to add each tick, consider that at one atmosphere's worth
- //of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
- //that the device energy is around 2140. At that stage, we don't want too much heat to be put out
- //Since the core is effectively "cold"
-
- //Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
- //is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
- //Power * 0.55 * (some value between 1.5 and 23) / 5
removed.set_temperature(removed.return_temperature() + ((device_energy * dynamic_heat_modifier) / THERMAL_RELEASE_MODIFIER))
- //We can only emit so much heat, that being 57500
+ //We don't want our output to be too hot
removed.set_temperature(max(0, min(removed.return_temperature(), 2500 * dynamic_heat_modifier)))
//Calculate how much gas to release
//Varies based on power and gas content
- removed.adjust_moles(/datum/gas/plasma, max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0))
+ removed.adjust_moles(GAS_PLASMA, max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0))
//Varies based on power, gas content, and heat
- removed.adjust_moles(/datum/gas/oxygen, max(((device_energy + removed.return_temperature() * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0))
+ removed.adjust_moles(GAS_O2, max(((device_energy + removed.return_temperature() * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0))
if(produces_gas)
env.merge(removed)
@@ -648,6 +558,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
for(var/mob/living/carbon/human/l in fov_viewers(src, HALLUCINATION_RANGE(power))) // If they can see it without mesons on. Bad on them.
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
var/D = sqrt(1 / max(1, get_dist(l, src)))
+ if(!l.hallucination)
+ to_chat(l, "Looking at the supermatter unprotected gives you a headache...")
l.hallucination += power * hallucination_power * D
l.hallucination = clamp(l.hallucination, 0, 200)
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm
index a9acea719c..dda7f27eee 100644
--- a/code/modules/power/turbine.dm
+++ b/code/modules/power/turbine.dm
@@ -128,13 +128,10 @@
cut_overlays()
rpm = 0.9* rpm + 0.1 * rpmtarget
- var/datum/gas_mixture/environment = inturf.return_air()
-
// It's a simplified version taking only 1/10 of the moles from the turf nearby. It should be later changed into a better version
+ // above todo 7 years and counting
- var/transfer_moles = environment.total_moles()/10
- var/datum/gas_mixture/removed = inturf.remove_air(transfer_moles)
- gas_contained.merge(removed)
+ inturf.transfer_air_ratio(gas_contained, 0.1)
// RPM function to include compression friction - be advised that too low/high of a compfriction value can make things screwy
@@ -221,8 +218,7 @@
if(compressor.gas_contained.total_moles()>0)
var/oamount = min(compressor.gas_contained.total_moles(), (compressor.rpm+100)/35000*compressor.capacity)
- var/datum/gas_mixture/removed = compressor.gas_contained.remove(oamount)
- outturf.assume_air(removed)
+ outturf.assume_air_moles(compressor.gas_contained, oamount)
// If it works, put an overlay that it works!
diff --git a/code/modules/procedural_mapping/mapGeneratorModules/helpers.dm b/code/modules/procedural_mapping/mapGeneratorModules/helpers.dm
index 4bd9177373..18607b919a 100644
--- a/code/modules/procedural_mapping/mapGeneratorModules/helpers.dm
+++ b/code/modules/procedural_mapping/mapGeneratorModules/helpers.dm
@@ -10,16 +10,13 @@
if(!mother)
return
var/list/map = mother.map
- for(var/turf/T in map)
- SSair.remove_from_active(T)
for(var/turf/open/T in map)
if(T.air)
if(T.initial_gas_mix)
T.air.parse_gas_string(T.initial_gas_mix)
- T.temperature = T.air.return_temperature()
+ T.set_temperature(T.air.return_temperature())
else
T.air.copy_from_turf(T)
- SSair.add_to_active(T)
/datum/mapGeneratorModule/bottomLayer/massdelete
spawnableAtoms = list()
diff --git a/code/modules/procedural_mapping/mapGenerators/repair.dm b/code/modules/procedural_mapping/mapGenerators/repair.dm
index d9380a40dd..a36ac88d6c 100644
--- a/code/modules/procedural_mapping/mapGenerators/repair.dm
+++ b/code/modules/procedural_mapping/mapGenerators/repair.dm
@@ -41,6 +41,7 @@
set waitfor = FALSE
var/turf/B = L
atoms += B
+ B.assemble_baseturfs(B.type)
for(var/A in B)
atoms += A
if(istype(A,/obj/structure/cable))
diff --git a/code/modules/projectiles/ammunition/energy/laser.dm b/code/modules/projectiles/ammunition/energy/laser.dm
index f6eca57e29..5b727d76de 100644
--- a/code/modules/projectiles/ammunition/energy/laser.dm
+++ b/code/modules/projectiles/ammunition/energy/laser.dm
@@ -2,6 +2,9 @@
projectile_type = /obj/item/projectile/beam/laser
select_name = "kill"
+/obj/item/ammo_casing/energy/laser/minigun
+ click_cooldown_override = 2
+
/obj/item/ammo_casing/energy/lasergun
projectile_type = /obj/item/projectile/beam/laser
e_cost = 83
diff --git a/code/modules/projectiles/ammunition/energy/special.dm b/code/modules/projectiles/ammunition/energy/special.dm
index 2bf7c06ec6..0cea7a361d 100644
--- a/code/modules/projectiles/ammunition/energy/special.dm
+++ b/code/modules/projectiles/ammunition/energy/special.dm
@@ -32,12 +32,13 @@
/obj/item/ammo_casing/energy/temp
projectile_type = /obj/item/projectile/temp
select_name = "freeze"
- e_cost = 250
+ e_cost = 50 // twenty shots before emptying
fire_sound = 'sound/weapons/pulse3.ogg'
/obj/item/ammo_casing/energy/temp/hot
projectile_type = /obj/item/projectile/temp/hot
select_name = "bake"
+ fire_sound = 'sound/weapons/pulse2.ogg'
/obj/item/ammo_casing/energy/meteor
projectile_type = /obj/item/projectile/meteor
diff --git a/code/modules/projectiles/ammunition/energy/stun.dm b/code/modules/projectiles/ammunition/energy/stun.dm
index f063672654..cb7f80d949 100644
--- a/code/modules/projectiles/ammunition/energy/stun.dm
+++ b/code/modules/projectiles/ammunition/energy/stun.dm
@@ -9,6 +9,10 @@
projectile_type = /obj/item/projectile/energy/electrode/security
e_cost = 100
+/obj/item/ammo_casing/energy/electrode/hos
+ projectile_type = /obj/item/projectile/energy/electrode/security/hos
+ e_cost = 100
+
/obj/item/ammo_casing/energy/electrode/spec
e_cost = 100
@@ -16,7 +20,6 @@
fire_sound = 'sound/weapons/gunshot.ogg'
e_cost = 100
-
/obj/item/ammo_casing/energy/electrode/old
e_cost = 1000
diff --git a/code/modules/projectiles/boxes_magazines/internal/misc.dm b/code/modules/projectiles/boxes_magazines/internal/misc.dm
index 2b87557b39..76f3c88381 100644
--- a/code/modules/projectiles/boxes_magazines/internal/misc.dm
+++ b/code/modules/projectiles/boxes_magazines/internal/misc.dm
@@ -3,9 +3,3 @@
ammo_type = /obj/item/ammo_casing/caseless/magspear
caliber = "speargun"
max_ammo = 1
-
-/obj/item/ammo_box/magazine/internal/minigun
- name = "gatling gun fusion core"
- ammo_type = /obj/item/ammo_casing/caseless/laser/gatling
- caliber = "gatling"
- max_ammo = 5000
diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm
index 45bc3a79dc..294040b040 100644
--- a/code/modules/projectiles/guns/energy/energy_gun.dm
+++ b/code/modules/projectiles/guns/energy/energy_gun.dm
@@ -48,12 +48,24 @@
/obj/item/gun/energy/e_gun/hos
name = "\improper X-01 MultiPhase Energy Gun"
- desc = "This is an expensive, modern recreation of an antique laser gun. This gun has several unique firemodes, but lacks the ability to recharge over time in exchange for inbuilt advanced firearm EMP shielding."
+ desc = "This is an expensive, modern recreation of an antique laser gun. This gun has several unique firemodes, but lacks the ability to recharge over time in exchange for inbuilt advanced firearm EMP shielding. Right click in combat mode to fire a taser shot with a cooldown."
icon_state = "hoslaser"
force = 10
- ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser/hos, /obj/item/ammo_casing/energy/ion/hos)
+ ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser/hos, /obj/item/ammo_casing/energy/ion/hos, /obj/item/ammo_casing/energy/electrode/hos)
ammo_x_offset = 4
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
+ var/last_altfire = 0
+ var/altfire_delay = 0
+
+/obj/item/gun/energy/e_gun/hos/altafterattack(atom/target, mob/user, proximity_flag, params)
+ . = TRUE
+ if(last_altfire + altfire_delay > world.time)
+ return
+ var/current_index = current_firemode_index
+ set_firemode_to_type(/obj/item/ammo_casing/energy/electrode)
+ process_afterattack(target, user, proximity_flag, params)
+ set_firemode_index(current_index)
+ last_altfire = world.time
/obj/item/gun/energy/e_gun/hos/emp_act(severity)
return
diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/energy/laser_gatling.dm
similarity index 78%
rename from code/modules/projectiles/guns/ballistic/laser_gatling.dm
rename to code/modules/projectiles/guns/energy/laser_gatling.dm
index 244bc5b124..a0274d76d7 100644
--- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm
+++ b/code/modules/projectiles/guns/energy/laser_gatling.dm
@@ -11,19 +11,19 @@
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
slot_flags = ITEM_SLOT_BACK
w_class = WEIGHT_CLASS_HUGE
- var/obj/item/gun/ballistic/minigun/gun
+ var/obj/item/gun/energy/minigun/gun
var/armed = 0 //whether the gun is attached, 0 is attached, 1 is the gun is wielded.
var/overheat = 0
- var/overheat_max = 40
+ var/overheat_max = 50
var/heat_diffusion = 1
/obj/item/minigunpack/Initialize()
. = ..()
gun = new(src)
- START_PROCESSING(SSobj, src)
+ START_PROCESSING(SSfastprocess, src)
/obj/item/minigunpack/Destroy()
- STOP_PROCESSING(SSobj, src)
+ STOP_PROCESSING(SSfastprocess, src)
return ..()
/obj/item/minigunpack/process()
@@ -68,11 +68,10 @@
if(!M.incapacitated())
- if(istype(over_object, /obj/screen/inventory/hand))
- var/obj/screen/inventory/hand/H = over_object
+ if(istype(over_object, /atom/movable/screen/inventory/hand))
+ var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
-
/obj/item/minigunpack/update_icon_state()
if(armed)
icon_state = "notholstered"
@@ -91,8 +90,7 @@
update_icon()
user.update_inv_back()
-
-/obj/item/gun/ballistic/minigun
+/obj/item/gun/energy/minigun
name = "laser gatling gun"
desc = "An advanced laser cannon with an incredible rate of fire. Requires a bulky backpack power source to use."
icon = 'icons/obj/guns/minigun.dmi'
@@ -103,17 +101,20 @@
slot_flags = null
w_class = WEIGHT_CLASS_HUGE
custom_materials = null
- burst_size = 3
- automatic = 0
- fire_delay = 1
+ automatic = 0.5
+ fire_delay = 2
+ ammo_type = list(
+ /obj/item/ammo_casing/energy/laser
+ )
+
weapon_weight = WEAPON_HEAVY
fire_sound = 'sound/weapons/laser.ogg'
- mag_type = /obj/item/ammo_box/magazine/internal/minigun
- casing_ejector = FALSE
+ charge_sections = 0
+ shaded_charge = 0
item_flags = NEEDS_PERMIT | SLOWS_WHILE_IN_HAND
var/obj/item/minigunpack/ammo_pack
-/obj/item/gun/ballistic/minigun/Initialize()
+/obj/item/gun/energy/minigun/Initialize()
if(istype(loc, /obj/item/minigunpack)) //We should spawn inside an ammo pack so let's use that one.
ammo_pack = loc
else
@@ -121,29 +122,29 @@
return ..()
-/obj/item/gun/ballistic/minigun/attack_self(mob/living/user)
+/obj/item/gun/energy/minigun/attack_self(mob/living/user)
return
-/obj/item/gun/ballistic/minigun/dropped(mob/user)
+/obj/item/gun/energy/minigun/dropped(mob/user)
. = ..()
if(ammo_pack)
ammo_pack.attach_gun(user)
else
qdel(src)
-/obj/item/gun/ballistic/minigun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0, stam_cost = 0)
+/obj/item/gun/energy/minigun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0, stam_cost = 0)
if(ammo_pack)
if(ammo_pack.overheat < ammo_pack.overheat_max)
- ammo_pack.overheat += burst_size
+ ammo_pack.overheat++
..()
else
to_chat(user, "The gun's heat sensor locked the trigger to prevent lens damage.")
-/obj/item/gun/ballistic/minigun/afterattack(atom/target, mob/living/user, flag, params)
+/obj/item/gun/energy/minigun/afterattack(atom/target, mob/living/user, flag, params)
if(!ammo_pack || ammo_pack.loc != user)
to_chat(user, "You need the backpack power source to fire the gun!")
. = ..()
-/obj/item/gun/ballistic/minigun/dropped(mob/living/user)
+/obj/item/gun/energy/minigun/dropped(mob/living/user)
. = ..()
ammo_pack.attach_gun(user)
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index f965100846..15acd40172 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -310,9 +310,10 @@
/obj/item/gun/energy/temperature
name = "temperature gun"
icon_state = "freezegun"
+ item_state = null
desc = "A gun that changes temperatures."
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
- cell_type = "/obj/item/stock_parts/cell/high"
+ shaded_charge = TRUE
pin = null
/obj/item/gun/energy/temperature/security
diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm
index 9d9f6aeb83..2ef974a450 100644
--- a/code/modules/projectiles/guns/misc/beam_rifle.dm
+++ b/code/modules/projectiles/guns/misc/beam_rifle.dm
@@ -280,7 +280,7 @@
/obj/item/gun/energy/beam_rifle/onMouseDown(object, location, params, mob/mob)
if(istype(mob))
set_user(mob)
- if(istype(object, /obj/screen) && !istype(object, /obj/screen/click_catcher))
+ if(istype(object, /atom/movable/screen) && !istype(object, /atom/movable/screen/click_catcher))
return
if((object in mob.contents) || (object == mob))
return
@@ -288,7 +288,7 @@
return ..()
/obj/item/gun/energy/beam_rifle/onMouseUp(object, location, params, mob/M)
- if(istype(object, /obj/screen) && !istype(object, /obj/screen/click_catcher))
+ if(istype(object, /atom/movable/screen) && !istype(object, /atom/movable/screen/click_catcher))
return
process_aim()
if(fire_check() && can_trigger_gun(M))
diff --git a/code/modules/projectiles/guns/misc/syringe_gun.dm b/code/modules/projectiles/guns/misc/syringe_gun.dm
index dc2a1df03a..39b7cbf540 100644
--- a/code/modules/projectiles/guns/misc/syringe_gun.dm
+++ b/code/modules/projectiles/guns/misc/syringe_gun.dm
@@ -114,7 +114,7 @@
can_unsuppress = FALSE
/obj/item/gun/syringe/dart/Initialize()
- ..()
+ . = ..()
chambered = new /obj/item/ammo_casing/syringegun/dart(src)
/obj/item/gun/syringe/dart/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
diff --git a/code/modules/projectiles/projectile/energy/stun.dm b/code/modules/projectiles/projectile/energy/stun.dm
index 83b753e0a3..acec1ef94f 100644
--- a/code/modules/projectiles/projectile/energy/stun.dm
+++ b/code/modules/projectiles/projectile/energy/stun.dm
@@ -31,21 +31,28 @@
else if(tase_duration && (C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE) && !HAS_TRAIT(C, TRAIT_TASED_RESISTANCE))
C.apply_status_effect(strong_tase? STATUS_EFFECT_TASED : STATUS_EFFECT_TASED_WEAK, tase_duration)
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
+ else if(iscyborg(target))
+ target.visible_message(span_danger("A shower of sparks emit from [target] on impact from [src]!"))
+ do_sparks(1, TRUE, target)
+ var/mob/living/silicon/robot/R = target
+ R.vtec_disable(10 SECONDS)
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
do_sparks(1, TRUE, src)
..()
/obj/item/projectile/energy/electrode/security
- tase_duration = 30
+ tase_duration = 40
knockdown = 0
- stamina = 10
+ stamina = 0
knockdown_stamoverride = 0
knockdown_stam_max = 0
strong_tase = FALSE
/obj/item/projectile/energy/electrode/security/hos
- knockdown = 100
- knockdown_stamoverride = 30
- knockdown_stam_max = null
- tase_duration = 10
+ tase_duration = 40
+ knockdown = 0
+ stamina = 0
+ knockdown_stamoverride = 0
+ knockdown_stam_max = 0
+ strong_tase = FALSE
diff --git a/code/modules/projectiles/projectile/special/temperature.dm b/code/modules/projectiles/projectile/special/temperature.dm
index 71e6e79f59..ec23af6748 100644
--- a/code/modules/projectiles/projectile/special/temperature.dm
+++ b/code/modules/projectiles/projectile/special/temperature.dm
@@ -1,9 +1,17 @@
/obj/item/projectile/temp
name = "freeze beam"
icon_state = "ice_2"
+ pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
+ light_range = 2
damage_type = BURN
nodamage = FALSE
+ hitsound = 'sound/weapons/frost.ogg'
+ hitsound_wall = 'sound/weapons/frost.ogg'
+ ricochets_max = 50 //Honk!
+ ricochet_chance = 80
+ is_reflectable = TRUE
+ light_color = LIGHT_COLOR_BLUE
flag = "energy"
var/temperature = 100
@@ -15,7 +23,12 @@
/obj/item/projectile/temp/hot
name = "heat beam"
+ icon_state = "lava"
+ damage = 10
+ hitsound = 'sound/weapons/sear.ogg'
+ hitsound_wall = 'sound/weapons/effects/searwall.ogg'
temperature = 400
+ light_color = LIGHT_COLOR_RED
/obj/item/projectile/temp/cryo
name = "cryo beam"
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index fd6204a8e3..afad323a27 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -280,71 +280,114 @@
R.handle_reactions()
return amount
-/datum/reagents/proc/metabolize(mob/living/carbon/C, can_overdose = FALSE, liverless = FALSE)
+/**
+ * Triggers metabolizing for all the reagents in this holder
+ *
+ * Arguments:
+ * * mob/living/carbon/carbon - The mob to metabolize in, if null it uses [/datum/reagents/var/my_atom]
+ * * delta_time - the time in server seconds between proc calls (when performing normally it will be 2)
+ * * times_fired - the number of times the owner's life() tick has been called aka The number of times SSmobs has fired
+ * * can_overdose - Allows overdosing
+ * * liverless - Stops reagents that aren't set as [/datum/reagent/var/self_consuming] from metabolizing
+ */
+/datum/reagents/proc/metabolize(mob/living/carbon/owner, delta_time, times_fired, can_overdose = FALSE, liverless = FALSE)
var/list/cached_reagents = reagent_list
- var/list/cached_addictions = addiction_list
- if(C)
- expose_temperature(C.bodytemperature, 0.25)
- var/need_mob_update = 0
- for(var/reagent in cached_reagents)
- var/datum/reagent/R = reagent
- if(QDELETED(R.holder))
- continue
- if(liverless && !R.self_consuming) //need to be metabolized
- continue
- if(!C)
- C = R.holder.my_atom
- if(!R.metabolizing)
- R.metabolizing = TRUE
- R.on_mob_metabolize(C)
- if(C && R)
- if(C.reagent_check(R) != 1)
- if(can_overdose)
- if(R.overdose_threshold)
- if(R.volume > R.overdose_threshold && !R.overdosed)
- R.overdosed = 1
- var/turf/CT = get_turf(C)
- log_reagent("OVERDOSE START: [key_name(C)] at [AREACOORD(CT)] started overdosing on [R.volume] units of [R].")
- need_mob_update += R.overdose_start(C)
- if(R.addiction_threshold)
- if(R.volume > R.addiction_threshold && !is_type_in_list(R, cached_addictions))
- var/datum/reagent/new_reagent = new R.type()
- cached_addictions.Add(new_reagent)
- if(R.overdosed)
- need_mob_update += R.overdose_process(C)
- if(is_type_in_list(R,cached_addictions))
- for(var/addiction in cached_addictions)
- var/datum/reagent/A = addiction
- if(istype(R, A))
- A.addiction_stage = -15 // you're satisfied for a good while.
- need_mob_update += R.on_mob_life(C)
-
+ if(owner)
+ expose_temperature(owner.bodytemperature, 0.25)
+ var/need_mob_update = FALSE
+ for(var/datum/reagent/reagent as anything in cached_reagents)
+ need_mob_update += metabolize_reagent(owner, reagent, delta_time, times_fired, can_overdose, liverless)
if(can_overdose)
if(addiction_tick == 6)
addiction_tick = 1
- for(var/addiction in cached_addictions)
+ for(var/addiction in addiction_list)
var/datum/reagent/R = addiction
- if(C && R)
+ if(owner && R)
R.addiction_stage++
if(1 <= R.addiction_stage && R.addiction_stage <= R.addiction_stage1_end)
- need_mob_update += R.addiction_act_stage1(C)
+ need_mob_update += R.addiction_act_stage1(owner)
else if(R.addiction_stage1_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage2_end)
- need_mob_update += R.addiction_act_stage2(C)
+ need_mob_update += R.addiction_act_stage2(owner)
else if(R.addiction_stage2_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage3_end)
- need_mob_update += R.addiction_act_stage3(C)
+ need_mob_update += R.addiction_act_stage3(owner)
else if(R.addiction_stage3_end < R.addiction_stage && R.addiction_stage <= R.addiction_stage4_end)
- need_mob_update += R.addiction_act_stage4(C)
+ need_mob_update += R.addiction_act_stage4(owner)
else if(R.addiction_stage4_end < R.addiction_stage)
remove_addiction(R)
else
- SEND_SIGNAL(C, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
+ SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
addiction_tick++
- if(C && need_mob_update) //some of the metabolized reagents had effects on the mob that requires some updates.
- C.updatehealth()
- C.update_mobility()
- C.update_stamina()
+ if(owner && need_mob_update) //some of the metabolized reagents had effects on the mob that requires some updates.
+ owner.updatehealth()
+ owner.update_mobility()
+ owner.update_stamina()
update_total()
+/*
+ * Metabolises a single reagent for a target owner carbon mob. See above.
+ *
+ * Arguments:
+ * * mob/living/carbon/owner - The mob to metabolize in, if null it uses [/datum/reagents/var/my_atom]
+ * * delta_time - the time in server seconds between proc calls (when performing normally it will be 2)
+ * * times_fired - the number of times the owner's life() tick has been called aka The number of times SSmobs has fired
+ * * can_overdose - Allows overdosing
+ * * liverless - Stops reagents that aren't set as [/datum/reagent/var/self_consuming] from metabolizing
+ */
+/datum/reagents/proc/metabolize_reagent(mob/living/carbon/owner, datum/reagent/reagent, delta_time, times_fired, can_overdose = FALSE, liverless = FALSE)
+ var/need_mob_update = FALSE
+ if(QDELETED(reagent.holder))
+ return FALSE
+
+ if(!owner)
+ owner = reagent.holder.my_atom
+
+ if(owner && reagent)
+ if(!owner.reagent_check(reagent, delta_time, times_fired) != TRUE)
+ return
+ if(liverless && !reagent.self_consuming) //need to be metabolized
+ return
+ if(!reagent.metabolizing)
+ reagent.metabolizing = TRUE
+ reagent.on_mob_metabolize(owner)
+ if(can_overdose)
+ if(reagent.overdose_threshold)
+ if(reagent.volume >= reagent.overdose_threshold && !reagent.overdosed)
+ reagent.overdosed = TRUE
+ need_mob_update += reagent.overdose_start(owner)
+ log_game("[key_name(owner)] has started overdosing on [reagent.name] at [reagent.volume] units.")
+
+ // for(var/addiction in reagent.addiction_types)
+ // owner.mind?.add_addiction_points(addiction, reagent.addiction_types[addiction] * REAGENTS_METABOLISM)
+ if(reagent.addiction_threshold)
+ if(reagent.volume > reagent.addiction_threshold && !is_type_in_list(reagent, addiction_list))
+ var/datum/reagent/new_reagent = new reagent.type()
+ addiction_list.Add(new_reagent)
+ if(is_type_in_list(reagent, addiction_list))
+ for(var/addiction in addiction_list)
+ var/datum/reagent/A = addiction
+ if(istype(reagent, A))
+ A.addiction_stage = -15 // you're satisfied for a good while.
+
+ if(reagent.overdosed)
+ need_mob_update += reagent.overdose_process(owner, delta_time, times_fired)
+
+ need_mob_update += reagent.on_mob_life(owner, delta_time, times_fired)
+ return need_mob_update
+
+/// Signals that metabolization has stopped, triggering the end of trait-based effects
+/datum/reagents/proc/end_metabolization(mob/living/carbon/C, keep_liverless = TRUE)
+ var/list/cached_reagents = reagent_list
+ for(var/datum/reagent/reagent as anything in cached_reagents)
+ if(QDELETED(reagent.holder))
+ continue
+ if(keep_liverless && reagent.self_consuming) //Will keep working without a liver
+ continue
+ if(!C)
+ C = reagent.holder.my_atom
+ if(reagent.metabolizing)
+ reagent.metabolizing = FALSE
+ reagent.on_mob_end_metabolize(C)
+
/datum/reagents/proc/remove_addiction(datum/reagent/R)
to_chat(my_atom, "You feel like you've gotten over your need for [R.name].")
SEND_SIGNAL(my_atom, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
@@ -354,21 +397,6 @@
addiction_list.Remove(R)
qdel(R)
-//Signals that metabolization has stopped, triggering the end of trait-based effects
-/datum/reagents/proc/end_metabolization(mob/living/carbon/C, keep_liverless = TRUE)
- var/list/cached_reagents = reagent_list
- for(var/reagent in cached_reagents)
- var/datum/reagent/R = reagent
- if(QDELETED(R.holder))
- continue
- if(keep_liverless && R.self_consuming) //Will keep working without a liver
- continue
- if(!C)
- C = R.holder.my_atom
- if(R.metabolizing)
- R.metabolizing = FALSE
- R.on_mob_end_metabolize(C)
-
/datum/reagents/proc/conditional_update_move(atom/A, Running = 0)
var/list/cached_reagents = reagent_list
for(var/reagent in cached_reagents)
diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
index 177b1c70bc..12c91e145a 100644
--- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
@@ -586,7 +586,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(AmBloodsucker(C))
disgust_bloodsucker(FALSE, 1) //Bloodsuckers get SOME blood from it, for style reasons.
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
- C.blood_volume = min((BLOOD_VOLUME_NORMAL*C.blood_ratio), C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
+ C.adjust_integration_blood(3) //Bloody Mary quickly restores blood loss.
..()
/datum/reagent/consumable/ethanol/brave_bull
@@ -2516,19 +2516,101 @@ All effects don't start immediately, but rather get worse over time; the rate is
color = "#FFFFFF"
boozepwr = 35
quality = DRINK_GOOD
- taste_description = "a delightful softened punch"
- glass_icon_state = "godfather"
- glass_name = "Godfather"
- glass_desc = "A classic from old Italy and enjoyed by gangsters, pray the orange peel doesnt end up in your mouth."
+ taste_description = "bad coding"
+ can_synth = FALSE
+ var/list/names = list("null fruit" = 1) //Names of the fruits used. Associative list where name is key, value is the percentage of that fruit.
+ var/list/tastes = list("bad coding" = 1) //List of tastes. See above.
+ pH = 4
-/datum/reagent/consumable/ethanol/godmother
- name = "Godmother"
- description = "A twist on a classic, liked more by mature women."
- boozepwr = 50
- color = "#E68F00"
- quality = DRINK_GOOD
- taste_description = "sweetness and a zesty twist"
- glass_icon_state = "godmother"
- glass_name = "Godmother"
- glass_desc = "A lovely fresh smelling cocktail, a true Sicilian delight."
+/datum/reagent/consumable/ethanol/fruit_wine/on_new(list/data)
+ names = data["names"]
+ tastes = data["tastes"]
+ boozepwr = data["boozepwr"]
+ color = data["color"]
+ generate_data_info(data)
+/datum/reagent/consumable/ethanol/fruit_wine/on_merge(list/data, amount)
+ var/diff = (amount/volume)
+ if(diff < 1)
+ color = BlendRGB(color, data["color"], diff/2) //The percentage difference over two, so that they take average if equal.
+ else
+ color = BlendRGB(color, data["color"], (1/diff)/2) //Adjust so it's always blending properly.
+ var/oldvolume = volume-amount
+
+ var/list/cachednames = data["names"]
+ for(var/name in names | cachednames)
+ names[name] = ((names[name] * oldvolume) + (cachednames[name] * amount)) / volume
+
+ var/list/cachedtastes = data["tastes"]
+ for(var/taste in tastes | cachedtastes)
+ tastes[taste] = ((tastes[taste] * oldvolume) + (cachedtastes[taste] * amount)) / volume
+
+ boozepwr *= oldvolume
+ var/newzepwr = data["boozepwr"] * amount
+ boozepwr += newzepwr
+ boozepwr /= volume //Blending boozepwr to volume.
+ generate_data_info(data)
+
+/datum/reagent/consumable/ethanol/fruit_wine/proc/generate_data_info(list/data)
+ var/minimum_percent = 0.15 //Percentages measured between 0 and 1.
+ var/list/primary_tastes = list()
+ var/list/secondary_tastes = list()
+ glass_name = "glass of [name]"
+ glass_desc = description
+ for(var/taste in tastes)
+ switch(tastes[taste])
+ if(minimum_percent*2 to INFINITY)
+ primary_tastes += taste
+ if(minimum_percent to minimum_percent*2)
+ secondary_tastes += taste
+
+ var/minimum_name_percent = 0.35
+ name = ""
+ var/list/names_in_order = sortTim(names, /proc/cmp_numeric_dsc, TRUE)
+ var/named = FALSE
+ for(var/fruit_name in names)
+ if(names[fruit_name] >= minimum_name_percent)
+ name += "[fruit_name] "
+ named = TRUE
+ if(named)
+ name += "wine"
+ else
+ name = "mixed [names_in_order[1]] wine"
+
+ var/alcohol_description
+ switch(boozepwr)
+ if(120 to INFINITY)
+ alcohol_description = "suicidally strong"
+ if(90 to 120)
+ alcohol_description = "rather strong"
+ if(70 to 90)
+ alcohol_description = "strong"
+ if(40 to 70)
+ alcohol_description = "rich"
+ if(20 to 40)
+ alcohol_description = "mild"
+ if(0 to 20)
+ alcohol_description = "sweet"
+ else
+ alcohol_description = "watery" //How the hell did you get negative boozepwr?
+
+ var/list/fruits = list()
+ if(names_in_order.len <= 3)
+ fruits = names_in_order
+ else
+ for(var/i in 1 to 3)
+ fruits += names_in_order[i]
+ fruits += "other plants"
+ var/fruit_list = english_list(fruits)
+ description = "A [alcohol_description] wine brewed from [fruit_list]."
+
+ var/flavor = ""
+ if(!primary_tastes.len)
+ primary_tastes = list("[alcohol_description] alcohol")
+ flavor += english_list(primary_tastes)
+ if(secondary_tastes.len)
+ flavor += ", with a hint of "
+ flavor += english_list(secondary_tastes)
+ taste_description = flavor
+ if(holder.my_atom)
+ holder.my_atom.on_reagent_change()
diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm
index f4f5b90398..5059376954 100644
--- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm
@@ -505,11 +505,11 @@
value = REAGENT_VALUE_COMMON
/datum/reagent/consumable/nuka_cola/on_mob_metabolize(mob/living/carbon/M)
- M.add_movespeed_modifier(/datum/movespeed_modifier/reagent/meth)
+ M.add_movespeed_modifier(/datum/movespeed_modifier/reagent/nuka_cola)
return ..()
/datum/reagent/consumable/nuka_cola/on_mob_end_metabolize(mob/living/carbon/M)
- M.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/meth)
+ M.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/nuka_cola)
return ..()
/datum/reagent/consumable/nuka_cola/on_mob_life(mob/living/carbon/M)
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index 96985514b5..ed80804f28 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -164,62 +164,54 @@
/datum/reagent/drug/methamphetamine
name = "Methamphetamine"
- description = "Reduces stun times by about 300%, and allows the user to quickly recover stamina while dealing a small amount of Brain damage. If overdosed the subject will move randomly, laugh randomly, drop items and suffer from Toxin and Brain damage. If addicted the subject will constantly jitter and drool, before becoming dizzy and losing motor control and eventually suffer heavy toxin damage."
+ description = "Reduces stun times by about 300%, speeds the user up, and allows the user to quickly recover stamina while dealing a small amount of Brain damage. If overdosed the subject will move randomly, laugh randomly, drop items and suffer from Toxin and Brain damage. If addicted the subject will constantly jitter and drool, before becoming dizzy and losing motor control and eventually suffer heavy toxin damage."
reagent_state = LIQUID
color = "#FAFAFA"
overdose_threshold = 20
- addiction_threshold = 10
metabolization_rate = 0.75 * REAGENTS_METABOLISM
- var/brain_damage = TRUE
- var/jitter = TRUE
- var/confusion = TRUE
pH = 5
+ addiction_threshold = 10
value = REAGENT_VALUE_UNCOMMON
/datum/reagent/drug/methamphetamine/on_mob_metabolize(mob/living/L)
..()
- ADD_TRAIT(L, TRAIT_IGNOREDAMAGESLOWDOWN, type)
- L.update_movespeed()
- ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type)
- L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/meth)
+ L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine)
/datum/reagent/drug/methamphetamine/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_IGNOREDAMAGESLOWDOWN, type)
- L.update_movespeed()
- REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type)
- L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/meth)
+ L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine)
..()
-/datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M)
+/datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/high_message = pick("You feel hyper.", "You feel like you need to go faster.", "You feel like you can run the world.")
- if(prob(5))
- to_chat(M, "[high_message]")
- M.AdjustAllImmobility(-40, 0)
- M.AdjustUnconscious(-40, 0)
- M.adjustStaminaLoss(-7.5 * REM, 0)
- if(jitter)
- M.Jitter(2)
- if(brain_damage)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1,4))
- M.heal_overall_damage(2, 2)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
+ to_chat(M, span_notice("[high_message]"))
+ // SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "tweaking", /datum/mood_event/stimulant_medium, name)
+ M.AdjustStun(-40 * REM * delta_time)
+ M.AdjustKnockdown(-40 * REM * delta_time)
+ M.AdjustUnconscious(-40 * REM * delta_time)
+ M.AdjustParalyzed(-40 * REM * delta_time)
+ M.AdjustImmobilized(-40 * REM * delta_time)
+ M.adjustStaminaLoss(-2 * REM * delta_time, 0)
+ M.Jitter(2 * REM * delta_time)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1, 4) * REM * delta_time)
+ if(DT_PROB(2.5, delta_time))
M.emote(pick("twitch", "shiver"))
..()
- . = 1
+ . = TRUE
-/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
+/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M, delta_time, times_fired)
if(CHECK_MOBILITY(M, MOBILITY_MOVE) && !ismovable(M.loc))
- for(var/i in 1 to 4)
+ for(var/i in 1 to round(4 * REM * delta_time, 1))
step(M, pick(GLOB.cardinals))
- if(prob(20))
+ if(DT_PROB(10, delta_time))
M.emote("laugh")
- if(prob(33))
- M.visible_message("[M]'s hands flip out and flail everywhere!")
+ if(DT_PROB(18, delta_time))
+ M.visible_message(span_danger("[M]'s hands flip out and flail everywhere!"))
M.drop_all_held_items()
..()
- M.adjustToxLoss(1, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, pick(0.5, 0.6, 0.7, 0.8, 0.9, 1))
- . = 1
+ M.adjustToxLoss(1 * REM * delta_time, 0)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, (rand(5, 10) / 10) * REM * delta_time)
+ . = TRUE
/datum/reagent/drug/methamphetamine/addiction_act_stage1(mob/living/M)
M.Jitter(5)
@@ -256,14 +248,6 @@
..()
. = 1
-/datum/reagent/drug/methamphetamine/changeling
- name = "Changeling Adrenaline"
- addiction_threshold = 35
- overdose_threshold = 35
- jitter = FALSE
- brain_damage = FALSE
- value = REAGENT_VALUE_RARE
-
/datum/reagent/drug/bath_salts
name = "Bath Salts"
description = "Makes you impervious to stuns and grants a stamina regeneration buff, but you will be a nearly uncontrollable tramp-bearded raving lunatic."
diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm
index 303fd981fb..a9bdff64b2 100644
--- a/code/modules/reagents/chemistry/reagents/food_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm
@@ -345,6 +345,8 @@
victim.confused = max(M.confused, 3)
victim.damageoverlaytemp = 60
victim.DefaultCombatKnockdown(80, override_hardstun = 0.1, override_stamdmg = min(reac_volume * 3, 15))
+ victim.add_movespeed_modifier(/datum/movespeed_modifier/reagent/pepperspray)
+ addtimer(CALLBACK(victim, /mob.proc/remove_movespeed_modifier, /datum/movespeed_modifier/reagent/pepperspray), 10 SECONDS)
return
else if ( eyes_covered ) // Eye cover is better than mouth cover
victim.blur_eyes(3)
@@ -358,6 +360,8 @@
victim.confused = max(M.confused, 6)
victim.damageoverlaytemp = 75
victim.DefaultCombatKnockdown(80, override_hardstun = 0.1, override_stamdmg = min(reac_volume * 5, 25))
+ victim.add_movespeed_modifier(/datum/movespeed_modifier/reagent/pepperspray)
+ addtimer(CALLBACK(victim, /mob.proc/remove_movespeed_modifier, /datum/movespeed_modifier/reagent/pepperspray), 10 SECONDS)
victim.update_damage_hud()
/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/carbon/M)
@@ -524,10 +528,9 @@
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10 SECONDS, wet_time_to_add = reac_volume*2 SECONDS)
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot)
- var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles())
- lowertemp.set_temperature(max( min(lowertemp.return_temperature()-2000,lowertemp.return_temperature() / 2) ,0))
+ var/datum/gas_mixture/lowertemp = T.return_air()
+ lowertemp.set_temperature(max( min(lowertemp.return_temperature()-2000,lowertemp.return_temperature() / 2) ,TCMB))
lowertemp.react(src)
- T.assume_air(lowertemp)
qdel(hotspot)
/datum/reagent/consumable/enzyme
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 65443b65c7..a07c5f7a2a 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -396,26 +396,34 @@
metabolization_rate = 0.5 * REAGENTS_METABOLISM
overdose_threshold = 60
taste_description = "sweetness and salt"
+ var/extra_regen = 0.25 // in addition to acting as temporary blood, also add this much to their actual blood per tick
var/last_added = 0
var/maximum_reachable = BLOOD_VOLUME_NORMAL - 10 //So that normal blood regeneration can continue with salglu active
- var/extra_regen = 0.25 // in addition to acting as temporary blood, also add this much to their actual blood per tick
pH = 5.5
-/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M)
- if((HAS_TRAIT(M, TRAIT_NOMARROW)))
- return
- if(last_added)
- M.blood_volume -= last_added
- last_added = 0
- if(M.blood_volume < maximum_reachable) //Can only up to double your effective blood level.
- var/amount_to_add = min(M.blood_volume, volume*5)
- var/new_blood_level = min(M.blood_volume + amount_to_add, maximum_reachable)
- last_added = new_blood_level - M.blood_volume
- M.blood_volume = new_blood_level + extra_regen
+/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/human/M)
if(prob(33))
M.adjustBruteLoss(-0.5*REM, 0)
M.adjustFireLoss(-0.5*REM, 0)
. = TRUE
+ if((HAS_TRAIT(M, TRAIT_NOMARROW)))
+ return ..()
+ if(last_added)
+ M.adjust_integration_blood(-last_added, TRUE)
+ last_added = 0
+ if(M.functional_blood() < maximum_reachable) //Can only up to double your effective blood level.
+ var/new_blood_level = min(volume * 5, maximum_reachable)
+ last_added = new_blood_level
+ M.adjust_integration_blood(new_blood_level + (extra_regen * REM))
+ if(prob(33))
+ M.adjustBruteLoss(-0.5*REM, 0)
+ M.adjustFireLoss(-0.5*REM, 0)
+ . = TRUE
+ ..()
+
+/datum/reagent/medicine/salglu_solution/on_mob_delete(mob/living/carbon/human/M)
+ if(last_added)
+ M.adjust_integration_blood(-last_added, TRUE)
..()
/datum/reagent/medicine/salglu_solution/overdose_process(mob/living/M)
@@ -706,21 +714,42 @@
addiction_threshold = 30
pH = 12
-/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M)
- M.AdjustAllImmobility(-20, FALSE)
- M.AdjustUnconscious(-20, FALSE)
- M.adjustStaminaLoss(-4.5*REM, FALSE)
- M.Jitter(10)
- if(prob(50))
- M.confused = max(M.confused, 1)
+/datum/reagent/medicine/ephedrine/on_mob_metabolize(mob/living/L)
+ ..()
+ L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
+ ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type)
+
+/datum/reagent/medicine/ephedrine/on_mob_end_metabolize(mob/living/L)
+ L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
+ REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type)
+ ..()
+
+/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ // if(DT_PROB(10 * (1-creation_purity), delta_time) && iscarbon(M))
+ // var/obj/item/I = M.get_active_held_item()
+ // if(I && M.dropItemToGround(I))
+ // to_chat(M, span_notice("Your hands spaz out and you drop what you were holding!"))
+ // M.Jitter(10)
+
+ M.AdjustAllImmobility(-20 * REM * delta_time)
+ M.adjustStaminaLoss(-1 * REM * delta_time, FALSE)
..()
return TRUE
-/datum/reagent/medicine/ephedrine/overdose_process(mob/living/M)
- if(prob(33))
- M.adjustToxLoss(0.5*REM, 0)
+/datum/reagent/medicine/ephedrine/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(1, delta_time) && iscarbon(M))
+ var/datum/disease/D = new /datum/disease/heart_failure
+ M.ForceContractDisease(D)
+ to_chat(M, span_userdanger("You're pretty sure you just felt your heart stop for a second there.."))
+ M.playsound_local(M, 'sound/effects/singlebeat.ogg', 100, 0)
+
+ if(DT_PROB(3.5, delta_time))
+ to_chat(M, span_notice("[pick("Your head pounds.", "You feel a tight pain in your chest.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]"))
+
+ if(DT_PROB(18, delta_time))
+ M.adjustToxLoss(1, 0)
M.losebreath++
- . = 1
+ . = TRUE
return TRUE
/datum/reagent/medicine/ephedrine/addiction_act_stage1(mob/living/M)
@@ -981,7 +1010,7 @@
M.grab_ghost()
M.emote("gasp")
log_combat(M, M, "revived", src)
- var/list/policies = CONFIG_GET(keyed_list/policyconfig)
+ var/list/policies = CONFIG_GET(keyed_list/policy)
var/timelimit = CONFIG_GET(number/defib_cmd_time_limit) * 10 //the config is in seconds, not deciseconds
var/late = timelimit && (tplus > timelimit)
var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
@@ -1274,7 +1303,7 @@
M.adjustCloneLoss(-3*REM, FALSE)
M.adjustStaminaLoss(-25*REM,FALSE)
if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio))
- M.blood_volume += 40 // blood fall out man bad
+ M.adjust_integration_blood(40) // blood fall out man bad
..()
. = 1
@@ -1295,7 +1324,7 @@
M.adjustCloneLoss(-1.25*REM, FALSE)
M.adjustStaminaLoss(-4*REM,FALSE)
if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio))
- M.blood_volume += 3
+ M.adjust_integration_blood(3)
..()
. = 1
@@ -1415,37 +1444,42 @@
/datum/reagent/medicine/changelingadrenaline
name = "Changeling Adrenaline"
description = "Reduces the duration of unconciousness, knockdown and stuns. Restores stamina, but deals toxin damage when overdosed."
- color = "#918e53"
+ color = "#C1151D"
overdose_threshold = 30
value = REAGENT_VALUE_VERY_RARE
-/datum/reagent/medicine/changelingadrenaline/on_mob_metabolize(mob/living/L)
- ..()
- ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type)
-
-/datum/reagent/medicine/changelingadrenaline/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type)
- ..()
-
-/datum/reagent/medicine/changelingadrenaline/on_mob_life(mob/living/carbon/M as mob)
- M.AdjustUnconscious(-20, 0)
- M.AdjustAllImmobility(-20, 0)
- M.AdjustSleeping(-20, 0)
- M.adjustStaminaLoss(-30, 0)
+/datum/reagent/medicine/changelingadrenaline/on_mob_life(mob/living/carbon/metabolizer, delta_time, times_fired)
..()
+ metabolizer.AdjustAllImmobility(-20 * REM * delta_time)
+ metabolizer.adjustStaminaLoss(-10 * REM * delta_time, 0)
+ metabolizer.Jitter(10 * REM * delta_time)
+ metabolizer.Dizzy(10 * REM * delta_time)
return TRUE
-/datum/reagent/medicine/changelingadrenaline/overdose_process(mob/living/M as mob)
- M.adjustToxLoss(5, 0) //let's make this mildly more toxic because of the stamina buff
+/datum/reagent/medicine/changelingadrenaline/on_mob_metabolize(mob/living/L)
+ ..()
+ ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, type)
+ ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type)
+ L.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
+
+/datum/reagent/medicine/changelingadrenaline/on_mob_end_metabolize(mob/living/L)
+ ..()
+ REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, type)
+ REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type)
+ L.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
+ L.Dizzy(0)
+ L.Jitter(0)
+
+/datum/reagent/medicine/changelingadrenaline/overdose_process(mob/living/metabolizer, delta_time, times_fired)
+ metabolizer.adjustToxLoss(1 * REM * delta_time, 0)
..()
return TRUE
/datum/reagent/medicine/changelinghaste
name = "Changeling Haste"
description = "Drastically increases movement speed, but deals toxin damage."
- color = "#669153"
- metabolization_rate = 1
- value = REAGENT_VALUE_VERY_RARE
+ color = "#AE151D"
+ metabolization_rate = 2.5 * REAGENTS_METABOLISM
/datum/reagent/medicine/changelinghaste/on_mob_metabolize(mob/living/L)
..()
@@ -1455,11 +1489,12 @@
L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/changelinghaste)
..()
-/datum/reagent/medicine/changelinghaste/on_mob_life(mob/living/carbon/M)
- M.adjustToxLoss(2, 0)
+/datum/reagent/medicine/changelinghaste/on_mob_life(mob/living/carbon/metabolizer, delta_time, times_fired)
+ metabolizer.adjustToxLoss(2 * REM * delta_time, 0)
..()
return TRUE
+
/datum/reagent/medicine/corazone
// Heart attack code will not do damage if corazone is present
// because it's SPACE MAGIC ASPIRIN
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 593d77f959..bf93c933de 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -48,7 +48,7 @@
var/mob/living/carbon/C = L
var/blood_id = C.get_blood_id()
if((HAS_TRAIT(C, TRAIT_NOMARROW) || blood_id == /datum/reagent/blood || blood_id == /datum/reagent/blood/jellyblood) && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
- C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM * C.blood_ratio)
+ C.adjust_integration_blood(round(reac_volume, 0.1))
// we don't care about bloodtype here, we're just refilling the mob
if(reac_volume >= 10 && istype(L) && method != INJECT)
@@ -253,7 +253,7 @@
/datum/reagent/water/on_mob_life(mob/living/carbon/M)
. = ..()
if(M.blood_volume)
- M.blood_volume += 0.1 // water is good for you!
+ M.adjust_integration_blood(0.1) // water is good for you!
/*
* Water reaction to turf
@@ -287,7 +287,9 @@
/datum/reagent/water/reaction_obj(obj/O, reac_volume)
O.extinguish()
- O.acid_level = 0
+ var/datum/component/acid/acid = O.GetComponent(/datum/component/acid)
+ if(acid)
+ acid.level = 0
// cubes
if(istype(O, /obj/item/reagent_containers/food/snacks/cube))
var/obj/item/reagent_containers/food/snacks/cube/cube = O
@@ -368,7 +370,7 @@
/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M)
if(M.blood_volume)
- M.blood_volume += 0.1 // water is good for you!
+ M.adjust_integration_blood(0.1) // water is good for you!
if(!data)
data = list("misc" = 1)
data["misc"]++
@@ -454,7 +456,7 @@
M.adjustBruteLoss(-2, FALSE)
M.adjustFireLoss(-2, FALSE)
if(ishuman(M) && M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio))
- M.blood_volume += 3
+ M.adjust_integration_blood(3)
else // Will deal about 90 damage when 50 units are thrown
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150)
M.adjustToxLoss(2, FALSE)
@@ -1144,7 +1146,7 @@
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
return
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
- C.blood_volume += 0.25
+ C.adjust_integration_blood(0.25)
..()
/datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
@@ -2550,7 +2552,7 @@
M.adjustBruteLoss(-3, FALSE)
M.adjustFireLoss(-3, FALSE)
if(ishuman(M) && M.blood_volume < BLOOD_VOLUME_NORMAL)
- M.blood_volume += 3
+ M.adjust_integration_blood(3)
else
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150)
M.adjustToxLoss(2, FALSE)
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index 0655faa1e8..7dd8cac452 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -827,7 +827,7 @@
if(prob(33)) // 1/3rd of the time, let's make it stack with the previous matrix! Mwhahahaha!
for(var/whole_screen in screens)
- var/obj/screen/plane_master/PM = whole_screen
+ var/atom/movable/screen/plane_master/PM = whole_screen
newmatrix = skew * PM.transform
for(var/whole_screen in screens)
diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm
index 7df061c8aa..41c0ed717e 100644
--- a/code/modules/reagents/chemistry/recipes.dm
+++ b/code/modules/reagents/chemistry/recipes.dm
@@ -40,6 +40,7 @@
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, multiplier, specialreact)
+ set waitfor = FALSE
return
//I recommend you set the result amount to the total volume of all components.
diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
index 070d5cb269..2301473c48 100644
--- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
+++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm
@@ -72,7 +72,6 @@
R.stun(20)
R.reveal(100)
R.adjustHealth(50)
- sleep(20)
for(var/mob/living/carbon/C in get_hearers_in_view(round(multiplier/48,1),get_turf(holder.my_atom)))
if(iscultist(C))
to_chat(C, "The divine explosion sears you!")
@@ -433,20 +432,24 @@
var/T1 = multiplier * 20 //100 units : Zap 3 times, with powers 2000/5000/12000. Tesla revolvers have a power of 10000 for comparison.
var/T2 = multiplier * 50
var/T3 = multiplier * 120
- sleep(5)
+ var/added_delay = 0.5 SECONDS
if(multiplier >= 75)
- tesla_zap(holder.my_atom, 7, T1, zap_flags)
- playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
- sleep(15)
+ addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T1), added_delay)
+ added_delay += 1.5 SECONDS
if(multiplier >= 40)
- tesla_zap(holder.my_atom, 7, T2, zap_flags)
- playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
- sleep(15)
+ addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T2), added_delay)
+ added_delay += 1.5 SECONDS
if(multiplier >= 10) //10 units minimum for lightning, 40 units for secondary blast, 75 units for tertiary blast.
- tesla_zap(holder.my_atom, 7, T3, zap_flags)
- playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
+ addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T3), added_delay)
..()
+
+/datum/chemical_reaction/reagent_explosion/teslium_lightning/proc/zappy_zappy(datum/reagents/holder, power)
+ if(QDELETED(holder.my_atom))
+ return
+ tesla_zap(holder.my_atom, 7, power, zap_flags)
+ playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, TRUE)
+
/datum/chemical_reaction/reagent_explosion/teslium_lightning/heat
id = "teslium_lightning2"
required_temp = 474
diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm
index 1e78d81f24..fddff17a9d 100644
--- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm
+++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm
@@ -3,6 +3,9 @@
var/deletes_extract = TRUE
/datum/chemical_reaction/slime/on_reaction(datum/reagents/holder)
+ use_slime_core(holder)
+
+/datum/chemical_reaction/slime/proc/use_slime_core(datum/reagents/holder)
SSblackbox.record_feedback("tally", "slime_cores_used", 1, "type")
if(deletes_extract)
delete_extract(holder)
@@ -232,8 +235,7 @@
if(holder && holder.my_atom)
var/turf/open/T = get_turf(holder.my_atom)
if(istype(T))
- var/datum/gas/gastype = /datum/gas/nitrogen
- T.atmos_spawn_air("[initial(gastype.id)]=50;TEMP=2.7")
+ T.atmos_spawn_air("n2=50;TEMP=2.7")
/datum/chemical_reaction/slime/slimefireproof
name = "Slime Fireproof"
@@ -570,7 +572,9 @@
required_other = TRUE
/datum/chemical_reaction/slime/slimestop/on_reaction(datum/reagents/holder)
- sleep(50)
+ addtimer(CALLBACK(src, .proc/slime_stop, holder), 5 SECONDS)
+
+/datum/chemical_reaction/slime/slimestop/proc/slime_stop(datum/reagents/holder)
var/obj/item/slime_extract/sepia/extract = holder.my_atom
var/turf/T = get_turf(holder.my_atom)
new /obj/effect/timestop(T, null, null, null)
@@ -579,8 +583,7 @@
var/mob/lastheld = get_mob_by_key(holder.my_atom.fingerprintslast)
if(lastheld && !lastheld.equip_to_slot_if_possible(extract, SLOT_HANDS, disable_warning = TRUE))
extract.forceMove(get_turf(lastheld))
-
- ..()
+ use_slime_core(holder)
/datum/chemical_reaction/slime/slimecamera
name = "Slime Camera"
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index eb3b80b693..02c8a9802c 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -16,9 +16,10 @@
var/stream_mode = 0 //whether we use the more focused mode
var/current_range = 3 //the range of tiles the sprayer will reach.
var/spray_range = 3 //the range of tiles the sprayer will reach when in spray mode.
- var/stream_range = 1 //the range of tiles the sprayer will reach when in stream mode.
+ var/stream_range = 3 //the range of tiles the sprayer will reach when in stream mode.
var/stream_amount = 10 //the amount of reagents transfered when in stream mode.
- var/spray_delay = 3 //The amount of sleep() delay between each chempuff step.
+ /// Amount of time it takes for a spray to completely travel.
+ var/spray_delay = 8
/// Last world.time of spray
var/last_spray = 0
/// Spray cooldown
@@ -72,58 +73,19 @@
if((last_spray + spray_cooldown) > world.time)
return
var/range = clamp(get_dist(src, A), 1, current_range)
- var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
- D.create_reagents(amount_per_transfer_from_this, NONE, NO_REAGENTS_VALUE)
- var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
- if(stream_mode)
- reagents.trans_to(D, amount_per_transfer_from_this)
- puff_reagent_left = 1
- else
- reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
- D.color = mix_color_from_reagents(D.reagents.reagent_list)
+ var/wait_step = CEILING(spray_delay * INVERSE(range), world.tick_lag)
+ var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src), stream_mode, wait_step, range, stream_mode? 1 : range, amount_per_transfer_from_this)
var/turf/T = get_turf(src)
if(!T)
return
log_reagent("SPRAY: [key_name(usr)] fired [src] ([REF(src)]) [COORD(T)] at [A] ([REF(A)]) [COORD(A)] (chempuff: [D.reagents.log_list()])")
- var/wait_step = max(round(2+ spray_delay * INVERSE(range)), 2)
+ if(stream_mode)
+ reagents.trans_to(D, amount_per_transfer_from_this)
+ else
+ reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
+ D.add_atom_colour(mix_color_from_reagents(D.reagents.reagent_list), TEMPORARY_COLOUR_PRIORITY)
last_spray = world.time
- INVOKE_ASYNC(src, .proc/do_spray, A, wait_step, D, range, puff_reagent_left)
- return TRUE
-
-/obj/item/reagent_containers/spray/proc/do_spray(atom/A, wait_step, obj/effect/decal/chempuff/D, range, puff_reagent_left)
- var/range_left = range
- for(var/i=0, i 0 && (!stream_mode || !range_left))
- D.reagents.reaction(get_turf(D), VAPOR)
- puff_reagent_left -= 1
-
- if(puff_reagent_left <= 0) // we used all the puff so we delete it.
- qdel(D)
- return
- qdel(D)
+ INVOKE_ASYNC(D, /obj/effect/decal/chempuff/proc/run_puff, A)
/obj/item/reagent_containers/spray/attack_self(mob/user)
stream_mode = !stream_mode
@@ -207,7 +169,7 @@
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
volume = 40
stream_range = 4
- spray_delay = 1
+ spray_delay = 2
amount_per_transfer_from_this = 5
list_reagents = list(/datum/reagent/consumable/condensedcapsaicin = 40)
diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm
index aefb670dd3..e9c17ecc28 100644
--- a/code/modules/recycling/conveyor2.dm
+++ b/code/modules/recycling/conveyor2.dm
@@ -268,16 +268,19 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
// timed process
// if the switch changed, update the linked conveyors
-/obj/machinery/conveyor_switch/process()
- if(!operated)
- return
- operated = 0
-
+/obj/machinery/conveyor_switch/proc/do_process()
+ set waitfor = FALSE
for(var/obj/machinery/conveyor/C in GLOB.conveyors_by_id[id])
C.operating = position
C.update_move_direction()
CHECK_TICK
+/obj/machinery/conveyor_switch/process()
+ if(!operated)
+ return
+ operated = 0
+ do_process()
+
// attack with hand, switch position
/obj/machinery/conveyor_switch/interact(mob/user)
add_fingerprint(user)
diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm
index ef3a053027..7fc57ee3a7 100644
--- a/code/modules/recycling/disposal/bin.dm
+++ b/code/modules/recycling/disposal/bin.dm
@@ -401,12 +401,15 @@
//check for items in disposal - occupied light
if(contents.len > 0)
. += "dispover-full"
+ . += emissive_appearance(icon, "dispover-full", alpha = src.alpha)
//charging and ready light
if(pressure_charging)
. += "dispover-charge"
+ . += emissive_appearance(icon, "dispover-charge-glow", alpha = src.alpha)
else if(full_pressure)
. += "dispover-ready"
+ . += emissive_appearance(icon, "dispover-ready-glow", alpha = src.alpha)
/obj/machinery/disposal/bin/proc/do_flush()
set waitfor = FALSE
@@ -462,7 +465,7 @@
/obj/machinery/disposal/bin/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
- user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
+ user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
//Delivery Chute
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_medical_and_dinnerware.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_medical_and_dinnerware.dm
index 76b016e3de..67890838db 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_medical_and_dinnerware.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_medical_and_dinnerware.dm
@@ -184,10 +184,11 @@
/datum/design/syringe
name = "Syringe"
id = "syringe"
- build_type = AUTOLATHE
+ build_type = AUTOLATHE | PROTOLATHE
materials = list(/datum/material/iron = 10, /datum/material/glass = 20)
build_path = /obj/item/reagent_containers/syringe
- category = list("initial", "Medical")
+ category = list("initial", "Medical","Medical Designs")
+ departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/health_sensor
name = "Health Sensor"
diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm
index bb5989e5c6..88c37ce2a2 100644
--- a/code/modules/research/designs/medical_designs.dm
+++ b/code/modules/research/designs/medical_designs.dm
@@ -201,6 +201,15 @@
build_path = /obj/item/storage/hypospraykit // let's not summon new hyposprays thanks
category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
+
+/datum/design/hypospray/mkii
+ name = "Hypospray Mk. II"
+ id = "hypospray_mkii"
+ build_type = PROTOLATHE
+ materials = list(/datum/material/iron = 1600, /datum/material/glass = 1000)
+ build_path = /obj/item/hypospray/mkii
+ category = list("Medical Designs")
+ departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/blood_bag
name = "Empty Blood Bag"
diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm
index 7dfe19f635..630a3629cf 100644
--- a/code/modules/research/designs/misc_designs.dm
+++ b/code/modules/research/designs/misc_designs.dm
@@ -245,6 +245,36 @@
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
+/datum/design/emptybottle
+ name = "Glass Bottle"
+ desc = "A small, empty bottle for storing liquids."
+ id = "emptyglassbottle"
+ build_type = PROTOLATHE
+ materials = list(/datum/material/glass = 400)
+ build_path = /obj/item/reagent_containers/food/drinks/bottle/blank/small
+ category = list("Equipment")
+ departmental_flags = DEPARTMENTAL_FLAG_SERVICE
+
+/datum/design/largeemptybottle
+ name = "Large Glass Bottle"
+ desc = "A large, empty bottle for storing liquids."
+ id = "largeemptyglassbottle"
+ build_type = PROTOLATHE
+ materials = list(/datum/material/glass = 2000)
+ build_path = /obj/item/reagent_containers/food/drinks/bottle/blank
+ category = list("Equipment")
+ departmental_flags = DEPARTMENTAL_FLAG_SERVICE
+
+/datum/design/emptypitcher
+ name = "Pitcher"
+ desc = "A large Pitcher to hold vast amounts of liquid."
+ id = "emptypitcher"
+ build_type = PROTOLATHE
+ materials = list(/datum/material/glass = 3600)
+ build_path = /obj/item/reagent_containers/food/drinks/bottle/blank/pitcher
+ category = list("Equipment")
+ departmental_flags = DEPARTMENTAL_FLAG_SERVICE
+
/datum/design/air_horn
name = "Air Horn"
desc = "Damn son, where'd you find this?"
diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm
index 67af26e468..e6128ed5c2 100644
--- a/code/modules/research/experimentor.dm
+++ b/code/modules/research/experimentor.dm
@@ -362,14 +362,7 @@
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
visible_message("[src] malfunctions, melting [exp_on] and leaking hot air!")
var/datum/gas_mixture/env = loc.return_air()
- var/transfer_moles = 0.25 * env.total_moles()
- var/datum/gas_mixture/removed = env.remove(transfer_moles)
- if(removed)
- var/heat_capacity = removed.heat_capacity()
- if(heat_capacity == 0 || heat_capacity == null)
- heat_capacity = 1
- removed.set_temperature(min((removed.return_temperature()*heat_capacity + 100000)/heat_capacity, 1000))
- env.merge(removed)
+ env.adjust_heat(100000)
air_update_turf()
investigate_log("Experimentor has released hot air.", INVESTIGATE_EXPERIMENTOR)
ejectItem(TRUE)
@@ -408,14 +401,7 @@
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
visible_message("[src] malfunctions, shattering [exp_on] and leaking cold air!")
var/datum/gas_mixture/env = loc.return_air()
- var/transfer_moles = 0.25 * env.total_moles()
- var/datum/gas_mixture/removed = env.remove(transfer_moles)
- if(removed)
- var/heat_capacity = removed.heat_capacity()
- if(heat_capacity == 0 || heat_capacity == null)
- heat_capacity = 1
- removed.set_temperature((removed.return_temperature()*heat_capacity - 75000)/heat_capacity)
- env.merge(removed)
+ env.adjust_heat(-75000)
air_update_turf()
investigate_log("Experimentor has released cold air.", INVESTIGATE_EXPERIMENTOR)
ejectItem(TRUE)
diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm
index 319b4a2199..98b04a8382 100644
--- a/code/modules/research/machinery/_production.dm
+++ b/code/modules/research/machinery/_production.dm
@@ -42,6 +42,7 @@
return ..()
/obj/machinery/rnd/production/proc/update_research()
+ set waitfor = FALSE
host_research.copy_research_to(stored_research, TRUE)
update_designs()
diff --git a/code/modules/research/nanites/nanite_program_hub.dm b/code/modules/research/nanites/nanite_program_hub.dm
index 85a117f53f..9a625cd0c7 100644
--- a/code/modules/research/nanites/nanite_program_hub.dm
+++ b/code/modules/research/nanites/nanite_program_hub.dm
@@ -28,11 +28,10 @@
/obj/machinery/nanite_program_hub/update_overlays()
. = ..()
- SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if((stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
return
- SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", layer, plane)
- SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", EMISSIVE_LAYER, EMISSIVE_PLANE)
+ . += mutable_appearance(icon, "nanite_program_hub_on")
+ . += emissive_appearance(icon, "nanite_program_hub_on")
/obj/machinery/nanite_program_hub/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/disk/nanite_program))
@@ -148,3 +147,7 @@
disk.program = null
disk.name = initial(disk.name)
. = TRUE
+
+/obj/machinery/nanite_program_hub/admin/Initialize()
+ . = ..()
+ linked_techweb = SSresearch.admin_tech
diff --git a/code/modules/research/nanites/nanite_programmer.dm b/code/modules/research/nanites/nanite_programmer.dm
index f23a44909c..d858063cb1 100644
--- a/code/modules/research/nanites/nanite_programmer.dm
+++ b/code/modules/research/nanites/nanite_programmer.dm
@@ -13,11 +13,10 @@
/obj/machinery/nanite_programmer/update_overlays()
. = ..()
- SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if((stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
return
- SSvis_overlays.add_vis_overlay(src, icon, "nanite_programmer_on", layer, plane)
- SSvis_overlays.add_vis_overlay(src, icon, "nanite_programmer_on", EMISSIVE_LAYER, EMISSIVE_PLANE)
+ . += mutable_appearance(icon, "nanite_programmer_on")
+ . += emissive_appearance(icon, "nanite_programmer_on")
/obj/machinery/nanite_programmer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/disk/nanite_program))
diff --git a/code/modules/research/nanites/nanite_programs.dm b/code/modules/research/nanites/nanite_programs.dm
index 4b6416ecb8..6a2c8bf4fd 100644
--- a/code/modules/research/nanites/nanite_programs.dm
+++ b/code/modules/research/nanites/nanite_programs.dm
@@ -292,7 +292,7 @@
switch(type)
if(1)
host_mob.investigate_log("[src] nanite program was deleted by software error.", INVESTIGATE_NANITES)
- qdel(src) //kill switch
+ self_destruct() //kill switch
return
if(2) //deprogram codes
if(corruptable)
@@ -306,7 +306,7 @@
toggle() //enable/disable
host_mob.investigate_log("[src] nanite program was toggled by software error.", INVESTIGATE_NANITES)
if(4)
- if(can_trigger)
+ if(error_flicking && can_trigger)
host_mob.investigate_log("[src] nanite program was triggered by software error.", INVESTIGATE_NANITES)
trigger()
if(5) //Program is scrambled and does something different
@@ -315,7 +315,7 @@
var/datum/nanite_program/rogue = new rogue_type
host_mob.investigate_log("[src] nanite program was converted into [rogue.name] by software error.", INVESTIGATE_NANITES)
nanites.add_program(null, rogue, src)
- self_destruct(src)
+ self_destruct()
/datum/nanite_program/proc/receive_signal(code, source)
if(activation_code && code == activation_code && !activated)
diff --git a/code/modules/research/nanites/nanite_programs/healing.dm b/code/modules/research/nanites/nanite_programs/healing.dm
index 9274522553..81a837504a 100644
--- a/code/modules/research/nanites/nanite_programs/healing.dm
+++ b/code/modules/research/nanites/nanite_programs/healing.dm
@@ -109,7 +109,7 @@
/datum/nanite_program/blood_restoring/active_effect()
if(iscarbon(host_mob))
var/mob/living/carbon/C = host_mob
- C.blood_volume += 2
+ C.adjust_integration_blood(2)
/datum/nanite_program/repairing
name = "Mechanical Repair"
diff --git a/code/modules/research/nanites/nanite_programs/weapon.dm b/code/modules/research/nanites/nanite_programs/weapon.dm
index 5c9754ec41..66f6c140f2 100644
--- a/code/modules/research/nanites/nanite_programs/weapon.dm
+++ b/code/modules/research/nanites/nanite_programs/weapon.dm
@@ -87,8 +87,11 @@
addtimer(CALLBACK(src, .proc/boom), clamp((nanites.nanite_volume * 0.35), 25, 150))
/datum/nanite_program/explosive/proc/boom()
- dyn_explosion(get_turf(host_mob), nanites.nanite_volume / 50)
- qdel(nanites)
+ var/nanite_amount = nanites.nanite_volume
+ var/heavy_range = FLOOR(nanite_amount/100, 1) - 1
+ var/light_range = FLOOR(nanite_amount/50, 1) - 1
+ explosion(host_mob, 0, heavy_range, light_range)
+ nanites.delete_nanites()
//TODO make it defuse if triggered again
diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm
index 657d3b2e12..beb3561025 100644
--- a/code/modules/research/server.dm
+++ b/code/modules/research/server.dm
@@ -7,12 +7,11 @@
circuit = /obj/item/circuitboard/machine/rdserver
var/datum/techweb/stored_research
- var/heat_health = 100
//Code for point mining here.
var/working = TRUE //temperature should break it.
var/server_id = 0
var/base_mining_income = 2
- var/heat_gen = 100
+ var/heat_gen = 1
var/heating_power = 40000
var/delay = 5
var/temp_tolerance_low = 0
@@ -32,7 +31,7 @@
var/tot_rating = 0
for(var/obj/item/stock_parts/SP in src)
tot_rating += SP.rating
- heat_gen /= max(1, tot_rating)
+ heat_gen = initial(src.heat_gen) / max(1, tot_rating)
/obj/machinery/rnd/server/proc/refresh_working()
if(stat & EMPED)
@@ -56,31 +55,19 @@
. = base_mining_income
var/penalty = max((get_env_temp() - temp_tolerance_high), 0) * temp_penalty_coefficient
. = max(. - penalty, 0)
+ produce_heat(. / base_mining_income)
/obj/machinery/rnd/server/proc/get_env_temp()
var/datum/gas_mixture/environment = loc.return_air()
return environment.return_temperature()
-/obj/machinery/rnd/server/proc/produce_heat(heat_amt)
+/obj/machinery/rnd/server/proc/produce_heat(perc)
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
var/turf/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
- if(env.return_temperature() < (heat_amt+T0C))
-
- var/transfer_moles = 0.25 * env.total_moles()
-
- var/datum/gas_mixture/removed = env.remove(transfer_moles)
-
- if(removed)
-
- var/heat_capacity = removed.heat_capacity()
- if(heat_capacity == 0 || heat_capacity == null)
- heat_capacity = 1
- removed.set_temperature(min((removed.return_temperature()*heat_capacity + heating_power)/heat_capacity, 1000))
-
- env.merge(removed)
- air_update_turf()
+ env.adjust_heat(heating_power * perc * heat_gen)
+ air_update_turf()
/proc/fix_noid_research_servers()
var/list/no_id_servers = list()
diff --git a/code/modules/research/techweb/_techweb_node.dm b/code/modules/research/techweb/_techweb_node.dm
index c7c2e7ef10..8c91c09abb 100644
--- a/code/modules/research/techweb/_techweb_node.dm
+++ b/code/modules/research/techweb/_techweb_node.dm
@@ -104,6 +104,6 @@
// Default research tech, prevents bricking
design_ids = list("basic_matter_bin", "basic_cell", "basic_scanning", "basic_capacitor", "basic_micro_laser", "micro_mani", "desttagger", "handlabel", "packagewrap",
"destructive_analyzer", "circuit_imprinter", "experimentor", "rdconsole", "bepis", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab", "paystand",
- "space_heater", "beaker", "large_beaker", "xlarge_beaker", "bucket", "hypovial", "large_hypovial",
+ "space_heater", "beaker", "large_beaker", "xlarge_beaker", "bucket", "hypovial", "large_hypovial", "syringe", "pillbottle",
"sec_shellclip", "sec_beanbag", "sec_rshot", "sec_bshot", "sec_slug", "sec_islug", "sec_dart", "sec_38", "sec_38lethal",
"rglass","plasteel","plastitanium","plasmaglass","plasmareinforcedglass","titaniumglass","plastitaniumglass")
diff --git a/code/modules/research/techweb/nodes/bepis_nodes.dm b/code/modules/research/techweb/nodes/bepis_nodes.dm
index 41d3a08d64..fa17d62e50 100644
--- a/code/modules/research/techweb/nodes/bepis_nodes.dm
+++ b/code/modules/research/techweb/nodes/bepis_nodes.dm
@@ -55,7 +55,7 @@
display_name = "Nanite Replication Protocols"
description = "Advanced behaviours that allow nanites to exploit certain circumstances to replicate faster."
prereq_ids = list("nanite_smart")
- design_ids = list("kickstart_nanites","factory_nanites","tinker_nanites","offline_nanites","synergy_nanites")
+ design_ids = list("kickstart_nanites","factory_nanites","offline_nanites","synergy_nanites")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
hidden = TRUE
experimental = TRUE
diff --git a/code/modules/research/techweb/nodes/biotech_nodes.dm b/code/modules/research/techweb/nodes/biotech_nodes.dm
index d4f0a4b913..350bbaa5c3 100644
--- a/code/modules/research/techweb/nodes/biotech_nodes.dm
+++ b/code/modules/research/techweb/nodes/biotech_nodes.dm
@@ -13,7 +13,7 @@
display_name = "Advanced Biotechnology"
description = "Advanced Biotechnology"
prereq_ids = list("biotech")
- design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "meta_beaker", "healthanalyzer_advanced", "harvester", "holobarrier_med", "defibrillator_compact", "smartdartgun", "medicinalsmartdart", "pHmeter", "containmentbodybag")
+ design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "meta_beaker", "healthanalyzer_advanced", "harvester", "holobarrier_med", "defibrillator_compact", "smartdartgun", "medicinalsmartdart", "pHmeter", "hypospray_mkii", "containmentbodybag")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
/datum/techweb_node/bio_process
diff --git a/code/modules/research/techweb/nodes/export_nodes.dm b/code/modules/research/techweb/nodes/export_nodes.dm
index cbdedef113..5259fc1bfa 100644
--- a/code/modules/research/techweb/nodes/export_nodes.dm
+++ b/code/modules/research/techweb/nodes/export_nodes.dm
@@ -14,8 +14,8 @@
/datum/techweb_node/bottle_exports
id = "bottle_exports"
- display_name = "Legal Bottling"
+ display_name = "Advanced Bottling"
prereq_ids = list("blueprinted_bottles")
- description = "New bottles for printing and selling."
- design_ids = list("minikeg", "blooddrop", "slim_gold", "white_bloodmoon", "greenroad")
+ description = "New bottles for printing, storage and selling."
+ design_ids = list("minikeg", "blooddrop", "slim_gold", "white_bloodmoon", "greenroad", "emptyglassbottle", "largeemptyglassbottle", "emptypitcher")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 250)
diff --git a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm
index f3e14993ed..0c34a251ae 100644
--- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm
+++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm
@@ -1,4 +1,4 @@
-/obj/screen/alert/status_effect/rainbow_protection
+/atom/movable/screen/alert/status_effect/rainbow_protection
name = "Rainbow Protection"
desc = "You are defended from harm, but so are those you might seek to injure!"
icon_state = "slime_rainbowshield"
@@ -6,7 +6,7 @@
/datum/status_effect/rainbow_protection
id = "rainbow_protection"
duration = 100
- alert_type = /obj/screen/alert/status_effect/rainbow_protection
+ alert_type = /atom/movable/screen/alert/status_effect/rainbow_protection
var/originalcolor
/datum/status_effect/rainbow_protection/on_apply()
@@ -29,7 +29,7 @@
"You no longer feel protected...")
return ..()
-/obj/screen/alert/status_effect/slimeskin
+/atom/movable/screen/alert/status_effect/slimeskin
name = "Adamantine Slimeskin"
desc = "You are covered in a thick, non-neutonian gel."
icon_state = "slime_stoneskin"
@@ -37,7 +37,7 @@
/datum/status_effect/slimeskin
id = "slimeskin"
duration = 300
- alert_type = /obj/screen/alert/status_effect/slimeskin
+ alert_type = /atom/movable/screen/alert/status_effect/slimeskin
var/originalcolor
/datum/status_effect/slimeskin/on_apply()
@@ -91,14 +91,14 @@
owner.forceMove(target.loc)
return ..()
-/obj/screen/alert/status_effect/freon/stasis
+/atom/movable/screen/alert/status_effect/freon/stasis
desc = "You're frozen inside of a protective ice cube! While inside, you can't do anything, but are immune to harm! Resist to get out."
/datum/status_effect/frozenstasis
id = "slime_frozen"
status_type = STATUS_EFFECT_UNIQUE
duration = -1 //Will remove self when block breaks.
- alert_type = /obj/screen/alert/status_effect/freon/stasis
+ alert_type = /atom/movable/screen/alert/status_effect/freon/stasis
var/obj/structure/ice_stasis/cube
/datum/status_effect/frozenstasis/on_apply()
@@ -162,7 +162,7 @@
qdel(clone)
return ..()
-/obj/screen/alert/status_effect/clone_decay
+/atom/movable/screen/alert/status_effect/clone_decay
name = "Clone Decay"
desc = "You are simply a construct, and cannot maintain this form forever. You will be returned to your original body if you should fall."
icon_state = "slime_clonedecay"
@@ -171,7 +171,7 @@
id = "slime_clonedecay"
status_type = STATUS_EFFECT_UNIQUE
duration = -1
- alert_type = /obj/screen/alert/status_effect/clone_decay
+ alert_type = /atom/movable/screen/alert/status_effect/clone_decay
/datum/status_effect/slime_clone_decay/tick()
owner.adjustToxLoss(1, 0)
@@ -180,7 +180,7 @@
owner.adjustFireLoss(1, 0)
owner.color = "#007BA7"
-/obj/screen/alert/status_effect/bloodchill
+/atom/movable/screen/alert/status_effect/bloodchill
name = "Bloodchilled"
desc = "You feel a shiver down your spine after getting hit with a glob of cold blood. You'll move slower and get frostbite for a while!"
icon_state = "bloodchill"
@@ -188,7 +188,7 @@
/datum/status_effect/bloodchill
id = "bloodchill"
duration = 100
- alert_type = /obj/screen/alert/status_effect/bloodchill
+ alert_type = /atom/movable/screen/alert/status_effect/bloodchill
/datum/status_effect/bloodchill/on_apply()
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/bloodchill)
@@ -202,7 +202,7 @@
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/bloodchill)
return ..()
-/obj/screen/alert/status_effect/bloodchill
+/atom/movable/screen/alert/status_effect/bloodchill
name = "Bloodchilled"
desc = "You feel a shiver down your spine after getting hit with a glob of cold blood. You'll move slower and get frostbite for a while!"
icon_state = "bloodchill"
@@ -210,7 +210,7 @@
/datum/status_effect/bonechill
id = "bonechill"
duration = 80
- alert_type = /obj/screen/alert/status_effect/bonechill
+ alert_type = /atom/movable/screen/alert/status_effect/bonechill
/datum/status_effect/bonechill/on_apply()
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/bonechill)
@@ -226,7 +226,7 @@
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/bonechill)
return ..()
-/obj/screen/alert/status_effect/bonechill
+/atom/movable/screen/alert/status_effect/bonechill
name = "Bonechilled"
desc = "You feel a shiver down your spine after hearing the haunting noise of bone rattling. You'll move slower and get frostbite for a while!"
icon_state = "bloodchill"
@@ -622,7 +622,9 @@
var/obj/O = owner.get_active_held_item()
if(O)
O.extinguish() //All shamelessly copied from water's reaction_obj, since I didn't seem to be able to get it here for some reason.
- O.acid_level = 0
+ var/datum/component/acid/acid = O.GetComponent(/datum/component/acid)
+ if(acid)
+ acid.level = 0
// Monkey cube
if(istype(O, /obj/item/reagent_containers/food/snacks/cube))
to_chat(owner, "[linked_extract] kept your hands wet! It makes [O] expand!")
@@ -659,7 +661,7 @@
return ..()
//Bluespace has an icon because it's kinda active.
-/obj/screen/alert/status_effect/bluespaceslime
+/atom/movable/screen/alert/status_effect/bluespaceslime
name = "Stabilized Bluespace Extract"
desc = "You shouldn't see this, since we set it to change automatically!"
icon_state = "slime_bluespace_on"
@@ -672,7 +674,7 @@
/datum/status_effect/stabilized/bluespace
id = "stabilizedbluespace"
colour = "bluespace"
- alert_type = /obj/screen/alert/status_effect/bluespaceslime
+ alert_type = /atom/movable/screen/alert/status_effect/bluespaceslime
var/healthcheck
/datum/status_effect/stabilized/bluespace/tick()
@@ -702,16 +704,20 @@
/datum/status_effect/stabilized/sepia
id = "stabilizedsepia"
colour = "sepia"
- var/mod = 0
+ var/list/possible = list(
+ -0.5,
+ -0.25,
+ 0,
+ 0.5,
+ 1
+ )
+
+/datum/status_effect/stabilized/sepia/New(list/arguments)
+ . = ..()
+ possible = typelist(NAMEOF(src, possible), possible)
/datum/status_effect/stabilized/sepia/tick()
- if(prob(50) && mod > -1)
- mod--
- owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/status_effect/sepia, multiplicative_slowdown = 1)
- else if(mod < 1)
- mod++
- // yeah a value of 0 does nothing but replacing the trait in place is cheaper than removing and adding repeatedly
- owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/status_effect/sepia, multiplicative_slowdown = 0)
+ owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/status_effect/sepia, multiplicative_slowdown = safepick(possible))
return ..()
/datum/status_effect/stabilized/sepia/on_remove()
@@ -932,6 +938,7 @@
/datum/status_effect/stabilized/lightpink/on_apply()
ADD_TRAIT(owner, TRAIT_FREESPRINT, "stabilized_slime")
+ owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/slime/light_pink)
return ..()
/datum/status_effect/stabilized/lightpink/tick()
@@ -943,6 +950,7 @@
/datum/status_effect/stabilized/lightpink/on_remove()
REMOVE_TRAIT(owner, TRAIT_FREESPRINT, "stabilized_slime")
+ owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/slime/light_pink)
return ..()
/datum/status_effect/stabilized/adamantine
diff --git a/code/modules/research/xenobiology/crossbreeding/chilling.dm b/code/modules/research/xenobiology/crossbreeding/chilling.dm
index 5325680588..d117e6104c 100644
--- a/code/modules/research/xenobiology/crossbreeding/chilling.dm
+++ b/code/modules/research/xenobiology/crossbreeding/chilling.dm
@@ -100,7 +100,7 @@ Chilling extracts:
for(var/turf/open/T in A)
var/datum/gas_mixture/G = T.air
if(istype(G))
- G.set_moles(/datum/gas/plasma, 0)
+ G.set_moles(GAS_PLASMA, 0)
filtered = TRUE
T.air_update_turf()
if(filtered)
diff --git a/code/modules/research/xenobiology/crossbreeding/consuming.dm b/code/modules/research/xenobiology/crossbreeding/consuming.dm
index af37a70232..8d80613be4 100644
--- a/code/modules/research/xenobiology/crossbreeding/consuming.dm
+++ b/code/modules/research/xenobiology/crossbreeding/consuming.dm
@@ -322,7 +322,7 @@ Consuming extracts:
playsound(get_turf(M), 'sound/effects/splat.ogg', 10, 1)
if(iscarbon(M))
var/mob/living/carbon/C = M
- C.blood_volume += 25 //Half a vampire drain.
+ C.adjust_integration_blood(25) //Half a vampire drain.
/obj/item/slimecross/consuming/green
colour = "green"
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index a8cefd9bed..70cd28718c 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -187,7 +187,7 @@
switch(activation_type)
if(SLIME_ACTIVATE_MINOR)
user.adjust_nutrition(50)
- user.blood_volume += 50
+ user.adjust_integration_blood(50)
to_chat(user, "You activate [src], and your body is refilled with fresh slime jelly!")
return 150
diff --git a/code/modules/ruins/spaceruin_code/caravanambush.dm b/code/modules/ruins/spaceruin_code/caravanambush.dm
index 740850524c..ab38ed8e4d 100644
--- a/code/modules/ruins/spaceruin_code/caravanambush.dm
+++ b/code/modules/ruins/spaceruin_code/caravanambush.dm
@@ -1,27 +1,27 @@
//caravan ambush
/obj/item/wrench/caravan
- color = "#ff0000"
+ icon_state = "wrench_caravan"
desc = "A prototype of a new wrench design, allegedly the red color scheme makes it go faster."
name = "experimental wrench"
toolspeed = 0.3
/obj/item/screwdriver/caravan
- color = "#ff0000"
+ icon_state = "screwdriver_caravan"
desc = "A prototype of a new screwdriver design, allegedly the red color scheme makes it go faster."
name = "experimental screwdriver"
toolspeed = 0.3
random_color = FALSE
/obj/item/wirecutters/caravan
- color = "#ff0000"
+ icon_state = "cutters_caravan"
desc = "A prototype of a new wirecutter design, allegedly the red color scheme makes it go faster."
name = "experimental wirecutters"
toolspeed = 0.3
random_color = FALSE
/obj/item/crowbar/red/caravan
- color = "#ff0000"
+ icon_state = "crowbar_caravan"
desc = "A prototype of a new crowbar design, allegedly the red color scheme makes it go faster."
name = "experimental crowbar"
toolspeed = 0.3
diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm
index 66872ae818..7109c87999 100644
--- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm
+++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm
@@ -302,7 +302,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
user.reset_perspective(parentSphere)
user.set_machine(src)
var/datum/action/peepholeCancel/PHC = new
- user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
+ user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
PHC.Grant(user)
return TRUE
diff --git a/code/modules/shuttle/docking.dm b/code/modules/shuttle/docking.dm
index 7295ab2832..5c96bca07c 100644
--- a/code/modules/shuttle/docking.dm
+++ b/code/modules/shuttle/docking.dm
@@ -205,3 +205,9 @@
var/turf/oldT = moved_atoms[moved_object]
moved_object.lateShuttleMove(oldT, movement_force, movement_direction)
+/obj/docking_port/mobile/proc/reset_air()
+ var/list/turfs = return_ordered_turfs(x, y, z, dir)
+ for(var/i in 1 to length(turfs))
+ var/turf/open/T = turfs[i]
+ if(istype(T))
+ T.air.copy_from_turf(T)
diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm
index 36abcb41dc..a215b58b55 100644
--- a/code/modules/shuttle/navigation_computer.dm
+++ b/code/modules/shuttle/navigation_computer.dm
@@ -356,7 +356,7 @@
playsound(console, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
remote_eye.setLoc(T)
to_chat(target, "Jumped to [selected]")
- C.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/static)
+ C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
C.clear_fullscreen("flash", 3)
else
playsound(console, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
diff --git a/code/modules/smithing/finished_items.dm b/code/modules/smithing/finished_items.dm
index 20eaee8a08..27be8c034d 100644
--- a/code/modules/smithing/finished_items.dm
+++ b/code/modules/smithing/finished_items.dm
@@ -209,7 +209,7 @@
parry_time_perfect = 2
parry_time_perfect_leeway = 0.75
parry_imperfect_falloff_percent = 7.5
- parry_efficiency_to_counterattack = 100
+ parry_efficiency_to_counterattack = INFINITY
parry_efficiency_considered_successful = 80
parry_efficiency_perfect = 120
parry_failed_stagger_duration = 3 SECONDS
@@ -266,14 +266,15 @@
parry_time_perfect = 2
parry_time_perfect_leeway = 2
parry_failed_stagger_duration = 3 SECONDS
- parry_failed_clickcd_duration = 3 SECONDS
parry_time_windup = 0
parry_time_spindown = 0
parry_imperfect_falloff_percent = 0
- parry_efficiency_to_counterattack = 100
+ parry_efficiency_to_counterattack = INFINITY
parry_efficiency_considered_successful = 120
parry_efficiency_perfect = 120
parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 4)
+ parry_automatic_enabled = TRUE
+ autoparry_single_efficiency = 75
//unique hammers
/obj/item/melee/smith/hammer/toolbox
diff --git a/code/modules/spells/spell_types/aimed.dm b/code/modules/spells/spell_types/aimed.dm
index 8fab4a221d..aa2a2e4083 100644
--- a/code/modules/spells/spell_types/aimed.dm
+++ b/code/modules/spells/spell_types/aimed.dm
@@ -4,7 +4,7 @@
var/projectile_type = /obj/item/projectile/magic/teleport
var/deactive_msg = "You discharge your projectile..."
var/active_msg = "You charge your projectile!"
- var/base_icon_state = "projectile"
+ base_icon_state = "projectile"
var/active_icon_state = "projectile"
var/list/projectile_var_overrides = list()
var/projectile_amount = 1 //Projectiles per cast.
diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm
index b13c2df770..b68a289e85 100644
--- a/code/modules/station_goals/dna_vault.dm
+++ b/code/modules/station_goals/dna_vault.dm
@@ -254,8 +254,7 @@
to_chat(H, "You feel resistant to airborne toxins.")
if(locate(/obj/item/organ/lungs) in H.internal_organs)
var/obj/item/organ/lungs/L = H.internal_organs_slot[ORGAN_SLOT_LUNGS]
- L.tox_breath_dam_min = 0
- L.tox_breath_dam_max = 0
+ L.gas_max -= GAS_PLASMA
ADD_TRAIT(H, TRAIT_VIRUSIMMUNE, "dna_vault")
if(VAULT_NOBREATH)
to_chat(H, "Your lungs feel great.")
diff --git a/code/modules/surgery/advanced/revival.dm b/code/modules/surgery/advanced/revival.dm
index 0b864958a0..945dee48e7 100644
--- a/code/modules/surgery/advanced/revival.dm
+++ b/code/modules/surgery/advanced/revival.dm
@@ -25,7 +25,7 @@
return TRUE
/datum/surgery_step/revive
name = "electrically stimulate brain"
- implements = list(/obj/item/shockpaddles = 100, /obj/item/abductor/gizmo = 100, /obj/item/melee/baton = 75, /obj/item/organ/cyberimp/arm/baton = 75, /obj/item/organ/cyberimp/arm/gun/taser = 60, /obj/item/gun/energy/e_gun/advtaser = 60, /obj/item/gun/energy/taser = 60)
+ implements = list(/obj/item/shockpaddles = 100, /obj/item/abductor/gizmo = 100, /obj/item/rod_of_asclepius = 100, /obj/item/melee/baton = 75, /obj/item/organ/cyberimp/arm/baton = 75, /obj/item/organ/cyberimp/arm/gun/taser = 60, /obj/item/gun/energy/e_gun/advtaser = 60, /obj/item/gun/energy/taser = 60)
time = 120
/datum/surgery_step/revive/tool_check(mob/user, obj/item/tool)
. = TRUE
@@ -69,7 +69,7 @@
for(var/obj/item/organ/O in target.internal_organs)//zap those buggers back to life!
if(O.organ_flags & ORGAN_FAILING)
O.applyOrganDamage(-5)
- var/list/policies = CONFIG_GET(keyed_list/policyconfig)
+ var/list/policies = CONFIG_GET(keyed_list/policy)
var/timelimit = CONFIG_GET(number/defib_cmd_time_limit) * 10 //the config is in seconds, not deciseconds
var/late = timelimit && (tplus > timelimit)
var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm
index d595c494b5..6f95fd0f8d 100644
--- a/code/modules/surgery/bodyparts/_bodyparts.dm
+++ b/code/modules/surgery/bodyparts/_bodyparts.dm
@@ -32,6 +32,8 @@
var/max_stamina_damage = 0
var/incoming_stam_mult = 1 //Multiplier for incoming staminaloss, decreases when taking staminaloss when the limb is disabled, resets back to 1 when limb is no longer disabled.
var/max_damage = 0
+ /// Threshold at which we are disabled. Defaults to max_damage if unset.
+ var/disable_threshold
var/stam_heal_tick = 0 //per Life(). Defaults to 0 due to citadel changes
var/brute_reduction = 0 //Subtracted to brute damage taken
@@ -186,7 +188,7 @@
needs_processing = .
//Return TRUE to get whatever mob this is in to update health.
-/obj/item/bodypart/proc/on_life()
+/obj/item/bodypart/proc/on_life(seconds, times_fired)
if(stam_heal_tick && stamina_dam > DAMAGE_PRECISION) //DO NOT update health here, it'll be done in the carbon's life.
if(heal_damage(brute = 0, burn = 0, stamina = (stam_heal_tick * (disabled ? 2 : 1)), only_robotic = FALSE, only_organic = FALSE, updating_health = FALSE))
. |= BODYPART_LIFE_UPDATE_HEALTH
@@ -505,6 +507,12 @@
return
set_disabled(is_disabled(silent), silent)
+/**
+ * Gets the damage at which point we're disabled.
+ */
+/obj/item/bodypart/proc/get_disable_threshold()
+ return isnull(disable_threshold)? max_damage : disable_threshold
+
/obj/item/bodypart/proc/is_disabled(silent = FALSE)
if(!owner)
return
@@ -514,15 +522,16 @@
var/datum/wound/W = i
if(W.disabling)
return BODYPART_DISABLED_WOUND
+ var/disable_threshold = get_disable_threshold()
if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NODISMEMBER))
. = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled
- if(get_damage(TRUE) >= max_damage * (HAS_TRAIT(owner, TRAIT_EASYLIMBDISABLE) ? 0.6 : 1)) //Easy limb disable disables the limb at 40% health instead of 0%
+ if(get_damage(TRUE) >= disable_threshold * (HAS_TRAIT(owner, TRAIT_EASYLIMBDISABLE) ? 0.6 : 1)) //Easy limb disable disables the limb at 40% health instead of 0%
if(!last_maxed && !silent)
owner.emote("scream")
last_maxed = TRUE
- if(!is_organic_limb(FALSE) || stamina_dam >= max_damage)
+ if(!is_organic_limb(FALSE) || stamina_dam >= disable_threshold)
return BODYPART_DISABLED_DAMAGE
- else if(disabled && (get_damage(TRUE) <= (max_damage * 0.8))) // reenabled at 80% now instead of 50% as of wounds update
+ else if(disabled && (get_damage(TRUE) <= (disable_threshold * 0.8))) // reenabled at 80% now instead of 50% as of wounds update
last_maxed = FALSE
return BODYPART_NOT_DISABLED
else
@@ -783,6 +792,7 @@
. += image(marking_list[1], "[marking_list[2]]_[digitigrade_type]_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
var/image/limb = image(layer = -BODYPARTS_LAYER, dir = image_dir)
+ var/image/second_limb
var/list/aux = list()
var/list/auxmarking = list()
@@ -816,6 +826,11 @@
else
limb.icon_state = "[species_id]_[body_zone]"
+ if(istype(src, /obj/item/bodypart/l_leg) || istype(src, /obj/item/bodypart/r_leg))
+ second_limb = image(layer = -BODYPARTS_LAYER, dir = image_dir)
+ second_limb.icon = limb.icon
+ . += second_limb
+
// Body markings
if(length(body_markings_list))
if(species_id == "husk")
@@ -904,7 +919,8 @@
draw_color = "#[draw_color]"
if(draw_color)
if(grayscale)
- limb.icon_state += "_g"
+ if(!second_limb)
+ limb.icon_state += "_g"
limb.color = draw_color
if(aux_icons)
for(var/a in aux)
@@ -922,6 +938,12 @@
for(var/image/marking in markings_list)
marking.color = "#141414"
+ if(second_limb)
+ var/original_state = limb.icon_state
+ limb.icon_state = "[original_state]_front"
+ second_limb.icon_state = "[original_state]_behind"
+ second_limb.color = limb.color
+
/obj/item/bodypart/deconstruct(disassembled = TRUE)
drop_organs()
qdel(src)
diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm
index 88b6f0f662..6b5b4a14aa 100644
--- a/code/modules/surgery/bodyparts/dismemberment.dm
+++ b/code/modules/surgery/bodyparts/dismemberment.dm
@@ -237,7 +237,7 @@
C.handcuffed = null
C.update_handcuffed()
if(C.hud_used)
- var/obj/screen/inventory/hand/R = C.hud_used.hand_slots["[held_index]"]
+ var/atom/movable/screen/inventory/hand/R = C.hud_used.hand_slots["[held_index]"]
if(R)
R.update_icon()
if(C.gloves)
@@ -255,7 +255,7 @@
C.handcuffed = null
C.update_handcuffed()
if(C.hud_used)
- var/obj/screen/inventory/hand/L = C.hud_used.hand_slots["[held_index]"]
+ var/atom/movable/screen/inventory/hand/L = C.hud_used.hand_slots["[held_index]"]
if(L)
L.update_icon()
if(C.gloves)
@@ -340,7 +340,7 @@
if(C.dna.species.mutanthands && !is_pseudopart)
C.put_in_hand(new C.dna.species.mutanthands(), held_index)
if(C.hud_used)
- var/obj/screen/inventory/hand/hand = C.hud_used.hand_slots["[held_index]"]
+ var/atom/movable/screen/inventory/hand/hand = C.hud_used.hand_slots["[held_index]"]
if(hand)
hand.update_icon()
C.update_inv_gloves()
diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm
index 86288564ae..3a08a764d3 100644
--- a/code/modules/surgery/bodyparts/parts.dm
+++ b/code/modules/surgery/bodyparts/parts.dm
@@ -59,12 +59,13 @@
one though."
icon_state = "default_human_l_arm"
attack_verb = list("slapped", "punched")
- max_damage = 50
+ max_damage = 150
+ disable_threshold = 75
max_stamina_damage = 50
body_zone = BODY_ZONE_L_ARM
body_part = ARM_LEFT
aux_icons = list(BODY_ZONE_PRECISE_L_HAND = HANDS_PART_LAYER, "l_hand_behind" = BODY_BEHIND_LAYER)
- body_damage_coeff = 0.75
+ body_damage_coeff = 0.25
held_index = 1
px_x = -6
px_y = 0
@@ -89,7 +90,7 @@
if(held_index)
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
if(owner.hud_used)
- var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
+ var/atom/movable/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
if(L)
L.update_icon()
@@ -120,11 +121,12 @@
among humans missing their right arm."
icon_state = "default_human_r_arm"
attack_verb = list("slapped", "punched")
- max_damage = 50
+ max_damage = 150
+ disable_threshold = 75
body_zone = BODY_ZONE_R_ARM
body_part = ARM_RIGHT
aux_icons = list(BODY_ZONE_PRECISE_R_HAND = HANDS_PART_LAYER, "r_hand_behind" = BODY_BEHIND_LAYER)
- body_damage_coeff = 0.75
+ body_damage_coeff = 0.25
held_index = 2
px_x = 6
px_y = 0
@@ -150,7 +152,7 @@
if(held_index)
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
if(owner.hud_used)
- var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
+ var/atom/movable/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
if(R)
R.update_icon()
@@ -182,10 +184,11 @@
luck. In this instance, it probably would not have helped."
icon_state = "default_human_l_leg"
attack_verb = list("kicked", "stomped")
- max_damage = 50
+ max_damage = 150
+ disable_threshold = 75
body_zone = BODY_ZONE_L_LEG
body_part = LEG_LEFT
- body_damage_coeff = 0.75
+ body_damage_coeff = 0.25
px_x = -2
px_y = 12
stam_heal_tick = STAM_RECOVERY_LIMB
@@ -240,10 +243,11 @@
// alternative spellings of 'pokey' are availible
icon_state = "default_human_r_leg"
attack_verb = list("kicked", "stomped")
- max_damage = 50
+ max_damage = 150
+ disable_threshold = 75
body_zone = BODY_ZONE_R_LEG
body_part = LEG_RIGHT
- body_damage_coeff = 0.75
+ body_damage_coeff = 0.25
px_x = 2
px_y = 12
max_stamina_damage = 50
diff --git a/code/modules/surgery/emergency_reboot.dm b/code/modules/surgery/emergency_reboot.dm
index 046edd884c..5023480b51 100644
--- a/code/modules/surgery/emergency_reboot.dm
+++ b/code/modules/surgery/emergency_reboot.dm
@@ -42,7 +42,7 @@
if(target.revive())
target.visible_message("...[target]'s posibrain flickers to life once again!")
target.emote("ping")
- var/list/policies = CONFIG_GET(keyed_list/policyconfig)
+ var/list/policies = CONFIG_GET(keyed_list/policy)
var/timelimit = CONFIG_GET(number/defib_cmd_time_limit) * 10 //the config is in seconds, not deciseconds
var/late = timelimit && (tplus > timelimit)
var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm
index ea8c188346..e1b198ade2 100644
--- a/code/modules/surgery/organs/augments_chest.dm
+++ b/code/modules/surgery/organs/augments_chest.dm
@@ -210,13 +210,9 @@
// Priority 3: use internals tank.
var/obj/item/tank/I = owner.internal
- if(I && I.air_contents && I.air_contents.total_moles() > num)
- var/datum/gas_mixture/removed = I.air_contents.remove(num)
- if(removed.total_moles() > 0.005)
- T.assume_air(removed)
- return 1
- else
- T.assume_air(removed)
+ if(I && I.air_contents && I.air_contents.total_moles() >= num)
+ T.assume_air_moles(I.air_contents, num)
+ return 1
toggle(silent = TRUE)
return 0
diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm
index 09f0a901a3..9861a1b639 100644
--- a/code/modules/surgery/organs/eyes.dm
+++ b/code/modules/surgery/organs/eyes.dm
@@ -41,7 +41,7 @@
return
switch(eye_damaged)
if(BLURRY_VISION_ONE, BLURRY_VISION_TWO)
- owner.overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, eye_damaged)
+ owner.overlay_fullscreen("eye_damage", /atom/movable/screen/fullscreen/impaired, eye_damaged)
if(BLIND_VISION_THREE)
owner.become_blind(EYE_DAMAGE)
if(ishuman(owner))
@@ -106,7 +106,7 @@
else if(eye_damaged == BLIND_VISION_THREE)
owner.become_blind(EYE_DAMAGE)
if(eye_damaged && eye_damaged != BLIND_VISION_THREE)
- owner.overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, eye_damaged)
+ owner.overlay_fullscreen("eye_damage", /atom/movable/screen/fullscreen/impaired, eye_damaged)
else
owner.clear_fullscreen("eye_damage")
diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm
index 2037547d36..5c6b66f702 100755
--- a/code/modules/surgery/organs/liver.dm
+++ b/code/modules/surgery/organs/liver.dm
@@ -25,7 +25,7 @@
var/cachedmoveCalc = 1
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/iron = 5)
-/obj/item/organ/liver/on_life()
+/obj/item/organ/liver/on_life(seconds, times_fired)
. = ..()
if(!. || !owner)//can't process reagents with a failing liver
return
@@ -40,7 +40,7 @@
damage += (thisamount*toxLethality)
//metabolize reagents
- owner.reagents.metabolize(owner, can_overdose=TRUE)
+ owner.reagents.metabolize(owner, seconds, times_fired, can_overdose=TRUE)
if(damage > 10 && prob(damage/3))//the higher the damage the higher the probability
to_chat(owner, "You feel a dull pain in your abdomen.")
diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm
index c94fb16add..93f88192e5 100644
--- a/code/modules/surgery/organs/lungs.dm
+++ b/code/modules/surgery/organs/lungs.dm
@@ -27,40 +27,36 @@
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/medicine/salbutamol = 5)
//Breath damage
+ var/breathing_class = BREATH_OXY // can be a gas instead of a breathing class
+ var/safe_breath_min = 16
+ var/safe_breath_max = 50
+ var/safe_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
+ var/safe_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
+ var/safe_damage_type = OXY
+ var/list/gas_min = list()
+ var/list/gas_max = list(
+ GAS_CO2 = 30, // Yes it's an arbitrary value who cares?
+ GAS_METHYL_BROMIDE = 1,
+ GAS_PLASMA = MOLES_GAS_VISIBLE
+ )
+ var/list/gas_damage = list(
+ "default" = list(
+ min = MIN_TOXIC_GAS_DAMAGE,
+ max = MAX_TOXIC_GAS_DAMAGE,
+ damage_type = OXY
+ ),
+ GAS_PLASMA = list(
+ min = MIN_TOXIC_GAS_DAMAGE,
+ max = MAX_TOXIC_GAS_DAMAGE,
+ damage_type = TOX
+ )
+ )
- var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
- var/safe_oxygen_max = 50 // Too much of a good thing, in kPa as well.
- var/safe_nitro_min = 0
- var/safe_nitro_max = 0
- var/safe_co2_min = 0
- var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
- var/safe_toxins_min = 0
- var/safe_toxins_max = MOLES_GAS_VISIBLE
- var/safe_ch3br_min = 0
- var/safe_ch3br_max = 1 //problematic even at low concentrations
- var/safe_methane_min = 0
- var/safe_methane_max = 0
- var/SA_para_min = 1 //Sleeping agent
- var/SA_sleep_min = 5 //Sleeping agent
+ var/SA_para_min = 1 //nitrous values
+ var/SA_sleep_min = 5
var/BZ_trip_balls_min = 1 //BZ gas
var/gas_stimulation_min = 0.002 //Nitryl and Stimulum
- var/oxy_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
- var/oxy_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
- var/oxy_damage_type = OXY
- var/nitro_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
- var/nitro_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
- var/nitro_damage_type = OXY
- var/co2_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
- var/co2_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
- var/co2_damage_type = OXY
- var/tox_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
- var/tox_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
- var/tox_damage_type = TOX
- var/methane_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
- var/methane_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
- var/methane_damage_type = OXY
-
var/cold_message = "your face freezing and an icicle forming"
var/cold_level_1_threshold = 260
var/cold_level_2_threshold = 200
@@ -81,7 +77,18 @@
var/crit_stabilizing_reagent = /datum/reagent/medicine/epinephrine
+/obj/item/organ/lungs/New()
+ . = ..()
+ populate_gas_info()
+/obj/item/organ/lungs/proc/populate_gas_info()
+ gas_min[breathing_class] = safe_breath_min
+ gas_max[breathing_class] = safe_breath_max
+ gas_damage[breathing_class] = list(
+ min = safe_breath_dam_min,
+ max = safe_breath_dam_max,
+ damage_type = safe_damage_type
+ )
//TODO: lung health affects lung function
/obj/item/organ/lungs/onDamage(damage_mod) //damage might be too low atm.
@@ -128,227 +135,126 @@
H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
H.failed_last_breath = TRUE
- if(safe_oxygen_min)
- H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
- else if(safe_toxins_min)
- H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
- else if(safe_co2_min)
- H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
- else if(safe_nitro_min)
- H.throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
- else if(safe_ch3br_min)
- H.throw_alert("not_enough_ch3br", /obj/screen/alert/not_enough_ch3br)
+ var/alert_category
+ var/alert_type
+ if(ispath(breathing_class))
+ var/datum/breathing_class/class = GLOB.gas_data.breathing_classes[breathing_class]
+ alert_category = class.low_alert_category
+ alert_type = class.low_alert_datum
+ else
+ var/list/breath_alert_info = GLOB.gas_data.breath_alert_info
+ if(breathing_class in breath_alert_info)
+ var/list/alert = breath_alert_info[breathing_class]["not_enough_alert"]
+ alert_category = alert["alert_category"]
+ alert_type = alert["alert_type"]
+ if(alert_category)
+ H.throw_alert(alert_category, alert_type)
return FALSE
+ #define PP_MOLES(X) ((X / total_moles) * pressure)
+
+ #define PP(air, gas) PP_MOLES(air.get_moles(gas))
+
var/gas_breathed = 0
- //Partial pressures in our breath
- var/O2_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/oxygen))+(8*breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/pluoxium)))
- var/N2_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/nitrogen))
- var/Toxins_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/plasma))
- var/CO2_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/carbon_dioxide))
- var/CH4_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/methane))
- var/CH3Br_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/methyl_bromide))
-
-
- //-- OXY --//
-
- //Too much oxygen! //Yes, some species may not like it.
- if(safe_oxygen_max)
- if((O2_pp > safe_oxygen_max) && safe_oxygen_max == 0) //I guess plasma men technically need to have a check.
- var/ratio = (breath.get_moles(/datum/gas/oxygen)/safe_oxygen_max) * 10
- H.apply_damage_type(clamp(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
- H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
-
- else if((O2_pp > safe_oxygen_max) && !(safe_oxygen_max == 0)) //Why yes, this is like too much CO2 and spahget. Dirty lizards.
- if(!H.o2overloadtime)
- H.o2overloadtime = world.time
- else if(world.time - H.o2overloadtime > 120)
- H.Dizzy(10) // better than a minute of you're fucked KO, but certainly a wake up call. Honk.
- H.adjustOxyLoss(3)
- if(world.time - H.o2overloadtime > 300)
- H.adjustOxyLoss(8)
- if(prob(20))
- H.emote("cough")
- H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
-
+ var/pressure = breath.return_pressure()
+ var/total_moles = breath.total_moles()
+ var/list/breath_alert_info = GLOB.gas_data.breath_alert_info
+ var/list/breath_results = GLOB.gas_data.breath_results
+ var/list/breathing_classes = GLOB.gas_data.breathing_classes
+ var/list/mole_adjustments = list()
+ for(var/entry in gas_min)
+ var/required_pp = 0
+ var/required_moles = 0
+ var/safe_min = gas_min[entry]
+ var/alert_category = null
+ var/alert_type = null
+ if(ispath(entry))
+ var/datum/breathing_class/class = breathing_classes[entry]
+ var/list/gases = class.gases
+ var/list/products = class.products
+ alert_category = class.low_alert_category
+ alert_type = class.low_alert_datum
+ for(var/gas in gases)
+ var/moles = breath.get_moles(gas)
+ var/multiplier = gases[gas]
+ mole_adjustments[gas] = (gas in mole_adjustments) ? mole_adjustments[gas] - moles : -moles
+ required_pp += PP_MOLES(moles) * multiplier
+ required_moles += moles
+ if(multiplier > 0)
+ var/to_add = moles * multiplier
+ for(var/product in products)
+ mole_adjustments[product] = (product in mole_adjustments) ? mole_adjustments[product] + to_add : to_add
else
- H.o2overloadtime = 0
- H.clear_alert("too_much_oxy")
-
- //Too little oxygen!
- if(safe_oxygen_min)
- if(O2_pp < safe_oxygen_min)
- gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath.get_moles(/datum/gas/oxygen))
- H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
- else
- H.failed_last_breath = FALSE
- if(H.health >= H.crit_threshold)
- H.adjustOxyLoss(-breathModifier) //More damaged lungs = slower oxy rate up to a factor of half
- gas_breathed = breath.get_moles(/datum/gas/oxygen)
- H.clear_alert("not_enough_oxy")
-
- //Exhale
- breath.adjust_moles(/datum/gas/oxygen, -gas_breathed)
- breath.adjust_moles(/datum/gas/carbon_dioxide, gas_breathed)
- gas_breathed = 0
-
- //-- Nitrogen --//
-
- //Too much nitrogen!
- if(safe_nitro_max)
- if(N2_pp > safe_nitro_max)
- var/ratio = (breath.get_moles(/datum/gas/nitrogen)/safe_nitro_max) * 10
- H.apply_damage_type(clamp(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
- H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
- H.losebreath += 2
- else
- H.clear_alert("too_much_nitro")
-
- //Too little nitrogen!
- if(safe_nitro_min)
- if(N2_pp < safe_nitro_min)
- gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath.get_moles(/datum/gas/nitrogen))
- H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro)
+ required_moles = breath.get_moles(entry)
+ required_pp = PP_MOLES(required_moles)
+ if(entry in breath_alert_info)
+ var/list/alert = breath_alert_info[entry]["not_enough_alert"]
+ alert_category = alert["alert_category"]
+ alert_type = alert["alert_type"]
+ mole_adjustments[entry] = -required_moles
+ mole_adjustments[breath_results[entry]] = required_moles
+ if(required_pp < safe_min)
+ var/multiplier = 0
+ if(required_moles > 0)
+ multiplier = handle_too_little_breath(H, required_pp, safe_min, required_moles) / required_moles
+ for(var/adjustment in mole_adjustments)
+ mole_adjustments[adjustment] *= multiplier
+ if(alert_category)
+ H.throw_alert(alert_category, alert_type)
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-breathModifier)
- gas_breathed = breath.get_moles(/datum/gas/nitrogen)
- H.clear_alert("nitro")
-
- //Exhale
- breath.adjust_moles(/datum/gas/nitrogen, -gas_breathed)
- breath.adjust_moles(/datum/gas/carbon_dioxide, gas_breathed)
- gas_breathed = 0
-
- //-- CO2 --//
-
- //CO2 does not affect failed_last_breath. So if there was enough oxygen in the air but too much co2, this will hurt you, but only once per 4 ticks, instead of once per tick.
- if(safe_co2_max)
- if(CO2_pp > safe_co2_max)
- if(!H.co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
- H.co2overloadtime = world.time
- else if(world.time - H.co2overloadtime > 120)
- H.Unconscious(60)
- H.apply_damage_type(3, co2_damage_type) // Lets hurt em a little, let them know we mean business
- if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
- H.apply_damage_type(8, co2_damage_type)
- H.throw_alert("too_much_co2", /obj/screen/alert/too_much_co2)
- if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
- H.emote("cough")
-
+ if(alert_category)
+ H.clear_alert(alert_category)
+ var/list/danger_reagents = GLOB.gas_data.breath_reagents_dangerous
+ for(var/entry in gas_max)
+ var/found_pp = 0
+ var/datum/breathing_class/breathing_class = entry
+ var/datum/reagent/danger_reagent = null
+ var/alert_category = null
+ var/alert_type = null
+ if(ispath(breathing_class))
+ breathing_class = breathing_classes[breathing_class]
+ var/list/gases = breathing_class.gases
+ alert_category = breathing_class.high_alert_category
+ alert_type = breathing_class.high_alert_datum
+ danger_reagent = breathing_class.danger_reagent
+ for(var/gas in gases)
+ found_pp += PP(breath, gas)
else
- H.co2overloadtime = 0
- H.clear_alert("too_much_co2")
+ danger_reagent = danger_reagents[entry]
+ if(entry in breath_alert_info)
+ var/list/alert = breath_alert_info[entry]["too_much_alert"]
+ alert_category = alert["alert_category"]
+ alert_type = alert["alert_type"]
+ found_pp = PP(breath, entry)
+ if(found_pp > gas_max[entry])
+ if(istype(danger_reagent))
+ H.reagents.add_reagent(danger_reagent,1)
+ var/list/damage_info = (entry in gas_damage) ? gas_damage[entry] : gas_damage["default"]
+ var/dam = found_pp / gas_max[entry] * 10
+ H.apply_damage_type(clamp(dam, damage_info["min"], damage_info["max"]), damage_info["damage_type"])
+ if(alert_category && alert_type)
+ H.throw_alert(alert_category, alert_type)
+ else if(alert_category)
+ H.clear_alert(alert_category)
+ var/list/breath_reagents = GLOB.gas_data.breath_reagents
+ for(var/gas in breath.get_gases())
+ if(gas in breath_reagents)
+ var/datum/reagent/R = breath_reagents[gas]
+ H.reagents.add_reagent(R, PP(breath,gas))
+ mole_adjustments[gas] = (gas in mole_adjustments) ? mole_adjustments[gas] - breath.get_moles(gas) : -breath.get_moles(gas)
- //Too little CO2!
- if(safe_co2_min)
- if(CO2_pp < safe_co2_min)
- gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath.get_moles(/datum/gas/carbon_dioxide))
- H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
- else
- H.failed_last_breath = FALSE
- if(H.health >= H.crit_threshold)
- H.adjustOxyLoss(-breathModifier)
- gas_breathed = breath.get_moles(/datum/gas/carbon_dioxide)
- H.clear_alert("not_enough_co2")
-
- //Exhale
- breath.adjust_moles(/datum/gas/carbon_dioxide, -gas_breathed)
- breath.adjust_moles(/datum/gas/oxygen, gas_breathed)
- gas_breathed = 0
-
-
- //-- TOX --//
-
- //Too much toxins!
- if(safe_toxins_max)
- if(Toxins_pp > safe_toxins_max)
- var/ratio = (breath.get_moles(/datum/gas/plasma)/safe_toxins_max) * 10
- H.apply_damage_type(clamp(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type)
- H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
- else
- H.clear_alert("too_much_tox")
-
-
- //Too little toxins!
- if(safe_toxins_min)
- if(Toxins_pp < safe_toxins_min)
- gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath.get_moles(/datum/gas/plasma))
- H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
- else
- H.failed_last_breath = FALSE
- if(H.health >= H.crit_threshold)
- H.adjustOxyLoss(-breathModifier)
- gas_breathed = breath.get_moles(/datum/gas/plasma)
- H.clear_alert("not_enough_tox")
-
- //Exhale
- breath.adjust_moles(/datum/gas/plasma, -gas_breathed)
- breath.adjust_moles(/datum/gas/carbon_dioxide, gas_breathed)
- gas_breathed = 0
-
-//-- METHANE --//
-
- //Too much methane!
- if(safe_methane_max)
- if(CH4_pp > safe_methane_max) //Same effect as excess nitrogen, generally nontoxic
- var/ratio = (breath.get_moles(/datum/gas/methane)/safe_methane_max) * 10
- H.apply_damage_type(clamp(ratio, methane_breath_dam_min, methane_breath_dam_max), methane_damage_type)
- H.throw_alert("too_much_ch4", /obj/screen/alert/too_much_ch4)
- H.losebreath += 2
- else
- H.clear_alert("too_much_ch4")
- //Too little methane!
- if(safe_methane_min)
- if(CH4_pp < safe_methane_min)
- gas_breathed = handle_too_little_breath(H, CH4_pp, safe_methane_min, breath.get_moles(/datum/gas/methane))
- H.throw_alert("not_enough_ch4", /obj/screen/alert/not_enough_ch4)
- else
- H.failed_last_breath = FALSE
- if(H.health >= H.crit_threshold)
- H.adjustOxyLoss(-breathModifier)
- gas_breathed = breath.get_moles(/datum/gas/methane)
- H.clear_alert("not_enough_ch4")
-
- //Exhale
- breath.adjust_moles(/datum/gas/methane, -gas_breathed)
- breath.adjust_moles(/datum/gas/methyl_bromide, gas_breathed)
- gas_breathed = 0
-
-//-- CH3BR --//
-
- //Too much methyl bromide!
- if(safe_ch3br_max)
- if(CH3Br_pp > safe_ch3br_max)
- if(prob(CH3Br_pp/0.5))
- H.adjustOrganLoss(ORGAN_SLOT_LUNGS, 3, 150) //Inhaling this is a bad idea
- if(prob(CH3Br_pp/2))
- to_chat(H, "Your throat closes up!")
- H.silent = max(H.silent, 3)
- H.throw_alert("too_much_ch3br", /obj/screen/alert/too_much_ch3br)
- else
- H.clear_alert("too_much_ch3br")
- //Too little methyl bromide!
- if(safe_ch3br_min)
- if(CH3Br_pp < safe_ch3br_min)
- gas_breathed = handle_too_little_breath(H, CH3Br_pp, safe_ch3br_min, breath.get_moles(/datum/gas/methyl_bromide))
- H.throw_alert("not_enough_ch3br", /obj/screen/alert/not_enough_ch3br)
- else
- H.failed_last_breath = FALSE
- if(H.health >= H.crit_threshold)
- H.adjustOxyLoss(-breathModifier)
- gas_breathed = breath.get_moles(/datum/gas/methyl_bromide)
- H.clear_alert("not_enough_ch3br")
-
- //-- TRACES --//
+ for(var/gas in mole_adjustments)
+ breath.adjust_moles(gas, mole_adjustments[gas])
if(breath) // If there's some other shit in the air lets deal with it here.
// N2O
- var/SA_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/nitrous_oxide))
+ var/SA_pp = PP(breath, GAS_NITROUS)
if(SA_pp > SA_para_min) // Enough to make us stunned for a bit
H.Unconscious(60) // 60 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
@@ -362,7 +268,7 @@
// BZ
- var/bz_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/bz))
+ var/bz_pp = PP(breath, GAS_BZ)
if(bz_pp > BZ_trip_balls_min)
H.hallucination += 10
H.reagents.add_reagent(/datum/reagent/bz_metabolites,5)
@@ -373,16 +279,8 @@
H.hallucination += 5
H.reagents.add_reagent(/datum/reagent/bz_metabolites,1)
-
- // Tritium
- var/trit_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/tritium))
- if (trit_pp > 50)
- H.radiation += trit_pp/2 //If you're breathing in half an atmosphere of radioactive gas, you fucked up.
- else
- H.radiation += trit_pp/10
-
// Nitryl
- var/nitryl_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/nitryl))
+ var/nitryl_pp = PP(breath,GAS_NITRYL)
if (prob(nitryl_pp))
to_chat(H, "Your mouth feels like it's burning!")
if (nitryl_pp >40)
@@ -393,22 +291,22 @@
H.silent = max(H.silent, 3)
else
H.adjustFireLoss(nitryl_pp/4)
- gas_breathed = breath.get_moles(/datum/gas/nitryl)
+ gas_breathed = breath.get_moles(GAS_NITRYL)
if (gas_breathed > gas_stimulation_min)
H.reagents.add_reagent(/datum/reagent/nitryl,1)
- breath.adjust_moles(/datum/gas/nitryl, -gas_breathed)
+ breath.adjust_moles(GAS_NITRYL, -gas_breathed)
// Stimulum
- gas_breathed = breath.get_moles(/datum/gas/stimulum)
+ gas_breathed = PP(breath,GAS_STIMULUM)
if (gas_breathed > gas_stimulation_min)
var/existing = H.reagents.get_reagent_amount(/datum/reagent/stimulum)
H.reagents.add_reagent(/datum/reagent/stimulum, max(0, 5 - existing))
- breath.adjust_moles(/datum/gas/stimulum, -gas_breathed)
+ breath.adjust_moles(GAS_STIMULUM, -gas_breathed)
// Miasma
- if (breath.get_moles(/datum/gas/miasma))
- var/miasma_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/miasma))
+ if (breath.get_moles(GAS_MIASMA))
+ var/miasma_pp = PP(breath,GAS_MIASMA)
if(miasma_pp > MINIMUM_MOLES_DELTA_TO_MOVE)
//Miasma sickness
@@ -448,7 +346,7 @@
// Then again, this is a purely hypothetical scenario and hardly reachable
owner.adjust_disgust(0.1 * miasma_pp)
- breath.adjust_moles(/datum/gas/miasma, -gas_breathed)
+ breath.adjust_moles(GAS_MIASMA, -gas_breathed)
// Clear out moods when no miasma at all
else
@@ -539,13 +437,13 @@
name = "plasma filter"
desc = "A spongy rib-shaped mass for filtering plasma from the air."
icon_state = "lungs-plasma"
-
- safe_oxygen_min = 0 //We don't breath this
- safe_oxygen_max = 0 // Like, at all.
- safe_toxins_min = 16 //We breath THIS!
- safe_toxins_max = 0
+ breathing_class = BREATH_PLASMA
maxHealth = INFINITY//I don't understand how plamamen work, so I'm not going to try t give them special lungs atm
+/obj/item/organ/lungs/plasmaman/populate_gas_info()
+ ..()
+ gas_max -= GAS_PLASMA
+
/obj/item/organ/lungs/cybernetic
name = "basic cybernetic lungs"
desc = "A basic cybernetic version of the lungs found in traditional humanoid entities."
@@ -560,8 +458,8 @@
desc = "A cybernetic version of the lungs found in traditional humanoid entities. Allows for greater intakes of oxygen than organic lungs, requiring slightly less pressure."
icon_state = "lungs-c-u"
maxHealth = 1.5 * STANDARD_ORGAN_THRESHOLD
- safe_oxygen_min = 13
- safe_oxygen_max = 100
+ safe_breath_min = 13
+ safe_breath_max = 100
emp_vulnerability = 2
/obj/item/organ/lungs/cybernetic/tier3
@@ -569,10 +467,13 @@
desc = "A more advanced version of the stock cybernetic lungs. Features the ability to filter out various airbourne toxins and carbon dioxide even at heavy levels."
icon_state = "lungs-c-u2"
maxHealth = 2 * STANDARD_ORGAN_THRESHOLD
- safe_oxygen_min = 4 //You could literally be breathing the thinnest amount of oxygen and be fine
- safe_oxygen_max = 250 //Or be in an enriched oxygen room for that matter
- safe_toxins_max = 30
- safe_co2_max = 30
+ safe_breath_min = 4 //You could literally be breathing the thinnest amount of oxygen and be fine
+ safe_breath_max = 250 //Or be in an enriched oxygen room for that matter
+ gas_max = list(
+ GAS_PLASMA = 30,
+ GAS_CO2 = 30,
+ GAS_METHYL_BROMIDE = 10
+ )
SA_para_min = 30
SA_sleep_min = 50
BZ_trip_balls_min = 30
@@ -597,9 +498,8 @@
name = "ash lungs"
desc = "blackened lungs identical from specimens recovered from lavaland, unsuited to higher air pressures."
icon_state = "lungs-ll"
- safe_oxygen_min = 3 //able to handle much thinner oxygen, something something ash storm adaptation
- safe_oxygen_max = 18 // Air standard is 22kpA of O2, LL is 14kpA
- safe_nitro_max = 28 // Air standard is 82kpA of N2, LL is 23kpA
+ safe_breath_min = 3 //able to handle much thinner oxygen, something something ash storm adaptation
+ safe_breath_max = 18 // Air standards is 22kPa of O2, LL is 14kPa
cold_level_1_threshold = 280 // Ash Lizards can't take the cold very well, station air is only just warm enough
cold_level_2_threshold = 240
@@ -608,24 +508,32 @@
heat_level_1_threshold = 400 // better adapted for heat, obv. Lavaland standard is 300
heat_level_2_threshold = 600 // up 200 from level 1, 1000 is silly but w/e for level 3
+/obj/item/organ/lungs/ashwalker/populate_gas_info()
+ ..()
+ gas_max[GAS_N2] = 28
+
/obj/item/organ/lungs/slime
name = "vacuole"
icon_state = "lungs-s"
desc = "A large organelle designed to store oxygen and other important gasses."
- safe_toxins_max = 0 //We breathe this to gain POWER.
-
cold_level_1_threshold = 285 // Remember when slimes used to be succeptable to cold? Well....
cold_level_2_threshold = 260
cold_level_3_threshold = 230
maxHealth = 250
+/obj/item/organ/lungs/ashwalker/populate_gas_info()
+ ..()
+ gas_max -= GAS_PLASMA
+
/obj/item/organ/lungs/slime/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
. = ..()
if (breath)
- var/plasma_pp = breath.get_breath_partial_pressure(breath.get_moles(/datum/gas/plasma))
- owner.blood_volume += (0.2 * plasma_pp) // 10/s when breathing literally nothing but plasma, which will suffocate you.
+ var/total_moles = breath.total_moles()
+ var/pressure = breath.return_pressure()
+ var/plasma_pp = PP(breath, GAS_PLASMA)
+ owner.adjust_integration_blood(0.2 * plasma_pp) // 10/s when breathing literally nothing but plasma, which will suffocate you.
/obj/item/organ/lungs/yamerol
name = "Yamerol lungs"
@@ -637,3 +545,6 @@
. = ..()
if(.)
applyOrganDamage(2) //Yamerol lungs are temporary
+
+#undef PP
+#undef PP_MOLES
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index 6cdeadcbb3..1800fe221b 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -92,18 +92,18 @@
on_death() //Kinda hate doing it like this, but I really don't want to call process directly.
//Sources; life.dm process_organs
-/obj/item/organ/proc/on_death() //Runs when outside AND inside.
- decay()
+/obj/item/organ/proc/on_death(seconds, times_fired) //Runs when outside AND inside.
+ decay(seconds, times_fired)
//Applys the slow damage over time decay
-/obj/item/organ/proc/decay()
+/obj/item/organ/proc/decay(seconds, times_fired)
if(!can_decay())
STOP_PROCESSING(SSobj, src)
return
is_cold()
if(organ_flags & ORGAN_FROZEN)
return
- applyOrganDamage(maxHealth * decay_factor)
+ applyOrganDamage(maxHealth * decay_factor * (seconds * 0.5))
/obj/item/organ/proc/can_decay()
if(CHECK_BITFIELD(organ_flags, ORGAN_NO_SPOIL | ORGAN_SYNTHETIC | ORGAN_FAILING))
@@ -151,7 +151,7 @@
organ_flags &= ~ORGAN_FROZEN
return FALSE
-/obj/item/organ/proc/on_life() //repair organ damage if the organ is not failing or synthetic
+/obj/item/organ/proc/on_life(seconds, times_fired) //repair organ damage if the organ is not failing or synthetic
if(organ_flags & ORGAN_FAILING || !owner)
return FALSE
if(organ_flags & ORGAN_SYNTHETIC_EMP) //Synthetic organ has been emped, is now failing.
diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm
index defb062f1a..f436b31513 100644
--- a/code/modules/surgery/organs/stomach.dm
+++ b/code/modules/surgery/organs/stomach.dm
@@ -62,13 +62,13 @@
H.clear_alert("disgust")
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "disgust")
if(DISGUST_LEVEL_GROSS to DISGUST_LEVEL_VERYGROSS)
- H.throw_alert("disgust", /obj/screen/alert/gross)
+ H.throw_alert("disgust", /atom/movable/screen/alert/gross)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/gross)
if(DISGUST_LEVEL_VERYGROSS to DISGUST_LEVEL_DISGUSTED)
- H.throw_alert("disgust", /obj/screen/alert/verygross)
+ H.throw_alert("disgust", /atom/movable/screen/alert/verygross)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/verygross)
if(DISGUST_LEVEL_DISGUSTED to INFINITY)
- H.throw_alert("disgust", /obj/screen/alert/disgusted)
+ H.throw_alert("disgust", /atom/movable/screen/alert/disgusted)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/disgusted)
/obj/item/organ/stomach/Remove(special = FALSE)
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index 12e282200c..e41980cdd3 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -1,8 +1,15 @@
-#define COOLDOWN_STUN 1200
-#define COOLDOWN_KNOCKDOWN 600
-#define COOLDOWN_DAMAGE 600
-#define COOLDOWN_MEME 300
-#define COOLDOWN_NONE 100
+#define COOLDOWN_STUN 300
+#define COOLDOWN_KNOCKDOWN 300
+#define COOLDOWN_DAMAGE 300
+#define COOLDOWN_MEME 150
+#define COOLDOWN_NONE 50
+
+/// anything above this requires adminbus, to prevent a cultist from stacking chaplain + cult + specific listener = 8x, which is enough to instantly kill someone with damage.
+#define VOG_MAX_STANDARD_POWER 3
+/// max damage we can do in one "blast" to a listener
+#define VOG_MAX_BURST_DAMAGE 40
+/// max healing we can do in one "blast" to a listener
+#define VOG_MAX_BURST_HEAL 40
/obj/item/organ/vocal_cords //organs that are activated through speech with the :x/MODE_KEY_VOCALCORDS channel
name = "vocal cords"
@@ -130,13 +137,11 @@
return 0 //no cooldown
var/log_message = uppertext(message)
- if(!span_list || !span_list.len)
- if(iscultist(user))
- span_list = list("narsiesmall")
- else if (is_servant_of_ratvar(user))
- span_list = list("ratvar")
- else
- span_list = list()
+ if(iscultist(user))
+ span_list = list("narsiesmall")
+ else if (is_servant_of_ratvar(user))
+ span_list = list("ratvar")
+ LAZYINITLIST(span_list)
user.say(message, spans = span_list, sanitize = FALSE)
@@ -156,39 +161,24 @@
cooldown = COOLDOWN_NONE
return cooldown
- var/power_multiplier = base_multiplier
-
- if(user.mind)
- //Chaplains are very good at speaking with the voice of god
- if(user.mind.assigned_role == "Chaplain")
- power_multiplier *= 2
- //Command staff has authority
- if(user.mind.assigned_role in GLOB.command_positions)
- power_multiplier *= 1.4
- //Why are you speaking
- if(user.mind.assigned_role == "Mime")
- power_multiplier *= 0.5
-
- //Cultists are closer to their gods and are more powerful, but they'll give themselves away
- if(iscultist(user))
- power_multiplier *= 2
- else if (is_servant_of_ratvar(user))
- power_multiplier *= 2
-
//Try to check if the speaker specified a name or a job to focus on
var/list/specific_listeners = list()
var/found_string = null
+ var/devil_target = FALSE
//Get the proper job titles
message = get_full_job_name(message)
+ // limitation: this only checks at the start of the message.
+ // if we wanted to check anywhere we'd have to make the user use delimiters to specify who they're talking to,
+ // as otherwise it'd be far too computationally and logically expensive to find out who we want.
for(var/V in listeners)
var/mob/living/L = V
var/datum/antagonist/devil/devilinfo = is_devil(L)
if(devilinfo && findtext(message, devilinfo.truename))
var/start = findtext(message, devilinfo.truename)
listeners = list(L) //Devil names are unique.
- power_multiplier *= 5 //if you're a devil and god himself addressed you, you fucked up
+ devil_target = TRUE //if you're a devil and god himself addressed you, you fucked up
//Cut out the name so it doesn't trigger commands
message = copytext(message, 1, start) + copytext(message, start + length(devilinfo.truename))
break
@@ -207,10 +197,14 @@
//Cut out the job so it doesn't trigger commands
found_string = L.mind.assigned_role
+ var/power_multiplier = get_vog_multiplier(user, base_multiplier, specific_listeners)
+ var/adminbus = power_multiplier > VOG_MAX_STANDARD_POWER // an admin is being a dunce, bypass hard scaling limits on this message
+ if(devil_target)
+ power_multiplier = max(power_multiplier, 5)
+
if(specific_listeners.len)
- listeners = specific_listeners
- power_multiplier *= (1 + (1/specific_listeners.len)) //2x on a single guy, 1.5x on two and so on
message = copytext(message, length(found_string) + 1)
+ listeners = specific_listeners.Copy()
var/static/regex/stun_words = regex("stop|wait|stand still|hold on|halt")
var/static/regex/knockdown_words = regex("drop|fall|trip|knockdown")
@@ -264,7 +258,7 @@
cooldown = COOLDOWN_STUN
for(var/V in listeners)
var/mob/living/L = V
- L.Stagger(60 * power_multiplier)
+ L.Stagger(40 * power_multiplier)
//KNOCKDOWN
else if(findtext(message, knockdown_words))
@@ -272,6 +266,7 @@
for(var/V in listeners)
var/mob/living/L = V
L.DefaultCombatKnockdown()
+ L.Stagger(10 * power_multiplier)
//VOMIT
else if((findtext(message, vomit_words)))
@@ -285,13 +280,13 @@
for(var/mob/living/carbon/C in listeners)
if(user.mind && (user.mind.assigned_role == "Curator" || user.mind.assigned_role == "Mime"))
power_multiplier *= 3
- C.silent += (10 * power_multiplier)
+ C.silent += (5 * power_multiplier)
//HALLUCINATE
else if((findtext(message, hallucinate_words)))
cooldown = COOLDOWN_MEME
for(var/mob/living/carbon/C in listeners)
- new /datum/hallucination/delusion(C, TRUE, null,150 * power_multiplier,0)
+ new /datum/hallucination/delusion(C, TRUE, null, 150 * power_multiplier, 0)
//WAKE UP
else if((findtext(message, wakeup_words)))
@@ -305,14 +300,14 @@
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
- L.heal_overall_damage(10 * power_multiplier, 10 * power_multiplier, 0, FALSE, FALSE)
+ L.heal_overall_damage(min(17.5 * power_multiplier, adminbus? INFINITY : VOG_MAX_BURST_HEAL), min(17.5 * power_multiplier, VOG_MAX_BURST_HEAL), 0, FALSE, FALSE)
//BRUTE DAMAGE
else if((findtext(message, hurt_words)))
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
- L.apply_damage(15 * power_multiplier, def_zone = BODY_ZONE_CHEST, wound_bonus=CANT_WOUND)
+ L.apply_damage(min(20 * power_multiplier, adminbus? INFINITY : VOG_MAX_BURST_DAMAGE), def_zone = BODY_ZONE_CHEST, wound_bonus = CANT_WOUND)
//BLEED
else if((findtext(message, bleed_words)))
@@ -334,14 +329,14 @@
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
- L.adjust_bodytemperature(50 * power_multiplier)
+ L.adjust_bodytemperature(75 * power_multiplier)
//COLD
else if((findtext(message, cold_words)))
cooldown = COOLDOWN_DAMAGE
for(var/V in listeners)
var/mob/living/L = V
- L.adjust_bodytemperature(-50 * power_multiplier)
+ L.adjust_bodytemperature(-75 * power_multiplier)
//REPULSE
else if((findtext(message, repulse_words)))
@@ -596,6 +591,34 @@
return cooldown
+/proc/get_vog_multiplier(mob/living/carbon/user, base_multiplier = 1, list/specific_listeners = list())
+ if(base_multiplier >= VOG_MAX_STANDARD_POWER)
+ return base_multiplier // an admin bussed you and they probably didn't realize you were a chaplain/cultist.
+
+ var/special_check = get_vog_special(user)
+ if(!special_check)
+ return 0
+
+ . = min(base_multiplier * special_check, VOG_MAX_STANDARD_POWER) // anything above should require conscious admin fuckery, as things are balanced around 3 multiplier tops (see: damage being 15*3)
+ if(!specific_listeners.len)
+ return
+ . = min(. * (1 + (1 / specific_listeners.len)), VOG_MAX_STANDARD_POWER)
+
+/// get special role multiplier for voice of god. No double dipping.
+/proc/get_vog_special(mob/living/carbon/user)
+ if(iscultist(user) || is_servant_of_ratvar(user))
+ return 2 // servant of god
+ if(user.mind)
+ // servant of god
+ if(user.mind.assigned_role == "Chaplain")
+ return 2
+ // shut up you broke your vow
+ if(user.mind.assigned_role == "Mime")
+ return 0.5
+ if(user.mind.assigned_role in GLOB.command_positions)
+ return 1.4 // heads are great at speaking with authority
+ return 1
+
//////////////////////////////////////
///////ENTHRAL VELVET CHORDS//////////
//////////////////////////////////////
diff --git a/code/modules/tgui/states/vorepanel.dm b/code/modules/tgui/states/vorepanel.dm
new file mode 100644
index 0000000000..b68dfb970a
--- /dev/null
+++ b/code/modules/tgui/states/vorepanel.dm
@@ -0,0 +1,18 @@
+ /**
+ * tgui state: vorepanel_state
+ *
+ * Only checks that the user and src_object are the same.
+ **/
+
+GLOBAL_DATUM_INIT(ui_vorepanel_state, /datum/ui_state/vorepanel_state, new)
+
+/datum/ui_state/vorepanel_state/can_use_topic(src_object, mob/user)
+ if(src_object != user)
+ // Note, in order to allow others to look at others vore panels, change this to
+ // UI_UPDATE
+ return UI_CLOSE
+ if(!user.client)
+ return UI_CLOSE
+ if(user.stat == DEAD)
+ return UI_DISABLED
+ return UI_INTERACTIVE
diff --git a/code/modules/tgui/tgui_alert.dm b/code/modules/tgui/tgui_alert.dm
index 1a86cca705..d144588ad9 100644
--- a/code/modules/tgui/tgui_alert.dm
+++ b/code/modules/tgui/tgui_alert.dm
@@ -9,7 +9,7 @@
* * buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
* * timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout.
*/
-/proc/tgui_alert(mob/user, message, title, list/buttons, timeout = 60 SECONDS)
+/proc/tgui_alert(mob/user, message = null, title = null, list/buttons = list("Ok"), timeout = 0)
if (!user)
user = usr
if (!istype(user))
@@ -35,9 +35,9 @@
* * title - The of the alert modal, shown on the top of the TGUI window.
* * buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
* * callback - The callback to be invoked when a choice is made.
- * * timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout.
+ * * timeout - The timeout of the alert, after which the modal will close and qdel itself. Disabled by default, can be set to seconds otherwise.
*/
-/proc/tgui_alert_async(mob/user, message, title, list/buttons, datum/callback/callback, timeout = 60 SECONDS)
+/proc/tgui_alert_async(mob/user, message = null, title = null, list/buttons = list("Ok"), datum/callback/callback, timeout = 0)
if (!user)
user = usr
if (!istype(user))
@@ -90,7 +90,7 @@
* the window was closed by the user.
*/
/datum/tgui_modal/proc/wait()
- while (!choice && !closed)
+ while (!choice && !closed && !QDELETED(src))
stoplag(1)
/datum/tgui_modal/ui_interact(mob/user, datum/tgui/ui)
@@ -124,10 +124,13 @@
if("choose")
if (!(params["choice"] in buttons))
return
- choice = params["choice"]
+ set_choice(params["choice"])
SStgui.close_uis(src)
return TRUE
+/datum/tgui_modal/proc/set_choice(choice)
+ src.choice = choice
+
/**
* # async tgui_modal
*
@@ -138,23 +141,17 @@
var/datum/callback/callback
/datum/tgui_modal/async/New(mob/user, message, title, list/buttons, callback, timeout)
- ..(user, title, message, buttons, timeout)
+ ..(user, message, title, buttons, timeout)
src.callback = callback
/datum/tgui_modal/async/Destroy(force, ...)
QDEL_NULL(callback)
. = ..()
-/datum/tgui_modal/async/ui_close(mob/user)
+/datum/tgui_modal/async/set_choice(choice)
. = ..()
- qdel(src)
-
-/datum/tgui_modal/async/ui_act(action, list/params)
- . = ..()
- if (!. || choice == null)
- return
- callback.InvokeAsync(choice)
- qdel(src)
+ if(!isnull(src.choice))
+ callback?.InvokeAsync(src.choice)
/datum/tgui_modal/async/wait()
return
diff --git a/code/modules/tooltip/tooltip.dm b/code/modules/tooltip/tooltip.dm
index fd45ea37d9..ca1b163968 100644
--- a/code/modules/tooltip/tooltip.dm
+++ b/code/modules/tooltip/tooltip.dm
@@ -13,7 +13,7 @@ Configuration:
Usage:
- Define mouse event procs on your (probably HUD) object and simply call the show and hide procs respectively:
- /obj/screen/hud
+ /atom/movable/screen/hud
MouseEntered(location, control, params)
usr.client.tooltip.show(params, title = src.name, content = src.desc)
@@ -138,12 +138,10 @@ Notes:
. = ..()
if(tooltips)
if(!QDELETED(src))
- var/list/examine_list = examine(src)
- var/get_tooltip_data = get_tooltip_data()
- if(length(get_tooltip_data))
- examine_list = get_tooltip_data
- var/examine_data = examine_list.Join(" ")
- openToolTip(usr, src, params, title = name, content = examine_data)
+ var/list/tooltip_data = get_tooltip_data()
+ if(length(tooltip_data))
+ var/examine_data = tooltip_data.Join(" ")
+ openToolTip(usr, src, params, title = name, content = examine_data)
/atom/movable/MouseExited(location, control, params)
. = ..()
diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm
index 2745d971ff..7cc72ed1c1 100644
--- a/code/modules/unit_tests/_unit_tests.dm
+++ b/code/modules/unit_tests/_unit_tests.dm
@@ -44,7 +44,7 @@
// #include "heretic_knowledge.dm"
// #include "holidays.dm"
#include "initialize_sanity.dm"
-#include "keybinding_init.dm"
+// #include "keybinding_init.dm"
#include "machine_disassembly.dm"
#include "medical_wounds.dm"
#include "merge_type.dm"
diff --git a/code/modules/unit_tests/keybinding_init.dm b/code/modules/unit_tests/keybinding_init.dm
index 2bd2fdee1e..16141bc553 100644
--- a/code/modules/unit_tests/keybinding_init.dm
+++ b/code/modules/unit_tests/keybinding_init.dm
@@ -3,4 +3,4 @@
var/datum/keybinding/KB = i
if(initial(KB.keybind_signal) || !initial(KB.name))
continue
- Fail("[KB.name] does not have a keybind signal defined.")
+ Fail("[initial(KB.name)] does not have a keybind signal defined.")
diff --git a/code/modules/unit_tests/merge_type.dm b/code/modules/unit_tests/merge_type.dm
index ba3cfcf492..1aed82e6a3 100644
--- a/code/modules/unit_tests/merge_type.dm
+++ b/code/modules/unit_tests/merge_type.dm
@@ -10,6 +10,6 @@
var/list/paths = subtypesof(/obj/item/stack) - blacklist
for(var/stackpath in paths)
- var/obj/item/stack/stack = stackpath
- if(!initial(stack.merge_type))
+ var/obj/item/stack/stack = new stackpath
+ if(!stack.merge_type)
Fail("([stack]) lacks set merge_type variable!")
diff --git a/code/modules/unit_tests/metabolizing.dm b/code/modules/unit_tests/metabolizing.dm
index b7f8fc4f6a..6c0a635b13 100644
--- a/code/modules/unit_tests/metabolizing.dm
+++ b/code/modules/unit_tests/metabolizing.dm
@@ -11,7 +11,7 @@
/datum/unit_test/metabolization/proc/test_reagent(mob/living/carbon/C, reagent_type)
C.reagents.add_reagent(reagent_type, 10)
- C.reagents.metabolize(C, can_overdose = TRUE)
+ C.reagents.metabolize(C, SSMOBS_DT, 1, can_overdose = TRUE)
C.reagents.clear_reagents()
/datum/unit_test/metabolization/Destroy()
diff --git a/code/modules/unit_tests/surgeries.dm b/code/modules/unit_tests/surgeries.dm
index 6348057f79..c8ac1d9424 100644
--- a/code/modules/unit_tests/surgeries.dm
+++ b/code/modules/unit_tests/surgeries.dm
@@ -53,7 +53,8 @@
TEST_ASSERT(!isnull(alice.get_bodypart(BODY_ZONE_HEAD)), "Alice has no head after prosthetic replacement")
TEST_ASSERT_EQUAL(alice.get_visible_name(), "Bob", "Bob's head was transplanted onto Alice's body, but their name is not Bob")
-
+/*
+i couldn't actually find anything in the parts of the code it's calling preventing two surgeries, so it's probably somewhere else
/datum/unit_test/multiple_surgeries/Run()
var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human)
var/mob/living/carbon/human/patient_zero = allocate(/mob/living/carbon/human)
@@ -65,10 +66,12 @@
var/datum/surgery/organ_manipulation/surgery_for_zero = new
INVOKE_ASYNC(surgery_step, /datum/surgery_step/proc/initiate, user, patient_zero, BODY_ZONE_CHEST, scalpel, surgery_for_zero)
+ sleep(1)
TEST_ASSERT(surgery_for_zero.step_in_progress, "Surgery on patient zero was not initiated")
var/datum/surgery/organ_manipulation/surgery_for_one = new
+
// Without waiting for the incision to complete, try to start a new surgery
TEST_ASSERT(!surgery_step.initiate(user, patient_one, BODY_ZONE_CHEST, scalpel, surgery_for_one), "Was allowed to start a second surgery without the rod of asclepius")
TEST_ASSERT(!surgery_for_one.step_in_progress, "Surgery for patient one is somehow in progress, despite not initiating")
@@ -76,6 +79,7 @@
user.apply_status_effect(STATUS_EFFECT_HIPPOCRATIC_OATH)
INVOKE_ASYNC(surgery_step, /datum/surgery_step/proc/initiate, user, patient_one, BODY_ZONE_CHEST, scalpel, surgery_for_one)
TEST_ASSERT(surgery_for_one.step_in_progress, "Surgery on patient one was not initiated, despite having rod of asclepius")
+*/
/datum/unit_test/tend_wounds/Run()
var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human)
diff --git a/code/modules/unit_tests/teleporters.dm b/code/modules/unit_tests/teleporters.dm
index fa2624adaa..0fc9bdb082 100644
--- a/code/modules/unit_tests/teleporters.dm
+++ b/code/modules/unit_tests/teleporters.dm
@@ -1,8 +1,8 @@
/datum/unit_test/auto_teleporter_linking/Run()
// Put down the teleporter machinery
var/obj/machinery/teleport/hub/hub = allocate(/obj/machinery/teleport/hub)
- var/obj/machinery/teleport/station/station = allocate(/obj/machinery/teleport/station, locate(run_loc_bottom_left.x + 1, run_loc_bottom_left.y, run_loc_bottom_left.z))
var/obj/machinery/computer/teleporter/computer = allocate(/obj/machinery/computer/teleporter, locate(run_loc_bottom_left.x + 2, run_loc_bottom_left.y, run_loc_bottom_left.z))
+ var/obj/machinery/teleport/station/station = allocate(/obj/machinery/teleport/station, locate(run_loc_bottom_left.x + 1, run_loc_bottom_left.y, run_loc_bottom_left.z))
TEST_ASSERT_EQUAL(hub.power_station, station, "Hub didn't link to the station")
TEST_ASSERT_EQUAL(station.teleporter_console, computer, "Station didn't link to the teleporter console")
diff --git a/code/modules/vehicles/atv.dm b/code/modules/vehicles/atv.dm
index d125453e5a..d5ddfe63cc 100644
--- a/code/modules/vehicles/atv.dm
+++ b/code/modules/vehicles/atv.dm
@@ -9,7 +9,7 @@
/obj/vehicle/ridden/atv/Initialize()
. = ..()
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
- D.vehicle_move_delay = 1
+ D.vehicle_move_delay = CONFIG_GET(number/movedelay/run_delay)
D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 4), TEXT_EAST = list(0, 4), TEXT_WEST = list( 0, 4)))
D.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER)
D.set_vehicle_dir_layer(NORTH, OBJ_LAYER)
diff --git a/code/modules/vehicles/motorized_wheelchair.dm b/code/modules/vehicles/motorized_wheelchair.dm
new file mode 100644
index 0000000000..8e2d838066
--- /dev/null
+++ b/code/modules/vehicles/motorized_wheelchair.dm
@@ -0,0 +1,155 @@
+/obj/vehicle/ridden/wheelchair/motorized
+ name = "Hoverchair"
+ desc = "A chair with thrusters. It seems to have a motor in it."
+ icon = 'icons/obj/vehicles.dmi'
+ icon_state = "wheelchair_motorized"
+ max_integrity = 150
+ var/speed = 2
+ var/power_efficiency = 1
+ var/power_usage = 25
+ var/panel_open = FALSE
+ var/list/required_parts = list(/obj/item/stock_parts/manipulator,
+ /obj/item/stock_parts/manipulator,
+ /obj/item/stock_parts/capacitor)
+ var/obj/item/stock_parts/cell/power_cell
+
+/obj/vehicle/ridden/wheelchair/motorized/CheckParts(list/parts_list)
+ ..()
+ refresh_parts()
+
+/obj/vehicle/ridden/wheelchair/motorized/proc/refresh_parts()
+ speed = 1 // Should never be under 1
+ for(var/obj/item/stock_parts/manipulator/M in contents)
+ speed += M.rating
+ for(var/obj/item/stock_parts/capacitor/C in contents)
+ power_efficiency = C.rating
+ var/datum/component/riding/D = GetComponent(/datum/component/riding)
+ D.vehicle_move_delay = round((CONFIG_GET(number/movedelay/run_delay) * 2) / speed, world.tick_lag)
+
+/obj/vehicle/ridden/wheelchair/motorized/obj_destruction(damage_flag)
+ var/turf/T = get_turf(src)
+ for(var/atom/movable/A in contents)
+ A.forceMove(T)
+ if(isliving(A))
+ var/mob/living/L = A
+ L.update_mobility()
+ ..()
+
+/obj/vehicle/ridden/wheelchair/motorized/driver_move(mob/living/user, direction)
+ if(istype(user))
+ if(!canmove)
+ return FALSE
+ if(!power_cell)
+ to_chat(user, "There seems to be no cell installed in [src].")
+ canmove = FALSE
+ addtimer(VARSET_CALLBACK(src, canmove, TRUE), 20)
+ return FALSE
+ if(power_cell.charge < power_usage / max(power_efficiency, 1))
+ to_chat(user, "The display on [src] blinks 'Out of Power'.")
+ canmove = FALSE
+ addtimer(VARSET_CALLBACK(src, canmove, TRUE), 20)
+ return FALSE
+ if(user.get_num_arms() < arms_required)
+ to_chat(user, "You don't have enough arms to operate the motor controller!")
+ canmove = FALSE
+ addtimer(VARSET_CALLBACK(src, canmove, TRUE), 20)
+ return FALSE
+ power_cell.use(power_usage / max(power_efficiency, 1))
+ return ..()
+
+/obj/vehicle/ridden/wheelchair/motorized/post_buckle_mob(mob/living/user)
+ . = ..()
+ density = TRUE
+
+/obj/vehicle/ridden/wheelchair/motorized/post_unbuckle_mob()
+ . = ..()
+ density = FALSE
+
+/obj/vehicle/ridden/wheelchair/motorized/attack_hand(mob/living/user)
+ if(power_cell && panel_open)
+ power_cell.update_icon()
+ user.put_in_hands(power_cell)
+ power_cell = null
+ to_chat(user, "You remove the power cell from [src].")
+ return
+ return ..()
+
+/obj/vehicle/ridden/wheelchair/motorized/attackby(obj/item/I, mob/user, params)
+ if(I.tool_behaviour == TOOL_SCREWDRIVER)
+ I.play_tool_sound(src)
+ panel_open = !panel_open
+ user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel on [src].", "You [panel_open ? "open" : "close"] the maintenance panel.")
+ return
+ if(panel_open)
+ if(istype(I, /obj/item/stock_parts/cell))
+ if(power_cell)
+ to_chat(user, "There is a power cell already installed.")
+ else
+ I.forceMove(src)
+ power_cell = I
+ to_chat(user, "You install the [I].")
+ refresh_parts()
+ return
+ if(istype(I, /obj/item/stock_parts))
+ var/obj/item/stock_parts/B = I
+ var/P
+ for(var/obj/item/stock_parts/A in contents)
+ for(var/D in required_parts)
+ if(ispath(A.type, D))
+ P = D
+ break
+ if(istype(B, P) && istype(A, P))
+ if(B.get_part_rating() > A.get_part_rating())
+ B.forceMove(src)
+ user.put_in_hands(A)
+ user.visible_message("[user] replaces [A] with [B] in [src].", "You replace [A] with [B].")
+ break
+ refresh_parts()
+ return
+ return ..()
+
+/obj/vehicle/ridden/wheelchair/motorized/wrench_act(mob/living/user, obj/item/I)
+ to_chat(user, "You begin to detach the thrusters...")
+ if(I.use_tool(src, user, 40, volume=50))
+ to_chat(user, "You detach the thrusters and deconstruct the chair.")
+ new /obj/item/stack/rods(drop_location(), 8)
+ new /obj/item/stack/sheet/plasteel(drop_location(), 10)
+ var/turf/T = get_turf(src)
+ for(var/atom/movable/A in contents)
+ A.forceMove(T)
+ if(isliving(A))
+ var/mob/living/L = A
+ L.update_mobility()
+ qdel(src)
+ return TRUE
+
+/obj/vehicle/ridden/wheelchair/motorized/examine(mob/user)
+ . = ..()
+ if(panel_open)
+ . += "There is a small screen on it, [(in_range(user, src) || isobserver(user)) ? "[power_cell ? "it reads:" : "but it is dark."]" : "but you can't see it from here."]"
+ if(!power_cell || (!in_range(user, src) && !isobserver(user)))
+ return
+ . += "Speed: [speed]"
+ . += "Energy efficiency: [power_efficiency]"
+ . += "Power: [power_cell.charge] out of [power_cell.maxcharge]"
+
+/obj/vehicle/ridden/wheelchair/motorized/Bump(atom/movable/M)
+ . = ..()
+ // If the speed is higher than delay_multiplier throw the person on the wheelchair away
+ if(M.density && speed > 2 && has_buckled_mobs())
+ var/mob/living/H = buckled_mobs[1]
+ var/atom/throw_target = get_edge_target_turf(H, pick(GLOB.cardinals))
+ unbuckle_mob(H)
+ H.throw_at(throw_target, 2, 3)
+ H.Knockdown(100)
+ H.adjustStaminaLoss(40)
+ if(isliving(M))
+ var/mob/living/D = M
+ throw_target = get_edge_target_turf(D, pick(GLOB.cardinals))
+ D.throw_at(throw_target, 2, 3)
+ D.Knockdown(80)
+ D.adjustStaminaLoss(35)
+ visible_message("[src] crashes into [M], sending [H] and [D] flying!")
+ else
+ visible_message("[src] crashes into [M], sending [H] flying!")
+ playsound(src, 'sound/effects/bang.ogg', 50, 1)
diff --git a/code/modules/vehicles/wheelchair.dm b/code/modules/vehicles/wheelchair.dm
index a81dff37ad..28145ba8e1 100644
--- a/code/modules/vehicles/wheelchair.dm
+++ b/code/modules/vehicles/wheelchair.dm
@@ -26,8 +26,8 @@
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, .proc/can_user_rotate),CALLBACK(src, .proc/can_be_rotated),null)
/obj/vehicle/ridden/wheelchair/obj_destruction(damage_flag)
- new /obj/item/stack/rods(drop_location(), 1)
- new /obj/item/stack/sheet/metal(drop_location(), 1)
+ new /obj/item/stack/rods(drop_location(), 8)
+ new /obj/item/stack/sheet/metal(drop_location(), 2)
..()
/obj/vehicle/ridden/wheelchair/Destroy()
@@ -53,7 +53,10 @@
/obj/vehicle/ridden/wheelchair/Moved()
. = ..()
cut_overlays()
- playsound(src, 'sound/effects/roll.ogg', 75, 1)
+ if(istype(src, /obj/vehicle/ridden/wheelchair/motorized))
+ playsound(src, 'sound/effects/chairwhoosh.ogg', 75, 1)
+ else
+ playsound(src, 'sound/effects/roll.ogg', 75, 1)
if(has_buckled_mobs())
handle_rotation_overlayed()
@@ -88,8 +91,12 @@
/obj/vehicle/ridden/wheelchair/proc/handle_rotation_overlayed()
cut_overlays()
- var/image/V = image(icon = icon, icon_state = "wheelchair_overlay", layer = FLY_LAYER, dir = src.dir)
- add_overlay(V)
+ if(istype(src, /obj/vehicle/ridden/wheelchair/motorized))
+ var/image/V = image(icon = icon, icon_state = "wheelchair_noverlay", layer = FLY_LAYER, dir = src.dir)
+ add_overlay(V)
+ else
+ var/image/V = image(icon = icon, icon_state = "wheelchair_overlay", layer = FLY_LAYER, dir = src.dir)
+ add_overlay(V)
diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm
index b86ab6023a..eab1c55ca9 100644
--- a/code/modules/vending/_vending.dm
+++ b/code/modules/vending/_vending.dm
@@ -243,10 +243,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
. = ..()
if(!light_mask)
return
-
- SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(!(stat & BROKEN) && powered())
- SSvis_overlays.add_vis_overlay(src, icon, light_mask, EMISSIVE_LAYER, EMISSIVE_PLANE)
+ . += emissive_appearance(icon, light_mask)
/obj/machinery/vending/obj_break(damage_flag)
. = ..()
diff --git a/code/modules/vending/boozeomat.dm b/code/modules/vending/boozeomat.dm
index 5ec0987111..87f2a0940b 100644
--- a/code/modules/vending/boozeomat.dm
+++ b/code/modules/vending/boozeomat.dm
@@ -5,6 +5,9 @@
icon_deny = "boozeomat-deny"
products = list(/obj/item/reagent_containers/food/drinks/drinkingglass = 30,
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass = 12,
+ /obj/item/reagent_containers/food/drinks/bottle/blank = 5,
+ /obj/item/reagent_containers/food/drinks/bottle/blank/small = 10,
+ /obj/item/reagent_containers/food/drinks/bottle/blank/pitcher = 2,
/obj/item/reagent_containers/food/drinks/bottle/gin = 5,
/obj/item/reagent_containers/food/drinks/bottle/whiskey = 5,
/obj/item/reagent_containers/food/drinks/bottle/tequila = 5,
diff --git a/code/modules/vending/clothesmate.dm b/code/modules/vending/clothesmate.dm
index a061561383..6adc9d38e6 100644
--- a/code/modules/vending/clothesmate.dm
+++ b/code/modules/vending/clothesmate.dm
@@ -21,7 +21,7 @@
/obj/item/clothing/suit/jacket/puffer/vest = 4,
/obj/item/clothing/suit/jacket/puffer = 4,
/obj/item/clothing/suit/hooded/cloak/david = 4,
- /obj/item/clothing/neck/cancloak/polychromic = 4,
+ /obj/item/clothing/neck/cloak/cancloak/polychromic = 4,
/obj/item/clothing/suit/bomber = 5,
/obj/item/clothing/under/suit/turtle/teal = 3,
/obj/item/clothing/under/suit/turtle/grey = 3,
diff --git a/code/modules/vore/eating/bellymodes.dm b/code/modules/vore/eating/bellymodes.dm
index 7cf36ebc50..8d64ee28f1 100644
--- a/code/modules/vore/eating/bellymodes.dm
+++ b/code/modules/vore/eating/bellymodes.dm
@@ -150,7 +150,7 @@
SEND_SOUND(M,prey_digest)
play_sound = pick(pred_digest)
- if(M.vore_flags & ABSORBED)
+ if(M.vore_flags & ABSORBED || !(M.vore_flags & ABSORBABLE)) //Negative.
continue
if(M.nutrition >= 100) //Drain them until there's no nutrients left. Slowly "absorb" them.
diff --git a/code/modules/vore/eating/living.dm b/code/modules/vore/eating/living.dm
index 41d7da16a1..6bc44e6489 100644
--- a/code/modules/vore/eating/living.dm
+++ b/code/modules/vore/eating/living.dm
@@ -1,17 +1,24 @@
///////////////////// Mob Living /////////////////////
/mob/living
var/vore_flags = 0
- var/showvoreprefs = TRUE // Determines if the mechanical vore preferences button will be displayed on the mob or not.
- var/obj/belly/vore_selected // Default to no vore capability.
- var/list/vore_organs = list() // List of vore containers inside a mob
- var/vore_taste = null // What the character tastes like
+ // Determines if the mechanical vore preferences button will be displayed on the mob or not.
+ var/showvoreprefs = TRUE
+ /// Default to no vore capability.
+ var/obj/belly/vore_selected
+ /// List of vore containers inside a mob
+ var/list/vore_organs = list()
+ /// What the character tastes like
+ var/vore_taste = null
+ /// What the character smells like
+ var/vore_smell = null
+ /// Next time vore sounds get played for the prey, do not change manually as it is intended to be set automatically
var/next_preyloop
//
// Hook for generic creation of stuff on new creatures
//
/hook/living_new/proc/vore_setup(mob/living/M)
- add_verb(M, list(/mob/living/proc/preyloop_refresh, /mob/living/proc/lick, /mob/living/proc/escapeOOC))
+ add_verb(M, list(/mob/living/proc/preyloop_refresh, /mob/living/proc/lick, /mob/living/proc/smell, /mob/living/proc/escapeOOC))
if(M.vore_flags & NO_VORE) //If the mob isn't supposed to have a stomach, let's not give it an insidepanel so it can make one for itself, or a stomach.
return TRUE
@@ -59,13 +66,14 @@
// Critical adjustments due to TG grab changes - Poojawa
/mob/living/proc/vore_attack(var/mob/living/user, var/mob/living/prey, var/mob/living/pred)
- lazy_init_belly()
+ set waitfor = FALSE
if(!user || !prey || !pred)
return
if(!isliving(pred)) //no badmin, you can't feed people to ghosts or objects.
return
+ lazy_init_belly()
if(pred == prey) //you click your target
if(!CHECK_BITFIELD(pred.vore_flags,FEEDING))
to_chat(user, "They aren't able to be fed.")
@@ -255,6 +263,7 @@
client.prefs.vore_flags = vore_flags // there's garbage data in here, but it doesn't matter
client.prefs.vore_taste = vore_taste
+ client.prefs.vore_smell = vore_smell
var/list/serialized = list()
for(var/belly in vore_organs)
@@ -263,6 +272,8 @@
client.prefs.belly_prefs = serialized
+ client.prefs.save_character()
+
return TRUE
//
@@ -273,8 +284,9 @@
to_chat(src,"You attempted to apply your vore prefs but somehow you're in this character without a client.prefs variable. Tell a dev.")
return FALSE
ENABLE_BITFIELD(vore_flags,VOREPREF_INIT)
- COPY_SPECIFIC_BITFIELDS(vore_flags,client.prefs.vore_flags,DIGESTABLE | DEVOURABLE | FEEDING | LICKABLE)
+ COPY_SPECIFIC_BITFIELDS(vore_flags, client.prefs.vore_flags, DIGESTABLE | DEVOURABLE | FEEDING | LICKABLE | SMELLABLE | ABSORBABLE | MOBVORE)
vore_taste = client.prefs.vore_taste
+ vore_smell = client.prefs.vore_smell
release_vore_contents(silent = TRUE)
QDEL_LIST(vore_organs)
@@ -378,6 +390,56 @@
else
taste_message += "a plain old normal [src]"
return taste_message
+
+//
+// Equally important as the above
+//
+/mob/living/proc/smell()
+ set name = "Smell Someone"
+ set category = "Vore"
+ set desc = "Smell someone nearby!"
+
+ if(incapacitated(ignore_restraints = TRUE))
+ to_chat(src, "You can't do that while incapacitated.")
+ return
+ if(!CheckActionCooldown())
+ to_chat(src, "You can't do that so fast, slow down.")
+ return
+
+ DelayNextAction(CLICK_CD_MELEE, flush = TRUE)
+
+ var/list/smellable = list()
+ for(var/mob/living/L in view(1))
+ if(L != src && (!L.ckey || L.client?.prefs.vore_flags & SMELLABLE) && Adjacent(L))
+ LAZYADD(smellable, L)
+ for(var/mob/living/listed in smellable)
+ smellable[listed] = new /mutable_appearance(listed)
+
+ if(!smellable)
+ return
+
+ var/mob/living/sniffed = show_radial_menu(src, src, smellable, radius = 40, require_near = TRUE)
+
+ if(QDELETED(sniffed) || (sniffed.ckey && !(sniffed.client?.prefs.vore_flags & SMELLABLE)) || !Adjacent(sniffed) || incapacitated(ignore_restraints = TRUE))
+ return
+
+ visible_message("[src] smells [sniffed]!","You smell [sniffed]. They smell like [sniffed.get_smell_message()].","Sniff!")
+
+/mob/living/proc/get_smell_message(allow_generic = TRUE, datum/species/mrace)
+ if(!vore_smell && !allow_generic)
+ return FALSE
+
+ var/smell_message = ""
+ if(vore_smell && (vore_smell != ""))
+ smell_message += "[vore_smell]"
+ else
+ if(ishuman(src))
+ var/mob/living/carbon/human/H = src
+ smell_message += "a normal [H.custom_species ? H.custom_species : H.dna.species]"
+ else
+ smell_message += "a plain old normal [src]"
+ return smell_message
+
// Check if an object is capable of eating things, based on vore_organs
//
/proc/has_vore_belly(var/mob/living/O)
diff --git a/code/modules/vore/eating/vorepanel.dm b/code/modules/vore/eating/vorepanel.dm
index 5622ec0382..8e8cfc4935 100644
--- a/code/modules/vore/eating/vorepanel.dm
+++ b/code/modules/vore/eating/vorepanel.dm
@@ -2,744 +2,717 @@
// Vore management panel for players
//
-#define BELLIES_MAX 20
+#define BELLIES_MAX 40
#define BELLIES_NAME_MIN 2
-#define BELLIES_NAME_MAX 24
+#define BELLIES_NAME_MAX 40
#define BELLIES_DESC_MAX 4096
+#define FLAVOR_MAX 400
+
+/mob/living
+ var/datum/vore_look/vorePanel
/mob/living/proc/insidePanel()
set name = "Vore Panel"
set category = "Vore"
- var/datum/vore_look/picker_holder = new()
- picker_holder.loop = picker_holder
- picker_holder.selected = vore_selected
+ if(!vorePanel)
+ log_game("VORE: [src] ([type], \ref[src]) didn't have a vorePanel and tried to use the verb.")
+ vorePanel = new(src)
- var/dat = picker_holder.gen_vui(src)
-
- picker_holder.popup = new(src, "insidePanel","Vore Panel", 450, 700, picker_holder)
- picker_holder.popup.set_content(dat)
- picker_holder.popup.open()
- vore_flags |= OPEN_PANEL
+ vorePanel.ui_interact(src)
/mob/living/proc/updateVRPanel() //Panel popup update call from belly events.
- if(vore_flags & OPEN_PANEL)
- var/datum/vore_look/picker_holder = new()
- picker_holder.loop = picker_holder
- picker_holder.selected = vore_selected
-
- var/dat = picker_holder.gen_vui(src)
-
- picker_holder.popup = new(src, "insidePanel","Vore Panel", 450, 700, picker_holder)
- picker_holder.popup.set_content(dat)
- picker_holder.popup.open()
+ SStgui.update_uis(vorePanel)
//
// Callback Handler for the Inside form
//
/datum/vore_look
- var/obj/belly/selected
- var/show_interacts = FALSE
- var/datum/browser/popup
- var/loop = null; // Magic self-reference to stop the handler from being GC'd before user takes action.
+ var/mob/living/host // Note, we do this in case we ever want to allow people to view others vore panels
+ var/unsaved_changes = FALSE
+ var/show_pictures = TRUE
+
+/datum/vore_look/New(mob/living/new_host)
+ if(istype(new_host))
+ host = new_host
+ . = ..()
/datum/vore_look/Destroy()
- loop = null
- selected = null
- ..() //this is a must
- return QDEL_HINT_HARDDEL
+ host = null
+ . = ..()
-/datum/vore_look/Topic(href,href_list[])
- if (vp_interact(href, href_list))
- popup.set_content(gen_vui(usr))
- usr << output(popup.get_content(), "insidePanel.browser")
+/datum/vore_look/ui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ ui = new(user, src, "VorePanel", "Vore Panel")
+ ui.open()
-/datum/vore_look/proc/gen_vui(var/mob/living/user)
- var/dat
- dat += "Remember to toggle the vore mode, it's to the left of your combat toggle. Open mouth means you're voracious! "
- dat += "Remember that the prey is blind, use audible mode subtle messages to communicate to them with posts! "
- dat += ""
- var/atom/userloc = user.loc
- if (isbelly(userloc))
- var/obj/belly/inside_belly = userloc
- var/mob/living/eater = inside_belly.owner
+// This looks weird, but all tgui_host is used for is state checking
+// So this allows us to use the self_state just fine.
+/datum/vore_look/ui_host(mob/user)
+ return host
- //Don't display this part if we couldn't find the belly since could be held in hand.
- if(inside_belly)
- dat += "You are currently [(user.vore_flags & ABSORBED) ? "absorbed into " : "inside "] [eater]'s [inside_belly]!
"
+// Note, in order to allow others to look at others vore panels, this state would need
+// to be modified.
+/datum/vore_look/ui_state(mob/user)
+ return GLOB.ui_vorepanel_state
- if(inside_belly.desc)
- dat += "[inside_belly.desc]
"
+/datum/vore_look
+ var/static/list/nom_icons
- if (inside_belly.contents.len > 1)
- dat += "You can see the following around you: "
- for (var/atom/movable/O in inside_belly)
- if(istype(O,/mob/living))
- var/mob/living/M = O
- //That's just you
- if(M == user)
- continue
+/datum/vore_look/proc/cached_nom_icon(atom/target)
+ LAZYINITLIST(nom_icons)
- //That's an absorbed person you're checking
- if(M.vore_flags & ABSORBED)
- if(user.vore_flags & ABSORBED)
- dat += "[O]"
- continue
- else
- continue
-
- //Anything else
- dat += "[O]"
-
- //Zero-width space, for wrapping
- dat += ""
+ var/key = ""
+ if(isobj(target))
+ key = "[target.type]"
+ else if(ismob(target))
+ var/mob/M = target
+ key = "\ref[target][M.real_name]"
+ if(nom_icons[key])
+ . = nom_icons[key]
else
- dat += "You aren't inside anyone."
-
- dat += ""
-
- dat += ""
- for(var/belly in user.vore_organs)
- var/obj/belly/B = belly
- if(B == selected)
- dat += "
"
- dat += ""
-
- // Selected Belly (contents, configuration)
- if(!selected)
- dat += "No belly selected. Click one to select it."
- else
- if(selected.contents.len)
- dat += "Contents: "
- for(var/O in selected)
-
- //Mobs can be absorbed, so treat them separately from everything else
- if(istype(O,/mob/living))
- var/mob/living/M = O
-
- //Absorbed gets special color OOoOOOOoooo
- if(M.vore_flags & ABSORBED)
- dat += "[O]"
- continue
-
- //Anything else
- dat += "[O]"
-
- //Zero-width space, for wrapping
- dat += ""
-
- //If there's more than one thing, add an [All] button
- if(selected.contents.len > 1)
- dat += "\[All\]"
-
- dat += ""
-
- //Belly Name Button
- dat += "Name:"
- dat += " '[selected.name]'"
-
- //Belly Type button
- dat += " Is Fleshy:"
- dat += "[selected.is_wet ? "Yes" : "No"]"
- if(selected.is_wet)
- dat += " Internal loop for prey?:"
- dat += "[selected.wet_loop ? "Yes" : "No"]"
-
- //Digest Mode Button
- dat += " Belly Mode:"
- dat += " [selected.digest_mode]"
-
- //Belly verb
- dat += " Vore Verb:"
- dat += " '[selected.vore_verb]'"
-
- //Inside flavortext
- dat += " Flavor Text:"
- dat += " '[selected.desc]'"
-
- //Belly sound
- dat += " Vore Sound: [selected.vore_sound]"
- dat += "Test"
-
- //Release sound
- dat += " Release Sound: [selected.release_sound]"
- dat += "Test"
-
- //Belly messages
- dat += " Belly Messages"
-
- //Can belly taste?
- dat += " Can Taste:"
- dat += " [selected.can_taste ? "Yes" : "No"]"
-
- //Minimum size prey must be to show up.
- dat += " Required examine size:"
- dat += " [selected.bulge_size*100]%"
-
- //Belly escapability
- dat += " Belly Interactions ([selected.escapable ? "On" : "Off"])"
- if(selected.escapable)
- dat += "[show_interacts ? "Hide" : "Show"]"
-
- if(show_interacts && selected.escapable)
- dat += ""
- dat += "Interaction Settings ?"
- dat += " Set Belly Escape Chance"
- dat += " [selected.escapechance]%"
-
- dat += " Set Belly Escape Time"
- dat += " [selected.escapetime/10]s"
-
- //Special here to add a gap
- dat += " "
- dat += " Set Belly Transfer Chance"
- dat += " [selected.transferchance]%"
-
- dat += " Set Belly Transfer Location"
- dat += " [selected.transferlocation ? selected.transferlocation : "Disabled"]"
-
- //Special here to add a gap
- dat += " "
- dat += " Set Belly Absorb Chance"
- dat += " [selected.absorbchance]%"
-
- dat += " Set Belly Digest Chance"
- dat += " [selected.digestchance]%"
- dat += ""
-
- //Delete button
- dat += " Delete Belly"
-
- dat += "Set Flavor"
-
- dat += ""
-
- //Under the last HR, save and stuff.
- dat += "Save Prefs"
- dat += "Refresh"
- dat += "Reload Slot Prefs"
-
- dat += ""
- var/pref_on = "#173d15"
- var/pref_off = "#990000"
- dat += " Toggle Digestable (Currently: [(user.vore_flags & DIGESTABLE) ? "ON" : "OFF"])"
- dat += " Toggle Devourable (Currently: [(user.vore_flags & DEVOURABLE) ? "ON" : "OFF"])"
- dat += " Toggle Feeding (Currently: [(user.vore_flags & FEEDING) ? "ON" : "OFF"])"
- if(user.client.prefs)
- dat += " Toggle Licking (Currently: [(user.client.prefs.vore_flags & LICKABLE) ? "ON" : "OFF"])"
- //Returns the dat html to the vore_look
- return dat
-
-/datum/vore_look/proc/vp_interact(href, href_list)
- var/mob/living/user = usr
- for(var/H in href_list)
-
- if(href_list["close"])
- qdel(src) // Cleanup
- user.vore_flags &= ~OPEN_PANEL
- return
-
- if(href_list["show_int"])
- show_interacts = !show_interacts
- return TRUE //Force update
-
- if(href_list["int_help"])
- alert("These control how your belly responds to someone using 'resist' while inside you. The percent chance to trigger each is listed below, \
- and you can change them to whatever you see fit. Setting them to 0% will disable the possibility of that interaction. \
- These only function as long as interactions are turned on in general. Keep in mind, the 'belly mode' interactions (digest/absorb) \
- will affect all prey in that belly, if one resists and triggers digestion/absorption. If multiple trigger at the same time, \
- only the first in the order of 'Escape > Transfer > Absorb > Digest' will occur.","Interactions Help")
- return FALSE //Force update
-
- if(href_list["outsidepick"])
- var/atom/movable/tgt = locate(href_list["outsidepick"])
- var/obj/belly/OB = locate(href_list["outsidebelly"])
- if(!(tgt in OB)) //Aren't here anymore, need to update menu.
- return TRUE
- var/intent = "Examine"
-
- if(istype(tgt,/mob/living))
- var/mob/living/M = tgt
- intent = alert("What do you want to do to them?","Query","Examine","Help Out","Devour")
- switch(intent)
- if("Examine") //Examine a mob inside another mob
- M.examine(user)
-
- if("Help Out") //Help the inside-mob out
- if(user.stat || user.vore_flags & ABSORBED || M.vore_flags & ABSORBED)
- to_chat(user,"You can't do that in your state!")
- return TRUE
-
- to_chat(user,"You begin to push [M] to freedom!")
- to_chat(M,"[usr] begins to push you to freedom!")
- to_chat(M.loc,"Someone is trying to escape from inside you!")
- sleep(50)
- if(prob(33))
- OB.release_specific_contents(M)
- to_chat(usr,"You manage to help [M] to safety!")
- to_chat(M,"[user] pushes you free!")
- to_chat(OB.owner,"[M] forces free of the confines of your body!")
- else
- to_chat(user,"[M] slips back down inside despite your efforts.")
- to_chat(M," Even with [user]'s help, you slip back inside again.")
- to_chat(OB.owner,"Your body efficiently shoves [M] back where they belong.")
-
- if("Devour") //Eat the inside mob
- if(user.vore_flags & ABSORBED || user.stat)
- to_chat(user,"You can't do that in your state!")
- return TRUE
-
- if(!user.vore_selected)
- to_chat(user,"Pick a belly on yourself first!")
- return TRUE
-
- var/obj/belly/TB = user.vore_selected
- to_chat(user,"You begin to [lowertext(TB.vore_verb)] [M] into your [lowertext(TB.name)]!")
- to_chat(M,"[user] begins to [lowertext(TB.vore_verb)] you into their [lowertext(TB.name)]!")
- to_chat(OB.owner,"Someone inside you is eating someone else!")
-
- sleep(TB.nonhuman_prey_swallow_time) //Can't do after, in a stomach, weird things abound.
- if((user in OB) && (M in OB)) //Make sure they're still here.
- to_chat(user,"You manage to [lowertext(TB.vore_verb)] [M] into your [lowertext(TB.name)]!")
- to_chat(M,"[user] manages to [lowertext(TB.vore_verb)] you into their [lowertext(TB.name)]!")
- to_chat(OB.owner,"Someone inside you has eaten someone else!")
- TB.nom_mob(M)
-
- else if(istype(tgt,/obj/item))
- var/obj/item/T = tgt
- if(!(tgt in OB))
- //Doesn't exist anymore, update.
- return TRUE
- intent = alert("What do you want to do to that?","Query","Examine","Use Hand")
- switch(intent)
- if("Examine")
- T.examine(user)
-
- if("Use Hand")
- if(user.stat)
- to_chat(user,"You can't do that in your state!")
- return TRUE
-
- user.ClickOn(T)
- sleep(5) //Seems to exit too fast for the panel to update
-
- if(href_list["insidepick"])
- var/intent
-
- //Handle the [All] choice. Ugh inelegant. Someone make this pretty.
- if(href_list["pickall"])
- intent = alert("Eject all, Move all?","Query","Eject all","Cancel","Move all")
- switch(intent)
- if("Cancel")
- return FALSE
-
- if("Eject all")
- if(user.stat)
- to_chat(user,"You can't do that in your state!")
- return FALSE
-
- selected.release_all_contents()
-
- if("Move all")
- if(user.stat)
- to_chat(user,"You can't do that in your state!")
- return FALSE
-
- var/obj/belly/choice = input("Move all where?","Select Belly") as null|anything in user.vore_organs
- if(!choice)
- return FALSE
-
- for(var/atom/movable/tgt in selected)
- to_chat(tgt,"You're squished from [user]'s [lowertext(selected)] to their [lowertext(choice.name)]!")
- selected.transfer_contents(tgt, choice, 1)
-
- var/atom/movable/tgt = locate(href_list["insidepick"])
- if(!(tgt in selected)) //Old menu, needs updating because they aren't really there.
- return TRUE //Forces update
- intent = "Examine"
- intent = alert("Examine, Eject, Move? Examine if you want to leave this box.","Query","Examine","Eject","Move")
- switch(intent)
- if("Examine")
- tgt.examine(user)
-
- if("Eject")
- if(user.stat)
- to_chat(user,"You can't do that in your state!")
- return FALSE
-
- selected.release_specific_contents(tgt)
-
- if("Move")
- if(user.stat)
- to_chat(user,"You can't do that in your state!")
- return FALSE
-
- var/obj/belly/choice = input("Move [tgt] where?","Select Belly") as null|anything in user.vore_organs
- if(!choice || !(tgt in selected))
- return FALSE
-
- to_chat(tgt,"You're squished from [user]'s [lowertext(selected.name)] to their [lowertext(choice.name)]!")
- selected.transfer_contents(tgt, choice)
-
- if(href_list["newbelly"])
- if(user.vore_organs.len >= BELLIES_MAX)
- return FALSE
-
- var/new_name = html_encode(input(usr,"New belly's name:","New Belly") as text|null)
-
- var/failure_msg
- if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN)
- failure_msg = "Entered belly name length invalid (must be longer than [BELLIES_NAME_MIN], no more than than [BELLIES_NAME_MAX])."
- // else if(whatever) //Next test here.
- else
- for(var/belly in user.vore_organs)
- var/obj/belly/B = belly
- if(lowertext(new_name) == lowertext(B.name))
- failure_msg = "No duplicate belly names, please."
- break
-
- if(failure_msg) //Something went wrong.
- alert(user,failure_msg,"Error!")
- return FALSE
-
- var/obj/belly/NB = new(user)
- NB.name = new_name
- selected = NB
-
- if(href_list["bellypick"])
- selected = locate(href_list["bellypick"])
- user.vore_selected = selected
-
- ////
- //Please keep these the same order they are on the panel UI for ease of coding
- ////
- if(href_list["b_name"])
- var/new_name = html_encode(input(usr,"Belly's new name:","New Name") as text|null)
-
- var/failure_msg
- if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN)
- failure_msg = "Entered belly name length invalid (must be longer than [BELLIES_NAME_MIN], no more than than [BELLIES_NAME_MAX])."
- // else if(whatever) //Next test here.
- else
- for(var/belly in user.vore_organs)
- var/obj/belly/B = belly
- if(lowertext(new_name) == lowertext(B.name))
- failure_msg = "No duplicate belly names, please."
- break
-
- if(failure_msg) //Something went wrong.
- alert(user,failure_msg,"Error!")
- return FALSE
-
- selected.name = new_name
-
- if(href_list["b_wetness"])
- selected.is_wet = !selected.is_wet
-
- if(href_list["b_wetloop"])
- selected.wet_loop = !selected.wet_loop
-
- if(href_list["b_mode"])
- var/list/menu_list = selected.digest_modes
-
- var/new_mode = input("Choose Mode (currently [selected.digest_mode])") as null|anything in menu_list
- if(!new_mode)
- return FALSE
- selected.digest_mode = new_mode
-
- if(href_list["b_desc"])
- var/new_desc = html_encode(input(usr,"Belly Description ([BELLIES_DESC_MAX] char limit):","New Description",selected.desc) as message|null)
-
- if(new_desc)
- new_desc = readd_quotes(new_desc)
- if(length(new_desc) > BELLIES_DESC_MAX)
- alert("Entered belly desc too long. [BELLIES_DESC_MAX] character limit.","Error")
- return FALSE
- selected.desc = new_desc
- else //Returned null
- return FALSE
-
- if(href_list["b_msgs"])
- var/list/messages = list(
- "Digest Message (to prey)",
- "Digest Message (to you)",
- "Struggle Message (outside)",
- "Struggle Message (inside)",
- "Examine Message (when full)",
- "Reset All To Default"
+ . = icon2base64(getFlatIcon(target,defdir=SOUTH,no_anim=TRUE))
+ nom_icons[key] = .
+
+/datum/vore_look/ui_data(mob/user)
+ var/list/data = list()
+
+ if(!host)
+ return data
+
+ data["unsaved_changes"] = unsaved_changes
+ data["show_pictures"] = show_pictures
+
+ var/atom/hostloc = host.loc
+ var/list/inside = list()
+ if(isbelly(hostloc))
+ var/obj/belly/inside_belly = hostloc
+ var/mob/living/pred = inside_belly.owner
+
+ inside = list(
+ "absorbed" = host.vore_flags & ABSORBED,
+ "belly_name" = inside_belly.name,
+ "belly_mode" = inside_belly.digest_mode,
+ "desc" = inside_belly.desc || "No description.",
+ "pred" = pred,
+ "ref" = "\ref[inside_belly]",
)
- alert(user,"Setting abusive or deceptive messages will result in a ban. Consider this your warning. Max 150 characters per message, max 10 messages per topic.","Really, don't.")
- var/choice = input(user,"Select a type to modify. Messages from each topic are pulled at random when needed.","Pick Type") as null|anything in messages
- var/help = " Press enter twice to separate messages. '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name."
+ var/list/inside_contents = list()
+ for(var/atom/movable/O in inside_belly)
+ if(O == host)
+ continue
- switch(choice)
- if("Digest Message (to prey)")
- var/new_message = input(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",selected.get_messages("dmp")) as message
- if(new_message)
- selected.set_messages(new_message,"dmp")
+ var/list/info = list(
+ "name" = "[O]",
+ "absorbed" = FALSE,
+ "stat" = 0,
+ "ref" = "\ref[O]",
+ "outside" = FALSE,
+ )
+ if(show_pictures)
+ info["icon"] = cached_nom_icon(O)
+ if(isliving(O))
+ var/mob/living/M = O
+ info["stat"] = M.stat
+ if(M.vore_flags & ABSORBED)
+ info["absorbed"] = TRUE
+ inside_contents.Add(list(info))
+ inside["contents"] = inside_contents
+ data["inside"] = inside
- if("Digest Message (to you)")
- var/new_message = input(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",selected.get_messages("dmo")) as message
- if(new_message)
- selected.set_messages(new_message,"dmo")
+ var/list/our_bellies = list()
+ for(var/belly in host.vore_organs)
+ var/obj/belly/B = belly
+ our_bellies.Add(list(list(
+ "selected" = (B == host.vore_selected),
+ "name" = B.name,
+ "ref" = "\ref[B]",
+ "digest_mode" = B.digest_mode,
+ "contents" = LAZYLEN(B.contents),
+ )))
+ data["our_bellies"] = our_bellies
- if("Struggle Message (outside)")
- var/new_message = input(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",selected.get_messages("smo")) as message
- if(new_message)
- selected.set_messages(new_message,"smo")
+ var/list/selected_list = null
+ if(host.vore_selected)
+ var/obj/belly/selected = host.vore_selected
+ selected_list = list(
+ "belly_name" = selected.name,
+ "is_wet" = selected.is_wet,
+ "wet_loop" = selected.wet_loop,
+ "mode" = selected.digest_mode,
+ "verb" = selected.vore_verb,
+ "desc" = selected.desc,
+ "sound" = selected.vore_sound,
+ "release_sound" = selected.release_sound,
+ "can_taste" = selected.can_taste,
+ "bulge_size" = selected.bulge_size,
+ )
- if("Struggle Message (inside)")
- var/new_message = input(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",selected.get_messages("smi")) as message
- if(new_message)
- selected.set_messages(new_message,"smi")
+ selected_list["escapable"] = selected.escapable
+ selected_list["interacts"] = list()
+ if(selected.escapable)
+ selected_list["interacts"]["escapechance"] = selected.escapechance
+ selected_list["interacts"]["escapetime"] = selected.escapetime
+ selected_list["interacts"]["transferchance"] = selected.transferchance
+ selected_list["interacts"]["transferlocation"] = selected.transferlocation
+ selected_list["interacts"]["absorbchance"] = selected.absorbchance
+ selected_list["interacts"]["digestchance"] = selected.digestchance
- if("Examine Message (when full)")
- var/new_message = input(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",selected.get_messages("em")) as message
- if(new_message)
- selected.set_messages(new_message,"em")
+ var/list/selected_contents = list()
+ for(var/O in selected)
+ var/list/info = list(
+ "name" = "[O]",
+ "absorbed" = FALSE,
+ "stat" = 0,
+ "ref" = "\ref[O]",
+ "outside" = TRUE,
+ )
+ if(show_pictures)
+ info["icon"] = cached_nom_icon(O)
+ if(isliving(O))
+ var/mob/living/M = O
+ info["stat"] = M.stat
+ if(M.vore_flags & ABSORBED)
+ info["absorbed"] = TRUE
+ selected_contents.Add(list(info))
+ selected_list["contents"] = selected_contents
- if("Reset All To Default")
- var/confirm = alert(user,"This will delete any custom messages. Are you sure?","Confirmation","DELETE","Cancel")
- if(confirm == "DELETE")
- selected.digest_messages_prey = initial(selected.digest_messages_prey)
- selected.digest_messages_owner = initial(selected.digest_messages_owner)
- selected.struggle_messages_outside = initial(selected.struggle_messages_outside)
- selected.struggle_messages_inside = initial(selected.struggle_messages_inside)
+ data["selected"] = selected_list
+ data["prefs"] = list(
+ "digestable" = CHECK_BITFIELD(host.vore_flags, DIGESTABLE),
+ "devourable" = CHECK_BITFIELD(host.vore_flags, DEVOURABLE),
+ "feeding" = CHECK_BITFIELD(host.vore_flags, FEEDING),
+ "absorbable" = CHECK_BITFIELD(host.vore_flags, ABSORBABLE),
+ "allowmobvore" = CHECK_BITFIELD(host.vore_flags, MOBVORE),
+ "vore_sounds" = CHECK_BITFIELD(host.client.prefs.cit_toggles, EATING_NOISES),
+ "digestion_sounds" = CHECK_BITFIELD(host.client.prefs.cit_toggles, DIGESTION_NOISES),
+ "lickable" = CHECK_BITFIELD(host.vore_flags, LICKABLE),
+ "smellable" = CHECK_BITFIELD(host.vore_flags, SMELLABLE),
+ )
- if(href_list["b_verb"])
- var/new_verb = html_encode(input(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb") as text|null)
+ return data
- if(length(new_verb) > BELLIES_NAME_MAX || length(new_verb) < BELLIES_NAME_MIN)
- alert("Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error")
- return FALSE
+/datum/vore_look/ui_act(action, params)
+ if(..())
+ return TRUE
- selected.vore_verb = new_verb
+ switch(action)
+ if("show_pictures")
+ show_pictures = !show_pictures
+ return TRUE
+ if("int_help")
+ tgui_alert(usr, "These control how your belly responds to someone using 'resist' while inside you. The percent chance to trigger each is listed below, \
+ and you can change them to whatever you see fit. Setting them to 0% will disable the possibility of that interaction. \
+ These only function as long as interactions are turned on in general. Keep in mind, the 'belly mode' interactions (digest/absorb) \
+ will affect all prey in that belly, if one resists and triggers digestion/absorption. If multiple trigger at the same time, \
+ only the first in the order of 'Escape > Transfer > Absorb > Digest' will occur.","Interactions Help")
+ return TRUE
- if(href_list["b_release"])
- var/choice = input(user,"Currently set to [selected.release_sound]","Select Sound") as null|anything in GLOB.pred_release_sounds
+ // Host is inside someone else, and is trying to interact with something else inside that person.
+ if("pick_from_inside")
+ return pick_from_inside(usr, params)
- if(!choice)
- return
+ // Host is trying to interact with something in host's belly.
+ if("pick_from_outside")
+ return pick_from_outside(usr, params)
- selected.release_sound = choice
-
- if(href_list["b_releasesoundtest"])
- var/sound/releasetest = GLOB.prey_release_sounds[selected.release_sound]
- if(releasetest)
- SEND_SOUND(user, releasetest)
-
- if(href_list["b_sound"])
- var/choice = input(user,"Currently set to [selected.vore_sound]","Select Sound") as null|anything in GLOB.pred_vore_sounds
-
- if(!choice)
- return
-
- selected.vore_sound = choice
-
- if(href_list["b_soundtest"])
- var/sound/voretest = GLOB.prey_vore_sounds[selected.vore_sound]
- if(voretest)
- SEND_SOUND(user, voretest)
-
- if(href_list["b_tastes"])
- selected.can_taste = !selected.can_taste
-
- if(href_list["b_bulge_size"])
- var/new_bulge = input(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.") as num|null
- if(new_bulge == null)
- return
- if(new_bulge == 0) //Disable.
- selected.bulge_size = 0
- to_chat(user,"Your stomach will not be seen on examine.")
- else if (!ISINRANGE(new_bulge,25,200))
- selected.bulge_size = 0.25 //Set it to the default.
- to_chat(user,"Invalid size.")
- else if(new_bulge)
- selected.bulge_size = (new_bulge/100)
-
- if(href_list["b_escapable"])
- if(selected.escapable == FALSE) //Possibly escapable and special interactions.
- selected.escapable = TRUE
- to_chat(usr,"Prey now have special interactions with your [lowertext(selected.name)] depending on your settings.")
- else if(selected.escapable == TRUE) //Never escapable.
- selected.escapable = FALSE
- to_chat(usr,"Prey will not be able to have special interactions with your [lowertext(selected.name)].")
- show_interacts = FALSE //Force the hiding of the panel
- else
- alert("Something went wrong. Your stomach will now not have special interactions. Press the button enable them again and tell a dev.","Error") //If they somehow have a varable that's not 0 or 1
- selected.escapable = FALSE
- show_interacts = FALSE //Force the hiding of the panel
-
- if(href_list["b_escapechance"])
- var/escape_chance_input = input(user, "Set prey escape chance on resist (as %)", "Prey Escape Chance") as num|null
- if(!isnull(escape_chance_input)) //These have to be 'null' because both cancel and 0 are valid, separate options
- selected.escapechance = sanitize_integer(escape_chance_input, 0, 100, initial(selected.escapechance))
-
- if(href_list["b_escapetime"])
- var/escape_time_input = input(user, "Set number of seconds for prey to escape on resist (1-60)", "Prey Escape Time") as num|null
- if(!isnull(escape_time_input))
- selected.escapetime = sanitize_integer(escape_time_input*10, 10, 600, initial(selected.escapetime))
-
- if(href_list["b_transferchance"])
- var/transfer_chance_input = input(user, "Set belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time") as num|null
- if(!isnull(transfer_chance_input))
- selected.transferchance = sanitize_integer(transfer_chance_input, 0, 100, initial(selected.transferchance))
-
- if(href_list["b_transferlocation"])
- var/obj/belly/choice = input("Where do you want your [lowertext(selected.name)] to lead if prey resists?","Select Belly") as null|anything in (user.vore_organs + "None - Remove" - selected)
-
- if(!choice) //They cancelled, no changes
- return FALSE
- else if(choice == "None - Remove")
- selected.transferlocation = null
- else
- selected.transferlocation = choice.name
-
- if(href_list["b_absorbchance"])
- var/absorb_chance_input = input(user, "Set belly absorb mode chance on resist (as %)", "Prey Absorb Chance") as num|null
- if(!isnull(absorb_chance_input))
- selected.absorbchance = sanitize_integer(absorb_chance_input, 0, 100, initial(selected.absorbchance))
-
- if(href_list["b_digestchance"])
- var/digest_chance_input = input(user, "Set belly digest mode chance on resist (as %)", "Prey Digest Chance") as num|null
- if(!isnull(digest_chance_input))
- selected.digestchance = sanitize_integer(digest_chance_input, 0, 100, initial(selected.digestchance))
-
- if(href_list["b_del"])
- var/alert = alert("Are you sure you want to delete your [lowertext(selected.name)]?","Confirmation","Delete","Cancel")
- if(!alert == "Delete")
- return FALSE
-
- var/failure_msg = ""
-
- var/dest_for //Check to see if it's the destination of another vore organ.
- for(var/belly in user.vore_organs)
- var/obj/belly/B = belly
- if(B.transferlocation == selected)
- dest_for = B.name
- failure_msg += "This is the destiantion for at least '[dest_for]' belly transfers. Remove it as the destination from any bellies before deleting it. "
- break
-
- if(selected.contents.len)
- failure_msg += "You cannot delete bellies with contents! " //These end with spaces, to be nice looking. Make sure you do the same.
- if(selected.immutable)
- failure_msg += "This belly is marked as undeletable. "
- if(user.vore_organs.len == 1)
- failure_msg += "You must have at least one belly. "
-
- if(failure_msg)
- alert(user,failure_msg,"Error!")
- return FALSE
-
- qdel(selected)
- selected = user.vore_organs[1]
- user.vore_selected = user.vore_organs[1]
-
- if(href_list["saveprefs"])
- if(!(user.client?.prefs))
- return FALSE
- if(!user.copy_to_prefs_vr() || !user.client.prefs.save_character())
- to_chat(user, "Belly Preferences not saved!")
- log_admin("Could not save vore prefs on USER: [user].")
- else
- to_chat(user, "Belly Preferences were saved!")
-
- if(href_list["applyprefs"])
- var/alert = alert("Are you sure you want to reload the current slot preferences? This will remove your current vore organs and eject their contents.","Confirmation","Reload","Cancel")
- if(!alert == "Reload")
- return FALSE
- if(!user.copy_from_prefs_vr())
- alert("ERROR: Vore preferences failed to apply!","Error")
- else
- to_chat(user,"Vore preferences applied from active slot!")
-
- if(href_list["setflavor"])
- var/new_flavor = html_encode(input(usr,"What your character tastes like (40ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",user.vore_taste) as text|null)
- if(!new_flavor)
- return FALSE
-
- new_flavor = readd_quotes(new_flavor)
- if(length(new_flavor) > MAX_TASTE_LEN)
- alert("Entered flavor/taste text too long. [MAX_TASTE_LEN] character limit.","Error!")
- return FALSE
- user.vore_taste = new_flavor
-
- if(href_list["toggledg"])
- var/choice = alert(user, "This button is for those who don't like being digested. It can make you undigestable to all mobs. Digesting you is currently: [(user.vore_flags & DIGESTABLE) ? "Allowed" : "Prevented"]", "", "Allow Digestion", "Cancel", "Prevent Digestion")
- if(!user || !user.client)
- return
- switch(choice)
- if("Cancel")
+ if("newbelly")
+ if(host.vore_organs.len >= BELLIES_MAX)
return FALSE
- if("Allow Digestion")
- user.vore_flags |= DIGESTABLE
- user.client.prefs.vore_flags |= DIGESTABLE
- if("Prevent Digestion")
- user.vore_flags &= ~DIGESTABLE
- user.client.prefs.vore_flags &= ~DIGESTABLE
- if(href_list["toggledvor"])
- var/choice = alert(user, "This button is for those who don't like vore at all. Devouring you is currently: [(user.vore_flags & DEVOURABLE) ? "Allowed" : "Prevented"]", "", "Allow Devourment", "Cancel", "Prevent Devourment")
- if(!user || !user.client)
- return
- switch(choice)
- if("Cancel")
+ var/new_name = html_encode(input(usr,"New belly's name:","New Belly") as text|null)
+
+ var/failure_msg
+ if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN)
+ failure_msg = "Entered belly name length invalid (must be longer than [BELLIES_NAME_MIN], no more than than [BELLIES_NAME_MAX])."
+ // else if(whatever) //Next test here.
+ else
+ for(var/belly in host.vore_organs)
+ var/obj/belly/B = belly
+ if(lowertext(new_name) == lowertext(B.name))
+ failure_msg = "No duplicate belly names, please."
+ break
+
+ if(failure_msg) //Something went wrong.
+ tgui_alert_async(usr, failure_msg, "Error!")
+ return TRUE
+
+ var/obj/belly/NB = new(host)
+ NB.name = new_name
+ host.vore_selected = NB
+ unsaved_changes = TRUE
+ return TRUE
+
+ if("bellypick")
+ host.vore_selected = locate(params["bellypick"])
+ return TRUE
+ if("move_belly")
+ var/dir = text2num(params["dir"])
+ if(LAZYLEN(host.vore_organs) <= 1)
+ to_chat(usr, "You can't sort bellies with only one belly to sort...")
+ return TRUE
+
+ var/current_index = host.vore_organs.Find(host.vore_selected)
+ if(current_index)
+ var/new_index = clamp(current_index + dir, 1, LAZYLEN(host.vore_organs))
+ host.vore_organs.Swap(current_index, new_index)
+ unsaved_changes = TRUE
+ return TRUE
+
+ if("set_attribute")
+ return set_attr(usr, params)
+
+ if("saveprefs")
+ if(!host.copy_to_prefs_vr())
+ tgui_alert_async(usr, "Belly Preferences not saved!", "Error")
+ log_admin("Could not save vore prefs on USER: [usr].")
+ else
+ to_chat(usr, "Belly Preferences were saved!")
+ unsaved_changes = FALSE
+ return TRUE
+ if("reloadprefs")
+ var/alert = tgui_alert(usr, "Are you sure you want to reload character slot preferences? This will remove your current vore organs and eject their contents.","Confirmation",list("Reload","Cancel"))
+ if(alert != "Reload")
return FALSE
- if("Allow Devourment")
- user.vore_flags |= DEVOURABLE
- user.client.prefs.vore_flags |= DEVOURABLE
- if("Prevent Devourment")
- user.vore_flags &= ~DEVOURABLE
- user.client.prefs.vore_flags &= ~DEVOURABLE
-
- if(href_list["toggledfeed"])
- var/choice = alert(user, "This button is to toggle your ability to be fed to others. Feeding predators is currently: [(user.vore_flags & FEEDING) ? "Allowed" : "Prevented"]", "", "Allow Feeding", "Cancel", "Prevent Feeding")
- if(!user || !user.client)
- return
- switch(choice)
- if("Cancel")
+ if(!host.copy_from_prefs_vr())
+ tgui_alert_async(usr, "ERROR: Virgo-specific preferences failed to apply!","Error")
+ else
+ to_chat(usr, "Vore preferences applied from active slot!")
+ unsaved_changes = FALSE
+ return TRUE
+ if("setflavor")
+ var/new_flavor = html_encode(input(usr,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste) as text|null)
+ if(!new_flavor)
return FALSE
- if("Allow Feeding")
- user.vore_flags |= FEEDING
- user.client.prefs.vore_flags |= FEEDING
- if("Prevent Feeding")
- user.vore_flags &= ~FEEDING
- user.client.prefs.vore_flags &= ~FEEDING
- if(href_list["toggledlickable"])
- var/choice = alert(user, "This button is to toggle your ability to be licked. Being licked is currently: [(user.client.prefs.vore_flags & LICKABLE) ? "Allowed" : "Prevented"]", "", "Allow Licking", "Cancel", "Prevent Licking")
- if(!user || !user.client)
- return
- switch(choice)
- if("Cancel")
+ new_flavor = readd_quotes(new_flavor)
+ if(length(new_flavor) > FLAVOR_MAX)
+ tgui_alert_async(usr, "Entered flavor/taste text too long. [FLAVOR_MAX] character limit.","Error!")
+ return FALSE
+ host.vore_taste = new_flavor
+ unsaved_changes = TRUE
+ return TRUE
+ if("setsmell")
+ var/new_smell = html_encode(input(usr,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell) as text|null)
+ if(!new_smell)
return FALSE
- if("Allow Licking")
- user.client.prefs.vore_flags |= LICKABLE
- if("Prevent Licking")
- user.client.prefs.vore_flags &= ~LICKABLE
- //Refresh when interacted with, returning 1 makes vore_look.Topic update
- return TRUE
+ new_smell = readd_quotes(new_smell)
+ if(length(new_smell) > FLAVOR_MAX)
+ tgui_alert_async(usr, "Entered perfume/smell text too long. [FLAVOR_MAX] character limit.","Error!")
+ return FALSE
+ host.vore_smell = new_smell
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_digest")
+ TOGGLE_BITFIELD(host.vore_flags, DIGESTABLE)
+ if(host.client.prefs)
+ COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, DIGESTABLE)
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_devour")
+ TOGGLE_BITFIELD(host.vore_flags, DEVOURABLE)
+ if(host.client.prefs)
+ COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, DEVOURABLE)
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_feed")
+ TOGGLE_BITFIELD(host.vore_flags, FEEDING)
+ if(host.client.prefs)
+ COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, FEEDING)
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_absorbable")
+ TOGGLE_BITFIELD(host.vore_flags, ABSORBABLE)
+ if(host.client.prefs)
+ COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, ABSORBABLE)
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_mobvore")
+ TOGGLE_BITFIELD(host.vore_flags, MOBVORE)
+ if(host.client.prefs)
+ COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, MOBVORE)
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_vore_sounds")
+ TOGGLE_BITFIELD(host.client.prefs.cit_toggles, EATING_NOISES)
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_digestion_sounds")
+ TOGGLE_BITFIELD(host.client.prefs.cit_toggles, DIGESTION_NOISES)
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_lickable")
+ TOGGLE_BITFIELD(host.vore_flags, LICKABLE)
+ unsaved_changes = TRUE
+ return TRUE
+ if("toggle_smellable")
+ TOGGLE_BITFIELD(host.vore_flags, SMELLABLE)
+ unsaved_changes = TRUE
+ return TRUE
+
+/datum/vore_look/proc/pick_from_inside(mob/user, params)
+ var/atom/movable/target = locate(params["pick"])
+ var/obj/belly/OB = locate(params["belly"])
+
+ if(!(target in OB))
+ return TRUE // Aren't here anymore, need to update menu
+
+ var/intent = "Examine"
+ if(isliving(target))
+ intent = tgui_alert(usr, "What do you want to do to them?","Query",list("Examine","Help Out","Devour"))
+
+ else if(istype(target, /obj/item))
+ intent = tgui_alert(usr, "What do you want to do to that?","Query",list("Examine","Use Hand"))
+
+ switch(intent)
+ if("Examine") //Examine a mob inside another mob
+ var/list/results = target.examine(host)
+ if(!results || !results.len)
+ results = list("You were unable to examine that. Tell a developer!")
+ to_chat(user, jointext(results, " "))
+ return TRUE
+
+ if("Use Hand")
+ if(host.stat)
+ to_chat(user, "You can't do that in your state!")
+ return TRUE
+
+ host.ClickOn(target)
+ return TRUE
+
+ if(!isliving(target))
+ return
+
+ var/mob/living/M = target
+ switch(intent)
+ if("Help Out") //Help the inside-mob out
+ if(host.stat || host.vore_flags & ABSORBED || M.vore_flags & ABSORBED)
+ to_chat(user, "You can't do that in your state!")
+ return TRUE
+
+ to_chat(user,"You begin to push [M] to freedom!")
+ to_chat(M,"[host] begins to push you to freedom!")
+ to_chat(M.loc,"Someone is trying to escape from inside you!")
+ sleep(50)
+ if(prob(33))
+ OB.release_specific_contents(M)
+ to_chat(user,"You manage to help [M] to safety!")
+ to_chat(M,"[host] pushes you free!")
+ to_chat(OB.owner,"[M] forces free of the confines of your body!")
+ else
+ to_chat(user,"[M] slips back down inside despite your efforts.")
+ to_chat(M," Even with [host]'s help, you slip back inside again.")
+ to_chat(OB.owner,"Your body efficiently shoves [M] back where they belong.")
+ return TRUE
+
+ if("Devour") //Eat the inside mob
+ if(host.stat || host.vore_flags & ABSORBED)
+ to_chat(user,"You can't do that in your state!")
+ return TRUE
+
+ if(!host.vore_selected)
+ to_chat(user,"Pick a belly on yourself first!")
+ return TRUE
+
+ var/obj/belly/TB = host.vore_selected
+ to_chat(user,"You begin to [lowertext(TB.vore_verb)] [M] into your [lowertext(TB.name)]!")
+ to_chat(M,"[host] begins to [lowertext(TB.vore_verb)] you into their [lowertext(TB.name)]!")
+ to_chat(OB.owner,"Someone inside you is eating someone else!")
+
+ sleep(TB.nonhuman_prey_swallow_time) //Can't do after, in a stomach, weird things abound.
+ if((host in OB) && (M in OB)) //Make sure they're still here.
+ to_chat(user,"You manage to [lowertext(TB.vore_verb)] [M] into your [lowertext(TB.name)]!")
+ to_chat(M,"[host] manages to [lowertext(TB.vore_verb)] you into their [lowertext(TB.name)]!")
+ to_chat(OB.owner,"Someone inside you has eaten someone else!")
+ TB.nom_mob(M)
+
+/datum/vore_look/proc/pick_from_outside(mob/user, params)
+ var/intent
+
+ //Handle the [All] choice. Ugh inelegant. Someone make this pretty.
+ if(params["pickall"])
+ intent = tgui_alert(usr, "Eject all, Move all?","Query",list("Eject all","Cancel","Move all"))
+ switch(intent)
+ if("Cancel")
+ return TRUE
+
+ if("Eject all")
+ if(host.stat)
+ to_chat(user,"You can't do that in your state!")
+ return TRUE
+
+ host.vore_selected.release_all_contents()
+ return TRUE
+
+ if("Move all")
+ if(host.stat)
+ to_chat(user,"You can't do that in your state!")
+ return TRUE
+
+ var/obj/belly/choice = tgui_input_list(usr, "Move all where?","Select Belly", host.vore_organs)
+ if(!choice)
+ return FALSE
+
+ for(var/atom/movable/target in host.vore_selected)
+ to_chat(target,"You're squished from [host]'s [lowertext(host.vore_selected)] to their [lowertext(choice.name)]!")
+ host.vore_selected.transfer_contents(target, choice, 1)
+ return TRUE
+ return
+
+ var/atom/movable/target = locate(params["pick"])
+ if(!(target in host.vore_selected))
+ return TRUE // Not in our X anymore, update UI
+ var/list/available_options = list("Examine", "Eject", "Move")
+ intent = tgui_alert(user, "What would you like to do with [target]?", "Vore Pick", available_options)
+ switch(intent)
+ if("Examine")
+ var/list/results = target.examine(host)
+ if(!results || !results.len)
+ results = list("You were unable to examine that. Tell a developer!")
+ to_chat(user, jointext(results, " "))
+ return TRUE
+
+ if("Eject")
+ if(host.stat)
+ to_chat(user,"You can't do that in your state!")
+ return TRUE
+
+ host.vore_selected.release_specific_contents(target)
+ return TRUE
+
+ if("Move")
+ if(host.stat)
+ to_chat(user,"You can't do that in your state!")
+ return TRUE
+
+ var/obj/belly/choice = tgui_input_list(usr, "Move [target] where?","Select Belly", host.vore_organs)
+ if(!choice || !(target in host.vore_selected))
+ return TRUE
+
+ to_chat(target,"You're squished from [host]'s [lowertext(host.vore_selected.name)] to their [lowertext(choice.name)]!")
+ host.vore_selected.transfer_contents(target, choice)
+ return TRUE
+
+/datum/vore_look/proc/set_attr(mob/user, params)
+ if(!host.vore_selected)
+ tgui_alert_async(usr, "No belly selected to modify.")
+ return FALSE
+
+ var/attr = params["attribute"]
+ switch(attr)
+ if("b_name")
+ var/new_name = html_encode(input(usr,"Belly's new name:","New Name") as text|null)
+
+ var/failure_msg
+ if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN)
+ failure_msg = "Entered belly name length invalid (must be longer than [BELLIES_NAME_MIN], no more than than [BELLIES_NAME_MAX])."
+ // else if(whatever) //Next test here.
+ else
+ for(var/belly in host.vore_organs)
+ var/obj/belly/B = belly
+ if(lowertext(new_name) == lowertext(B.name))
+ failure_msg = "No duplicate belly names, please."
+ break
+
+ if(failure_msg) //Something went wrong.
+ tgui_alert_async(user,failure_msg,"Error!")
+ return FALSE
+
+ host.vore_selected.name = new_name
+ . = TRUE
+ if("b_wetness")
+ host.vore_selected.is_wet = !host.vore_selected.is_wet
+ . = TRUE
+ if("b_wetloop")
+ host.vore_selected.wet_loop = !host.vore_selected.wet_loop
+ . = TRUE
+ if("b_mode")
+ var/list/menu_list = host.vore_selected.digest_modes.Copy()
+ var/new_mode = tgui_input_list(usr, "Choose Mode (currently [host.vore_selected.digest_mode])", "Mode Choice", menu_list)
+ if(!new_mode)
+ return FALSE
+
+ host.vore_selected.digest_mode = new_mode
+ . = TRUE
+ if("b_desc")
+ var/new_desc = html_encode(input(usr,"Belly Description ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc) as message|null)
+
+ if(new_desc)
+ new_desc = readd_quotes(new_desc)
+ if(length(new_desc) > BELLIES_DESC_MAX)
+ tgui_alert_async(usr, "Entered belly desc too long. [BELLIES_DESC_MAX] character limit.","Error")
+ return FALSE
+ host.vore_selected.desc = new_desc
+ . = TRUE
+ if("b_msgs")
+ tgui_alert(user,"Setting abusive or deceptive messages will result in a ban. Consider this your warning. Max 150 characters per message (500 for idle messages), max 10 messages per topic.","Really, don't.") // Should remain tgui_alert() (blocking)
+ var/help = " Press enter twice to separate messages. '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. '%count' will be replaced with the number of anything in your belly (will not work for absorbed examine). '%countprey' will be replaced with the number of living prey in your belly (or absorbed prey for absorbed examine)."
+ switch(params["msgtype"])
+ if("dmp")
+ var/new_message = input(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp")) as message
+ if(new_message)
+ host.vore_selected.set_messages(new_message,"dmp")
+
+ if("dmo")
+ var/new_message = input(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo")) as message
+ if(new_message)
+ host.vore_selected.set_messages(new_message,"dmo")
+
+ if("smo")
+ var/new_message = input(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo")) as message
+ if(new_message)
+ host.vore_selected.set_messages(new_message,"smo")
+
+ if("smi")
+ var/new_message = input(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi")) as message
+ if(new_message)
+ host.vore_selected.set_messages(new_message,"smi")
+
+ if("em")
+ var/new_message = input(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em")) as message
+ if(new_message)
+ host.vore_selected.set_messages(new_message,"em")
+
+ if("reset")
+ var/confirm = tgui_alert(user,"This will delete any custom messages. Are you sure?","Confirmation",list("Cancel","DELETE"))
+ if(confirm == "DELETE")
+ host.vore_selected.digest_messages_prey = initial(host.vore_selected.digest_messages_prey)
+ host.vore_selected.digest_messages_owner = initial(host.vore_selected.digest_messages_owner)
+ host.vore_selected.struggle_messages_outside = initial(host.vore_selected.struggle_messages_outside)
+ host.vore_selected.struggle_messages_inside = initial(host.vore_selected.struggle_messages_inside)
+ host.vore_selected.examine_messages = initial(host.vore_selected.examine_messages)
+ host.vore_selected.emote_lists = initial(host.vore_selected.emote_lists)
+ . = TRUE
+ if("b_verb")
+ var/new_verb = html_encode(input(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb") as text|null)
+
+ if(length(new_verb) > BELLIES_NAME_MAX || length(new_verb) < BELLIES_NAME_MIN)
+ tgui_alert_async(usr, "Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error")
+ return FALSE
+
+ host.vore_selected.vore_verb = new_verb
+ . = TRUE
+ if("b_release")
+ var/choice = tgui_input_list(user,"Currently set to [host.vore_selected.release_sound]","Select Sound", GLOB.pred_release_sounds)
+
+ if(!choice)
+ return FALSE
+
+ host.vore_selected.release_sound = choice
+ . = TRUE
+ if("b_releasesoundtest")
+ var/sound/releasetest = GLOB.pred_release_sounds[host.vore_selected.release_sound]
+
+ if(releasetest)
+ SEND_SOUND(user, releasetest)
+ . = FALSE //Testing sound, no changes.
+ if("b_sound")
+ var/choice = tgui_input_list(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound", GLOB.prey_vore_sounds)
+
+ if(!choice)
+ return FALSE
+
+ host.vore_selected.vore_sound = choice
+ . = TRUE
+ if("b_soundtest")
+ var/sound/voretest = GLOB.prey_vore_sounds[host.vore_selected.vore_sound]
+ if(voretest)
+ SEND_SOUND(user, voretest)
+ . = FALSE //Testing sound, no changes.
+ if("b_tastes")
+ host.vore_selected.can_taste = !host.vore_selected.can_taste
+ . = TRUE
+ if("b_bulge_size")
+ var/new_bulge = input(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.") as num|null
+ if(new_bulge == null)
+ return FALSE
+ if(new_bulge == 0) //Disable.
+ host.vore_selected.bulge_size = 0
+ to_chat(user,"Your stomach will not be seen on examine.")
+ else if (!ISINRANGE(new_bulge,25,200))
+ host.vore_selected.bulge_size = 0.25 //Set it to the default.
+ to_chat(user,"Invalid size.")
+ else if(new_bulge)
+ host.vore_selected.bulge_size = (new_bulge/100)
+ . = TRUE
+ if("b_escapable")
+ if(host.vore_selected.escapable == 0) //Possibly escapable and special interactions.
+ host.vore_selected.escapable = 1
+ to_chat(usr,"Prey now have special interactions with your [lowertext(host.vore_selected.name)] depending on your settings.")
+ else if(host.vore_selected.escapable == 1) //Never escapable.
+ host.vore_selected.escapable = 0
+ to_chat(usr,"Prey will not be able to have special interactions with your [lowertext(host.vore_selected.name)].")
+ else
+ tgui_alert_async(usr, "Something went wrong. Your stomach will now not have special interactions. Press the button enable them again and tell a dev.","Error") //If they somehow have a varable that's not 0 or 1
+ host.vore_selected.escapable = 0
+ . = TRUE
+ if("b_escapechance")
+ var/escape_chance_input = input(user, "Set prey escape chance on resist (as %)", "Prey Escape Chance") as num|null
+ if(!isnull(escape_chance_input)) //These have to be 'null' because both cancel and 0 are valid, separate options
+ host.vore_selected.escapechance = sanitize_integer(escape_chance_input, 0, 100, initial(host.vore_selected.escapechance))
+ . = TRUE
+ if("b_escapetime")
+ var/escape_time_input = input(user, "Set number of seconds for prey to escape on resist (1-60)", "Prey Escape Time") as num|null
+ if(!isnull(escape_time_input))
+ host.vore_selected.escapetime = sanitize_integer(escape_time_input*10, 10, 600, initial(host.vore_selected.escapetime))
+ . = TRUE
+ if("b_transferchance")
+ var/transfer_chance_input = input(user, "Set belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time") as num|null
+ if(!isnull(transfer_chance_input))
+ host.vore_selected.transferchance = sanitize_integer(transfer_chance_input, 0, 100, initial(host.vore_selected.transferchance))
+ . = TRUE
+ if("b_transferlocation")
+ var/obj/belly/choice = tgui_input_list(usr, "Where do you want your [lowertext(host.vore_selected.name)] to lead if prey resists?","Select Belly", (host.vore_organs + "None - Remove" - host.vore_selected))
+
+ if(!choice) //They cancelled, no changes
+ return FALSE
+ else if(choice == "None - Remove")
+ host.vore_selected.transferlocation = null
+ else
+ host.vore_selected.transferlocation = choice.name
+ . = TRUE
+ if("b_absorbchance")
+ var/absorb_chance_input = input(user, "Set belly absorb mode chance on resist (as %)", "Prey Absorb Chance") as num|null
+ if(!isnull(absorb_chance_input))
+ host.vore_selected.absorbchance = sanitize_integer(absorb_chance_input, 0, 100, initial(host.vore_selected.absorbchance))
+ . = TRUE
+ if("b_digestchance")
+ var/digest_chance_input = input(user, "Set belly digest mode chance on resist (as %)", "Prey Digest Chance") as num|null
+ if(!isnull(digest_chance_input))
+ host.vore_selected.digestchance = sanitize_integer(digest_chance_input, 0, 100, initial(host.vore_selected.digestchance))
+ . = TRUE
+ if("b_del")
+ var/alert = tgui_alert(usr, "Are you sure you want to delete your [lowertext(host.vore_selected.name)]?","Confirmation",list("Cancel","Delete"))
+ if(!(alert == "Delete"))
+ return FALSE
+
+ var/failure_msg = ""
+
+ var/dest_for //Check to see if it's the destination of another vore organ.
+ for(var/belly in host.vore_organs)
+ var/obj/belly/B = belly
+ if(B.transferlocation == host.vore_selected)
+ dest_for = B.name
+ failure_msg += "This is the destiantion for at least '[dest_for]' belly transfers. Remove it as the destination from any bellies before deleting it. "
+ break
+
+ if(host.vore_selected.contents.len)
+ failure_msg += "You cannot delete bellies with contents! " //These end with spaces, to be nice looking. Make sure you do the same.
+ if(host.vore_selected.immutable)
+ failure_msg += "This belly is marked as undeletable. "
+ if(host.vore_organs.len == 1)
+ failure_msg += "You must have at least one belly. "
+
+ if(failure_msg)
+ tgui_alert_async(user,failure_msg,"Error!")
+ return FALSE
+
+ qdel(host.vore_selected)
+ host.vore_selected = host.vore_organs[1]
+ . = TRUE
+
+ if(.)
+ unsaved_changes = TRUE
diff --git a/code/modules/zombie/organs.dm b/code/modules/zombie/organs.dm
index 2681f781a9..a724d26314 100644
--- a/code/modules/zombie/organs.dm
+++ b/code/modules/zombie/organs.dm
@@ -45,7 +45,7 @@
if(!owner)
return
if(!(src in owner.internal_organs))
- Remove(owner)
+ INVOKE_ASYNC(src,.proc/Remove,owner)
if(owner.mob_biotypes & MOB_MINERAL)//does not process in inorganic things
return
if (causes_damage && !iszombie(owner) && owner.stat != DEAD)
diff --git a/config/antag_rep.txt b/config/antag_rep.txt
deleted file mode 100644
index e8a7250686..0000000000
--- a/config/antag_rep.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-## Custom antag reputation values
-## List of job titles followed by antag rep value, all prefixed with ANTAG_REP. See code/modules/jobs/job_types for titles
-## e.g.
-## ANTAG_REP Captain 10
-## ANTAG_REP Assistant 0
diff --git a/config/config.txt b/config/config.txt
index 611d63cb24..c0c683373d 100644
--- a/config/config.txt
+++ b/config/config.txt
@@ -1,18 +1,7 @@
# You can use the "$include" directive to split your configs however you want
-$include game_options.txt
-$include dbconfig.txt
-$include comms.txt
-$include antag_rep.txt
-$include resources.txt
-# Cit-specific imports
-$include donator_groupings.txt
-$include dynamic_config.txt
-$include plushies/defines.txt
-$include job_threats.txt
-$include policy.txt
-$include persistence.txt
-$include respawns.txt
+# MAKE SURE ENTRIES ARE SORTED IN THE SAME FASHION THEY ARE IN THE .dm
+# if you don't do this i will find you and put lemons on your eyes.
# You can use the @ character at the beginning of a config option to lock it from being edited in-game
# Example usage:
@@ -22,523 +11,31 @@ $include respawns.txt
# Which explicitly disables LOG_TWITTER, as well as locking it.
# There are various options which are hard-locked for security reasons.
-## Server name: This appears at the top of the screen in-game and in the BYOND hub. Uncomment and replace 'tgstation' with the name of your choice.
-# SERVERNAME tgstation
-## Server tagline: This will appear right below the server's title.
-# SERVERTAGLINE A generic TG-based server
-
-## Server SQL name: This is the name used to identify the server to the SQL DB, distinct from SERVERNAME as it must be at most 32 characters.
-# SERVERSQLNAME tgstation
-
-## Station name: The name of the station as it is referred to in-game. If commented out, the game will generate a random name instead.
-STATIONNAME Space Station 13
-
-## Put on byond hub: Uncomment this to put your server on the byond hub.
-#HUB
-
-## Lobby time: This is the amount of time between rounds that players have to setup their characters and be ready.
-LOBBY_COUNTDOWN 120
-
-## Round End Time: This is the amount of time after the round ends that players have to murder death kill each other.
-ROUND_END_COUNTDOWN 90
-
-## Comment this out if you want to use the SQL based admin system, the legacy system uses admins.txt.
-## You need to set up your database to use the SQL based system.
-## This flag is automatically enabled if SQL_ENABLED isn't
-ADMIN_LEGACY_SYSTEM
-
-##Uncomment this to stop any admins loaded by the legacy system from having their rank edited by the permissions panel
-#PROTECT_LEGACY_ADMINS
-
-##Uncomment this to stop any ranks loaded by the legacy system from having their flags edited by the permissions panel
-#PROTECT_LEGACY_RANKS
-
-##Uncomment this to have admin ranks only loaded from the legacy admin_ranks.txt
-##If enabled, each time admins are loaded ranks the database will be updated with the current ranks and their flags
-#LOAD_LEGACY_RANKS_ONLY
-
-## Comment this out if you want to use the SQL based banning system. The legacy systems use the files in the data folder. You need to set up your database to use the SQL based system.
-BAN_LEGACY_SYSTEM
-
-## Comment this out to stop locally connected clients from being given the almost full access !localhost! admin rank
-ENABLE_LOCALHOST_RANK
-
-## Comment this out if you want to use the SQL based mentor system, the legacy system uses mentors.txt.
-## You need to set up your database to use the SQL based system.
-## This flag is automatically enabled if SQL_ENABLED isn't
-MENTOR_LEGACY_SYSTEM
-
-#Mentors only see ckeys by default. Uncomment to have them only see mob name
-#MENTORS_MOBNAME_ONLY
-
-## Uncomment this entry to have certain jobs require your account to be at least a certain number of days old to select. You can configure the exact age requirement for different jobs by editing
-## the minimal_player_age variable in the files in folder /code/game/jobs/job/.. for the job you want to edit. Set minimal_player_age to 0 to disable age requirement for that job.
-## REQUIRES the database set up to work. Keep it hashed if you don't have a database set up.
-## NOTE: If you have just set-up the database keep this DISABLED, as player age is determined from the first time they connect to the server with the database up. If you just set it up, it means
-## you have noone older than 0 days, since noone has been logged yet. Only turn this on once you have had the database up for 30 days.
-#USE_AGE_RESTRICTION_FOR_JOBS
-
-## Uncomment this to have the job system use the player's account creation date, rather than the when they first joined the server for job timers.
-#USE_ACCOUNT_AGE_FOR_JOBS
-
-## Unhash this to track player playtime in the database. Requires database to be enabled.
-#USE_EXP_TRACKING
-## Unhash this to enable playtime requirements for head jobs.
-#USE_EXP_RESTRICTIONS_HEADS
-## Unhash this to override head jobs' playtime requirements with this number of hours.
-## Leave this commented out to use the values defined in the job datums. Values in the datums are stored as minutes.
-#USE_EXP_RESTRICTIONS_HEADS_HOURS 3
-## Unhash this to change head jobs' playtime requirements so that they're based on department playtime, rather than crew playtime.
-#USE_EXP_RESTRICTIONS_HEADS_DEPARTMENT
-## Unhash this to enable playtime requirements for certain non-head jobs, like Engineer and Scientist.
-#USE_EXP_RESTRICTIONS_OTHER
-## Allows admins to bypass job playtime requirements.
-#USE_EXP_RESTRICTIONS_ADMIN_BYPASS
-
-## log OOC channel
-LOG_OOC
-
-## log client Say
-LOG_SAY
-
-## log admin actions
-LOG_ADMIN
-
-## log admin chat
-LOG_ADMINCHAT
-
-## log client access (logon/logoff)
-LOG_ACCESS
-
-## log game actions (start of round, results, etc.)
-LOG_GAME
-
-## log player votes
-LOG_VOTE
-
-## log player crafting
-LOG_CRAFT
-
-## log client Whisper
-LOG_WHISPER
-
-## log emotes
-LOG_EMOTE
-
-## log attack messages
-LOG_ATTACK
-
-## log pda messages
-LOG_PDA
-
-## log telecomms messages
-LOG_TELECOMMS
-
-## log prayers
-LOG_PRAYER
-
-## log lawchanges
-LOG_LAW
-
-## log crew manifest to seperate file
-LOG_MANIFEST
-
-## log job divide debugging information
-#LOG_JOB_DEBUG
-
-## log all world.Topic() calls
-# LOG_WORLD_TOPIC
-
-## enables use of the proc twitterize() that lets you take a large list of strings and turn it into a JSON file of tweet sized strings.
-## As an example of how this could be """useful""" look towards Poly (https://twitter.com/Poly_the_Parrot)
-# LOG_TWITTER
-
-## Enable logging pictures
-# LOG_PICTURES
-
-## log virus and actions
-LOG_VIRUS
-
-##Log camera pictures - Must have picture logging enabled
-PICTURE_LOGGING_CAMERA
-
-## period of time in seconds for players to be considered inactive
-# INACTIVITY_PERIOD 300
-
-## period of time in seconds for players to be considered afk and kickable
-# AFK_PERIOD 600
-
-## disconnect players who are considered afk
-# KICK_INACTIVE
-
-## Comment this out to stop admins being able to choose their personal ooccolor
-ALLOW_ADMIN_OOCCOLOR
-
-## Job slot open/close by identification consoles delay in seconds
-ID_CONSOLE_JOBSLOT_DELAY 30
-
-## allow players to initiate a restart vote
-#ALLOW_VOTE_RESTART
-
-## allow players to initate a mode-change start
-#ALLOW_VOTE_MODE
-
-## min delay (deciseconds) between voting sessions (default 10 minutes)
-VOTE_DELAY 6000
-
-## time period (deciseconds) which voting session will last (default 1 minute)
-VOTE_PERIOD 600
-
-## autovote initial delay (deciseconds) before first automatic transfer vote call (default 120 minutes)
-## Set to 0 to disable the subsystem altogether.
-VOTE_AUTOTRANSFER_INITIAL 72000
-
-## autovote delay (deciseconds) before sequential automatic transfer votes are called (default 30 minutes)
-VOTE_AUTOTRANSFER_INTERVAL 18000
-
-## autovote maximum votes until automatic transfer call. (default 4)
-## Set to 0 to force automatic crew transfer after the 'vote_autotransfer_initial' elapsed.
-## Set to -1 to disable the maximum votes cap.
-VOTE_AUTOTRANSFER_MAXIMUM 4
-
-## prevents dead players from voting or starting votes
-# NO_DEAD_VOTE
-
-## players' votes default to "No vote" (otherwise, default to "No change")
-# DEFAULT_NO_VOTE
-
-## disables calling del(src) on newmobs if they logout before spawnin in
-# DONT_DEL_NEWMOB
-
-## set a hosted by name for unix platforms
-HOSTEDBY Yournamehere
-
-## Set to jobban "Guest-" accounts from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions.
-## Set to 1 to jobban them from those positions, set to 0 to allow them.
-# GUEST_JOBBAN
-
-## Uncomment this to stop people connecting to your server without a registered ckey. (i.e. guest-* are all blocked from connecting)
-GUEST_BAN
-
-## Comment this out to disable checking for the cid randomizer dll. (disabled if database isn't enabled or connected)
-CHECK_RANDOMIZER
-
-## IPINTEL:
-## This allows you to detect likely proxies by checking ips against getipintel.net
-## Rating to warn at: (0.9 is good, 1 is 100% likely to be a spammer/proxy, 0.8 is 80%, etc) anything equal to or higher then this number triggers an admin warning
-#IPINTEL_RATING_BAD 0.9
-## Contact email, (required to use the service, leaving blank or default disables IPINTEL)
-#IPINTEL_EMAIL ch@nge.me
-## How long to save good matches (ipintel rate limits to 15 per minute and 500 per day. so this shouldn't be too low, getipintel.net suggests 6 hours, time is in hours) (Your ip will get banned if you go over 500 a day too many times)
-#IPINTEL_SAVE_GOOD 12
-## How long to save bad matches (these numbers can change as ips change hands, best not to save these for too long in case somebody gets a new ip used by a spammer/proxy before.)
-#IPINTEL_SAVE_BAD 3
-## Domain name to query (leave commented out for the default, only needed if you pay getipintel.net for more querys)
-#IPINTEL_DOMAIN check.getipintel.net
-
-## Uncomment to allow web client connections
-#ALLOW_WEBCLIENT
-
-## Uncomment to restrict web client connections to byond members
-## This makes for a nice pay gate to cut down on ban evading, as the webclient's cid system isn't that great
-## byond membership starts at $10 for 3 months, so to use the webclient to evade, they would have sink 10 bucks in each evade.
-#WEBCLIENT_ONLY_BYOND_MEMBERS
-
-## Set to prevent anyone but those ckeys listed in config/whitelist.txt and config/admins.txt from joining your server
-#USEWHITELIST
-
-## set a server location for world reboot. Don't include the byond://, just give the address and port.
-## Don't set this to the same server, BYOND will automatically restart players to the server when it has restarted.
-# SERVER ss13.example.com:2506
-
-## forum address
-# FORUMURL https://citadel-station.net/forum/
-
-## Wiki address
-# WIKIURL https://katlin.dog/citadel-wiki
-
-## Rules address
-# RULESURL https://katlin.dog/citadel-rules/main
-
-## Github address
-# GITHUBURL https://github.com/Citadel-Station-13/Citadel-Station-13
-
-## Round specific stats address
-## Link to round specific parsed logs; IE statbus. It is appended with the RoundID automatically by ticker/Reboot()
-## This will take priority over the game logs address during reboot.
-## Example: https://atlantaned.space/statbus/round.php?round=
-# ROUNDSTATSURL http://citadel-station.net/slimbus/
-
-## Game Logs address
-## Incase you don't have a fancy parsing system, but still want players to be able to find where you keep your server's logs.
-## Example: https://tgstation13.org/parsed-logs/basil/data/logs/
-# GAMELOGURL
-
-## Github repo id
-##This can be found by going to https://api.github.com/users//repos
-##Or https://api.github.com/orgs//repos if the repo owner is an organization
-# GITHUBREPOID 62485194
-
-## Ban appeals URL - usually for a forum or wherever people should go to contact your admins.
-# BANAPPEALS https://citadel-station.net/forum/viewforum.php?f=8&sid=a0ce5331d5594ef6d49661609c6f4ff9
-
-## System command that invokes youtube-dl, used by Play Internet Sound.
-## You can install youtube-dl with
-## "pip install youtube-dl" if you have pip installed
-## from https://github.com/rg3/youtube-dl/releases
-## or your package manager
-## The default value assumes youtube-dl is in your system PATH
-# INVOKE_YOUTUBEDL youtube-dl
-
-## In-game features
-##Toggle for having jobs load up from the .txt
-# LOAD_JOBS_FROM_TXT
-
-## Uncomment this to forbid admins from possessing the singularity.
-#FORBID_SINGULO_POSSESSION
-
-## Uncomment to show a popup 'reply to' window to every non-admin that receives an adminPM.
-## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off)
-#POPUP_ADMIN_PM
-
-## Uncomment to allow special 'Easter-egg' events on special holidays such as seasonal holidays and stuff like 'Talk Like a Pirate Day' :3 YAARRR
-ALLOW_HOLIDAYS
-
-## Uncomment to show the names of the admin sending a pm from IRC instead of showing as a stealthmin.
-#SHOW_IRC_NAME
-
-## Defines the ticklimit for subsystem initialization (In percents of a byond tick). Lower makes world start smoother. Higher makes it faster.
-##This is currently a testing optimized setting. A good value for production would be 98.
-TICK_LIMIT_MC_INIT 500
-
-##Defines the ticklag for the world. Ticklag is the amount of time between game ticks (aka byond ticks) (in 1/10ths of a second).
-## This also controls the client network update rate, as well as the default client fps
-TICKLAG 0.5
-
-##Can also be set as per-second value, the following value is identical to the above.
-#FPS 20
-
-## Comment this out to disable automuting
-#AUTOMUTE_ON
-
-## Uncomment this to let players see their own notes (they can still be set by admins only)
-#SEE_OWN_NOTES
-
-### Comment these two out to prevent notes fading out over time for admins.
-## Notes older then this will start fading out.
-NOTE_FRESH_DAYS 91.31055
-## Notes older then this will be completely faded out.
-NOTE_STALE_DAYS 365.2422
-
-##Note: all population caps can be used with each other if desired.
-
-## Uncomment for 'soft' population caps, players will be warned while joining if the living crew exceeds the listed number.
-#SOFT_POPCAP 100
-
-## Message for soft cap
-SOFT_POPCAP_MESSAGE Be warned that the server is currently serving a high number of users, consider using alternative game servers.
-
-## Uncomment for 'hard' population caps, players will not be allowed to spawn if the living crew exceeds the listed number, though they may still observe or wait for the living crew to decrease in size.
-#HARD_POPCAP 150
-
-## Message for hard cap
-HARD_POPCAP_MESSAGE The server is currently serving a high number of users, You cannot currently join. You may wait for the number of living crew to decline, observe, or find alternative servers.
-
-## Uncomment for 'extreme' population caps, players will not be allowed to join the server if living crew exceeds the listed number.
-#EXTREME_POPCAP 200
-
-## Message for extreme cap
-EXTREME_POPCAP_MESSAGE The server is currently serving a high number of users, find alternative servers.
-
-## Notify admins when a new player connects for the first x days a player's been around. (0 for first connection only, -1 for never)
-## Requres database
-NOTIFY_NEW_PLAYER_AGE 0
-
-## Notify admins when a player connects if their byond account was created in the last X days
-## Requires database
-NOTIFY_NEW_PLAYER_ACCOUNT_AGE 1
-
-## Notify the irc channel when a new player makes their first connection
-## Requres database
-#IRC_FIRST_CONNECTION_ALERT
-
-## Deny all new connections by ckeys we haven't seen before (exempts admins and only denies the connection if the database is enabled and connected)
-## Requires database
-#PANIC_BUNKER
-
-## If a player connects during a bunker with less then or this amount of living time (Minutes), we deny the connection
-#PANIC_BUNKER_LIVING 90
-
-## The message the Panic Bunker gives when someone is rejected by it
-## %minutes% is replaced with PANIC_BUNKER_LIVING on runtime, remove it if you don't want this
-#PANIC_BUNKER_MESSAGE Sorry, but the server is currently not accepting connections from players with less than %minutes% minutes of living time.
-
-## If panic bunker is on and a player is rejected (see above), attempt to send them to this connected server (see below) instead.
-## You probably want this to be the same as CROSS_SERVER_ADDRESS
-#PANIC_SERVER_ADDRESS byond://address:port
-
-##Name of the place to send people rejected by the bunker
-#PANIC_SERVER_NAME [Put the name here]
-
-##Automated age verification, comment this out to not ask new users if they are 18+
-#AGE_VERIFICATION
-
-## Uncomment to have the changelog file automatically open when a user connects and hasn't seen the latest changelog
-#AGGRESSIVE_CHANGELOG
-
-## Comment this out if you've used the mass conversion sql proc for notes or want to stop converting notes
-AUTOCONVERT_NOTES
-
-## Comment this out to stop admin messages sent anytime an admin disconnects from a round in play, you can edit the messages in admin.dm
-ANNOUNCE_ADMIN_LOGOUT
-
-## Uncomment to have an admin message sent anytime an admin connects to a round in play, you can edit the messages in admin.dm
-#ANNOUNCE_ADMIN_LOGIN
-
-## Map rotation
-## You should edit maps.txt to match your configuration when you enable this.
-MAPROTATION
-
-## TG-style map rotation
-## By default, Citadel uses a more traditional method of map voting, where at the end of a round, players are given a full upfront vote.
-## This PR will disable that, and will make the server use TG's map rotation instead.
-#TGSTYLE_MAPROTATION
-
-## Map voting
-## Allows players to vote for their preffered map
-## When it's set to zero, the map will be randomly picked each round
-ALLOW_MAP_VOTING 1
-
-## Map voting type
-## Determines what kind of vote the map vote is
-## Options are:
-## PLURALITY (default, only vote for one option)
-## APPROVAL (can vote for as many as you want), I
-## IRV (vote by ranked choice, winner determined by instant runoff algorithm)
-## SCORE (give individual rankings of each choice, winner determined by majority judgement algorithm)
-MAP_VOTE_TYPE APPROVAL
-
-## Map rotate chance delta
-## This is the chance of map rotation factored to the round length.
-## A value of 1 would mean the map rotation chance is the round length in minutes (hour long round == 60% rotation chance)
-## A value of 0.5 would mean the map rotation chance is half of the round length in minutes (hour long round == 30% rotation chance)
-#MAPROTATIONCHANCEDELTA 0.75
-
-## AUTOADMIN
-## The default admin rank
-AUTOADMIN_RANK Game Master
-
-## Uncomment to automatically give that admin rank to all players
-#AUTOADMIN
-
-## CLIENT VERSION CONTROL
-## This allows you to configure the minimum required client version, as well as a warning version, and message for both.
-## These trigger for any version below (non-inclusive) the given version, so 510 triggers on 509 or lower.
-## These messages will be followed by one stating the clients current version and the required version for clarity.
-## If CLIENT_WARN_POPUP is uncommented a popup window with the message will be displayed instead
-#CLIENT_WARN_VERSION 511
-#CLIENT_WARN_POPUP
-#CLIENT_WARN_MESSAGE Byond released 511 as the stable release. You can set the framerate your client runs at, which makes the game feel very different and cool. Shortly after its release we will end up using 511 client features and you will be forced to update.
-CLIENT_ERROR_VERSION 511
-CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade.
-## The minimum build needed for joining the server, if using 512, a good minimum build would be 1421 as that disables the Middle Mouse Button exploit.
-CLIENT_ERROR_BUILD 1421
-
-## TOPIC RATE LIMITING
-## This allows you to limit how many topic calls (clicking on an interface window) the client can do in any given game second and/or game minute.
-## Admins are exempt from these limits.
-## Hitting the minute limit notifies admins.
-## Set to 0 or comment out to disable.
-SECOND_TOPIC_LIMIT 10
-
-MINUTE_TOPIC_LIMIT 100
-
-
-## CLICK RATE LIMITING
-## Same as above, but applies to clicking on objects in the game window.
-## This should be a higher then the interface limit to allow for the spam clickly nature of most battles.
-## Admins are exempt from these limits.
-## Hitting the minute limit notifies admins.
-## Set to 0 to disable.
-SECOND_CLICK_LIMIT 15
-
-MINUTE_CLICK_LIMIT 400
-
-##Error handling related options
-## The "cooldown" time for each occurence of a unique error
-#ERROR_COOLDOWN 600
-## How many occurences before the next will silence them
-#ERROR_LIMIT 90
-## How long a unique error will be silenced for
-#ERROR_SILENCE_TIME 6000
-##How long to wait between messaging admins about occurences of a unique error
-#ERROR_MSG_DELAY 50
-
-## Chat Announce Options
-## Various messages to be sent to game chats
-## Uncommenting these will enable them, by default they will be broadcast to Game chat channels on TGS3 or non-admin channels on TGS4
-## If using TGS4, the string option can be set as a chat channel tag to limit the message to channels of that tag type (case-sensitive)
-## i.e. CHAT_ANNOUNCE_NEW_GAME chat_channel_tag
-
-## Send a message with the station name starting a new game
-#CHAT_ANNOUNCE_NEW_GAME
-
-## Allow admin hrefs that don't use the new token system, will eventually be removed
-DEBUG_ADMIN_HREFS
-
-###Master Controller High Pop Mode###
-
-##The Master Controller(MC) is the primary system controlling timed tasks and events in SS13 (lobby timer, game checks, lighting updates, atmos, etc)
-##Default base MC tick rate (1 = process every "byond tick" (see: tick_lag/fps config settings), 2 = process every 2 byond ticks, etc)
-## Setting this to 0 will prevent the Master Controller from ticking
-BASE_MC_TICK_RATE 1
-
-##High population MC tick rate
-## Byond rounds timer values UP, but the tick rate is modified with heuristics during lag spites so setting this to something like 2
-## will make it run every 2 byond ticks, but will also double the effect of anti-lag heuristics. You can instead set it to something like
-## 1.1 to make it run every 2 byond ticks, but only increase the effect of anti-lag heuristics by 10%. or 1.5 for 50%.
-## (As an aside, you could in theory also reduce the effect of anti-lag heuristics in the base tick rate by setting it to something like 0.5)
-HIGH_POP_MC_TICK_RATE 1.1
-
-##Engage high pop mode if player count raises above this (Player in this context means any connected user. Lobby, ghost or in-game all count)
-HIGH_POP_MC_MODE_AMOUNT 65
-
-##Disengage high pop mode if player count drops below this
-DISABLE_HIGH_POP_MC_MODE_AMOUNT 60
-
-## Uncomment to prevent the world from sleeping while no players are connected after initializations
-#RESUME_AFTER_INITIALIZATIONS
-
-## Uncomment to set the number of /world/Reboot()s before the DreamDaemon restarts itself. 0 means restart every round. Requires tgstation server tools.
-#ROUNDS_UNTIL_HARD_RESTART 10
-
-## Number of days for an individual panic bunker passthrough entry to be wiped. Note that they're also wiped as soon as a player is in the database.
-#MAX_BUNKER_DAYS 7
-
-##Default screen resolution, in tiles.
-## By default, this is 15x15, which gets simplified to 7 by BYOND, as it is a 1:1 screen ratio.
-## For reference, Goonstation uses a resolution of 21x15 for it's widescreen mode.
-## Do note that changing this value will affect the title screen. The title screen will have to be updated manually if this is changed.
-DEFAULT_VIEW 21x15
-
-### FAIL2TOPIC:
-### Automated IP bans for world/Topic() spammers
-### NOTE FOR WINDOWS HOSTS: This requires you to be running dreamdaemon as an administrator for it to work at all. TGS3 handles this automatically, and honestly there's no reason not to be using TGS3 if you're hosting on Windows.
-### NOTE FOR LINUX HOSTS: This requires manual setup of iptables. Beware that improper configuration of this can and will irreversibly fuck up a server, so please don't tinker with it if you don't know what you're doing.
-## Enabled
-#FAIL2TOPIC_ENABLED
-## Minimum wait time in deciseconds between valid requests
-FAIL2TOPIC_RATE_LIMIT 10
-## Number of requests after breaching rate limit that triggers a ban
-FAIL2TOPIC_MAX_FAILS 5
-## Firewall rule name used on physical server
-## FOR LINUX HOSTS: This is used as the chain name. The iptables chain doesn't get created or hooked up to INPUT automatically, so you'll have to get that set up yourself. Recommended name: BYOND
-FAIL2TOPIC_RULE_NAME _dd_fail2topic
-
-## Enable automatic profiling - Byond 513.1506 and newer only.
-#AUTO_PROFILE
-
-## Uncomment to enable global ban DB using the provided URL. The API should expect to receive a ckey at the end of the URL.
-## More API details can be found here: https://centcom.melonmesa.com
-CENTCOM_BAN_DB https://centcom.melonmesa.com/ban/search
+$include entries/admin.txt
+$include entries/alert.txt
+$include entries/antag_rep.txt
+$include entries/comms.txt
+$include entries/connections.txt
+$include entries/dbconfig.txt
+$include entries/debris.txt
+$include entries/donator.txt
+$include entries/dynamic.txt
+$include entries/fetish_content.txt
+$include entries/gamemodes.txt
+$include entries/general.txt
+$include entries/jexp.txt
+$include entries/logging.txt
+$include entries/movespeed.txt
+$include entries/persistence.txt
+$include entries/policy.txt
+$include entries/resources.txt
+$include entries/respawns.txt
+$include entries/security.txt
+$include entries/server.txt
+$include entries/stamina_combat.txt
+$include entries/threat.txt
+$include entries/urls.txt
+$include entries/vote.txt
+
+$include plushies/defines.txt
diff --git a/config/donator_groupings.txt b/config/donator_groupings.txt
deleted file mode 100644
index b26d1efe22..0000000000
--- a/config/donator_groupings.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-#this is a bad system but I'm lazy so it piggybacks off config loader system.
-#Specify group followed by ckey for each ckey.
-
-#TIER_1_DONATORS test_ckey
-
-#TIER_2_DONATORS test_ckey
-
-#TIER_3_DONATORS test_ckey
diff --git a/config/entries/admin.txt b/config/entries/admin.txt
new file mode 100644
index 0000000000..883bda9422
--- /dev/null
+++ b/config/entries/admin.txt
@@ -0,0 +1,79 @@
+## Comment this out if you want to use the SQL based admin system, the legacy system uses admins.txt.
+## You need to set up your database to use the SQL based system.
+## This flag is automatically enabled if SQL_ENABLED isn't
+ADMIN_LEGACY_SYSTEM
+
+##Uncomment this to stop any admins loaded by the legacy system from having their rank edited by the permissions panel
+#PROTECT_LEGACY_ADMINS
+
+##Uncomment this to stop any ranks loaded by the legacy system from having their flags edited by the permissions panel
+#PROTECT_LEGACY_RANKS
+
+##Uncomment this to have admin ranks only loaded from the legacy admin_ranks.txt
+##If enabled, each time admins are loaded ranks the database will be updated with the current ranks and their flags
+#LOAD_LEGACY_RANKS_ONLY
+
+## Comment this out if you want to use the SQL based banning system. The legacy systems use the files in the data folder. You need to set up your database to use the SQL based system.
+BAN_LEGACY_SYSTEM
+
+## Comment this out to stop locally connected clients from being given the almost full access !localhost! admin rank
+ENABLE_LOCALHOST_RANK
+
+## Comment this out if you want to use the SQL based mentor system, the legacy system uses mentors.txt.
+## You need to set up your database to use the SQL based system.
+## This flag is automatically enabled if SQL_ENABLED isn't
+MENTOR_LEGACY_SYSTEM
+
+#Mentors only see ckeys by default. Uncomment to have them only see mob name
+#MENTORS_MOBNAME_ONLY
+
+## Uncomment this to forbid admins from possessing the singularity.
+#FORBID_SINGULO_POSSESSION
+
+## Uncomment to show a popup 'reply to' window to every non-admin that receives an adminPM.
+## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off)
+#POPUP_ADMIN_PM
+
+## Uncomment this to let players see their own notes (they can still be set by admins only)
+#SEE_OWN_NOTES
+
+### Comment these two out to prevent notes fading out over time for admins.
+## Notes older then this will start fading out.
+NOTE_FRESH_DAYS 91.31055
+## Notes older then this will be completely faded out.
+NOTE_STALE_DAYS 365.2422
+
+## Comment this out if you've used the mass conversion sql proc for notes or want to stop converting notes
+AUTOCONVERT_NOTES
+
+## Comment this out to stop admin messages sent anytime an admin disconnects from a round in play, you can edit the messages in admin.dm
+ANNOUNCE_ADMIN_LOGOUT
+
+## Uncomment to have an admin message sent anytime an admin connects to a round in play, you can edit the messages in admin.dm
+#ANNOUNCE_ADMIN_LOGIN
+
+## More API details can be found here: https://centcom.melonmesa.com
+CENTCOM_BAN_DB https://centcom.melonmesa.com/ban/search
+
+## AUTOADMIN
+## The default admin rank
+AUTOADMIN_RANK Game Master
+
+## Uncomment to automatically give that admin rank to all players
+#AUTOADMIN
+
+## Comment this out to stop admins being able to choose their personal ooccolor
+ALLOW_ADMIN_OOCCOLOR
+
+## Set to jobban "Guest-" accounts from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions.
+## Set to 1 to jobban them from those positions, set to 0 to allow them.
+# GUEST_JOBBAN
+
+## Uncomment this to stop people connecting to your server without a registered ckey. (i.e. guest-* are all blocked from connecting)
+GUEST_BAN
+
+## Comment this out to disable automuting
+#AUTOMUTE_ON
+
+## Allow admin hrefs that don't use the new token system, will eventually be removed
+DEBUG_ADMIN_HREFS
diff --git a/config/entries/alert.txt b/config/entries/alert.txt
new file mode 100644
index 0000000000..5a03eadaec
--- /dev/null
+++ b/config/entries/alert.txt
@@ -0,0 +1,13 @@
+## ALERT LEVELS ###
+ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced.
+ALERT_BLUE_UPTO The station has received reliable information about potential threats to the station. Security staff may have weapons visible, random searches are permitted.
+ALERT_BLUE_DOWNTO Significant confirmed threats have been neutralized. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still permitted.
+ALERT_AMBER_UPTO There are signficant confirmed threats to the station. Security staff may have weapons unholstered at all times. Random searches are allowed and advised.
+ALERT_AMBER_DOWNTO The immediate threat has passed. Security is no longer authorized to use lethal force, but may continue to have weapons drawn. Access requirements have been restored.
+ALERT_RED_UPTO There is an immediate serious threat to the station. Security is now authorized to use lethal force. Additionally, access requirements on some machines have been lifted.
+ALERT_RED_DOWNTO The station's destruction has been averted. There is still however an immediate serious threat to the station. Security is still authorized to use lethal force.
+ALERT_DELTA Destruction of the station is imminent. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill.
+
+## Determines the minimum alert level for the security cyborg model to be chosen
+## 0: Green, 1:Blue, 2:Amber, 3:Red, 4:Delta
+MINIMUM_SECBORG_ALERT 3
diff --git a/config/entries/antag_rep.txt b/config/entries/antag_rep.txt
new file mode 100644
index 0000000000..6cd9315a0c
--- /dev/null
+++ b/config/entries/antag_rep.txt
@@ -0,0 +1,19 @@
+## disclaimer: this is a confusing file. reading and understanding antag rep code is recommended for future headmins/server leads.
+
+## Use the antagonist reputation system
+# ANTAG_REP
+
+## Maximum antag roll ticketts someone can have
+# ANTAG_REP_MAXIMUM 200
+
+## "Free" tickets someone gets on roll
+# DEFAULT_ANTAG_TICKETS 100
+
+## Maximum **STORED** tickets used ontop of default per roll
+# MAX_TICKETS_PER_ROLL 100
+
+## Custom antag reputation values
+## List of job titles followed by antag rep value, all prefixed with ANTAG_REP. See code/modules/jobs/job_types for titles
+## e.g.
+## ANTAG_REP Captain 10
+## ANTAG_REP Assistant 0
diff --git a/config/comms.txt b/config/entries/comms.txt
similarity index 78%
rename from config/comms.txt
rename to config/entries/comms.txt
index ae336d484b..7af6a758d3 100644
--- a/config/comms.txt
+++ b/config/entries/comms.txt
@@ -7,9 +7,12 @@
#CROSS_SERVER ServerName byond:\\address:port
## Name that the server calls itself in communications
-#CROSS_COMMS_NAME
+# CROSS_COMMS_NAME Citadel Main
## Network-name used for cross-server broadcasts made from communication consoles.
## Servers that do not match this network-name will have their messages discarded.
## Leaving this commented will allow all messages through, regardless of network.
#CROSS_COMMS_NETWORK default_network
+
+## CITADEL CONFIG: List of cross server URLs, same as CROSS_SERVER, to send bunker override messages for
+## Format is the same as CROSS_SERVER.
diff --git a/config/entries/connections.txt b/config/entries/connections.txt
new file mode 100644
index 0000000000..6351a77fcf
--- /dev/null
+++ b/config/entries/connections.txt
@@ -0,0 +1,93 @@
+## Deny all new connections by ckeys we haven't seen before (exempts admins and only denies the connection if the database is enabled and connected)
+## Requires database
+#PANIC_BUNKER
+
+## If a player connects during a bunker with less then or this amount of living time (Minutes), we deny the connection
+#PANIC_BUNKER_LIVING 90
+
+## The message the Panic Bunker gives when someone is rejected by it
+## %minutes% is replaced with PANIC_BUNKER_LIVING on runtime, remove it if you don't want this
+#PANIC_BUNKER_MESSAGE Sorry, but the server is currently not accepting connections from players with less than %minutes% minutes of living time.
+
+## If panic bunker is on and a player is rejected (see above), attempt to send them to this connected server (see below) instead.
+## You probably want this to be the same as CROSS_SERVER_ADDRESS
+#PANIC_SERVER_ADDRESS byond://address:port
+
+##Name of the place to send people rejected by the bunker
+#PANIC_SERVER_NAME [Put the name here]
+
+## Number of days for an individual panic bunker passthrough entry to be wiped. Note that they're also wiped as soon as a player is in the database.
+#MAX_BUNKER_DAYS 7
+
+## Notify admins when a new player connects for the first x days a player's been around. (0 for first connection only, -1 for never)
+## Requres database
+NOTIFY_NEW_PLAYER_AGE 0
+
+## Notify admins when a player connects if their byond account was created in the last X days
+## Requires database
+NOTIFY_NEW_PLAYER_ACCOUNT_AGE 1
+
+##Automated age verification, comment this out to not ask new users if they are 18+
+#AGE_VERIFICATION
+
+## Notify the irc channel when a new player makes their first connection
+## Requres database
+#IRC_FIRST_CONNECTION_ALERT
+
+## Comment this out to disable checking for the cid randomizer dll. (disabled if database isn't enabled or connected)
+CHECK_RANDOMIZER
+
+## IPINTEL:
+## This allows you to detect likely proxies by checking ips against getipintel.net
+## Rating to warn at: (0.9 is good, 1 is 100% likely to be a spammer/proxy, 0.8 is 80%, etc) anything equal to or higher then this number triggers an admin warning
+#IPINTEL_RATING_BAD 0.9
+## Contact email, (required to use the service, leaving blank or default disables IPINTEL)
+#IPINTEL_EMAIL ch@nge.me
+## How long to save good matches (ipintel rate limits to 15 per minute and 500 per day. so this shouldn't be too low, getipintel.net suggests 6 hours, time is in hours) (Your ip will get banned if you go over 500 a day too many times)
+#IPINTEL_SAVE_GOOD 12
+## How long to save bad matches (these numbers can change as ips change hands, best not to save these for too long in case somebody gets a new ip used by a spammer/proxy before.)
+#IPINTEL_SAVE_BAD 3
+## Domain name to query (leave commented out for the default, only needed if you pay getipintel.net for more querys)
+#IPINTEL_DOMAIN check.getipintel.net
+
+## Uncomment to have the changelog file automatically open when a user connects and hasn't seen the latest changelog
+#AGGRESSIVE_CHANGELOG
+
+## Uncomment to allow web client connections
+#ALLOW_WEBCLIENT
+
+## Uncomment to restrict web client connections to byond members
+## This makes for a nice pay gate to cut down on ban evading, as the webclient's cid system isn't that great
+## byond membership starts at $10 for 3 months, so to use the webclient to evade, they would have sink 10 bucks in each evade.
+#WEBCLIENT_ONLY_BYOND_MEMBERS
+
+## CLIENT VERSION CONTROL
+## This allows you to configure the minimum required client version, as well as a warning version, and message for both.
+## These trigger for any version below (non-inclusive) the given version, so 510 triggers on 509 or lower.
+## These messages will be followed by one stating the clients current version and the required version for clarity.
+## If CLIENT_WARN_POPUP is uncommented a popup window with the message will be displayed instead
+#CLIENT_WARN_VERSION 511
+#CLIENT_WARN_POPUP
+#CLIENT_WARN_MESSAGE Byond released 511 as the stable release. You can set the framerate your client runs at, which makes the game feel very different and cool. Shortly after its release we will end up using 511 client features and you will be forced to update.
+CLIENT_ERROR_VERSION 511
+CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade.
+## The minimum build needed for joining the server, if using 512, a good minimum build would be 1421 as that disables the Middle Mouse Button exploit.
+CLIENT_ERROR_BUILD 1421
+
+## Uncomment for 'soft' population caps, players will be warned while joining if the living crew exceeds the listed number.
+#SOFT_POPCAP 100
+
+## Message for soft cap
+SOFT_POPCAP_MESSAGE Be warned that the server is currently serving a high number of users, consider using alternative game servers.
+
+## Uncomment for 'hard' population caps, players will not be allowed to spawn if the living crew exceeds the listed number, though they may still observe or wait for the living crew to decrease in size.
+#HARD_POPCAP 150
+
+## Message for hard cap
+HARD_POPCAP_MESSAGE The server is currently serving a high number of users, You cannot currently join. You may wait for the number of living crew to decline, observe, or find alternative servers.
+
+## Uncomment for 'extreme' population caps, players will not be allowed to join the server if living crew exceeds the listed number.
+#EXTREME_POPCAP 200
+
+## Message for extreme cap
+EXTREME_POPCAP_MESSAGE The server is currently serving a high number of users, find alternative servers.
diff --git a/config/dbconfig.txt b/config/entries/dbconfig.txt
similarity index 93%
rename from config/dbconfig.txt
rename to config/entries/dbconfig.txt
index 3a058fe563..d5bc37bce7 100644
--- a/config/dbconfig.txt
+++ b/config/entries/dbconfig.txt
@@ -43,3 +43,6 @@ BSQL_THREAD_LIMIT 50
## Uncomment to enable verbose BSQL communication logs
#BSQL_DEBUG
+
+## Time to wait before considering a query as lingering too long
+@QUERY_DEBUG_LOG_TIMEOUT 70
diff --git a/config/entries/debris.txt b/config/entries/debris.txt
new file mode 100644
index 0000000000..345ce6610f
--- /dev/null
+++ b/config/entries/debris.txt
@@ -0,0 +1,8 @@
+## Default turf threshold to get dirt
+TURF_DIRT_THRESHOLD 100
+
+## Default alpha of dirt on spawn
+DIRT_ALPHA_STARTING 127
+
+## Multiplier for how dirty walking over a turf makes it
+TURF_DIRTY_MULTIPLIER 1
diff --git a/config/entries/donator.txt b/config/entries/donator.txt
new file mode 100644
index 0000000000..42c0461bf8
--- /dev/null
+++ b/config/entries/donator.txt
@@ -0,0 +1,11 @@
+## Citadel donator system
+## this is a bad system but I'm lazy so it piggybacks off config loader system.
+## File isn't properly documented because the donator system desperately needs a rewrite and I can't be arsed to right now.
+
+#Specify group followed by ckey for each ckey.
+
+#TIER_1_DONATORS test_ckey
+
+#TIER_2_DONATORS test_ckey
+
+#TIER_3_DONATORS test_ckey
diff --git a/config/dynamic_config.txt b/config/entries/dyanmic.txt
similarity index 98%
rename from config/dynamic_config.txt
rename to config/entries/dyanmic.txt
index 480f6d8ed8..e08fb7634d 100644
--- a/config/dynamic_config.txt
+++ b/config/entries/dyanmic.txt
@@ -307,3 +307,12 @@ DYNAMIC_ASSASSINATE_COST 2
DYNAMIC_WAROPS_REQUIREMENT 60
DYNAMIC_WAROPS_COST 10
+
+## Storyteller min players
+# STORYTELLER_MIN_PLAYERS CHAOTIC 35
+
+## Storyteller minimum chaos
+# STORYTELLER_MIN_CHAOS CHAOTIC 75
+
+## Storyteller maximum chaos
+# STORYTELLER_MAX_CHAOS CHAOTIC 250
diff --git a/config/entries/fetish_content.txt b/config/entries/fetish_content.txt
new file mode 100644
index 0000000000..6fabd095d8
--- /dev/null
+++ b/config/entries/fetish_content.txt
@@ -0,0 +1,33 @@
+## Breast cups selectable from the character creation menu. Keep em lowercase.
+BREASTS_CUPS_PREFS a
+BREASTS_CUPS_PREFS b
+BREASTS_CUPS_PREFS c
+BREASTS_CUPS_PREFS d
+BREASTS_CUPS_PREFS e
+BREASTS_CUPS_PREFS f
+BREASTS_CUPS_PREFS g
+BREASTS_CUPS_PREFS h
+
+## Minimum and maximum limits for penis length from the character creation menu.
+PENIS_MIN_INCHES_PREFS 1
+PENIS_MAX_INCHES_PREFS 24
+
+## Body size configs, the feature will be disabled if both min and max have the same value.
+BODY_SIZE_MIN 0.9
+BODY_SIZE_MAX 1.25
+
+## Allowed visibility toggles
+
+# SAFE_VISIBILITY_TOGGLES Always visible
+SAFE_VISIBILITY_TOGGLES Hidden by clothes
+SAFE_VISIBILITY_TOGGLES Hidden by underwear
+SAFE_VISIBILITY_TOGGLES Always hidden
+
+## Pun-Pun movement slowdown given to characters with a body size smaller than this value,
+## to compensate for their smaller hitbox.
+## To disable, just make sure the value is lower than 'body_size_min'
+THRESHOLD_BODY_SIZE_PENALTY 1
+
+## Multiplier used in the smaller strides slowdown calculation.
+## Doesn't apply to floating or crawling mobs.
+BODY_SIZE_SLOWDOWN_MULTIPLIER 0
diff --git a/config/entries/gamemodes.txt b/config/entries/gamemodes.txt
new file mode 100644
index 0000000000..f78c3743aa
--- /dev/null
+++ b/config/entries/gamemodes.txt
@@ -0,0 +1,178 @@
+## Comment to disable weighting modes by how chaotic recent mode rolls were.
+WEIGH_BY_RECENT_CHAOS
+
+## The weight adjustment will be proportional to this power relative to the "ideal" weight range.
+## e.g. if we have a weight range of 0-5, and an exponent of 1, 6 will be weighted 1/2, 7 1/3 etc.
+## if exponent is 2, it'll be 1/4, 1/9 etc.
+CHAOS_EXPONENT 1
+
+## Percent weight reductions for three of the most recent modes
+
+REPEATED_MODE_ADJUST 45 30 10
+
+## Probablities for game modes chosen in 'secret' and 'random' modes.
+## Default probablity is 1, increase to make that mode more likely to be picked.
+## Set to 0 to disable that mode.
+
+PROBABILITY TRAITOR 5
+PROBABILITY TRAITORBRO 2
+PROBABILITY TRAITORCHAN 4
+PROBABILITY INTERNAL_AFFAIRS 3
+PROBABILITY NUCLEAR 2
+PROBABILITY REVOLUTION 2
+PROBABILITY CULT 2
+PROBABILITY CHANGELING 2
+PROBABILITY WIZARD 4
+PROBABILITY MONKEY 0
+PROBABILITY METEOR 0
+PROBABILITY EXTENDED 0
+PROBABILITY SECRET_EXTENDED 0
+PROBABILITY DEVIL 0
+PROBABILITY DEVIL_AGENTS 0
+PROBABILITY CLOWNOPS 0
+PROBABILITY BLOODSUCKER 0
+
+## You probably want to keep sandbox off by default for secret and random.
+PROBABILITY SANDBOX 0
+
+## Toggles for continuous modes.
+## Modes that aren't continuous will end the instant all antagonists are dead.
+
+CONTINUOUS TRAITOR
+CONTINUOUS TRAITORBRO
+CONTINUOUS TRAITORCHAN
+CONTINUOUS INTERNAL_AFFAIRS
+#CONTINUOUS NUCLEAR
+#CONTINUOUS REVOLUTION
+CONTINUOUS CULT
+CONTINUOUS CLOCKWORK_CULT
+CONTINUOUS CHANGELING
+CONTINUOUS WIZARD
+#CONTINUOUS MONKEY
+CONTINUOUS BLOODSUCKER
+CONTINUOUS HERESY
+
+##Note: do not toggle continuous off for these modes, as they have no antagonists and would thus end immediately!
+
+CONTINUOUS METEOR
+CONTINUOUS EXTENDED
+CONTINUOUS SECRET_EXTENDED
+
+## Toggles for allowing midround antagonists (aka mulligan antagonists).
+## In modes that are continuous, if all antagonists should die then a new set of antagonists will be created.
+
+MIDROUND_ANTAG TRAITOR
+#MIDROUND_ANTAG TRAITORBRO
+MIDROUND_ANTAG TRAITORCHAN
+MIDROUND_ANTAG INTERNAL_AFFAIRS
+#MIDROUND_ANTAG NUCLEAR
+#MIDROUND_ANTAG REVOLUTION
+MIDROUND_ANTAG CULT
+MIDROUND_ANTAG CLOCKWORK_CULT
+MIDROUND_ANTAG CHANGELING
+MIDROUND_ANTAG WIZARD
+#MIDROUND_ANTAG MONKEY
+
+## Toggles for whether this mode should force antags even if not enough players have it enabled.
+## If it's off, it just won't roll as many antags.
+#FORCE_ANTAG_COUNT TRAITOR
+#FORCE_ANTAG_COUNT TRAITORBRO
+#FORCE_ANTAG_COUNT TRAITORCHAN
+#FORCE_ANTAG_COUNT INTERNAL_AFFAIRS
+FORCE_ANTAG_COUNT NUCLEAR
+FORCE_ANTAG_COUNT REVOLUTION
+FORCE_ANTAG_COUNT CULT
+FORCE_ANTAG_COUNT CLOCKWORK_CULT
+#FORCE_ANTAG_COUNT CHANGELING
+#FORCE_ANTAG_COUNT WIZARD
+#FORCE_ANTAG_COUNT MONKEY
+
+## A config for how much each game mode's chaos level is.
+## All of them have reasonable defaults, but this can be used to adjust them.
+## 0-9, where 0 is lowest chaos (should only be extended) and 9 is highest (wizard? nukies?)
+#CHAOS_LEVEL EXTENDED 0
+
+## Uncomment these for overrides of the minimum / maximum number of players in a round type.
+## If you set any of these occasionally check to see if you still need them as the modes
+## will still be actively rebalanced around the SUGGESTED populations, not your overrides.
+## Notes: For maximum number of players a value of -1 means no maximum. Setting minimums to
+## VERY low numbers (< 5) can lead to errors if the roundtypes were not designed for that.
+
+#MIN_POP TRAITOR 0
+#MAX_POP TRAITOR -1
+
+#MIN_POP TRAITORBRO 0
+#MAX_POP TRAITORBRO -1
+
+#MIN_POP TRAITORCHAN 15
+#MAX_POP TRAITORCHAN -1
+
+#MIN_POP DOUBLE_AGENTS 25
+#MAX_POP DOUBLE_AGENTS -1
+
+#MIN_POP NUCLEAR 0
+#MAX_POP NUCLEAR -1
+
+#MIN_POP REVOLUTION 20
+#MAX_POP REVOLUTION -1
+
+#MIN_POP CULT 24
+#MAX_POP CULT -1
+
+#MIN_POP CLOCKWORK_CULT 24
+#MAX_POP CLOCKWORK_CULT -1
+
+#MIN_POP CHANGELING 15
+#MAX_POP CHANGELING -1
+
+#MIN_POP WIZARD 20
+#MAX_POP WIZARD -1
+
+#MIN_POP MONKEY 20
+#MAX_POP MONKEY -1
+
+#MIN_POP METEOR 0
+#MAX_POP METEOR -1
+
+#MIN_POP DEVIL 0
+#MAX_POP DEVIL -1
+
+#MIN_POP DEVIL_AGENTS 25
+#MAX_POP DEVIL_AGENTS -1
+
+## Setting at least one mode to be playable at 0/1 players is required.
+#MIN_POP EXTENDED 0
+#MAX_POP EXTENDED -1
+
+## Variables calculate how number of antagonists will scale to population.
+## Used as (Antagonists = Population / Coeff)
+## Set to 0 to disable scaling and use default numbers instead.
+TRAITOR_SCALING_COEFF 6
+## per brother TEAM
+BROTHER_SCALING_COEFF 12
+CHANGELING_SCALING_COEFF 6
+## heretics
+ECULT_SCALING_COEFF 5
+## per abductor TEAM
+ABDUCTOR_SCALING_COEFF 15
+
+## Variables calculate how number of open security officer positions will scale to population.
+## Used as (Officers = Population / Coeff)
+## Set to 0 to disable scaling and use default numbers instead.
+SECURITY_SCALING_COEFF 8
+
+## The number of objectives traitors get.
+## Not including escaping/hijacking.
+TRAITOR_OBJECTIVES_AMOUNT 2
+BROTHER_OBJECTIVES_AMOUNT 2
+
+## Uncomment to prohibit jobs that start with loyalty
+## implants from being most antagonists.
+#PROTECT_ROLES_FROM_ANTAGONIST
+
+## Uncomment to prohibit assistants from becoming most antagonists.
+#PROTECT_ASSISTANT_FROM_ANTAGONIST
+
+
+## If late-joining players have a chance to become a traitor/changeling
+ALLOW_LATEJOIN_ANTAGONISTS
diff --git a/config/game_options.txt b/config/entries/general.txt
similarity index 63%
rename from config/game_options.txt
rename to config/entries/general.txt
index b9d763e5b0..3584af63c7 100644
--- a/config/game_options.txt
+++ b/config/entries/general.txt
@@ -1,3 +1,51 @@
+## Lobby time: This is the amount of time between rounds that players have to setup their characters and be ready.
+LOBBY_COUNTDOWN 120
+
+## Round End Time: This is the amount of time after the round ends that players have to murder death kill each other.
+ROUND_END_COUNTDOWN 90
+
+## period of time in seconds for players to be considered inactive
+# INACTIVITY_PERIOD 300
+
+## period of time in seconds for players to be considered afk and kickable
+# AFK_PERIOD 600
+
+## disconnect players who are considered afk
+# KICK_INACTIVE
+
+## Job slot open/close by identification consoles delay in seconds
+ID_CONSOLE_JOBSLOT_DELAY 30
+
+
+## disables calling del(src) on newmobs if they logout before spawnin in
+# DONT_DEL_NEWMOB
+
+## In-game features
+##Toggle for having jobs load up from the .txt
+# LOAD_JOBS_FROM_TXT
+
+
+## Uncomment to allow special 'Easter-egg' events on special holidays such as seasonal holidays and stuff like 'Talk Like a Pirate Day' :3 YAARRR
+ALLOW_HOLIDAYS
+
+## Uncomment to show the names of the admin sending a pm from IRC instead of showing as a stealthmin.
+#SHOW_IRC_NAME
+
+## Chat Announce Options
+## Various messages to be sent to game chats
+## Uncommenting these will enable them, by default they will be broadcast to Game chat channels on TGS3 or non-admin channels on TGS4
+## If using TGS4, the string option can be set as a chat channel tag to limit the message to channels of that tag type (case-sensitive)
+## i.e. CHAT_ANNOUNCE_NEW_GAME chat_channel_tag
+
+## Send a message with the station name starting a new game
+#CHAT_ANNOUNCE_NEW_GAME
+
+##Default screen resolution, in tiles.
+## By default, this is 15x15, which gets simplified to 7 by BYOND, as it is a 1:1 screen ratio.
+## For reference, Goonstation uses a resolution of 21x15 for it's widescreen mode.
+## Do note that changing this value will affect the title screen. The title screen will have to be updated manually if this is changed.
+DEFAULT_VIEW 21x15
+
## HEALTH ###
##Damage multiplier, effects both weapons and healing on all mobs. For example, 1.25 would result in 25% higher damage.
@@ -22,30 +70,6 @@ OOC_DURING_ROUND
## Comment this out if you want to disable emojis
EMOJIS
-## MOB MOVEMENT ###
-
-## We suggest editing these variables ingame to find a good speed for your server.
-## To do this you must be a high level admin. Open the 'debug' tab ingame.
-## Select "Debug Controller" and then, in the popup, select "Configuration". These variables should have the same name.
-
-## These values get directly added to values and totals ingame.
-## To speed things up make the number negative, to slow things down, make the number positive.
-
-## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied.
-RUN_DELAY 1
-WALK_DELAY 4
-
-## The variables below affect the movement of specific mob types. THIS AFFECTS ALL SUBTYPES OF THE TYPE YOU CHOOSE!
-## Entries completely override all subtypes. Later entries have precedence over earlier entries.
-## This means if you put /mob 0 on the last entry, it will null out all changes, while if you put /mob as the first entry and
-## /mob/living/carbon/human on the last entry, the last entry will override the first.
-MULTIPLICATIVE_MOVESPEED /mob/living/carbon/human 1
-##MULTIPLICATIVE_MOVESPEED /mob/living/silicon/robot 0
-##MULTIPLICATIVE_MOVESPEED /mob/living/carbon/monkey 0
-##MULTIPLICATIVE_MOVESPEED /mob/living/carbon/alien 0
-##MULTIPLICATIVE_MOVESPEED /mob/living/simple_animal/slime 0
-MULTIPLICATIVE_MOVESPEED /mob/living/simple_animal 1
-
## NAMES ###
## If uncommented this adds a random surname to a player's name if they only specify one name.
@@ -54,205 +78,18 @@ MULTIPLICATIVE_MOVESPEED /mob/living/simple_animal 1
## If uncommented, this forces all players to use random names !and appearances!.
#FORCE_RANDOM_NAMES
-
-## ALERT LEVELS ###
-ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced.
-ALERT_BLUE_UPTO The station has received reliable information about potential threats to the station. Security staff may have weapons visible, random searches are permitted.
-ALERT_BLUE_DOWNTO Significant confirmed threats have been neutralized. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still permitted.
-ALERT_AMBER_UPTO There are signficant confirmed threats to the station. Security staff may have weapons unholstered at all times. Random searches are allowed and advised.
-ALERT_AMBER_DOWNTO The immediate threat has passed. Security is no longer authorized to use lethal force, but may continue to have weapons drawn. Access requirements have been restored.
-ALERT_RED_UPTO There is an immediate serious threat to the station. Security is now authorized to use lethal force. Additionally, access requirements on some machines have been lifted.
-ALERT_RED_DOWNTO The station's destruction has been averted. There is still however an immediate serious threat to the station. Security is still authorized to use lethal force.
-ALERT_DELTA Destruction of the station is imminent. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill.
-
-
-
## GAME MODES ###
## Uncomment to not send a roundstart intercept report. Gamemodes may override this.
#NO_INTERCEPT_REPORT
-## Comment to disable weighting modes by how chaotic recent mode rolls were.
-WEIGH_BY_RECENT_CHAOS
-
-## The weight adjustment will be proportional to this power relative to the "ideal" weight range.
-## e.g. if we have a weight range of 0-5, and an exponent of 1, 6 will be weighted 1/2, 7 1/3 etc.
-## if exponent is 2, it'll be 1/4, 1/9 etc.
-CHAOS_EXPONENT 1
-
-## Probablities for game modes chosen in 'secret' and 'random' modes.
-## Default probablity is 1, increase to make that mode more likely to be picked.
-## Set to 0 to disable that mode.
-
-PROBABILITY TRAITOR 5
-PROBABILITY TRAITORBRO 2
-PROBABILITY TRAITORCHAN 4
-PROBABILITY INTERNAL_AFFAIRS 3
-PROBABILITY NUCLEAR 2
-PROBABILITY REVOLUTION 2
-PROBABILITY CULT 2
-PROBABILITY CHANGELING 2
-PROBABILITY WIZARD 4
-PROBABILITY MONKEY 0
-PROBABILITY METEOR 0
-PROBABILITY EXTENDED 0
-PROBABILITY SECRET_EXTENDED 0
-PROBABILITY DEVIL 0
-PROBABILITY DEVIL_AGENTS 0
-PROBABILITY CLOWNOPS 0
-PROBABILITY BLOODSUCKER 0
-
-## You probably want to keep sandbox off by default for secret and random.
-PROBABILITY SANDBOX 0
-
-## Percent weight reductions for three of the most recent modes
-
-REPEATED_MODE_ADJUST 45 30 10
-
-## Toggles for continuous modes.
-## Modes that aren't continuous will end the instant all antagonists are dead.
-
-CONTINUOUS TRAITOR
-CONTINUOUS TRAITORBRO
-CONTINUOUS TRAITORCHAN
-CONTINUOUS INTERNAL_AFFAIRS
-#CONTINUOUS NUCLEAR
-#CONTINUOUS REVOLUTION
-CONTINUOUS CULT
-CONTINUOUS CLOCKWORK_CULT
-CONTINUOUS CHANGELING
-CONTINUOUS WIZARD
-#CONTINUOUS MONKEY
-CONTINUOUS BLOODSUCKER
-CONTINUOUS HERESY
-
-##Note: do not toggle continuous off for these modes, as they have no antagonists and would thus end immediately!
-
-CONTINUOUS METEOR
-CONTINUOUS EXTENDED
-CONTINUOUS SECRET_EXTENDED
-
-
-## Toggles for allowing midround antagonists (aka mulligan antagonists).
-## In modes that are continuous, if all antagonists should die then a new set of antagonists will be created.
-
-MIDROUND_ANTAG TRAITOR
-#MIDROUND_ANTAG TRAITORBRO
-MIDROUND_ANTAG TRAITORCHAN
-MIDROUND_ANTAG INTERNAL_AFFAIRS
-#MIDROUND_ANTAG NUCLEAR
-#MIDROUND_ANTAG REVOLUTION
-MIDROUND_ANTAG CULT
-MIDROUND_ANTAG CLOCKWORK_CULT
-MIDROUND_ANTAG CHANGELING
-MIDROUND_ANTAG WIZARD
-#MIDROUND_ANTAG MONKEY
-
-## Toggles for whether this mode should force antags even if not enough players have it enabled.
-## If it's off, it just won't roll as many antags.
-#FORCE_ANTAG_COUNT TRAITOR
-#FORCE_ANTAG_COUNT TRAITORBRO
-#FORCE_ANTAG_COUNT TRAITORCHAN
-#FORCE_ANTAG_COUNT INTERNAL_AFFAIRS
-FORCE_ANTAG_COUNT NUCLEAR
-FORCE_ANTAG_COUNT REVOLUTION
-FORCE_ANTAG_COUNT CULT
-FORCE_ANTAG_COUNT CLOCKWORK_CULT
-#FORCE_ANTAG_COUNT CHANGELING
-#FORCE_ANTAG_COUNT WIZARD
-#FORCE_ANTAG_COUNT MONKEY
-
-## A config for how much each game mode's chaos level is.
-## All of them have reasonable defaults, but this can be used to adjust them.
-## 0-9, where 0 is lowest chaos (should only be extended) and 9 is highest (wizard? nukies?)
-#CHAOS_LEVEL EXTENDED 0
-
-## Uncomment these for overrides of the minimum / maximum number of players in a round type.
-## If you set any of these occasionally check to see if you still need them as the modes
-## will still be actively rebalanced around the SUGGESTED populations, not your overrides.
-## Notes: For maximum number of players a value of -1 means no maximum. Setting minimums to
-## VERY low numbers (< 5) can lead to errors if the roundtypes were not designed for that.
-
-#MIN_POP TRAITOR 0
-#MAX_POP TRAITOR -1
-
-#MIN_POP TRAITORBRO 0
-#MAX_POP TRAITORBRO -1
-
-#MIN_POP TRAITORCHAN 15
-#MAX_POP TRAITORCHAN -1
-
-#MIN_POP DOUBLE_AGENTS 25
-#MAX_POP DOUBLE_AGENTS -1
-
-#MIN_POP NUCLEAR 0
-#MAX_POP NUCLEAR -1
-
-#MIN_POP REVOLUTION 20
-#MAX_POP REVOLUTION -1
-
-#MIN_POP CULT 24
-#MAX_POP CULT -1
-
-#MIN_POP CLOCKWORK_CULT 24
-#MAX_POP CLOCKWORK_CULT -1
-
-#MIN_POP CHANGELING 15
-#MAX_POP CHANGELING -1
-
-#MIN_POP WIZARD 20
-#MAX_POP WIZARD -1
-
-#MIN_POP MONKEY 20
-#MAX_POP MONKEY -1
-
-#MIN_POP METEOR 0
-#MAX_POP METEOR -1
-
-#MIN_POP DEVIL 0
-#MAX_POP DEVIL -1
-
-#MIN_POP DEVIL_AGENTS 25
-#MAX_POP DEVIL_AGENTS -1
-
-## Setting at least one mode to be playable at 0/1 players is required.
-#MIN_POP EXTENDED 0
-#MAX_POP EXTENDED -1
-
+## If non-human species are barred from joining as a head of staff
+#ENFORCE_HUMAN_AUTHORITY
## The amount of time it takes for the emergency shuttle to be called, from round start.
SHUTTLE_REFUEL_DELAY 12000
-## Variables calculate how number of antagonists will scale to population.
-## Used as (Antagonists = Population / Coeff)
-## Set to 0 to disable scaling and use default numbers instead.
-TRAITOR_SCALING_COEFF 6
-BROTHER_SCALING_COEFF 6
-CHANGELING_SCALING_COEFF 6
-
-## Variables calculate how number of open security officer positions will scale to population.
-## Used as (Officers = Population / Coeff)
-## Set to 0 to disable scaling and use default numbers instead.
-SECURITY_SCALING_COEFF 8
-
-## The number of objectives traitors get.
-## Not including escaping/hijacking.
-TRAITOR_OBJECTIVES_AMOUNT 2
-BROTHER_OBJECTIVES_AMOUNT 2
-
-## Uncomment to prohibit jobs that start with loyalty
-## implants from being most antagonists.
-#PROTECT_ROLES_FROM_ANTAGONIST
-
-## Uncomment to prohibit assistants from becoming most antagonists.
-#PROTECT_ASSISTANT_FROM_ANTAGONIST
-
-## If non-human species are barred from joining as a head of staff
-#ENFORCE_HUMAN_AUTHORITY
-
-## If late-joining players have a chance to become a traitor/changeling
-ALLOW_LATEJOIN_ANTAGONISTS
## Comment this out to disable the antagonist reputation system. This system rewards players who participate in the game instead of greytiding by giving them slightly higher odds to
## roll antagonist in subsequent rounds until they get it.
@@ -303,9 +140,6 @@ ALLOW_AI_MULTICAM
## Uncomment to prevent the security cyborg module from being chosen
#DISABLE_SECBORG
-## Determines the minimum alert level for the security cyborg model to be chosen
-## 0: Green, 1:Blue, 2:Amber, 3:Red, 4:Delta
-MINIMUM_SECBORG_ALERT 3
## Peacekeeper Borg ###
## Uncomment to prevent the peacekeeper cyborg module from being chosen
@@ -643,39 +477,10 @@ BOX_RANDOM_ENGINE Box Empty,0
BOX_RANDOM_ENGINE Box Antimatter,1
BOX_RANDOM_ENGINE Box P.A.C.M.A.N,1
-## Whether or not there's a mode tier list vote after the secret/extended vote.
-MODETIER_VOTING
-
-## Number of modes dropped by the modetier vote during mode selection, after vote.
-DROPPED_MODES 3
## Whether the suicide verb is allowed.
# SUICIDE_ALLOWED
-## Breast cups selectable from the character creation menu. Keep em lowercase.
-BREASTS_CUPS_PREFS a
-BREASTS_CUPS_PREFS b
-BREASTS_CUPS_PREFS c
-BREASTS_CUPS_PREFS d
-BREASTS_CUPS_PREFS e
-
-## Minimum and maximum limits for penis length from the character creation menu.
-PENIS_MIN_INCHES_PREFS 1
-PENIS_MAX_INCHES_PREFS 20
-
-## Body size configs, the feature will be disabled if both min and max have the same value.
-BODY_SIZE_MIN 0.9
-BODY_SIZE_MAX 1.25
-
-## Pun-Pun movement slowdown given to characters with a body size smaller than this value,
-## to compensate for their smaller hitbox.
-## To disable, just make sure the value is lower than 'body_size_min'
-THRESHOLD_BODY_SIZE_PENALTY 1
-
-## Multiplier used in the smaller strides slowdown calculation.
-## Doesn't apply to floating or crawling mobs.
-BODY_SIZE_SLOWDOWN_MULTIPLIER 0
-
## Allows players to set a hexadecimal color of their choice as skin tone, on top of the standard ones.
ALLOW_CUSTOM_SKINTONES
@@ -683,11 +488,6 @@ ALLOW_CUSTOM_SKINTONES
## Camera mobs, AIs, ghosts and some other are of course exempt from this. This also doesn't influence simplemob AI, for the best.
#USE_FIELD_OF_VISION
-## Default turf threshold to get dirt
-TURF_DIRT_THRESHOLD 100
-
-## Default alpha of dirt on spawn
-DIRT_ALPHA_STARTING 127
## Allows pAI custom holoforms
PAI_CUSTOM_HOLOFORMS
diff --git a/config/entries/jexp.txt b/config/entries/jexp.txt
new file mode 100644
index 0000000000..e46d743a66
--- /dev/null
+++ b/config/entries/jexp.txt
@@ -0,0 +1,23 @@
+## Uncomment this entry to have certain jobs require your account to be at least a certain number of days old to select. You can configure the exact age requirement for different jobs by editing
+## the minimal_player_age variable in the files in folder /code/game/jobs/job/.. for the job you want to edit. Set minimal_player_age to 0 to disable age requirement for that job.
+## REQUIRES the database set up to work. Keep it hashed if you don't have a database set up.
+## NOTE: If you have just set-up the database keep this DISABLED, as player age is determined from the first time they connect to the server with the database up. If you just set it up, it means
+## you have noone older than 0 days, since noone has been logged yet. Only turn this on once you have had the database up for 30 days.
+#USE_AGE_RESTRICTION_FOR_JOBS
+
+## Uncomment this to have the job system use the player's account creation date, rather than the when they first joined the server for job timers.
+#USE_ACCOUNT_AGE_FOR_JOBS
+
+## Unhash this to track player playtime in the database. Requires database to be enabled.
+#USE_EXP_TRACKING
+## Unhash this to enable playtime requirements for head jobs.
+#USE_EXP_RESTRICTIONS_HEADS
+## Unhash this to override head jobs' playtime requirements with this number of hours.
+## Leave this commented out to use the values defined in the job datums. Values in the datums are stored as minutes.
+#USE_EXP_RESTRICTIONS_HEADS_HOURS 3
+## Unhash this to change head jobs' playtime requirements so that they're based on department playtime, rather than crew playtime.
+#USE_EXP_RESTRICTIONS_HEADS_DEPARTMENT
+## Unhash this to enable playtime requirements for certain non-head jobs, like Engineer and Scientist.
+#USE_EXP_RESTRICTIONS_OTHER
+## Allows admins to bypass job playtime requirements.
+#USE_EXP_RESTRICTIONS_ADMIN_BYPASS
diff --git a/config/entries/logging.txt b/config/entries/logging.txt
new file mode 100644
index 0000000000..1690dbfacf
--- /dev/null
+++ b/config/entries/logging.txt
@@ -0,0 +1,85 @@
+## log OOC channel
+LOG_OOC
+
+## log client Say
+LOG_SAY
+
+## log admin actions
+@LOG_ADMIN
+
+## log admin chat
+@LOG_ADMINCHAT
+
+## log client access (logon/logoff)
+LOG_ACCESS
+
+## log game actions (start of round, results, etc.)
+LOG_GAME
+
+## log player votes
+LOG_VOTE
+
+## log player crafting
+LOG_CRAFT
+
+## log client Whisper
+LOG_WHISPER
+
+## log emotes
+LOG_EMOTE
+
+## log attack messages
+LOG_ATTACK
+
+## log pda messages
+LOG_PDA
+
+## log telecomms messages
+LOG_TELECOMMS
+
+## log prayers
+LOG_PRAYER
+
+## log lawchanges
+LOG_LAW
+
+## log crew manifest to seperate file
+LOG_MANIFEST
+
+## log job divide debugging information
+LOG_JOB_DEBUG
+
+## Log shuttle related actions
+LOG_SHUTTLE
+
+## log all world.Topic() calls
+LOG_WORLD_TOPIC
+
+## enables use of the proc twitterize() that lets you take a large list of strings and turn it into a JSON file of tweet sized strings.
+## As an example of how this could be """useful""" look towards Poly (https://twitter.com/Poly_the_Parrot)
+# LOG_TWITTER
+
+## Enable logging pictures
+LOG_PICTURES
+
+## Log camera pictures
+PICTURE_LOGGING_CAMERA
+
+## log virus and actions
+LOG_VIRUS
+
+## Log all raw hrefs of tgui, rather than letting tgui logging handle it. KEEP THIS OFF UNLESS YOU KNOW WHAT YOU ARE DOING.
+# EMERGENCY_TGUI_LOGGING
+
+## Cooldown time for each occurance of a unique runtime in deciseconds
+ERROR_COOLDOWN 600
+
+## Max runtimes of one type before silencing
+ERROR_LIMIT 50
+
+## How long an unique runtime will be silenced for when reaching limit in deciseconds
+ERROR_SILENCE_TIME 6000
+
+How long to wait between messaging admins about an unique runtime
+ERROR_MSG_DELAY 50
+
diff --git a/config/entries/movespeed.txt b/config/entries/movespeed.txt
new file mode 100644
index 0000000000..67f9ab503b
--- /dev/null
+++ b/config/entries/movespeed.txt
@@ -0,0 +1,56 @@
+## MOB MOVEMENT ###
+
+## We suggest editing these variables ingame to find a good speed for your server.
+## To do this you must be a high level admin. Open the 'debug' tab ingame.
+## Select "Debug Controller" and then, in the popup, select "Configuration". These variables should have the same name.
+
+## These values get directly added to values and totals ingame.
+## To speed things up make the number negative, to slow things down, make the number positive.
+
+## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied.
+RUN_DELAY 1.5
+WALK_DELAY 4
+
+## The variables below affect the movement of specific mob types. THIS AFFECTS ALL SUBTYPES OF THE TYPE YOU CHOOSE!
+## Entries completely override all subtypes. Later entries have precedence over earlier entries.
+## This means if you put /mob 0 on the last entry, it will null out all changes, while if you put /mob as the first entry and
+## /mob/living/carbon/human on the last entry, the last entry will override the first.
+MULTIPLICATIVE_MOVESPEED /mob/living/carbon/alien -1
+MULTIPLICATIVE_MOVESPEED /mob/living/carbon/alien/humanoid/sentinel -0.75
+MULTIPLICATIVE_MOVESPEED /mob/living/carbon/alien/humanoid/drone -0.5
+MULTIPLICATIVE_MOVESPEED /mob/living/carbon/alien/humanoid/royal/praetorian 0
+MULTIPLICATIVE_MOVESPEED /mob/living/carbon/alien/humanoid/royal/queen 2
+
+## The above, only when a mob is FLOATING
+MULTIPLICATIVE_MOVESPEED_FLOATING /mob/living/carbon -0.5
+MULTIPLICATIVE_MOVESPEED_FLOATING /mob/living 0
+
+## Whether or not sprint is enabled
+SPRINT_ENABLED 0
+
+## When sprint is off, how much does getting staggered slow you
+SPRINTLESS_STAGGER_SLOWDOWN 0.5
+
+## When sprint is off, how much does getting shoved off balance slow you
+SPRINTLESS_OFF_BALANCE_SLOWDOWN 0.85
+
+## Melee stagger power multiplier
+MELEE_STAGGER_FACTOR 1
+
+## Sprint speed increase
+SPRINT_SPEED_INCREASE 1
+
+## Max tiles/second increase from sprint
+SPRINT_MAX_TILES_INCREASE 5
+
+## Absolute max speed sprint can make someone go (tiles/second)
+SPRINT_ABSOLUTE_MAX_TILES 13
+
+## Max sprint buffer
+SPRINT_BUFFER_MAX 24
+
+## Stamina/tile when bufer empty
+SPRINT_STAMINA_COST 1.4
+
+## Buffer regen/decisecond - 0.4 = 4/second
+SPRINT_BUFFER_REGEN_PER_DS 0.4
diff --git a/config/persistence.txt b/config/entries/persistence.txt
similarity index 100%
rename from config/persistence.txt
rename to config/entries/persistence.txt
diff --git a/config/entries/policy.txt b/config/entries/policy.txt
new file mode 100644
index 0000000000..07f64b5b2a
--- /dev/null
+++ b/config/entries/policy.txt
@@ -0,0 +1,24 @@
+## Policy configuration
+## Current valid keys are:
+## ON_CLONE - displayed after a successful cloning operation to the cloned person
+## ON_DEFIB_INTACT - displayed after defibbing before memory loss time threshold
+## ON_DEFIB_LATE - displayed after defibbing post memory loss time threshold
+## SDGF - displayed on SDGF clone spawning
+## SDGF_GOOD - displayed on SDGF clone spawning, if the clone is loyal
+## SDGF_BAD - displayed on SDGF clone spawning, if the clone is not loyal
+## PAI - displayed on PAI personality being loaded
+## EXAMPLE:
+## POLICY ON_CLONE insert text here span classes are fully supported
+
+POLICY ON_CLONE Your thoughts are hazy as the cloning algorithms reboot your consciousness. Unfortunately for you, the imperfect nature of the process has left out your more recent, less entrenched memories. You only remember vague details of your death, without clear recollection of who or what is specifically responsible for your demise. (If you were murdered, you do not remember the exact name or appearance of your killer, only vague details of how they killed you rather than the exact murder weapon. (ex: drank something and blanked out, felt an impact in the back and bled out) If you died to environmental hazards like ash storms or spacing, this is not as applicable -- however, keep in mind that if someone set you up to die to that, like being tossed forcefully into space, that the previous clause of not remembering killer name in a murder applies!
+
+POLICY ON_DEFIB_LATE Your mind barely responds as first as you are forcefully returned to the world of the living after all too long in a state of decay. While medicine may restore your brain functions, you can't seem to remember your latest memories... You only remember vague details of your death, without clear recollection of who or what is specifically responsible for your demise. (If you were murdered, you do not remember the exact name or appearance of your killer, only vague details of how they killed you rather than the exact murder weapon. (ex: drank something and blanked out, felt an impact in the back and bled out) If you died to environmental hazards like ash storms or spacing, this is not as applicable -- however, keep in mind that if someone set you up to die to that, like being tossed forcefully into space, that the previous clause of not remembering killer name in a murder applies!
+
+POLICY ON_DEFIB_INTACT You barely miss a beat as you gasp, awakening from the slumber of the deceased. The rapid resuscitation has saved you from the worst effects of brain damage. You recall all information leading up to your death and exact details on method of death and killer if applicable, as long as you were conscious to witness such.
+
+POLICY PAI If you are given an ERP-related directive without OOC consent, ahelp immediately.w
+
+## Misc entries for above
+
+## Defib time limit for "cloning memory disorder" memory loss in seconds
+DEFIB_CMD_TIME_LIMIT 300
diff --git a/config/resources.txt b/config/entries/resources.txt
similarity index 100%
rename from config/resources.txt
rename to config/entries/resources.txt
diff --git a/config/respawns.txt b/config/entries/respawns.txt
similarity index 90%
rename from config/respawns.txt
rename to config/entries/respawns.txt
index 804a856a93..41c76eaabc 100644
--- a/config/respawns.txt
+++ b/config/entries/respawns.txt
@@ -2,7 +2,7 @@
RESPAWNS_ENABLED
## Minutes delay before allowing respawns, either from death or observing. Not an integer.
-RESPAWN_DELAY 15.0
+RESPAWN_DELAY 10.0
## Minutes delay before allowing respawns, if the user cryo'd. Not an integer.
RESPAWN_DELAY_CRYO 5.0
@@ -16,8 +16,8 @@ ALLOW_NON_ASSISTANT_RESPAWN
## Allow respawning as the same character
# ALLOW_SAME_CHARACTER_RESPAWN
-## Observing is considered a respawn for the purposes of role lockouts. Defaults to disabled. When disabled, only RESPAWNING rather than returning from observe locks you out.
-# RESPAWN_PENALTY_INCLUDES_OBSERVE
+## Observing is considered a respawn for the purposes of role lockouts. Defaults to disabled. When disabled, only RESPAWNING rather than returning from observer locks you out.
+RESPAWN_PENALTY_INCLUDES_OBSERVE
## Time in minutes from round start before respawn is enabled
RESPAWN_MINIMUM_DELAY_ROUNDSTART 30.0
diff --git a/config/entries/security.txt b/config/entries/security.txt
new file mode 100644
index 0000000000..e6a13d5cdf
--- /dev/null
+++ b/config/entries/security.txt
@@ -0,0 +1,38 @@
+### FAIL2TOPIC:
+### Automated IP bans for world/Topic() spammers
+### NOTE FOR WINDOWS HOSTS: This requires you to be running dreamdaemon as an administrator for it to work at all. TGS3 handles this automatically, and honestly there's no reason not to be using TGS3 if you're hosting on Windows.
+### NOTE FOR LINUX HOSTS: This requires manual setup of iptables. Beware that improper configuration of this can and will irreversibly fuck up a server, so please don't tinker with it if you don't know what you're doing.
+## Enabled
+#FAIL2TOPIC_ENABLED
+## Minimum wait time in deciseconds between valid requests
+FAIL2TOPIC_RATE_LIMIT 10
+## Number of requests after breaching rate limit that triggers a ban
+FAIL2TOPIC_MAX_FAILS 5
+## Firewall rule name used on physical server
+## FOR LINUX HOSTS: This is used as the chain name. The iptables chain doesn't get created or hooked up to INPUT automatically, so you'll have to get that set up yourself. Recommended name: BYOND
+@FAIL2TOPIC_RULE_NAME _dd_fail2topic
+
+## Topic max size before it's rejected, using BYOND length()
+TOPIC_MAX_SIZE 8192
+
+## Fail2topic rate limit whitelist. Using any external IPs is not recommended.
+# TOPIC_RATE_LIMIT_WHITELIST 127.0.0.1:1337
+
+## TOPIC RATE LIMITING
+## This allows you to limit how many topic calls (clicking on an interface window) the client can do in any given game second and/or game minute.
+## Admins are exempt from these limits.
+## Hitting the minute limit notifies admins.
+## Set to 0 or comment out to disable.
+SECOND_TOPIC_LIMIT 10
+
+MINUTE_TOPIC_LIMIT 100
+
+## CLICK RATE LIMITING
+## Same as above, but applies to clicking on objects in the game window.
+## This should be a higher then the interface limit to allow for the spam clickly nature of most battles.
+## Admins are exempt from these limits.
+## Hitting the minute limit notifies admins.
+## Set to 0 to disable.
+SECOND_CLICK_LIMIT 15
+
+MINUTE_CLICK_LIMIT 400
diff --git a/config/entries/server.txt b/config/entries/server.txt
new file mode 100644
index 0000000000..0ffd5b21a3
--- /dev/null
+++ b/config/entries/server.txt
@@ -0,0 +1,68 @@
+## Enable automatic profiling - Byond 513.1506 and newer only.
+#AUTO_PROFILE
+
+## Server name: This appears at the top of the screen in-game and in the BYOND hub. Uncomment and replace 'tgstation' with the name of your choice.
+# SERVERNAME tgstation
+
+## Server tagline: This will appear right below the server's title.
+# SERVERTAGLINE A generic TG-based server
+
+## Server SQL name: This is the name used to identify the server to the SQL DB, distinct from SERVERNAME as it must be at most 32 characters.
+# SERVERSQLNAME tgstation
+
+## Station name: The name of the station as it is referred to in-game. If commented out, the game will generate a random name instead.
+STATIONNAME Space Station 13
+
+## Put on byond hub: Uncomment this to put your server on the byond hub.
+#HUB
+
+## Defines the ticklimit for subsystem initialization (In percents of a byond tick). Lower makes world start smoother. Higher makes it faster.
+##This is currently a testing optimized setting. A good value for production would be 98.
+TICK_LIMIT_MC_INIT 500
+
+##Defines the ticklag for the world. Ticklag is the amount of time between game ticks (aka byond ticks) (in 1/10ths of a second).
+## This also controls the client network update rate, as well as the default client fps
+TICKLAG 0.5
+
+##Can also be set as per-second value, the following value is identical to the above.
+#FPS 20
+
+## Set to prevent anyone but those ckeys listed in config/whitelist.txt and config/admins.txt from joining your server
+#USEWHITELIST
+
+## set a hosted by name for unix platforms
+HOSTEDBY Yournamehere
+
+## System command that invokes youtube-dl, used by Play Internet Sound.
+## You can install youtube-dl with
+## "pip install youtube-dl" if you have pip installed
+## from https://github.com/rg3/youtube-dl/releases
+## or your package manager
+## The default value assumes youtube-dl is in your system PATH
+# INVOKE_YOUTUBEDL youtube-dl
+
+###Master Controller High Pop Mode###
+
+##The Master Controller(MC) is the primary system controlling timed tasks and events in SS13 (lobby timer, game checks, lighting updates, atmos, etc)
+##Default base MC tick rate (1 = process every "byond tick" (see: tick_lag/fps config settings), 2 = process every 2 byond ticks, etc)
+## Setting this to 0 will prevent the Master Controller from ticking
+BASE_MC_TICK_RATE 1
+
+##High population MC tick rate
+## Byond rounds timer values UP, but the tick rate is modified with heuristics during lag spites so setting this to something like 2
+## will make it run every 2 byond ticks, but will also double the effect of anti-lag heuristics. You can instead set it to something like
+## 1.1 to make it run every 2 byond ticks, but only increase the effect of anti-lag heuristics by 10%. or 1.5 for 50%.
+## (As an aside, you could in theory also reduce the effect of anti-lag heuristics in the base tick rate by setting it to something like 0.5)
+HIGH_POP_MC_TICK_RATE 1.1
+
+##Engage high pop mode if player count raises above this (Player in this context means any connected user. Lobby, ghost or in-game all count)
+HIGH_POP_MC_MODE_AMOUNT 65
+
+##Disengage high pop mode if player count drops below this
+DISABLE_HIGH_POP_MC_MODE_AMOUNT 60
+
+## Uncomment to prevent the world from sleeping while no players are connected after initializations
+#RESUME_AFTER_INITIALIZATIONS
+
+## Uncomment to set the number of /world/Reboot()s before the DreamDaemon restarts itself. 0 means restart every round. Requires tgstation server tools.
+#ROUNDS_UNTIL_HARD_RESTART 10
diff --git a/config/entries/stamina_combat.txt b/config/entries/stamina_combat.txt
new file mode 100644
index 0000000000..5339502586
--- /dev/null
+++ b/config/entries/stamina_combat.txt
@@ -0,0 +1,28 @@
+## haha these keys are going to collide with other stuff for sure someday
+
+## OUT_OF_COMBAT_TIMER, PERCENT_REGENERATION_OUT_OF_COMBAT disabled - combat mode has been yanked from the codebase and made a UI toggle.
+
+## Maximum stamina buffer
+BUFFER_MAX 25
+
+## Seconds until out of combat regen kicks in
+# OUT_OF_COMBAT_TIMER 15
+
+## Base regen per second
+BASE_REGENERATION 3.5
+
+## Regenerate this % of total buffer when out of combat
+# PERCENT_REGENERATION_OUT_OF_COMBAT
+
+## Seconds after an action for which regeneration is penalized
+POST_ACTION_PENALTY_DELAY 5
+
+## Factor to multiply by for penalizing post action regen
+POST_ACTION_PENALTY_FACTOR 0.25
+
+## Factor to multiply by for stamina usage past buffer into health
+OVERDRAW_PENALTY_FACTOR 1.5
+
+## Completely disable stamina combat by giving people infinite buffers.
+## Has serious balance implications.
+# DISABLE_STAMBUFFER
diff --git a/config/job_threats.txt b/config/entries/threat.txt
similarity index 91%
rename from config/job_threats.txt
rename to config/entries/threat.txt
index e57edb66e4..fa7c5cffa5 100644
--- a/config/job_threats.txt
+++ b/config/entries/threat.txt
@@ -6,4 +6,4 @@
## Custom antag threat values, see above
## e.g.
-## ANTAG_THREAT Traitor 5
\ No newline at end of file
+## ANTAG_THREAT Traitor 5
diff --git a/config/entries/urls.txt b/config/entries/urls.txt
new file mode 100644
index 0000000000..f307245055
--- /dev/null
+++ b/config/entries/urls.txt
@@ -0,0 +1,37 @@
+## set a server location for world reboot. Don't include the byond://, just give the address and port.
+## Don't set this to the same server, BYOND will automatically restart players to the server when it has restarted.
+# SERVER ss13.example.com:2506
+
+## forum address
+# FORUMURL https://citadel-station.net/forum/
+
+## Wiki address
+# WIKIURL https://citadel-station.net/wikimain/index.php
+
+## Wiki address of upstream
+WIKIURLTG http://www.tgstation13.org/wiki
+
+## Rules address
+# RULESURL https://citadel-station.net/wikimain/index.php?title=Rules_-_Main
+
+## Github address
+# GITHUBURL https://github.com/Citadel-Station-13/Citadel-Station-13
+
+## Round specific stats address
+## Link to round specific parsed logs; IE statbus. It is appended with the RoundID automatically by ticker/Reboot()
+## This will take priority over the game logs address during reboot.
+## Example: https://atlantaned.space/statbus/round.php?round=
+# ROUNDSTATSURL http://citadel-station.net/slimbus/
+
+## Game Logs address
+## Incase you don't have a fancy parsing system, but still want players to be able to find where you keep your server's logs.
+## Example: https://tgstation13.org/parsed-logs/basil/data/logs/
+# GAMELOGURL
+
+## Github repo id
+##This can be found by going to https://api.github.com/users//repos
+##Or https://api.github.com/orgs//repos if the repo owner is an organization
+# GITHUBREPOID 62485194
+
+## Ban appeals URL - usually for a forum or wherever people should go to contact your admins.
+# BANAPPEALS https://citadel-station.net/forum/viewforum.php?f=8&sid=a0ce5331d5594ef6d49661609c6f4ff9
diff --git a/config/entries/vote.txt b/config/entries/vote.txt
new file mode 100644
index 0000000000..14c7c36a4e
--- /dev/null
+++ b/config/entries/vote.txt
@@ -0,0 +1,67 @@
+## allow players to initiate a restart vote
+#ALLOW_VOTE_RESTART
+
+## allow players to initate a mode-change start
+#ALLOW_VOTE_MODE
+
+## min delay (deciseconds) between voting sessions (default 10 minutes)
+VOTE_DELAY 6000
+
+## time period (deciseconds) which voting session will last (default 1 minute)
+VOTE_PERIOD 600
+
+## autovote initial delay (deciseconds) before first automatic transfer vote call (default 120 minutes)
+## Set to 0 to disable the subsystem altogether.
+VOTE_AUTOTRANSFER_INITIAL 72000
+
+## autovote delay (deciseconds) before sequential automatic transfer votes are called (default 30 minutes)
+VOTE_AUTOTRANSFER_INTERVAL 18000
+
+## autovote maximum votes until automatic transfer call. (default 4)
+## Set to 0 to force automatic crew transfer after the 'vote_autotransfer_initial' elapsed.
+## Set to -1 to disable the maximum votes cap.
+VOTE_AUTOTRANSFER_MAXIMUM 4
+
+## prevents dead players from voting or starting votes
+# NO_DEAD_VOTE
+
+## players' votes default to "No vote" (otherwise, default to "No change")
+# DEFAULT_NO_VOTE
+
+## Map rotation
+## You should edit maps.txt to match your configuration when you enable this.
+MAPROTATION
+
+## TG-style map rotation
+## By default, Citadel uses a more traditional method of map voting, where at the end of a round, players are given a full upfront vote.
+## This PR will disable that, and will make the server use TG's map rotation instead.
+#TGSTYLE_MAPROTATION
+
+## Map voting
+## Allows players to vote for their preffered map
+## When it's set to zero, the map will be randomly picked each round
+ALLOW_MAP_VOTING 1
+
+## Map voting type
+## Determines what kind of vote the map vote is
+## Options are:
+## PLURALITY (default, only vote for one option)
+## APPROVAL (can vote for as many as you want), I
+## IRV (vote by ranked choice, winner determined by instant runoff algorithm)
+## SCORE (give individual rankings of each choice, winner determined by majority judgement algorithm)
+MAP_VOTE_TYPE APPROVAL
+
+## Map rotate chance delta
+## This is the chance of map rotation factored to the round length.
+## A value of 1 would mean the map rotation chance is the round length in minutes (hour long round == 60% rotation chance)
+## A value of 0.5 would mean the map rotation chance is half of the round length in minutes (hour long round == 30% rotation chance)
+#MAPROTATIONCHANCEDELTA 0.75
+
+## Whether or not there's a mode tier list vote after the secret/extended vote.
+MODETIER_VOTING
+
+## Number of modes dropped by the modetier vote during mode selection, after vote.
+DROPPED_MODES 3
+
+## Whether or not you must be readied up to vote gamemode
+#MUST_BE_READIED_TO_VOTE_GAMEMODE
diff --git a/config/external_rsc_urls.txt b/config/external_rsc_urls.txt
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/config/policy.txt b/config/policy.txt
deleted file mode 100644
index 502b525ad0..0000000000
--- a/config/policy.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-## Policy configuration
-## Current valid keys are:
-## ON_CLONE - displayed after a successful cloning operation to the cloned person
-## ON_DEFIB_INTACT - displayed after defibbing before memory loss time threshold
-## ON_DEFIB_LATE - displayed after defibbing post memory loss time threshold
-## SDGF - displayed on SDGF clone spawning
-## SDGF_GOOD - displayed on SDGF clone spawning, if the clone is loyal
-## SDGF_BAD - displayed on SDGF clone spawning, if the clone is not loyal
-## PAI - displayed on PAI personality being loaded
-## EXAMPLE:
-## POLICYCONFIG ON_CLONE insert text here span classes are fully supported
-
-## Misc entries for above
-
-## Defib time limit for "cloning memory disorder" memory loss in seconds
-# DEFIB_CMD_TIME_LIMIT 300
diff --git a/dependencies.sh b/dependencies.sh
index 0fbad2153c..cdbdcd98df 100644
--- a/dependencies.sh
+++ b/dependencies.sh
@@ -4,11 +4,14 @@
#Final authority on what's required to fully build the project
# byond version
-export BYOND_MAJOR=513
-export BYOND_MINOR=1536
+export BYOND_MAJOR=514
+export BYOND_MINOR=1556
#rust_g git tag
-export RUST_G_VERSION=0.4.7
+export RUST_G_VERSION=0.4.8
+
+#auxmos git tag
+export AUXMOS_VERSION=v0.2.3
#node version
export NODE_VERSION=12
diff --git a/html/changelog.html b/html/changelog.html
index a7a4a13929..e2aef333e1 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -50,6 +50,433 @@
-->
+
20 August 2021
+
EmeraldSundisk updated:
+
+
Adds a law office/courtroom to OmegaStation
+
Adds a gateway to OmegaStation
+
Adds a pool/maintenance bar to OmegaStation
+
Removes the original maintenance garden in OmegaStation tweak: Relocates the bathrooms to the starboard hall tweak: Modifies port quarter maintenance to include some affected items
+
+
Putnam3145 updated:
+
+
Beach now has showers
+
+
TripleShades updated:
+
+
At least four or five space heaters spread across Pubby Station Maints
+
Missing decal in Pubby Station engineering
+
Moved an atmos alarm in the SM emitter chamber so it wont be destroyed
+
+
WanderingFox95 updated:
+
+
Empty bottles and pitchers are available to the bartender now.
+
They even come with 10 different fillstates!
+
Better Shark Tails, dodododododo~
+
The old ones are now listed as carp tails.
+
+
+
18 August 2021
+
timothyteakettle updated:
+
+
lets you select 4 prosthetic limbs instead of only 2
+
+
+
16 August 2021
+
BlueWildrose updated:
+
+
Incapacitated mobs are blacklisted from being human-level intelligence sentience event candidates. This is particularly important due to slimes in BZ stasis on the station.
+
+
bunny232 updated:
+
+
Polyvitiligo actually changes your color now
+
+
+
13 August 2021
+
Putnam3145 updated:
+
+
makes certain organs no longer have circular references
+
+
+
12 August 2021
+
Arturlang updated:
+
+
Nonslimes and nonvampires will no longer be able to increase their blood to stupid heights
+
+
Putnam3145 updated:
+
+
Supermatter values use auxgm
+
+
cadyn updated:
+
+
precompile.sh and build.sh updated, auxmos set to 0.2.3 in dependencies.sh
+
+
+
11 August 2021
+
timothyteakettle updated:
+
+
lets felinids, humans and moths have markings
+
+
+
09 August 2021
+
Arturlang updated:
+
+
Nanite machinery overlays should now work properly
+
screen objects are now atom/movables instead
+
Update appearance is used for updating atoms now instead of update_icon and such
+
+
BlueWildrose updated:
+
+
Old gateway animation is back. Feedback is given that the gateway is open again.
+
+
Putnam3145 updated:
+
+
Rod of asclepius can now be used for revival surgery
+
+
+
07 August 2021
+
BlueWildrose updated:
+
+
The black dress, pink tutu, the bathrobe, the kimonos, and the qipaos no longer have a missing pixel when wearing them with the feminine bodytype. They're also no longer adjustable (they have no sprite for the adjusted variant and therefore it would just make an error if someone did that.)
+
+
Putnam3145 updated:
+
+
Supernova rad storms are now half as likely per tick tweak: Supernovae don't announce they're ending if they never announced they're starting tweak: Supernovae say explicitly no rad storms can happen if they can't
+
Monstermos is back
+
+
+
05 August 2021
+
Putnam3145 updated:
+
+
organs decay again
+
+
+
04 August 2021
+
BlueWildrose updated:
+
+
The debrained overlay actually shows for brainless corpses now instead of showing a blue error.
+
+
timothyteakettle updated:
+
+
legs are no longer awful
+
+
+
03 August 2021
+
zeroisthebiggay updated:
+
+
tempgun is a laser
+
bake mode is useful
+
tempgun has less shots
+
tempgun has more sprites
+
+
+
02 August 2021
+
TripleShades updated:
+
+
Decorative (read: Station-safe) water tile in the code
+
Pubby's new water feature wont kill atmosphere anymore
+
+
+
31 July 2021
+
MrJWhit updated:
+
+
Fixes some minor mistakes around space near boxstation.
+
+
TripleShades updated:
+
+
Fountain area to public mining station-side tweak: Moved around the tables and chairs and monitor at public mining station-side
+
+
WanderingFox95 updated:
+
+
Added new ruin maps: The Bathhouse, The Library, The Engineering outpost, The Hotsprings(un-cursed), Lust, Wrath and an alternate spawn for the BDM in the form of a mining outpost, based on the same Ruins on the Ice Moon. removed: A lot of the fun items within the ice moon-based ruins that would break mining even more and trading cards.
+
Yes, this includes that the lavaland version of the hot spring is literally just water and not cursed. tweak: Also "fixed" that only one version of the BDM ruin ever spawns. Not sure it needed fixing but even locally hosted, only blooddrunk2.dmm would spawn. Since I added another spawn for the BDM, I fixed that too.
+
+
+
29 July 2021
+
EmeraldSundisk updated:
+
+
Adds decals between Virology and the general Medbay to provide clarity
+
Adds an airlock with access to the Engineering Cooling Loop
+
The Maintenance Theater now has a suitable amount of dust
+
Removed an errant entertainment monitor left in the morgue
+
Removed redundant scrubber piping in and around the bar and kitchen tweak: Slightly readjusts an airpipe to take advantage of newfound space tweak: The Toxins Lab has received (predominantly) visual adjustments as to render it more in line with the general science department tweak: Toxins Storage is no longer its own area and as such needn't worry about APCs
+
Hydroponics now has a proper APC as intended
+
+
+
27 July 2021
+
Putnam3145 updated:
+
+
Generic fires work now
+
A knock-on effect of the HE pipe change is that space cooling is ~8.4x as powerful
+
+
+
26 July 2021
+
SandPoot updated:
+
+
Removes a sneaky transform button on the vore panel.
+
+
+
24 July 2021
+
MrJWhit updated:
+
+
Replaces the northwest maint room on box with a sadness room
+
Replaces bar stripper room with an arcade on boxstation
+
Squished the west bathrooms a bit and made a room to sell things on boxstation.
+
Southeast maint hallway on box is now ziggy and zaggier.
+
Fixed pipes being not connected with the recent map PR for boxstation.
+
+
Putnam3145 updated:
+
+
hallucination now bottoms out at 0
+
supermatter now causes only half the hallucinations
+
+
cadyn updated:
+
+
auxmos bump for dependencies.sh
+
+
+
23 July 2021
+
silicons updated:
+
+
Batons are slightly more powerful.
+
+
+
19 July 2021
+
Arturlang updated:
+
+
The crafting button should no longer silently make more copies of itself on reconects
+
There are no longer two copies of the crafting component.
+
There is no longer a rogue d in tracer.dm tweak: Everything in Misc was moved to Miscelanious in the crafting menu, and Misc was nuked from orbit. Nobody will miss you.
+
+
MrJWhit updated:
+
+
Fixes a memory leak, there's a good chance that it's the same one that killed kilo.
+
+
SandPoot updated:
+
+
Put back mob vore with a pref.
+
Taken some stuff from tg for tgui_alert.
+
Refactored a lot of code on vore panel.
+
+
WanderingFox95 updated:
+
+
custom plasteel kegs
+
+
YakumoChen updated:
+
+
You can now wear the suffering of others on your head with just a sheet of human skin!
+
Human skin hats
+
+
keronshb updated:
+
+
Stripping/equipping things to a conscious braindead person (AKA a human owned by a disconnected player) will now give them a message with your visible name and roughly how long ago you touched their stuff when they login again. Touching someone's pockets or adjusting their gear other than equipping/unequipping is not logged. After 5 minutes, you'll have forgotten both their name and exactly how long ago past those 5 minutes it happened. (Credit to Ryll-Ryll)
+
LAZYNULL
+
Breaking mirrors now gives you a bad omen
+
+
timothyteakettle updated:
+
+
anthros can now select the cow tail
+
new quirk that allows you to eat trash
+
+
+
18 July 2021
+
timothyteakettle updated:
+
+
fixes photosynthesis stopping nutrition going past well fed from non-photosynthesis means
+
+
+
17 July 2021
+
cadyn updated:
+
+
precompile.sh updated
+
+
+
15 July 2021
+
Putnam3145 updated:
+
+
fixes a major source of lag
+
+
+
14 July 2021
+
Putnam3145 updated:
+
+
Acid is now a component
+
+
+
13 July 2021
+
MrJWhit updated:
+
+
Adds a mirror above the sink in the captains bedroom in pubby
+
+
+
12 July 2021
+
Putnam3145 updated:
+
+
causes_dirt_buildup_on_floor is now just a thing humans do instead of a weird var only true for humans
+
+
+
11 July 2021
+
shellspeed1 updated:
+
+
replaces the seed machine with a biogen in the survival pod.
+
corrected an issue regarding wrong pair of gloves in the pod for DYI wiring .
+
+
+
10 July 2021
+
WanderingFox95 updated:
+
+
Returns the wheelchair sprites to having, you know, wheels?
+
A motorized wheelchair addsound: Chairwhoosh.
+
+
+
09 July 2021
+
MrJWhit updated:
+
+
Made a light not exist on the same tile as a door on pubby.
+
Makes the RD APC automatically connect to the powernet with the correct wire on pubby.
+
Added another wall for the AM engine so it doesn't space the airlock roundstart.
+
+
+
07 July 2021
+
DeltaFire15 updated:
+
+
Golem / Plasmaman species color should work again.
+
+
+
05 July 2021
+
Putnam3145 updated:
+
+
Watchers no longer search 9 tiles away for stuff then throw the result away if it's more than 1 tile away
+
Auxmos pull now uses a tag instead of pulling straight from the main branch
+
+
WanderingFox95 updated:
+
+
Moved a sprite one pixel to the left.
+
+
zeroisthebiggay updated:
+
+
tg based tool resprites
+
wirecutters have proper overlays
+
+
+
04 July 2021
+
cadyn updated:
+
+
Updated server scripts for proper linux support
+
+
+
03 July 2021
+
DeltaFire15 updated:
+
+
Turrets on nonlethal mode now once again shoot till the target is stamcrit as opposed to unable to use items, resolving some issues.
+
+
Putnam3145 updated:
+
+
A bunch of sleeping process() calls now either don't sleep or make sure to call a proc with waitfor set to FALSE
+
+
WanderingFox95 updated:
+
+
The axolotl ears in the .dmi file actually exist to the game now.
+
+
+
02 July 2021
+
silicons updated:
+
+
spray bottles work again.
+
+
+
30 June 2021
+
WanderingFox95 updated:
+
+
More plushies in the code.
+
Nabbed some plushie sprites from Cit RP and TG and made some myself. Enjoy!
+
The Daily Whiplash (Newspaper Baton) is now available! (Using sticky tape to stick a newspaper onto a baton) Bap!
+
A rolled up newspaper sprite was provided.
+
Switched Gateway and Vault locations on Boxstation, bringing it more in line with other stations.
+
+
bunny232 updated:
+
+
The pubby xenobiology air/scrubber network is now isolated from the rest of the station
+
+
qweq12yt updated:
+
+
HoP's cargo access was removed...
+
+
shellspeed1 updated:
+
+
NT has lost experimental KA tech to miners who were lost in the field. Make sure to try and recover it.
+
Adds an extremely expensive survival pod to mining for people to work towards. Get to work cracking rocks today.
+
+
+
28 June 2021
+
Putnam3145 updated:
+
+
APCs aren't infinite power anymore
+
FDA, LINDA without the bookkeeping.
+
Putnamos, a simpler replacement for Monstermos. If I can get Monstermos to work, this will be Monstermos instead.
+
LINDA, the old active-turfs-based atmos subsystem.
+
Monstermos? I would rather not get rid of this, but I can't get it to work correctly.
+
Extools has been removed, and loading extools alongside auxtools will cause massive problems. If this is tested or merged, remove extools from the static files.
+
+
WanderingFox95 updated:
+
+
Carrots are good for your eyes - but eyes are also good for your carrots. Adds the googly eyes trait to walkingshrooms (Oculary Mimicry)
+
Googly Eyes - they make everything better.
+
+
+
25 June 2021
+
MrJWhit updated:
+
+
Adds two missing decals to the 5x5 SM.
+
+
brokenOculus updated:
+
+
pillbottles and syringesare now printable from the medbay protolathe, shiftstart. Hyposprays are now printable in medbay lathe under advanced biotech.
+
+
+
24 June 2021
+
WanderingFox95 updated:
+
+
An announcement to let players know the Cat Surgeon has come to visit.
+
Upped the Volume of his spawn noise and lowered the spawn weight slightly.
+
+
+
23 June 2021
+
DeltaFire15 updated:
+
+
A bunch of small nanite things should be less wonky
+
Slimes are no longer immune to vomiting (undocumented change from a previous PR)
+
Fruit wine exists again.
+
Airlock hacking no longer sleeps.
+
The clockwork gateway deconstruction no longer sleeps.
+
Teslium reactions and Holywater booms no longer sleep.
+
Slime timestop no longer sleeps.
+
+
Putnam3145 updated:
+
+
inelastic exports no longer uselessly do exponential functions
+
+
+
22 June 2021
+
bunny232 updated:
+
+
Adds a missing win door to meta xenobiology pen 6
+
+
silicons updated:
+
+
no more doubleroasting
+
+
+
21 June 2021
+
silicons updated:
+
+
glowshroom scaling
+
+
timothyteakettle updated:
+
+
vore is 0.1% less shitcode
+
+
20 June 2021
Arturlang updated:
@@ -104,566 +531,6 @@
Ling Bone Gauntlets work again
-
-
17 June 2021
-
Vynzill updated:
-
-
ability to change crafted armwrap sprite to alternate one.
-
extended armwrap icon and sprite
-
-
timothyteakettle updated:
-
-
fixes an oversight causing embed jostling to do 2x as much damage as it should
-
-
-
16 June 2021
-
silicons updated:
-
-
on_found works again
-
-
-
15 June 2021
-
EmeraldSundisk updated:
-
-
Xenobiology now has proper lighting
-
The Corporate Showroom now has a proper front door
-
Mining snowmobiles now have keys
-
Adjusts area designations so GENTURF icons should no longer be visible in-game
-
-
-
14 June 2021
-
EmeraldSundisk updated:
-
-
Adds a brand new, wholly unique mining base to Snaxi tweak: A thorough redesign of Snaxi (see PR #14818 for more info)
-
Increases the number of electrical connections between substations
-
-
MrJWhit updated:
-
-
Removes cat meteors.
-
-
SandPoot updated:
-
-
Tablet computers now have a pen slot, they can almost replace your pda!
-
Removed a bracket from printer's examine.
-
The cosmetic turtleneck and skirtleneck no longer start with broken sensors.
-
-
TripleShades updated:
-
-
Lights to AI Sat Walkways
-
Lights to Atmospherics
-
Floor labels to Atmospherics Gas Miner containment units
-
Gas canisters from Gas Miner containment units
-
Excessive wiring in Security and Detective's Office
-
-
qweq12yt updated:
-
-
Locker orders now properly bundle together in a single locker (still separated by buyer).
-
Changed some package names to be more accurate.
-
-
timothyteakettle updated:
-
-
bees can go in containers and are released upon opening the container
-
7 more round tips have been added
-
-
zeroisthebiggay updated:
-
-
new singularity hammer sprite
-
various slight sprite additions
-
distinctive combat defib sprite
-
a onesleeved croptop accessory sprited by trojan coyote
-
new bank machine sprite
-
unused goon coffin sprite
-
new water cooler sprite
-
-
-
12 June 2021
-
silicons updated:
-
-
xenos are now truly immune to stamina damage.
-
-
-
10 June 2021
-
Arturlang updated:
-
-
Holoparasites for traitors now cost 12 crystals, for operatives 8, the ricochet eyepath traitor item now 4.
-
-
DrPainis updated:
-
-
goliath calamari
-
cat meteors
-
-
Linzolle updated:
-
-
cults can build in maintenance (and other small areas) again.
-
centcom can no longer be selected as the target area for narsie to be summoned??????
-
-
MrJWhit updated:
-
-
Moves medical holodeck to the restricted category
-
-
SandPoot updated:
-
-
Uses some of the existing images for the typing indicators.
-
Fixes soulstone shard not working for non-cultists.
-
-
WanderingFox95 updated:
-
-
A random event for the cat surgeon to invade the station. Listen for scary noises!
-
Screaming Cat SFX, you know, for the mood.
-
-
bunny232 updated:
-
-
Atmos resin now properly prevents all atmos from moving
-
Air tanks now properly have a 21/79 o2/n2 mix
-
Hydroponics can now make 5u of slimejelly by injecting 3 oil, 2 radium and 1 tinea luxor into a glowshroom
-
-
keronshb updated:
-
-
Made it so Off Balance only disarms if they're shoved into a wall or person.
-
Reduced Off Balance time to 2 seconds.
-
Pierced Realities despawn after 3 minutes and 15 seconds, new unresearched realities spawn in after that time elsewhere to help other heretics get back into the game.
-
A required sacrifice amount for heretic's second to last and last powers are added to discourage only rushing for holes.
-
An announcement automatically plays to everyone that there's a heretic gunning for ascension upon learning the 2nd to last power
-
Blade Shatters are now used in hand other than with a HUD icon tweak: Adjusted some TGUI menus for the book to reflect how many sacrifices a heretic has and how many are required for certain powers
-
Fixes sprite issue for Void Cloak for people who have digigrade legs.
-
Fixes the Raw Prophet recipe to match the description
-
Lets the Cargo Shuttle use Disposal Pipes again
-
Adds motivation and adds it to the uplink
-
Adds Judgement Cut projectiles
-
Adds Judgement Cut hit effects and firing effects.
-
added sounds for the firing and hit sounds of Judgement Cuts, created by @dzahlus
-
Adds Floor Cluwnes and event for midround
-
Adds Cluwne mutation
-
Adds Cluwne spell
-
Adds Cluwnes
-
Adds Cluwne Mask + shoes
-
Adds Floor Cluwne spawn button
-
Adds Cluwne smite button
-
-
zeroisthebiggay updated:
-
-
Fixed an exploit allowing you to grab people from anywhere with a clowncar.
-
revenant essence objective reduced
-
-
-
06 June 2021
-
bunny232 updated:
-
-
Pools are capable of mist at lower temperatures
-
-
-
05 June 2021
-
Arturlang updated:
-
-
float sanity now makes it not actually run if it's actively being thrown
-
-
coderbus13 updated:
-
-
Pubby's toxins injector now starts at 200L, like it does on other maps
-
-
zeroisthebiggay updated:
-
-
light floppy dog ears
-
-
-
04 June 2021
-
MrJWhit updated:
-
-
Adds a missing pipe
-
-
Putnam3145 updated:
-
-
sniper rifle doesn't ruin your round instantly now
-
-
-
03 June 2021
-
MrJWhit updated:
-
-
Removed some debug tiles on the xenoruin.
-
-
TripleShades updated:
-
-
Added a camera to both solar entryways
-
Added an intercom to toxin's launch for the doppler
-
The fake nuke auth disk in the library
-
-
-
29 May 2021
-
Kraseo updated:
-
-
No more slamming into people while bloodcrawled.
-
-
Linzolle updated:
-
-
brand intelligence event works again
-
-
keronshb updated:
-
-
swag outfit available in clothesmate
-
swag shoes availble in clothesmate resprite: changed swag shoes icon to the one twaticus made.
-
Adds the clown mob spawner for admins
-
-
zeroisthebiggay updated:
-
-
puglism damage can no longer stack with scarp
-
-
-
26 May 2021
-
bunny232 updated:
-
-
Removed two random 'captain's office' tiles from space on meta station
-
-
-
24 May 2021
-
zeroisthebiggay updated:
-
-
New traitor item: the Mauler Gauntlets! Punch hard, punch good! Eight telecrystals, buy today!
-
hairs from Airborne Snitch
-
-
-
23 May 2021
-
Putnam3145 updated:
-
-
Antag and species no longer remove all traits if one has a blacklisted trait
-
-
WanderingFox95 updated:
-
-
Replaced the antlers showing up when you select deer ears with actual deer ears. Literally why was that even a thing before?
-
Straight rabbit ears are now a thing.
-
-
keronshb updated:
-
-
30 > 25 pop req for contractor kit
-
adds a special hud for simple mobs.
-
a lot of >32x32 mobs now have icons for their health dolls
-
-
-
21 May 2021
-
Putnam3145 updated:
-
-
Fixed activity being attached to minds instead of mobs on antag attach.
-
-
-
20 May 2021
-
qweq12yt updated:
-
-
Fixed void cloak voiding itself into oblivion.
-
You can now order emag shuttles again.
-
-
timothyteakettle updated:
-
-
ports rp's marking system
-
-
-
19 May 2021
-
WanderingFox95 updated:
-
-
The E-Fink, a mending tool for food.
-
A backwards bladeslice. (Yes, for the E-fink)
-
And Icons for the E-fink, of course.
-
-
shellspeed1 updated:
-
-
Survival pods can now be designated as requiring power. Survival pods with this feature should include an APC when created and will run out of power rather quickly if no source is added. Perfect for true emergencies.
-
An empty survival pod has been added to the mining vendor. This is an extremely barebones pod featuring only a gps, table, apc, and the standard fridge for some donk pockets.
-
-
zeroisthebiggay updated:
-
-
New Alcohol Amaretto and various cocktails
-
more drink mixture flavortext
-
you're going to Baystation
-
-
-
15 May 2021
-
bunny232 updated:
-
-
Corrects the bot pathing by engineering on meta station
-
-
timothyteakettle updated:
-
-
borg spraycans have a five second delay before being able to knock someone down again
-
-
-
14 May 2021
-
keronshb updated:
-
-
Removes VOG sleep command since it was an undocumented readd.
-
-
zeroisthebiggay updated:
-
-
consealed
-
-
-
13 May 2021
-
Linzolle updated:
-
-
anthromorphic -> anthropomorphic
-
-
WanderingFox95 updated:
-
-
Pinot Mort (Necropolis Wine), a new, (totally healthy) mixed drink!
-
-
qweq12yt updated:
-
-
Fixed sleeping disky spam (it still sleeps soundly, but every minute instead of every two seconds)
-
Fixed Hulks not breaking cuffs, zipties, restraints.
-
-
silicons updated:
-
-
A deterministic wave explosion system has been added. Use it with wave_explosion().
-
-
zeroisthebiggay updated:
-
-
vegas style bunny ears
-
-
-
12 May 2021
-
DeltaFire15 updated:
-
-
find_safe_turf no longer always fails on safe oxygen levels(??)
-
Heretic bladeshatters now actually take the heretic's z into account as intended, instead of always being station z tweak: Message for failing the bladeshatter despite succeeding the do_after tweak: Improves bladeshatter a bit by making it safer codewise
-
-
-
11 May 2021
-
LetterN updated:
-
-
fixes emagging console shuttle purchases
-
syndie melee simplemobs has no more bullshit shield
-
-
bunny232 updated:
-
-
Delta station xenobiology department has received enhanced scrubbing and ventilation capabilities similar to box and meta
-
-
-
09 May 2021
-
Putnam3145 updated:
-
-
Priority announcement admeme verb
-
-
SandPoot updated:
-
-
Fixed Cyborg examines adding an extra weird line.
-
Everything can be set to have tooltips, and even coded to have neat tooltips.
-
Makes it so humans and borgs already have tooltips.
-
-
TheObserver-sys updated:
-
-
Fixes most of the weird handling bugs and improves cigarette case handling in general.
-
The Gorlex Marauders have seen fit to allow you to purchase the .45-70 GOVT rare ammo, at a premium cost. Don't waste it.
-
-
WanderingFox95 updated:
-
-
added the unrolling pin, an innovative solution to dough-based mishaps.
-
added visuals for the unrolling pin
-
-
dzahlus updated:
-
-
added new malf AI spawn and doomsday sound
-
removed old malf AI spawn and doomsday sound
-
-
zeroisthebiggay updated:
-
-
pirates now have a medbay and several other things qualifying as a buff
-
pirates lost their toilet
-
-
-
08 May 2021
-
Arturlang updated:
-
-
Synthblood bottles now have the proper color and probably won't poison you anymore
-
-
timothyteakettle updated:
-
-
lets humans have digi legs (and avian legs)
-
-
-
05 May 2021
-
The0bserver, with a great amount of advice from TripleZeta/TetraZeta updated:
-
-
Adds a new crate type, for use with any manner of cheeky breeki shenanigans, as well as with existing Russian contraband.
-
-
bunny232 updated:
-
-
There's some new vents and scrubbers in the meta station xenobiology department. Welders and wrenches not included*
-
-
keronshb updated:
-
-
Nightmare Shadow Jaunt threshold up to 0.4
-
Vendor and Engraved message light down to 0.3
-
-
-
03 May 2021
-
TripleShades updated:
-
-
Added two air alarms to Pubby Security, one in the evidence locker room and one in the main equipment back room
-
pAI Card back to outside Research in Meta Station
-
Pubby Disposals now shunts to space
-
Maintinence Areas being not applied to certain airlocks as well as stealing minor walls
-
Box Surgery Storage camera is now renamed to be on the network
-
Box Paramedic Station camera is now renamed to be on the network, and no longer steals the Morgue's cam tweak: Box Surgery Storage is now it's own proper room
-
-
-
01 May 2021
-
qweq12yt updated:
-
-
Restores the sprite for the Riot Suit.
-
-
-
30 April 2021
-
DrPainis updated:
-
-
Bubblegum's hallucinations are capitalized.
-
-
Melbert, SandPoot updated:
-
-
TGUI Limbgrower
-
Refactored the limbgrower to modernize the code and allow for more types of designs.
-
The limbgrower now supports plumbing ducts.
-
Fixes genitals not actually getting data from disks.
-
Adds two special helpers.
-
-
SandPoot updated:
-
-
The decal painter now has visible previews for your tile painting funs.
-
Fixes decal painter painting in the opposite direction.
-
-
TheObserver-sys updated:
-
-
Restores the access lock on crates that should have them, given the goods inside.
-
Makes the 10MM Surplus Rifle a less awful thing to use.
-
replaces unarmored things with their armored versions.
-
Illegal Tech Ammo actually is fucking reasonable, now.
-
Expensive Illegal Tech Ammo Boxes are now constructible, with actually justifiable prices.
-
-
WanderingFox95 updated:
-
-
There's finally a reason for the reagent dart gun to exist and be used!
-
-
akada updated:
-
-
Changes the space adaptation sprite to something less intrusive and more subtle.
-
-
necromanceranne updated:
-
-
Basic cybernetic organs: they're worse than organic! Basic stomachs, hearts, lungs and livers! For when you hate someone enough to not bother harvesting organs from a monkeyhuman!
-
Cybernetic organs have been adjusted into three tiers: 1 (basic), 2 (standard, better than organic) and 3 (absolutely better than organic but expensive to print)
-
Cybernetic organs that are emp'd instead suffer different effects based on the severity of the emp. The bigger the emp, the worse the effect is.
-
Rather than outright bricking, severely emp'd cyberorgans degrade over time very quickly, requiring replacement in the near future.
-
Fake blindfolds in the loadout. They don't obscure vision, for better or worse.
-
-
-
29 April 2021
-
Putnam3145 updated:
-
-
Fixed a couple runtimes in activity (threat) tracking
-
-
keronshb updated:
-
-
Removes the Reinforcement Chromosome from Genetics.
-
-
-
26 April 2021
-
Trigg, stylemistake and SandPoot updated:
-
-
Admins just got a new TGUI Select Equipment menu tweak: Prevents the window from creating sprites for any animated version there might be. (this guarantees consistant sprite size/amount)
-
-
-
25 April 2021
-
DrPainis updated:
-
-
Bubblegum is now capitalized.
-
-
-
22 April 2021
-
Whoneedspacee updated:
-
-
new arena attack where ash drake summons lava around you
-
removed old swooping above you, instead flies above you instantly
-
ash drake now spawns temporary lava pools instead of meteors falling down
-
ash drake takes twice as long to swoop down now that he instantly goes above you
-
ash drake now moves twice as fast
-
increases the odds of lava spawns in the lava pool attack
-
increases fire line damage and decreases lava attacks direct damage tweak: ash drake fire now shoots in the direction of the target tweak: changes times of certain animations tweak: changes sounds of meteor falling to lava creation
-
a bug where ash drakes attacks did not damage mechs
-
changes meteor icon to lava creation animation from lava staff
-
Mass fire attack, sends fire out from the ash drake in all directions
-
Adds an enraged attack for ash drake, heals him as well as making him glow and go faster, spawning massive amounts of fire in all directions
-
Removes the old triple swoop with lava pools attack tweak: Lava pools can now spawn with the normal fire breath attack sometimes tweak: Lava pools now have changed delays for lesser amounts so they don't all just place around one area tweak: Increases default swoop delay
-
Teleporting out of the lava arena now has some actual consequences by enraging the ash drake
-
Makes lava arena a bit less laggy by not recalculating range_turfs every time
-
Fixes the arena attack selecting inaccessible tiles as the safe tile though this will not change the turfs to basalt temporarily to prevent moving through indestructible walls
-
Fire lines would not spawn if their range would place their final turf location outside of the map
-
The arena attack will no longer destroy indestructible open turfs
-
ash drake fire does less damage now
-
ash drake takes longer to swoop down now
-
tiles take longer to fully convert into lava now, slowing down the arena attack as well
-
fire breath now moves slower
-
triple fire breath for the lava swoop only happens below half health now
-
The arena attack not making safespots when you fight it in a mech
-
-
-
21 April 2021
-
necromanceranne updated:
-
-
Stun batons (not police batons/telebatons) no longer knockdown on leftclick.
-
Stun batons apply a knockdown and tase effect on right click, but once every few seconds (they still don't disarm). They are vulnerable to a shove disarm briefly, however. Standard batons have a cooldown of 5 seconds. Stun prods have a cooldown of 7 seconds.
-
Taser resistance prevents the knockdown, so any chem that grants this (like adrenals) protects you from this knockdown.
-
Stun batons apply a stagger when they hit someone, preventing sprinting for a few seconds.
-
Stun batons respect melee armor for their stamina damage, but their cells, based on max charge, grant armor penetration. For every 1000 charge, they gain 1 armor pen. (Roundstart batons have 15 pen, just fyi)
-
Shoves can disarm you of any item, not just guns.
-
Removes a duplicate trait definition for TRAIT_NICE_SHOT.
-
-
-
20 April 2021
-
BlueWildrose updated:
-
-
New slimeperson organs that aren't really that different from humans for now.
-
Some blue organs for slimepeople.
-
Space pirate sleepers can now be crowbared to be destroyed.
-
-
DrPainis updated:
-
-
ash drake meat
-
-
Hatterhat updated:
-
-
Plastitanium glass now properly applies the *2 bonus for integrity and efficiency when used as a solar panel.
-
-
HeroWithYay updated:
-
-
replaced some icons
-
-
Putnam3145 updated:
-
-
Bluespace pipes, which can teleport gas over long distances
-
Donk co traitor class (assassin-heavy)
-
Waffle co traitor class (freeform)
-
Admin-only activity tracking system only attached to antags for now tweak: Objective rerolling can now be done twice
-
Sabotage objectives won't give "free objective" anymore
-
-
The0bserver, TripleZeta, and AsciiSquid updated:
-
-
New, easily concealable weapons, chambered in .38, .357, and .45-70 Govt. Fun for the whole family!
-
Some smugglers seem to have acquired a high amount of .38 derringers, and are looking to offload them to those of gray morality, with no questions asked!
-
An enigmatic gun collector has seen fit to do special acquisition work for the Gorlex Marauders, selling the fruits of his labor for a premium price. If you have the right electomagnetic sequence, you might be able to contact him to acquire a piece of his armory.
-
-
coiax updated:
-
-
Nuke ops can now purchase a box of "deathrattle implants". When an implanted person dies, all the other users of the implant will get a message, saying who died and where they died.
-
-
keronshb updated:
-
-
Weight per blood is .03 now instead of .05
-
Dragnet Snare breakout timer is now 2.5 seconds down from 5 seconds.
-
-
qweq12yt updated:
-
-
Fixed a bug where some cargo crates would never arrive and still charge users
-
-
zeroisthebiggay updated:
-
-
the box ghost burger
-
GoonStation 13 Development Team
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index 59ec30afb3..580cf51a2f 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -29538,3 +29538,303 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
zeroisthebiggay:
- imageadd: beltslot sprites for various items
- imageadd: resprite for telebaton
+2021-06-21:
+ silicons:
+ - bugfix: glowshroom scaling
+ timothyteakettle:
+ - bugfix: vore is 0.1% less shitcode
+2021-06-22:
+ bunny232:
+ - bugfix: Adds a missing win door to meta xenobiology pen 6
+ silicons:
+ - bugfix: no more doubleroasting
+2021-06-23:
+ DeltaFire15:
+ - bugfix: A bunch of small nanite things should be less wonky
+ - bugfix: Slimes are no longer immune to vomiting (undocumented change from a previous
+ PR)
+ - bugfix: Fruit wine exists again.
+ - code_imp: Airlock hacking no longer sleeps.
+ - code_imp: The clockwork gateway deconstruction no longer sleeps.
+ - code_imp: Teslium reactions and Holywater booms no longer sleep.
+ - code_imp: Slime timestop no longer sleeps.
+ Putnam3145:
+ - bugfix: inelastic exports no longer uselessly do exponential functions
+2021-06-24:
+ WanderingFox95:
+ - rscadd: An announcement to let players know the Cat Surgeon has come to visit.
+ - balance: Upped the Volume of his spawn noise and lowered the spawn weight slightly.
+2021-06-25:
+ MrJWhit:
+ - rscadd: Adds two missing decals to the 5x5 SM.
+ brokenOculus:
+ - rscadd: pillbottles and syringesare now printable from the medbay protolathe,
+ shiftstart. Hyposprays are now printable in medbay lathe under advanced biotech.
+2021-06-28:
+ Putnam3145:
+ - bugfix: APCs aren't infinite power anymore
+ - rscadd: FDA, LINDA without the bookkeeping.
+ - rscadd: Putnamos, a simpler replacement for Monstermos. If I can get Monstermos
+ to work, this will be Monstermos instead.
+ - rscdel: LINDA, the old active-turfs-based atmos subsystem.
+ - rscdel: Monstermos? I would rather not get rid of this, but I can't get it to
+ work correctly.
+ - server: Extools has been removed, and loading extools alongside auxtools will
+ cause massive problems. If this is tested or merged, remove extools from the
+ static files.
+ WanderingFox95:
+ - rscadd: Carrots are good for your eyes - but eyes are also good for your carrots.
+ Adds the googly eyes trait to walkingshrooms (Oculary Mimicry)
+ - imageadd: Googly Eyes - they make everything better.
+2021-06-30:
+ WanderingFox95:
+ - rscadd: More plushies in the code.
+ - imageadd: Nabbed some plushie sprites from Cit RP and TG and made some myself.
+ Enjoy!
+ - rscadd: The Daily Whiplash (Newspaper Baton) is now available! (Using sticky tape
+ to stick a newspaper onto a baton) Bap!
+ - imageadd: A rolled up newspaper sprite was provided.
+ - balance: Switched Gateway and Vault locations on Boxstation, bringing it more
+ in line with other stations.
+ bunny232:
+ - rscadd: The pubby xenobiology air/scrubber network is now isolated from the rest
+ of the station
+ qweq12yt:
+ - rscdel: HoP's cargo access was removed...
+ shellspeed1:
+ - balance: NT has lost experimental KA tech to miners who were lost in the field.
+ Make sure to try and recover it.
+ - rscadd: Adds an extremely expensive survival pod to mining for people to work
+ towards. Get to work cracking rocks today.
+2021-07-02:
+ silicons:
+ - bugfix: spray bottles work again.
+2021-07-03:
+ DeltaFire15:
+ - bugfix: Turrets on nonlethal mode now once again shoot till the target is stamcrit
+ as opposed to unable to use items, resolving some issues.
+ Putnam3145:
+ - bugfix: A bunch of sleeping process() calls now either don't sleep or make sure
+ to call a proc with waitfor set to FALSE
+ WanderingFox95:
+ - bugfix: The axolotl ears in the .dmi file actually exist to the game now.
+2021-07-04:
+ cadyn:
+ - server: Updated server scripts for proper linux support
+2021-07-05:
+ Putnam3145:
+ - bugfix: Watchers no longer search 9 tiles away for stuff then throw the result
+ away if it's more than 1 tile away
+ - server: Auxmos pull now uses a tag instead of pulling straight from the main branch
+ WanderingFox95:
+ - bugfix: Moved a sprite one pixel to the left.
+ zeroisthebiggay:
+ - imageadd: tg based tool resprites
+ - bugfix: wirecutters have proper overlays
+2021-07-07:
+ DeltaFire15:
+ - bugfix: Golem / Plasmaman species color should work again.
+2021-07-09:
+ MrJWhit:
+ - bugfix: Made a light not exist on the same tile as a door on pubby.
+ - bugfix: Makes the RD APC automatically connect to the powernet with the correct
+ wire on pubby.
+ - rscadd: Added another wall for the AM engine so it doesn't space the airlock roundstart.
+2021-07-10:
+ WanderingFox95:
+ - imageadd: Returns the wheelchair sprites to having, you know, wheels?
+ - rscadd: 'A motorized wheelchair addsound: Chairwhoosh.'
+2021-07-11:
+ shellspeed1:
+ - balance: replaces the seed machine with a biogen in the survival pod.
+ - bugfix: corrected an issue regarding wrong pair of gloves in the pod for DYI wiring
+ .
+2021-07-12:
+ Putnam3145:
+ - refactor: causes_dirt_buildup_on_floor is now just a thing humans do instead of
+ a weird var only true for humans
+2021-07-13:
+ MrJWhit:
+ - rscadd: Adds a mirror above the sink in the captains bedroom in pubby
+2021-07-14:
+ Putnam3145:
+ - refactor: Acid is now a component
+2021-07-15:
+ Putnam3145:
+ - bugfix: fixes a major source of lag
+2021-07-17:
+ cadyn:
+ - server: precompile.sh updated
+2021-07-18:
+ timothyteakettle:
+ - bugfix: fixes photosynthesis stopping nutrition going past well fed from non-photosynthesis
+ means
+2021-07-19:
+ Arturlang:
+ - bugfix: The crafting button should no longer silently make more copies of itself
+ on reconects
+ - code_imp: There are no longer two copies of the crafting component.
+ - code_imp: 'There is no longer a rogue d in tracer.dm tweak: Everything in Misc
+ was moved to Miscelanious in the crafting menu, and Misc was nuked from orbit.
+ Nobody will miss you.'
+ MrJWhit:
+ - bugfix: Fixes a memory leak, there's a good chance that it's the same one that
+ killed kilo.
+ SandPoot:
+ - rscadd: Put back mob vore with a pref.
+ - code_imp: Taken some stuff from tg for tgui_alert.
+ - refactor: Refactored a lot of code on vore panel.
+ WanderingFox95:
+ - rscadd: custom plasteel kegs
+ YakumoChen:
+ - rscadd: You can now wear the suffering of others on your head with just a sheet
+ of human skin!
+ - imageadd: Human skin hats
+ keronshb:
+ - rscadd: Stripping/equipping things to a conscious braindead person (AKA a human
+ owned by a disconnected player) will now give them a message with your visible
+ name and roughly how long ago you touched their stuff when they login again.
+ Touching someone's pockets or adjusting their gear other than equipping/unequipping
+ is not logged. After 5 minutes, you'll have forgotten both their name and exactly
+ how long ago past those 5 minutes it happened. (Credit to Ryll-Ryll)
+ - rscadd: LAZYNULL
+ - rscadd: Breaking mirrors now gives you a bad omen
+ timothyteakettle:
+ - bugfix: anthros can now select the cow tail
+ - rscadd: new quirk that allows you to eat trash
+2021-07-23:
+ silicons:
+ - balance: Batons are slightly more powerful.
+2021-07-24:
+ MrJWhit:
+ - rscadd: Replaces the northwest maint room on box with a sadness room
+ - rscadd: Replaces bar stripper room with an arcade on boxstation
+ - rscadd: Squished the west bathrooms a bit and made a room to sell things on boxstation.
+ - balance: Southeast maint hallway on box is now ziggy and zaggier.
+ - bugfix: Fixed pipes being not connected with the recent map PR for boxstation.
+ Putnam3145:
+ - bugfix: hallucination now bottoms out at 0
+ - balance: supermatter now causes only half the hallucinations
+ cadyn:
+ - server: auxmos bump for dependencies.sh
+2021-07-26:
+ SandPoot:
+ - rscdel: Removes a sneaky transform button on the vore panel.
+2021-07-27:
+ Putnam3145:
+ - bugfix: Generic fires work now
+ - balance: A knock-on effect of the HE pipe change is that space cooling is ~8.4x
+ as powerful
+2021-07-29:
+ EmeraldSundisk:
+ - rscadd: Adds decals between Virology and the general Medbay to provide clarity
+ - rscadd: Adds an airlock with access to the Engineering Cooling Loop
+ - rscadd: The Maintenance Theater now has a suitable amount of dust
+ - rscdel: Removed an errant entertainment monitor left in the morgue
+ - rscdel: 'Removed redundant scrubber piping in and around the bar and kitchen tweak:
+ Slightly readjusts an airpipe to take advantage of newfound space tweak: The
+ Toxins Lab has received (predominantly) visual adjustments as to render it more
+ in line with the general science department tweak: Toxins Storage is no longer
+ its own area and as such needn''t worry about APCs'
+ - bugfix: Hydroponics now has a proper APC as intended
+2021-07-31:
+ MrJWhit:
+ - bugfix: Fixes some minor mistakes around space near boxstation.
+ TripleShades:
+ - rscadd: 'Fountain area to public mining station-side tweak: Moved around the tables
+ and chairs and monitor at public mining station-side'
+ WanderingFox95:
+ - rscadd: 'Added new ruin maps: The Bathhouse, The Library, The Engineering outpost,
+ The Hotsprings(un-cursed), Lust, Wrath and an alternate spawn for the BDM in
+ the form of a mining outpost, based on the same Ruins on the Ice Moon. removed:
+ A lot of the fun items within the ice moon-based ruins that would break mining
+ even more and trading cards.'
+ - balance: 'Yes, this includes that the lavaland version of the hot spring is literally
+ just water and not cursed. tweak: Also "fixed" that only one version of the
+ BDM ruin ever spawns. Not sure it needed fixing but even locally hosted, only
+ blooddrunk2.dmm would spawn. Since I added another spawn for the BDM, I fixed
+ that too.'
+2021-08-02:
+ TripleShades:
+ - rscadd: 'Decorative (read: Station-safe) water tile in the code'
+ - bugfix: Pubby's new water feature wont kill atmosphere anymore
+2021-08-03:
+ zeroisthebiggay:
+ - balance: tempgun is a laser
+ - balance: bake mode is useful
+ - balance: tempgun has less shots
+ - imageadd: tempgun has more sprites
+2021-08-04:
+ BlueWildrose:
+ - bugfix: The debrained overlay actually shows for brainless corpses now instead
+ of showing a blue error.
+ timothyteakettle:
+ - bugfix: legs are no longer awful
+2021-08-05:
+ Putnam3145:
+ - bugfix: organs decay again
+2021-08-07:
+ BlueWildrose:
+ - bugfix: The black dress, pink tutu, the bathrobe, the kimonos, and the qipaos
+ no longer have a missing pixel when wearing them with the feminine bodytype.
+ They're also no longer adjustable (they have no sprite for the adjusted variant
+ and therefore it would just make an error if someone did that.)
+ Putnam3145:
+ - balance: 'Supernova rad storms are now half as likely per tick tweak: Supernovae
+ don''t announce they''re ending if they never announced they''re starting tweak:
+ Supernovae say explicitly no rad storms can happen if they can''t'
+ - rscadd: Monstermos is back
+2021-08-09:
+ Arturlang:
+ - bugfix: Nanite machinery overlays should now work properly
+ - code_imp: screen objects are now atom/movables instead
+ - code_imp: Update appearance is used for updating atoms now instead of update_icon
+ and such
+ BlueWildrose:
+ - bugfix: Old gateway animation is back. Feedback is given that the gateway is open
+ again.
+ Putnam3145:
+ - balance: Rod of asclepius can now be used for revival surgery
+2021-08-11:
+ timothyteakettle:
+ - rscadd: lets felinids, humans and moths have markings
+2021-08-12:
+ Arturlang:
+ - rscdel: Nonslimes and nonvampires will no longer be able to increase their blood
+ to stupid heights
+ Putnam3145:
+ - refactor: Supermatter values use auxgm
+ cadyn:
+ - server: precompile.sh and build.sh updated, auxmos set to 0.2.3 in dependencies.sh
+2021-08-13:
+ Putnam3145:
+ - bugfix: makes certain organs no longer have circular references
+2021-08-16:
+ BlueWildrose:
+ - bugfix: Incapacitated mobs are blacklisted from being human-level intelligence
+ sentience event candidates. This is particularly important due to slimes in
+ BZ stasis on the station.
+ bunny232:
+ - bugfix: Polyvitiligo actually changes your color now
+2021-08-18:
+ timothyteakettle:
+ - rscadd: lets you select 4 prosthetic limbs instead of only 2
+2021-08-20:
+ EmeraldSundisk:
+ - rscadd: Adds a law office/courtroom to OmegaStation
+ - rscadd: Adds a gateway to OmegaStation
+ - rscadd: Adds a pool/maintenance bar to OmegaStation
+ - rscdel: 'Removes the original maintenance garden in OmegaStation tweak: Relocates
+ the bathrooms to the starboard hall tweak: Modifies port quarter maintenance
+ to include some affected items'
+ Putnam3145:
+ - rscadd: Beach now has showers
+ TripleShades:
+ - rscadd: At least four or five space heaters spread across Pubby Station Maints
+ - rscadd: Missing decal in Pubby Station engineering
+ - bugfix: Moved an atmos alarm in the SM emitter chamber so it wont be destroyed
+ WanderingFox95:
+ - rscadd: Empty bottles and pitchers are available to the bartender now.
+ - imageadd: They even come with 10 different fillstates!
+ - imageadd: Better Shark Tails, dodododododo~
+ - rscadd: The old ones are now listed as carp tails.
diff --git a/icons/mob/clothing/custom_w.dmi b/icons/mob/clothing/custom_w.dmi
index 1a4acbc242..199232d73b 100644
Binary files a/icons/mob/clothing/custom_w.dmi and b/icons/mob/clothing/custom_w.dmi differ
diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi
index da499d5e7d..2dc094f7d1 100644
Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ
diff --git a/icons/mob/human_parts.dmi b/icons/mob/human_parts.dmi
index 34a1ada483..3310d911cb 100644
Binary files a/icons/mob/human_parts.dmi and b/icons/mob/human_parts.dmi differ
diff --git a/icons/mob/human_parts_greyscale.dmi b/icons/mob/human_parts_greyscale.dmi
index c404fbcacb..d04323b02b 100644
Binary files a/icons/mob/human_parts_greyscale.dmi and b/icons/mob/human_parts_greyscale.dmi differ
diff --git a/icons/mob/inhands/equipment/tools_lefthand.dmi b/icons/mob/inhands/equipment/tools_lefthand.dmi
index c25ea837da..27aaef50b1 100644
Binary files a/icons/mob/inhands/equipment/tools_lefthand.dmi and b/icons/mob/inhands/equipment/tools_lefthand.dmi differ
diff --git a/icons/mob/inhands/equipment/tools_righthand.dmi b/icons/mob/inhands/equipment/tools_righthand.dmi
index 65f1145278..54f8f6560d 100644
Binary files a/icons/mob/inhands/equipment/tools_righthand.dmi and b/icons/mob/inhands/equipment/tools_righthand.dmi differ
diff --git a/icons/mob/inhands/weapons/guns_lefthand.dmi b/icons/mob/inhands/weapons/guns_lefthand.dmi
index 07000f43aa..ca742c9c7f 100644
Binary files a/icons/mob/inhands/weapons/guns_lefthand.dmi and b/icons/mob/inhands/weapons/guns_lefthand.dmi differ
diff --git a/icons/mob/inhands/weapons/guns_righthand.dmi b/icons/mob/inhands/weapons/guns_righthand.dmi
index cf07bbba91..a277b29993 100644
Binary files a/icons/mob/inhands/weapons/guns_righthand.dmi and b/icons/mob/inhands/weapons/guns_righthand.dmi differ
diff --git a/icons/mob/legfile1test.dmi b/icons/mob/legfile1test.dmi
new file mode 100644
index 0000000000..cf74d73796
Binary files /dev/null and b/icons/mob/legfile1test.dmi differ
diff --git a/icons/mob/legfile2test.dmi b/icons/mob/legfile2test.dmi
new file mode 100644
index 0000000000..cf74d73796
Binary files /dev/null and b/icons/mob/legfile2test.dmi differ
diff --git a/icons/mob/radial.dmi b/icons/mob/radial.dmi
index e681069131..27b268eea0 100644
Binary files a/icons/mob/radial.dmi and b/icons/mob/radial.dmi differ
diff --git a/icons/obj/bureaucracy.dmi b/icons/obj/bureaucracy.dmi
index b778a9d1a2..7b00c155ef 100644
Binary files a/icons/obj/bureaucracy.dmi and b/icons/obj/bureaucracy.dmi differ
diff --git a/icons/obj/clothing/belt_overlays.dmi b/icons/obj/clothing/belt_overlays.dmi
index 5f31a65ffa..0799920a6c 100644
Binary files a/icons/obj/clothing/belt_overlays.dmi and b/icons/obj/clothing/belt_overlays.dmi differ
diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi
index 0091961588..e63044df9e 100644
Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ
diff --git a/icons/obj/custom.dmi b/icons/obj/custom.dmi
index 7b00d52f8f..89da4b43a0 100644
Binary files a/icons/obj/custom.dmi and b/icons/obj/custom.dmi differ
diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi
index 34f9867ee9..b507b3bcdd 100644
Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ
diff --git a/icons/obj/drinks.dmi b/icons/obj/drinks.dmi
index b7f21a1fe4..0f49bc6d5f 100644
Binary files a/icons/obj/drinks.dmi and b/icons/obj/drinks.dmi differ
diff --git a/icons/obj/guns/energy.dmi b/icons/obj/guns/energy.dmi
index 158c95ee5d..5a9493e874 100644
Binary files a/icons/obj/guns/energy.dmi and b/icons/obj/guns/energy.dmi differ
diff --git a/icons/obj/hydroponics/harvest.dmi b/icons/obj/hydroponics/harvest.dmi
index 7474bb87ab..08d8cf8fa1 100644
Binary files a/icons/obj/hydroponics/harvest.dmi and b/icons/obj/hydroponics/harvest.dmi differ
diff --git a/icons/obj/machines/gateway.dmi b/icons/obj/machines/gateway.dmi
index 5ba943bb89..99a74a68bc 100644
Binary files a/icons/obj/machines/gateway.dmi and b/icons/obj/machines/gateway.dmi differ
diff --git a/icons/obj/nuke_tools.dmi b/icons/obj/nuke_tools.dmi
index 799c4baabb..7f5c730fe5 100644
Binary files a/icons/obj/nuke_tools.dmi and b/icons/obj/nuke_tools.dmi differ
diff --git a/icons/obj/objects.dmi b/icons/obj/objects.dmi
index b9c891ddb9..6d29b8df8e 100644
Binary files a/icons/obj/objects.dmi and b/icons/obj/objects.dmi differ
diff --git a/icons/obj/plushes.dmi b/icons/obj/plushes.dmi
index 97c3ea1409..69cec1a6fd 100644
Binary files a/icons/obj/plushes.dmi and b/icons/obj/plushes.dmi differ
diff --git a/icons/obj/reagentfillings.dmi b/icons/obj/reagentfillings.dmi
index 8115036b6f..7926ead12d 100644
Binary files a/icons/obj/reagentfillings.dmi and b/icons/obj/reagentfillings.dmi differ
diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi
index 8414c8b95c..a720aff62c 100644
Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ
diff --git a/icons/obj/vehicles.dmi b/icons/obj/vehicles.dmi
index d12851f572..14b19caef8 100644
Binary files a/icons/obj/vehicles.dmi and b/icons/obj/vehicles.dmi differ
diff --git a/libbyond-extools.so b/libbyond-extools.so
deleted file mode 100644
index bdae36893f..0000000000
Binary files a/libbyond-extools.so and /dev/null differ
diff --git a/modular_citadel/code/modules/client/loadout/__donator.dm b/modular_citadel/code/modules/client/loadout/__donator.dm
index 39ed9d6ec8..c1489da94a 100644
--- a/modular_citadel/code/modules/client/loadout/__donator.dm
+++ b/modular_citadel/code/modules/client/loadout/__donator.dm
@@ -554,3 +554,9 @@
slot = SLOT_W_UNIFORM
path = /obj/item/clothing/under/smaiden
ckeywhitelist = list("ultimarifox")
+
+/datum/gear/donator/mgasmask
+ name = "Military Gas Mask"
+ slot = SLOT_IN_BACKPACK
+ path = /obj/item/clothing/mask/gas/military
+ ckeywhitelist = list("unclebourbon")
diff --git a/modular_citadel/code/modules/client/loadout/neck.dm b/modular_citadel/code/modules/client/loadout/neck.dm
index 6be13b75d9..128285628a 100644
--- a/modular_citadel/code/modules/client/loadout/neck.dm
+++ b/modular_citadel/code/modules/client/loadout/neck.dm
@@ -103,6 +103,6 @@
/datum/gear/neck/cancloak
name = "Canvas Cloak"
- path = /obj/item/clothing/neck/cancloak/polychromic
+ path = /obj/item/clothing/neck/cloak/cancloak/polychromic
loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION | LOADOUT_CAN_COLOR_POLYCHROMIC
loadout_initial_colors = list("#585858", "#373737", "#BEBEBE")
diff --git a/modular_citadel/code/modules/custom_loadout/custom_items.dm b/modular_citadel/code/modules/custom_loadout/custom_items.dm
index b7d04e0780..14114c513b 100644
--- a/modular_citadel/code/modules/custom_loadout/custom_items.dm
+++ b/modular_citadel/code/modules/custom_loadout/custom_items.dm
@@ -229,6 +229,14 @@
mob_overlay_icon = 'icons/mob/clothing/custom_w.dmi'
icon_state = "stalker"
+/obj/item/clothing/mask/gas/military
+ name = "Military Gas Mask"
+ desc = "A rare PMC gas mask, one of the very expensive kinds. The inside looks comfortable to wear for a while. The blood red eyes however seem to stare back at you. Creepy."
+ icon = 'icons/obj/custom.dmi'
+ item_state = "mgas"
+ mob_overlay_icon = 'icons/mob/clothing/custom_w.dmi'
+ icon_state = "mgas"
+
/obj/item/reagent_containers/food/drinks/flask/steel
name = "The End"
desc = "A plain steel flask, sealed by lock and key. The front is inscribed with The End."
diff --git a/modular_citadel/code/modules/mob/living/carbon/carbon.dm b/modular_citadel/code/modules/mob/living/carbon/carbon.dm
index 3a683ca2ff..bea34c27a2 100644
--- a/modular_citadel/code/modules/mob/living/carbon/carbon.dm
+++ b/modular_citadel/code/modules/mob/living/carbon/carbon.dm
@@ -6,11 +6,11 @@
if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_TOGGLED))
return FALSE //let's not override the main draw of the game these days
voremode = !voremode
- var/obj/screen/voretoggle/T = locate() in hud_used?.static_inventory
+ var/atom/movable/screen/voretoggle/T = locate() in hud_used?.static_inventory
T?.update_icon_state()
return TRUE
/mob/living/carbon/proc/disable_vore_mode()
voremode = FALSE
- var/obj/screen/voretoggle/T = locate() in hud_used?.static_inventory
+ var/atom/movable/screen/voretoggle/T = locate() in hud_used?.static_inventory
T?.update_icon_state()
diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm
index 60c009bc29..3725e46b38 100644
--- a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm
@@ -109,7 +109,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
ZI.Insert(SM)
log_reagent("FERMICHEM: [M] ckey: [M.key]'s zombie_infection has been transferred to their clone")
- var/list/policies = CONFIG_GET(keyed_list/policyconfig)
+ var/list/policies = CONFIG_GET(keyed_list/policy)
var/policy = policies[POLICYCONFIG_SDGF]
if(policy)
to_chat(SM,policy)
@@ -127,7 +127,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
else
to_chat(SM, "While you find your newfound existence strange, you share the same memories as [M.real_name]. However, You find yourself indifferent to the goals you previously had, and take more interest in your newfound independence, but still have an indescribable care for the safety of your original.")
log_reagent("FERMICHEM: [SM] ckey: [SM.key]'s is not bound by [M] ckey [M.key]'s will, and is free to determine their own goals, while respecting and acting as their origin.")
-
+
to_chat(SM, "You feel a strange sensation building in your mind as you realise there's two of you. Before you get a chance to think about it, you suddenly split from your old body, and find yourself face to face with your original, a perfect clone of your origin.")
SM.client?.change_view(CONFIG_GET(string/default_view))
to_chat(M, "You feel a strange sensation building in your mind as you realise there's two of you. Before you get a chance to think about it, a mass splits from you, and find yourself face to face with yourself.")
@@ -226,7 +226,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
M.adjustCloneLoss(-10, 0) //I don't want to make Rezadone obsolete.
M.adjustBruteLoss(-25, 0)// Note that this takes a long time to apply and makes you fat and useless when it's in you, I don't think this small burst of healing will be useful considering how long it takes to get there.
M.adjustFireLoss(-25, 0)
- M.blood_volume += 250
+ M.adjust_integration_blood(250)
M.heal_bodypart_damage(1,1)
M.action_cooldown_mod = 1
if (M.nutrition < 1500)
@@ -236,7 +236,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
to_chat(M, "the cells fail to hold enough mass to generate a clone, instead diffusing into your system.")
M.adjustBruteLoss(-10, 0)
M.adjustFireLoss(-10, 0)
- M.blood_volume += 100
+ M.adjust_integration_blood(100)
M.action_cooldown_mod = 1
if (M.nutrition < 1500)
M.adjust_nutrition(500)
@@ -309,7 +309,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
/datum/reagent/fermi/SDGFheal/on_mob_life(mob/living/carbon/M)//Used to heal the clone after splitting, the clone spawns damaged. (i.e. insentivies players to make more than required, so their clone doesn't have to be treated)
if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio))
- M.blood_volume += 10
+ M.adjust_integration_blood(10)
M.adjustCloneLoss(-2, 0)
M.setOrganLoss(ORGAN_SLOT_BRAIN, -1)
M.adjust_nutrition(10)
diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
index ab39e6f4a7..edaaeb19b2 100644
--- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm
@@ -28,6 +28,7 @@
//Called when temperature is above a certain threshold, or if purity is too low.
/datum/chemical_reaction/proc/FermiExplode(datum/reagents/R0, var/atom/my_atom, volume, temp, pH, Exploding = FALSE)
+ set waitfor = FALSE
if (Exploding == TRUE)
return
diff --git a/modular_citadel/icons/mob/mam_ears.dmi b/modular_citadel/icons/mob/mam_ears.dmi
index 51541619d4..dd3ea5f82b 100644
Binary files a/modular_citadel/icons/mob/mam_ears.dmi and b/modular_citadel/icons/mob/mam_ears.dmi differ
diff --git a/modular_citadel/icons/mob/mam_tails.dmi b/modular_citadel/icons/mob/mam_tails.dmi
index 5e5a87c199..c1ffced3d5 100644
Binary files a/modular_citadel/icons/mob/mam_tails.dmi and b/modular_citadel/icons/mob/mam_tails.dmi differ
diff --git a/sound/effects/chairwhoosh.ogg b/sound/effects/chairwhoosh.ogg
new file mode 100644
index 0000000000..907659f7cb
Binary files /dev/null and b/sound/effects/chairwhoosh.ogg differ
diff --git a/sound/weapons/frost.ogg b/sound/weapons/frost.ogg
new file mode 100644
index 0000000000..67884e87be
Binary files /dev/null and b/sound/weapons/frost.ogg differ
diff --git a/tgstation.dme b/tgstation.dme
index 2399f5f09a..f3fb62af87 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -17,7 +17,7 @@
#include "_maps\_basemap.dm"
#include "code\_compile_options.dm"
#include "code\world.dm"
-#include "code\__DEFINES\_extools.dm"
+#include "code\__DEFINES\_auxtools.dm"
#include "code\__DEFINES\_globals.dm"
#include "code\__DEFINES\_protect.dm"
#include "code\__DEFINES\_tick.dm"
@@ -109,6 +109,7 @@
#include "code\__DEFINES\sight.dm"
#include "code\__DEFINES\sound.dm"
#include "code\__DEFINES\spaceman_dmm.dm"
+#include "code\__DEFINES\spans.dm"
#include "code\__DEFINES\species.dm"
#include "code\__DEFINES\stat.dm"
#include "code\__DEFINES\stat_tracking.dm"
@@ -155,6 +156,7 @@
#include "code\__DEFINES\storage\_storage.dm"
#include "code\__DEFINES\storage\volumetrics.dm"
#include "code\__HELPERS\_cit_helpers.dm"
+#include "code\__HELPERS\_extools_api.dm"
#include "code\__HELPERS\_lists.dm"
#include "code\__HELPERS\_logging.dm"
#include "code\__HELPERS\_string_lists.dm"
@@ -176,6 +178,7 @@
#include "code\__HELPERS\icon_smoothing.dm"
#include "code\__HELPERS\icons.dm"
#include "code\__HELPERS\level_traits.dm"
+#include "code\__HELPERS\lighting.dm"
#include "code\__HELPERS\matrices.dm"
#include "code\__HELPERS\mobs.dm"
#include "code\__HELPERS\mouse_control.dm"
@@ -200,6 +203,7 @@
#include "code\__HELPERS\vector.dm"
#include "code\__HELPERS\verbs.dm"
#include "code\__HELPERS\view.dm"
+#include "code\__HELPERS\yelling.dm"
#include "code\__HELPERS\sorts\__main.dm"
#include "code\__HELPERS\sorts\InsertSort.dm"
#include "code\__HELPERS\sorts\MergeSort.dm"
@@ -289,32 +293,43 @@
#include "code\controllers\subsystem.dm"
#include "code\controllers\configuration\config_entry.dm"
#include "code\controllers\configuration\configuration.dm"
+#include "code\controllers\configuration\entries\admin.dm"
+#include "code\controllers\configuration\entries\alert.dm"
+#include "code\controllers\configuration\entries\antag_rep.dm"
#include "code\controllers\configuration\entries\comms.dm"
+#include "code\controllers\configuration\entries\connections.dm"
#include "code\controllers\configuration\entries\dbconfig.dm"
+#include "code\controllers\configuration\entries\debris.dm"
#include "code\controllers\configuration\entries\donator.dm"
#include "code\controllers\configuration\entries\dynamic.dm"
-#include "code\controllers\configuration\entries\fail2topic.dm"
-#include "code\controllers\configuration\entries\game_options.dm"
+#include "code\controllers\configuration\entries\fetish_content.dm"
+#include "code\controllers\configuration\entries\gamemodes.dm"
#include "code\controllers\configuration\entries\general.dm"
+#include "code\controllers\configuration\entries\jexp.dm"
#include "code\controllers\configuration\entries\logging.dm"
+#include "code\controllers\configuration\entries\movespeed.dm"
#include "code\controllers\configuration\entries\persistence.dm"
#include "code\controllers\configuration\entries\plushies.dm"
#include "code\controllers\configuration\entries\policy.dm"
#include "code\controllers\configuration\entries\resources.dm"
#include "code\controllers\configuration\entries\respawns.dm"
+#include "code\controllers\configuration\entries\security.dm"
+#include "code\controllers\configuration\entries\server.dm"
#include "code\controllers\configuration\entries\stamina_combat.dm"
+#include "code\controllers\configuration\entries\threat.dm"
+#include "code\controllers\configuration\entries\urls.dm"
+#include "code\controllers\configuration\entries\vote.dm"
#include "code\controllers\subsystem\achievements.dm"
-#include "code\controllers\subsystem\acid.dm"
#include "code\controllers\subsystem\activity.dm"
#include "code\controllers\subsystem\adjacent_air.dm"
#include "code\controllers\subsystem\air.dm"
-#include "code\controllers\subsystem\air_turfs.dm"
#include "code\controllers\subsystem\assets.dm"
#include "code\controllers\subsystem\atoms.dm"
#include "code\controllers\subsystem\augury.dm"
#include "code\controllers\subsystem\autotransfer.dm"
#include "code\controllers\subsystem\blackbox.dm"
#include "code\controllers\subsystem\blackmarket.dm"
+#include "code\controllers\subsystem\callback.dm"
#include "code\controllers\subsystem\chat.dm"
#include "code\controllers\subsystem\communications.dm"
#include "code\controllers\subsystem\dbcore.dm"
@@ -456,6 +471,7 @@
#include "code\datums\brain_damage\special.dm"
#include "code\datums\brain_damage\split_personality.dm"
#include "code\datums\components\_component.dm"
+#include "code\datums\components\acid.dm"
#include "code\datums\components\activity.dm"
#include "code\datums\components\anti_magic.dm"
#include "code\datums\components\armor_plate.dm"
@@ -636,6 +652,7 @@
#include "code\datums\elements\swimming.dm"
#include "code\datums\elements\sword_point.dm"
#include "code\datums\elements\tactical.dm"
+#include "code\datums\elements\trash.dm"
#include "code\datums\elements\turf_transparency.dm"
#include "code\datums\elements\update_icon_blocker.dm"
#include "code\datums\elements\update_icon_updates_onmob.dm"
@@ -1791,11 +1808,13 @@
#include "code\modules\asset_cache\transports\asset_transport.dm"
#include "code\modules\asset_cache\transports\webroot_transport.dm"
#include "code\modules\atmospherics\multiz.dm"
+#include "code\modules\atmospherics\auxgm\breathing_classes.dm"
+#include "code\modules\atmospherics\auxgm\gas_types.dm"
#include "code\modules\atmospherics\environmental\LINDA_fire.dm"
#include "code\modules\atmospherics\environmental\LINDA_system.dm"
#include "code\modules\atmospherics\environmental\LINDA_turf_tile.dm"
+#include "code\modules\atmospherics\gasmixtures\auxgm.dm"
#include "code\modules\atmospherics\gasmixtures\gas_mixture.dm"
-#include "code\modules\atmospherics\gasmixtures\gas_types.dm"
#include "code\modules\atmospherics\gasmixtures\immutable_mixtures.dm"
#include "code\modules\atmospherics\gasmixtures\reactions.dm"
#include "code\modules\atmospherics\machinery\airalarm.dm"
@@ -3124,7 +3143,6 @@
#include "code\modules\projectiles\guns\ballistic\automatic.dm"
#include "code\modules\projectiles\guns\ballistic\bow.dm"
#include "code\modules\projectiles\guns\ballistic\derringer.dm"
-#include "code\modules\projectiles\guns\ballistic\laser_gatling.dm"
#include "code\modules\projectiles\guns\ballistic\launchers.dm"
#include "code\modules\projectiles\guns\ballistic\magweapon.dm"
#include "code\modules\projectiles\guns\ballistic\pistol.dm"
@@ -3135,6 +3153,7 @@
#include "code\modules\projectiles\guns\energy\energy_gun.dm"
#include "code\modules\projectiles\guns\energy\kinetic_accelerator.dm"
#include "code\modules\projectiles\guns\energy\laser.dm"
+#include "code\modules\projectiles\guns\energy\laser_gatling.dm"
#include "code\modules\projectiles\guns\energy\megabuster.dm"
#include "code\modules\projectiles\guns\energy\mounted.dm"
#include "code\modules\projectiles\guns\energy\plasma_cit.dm"
@@ -3589,6 +3608,7 @@
#include "code\modules\tgui\states\observer.dm"
#include "code\modules\tgui\states\physical.dm"
#include "code\modules\tgui\states\self.dm"
+#include "code\modules\tgui\states\vorepanel.dm"
#include "code\modules\tgui\states\zlevel.dm"
#include "code\modules\tgui_panel\audio.dm"
#include "code\modules\tgui_panel\external.dm"
@@ -3615,6 +3635,7 @@
#include "code\modules\vehicles\atv.dm"
#include "code\modules\vehicles\bicycle.dm"
#include "code\modules\vehicles\lavaboat.dm"
+#include "code\modules\vehicles\motorized_wheelchair.dm"
#include "code\modules\vehicles\pimpin_ride.dm"
#include "code\modules\vehicles\ridden.dm"
#include "code\modules\vehicles\scooter.dm"
diff --git a/tgui/packages/tgui/interfaces/VorePanel.js b/tgui/packages/tgui/interfaces/VorePanel.js
new file mode 100644
index 0000000000..3e29c8bff4
--- /dev/null
+++ b/tgui/packages/tgui/interfaces/VorePanel.js
@@ -0,0 +1,591 @@
+/* eslint-disable max-len */
+import { Fragment } from 'inferno';
+import { useBackend, useLocalState } from "../backend";
+import { Box, Button, Flex, Collapsible, Icon, LabeledList, NoticeBox, Section, Tabs } from "../components";
+import { Window } from "../layouts";
+
+const stats = [
+ null,
+ 'average',
+ 'bad',
+];
+
+const digestModeToColor = {
+ "Hold": null,
+ "Dragon": "blue",
+ "Digest": "red",
+ "Absorb": "purple",
+ "Unabsorb": "purple",
+};
+
+const digestModeToPreyMode = {
+ "Hold": "being held.",
+ "Digest": "being digested.",
+ "Absorb": "being absorbed.",
+ "Unabsorb": "being unabsorbed.",
+ "Dragon": "being digested by a powerful creature.",
+};
+
+/**
+ * There are three main sections to this UI.
+ * - The Inside Panel, where all relevant data for interacting with a belly you're in is located.
+ * - The Belly Selection Panel, where you can select what belly people will go into and customize the active one.
+ * - User Preferences, where you can adjust all of your vore preferences on the fly.
+ */
+export const VorePanel = (props, context) => {
+ const { act, data } = useBackend(context);
+ return (
+
+
+ {data.unsaved_changes && (
+
+
+
+ Warning: Unsaved Changes!
+
+
+
+
+
+ ) || null}
+
+
+
+
+
+ );
+};
+
+const VoreInsidePanel = (props, context) => {
+ const { act, data } = useBackend(context);
+
+ const {
+ absorbed,
+ belly_name,
+ belly_mode,
+ desc,
+ pred,
+ contents,
+ ref,
+ } = data.inside;
+
+ if (!belly_name) {
+ return (
+
+ You aren't inside anyone.
+
+ );
+ }
+
+ return (
+
+ You are currently {absorbed ? "absorbed into" : "inside"}
+ {pred}'s
+ {belly_name}
+ and you are
+ {digestModeToPreyMode[belly_mode]}
+
+ {desc}
+
+ {contents.length && (
+
+
+
+ ) || "There is nothing else around you."}
+
+ );
+};
+
+const VoreBellySelectionAndCustomization = (props, context) => {
+ const { act, data } = useBackend(context);
+
+ const {
+ our_bellies,
+ selected,
+ } = data;
+
+ return (
+
+
+ {our_bellies.map(belly => (
+ act("bellypick", { bellypick: belly.ref })}>
+
+ {belly.name} ({belly.contents})
+
+
+ ))}
+ act("newbelly")}>
+ New
+
+
+
+ {selected && }
+
+ );
+};
+
+/**
+ * Subtemplate of VoreBellySelectionAndCustomization
+ */
+const VoreSelectedBelly = (props, context) => {
+ const { act } = useBackend(context);
+
+ const { belly } = props;
+ const {
+ belly_name,
+ is_wet,
+ wet_loop,
+ mode,
+ verb,
+ desc,
+ sound,
+ release_sound,
+ can_taste,
+ bulge_size,
+ escapable,
+ interacts,
+ contents,
+ } = belly;
+
+ const [tabIndex, setTabIndex] = useLocalState(context, 'tabIndex', 0);
+
+ return (
+
+
+ setTabIndex(0)}>
+ Controls
+
+ setTabIndex(1)}>
+ Options
+
+ setTabIndex(2)}>
+ Contents ({contents.length})
+
+ setTabIndex(3)}>
+ Interactions
+
+
+ {tabIndex === 0 && (
+
+
+
+ }>
+ act("set_attribute", { attribute: "b_name" })}
+ content={belly_name} />
+
+
+ act("set_attribute", { attribute: "b_mode" })}
+ content={mode} />
+
+ act("set_attribute", { attribute: "b_desc" })}
+ icon="pen" />
+ }>
+ {desc}
+
+
+ act("set_attribute", { attribute: "b_verb" })}
+ content={verb} />
+
+
+ act("set_attribute", { attribute: "b_msgs", msgtype: "dmp" })}
+ content="Digest Message (to prey)" />
+ act("set_attribute", { attribute: "b_msgs", msgtype: "dmo" })}
+ content="Digest Message (to you)" />
+ act("set_attribute", { attribute: "b_msgs", msgtype: "smo" })}
+ content="Struggle Message (outside)" />
+ act("set_attribute", { attribute: "b_msgs", msgtype: "smi" })}
+ content="Struggle Message (inside)" />
+ act("set_attribute", { attribute: "b_msgs", msgtype: "em" })}
+ content="Examine Message (when full)" />
+ act("set_attribute", { attribute: "b_msgs", msgtype: "reset" })}
+ content="Reset Messages" />
+
+
+ ) || tabIndex === 1 && (
+
+
+
+
+ act("set_attribute", { attribute: "b_tastes" })}
+ icon={can_taste ? "toggle-on" : "toggle-off"}
+ selected={can_taste}
+ content={can_taste ? "Yes" : "No"} />
+
+
+ act("set_attribute", { attribute: "b_wetness" })}
+ icon={is_wet ? "toggle-on" : "toggle-off"}
+ selected={is_wet}
+ content={is_wet ? "Yes" : "No"} />
+
+
+ act("set_attribute", { attribute: "b_wetloop" })}
+ icon={wet_loop ? "toggle-on" : "toggle-off"}
+ selected={wet_loop}
+ content={wet_loop ? "Yes" : "No"} />
+
+
+
+
+
+
+ act("set_attribute", { attribute: "b_sound" })}
+ content={sound} />
+ act("set_attribute", { attribute: "b_soundtest" })}
+ icon="volume-up" />
+
+
+ act("set_attribute", { attribute: "b_release" })}
+ content={release_sound} />
+ act("set_attribute", { attribute: "b_releasesoundtest" })}
+ icon="volume-up" />
+
+
+ act("set_attribute", { attribute: "b_bulge_size" })}
+ content={bulge_size * 100 + "%"} />
+
+
+
+
+ act("set_attribute", { attribute: "b_del" })} />
+
+
+ ) || tabIndex === 2 && (
+
+ ) || tabIndex === 3 && (
+ act("set_attribute", { attribute: "b_escapable" })}
+ icon={escapable ? "toggle-on" : "toggle-off"}
+ selected={escapable}
+ content={escapable ? "Interactions On" : "Interactions Off"} />
+ }>
+ {escapable ? (
+
+
+ act("set_attribute", { attribute: "b_escapechance" })} />
+
+
+ act("set_attribute", { attribute: "b_escapetime" })} />
+
+
+
+ act("set_attribute", { attribute: "b_transferchance" })} />
+
+
+ act("set_attribute", { attribute: "b_transferlocation" })} />
+
+
+
+ act("set_attribute", { attribute: "b_absorbchance" })} />
+
+
+ act("set_attribute", { attribute: "b_digestchance" })} />
+
+
+ ) : "These options only display while interactions are turned on."}
+
+ ) || "Error"}
+
+ );
+};
+
+const VoreContentsPanel = (props, context) => {
+ const { act, data } = useBackend(context);
+ const {
+ show_pictures,
+ } = data;
+ const {
+ contents,
+ belly,
+ outside = false,
+ } = props;
+
+ return (
+
+ {outside && (
+ act("pick_from_outside", { "pickall": true })}>
+ All
+
+ ) || null}
+ {show_pictures && (
+
+ {contents.map(thing => (
+
+ act(thing.outside ? "pick_from_outside" : "pick_from_inside", {
+ "pick": thing.ref,
+ "belly": belly,
+ })}>
+
+
+ {thing.name}
+
+ ))}
+
+ ) || (
+
+ {contents.map(thing => (
+
+ act(thing.outside ? "pick_from_outside" : "pick_from_inside", {
+ "pick": thing.ref,
+ "belly": belly,
+ })}>
+ Interact
+
+
+ ))}
+
+ )}
+
+ );
+};
+
+const VoreUserPreferences = (props, context) => {
+ const { act, data } = useBackend(context);
+
+ const {
+ digestable,
+ devourable,
+ feeding,
+ absorbable,
+ allowmobvore,
+ vore_sounds,
+ digestion_sounds,
+ lickable,
+ smellable,
+ } = data.prefs;
+
+ const {
+ show_pictures,
+ } = data;
+
+ return (
+ act("show_pictures")}>
+ Contents Preference: {show_pictures ? "Show Pictures" : "Show List"}
+
+ }>
+
+
+ act("toggle_devour")}
+ icon={devourable ? "toggle-on" : "toggle-off"}
+ selected={devourable}
+ fluid
+ tooltip={"This button is to toggle your ability to be devoured by others. "
+ + (devourable ? "Click here to prevent being devoured." : "Click here to allow being devoured.")}
+ content={devourable ? "Devouring Allowed" : "No Devouring"} />
+
+
+ act("toggle_mobvore")}
+ icon={allowmobvore ? "toggle-on" : "toggle-off"}
+ selected={allowmobvore}
+ fluid
+ tooltip={"This button is for those who don't like being eaten by mobs. "
+ + (allowmobvore
+ ? "Click here to prevent being eaten by mobs."
+ : "Click here to allow being eaten by mobs.")}
+ tooltipPosition="bottom-right"
+ content={allowmobvore ? "Mobs eating you allowed" : "No Mobs eating you"} />
+
+
+ act("toggle_feed")}
+ icon={feeding ? "toggle-on" : "toggle-off"}
+ selected={feeding}
+ fluid
+ tooltip={"This button is to toggle your ability to be fed to or by others vorishly. "
+ + (feeding
+ ? "Click here to prevent being fed to/by other people."
+ : "Click here to allow being fed to/by other people.")}
+ content={feeding ? "Feeding Allowed" : "No Feeding"} />
+
+
+ act("toggle_digest")}
+ icon={digestable ? "toggle-on" : "toggle-off"}
+ selected={digestable}
+ fluid
+ tooltip={"This button is for those who don't like being digested. It can make you undigestable."
+ + (digestable ? " Click here to prevent digestion." : " Click here to allow digestion.")}
+ tooltipPosition="bottom-right"
+ content={digestable ? "Digestion Allowed" : "No Digestion"} />
+
+
+ act("toggle_absorbable")}
+ icon={absorbable ? "toggle-on" : "toggle-off"}
+ selected={absorbable}
+ fluid
+ tooltip={"This button allows preds to know whether you prefer or don't prefer to be absorbed. "
+ + (absorbable ? "Click here to disallow being absorbed." : "Click here to allow being absorbed.")}
+ content={absorbable ? "Absorption Allowed" : "No Absorption"} />
+
+
+ act("toggle_vore_sounds")}
+ icon={vore_sounds ? "volume-up" : "volume-mute"}
+ selected={vore_sounds}
+ fluid
+ tooltip={"Be able to hear vore sounds. "
+ + (vore_sounds
+ ? "Click here to turn off vore sounds."
+ : "Click here to turn on vore sounds.")}
+ content={vore_sounds ? "Vore Sounds Enabled" : "Vore Sounds Disabled"} />
+
+
+ act("toggle_digestion_sounds")}
+ icon={digestion_sounds ? "volume-up" : "volume-mute"}
+ selected={digestion_sounds}
+ fluid
+ tooltip={"Be able to hear digestion sounds. "
+ + (digestion_sounds
+ ? "Click here to turn off digestion sounds."
+ : "Click here to turn on digestion sounds.")}
+ content={digestion_sounds ? "Digestion Sounds Enabled" : "Digestion Sounds Disabled"} />
+
+
+ act("toggle_lickable")}
+ icon={lickable ? "toggle-on" : "toggle-off"}
+ selected={lickable}
+ fluid
+ tooltip={"Be able to be licked by others. "
+ + (lickable
+ ? "Click here to turn off being able to be licked."
+ : "Click here to turn on being able to be licked.")}
+ tooltipPosition="bottom-right"
+ content={lickable ? "Lickable" : "Unlickable"} />
+
+
+ act("setflavor")} />
+
+
+ act("toggle_smellable")}
+ icon={smellable ? "toggle-on" : "toggle-off"}
+ selected={smellable}
+ fluid
+ tooltip={"Be able to be smelled by others. "
+ + (smellable
+ ? "Click here to turn off being able to be smelled."
+ : "Click here to turn on being able to be smelled.")}
+ content={smellable ? "Smellable" : "Unsmellable"} />
+
+
+ act("setsmell")} />
+
+
+
+
+
+ act("saveprefs")} />
+
+
+ act("reloadprefs")} />
+
+
+
+
+ );
+};
diff --git a/tools/build/binaries/README.md b/tools/build/binaries/README.md
new file mode 100644
index 0000000000..625f337d98
--- /dev/null
+++ b/tools/build/binaries/README.md
@@ -0,0 +1 @@
+This directory is used to store temporary files to create binaries on linux
\ No newline at end of file
diff --git a/tools/build/build b/tools/build/build
index 0e202e1bba..cd4d804e8f 100755
--- a/tools/build/build
+++ b/tools/build/build
@@ -1,4 +1,6 @@
#!/bin/sh
+
+#Build TGUI
set -e
cd "$(dirname "$0")"
exec ../bootstrap/node build.js "$@"
diff --git a/tools/build/build.js b/tools/build/build.js
index 33767ebd72..0f04441334 100755
--- a/tools/build/build.js
+++ b/tools/build/build.js
@@ -124,7 +124,7 @@ const taskDm = (...injectedDefines) => new Task('dm')
.depends('html/**')
.depends('icons/**')
.depends('interface/**')
- .depends(process.platform === 'win32' ? 'byond-extools.*' : 'libbyond-extools.*')
+ .depends(process.platform === 'win32' ? 'auxmos.*' : 'libauxmos.*')
.depends('tgui/public/tgui.html')
.depends('tgui/public/*.bundle.*')
.depends(`${DME_NAME}.dme`)
diff --git a/tools/build/build.sh b/tools/build/build.sh
new file mode 100755
index 0000000000..62372eff2d
--- /dev/null
+++ b/tools/build/build.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+#Detect OS and use corresponding package manager for dependencies. Currently only works for arch, debian/ubuntu, and RHEL/fedora/CentOS
+if [[ -f '/etc/arch-release' ]]; then
+ echo -ne '\n y' | sudo pacman --needed -Sy base-devel git curl nodejs unzip
+fi
+if [[ -f '/etc/debian version' ]]; then
+ sudo dpkg --add-architecture i386
+ sudo apt-get update
+ sudo apt-get install -y build-essential git curl lib32z1 pkg-config libssl-dev:i386 libssl-dev nodejs unzip g++-multilib libc6-i386 libstdc++6:i386
+fi
+if [[ -f '/etc/centos-release' ]] || [[ -f '/etc/fedora-release' ]]; then #DNF should work for both of these
+ sudo dnf --refresh install make automake gcc gcc-c++ kernel-devel git curl unzip glibc-devel.i686 openssl-devel.i686 libgcc.i686 libstdc++-devel.i686
+fi
+
+cd binaries
+
+#Install rust if not present
+if ! [ -x "$has_cargo" ]; then
+ echo "Installing rust..."
+ curl https://sh.rustup.rs -sSf | sh -s -- -y
+ . ~/.profile
+fi
+
+#Download/update rust-g repo
+if [ ! -d "rust-g" ]; then
+ echo "Cloning rust-g..."
+ git clone https://github.com/tgstation/rust-g
+ cd rust-g
+ ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
+else
+ echo "Fetching rust-g..."
+ cd rust-g
+ git fetch
+ ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
+fi
+
+#Compile and move rust-g binary to repo root
+echo "Deploying rust-g..."
+git checkout "$RUST_G_VERSION"
+env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --release --target=i686-unknown-linux-gnu
+mv target/i686-unknown-linux-gnu/release/librust_g.so ../../../../librust_g.so
+cd ..
+
+#Download/update auxmos repo
+if [ ! -d "auxmos" ]; then
+ echo "Cloning auxmos..."
+ git clone https://github.com/Putnam3145/auxmos
+ cd auxmos
+ ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
+else
+ echo "Fetching auxmos..."
+ cd auxmos
+ git fetch
+ ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
+fi
+
+#Compile and move auxmos binary to repo root
+echo "Deploying auxmos..."
+git checkout "$AUXMOS_VERSION"
+env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo rustc --release --target=i686-unknown-linux-gnu --features all_reaction_hooks,explosive_decompression -- -C target-cpu=native
+mv target/i686-unknown-linux-gnu/release/libauxmos.so ../../../../libauxmos.so
+cd ../..
+
+#Install BYOND
+cd ../..
+./tools/ci/install_byond.sh
+source $HOME/BYOND/byond/bin/byondsetup
+
+cd tools/build
+
+#Build TGUI
+set -e
+cd "$(dirname "$0")"
+exec ../bootstrap/node build.js "$@"
diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh
index 9638215bb8..079f79704d 100755
--- a/tools/ci/check_grep.sh
+++ b/tools/ci/check_grep.sh
@@ -6,6 +6,10 @@ shopt -s globstar
st=0
+if git grep -P "\r\n"; then
+ echo "ERROR: CRLF line endings detected. Please stop using the webeditor, and fix it using a desktop Git client."
+ st = 1
+fi;
if grep -El '^\".+\" = \(.+\)' _maps/**/*.dmm; then
echo "ERROR: Non-TGM formatted map detected. Please convert it using Map Merger!"
st=1
diff --git a/tools/ci/install_auxmos.sh b/tools/ci/install_auxmos.sh
new file mode 100644
index 0000000000..bfdbe7199b
--- /dev/null
+++ b/tools/ci/install_auxmos.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+source dependencies.sh
+
+mkdir -p ~/.byond/bin
+wget -O ~/.byond/bin/libauxmos.so "https://github.com/Putnam3145/auxmos/releases/download/${AUXMOS_VERSION}/libauxmos.so"
+chmod +x ~/.byond/bin/libauxmos.so
+ldd ~/.byond/bin/libauxmos.so
diff --git a/tools/ci/install_rust_g.sh b/tools/ci/install_rust_g.sh
old mode 100755
new mode 100644
diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh
index ef548370f1..4d943846f0 100755
--- a/tools/ci/run_server.sh
+++ b/tools/ci/run_server.sh
@@ -7,11 +7,6 @@ mkdir ci_test/config
#test config
cp tools/ci/ci_config.txt ci_test/config/config.txt
-#throw extools into ldd
-cp libbyond-extools.so ~/.byond/bin/libbyond-extools.so
-chmod +x ~/.byond/bin/libbyond-extools.so
-ldd ~/.byond/bin/libbyond-extools.so
-
cd ci_test
DreamDaemon tgstation.dmb -close -trusted -verbose -params "log-directory=ci"
cd ..
diff --git a/tools/deploy.sh b/tools/deploy.sh
index d09b606a86..f6fc14d67d 100755
--- a/tools/deploy.sh
+++ b/tools/deploy.sh
@@ -22,8 +22,6 @@ fi
cp tgstation.dmb tgstation.rsc $1/
cp -r _maps/* $1/_maps/
-cp -r icons/runtime/* $1/icons/runtime/
-cp -r sound/runtime/* $1/sound/runtime/
cp -r strings/* $1/strings/
#remove .dm files from _maps
diff --git a/tools/tgs4_scripts/PreCompile.sh b/tools/tgs4_scripts/PreCompile.sh
index f21036ab19..6130736b4e 100755
--- a/tools/tgs4_scripts/PreCompile.sh
+++ b/tools/tgs4_scripts/PreCompile.sh
@@ -66,31 +66,27 @@ env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --release --target=i686-un
mv target/i686-unknown-linux-gnu/release/librust_g.so "$1/librust_g.so"
cd ..
-# get dependencies for extools
-apt-get install -y cmake build-essential gcc-multilib g++-multilib cmake wget
+# Auxtools dependencies
+apt-get install -y build-essential g++-multilib libc6-i386 libstdc++6:i386
-# update extools
-if [ ! -d "extools" ]; then
- echo "Cloning extools..."
- git clone https://github.com/MCHSL/extools
- cd extools/byond-extools
+# Update auxmos
+if [ ! -d "auxmos" ]; then
+ echo "Cloning auxmos..."
+ git clone https://github.com/Putnam3145/auxmos
+ cd auxmos
+ ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
else
- echo "Fetching extools..."
- cd extools/byond-extools
+ echo "Fetching auxmos..."
+ cd auxmos
git fetch
+ ~/.cargo/bin/rustup target add i686-unknown-linux-gnu
fi
-echo "Deploying extools..."
-git checkout "$EXTOOLS_VERSION"
-if [ -d "build" ]; then
- rm -R build
-fi
-mkdir build
-cd build
-cmake ..
-make
-mv libbyond-extools.so "$1/libbyond-extools.so"
-cd ../../..
+echo "Deploying auxmos..."
+git checkout "$AUXMOS_VERSION"
+env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo rustc --release --target=i686-unknown-linux-gnu --features all_reaction_hooks,explosive_decompression -- -C target-cpu=native
+mv -f target/i686-unknown-linux-gnu/release/libauxmos.so "$1/libauxmos.so"
+cd ..
# install or update youtube-dl when not present, or if it is present with pip3,
# which we assume was used to install it