From 53b4d3ee6b45507d36b5430e1c33a9c5d8c052c9 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Sun, 14 Apr 2024 16:33:04 -0400 Subject: [PATCH 1/4] First attempt --- code/game/machinery/kitchen/gibber.dm | 67 +++++++++++++++++-- .../reagent_containers/food/snacks/meat.dm | 3 +- code/modules/mob/mob_helpers.dm | 2 +- 3 files changed, 65 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 3fa96ca0bc3a..ba27f82fcdb7 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -105,15 +105,28 @@ to_chat(user, SPAN_WARNING("You need a better grip to do that!")) return - if(victim.abiotic(1)) + if(victim.abiotic(TRUE)) to_chat(user, SPAN_WARNING("Subject may not have abiotic items on.")) return user.visible_message(SPAN_DANGER("[user] starts to put [victim] into the gibber!")) add_fingerprint(user) + ///If synth is getting gibbed, we will 'soft gib' them, but this is still pretty LRP so let admin know. + if(issynth(victim) && ishuman_strict(user) && !occupant) + var/turf/turf_ref = get_turf(user) + var/area/area = get_area(user) + message_admins("ALERT: [user] ([user.key]) is trying to shove [victim] in a gibber! (They are a synth, so this will delimb them) ([victim.key]) in [area.name] [ADMIN_JMP(turf_ref)]") + log_attack("[key_name(user)] tried to delimb [victim] using a gibber ([victim.key]) in [area.name]") + to_chat(user, SPAN_DANGER("What are you doing...")) + if(do_after(user, 30 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE && grabbed && grabbed.grabbed_thing && !occupant)) + user.visible_message(SPAN_DANGER("[user] stuffs [victim] into the gibber!")) + victim.forceMove(src) + occupant = victim + update_icon() + ///If someone's being LRP and doing funny chef shit, this lets admins know. This *shouldn't* flag preds, though. - if(ishuman(victim) && ishuman_strict(user) && !occupant) + else if(ishuman(victim) && ishuman_strict(user) && !occupant) var/turf/turf_ref = get_turf(user) var/area/area = get_area(user) message_admins("ALERT: [user] ([user.key]) is trying to gib [victim] ([victim.key]) in [area.name] [ADMIN_JMP(turf_ref)]") @@ -142,18 +155,22 @@ add_fingerprint(usr) return -/obj/structure/machinery/gibber/proc/go_out() +/obj/structure/machinery/gibber/proc/go_out(launch = FALSE) if (!occupant) - return + return FALSE for(var/obj/O in src) O.forceMove(loc) if (occupant.client) occupant.client.eye = occupant.client.mob occupant.client.perspective = MOB_PERSPECTIVE occupant.forceMove(loc) + if(launch) + // yeet them out of the gibber + var/turf/Tx = locate(x - 3, y, z) + occupant.throw_atom(Tx, 3, SPEED_FAST, src, TRUE) occupant = null update_icon() - return + return TRUE /obj/structure/machinery/gibber/proc/startgibbing(mob/user as mob) @@ -169,6 +186,8 @@ var/totalslabs = 2 + var/synthetic = issynth(occupant) + var/obj/item/reagent_container/food/snacks/meat/meat_template = /obj/item/reagent_container/food/snacks/meat/monkey if(istype(occupant, /mob/living/carbon/xenomorph)) var/mob/living/carbon/xenomorph/X = occupant @@ -186,6 +205,33 @@ meat_template = /obj/item/reagent_container/food/snacks/meat/human totalslabs = 3 + // Synths only get delimbed from this. 1 meat per limb + if(synthetic) + meat_template = /obj/item/reagent_container/food/snacks/meat/synthmeat/synthflesh + totalslabs = 0 + var/mob/living/carbon/human/victim = occupant + + // Check for arms and legs, and get grinding + var/obj/limb/limb = victim.get_limb("r_leg") + if(limb) + totalslabs += 1 + limb.droplimb(FALSE, TRUE, "gibber") + + limb = victim.get_limb("l_leg") + if(limb) + totalslabs += 1 + limb.droplimb(FALSE, TRUE, "gibber") + + limb = victim.get_limb("r_arm") + if(limb) + totalslabs += 1 + limb.droplimb(FALSE, TRUE, "gibber") + + limb = victim.get_limb("l_arm") + if(limb) + totalslabs += 1 + limb.droplimb(FALSE, TRUE, "gibber") + var/obj/item/reagent_container/food/snacks/meat/allmeat[totalslabs] for(var/i in 1 to totalslabs) var/obj/item/reagent_container/food/snacks/meat/newmeat @@ -194,6 +240,14 @@ newmeat.name = newmeat.made_from_player + newmeat.name allmeat[i] = newmeat + // Synths wont die to this (on it's own at least), dont log as a gib + if(synthetic) + if(src.occupant.client) // Log still + src.occupant.attack_log += "\[[time_stamp()]\] Was delimbed by [key_name(user)]" + user.attack_log += "\[[time_stamp()]\] delimbed [key_name(occupant)]" + msg_admin_attack("[key_name(user)] delimbed [key_name(occupant)] with a gibber in [user.loc.name]([user.x], [user.y], [user.z]).", user.x, user.y, user.z) + continue + if(src.occupant.client) // Gibbed a cow with a client in it? log that shit src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [key_name(user)]" user.attack_log += "\[[time_stamp()]\] Gibbed [key_name(occupant)]" @@ -202,6 +256,9 @@ src.occupant.death(create_cause_data("gibber", user), TRUE) src.occupant.ghostize() + if(synthetic) + go_out(TRUE) //launch them out + return QDEL_NULL(occupant) addtimer(CALLBACK(src, PROC_REF(create_gibs), totalslabs, allmeat), gibtime) diff --git a/code/game/objects/items/reagent_containers/food/snacks/meat.dm b/code/game/objects/items/reagent_containers/food/snacks/meat.dm index f68f488f268d..f541986112e5 100644 --- a/code/game/objects/items/reagent_containers/food/snacks/meat.dm +++ b/code/game/objects/items/reagent_containers/food/snacks/meat.dm @@ -28,7 +28,8 @@ name = "synthetic meat" desc = "A synthetic slab of flesh." -/obj/item/reagent_container/food/snacks/meat/synthmeat/synthflesh //meat made from synthetics. Slightly toxic +/// Meat made from synthetics. Slightly toxic +/obj/item/reagent_container/food/snacks/meat/synthmeat/synthflesh name = "synthetic flesh" desc = "A slab of artificial, inorganic 'flesh' that resembles human meat. Probably came from a synth." icon_state = "synthmeat" diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index cb36e919e82a..0f128b5bcb46 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -342,7 +342,7 @@ GLOBAL_LIST_INIT(limb_types_by_name, list( return FALSE -/mob/proc/abiotic(full_body = 0) +/mob/proc/abiotic(full_body = FALSE) if(full_body && ((src.l_hand && !( src.l_hand.flags_item & ITEM_ABSTRACT )) || (src.r_hand && !( src.r_hand.flags_item & ITEM_ABSTRACT )) || (src.back || src.wear_mask))) return TRUE From f8602e30ec51ccc58842dcf44ac023f57310984f Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Sun, 14 Apr 2024 17:27:30 -0400 Subject: [PATCH 2/4] it works... --- code/game/machinery/kitchen/gibber.dm | 40 +++++++++++++---------- code/modules/cm_tech/droppod/lz_effect.dm | 1 + 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index ba27f82fcdb7..f41c894b85fa 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -179,14 +179,17 @@ if(!occupant) visible_message(SPAN_DANGER("You hear a loud metallic grinding sound.")) return + var/synthetic = issynth(occupant) use_power(1000) - visible_message(SPAN_DANGER("You hear a loud squelchy grinding sound.")) - operating = 1 + if(synthetic) + visible_message(SPAN_BOLDWARNING("[src] begins to emitt sparks out the top as a banging noise can be heard!"), SPAN_BOLDWARNING("You hear a myriad of loud bangs!")) + else + visible_message(SPAN_DANGER("You hear a loud squelchy grinding sound.")) + operating = TRUE update_icon() var/totalslabs = 2 - var/synthetic = issynth(occupant) var/obj/item/reagent_container/food/snacks/meat/meat_template = /obj/item/reagent_container/food/snacks/meat/monkey if(istype(occupant, /mob/living/carbon/xenomorph)) @@ -211,24 +214,26 @@ totalslabs = 0 var/mob/living/carbon/human/victim = occupant - // Check for arms and legs, and get grinding - var/obj/limb/limb = victim.get_limb("r_leg") - if(limb) + // Remove all limbs to allow synth to park closer at the supermarket + var/obj/limb/limb + + if(victim.has_limb("l_leg")) + limb = victim.get_limb("r_leg") totalslabs += 1 limb.droplimb(FALSE, TRUE, "gibber") - limb = victim.get_limb("l_leg") - if(limb) + if(victim.has_limb("l_leg")) + limb = victim.get_limb("l_leg") totalslabs += 1 limb.droplimb(FALSE, TRUE, "gibber") - limb = victim.get_limb("r_arm") - if(limb) + if(victim.has_limb("r_arm")) + limb = victim.get_limb("r_arm") totalslabs += 1 limb.droplimb(FALSE, TRUE, "gibber") - limb = victim.get_limb("l_arm") - if(limb) + if(victim.has_limb("l_arm")) + limb = victim.get_limb("l_arm") totalslabs += 1 limb.droplimb(FALSE, TRUE, "gibber") @@ -257,20 +262,21 @@ src.occupant.ghostize() if(synthetic) - go_out(TRUE) //launch them out + to_chat(occupant, SPAN_HIGHDANGER("You can detect your limbs being ripped off your body, but it begins to malfunction as it reaches your torso!")) + addtimer(CALLBACK(src, PROC_REF(create_gibs), totalslabs, allmeat), gibtime) + addtimer(CALLBACK(src, PROC_REF(go_out), TRUE), gibtime) return - QDEL_NULL(occupant) - addtimer(CALLBACK(src, PROC_REF(create_gibs), totalslabs, allmeat), gibtime) + QDEL_NULL(occupant) /obj/structure/machinery/gibber/proc/create_gibs(totalslabs, list/obj/item/reagent_container/food/snacks/allmeat) playsound(loc, 'sound/effects/splat.ogg', 25, 1) operating = FALSE + var/turf/Tx = locate(x - 1, y, z) for (var/i in 1 to totalslabs) var/obj/item/meatslab = allmeat[i] - var/turf/Tx = locate(x - i, y, z) meatslab.forceMove(loc) - meatslab.throw_atom(Tx, i, SPEED_FAST, src) + meatslab.throw_atom(Tx, 1, SPEED_FAST, src) if (!Tx.density) if(istype(meatslab, /obj/item/reagent_container/food/snacks/meat/xenomeat)) new /obj/effect/decal/cleanable/blood/gibs/xeno(Tx) diff --git a/code/modules/cm_tech/droppod/lz_effect.dm b/code/modules/cm_tech/droppod/lz_effect.dm index 6a73916c7b3f..7ab955d8a00c 100644 --- a/code/modules/cm_tech/droppod/lz_effect.dm +++ b/code/modules/cm_tech/droppod/lz_effect.dm @@ -34,6 +34,7 @@ /obj/effect/warning/explosive/proc/disappear() qdel(src) + /obj/effect/warning/explosive/gas name = "gas warning" color = "#42acd6" From e7f82f3ec3c8b435a9d85b5f956a35abd52b244d Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Sun, 14 Apr 2024 17:33:30 -0400 Subject: [PATCH 3/4] message when launched --- code/game/machinery/kitchen/gibber.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index f41c894b85fa..f2312225e3d0 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -166,6 +166,7 @@ occupant.forceMove(loc) if(launch) // yeet them out of the gibber + visible_message(SPAN_DANGER("[occupant] suddenly is launched out of the [src]!")) var/turf/Tx = locate(x - 3, y, z) occupant.throw_atom(Tx, 3, SPEED_FAST, src, TRUE) occupant = null From 1b8344caff573852956e7943d8a78a97c0d2ee77 Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Fri, 19 Apr 2024 22:53:17 -0700 Subject: [PATCH 4/4] Apply suggestions from code review --- code/game/machinery/kitchen/gibber.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index f2312225e3d0..4b68b397116e 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -248,19 +248,19 @@ // Synths wont die to this (on it's own at least), dont log as a gib if(synthetic) - if(src.occupant.client) // Log still - src.occupant.attack_log += "\[[time_stamp()]\] Was delimbed by [key_name(user)]" + if(occupant.client) // Log still + occupant.attack_log += "\[[time_stamp()]\] Was delimbed by [key_name(user)]" user.attack_log += "\[[time_stamp()]\] delimbed [key_name(occupant)]" msg_admin_attack("[key_name(user)] delimbed [key_name(occupant)] with a gibber in [user.loc.name]([user.x], [user.y], [user.z]).", user.x, user.y, user.z) continue - if(src.occupant.client) // Gibbed a cow with a client in it? log that shit - src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [key_name(user)]" + if(occupant.client) // Gibbed a cow with a client in it? log that shit + occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [key_name(user)]" user.attack_log += "\[[time_stamp()]\] Gibbed [key_name(occupant)]" msg_admin_attack("[key_name(user)] gibbed [key_name(occupant)] in [user.loc.name] ([user.x], [user.y], [user.z]).", user.x, user.y, user.z) - src.occupant.death(create_cause_data("gibber", user), TRUE) - src.occupant.ghostize() + occupant.death(create_cause_data("gibber", user), TRUE) + occupant.ghostize() if(synthetic) to_chat(occupant, SPAN_HIGHDANGER("You can detect your limbs being ripped off your body, but it begins to malfunction as it reaches your torso!"))