mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Some bloody doodle tweaks (#29695)
* bloody doodle tweaks * glove blood removal
This commit is contained in:
@@ -97,12 +97,19 @@ var/global/list/blood_list = list()
|
||||
desc = "It looks like a writing in blood."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "nothing"
|
||||
random_icon_states = list()
|
||||
amount = 0
|
||||
maptext_height = 32
|
||||
maptext_width = 64
|
||||
maptext_x = -16
|
||||
maptext_y = -2
|
||||
var/turf/original_bloodsource//the turf where was the original blood splatter
|
||||
var/original_amount = 0//the amount of blood there was in the original blood splatter
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/update_icon()
|
||||
..()
|
||||
color = null
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
|
||||
@@ -320,13 +320,25 @@
|
||||
//Ok the place is clear, now we need some blood
|
||||
var/list/choices = list()
|
||||
var/i = 1
|
||||
var/writings_blood_amount = 0
|
||||
var/turf/original_bloodsource
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in range(1,T))
|
||||
if(B.counts_as_blood)
|
||||
if (istype(B,/obj/effect/decal/cleanable/blood/tracks))
|
||||
if (istype(B,/obj/effect/decal/cleanable/blood/writing))//this prevents ghosts from making an infinite chain of messages
|
||||
var/obj/effect/decal/cleanable/blood/writing/writings = B
|
||||
if (writings.original_bloodsource && max(0,round(cheap_pythag(T.x - writings.original_bloodsource.x, T.y - writings.original_bloodsource.y))) <= writings.original_amount)
|
||||
writings_blood_amount = writings.original_amount
|
||||
original_bloodsource = writings.original_bloodsource
|
||||
choices["[i] - [B] (color = [B.basecolor])"] = B
|
||||
else if (istype(B,/obj/effect/decal/cleanable/blood/tracks))
|
||||
var/obj/effect/decal/cleanable/blood/tracks/tracks = B
|
||||
choices["[i] - [B] (color = [tracks.last_blood_color])"] = B
|
||||
original_bloodsource = get_turf(B)
|
||||
else
|
||||
choices["[i] - [B] (color = [B.basecolor])"] = B
|
||||
writings_blood_amount = B.amount
|
||||
original_bloodsource = get_turf(B)
|
||||
i++
|
||||
|
||||
if(!choices.len)
|
||||
@@ -379,7 +391,11 @@
|
||||
I.loc = null
|
||||
qdel(I)
|
||||
|
||||
if(continue_drawing != "Yes" || !Adjacent(T) || !blood_source)
|
||||
if(continue_drawing != "Yes" || !Adjacent(T))
|
||||
return
|
||||
|
||||
if(blood_source.gcDestroyed)
|
||||
to_chat(src, "<span class = 'warning'>The blood source you selected has been removed before you had time to finish your message.</span>")
|
||||
return
|
||||
|
||||
//Finally writing our message
|
||||
@@ -387,6 +403,8 @@
|
||||
W.basecolor = doodle_color
|
||||
W.maptext = {"<span style="color:[doodle_color];font-size:9pt;font-family:'Ink Free';" align="center" valign="top">[message]</span>"}
|
||||
W.add_hiddenprint(src)
|
||||
W.original_amount = writings_blood_amount
|
||||
W.original_bloodsource = original_bloodsource
|
||||
W.visible_message("<span class='warning'>Invisible fingers crudely paint something in blood on \the [T]...</span>")
|
||||
if(istype(blood_source.blood_DNA,/list))
|
||||
W.blood_DNA |= blood_source.blood_DNA.Copy()
|
||||
|
||||
@@ -1277,7 +1277,7 @@
|
||||
doodle_color = bloody_hands_data["blood_colour"]
|
||||
|
||||
if (!doodle_color)
|
||||
to_chat(src, "<span class='warning'>There is no blood on your hands or gloves.</span>")
|
||||
to_chat(src, "<span class='warning'>There is no blood on your [actual_gloves ? "gloves" : "hands"].</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -1315,6 +1315,19 @@
|
||||
if(continue_drawing != "Yes" || !Adjacent(T))
|
||||
return
|
||||
|
||||
//One last sanity check
|
||||
var/can_still_doodle = FALSE
|
||||
var/obj/item/clothing/gloves/actual_gloves2
|
||||
if (istype(gloves, /obj/item/clothing/gloves))
|
||||
actual_gloves2 = gloves
|
||||
if(actual_gloves2.transfer_blood > 0 && actual_gloves2.blood_DNA?.len)
|
||||
can_still_doodle = TRUE
|
||||
if(!actual_gloves2 && bloody_hands > 0 && bloody_hands_data?.len)
|
||||
can_still_doodle = TRUE
|
||||
if(!can_still_doodle)
|
||||
to_chat(src, "<span class='warning'>There is no blood left on your [actual_gloves2 ? "gloves" : "hands"].</span>")
|
||||
return
|
||||
|
||||
//Finally writing our message
|
||||
var/obj/effect/decal/cleanable/blood/writing/W = new /obj/effect/decal/cleanable/blood/writing(T)
|
||||
W.basecolor = doodle_color
|
||||
@@ -1324,8 +1337,8 @@
|
||||
W.visible_message("<span class='warning'>[invisible ? "Invisible fingers" : "\The [src]"] crudely paint[invisible ? "" : "s"] something in blood on \the [T]...</span>")
|
||||
W.blood_DNA[doodle_DNA] = doodle_type
|
||||
|
||||
if (actual_gloves)
|
||||
actual_gloves.transfer_blood = max(0,actual_gloves.transfer_blood - 1)
|
||||
if (actual_gloves2)
|
||||
actual_gloves2.transfer_blood = max(0,actual_gloves2.transfer_blood - 1)
|
||||
else
|
||||
bloody_hands = max(0,bloody_hands - 1)
|
||||
update_inv_gloves()
|
||||
|
||||
@@ -706,6 +706,9 @@ var/global/list/damage_icon_parts = list()
|
||||
bloodsies.color = actual_gloves.blood_color
|
||||
standing.overlays += bloodsies
|
||||
O.overlays += bloodsies
|
||||
else
|
||||
if (actual_gloves.blood_overlay)
|
||||
actual_gloves.overlays.Remove(actual_gloves.blood_overlay)
|
||||
gloves.screen_loc = ui_gloves
|
||||
|
||||
gloves.generate_accessory_overlays(O)
|
||||
|
||||
Reference in New Issue
Block a user