mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Changes guillotine tips to span_notices and fixes a bug about it. (#74161)
## About The Pull Request Current description of guillotine isn't quite comfortable to read so i changed it to span_notices.   Also fixed a bug, which occurs if you try to behead already beheaded body and then you just can't use the guillotine anyway. ## Why It's Good For The Game yee ## Changelog 🆑 qol: guillotine description tips are now span_notices (blue text) instead of just a bunch of grey text. fix: fixed a bug that if you try to behead body without a head with guillotine it just stops working. /🆑 --------- Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
/obj/structure/guillotine/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
var/msg = "It is [anchored ? "wrenched to the floor." : "unsecured. A wrench should fix that."]<br/>"
|
||||
var/msg = "It is [anchored ? "wrenched to the floor." : "unsecured. A wrench should fix that."]"
|
||||
|
||||
if (blade_status == GUILLOTINE_BLADE_RAISED)
|
||||
msg += "The blade is raised, ready to fall, and"
|
||||
@@ -86,10 +86,10 @@
|
||||
else
|
||||
msg += "The blade is hidden inside the stocks."
|
||||
|
||||
. += msg
|
||||
. += span_notice(msg)
|
||||
|
||||
if (LAZYLEN(buckled_mobs))
|
||||
. += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
|
||||
. += span_notice("Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine.")
|
||||
|
||||
/obj/structure/guillotine/attack_hand(mob/living/user, list/modifiers)
|
||||
add_fingerprint(user)
|
||||
@@ -121,10 +121,10 @@
|
||||
else
|
||||
current_action = GUILLOTINE_ACTION_IDLE
|
||||
else
|
||||
var/mob/living/carbon/human/H = buckled_mobs[1]
|
||||
var/mob/living/carbon/human/victim = buckled_mobs[1]
|
||||
|
||||
if (H)
|
||||
H.regenerate_icons()
|
||||
if (victim)
|
||||
victim.regenerate_icons()
|
||||
|
||||
unbuckle_all_mobs()
|
||||
else
|
||||
@@ -137,53 +137,49 @@
|
||||
blade_status = GUILLOTINE_BLADE_RAISED
|
||||
icon_state = "guillotine_raised"
|
||||
|
||||
/// Drops the guillotine blade, potentially beheading or harbing the buckled mob
|
||||
/// Drops the guillotine blade, potentially beheading or harming the buckled mob
|
||||
/obj/structure/guillotine/proc/drop_blade(mob/user)
|
||||
if (has_buckled_mobs() && blade_sharpness)
|
||||
var/mob/living/carbon/human/H = buckled_mobs[1]
|
||||
var/mob/living/carbon/human/victim = buckled_mobs[1]
|
||||
|
||||
if (!H)
|
||||
if (!victim)
|
||||
return
|
||||
|
||||
var/obj/item/bodypart/head/head = H.get_bodypart("head")
|
||||
|
||||
if (QDELETED(head))
|
||||
return
|
||||
var/obj/item/bodypart/head/head = victim.get_bodypart("head")
|
||||
|
||||
playsound(src, drop_sound, 100, TRUE)
|
||||
if (blade_sharpness >= GUILLOTINE_DECAP_MIN_SHARP || head.brute_dam >= 100)
|
||||
head.dismember()
|
||||
log_combat(user, H, "beheaded", src)
|
||||
H.regenerate_icons()
|
||||
unbuckle_all_mobs()
|
||||
kill_count += 1
|
||||
if(head)
|
||||
if (blade_sharpness >= GUILLOTINE_DECAP_MIN_SHARP || head.brute_dam >= 100)
|
||||
head.dismember()
|
||||
log_combat(user, victim, "beheaded", src)
|
||||
victim.regenerate_icons()
|
||||
unbuckle_all_mobs()
|
||||
kill_count += 1
|
||||
|
||||
var/blood_overlay = "bloody"
|
||||
var/blood_overlay = "bloody"
|
||||
|
||||
if (kill_count == 2)
|
||||
blood_overlay = "bloodier"
|
||||
else if (kill_count > 2)
|
||||
blood_overlay = "bloodiest"
|
||||
if (kill_count == 2)
|
||||
blood_overlay = "bloodier"
|
||||
else if (kill_count > 2)
|
||||
blood_overlay = "bloodiest"
|
||||
|
||||
blood_overlay = "guillotine_" + blood_overlay + "_overlay"
|
||||
cut_overlays()
|
||||
add_overlay(mutable_appearance(icon, blood_overlay))
|
||||
blood_overlay = "guillotine_" + blood_overlay + "_overlay"
|
||||
cut_overlays()
|
||||
add_overlay(mutable_appearance(icon, blood_overlay))
|
||||
|
||||
// The crowd is pleased
|
||||
// The delay is to making large crowds have a longer laster applause
|
||||
var/delay_offset = 0
|
||||
for(var/mob/M in viewers(src, 7))
|
||||
var/mob/living/carbon/human/C = M
|
||||
if (ishuman(M))
|
||||
addtimer(CALLBACK(C, TYPE_PROC_REF(/mob/, emote), "clap"), delay_offset * 0.3)
|
||||
// The crowd is pleased
|
||||
// The delay is to make large crowds have a longer lasting applause
|
||||
var/delay_offset = 0
|
||||
for(var/mob/living/carbon/human/spectator in viewers(src, 7))
|
||||
addtimer(CALLBACK(spectator, TYPE_PROC_REF(/mob/, emote), "clap"), delay_offset * 0.3)
|
||||
delay_offset++
|
||||
else
|
||||
H.apply_damage(15 * blade_sharpness, BRUTE, head)
|
||||
log_combat(user, H, "dropped the blade on", src, " non-fatally")
|
||||
H.emote("scream")
|
||||
else
|
||||
victim.apply_damage(15 * blade_sharpness, BRUTE, head)
|
||||
log_combat(user, victim, "dropped the blade on", src, " non-fatally")
|
||||
victim.emote("scream")
|
||||
|
||||
if (blade_sharpness > 1)
|
||||
blade_sharpness -= 1
|
||||
if (blade_sharpness > 1)
|
||||
blade_sharpness -= 1
|
||||
|
||||
blade_status = GUILLOTINE_BLADE_DROPPED
|
||||
icon_state = "guillotine"
|
||||
@@ -236,18 +232,18 @@
|
||||
return
|
||||
|
||||
M.add_mood_event("dying", /datum/mood_event/deaths_door)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/mob/living/carbon/human/victim = M
|
||||
|
||||
if (H.dna)
|
||||
if (H.dna.species)
|
||||
var/datum/species/S = H.dna.species
|
||||
if (victim.dna)
|
||||
if (victim.dna.species)
|
||||
var/datum/species/S = victim.dna.species
|
||||
|
||||
if (istype(S))
|
||||
H.cut_overlays()
|
||||
H.update_body_parts_head_only()
|
||||
H.remove_overlay(BODY_ADJ_LAYER)
|
||||
H.pixel_y += -GUILLOTINE_HEAD_OFFSET // Offset their body so it looks like they're in the guillotine
|
||||
H.layer += GUILLOTINE_LAYER_DIFF
|
||||
victim.cut_overlays()
|
||||
victim.update_body_parts_head_only()
|
||||
victim.remove_overlay(BODY_ADJ_LAYER)
|
||||
victim.pixel_y += -GUILLOTINE_HEAD_OFFSET // Offset their body so it looks like they're in the guillotine
|
||||
victim.layer += GUILLOTINE_LAYER_DIFF
|
||||
else
|
||||
unbuckle_all_mobs()
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user