Removes equip_e - Fixes #423

This updates everything that used equip_e, particularly the strip panel, but also DNA injectors and CPR.

Removed unused mob vars:
 var/obj/effect/organstructure/organStructure
 var/other
 var/proc_holder_list[]

Removed unused alien suit and head slots.
 Removed var/obj/item/weapon/card/id/wear_id from monkeys, and updated ed209s to not use :

Renamed HUMAN_STRIP_DELAY to STRIP_DELAY.

Muddled Topics() around so that mobs are now a bit more OO. Also updated quite a few misc inventory procs to various degrees.

Updated monkey and aliens huds a little bit.

Random movement when confused now happens half the time.

Fixed monkey breathmask onmobs.

Added a .unconscious text style, for that nice bold blue text you get when you're unconscious. Only CPR uses it at the moment.

This has been tested fairly extensively, and everything seems to work fine.

-Merged commits ~carnie
Signed-off-by: carnie <elly1989@rocketmail.com>
This commit is contained in:
Pete Goodfellow
2013-04-21 04:18:50 +01:00
committed by carnie
parent a3a615b1c0
commit 62b848c6ce
34 changed files with 595 additions and 1245 deletions

View File

@@ -32,7 +32,7 @@
#define AGE_MIN 17 //youngest a character can be
#define AGE_MAX 85 //oldest a character can be
#define SHOES_SLOWDOWN -1 //How much shoes slow you down by default. Negative values speed you up
#define HUMAN_STRIP_DELAY 40 //time taken (in deciseconds) to strip somebody
#define STRIP_DELAY 40 //time taken (in deciseconds) to strip somebody
#define DOOR_CRUSH_DAMAGE 10 //the amount of damage that airlocks deal when they crush you
#define HUNGER_FACTOR 0.1 //factor at which mob nutrition decreases

View File

@@ -21,16 +21,16 @@
#define ui_storage1 "9:18,1:5"
#define ui_storage2 "10:20,1:5"
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
#define ui_borg_store "9:16,1:5" //borgs
#define ui_monkey_mask "5:14,1:5" //monkey
#define ui_monkey_back "6:14,1:5" //monkey
#define ui_monkey_back "6:15,1:5" //monkey
#define ui_alien_storage_l "6:14,1:5"
#define ui_alien_storage_r "9:18,1:5"
//Lower right, persistant menu
#define ui_drop_throw "14:28,2:7"

View File

@@ -662,11 +662,12 @@ Auto Patrol: []"},
//If the security records say to arrest them, arrest them
//Or if they have weapons and aren't security, arrest them.
/obj/machinery/bot/ed209/proc/assess_perp(mob/living/carbon/human/perp as mob)
if(!istype(perp) || emagged == 2)
return 10
var/threatcount = 0
if(src.emagged == 2) return 10 //Everyone is a criminal!
if((src.idcheck) || (isnull(perp:wear_id)) || (istype(perp:wear_id.GetID(), /obj/item/weapon/card/id/syndicate)))
if((src.idcheck) || (isnull(perp.wear_id)) || (istype(perp.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)))
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
@@ -680,7 +681,7 @@ Auto Patrol: []"},
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee))
if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee))
if(!istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/practice))

View File

@@ -372,7 +372,7 @@
// slot uses the slot_X defines found in setup.dm
// for items that can be placed in multiple slots
// note this isn't called during the initial dressing of a player
/obj/item/proc/equipped(var/mob/user, var/slot)
/obj/item/proc/equipped(mob/user, slot)
return
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.

View File

@@ -1,141 +1,94 @@
/obj/item/weapon/dnainjector
name = "DNA-Injector"
name = "\improper DNA injector"
desc = "This injects the person with DNA."
icon = 'icons/obj/items.dmi'
icon_state = "dnainjector"
var/dnatype = null
var/dna = null
var/block = null
var/owner = null
var/ue = null
var/s_time = 10.0
throw_speed = 1
throw_range = 5
w_class = 1.0
var/uses = 1
var/nofail
var/is_bullet = 0
var/inuse = 0
var/dnatype = null
var/dna = null
var/block = null
var/ue = null
/obj/item/weapon/dnainjector/attack_paw(mob/user as mob)
/obj/item/weapon/dnainjector/attack_paw(mob/user)
return attack_hand(user)
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
if(istype(M,/mob/living))
M.radiation += rand(20,50)
/obj/item/weapon/dnainjector/proc/inject(mob/M, mob/user)
if(M.stat == DEAD) //prevents dead people from having their DNA changed
user << "<span class='notice'>You can't modify [M]'s DNA while \he's dead.</span>"
return
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
if (dnatype == "ui")
if (!block) //isolated block?
if (ue) //unique enzymes? yes
if(isliving(M))
M.radiation += rand(20, 50)
if(dnatype == "ui")
if(!block) //isolated block?
if(ue) //unique enzymes? yes
M.dna.uni_identity = dna
updateappearance(M, M.dna.uni_identity)
M.real_name = ue
M.name = ue
uses--
else //unique enzymes? no
M.dna.uni_identity = dna
updateappearance(M, M.dna.uni_identity)
uses--
else
M.dna.uni_identity = setblock(M.dna.uni_identity,block,dna,3)
M.dna.uni_identity = setblock(M.dna.uni_identity,block, dna, 3)
updateappearance(M, M.dna.uni_identity)
uses--
if (dnatype == "se")
if (!block) //isolated block?
else if(dnatype == "se")
if(!block) //isolated block?
M.dna.struc_enzymes = dna
domutcheck(M, null)
uses--
else
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes,block,dna,3)
domutcheck(M, null,1)
uses--
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes,block, dna, 3)
domutcheck(M, null, 1)
spawn(0)//this prevents the collapse of space-time continuum
if (user)
user.drop_from_inventory(src)
del(src)
return uses
/obj/item/weapon/dnainjector/attack(mob/M as mob, mob/user as mob)
if (!istype(M, /mob))
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
if(!ishuman(user))
user << "<span class='notice'>You don't have the dexterity to do this!</span>"
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])</font>")
if (user)
if (istype(M, /mob/living/carbon/human))
if(!inuse)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = M
O.item = src
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "dnainjector"
src.inuse = 1
spawn(50) // Not the best fix. There should be an failure proc, for /effect/equip_e/, which is called when the first initital checks fail
inuse = 0
M.requests += O
if (dnatype == "se")
if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
log_attack("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
else
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
else
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
spawn( 0 )
O.process()
return
else
if(!inuse)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been injected with [] by [].", M, src, user), 1)
//Foreach goto(192)
if (!(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)))
user << "\red Apparently it didn't work."
return
if (dnatype == "se")
if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
else
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
else
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
inuse = 1
inject(M, user)//Now we actually do the heavy lifting.
spawn(50)
inuse = 0
/*
A user injecting themselves could mean their own transformation and deletion of mob.
I don't have the time to figure out how this code works so this will do for now.
I did rearrange things a bit.
*/
if(user)//If the user still exists. Their mob may not.
if(M)//Runtime fix: If the mob doesn't exist, mob.name doesnt work. - Nodrak
user.show_message(text("\red You inject [M.name]"))
else
user.show_message(text("\red You finish the injection."))
if(!ishuman(target) && !ismonkey(target))
user << "<span class='notice'>You can't inject [target].</span>"
return
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>[user.name] ([user.ckey]) attempted to inject with [name]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to attempt to inject [target.name] ([target.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [name] to attempt to inject [target.name] ([target.ckey])</font>")
if(target != user)
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", \
"<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
if(!do_mob(user, target))
return
if(!src)
return
if(ishuman(target)) //check for monkeying people.
if(dnatype == "se")
if(isblockon(getblock(dna, 14,3),14))
message_admins("[key_name_admin(user)] injected [key_name_admin(target)] with the [name] \red(MONKEY)")
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
else
user << "<span class='notice'>You inject yourself with [src].</span>"
target.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>"
user.attack_log += "\[[time_stamp()]\] <font color='red'>Used the [name] to inject [target.name] ([target.ckey])</font>"
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [name] to inject [target.name] ([target.ckey])</font>")
user.drop_item()
inject(target, user) //Now we actually do the heavy lifting.
loc = null //garbage collect
/obj/item/weapon/dnainjector/antihulk
name = "DNA-Injector (Anti-Hulk)"
name = "\improper DNA injector (Anti-Hulk)"
desc = "Cures green skin."
dnatype = "se"
dna = "708"
@@ -145,7 +98,7 @@
block = HULKBLOCK
/obj/item/weapon/dnainjector/hulkmut
name = "DNA-Injector (Hulk)"
name = "\improper DNA injector (Hulk)"
desc = "This will make you big and strong, but give you a bad skin condition."
dnatype = "se"
dna = "FED"
@@ -155,7 +108,7 @@
block = HULKBLOCK
/obj/item/weapon/dnainjector/xraymut
name = "DNA-Injector (Xray)"
name = "\improper DNA injector (Xray)"
desc = "Finally you can see what the Captain does."
dnatype = "se"
dna = "FED"
@@ -165,7 +118,7 @@
block = XRAYBLOCK
/obj/item/weapon/dnainjector/antixray
name = "DNA-Injector (Anti-Xray)"
name = "\improper DNA injector (Anti-Xray)"
desc = "It will make you see harder."
dnatype = "se"
dna = "708"
@@ -176,49 +129,49 @@
/////////////////////////////////////
/obj/item/weapon/dnainjector/antiglasses
name = "DNA-Injector (Anti-Glasses)"
name = "\improper DNA injector (Anti-Glasses)"
desc = "Toss away those glasses!"
dnatype = "se"
dna = "708"
block = 1
/obj/item/weapon/dnainjector/glassesmut
name = "DNA-Injector (Glasses)"
name = "\improper DNA injector (Glasses)"
desc = "Will make you need dorkish glasses."
dnatype = "se"
dna = "BD6"
block = 1
/obj/item/weapon/dnainjector/epimut
name = "DNA-Injector (Epi.)"
name = "\improper DNA injector (Epi.)"
desc = "Shake shake shake the room!"
dnatype = "se"
dna = "FA0"
block = 3
/obj/item/weapon/dnainjector/antiepi
name = "DNA-Injector (Anti-Epi.)"
name = "\improper DNA injector (Anti-Epi.)"
desc = "Will fix you up from shaking the room."
dnatype = "se"
dna = "708"
block = 3
////////////////////////////////////
/obj/item/weapon/dnainjector/anticough
name = "DNA-Injector (Anti-Cough)"
name = "\improper DNA injector (Anti-Cough)"
desc = "Will stop that aweful noise."
dnatype = "se"
dna = "708"
block = 5
/obj/item/weapon/dnainjector/coughmut
name = "DNA-Injector (Cough)"
name = "\improper DNA injector (Cough)"
desc = "Will bring forth a sound of horror from your throat."
dnatype = "se"
dna = "BD6"
block = 5
/obj/item/weapon/dnainjector/clumsymut
name = "DNA-Injector (Clumsy)"
name = "\improper DNA injector (Clumsy)"
desc = "Makes clown minions."
dnatype = "se"
dna = "FA0"
@@ -228,7 +181,7 @@
block = CLUMSYBLOCK
/obj/item/weapon/dnainjector/anticlumsy
name = "DNA-Injector (Anti-Clumy)"
name = "\improper DNA injector (Anti-Clumy)"
desc = "Apply this for Security Clown."
dnatype = "se"
dna = "708"
@@ -238,35 +191,35 @@
block = CLUMSYBLOCK
/obj/item/weapon/dnainjector/antitour
name = "DNA-Injector (Anti-Tour.)"
name = "\improper DNA injector (Anti-Tour.)"
desc = "Will cure tourrets."
dnatype = "se"
dna = "708"
block = 7
/obj/item/weapon/dnainjector/tourmut
name = "DNA-Injector (Tour.)"
name = "\improper DNA injector (Tour.)"
desc = "Gives you a nasty case off tourrets."
dnatype = "se"
dna = "BD6"
block = 7
/obj/item/weapon/dnainjector/stuttmut
name = "DNA-Injector (Stutt.)"
name = "\improper DNA injector (Stutt.)"
desc = "Makes you s-s-stuttterrr"
dnatype = "se"
dna = "FA0"
block = 9
/obj/item/weapon/dnainjector/antistutt
name = "DNA-Injector (Anti-Stutt.)"
name = "\improper DNA injector (Anti-Stutt.)"
desc = "Fixes that speaking impairment."
dnatype = "se"
dna = "708"
block = 9
/obj/item/weapon/dnainjector/antifire
name = "DNA-Injector (Anti-Fire)"
name = "\improper DNA injector (Anti-Fire)"
desc = "Cures fire."
dnatype = "se"
dna = "708"
@@ -276,7 +229,7 @@
block = FIREBLOCK
/obj/item/weapon/dnainjector/firemut
name = "DNA-Injector (Fire)"
name = "\improper DNA injector (Fire)"
desc = "Gives you fire."
dnatype = "se"
dna = "FED"
@@ -286,7 +239,7 @@
block = FIREBLOCK
/obj/item/weapon/dnainjector/blindmut
name = "DNA-Injector (Blind)"
name = "\improper DNA injector (Blind)"
desc = "Makes you not see anything."
dnatype = "se"
dna = "FA0"
@@ -296,7 +249,7 @@
block = BLINDBLOCK
/obj/item/weapon/dnainjector/antiblind
name = "DNA-Injector (Anti-Blind)"
name = "\improper DNA injector (Anti-Blind)"
desc = "ITS A MIRACLE!!!"
dnatype = "se"
dna = "708"
@@ -306,7 +259,7 @@
block = BLINDBLOCK
/obj/item/weapon/dnainjector/antitele
name = "DNA-Injector (Anti-Tele.)"
name = "\improper DNA injector (Anti-Tele.)"
desc = "Will make you not able to control your mind."
dnatype = "se"
dna = "708"
@@ -316,7 +269,7 @@
block = TELEBLOCK
/obj/item/weapon/dnainjector/telemut
name = "DNA-Injector (Tele.)"
name = "\improper DNA injector (Tele.)"
desc = "Super brain man!"
dnatype = "se"
dna = "FED"
@@ -326,14 +279,14 @@
block = TELEBLOCK
/obj/item/weapon/dnainjector/telemut/darkbundle
name = "DNA-Injector"
name = "\improper DNA injector"
desc = "Good. Let the hate flow through you."
/obj/item/weapon/dnainjector/telemut/darkbundle/attack(mob/M as mob, mob/user as mob)
/obj/item/weapon/dnainjector/telemut/darkbundle/attack(mob/M, mob/user)
..()
domutcheck(M,null) //guarantees that it works instead of getting a dud injector.
/obj/item/weapon/dnainjector/deafmut
name = "DNA-Injector (Deaf)"
name = "\improper DNA injector (Deaf)"
desc = "Sorry, what did you say?"
dnatype = "se"
dna = "FA0"
@@ -343,7 +296,7 @@
block = DEAFBLOCK
/obj/item/weapon/dnainjector/antideaf
name = "DNA-Injector (Anti-Deaf)"
name = "\improper DNA injector (Anti-Deaf)"
desc = "Will make you hear once more."
dnatype = "se"
dna = "708"
@@ -353,14 +306,14 @@
block = DEAFBLOCK
/obj/item/weapon/dnainjector/h2m
name = "DNA-Injector (Human > Monkey)"
name = "\improper DNA injector (Human > Monkey)"
desc = "Will make you a flea bag."
dnatype = "se"
dna = "FA0"
block = 14
/obj/item/weapon/dnainjector/m2h
name = "DNA-Injector (Monkey > Human)"
name = "\improper DNA injector (Monkey > Human)"
desc = "Will make you...less hairy."
dnatype = "se"
dna = "708"

View File

@@ -159,7 +159,12 @@
var/icon/mob
var/icon/mob2
update_icon(var/mob/living/carbon/human/user)
/obj/item/clothing/head/kitty/equipped(mob/user, slot)
if(user && slot == slot_head)
update_icon(user)
//ffffuck you kitty ears. this proc is a) retarded and b) seems to fail around fifty percent of the time. idgaf tbh
/obj/item/clothing/head/kitty/update_icon(mob/living/carbon/human/user)
if(!istype(user)) return
mob = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kitty")
mob2 = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kitty2")

View File

@@ -151,14 +151,23 @@
return
/mob/proc/u_equip(W as obj)
if (W == r_hand)
/mob/proc/u_equip(obj/item/I)
if(!I) return 0
if(I == r_hand)
r_hand = null
update_inv_r_hand(0)
else if (W == l_hand)
else if(I == l_hand)
l_hand = null
update_inv_l_hand(0)
return
if(I)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.

View File

@@ -32,22 +32,12 @@
l_hand_hud_object = inv_box
adding += inv_box
//suit
inv_box = new /obj/screen/inventory()
inv_box.name = "o_clothing"
inv_box.icon = 'icons/mob/screen_alien.dmi'
inv_box.icon_state = "suit"
inv_box.screen_loc = ui_alien_oclothing
inv_box.slot_id = slot_wear_suit
inv_box.layer = 19
adding += inv_box
//pocket 1
inv_box = new /obj/screen/inventory()
inv_box.name = "storage1"
inv_box.icon = 'icons/mob/screen_alien.dmi'
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage1
inv_box.screen_loc = ui_alien_storage_l
inv_box.slot_id = slot_l_store
inv_box.layer = 19
adding += inv_box
@@ -57,21 +47,11 @@
inv_box.name = "storage2"
inv_box.icon = 'icons/mob/screen_alien.dmi'
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage2
inv_box.screen_loc = ui_alien_storage_r
inv_box.slot_id = slot_r_store
inv_box.layer = 19
adding += inv_box
//head
inv_box = new /obj/screen/inventory()
inv_box.name = "head"
inv_box.icon = 'icons/mob/screen_alien.dmi'
inv_box.icon_state = "head"
inv_box.screen_loc = ui_alien_head
inv_box.slot_id = slot_head
inv_box.layer = 19
adding += inv_box
//begin buttons
using = new /obj/screen/inventory()

View File

@@ -1,11 +1,8 @@
/mob/living/carbon/alien/humanoid
name = "alien"
icon_state = "alien_s"
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/obj/item/r_store = null
var/obj/item/l_store = null
var/caste = ""
update_icon = 1
@@ -62,8 +59,6 @@
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
/mob/living/carbon/alien/humanoid/emp_act(severity)
if(wear_suit) wear_suit.emp_act(severity)
if(head) head.emp_act(severity)
if(r_store) r_store.emp_act(severity)
if(l_store) l_store.emp_act(severity)
..()
@@ -268,23 +263,7 @@
switch(M.a_intent)
if ("help")
if (health > 0)
help_shake_act(M)
else
if (M.health >= -75.0)
if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((head && head.flags & 4) || (wear_mask && !( wear_mask.flags & 32 ))))))
M << "\blue <B>Remove that mask!</B>"
return
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn( 0 )
O.process()
return
if ("grab")
if (M == src)
@@ -403,21 +382,37 @@ In all, this is a lot like the monkey code. /N
/mob/living/carbon/alien/humanoid/var/co2overloadtime = null
/mob/living/carbon/alien/humanoid/var/temperature_resistance = T0C+75
/mob/living/carbon/alien/humanoid/show_inv(mob/user as mob)
/mob/living/carbon/alien/humanoid/show_inv(mob/user)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? text("[]", l_hand) : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pouches</A>
<HR>
<B><FONT size=3>[name]</FONT></B>
<HR>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=[slot_l_hand]'> [l_hand ? l_hand : "Nothing"]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=[slot_r_hand]'> [r_hand ? r_hand : "Nothing"]</A>
<BR><A href='?src=\ref[src];pouches=1'>Empty Pouches</A>"}
if(handcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_handcuffed]'>Handcuffed</A>"
if(legcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
dat += {"
<BR>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[name];size=340x480"))
"}
user << browse(dat, "window=mob[name];size=325x500")
onclose(user, "mob[name]")
return
/mob/living/carbon/alien/humanoid/Topic(href, href_list)
..()
//strip panel
if(!usr.stat && usr.canmove && !usr.restrained() && in_range(src, usr))
if(href_list["pouches"])
visible_message("<span class='danger'>[usr] tries to empty [src]'s pouches.</span>", \
"<span class='userdanger'>[usr] tries to empty [src]'s pouches.</span>")
if(do_mob(usr, src, STRIP_DELAY * 0.5))
u_equip(r_store)
u_equip(l_store)

View File

@@ -1,55 +1,53 @@
//unequip
/mob/living/carbon/alien/humanoid/u_equip(obj/item/W as obj)
if (W == wear_suit)
wear_suit = null
update_inv_wear_suit(0)
else if (W == head)
head = null
update_inv_head(0)
else if (W == r_store)
r_store = null
update_inv_pockets(0)
else if (W == l_store)
l_store = null
update_inv_pockets(0)
else if (W == r_hand)
/mob/living/carbon/alien/humanoid/u_equip(obj/item/I)
if(!I) return 0
if(I == r_hand)
r_hand = null
update_inv_r_hand(0)
else if (W == l_hand)
else if(I == l_hand)
l_hand = null
update_inv_l_hand(0)
else if(I == r_store)
r_store = null
update_inv_pockets(0)
else if(I == l_store)
l_store = null
update_inv_pockets(0)
if(I)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
//yaaaaaaay snowflakes
/mob/living/carbon/alien/humanoid/attack_ui(slot_id)
var/obj/item/W = get_active_hand()
if(W)
if(!istype(W)) return 0
var/obj/item/I = get_active_hand()
if(!I) return 0
if(I.w_class > 3) return 0
if(I == l_hand)
l_hand = null
else if(I == r_hand)
r_hand = null
switch(slot_id)
// if("o_clothing")
// if("head")
if(slot_l_store)
if(l_store)
return
if(W.w_class > 3)
return
u_equip(W)
l_store = W
return 0
l_store = I
update_inv_pockets()
if(slot_r_store)
if(r_store)
return
if(W.w_class > 3)
return
u_equip(W)
r_store = W
return 0
r_store = I
update_inv_pockets()
else
switch(slot_id)
if(slot_wear_suit)
if(wear_suit) wear_suit.attack_alien(src)
if(slot_head)
if(head) head.attack_alien(src)
if(slot_l_store)
if(l_store) l_store.attack_alien(src)
if(slot_r_store)
if(r_store) r_store.attack_alien(src)
I.loc = src
I.equipped(src, slot_id)
I.layer = 20
return 1

View File

@@ -1,9 +1,7 @@
//Xeno Overlays Indexes//////////
#define X_HEAD_LAYER 1
#define X_SUIT_LAYER 2
#define X_L_HAND_LAYER 3
#define X_R_HAND_LAYER 4
#define X_TOTAL_LAYERS 4
#define X_L_HAND_LAYER 1
#define X_R_HAND_LAYER 2
#define X_TOTAL_LAYERS 2
/////////////////////////////////
/mob/living/carbon/alien/humanoid
@@ -41,8 +39,6 @@
..()
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)
@@ -51,91 +47,46 @@
/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
if(client)
client.screen |= contents
/mob/living/carbon/alien/humanoid/update_inv_pockets(update_icons = 1)
if(l_store)
l_store.screen_loc = ui_alien_storage_l
if(r_store)
r_store.screen_loc = ui_alien_storage_r
/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" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]2")
var/image/standing = image("icon" = 'icons/mob/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" = 'icons/effects/blood.dmi', "icon_state" = "[t_suit]blood2")
standing.overlays += image("icon" = 'icons/effects/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))
drop_from_inventory(handcuffed)
drop_r_hand()
drop_l_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()
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" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]2")
var/image/standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]")
if(head.blood_DNA)
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood2")
standing.overlays += image("icon" = 'icons/effects/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)
/mob/living/carbon/alien/humanoid/update_inv_r_hand(update_icons = 1)
if(r_hand)
var/t_state = r_hand.item_state
if(!t_state) t_state = r_hand.icon_state
if(!t_state)
t_state = r_hand.icon_state
r_hand.screen_loc = ui_rhand
overlays_standing[X_R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = t_state)
else
overlays_standing[X_R_HAND_LAYER] = null
if(update_icons) update_icons()
if(update_icons)
update_icons()
/mob/living/carbon/alien/humanoid/update_inv_l_hand(var/update_icons=1)
/mob/living/carbon/alien/humanoid/update_inv_l_hand(update_icons = 1)
if(l_hand)
var/t_state = l_hand.item_state
if(!t_state) t_state = l_hand.icon_state
if(!t_state)
t_state = l_hand.icon_state
l_hand.screen_loc = ui_lhand
overlays_standing[X_L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = t_state)
else
overlays_standing[X_L_HAND_LAYER] = null
if(update_icons) update_icons()
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 X_TOTAL_LAYERS

View File

@@ -243,23 +243,7 @@
switch(M.a_intent)
if ("help")
if (health > 0)
help_shake_act(M)
else
if (M.health >= -75.0)
if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) )
M << "\blue <B>Remove that mask!</B>"
return
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn( 0 )
O.process()
return
if ("grab")
if (M == src)
@@ -352,18 +336,10 @@
// now constructs damage icon for each organ from mask * damage field
/mob/living/carbon/alien/larva/show_inv(mob/user as mob)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR><BR>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[name];size=340x480"))
onclose(user, "mob[name]")
/mob/living/carbon/alien/larva/show_inv(mob/user)
return
/* Commented out because it's duplicated in life.dm
/mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough -- TLE
if(icon_state == "larva_l" && !canmove) // This is a shit death check. It is made of shit and death. Fix later.

View File

@@ -177,20 +177,21 @@
if(SKELETON in H.mutations && !H.w_uniform && !H.wear_suit)
H.play_xylophone()
else
if(istype(src, /mob/living/carbon/human) && src:w_uniform)
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.wear_suit)
H.wear_suit.add_fingerprint(M)
else if(H.w_uniform)
H.w_uniform.add_fingerprint(M)
if(lying)
sleeping = max(0, sleeping - 5)
if(sleeping == 0)
resting = 0
M.visible_message( \
"<span class='notice'>[M] shakes [src] trying to get \him up!</span>", \
M.visible_message("<span class='notice'>[M] shakes [src] trying to get \him up!</span>", \
"<span class='notice'>You shake [src] trying to get \him up!</span>")
else
M.visible_message( \
"<span class='notice'>[M] hugs [src] to make \him feel better!</span>", \
M.visible_message("<span class='notice'>[M] hugs [src] to make \him feel better!</span>", \
"<span class='notice'>You hug [src] to make \him feel better!</span>")
AdjustParalysis(-3)
@@ -415,27 +416,37 @@
return 1
return
/mob/living/carbon/u_equip(obj/item/W as obj)
if(!W) return 0
else if(W == back)
/mob/living/carbon/u_equip(obj/item/I)
if(!I) return 0
if(I == r_hand)
r_hand = null
update_inv_r_hand(0)
else if(I == l_hand)
l_hand = null
update_inv_l_hand(0)
if(I == back)
back = null
update_inv_back(0)
else if(W == wear_mask)
else if(I == wear_mask)
wear_mask = null
update_inv_wear_mask(0)
else if(W == handcuffed)
else if(I == handcuffed)
handcuffed = null
update_inv_handcuffed(0)
else if(W == legcuffed)
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed(0)
else
..()
if(I)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
/mob/living/carbon/proc/get_temperature(var/datum/gas_mixture/environment)
var/loc_temp = T0C
@@ -464,24 +475,53 @@
return loc_temp
/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
/mob/living/carbon/show_inv(mob/user)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<HR>
<B><FONT size=3>[name]</FONT></B>
<HR>
<BR><B>Mask:</B> <A href='?src=\ref[src];item=[slot_wear_mask]'> [wear_mask ? wear_mask : "Nothing"]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=[slot_l_hand]'> [l_hand ? l_hand : "Nothing"]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=[slot_r_hand]'> [r_hand ? r_hand : "Nothing"]</A>"}
dat += "<BR><B>Back:</B> <A href='?src=\ref[src];item=[slot_back]'> [back ? back : "Nothing"]</A>"
if(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank))
dat += "<BR><A href='?src=\ref[src];internal=1'>[internal ? "Disable Internals" : "Set Internals"]</A>"
if(handcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_handcuffed]'>Handcuffed</A>"
if(legcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
dat += {"
<BR>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[];size=325x500", name))
"}
user << browse(dat, "window=mob[name];size=325x500")
onclose(user, "mob[name]")
return
/mob/living/carbon/Topic(href, href_list)
..()
//strip panel
if(!usr.stat && usr.canmove && !usr.restrained() && in_range(src, usr))
if(href_list["internal"])
if(back && istype(back, /obj/item/weapon/tank) && wear_mask && (wear_mask.flags & MASKINTERNALS))
visible_message("<span class='danger'>[usr] tries to [internal ? "disable" : "set"] [src]'s internals.</span>", \
"<span class='userdanger'>[usr] tries to [internal ? "disable" : "set"] [src]'s internals.</span>")
if(do_mob(usr, src, STRIP_DELAY))
if(internal)
internal = null
if(internals)
internals.icon_state = "internal0"
else if(back && istype(back, /obj/item/weapon/tank) && wear_mask && (wear_mask.flags & MASKINTERNALS))
internal = back
if(internals)
internals.icon_state = "internal1"
visible_message("<span class='danger'>[usr] [internal ? "sets" : "disables"] [src]'s internals.</span>", \
"<span class='userdanger'>[usr] [internal ? "sets" : "disables"] [src]'s internals.</span>")
/mob/living/carbon/attackby(obj/item/I, mob/user)

View File

@@ -11,6 +11,6 @@
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
//inventory slots
var/obj/item/weapon/back = null
var/obj/item/back = null
var/obj/item/clothing/mask/wear_mask = null
var/obj/item/weapon/tank/internal = null

View File

@@ -354,36 +354,52 @@
/mob/living/carbon/human/var/temperature_resistance = T0C+75
/mob/living/carbon/human/show_inv(mob/user as mob)
/mob/living/carbon/human/show_inv(mob/user)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><B>Gloves:</B> <A href='?src=\ref[src];item=gloves'>[(gloves ? gloves : "Nothing")]</A>
<BR><B>Eyes:</B> <A href='?src=\ref[src];item=eyes'>[(glasses ? glasses : "Nothing")]</A>
<BR><B>Ears:</B> <A href='?src=\ref[src];item=ears'>[(ears ? ears : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A>
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? wear_suit : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A>
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<HR>
<B><FONT size=3>[name]</FONT></B>
<HR>
<BR><B>Mask:</B> <A href='?src=\ref[src];item=[slot_wear_mask]'> [wear_mask ? wear_mask : "Nothing"]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=[slot_l_hand]'> [l_hand ? l_hand : "Nothing"]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=[slot_r_hand]'> [r_hand ? r_hand : "Nothing"]</A>
<BR><B>Gloves:</B> <A href='?src=\ref[src];item=[slot_gloves]'> [gloves ? gloves : "Nothing"]</A>
<BR><B>Eyes:</B> <A href='?src=\ref[src];item=[slot_glasses]'> [glasses ? glasses : "Nothing"]</A>
<BR><B>Ears:</B> <A href='?src=\ref[src];item=[slot_ears]'> [ears ? ears : "Nothing"]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=[slot_head]'> [head ? head : "Nothing"]</A>
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=[slot_shoes]'> [shoes ? shoes : "Nothing"]</A>"}
dat += "<BR><B>Uniform:</B> <A href='?src=\ref[src];item=[slot_w_uniform]'> [w_uniform ? w_uniform : "Nothing"]</A>"
if(w_uniform)
dat += "<BR><B>Belt:</B> <A href='?src=\ref[src];item=[slot_belt]'> [belt ? belt : "Nothing"]</A>"
dat += "<BR><B>Exosuit:</B> <A href='?src=\ref[src];item=[slot_wear_suit]'> [wear_suit ? wear_suit : "Nothing"]</A>"
if(wear_suit)
dat += "<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=[slot_s_store]'>[s_store ? s_store : "Nothing"]</A>"
dat += "<BR><B>Back:</B> <A href='?src=\ref[src];item=[slot_back]'> [back ? back : "Nothing"]</A>"
if(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank))
dat += "<BR><A href='?src=\ref[src];internal=1'>[internal ? "Disable Internals" : "Set Internals"]</A>"
if(w_uniform) //we checked already, but a different place.
dat += "<BR><B>ID:</B> <A href='?src=\ref[src];item=[slot_wear_id]'>[wear_id ? wear_id : "Nothing"]</A>"
if(handcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_handcuffed]'>Handcuffed</A>"
if(legcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
if(w_uniform)
dat += "<BR><A href='?src=\ref[src];pockets=1'>Empty Pockets</A>"
dat += {"
<BR>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[name];size=340x480"))
"}
user << browse(dat, "window=mob[name];size=340x480")
onclose(user, "mob[name]")
return
// called when something steps onto a human
// this could be made more general, but for now just handle mulebot
@@ -474,29 +490,17 @@
/mob/living/carbon/human/Topic(href, href_list)
if (href_list["refresh"])
if((machine)&&(in_range(src, usr)))
show_inv(machine)
..()
//strip panel
if(!usr.stat && usr.canmove && !usr.restrained() && in_range(src, usr))
if(href_list["pockets"])
visible_message("<span class='danger'>[usr] tries to empty [src]'s pockets.</span>", \
"<span class='userdanger'>[usr] tries to empty [src]'s pockets.</span>")
if(do_mob(usr, src, STRIP_DELAY * 0.5))
u_equip(r_store)
u_equip(l_store)
if (href_list["mach_close"])
var/t1 = text("window=[]", href_list["mach_close"])
unset_machine()
src << browse(null, t1)
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = usr
O.target = src
O.item = usr.get_active_hand()
O.s_loc = usr.loc
O.t_loc = loc
O.place = href_list["item"]
requests += O
spawn( 0 )
O.process()
return
if (href_list["criminal"])
if(href_list["criminal"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
@@ -543,8 +547,6 @@
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
..()
return
///eyecheck()

View File

@@ -11,8 +11,8 @@
if(health >= 0)
help_shake_act(M)
return 1
if(M.health < -75) return 0
//CPR
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))
M << "<span class='notice'>Remove your mask!</span>"
return 0
@@ -20,16 +20,17 @@
M << "<span class='notice'>Remove their mask!</span>"
return 0
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn(0)
O.process()
return 1
if(cpr_time < world.time + 30)
visible_message("<span class='notice'>[M] is trying to perform CPR on [src]!</span>")
if(!do_mob(M, src))
return 0
if((health >= -99 && health <= 0))
cpr_time = world.time
var/suff = min(getOxyLoss(), 7)
adjustOxyLoss(-suff)
updatehealth()
M.visible_message("[M] performs CPR on [src]!")
src << "<span class='unconscious'>You feel a breath of fresh air enter your lungs. It feels good.</span>"
if("grab")
if(M == src)

View File

@@ -1,14 +1,14 @@
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1)
for (var/slot in slots)
if (equip_to_slot_if_possible(W, slots[slot], del_on_fail = 0))
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/I, list/slots, del_on_fail = 1)
for(var/slot in slots)
if(equip_to_slot_if_possible(I, slots[slot], del_on_fail = 0))
return slot
if (del_on_fail)
del(W)
if(del_on_fail)
del(I)
return null
// Return the item currently in the slot ID
/mob/living/carbon/human/get_item_by_slot(var/slot_id)
// Return the item currently in the slot ID
/mob/living/carbon/human/get_item_by_slot(slot_id)
switch(slot_id)
if(slot_back)
return back
@@ -48,99 +48,100 @@
return s_store
return null
/mob/living/carbon/human/u_equip(obj/item/W as obj)
if(!W) return 0
var/success
/mob/living/carbon/human/u_equip(obj/item/I)
if(!I) return 0
if (W == wear_suit)
var/success = 0
if(I == wear_suit)
if(s_store)
u_equip(s_store)
if(W)
if(I)
success = 1
wear_suit = null
update_inv_wear_suit(0)
else if (W == w_uniform)
if (r_store)
else if(I == w_uniform)
if(r_store)
u_equip(r_store)
if (l_store)
if(l_store)
u_equip(l_store)
if (wear_id)
if(wear_id)
u_equip(wear_id)
if (belt)
if(belt)
u_equip(belt)
w_uniform = null
success = 1
update_inv_w_uniform(0)
else if (W == gloves)
else if(I == gloves)
gloves = null
success = 1
update_inv_gloves(0)
else if (W == glasses)
else if(I == glasses)
glasses = null
success = 1
update_inv_glasses(0)
else if (W == head)
else if(I == head)
head = null
if(W.flags & BLOCKHAIR)
if(I.flags & BLOCKHAIR)
update_hair(0) //rebuild hair
success = 1
update_inv_head(0)
else if (W == ears)
else if(I == ears)
ears = null
success = 1
update_inv_ears(0)
else if (W == shoes)
else if(I == shoes)
shoes = null
success = 1
update_inv_shoes(0)
else if (W == belt)
else if(I == belt)
belt = null
success = 1
update_inv_belt(0)
else if (W == wear_mask)
else if(I == wear_mask)
wear_mask = null
success = 1
if(W.flags & BLOCKHAIR)
if(I.flags & BLOCKHAIR)
update_hair(0) //rebuild hair
if(internal)
if(internals)
internals.icon_state = "internal0"
internal = null
update_inv_wear_mask(0)
else if (W == wear_id)
else if(I == wear_id)
wear_id = null
success = 1
update_inv_wear_id(0)
else if (W == r_store)
else if(I == r_store)
r_store = null
success = 1
update_inv_pockets(0)
else if (W == l_store)
else if(I == l_store)
l_store = null
success = 1
update_inv_pockets(0)
else if (W == s_store)
else if(I == s_store)
s_store = null
success = 1
update_inv_s_store(0)
else if (W == back)
else if(I == back)
back = null
success = 1
update_inv_back(0)
else if (W == handcuffed)
else if(I == handcuffed)
handcuffed = null
success = 1
update_inv_handcuffed(0)
else if (W == legcuffed)
else if(I == legcuffed)
legcuffed = null
success = 1
update_inv_legcuffed(0)
else if (W == r_hand)
else if(I == r_hand)
r_hand = null
success = 1
update_inv_r_hand(0)
else if (W == l_hand)
else if(I == l_hand)
l_hand = null
success = 1
update_inv_l_hand(0)
@@ -148,456 +149,97 @@
return 0
if(success)
if (W)
if (client)
client.screen -= W
W.loc = loc
W.dropped(src)
if(W)
W.layer = initial(W.layer)
if(I)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
update_action_buttons()
return 1
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
/mob/living/carbon/human/equip_to_slot(obj/item/I, slot, redraw_mob = 1)
if(!slot) return
if(!istype(W)) return
if(!istype(I)) return
if(W == src.l_hand)
src.l_hand = null
else if(W == src.r_hand)
src.r_hand = null
if(I == l_hand)
l_hand = null
else if(I == r_hand)
r_hand = null
W.loc = src
switch(slot)
if(slot_back)
src.back = W
W.equipped(src, slot)
back = I
update_inv_back(redraw_mob)
if(slot_wear_mask)
src.wear_mask = W
wear_mask = I
if(wear_mask.flags & BLOCKHAIR)
update_hair(redraw_mob) //rebuild hair
W.equipped(src, slot)
update_inv_wear_mask(redraw_mob)
if(slot_handcuffed)
src.handcuffed = W
handcuffed = I
update_inv_handcuffed(redraw_mob)
if(slot_legcuffed)
src.legcuffed = W
W.equipped(src, slot)
legcuffed = I
update_inv_legcuffed(redraw_mob)
if(slot_l_hand)
src.l_hand = W
W.equipped(src, slot)
l_hand = I
update_inv_l_hand(redraw_mob)
if(slot_r_hand)
src.r_hand = W
W.equipped(src, slot)
r_hand = I
update_inv_r_hand(redraw_mob)
if(slot_belt)
src.belt = W
W.equipped(src, slot)
belt = I
update_inv_belt(redraw_mob)
if(slot_wear_id)
src.wear_id = W
W.equipped(src, slot)
wear_id = I
update_inv_wear_id(redraw_mob)
if(slot_ears)
src.ears = W
W.equipped(src, slot)
ears = I
update_inv_ears(redraw_mob)
if(slot_glasses)
src.glasses = W
W.equipped(src, slot)
glasses = I
update_inv_glasses(redraw_mob)
if(slot_gloves)
src.gloves = W
W.equipped(src, slot)
gloves = I
update_inv_gloves(redraw_mob)
if(slot_head)
src.head = W
head = I
if(head.flags & BLOCKHAIR)
update_hair(redraw_mob) //rebuild hair
if(istype(W,/obj/item/clothing/head/kitty))
W.update_icon(src)
W.equipped(src, slot)
update_inv_head(redraw_mob)
if(slot_shoes)
src.shoes = W
W.equipped(src, slot)
shoes = I
update_inv_shoes(redraw_mob)
if(slot_wear_suit)
src.wear_suit = W
W.equipped(src, slot)
wear_suit = I
update_inv_wear_suit(redraw_mob)
if(slot_w_uniform)
src.w_uniform = W
W.equipped(src, slot)
w_uniform = I
update_inv_w_uniform(redraw_mob)
if(slot_l_store)
src.l_store = W
W.equipped(src, slot)
l_store = I
update_inv_pockets(redraw_mob)
if(slot_r_store)
src.r_store = W
W.equipped(src, slot)
r_store = I
update_inv_pockets(redraw_mob)
if(slot_s_store)
src.s_store = W
W.equipped(src, slot)
s_store = I
update_inv_s_store(redraw_mob)
if(slot_in_backpack)
if(src.get_active_hand() == W)
src.u_equip(W)
W.loc = src.back
else
src << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
return
W.layer = 20
return
/obj/effect/equip_e
name = "equip e"
var/mob/source = null
var/s_loc = null //source location
var/t_loc = null //target location
var/obj/item/item = null
var/place = null
/obj/effect/equip_e/human
name = "human"
var/mob/living/carbon/human/target = null
/obj/effect/equip_e/monkey
name = "monkey"
var/mob/living/carbon/monkey/target = null
/obj/effect/equip_e/process()
return
/obj/effect/equip_e/proc/done()
return
/obj/effect/equip_e/New()
if (!ticker)
del(src)
spawn(100)
del(src)
..()
return
/obj/effect/equip_e/human/process()
if (item)
item.add_fingerprint(source)
if (!item)
switch(place)
if("mask")
if (!( target.wear_mask ))
del(src)
if("l_hand")
if (!( target.l_hand ))
del(src)
if("r_hand")
if (!( target.r_hand ))
del(src)
if("suit")
if (!( target.wear_suit ))
del(src)
if("uniform")
if (!( target.w_uniform ))
del(src)
if("back")
if (!( target.back ))
del(src)
if("syringe")
return
if("pill")
return
if("fuel")
return
if("drink")
return
if("dnainjector")
return
if("handcuff")
if (!( target.handcuffed ))
del(src)
if("id")
if ((!( target.wear_id ) || !( target.w_uniform )))
del(src)
if("internal")
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
del(src)
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel")
if ((item && !( L.Find(place) )))
if(isrobot(source) && place != "handcuff")
del(src)
for(var/mob/O in viewers(target, null))
O.show_message("\red <B>[source] is trying to put \a [item] on [target]</B>", 1)
else
var/message=null
switch(place)
if("syringe")
message = "\red <B>[source] is trying to inject [target]!</B>"
if("pill")
message = "\red <B>[source] is trying to force [target] to swallow [item]!</B>"
if("drink")
message = "\red <B>[source] is trying to force [target] to swallow a gulp of [item]!</B>"
if("dnainjector")
message = "\red <B>[source] is trying to inject [target] with the [item]!</B>"
if("mask")
if(target.wear_mask && !target.wear_mask.canremove)
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
if(get_active_hand() == I)
u_equip(I)
I.loc = back
return
else
message = "\red <B>[source] is trying to take off \a [target.wear_mask] from [target]'s head!</B>"
if("l_hand")
message = "\red <B>[source] is trying to take off \a [target.l_hand] from [target]'s left hand!</B>"
if("r_hand")
message = "\red <B>[source] is trying to take off \a [target.r_hand] from [target]'s right hand!</B>"
if("gloves")
if(target.gloves && !target.gloves.canremove)
message = "\red <B>[source] fails to take off \a [target.gloves] from [target]'s hands!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.gloves] from [target]'s hands!</B>"
if("eyes")
if(target.glasses && !target.glasses.canremove)
message = "\red <B>[source] fails to take off \a [target.glasses] from [target]'s eyes!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.glasses] from [target]'s eyes!</B>"
if("ears")
if(target.ears && !target.ears.canremove)
message = "\red <B>[source] fails to take off \a [target.ears] from [target]'s ears!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.ears] from [target]'s ears!</B>"
if("head")
if(target.head && !target.head.canremove)
message = "\red <B>[source] fails to take off \a [target.head] from [target]'s head!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.head] from [target]'s head!</B>"
if("shoes")
if(target.shoes && !target.shoes.canremove)
message = "\red <B>[source] fails to take off \a [target.shoes] from [target]'s feet!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.shoes] from [target]'s feet!</B>"
if("belt")
message = "\red <B>[source] is trying to take off the [target.belt] from [target]'s belt!</B>"
if("suit")
if(target.wear_suit && !target.wear_suit.canremove)
message = "\red <B>[source] fails to take off \a [target.wear_suit] from [target]'s body!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [target.wear_suit] from [target]'s body!</B>"
if("back")
message = "\red <B>[source] is trying to take off \a [target.back] from [target]'s back!</B>"
if("handcuff")
message = "\red <B>[source] is trying to unhandcuff [target]!</B>"
if("legcuff")
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
if("uniform")
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
if(target.w_uniform && !target.w_uniform.canremove)
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
if("s_store")
message = "\red <B>[source] is trying to take off \a [target.s_store] from [target]'s suit!</B>"
if("pockets")
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
if("CPR")
if (target.cpr_time >= world.time + 3)
del(src)
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
if("id")
message = "\red <B>[source] is trying to take off [target.wear_id] from [target]'s uniform!</B>"
if("internal")
if (target.internal)
message = "\red <B>[source] is trying to remove [target]'s internals</B>"
else
message = "\red <B>[source] is trying to set on [target]'s internals.</B>"
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
spawn( HUMAN_STRIP_DELAY )
done()
return
src << "\red You are trying to equip this item to an unsupported inventory slot. Report this to a coder!"
return
/*
This proc equips stuff (or does something else) when removing stuff manually from the character window when you click and drag.
It works in conjuction with the process() above.
This proc works for humans only. Aliens stripping humans and the like will all use this proc. Stripping monkeys or somesuch will use their version of this proc.
The first if statement for "mask" and such refers to items that are already equipped and un-equipping them.
The else statement is for equipping stuff to empty slots.
!canremove refers to variable of /obj/item/clothing which either allows or disallows that item to be removed.
It can still be worn/put on as normal.
*/
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
if(!source || !target) return //Target or source no longer exist
if(source.loc != s_loc) return //source has moved
if(target.loc != t_loc) return //target has moved
if(LinkBlocked(s_loc,t_loc)) return //Use a proxi!
if(item && source.get_active_hand() != item) return //Swapped hands / removed item from the active one
if ((source.restrained() || source.stat)) return //Source restrained or unconscious / dead
var/slot_to_process
var/strip_item //this will tell us which item we will be stripping - if any.
switch(place) //here we go again...
if("mask")
slot_to_process = slot_wear_mask
if (target.wear_mask && target.wear_mask.canremove)
strip_item = target.wear_mask
if("gloves")
slot_to_process = slot_gloves
if (target.gloves && target.gloves.canremove)
strip_item = target.gloves
if("eyes")
slot_to_process = slot_glasses
if (target.glasses)
strip_item = target.glasses
if("belt")
slot_to_process = slot_belt
if (target.belt)
strip_item = target.belt
if("s_store")
slot_to_process = slot_s_store
if (target.s_store)
strip_item = target.s_store
if("head")
slot_to_process = slot_head
if (target.head && target.head.canremove)
strip_item = target.head
if("ears")
slot_to_process = slot_ears
if (target.ears)
strip_item = target.ears
if("shoes")
slot_to_process = slot_shoes
if (target.shoes && target.shoes.canremove)
strip_item = target.shoes
if("l_hand")
if (istype(target, /obj/item/clothing/suit/straight_jacket))
del(src)
slot_to_process = slot_l_hand
if (target.l_hand)
strip_item = target.l_hand
if("r_hand")
if (istype(target, /obj/item/clothing/suit/straight_jacket))
del(src)
slot_to_process = slot_r_hand
if (target.r_hand)
strip_item = target.r_hand
if("uniform")
slot_to_process = slot_w_uniform
if(target.w_uniform && target.w_uniform.canremove)
strip_item = target.w_uniform
if("suit")
slot_to_process = slot_wear_suit
if (target.wear_suit && target.wear_suit.canremove)
strip_item = target.wear_suit
if("id")
slot_to_process = slot_wear_id
if (target.wear_id)
strip_item = target.wear_id
if("back")
slot_to_process = slot_back
if (target.back)
strip_item = target.back
if("handcuff")
slot_to_process = slot_handcuffed
if (target.handcuffed)
strip_item = target.handcuffed
if("legcuff")
slot_to_process = slot_legcuffed
if (target.legcuffed)
strip_item = target.legcuffed
if("CPR")
if (target.cpr_time >= world.time + 30)
del(src)
if ((target.health >= -99.0 && target.health <= 0))
target.cpr_time = world.time
var/suff = min(target.getOxyLoss(), 7)
target.adjustOxyLoss(-suff)
target.updatehealth()
for(var/mob/O in viewers(source, null))
O.show_message("\red [source] performs CPR on [target]!", 1)
target << "\blue <b>You feel a breath of fresh air enter your lungs. It feels good.</b>"
source << "\red Repeat at least every 7 seconds."
if("dnainjector")
var/obj/item/weapon/dnainjector/S = item
if(S)
S.add_fingerprint(source)
if (!( istype(S, /obj/item/weapon/dnainjector) ))
S.inuse = 0
del(src)
S.inject(target, source)
if (S.s_time >= world.time + 30)
S.inuse = 0
del(src)
S.s_time = world.time
for(var/mob/O in viewers(source, null))
O.show_message("\red [source] injects [target] with the DNA Injector!", 1)
S.inuse = 0
if("pockets")
slot_to_process = slot_l_store
strip_item = target.l_store //We'll do both
if("internal")
if (target.internal)
target.internal.add_fingerprint(source)
target.internal = null
if (target.internals)
target.internals.icon_state = "internal0"
else
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
return
else
if (istype(target.back, /obj/item/weapon/tank))
target.internal = target.back
else if (istype(target.s_store, /obj/item/weapon/tank))
target.internal = target.s_store
else if (istype(target.belt, /obj/item/weapon/tank))
target.internal = target.belt
if (target.internal)
for(var/mob/M in viewers(target, 1))
M.show_message("[source] is now running on internals.", 1)
target.internal.add_fingerprint(source)
if (target.internals)
target.internals.icon_state = "internal1"
if(slot_to_process)
if(strip_item) //Stripping an item from the mob
target.u_equip(strip_item)
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
if(target.r_store)
target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
else
if(item) //Placing an item on the mob
if(item.mob_can_equip(target, slot_to_process, 0))
source.u_equip(item)
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 0)
if(source && target)
if(source.machine == target)
target.show_inv(source)
del(src)
I.loc = src
I.equipped(src, slot)
I.layer = 20

View File

@@ -0,0 +1,15 @@
/mob/living/carbon/get_item_by_slot(slot_id)
switch(slot_id)
if(slot_back)
return back
if(slot_wear_mask)
return wear_mask
if(slot_handcuffed)
return handcuffed
if(slot_legcuffed)
return legcuffed
if(slot_l_hand)
return l_hand
if(slot_r_hand)
return r_hand
return null

View File

@@ -591,18 +591,10 @@ mob/living/carbon/slime/var/co2overloadtime = null
mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/slime/show_inv(mob/user as mob)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR><BR>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[name];size=340x480"))
onclose(user, "mob[name]")
/mob/living/carbon/slime/show_inv(mob/user)
return
/mob/living/carbon/slime/updatehealth()
if(status_flags & GODMODE)
if(istype(src, /mob/living/carbon/slime/adult))

View File

@@ -57,7 +57,7 @@
using = new /obj/screen()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_1"
using.icon_state = "swap_1_m" //extra wide!
using.screen_loc = ui_swaphand1
using.layer = 19
adding += using

View File

@@ -1,232 +1,47 @@
/obj/effect/equip_e/monkey/process()
if (item)
item.add_fingerprint(source)
if (!( item ))
switch(place)
if("head")
if (!( target.wear_mask ))
del(src)
return
if("l_hand")
if (!( target.l_hand ))
del(src)
return
if("r_hand")
if (!( target.r_hand ))
del(src)
return
if("back")
if (!( target.back ))
del(src)
return
if("handcuff")
if (!( target.handcuffed ))
del(src)
return
if("internal")
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
del(src)
return
if (item)
if(isrobot(source) && place != "handcuff")
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel")
if(!(L.Find(place)))
del(src)
return
for(var/mob/O in viewers(target, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] is trying to put a [] on []</B>", source, item, target), 1)
else
var/message = null
switch(place)
if("mask")
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
if("l_hand")
message = text("\red <B>[] is trying to take off a [] from []'s left hand!</B>", source, target.l_hand, target)
if("r_hand")
message = text("\red <B>[] is trying to take off a [] from []'s right hand!</B>", source, target.r_hand, target)
if("back")
message = text("\red <B>[] is trying to take off a [] from []'s back!</B>", source, target.back, target)
if("handcuff")
message = text("\red <B>[] is trying to unhandcuff []!</B>", source, target)
if("internal")
if (target.internal)
message = text("\red <B>[] is trying to remove []'s internals</B>", source, target)
else
message = text("\red <B>[] is trying to set on []'s internals.</B>", source, target)
else
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
spawn( 30 )
done()
return
return
/obj/effect/equip_e/monkey/done()
if(!source || !target) return
if(source.loc != s_loc) return
if(target.loc != t_loc) return
if(LinkBlocked(s_loc,t_loc)) return
if(item && source.get_active_hand() != item) return
if ((source.restrained() || source.stat)) return
switch(place)
if("mask")
if (target.wear_mask)
if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove)
return
var/obj/item/W = target.wear_mask
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(source)
else
if (istype(item, /obj/item/clothing/mask))
source.drop_item()
loc = target
item.layer = 20
target.wear_mask = item
item.loc = target
if("l_hand")
if (target.l_hand)
var/obj/item/W = target.l_hand
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
source.drop_item()
loc = target
item.layer = 20
target.l_hand = item
item.loc = target
if("r_hand")
if (target.r_hand)
var/obj/item/W = target.r_hand
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
source.drop_item()
loc = target
item.layer = 20
target.r_hand = item
item.loc = target
if("back")
if (target.back)
var/obj/item/W = target.back
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(source)
else
if ((istype(item, /obj/item) && item.slot_flags & SLOT_BACK ))
source.drop_item()
loc = target
item.layer = 20
target.back = item
item.loc = target
if("handcuff")
if (target.handcuffed)
var/obj/item/W = target.handcuffed
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.add_fingerprint(source)
else
if (istype(item, /obj/item/weapon/handcuffs))
source.drop_item()
target.handcuffed = item
item.loc = target
if("internal")
if (target.internal)
target.internal.add_fingerprint(source)
target.internal = null
else
if (target.internal)
target.internal = null
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
return
else
if (istype(target.back, /obj/item/weapon/tank))
target.internal = target.back
target.internal.add_fingerprint(source)
for(var/mob/M in viewers(target, 1))
if ((M.client && !( M.blinded )))
M.show_message(text("[] is now running on internals.", target), 1)
else
source.regenerate_icons()
target.regenerate_icons()
del(src)
return
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
/mob/living/carbon/monkey/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
/mob/living/carbon/monkey/equip_to_slot(obj/item/I, slot, redraw_mob = 1)
if(!slot) return
if(!istype(W)) return
if(!istype(I)) return
if(W == get_active_hand())
u_equip(W)
if(I == l_hand)
l_hand = null
else if(I == r_hand)
r_hand = null
switch(slot)
if(slot_back)
src.back = W
W.equipped(src, slot)
back = I
I.equipped(src, slot)
update_inv_back(redraw_mob)
if(slot_wear_mask)
src.wear_mask = W
W.equipped(src, slot)
wear_mask = I
I.equipped(src, slot)
update_inv_wear_mask(redraw_mob)
if(slot_handcuffed)
src.handcuffed = W
handcuffed = I
update_inv_handcuffed(redraw_mob)
if(slot_legcuffed)
src.legcuffed = W
W.equipped(src, slot)
legcuffed = I
I.equipped(src, slot)
update_inv_legcuffed(redraw_mob)
if(slot_l_hand)
src.l_hand = W
W.equipped(src, slot)
l_hand = I
I.equipped(src, slot)
update_inv_l_hand(redraw_mob)
if(slot_r_hand)
src.r_hand = W
W.equipped(src, slot)
r_hand = I
I.equipped(src, slot)
update_inv_r_hand(redraw_mob)
if(slot_in_backpack)
W.loc = src.back
if(I == get_active_hand())
u_equip(I)
I.loc = back
return
else
usr << "\red You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
usr << "\red You are trying to equip this item to an unsupported inventory slot. Report this to a coder."
return
W.layer = 20
return
I.loc = src
I.equipped(src, slot)
I.layer = 20

View File

@@ -9,8 +9,6 @@
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
/mob/living/carbon/monkey/New()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
@@ -93,26 +91,6 @@
return
return
/mob/living/carbon/monkey/Topic(href, href_list)
..()
if (href_list["mach_close"])
var/t1 = text("window=[]", href_list["mach_close"])
unset_machine()
src << browse(null, t1)
if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && in_range(src, usr) ))
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
O.source = usr
O.target = src
O.item = usr.get_active_hand()
O.s_loc = usr.loc
O.t_loc = loc
O.place = href_list["item"]
requests += O
spawn( 0 )
O.process()
return
..()
return
/mob/living/carbon/monkey/meteorhit(obj/O as obj)
for(var/mob/M in viewers(src, null))
@@ -408,10 +386,6 @@
/mob/living/carbon/monkey/var/co2overloadtime = null
/mob/living/carbon/monkey/var/temperature_resistance = T0C+75
/mob/living/carbon/monkey/emp_act(severity)
if(wear_id) wear_id.emp_act(severity)
..()
/mob/living/carbon/monkey/ex_act(severity)
if(!blinded)
flick("flash", flash)

View File

@@ -69,8 +69,6 @@ var/list/ai_list = list()
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
proc_holder_list = new()
if(L)
if (istype(L, /datum/ai_laws))
laws = L

View File

@@ -95,10 +95,6 @@
else
stat(null, text("Systems nonfunctional"))
if (proc_holder_list.len)//Generic list for proc_holder objects.
for(var/obj/effect/proc_holder/P in proc_holder_list)
statpanel("[P.panel]","",P)
/mob/living/silicon/pai/check_eye(var/mob/user as mob)
if (!src.current)
return null

View File

@@ -117,19 +117,17 @@
/*
* Inventory
*/
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
/mob/living/simple_animal/parrot/show_inv(mob/user)
user.set_machine(src)
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(ears)
dat += "<br><b>Headset:</b> [ears] (<a href='?src=\ref[src];remove_inv=ears'>Remove</a>)"
else
dat += "<br><b>Headset:</b> <a href='?src=\ref[src];add_inv=ears'>Nothing</a>"
user << browse(dat, text("window=mob[];size=325x500", name))
user << browse(dat, "window=mob[real_name];size=325x500")
onclose(user, "mob[real_name]")
return
/mob/living/simple_animal/parrot/Topic(href, href_list)

View File

@@ -102,7 +102,46 @@ var/next_mob_id = 0
// organStructure.ProcessOrgans()
return
/mob/proc/get_item_by_slot(var/slot_id)
/mob/proc/get_item_by_slot(slot_id)
switch(slot_id)
if(slot_l_hand)
return l_hand
if(slot_r_hand)
return r_hand
return null
/mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag)
if ((!( istype(l_hand, /obj/item/weapon/grab) ) && !( istype(r_hand, /obj/item/weapon/grab) )))
if (!( L ))
return null
else
return L.container
else
if (!( L ))
L = new /obj/effect/list_container/mobl( null )
L.container += src
L.master = src
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if (!( L.container.Find(G.affecting) ))
L.container += G.affecting
if (G.affecting)
G.affecting.ret_grab(L, 1)
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = r_hand
if (!( L.container.Find(G.affecting) ))
L.container += G.affecting
if (G.affecting)
G.affecting.ret_grab(L, 1)
if (!( flag ))
if (L.master == src)
var/list/temp = list( )
temp += L.container
//L = null
del(L)
return temp
else
return L.container
return
/mob/proc/restrained()
@@ -200,54 +239,19 @@ var/list/slot_equipment_priority = list( \
return
/mob/proc/show_inv(mob/user as mob)
/mob/proc/show_inv(mob/user)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<HR>
<B><FONT size=3>[name]</FONT></B>
<HR>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=[slot_l_hand]'> [l_hand ? l_hand : "Nothing"]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=[slot_r_hand]'> [r_hand ? r_hand : "Nothing"]</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[];size=325x500", name))
"}
user << browse(dat, "window=mob[name];size=325x500")
onclose(user, "mob[name]")
return
/mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag)
if ((!( istype(l_hand, /obj/item/weapon/grab) ) && !( istype(r_hand, /obj/item/weapon/grab) )))
if (!( L ))
return null
else
return L.container
else
if (!( L ))
L = new /obj/effect/list_container/mobl( null )
L.container += src
L.master = src
if (istype(l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = l_hand
if (!( L.container.Find(G.affecting) ))
L.container += G.affecting
if (G.affecting)
G.affecting.ret_grab(L, 1)
if (istype(r_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = r_hand
if (!( L.container.Find(G.affecting) ))
L.container += G.affecting
if (G.affecting)
G.affecting.ret_grab(L, 1)
if (!( flag ))
if (L.master == src)
var/list/temp = list( )
temp += L.container
//L = null
del(L)
return temp
else
return L.container
return
/mob/verb/mode()
set name = "Activate Held Object"
@@ -477,17 +481,43 @@ var/list/slot_equipment_priority = list( \
var/t1 = text("window=[href_list["mach_close"]]")
unset_machine()
src << browse(null, t1)
// ..()
return
if(href_list["refresh"])
if(machine && in_range(src, usr))
show_inv(machine)
if(!usr.stat && usr.canmove && !usr.restrained() && in_range(src, usr))
if(href_list["item"])
var/slot = text2num(href_list["item"])
var/obj/item/what = get_item_by_slot(slot)
if(what && what.canremove)
visible_message("<span class='danger'>[usr] tries to remove [src]'s [what.name].</span>", \
"<span class='userdanger'>[usr] tries to remove [src]'s [what.name].</span>")
what.add_fingerprint(usr)
if(do_mob(usr, src, STRIP_DELAY))
if(what)
u_equip(what)
else
what = usr.get_active_hand()
if(what && what.mob_can_equip(src, slot, 1))
visible_message("<span class='notice'>[usr] tries to put [what] on [src].</span>")
if(do_mob(usr, src, STRIP_DELAY * 0.5))
if(what)
usr.u_equip(what)
equip_to_slot_if_possible(what, slot, 0, 1)
if(usr.machine == src && in_range(src, usr))
show_inv(usr)
/mob/MouseDrop(mob/M as mob)
/mob/MouseDrop(mob/M)
..()
if(M != usr) return
if(usr == src) return
if(get_dist(usr,src) > 1) return
if(istype(M,/mob/living/silicon/ai)) return
if(LinkBlocked(usr.loc,loc)) return
if(!in_range(usr, src)) return
if(istype(M, /mob/living/silicon/ai)) return
if(LinkBlocked(usr.loc, loc)) return
show_inv(usr)

View File

@@ -7,9 +7,6 @@
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
//Not in use yet
var/obj/effect/organstructure/organStructure = null
var/obj/screen/flash = null
var/obj/screen/blind = null
var/obj/screen/hands = null
@@ -51,7 +48,6 @@
var/next_move = null
var/prev_move = null
var/monkeyizing = null //Carbon
var/other = 0.0
var/hand = null
var/eye_blind = null //Carbon
var/eye_blurry = null //Carbon
@@ -143,25 +139,11 @@
var/faction = "neutral" //Used for checking whether hostile simple animals will attack you, possibly more stuff later
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
var/proc_holder_list[] = list()//Right now unused.
//Also unlike the spell list, this would only store the object in contents, not an object in itself.
/* Add this line to whatever stat module you need in order to use the proc holder list.
Unlike the object spell system, it's also possible to attach verb procs from these objects to right-click menus.
This requires creating a verb for the object proc holder.
if (proc_holder_list.len)//Generic list for proc_holder objects.
for(var/obj/effect/proc_holder/P in proc_holder_list)
statpanel("[P.panel]","",P)
*/
//The last mob/living/carbon to push/drag/grab this mob (mostly used by slimes friend recognition)
var/mob/living/carbon/LAssailant = null
//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button
var/obj/effect/proc_holder/spell/list/spell_list = list()
var/list/obj/effect/proc_holder/spell/spell_list = list()
//Changlings, but can be used in other modes
// var/obj/effect/proc_holder/changpower/list/power_list = list()

View File

@@ -208,7 +208,7 @@
if(!mob)
return 0
if(mob.monkeyizing)
return 0//This is sota the goto stop mobs from moving var
return 0 //This is sota the goto stop mobs from moving var
if(mob.control_object)
return Move_object(direct)
if(isobserver(mob))
@@ -223,7 +223,7 @@
return AIMove(n,direct,mob)
if(isliving(mob))
var/mob/living/L = mob
if(L.incorporeal_move)//Move though walls
if(L.incorporeal_move) //Move though walls
Process_Incorpmove(direct)
return 0
@@ -243,13 +243,13 @@
return 0
if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved
if(isobj(mob.loc) || ismob(mob.loc)) //Inside an object, tell it we moved
var/atom/O = mob.loc
return O.relaymove(mob, direct)
if(isturf(mob.loc))
if(mob.restrained())//Why being pulled while cuffed prevents you from moving
if(mob.restrained()) //Why being pulled while cuffed prevents you from moving
for(var/mob/M in range(mob, 1))
if(M.pulling == mob && !M.restrained() && M.stat == 0 && M.canmove)
src << "\blue You're restrained! You can't move!"
@@ -261,19 +261,16 @@
if("run")
if(mob.drowsyness > 0)
move_delay += 6
move_delay += 1+config.run_speed
move_delay += 1 + config.run_speed
if("walk")
move_delay += 7+config.walk_speed
move_delay += 7 + config.walk_speed
move_delay += mob.movement_delay()
if(config.Tickcomp)
move_delay -= 1.3
var/tickcomp = ((1/(world.tick_lag))*1.3)
var/tickcomp = (1 / (world.tick_lag)) * 1.3
move_delay = move_delay + tickcomp
//We are now going to move
moving = 1
//Something with pulling things
@@ -309,7 +306,7 @@
M.animate_movement = 2
return
else if(mob.confused)
if(mob.confused && IsEven(world.time))
step(mob, pick(cardinal))
else
. = ..()
@@ -318,8 +315,6 @@
return .
return
///Process_Grab()
///Called by client/Move()

View File

@@ -47,6 +47,7 @@ h1.alert, h2.alert {color: #000000;}
.rose {color: #ff5050;}
.info {color: #0000CC;}
.notice {color: #000099;}
.unconscious {color: #0000FF; font-weight: bold;}
.alien {color: #543354;}
.newscaster {color: #800000;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -802,6 +802,7 @@
#include "code\modules\mob\living\blob\blob.dm"
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\inventory.dm"
#include "code\modules\mob\living\carbon\alien\alien.dm"
#include "code\modules\mob\living\carbon\alien\death.dm"
#include "code\modules\mob\living\carbon\alien\login.dm"