Adds ability to write on walls with blood

This commit is contained in:
ZomgPonies
2013-12-28 11:08:52 -05:00
parent ab993274e6
commit 38682de629
3 changed files with 87 additions and 0 deletions
@@ -1186,6 +1186,7 @@
src.update_inv_gloves(1,1) //handles bloody hands overlays and updating
else
src.update_inv_gloves(1,0)
verbs += /mob/living/carbon/human/proc/bloody_doodle
return 1 //we applied blood to the item
/mob/living/carbon/human/clean_blood()
@@ -1363,3 +1364,54 @@ mob/living/carbon/human/yank_out_object()
return 1
else
return 0
/mob/living/carbon/human/proc/bloody_doodle()
set category = "IC"
set name = "Write in blood"
set desc = "Use blood on your hands to write a short message on the floor or a wall, murder mystery style."
if (usr != src)
return 0 //something is terribly wrong
if (!bloody_hands)
verbs -= /mob/living/carbon/human/proc/bloody_doodle
if (src.gloves)
src << "<span class='warning'>Your [src.gloves] are getting in the way.</span>"
return
var/turf/simulated/T = src.loc
if (!istype(T)) //to prevent doodling out of mechs and lockers
src << "<span class='warning'>You cannot reach the floor.</span>"
return
var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
if (direction != "Here")
T = get_step(T,text2dir(direction))
if (!istype(T))
src << "<span class='warning'>You cannot doodle there.</span>"
return
var/num_doodles = 0
for (var/obj/effect/decal/cleanable/blood/writing/W in T)
num_doodles++
if (num_doodles > 4)
src << "<span class='warning'>There is no space to write on!</span>"
return
var/max_length = bloody_hands * 30 //tweeter style
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
if (message)
var/used_blood_amount = round(length(message) / 30, 1)
bloody_hands = max(0, bloody_hands - used_blood_amount) //use up some blood
if (length(message) > max_length)
message += "-"
src << "<span class='warning'>You ran out of blood to write with!</span>"
var/obj/effect/decal/cleanable/blood/writing/W = new(T)
W.message = message
W.add_fingerprint(src)