diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 3525f9e34ff..3e2786156f2 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -1210,14 +1210,14 @@ var/perunit = 3750 /obj/item/stack/sheet/wood - name = "Wood Planks" + name = "wooden planks" desc = "One can only guess that this is a bunch of wood." singular_name = "wood plank" icon_state = "sheet-wood" origin_tech = "materials=1;biotech=1" /obj/item/stack/sheet/sandstone - name = "Sandstone Bricks" + name = "sandstone bricks" desc = "This appears to be a combination of both sand and stone." singular_name = "sandstone brick" icon_state = "sheet-sandstone" diff --git a/code/game/algorithm.dm b/code/game/algorithm.dm index d4ad2261c4b..09152ae9391 100644 --- a/code/game/algorithm.dm +++ b/code/game/algorithm.dm @@ -51,267 +51,6 @@ proc/countJob(rank) jobCount++ return jobCount -//TODO: these could be defines -/mob/living/carbon/human/var/const/slot_back = 1 -/mob/living/carbon/human/var/const/slot_wear_mask = 2 -/mob/living/carbon/human/var/const/slot_handcuffed = 3 -/mob/living/carbon/human/var/const/slot_l_hand = 4 -/mob/living/carbon/human/var/const/slot_r_hand = 5 -/mob/living/carbon/human/var/const/slot_belt = 6 -/mob/living/carbon/human/var/const/slot_wear_id = 7 -/mob/living/carbon/human/var/const/slot_ears = 8 -/mob/living/carbon/human/var/const/slot_glasses = 9 -/mob/living/carbon/human/var/const/slot_gloves = 10 -/mob/living/carbon/human/var/const/slot_head = 11 -/mob/living/carbon/human/var/const/slot_shoes = 12 -/mob/living/carbon/human/var/const/slot_wear_suit = 13 -/mob/living/carbon/human/var/const/slot_w_uniform = 14 -/mob/living/carbon/human/var/const/slot_l_store = 15 -/mob/living/carbon/human/var/const/slot_r_store = 16 -/mob/living/carbon/human/var/const/slot_s_store = 17 -/mob/living/carbon/human/var/const/slot_in_backpack = 18 - -/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1) - for (var/slot in slots) - if (equip_if_possible(W, slots[slot], del_on_fail = 0)) - return slot - if (del_on_fail) - del(W) - return null - -/mob/living/carbon/human/proc/equip_to_appropriate_slot(obj/item/W) - if(!W) - return - if(!ishuman(src)) - return - - if(W.slot_flags & SLOT_BACK) - if(!src.back) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.back = W - update_inv_back() - return - - if(W.slot_flags & SLOT_ID) - if(!src.wear_id && src.w_uniform) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.wear_id = W - update_inv_wear_id() - return - - if(W.slot_flags & SLOT_ICLOTHING) - if(!src.w_uniform) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.w_uniform = W - update_inv_w_uniform() - return - - if(W.slot_flags & SLOT_OCLOTHING) - if(!src.wear_suit) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.wear_suit = W - update_inv_wear_suit() - return - - if(W.slot_flags & SLOT_MASK) - if(!src.wear_mask) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.wear_mask = W - update_inv_wear_mask() - return - - if(W.slot_flags & SLOT_HEAD) - if(!src.head) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.head = W - update_inv_head() - return - - if(W.slot_flags & SLOT_FEET) - if(!src.shoes) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.shoes = W - update_inv_shoes() - return - - if(W.slot_flags & SLOT_GLOVES) - if(!src.gloves) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.gloves = W - update_inv_gloves() - return - - if(W.slot_flags & SLOT_EARS) - if(!src.ears) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.ears = W - update_inv_ears() - return - - if(W.slot_flags & SLOT_EYES) - if(!src.glasses) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.glasses = W - update_inv_glasses() - return - - if(W.slot_flags & SLOT_BELT) - if(!src.belt && w_uniform) - if( src.get_active_hand() == W ) - src.u_equip(W) - src.belt = W - update_inv_belt() - return - - //Suit storage - var/confirm - if (wear_suit) - if(wear_suit.allowed) - if (istype(W, /obj/item/device/pda) || istype(W, /obj/item/weapon/pen)) - confirm = 1 - if (is_type_in_list(W, wear_suit.allowed)) - confirm = 1 - if(confirm) - src.u_equip(W) - src.s_store = W - update_inv_s_store() - return - - //Pockets - if ( !( W.slot_flags & SLOT_DENYPOCKET ) ) - if(!src.l_store) - if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) - u_equip(W) - l_store = W - update_inv_pockets() - return - if(!src.r_store) - if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) - u_equip(W) - r_store = W - update_inv_pockets() - return - - -/mob/living/carbon/human/proc/equip_if_possible(obj/item/W, slot, del_on_fail = 1) // since byond doesn't seem to have pointers, this seems like the best way to do this :/ - //warning: icky code - var/equipped = 0 - if((slot == l_store || slot == r_store || slot == belt || slot == wear_id) && !src.w_uniform) - del(W) - return - if(slot == s_store && !src.wear_suit) - del(W) - return - switch(slot) - if(slot_back) - if(!src.back) - src.back = W - update_inv_back(0) - equipped = 1 - if(slot_wear_mask) - if(!src.wear_mask) - src.wear_mask = W - update_inv_wear_mask(0) - equipped = 1 - if(slot_handcuffed) - if(!src.handcuffed) - src.handcuffed = W - update_inv_handcuffed(0) - equipped = 1 - if(slot_l_hand) - if(!src.l_hand) - src.l_hand = W - update_inv_l_hand(0) - equipped = 1 - if(slot_r_hand) - if(!src.r_hand) - src.r_hand = W - update_inv_r_hand(0) - equipped = 1 - if(slot_belt) - if(!src.belt) - src.belt = W - update_inv_belt(0) - equipped = 1 - if(slot_wear_id) - if(!src.wear_id) - src.wear_id = W - update_inv_wear_id(0) - equipped = 1 - if(slot_ears) - if(!src.ears) - src.ears = W - update_inv_ears(0) - equipped = 1 - if(slot_glasses) - if(!src.glasses) - src.glasses = W - update_inv_glasses(0) - equipped = 1 - if(slot_gloves) - if(!src.gloves) - src.gloves = W - update_inv_gloves(0) - equipped = 1 - if(slot_head) - if(!src.head) - src.head = W - update_inv_head(0) - equipped = 1 - if(slot_shoes) - if(!src.shoes) - src.shoes = W - update_inv_shoes(0) - equipped = 1 - if(slot_wear_suit) - if(!src.wear_suit) - src.wear_suit = W - update_inv_wear_suit(0) - equipped = 1 - if(slot_w_uniform) - if(!src.w_uniform) - src.w_uniform = W - update_inv_w_uniform(0) - equipped = 1 - if(slot_l_store) - if(!src.l_store) - src.l_store = W - update_inv_pockets(0) - equipped = 1 - if(slot_r_store) - if(!src.r_store) - src.r_store = W - update_inv_pockets(0) - equipped = 1 - if(slot_s_store) - if(!src.s_store) - src.s_store = W - update_inv_s_store(0) - equipped = 1 - if(slot_in_backpack) - if (src.back && istype(src.back, /obj/item/weapon/storage/backpack)) - var/obj/item/weapon/storage/backpack/B = src.back - if(B.contents.len < B.storage_slots && W.w_class <= B.max_w_class) - W.loc = B - equipped = 1 - - if(equipped) - W.layer = 20 - else - if (del_on_fail) - del(W) - return equipped - /proc/AutoUpdateAI(obj/subject) if (subject!=null) for(var/mob/living/silicon/ai/M in world) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index f61210ea309..104d9a03c9e 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -139,88 +139,6 @@ return -//unequip -/mob/living/carbon/alien/humanoid/u_equip(obj/item/W as obj) - if (W == wear_suit) - wear_suit = null - update_inv_wear_suit(0) - else if (W == head) - head = null - update_inv_head(0) - else if (W == r_store) - r_store = null - update_inv_pockets(0) - else if (W == l_store) - l_store = null - update_inv_pockets(0) - else if (W == r_hand) - r_hand = null - update_inv_r_hand(0) - else if (W == l_hand) - l_hand = null - update_inv_l_hand(0) - -/mob/living/carbon/alien/humanoid/db_click(text, t1) - var/obj/item/W = equipped() - var/emptyHand = (W == null) - if ((!emptyHand) && (!istype(W, /obj/item))) - return - if (emptyHand) - usr.next_move = usr.prev_move - usr:lastDblClick -= 3 //permit the double-click redirection to proceed. - switch(text) - -//if emptyhand then wear the suit, no bedsheet clothes for the alien - - if("o_clothing") - if (wear_suit) - if (emptyHand) - wear_suit.DblClick() -// else -// update_inv_wear_suit() - return -/* if (!( istype(W, /obj/item/clothing/suit) )) - return - u_equip(W) - wear_suit = W - W.equipped(src, text) -*/ - if("head") - if (head) - if (emptyHand) - head.DblClick() - else if (( istype(W, /obj/effect/alien/head) )) //TODO: figure out wtf this is about ~Carn - u_equip(W) - head = W - update_inv_head() - return -/* if (!( istype(W, /obj/item/clothing/head) )) - return - u_equip(W) - head = W - W.equipped(src, text) -*/ - if("storage1") - if (l_store) - if (emptyHand) - l_store.DblClick() - return - if ((!( istype(W, /obj/item) ) || W.w_class > 3)) - return - u_equip(W) - l_store = W - update_inv_pockets() - if("storage2") - if (r_store) - if (emptyHand) - r_store.DblClick() - return - if ((!( istype(W, /obj/item) ) || W.w_class > 3)) - return - u_equip(W) - r_store = W - update_inv_pockets() - return /mob/living/carbon/alien/humanoid/meteorhit(O as obj) for(var/mob/M in viewers(src, null)) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index c80d4029bc0..6f15b4e504b 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -138,9 +138,6 @@ updatehealth() return -//can't unequip since it can't equip anything -/mob/living/carbon/alien/larva/u_equip(obj/item/W as obj) - return //can't equip anything /mob/living/carbon/alien/larva/db_click(text, t1) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8b43eca71f7..0f2b39f7689 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -283,348 +283,6 @@ apply_damage(rand(30,40), BRUTE, affecting, run_armor_check(affecting, "melee")) return -/mob/living/carbon/human/u_equip(obj/item/W as obj) - if(!W) return 0 - . = 1 - if (W == wear_suit) - W = s_store - if (W) - u_equip(W) - if (client) - client.screen -= W - if (W) - W.loc = loc - W.dropped(src) - W.layer = initial(W.layer) - wear_suit = null - update_inv_wear_suit(0) - else if (W == w_uniform) - W = r_store - if (W) - u_equip(W) - if (client) - client.screen -= W - if (W) - W.loc = loc - W.dropped(src) - W.layer = initial(W.layer) - W = l_store - if (W) - u_equip(W) - if (client) - client.screen -= W - if (W) - W.loc = loc - W.dropped(src) - W.layer = initial(W.layer) - W = wear_id - if (W) - u_equip(W) - if (client) - client.screen -= W - if (W) - W.loc = loc - W.dropped(src) - W.layer = initial(W.layer) - W = belt - if (W) - u_equip(W) - if (client) - client.screen -= W - if (W) - W.loc = loc - W.dropped(src) - W.layer = initial(W.layer) - w_uniform = null - update_inv_w_uniform(0) - else if (W == gloves) - gloves = null - update_inv_gloves(0) - else if (W == glasses) - glasses = null - update_inv_glasses(0) - else if (W == head) - head = null - if(W.flags & BLOCKHAIR) - update_hair(0) //rebuild hair - update_inv_head(0) - else if (W == ears) - ears = null - update_inv_ears(0) - else if (W == shoes) - shoes = null - update_inv_shoes(0) - else if (W == belt) - belt = null - update_inv_belt(0) - else if (W == wear_mask) - wear_mask = null - if(W.flags & BLOCKHAIR) - update_hair(0) //rebuild hair - if(internal) - if(internals) - internals.icon_state = "internal0" - internal = null - update_inv_wear_mask(0) - else if (W == wear_id) - wear_id = null - update_inv_wear_id(0) - else if (W == r_store) - r_store = null - update_inv_pockets() - else if (W == l_store) - l_store = null - update_inv_pockets() - else if (W == s_store) - s_store = null - update_inv_s_store(0) - else if (W == back) - back = null - update_inv_back(0) - else if (W == handcuffed) - handcuffed = null - update_inv_handcuffed(0) - else if (W == r_hand) - r_hand = null - update_inv_r_hand(0) - else if (W == l_hand) - l_hand = null - update_inv_l_hand(0) - else - return 0 - -/mob/living/carbon/human/db_click(text, t1) - var/obj/item/W = equipped() - var/emptyHand = (W == null) - if(emptyHand) - usr.next_move = usr.prev_move - usr:lastDblClick -= 3 //permit the double-click redirection to proceed. - else - if( !istype(W, /obj/item) ) return - - switch(text) - if("mask") - if(wear_mask) - if(emptyHand) - wear_mask.DblClick() - return - if (!( W.slot_flags & SLOT_MASK )) - return - u_equip(W) - wear_mask = W - if(wear_mask && (wear_mask.flags & BLOCKHAIR)) - update_hair(0) //rebuild hair - W.equipped(src, text) - update_inv_wear_mask() - if("back") - if (back) - if (emptyHand) - back.DblClick() - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_BACK )) - return - if(istype(W,/obj/item/weapon/twohanded) && W:wielded) - usr << "Unwield the [initial(W.name)] first!" - return - u_equip(W) - back = W - W.equipped(src, text) - update_inv_back() -/* if("headset") - if (ears) - if (emptyHand) - ears.DblClick() - return - if (!( istype(W, /obj/item/device/radio/headset) )) - return - u_equip(W) - w_radio = W - W.equipped(src, text) */ - if("o_clothing") - if (wear_suit) - if (emptyHand) - wear_suit.DblClick() - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_OCLOTHING )) - return - if ((FAT in src.mutations) && !(W.flags & ONESIZEFITSALL)) - src << "\red You're too fat to wear the [W.name]!" - return - u_equip(W) - wear_suit = W - W.equipped(src, text) - update_inv_wear_suit() - if("gloves") - if (gloves) - if (emptyHand) - gloves.DblClick() - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_GLOVES )) - return - u_equip(W) - gloves = W - W.equipped(src, text) - update_inv_gloves() - if("shoes") - if (shoes) - if (emptyHand) - shoes.DblClick() - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_FEET )) - return - u_equip(W) - shoes = W - W.equipped(src, text) - update_inv_shoes() - if("belt") - if (belt) - if (emptyHand) - belt.DblClick() - return - if (!w_uniform) - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_BELT )) - return - u_equip(W) - belt = W - W.equipped(src, text) - update_inv_belt() - if("eyes") - if (glasses) - if (emptyHand) - glasses.DblClick() - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_EYES )) - return - u_equip(W) - glasses = W - W.equipped(src, text) - update_inv_glasses() - if("head") - if (head) - if (emptyHand) - head.DblClick() - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_HEAD )) - return - u_equip(W) - head = W - if(head.flags & BLOCKHAIR) - //rebuild hair - update_hair(0) - if(istype(W,/obj/item/clothing/head/kitty)) - W.update_icon(src) - W.equipped(src, text) - update_inv_head() - if("ears") - if (ears) - if (emptyHand) - ears.DblClick() - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_EARS )) - return - u_equip(W) - ears = W - W.equipped(src, text) - update_inv_ears() - if("i_clothing") - if (w_uniform) - if (emptyHand) - w_uniform.DblClick() - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_ICLOTHING )) - return - if ((FAT in src.mutations) && !(W.flags & ONESIZEFITSALL)) - src << "\red You're too fat to wear the [W.name]!" - return - u_equip(W) - w_uniform = W - W.equipped(src, text) - update_inv_w_uniform() - if("id") - if (wear_id) - if (emptyHand) - wear_id.DblClick() - return - if (!w_uniform) - return - if (!istype(W, /obj/item)) - return - if (!( W.slot_flags & SLOT_ID )) - return - u_equip(W) - wear_id = W - W.equipped(src, text) - update_inv_wear_id() - if("storage1") - if (l_store) - if (emptyHand) - l_store.DblClick() - return - if (!w_uniform) - return - if (!istype(W, /obj/item)) - return - if ( ( W.slot_flags & SLOT_DENYPOCKET ) ) - return - if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) - u_equip(W) - l_store = W - update_inv_pockets() - if("storage2") - if (r_store) - if (emptyHand) - r_store.DblClick() - return - if (!w_uniform) - return - if (!istype(W, /obj/item)) - return - if ( ( W.slot_flags & SLOT_DENYPOCKET ) ) - return - if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) ) - u_equip(W) - r_store = W - update_inv_pockets() - if("suit storage") - if (s_store) - if (emptyHand) - s_store.DblClick() - return - var/confirm - if (wear_suit) - if(!wear_suit.allowed) - usr << "You somehow have a suit with no defined allowed items for suit storage, stop that." - return - if (istype(W, /obj/item/device/pda) || istype(W, /obj/item/weapon/pen)) - confirm = 1 - if (is_type_in_list(W, wear_suit.allowed)) - confirm = 1 - if (!confirm) return - else - u_equip(W) - s_store = W - update_inv_s_store() - return - /mob/living/carbon/human/meteorhit(O as obj) for(var/mob/M in viewers(src, null)) if ((M.client && !( M.blinded ))) @@ -832,662 +490,6 @@ /mob/living/carbon/human/var/co2overloadtime = null /mob/living/carbon/human/var/temperature_resistance = T0C+75 -/obj/effect/equip_e/human/process() //TODO: Rewrite this steaming pile... ~Carn - if (item) - item.add_fingerprint(source) - if (!item) - switch(place) - if("mask") - if (!( target.wear_mask )) - //SN src = null - del(src) - return -/* if("headset") - if (!( target.w_radio )) - //SN src = null - del(src) - return */ - if("l_hand") - if (!( target.l_hand )) - //SN src = null - del(src) - return - if("r_hand") - if (!( target.r_hand )) - //SN src = null - del(src) - return - if("suit") - if (!( target.wear_suit )) - //SN src = null - del(src) - return - if("uniform") - if (!( target.w_uniform )) - //SN src = null - del(src) - return - if("back") - if (!( target.back )) - //SN src = null - del(src) - return - if("syringe") - return - if("pill") - return - if("fuel") - return - if("drink") - return - if("dnainjector") - return - if("handcuff") - if (!( target.handcuffed )) - //SN src = null - del(src) - return - if("id") - if ((!( target.wear_id ) || !( target.w_uniform ))) - //SN src = null - del(src) - return - if("internal") - if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal ))) - //SN src = null - del(src) - return - - var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel") - if ((item && !( L.Find(place) ))) - if(isrobot(source) && place != "handcuff") - del(src) - return - for(var/mob/O in viewers(target, null)) - O.show_message(text("\red [] is trying to put \a [] on []", source, item, target), 1) - else - var/message=null - switch(place) - if("syringe") - message = text("\red [] is trying to inject []!", source, target) - if("pill") - message = text("\red [] is trying to force [] to swallow []!", source, target, item) - if("fuel") - message = text("\red [source] is trying to force [target] to eat the [item:content]!") - if("drink") - message = text("\red [] is trying to force [] to swallow a gulp of []!", source, target, item) - if("dnainjector") - message = text("\red [] is trying to inject [] with the []!", source, target, item) - if("mask") - if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.wear_mask, target) - else - message = text("\red [] is trying to take off \a [] from []'s head!", source, target.wear_mask, target) -/* if("headset") - message = text("\red [] is trying to take off \a [] from []'s face!", source, target.w_radio, target) */ - if("l_hand") - message = text("\red [] is trying to take off \a [] from []'s left hand!", source, target.l_hand, target) - if("r_hand") - message = text("\red [] is trying to take off \a [] from []'s right hand!", source, target.r_hand, target) - if("gloves") - if(istype(target.gloves, /obj/item/clothing)&&!target.gloves:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.gloves, target) - else - message = text("\red [] is trying to take off the [] from []'s hands!", source, target.gloves, target) - if("eyes") - if(istype(target.glasses, /obj/item/clothing)&&!target.glasses:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.glasses, target) - else - message = text("\red [] is trying to take off the [] from []'s eyes!", source, target.glasses, target) - if("ears") - if(istype(target.ears, /obj/item/clothing)&&!target.ears:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.ears, target) - else - message = text("\red [] is trying to take off the [] from []'s ears!", source, target.ears, target) - if("head") - if(istype(target.head, /obj/item/clothing)&&!target.head:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.head, target) - else - message = text("\red [] is trying to take off the [] from []'s head!", source, target.head, target) - if("shoes") - if(istype(target.shoes, /obj/item/clothing)&&!target.shoes:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.shoes, target) - else - message = text("\red [] is trying to take off the [] from []'s feet!", source, target.shoes, target) - if("belt") - message = text("\red [] is trying to take off the [] from []'s belt!", source, target.belt, target) - if("suit") - if(istype(target.wear_suit, /obj/item/clothing)&&!target.wear_suit:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.wear_suit, target) - else - message = text("\red [] is trying to take off \a [] from []'s body!", source, target.wear_suit, target) - if("back") - message = text("\red [] is trying to take off \a [] from []'s back!", source, target.back, target) - if("handcuff") - message = text("\red [] is trying to unhandcuff []!", source, target) - if("uniform") - if(istype(target.w_uniform, /obj/item/clothing)&&!target.w_uniform:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.w_uniform, target) - else - message = text("\red [] is trying to take off \a [] from []'s body!", source, target.w_uniform, target) - if("s_store") - message = text("\red [] is trying to take off \a [] from []'s suit!", source, target.s_store, target) - if("pockets") - for(var/obj/item/weapon/mousetrap/MT in list(target.l_store, target.r_store)) - if(MT.armed) - for(var/mob/O in viewers(target, null)) - if(O == source) - O.show_message(text("\red You reach into the [target]'s pockets, but there was a live mousetrap in there!"), 1) - else - O.show_message(text("\red [source] reaches into [target]'s pockets and sets off a hidden mousetrap!"), 1) - target.u_equip(MT) - if (target.client) - target.client.screen -= MT - MT.loc = source.loc - MT.triggered(source, source.hand ? "l_hand" : "r_hand") - MT.layer = OBJ_LAYER - return - message = text("\red [] is trying to empty []'s pockets!!", source, target) - if("CPR") - if (target.cpr_time >= world.time + 3) - //SN src = null - del(src) - return - message = text("\red [] is trying perform CPR on []!", source, target) - if("id") - message = text("\red [] is trying to take off [] from []'s uniform!", source, target.wear_id, target) - if("internal") - if (target.internal) - message = text("\red [] is trying to remove []'s internals", source, target) - else - message = text("\red [] is trying to set on []'s internals.", source, target) - for(var/mob/M in viewers(target, null)) - M.show_message(message, 1) - spawn( 40 ) - done() - return - return - -/* -This proc equips stuff (or does something else) when removing stuff manually from the character window when you click and drag. -It works in conjuction with the process() above. -This proc works for humans only. Aliens stripping humans and the like will all use this proc. Stripping monkeys or somesuch will use their version of this proc. -The first if statement for "mask" and such refers to items that are already equipped and un-equipping them. -The else statement is for equipping stuff to empty slots. -!canremove refers to variable of /obj/item/clothing which either allows or disallows that item to be removed. -It can still be worn/put on as normal. -*/ -/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn - if(!source || !target) return - if(source.loc != s_loc) return - if(target.loc != t_loc) return - if(LinkBlocked(s_loc,t_loc)) return - if(item && source.equipped() != item) return - if ((source.restrained() || source.stat)) return - switch(place) - if("mask") - if (target.wear_mask) - if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove) - return - var/obj/item/clothing/W = target.wear_mask - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - if (W) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/clothing/mask)) - source.drop_item() - loc = target - item.layer = 20 - target.wear_mask = item - item.loc = target - target.update_inv_wear_mask(0) -/* if("headset") - if (target.w_radio) - var/obj/item/W = target.w_radio - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - else - if (istype(item, /obj/item/device/radio/headset)) - source.drop_item() - loc = target - item.layer = 20 - target.w_radio = item - item.loc = target*/ - if("gloves") - if (target.gloves) - if(istype(target.gloves, /obj/item/clothing)&& !target.gloves:canremove) - return - var/obj/item/clothing/W = target.gloves - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/clothing/gloves)) - source.drop_item() - loc = target - item.layer = 20 - target.gloves = item - item.loc = target - target.update_inv_gloves(0) - if("eyes") - if (target.glasses) - if(istype(target.glasses, /obj/item/clothing)&& !target.glasses:canremove) - return - var/obj/item/W = target.glasses - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/clothing/glasses)) - source.drop_item() - loc = target - item.layer = 20 - target.glasses = item - item.loc = target - target.update_inv_glasses(0) - if("belt") - if (target.belt) - var/obj/item/W = target.belt - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if ((istype(item, /obj) && (item.slot_flags & SLOT_BELT) && target.w_uniform)) - source.drop_item() - loc = target - item.layer = 20 - target.belt = item - item.loc = target - target.update_inv_belt(0) - if("s_store") - if (target.s_store) - var/obj/item/W = target.s_store - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj) && target.wear_suit) - var/confirm - for(var/i=1, i<=target.wear_suit.allowed.len, i++) - // world << "[target.wear_suit.allowed[i]] and [W.type]" - if (findtext("[item.type]","[target.wear_suit.allowed[i]]") || istype(item, /obj/item/device/pda) || istype(item, /obj/item/weapon/pen)) - confirm = 1 - break - if (!confirm) return - else - source.drop_item() - loc = target - item.layer = 20 - target.s_store = item - item.loc = target - target.update_inv_s_store(0) - if("head") - if (target.head) - if(istype(target.head, /obj/item/clothing)&& !target.head:canremove) - return - var/obj/item/W = target.head - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/clothing/head)) - source.drop_item() - loc = target - item.layer = 20 - target.head = item - item.loc = target - target.update_inv_head(0) - if("ears") - if (target.ears) - if(istype(target.ears, /obj/item/clothing)&& !target.ears:canremove) - return - var/obj/item/W = target.ears - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if( istype(item, /obj/item/clothing/ears) || istype(item, /obj/item/device/radio/headset) ) - source.drop_item() - loc = target - item.layer = 20 - target.ears = item - item.loc = target - target.update_inv_ears(0) - if("shoes") - if (target.shoes) - if(istype(target.shoes, /obj/item/clothing)&& !target.shoes:canremove) - return - var/obj/item/W = target.shoes - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/clothing/shoes)) - source.drop_item() - loc = target - item.layer = 20 - target.shoes = item - item.loc = target - target.update_inv_shoes(0) - if("l_hand") - if (istype(target, /obj/item/clothing/suit/straight_jacket)) - //SN src = null - del(src) - return - if (target.l_hand) - var/obj/item/W = target.l_hand - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.layer = initial(W.layer) - W.add_fingerprint(source) - W.dropped(target) //dropped sometimes deletes src so put it last - else - if(istype(item, /obj/item)) - source.drop_item() - if(item) - loc = target - item.layer = 20 - target.l_hand = item - item.loc = target - item.add_fingerprint(target) - target.update_inv_l_hand(0) - if("r_hand") - if (istype(target, /obj/item/clothing/suit/straight_jacket)) - //SN src = null - del(src) - return - if (target.r_hand) - var/obj/item/W = target.r_hand - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.layer = initial(W.layer) - W.add_fingerprint(source) - W.dropped(target) //dropped sometimes deletes src so put it last - else - if (istype(item, /obj/item)) - source.drop_item() - loc = target - if (item) - item.layer = 20 - target.r_hand = item - item.loc = target - item.add_fingerprint(target) - target.update_inv_r_hand(0) - if("uniform") - if (target.w_uniform) - if(istype(target.w_uniform, /obj/item/clothing)&& !target.w_uniform:canremove) - return - var/obj/item/W = target.w_uniform - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - W = target.l_store - if (W) - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W = target.r_store - if (W) - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W = target.wear_id - if (W) - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - else - if (istype(item, /obj/item/clothing/under)) - source.drop_item() - loc = target - item.layer = 20 - target.w_uniform = item - item.loc = target - target.update_inv_w_uniform(0) - if("suit") - if(target.wear_suit) - var/obj/item/W = target.wear_suit - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/clothing/suit)) - source.drop_item() - loc = target - item.layer = 20 - target.wear_suit = item - item.loc = target - target.update_inv_wear_suit(0) - if("id") - if (target.wear_id) - var/obj/item/W = target.wear_id - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (((istype(item, /obj/item/weapon/card/id)||istype(item, /obj/item/device/pda)) && target.w_uniform)) - source.drop_item() - loc = target - item.layer = 20 - target.wear_id = item - item.loc = target - target.update_inv_wear_id(0) - if("back") - if (target.back) - var/obj/item/W = target.back - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if ((istype(item, /obj/item) && (item.slot_flags & SLOT_BACK) )) - source.drop_item() - loc = target - item.layer = 20 - target.back = item - item.loc = target - target.update_inv_back(0) - if("handcuff") - if (target.handcuffed) - var/obj/item/W = target.handcuffed - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/weapon/handcuffs)) - target.drop_from_slot(target.r_hand) - target.drop_from_slot(target.l_hand) - source.drop_item() - target.handcuffed = item - item.loc = target - target.update_inv_handcuffed(0) - if("CPR") - if (target.cpr_time >= world.time + 30) - //SN src = null - del(src) - return - if ((target.health >= -99.0 && target.health < 0)) - target.cpr_time = world.time - var/suff = min(target.getOxyLoss(), 7) - target.adjustOxyLoss(-suff) - target.updatehealth() - for(var/mob/O in viewers(source, null)) - O.show_message(text("\red [] performs CPR on []!", source, target), 1) - target << "\blue You feel a breath of fresh air enter your lungs. It feels good." - source << "\red Repeat every 7 seconds AT LEAST." -/* if("fuel") - var/obj/item/weapon/fuel/S = item - if (!( istype(S, /obj/item/weapon/fuel) )) - //SN src = null - del(src) - return - if (S.s_time >= world.time + 30) - //SN src = null - del(src) - return - S.s_time = world.time - var/a = S.content - for(var/mob/O in viewers(source, null)) - O.show_message(text("\red [source] forced [target] to eat the [a]!"), 1) - S.injest(target) */ - if("dnainjector") - var/obj/item/weapon/dnainjector/S = item - if(item) - item.add_fingerprint(source) - item:inject(target, null) - if (!( istype(S, /obj/item/weapon/dnainjector) )) - //SN src = null - del(src) - return - if (S.s_time >= world.time + 30) - //SN src = null - del(src) - return - S.s_time = world.time - for(var/mob/O in viewers(source, null)) - O.show_message(text("\red [] injects [] with the DNA Injector!", source, target), 1) - if("pockets") - if (target.l_store) - var/obj/item/W = target.l_store - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - if (target.r_store) - var/obj/item/W = target.r_store - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - if("internal") - if (target.internal) - target.internal.add_fingerprint(source) - target.internal = null - if (target.internals) - target.internals.icon_state = "internal0" - else - if (!( istype(target.wear_mask, /obj/item/clothing/mask) )) - return - else - if (istype(target.back, /obj/item/weapon/tank)) - target.internal = target.back - else if (istype(target.s_store, /obj/item/weapon/tank)) - target.internal = target.s_store - else if (istype(target.belt, /obj/item/weapon/tank)) - target.internal = target.belt - if (target.internal) - for(var/mob/M in viewers(target, 1)) - M.show_message(text("[] is now running on internals.", target), 1) - target.internal.add_fingerprint(source) - if (target.internals) - target.internals.icon_state = "internal1" - //update overlays -// source.update_icons() - if(target) - target.update_icons() - - spawn(0) // <-- not sure why this spawn is here - if(source) - if(source.machine == target) - target.show_inv(source) - del(src) - return /mob/living/carbon/human/show_inv(mob/user as mob) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 5e14d998ddb..529aad1dd99 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -383,11 +383,7 @@ else lying = 0 canmove = 1 -/* for(var/obj/effect/stop/S in geaslist) - if(S.victim == src) - geaslist -= S - del(S) -*/ + proc/handle_breath(datum/gas_mixture/breath) if(nodamage || REBREATHER in augmentations) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 1274fd8a391..b3cb49b7130 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -511,188 +511,6 @@ del(src) return -/obj/effect/equip_e/monkey/process() - if (item) - item.add_fingerprint(source) - if (!( item )) - switch(place) - if("head") - if (!( target.wear_mask )) - del(src) - return - if("l_hand") - if (!( target.l_hand )) - del(src) - return - if("r_hand") - if (!( target.r_hand )) - del(src) - return - if("back") - if (!( target.back )) - del(src) - return - if("handcuff") - if (!( target.handcuffed )) - del(src) - return - if("internal") - if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal ))) - del(src) - return - - if (item) - for(var/mob/O in viewers(target, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] is trying to put a [] on []", source, item, target), 1) - else - var/message = null - switch(place) - if("mask") - if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove) - message = text("\red [] fails to take off \a [] from []'s body!", source, target.wear_mask, target) - else - message = text("\red [] is trying to take off \a [] from []'s head!", source, target.wear_mask, target) - if("l_hand") - message = text("\red [] is trying to take off a [] from []'s left hand!", source, target.l_hand, target) - if("r_hand") - message = text("\red [] is trying to take off a [] from []'s right hand!", source, target.r_hand, target) - if("back") - message = text("\red [] is trying to take off a [] from []'s back!", source, target.back, target) - if("handcuff") - message = text("\red [] is trying to unhandcuff []!", source, target) - if("internal") - if (target.internal) - message = text("\red [] is trying to remove []'s internals", source, target) - else - message = text("\red [] is trying to set on []'s internals.", source, target) - else - for(var/mob/M in viewers(target, null)) - M.show_message(message, 1) - spawn( 30 ) - done() - return - return - -/obj/effect/equip_e/monkey/done() - if(!source || !target) return - if(source.loc != s_loc) return - if(target.loc != t_loc) return - if(LinkBlocked(s_loc,t_loc)) return - if(item && source.equipped() != item) return - if ((source.restrained() || source.stat)) return - switch(place) - if("mask") - if (target.wear_mask) - if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove) - return - var/obj/item/W = target.wear_mask - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/clothing/mask)) - source.drop_item() - loc = target - item.layer = 20 - target.wear_mask = item - item.loc = target - if("l_hand") - if (target.l_hand) - var/obj/item/W = target.l_hand - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item)) - source.drop_item() - loc = target - item.layer = 20 - target.l_hand = item - item.loc = target - if("r_hand") - if (target.r_hand) - var/obj/item/W = target.r_hand - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item)) - source.drop_item() - loc = target - item.layer = 20 - target.r_hand = item - item.loc = target - if("back") - if (target.back) - var/obj/item/W = target.back - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if ((istype(item, /obj/item) && item.slot_flags & SLOT_BACK )) - source.drop_item() - loc = target - item.layer = 20 - target.back = item - item.loc = target - if("handcuff") - if (target.handcuffed) - var/obj/item/W = target.handcuffed - target.u_equip(W) - if (target.client) - target.client.screen -= W - if (W) - W.loc = target.loc - W.dropped(target) - W.layer = initial(W.layer) - W.add_fingerprint(source) - else - if (istype(item, /obj/item/weapon/handcuffs)) - source.drop_item() - target.handcuffed = item - item.loc = target - if("internal") - if (target.internal) - target.internal.add_fingerprint(source) - target.internal = null - else - if (target.internal) - target.internal = null - if (!( istype(target.wear_mask, /obj/item/clothing/mask) )) - return - else - if (istype(target.back, /obj/item/weapon/tank)) - target.internal = target.back - target.internal.add_fingerprint(source) - for(var/mob/M in viewers(target, 1)) - if ((M.client && !( M.blinded ))) - M.show_message(text("[] is now running on internals.", target), 1) - else - source.regenerate_icons() - target.regenerate_icons() - del(src) - return /mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools if(!ticker) return 0 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 2605656f932..9f4d58e30fc 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -136,93 +136,6 @@ return - - -/mob/proc/drop_item_v() - if (stat == 0) - drop_item() - return - -/mob/proc/drop_from_slot(var/obj/item/item) - if(!item) - return - if(!(item in contents)) - return - u_equip(item) - if (client) - client.screen -= item - if (item) - item.loc = loc - item.dropped(src) - if (item) - item.layer = initial(item.layer) - var/turf/T = get_turf(loc) - if (istype(T)) - T.Entered(item) - return - -/mob/proc/drop_item(var/atom/target) - var/obj/item/W = equipped() - - if (W) - u_equip(W) - update_icons() - if (client) - client.screen -= W - if (W) - W.layer = initial(W.layer) - if(target) - W.loc = target.loc - else - W.loc = loc - W.dropped(src) - var/turf/T = get_turf(loc) - if (istype(T)) - T.Entered(W) - return - -/mob/proc/before_take_item(var/obj/item/item) - item.loc = null - item.layer = initial(item.layer) - u_equip(item) - //if (client) - // client.screen -= item - update_icons() - return - -/mob/proc/get_active_hand() - if (hand) - return l_hand - else - return r_hand - -/mob/proc/get_inactive_hand() - if (!hand) - return l_hand - else - return r_hand - -/mob/proc/put_in_hand(var/obj/item/I) - if(!I) return - I.loc = src - if (hand) - l_hand = I - update_inv_l_hand() - else - r_hand = I - update_inv_r_hand() - I.layer = 20 - -/mob/proc/put_in_inactive_hand(var/obj/item/I) - I.loc = src - if (!hand) - l_hand = I - update_inv_l_hand() - else - r_hand = I - update_inv_r_hand() - I.layer = 20 - /mob/proc/reset_view(atom/A) if (client) if (istype(A, /atom/movable)) @@ -237,17 +150,6 @@ client.eye = loc return -/mob/proc/equipped() - if(issilicon(src)) - if(isrobot(src)) - if(src:module_active) - return src:module_active - else - if (hand) - return l_hand - else - return r_hand - return /mob/proc/show_inv(mob/user as mob) user.machine = src @@ -268,37 +170,6 @@ onclose(user, "mob[name]") return - - -/mob/proc/u_equip(W as obj) - if (W == r_hand) - r_hand = null - update_inv_r_hand() - else if (W == l_hand) - l_hand = null - update_inv_l_hand() - else if (W == handcuffed) - handcuffed = null - update_inv_handcuffed() - else if (W == back) - back = null - update_inv_back() - else if (W == wear_mask) - wear_mask = null - update_inv_wear_mask() - return - - -//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob. -/mob/proc/remove_from_mob(var/obj/O) - src.u_equip(O) - if (src.client) - src.client.screen -= O - O.layer = initial(O.layer) - O.screen_loc = null - return 1 - - /mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag) if ((!( istype(l_hand, /obj/item/weapon/grab) ) && !( istype(r_hand, /obj/item/weapon/grab) ))) if (!( L )) @@ -336,12 +207,18 @@ /mob/verb/mode() set name = "Activate Held Object" set category = "IC" - set src = usr - var/obj/item/W = equipped() - if (W) - W.attack_self(src) + if(hand) + var/obj/item/W = l_hand + if (W) + W.attack_self(src) + update_inv_l_hand() + else + var/obj/item/W = r_hand + if (W) + W.attack_self(src) + update_inv_r_hand() return /* @@ -825,27 +702,12 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check return 0 -/mob/proc/createGeas() -/* - var/obj/effect/stop/S - for(var/obj/effect/stop/temp in loc) - if(temp.victim == src) - S = temp - - if(!S) - S = new /obj/effect/stop - S.victim = src - S.loc = src.loc - geaslist += S -*/ - return - /mob/proc/Stun(amount) if(canstun) stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun - if(stunned) - createGeas() + + else if(istype(src, /mob/living/carbon/alien)) // add some movement delay var/mob/living/carbon/alien/Alien = src @@ -855,95 +717,68 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned" if(canstun) stunned = max(amount,0) - if(stunned) - createGeas() + + return /mob/proc/AdjustStunned(amount) if(canstun) stunned = max(stunned + amount,0) - if(stunned) - createGeas() return /mob/proc/Weaken(amount) if(canweaken) weakened = max(max(weakened,amount),0) - if(weakened) - createGeas() return /mob/proc/SetWeakened(amount) if(canweaken) weakened = max(amount,0) - if(weakened) - createGeas() return /mob/proc/AdjustWeakened(amount) if(canweaken) weakened = max(weakened + amount,0) - if(weakened) - createGeas() return /mob/proc/Paralyse(amount) paralysis = max(max(paralysis,amount),0) - if(paralysis) - createGeas() return /mob/proc/SetParalysis(amount) paralysis = max(amount,0) return - if(paralysis) - createGeas() /mob/proc/AdjustParalysis(amount) paralysis = max(paralysis + amount,0) - if(paralysis) - createGeas() return /mob/proc/Sleeping(amount) sleeping = max(max(sleeping,amount),0) - if(sleeping) - createGeas() return /mob/proc/SetSleeping(amount) sleeping = max(amount,0) return - if(sleeping) - createGeas() - /mob/proc/AdjustSleeping(amount) sleeping = max(sleeping + amount,0) - if(sleeping) - createGeas() return /mob/proc/Resting(amount) resting = max(max(resting,amount),0) - if(resting) - createGeas() return /mob/proc/SetResting(amount) resting = max(amount,0) return - if(resting) - createGeas() /mob/proc/AdjustResting(amount) resting = max(resting + amount,0) - if(resting) - createGeas() return - -// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching +// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching. +// Stop! ... Hammertime! ~Carn /mob/proc/getBruteLoss() return bruteloss diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 5bf15af1f76..679244fe446 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -253,8 +253,7 @@ the mob is also allowed to move without any sort of restriction. For instance, i var/incorporeal_move = 0 - var/update_icon = 1 // Set to 0 if you want that the mob's icon doesn't update when it moves -- Skie - // This can be used if you want to change the icon on the fly and want it to stay + var/update_icon = 1 //Set to 1 to trigger update_icons() at the next life() call var/UI = 'screen1_Midnight.dmi' // For changing the UI from preferences @@ -270,7 +269,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i var/datum/preferences/storedpreferences = null - var/geaslist = list() var/list/radar_blips = list() // list of screen objects, radar blips var/radar_open = 0 // nonzero is radar is open diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 2e08bcf3420..8ec036cd874 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -268,17 +268,3 @@ It's fairly easy to fix if dealing with single letters but not so much with comp return 1 return 0 - -/mob/proc/put_in_hands(var/obj/item/I) //A suprisingly useful proc. Allows a simple way to place an object in a mob's hands, or, if they are full, on the ground below them. - if(!r_hand) - I.loc = src - r_hand = I - update_inv_r_hand() - I.layer = 20 - else if(!l_hand) - I.loc = src - l_hand = I - update_inv_l_hand() - I.layer = 20 - else - I.loc = get_turf(src) \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index 04f64bbc465..45b735b22d2 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5,197 +5,6 @@ // END_INTERNALS // BEGIN_FILE_DIR #define FILE_DIR . -#define FILE_DIR "code" -#define FILE_DIR "code/ATMOSPHERICS" -#define FILE_DIR "code/ATMOSPHERICS/components" -#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices" -#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices" -#define FILE_DIR "code/ATMOSPHERICS/components/unary" -#define FILE_DIR "code/datums" -#define FILE_DIR "code/datums/diseases" -#define FILE_DIR "code/datums/helper_datums" -#define FILE_DIR "code/datums/spells" -#define FILE_DIR "code/defines" -#define FILE_DIR "code/defines/area" -#define FILE_DIR "code/defines/mob" -#define FILE_DIR "code/defines/mob/dead" -#define FILE_DIR "code/defines/mob/living" -#define FILE_DIR "code/defines/mob/living/carbon" -#define FILE_DIR "code/defines/mob/living/silicon" -#define FILE_DIR "code/defines/obj" -#define FILE_DIR "code/defines/obj/clothing" -#define FILE_DIR "code/defines/procs" -#define FILE_DIR "code/defines/tanning" -#define FILE_DIR "code/FEA" -#define FILE_DIR "code/game" -#define FILE_DIR "code/game/area" -#define FILE_DIR "code/game/asteroid" -#define FILE_DIR "code/game/gamemodes" -#define FILE_DIR "code/game/gamemodes/blob" -#define FILE_DIR "code/game/gamemodes/changeling" -#define FILE_DIR "code/game/gamemodes/cult" -#define FILE_DIR "code/game/gamemodes/events" -#define FILE_DIR "code/game/gamemodes/events/holidays" -#define FILE_DIR "code/game/gamemodes/extended" -#define FILE_DIR "code/game/gamemodes/malfunction" -#define FILE_DIR "code/game/gamemodes/meteor" -#define FILE_DIR "code/game/gamemodes/nuclear" -#define FILE_DIR "code/game/gamemodes/revolution" -#define FILE_DIR "code/game/gamemodes/sandbox" -#define FILE_DIR "code/game/gamemodes/traitor" -#define FILE_DIR "code/game/gamemodes/wizard" -#define FILE_DIR "code/game/jobs" -#define FILE_DIR "code/game/jobs/job" -#define FILE_DIR "code/game/machinery" -#define FILE_DIR "code/game/machinery/atmoalter" -#define FILE_DIR "code/game/machinery/bots" -#define FILE_DIR "code/game/machinery/computer" -#define FILE_DIR "code/game/machinery/doors" -#define FILE_DIR "code/game/machinery/embedded_controller" -#define FILE_DIR "code/game/machinery/kitchen" -#define FILE_DIR "code/game/machinery/pipe" -#define FILE_DIR "code/game/machinery/telecomms" -#define FILE_DIR "code/game/magic" -#define FILE_DIR "code/game/magic/cultist" -#define FILE_DIR "code/game/mecha" -#define FILE_DIR "code/game/mecha/combat" -#define FILE_DIR "code/game/mecha/equipment" -#define FILE_DIR "code/game/mecha/equipment/tools" -#define FILE_DIR "code/game/mecha/equipment/weapons" -#define FILE_DIR "code/game/mecha/medical" -#define FILE_DIR "code/game/mecha/working" -#define FILE_DIR "code/game/objects" -#define FILE_DIR "code/game/objects/alien" -#define FILE_DIR "code/game/objects/closets" -#define FILE_DIR "code/game/objects/closets/secure" -#define FILE_DIR "code/game/objects/devices" -#define FILE_DIR "code/game/objects/devices/PDA" -#define FILE_DIR "code/game/objects/items" -#define FILE_DIR "code/game/objects/items/weapons" -#define FILE_DIR "code/game/objects/items/weapons/implants" -#define FILE_DIR "code/game/objects/radio" -#define FILE_DIR "code/game/objects/secstorage" -#define FILE_DIR "code/game/objects/stacks" -#define FILE_DIR "code/game/objects/storage" -#define FILE_DIR "code/game/objects/tanks" -#define FILE_DIR "code/game/vehicles" -#define FILE_DIR "code/game/vehicles/airtight" -#define FILE_DIR "code/game/verbs" -#define FILE_DIR "code/js" -#define FILE_DIR "code/modules" -#define FILE_DIR "code/modules/admin" -#define FILE_DIR "code/modules/admin/verbs" -#define FILE_DIR "code/modules/assembly" -#define FILE_DIR "code/modules/chemical" -#define FILE_DIR "code/modules/client" -#define FILE_DIR "code/modules/clothing" -#define FILE_DIR "code/modules/clothing/glasses" -#define FILE_DIR "code/modules/clothing/spacesuits" -#define FILE_DIR "code/modules/clothing/suits" -#define FILE_DIR "code/modules/clothing/uniforms" -#define FILE_DIR "code/modules/critters" -#define FILE_DIR "code/modules/critters/hivebots" -#define FILE_DIR "code/modules/detectivework" -#define FILE_DIR "code/modules/flufftext" -#define FILE_DIR "code/modules/food" -#define FILE_DIR "code/modules/maps" -#define FILE_DIR "code/modules/mining" -#define FILE_DIR "code/modules/mob" -#define FILE_DIR "code/modules/mob/dead" -#define FILE_DIR "code/modules/mob/dead/observer" -#define FILE_DIR "code/modules/mob/living" -#define FILE_DIR "code/modules/mob/living/blob" -#define FILE_DIR "code/modules/mob/living/carbon" -#define FILE_DIR "code/modules/mob/living/carbon/alien" -#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid" -#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste" -#define FILE_DIR "code/modules/mob/living/carbon/alien/larva" -#define FILE_DIR "code/modules/mob/living/carbon/brain" -#define FILE_DIR "code/modules/mob/living/carbon/human" -#define FILE_DIR "code/modules/mob/living/carbon/human/Tajara" -#define FILE_DIR "code/modules/mob/living/carbon/metroid" -#define FILE_DIR "code/modules/mob/living/carbon/monkey" -#define FILE_DIR "code/modules/mob/living/silicon" -#define FILE_DIR "code/modules/mob/living/silicon/ai" -#define FILE_DIR "code/modules/mob/living/silicon/decoy" -#define FILE_DIR "code/modules/mob/living/silicon/pai" -#define FILE_DIR "code/modules/mob/living/silicon/robot" -#define FILE_DIR "code/modules/mob/new_player" -#define FILE_DIR "code/modules/mob/organ" -#define FILE_DIR "code/modules/mob/simple_animal" -#define FILE_DIR "code/modules/paperwork" -#define FILE_DIR "code/modules/power" -#define FILE_DIR "code/modules/power/antimatter" -#define FILE_DIR "code/modules/power/singularity" -#define FILE_DIR "code/modules/power/singularity/particle_accelerator" -#define FILE_DIR "code/modules/projectiles" -#define FILE_DIR "code/modules/projectiles/ammunition" -#define FILE_DIR "code/modules/projectiles/guns" -#define FILE_DIR "code/modules/projectiles/guns/energy" -#define FILE_DIR "code/modules/projectiles/guns/projectile" -#define FILE_DIR "code/modules/projectiles/projectile" -#define FILE_DIR "code/modules/recycling" -#define FILE_DIR "code/modules/research" -#define FILE_DIR "code/modules/scripting" -#define FILE_DIR "code/modules/scripting/AST" -#define FILE_DIR "code/modules/scripting/AST/Operators" -#define FILE_DIR "code/modules/scripting/Implementations" -#define FILE_DIR "code/modules/scripting/Interpreter" -#define FILE_DIR "code/modules/scripting/Parser" -#define FILE_DIR "code/modules/scripting/Scanner" -#define FILE_DIR "code/modules/security levels" -#define FILE_DIR "code/unused" -#define FILE_DIR "code/unused/beast" -#define FILE_DIR "code/unused/computer2" -#define FILE_DIR "code/unused/disease2" -#define FILE_DIR "code/unused/gamemodes" -#define FILE_DIR "code/unused/hivebot" -#define FILE_DIR "code/unused/mining" -#define FILE_DIR "code/unused/optics" -#define FILE_DIR "code/unused/pda2" -#define FILE_DIR "code/unused/powerarmor" -#define FILE_DIR "code/unused/spacecraft" -#define FILE_DIR "code/WorkInProgress" -#define FILE_DIR "code/WorkInProgress/BS12" -#define FILE_DIR "code/WorkInProgress/mapload" -#define FILE_DIR "code/WorkInProgress/organs" -#define FILE_DIR "code/WorkInProgress/virus2" -#define FILE_DIR "html" -#define FILE_DIR "icons" -#define FILE_DIR "icons/48x48" -#define FILE_DIR "icons/effects" -#define FILE_DIR "icons/mecha" -#define FILE_DIR "icons/misc" -#define FILE_DIR "icons/mob" -#define FILE_DIR "icons/obj" -#define FILE_DIR "icons/obj/assemblies" -#define FILE_DIR "icons/obj/atmospherics" -#define FILE_DIR "icons/obj/clothing" -#define FILE_DIR "icons/obj/doors" -#define FILE_DIR "icons/obj/machines" -#define FILE_DIR "icons/obj/pipes" -#define FILE_DIR "icons/pda_icons" -#define FILE_DIR "icons/spideros_icons" -#define FILE_DIR "icons/Testing" -#define FILE_DIR "icons/turf" -#define FILE_DIR "icons/unused" -#define FILE_DIR "icons/vehicles" -#define FILE_DIR "icons/vending_icons" -#define FILE_DIR "interface" -#define FILE_DIR "maps" -#define FILE_DIR "maps/RandomZLevels" -#define FILE_DIR "sound" -#define FILE_DIR "sound/AI" -#define FILE_DIR "sound/ambience" -#define FILE_DIR "sound/effects" -#define FILE_DIR "sound/hallucinations" -#define FILE_DIR "sound/items" -#define FILE_DIR "sound/machines" -#define FILE_DIR "sound/mecha" -#define FILE_DIR "sound/misc" -#define FILE_DIR "sound/piano" -#define FILE_DIR "sound/voice" -#define FILE_DIR "sound/weapons" // END_FILE_DIR // BEGIN_PREFERENCES @@ -858,6 +667,7 @@ #include "code\modules\mining\ores_materials_coins.dm" #include "code\modules\mining\satchel_ore_boxdm.dm" #include "code\modules\mob\death.dm" +#include "code\modules\mob\inventory.dm" #include "code\modules\mob\login.dm" #include "code\modules\mob\logout.dm" #include "code\modules\mob\mob.dm" @@ -891,6 +701,7 @@ #include "code\modules\mob\living\carbon\alien\humanoid\emote.dm" #include "code\modules\mob\living\carbon\alien\humanoid\hud.dm" #include "code\modules\mob\living\carbon\alien\humanoid\humanoid.dm" +#include "code\modules\mob\living\carbon\alien\humanoid\inventory.dm" #include "code\modules\mob\living\carbon\alien\humanoid\life.dm" #include "code\modules\mob\living\carbon\alien\humanoid\login.dm" #include "code\modules\mob\living\carbon\alien\humanoid\queen.dm" @@ -901,6 +712,7 @@ #include "code\modules\mob\living\carbon\alien\larva\death.dm" #include "code\modules\mob\living\carbon\alien\larva\emote.dm" #include "code\modules\mob\living\carbon\alien\larva\hud.dm" +#include "code\modules\mob\living\carbon\alien\larva\inventory.dm" #include "code\modules\mob\living\carbon\alien\larva\larva.dm" #include "code\modules\mob\living\carbon\alien\larva\life.dm" #include "code\modules\mob\living\carbon\alien\larva\login.dm" @@ -923,6 +735,7 @@ #include "code\modules\mob\living\carbon\human\human_damage.dm" #include "code\modules\mob\living\carbon\human\human_defense.dm" #include "code\modules\mob\living\carbon\human\human_movement.dm" +#include "code\modules\mob\living\carbon\human\inventory.dm" #include "code\modules\mob\living\carbon\human\life.dm" #include "code\modules\mob\living\carbon\human\login.dm" #include "code\modules\mob\living\carbon\human\say.dm" @@ -942,6 +755,7 @@ #include "code\modules\mob\living\carbon\monkey\emote.dm" #include "code\modules\mob\living\carbon\monkey\examine.dm" #include "code\modules\mob\living\carbon\monkey\hud.dm" +#include "code\modules\mob\living\carbon\monkey\inventory.dm" #include "code\modules\mob\living\carbon\monkey\life.dm" #include "code\modules\mob\living\carbon\monkey\login.dm" #include "code\modules\mob\living\carbon\monkey\monkey.dm"