From 17791ee5cd46d520a466715054f18cbcbdfe81b5 Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Sun, 25 Feb 2024 18:26:48 -0500 Subject: [PATCH 1/2] pile of fixes --- _maps/map_files/Theseus/Theseus.dmm | 3 ++ code/datums/components/food/edible.dm | 1 + code/game/machinery/atm.dm | 2 ++ code/game/objects/items/pinpointer.dm | 2 +- code/modules/admin/verbs/adminpm.dm | 34 +++++++++---------- code/modules/admin/verbs/debug.dm | 2 +- .../antagonists/fugitive/fugitive_outfits.dm | 6 ++-- code/modules/antagonists/gang/outfits.dm | 2 +- .../loadout/loadout_item/backpack.dm | 3 -- code/modules/clothing/outfits/ert.dm | 8 ++--- code/modules/clothing/outfits/standard.dm | 16 ++++----- code/modules/grab/grab_object.dm | 7 ++++ code/modules/jobs/job_types/_job.dm | 2 +- code/modules/jobs/job_types/bartender.dm | 2 +- code/modules/mob/living/living.dm | 5 ++- 15 files changed, 54 insertions(+), 41 deletions(-) diff --git a/_maps/map_files/Theseus/Theseus.dmm b/_maps/map_files/Theseus/Theseus.dmm index 049f3df7a159..87fd4e0690a6 100644 --- a/_maps/map_files/Theseus/Theseus.dmm +++ b/_maps/map_files/Theseus/Theseus.dmm @@ -7411,6 +7411,9 @@ /obj/structure/cable/yellow{ icon_state = "5" }, +/obj/structure/cable/yellow{ + icon_state = "4" + }, /turf/open/floor/iron, /area/station/engineering/monitoring) "bYJ" = ( diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 120060c2eb9a..cfb07068f372 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -523,6 +523,7 @@ Behavior that's still missing from this component that original food items had t var/datum/component/edible/E = ingredient if (LAZYLEN(E.tastes)) + LAZYINITLIST(tastes) tastes = tastes.Copy() for (var/t in E.tastes) tastes[t] += E.tastes[t] diff --git a/code/game/machinery/atm.dm b/code/game/machinery/atm.dm index b78540332586..11fbbe7d1305 100644 --- a/code/game/machinery/atm.dm +++ b/code/game/machinery/atm.dm @@ -138,6 +138,8 @@ return if(href_list["eject_id"]) + if(isnull(inserted_card)) + return TRUE inserted_card.forceMove(drop_location()) inserted_card = null playsound(src, 'sound/machines/terminal_eject.ogg') diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm index 89374f7750d6..ef1b6ec8b76b 100644 --- a/code/game/objects/items/pinpointer.dm +++ b/code/game/objects/items/pinpointer.dm @@ -128,7 +128,7 @@ var/crewmember_name = "Unknown" if(H.wear_id) - var/obj/item/card/id/I = H.wear_id.GetID() + var/obj/item/card/id/I = H.wear_id.GetID(TRUE) if(I?.registered_name) crewmember_name = I.registered_name diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 21541e43a403..139b8ee49ad1 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -7,7 +7,7 @@ if(!holder) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM-Context: Only administrators may use this command."), + html = span_alert("Error: Admin-PM-Context: Only administrators may use this command."), confidential = TRUE) return if(!ismob(M) || !M.client) @@ -22,7 +22,7 @@ if(!holder) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM-Panel: Only administrators may use this command."), + html = span_alert("Error: Admin-PM-Panel: Only administrators may use this command."), confidential = TRUE) return @@ -45,7 +45,7 @@ if(prefs.muted & MUTE_ADMINHELP) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM: You are unable to use admin PM-s (muted)."), + html = span_alert("Error: Admin-PM: You are unable to use admin PM-s (muted)."), confidential = TRUE) return var/client/C @@ -59,7 +59,7 @@ if(holder) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM: Client not found."), + html = span_alert("Error: Admin-PM: Client not found."), confidential = TRUE) return @@ -87,11 +87,11 @@ else to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM: Client not found."), + html = span_alert("Error: Admin-PM: Client not found."), confidential = TRUE) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = "[span_danger("Message not sent:")]
[msg]", + html = "[span_alert("Message not sent:")]
[msg]", confidential = TRUE) AH.AddInteraction("No client found, message not sent:
[msg]") return @@ -103,14 +103,14 @@ if(prefs.muted & MUTE_ADMINHELP) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM: You are unable to use admin PM-s (muted)."), + html = span_alert("Error: Admin-PM: You are unable to use admin PM-s (muted)."), confidential = TRUE) return if(!holder && !current_ticket) //no ticket? https://www.youtube.com/watch?v=iHSPf6x1Fdo to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be."), + html = span_alert("You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be."), confidential = TRUE) to_chat(src, type = MESSAGE_TYPE_ADMINPM, @@ -135,7 +135,7 @@ if(!recipient) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM: Client not found."), + html = span_alert("Error: Admin-PM: Client not found."), confidential = TRUE) return @@ -153,7 +153,7 @@ if(holder) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Use the admin IRC/Discord channel, nerd."), + html = span_alert("Error: Use the admin IRC/Discord channel, nerd."), confidential = TRUE) return @@ -173,11 +173,11 @@ if(holder) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM: Client not found."), + html = span_alert("Error: Admin-PM: Client not found."), confidential = TRUE) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = "[span_danger("Message not sent:")]
[msg]", + html = "[span_alert("Message not sent:")]
[msg]", confidential = TRUE) if(recipient_ticket) recipient_ticket.AddInteraction("No client found, message not sent:
[msg]") @@ -190,7 +190,7 @@ if(prefs.muted & MUTE_ADMINHELP) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM: You are unable to use admin PM-s (muted)."), + html = span_alert("Error: Admin-PM: You are unable to use admin PM-s (muted)."), confidential = TRUE) return @@ -239,7 +239,7 @@ if(holder) to_chat(recipient, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("[tag_in] [key_name(src, TRUE, TRUE)]: [keywordparsedmsg]"), + html = span_alert("[tag_in] [key_name(src, TRUE, TRUE)]: [keywordparsedmsg]"), confidential = TRUE ) @@ -264,7 +264,7 @@ to_chat(recipient, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("[tag_in] [replymsg]"), + html = span_alert("[tag_in] [replymsg]"), confidential = TRUE ) @@ -332,13 +332,13 @@ if(!current_ticket) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = span_danger("Error: Admin-PM: Non-admin to non-admin PM communication is forbidden."), + html = span_alert("Error: Admin-PM: Non-admin to non-admin PM communication is forbidden."), confidential = TRUE ) to_chat(src, type = MESSAGE_TYPE_ADMINPM, - html = "[span_danger("Message not sent:")]
[msg]", + html = "[span_alert("Message not sent:")]
[msg]", confidential = TRUE ) return diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 6c4aae549085..779c87847ec4 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -110,7 +110,7 @@ return if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/worn = H.wear_id + var/obj/item/worn = H.wear_id.GetID(TRUE) var/obj/item/card/id/id = null if(worn) diff --git a/code/modules/antagonists/fugitive/fugitive_outfits.dm b/code/modules/antagonists/fugitive/fugitive_outfits.dm index 1514d7c0ae96..3ab73c0298df 100644 --- a/code/modules/antagonists/fugitive/fugitive_outfits.dm +++ b/code/modules/antagonists/fugitive/fugitive_outfits.dm @@ -86,7 +86,7 @@ /datum/outfit/spacepol/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.assignment = "Police Officer" W.registered_name = H.real_name W.update_label() @@ -176,7 +176,7 @@ /datum/outfit/bountyarmor/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -201,7 +201,7 @@ /datum/outfit/bountyhook/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() diff --git a/code/modules/antagonists/gang/outfits.dm b/code/modules/antagonists/gang/outfits.dm index 0263cf3f8a53..3ac6fb0aa120 100644 --- a/code/modules/antagonists/gang/outfits.dm +++ b/code/modules/antagonists/gang/outfits.dm @@ -2,7 +2,7 @@ if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() diff --git a/code/modules/client/preferences/loadout/loadout_item/backpack.dm b/code/modules/client/preferences/loadout/loadout_item/backpack.dm index 0a47c71f0faa..0e1a0f3b23bd 100644 --- a/code/modules/client/preferences/loadout/loadout_item/backpack.dm +++ b/code/modules/client/preferences/loadout/loadout_item/backpack.dm @@ -28,9 +28,6 @@ /datum/loadout_item/backpack/cigarettes path = /obj/item/storage/fancy/cigarettes -/datum/loadout_item/backpack/wallet - path = /obj/item/storage/wallet - /datum/loadout_item/backpack/flask path = /obj/item/reagent_containers/food/drinks/flask cost = 2 diff --git a/code/modules/clothing/outfits/ert.dm b/code/modules/clothing/outfits/ert.dm index d12ee9733d4b..1597c409f736 100644 --- a/code/modules/clothing/outfits/ert.dm +++ b/code/modules/clothing/outfits/ert.dm @@ -22,7 +22,7 @@ R.set_frequency(FREQ_CENTCOM) R.freqlock = TRUE - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) if(W) W.registered_name = H.real_name W.update_label() @@ -208,7 +208,7 @@ pda.saved_identification = H.real_name pda.saved_job = "CentCom Official" - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -377,7 +377,7 @@ if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -532,7 +532,7 @@ var/obj/item/radio/R = H.ears R.set_frequency(FREQ_CENTCOM) R.freqlock = TRUE - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() diff --git a/code/modules/clothing/outfits/standard.dm b/code/modules/clothing/outfits/standard.dm index 0473ede6030c..f0422fb7c688 100644 --- a/code/modules/clothing/outfits/standard.dm +++ b/code/modules/clothing/outfits/standard.dm @@ -19,7 +19,7 @@ if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -198,7 +198,7 @@ if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -261,7 +261,7 @@ pda.saved_identification = H.real_name pda.saved_job = "Reaper" - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -288,7 +288,7 @@ if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -376,7 +376,7 @@ if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() @@ -400,7 +400,7 @@ if(visualsOnly) return - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -445,7 +445,7 @@ internals_slot = ITEM_SLOT_SUITSTORE /datum/outfit/debug/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() @@ -477,7 +477,7 @@ internals_slot = ITEM_SLOT_SUITSTORE /datum/outfit/admin/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) W.registered_name = H.real_name W.update_label() W.update_icon() diff --git a/code/modules/grab/grab_object.dm b/code/modules/grab/grab_object.dm index c87e84193571..585ebe2dcc9f 100644 --- a/code/modules/grab/grab_object.dm +++ b/code/modules/grab/grab_object.dm @@ -26,6 +26,9 @@ /obj/item/hand_item/grab/Initialize(mapload, atom/movable/target, datum/grab/grab_type, use_offhand) . = ..() current_grab = GLOB.all_grabstates[grab_type] + if(isnull(current_grab)) + stack_trace("Bad grab type requested: [grab_type || "NULL"]") + return INITIALIZE_HINT_QDEL assailant = loc if(!istype(assailant)) @@ -252,8 +255,12 @@ update_appearance() leave_forensic_traces() + if(QDELETED(src)) + return + if(!current_grab.enter_as_up(src, silent)) return + if(is_grab_unique(current_grab)) current_grab.apply_unique_grab_effects(src) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 0848185c9008..2ff248a38632 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -376,7 +376,7 @@ GLOBAL_LIST_INIT(job_display_order, list( if(!J) J = SSjob.GetJob(H.job) - var/obj/item/card/id/card = H.wear_id.GetID() + var/obj/item/card/id/card = H.wear_id.GetID(TRUE) if(istype(card)) ADD_TRAIT(card, TRAIT_JOB_FIRST_ID_CARD, ROUNDSTART_TRAIT) shuffle_inplace(card.access) // Shuffle access list to make NTNet passkeys less predictable diff --git a/code/modules/jobs/job_types/bartender.dm b/code/modules/jobs/job_types/bartender.dm index 17908d5f3da2..d9d39b92866d 100644 --- a/code/modules/jobs/job_types/bartender.dm +++ b/code/modules/jobs/job_types/bartender.dm @@ -78,7 +78,7 @@ /datum/outfit/job/bartender/post_equip(mob/living/carbon/human/H, visualsOnly) . = ..() - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.wear_id.GetID(TRUE) if(H.age < AGE_MINOR) W.registered_age = AGE_MINOR to_chat(H, span_notice("You're not technically old enough to access or serve alcohol, but your ID has been discreetly modified to display your age as [AGE_MINOR]. Try to keep that a secret!")) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c3f2f0d0bcf9..9588aeba1688 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -2184,7 +2184,10 @@ GLOBAL_LIST_EMPTY(fire_appearances) /mob/living/proc/needs_organ(slot) return FALSE -/mob/living/proc/has_mouth() +/mob/proc/has_mouth() + return FALSE + +/mob/living/has_mouth() return TRUE /mob/living/get_mouse_pointer_icon(check_sustained) From bea6d71ff2c11231f445110ab4b8b2c54a191061 Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Sun, 25 Feb 2024 19:48:11 -0500 Subject: [PATCH 2/2] fix cnd --- code/modules/unit_tests/create_and_destroy.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/unit_tests/create_and_destroy.dm b/code/modules/unit_tests/create_and_destroy.dm index 4cbeb5fa1d02..22efd628dbdd 100644 --- a/code/modules/unit_tests/create_and_destroy.dm +++ b/code/modules/unit_tests/create_and_destroy.dm @@ -29,6 +29,8 @@ GLOBAL_VAR_INIT(running_create_and_destroy, FALSE) /obj/item/bodypart, //Merge conflict marker. It doesn't runtime, but it's not a real object either /obj/merge_conflict_marker, + // Haha, no + /obj/item/hand_item/grab, ) //Say it with me now, type template ignore += typesof(/obj/effect/mapping_helpers)