diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 1a36a834..8731a6d7 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -397,7 +397,8 @@ var/washmask = TRUE var/washears = TRUE var/washglasses = TRUE - + for(var/obj/item/bodypart/BP in H.bodyparts) + BP.writtentext = "" if(H.wear_suit) washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES) washshoes = !(H.wear_suit.flags_inv & HIDESHOES) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index ecf2207e..40e72ed7 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -172,15 +172,16 @@ var/list/missing = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) var/list/disabled = list() + var/list/writing = list() for(var/X in bodyparts) var/obj/item/bodypart/BP = X if(BP.disabled) disabled += BP + if(BP.writtentext) + writing += BP missing -= BP.body_zone for(var/obj/item/I in BP.embedded_objects) msg += "[t_He] [t_has] \a [icon2html(I, user)] [I] embedded in [t_his] [BP.name]!\n" - if(BP.broken) - msg += "[t_He] [t_has] \a [I] broken [BP.name]!\n" for(var/X in disabled) var/obj/item/bodypart/BP = X @@ -304,6 +305,11 @@ else msg += " and they don't look like they're all there.\n" + for(var/X in writing) + if(!w_uniform) + var/obj/item/bodypart/BP = X + msg += "[capitalize(t_He)] has \"[html_encode(BP.writtentext)]\" written on [t_his] [BP.name].\n" + if(isliving(user)) var/mob/living/L = user if(src != user && HAS_TRAIT(L, TRAIT_EMPATH) && !appears_dead) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 66c58033..92a13c98 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -105,21 +105,6 @@ to_chat(user, "You rotate the top of the pen to [degrees] degrees.") SEND_SIGNAL(src, COMSIG_PEN_ROTATED, deg, user) -/obj/item/pen/attack(mob/living/M, mob/user,stealth) - if(!istype(M)) - return - - if(!force) - if(M.can_inject(user, 1)) - to_chat(user, "You stab [M] with the pen.") - if(!stealth) - to_chat(M, "You feel a tiny prick!") - . = 1 - - log_combat(user, M, "stabbed", src) - - else - . = ..() /obj/item/pen/afterattack(obj/O, mob/living/user, proximity) . = ..() diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 85659f57..c01e7f35 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -75,6 +75,10 @@ var/medium_burn_msg = "blistered" var/heavy_burn_msg = "peeling away" + //writing on body parts with pens + var/writtentext = "" + + /obj/item/bodypart/examine(mob/user) . = ..() if(brute_dam > DAMAGE_PRECISION) diff --git a/hyperstation/code/modules/pen.dm b/hyperstation/code/modules/pen.dm new file mode 100644 index 00000000..497d3967 --- /dev/null +++ b/hyperstation/code/modules/pen.dm @@ -0,0 +1,45 @@ +/obj/item/pen/attack(mob/living/M, mob/user,stealth) + if(!istype(M)) + return + + if(!force) + if(M.can_inject(user, 1)) + if(user.a_intent == "harm") //old poke requires harm intent. + to_chat(user, "You stab [M] with the pen.") + if(!stealth) + to_chat(M, "You feel a tiny prick!") + . = 1 + + else //writing time + var/mob/living/carbon/human/T = M + if(!T) //not human. + return + if(!T.is_chest_exposed()) + to_chat(user, "You cannot write on someone with their clothes on.") + return + + var/writting = input(user, "Add writing, doesn't replace current text", "Writing on [T]") as text|null + if(!writting) + return + + var/obj/item/bodypart/BP = T.get_bodypart(user.zone_selected) + + if(!(user==T)) + src.visible_message("[user] begins to write on [T]'s [BP.name].") + else + to_chat(user, "You begin to write on your [BP.name].") + + if(do_mob(user, T, 4 SECONDS)) + if((length(BP.writtentext))+(length(writting)) < 100) //100 character limmit to stop spamming. + BP.writtentext += html_encode(writting) //you can add to text, not remove it. + else + to_chat(user, "There isnt enough space to write that on [T]'s [BP.name].") + return + + if(!(user==T)) + to_chat(user, "You write on [T]'s [BP.name].") + else + to_chat(user, "You write on your [BP.name].") + else + . = ..() + diff --git a/tgstation.dme b/tgstation.dme index 0f9ce34b..fd4992bd 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3038,6 +3038,7 @@ #include "hyperstation\code\mobs\hugbot.dm" #include "hyperstation\code\mobs\mimic.dm" #include "hyperstation\code\mobs\werewolf.dm" +#include "hyperstation\code\modules\pen.dm" #include "hyperstation\code\modules\traits.dm" #include "hyperstation\code\modules\admin\verbs\hyperverbs.dm" #include "hyperstation\code\modules\antagonists\werewolf\werewolf.dm"