diff --git a/hyperstation/code/modules/clothing/clothing.dm b/hyperstation/code/modules/clothing/clothing.dm new file mode 100644 index 000000000..df5c70cea --- /dev/null +++ b/hyperstation/code/modules/clothing/clothing.dm @@ -0,0 +1,82 @@ + +/obj/item/clothing + var/recent_struggle = 0 + var/mob/M + +/obj/item/clothing/shoes + var/list/inside_emotes = list() + var/recent_squish = 0 + +/obj/item/clothing/shoes/Initialize() + inside_emotes = list( + "You feel weightless for a moment as \the [name] moves upwards.", + "\The [name] are a ride you've got no choice but to participate in as the wearer moves.", + "The wearer of \the [name] moves, pressing down on you.", + "More motion while \the [name] move, feet pressing down against you." + ) + + ..() + +/obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running) + if(prob(1) && !recent_squish) + recent_squish = 1 + spawn(100) + recent_squish = 0 + for(var/mob/living/M in contents) + var/emote = pick(inside_emotes) + to_chat(M,emote) + return + +/obj/item/clothing/shoes/attackby(var/obj/item/I, var/mob/user) + if(istype(I,/obj/item/clothing/head/mob_holder/micro)) + var/full = 0 + for(var/mob/M in src) + full++ + if(full >= 2) + to_chat(user, "You can't fit anyone else into \the [src]!") + else + var/obj/item/clothing/head/mob_holder/holder = I + if(holder.held_mob && (holder.held_mob in holder)) + //var/mob/living/M = holder.held_mob + //holder.dump_mob() + to_chat(M, "[user] stuffs you into \the [src]!") + M.forceMove(src) + to_chat(user, "You stuff \the [M] into \the [src]!") + else + ..() + +/obj/item/clothing/shoes/attack_self(var/mob/user) + for(var/mob/M in src) + M.forceMove(get_turf(user)) + to_chat(M, "[user] shakes you out of \the [src]!") + to_chat(user, "You shake [M] out of \the [src]!") + + ..() + +/obj/item/clothing/shoes/container_resist(mob/living/micro) + var/mob/living/carbon/human/macro = loc + if(!istype(macro)) + to_chat(micro, "You start to climb out of [src]!") + if(do_after(micro, 50, src)) + to_chat(micro, "You climb out of [src]!") + micro.forceMove(loc) + return + + var/escape_message_micro = "You start to climb out of [src]!" + var/escape_message_macro = "Something is trying to climb out of your [src]!" + var/escape_time = 60 + + if(macro.shoes == src) + escape_message_micro = "You start to climb around the larger creature's feet and ankles!" + escape_time = 100 + + to_chat(micro, "[escape_message_micro]") + to_chat(macro, "[escape_message_macro]") + if(!do_after(micro, escape_time, macro)) + to_chat(micro, "You're pinned underfoot!") + to_chat(macro, "You pin the escapee underfoot!") + return + + to_chat(micro, "You manage to escape [src]!") + to_chat(macro, "Someone has climbed out of your [src]!") + micro.forceMove(macro.loc) \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index ad48f5e34..ebac608cc 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3135,6 +3135,7 @@ #include "hyperstation\code\modules\cargo\sweatshop\wooden.dm" #include "hyperstation\code\modules\client\loadout\glasses.dm" #include "hyperstation\code\modules\client\loadout\tablet.dm" +#include "hyperstation\code\modules\clothing\clothing.dm" #include "hyperstation\code\modules\clothing\gloves.dm" #include "hyperstation\code\modules\clothing\head.dm" #include "hyperstation\code\modules\clothing\glasses\polychromic_glasses.dm"