From e1b719d9260b044e2959aff43aedd787709b83e5 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Thu, 26 Jun 2025 10:38:06 -0700 Subject: [PATCH] [MIRROR] bunch of issues (#11109) Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- code/__defines/organ_external.dm | 10 ++++++++++ code/__defines/text.dm | 3 ++- .../_onclick/hud/action/action_screen_objects.dm | 2 +- code/datums/forensics_crime.dm | 2 ++ code/modules/examine/descriptions/turfs.dm | 2 +- .../ore_redemption_machine/equipment_vendor.dm | 10 +++++----- .../mob/living/carbon/human/human_helpers.dm | 2 +- .../species/station/protean/protean_species.dm | 2 +- .../silicon/robot/sprites/_sprite_datum.dm | 1 + .../mob/living/silicon/robot/sprites/combat.dm | 1 + .../living/simple_mob/subtypes/vore/plants.dm | 4 ++-- .../living/simple_mob/subtypes/vore/solargrub.dm | 2 +- code/modules/projectiles/guns/energy/cyborg.dm | 16 +++++++++++++++- .../reagents/reactions/instant/instant.dm | 2 +- code/modules/reagents/reagent_containers/pill.dm | 10 +++++----- code/modules/vore/eating/belly_messages.dm | 7 ++++++- code/modules/vore/persist/persist_vr.dm | 5 ++++- vorestation.dme | 1 + 18 files changed, 60 insertions(+), 22 deletions(-) create mode 100644 code/__defines/organ_external.dm diff --git a/code/__defines/organ_external.dm b/code/__defines/organ_external.dm new file mode 100644 index 0000000000..578f3b3112 --- /dev/null +++ b/code/__defines/organ_external.dm @@ -0,0 +1,10 @@ +GLOBAL_LIST_INIT(storable_amputated_organs, list( + BP_L_FOOT, + BP_R_FOOT, + BP_L_LEG, + BP_R_LEG, + BP_L_HAND, + BP_R_HAND, + BP_L_ARM, + BP_R_ARM, +)) diff --git a/code/__defines/text.dm b/code/__defines/text.dm index 0a2eaf0eb2..97538b96fc 100644 --- a/code/__defines/text.dm +++ b/code/__defines/text.dm @@ -21,8 +21,9 @@ #define MAPTEXT(text) {"[##text]"} +// Remove the + 1 at the end once byond fixes the issue. Currently MeasureText returns 1 px too less often #define WXH_TO_HEIGHT(measurement, return_var) \ do { \ var/_measurement = measurement; \ - return_var = text2num(copytext(_measurement, findtextEx(_measurement, "x") + 1)); \ + return_var = text2num(copytext(_measurement, findtextEx(_measurement, "x") + 1)) + 1; \ } while(FALSE); diff --git a/code/_onclick/hud/action/action_screen_objects.dm b/code/_onclick/hud/action/action_screen_objects.dm index 97d4f1d9d4..07731f8b27 100644 --- a/code/_onclick/hud/action/action_screen_objects.dm +++ b/code/_onclick/hud/action/action_screen_objects.dm @@ -147,7 +147,7 @@ /obj/screen/movable/action_button/proc/dump_save() var/mob/user = our_hud.mymob - if(!user?.client) + if(!user?.client?.prefs) return LAZYREMOVE(user.client.prefs.action_button_screen_locs, "[name]_[id]") diff --git a/code/datums/forensics_crime.dm b/code/datums/forensics_crime.dm index dadc3f2689..16ffe82070 100644 --- a/code/datums/forensics_crime.dm +++ b/code/datums/forensics_crime.dm @@ -103,6 +103,8 @@ ////////////////////////////////////////////////////////////////////////////////////// /// Adds hidden admin trackable fingerprints, visible even if normal fingerprints are smudged. /datum/forensics_crime/proc/add_hiddenprints(mob/living/M as mob) + if(!fingerprintshidden) + fingerprintshidden = list() if(!ishuman(M)) if(fingerprintslast != M.key) fingerprintshidden += text("\[[time_stamp()]\] (Non-human mob). Real name: [], Key: []",M.real_name, M.key) diff --git a/code/modules/examine/descriptions/turfs.dm b/code/modules/examine/descriptions/turfs.dm index a494b8cdd3..12b6ba51fe 100644 --- a/code/modules/examine/descriptions/turfs.dm +++ b/code/modules/examine/descriptions/turfs.dm @@ -62,5 +62,5 @@ . += "Use an empty hand on it to scoop up some snow, which you can use to make snowballs or snowmen." /turf/simulated/floor/outdoors/grass/get_description_interaction() - . = "Use floor tiles on it to make a plating." // using . = ..() would incorrectly say you can remove the grass with a shovel + . = list("Use floor tiles on it to make a plating.") // using . = ..() would incorrectly say you can remove the grass with a shovel . += "Use a shovel on it to dig for worms." diff --git a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm index d7f072ed76..afc72f123c 100644 --- a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm +++ b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm @@ -306,21 +306,21 @@ * * redeemer - The person holding it */ /obj/machinery/mineral/equipment_vendor/proc/redeem_voucher(obj/item/mining_voucher/voucher, mob/redeemer) - to_chat(redeemer, "You insert your voucher into the machine!") + to_chat(redeemer, span_notice("You insert your voucher into the machine!")) var/selection = tgui_input_list(redeemer, "Pick your equipment.", "Mining Voucher Redemption", list("Kinetic Accelerator + KA Addon", "Resonator + Advanced Ore Scanner", "Survival Pistol & Machete + Survival Addon","1000 Points")) var/drop_location = drop_location() if(!Adjacent(redeemer)) - to_chat(redeemer, "You must stay near the machine to use it.") + to_chat(redeemer, span_warning("You must stay near the machine to use it.")) return if(!selection) - to_chat(redeemer, "You decide not to redeem anything for now.") + to_chat(redeemer, span_notice("You decide not to redeem anything for now.")) return switch(selection) if("Kinetic Accelerator + KA Addon") //1250-2100 points worth var/addon_selection = tgui_input_list(redeemer, "Pick your addon", "Mining Voucher Redemption", list("Cooldown", "Range","Holster")) //Just the basics. Nothing too crazy. if(!addon_selection) - to_chat(redeemer, "You must select an addon.") + to_chat(redeemer, span_warning("You must select an addon.")) return new /obj/item/gun/energy/kinetic_accelerator(drop_location) switch(addon_selection) @@ -340,7 +340,7 @@ if("Survival Pistol & Machete + Survival Addon") // ~3000-3500 points worth. var/addon_selection = tgui_input_list(redeemer, "Pick your survival addon", "Mining Voucher Redemption", list("Shelter Capsule", "Glucose", "Panacea", "Trauma", "Medipens")) //Just the basics. Nothing too crazy. if(!addon_selection) - to_chat(redeemer, "You must select an addon.") + to_chat(redeemer, span_warning("You must select an addon.")) return new /obj/item/gun/energy/locked/phasegun/pistol(drop_location) //1500 new /obj/item/material/knife/machete(drop_location) //1000 diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index d3ff57a1fa..6f922a4b72 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -197,7 +197,7 @@ if(vantag_hud) compiled_vis |= VIS_CH_VANTAG - if(client?.prefs.read_preference(/datum/preference/toggle/tummy_sprites)) + if(client?.prefs?.read_preference(/datum/preference/toggle/tummy_sprites)) compiled_vis += VIS_CH_STOMACH if(soulgem?.flag_check(SOULGEM_SEE_SR_SOULS)) diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm index aec99fe809..38385d14f9 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_species.dm @@ -153,7 +153,7 @@ H.nif.unimplant(H) //Needs reference to owner to unimplant right. H.nif.moveToNullspace() ..() - if(saved_nif) + if(saved_nif && !ismannequin(H)) saved_nif.quick_implant(H) /datum/species/protean/get_race_key() diff --git a/code/modules/mob/living/silicon/robot/sprites/_sprite_datum.dm b/code/modules/mob/living/silicon/robot/sprites/_sprite_datum.dm index 935edf11ad..280708a037 100644 --- a/code/modules/mob/living/silicon/robot/sprites/_sprite_datum.dm +++ b/code/modules/mob/living/silicon/robot/sprites/_sprite_datum.dm @@ -66,6 +66,7 @@ //Melee Check if(istype(thing_to_check, /obj/item/melee/robotic)) var/obj/item/melee/robotic/melee = thing_to_check + melee.refresh_light(TRUE) if(sprite_flag_check(ROBOT_HAS_MELEE_SPRITE) && melee.weapon_flag_check(COUNTS_AS_ROBOTIC_MELEE)) ourborg.add_overlay("[sprite_icon_state]-melee") continue diff --git a/code/modules/mob/living/silicon/robot/sprites/combat.dm b/code/modules/mob/living/silicon/robot/sprites/combat.dm index 1fd11107c7..97592ca5db 100644 --- a/code/modules/mob/living/silicon/robot/sprites/combat.dm +++ b/code/modules/mob/living/silicon/robot/sprites/combat.dm @@ -113,6 +113,7 @@ sprite_hud_icon_state = "ert" rest_sprite_options = list("Default", "Sit") sprite_flags = ROBOT_HAS_GUN_SPRITE | ROBOT_HAS_SHIELD_SPRITE + /datum/robot_sprite/dogborg/tall/combat/derg/handle_extra_icon_updates(var/mob/living/silicon/robot/ourborg) ..() if(ourborg.resting) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/plants.dm b/code/modules/mob/living/simple_mob/subtypes/vore/plants.dm index ae361de792..6802412466 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/plants.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/plants.dm @@ -48,7 +48,7 @@ B.name = "trap" B.desc = "As you step onto the large leaves of the mantrap, they suddenly shoot up and snap shut around you, encasing you in a fleshy-feeling gut. The saw-toothed spikes around the edge of the leaves interlock with one another and exerts a tremendous pressure on your body. Copious volumes of fluids begin to seep in from the walls themselves, rapidly coating your body and pooling around you, all of your movements only seem to speed up this process.." B.mode_flags = DM_FLAG_THICKBELLY - B.belly_fullscreen = "destination_tumby" + B.belly_fullscreen = "VBO_maw12" B.belly_fullscreen_color = "#02a802" B.digest_brute = 2 B.digest_burn = 2 @@ -141,7 +141,7 @@ B.name = "stomach" B.desc = "Walking a little too close to the pitcher plant, you trigger its trap mechanism and a tendril shoots out towards you. Wrapping around your body, you are rapidly dragged into the open mouth of the plant, stuffing your entire body into a fleshy, green stomach filled with a pool of some sort of tingling liquid. The lid of the plant slams down over the mouth, making it far more difficult to escape, all whilst that pool steadily seems to be filling up." B.mode_flags = DM_FLAG_THICKBELLY - B.belly_fullscreen = "destination_tumby" + B.belly_fullscreen = "VBO_belly1" B.belly_fullscreen_color = "#02a802" B.digest_brute = 1 B.digest_burn = 1 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm index c3de5ac4b3..e645d16817 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm @@ -107,7 +107,7 @@ var/global/moth_amount = 0 // CHOMPEnable, Rykka waz here. *pawstamp* //CHOMPEnable Start if(prob(1) && charge >= 32000 && can_evolve == 1 && moth_amount < 1) //it's reading from the moth_amount global list to determine if it can evolve. There should only ever be a maxcap of 1 existing solar moth alive at any time. TODO: make the code decrease the list after 1 has spawned this shift. anchored = 0 - PN = attached.powernet + PN = null release_vore_contents() if(prey_excludes) prey_excludes.Cut() diff --git a/code/modules/projectiles/guns/energy/cyborg.dm b/code/modules/projectiles/guns/energy/cyborg.dm index 0e0626a0eb..79ce718755 100644 --- a/code/modules/projectiles/guns/energy/cyborg.dm +++ b/code/modules/projectiles/guns/energy/cyborg.dm @@ -257,6 +257,9 @@ var/mob/living/carbon/human/H = target H.forcesay(GLOB.hit_appends) +/obj/item/melee/robotic/proc/refresh_light(clear) + return + /obj/item/melee/robotic/blade //For downstreams that use blade name = "Robotic Blade" desc = "A glowing blade. It appears to be extremely sharp." @@ -292,7 +295,13 @@ var/mutable_appearance/blade_overlay = mutable_appearance(icon, "[icon_state]_blade") blade_overlay.color = lcolor add_overlay(blade_overlay) - set_light(2, 1, lcolor) + refresh_light() + +/obj/item/melee/robotic/blade/refresh_light(clear) + if(active) + if(clear) + set_light(0) + set_light(2, 2, lcolor) else set_light(0) @@ -395,7 +404,12 @@ icon_state = "[initial(name)]_active" else icon_state = "[initial(name)]" + refresh_light() + +/obj/item/melee/robotic/baton/refresh_light(clear) if(icon_state == "[initial(name)]_active") + if(clear) + set_light(0) set_light(2, 1, lightcolor) else set_light(0) diff --git a/code/modules/reagents/reactions/instant/instant.dm b/code/modules/reagents/reactions/instant/instant.dm index 3ee4b06b2f..8e5a3e00d9 100644 --- a/code/modules/reagents/reactions/instant/instant.dm +++ b/code/modules/reagents/reactions/instant/instant.dm @@ -701,7 +701,7 @@ result_amount = 1 /decl/chemical_reaction/instant/concrete/on_reaction(var/datum/reagents/holder, var/created_volume) - new /obj/item/stack/material/concrete(get_turf(holder.my_atom), created_volume) + new /obj/item/stack/material/concrete(get_turf(holder.my_atom), round(created_volume)) return /* Grenade reactions */ diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 5f0ac018c5..f4767b0e15 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -56,14 +56,14 @@ balloon_alert(user, "\the [blocked] is in the way!") return - balloon_alert_visible("[user] attempts to force [M] to swallow \the [src].") + user.balloon_alert_visible("[user] attempts to force [M] to swallow \the [src].") user.setClickCooldown(user.get_attack_speed(src)) if(!do_mob(user, M)) return user.drop_from_inventory(src) //icon update - balloon_alert_visible("[user] forces [M] to swallow \the [src].") + user.balloon_alert_visible("[user] forces [M] to swallow \the [src].") var/contained = reagentlist() add_attack_logs(user,M,"Fed a pill containing [contained]") @@ -83,7 +83,7 @@ if(!target.reagents.total_volume) balloon_alert(user, "[target] is empty.") return - balloon_alert_visible("[user] puts something in \the [target]", "[target] dissolves in \the [src]", 2) + user.balloon_alert_visible("[user] puts something in \the [target]", "[target] dissolves in \the [src]", 2) add_attack_logs(user,null,"Spiked [target.name] with a pill containing [reagentlist()]") @@ -98,7 +98,7 @@ /obj/item/reagent_containers/pill/attackby(obj/item/W as obj, mob/user as mob) if(is_sharp(W)) var/obj/item/reagent_containers/powder/J = new /obj/item/reagent_containers/powder(src.loc) - balloon_alert_visible("[user] cuts up [src] with [W]!", "cut up \the [src] with [W]") + user.balloon_alert_visible("[user] cuts up [src] with [W]!", "cut up \the [src] with [W]") playsound(src.loc, 'sound/effects/chop.ogg', 50, 1) if(reagents) @@ -108,7 +108,7 @@ if(istype(W, /obj/item/card/id)) var/obj/item/reagent_containers/powder/J = new /obj/item/reagent_containers/powder(src.loc) - balloon_alert_visible("[user] clumsily cuts up [src] with [W]!", "You clumsily cut up \the [src] with [W]") + user.balloon_alert_visible("[user] clumsily cuts up [src] with [W]!", "You clumsily cut up \the [src] with [W]") playsound(src.loc, 'sound/effects/chop.ogg', 50, 1) if(reagents) diff --git a/code/modules/vore/eating/belly_messages.dm b/code/modules/vore/eating/belly_messages.dm index 7250115cc2..07166d9dce 100644 --- a/code/modules/vore/eating/belly_messages.dm +++ b/code/modules/vore/eating/belly_messages.dm @@ -189,7 +189,10 @@ GLOBAL_LIST_INIT(vore_words_snake, list("snake","serpent","reptilian","noodle"," /// `prey` may be a string or a specific prey ref. /obj/belly/proc/belly_format_string(message, prey, use_absorbed_count = FALSE, item = null, dest = null, use_first_only = FALSE) if(islist(message)) - . = "[pick(message)]" + if(!LAZYLEN(message)) + . = "" + else + . = "[pick(message)]" else . = "[message]" @@ -236,6 +239,8 @@ GLOBAL_LIST_INIT(vore_words_snake, list("snake","serpent","reptilian","noodle"," . = replacetext(., "%snack", use_first_only ? GLOB.vore_words_snackname[1] : pick(GLOB.vore_words_snackname)) . = replacetext(., "%hot", use_first_only ? GLOB.vore_words_hot[1] : pick(GLOB.vore_words_hot)) . = replacetext(., "%snake", use_first_only ? GLOB.vore_words_snake[1] : pick(GLOB.vore_words_snake)) + if(!.) + . = "No message set for this action. Please inform your pred to fix this." // Get the line that should show up in Examine message if the owner of this belly // is examined. By making this a proc, we not only take advantage of polymorphism, diff --git a/code/modules/vore/persist/persist_vr.dm b/code/modules/vore/persist/persist_vr.dm index 548bd68bcf..d63daee7c0 100644 --- a/code/modules/vore/persist/persist_vr.dm +++ b/code/modules/vore/persist/persist_vr.dm @@ -169,7 +169,10 @@ for(var/name in character.species.has_limbs) var/obj/item/organ/external/O = character.organs_by_name[name] if(!O) - prefs.organ_data[name] = "amputated" + if(name in GLOB.storable_amputated_organs) + prefs.organ_data[name] = "amputated" + else + prefs.rlimb_data.Remove(name) // Missing limb and not in the global list means default model else if(O.robotic >= ORGAN_ROBOT) prefs.organ_data[name] = "cyborg" if(O.model) diff --git a/vorestation.dme b/vorestation.dme index 8e2a68f801..87f9b81803 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -117,6 +117,7 @@ #include "code\__defines\objects.dm" #include "code\__defines\observer.dm" #include "code\__defines\ores.dm" +#include "code\__defines\organ_external.dm" #include "code\__defines\organ_internal.dm" #include "code\__defines\overlay_ch.dm" #include "code\__defines\overmap.dm"