WIP Guncode

This commit is contained in:
Whitellama
2012-12-09 17:12:59 -08:00
parent f3e3ce7429
commit 90235adbc1
14 changed files with 213 additions and 132 deletions
@@ -3,7 +3,8 @@
#define X_SUIT_LAYER 2
#define X_L_HAND_LAYER 3
#define X_R_HAND_LAYER 4
#define X_TOTAL_LAYERS 4
#define TARGETED_LAYER 5
#define X_TOTAL_LAYERS 5
/////////////////////////////////
/mob/living/carbon/alien/humanoid
@@ -120,10 +121,22 @@
overlays_standing[X_L_HAND_LAYER] = null
if(update_icons) update_icons()
//Call when target overlay should be added/removed
/mob/living/carbon/alien/humanoid/update_targeted(var/update_icons=1)
if (targeted_by && target_locked)
overlays_lying[TARGETED_LAYER] = target_locked
overlays_standing[TARGETED_LAYER] = target_locked
else if (!targeted_by && target_locked)
del(target_locked)
if (!targeted_by)
overlays_lying[TARGETED_LAYER] = null
overlays_standing[TARGETED_LAYER] = null
if(update_icons) update_icons()
//Xeno Overlays Indexes//////////
#undef X_HEAD_LAYER
#undef X_SUIT_LAYER
#undef X_L_HAND_LAYER
#undef X_R_HAND_LAYER
#undef TARGETED_LAYER
#undef X_TOTAL_LAYERS
@@ -132,7 +132,6 @@ Please contact me on #coderbus IRC. ~Carn x
//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()
world << "[src] CALLED THE HUMAN VERSION OF 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
@@ -471,29 +470,17 @@ proc/get_damage_icon_part(damage_state, body_part)
update_hair(0)
if(update_icons) update_icons()
//Call when target overlay should be added/removed
/mob/living/carbon/human/update_targeted(var/update_icons=1)
// If someone's targeting you
if (targeted_by.len)
//If the target is already there and finished locking (after two seconds), put in locked state and be done
if (overlays_standing[TARGETED_LAYER]||overlays_lying[TARGETED_LAYER])
var/target_locked = image("icon" = 'icons/effects/Targeted.dmi', "icon_state" = "locked")
overlays_lying[TARGETED_LAYER] = target_locked
overlays_standing[TARGETED_LAYER] = target_locked
return
var/target_locking = image("icon" = 'icons/effects/Targeted.dmi', "icon_state" = "locking")
world << "TARGET_LOCKING IS [target_locking]"
//Put in our overlay, since it isn't already there
overlays_lying[TARGETED_LAYER] = target_locking
overlays_standing[TARGETED_LAYER] = target_locking
else
if (targeted_by && target_locked)
overlays_lying[TARGETED_LAYER] = target_locked
overlays_standing[TARGETED_LAYER] = target_locked
else if (!targeted_by && target_locked)
del(target_locked)
if (!targeted_by)
overlays_lying[TARGETED_LAYER] = null
overlays_standing[TARGETED_LAYER] = null
if(update_icons) update_icons()
if(update_icons) update_icons()
/* --------------------------------------- */
@@ -877,4 +864,5 @@ proc/get_damage_icon_part(damage_state, body_part)
#undef L_HAND_LAYER
#undef R_HAND_LAYER
#undef TAIL_LAYER
#undef TOTAL_LAYERS
#undef TARGETED_LAYER
#undef TOTAL_LAYERS
@@ -4,7 +4,8 @@
#define M_HANDCUFF_LAYER 3
#define M_L_HAND_LAYER 4
#define M_R_HAND_LAYER 5
#define M_TOTAL_LAYERS 5
#define TARGETED_LAYER 6
#define M_TOTAL_LAYERS 6
/////////////////////////////////
/mob/living/carbon/monkey
@@ -101,11 +102,24 @@
if (client)
client.screen |= contents
//Call when target overlay should be added/removed
/mob/living/carbon/monkey/update_targeted(var/update_icons=1)
if (targeted_by && target_locked)
overlays_lying[TARGETED_LAYER] = target_locked
overlays_standing[TARGETED_LAYER] = target_locked
else if (!targeted_by && target_locked)
del(target_locked)
if (!targeted_by)
overlays_lying[TARGETED_LAYER] = null
overlays_standing[TARGETED_LAYER] = null
if(update_icons) update_icons()
//Monkey Overlays Indexes////////
#undef M_MASK_LAYER
#undef M_BACK_LAYER
#undef M_HANDCUFF_LAYER
#undef M_L_HAND_LAYER
#undef M_R_HAND_LAYER
#undef TARGETED_LAYER
#undef M_TOTAL_LAYERS
@@ -1,7 +1,7 @@
/mob/living/silicon/robot
name = "Cyborg"
real_name = "Cyborg"
icon = 'icons/mob/robots.dmi'//
icon = 'icons/mob/robots.dmi'
icon_state = "robot"
maxHealth = 300
health = 300
@@ -790,7 +790,13 @@
overlays += "ov-openpanel -c"
return
//Call when target overlay should be added/removed
/mob/living/silicon/robot/update_targeted()
if(!targeted_by && target_locked)
del(target_locked)
updateicon()
if (targeted_by && target_locked)
overlays += target_locked
/mob/living/silicon/robot/proc/installed_modules()
if(weapon_lock)
@@ -23,10 +23,12 @@
/mob/living/simple_animal/corgi/Life()
..()
regenerate_icons()
//regenerate_icons() //Don't call this every life tick.
//I'm serious. If you're going to enable dressing up Ian,
//Find a GOOD place to call regenerate_icons().
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
/*
/* If you're turning this back on, scroll down and uncomment target_updated
user.machine = src
if(user.stat) return
@@ -391,7 +393,14 @@
overlays += back_icon
return
//UNCOMMENT THIS WHEN YOU UNCOMMENT CODE FOR DRESSING UP IAN
/*//Call when target overlay should be added/removed
/mob/living/simple_animal/friendly/corgi/update_targeted()
if(!targeted_by && target_locked)
del(target_locked)
regenerate_icons()
if (targeted_by && target_locked)
overlays += target_locked*/
/mob/living/simple_animal/corgi/puppy
name = "\improper corgi puppy"
@@ -406,4 +415,4 @@
if(href_list["remove_inv"] || href_list["add_inv"])
usr << "\red You can't fit this on [src]"
return
..()
..()
@@ -432,4 +432,12 @@
var/obj/mecha/M = target_mob
if (M.occupant)
return (0)
return (1)
return (1)
//Call when target overlay should be added/removed
/mob/living/simple_animal/update_targeted()
if(!targeted_by && target_locked)
del(target_locked)
overlays = null
if (targeted_by && target_locked)
overlays += target_locked
+1 -1
View File
@@ -282,7 +282,7 @@
return 0
move_delay = world.time//set move delay
mob.last_move_intent = world.time + 10
switch(mob.m_intent)
if("run")
if(mob.drowsyness > 0)
-1
View File
@@ -5,7 +5,6 @@
return
/mob/proc/update_icons()
world << "[src] CALLED THE MOB VERSION OF UPDATE_ICONS"
return
/mob/proc/update_hud()