mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
WARNING: This has been thoroughly tested and I'm happy that it's -stable- (it shouldn't runtime). However, it might have a few niggly bugs caused by specific items using no-standard or weird code. Most bugs will be stuff like it not updating overlays and such and can be fixed simply by dropping the item. That being said, if you're not comfortable with this, I'd suggest waiting to update past this revision.
update_clothing() has been broken up into it's key parts. A full explanation can be found in code/modules/mob/living/carbon/human/update_icons.dm the tl;dr of it is that overlay updates are no longer called by the gameticker. Instead they are called by procs such as u_equip db_cick etc. This means faster updates (although admittedly, more of them can be called per tick). This however is offset by the fact that specific overlays can be updated now, vastly improving its efficiency. This will especially help when there are large numbers of dead mobs. Fixed the throw code for TKgrab so it can be toggled. Cloaking for aliens/humans/ninjas was changed. It's very crude at the moment and for that I apologise. But it works and is very efficient.It also stops cloaked individuals becomming invincible due to people being unable to hit them (even when they know exactly where they are) Fixed a bunch of bugs with damage-overlays. They were updating FAR FAR to frequently. They were also horribly inefficient. They should now be virtually seamless when updating and only use cached icons, so they aren't affected by lag as badly. This may help with explosions lag a little. There's still a tonne of stuff I need to refine with this. I'll be refining it down into some helper procs to reduce on code duplication and such git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3811 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -245,8 +245,10 @@ client
|
||||
body += "<option value='byond://?src=\ref[src];build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='byond://?src=\ref[src];drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
body += "<option value='byond://?src=\ref[src];regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
if(ishuman(D))
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='byond://?src=\ref[src];setmutantrace=\ref[D]'>Set Mutantrace</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makemonkey=\ref[D]'>Make monkey</option>"
|
||||
@@ -731,6 +733,32 @@ client
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
else if (href_list["setmutantrace"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to objects of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant")
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
if(!H || !istype(H))
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
H.mutantrace = new_mutantrace
|
||||
H.update_mutantrace()
|
||||
else if (href_list["regenerateicons"])
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to objects of type /mob"
|
||||
return
|
||||
if(!src.holder)
|
||||
usr << "You are not an administrator."
|
||||
return
|
||||
M.regenerate_icons()
|
||||
else if (href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
var/mob/M = locate(href_list["mobToDamage"])
|
||||
var/Text = locate(href_list["adjustDamage"])
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
for(var/x in mutations)
|
||||
target.mutations.Add(x)
|
||||
target.disabilities |= disabilities
|
||||
target.update_mutations() //update target's mutation overlays
|
||||
spawn(duration)
|
||||
for(var/x in mutations)
|
||||
target.mutations.Remove(x)
|
||||
target.disabilities &= ~disabilities
|
||||
target.update_mutations()
|
||||
|
||||
return
|
||||
@@ -7,7 +7,6 @@
|
||||
gender = NEUTER
|
||||
|
||||
var/storedPlasma = 250
|
||||
var/alien_invis = 0.0
|
||||
var/max_plasma = 500
|
||||
|
||||
alien_talk_understand = 1
|
||||
|
||||
@@ -2,54 +2,45 @@
|
||||
name = "alien"
|
||||
icon_state = "alien_s"
|
||||
|
||||
var/obj/item/clothing/suit/wear_suit = null
|
||||
var/obj/item/clothing/head/head = null
|
||||
var/obj/item/clothing/suit/wear_suit = null //TODO: necessary? Are they even used? ~Carn
|
||||
var/obj/item/clothing/head/head = null //
|
||||
var/obj/item/weapon/r_store = null
|
||||
var/obj/item/weapon/l_store = null
|
||||
var/alien_invis = 0
|
||||
var/caste = ""
|
||||
update_icon = 1
|
||||
|
||||
var/icon/stand_icon = null
|
||||
var/icon/lying_icon = null
|
||||
var/icon/resting_icon = null
|
||||
var/icon/running_icon = null
|
||||
|
||||
var/last_b_state = 1.0
|
||||
|
||||
var/image/face_standing = null
|
||||
var/image/face_lying = null
|
||||
|
||||
var/image/damageicon_standing = null
|
||||
var/image/damageicon_lying = null
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
name = "alien hunter"
|
||||
|
||||
caste = "h"
|
||||
health = 150
|
||||
storedPlasma = 100
|
||||
max_plasma = 150
|
||||
icon_state = "alien_s"
|
||||
icon_state = "alienh_s"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel
|
||||
name = "alien sentinel"
|
||||
|
||||
caste = "s"
|
||||
health = 125
|
||||
storedPlasma = 100
|
||||
max_plasma = 250
|
||||
icon_state = "alien_s"
|
||||
icon_state = "aliens_s"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone
|
||||
name = "alien drone"
|
||||
|
||||
caste = "d"
|
||||
health = 100
|
||||
icon_state = "alien_s"
|
||||
icon_state = "aliend_s"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
name = "alien queen"
|
||||
|
||||
caste = "q"
|
||||
health = 250
|
||||
icon_state = "queen_s"
|
||||
icon_state = "alienq_s"
|
||||
nopush = 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/rpbody
|
||||
update_icon = 0
|
||||
|
||||
voice_message = "says"
|
||||
say_message = "says"
|
||||
@@ -7,6 +7,7 @@
|
||||
icon_state = "monkey1"
|
||||
gender = NEUTER
|
||||
pass_flags = PASSTABLE
|
||||
update_icon = 0 ///no need to call regenerate_icon
|
||||
|
||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
|
||||
|
||||
@@ -281,10 +281,6 @@
|
||||
var/mob/mymob = null
|
||||
var/list/adding = null
|
||||
var/list/other = null
|
||||
var/list/intents = null
|
||||
var/list/mov_int = null
|
||||
var/list/mon_blo = null
|
||||
var/list/m_ints = null
|
||||
var/obj/screen/druggy = null
|
||||
var/vimpaired = null
|
||||
var/obj/screen/alien_view = null
|
||||
@@ -293,7 +289,6 @@
|
||||
var/list/darkMask = null
|
||||
var/obj/screen/r_hand_hud_object = null
|
||||
var/obj/screen/l_hand_hud_object = null
|
||||
var/list/obj/screen/intent_small_hud_objects = null
|
||||
var/show_intent_icons = 0
|
||||
var/list/obj/screen/hotkeybuttons = null
|
||||
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
|
||||
|
||||
@@ -370,11 +370,12 @@
|
||||
var/obj/item/toy/snappop/M = new /obj/item/toy/snappop(src)
|
||||
if (user.hand)
|
||||
user.l_hand = M
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = M
|
||||
user.update_inv_r_hand()
|
||||
M.loc = user
|
||||
M.layer = 20
|
||||
user.update_clothing()
|
||||
user << "You take a snap pop out of the box."
|
||||
amount--
|
||||
else
|
||||
|
||||
+52
-34
@@ -51,24 +51,25 @@ proc/countJob(rank)
|
||||
jobCount++
|
||||
return jobCount
|
||||
|
||||
/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
|
||||
//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)
|
||||
@@ -89,15 +90,15 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.back = W
|
||||
update_clothing()
|
||||
update_inv_back()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_ID)
|
||||
if(!src.wear_id)
|
||||
if(!src.wear_id && src.w_uniform)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.wear_id = W
|
||||
update_clothing()
|
||||
update_inv_wear_id()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_ICLOTHING)
|
||||
@@ -105,7 +106,7 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.w_uniform = W
|
||||
update_clothing()
|
||||
update_inv_w_uniform()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_OCLOTHING)
|
||||
@@ -113,7 +114,7 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.wear_suit = W
|
||||
update_clothing()
|
||||
update_inv_wear_suit()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_MASK)
|
||||
@@ -121,7 +122,7 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.wear_mask = W
|
||||
update_clothing()
|
||||
update_inv_wear_mask()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_HEAD)
|
||||
@@ -129,7 +130,7 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.head = W
|
||||
update_clothing()
|
||||
update_inv_head()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_FEET)
|
||||
@@ -137,7 +138,7 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.shoes = W
|
||||
update_clothing()
|
||||
update_inv_shoes()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_GLOVES)
|
||||
@@ -145,7 +146,7 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.gloves = W
|
||||
update_clothing()
|
||||
update_inv_gloves()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_EARS)
|
||||
@@ -153,7 +154,7 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.ears = W
|
||||
update_clothing()
|
||||
update_inv_ears()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_EYES)
|
||||
@@ -161,15 +162,15 @@ proc/countJob(rank)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.glasses = W
|
||||
update_clothing()
|
||||
update_inv_glasses()
|
||||
return
|
||||
|
||||
if(W.slot_flags & SLOT_BELT)
|
||||
if(!src.belt)
|
||||
if(!src.belt && w_uniform)
|
||||
if( src.get_active_hand() == W )
|
||||
src.u_equip(W)
|
||||
src.belt = W
|
||||
update_clothing()
|
||||
update_inv_belt()
|
||||
return
|
||||
|
||||
//Suit storage
|
||||
@@ -183,7 +184,7 @@ proc/countJob(rank)
|
||||
if(confirm)
|
||||
src.u_equip(W)
|
||||
src.s_store = W
|
||||
update_clothing()
|
||||
update_inv_s_store()
|
||||
return
|
||||
|
||||
//Pockets
|
||||
@@ -192,13 +193,13 @@ proc/countJob(rank)
|
||||
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
|
||||
u_equip(W)
|
||||
l_store = W
|
||||
update_clothing()
|
||||
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_clothing()
|
||||
update_inv_pockets()
|
||||
return
|
||||
|
||||
|
||||
@@ -215,70 +216,87 @@ proc/countJob(rank)
|
||||
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))
|
||||
|
||||
+12
-7
@@ -233,6 +233,7 @@
|
||||
if(blood_DNA[H.dna.unique_enzymes])
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
H.update_inv_gloves() //handles bloody hands overlays and updating
|
||||
return 1 //we applied blood to the item
|
||||
return
|
||||
|
||||
@@ -331,7 +332,7 @@
|
||||
del(fingerprints)
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/M = src
|
||||
M.update_clothing()
|
||||
M.update_inv_gloves() //handles bloody hands too
|
||||
return
|
||||
|
||||
/atom/MouseDrop(atom/over_object as mob|obj|turf|area)
|
||||
@@ -422,8 +423,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
|
||||
//Attack self
|
||||
if (W == src && usr.stat == 0)
|
||||
spawn (0)
|
||||
W.attack_self(usr)
|
||||
// spawn (0) //causes runtimes under heavy lag
|
||||
W.attack_self(usr)
|
||||
return
|
||||
|
||||
//Attackby, attack_hand, afterattack, etc. can only be done once every 1 second, unless an object has the NODELAY or USEDELAY flags set
|
||||
@@ -490,7 +491,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
var/in_range = in_range(src, human) || src.loc == human
|
||||
|
||||
if (in_range)
|
||||
if ( !human.restrained() )
|
||||
if (!( human.restrained() || human.lying ))
|
||||
if (W)
|
||||
attackby(W,human)
|
||||
if (W)
|
||||
@@ -761,8 +762,12 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
|
||||
// ------- ATTACK SELF -------
|
||||
if (W == src && usr.stat == 0)
|
||||
spawn (0)
|
||||
W.attack_self(usr)
|
||||
// spawn (0) //would cause a runtime if W was deconstructed during a lagspike
|
||||
W.attack_self(usr)
|
||||
if(usr.hand)
|
||||
usr.update_inv_l_hand() //update in-hand overlays
|
||||
else
|
||||
usr.update_inv_r_hand()
|
||||
return
|
||||
|
||||
// ------- PARALYSIS, STUN, WEAKENED, DEAD, (And not AI) -------
|
||||
@@ -914,7 +919,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
// ------- TESTS ABOVE DETERMINED YOU CANNOT REACH THE TILE -------
|
||||
return 0
|
||||
|
||||
if (!( usr.restrained() ))
|
||||
if (!( usr.restrained() || usr.lying ))
|
||||
// ------- YOU ARE NOT REASTRAINED -------
|
||||
|
||||
if (W)
|
||||
|
||||
+5
-5
@@ -362,8 +362,8 @@
|
||||
H.h_style = hair.icon_state
|
||||
H.hair_style = hair
|
||||
|
||||
H.update_face()
|
||||
H.update_body()
|
||||
H.update_hair()
|
||||
|
||||
return 1
|
||||
else
|
||||
@@ -459,7 +459,6 @@
|
||||
if (W==H.w_uniform) // will be teared
|
||||
continue
|
||||
H.drop_from_slot(W)
|
||||
M.update_clothing()
|
||||
M.monkeyizing = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
@@ -514,6 +513,7 @@
|
||||
for (var/obj/item/weapon/implant/I in implants)
|
||||
I.loc = O
|
||||
I.implanted = O
|
||||
// O.update_icon = 1 //queue a full icon update at next life() call
|
||||
del(M)
|
||||
return
|
||||
|
||||
@@ -528,7 +528,6 @@
|
||||
if(!connected)
|
||||
for(var/obj/item/W in (Mo.contents-implants))
|
||||
Mo.drop_from_slot(W)
|
||||
M.update_clothing()
|
||||
M.monkeyizing = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
@@ -595,11 +594,12 @@
|
||||
for (var/obj/item/weapon/implant/I in implants)
|
||||
I.loc = O
|
||||
I.implanted = O
|
||||
// O.update_icon = 1 //queue a full icon update at next life() call
|
||||
del(M)
|
||||
return
|
||||
//////////////////////////////////////////////////////////// Monkey Block
|
||||
if (M)
|
||||
M.update_clothing()
|
||||
if(M)
|
||||
M.update_icon = 1 //queue a full icon update at next life() call
|
||||
return null
|
||||
/////////////////////////// DNA MISC-PROCS
|
||||
|
||||
|
||||
@@ -256,11 +256,10 @@
|
||||
usr << "Our genes cry out!"
|
||||
|
||||
var/list/implants = list() //Try to preserve implants.
|
||||
for(var/obj/item/weapon/W in usr)
|
||||
if (istype(W, /obj/item/weapon/implant))
|
||||
implants += W
|
||||
for(var/obj/item/weapon/implant/W in usr)
|
||||
implants += W
|
||||
|
||||
usr.update_clothing()
|
||||
usr.regenerate_icons()
|
||||
usr.monkeyizing = 1
|
||||
usr.canmove = 0
|
||||
usr.icon = null
|
||||
@@ -346,7 +345,7 @@
|
||||
for (var/obj/item/weapon/implant/I in usr) //Still preserving implants
|
||||
implants += I
|
||||
|
||||
usr.update_clothing()
|
||||
usr.regenerate_icons()
|
||||
usr.monkeyizing = 1
|
||||
usr.canmove = 0
|
||||
usr.icon = null
|
||||
@@ -414,7 +413,7 @@
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
usr.drop_from_slot(W)
|
||||
usr.update_clothing()
|
||||
usr.regenerate_icons()
|
||||
usr.monkeyizing = 1
|
||||
usr.canmove = 0
|
||||
usr.icon = null
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//For the love of god,space out your code! This is a nightmare to read.
|
||||
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/*
|
||||
@@ -151,7 +153,7 @@ ________________________________________________________________________________
|
||||
//=======//INITIALIZE//=======//
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize(delay = s_delay, mob/living/carbon/human/U = loc)
|
||||
if(U.mind&&U.mind.assigned_role=="MODE"&&!s_initialized&&!s_busy)//Shouldn't be busy... but anything is possible I guess.
|
||||
if(U.mind && U.mind.assigned_role=="MODE" && !s_initialized && !s_busy)//Shouldn't be busy... but anything is possible I guess.
|
||||
s_busy = 1
|
||||
for(var/i,i<7,i++)
|
||||
switch(i)
|
||||
@@ -169,7 +171,7 @@ ________________________________________________________________________________
|
||||
unlock_suit()
|
||||
break
|
||||
lock_suit(U,1)//Check for icons.
|
||||
U.update_clothing()
|
||||
U.regenerate_icons()
|
||||
U << "\blue Linking neural-net interface...\nPattern \green <B>GREEN</B>\blue, continuing operation."
|
||||
if(4)
|
||||
U << "\blue VOID-shift device status: <B>ONLINE</B>.\nCLOAK-tech device status: <B>ONLINE</B>."
|
||||
@@ -228,7 +230,7 @@ ________________________________________________________________________________
|
||||
blade_check(U,2)
|
||||
remove_equip_verbs()
|
||||
unlock_suit()
|
||||
U.update_clothing()
|
||||
U.regenerate_icons()
|
||||
sleep(delay)
|
||||
s_busy = 0
|
||||
return
|
||||
@@ -589,7 +591,7 @@ ________________________________________________________________________________
|
||||
U << "\blue Power nodes re-routed. \nLimiter unlocked."
|
||||
if(3)
|
||||
grant_kamikaze(U)//Give them verbs and change variables as necessary.
|
||||
U.update_clothing()//Update their clothing.
|
||||
U.regenerate_icons()//Update their clothing.
|
||||
ninjablade()//Summon two energy blades.
|
||||
message_admins("\blue [U.key] used KAMIKAZE mode.", 1)//Let the admins know.
|
||||
s_busy = 0
|
||||
@@ -869,6 +871,7 @@ ________________________________________________________________________________
|
||||
spawn(0)
|
||||
anim(U.loc,U,'mob.dmi',,"cloak",,U.dir)
|
||||
s_active=!s_active
|
||||
U.update_icons() //update their icons
|
||||
U << "\blue You are now invisible to normal detection."
|
||||
for(var/mob/O in oviewers(U))
|
||||
O.show_message("[U.name] vanishes into thin air!",1)
|
||||
@@ -880,6 +883,7 @@ ________________________________________________________________________________
|
||||
spawn(0)
|
||||
anim(U.loc,U,'mob.dmi',,"uncloak",,U.dir)
|
||||
s_active=!s_active
|
||||
U.update_icons() //update their icons
|
||||
U << "\blue You are now visible."
|
||||
for(var/mob/O in oviewers(U))
|
||||
O.show_message("[U.name] appears from thin air!",1)
|
||||
|
||||
@@ -368,9 +368,11 @@
|
||||
if (usr.r_hand == R)
|
||||
usr.u_equip(R)
|
||||
usr.r_hand = T
|
||||
usr.update_inv_r_hand()
|
||||
else
|
||||
usr.u_equip(R)
|
||||
usr.l_hand = T
|
||||
usr.update_inv_l_hand()
|
||||
R.loc = T
|
||||
T.layer = 20
|
||||
T.set_frequency(initial(T.frequency))
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
if(T.icon_state == "carpetsymbol")
|
||||
T.dir = 2
|
||||
|
||||
H:update_clothing() // so that it updates the bible's item_state in his hand
|
||||
H.update_inv_l_hand() // so that it updates the bible's item_state in his hand
|
||||
|
||||
switch(input(H,"Look at your bible - is this what you want?") in list("Yes","No"))
|
||||
if("Yes")
|
||||
|
||||
@@ -251,7 +251,7 @@ var/global/datum/controller/occupations/job_master
|
||||
new /obj/item/weapon/storage/box/survival(BPK)
|
||||
H.equip_if_possible(BPK, H.slot_back,1)
|
||||
|
||||
|
||||
H.regenerate_icons()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -376,9 +376,11 @@
|
||||
if (user.r_hand == T)
|
||||
user.u_equip(T)
|
||||
user.r_hand = B
|
||||
user.update_inv_r_hand()
|
||||
else
|
||||
user.u_equip(T)
|
||||
user.l_hand = B
|
||||
user.update_inv_l_hand()
|
||||
B.layer = 20
|
||||
user << "You add the tiles into the empty toolbox. They stick oddly out the top."
|
||||
del(T)
|
||||
@@ -392,9 +394,11 @@
|
||||
if (user.r_hand == W)
|
||||
user.u_equip(W)
|
||||
user.r_hand = B
|
||||
user.update_inv_r_hand()
|
||||
else
|
||||
user.u_equip(W)
|
||||
user.l_hand = B
|
||||
user.update_inv_l_hand()
|
||||
B.created_name = src.created_name
|
||||
B.layer = 20
|
||||
user << "You add the sensor to the toolbox and tiles!"
|
||||
@@ -416,6 +420,8 @@
|
||||
var/obj/machinery/bot/floorbot/A = new /obj/machinery/bot/floorbot
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
A.loc = user.loc
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_l_hand(1)
|
||||
else
|
||||
A.loc = src.loc
|
||||
A.name = src.created_name
|
||||
|
||||
@@ -557,9 +557,11 @@
|
||||
if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = A
|
||||
user.update_inv_r_hand()
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = A
|
||||
user.update_inv_l_hand()
|
||||
A.layer = 20
|
||||
user << "You add the robot arm to the first aid kit"
|
||||
del(S)
|
||||
|
||||
@@ -325,8 +325,10 @@
|
||||
cell.layer = 20
|
||||
if(usr.hand)
|
||||
usr.l_hand = cell
|
||||
usr.update_inv_l_hand()
|
||||
else
|
||||
usr.r_hand = cell
|
||||
usr.update_inv_r_hand()
|
||||
|
||||
cell.add_fingerprint(usr)
|
||||
cell.updateicon()
|
||||
|
||||
@@ -719,9 +719,11 @@ Auto Patrol: []"},
|
||||
if(user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = A
|
||||
user.update_inv_r_hand()
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = A
|
||||
user.update_inv_l_hand()
|
||||
A.layer = 20
|
||||
user << "You add the signaler to the helmet."
|
||||
del(S)
|
||||
|
||||
@@ -198,9 +198,8 @@
|
||||
if(se)
|
||||
src.occupant.dna.struc_enzymes = se
|
||||
randmutb(src.occupant) //Sometimes the clones come out wrong.
|
||||
src.occupant:update_face()
|
||||
src.occupant:update_body()
|
||||
src.occupant:mutantrace = mrace
|
||||
src.occupant:update_mutantrace()
|
||||
src.occupant:suiciding = 0
|
||||
src.attempting = 0
|
||||
return 1
|
||||
|
||||
@@ -792,10 +792,10 @@ About the new airlock wires panel:
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M << "\red [user] headbutts the airlock."
|
||||
var/datum/organ/external/affecting = H.get_organ("head")
|
||||
affecting.take_damage(10, 0)
|
||||
H.Stun(8)
|
||||
H.Weaken(5)
|
||||
H.UpdateDamageIcon()
|
||||
if(affecting.take_damage(10, 0))
|
||||
H.UpdateDamageIcon()
|
||||
else
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M << "\red [user] headbutts the airlock. Good thing they're wearing a helmet."
|
||||
|
||||
@@ -934,11 +934,9 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
updateappearance(podman, ui)
|
||||
if (se)
|
||||
podman.dna.struc_enzymes = se
|
||||
podman:update_face()
|
||||
podman:update_body()
|
||||
|
||||
if(!prob(potency)) //if it fails, plantman!
|
||||
podman.mutantrace = "plant"
|
||||
podman.update_mutantrace()
|
||||
|
||||
else //else, one packet of seeds. maybe two
|
||||
var/seed_count = 1
|
||||
|
||||
@@ -128,8 +128,10 @@
|
||||
cell.layer = 20
|
||||
if(usr.hand)
|
||||
usr.l_hand = cell
|
||||
usr.update_inv_l_hand()
|
||||
else
|
||||
usr.r_hand = cell
|
||||
usr.update_inv_r_hand()
|
||||
|
||||
cell.add_fingerprint(usr)
|
||||
cell.updateicon()
|
||||
|
||||
@@ -784,7 +784,7 @@ var/list/sacrificed = list()
|
||||
return fizzle()
|
||||
cultist.loc = src.loc
|
||||
cultist.lying = 1
|
||||
cultist.update_clothing()
|
||||
cultist.regenerate_icons()
|
||||
for(var/mob/living/carbon/human/C in orange(1,src))
|
||||
if(iscultist(C))
|
||||
C.say("N'ath reth sh'yro eth d'rekkathnor!")
|
||||
|
||||
@@ -44,12 +44,13 @@
|
||||
|
||||
var/datum/organ/external/temp = H.get_organ(pick("chest", "chest", "chest", "head"))
|
||||
if(temp)
|
||||
var/update = 0
|
||||
switch(damtype)
|
||||
if("brute")
|
||||
H.Paralyse(1)
|
||||
temp.take_damage(rand(force/2, force), 0)
|
||||
update |= temp.take_damage(rand(force/2, force), 0)
|
||||
if("fire")
|
||||
temp.take_damage(0, rand(force/2, force))
|
||||
update |= temp.take_damage(0, rand(force/2, force))
|
||||
if("tox")
|
||||
if(H.reagents)
|
||||
if(H.reagents.get_reagent_amount("carpotoxin") + force < force*2)
|
||||
@@ -58,7 +59,7 @@
|
||||
H.reagents.add_reagent("cryptobiolin", force)
|
||||
else
|
||||
return
|
||||
H.UpdateDamageIcon()
|
||||
if(update) H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
|
||||
else
|
||||
|
||||
@@ -151,7 +151,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
layer = 20
|
||||
target.wear_mask = src
|
||||
|
||||
target.update_clothing()
|
||||
target.update_inv_wear_mask()
|
||||
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
|
||||
@@ -178,7 +178,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
else
|
||||
for(var/mob/O in viewers(target,null))
|
||||
O.show_message("\red \b [src] violates [target]'s face!", 1)
|
||||
|
||||
target.update_inv_wear_mask()
|
||||
return
|
||||
|
||||
proc/GoActive()
|
||||
|
||||
@@ -53,4 +53,6 @@
|
||||
/obj/item/weapon/cloaking_device/emp_act(severity)
|
||||
active = 0
|
||||
icon_state = "shield0"
|
||||
if(ismob(loc))
|
||||
loc:update_icons()
|
||||
..()
|
||||
|
||||
@@ -122,8 +122,10 @@
|
||||
var/obj/item/candle/W = new /obj/item/candle(user)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = W
|
||||
user.update_inv_r_hand()
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -96,9 +96,7 @@ THERMAL GLASSES
|
||||
src.force = 3
|
||||
src.damtype = "fire"
|
||||
src.icon_state = "cake1"
|
||||
|
||||
processing_objects.Add(src)
|
||||
|
||||
else
|
||||
src.force = null
|
||||
src.damtype = "brute"
|
||||
@@ -176,6 +174,7 @@ THERMAL GLASSES
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
color = A.color
|
||||
usr.update_inv_w_uniform() //so our overlays update.
|
||||
|
||||
/obj/item/clothing/under/chameleon/emp_act(severity)
|
||||
name = "psychedelic"
|
||||
@@ -208,6 +207,7 @@ THERMAL GLASSES
|
||||
/obj/item/clothing/under/verb/toggle()
|
||||
set name = "Toggle Suit Sensors"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
var/mob/M = usr
|
||||
if (istype(M, /mob/dead/)) return
|
||||
if (usr.stat) return
|
||||
@@ -251,7 +251,9 @@ THERMAL GLASSES
|
||||
/obj/item/clothing/head/helmet/welding/verb/toggle()
|
||||
set category = "Object"
|
||||
set name = "Adjust welding mask"
|
||||
if(usr.canmove && usr.stat != 2 && !usr.restrained())
|
||||
set src in usr
|
||||
|
||||
if(usr.canmove && !usr.stat && !usr.restrained())
|
||||
if(src.up)
|
||||
src.up = !src.up
|
||||
src.see_face = !src.see_face
|
||||
@@ -266,6 +268,7 @@ THERMAL GLASSES
|
||||
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES)
|
||||
icon_state = "weldingup"
|
||||
usr << "You push the mask up out of your face."
|
||||
usr.update_inv_head() //so our mob-overlays update
|
||||
|
||||
/obj/item/clothing/head/cargosoft/dropped()
|
||||
src.icon_state = "cargosoft"
|
||||
@@ -275,18 +278,22 @@ THERMAL GLASSES
|
||||
/obj/item/clothing/head/cargosoft/verb/flip()
|
||||
set category = "Object"
|
||||
set name = "Flip cap"
|
||||
src.flipped = !src.flipped
|
||||
if(src.flipped)
|
||||
icon_state = "cargosoft_flipped"
|
||||
usr << "You flip the hat backwards."
|
||||
else
|
||||
icon_state = "cargosoft"
|
||||
usr << "You flip the hat back in normal position."
|
||||
set src in usr
|
||||
if(usr.canmove && !usr.stat && !usr.restrained())
|
||||
src.flipped = !src.flipped
|
||||
if(src.flipped)
|
||||
icon_state = "cargosoft_flipped"
|
||||
usr << "You flip the hat backwards."
|
||||
else
|
||||
icon_state = "cargosoft"
|
||||
usr << "You flip the hat back in normal position."
|
||||
usr.update_inv_head() //so our mob-overlays update
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/magboots/verb/toggle()
|
||||
set name = "Toggle Magboots"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(src.magpulse)
|
||||
src.flags &= ~NOSLIP
|
||||
src.slowdown = SHOES_SLOWDOWN
|
||||
@@ -299,6 +306,7 @@ THERMAL GLASSES
|
||||
src.magpulse = 1
|
||||
icon_state = "magboots1"
|
||||
usr << "You enable the mag-pulse traction system."
|
||||
usr.update_inv_shoes() //so our mob-overlays update
|
||||
|
||||
/obj/item/clothing/shoes/magboots/examine()
|
||||
set src in view()
|
||||
@@ -311,6 +319,11 @@ THERMAL GLASSES
|
||||
/obj/item/clothing/suit/suit/verb/toggle()
|
||||
set name = "Toggle Jacket Buttons"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
if(src.icon_state == "suitjacket_blue_open")
|
||||
src.icon_state = "suitjacket_blue"
|
||||
src.item_state = "suitjacket_blue"
|
||||
@@ -320,62 +333,65 @@ THERMAL GLASSES
|
||||
src.item_state = "suitjacket_blue_open"
|
||||
usr << "You unbutton the suit jacket."
|
||||
else
|
||||
usr << "Sorry! The suit you're wearing doesn't have buttons!"
|
||||
usr << "You button-up some imaginary buttons on your [src]."
|
||||
return
|
||||
usr.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/suit/labcoat/verb/toggle()
|
||||
set name = "Toggle Labcoat Buttons"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
else
|
||||
|
||||
if(src.icon_state == "labcoat_open")
|
||||
switch(icon_state)
|
||||
if("labcoat_open")
|
||||
src.icon_state = "labcoat"
|
||||
usr << "You button up the labcoat."
|
||||
else if(src.icon_state == "labcoat")
|
||||
if("labcoat")
|
||||
src.icon_state = "labcoat_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else if(src.icon_state == "labcoat_cmo_open")
|
||||
if("labcoat_cmo_open")
|
||||
src.icon_state = "labcoat_cmo"
|
||||
usr << "You button up the labcoat."
|
||||
else if(src.icon_state == "labcoat_cmo")
|
||||
if("labcoat_cmo")
|
||||
src.icon_state = "labcoat_cmo_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else if(src.icon_state == "labcoat_gen_open")
|
||||
if("labcoat_gen_open")
|
||||
src.icon_state = "labcoat_gen"
|
||||
usr << "You button up the labcoat."
|
||||
else if(src.icon_state == "labcoat_gen")
|
||||
if("labcoat_gen")
|
||||
src.icon_state = "labcoat_gen_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else if(src.icon_state == "labcoat_chem_open")
|
||||
if("labcoat_chem_open")
|
||||
src.icon_state = "labcoat_chem"
|
||||
usr << "You button up the labcoat."
|
||||
else if(src.icon_state == "labcoat_chem")
|
||||
if("labcoat_chem")
|
||||
src.icon_state = "labcoat_chem_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else if(src.icon_state == "labcoat_vir_open")
|
||||
if("labcoat_vir_open")
|
||||
src.icon_state = "labcoat_vir"
|
||||
usr << "You button up the labcoat."
|
||||
else if(src.icon_state == "labcoat_vir")
|
||||
if("labcoat_vir")
|
||||
src.icon_state = "labcoat_vir_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else if(src.icon_state == "labcoat_tox_open")
|
||||
if("labcoat_tox_open")
|
||||
src.icon_state = "labcoat_tox"
|
||||
usr << "You button up the labcoat."
|
||||
else if(src.icon_state == "labcoat_tox")
|
||||
if("labcoat_tox")
|
||||
src.icon_state = "labcoat_tox_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else if(src.icon_state == "labgreen_open")
|
||||
if("labgreen_open")
|
||||
src.icon_state = "labgreen"
|
||||
usr << "You button up the labcoat."
|
||||
else if(src.icon_state == "labgreen")
|
||||
if("labgreen")
|
||||
src.icon_state = "labgreen_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
|
||||
else
|
||||
usr << "Sorry! The suit you're wearing doesn't have buttons!"
|
||||
usr << "You attempt to button-up the velcro on your [src], before promptly realising how retarded you are."
|
||||
return
|
||||
usr.update_inv_wear_suit() //so our overlays update
|
||||
|
||||
/obj/item/clothing/head/ushanka/attack_self(mob/user as mob)
|
||||
if(src.icon_state == "ushankadown")
|
||||
|
||||
@@ -62,14 +62,14 @@ MONKEY CUBE BOX
|
||||
P.loc = usr
|
||||
P.layer = 20
|
||||
usr.l_hand = P
|
||||
usr.update_clothing()
|
||||
usr.update_inv_l_hand()
|
||||
usr << "You take a donut out of the box."
|
||||
break
|
||||
else if (!usr.r_hand)
|
||||
P.loc = usr
|
||||
P.layer = 20
|
||||
usr.r_hand = P
|
||||
usr.update_clothing()
|
||||
usr.update_inv_r_hand()
|
||||
usr << "You take a donut out of the box."
|
||||
break
|
||||
else
|
||||
@@ -138,7 +138,7 @@ MONKEY CUBE BOX
|
||||
P.layer = 20
|
||||
usr.l_hand = P
|
||||
P = null
|
||||
usr.update_clothing()
|
||||
usr.update_inv_l_hand()
|
||||
usr << "You take an egg out of the box."
|
||||
break
|
||||
else if (!usr.r_hand)
|
||||
@@ -146,7 +146,7 @@ MONKEY CUBE BOX
|
||||
P.layer = 20
|
||||
usr.r_hand = P
|
||||
P = null
|
||||
usr.update_clothing()
|
||||
usr.update_inv_r_hand()
|
||||
usr << "You take an egg out of the box."
|
||||
break
|
||||
else
|
||||
@@ -189,11 +189,12 @@ MONKEY CUBE BOX
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src)
|
||||
if (user.hand)
|
||||
user.l_hand = M
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = M
|
||||
user.update_inv_r_hand()
|
||||
M.loc = user
|
||||
M.layer = 20
|
||||
user.update_clothing()
|
||||
user << "You take a monkey cube out of the box."
|
||||
amount--
|
||||
else
|
||||
|
||||
@@ -119,15 +119,15 @@
|
||||
src.pickup(user)
|
||||
user.lastDblClick = world.time + 2
|
||||
user.next_move = world.time + 2
|
||||
|
||||
if (user.hand)
|
||||
user.l_hand = src
|
||||
else
|
||||
user.r_hand = src
|
||||
src.loc = user
|
||||
src.layer = 20
|
||||
add_fingerprint(user)
|
||||
user.update_clothing()
|
||||
if (user.hand)
|
||||
user.l_hand = src
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = src
|
||||
user.update_inv_r_hand()
|
||||
return
|
||||
|
||||
|
||||
@@ -158,14 +158,14 @@
|
||||
src.pickup(user)
|
||||
user.lastDblClick = world.time + 2
|
||||
user.next_move = world.time + 2
|
||||
|
||||
if (user.hand)
|
||||
user.l_hand = src
|
||||
else
|
||||
user.r_hand = src
|
||||
src.loc = user
|
||||
src.layer = 20
|
||||
user.update_clothing()
|
||||
if (user.hand)
|
||||
user.l_hand = src
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = src
|
||||
user.update_inv_r_hand()
|
||||
return
|
||||
|
||||
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -361,7 +361,8 @@
|
||||
)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(7)
|
||||
if(affecting.take_damage(7))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
M.eye_blurry += rand(3,4)
|
||||
|
||||
@@ -33,10 +33,12 @@
|
||||
user.l_hand = focus
|
||||
else
|
||||
user.r_hand = focus
|
||||
|
||||
focus.loc = user
|
||||
focus.layer = 20
|
||||
add_fingerprint(user)
|
||||
user.update_clothing()
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_r_hand()
|
||||
spawn(0)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -17,12 +17,13 @@
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
M.update_inv_r_hand()
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
M.update_inv_l_hand()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -96,13 +96,13 @@ FINGERPRINT CARD
|
||||
usr.l_hand = P
|
||||
P.loc = usr
|
||||
P.layer = 20
|
||||
usr.update_clothing()
|
||||
usr.update_inv_l_hand()
|
||||
else
|
||||
if (!( usr.r_hand ))
|
||||
usr.r_hand = P
|
||||
P.loc = usr
|
||||
P.layer = 20
|
||||
usr.update_clothing()
|
||||
usr.update_inv_r_hand()
|
||||
src.add_fingerprint(usr)
|
||||
P.add_fingerprint(usr)
|
||||
src.update()
|
||||
|
||||
@@ -74,8 +74,10 @@ ZIPPO
|
||||
var/obj/item/weapon/match/W = new /obj/item/weapon/match(user)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = W
|
||||
user.update_inv_r_hand()
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
@@ -156,6 +158,11 @@ ZIPPO
|
||||
var/obj/item/weapon/match/M = W
|
||||
if(M.lit > 0)
|
||||
light("\red [user] lights their [name] with their [W].")
|
||||
|
||||
//can't think of any other way to update the overlays :<
|
||||
user.update_inv_wear_mask(0)
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_r_hand(1)
|
||||
return
|
||||
|
||||
|
||||
@@ -202,10 +209,12 @@ ZIPPO
|
||||
src.smoketime--
|
||||
if(src.smoketime < 1)
|
||||
new type_butt(location)
|
||||
processing_objects.Remove(src)
|
||||
if(ismob(src.loc))
|
||||
var/mob/living/M = src.loc
|
||||
M << "\red Your [src.name] goes out."
|
||||
processing_objects.Remove(src)
|
||||
M.u_equip(src) //un-equip it so the overlays can update
|
||||
M.update_icons()
|
||||
del(src)
|
||||
return
|
||||
if(location)
|
||||
@@ -423,8 +432,10 @@ ZIPPO
|
||||
reagents.trans_to(W, reagents.total_volume)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = W
|
||||
user.update_inv_r_hand()
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -227,6 +227,7 @@ CRITTER GRENADE
|
||||
else
|
||||
if (M.ear_damage >= 5)
|
||||
M << "\red Your ears start to ring!"
|
||||
M.update_icons()
|
||||
|
||||
prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -86,7 +86,8 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/organ = ((user.hand ? "l_":"r_") + "arm")
|
||||
var/datum/organ/external/affecting = user.get_organ(organ)
|
||||
affecting.take_damage(0,force)
|
||||
if(affecting.take_damage(0,force))
|
||||
user.UpdateDamageIcon()
|
||||
else
|
||||
user.take_organ_damage(0,force)
|
||||
|
||||
@@ -109,7 +110,8 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/organ = ((user.hand ? "l_":"r_") + "arm")
|
||||
var/datum/organ/external/affecting = user.get_organ(organ)
|
||||
affecting.take_damage(0,force)
|
||||
if(affecting.take_damage(0,force))
|
||||
user.UpdateDamageIcon()
|
||||
else
|
||||
user.take_organ_damage(0,force)
|
||||
if(prob(50))
|
||||
|
||||
@@ -28,13 +28,16 @@
|
||||
if ((src.case && (user.l_hand == src || user.r_hand == src)))
|
||||
if (user.hand)
|
||||
user.l_hand = src.case
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = src.case
|
||||
user.update_inv_r_hand()
|
||||
src.case.loc = user
|
||||
src.case.layer = 20
|
||||
src.case.add_fingerprint(user)
|
||||
src.case = null
|
||||
user.update_clothing()
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_r_hand()
|
||||
src.add_fingerprint(user)
|
||||
update()
|
||||
else
|
||||
|
||||
@@ -69,7 +69,8 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15)
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
@@ -155,7 +156,8 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15)
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
@@ -230,7 +232,8 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15)
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
@@ -329,7 +332,8 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15)
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
|
||||
@@ -374,7 +378,8 @@ CIRCULAR SAW
|
||||
user << "\red You nick an artery!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(75)
|
||||
if(affecting.take_damage(75))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(75)
|
||||
|
||||
@@ -429,7 +434,8 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15)
|
||||
if(affecting.take_damage(15))
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
|
||||
@@ -498,7 +504,8 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(40)
|
||||
if(affecting.take_damage(40))
|
||||
M:UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(40)
|
||||
|
||||
@@ -380,7 +380,7 @@ WELDINGTOOOL
|
||||
"You cut \the [M]'s restraints with \the [src]!",\
|
||||
"You hear cable being cut.")
|
||||
M.handcuffed = null
|
||||
M.update_clothing()
|
||||
M.update_inv_handcuffed()
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -84,8 +84,10 @@ PHOTOGRAPHS
|
||||
src.gift.loc = user
|
||||
if (user.hand)
|
||||
user.l_hand = src.gift
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = src.gift
|
||||
user.update_inv_r_hand()
|
||||
src.gift.layer = 20
|
||||
src.gift.add_fingerprint(user)
|
||||
del(src)
|
||||
@@ -125,8 +127,10 @@ PHOTOGRAPHS
|
||||
var/obj/item/device/flash/W = new /obj/item/device/flash( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = W
|
||||
M.update_inv_r_hand()
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
@@ -136,8 +140,10 @@ PHOTOGRAPHS
|
||||
var/obj/item/weapon/gun/energy/laser/W = new /obj/item/weapon/gun/energy/laser( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = W
|
||||
M.update_inv_r_hand()
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
@@ -147,8 +153,10 @@ PHOTOGRAPHS
|
||||
var/obj/item/weapon/gun/energy/taser/W = new /obj/item/weapon/gun/energy/taser( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = W
|
||||
M.update_inv_r_hand()
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
@@ -158,8 +166,10 @@ PHOTOGRAPHS
|
||||
var/obj/item/weapon/melee/energy/sword/W = new /obj/item/weapon/melee/energy/sword( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = W
|
||||
M.update_inv_r_hand()
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
@@ -169,8 +179,10 @@ PHOTOGRAPHS
|
||||
var/obj/item/weapon/melee/energy/axe/W = new /obj/item/weapon/melee/energy/axe( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = W
|
||||
M.update_inv_r_hand()
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
|
||||
@@ -58,9 +58,11 @@
|
||||
if (user.r_hand == W)
|
||||
user.u_equip(W)
|
||||
user.r_hand = A
|
||||
user.update_inv_r_hand()
|
||||
else
|
||||
user.u_equip(W)
|
||||
user.l_hand = A
|
||||
user.update_inv_l_hand()
|
||||
W.master = A
|
||||
src.master = A
|
||||
src.layer = initial(src.layer)
|
||||
|
||||
@@ -197,9 +197,11 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
if (usr.r_hand == R)
|
||||
usr.u_equip(R)
|
||||
usr.r_hand = T
|
||||
usr.update_inv_r_hand()
|
||||
else
|
||||
usr.u_equip(R)
|
||||
usr.l_hand = T
|
||||
usr.update_inv_l_hand()
|
||||
R.loc = T
|
||||
T.layer = 20
|
||||
T.attack_self(usr)
|
||||
|
||||
@@ -266,7 +266,7 @@ SHARDS
|
||||
if(!H.shoes)
|
||||
var/datum/organ/external/affecting = H.get_organ(pick("l_leg", "r_leg"))
|
||||
H.Weaken(3)
|
||||
affecting.take_damage(5, 0)
|
||||
H.UpdateDamageIcon()
|
||||
if(affecting.take_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
..()
|
||||
@@ -100,7 +100,8 @@
|
||||
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M)) return
|
||||
buckle_mob(M, user)
|
||||
M.lying = 1
|
||||
// M.lying = 1
|
||||
// M.update_icons() //update our icons to reflect our lying/standing status
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/attack_paw(mob/user as mob)
|
||||
@@ -136,6 +137,7 @@
|
||||
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M)) return
|
||||
buckle_mob(M, user)
|
||||
// M.update_icons() //update our icons to reflect our lying/standing status
|
||||
return
|
||||
|
||||
//roller bed
|
||||
@@ -156,7 +158,6 @@
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled || istype(usr, /mob/living/silicon/pai)))
|
||||
return
|
||||
M.pixel_y = 6
|
||||
M.update_clothing()
|
||||
density = 1
|
||||
icon_state = "up"
|
||||
..()
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
M.update_inv_r_hand()
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
M.update_inv_l_hand()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -27,12 +27,13 @@
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
M.update_inv_r_hand()
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
M.update_inv_l_hand()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
@@ -98,12 +98,13 @@
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
M.update_inv_r_hand()
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
M.update_inv_l_hand()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
return //To prevent the stacking of the same sized items.
|
||||
|
||||
user.u_equip(W)
|
||||
user.update_icons() //update our overlays
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
@@ -377,12 +378,13 @@
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
M.update_inv_r_hand()
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
M.update_inv_l_hand()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -45,12 +45,13 @@ CRAYONS
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
M.update_inv_r_hand()
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
M.update_inv_l_hand()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -335,13 +335,14 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
item:loc = A
|
||||
A.r_hand = item
|
||||
item:layer = 20
|
||||
A.update_inv_r_hand()
|
||||
else if(!A.l_hand)
|
||||
item:loc = A
|
||||
A.l_hand = item
|
||||
item:layer = 20
|
||||
A.update_inv_l_hand()
|
||||
else
|
||||
item:loc = get_turf(A)
|
||||
usr.update_clothing()
|
||||
// usr.client.onBought("[item:name]") When we have the stats again, uncomment.
|
||||
/* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
|
||||
del item*/
|
||||
@@ -441,10 +442,12 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
if(!A.r_hand)
|
||||
item:loc = A
|
||||
A.r_hand = item
|
||||
A.update_inv_r_hand()
|
||||
item:layer = 20
|
||||
else if(!A.l_hand)
|
||||
item:loc = A
|
||||
A.l_hand = item
|
||||
A.update_inv_l_hand()
|
||||
item:layer = 20
|
||||
else
|
||||
item:loc = get_turf(A)
|
||||
@@ -469,10 +472,11 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
if (usr.r_hand == R)
|
||||
usr.u_equip(R)
|
||||
usr.r_hand = T
|
||||
|
||||
// usr.update_inv_r_hand()
|
||||
else
|
||||
usr.u_equip(R)
|
||||
usr.l_hand = T
|
||||
// usr.update_inv_l_hand()
|
||||
R.loc = T
|
||||
T.layer = 20
|
||||
T.set_frequency(initial(T.frequency))
|
||||
@@ -532,9 +536,11 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
if (L.r_hand == R)
|
||||
L.u_equip(R)
|
||||
L.r_hand = T
|
||||
L.update_inv_r_hand()
|
||||
else
|
||||
L.u_equip(R)
|
||||
L.l_hand = T
|
||||
L.update_inv_l_hand()
|
||||
T.layer = 20
|
||||
T.set_frequency(initial(T.frequency))
|
||||
return
|
||||
@@ -200,8 +200,6 @@
|
||||
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
|
||||
if(!on) return
|
||||
|
||||
O.clean_blood()
|
||||
|
||||
if(istype(O, /mob/living/carbon))
|
||||
var/mob/living/carbon/monkey = O //it's not necessarily a monkey, but >accurate varnames
|
||||
if(monkey.r_hand)
|
||||
@@ -210,21 +208,27 @@
|
||||
monkey.l_hand.clean_blood()
|
||||
if(monkey.wear_mask)
|
||||
monkey.wear_mask.clean_blood()
|
||||
monkey.update_inv_wear_mask(0)
|
||||
|
||||
if(istype(O, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/washer = O
|
||||
if(washer.head)
|
||||
washer.head.clean_blood()
|
||||
washer.update_inv_head(0)
|
||||
if(washer.wear_suit)
|
||||
washer.wear_suit.clean_blood()
|
||||
washer.update_inv_wear_suit(0)
|
||||
else if(washer.w_uniform)
|
||||
washer.w_uniform.clean_blood()
|
||||
washer.update_inv_w_uniform(0)
|
||||
if(washer.shoes)
|
||||
washer.shoes.clean_blood()
|
||||
washer.update_inv_shoes(0)
|
||||
if(washer.gloves)
|
||||
washer.gloves.clean_blood()
|
||||
if(washer.head)
|
||||
washer.head.clean_blood()
|
||||
// washer.update_inv_gloves(0) //no need for this one since it's located in clean_blood too.
|
||||
|
||||
O.clean_blood()
|
||||
|
||||
if(loc)
|
||||
var/turf/tile = get_turf(loc)
|
||||
@@ -299,8 +303,10 @@
|
||||
var/mob/living/carbon/human/washer = C
|
||||
if(washer.gloves) //if they have gloves
|
||||
washer.gloves.clean_blood() //clean the gloves
|
||||
washer.update_inv_gloves() //update our overlays
|
||||
else //and if they don't,
|
||||
washer.clean_blood() //wash their hands (a mob being bloody means they are 'red handed')
|
||||
//overlays will be updated in clean_blood()
|
||||
else
|
||||
C.clean_blood() //other things that can't wear gloves should just wash the mob.
|
||||
for(var/mob/V in viewers(src, null))
|
||||
|
||||
@@ -138,8 +138,8 @@
|
||||
affecting = H.get_organ(type)
|
||||
H.Stun(3)
|
||||
if(affecting)
|
||||
affecting.take_damage(1, 0)
|
||||
H.UpdateDamageIcon()
|
||||
if(affecting.take_damage(1, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
playsound(target.loc, 'snap.ogg', 50, 1)
|
||||
icon_state = "mousetrap"
|
||||
|
||||
+13
-5
@@ -1,12 +1,22 @@
|
||||
/mob/living/carbon/proc/toggle_throw_mode()
|
||||
if(!equipped())//Not holding anything
|
||||
if(TK in mutations)
|
||||
var/W = equipped()
|
||||
if( !W )//Not holding anything
|
||||
if( client && (TK in mutations) )
|
||||
if (hand)
|
||||
l_hand = new/obj/item/tk_grab(src)
|
||||
l_hand:host = src
|
||||
l_hand.screen_loc = ui_lhand
|
||||
client.screen += l_hand
|
||||
else
|
||||
r_hand = new/obj/item/tk_grab(src)
|
||||
r_hand:host = src
|
||||
r_hand.screen_loc = ui_rhand
|
||||
client.screen += r_hand
|
||||
return
|
||||
|
||||
if( istype(W,/obj/item/tk_grab) )
|
||||
if(hand) del(l_hand)
|
||||
else del(r_hand)
|
||||
return
|
||||
|
||||
if (src.in_throw_mode)
|
||||
@@ -33,9 +43,8 @@
|
||||
|
||||
if(!item) return
|
||||
|
||||
|
||||
|
||||
u_equip(item)
|
||||
update_icons()
|
||||
if(src.client)
|
||||
src.client.screen -= item
|
||||
item.loc = src.loc
|
||||
@@ -118,7 +127,6 @@
|
||||
visible_message("\red <B>[M] has been knocked down by the force of [src]!</B>")
|
||||
M:apply_effect(rand(4,12), WEAKEN, armor_block)
|
||||
|
||||
M:UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(rand(20,45))
|
||||
|
||||
|
||||
@@ -2092,7 +2092,7 @@ var/global/BSACooldown = 0
|
||||
feedback_add_details("admin_secrets_fun_used","DF")
|
||||
for(var/mob/living/carbon/human/B in world)
|
||||
B.face_icon_state = "facial_wise"
|
||||
B.update_face()
|
||||
B.update_hair()
|
||||
message_admins("[key_name_admin(usr)] activated dorf mode")
|
||||
else
|
||||
alert("You cannot perform this action. You must be of a higher administrative rank!")
|
||||
|
||||
@@ -380,7 +380,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
id.assignment = "Captain"
|
||||
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
|
||||
H.equip_if_possible(id, H.slot_wear_id)
|
||||
H.update_clothing()
|
||||
H.update_inv_wear_id()
|
||||
else
|
||||
alert("Invalid mob")
|
||||
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -765,7 +765,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.registered_name = M.real_name
|
||||
M.equip_if_possible(W, M.slot_wear_id)
|
||||
|
||||
M.update_clothing()
|
||||
M.regenerate_icons()
|
||||
|
||||
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
|
||||
message_admins("\blue [key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode]..", 1)
|
||||
|
||||
@@ -269,7 +269,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
variable = holder.marked_datum
|
||||
|
||||
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state", "mutantrace")
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
|
||||
@@ -34,7 +34,10 @@
|
||||
if(usr.control_object && usr.name_archive) //if you have a name archived and if you are actually relassing an object
|
||||
usr.real_name = usr.name_archive
|
||||
usr.name = usr.real_name
|
||||
usr.update_clothing() //So the name is updated properly
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.name = H.get_visible_name()
|
||||
// usr.regenerate_icons() //So the name is updated properly
|
||||
|
||||
usr.loc = O.loc // Appear where the object you were controlling is -- TLE
|
||||
usr.client.eye = usr
|
||||
|
||||
@@ -658,8 +658,8 @@ datum
|
||||
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
if(affecting)
|
||||
affecting.take_damage(25, 0)
|
||||
M:UpdateDamageIcon()
|
||||
if(affecting.take_damage(25, 0))
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl
|
||||
@@ -708,8 +708,8 @@ datum
|
||||
|
||||
if(!M.unacidable)
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15, 0)
|
||||
M:UpdateDamageIcon()
|
||||
if(affecting.take_damage(15, 0))
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
else
|
||||
if(istype(M, /mob/living/carbon/monkey) && M:wear_mask)
|
||||
@@ -724,8 +724,8 @@ datum
|
||||
if(!M.unacidable)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(15, 0)
|
||||
M:UpdateDamageIcon()
|
||||
if(affecting.take_damage(15, 0))
|
||||
M:UpdateDamageIcon()
|
||||
M:emote("scream")
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 4))
|
||||
|
||||
@@ -1838,9 +1838,11 @@
|
||||
if (user.r_hand == D)
|
||||
user.u_equip(D)
|
||||
user.r_hand = B
|
||||
user.update_inv_r_hand()
|
||||
else
|
||||
user.u_equip(D)
|
||||
user.l_hand = B
|
||||
user.update_inv_l_hand()
|
||||
B.layer = 20
|
||||
user << "You add the sensor to the bucket"
|
||||
del(D)
|
||||
|
||||
@@ -5,17 +5,8 @@
|
||||
if(src.name == "alien drone")
|
||||
src.name = text("alien drone ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
spawn (1)
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers
|
||||
src.stand_icon = new /icon('alien.dmi', "aliend_s")
|
||||
src.lying_icon = new /icon('alien.dmi', "aliend_l")
|
||||
src.resting_icon = new /icon('alien.dmi', "aliend_sleep")
|
||||
src.running_icon = new /icon('alien.dmi', "aliend_running")
|
||||
src.icon = src.stand_icon
|
||||
update_clothing()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers
|
||||
//Drones use the same base as generic humanoids.
|
||||
//Drone verbs
|
||||
|
||||
|
||||
@@ -5,16 +5,7 @@
|
||||
if(src.name == "alien hunter")
|
||||
src.name = text("alien hunter ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
spawn (1)
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/corrode
|
||||
src.stand_icon = new /icon('alien.dmi', "alienh_s")
|
||||
src.lying_icon = new /icon('alien.dmi', "alienh_l")
|
||||
src.resting_icon = new /icon('alien.dmi', "alienh_sleep")
|
||||
src.running_icon = new /icon('alien.dmi', "alienh_running")
|
||||
src.icon = src.stand_icon
|
||||
update_clothing()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/corrode
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
|
||||
@@ -154,16 +145,21 @@
|
||||
set desc = "Makes you invisible for 15 seconds"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(50))
|
||||
adjustToxLoss(-50)
|
||||
alien_invis = 1.0
|
||||
src << "\green You are now invisible."
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
O.show_message(text("\red <B>[src] fades into the surroundings!</B>"), 1)
|
||||
spawn(150)
|
||||
if(!isnull(src))//Don't want the game to runtime error when the mob no-longer exists.
|
||||
alien_invis = 0.0
|
||||
src << "\green You are no longer invisible."
|
||||
if(alien_invis)
|
||||
update_icons()
|
||||
else
|
||||
if(powerc(50))
|
||||
adjustToxLoss(-50)
|
||||
alien_invis = 1.0
|
||||
update_icons()
|
||||
src << "\green You are now invisible."
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
O.show_message(text("\red <B>[src] fades into the surroundings!</B>"), 1)
|
||||
spawn(250)
|
||||
if(!isnull(src))//Don't want the game to runtime error when the mob no-longer exists.
|
||||
alien_invis = 0.0
|
||||
update_icons()
|
||||
src << "\green You are no longer invisible."
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/verb/regurgitate()
|
||||
|
||||
@@ -5,16 +5,7 @@
|
||||
if(src.name == "alien sentinel")
|
||||
src.name = text("alien sentinel ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
spawn (1)
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
src.stand_icon = new /icon('alien.dmi', "aliens_s")
|
||||
src.lying_icon = new /icon('alien.dmi', "aliens_l")
|
||||
src.resting_icon = new /icon('alien.dmi', "aliens_sleep")
|
||||
src.running_icon = new /icon('alien.dmi', "aliens_running")
|
||||
src.icon = src.stand_icon
|
||||
update_clothing()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel
|
||||
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
@@ -50,41 +45,6 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "help_small"
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "disarm_small"
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "grab_small"
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "harm_small"
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
|
||||
@@ -6,15 +6,6 @@
|
||||
if(name == "alien")
|
||||
name = text("alien ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
spawn (1)
|
||||
if(!istype(src, /mob/living/carbon/alien/humanoid/queen))
|
||||
stand_icon = new /icon('alien.dmi', "alien_s")
|
||||
lying_icon = new /icon('alien.dmi', "alien_l")
|
||||
resting_icon = new /icon('alien.dmi', "alienh_sleep")
|
||||
running_icon = new /icon('alien.dmi', "alienh_running")
|
||||
icon = stand_icon
|
||||
update_clothing()
|
||||
src << "\blue Your icons have been generated!"
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/mind_initialize(mob/G, alien_caste)
|
||||
@@ -152,16 +143,22 @@
|
||||
/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()
|
||||
@@ -179,6 +176,8 @@
|
||||
if (wear_suit)
|
||||
if (emptyHand)
|
||||
wear_suit.DblClick()
|
||||
// else
|
||||
// update_inv_wear_suit()
|
||||
return
|
||||
/* if (!( istype(W, /obj/item/clothing/suit) ))
|
||||
return
|
||||
@@ -190,11 +189,10 @@
|
||||
if (head)
|
||||
if (emptyHand)
|
||||
head.DblClick()
|
||||
return
|
||||
if (( istype(W, /obj/effect/alien/head) ))
|
||||
else if (( istype(W, /obj/effect/alien/head) )) //TODO: figure out wtf this is about ~Carn
|
||||
u_equip(W)
|
||||
head = W
|
||||
return
|
||||
update_inv_head()
|
||||
return
|
||||
/* if (!( istype(W, /obj/item/clothing/head) ))
|
||||
return
|
||||
@@ -211,6 +209,7 @@
|
||||
return
|
||||
u_equip(W)
|
||||
l_store = W
|
||||
update_inv_pockets()
|
||||
if("storage2")
|
||||
if (r_store)
|
||||
if (emptyHand)
|
||||
@@ -220,7 +219,7 @@
|
||||
return
|
||||
u_equip(W)
|
||||
r_store = W
|
||||
else
|
||||
update_inv_pockets()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
|
||||
@@ -310,161 +309,6 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_clothing()
|
||||
..()
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
overlays = null
|
||||
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/structure/stool/bed/chair))
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
|
||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform.
|
||||
if (zone_sel)
|
||||
zone_sel.overlays = null
|
||||
zone_sel.overlays += damageicon_standing
|
||||
zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting))
|
||||
|
||||
if (lying)
|
||||
if(update_icon)
|
||||
if(!resting)
|
||||
icon = lying_icon
|
||||
else
|
||||
icon = resting_icon
|
||||
|
||||
else if(!lying)
|
||||
if(update_icon)
|
||||
if(m_intent == "run")
|
||||
icon = running_icon
|
||||
else
|
||||
icon = stand_icon
|
||||
|
||||
overlays += damageicon_lying
|
||||
|
||||
if (face_lying)
|
||||
overlays += face_lying
|
||||
else
|
||||
if(update_icon)
|
||||
icon = stand_icon
|
||||
|
||||
overlays += damageicon_standing
|
||||
|
||||
if (face_standing)
|
||||
overlays += face_standing
|
||||
|
||||
// Uniform
|
||||
if (client)
|
||||
client.screen -= hud_used.other
|
||||
client.screen -= hud_used.intents
|
||||
client.screen -= hud_used.mov_int
|
||||
|
||||
// ???
|
||||
if (client && other)
|
||||
client.screen += hud_used.other
|
||||
|
||||
|
||||
if (client)
|
||||
if (i_select)
|
||||
if (intent)
|
||||
client.screen += hud_used.intents
|
||||
|
||||
var/list/L = dd_text2list(intent, ",")
|
||||
L[1] += ":-11"
|
||||
i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
|
||||
else
|
||||
i_select.screen_loc = null
|
||||
if (m_select)
|
||||
if (m_int)
|
||||
client.screen += hud_used.mov_int
|
||||
|
||||
var/list/L = dd_text2list(m_int, ",")
|
||||
L[1] += ":-11"
|
||||
m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
|
||||
if (wear_suit)
|
||||
var/t1 = wear_suit.item_state
|
||||
if (!t1)
|
||||
t1 = wear_suit.icon_state
|
||||
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = SUIT_LAYER)
|
||||
if (wear_suit.blood_DNA)
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/armor))
|
||||
overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = B_SUIT_LAYER)
|
||||
else
|
||||
overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = B_SUIT_LAYER)
|
||||
wear_suit.screen_loc = ui_alien_oclothing
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
if (handcuffed)
|
||||
handcuffed.loc = loc
|
||||
handcuffed.layer = initial(handcuffed.layer)
|
||||
handcuffed = null
|
||||
if ((l_hand || r_hand))
|
||||
var/h = hand
|
||||
hand = 1
|
||||
drop_item()
|
||||
hand = 0
|
||||
drop_item()
|
||||
hand = h
|
||||
|
||||
// Head
|
||||
if (head)
|
||||
var/t1 = head.item_state
|
||||
if (!t1)
|
||||
t1 = head.icon_state
|
||||
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = HEAD_LAYER)
|
||||
if (head.blood_DNA)
|
||||
overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = B_HEAD_LAYER)
|
||||
head.screen_loc = ui_alien_head
|
||||
|
||||
if (l_store)
|
||||
l_store.screen_loc = ui_storage1
|
||||
|
||||
if (r_store)
|
||||
r_store.screen_loc = ui_storage2
|
||||
|
||||
if (client)
|
||||
client.screen -= contents
|
||||
client.screen += contents
|
||||
|
||||
if (r_hand)
|
||||
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = INHANDS_LAYER)
|
||||
|
||||
r_hand.screen_loc = ui_rhand
|
||||
|
||||
if (l_hand)
|
||||
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = INHANDS_LAYER)
|
||||
|
||||
l_hand.screen_loc = ui_lhand
|
||||
|
||||
|
||||
|
||||
var/shielded = 0
|
||||
for (var/obj/item/weapon/cloaking_device/S in src)
|
||||
if (S.active)
|
||||
shielded = 2
|
||||
break
|
||||
|
||||
if (shielded == 2 || alien_invis)
|
||||
invisibility = 2
|
||||
//New stealth. Hopefully doesn't lag too much. /N
|
||||
if(istype(loc, /turf))//If they are standing on a turf.
|
||||
AddCamoOverlay(loc)//Overlay camo.
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
for (var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
spawn (0)
|
||||
show_inv(M)
|
||||
return
|
||||
|
||||
last_b_state = stat
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
@@ -641,8 +485,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
|
||||
@@ -62,15 +62,19 @@
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
// Update clothing
|
||||
update_clothing()
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
//Temporary, whilst I finish the regenerate_icons changes ~Carn
|
||||
if( update_icon ) //forces a full overlay update
|
||||
update_icon = 0
|
||||
regenerate_icons()
|
||||
else if( lying != lying_prev )
|
||||
update_icons()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
@@ -408,8 +412,8 @@
|
||||
//if (prob(10) && health) emote("snore") //Invalid emote for aliens, but it might be worth making sleep noticeable somehow -Yvarov
|
||||
src.sleeping--
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
// if(src.resting)
|
||||
// Weaken(5)
|
||||
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
@@ -425,9 +429,11 @@
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
if (src.stat != DEAD) //Alive.
|
||||
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
if (resting || src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
if (resting)
|
||||
src.lying = 1
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
@@ -440,12 +446,10 @@
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.stat = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
hand = !hand
|
||||
drop_item()
|
||||
src.hand = h
|
||||
hand = !hand
|
||||
|
||||
else //Not stunned.
|
||||
src.lying = 0
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/mob/living/carbon/alien/humanoid/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
update_hud()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
if (src.stat == DEAD)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
@@ -29,7 +29,7 @@
|
||||
src.rest = new /obj/screen( null )
|
||||
src.zone_sel = new /obj/screen/zone_sel( null )
|
||||
|
||||
update_clothing()
|
||||
regenerate_icons()
|
||||
|
||||
src.mach.dir = NORTH
|
||||
|
||||
|
||||
@@ -6,17 +6,9 @@
|
||||
// if(src.name == "alien")
|
||||
// src.name = text("alien ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
spawn (1)
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/sentinel/verb/spit
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl
|
||||
src.stand_icon = new /icon('alien.dmi', "queen_s")
|
||||
src.lying_icon = new /icon('alien.dmi', "queen_l")
|
||||
src.resting_icon = new /icon('alien.dmi', "queen_sleep")
|
||||
src.running_icon = new /icon('alien.dmi', "queen_running")
|
||||
src.icon = src.stand_icon
|
||||
update_clothing()
|
||||
src << "\blue Your icons have been generated!"
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target
|
||||
src.verbs += /mob/living/carbon/alien/humanoid/sentinel/verb/spit
|
||||
src.verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
/mob/living/carbon/alien/humanoid
|
||||
var/list/overlays_lying[X_TOTAL_LAYERS]
|
||||
var/list/overlays_standing[X_TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays = null
|
||||
if(lying)
|
||||
if(resting) icon_state = "alien[caste]_sleep"
|
||||
else icon_state = "alien[caste]_l"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
if(alien_invis)
|
||||
icon_state = "alienh_cloak" //this is such a crude solution. I'm sorry.
|
||||
//indstead of all that fancy icon processing, it just replaces our base icon
|
||||
//Aliens can't wear much anyway :P ~Carn
|
||||
else
|
||||
if(m_intent == "run") icon_state = "alien[caste]_running"
|
||||
else icon_state = "alien[caste]_s"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
/mob/living/carbon/alien/humanoid/regenerate_icons()
|
||||
..()
|
||||
if (monkeyizing) return
|
||||
|
||||
update_inv_head(0)
|
||||
update_inv_wear_suit(0)
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_pockets(0)
|
||||
update_hud()
|
||||
update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_hud()
|
||||
//TODO
|
||||
if (client)
|
||||
// if(other) client.screen |= hud_used.other //Not used
|
||||
// else client.screen -= hud_used.other //Not used
|
||||
client.screen |= contents
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_wear_suit(var/update_icons=1)
|
||||
if(wear_suit)
|
||||
var/t_state = wear_suit.item_state
|
||||
if(!t_state) t_state = wear_suit.icon_state
|
||||
var/image/lying = image("icon" = 'mob.dmi', "icon_state" = "[t_state]2")
|
||||
var/image/standing = image("icon" = 'mob.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/t_suit = "suit"
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/armor) )
|
||||
t_suit = "armor"
|
||||
lying.overlays += image("icon" = 'blood.dmi', "icon_state" = "[t_suit]blood2")
|
||||
standing.overlays += image("icon" = 'blood.dmi', "icon_state" = "[t_suit]blood")
|
||||
|
||||
//TODO
|
||||
wear_suit.screen_loc = ui_alien_oclothing
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
if (handcuffed)
|
||||
handcuffed.loc = loc
|
||||
handcuffed.layer = initial(handcuffed.layer)
|
||||
handcuffed = null
|
||||
if ((l_hand || r_hand))
|
||||
drop_item()
|
||||
hand = !hand
|
||||
drop_item()
|
||||
hand = !hand
|
||||
|
||||
overlays_lying[X_SUIT_LAYER] = lying
|
||||
overlays_standing[X_SUIT_LAYER] = standing
|
||||
else
|
||||
overlays_lying[X_SUIT_LAYER] = null
|
||||
overlays_standing[X_SUIT_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_head(var/update_icons=1)
|
||||
if (head)
|
||||
var/t_state = head.item_state
|
||||
if(!t_state) t_state = head.icon_state
|
||||
var/image/lying = image("icon" = 'mob.dmi', "icon_state" = "[t_state]2")
|
||||
var/image/standing = image("icon" = 'mob.dmi', "icon_state" = "[t_state]")
|
||||
if(head.blood_DNA)
|
||||
lying.overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood2")
|
||||
standing.overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood")
|
||||
head.screen_loc = ui_alien_head
|
||||
overlays_lying[X_HEAD_LAYER] = lying
|
||||
overlays_standing[X_HEAD_LAYER] = standing
|
||||
else
|
||||
overlays_lying[X_HEAD_LAYER] = null
|
||||
overlays_standing[X_HEAD_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_pockets(var/update_icons=1)
|
||||
if(l_store) l_store.screen_loc = ui_storage1
|
||||
if(r_store) r_store.screen_loc = ui_storage2
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
r_hand.screen_loc = ui_rhand
|
||||
overlays_standing[X_R_HAND_LAYER] = image("icon" = 'items_righthand.dmi', "icon_state" = t_state)
|
||||
else
|
||||
overlays_standing[X_R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
l_hand.screen_loc = ui_lhand
|
||||
overlays_standing[X_L_HAND_LAYER] = image("icon" = 'items_lefthand.dmi', "icon_state" = t_state)
|
||||
else
|
||||
overlays_standing[X_L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
@@ -4,13 +4,8 @@
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
@@ -52,41 +47,6 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "help_small"
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "disarm_small"
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "grab_small"
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = "harm_small"
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
name = text("alien larva ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
spawn (1)
|
||||
update_clothing()
|
||||
regenerate_icons()
|
||||
src << "\blue Your icons have been generated!"
|
||||
// spawn(1200) grow() Grow after 120 seconds -- TLE Commented out because life.dm has better version -- Urist
|
||||
..()
|
||||
@@ -223,46 +223,6 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/update_clothing()
|
||||
..()
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
|
||||
if (client)
|
||||
if (i_select)
|
||||
if (intent)
|
||||
client.screen += hud_used.intents
|
||||
|
||||
var/list/L = dd_text2list(intent, ",")
|
||||
L[1] += ":-11"
|
||||
i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
|
||||
else
|
||||
i_select.screen_loc = null
|
||||
if (m_select)
|
||||
if (m_int)
|
||||
client.screen += hud_used.mov_int
|
||||
|
||||
var/list/L = dd_text2list(m_int, ",")
|
||||
L[1] += ":-11"
|
||||
m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
|
||||
if (alien_invis)
|
||||
invisibility = 2
|
||||
if(istype(loc, /turf))//If they are standing on a turf.
|
||||
AddCamoOverlay(loc)//Overlay camo.
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
for (var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
spawn (0)
|
||||
show_inv(M)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
@@ -413,8 +373,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
handle_regular_status_updates()
|
||||
|
||||
// Update clothing
|
||||
update_clothing()
|
||||
// regenerate_icons()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/mob/living/carbon/alien/larva/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
//No special icons processing
|
||||
@@ -22,8 +22,8 @@
|
||||
var/organ = H.get_organ("chest")
|
||||
if (istype(organ, /datum/organ/external))
|
||||
var/datum/organ/external/temp = organ
|
||||
temp.take_damage(d, 0)
|
||||
H.UpdateDamageIcon()
|
||||
if(temp.take_damage(d, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
else
|
||||
src.take_organ_damage(d)
|
||||
|
||||
@@ -4,13 +4,8 @@
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
src.hotkeybuttons = list( ) //These can be disabled for hotkey usersx
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
@@ -57,41 +52,6 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "help_small"
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "disarm_small"
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "grab_small"
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "harm_small"
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,8 +16,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
@@ -47,7 +49,6 @@
|
||||
if (damage >= 25)
|
||||
visible_message("\red <B>[M] has wounded [src]!</B>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
|
||||
if("disarm")
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
if(damage >= 9)
|
||||
visible_message("\red <B>[M] has weakened [src]!</B>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
UpdateDamageIcon()
|
||||
|
||||
return
|
||||
|
||||
@@ -90,8 +89,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
@@ -169,7 +170,6 @@
|
||||
if(damage >= 9)
|
||||
visible_message("\red <B>[M] has weakened [src]!</B>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
UpdateDamageIcon()
|
||||
|
||||
if("disarm")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
|
||||
|
||||
@@ -7,22 +7,6 @@
|
||||
return 0
|
||||
return
|
||||
|
||||
// new damage icon system
|
||||
// now constructs damage icon for each organ from mask * damage field
|
||||
|
||||
/mob/living/carbon/human/UpdateDamageIcon()
|
||||
var/icon/standing = new /icon('dam_human.dmi', "00")
|
||||
var/icon/lying = new /icon('dam_human.dmi', "00-2")
|
||||
for(var/datum/organ/external/O in organs)
|
||||
var/icon/DI = new /icon('dam_human.dmi', O.damage_state) // the damage icon for whole human
|
||||
DI.Blend(new /icon('dam_mask.dmi', O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
|
||||
standing.Blend(DI,ICON_OVERLAY)
|
||||
DI = new /icon('dam_human.dmi', "[O.damage_state]-2") // repeat for lying icons
|
||||
DI.Blend(new /icon('dam_mask.dmi', "[O.icon_name]2"), ICON_MULTIPLY)
|
||||
lying.Blend(DI,ICON_OVERLAY)
|
||||
damageicon_standing = new /image("icon" = standing, "layer" = DAMAGE_LAYER)
|
||||
damageicon_lying = new /image("icon" = lying, "layer" = DAMAGE_LAYER)
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/get_organ(var/zone)
|
||||
if(!zone) zone = "chest"
|
||||
@@ -54,9 +38,10 @@
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
organ.take_damage(damage, 0)
|
||||
if(organ.take_damage(damage, 0))
|
||||
UpdateDamageIcon()
|
||||
if(BURN)
|
||||
organ.take_damage(0, damage)
|
||||
UpdateDamageIcon()
|
||||
if(organ.take_damage(0, damage))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -128,6 +128,8 @@ emp_act
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
|
||||
I.add_blood(src) //Make the weapon bloody, not the person.
|
||||
// if(user.hand) user.update_inv_l_hand() //updates the attacker's overlay for the (now bloodied) weapon
|
||||
// else user.update_inv_r_hand() //removed because weapons don't have on-mob blood overlays
|
||||
if(prob(33))
|
||||
bloody = 1
|
||||
var/turf/location = loc
|
||||
@@ -135,8 +137,12 @@ emp_act
|
||||
location.add_blood(src)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.wear_suit) H.wear_suit.add_blood(src)
|
||||
else if(H.w_uniform) H.w_uniform.add_blood(src)
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.add_blood(src)
|
||||
H.update_inv_wear_suit(0) //updates mob overlays to show the new blood (no refresh)
|
||||
else if(H.w_uniform)
|
||||
H.w_uniform.add_blood(src)
|
||||
H.update_inv_w_uniform(0) //updates mob overlays to show the new blood (no refresh)
|
||||
if (H.gloves)
|
||||
H.gloves.add_blood(H)
|
||||
H.gloves:transfer_blood = 2
|
||||
@@ -145,6 +151,7 @@ emp_act
|
||||
H.add_blood(H)
|
||||
H.bloody_hands = 2
|
||||
H.bloody_hands_mob = H
|
||||
H.update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
|
||||
|
||||
switch(hit_area)
|
||||
if("head")//Harder to score a stun but if you do it lasts a bit longer
|
||||
@@ -155,9 +162,15 @@ emp_act
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
|
||||
if(bloody)//Apply blood
|
||||
if(wear_mask) wear_mask.add_blood(src)
|
||||
if(head) head.add_blood(src)
|
||||
if(glasses && prob(33)) glasses.add_blood(src)
|
||||
if(wear_mask)
|
||||
wear_mask.add_blood(src)
|
||||
update_inv_wear_mask(0)
|
||||
if(head)
|
||||
head.add_blood(src)
|
||||
update_inv_head(0)
|
||||
if(glasses && prob(33))
|
||||
glasses.add_blood(src)
|
||||
update_inv_glasses(0)
|
||||
|
||||
if("chest")//Easier to score a stun but lasts less time
|
||||
if(prob((I.force + 10)))
|
||||
@@ -165,6 +178,10 @@ emp_act
|
||||
visible_message("\red <B>[src] has been knocked down!</B>")
|
||||
|
||||
if(bloody)
|
||||
if(src.wear_suit) src.wear_suit.add_blood(src)
|
||||
if(src.w_uniform) src.w_uniform.add_blood(src)
|
||||
src.UpdateDamageIcon()
|
||||
|
||||
if(wear_suit)
|
||||
wear_suit.add_blood(src)
|
||||
update_inv_wear_suit(0)
|
||||
if(w_uniform)
|
||||
w_uniform.add_blood(src)
|
||||
update_inv_w_uniform(0)
|
||||
|
||||
@@ -14,20 +14,15 @@
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
if(!loc) // Fixing a null error that occurs when the mob isn't found in the world -- TLE
|
||||
return
|
||||
if (monkeyizing) return
|
||||
if(!loc) return // Fixing a null error that occurs when the mob isn't found in the world -- TLE
|
||||
|
||||
..()
|
||||
|
||||
//TODO: seperate this out
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
if (stat != 2) //still breathing
|
||||
|
||||
if(stat != DEAD) //still breathing
|
||||
//First, resolve location and get a breath
|
||||
|
||||
if(air_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
spawn(0) breathe()
|
||||
@@ -72,26 +67,33 @@
|
||||
|
||||
//Status updates, death etc.
|
||||
UpdateLuminosity()
|
||||
handle_regular_status_updates()
|
||||
handle_regular_status_updates() //TODO: optimise ~Carn
|
||||
|
||||
// Update clothing
|
||||
update_clothing()
|
||||
//Being buckled to chairs/beds/etc
|
||||
check_if_buckled()
|
||||
|
||||
//Temporary, whilst I finish the regenerate_icons changes ~Carn
|
||||
if( update_icon ) //forces a full overlay update
|
||||
update_icon = 0
|
||||
regenerate_icons()
|
||||
else if( lying != lying_prev )
|
||||
update_icons()
|
||||
|
||||
//Update our name based on whether our face is obscured/disfigured
|
||||
name = get_visible_name() //TODO: this was broken by the dismemberment revert ~Carn
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
update_canmove() //TODO: check ~Carn
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
clamp_values()
|
||||
clamp_values() //TODO: check that dmage procs aren't outputing bad values outside clamp ranges ~Carn
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
//TODO: optimise this.
|
||||
if(isturf(loc) && rand(1,1000) == 1) //0.1% chance of playing a scary sound to someone who's in complete darkness
|
||||
var/turf/currentTurf = loc
|
||||
if(!currentTurf.sd_lumcount)
|
||||
@@ -99,17 +101,18 @@
|
||||
|
||||
/mob/living/carbon/human
|
||||
proc
|
||||
//I've rewritten this to do what it was intended to do.
|
||||
//This can probably be removed like Rockdtben suggested, but I'd like to go over the damage procs first just to be safe.
|
||||
//Perhaps code view-vars to be unable to directly edit the damagevariables without using procs
|
||||
clamp_values()
|
||||
|
||||
SetStunned(min(stunned, 20))
|
||||
SetParalysis(min(paralysis, 20))
|
||||
SetWeakened(min(weakened, 20))
|
||||
sleeping = max(min(sleeping, 20), 0)
|
||||
adjustBruteLoss(0)
|
||||
adjustToxLoss(0)
|
||||
adjustOxyLoss(0)
|
||||
adjustFireLoss(0)
|
||||
|
||||
stunned = max( min(stunned,20), 0 ) // positive and under 20
|
||||
paralysis = max( min(paralysis,20), 0 ) // positive and under 20
|
||||
weakened = max( min(weakened,20), 0 ) // positive and under 20
|
||||
sleeping = max( min(sleeping, 20), 0 ) // positive and under 20
|
||||
oxyloss = max(oxyloss,0) // positive
|
||||
toxloss = max(toxloss,0) // positive
|
||||
bruteloss = max(bruteloss,0) // positive
|
||||
fireloss = max(fireloss,0) // positive
|
||||
|
||||
update_mind()
|
||||
if(!mind && client)
|
||||
@@ -233,6 +236,7 @@
|
||||
|
||||
if ((HULK in mutations) && health <= 25)
|
||||
mutations.Remove(HULK)
|
||||
update_mutations() //update our mutation overlays
|
||||
src << "\red You suddenly feel very weak."
|
||||
Weaken(3)
|
||||
emote("collapse")
|
||||
@@ -700,14 +704,16 @@
|
||||
adjustToxLoss(-1)
|
||||
adjustOxyLoss(-1)
|
||||
|
||||
if(overeatduration > 500 && !(FAT in mutations))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations.Add(FAT)
|
||||
update_body()
|
||||
if ((overeatduration < 100 && (FAT in mutations)))
|
||||
src << "\blue You feel fit again!"
|
||||
mutations.Remove(FAT)
|
||||
update_body()
|
||||
if(FAT in mutations)
|
||||
if(overeatduration < 100)
|
||||
src << "\blue You feel fit again!"
|
||||
mutations.Remove(FAT)
|
||||
update_body()
|
||||
else
|
||||
if(overeatduration > 500)
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations.Add(FAT)
|
||||
update_body()
|
||||
|
||||
// nutrition decrease
|
||||
if (nutrition > 0 && stat != 2)
|
||||
@@ -758,33 +764,33 @@
|
||||
//if(!rejuv) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1)
|
||||
|
||||
if(stat != 2) stat = 1
|
||||
if(stat != DEAD) stat = UNCONSCIOUS
|
||||
Paralyse(5)
|
||||
|
||||
if (stat != 2) //Alive.
|
||||
if (stat != DEAD) //Alive.
|
||||
if (silent)
|
||||
silent--
|
||||
|
||||
if (resting || sleeping || paralysis || stunned || weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc.
|
||||
if (stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
stat = 0
|
||||
stat = CONSCIOUS
|
||||
if (weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
lying = 1
|
||||
stat = 0
|
||||
stat = CONSCIOUS
|
||||
if (paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
lying = 1
|
||||
stat = 1
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
if (sleeping > 0)
|
||||
handle_dreams()
|
||||
adjustHalLoss(-5)
|
||||
blinded = 1
|
||||
lying = 1
|
||||
stat = 1
|
||||
stat = UNCONSCIOUS
|
||||
if (prob(10) && health && !hal_crit)
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
@@ -792,7 +798,7 @@
|
||||
|
||||
if(resting)
|
||||
lying = 1
|
||||
stat = 0
|
||||
stat = CONSCIOUS
|
||||
|
||||
var/h = hand
|
||||
hand = 0
|
||||
@@ -803,12 +809,12 @@
|
||||
|
||||
else //Not stunned.
|
||||
lying = 0
|
||||
stat = 0
|
||||
stat = CONSCIOUS
|
||||
|
||||
else //Dead.
|
||||
lying = 1
|
||||
blinded = 1
|
||||
stat = 2
|
||||
stat = DEAD
|
||||
silent = 0
|
||||
|
||||
if (stuttering) stuttering--
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/mob/living/carbon/human/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
update_hud()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
if (src.stat == DEAD)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -0,0 +1,603 @@
|
||||
///////////////////////
|
||||
//UPDATE_ICONS SYSTEM//
|
||||
///////////////////////
|
||||
/*
|
||||
Calling this a system is perhaps a bit trumped up. It is essentially update_clothing dismantled into its
|
||||
core parts. The key difference is that when we generate overlays we do not generate either lying or standing
|
||||
versions. Instead, we generate both and store them in two fixed-length lists, both using the same list-index
|
||||
(The indexes are in setup.dm): Each list for humans is (at the time of writing) of length 19.
|
||||
This will hopefully be reduced as the system is refined.
|
||||
|
||||
var/overlays_lying[19] //For the lying down stance
|
||||
var/overlays_standing[19] //For the standing stance
|
||||
|
||||
When we call update_icons, the 'lying' variable is checked and then the appropriate list is assigned to our overlays!
|
||||
That in itself uses a tiny bit more memory (no more than all the ridiculous lists the game has already mind you).
|
||||
|
||||
On the other-hand, it should be very CPU cheap in comparison to the old system.
|
||||
In the old system, we updated all our overlays every life() call, even if we were standing still inside a crate!
|
||||
or dead!. 25ish overlays, all generated from scratch every second for every xeno/human/monkey and then applied.
|
||||
More often than not update_clothing was being called a few times in addition to that! CPU was not the only issue,
|
||||
all those icons had to be sent to every client. So really the cost was extremely cumulative. To the point where
|
||||
update_clothing would frequently appear in the top 10 most CPU intensive procs during profiling.
|
||||
|
||||
Another feature of this new system is that our lists are indexed. This means we can update specific overlays!
|
||||
So we only regenerate icons when we need them to be updated! This is the main saving for this system.
|
||||
|
||||
In practice this means that:
|
||||
everytime you fall over, we just switch between precompiled lists. Which is fast and cheap.
|
||||
Everytime you do something minor like take a pen out of your pocket, we only update the in-hand overlay
|
||||
etc...
|
||||
|
||||
|
||||
There are several things that need to be remembered:
|
||||
|
||||
> Whenever we do something that should cause an overlay to update (which doesn't use standard procs
|
||||
( i.e. you do something like l_hand = /obj/item/something new(src) )
|
||||
You will need to call the relevant update_inv_* proc:
|
||||
update_inv_head()
|
||||
update_inv_wear_suit()
|
||||
update_inv_gloves()
|
||||
update_inv_shoes()
|
||||
update_inv_w_uniform()
|
||||
update_inv_glassed()
|
||||
update_inv_l_hand()
|
||||
update_inv_r_hand()
|
||||
update_inv_belt()
|
||||
update_inv_wear_id()
|
||||
update_inv_ears()
|
||||
update_inv_s_store()
|
||||
update_inv_pockets()
|
||||
update_inv_back()
|
||||
update_inv_handcuffed()
|
||||
update_inv_wear_mask()
|
||||
|
||||
All of these are named after the variable they update from. They are defined at the mob/ level like
|
||||
update_clothing was, so you won't cause undefined proc runtimes with usr.update_inv_wear_id() if the usr is a
|
||||
metroid etc. Instead, it'll just return without doing any work. So no harm in calling it for metroids and such.
|
||||
|
||||
|
||||
> There are also these special cases:
|
||||
update_mutations() //handles updating your appearance for certain mutations. e.g TK head-glows
|
||||
update_mutantrace() //handles updating your appearance after setting the mutantrace var
|
||||
UpdateDamageIcon() //handles damage overlays for brute/burn damage //(will rename this when I geta round to it)
|
||||
update_body() //Handles updating your mob's icon to reflect their gender/race/complexion etc
|
||||
update_hair() //Handles updating your hair overlay (used to be update_face, but mouth and
|
||||
...eyes were merged into update_body)
|
||||
|
||||
> All of these procs update our overlays_lying and overlays_standing, and then call update_icons() by default.
|
||||
If you wish to update several overlays at once, you can set the argument to 0 to disable the update and call
|
||||
it manually:
|
||||
e.g.
|
||||
update_inv_head(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_r_hand() //<---calls update_icons()
|
||||
|
||||
or equivillantly:
|
||||
update_inv_head(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_r_hand(0)
|
||||
update_icons()
|
||||
|
||||
> If you need to update all overlays you can use regenerate_icons(). it works exactly like update_clothing used to.
|
||||
|
||||
> I reimplimented an old unused variable which was in the code called (coincidentally) var/update_icon
|
||||
It can be used as another method of triggering regenerate_icons(). It's basically a flag that when set to non-zero
|
||||
will call regenerate_icons() at the next life() call and then reset itself to 0.
|
||||
The idea behind it is icons are regenerated only once, even if multiple events requested it.
|
||||
|
||||
This system is confusing and is still a WIP. It's primary goal is speeding up the controls of the game whilst
|
||||
reducing processing costs. So please bear with me while I iron out the kinks. It will be worth it, I promise.
|
||||
If I can eventually free var/lying stuff from the life() process altogether, stuns/death/status stuff
|
||||
will become less affected by lag-spikes and will be instantaneous! :3
|
||||
|
||||
If you have any questions/constructive-comments/bugs-to-report/or have a massivly devestated butt...
|
||||
Please contact me on #coderbus IRC. ~Carn x
|
||||
*/
|
||||
|
||||
|
||||
//TODO: FAT -> disability not a mutation
|
||||
|
||||
/mob/living/carbon/human
|
||||
var/list/overlays_lying[TOTAL_LAYERS]
|
||||
var/list/overlays_standing[TOTAL_LAYERS]
|
||||
|
||||
|
||||
//UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING
|
||||
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
|
||||
//I'll work on removing that stuff by rewriting some of the cloaking stuff at a later date.
|
||||
/mob/living/carbon/human/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this
|
||||
overlays = null
|
||||
|
||||
if(lying) //can't be cloaked when lying. (for now)
|
||||
icon = lying_icon
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
var/stealth = 0
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_active)
|
||||
stealth = 1
|
||||
else
|
||||
//cloaking devices. //TODO: get rid of this :<
|
||||
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
|
||||
if(S.active)
|
||||
stealth = 1
|
||||
break
|
||||
if(stealth)
|
||||
icon = 'human.dmi'
|
||||
icon_state = "body_cloaked"
|
||||
var/image/I = overlays_standing[L_HAND_LAYER]
|
||||
if(istype(I)) overlays += I
|
||||
I = overlays_standing[R_HAND_LAYER]
|
||||
if(istype(I)) overlays += I
|
||||
else
|
||||
icon = stand_icon
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
|
||||
|
||||
//DAMAGE OVERLAYS
|
||||
//constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists
|
||||
/mob/living/carbon/human/UpdateDamageIcon(var/update_icons=1)
|
||||
var/image/standing = image("icon" = 'dam_human.dmi', "icon_state" = "blank")
|
||||
var/image/lying = image("icon" = 'dam_human.dmi', "icon_state" = "blank2")
|
||||
for(var/datum/organ/external/O in organs)
|
||||
if(O.brutestate)
|
||||
standing.overlays += "[O.icon_name]_[O.brutestate]0" //we're adding icon_states of the base image as overlays
|
||||
lying.overlays += "[O.icon_name]2_[O.brutestate]0"
|
||||
if(O.burnstate)
|
||||
standing.overlays += "[O.icon_name]_0[O.burnstate]"
|
||||
lying.overlays += "[O.icon_name]2_0[O.burnstate]"
|
||||
|
||||
overlays_standing[DAMAGE_LAYER] = standing
|
||||
overlays_lying[DAMAGE_LAYER] = lying
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//BASE MOB SPRITE
|
||||
/mob/living/carbon/human/proc/update_body()
|
||||
if(stand_icon) del(stand_icon)
|
||||
if(lying_icon) del(lying_icon)
|
||||
if(mutantrace) return
|
||||
var/husk = (HUSK in src.mutations)
|
||||
var/fat = (FAT in src.mutations)
|
||||
var/g = "m"
|
||||
if(gender == FEMALE) g = "f"
|
||||
//Base mob icon
|
||||
if(husk)
|
||||
stand_icon = new /icon('human.dmi', "husk_s")
|
||||
lying_icon = new /icon('human.dmi', "husk_l")
|
||||
else if(fat)
|
||||
stand_icon = new /icon('human.dmi', "fatbody_s")
|
||||
lying_icon = new /icon('human.dmi', "fatbody_l")
|
||||
else
|
||||
stand_icon = new /icon('human.dmi', "body_[g]_s")
|
||||
lying_icon = new /icon('human.dmi', "body_[g]_l")
|
||||
|
||||
//Skin tone
|
||||
if(s_tone >= 0)
|
||||
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
//Eyes
|
||||
var/icon/eyes_s = new/icon('human_face.dmi', "eyes_s")
|
||||
var/icon/eyes_l = new/icon('human_face.dmi', "eyes_l")
|
||||
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
stand_icon.Blend(eyes_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(eyes_l, ICON_OVERLAY)
|
||||
|
||||
//Mouth
|
||||
stand_icon.Blend(new/icon('human_face.dmi', "mouth_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new/icon('human_face.dmi', "mouth_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
//Underwear
|
||||
if(underwear < 6 && underwear > 0)
|
||||
if(!fat)
|
||||
stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
|
||||
//HAIR OVERLAY
|
||||
/mob/living/carbon/human/proc/update_hair(var/update_icons=1)
|
||||
//Reset our hair
|
||||
overlays_lying[HAIR_LAYER] = null
|
||||
overlays_standing[HAIR_LAYER] = null
|
||||
|
||||
//mutants don't have hair. masks and helmets can obscure our hair too.
|
||||
if( mutantrace || (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)) )
|
||||
if(update_icons) update_icons()
|
||||
return
|
||||
|
||||
//base icons
|
||||
var/icon/face_standing = new /icon('human_face.dmi',"bald_s")
|
||||
var/icon/face_lying = new /icon('human_face.dmi',"bald_l")
|
||||
|
||||
if(facial_hair_style)
|
||||
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l")
|
||||
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
face_standing.Blend(facial_s, ICON_OVERLAY)
|
||||
face_lying.Blend(facial_l, ICON_OVERLAY)
|
||||
|
||||
if(hair_style)
|
||||
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l")
|
||||
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
face_standing.Blend(hair_s, ICON_OVERLAY)
|
||||
face_lying.Blend(hair_l, ICON_OVERLAY)
|
||||
|
||||
overlays_lying[HAIR_LAYER] = image(face_lying)
|
||||
overlays_standing[HAIR_LAYER] = image(face_standing)
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_mutations(var/update_icons=1)
|
||||
var/fat
|
||||
if( FAT in mutations )
|
||||
fat = "fat"
|
||||
if( w_uniform && !(w_uniform&ONESIZEFITSALL) )
|
||||
src << "\red You burst out of \the [w_uniform]!"
|
||||
var/obj/item/clothing/c = w_uniform
|
||||
u_equip(c) //Check
|
||||
if(client) //
|
||||
client.screen -= c //
|
||||
if(c) //
|
||||
c:loc = loc //
|
||||
c:dropped(src) //
|
||||
c:layer = initial(c:layer) //
|
||||
if( wear_suit && !(wear_suit&ONESIZEFITSALL) )
|
||||
src << "\red You burst out of \the [wear_suit]!"
|
||||
var/obj/item/clothing/c = wear_suit
|
||||
u_equip(c)
|
||||
if(client)
|
||||
client.screen -= c
|
||||
if(c)
|
||||
c:loc = loc
|
||||
c:dropped(src)
|
||||
c:layer = initial(c:layer)
|
||||
|
||||
var/image/lying = image("icon" = 'genetics.dmi')
|
||||
var/image/standing = image("icon" = 'genetics.dmi')
|
||||
var/add_image = 0
|
||||
for(var/mut in mutations)
|
||||
switch(mut)
|
||||
if(HULK)
|
||||
lying.underlays += "hulk[fat]_l"
|
||||
standing.underlays += "hulk[fat]_s"
|
||||
add_image = 1
|
||||
if(COLD_RESISTANCE)
|
||||
lying.underlays += "fire[fat]_l"
|
||||
standing.underlays += "fire[fat]_s"
|
||||
add_image = 1
|
||||
if(TK)
|
||||
lying.underlays += "telekinesishead[fat]_l"
|
||||
standing.underlays += "telekinesishead[fat]_s"
|
||||
add_image = 1
|
||||
if(LASER)
|
||||
lying.overlays += "lasereyes_l"
|
||||
standing.overlays += "lasereyes_s"
|
||||
add_image = 1
|
||||
if(add_image)
|
||||
overlays_lying[MUTATIONS_LAYER] = lying
|
||||
overlays_standing[MUTATIONS_LAYER] = standing
|
||||
else
|
||||
overlays_lying[MUTATIONS_LAYER] = null
|
||||
overlays_standing[MUTATIONS_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/update_mutantrace(var/update_icons=1)
|
||||
var/fat
|
||||
if( FAT in mutations )
|
||||
fat = "fat"
|
||||
|
||||
switch(mutantrace)
|
||||
if("lizard","golem","metroid")
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_s")
|
||||
if("plant")
|
||||
if(stat == DEAD) //TODO
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_d")
|
||||
else
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender]_s")
|
||||
else
|
||||
overlays_lying[MUTANTRACE_LAYER] = null
|
||||
overlays_standing[MUTANTRACE_LAYER] = null
|
||||
update_body()
|
||||
update_hair(0)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/* --------------------------------------- */
|
||||
//For legacy support.
|
||||
/mob/living/carbon/human/regenerate_icons()
|
||||
..()
|
||||
if(monkeyizing) return
|
||||
update_mutations(0)
|
||||
update_mutantrace(0)
|
||||
update_inv_w_uniform(0)
|
||||
update_inv_wear_id(0)
|
||||
update_inv_gloves(0)
|
||||
update_inv_glasses(0)
|
||||
update_inv_ears(0)
|
||||
update_inv_shoes(0)
|
||||
update_inv_s_store(0)
|
||||
update_inv_wear_mask(0)
|
||||
update_inv_head(0)
|
||||
update_inv_belt(0)
|
||||
update_inv_back(0)
|
||||
update_inv_wear_suit(0)
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_handcuffed(0)
|
||||
update_inv_pockets(0)
|
||||
update_icons()
|
||||
//Hud Stuff
|
||||
update_hud()
|
||||
|
||||
/* --------------------------------------- */
|
||||
//vvvvvv UPDATE_INV PROCS vvvvvv
|
||||
|
||||
/mob/living/carbon/human/update_inv_w_uniform(var/update_icons=1)
|
||||
if(w_uniform)
|
||||
w_uniform.screen_loc = ui_iclothing //what is this?
|
||||
if( istype(w_uniform, /obj/item/clothing/under) )
|
||||
var/t_color = w_uniform.color
|
||||
if(!t_color) t_color = icon_state
|
||||
var/image/lying = image("icon_state" = "[t_color]_l")
|
||||
var/image/standing = image("icon_state" = "[t_color]_s")
|
||||
if( (FAT in mutations) )
|
||||
lying.icon = 'uniform_fat.dmi'
|
||||
standing.icon = 'uniform_fat.dmi'
|
||||
else
|
||||
lying.icon = 'uniform.dmi'
|
||||
standing.icon = 'uniform.dmi'
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
lying.overlays += image("icon" = 'blood.dmi', "icon_state" = "uniformblood2")
|
||||
standing.overlays += image("icon" = 'blood.dmi', "icon_state" = "uniformblood")
|
||||
overlays_lying[UNIFORM_LAYER] = lying
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
else
|
||||
overlays_lying[UNIFORM_LAYER] = null
|
||||
overlays_standing[UNIFORM_LAYER] = null
|
||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
|
||||
for( var/obj/item/thing in list(r_store, l_store, wear_id, belt) ) //
|
||||
if(thing) //
|
||||
u_equip(thing) //
|
||||
if (client) //
|
||||
client.screen -= thing //
|
||||
//
|
||||
if (thing) //
|
||||
thing.loc = loc //
|
||||
thing.dropped(src) //
|
||||
thing.layer = initial(thing.layer)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
|
||||
if(wear_id)
|
||||
overlays_lying[ID_LAYER] = image("icon" = 'mob.dmi', "icon_state" = "id2")
|
||||
overlays_standing[ID_LAYER] = image("icon" = 'mob.dmi', "icon_state" = "id")
|
||||
wear_id.screen_loc = ui_id //TODO
|
||||
else
|
||||
overlays_lying[ID_LAYER] = null
|
||||
overlays_standing[ID_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_gloves(var/update_icons=1)
|
||||
if(gloves)
|
||||
var/t_state = gloves.item_state
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
var/image/lying = image("icon" = 'hands.dmi', "icon_state" = "[t_state]2")
|
||||
var/image/standing = image("icon" = 'hands.dmi', "icon_state" = "[t_state]")
|
||||
if(gloves.blood_DNA)
|
||||
lying.overlays += image("icon" = 'blood.dmi', "icon_state" = "bloodyhands2")
|
||||
standing.overlays += image("icon" = 'blood.dmi', "icon_state" = "bloodyhands")
|
||||
gloves.screen_loc = ui_gloves
|
||||
overlays_lying[GLOVES_LAYER] = lying
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
else
|
||||
if(blood_DNA)
|
||||
overlays_lying[GLOVES_LAYER] = image("icon" = 'blood.dmi', "icon_state" = "bloodyhands2")
|
||||
overlays_standing[GLOVES_LAYER] = image("icon" = 'blood.dmi', "icon_state" = "bloodyhands")
|
||||
else
|
||||
overlays_lying[GLOVES_LAYER] = null
|
||||
overlays_standing[GLOVES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_glasses(var/update_icons=1)
|
||||
if(glasses)
|
||||
overlays_lying[GLASSES_LAYER] = image("icon" = 'eyes.dmi', "icon_state" = "[glasses.icon_state]2")
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = 'eyes.dmi', "icon_state" = "[glasses.icon_state]")
|
||||
else
|
||||
overlays_lying[GLASSES_LAYER] = null
|
||||
overlays_standing[GLASSES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
|
||||
if(ears)
|
||||
overlays_lying[EARS_LAYER] = image("icon" = 'ears.dmi', "icon_state" = "[ears.icon_state]2")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'ears.dmi', "icon_state" = "[ears.icon_state]")
|
||||
else
|
||||
overlays_lying[EARS_LAYER] = null
|
||||
overlays_standing[EARS_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_shoes(var/update_icons=1)
|
||||
if(shoes)
|
||||
var/image/lying = image("icon" = 'feet.dmi', "icon_state" = "[shoes.icon_state]2")
|
||||
var/image/standing = image("icon" = 'feet.dmi', "icon_state" = "[shoes.icon_state]")
|
||||
if(shoes.blood_DNA)
|
||||
lying.overlays += image("icon" = 'blood.dmi', "icon_state" = "shoeblood2")
|
||||
standing.overlays += image("icon" = 'blood.dmi', "icon_state" = "shoeblood")
|
||||
overlays_lying[SHOES_LAYER] = lying
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
else
|
||||
overlays_lying[SHOES_LAYER] = null
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_s_store(var/update_icons=1)
|
||||
if(s_store)
|
||||
var/t_state = s_store.item_state
|
||||
if(!t_state) t_state = s_store.icon_state
|
||||
overlays_lying[SUIT_STORE_LAYER] = image("icon" = 'belt_mirror.dmi', "icon_state" = "[t_state]2")
|
||||
overlays_standing[SUIT_STORE_LAYER] = image("icon" = 'belt_mirror.dmi', "icon_state" = "[t_state]")
|
||||
s_store.screen_loc = ui_sstore1 //TODO
|
||||
else
|
||||
overlays_lying[SUIT_STORE_LAYER] = null
|
||||
overlays_standing[SUIT_STORE_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_head(var/update_icons=1)
|
||||
if(head)
|
||||
head.screen_loc = ui_head //TODO
|
||||
var/image/lying
|
||||
var/image/standing
|
||||
if(istype(head,/obj/item/clothing/head/kitty))
|
||||
lying = image("icon" = head:mob2)
|
||||
standing = image("icon" = head:mob)
|
||||
else
|
||||
lying = image("icon" = 'head.dmi', "icon_state" = "[head.icon_state]2")
|
||||
standing = image("icon" = 'head.dmi', "icon_state" = "[head.icon_state]")
|
||||
if(head.blood_DNA)
|
||||
lying.overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood2")
|
||||
standing.overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood")
|
||||
overlays_lying[HEAD_LAYER] = lying
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
else
|
||||
overlays_lying[HEAD_LAYER] = null
|
||||
overlays_standing[HEAD_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_belt(var/update_icons=1)
|
||||
if(belt)
|
||||
belt.screen_loc = ui_belt //TODO
|
||||
var/t_state = belt.item_state
|
||||
if(!t_state) t_state = belt.icon_state
|
||||
overlays_lying[BELT_LAYER] = image("icon" = 'belt.dmi', "icon_state" = "[t_state]2")
|
||||
overlays_standing[BELT_LAYER] = image("icon" = 'belt.dmi', "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_lying[BELT_LAYER] = null
|
||||
overlays_standing[BELT_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1)
|
||||
if( wear_suit && istype(wear_suit, /obj/item/clothing/suit) ) //TODO check this
|
||||
wear_suit.screen_loc = ui_oclothing //TODO
|
||||
var/image/lying = image("icon" = 'suit.dmi', "icon_state" = "[wear_suit.icon_state]2")
|
||||
var/image/standing = image("icon" = 'suit.dmi', "icon_state" = "[wear_suit.icon_state]")
|
||||
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) ) //TODO
|
||||
if (handcuffed) //
|
||||
handcuffed.loc = loc //
|
||||
handcuffed.layer = initial(handcuffed.layer) //
|
||||
handcuffed = null //
|
||||
if (l_hand || r_hand) //
|
||||
var/h = hand //
|
||||
hand = 1 //
|
||||
drop_item() //
|
||||
hand = 0 //
|
||||
drop_item() //
|
||||
hand = h //
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/t_state
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat) )
|
||||
t_state = "armor"
|
||||
else if( istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat) )
|
||||
t_state = "coat"
|
||||
else
|
||||
t_state = "suit"
|
||||
lying.overlays += image("icon" = 'blood.dmi', "icon_state" = "[t_state]blood2")
|
||||
standing.overlays += image("icon" = 'blood.dmi', "icon_state" = "[t_state]blood")
|
||||
|
||||
overlays_lying[SUIT_LAYER] = lying
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
else
|
||||
overlays_lying[SUIT_LAYER] = null
|
||||
overlays_standing[SUIT_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_pockets(var/update_icons=1)
|
||||
if(l_store) l_store.screen_loc = ui_storage1 //TODO
|
||||
if(r_store) r_store.screen_loc = ui_storage2 //TODO
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
|
||||
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
|
||||
wear_mask.screen_loc = ui_mask //TODO
|
||||
var/image/lying = image("icon" = 'mask.dmi', "icon_state" = "[wear_mask.icon_state]2")
|
||||
var/image/standing = image("icon" = 'mask.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
if( !istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
|
||||
lying.overlays += image("icon" = 'blood.dmi', "icon_state" = "maskblood2")
|
||||
standing.overlays += image("icon" = 'blood.dmi', "icon_state" = "maskblood")
|
||||
overlays_lying[FACEMASK_LAYER] = lying
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
else
|
||||
overlays_lying[FACEMASK_LAYER] = null
|
||||
overlays_standing[FACEMASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_back(var/update_icons=1)
|
||||
if(back)
|
||||
back.screen_loc = ui_back //TODO
|
||||
overlays_lying[BACK_LAYER] = image("icon" = 'back.dmi', "icon_state" = "[back.icon_state]2")
|
||||
overlays_standing[BACK_LAYER] = image("icon" = 'back.dmi', "icon_state" = "[back.icon_state]")
|
||||
else
|
||||
overlays_lying[BACK_LAYER] = null
|
||||
overlays_standing[BACK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_hud() //TODO: do away with this if possible
|
||||
if(client)
|
||||
client.screen |= contents
|
||||
hud_used.other_update() //Updates the screenloc of the items on the 'other' inventory bar
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1)
|
||||
if(handcuffed)
|
||||
pulling = null //TODO: should be handled elsewhere
|
||||
overlays_lying[HANDCUFF_LAYER] = image("icon" = 'mob.dmi', "icon_state" = "handcuff2")
|
||||
overlays_standing[HANDCUFF_LAYER] = image("icon" = 'mob.dmi', "icon_state" = "handcuff1")
|
||||
else
|
||||
overlays_lying[HANDCUFF_LAYER] = null
|
||||
overlays_standing[HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
r_hand.screen_loc = ui_rhand //TODO
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = 'items_righthand.dmi', "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
l_hand.screen_loc = ui_lhand //TODO
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = 'items_lefthand.dmi', "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
@@ -1,12 +1,12 @@
|
||||
/mob/living/carbon/metroid/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
update_hud()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
if (src.stat == DEAD)
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
real_name = name
|
||||
spawn (1)
|
||||
update_clothing()
|
||||
regenerate_icons()
|
||||
src << "\blue Your icons have been generated!"
|
||||
..()
|
||||
|
||||
@@ -283,43 +283,6 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/update_clothing()
|
||||
..()
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
|
||||
|
||||
if (client)
|
||||
if (i_select)
|
||||
if (intent)
|
||||
client.screen += hud_used.intents
|
||||
|
||||
var/list/L = dd_text2list(intent, ",")
|
||||
L[1] += ":-11"
|
||||
i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
|
||||
else
|
||||
i_select.screen_loc = null
|
||||
if (m_select)
|
||||
if (m_int)
|
||||
client.screen += hud_used.mov_int
|
||||
|
||||
var/list/L = dd_text2list(m_int, ",")
|
||||
L[1] += ":-11"
|
||||
m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
|
||||
|
||||
for (var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
spawn (0)
|
||||
show_inv(M)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
@@ -490,8 +453,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
@@ -594,8 +559,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
//no special icon processing
|
||||
@@ -4,13 +4,8 @@
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
src.intent_small_hud_objects = list( )
|
||||
|
||||
//var/icon/blocked = icon(ui_style,"blocked")
|
||||
|
||||
@@ -58,41 +53,6 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "help_small"
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "disarm_small"
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "grab_small"
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "harm_small"
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.intent_small_hud_objects += using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
|
||||
@@ -11,24 +11,18 @@
|
||||
/mob/living/carbon/monkey/Life()
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (src.monkeyizing)
|
||||
return
|
||||
|
||||
if (src.monkeyizing) return
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
if(src.loc)
|
||||
environment = loc.return_air()
|
||||
|
||||
if (src.stat != 2) //still breathing
|
||||
|
||||
if (src.stat != DEAD) //still breathing
|
||||
//First, resolve location and get a breath
|
||||
|
||||
if(air_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
breathe()
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
@@ -69,12 +63,16 @@
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
//Temporary, whilst I finish the regenerate_icons changes ~Carn
|
||||
if( update_icon ) //forces a full overlay update
|
||||
update_icon = 0
|
||||
regenerate_icons()
|
||||
else if( lying != lying_prev )
|
||||
update_icons()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
// Update clothing
|
||||
update_clothing()
|
||||
|
||||
clamp_values()
|
||||
|
||||
// Grabbing
|
||||
|
||||
@@ -1,54 +1,11 @@
|
||||
/mob/living/carbon/monkey/Login()
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
/*
|
||||
if (!( src.primary ))
|
||||
var/t1 = rand(1000, 1500)
|
||||
dna_ident += t1
|
||||
if (dna_ident > 65536.0)
|
||||
dna_ident = rand(1, 1500)
|
||||
src.primary = new /datum/dna( null )
|
||||
src.primary.uni_identity = text("[]", dna_ident)
|
||||
while(length(src.primary.uni_identity) < 4)
|
||||
src.primary.uni_identity = text("0[]", src.primary.uni_identity)
|
||||
var/t2 = text("[]", rand(1, 256))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
t2 = text("[]", rand(1, 256))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
t2 = text("[]", rand(1, 256))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
t2 = text("[]", rand(1, 256))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
t2 = (src.gender == "male" ? text("[]", rand(1, 124)) : text("[]", rand(127, 250)))
|
||||
if (length(t2) < 2)
|
||||
src.primary.uni_identity = text("[]0[]", src.primary.uni_identity, t2)
|
||||
else
|
||||
src.primary.uni_identity = text("[][]", src.primary.uni_identity, t2)
|
||||
src.primary.spec_identity = "2B6696D2B127E5A4"
|
||||
src.primary.struc_enzymes = "CDEAF5B90AADBC6BA8033DB0A7FD613FA"
|
||||
src.primary.unique_enzymes = "C8FFFE7EC09D80AEDEDB9A5A0B4085B61"
|
||||
src.primary.n_chromo = 16
|
||||
*/
|
||||
update_hud()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
if (src.stat == DEAD)
|
||||
src.verbs += /mob/proc/ghost
|
||||
if(src.name == "monkey")
|
||||
src.name = text("monkey ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
return
|
||||
return
|
||||
|
||||
@@ -213,8 +213,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
@@ -286,8 +288,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
@@ -399,82 +403,7 @@
|
||||
stat("Genetic Damage Time", changeling.geneticdamage)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/update_clothing()
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/structure/stool/bed/chair))
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
|
||||
if(update_icon) // Skie
|
||||
..()
|
||||
for(var/i in overlays)
|
||||
overlays -= i
|
||||
|
||||
if (!( lying ))
|
||||
icon_state = "monkey1"
|
||||
else
|
||||
icon_state = "monkey0"
|
||||
|
||||
if (wear_mask)
|
||||
if (istype(wear_mask, /obj/item/clothing/mask))
|
||||
var/t1 = wear_mask.icon_state
|
||||
overlays += image("icon" = 'monkey.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
|
||||
wear_mask.screen_loc = ui_monkey_mask
|
||||
|
||||
if (r_hand)
|
||||
if(update_icon)
|
||||
overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = layer)
|
||||
r_hand.screen_loc = ui_rhand
|
||||
|
||||
if (l_hand)
|
||||
if(update_icon)
|
||||
overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = layer)
|
||||
l_hand.screen_loc = ui_lhand
|
||||
|
||||
if (back)
|
||||
var/t1 = back.icon_state //apparently tables make me upset and cause my dreams to shatter
|
||||
overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = layer)
|
||||
back.screen_loc = ui_monkey_back
|
||||
|
||||
if (handcuffed && update_icon)
|
||||
pulling = null
|
||||
if (!( lying ))
|
||||
overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff1", "layer" = layer)
|
||||
else
|
||||
overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff2", "layer" = layer)
|
||||
|
||||
if (client)
|
||||
client.screen -= contents
|
||||
client.screen += contents
|
||||
client.screen -= hud_used.m_ints
|
||||
client.screen -= hud_used.mov_int
|
||||
if (i_select)
|
||||
if (intent)
|
||||
client.screen += hud_used.m_ints
|
||||
|
||||
var/list/L = dd_text2list(intent, ",")
|
||||
L[1] += ":-11"
|
||||
i_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT//What
|
||||
|
||||
else
|
||||
i_select.screen_loc = null
|
||||
if (m_select)
|
||||
if (m_int)
|
||||
client.screen += hud_used.mov_int
|
||||
|
||||
var/list/L = dd_text2list(m_int, ",")
|
||||
L[1] += ":-11"
|
||||
m_select.screen_loc = dd_list2text(L,",") //ICONS, FUCKING SHIT//the fuck
|
||||
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
spawn( 0 )
|
||||
show_inv(M)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/Move()
|
||||
if ((!( buckled ) || buckled.loc != loc))
|
||||
@@ -760,8 +689,8 @@
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("[] is now running on internals.", target), 1)
|
||||
else
|
||||
source.update_clothing()
|
||||
target.update_clothing()
|
||||
source.regenerate_icons()
|
||||
target.regenerate_icons()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/mob/living/carbon/monkey
|
||||
var/list/overlays_lying[M_TOTAL_LAYERS]
|
||||
var/list/overlays_standing[M_TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/monkey/regenerate_icons()
|
||||
..()
|
||||
update_inv_wear_mask(0)
|
||||
update_inv_back(0)
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_handcuffed(0)
|
||||
update_icons()
|
||||
//Hud Stuff
|
||||
update_hud()
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/update_icons()
|
||||
update_hud()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
overlays = null
|
||||
if(lying)
|
||||
icon_state = "monkey0"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
icon_state = "monkey1"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
|
||||
////////
|
||||
/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1)
|
||||
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
|
||||
overlays_lying[M_MASK_LAYER] = image("icon" = 'monkey.dmi', "icon_state" = "[wear_mask.icon_state]2")
|
||||
overlays_standing[M_MASK_LAYER] = image("icon" = 'monkey.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
wear_mask.screen_loc = ui_monkey_mask
|
||||
else
|
||||
overlays_lying[M_MASK_LAYER] = null
|
||||
overlays_standing[M_MASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
overlays_standing[M_R_HAND_LAYER] = image("icon" = 'items_righthand.dmi', "icon_state" = t_state)
|
||||
r_hand.screen_loc = ui_rhand
|
||||
else
|
||||
overlays_standing[M_R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
overlays_standing[M_L_HAND_LAYER] = image("icon" = 'items_lefthand.dmi', "icon_state" = t_state)
|
||||
l_hand.screen_loc = ui_lhand
|
||||
else
|
||||
overlays_standing[M_L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_back(var/update_icons=1)
|
||||
if(back)
|
||||
overlays_lying[M_BACK_LAYER] = image("icon" = 'back.dmi', "icon_state" = "[back.icon_state]2")
|
||||
overlays_standing[M_BACK_LAYER] = image("icon" = 'back.dmi', "icon_state" = "[back.icon_state]")
|
||||
back.screen_loc = ui_monkey_back
|
||||
else
|
||||
overlays_lying[M_BACK_LAYER] = null
|
||||
overlays_standing[M_BACK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_handcuffed(var/update_icons=1)
|
||||
if(handcuffed)
|
||||
pulling = null
|
||||
overlays_lying[M_HANDCUFF_LAYER] = image("icon" = 'monkey.dmi', "icon_state" = "handcuff2")
|
||||
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'monkey.dmi', "icon_state" = "handcuff1")
|
||||
else
|
||||
overlays_lying[M_HANDCUFF_LAYER] = null
|
||||
overlays_standing[M_HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_hud()
|
||||
if (client)
|
||||
client.screen |= contents
|
||||
@@ -41,11 +41,8 @@
|
||||
var/extradam = 0 //added to when organ is at max dam
|
||||
for(var/datum/organ/external/affecting in H.organs)
|
||||
if(!affecting) continue
|
||||
if(affecting.take_damage(0, divided_damage+extradam))
|
||||
extradam = 0
|
||||
else
|
||||
extradam += divided_damage
|
||||
H.UpdateDamageIcon()
|
||||
if(affecting.take_damage(0, divided_damage+extradam)) //TODO: fix the extradam stuff. Or, ebtter yet...rewrite this entire proc ~Carn
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
return 1
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
@@ -173,19 +170,20 @@
|
||||
|
||||
/mob/living/proc/check_if_buckled()
|
||||
if (buckled)
|
||||
if(buckled == /obj/structure/stool/bed || istype(buckled, /obj/machinery/conveyor))
|
||||
lying = 1
|
||||
if(lying)
|
||||
var/h = hand
|
||||
hand = 0
|
||||
drop_item()
|
||||
hand = 1
|
||||
drop_item()
|
||||
hand = h
|
||||
density = 1
|
||||
if( istype(buckled, /obj/structure/stool/bed/chair) )
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
else
|
||||
density = !lying
|
||||
|
||||
if(lying)
|
||||
var/h = hand
|
||||
hand = 0
|
||||
drop_item()
|
||||
hand = 1
|
||||
drop_item()
|
||||
hand = h
|
||||
|
||||
/mob/living/proc/Examine_OOC()
|
||||
set name = "Examine Meta-Info (OOC)"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
blood.override = 1
|
||||
client.images += blood
|
||||
..()
|
||||
update_clothing()
|
||||
regenerate_icons()
|
||||
for(var/S in src.client.screen)
|
||||
del(S)
|
||||
src.flash = new /obj/screen( null )
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.intents = list( )
|
||||
src.mon_blo = list( )
|
||||
src.m_ints = list( )
|
||||
src.mov_int = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/silicon/robot/Login(var/syndie = 0)
|
||||
..()
|
||||
|
||||
update_clothing()
|
||||
regenerate_icons()
|
||||
|
||||
if (!isturf(src.loc))
|
||||
src.client.eye = src.loc
|
||||
|
||||
@@ -579,8 +579,10 @@
|
||||
G.assailant = M
|
||||
if (M.hand)
|
||||
M.l_hand = G
|
||||
M.update_inv_l_hand()
|
||||
else
|
||||
M.r_hand = G
|
||||
M.update_inv_r_hand()
|
||||
G.layer = 20
|
||||
G.affecting = src
|
||||
grabbed_by += G
|
||||
@@ -712,8 +714,10 @@
|
||||
cell.layer = 20
|
||||
if (user.hand )
|
||||
user.l_hand = cell
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = cell
|
||||
user.update_inv_r_hand()
|
||||
|
||||
cell.add_fingerprint(user)
|
||||
cell.updateicon()
|
||||
|
||||
+15
-15
@@ -100,14 +100,13 @@
|
||||
// organStructure.ProcessOrgans()
|
||||
return
|
||||
|
||||
/mob/proc/update_clothing()
|
||||
return
|
||||
|
||||
/mob/proc/restrained()
|
||||
if (handcuffed)
|
||||
return 1
|
||||
return
|
||||
|
||||
//Used by monkeys, *chimpers* //TODO: eliminate this convoluted proc it's incredibly shitty. ~Carn
|
||||
/mob/proc/db_click(text, t1)
|
||||
var/obj/item/weapon/W = equipped()
|
||||
switch(text)
|
||||
@@ -119,6 +118,7 @@
|
||||
u_equip(W)
|
||||
wear_mask = W
|
||||
W.equipped(src, text)
|
||||
update_inv_wear_mask()
|
||||
if("back")
|
||||
if (back)
|
||||
return
|
||||
@@ -132,15 +132,8 @@
|
||||
u_equip(W)
|
||||
back = W
|
||||
W.equipped(src, text)
|
||||
if("back")
|
||||
if ((back || !( istype(W, /obj/item/weapon) )))
|
||||
return
|
||||
if (!( W.flags & 1 ))
|
||||
return
|
||||
u_equip(W)
|
||||
back = W
|
||||
W.equipped(src, text)
|
||||
else
|
||||
update_inv_back()
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -173,6 +166,7 @@
|
||||
|
||||
if (W)
|
||||
u_equip(W)
|
||||
update_icons()
|
||||
if (client)
|
||||
client.screen -= W
|
||||
if (W)
|
||||
@@ -193,7 +187,7 @@
|
||||
u_equip(item)
|
||||
//if (client)
|
||||
// client.screen -= item
|
||||
//update_clothing()
|
||||
//regenerate_icons()
|
||||
return
|
||||
|
||||
/mob/proc/get_active_hand()
|
||||
@@ -213,19 +207,21 @@
|
||||
I.loc = src
|
||||
if (hand)
|
||||
l_hand = I
|
||||
update_inv_l_hand()
|
||||
else
|
||||
r_hand = I
|
||||
update_inv_r_hand()
|
||||
I.layer = 20
|
||||
update_clothing()
|
||||
|
||||
/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
|
||||
update_clothing()
|
||||
|
||||
/mob/proc/reset_view(atom/A)
|
||||
if (client)
|
||||
@@ -277,15 +273,19 @@
|
||||
/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_clothing()
|
||||
update_inv_wear_mask()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -73,34 +73,35 @@
|
||||
var/other_mobs = null
|
||||
var/memory = ""
|
||||
var/poll_answer = 0.0
|
||||
var/sdisabilities = 0//Carbon
|
||||
var/disabilities = 0//Carbon
|
||||
var/sdisabilities = 0 //Carbon
|
||||
var/disabilities = 0 //Carbon
|
||||
var/atom/movable/pulling = null
|
||||
var/stat = 0.0
|
||||
var/next_move = null
|
||||
var/prev_move = null
|
||||
var/monkeyizing = null//Carbon
|
||||
var/monkeyizing = null //Carbon
|
||||
var/other = 0.0
|
||||
var/hand = null
|
||||
var/eye_blind = null//Carbon
|
||||
var/eye_blurry = null//Carbon
|
||||
var/ear_deaf = null//Carbon
|
||||
var/ear_damage = null//Carbon
|
||||
var/stuttering = null//Carbon
|
||||
var/eye_blind = null //Carbon
|
||||
var/eye_blurry = null //Carbon
|
||||
var/ear_deaf = null //Carbon
|
||||
var/ear_damage = null //Carbon
|
||||
var/stuttering = null //Carbon
|
||||
var/real_name = null
|
||||
var/original_name = null //Original name is only used in ghost chat! It is not to be edited by anything!
|
||||
var/blinded = null
|
||||
var/bhunger = 0//Carbon
|
||||
var/bhunger = 0 //Carbon
|
||||
var/ajourn = 0
|
||||
var/rejuv = null
|
||||
var/druggy = 0//Carbon
|
||||
var/confused = 0//Carbon
|
||||
var/druggy = 0 //Carbon
|
||||
var/confused = 0 //Carbon
|
||||
var/antitoxs = null
|
||||
var/plasma = null
|
||||
var/sleeping = 0.0//Carbon
|
||||
var/resting = 0.0//Carbon
|
||||
var/lying = 0.0
|
||||
var/canmove = 1.0
|
||||
var/sleeping = 0 //Carbon
|
||||
var/resting = 0 //Carbon
|
||||
var/lying = 0
|
||||
var/lying_prev = 0
|
||||
var/canmove = 1
|
||||
var/eye_stat = null//Living, potentially Carbon
|
||||
var/lastpuke = 0
|
||||
var/unacidable = 0
|
||||
|
||||
@@ -273,10 +273,12 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
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)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user