diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index d08344cc96..97ae7b8e95 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -22,6 +22,11 @@ // Is an open container for all intents and purposes. #define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT) +//reagents_value defines, for cargo stuff. +#define DEFAULT_REAGENTS_VALUE 1 +#define NO_REAGENTS_VALUE 0 +#define HARVEST_REAGENTS_VALUE 0.3 + #define TOUCH 1 // splashing #define INGEST 2 // ingestion diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 605f7f8ae7..60d7fa42b9 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -436,7 +436,7 @@ var/list/result = list() for(var/m in group) var/mob/M = m - if(!M.key || !M.client || (ignore_category && GLOB.poll_ignore[ignore_category] && M.ckey in GLOB.poll_ignore[ignore_category])) + if(!M.key || !M.client || (ignore_category && GLOB.poll_ignore[ignore_category] && (M.ckey in GLOB.poll_ignore[ignore_category]))) continue if(be_special_flag) if(!(M.client.prefs) || !(be_special_flag in M.client.prefs.be_special)) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 1669c941c2..a5924994e7 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -529,7 +529,7 @@ GLOBAL_LIST_EMPTY(species_list) continue if(M.stat != DEAD && !override) continue - if(speaker_key && speaker_key in prefs.ignoring) + if(speaker_key && (speaker_key in prefs.ignoring)) continue switch(message_type) diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 7597a9229a..31e436f206 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -118,7 +118,7 @@ SUBSYSTEM_DEF(job) if(flag && (!(flag in player.client.prefs.be_special))) JobDebug("FOC flag failed, Player: [player], Flag: [flag], ") continue - if(player.mind && job.title in player.mind.restricted_roles) + if(player.mind && (job.title in player.mind.restricted_roles)) JobDebug("FOC incompatible with antagonist role, Player: [player]") continue if(player.client.prefs.job_preferences[job.title] == level) @@ -158,7 +158,7 @@ SUBSYSTEM_DEF(job) JobDebug("GRJ player not enough xp, Player: [player]") continue - if(player.mind && job.title in player.mind.restricted_roles) + if(player.mind && (job.title in player.mind.restricted_roles)) JobDebug("GRJ incompatible with antagonist role, Player: [player], Job: [job.title]") continue @@ -340,7 +340,7 @@ SUBSYSTEM_DEF(job) JobDebug("DO non-human failed, Player: [player], Job:[job.title]") continue - if(player.mind && job.title in player.mind.restricted_roles) + if(player.mind && (job.title in player.mind.restricted_roles)) JobDebug("DO incompatible with antagonist role, Player: [player], Job:[job.title]") continue diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 4d9eefae5b..7eff8b9e3c 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -38,7 +38,7 @@ SUBSYSTEM_DEF(shuttle) var/points = 5000 //number of trade-points we have var/centcom_message = "" //Remarks from CentCom on how well you checked the last order. var/list/discoveredPlants = list() //Typepaths for unusual plants we've already sent CentCom, associated with their potencies - var/passive_supply_points_per_minute = 500 + var/passive_supply_points_per_minute = 125 var/list/supply_packs = list() var/list/shoppinglist = list() diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 086167fc48..9924ed7917 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -149,7 +149,7 @@ SUBSYSTEM_DEF(vote) var/list/this_vote = voted[ckey] var/list/pretty_vote = list() for(var/choice in choices) - if("[choice]" in this_vote && "[choice]" in scores_by_choice) + if(("[choice]" in this_vote) && ("[choice]" in scores_by_choice)) sorted_insert(scores_by_choice["[choice]"],this_vote["[choice]"],/proc/cmp_numeric_asc) // START BALLOT GATHERING pretty_vote += "[choice]" @@ -160,7 +160,7 @@ SUBSYSTEM_DEF(vote) for(var/score_name in scores_by_choice) var/list/score = scores_by_choice[score_name] for(var/indiv_score in score) - SSblackbox.record_feedback("nested tally","voting",1,list(blackbox_text,"Scores",score_name,GLOB.vote_score_options[indiv_score])) + SSblackbox.record_feedback("nested tally","voting",1,list(blackbox_text,"Scores",score_name,GLOB.vote_score_options[indiv_score])) if(score.len == 0) scores_by_choice -= score_name while(scores_by_choice.len > 1) @@ -376,7 +376,7 @@ SUBSYSTEM_DEF(vote) else to_chat(world, "Notice:Restart vote will not restart the server automatically because there are active admins on.") message_admins("A restart vote has passed, but there are active admins on with +server, so it has been canceled. If you wish, you may restart the server.") - + return . /datum/controller/subsystem/vote/proc/submit_vote(vote, score = 0) diff --git a/code/datums/elements/cleaning.dm b/code/datums/elements/cleaning.dm index e4fb3edd48..3f80204089 100644 --- a/code/datums/elements/cleaning.dm +++ b/code/datums/elements/cleaning.dm @@ -45,4 +45,4 @@ cleaned_human.clean_blood() cleaned_human.wash_cream() cleaned_human.regenerate_icons() - to_chat(cleaned_human, "[src] cleans your face!") + to_chat(cleaned_human, "[AM] cleans your face!") diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm index 72fe6f5a1c..e0b0072808 100644 --- a/code/datums/holocall.dm +++ b/code/datums/holocall.dm @@ -12,7 +12,12 @@ /mob/camera/aiEye/remote/holo/setLoc() . = ..() var/obj/machinery/holopad/H = origin - H.move_hologram(eye_user, loc) + H?.move_hologram(eye_user, loc) + +/obj/machinery/holopad/remove_eye_control(mob/living/user) + if(user.client) + user.reset_perspective(null) + user.remote_control = null //this datum manages it's own references @@ -54,11 +59,6 @@ /datum/holocall/Destroy() QDEL_NULL(hangup) - var/user_good = !QDELETED(user) - if(user_good) - user.reset_perspective() - user.remote_control = null - if(!QDELETED(eye)) QDEL_NULL(eye) diff --git a/code/datums/hud.dm b/code/datums/hud.dm index e2d9bc579f..6b6fcb9691 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -32,7 +32,7 @@ GLOBAL_LIST_INIT(huds, list( /datum/atom_hud var/list/atom/hudatoms = list() //list of all atoms which display this hud - var/list/mob/hudusers = list() //list with all mobs who can see the hud + var/list/hudusers = list() //list with all mobs who can see the hud var/list/hud_icons = list() //these will be the indexes for the atom's hud_list var/list/next_time_allowed = list() //mobs associated with the next time this hud can be added to them diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index abd560171e..7ad4cee884 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -61,7 +61,7 @@ trimmed_list.Remove(M) continue if (M.mind) - if (restrict_ghost_roles && M.mind.assigned_role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL]) // Are they playing a ghost role? + if (restrict_ghost_roles && (M.mind.assigned_role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL])) // Are they playing a ghost role? trimmed_list.Remove(M) continue if (M.mind.assigned_role in restricted_roles) // Does their job allow it? diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 8de470fdb8..e5ac9a0f78 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -47,7 +47,10 @@ jump_action.Grant(user) actions += jump_action -/obj/machinery/computer/camera_advanced/proc/remove_eye_control(mob/living/user) +/obj/machinery/proc/remove_eye_control(mob/living/user) + CRASH("[type] does not implement ai eye handling") + +/obj/machinery/computer/camera_advanced/remove_eye_control(mob/living/user) if(!user) return for(var/V in actions) @@ -157,7 +160,7 @@ var/cooldown = 0 var/acceleration = 1 var/mob/living/eye_user = null - var/obj/machinery/computer/camera_advanced/origin + var/obj/machinery/origin var/eye_initialized = 0 var/visible_icon = 0 var/image/user_image = null @@ -170,7 +173,7 @@ /mob/camera/aiEye/remote/Destroy() if(origin && eye_user) - origin.remove_eye_control(eye_user) + origin.remove_eye_control(eye_user,src) origin = null . = ..() eye_user = null diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index e9d3006b06..b33b87f8b1 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -6,7 +6,6 @@ * ~ Zuhayr */ - //Main cryopod console. /obj/machinery/computer/cryopod @@ -18,7 +17,6 @@ density = FALSE interaction_flags_machine = INTERACT_MACHINE_OFFLINE req_one_access = list(ACCESS_HEADS, ACCESS_ARMORY) //Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with. - var/mode = null var/menu = 1 //Which menu screen to display @@ -130,7 +128,8 @@ playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) updateUsrDialog() return - if(!allow_items) return + if(!allow_items) + return if(frozen_items.len == 0) to_chat(user, "There is nothing to recover from storage.") @@ -182,7 +181,7 @@ var/last_no_computer_message = 0 // These items are preserved when the process() despawn proc occurs. - var/list/preserve_items = list( + var/static/list/preserve_items = typecacheof(list( /obj/item/hand_tele, /obj/item/card/id/captains_spare, /obj/item/aicard, @@ -203,9 +202,9 @@ /obj/item/tank/jetpack, /obj/item/documents, /obj/item/nuke_core_container - ) + )) // These items will NOT be preserved - var/list/do_not_preserve_items = list ( + var/static/list/do_not_preserve_items = typecacheof(list( /obj/item/mmi/posibrain, /obj/item/gun/energy/laser/mounted, /obj/item/gun/energy/e_gun/advtaser/mounted, @@ -215,7 +214,7 @@ /obj/item/gun/energy/printer, /obj/item/gun/energy/kinetic_accelerator/cyborg, /obj/item/gun/energy/laser/cyborg - ) + )) /obj/machinery/cryopod/Initialize(mapload) . = ..() @@ -287,14 +286,14 @@ #define CRYO_DESTROY 0 #define CRYO_PRESERVE 1 #define CRYO_OBJECTIVE 2 +#define CRYO_IGNORE 3 /obj/machinery/cryopod/proc/should_preserve_item(obj/item/I) for(var/datum/objective_item/steal/T in control_computer.theft_cache) if(istype(I, T.targetitem) && T.check_special_completion(I)) return CRYO_OBJECTIVE - for(var/T in preserve_items) - if(istype(I, T) && !(I.type in do_not_preserve_items)) - return CRYO_PRESERVE + if(preserve_items[I] && !do_not_preserve_items[I]) + return CRYO_PRESERVE return CRYO_DESTROY // This function can not be undone; do not call this unless you are sure @@ -303,52 +302,47 @@ find_control_computer() var/mob/living/mob_occupant = occupant + var/list/obj/item/cryo_items = list() //Handle Borg stuff first if(iscyborg(mob_occupant)) var/mob/living/silicon/robot/R = mob_occupant - - R.contents -= R.mmi - qdel(R.mmi) + if(R.mmi?.brain) + cryo_items[R.mmi] = CRYO_IGNORE + cryo_items[R.mmi.brain] = CRYO_IGNORE for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc for(var/obj/item/O in I) // the things inside the tools, if anything; mainly for janiborg trash bags - if(should_preserve_item(O) != CRYO_DESTROY) // Preserve important things inside the item - continue + cryo_items[O] = should_preserve_item(O) O.forceMove(src) R.module.remove_module(I, TRUE) //delete the module itself so it doesn't transfer over. //Drop all items into the pod. for(var/obj/item/I in mob_occupant) - mob_occupant.doUnEquip(I) - I.forceMove(src) - + if(cryo_items[I] == CRYO_IGNORE) + continue + cryo_items[I] = should_preserve_item(I) + mob_occupant.transferItemToLoc(I, src, TRUE) if(I.contents.len) //Make sure we catch anything not handled by qdel() on the items. - if(should_preserve_item(I) != CRYO_DESTROY) // Don't remove the contents of things that need preservation + if(cryo_items[I] != CRYO_DESTROY) // Don't remove the contents of things that need preservation continue for(var/obj/item/O in I.contents) - if(istype(O, /obj/item/tank)) //Stop eating pockets, you fuck! - continue + cryo_items[O] = should_preserve_item(O) O.forceMove(src) - //Delete all items not on the preservation list. - var/list/items = contents - items -= mob_occupant // Don't delete the occupant - - for(var/obj/item/I in items) - if(istype(I, /obj/item/pda)) - var/obj/item/pda/P = I - QDEL_NULL(P.id) - qdel(P) + for(var/A in cryo_items) + var/obj/item/I = A + if(QDELETED(I)) //edge cases and DROPDEL. continue - - var/preserve = should_preserve_item(I) - if(preserve == CRYO_DESTROY) + var/preserve = cryo_items[I] + if(preserve == CRYO_IGNORE) + continue + else if(preserve == CRYO_DESTROY) qdel(I) - else if(control_computer && control_computer.allow_items) + else if(control_computer?.allow_items) control_computer.frozen_items += I if(preserve == CRYO_OBJECTIVE) control_computer.objective_items += I - I.loc = null + I.moveToNullspace() else I.forceMove(loc) @@ -417,6 +411,7 @@ #undef CRYO_DESTROY #undef CRYO_PRESERVE #undef CRYO_OBJECTIVE +#undef CRYO_IGNORE /obj/machinery/cryopod/MouseDrop_T(mob/living/target, mob/user) if(!istype(target) || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || !ismob(target) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled) @@ -443,29 +438,24 @@ var/generic_plsnoleave_message = " Please adminhelp before leaving the round, even if there are no administrators online!" if(target == user && world.time - target.client.cryo_warned > 5 MINUTES)//if we haven't warned them in the last 5 minutes - var/caught = FALSE + var/list/caught_string + var/addendum = "" if(target.mind.assigned_role in GLOB.command_positions) - alert("You're a Head of Staff![generic_plsnoleave_message] Be sure to put your locker items back into your locker!") - caught = TRUE + LAZYADD(caught_string, "Head of Staff") + addendum = " Be sure to put your locker items back into your locker!" if(iscultist(target) || is_servant_of_ratvar(target)) - to_chat(target, "You're a Cultist![generic_plsnoleave_message]") - caught = TRUE + LAZYADD(caught_string, "Cultist") if(is_devil(target)) - alert("You're a Devil![generic_plsnoleave_message]") - caught = TRUE - if(istype(SSticker.mode, /datum/antagonist/gang)) - if(target.mind.has_antag_datum(/datum/antagonist/gang)) - alert("You're a Gangster![generic_plsnoleave_message]") - caught = TRUE - if(istype(SSticker.mode, /datum/antagonist/rev)) - if(target.mind.has_antag_datum(/datum/antagonist/rev/head)) - alert("You're a Head Revolutionary![generic_plsnoleave_message]") - caught = TRUE - else if(target.mind.has_antag_datum(/datum/antagonist/rev)) - alert("You're a Revolutionary![generic_plsnoleave_message]") - caught = TRUE + LAZYADD(caught_string, "Devil") + if(target.mind.has_antag_datum(/datum/antagonist/gang)) + LAZYADD(caught_string, "Gangster") + if(target.mind.has_antag_datum(/datum/antagonist/rev/head)) + LAZYADD(caught_string, "Head Revolutionary") + if(target.mind.has_antag_datum(/datum/antagonist/rev)) + LAZYADD(caught_string, "Revolutionary") - if(caught) + if(caught_string) + alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]") target.client.cryo_warned = world.time return diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 6b0f00ca2e..6b62d18d01 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -202,6 +202,8 @@ for(var/i in 1 to 10) spawn_atom_to_turf(/obj/effect/temp_visual/hierophant/telegraph/edge, src, 1, FALSE) sleep(5) + if(QDELETED(src)) + return #define DISCO_INFENO_RANGE (rand(85, 115)*0.01) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index ebc2533124..221e35118e 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -79,7 +79,7 @@ try_detonate(TRUE) //Counter terrorists win else if(!active || defused) - if(defused && payload in src) + if(defused && (payload in src)) payload.defuse() countdown.stop() STOP_PROCESSING(SSfastprocess, src) diff --git a/code/game/machinery/telecomms/machines/receiver.dm b/code/game/machinery/telecomms/machines/receiver.dm index 0fd3aec012..4dd3af036c 100644 --- a/code/game/machinery/telecomms/machines/receiver.dm +++ b/code/game/machinery/telecomms/machines/receiver.dm @@ -33,7 +33,7 @@ for(var/obj/machinery/telecomms/hub/H in links) for(var/obj/machinery/telecomms/relay/R in H.links) - if(R.can_receive(signal) && R.z in signal.levels) + if(R.can_receive(signal) && (R.z in signal.levels)) return TRUE return FALSE diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index b279f90740..6891719f97 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -867,7 +867,7 @@ return /obj/mecha/proc/moved_inside(mob/living/carbon/human/H) - if(H && H.client && H in range(1)) + if(H?.client && (H in range(1))) occupant = H H.forceMove(src) H.update_mouse_pointer() diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 41f8984570..845b208db1 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -146,7 +146,7 @@ ..() if(href_list["drop_from_cargo"]) var/obj/O = locate(href_list["drop_from_cargo"]) - if(O && O in src.cargo) + if(O && (O in cargo)) occupant_message("You unload [O].") O.forceMove(drop_location()) cargo -= O diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 30e7c8be05..5720d5ce34 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -11,7 +11,7 @@ LAZYINITLIST(blood_DNA) //Kinda needed if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0) icon_state = pick(random_icon_states) - create_reagents(300) + create_reagents(300, NONE, NO_REAGENTS_VALUE) if(loc && isturf(loc)) for(var/obj/effect/decal/cleanable/C in loc) if(C != src && C.type == type && !QDELETED(C)) diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index 38a1a6089e..f98b4937ef 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -94,7 +94,7 @@ /obj/effect/particle_effect/foam/Initialize() . = ..() MakeSlippery() - create_reagents(1000) //limited by the size of the reagent holder anyway. + create_reagents(1000, NONE, NO_REAGENTS_VALUE) //limited by the size of the reagent holder anyway. START_PROCESSING(SSfastprocess, src) playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3) diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 40452f68e2..80c0db2b7d 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -32,7 +32,7 @@ /obj/effect/particle_effect/smoke/Initialize() . = ..() - create_reagents(500) + create_reagents(500, NONE, NO_REAGENTS_VALUE) START_PROCESSING(SSobj, src) diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index e63474dd6f..b7c76cad2d 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -67,7 +67,7 @@ L.Remove() // make some colorful reagent, and apply it to the lungs - L.create_reagents(10) + L.create_reagents(10, NONE, NO_REAGENTS_VALUE) L.reagents.add_reagent(/datum/reagent/colorful_reagent, 10) L.reagents.reaction(L, TOUCH, 1) diff --git a/code/game/objects/items/boombox.dm b/code/game/objects/items/boombox.dm index 10d12f1973..3b93480e43 100644 --- a/code/game/objects/items/boombox.dm +++ b/code/game/objects/items/boombox.dm @@ -23,7 +23,7 @@ if(!boomingandboxing) var/list/tracklist = list() for(var/datum/track/S in SSjukeboxes.songs) - if(istype(S) && S.song_associated_id in availabletrackids) + if(istype(S) && (S.song_associated_id in availabletrackids)) tracklist[S.song_name] = S var/selected = input(user, "Play song", "Track:") as null|anything in tracklist if(QDELETED(src) || !selected || !istype(tracklist[selected], /datum/track)) diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 1186ea8001..cd163e90a4 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -122,7 +122,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/cigarette/Initialize() . = ..() - create_reagents(chem_volume, INJECTABLE | NO_REACT) // so it doesn't react until you light it + create_reagents(chem_volume, INJECTABLE | NO_REACT, NO_REAGENTS_VALUE) // so it doesn't react until you light it if(list_reagents) reagents.add_reagent_list(list_reagents) if(starts_lit) @@ -717,7 +717,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/Initialize(mapload, param_color) . = ..() - create_reagents(chem_volume, NO_REACT) // so it doesn't react until you light it + create_reagents(chem_volume, NO_REACT, NO_REAGENTS_VALUE) // so it doesn't react until you light it reagents.add_reagent(/datum/reagent/drug/nicotine, 50) if(!icon_state) if(!param_color) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 81c5083ef7..2e80325d9f 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -96,7 +96,7 @@ charges_left = charges if(!reagents) - create_reagents(charges_left * volume_multiplier) + create_reagents(charges_left * volume_multiplier, NONE, NO_REAGENTS_VALUE) reagents.clear_reagents() var/total_weight = 0 @@ -619,7 +619,7 @@ is_capped = TRUE self_contained = FALSE // Don't disappear when they're empty can_change_colour = TRUE - + reagent_contents = list(/datum/reagent/fuel = 1, /datum/reagent/consumable/ethanol = 1) pre_noise = TRUE diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index a82f99064e..e43aa681ce 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -51,7 +51,7 @@ /obj/item/flashlight/attack(mob/living/carbon/M, mob/living/carbon/human/user) add_fingerprint(user) - if(istype(M) && on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH)) + if(istype(M) && on && (user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH))) if((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head @@ -390,7 +390,7 @@ return TRUE /obj/item/flashlight/emp/attack(mob/living/M, mob/living/user) - if(on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH)) // call original attack when examining organs + if(on && (user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH))) // call original attack when examining organs ..() return diff --git a/code/game/objects/items/mop.dm b/code/game/objects/items/mop.dm index a8b28f2544..233eabd4ca 100644 --- a/code/game/objects/items/mop.dm +++ b/code/game/objects/items/mop.dm @@ -21,7 +21,7 @@ /obj/item/mop/New() ..() - create_reagents(mopcap) + create_reagents(mopcap, NONE, NO_REAGENTS_VALUE) /obj/item/mop/proc/clean(turf/A) diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index 5fd9600a97..ac490b0122 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -44,9 +44,9 @@ if(H.stat == DEAD || H == user) continue if(H.mind && (has_job_loyalties || has_role_loyalties)) - if(has_job_loyalties && H.mind.assigned_role in job_loyalties) + if(has_job_loyalties && (H.mind.assigned_role in job_loyalties)) inspired += H - else if(has_role_loyalties && H.mind.special_role in role_loyalties) + else if(has_role_loyalties && (H.mind.special_role in role_loyalties)) inspired += H else if(check_inspiration(H)) inspired += H diff --git a/code/game/objects/structures/crates_lockers/closets/genpop.dm b/code/game/objects/structures/crates_lockers/closets/genpop.dm index 80b64aaedc..2b263bb1ed 100644 --- a/code/game/objects/structures/crates_lockers/closets/genpop.dm +++ b/code/game/objects/structures/crates_lockers/closets/genpop.dm @@ -95,7 +95,7 @@ if(user.lying && get_dist(src, user) > 0) return - if(!broken && registered_id != null && registered_id in user.held_items) + if(!broken && registered_id != null && (registered_id in user.held_items)) handle_prisoner_id(user) return diff --git a/code/game/objects/structures/traps.dm b/code/game/objects/structures/traps.dm index 9c1859df08..2cdc082ef3 100644 --- a/code/game/objects/structures/traps.dm +++ b/code/game/objects/structures/traps.dm @@ -35,7 +35,7 @@ . = ..() if(!isliving(user)) return - if(user.mind && user.mind in immune_minds) + if(user.mind && (user.mind in immune_minds)) return if(get_dist(user, src) <= 1) . += "You reveal [src]!" diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index da7c264774..14906bc83a 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -303,7 +303,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null //These three are weird. For best performance, they are only a number when they're not being changed by the SDQL searching/execution code. They only become numbers when they finish changing. var/list/obj_count_all var/list/obj_count_eligible - var/list/obj_count_finished + var/obj_count_finished //Statclick var/obj/effect/statclick/SDQL2_delete/delete_click @@ -682,7 +682,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null SDQL2_TICK_CHECK SDQL2_HALT_CHECK if(islist(obj_count_finished)) - obj_count_finished = obj_count_finished.len + obj_count_finished = length(obj_count_finished) state = SDQL2_STATE_SWITCHING /datum/SDQL2_query/proc/SDQL_print(object, list/text_list, print_nulls = TRUE) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index cf6d54336e..54d6a864fd 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -487,7 +487,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(alert("This mob is being controlled by [M.key]. Are you sure you wish to assume control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes") return else - var/mob/dead/observer/ghost = new/mob/dead/observer(M,1) + var/mob/dead/observer/ghost = new/mob/dead/observer(get_turf(M), M) ghost.ckey = M.ckey message_admins("[key_name_admin(usr)] assumed direct control of [M].") log_admin("[key_name(usr)] assumed direct control of [M].") diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 24e80fd8f3..35ab3927d4 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -135,7 +135,7 @@ GLOBAL_LIST_EMPTY(dirty_vars) if(!(locate(/obj/structure/grille) in T)) var/window_check = 0 for(var/obj/structure/window/W in T) - if (W.dir == turn(C1.dir,180) || W.dir in list(5,6,9,10) ) + if(W.dir == turn(C1.dir,180) || (W.dir in list(5,6,9,10))) window_check = 1 break if(!window_check) diff --git a/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm b/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm index d0940ebb7a..00db2b0d72 100644 --- a/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm +++ b/code/modules/antagonists/clockcult/clock_structures/ocular_warden.dm @@ -118,7 +118,7 @@ continue if(ishostile(L)) var/mob/living/simple_animal/hostile/H = L - if(("ratvar" in H.faction) || (!H.mind && "neutral" in H.faction)) + if(("ratvar" in H.faction) || (!H.mind && ("neutral" in H.faction))) continue if(ismegafauna(H) || (!H.mind && H.AIStatus == AI_OFF)) continue diff --git a/code/modules/cargo/export_scanner.dm b/code/modules/cargo/export_scanner.dm index 9c523c194f..80fd05cf8c 100644 --- a/code/modules/cargo/export_scanner.dm +++ b/code/modules/cargo/export_scanner.dm @@ -36,6 +36,8 @@ var/price = 0 for(var/x in ex.total_amount) price += ex.total_value[x] + for(var/x in ex.reagents_value) + price += ex.reagents_value[x] if(price) to_chat(user, "Scanned [O], value: [price] credits[O.contents.len ? " (contents included)" : ""].") diff --git a/code/modules/cargo/exports.dm b/code/modules/cargo/exports.dm index fca10ac01c..bb90fa717a 100644 --- a/code/modules/cargo/exports.dm +++ b/code/modules/cargo/exports.dm @@ -49,13 +49,13 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they sold = E.sell_object(thing, report, dry_run, allowed_categories , apply_elastic) report.exported_atoms += " [thing.name]" break - if(thing.reagents) + if(thing.reagents?.value_multiplier) for(var/A in thing.reagents.reagent_list) var/datum/reagent/R = A if(!R.value) continue report.reagents_volume[R.name] += R.volume - report.reagents_value[R.name] += R.volume * R.value + report.reagents_value[R.name] += round(R.volume * R.value * thing.reagents.value_multiplier) if(!dry_run && (sold || delete_unsold)) if(ismob(thing)) thing.investigate_log("deleted through cargo export",INVESTIGATE_CARGO) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 150f066886..0f4c03cdbc 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -65,6 +65,9 @@ GLOBAL_LIST_INIT(hallucination_list, list( //Returns a random turf in a ring around the target mob, useful for sound hallucinations /datum/hallucination/proc/random_far_turf() + var/turf/target_T = get_turf(target) + if(!target_T) + return var/x_based = prob(50) var/first_offset = pick(-8,-7,-6,-5,5,6,7,8) var/second_offset = rand(-8,8) @@ -76,7 +79,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( else y_off = first_offset x_off = second_offset - var/turf/T = locate(target.x + x_off, target.y + y_off, target.z) + var/turf/T = locate(target_T.x + x_off, target_T.y + y_off, target_T.z) return T /obj/effect/hallucination diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 7bd5e66430..d39492d9bf 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -9,6 +9,7 @@ lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi' reagent_flags = OPENCONTAINER + reagent_value = DEFAULT_REAGENTS_VALUE var/gulp_size = 5 //This is now officially broken ... need to think of a nice way to fix it. possible_transfer_amounts = list(5,10,15,20,25,30,50) volume = 50 diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm index 6d3f007fd9..2af24080cb 100644 --- a/code/modules/food_and_drinks/food.dm +++ b/code/modules/food_and_drinks/food.dm @@ -12,6 +12,7 @@ possible_transfer_amounts = list() volume = 50 //Sets the default container amount for all food items. reagent_flags = INJECTABLE + reagent_value = NO_REAGENTS_VALUE resistance_flags = FLAMMABLE var/foodtype = NONE var/last_check_time diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index c068c1aa40..0b277e328b 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -71,10 +71,11 @@ All foods are distributed among various categories. Use common sense. if(!eater) return if(!reagents.total_volume) - var/obj/item/trash_item = generate_trash(eater) + var/mob/living/location = loc + var/obj/item/trash_item = generate_trash(location) qdel(src) - eater.put_in_hands(trash_item) - + if(istype(location)) + location.put_in_hands(trash_item) /obj/item/reagent_containers/food/snacks/attack_self(mob/user) return @@ -245,7 +246,7 @@ All foods are distributed among various categories. Use common sense. return TRUE /obj/item/reagent_containers/food/snacks/proc/initialize_slice(obj/item/reagent_containers/food/snacks/slice, reagents_per_slice) - slice.create_reagents(slice.volume) + slice.create_reagents(slice.volume, reagent_flags, reagent_value) reagents.trans_to(slice,reagents_per_slice) if(name != initial(name)) slice.name = "slice of [name]" @@ -279,7 +280,7 @@ All foods are distributed among various categories. Use common sense. // initialize_cooked_food() is called when microwaving the food /obj/item/reagent_containers/food/snacks/proc/initialize_cooked_food(obj/item/reagent_containers/food/snacks/S, cooking_efficiency = 1) - S.create_reagents(S.volume) + S.create_reagents(S.volume, reagent_flags, reagent_value) if(reagents) reagents.trans_to(S, reagents.total_volume) if(S.bonus_reagents && S.bonus_reagents.len) diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 4406491f10..24f60300fa 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -212,7 +212,7 @@ meatslab.throw_at(pick(nearby_turfs),i,3) for (var/turfs=1 to meat_produced) var/turf/gibturf = pick(nearby_turfs) - if (!gibturf.density && src in view(gibturf)) + if (!gibturf.density && (src in view(gibturf))) new gibtype(gibturf,i,diseases) pixel_x = initial(pixel_x) //return to its spot after shaking diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index bd556b8397..b163c6ba97 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -220,7 +220,7 @@ unprocess() qdel(src) if(!bomb_active || bomb_defused) - if(bomb_defused && bomb in src) + if(bomb_defused && (bomb in src)) bomb.defuse() bomb_active = FALSE unprocess() diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index f99cfde92d..65d942ca2b 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -15,6 +15,7 @@ // Saves us from having to define each stupid grown's dried_type as itself. // If you don't want a plant to be driable (watermelons) set this to null in the time definition. resistance_flags = FLAMMABLE + reagent_value = HARVEST_REAGENTS_VALUE var/dry_grind = FALSE //If TRUE, this object needs to be dry to be ground up var/can_distill = TRUE //If FALSE, this object cannot be distilled into an alcohol. var/distill_reagent //If NULL and this object can be distilled, it uses a generic fruit_wine reagent and adjusts its variables. diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index ef925e3965..f4859ffb1e 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -11,7 +11,7 @@ /obj/item/grown/Initialize(newloc, obj/item/seeds/new_seed) . = ..() - create_reagents(50) + create_reagents(50, NONE, HARVEST_REAGENTS_VALUE) if(new_seed) seed = new_seed.Copy() diff --git a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm index 4ce5597af8..eb4d9a3366 100644 --- a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm @@ -18,7 +18,7 @@ write_data_to_pin(new_data) /datum/integrated_io/dir/write_data_to_pin(var/new_data) - if(isnull(new_data) || new_data in list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)/* + list(UP, DOWN)*/) + if(isnull(new_data) || (new_data in GLOB.alldirs/* + list(UP, DOWN)*/)) data = new_data holder.on_data_written() diff --git a/code/modules/jobs/job_exp.dm b/code/modules/jobs/job_exp.dm index f99bf65071..5ff791c5f3 100644 --- a/code/modules/jobs/job_exp.dm +++ b/code/modules/jobs/job_exp.dm @@ -40,7 +40,7 @@ GLOBAL_PROTECT(exp_to_update) return exp_type /proc/job_is_xp_locked(jobtitle) - if(!CONFIG_GET(flag/use_exp_restrictions_heads) && jobtitle in (GLOB.command_positions | list("AI"))) + if(!CONFIG_GET(flag/use_exp_restrictions_heads) && (jobtitle in (GLOB.command_positions | list("AI")))) return FALSE if(!CONFIG_GET(flag/use_exp_restrictions_other) && !(jobtitle in (GLOB.command_positions | list("AI")))) return FALSE diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 10d9c5fb02..325ea6e8ed 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -55,7 +55,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) var/deadchat_name var/datum/spawners_menu/spawners_menu -/mob/dead/observer/Initialize() +/mob/dead/observer/Initialize(mapload, mob/body) set_invisibility(GLOB.observer_default_invisibility) verbs += list( @@ -76,11 +76,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) updateallghostimages() - var/turf/T - var/mob/body = loc - if(ismob(body)) - T = get_turf(body) //Where is the body located? - + if(body) gender = body.gender if(body.mind && body.mind.name) name = body.mind.name @@ -105,14 +101,15 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) update_icon() - if(!T) + if(!isturf(loc)) + var/turf/T var/list/turfs = get_area_turfs(/area/shuttle/arrival) if(turfs.len) T = pick(turfs) else T = SSmapping.get_station_center() - forceMove(T) + forceMove(T) if(!name) //To prevent nameless ghosts name = random_unique_name(gender) @@ -196,13 +193,13 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) else ghostimage_default.icon_state = new_form - if(ghost_accs >= GHOST_ACCS_DIR && icon_state in GLOB.ghost_forms_with_directions_list) //if this icon has dirs AND the client wants to show them, we make sure we update the dir on movement + if(ghost_accs >= GHOST_ACCS_DIR && (icon_state in GLOB.ghost_forms_with_directions_list)) //if this icon has dirs AND the client wants to show them, we make sure we update the dir on movement updatedir = 1 else updatedir = 0 //stop updating the dir in case we want to show accessories with dirs on a ghost sprite without dirs setDir(2 )//reset the dir to its default so the sprites all properly align up - if(ghost_accs == GHOST_ACCS_FULL && icon_state in GLOB.ghost_forms_with_accessories_list) //check if this form supports accessories and if the client wants to show them + if(ghost_accs == GHOST_ACCS_FULL && (icon_state in GLOB.ghost_forms_with_accessories_list)) //check if this form supports accessories and if the client wants to show them var/datum/sprite_accessory/S if(facial_hair_style) S = GLOB.facial_hair_styles_list[facial_hair_style] @@ -268,7 +265,7 @@ Works together with spawning an observer, noted above. if(!key || key[1] == "@" || (SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE, can_reenter_corpse, special, penalize) & COMPONENT_BLOCK_GHOSTING)) return //mob has no key, is an aghost or some component hijacked. stop_sound_channel(CHANNEL_HEARTBEAT) //Stop heartbeat sounds because You Are A Ghost Now - var/mob/dead/observer/ghost = new(src) // Transfer safety to observer spawning proc. + var/mob/dead/observer/ghost = new(get_turf(src), src) // Transfer safety to observer spawning proc. SStgui.on_transfer(src, ghost) // Transfer NanoUIs. ghost.can_reenter_corpse = can_reenter_corpse if (client && client.prefs && client.prefs.auto_ooc) @@ -310,8 +307,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/obj/machinery/cryopod/C = loc C.despawn_occupant() else - ghostize(0, penalize = TRUE, voluntary = TRUE) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3 suicide_log(TRUE) + ghostize(FALSE, penalize = TRUE, voluntary = TRUE) //FALSE parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3 + /mob/camera/verb/ghost() set category = "OOC" diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index ef33afec25..6460d8331d 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -3,7 +3,7 @@ /mob/living/carbon/Initialize() . = ..() - create_reagents(1000) + create_reagents(1000, NONE, NO_REAGENTS_VALUE) update_body_parts() //to update the carbon's new bodyparts appearance GLOB.carbon_list += src blood_volume = (BLOOD_VOLUME_NORMAL * blood_ratio) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 1be9a0d72d..433f6a43b5 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -362,7 +362,7 @@ return // Also no decay if corpse chilled or not organic/undead - if(bodytemperature <= T0C-10 || (!(MOB_ORGANIC in mob_biotypes) && !(MOB_UNDEAD in mob_biotypes))) + if((bodytemperature <= T0C-10) || !(mob_biotypes & (MOB_ORGANIC|MOB_UNDEAD))) return // Wait a bit before decaying diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 45f9662c9a..7cd79bb1ab 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -25,7 +25,7 @@ /mob/living/proc/spawn_gibs(with_bodyparts, atom/loc_override) var/location = loc_override ? loc_override.drop_location() : drop_location() - if(MOB_ROBOTIC in mob_biotypes) + if((MOB_ROBOTIC) in (mob_biotypes)) new /obj/effect/gibspawner/robot(location, src, get_static_viruses()) else new /obj/effect/gibspawner/generic(location, src, get_static_viruses()) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index b0f627f82b..35b49cce8e 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -258,7 +258,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( 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 + 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 @@ -368,7 +368,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( if(message_mode == MODE_HEADSET) imp.radio.talk_into(src, message, , spans, language) return ITALICS | REDUCE_RANGE - if(message_mode == MODE_DEPARTMENT || message_mode in GLOB.radiochannels) + if(message_mode == MODE_DEPARTMENT || (message_mode in GLOB.radiochannels)) imp.radio.talk_into(src, message, message_mode, spans, language) return ITALICS | REDUCE_RANGE diff --git a/code/modules/mob/living/silicon/pai/update_icon.dm b/code/modules/mob/living/silicon/pai/update_icon.dm index 9e40b71c5d..8c051d9c41 100644 --- a/code/modules/mob/living/silicon/pai/update_icon.dm +++ b/code/modules/mob/living/silicon/pai/update_icon.dm @@ -8,9 +8,9 @@ var/list/states = icon_states(icon) icon_state = "" if(resting) //The next line is some bullshit but I can make it worse if you want and make it a single line instead of four.. :) - if(dynamic_chassis_sit && ("sit") in states) + if(dynamic_chassis_sit && ("sit" in states)) icon_state = "sit" - else if(dynamic_chassis_bellyup && ("bellyup") in states) + else if(dynamic_chassis_bellyup && ("bellyup" in states)) icon_state = "bellyup" else if("rest" in states) icon_state = "rest" diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index e304f13d1d..c6af8bd4c2 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -340,7 +340,7 @@ /obj/item/robot_module/medical/be_transformed_to(obj/item/robot_module/old_module) var/mob/living/silicon/robot/R = loc var/medmodels = list("Default", "Heavy", "Sleek", "Marina", "Droid", "Eyebot", "Medihound", "Medihound Dark", "Vale") - if(R.client && R.client.ckey in list("nezuli")) + if(R.client && (R.client.ckey in list("nezuli"))) medmodels += "Alina" var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in medmodels if(!borg_icon) @@ -437,7 +437,7 @@ /obj/item/robot_module/engineering/be_transformed_to(obj/item/robot_module/old_module) var/mob/living/silicon/robot/R = loc var/list/engymodels = list("Default", "Default - Treads", "Heavy", "Sleek", "Marina", "Can", "Spider", "Loader","Handy", "Pup Dozer", "Vale") - if(R.client && R.client.ckey in list("nezuli")) + if(R.client && (R.client.ckey in list("nezuli"))) engymodels += "Alina" var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in engymodels if(!borg_icon) @@ -515,7 +515,7 @@ /obj/item/robot_module/security/be_transformed_to(obj/item/robot_module/old_module) var/mob/living/silicon/robot/R = loc var/list/secmodels = list("Default", "Default - Treads", "Heavy", "Sleek", "Can", "Marina", "Spider", "K9", "K9 Dark", "Vale") - if(R.client && R.client.ckey in list("nezuli")) + if(R.client && (R.client.ckey in list("nezuli"))) secmodels += "Alina" var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in secmodels if(!borg_icon) diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 78305b5b44..fad519838a 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -454,7 +454,7 @@ name = "udder" /obj/item/udder/Initialize() - create_reagents(50) + create_reagents(50, NONE, NO_REAGENTS_VALUE) reagents.add_reagent(/datum/reagent/consumable/milk, 20) . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index d17a45b2fb..5ad787b143 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -191,7 +191,7 @@ /obj/effect/proc_holder/spell/aoe_turf/blindness/cast(list/targets,mob/user = usr) for(var/mob/living/L in GLOB.alive_mob_list) var/turf/T = get_turf(L.loc) - if(T && T in targets) + if(T && (T in targets)) L.blind_eyes(4) return diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index f378906db1..e79e24b885 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -467,11 +467,11 @@ return return - if(parrot_interest && parrot_interest in view(src)) + if(parrot_interest && (parrot_interest in view(src))) parrot_state = PARROT_SWOOP | PARROT_STEAL return - if(parrot_perch && parrot_perch in view(src)) + if(parrot_perch && (parrot_perch in view(src))) parrot_state = PARROT_SWOOP | PARROT_RETURN return diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 5a1a794d4e..2ea2a412f8 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -97,7 +97,7 @@ else var/datum/action/innate/slime/evolve/E = new E.Grant(src) - create_reagents(100) + create_reagents(100, NONE, NO_REAGENTS_VALUE) set_colour(new_colour) . = ..() nutrition = 700 diff --git a/code/modules/projectiles/guns/energy/dueling.dm b/code/modules/projectiles/guns/energy/dueling.dm index 6fe10eb3b6..615bb5d939 100644 --- a/code/modules/projectiles/guns/energy/dueling.dm +++ b/code/modules/projectiles/guns/energy/dueling.dm @@ -320,10 +320,10 @@ if(C.setting == counter_setting) return BULLET_ACT_BLOCK - var/mob/living/L = target - if(!istype(target)) + if(!isliving(target)) return BULLET_ACT_BLOCK + var/mob/living/L = target switch(hugbox) if(DUEL_HUGBOX_NONE) var/obj/item/bodypart/B = L.get_bodypart(BODY_ZONE_HEAD) diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm index 3f418df75b..b5a9eb8d69 100644 --- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm +++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm @@ -6,7 +6,7 @@ /obj/item/projectile/bullet/dart/Initialize() . = ..() - create_reagents(50, NO_REACT) + create_reagents(50, NO_REACT, NO_REAGENTS_VALUE) /obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = FALSE, skip = FALSE) if(iscarbon(target)) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 95e104ba68..4c240660a9 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -61,8 +61,9 @@ var/reactedVol = 0 //how much of the reagent is reacted during a fermireaction var/fermiIsReacting = FALSE //that prevents multiple reactions from occurring (i.e. add_reagent calls to process_reactions(), this stops any extra reactions.) var/fermiReactID //instance of the chem reaction used during a fermireaction, kept here so it's cache isn't lost between loops/procs. + var/value_multiplier = DEFAULT_REAGENTS_VALUE //used for cargo reagents selling. -/datum/reagents/New(maximum=100, new_flags) +/datum/reagents/New(maximum=100, new_flags = NONE, new_value = DEFAULT_REAGENTS_VALUE) maximum_volume = maximum //I dislike having these here but map-objects are initialised before world/New() is called. >_> @@ -72,6 +73,7 @@ build_chemical_reactions_list() reagents_holder_flags = new_flags + value_multiplier = new_value /datum/reagents/Destroy() . = ..() @@ -1147,10 +1149,10 @@ // Convenience proc to create a reagents holder for an atom // Max vol is maximum volume of holder -/atom/proc/create_reagents(max_vol, flags) +/atom/proc/create_reagents(max_vol, flags, new_value) if(reagents) qdel(reagents) - reagents = new/datum/reagents(max_vol, flags) + reagents = new/datum/reagents(max_vol, flags, new_value) reagents.my_atom = src /proc/get_random_reagent_id() // Returns a random reagent type minus blacklisted reagents diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index f41a6956a1..ed68c25cb6 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -270,7 +270,7 @@ if(!is_operational() || recording_recipe) return var/amount = text2num(params["amount"]) - if(beaker && amount in beaker.possible_transfer_amounts) + if(beaker && (amount in beaker.possible_transfer_amounts)) beaker.reagents.remove_all(amount) work_animation() . = TRUE diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index ccdbbcc915..4b65776ce9 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -551,7 +551,7 @@ All effects don't start immediately, but rather get worse over time; the rate is value = 1 /datum/reagent/consumable/ethanol/screwdrivercocktail/on_mob_life(mob/living/carbon/M) - if(M.mind && M.mind.assigned_role in list("Station Engineer", "Atmospheric Technician", "Chief Engineer")) //Engineers lose radiation poisoning at a massive rate. + if(M.mind && (M.mind.assigned_role in list("Station Engineer", "Atmospheric Technician", "Chief Engineer"))) //Engineers lose radiation poisoning at a massive rate. M.radiation = max(M.radiation - 25, 0) return ..() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 6984aceef5..6d33701a34 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -338,8 +338,8 @@ /datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M) if(!data) - data = 1 - data++ + data = list("misc" = 1) + data["misc"]++ M.jitteriness = min(M.jitteriness+4,10) if(iscultist(M)) for(var/datum/action/innate/cult/blood_magic/BM in M.actions) @@ -348,7 +348,7 @@ to_chat(M, "Your blood rites falter as holy water scours your body!") for(var/datum/action/innate/cult/blood_spell/BS in BM.spells) qdel(BS) - if(data >= 25) // 10 units, 45 seconds @ metabolism 0.4 units & tick rate 1.8 sec + if(data["misc"] >= 25) // 10 units, 45 seconds @ metabolism 0.4 units & tick rate 1.8 sec if(!M.stuttering) M.stuttering = 1 M.stuttering = min(M.stuttering+4, 10) @@ -369,7 +369,7 @@ "You can't save him. Nothing can save him now", "It seems that Nar'Sie will triumph after all")].") if("emote") M.visible_message("[M] [pick("whimpers quietly", "shivers as though cold", "glances around in paranoia")].") - if(data >= 60) // 30 units, 135 seconds + if(data["misc"] >= 60) // 30 units, 135 seconds if(iscultist(M) || is_servant_of_ratvar(M)) if(iscultist(M)) SSticker.mode.remove_cultist(M.mind, FALSE, TRUE) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 6d5c546e7e..c178aad717 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -7,7 +7,8 @@ var/amount_per_transfer_from_this = 5 var/list/possible_transfer_amounts = list(5,10,15,20,25,30) var/volume = 30 - var/reagent_flags //used to determine the reagent holder flags on add_initial_reagents() + var/reagent_flags = NONE //used to determine the reagent holder flags on add_initial_reagents() + var/reagent_value = DEFAULT_REAGENTS_VALUE //same as above but for the holder value multiplier. var/list/list_reagents = null var/spawned_disease = null var/disease_amount = 20 @@ -22,7 +23,7 @@ volume = vol if(container_flags & APTFT_VERB && length(possible_transfer_amounts)) verbs += /obj/item/reagent_containers/proc/set_APTFT - create_reagents(volume, reagent_flags) + create_reagents(volume, reagent_flags, reagent_value) if(spawned_disease) var/datum/disease/F = new spawned_disease() var/list/data = list("blood_DNA" = "UNKNOWN DNA", "blood_type" = "SY","viruses"= list(F)) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 34dd97b0aa..73d0c5eafa 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -19,6 +19,7 @@ Borg Hypospray amount_per_transfer_from_this = 5 volume = 30 possible_transfer_amounts = list() + reagent_value = NO_REAGENTS_VALUE var/mode = 1 var/charge_cost = 50 var/charge_tick = 0 diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 9feec362a4..4e1de85fce 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -44,7 +44,7 @@ if(safe_thing) if(!safe_thing.reagents) - safe_thing.create_reagents(100) + safe_thing.create_reagents(100, NONE, NO_REAGENTS_VALUE) reagents.reaction(safe_thing, TOUCH, fraction) trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this) diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm index 59c956acd6..e7f340887c 100644 --- a/code/modules/reagents/reagent_containers/rags.dm +++ b/code/modules/reagents/reagent_containers/rags.dm @@ -11,6 +11,7 @@ container_flags = APTFT_VERB volume = 5 spillable = FALSE + reagent_value = NO_REAGENTS_VALUE var/wipe_sound var/soak_efficiency = 1 var/extinguish_efficiency = 0 @@ -26,7 +27,7 @@ if(reagents.total_volume) . += "It's soaked. Alt-Click to squeeze it dry, and perhaps gather the liquids into another held open container." -/obj/item/reagent_containers/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity) +/obj/item/reagent_containers/rag/afterattack(atom/A, mob/user,proximity) . = ..() if(!proximity) return @@ -45,7 +46,7 @@ C.visible_message("[user] has touched \the [C] with \the [src].") log_combat(user, C, "touched", log_object) - else if(istype(A) && src in user) + else if(istype(A) && (src in user)) user.visible_message("[user] starts to wipe down [A] with [src]!", "You start to wipe down [A] with [src]...") if(do_after(user, action_speed, target = A)) user.visible_message("[user] finishes wiping off [A]!", "You finish wiping off [A].") diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 4562f348fc..62ca5d658e 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -68,7 +68,7 @@ /obj/item/reagent_containers/spray/proc/spray(atom/A) 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) + 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) diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 0e7cba9776..bdf6e8cc87 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -168,7 +168,7 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list( for(var/chem in ex.reagents_value) var/value = ex.reagents_value[chem] - msg += "[value] credits: received [ex.reagents_volume[chem]]u of [chem].\n" + msg += "[value > 0 ? "+" : ""][value] credits: received [ex.reagents_volume[chem]]u of [chem].\n" SSshuttle.points += value msg = copytext_char(msg, 1, MAX_MESSAGE_LEN) diff --git a/code/modules/spells/spell_types/summonitem.dm b/code/modules/spells/spell_types/summonitem.dm index c4b184cc9b..d0e415fb2a 100644 --- a/code/modules/spells/spell_types/summonitem.dm +++ b/code/modules/spells/spell_types/summonitem.dm @@ -38,7 +38,7 @@ else message = "You must hold the desired item in your hands to mark it for recall." - else if(marked_item && marked_item in hand_items) //unlinking item to the spell + else if(marked_item && (marked_item in hand_items)) //unlinking item to the spell message = "You remove the mark on [marked_item] to use elsewhere." name = "Instant Summons" marked_item = null @@ -78,7 +78,7 @@ if(iscarbon(M)) //Edge case housekeeping var/mob/living/carbon/C = M - if(C.stomach_contents && item_to_retrieve in C.stomach_contents) + if(C.stomach_contents && (item_to_retrieve in C.stomach_contents)) C.stomach_contents -= item_to_retrieve for(var/X in C.bodyparts) var/obj/item/bodypart/part = X diff --git a/code/modules/vore/eating/belly_obj.dm b/code/modules/vore/eating/belly_obj.dm index 460ea74225..e33f748292 100644 --- a/code/modules/vore/eating/belly_obj.dm +++ b/code/modules/vore/eating/belly_obj.dm @@ -190,7 +190,7 @@ if(H && H.client && (isturf(H.loc) || (H.loc != src.contents))) var/sound/eating = GLOB.pred_vore_sounds[vore_sound] SEND_SOUND(H,eating) - else if(H && H in contents && H.client) + else if(H?.client && (H in contents)) var/sound/eating = GLOB.prey_vore_sounds[vore_sound] SEND_SOUND(H,eating) recent_sound = TRUE @@ -246,7 +246,7 @@ if(H && H.client && (isturf(H.loc) || (H.loc != src.contents))) var/sound/releasement = GLOB.pred_release_sounds[release_sound] H.playsound_local(owner.loc, releasement, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF) - else if(H && H in contents && H.client) + else if(H?.client && (H in contents)) var/sound/releasement = GLOB.prey_release_sounds[release_sound] SEND_SOUND(H,releasement) recent_sound = TRUE @@ -302,7 +302,7 @@ if(H && H.client && (isturf(H.loc) || (H.loc != src.contents))) var/sound/releasement = GLOB.pred_release_sounds[release_sound] H.playsound_local(owner.loc, releasement, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF) - else if(H && H in contents && H.client) + else if(H?.client && (H in contents)) var/sound/releasement = GLOB.prey_release_sounds[release_sound] SEND_SOUND(H,releasement) recent_sound = TRUE @@ -364,7 +364,7 @@ if(H && H.client && (isturf(H.loc) || (H.loc != src.contents))) var/sound/eating = GLOB.pred_vore_sounds[vore_sound] H.playsound_local(owner.loc, eating, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF) - else if(H && H in contents && H.client) + else if(H?.client && (H in contents)) var/sound/eating = GLOB.prey_vore_sounds[vore_sound] SEND_SOUND(H,eating) recent_sound = TRUE @@ -586,7 +586,7 @@ for(var/mob/living/H in hearing_mobs) if(H && H.client && (isturf(H.loc) || (H.loc != src.contents))) H.playsound_local(owner.loc, pred_struggle_snuggle, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF) - else if(H && H in contents && H.client) + else if(H && H.client && (H in contents)) SEND_SOUND(H,prey_struggle_snuggle) else diff --git a/code/modules/vore/eating/bellymodes.dm b/code/modules/vore/eating/bellymodes.dm index 6942a2d5a9..ea15892a30 100644 --- a/code/modules/vore/eating/bellymodes.dm +++ b/code/modules/vore/eating/bellymodes.dm @@ -195,7 +195,7 @@ for(var/mob/living/H in hearing_mobs) if(H && H.client && (isturf(H.loc) || (H.loc != src.contents))) SEND_SOUND(H,pred_digest) - else if(H && H in contents && H.client) + else if(H?.client && (H in contents)) SEND_SOUND(H,prey_digest) //No digestion protection for megafauna. diff --git a/dependencies.sh b/dependencies.sh index a2f6873a32..488504b288 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -23,4 +23,4 @@ export NODE_VERSION=12 export PHP_VERSION=5.6 # SpacemanDMM git tag -export SPACEMAN_DMM_VERSION=suite-1.0 +export SPACEMAN_DMM_VERSION=suite-1.2 diff --git a/html/changelogs/AutoChangeLog-pr-10923.yml b/html/changelogs/AutoChangeLog-pr-10923.yml new file mode 100644 index 0000000000..0fd9a0f14e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10923.yml @@ -0,0 +1,4 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Nerfed cargo passive points generation from 500 to 125 creds per minute." diff --git a/html/changelogs/AutoChangeLog-pr-10940.yml b/html/changelogs/AutoChangeLog-pr-10940.yml new file mode 100644 index 0000000000..c0bbfc371a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10940.yml @@ -0,0 +1,5 @@ +author: "Ghommie" +delete-after: True +changes: + - balance: "Some reagent holders (such as cigarettes, food) are not suitable for reagents export anymore, while unprocessed botany crops will only net 1/3 of the standard reagents values." + - bugfix: "Export scanners now include the reagents value in the price report." diff --git a/html/changelogs/AutoChangeLog-pr-10947.yml b/html/changelogs/AutoChangeLog-pr-10947.yml new file mode 100644 index 0000000000..a6f1fb1344 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-10947.yml @@ -0,0 +1,4 @@ +author: "nemvar" +delete-after: True +changes: + - bugfix: "Trash from food now gets generated at the location of the food item, instead of in the hands of the eater." diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index a7b8aa7c10..d5191b0532 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -23,7 +23,7 @@ /obj/item/organ/genital/Initialize(mapload, do_update = TRUE) . = ..() if(fluid_id) - create_reagents(fluid_max_volume) + create_reagents(fluid_max_volume, NONE, NO_REAGENTS_VALUE) if(CHECK_BITFIELD(genital_flags, GENITAL_FUID_PRODUCTION)) reagents.add_reagent(fluid_id, fluid_max_volume) if(do_update) diff --git a/modular_citadel/code/modules/mob/cit_emotes.dm b/modular_citadel/code/modules/mob/cit_emotes.dm index d0ad0d3232..2be83733e5 100644 --- a/modular_citadel/code/modules/mob/cit_emotes.dm +++ b/modular_citadel/code/modules/mob/cit_emotes.dm @@ -14,13 +14,10 @@ emote_type = EMOTE_AUDIBLE /datum/emote/living/insult/run_emote(mob/living/user, params) - var/insult_message = "" - var/miming = user.mind ? user.mind.miming : 0 - if(!user.is_muzzled()) - insult_message += pick_list_replacements(INSULTS_FILE, "insult_gen") - message = insult_message - else if(miming) + if(user.mind?.miming) message = "creatively gesticulates." + else if(!user.is_muzzled()) + message = pick_list_replacements(INSULTS_FILE, "insult_gen") else message = "muffles something." . = ..() @@ -36,7 +33,7 @@ sound = 'modular_citadel/sound/voice/scream_silicon.ogg' if(iscyborg(user)) var/mob/living/silicon/robot/S = user - if(S.cell.charge < 20) + if(S.cell?.charge < 20) to_chat(S, "Scream module deactivated. Please recharge.") return S.cell.use(200)