mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
ugh...this was horrible. I'm really sorry if I fucked anything up, I was literally going braindead towards the end.
Replaced every l_hand = and r_hand = and all that if(hand) crap to use standardised procs. This means we can use procs like Dropped() reliably as they will always be called when things are dropped. Thorough documentation to come. But generally, if you want a mob's icons to update after deleting something in the inventory...use drop_from_inventory(the_thing_you_wanna_drop) just before deleting it. If you wanna put something in a mob's hands use put_in_hands() (or one of the variants). It'll try putting it in active hand first, then inactive, then the floor. They handle layers, overlays, screenlocs calling various procs such as dropped() etc for you. Easy mob.equipped() is now mob.get_active_hand() because there was another totally unrelated proc named equipped() and stuff was confusing. Weakening was made instantaneous. Minor optimisations for human/handle_regular_status_updates(). I'll port these changes over to the other mobs next. Basically it should stop it constantly incrementing every status effect even after death. umm... bunch of overlays related fixes... I think that's everything. :/ git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3900 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -60,21 +60,21 @@ STI KALY - blind
|
||||
if(prob(chance))
|
||||
if(!istype(H.head, /obj/item/clothing/head/wizard))
|
||||
if(H.head)
|
||||
H.drop_from_slot(H.head)
|
||||
H.drop_from_inventory(H.head)
|
||||
H.head = new /obj/item/clothing/head/wizard(H)
|
||||
H.head.layer = 20
|
||||
return
|
||||
if(prob(chance))
|
||||
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe))
|
||||
if(H.wear_suit)
|
||||
H.drop_from_slot(H.wear_suit)
|
||||
H.drop_from_inventory(H.wear_suit)
|
||||
H.wear_suit = new /obj/item/clothing/suit/wizrobe(H)
|
||||
H.wear_suit.layer = 20
|
||||
return
|
||||
if(prob(chance))
|
||||
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
|
||||
if(H.shoes)
|
||||
H.drop_from_slot(H.shoes)
|
||||
H.drop_from_inventory(H.shoes)
|
||||
H.shoes = new /obj/item/clothing/shoes/sandal(H)
|
||||
H.shoes.layer = 20
|
||||
return
|
||||
@@ -82,10 +82,8 @@ STI KALY - blind
|
||||
var/mob/living/carbon/H = affected_mob
|
||||
if(prob(chance))
|
||||
if(!istype(H.r_hand, /obj/item/weapon/staff))
|
||||
if(H.r_hand)
|
||||
H.drop_from_slot(H.r_hand)
|
||||
H.r_hand = new /obj/item/weapon/staff(H)
|
||||
H.r_hand.layer = 20
|
||||
H.drop_r_hand()
|
||||
H.put_in_r_hand( new /obj/item/weapon/staff(H) )
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
+2
-2
@@ -794,7 +794,7 @@ datum/mind
|
||||
switch(href_list["common"])
|
||||
if("undress")
|
||||
for(var/obj/item/W in current)
|
||||
current.drop_from_slot(W)
|
||||
current.drop_from_inventory(W)
|
||||
if("takeuplink")
|
||||
take_uplink()
|
||||
memory = null//Remove any memory they may have had.
|
||||
@@ -807,7 +807,7 @@ datum/mind
|
||||
crystals = suplink.uses
|
||||
else if (iuplink)
|
||||
crystals = iuplink.uses
|
||||
crystals = input("Amount of telecrystals for [key]","Sindicate uplink", crystals) as null|num
|
||||
crystals = input("Amount of telecrystals for [key]","Syndicate uplink", crystals) as null|num
|
||||
if (!isnull(crystals))
|
||||
if (suplink)
|
||||
suplink.uses = crystals
|
||||
|
||||
+4
-4
@@ -1348,19 +1348,19 @@
|
||||
amount--
|
||||
new/obj/item/stack/sheet/glass(user.loc)
|
||||
if(amount <= 0)
|
||||
user.u_equip(src)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
if(istype(O,/obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = O
|
||||
M.amount--
|
||||
if(M.amount <= 0)
|
||||
user.u_equip(M)
|
||||
user.drop_from_inventory(M)
|
||||
del(M)
|
||||
amount--
|
||||
new/obj/item/stack/tile/light(user.loc)
|
||||
if(amount <= 0)
|
||||
user.u_equip(src)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
/obj/item/stack/tile/light
|
||||
@@ -1396,7 +1396,7 @@
|
||||
amount--
|
||||
new/obj/item/stack/light_w(user.loc)
|
||||
if(amount <= 0)
|
||||
user.u_equip(src)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
/obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
@@ -1065,7 +1065,7 @@
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/corncob/W = new /obj/item/weapon/corncob( M )
|
||||
M << "<span class='notice'>You chew on the corn, leaving nothing behind but a cob.</span>"
|
||||
M.put_in_hand(W)
|
||||
M.put_in_hands(W)
|
||||
W.add_fingerprint(M)
|
||||
New()
|
||||
..()
|
||||
@@ -1364,7 +1364,7 @@
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/bananapeel/W = new /obj/item/weapon/bananapeel( M )
|
||||
M << "<span class='notice'>You peel the banana.</span>"
|
||||
M.put_in_hand(W)
|
||||
M.put_in_hands(W)
|
||||
W.add_fingerprint(M)
|
||||
New()
|
||||
..()
|
||||
@@ -1452,7 +1452,6 @@
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
new /obj/effect/critter/killertomato(user.loc)
|
||||
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the killer-tomato.</span>"
|
||||
@@ -1629,7 +1628,6 @@
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
new /obj/effect/critter/walkingmushroom(user.loc)
|
||||
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the walking mushroom.</span>"
|
||||
@@ -1673,7 +1671,6 @@
|
||||
planted.endurance = endurance
|
||||
planted.yield = yield
|
||||
planted.potency = potency
|
||||
|
||||
del(src)
|
||||
|
||||
user << "<span class='notice'>You plant the glowshroom.</span>"
|
||||
|
||||
+2
-10
@@ -366,16 +366,8 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(amount)
|
||||
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
|
||||
if(amount>0)
|
||||
user.put_in_active_hand( new /obj/item/toy/snappop(src) )
|
||||
user << "You take a snap pop out of the box."
|
||||
amount--
|
||||
else
|
||||
|
||||
@@ -1278,10 +1278,10 @@ proc/listclearnulls(list/list)
|
||||
if(!user || !target) return 0
|
||||
var/user_loc = user.loc
|
||||
var/target_loc = target.loc
|
||||
var/holding = user.equipped()
|
||||
var/holding = user.get_active_hand()
|
||||
sleep(time)
|
||||
if(!user || !target) return 0
|
||||
if ( user.loc == user_loc && target.loc == target_loc && user.equipped() == holding && !( user.stat ) && ( !user.stunned && !user.weakened && !user.paralysis && !user.lying ) )
|
||||
if ( user.loc == user_loc && target.loc == target_loc && user.get_active_hand() == holding && !( user.stat ) && ( !user.stunned && !user.weakened && !user.paralysis && !user.lying ) )
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -1290,10 +1290,10 @@ proc/listclearnulls(list/list)
|
||||
if(!M)
|
||||
return 0
|
||||
var/turf/T = M.loc
|
||||
var/holding = M.equipped()
|
||||
var/holding = M.get_active_hand()
|
||||
for(var/i=0, i<time)
|
||||
if(M)
|
||||
if ((M.loc == T && M.equipped() == holding && !( M.stat )))
|
||||
if ((M.loc == T && M.get_active_hand() == holding && !( M.stat )))
|
||||
i++
|
||||
sleep(1)
|
||||
else
|
||||
@@ -1309,12 +1309,12 @@ proc/listclearnulls(list/list)
|
||||
|
||||
var/delayfraction = round(delay/numticks)
|
||||
var/turf/T = user.loc
|
||||
var/holding = user.equipped()
|
||||
var/holding = user.get_active_hand()
|
||||
|
||||
for(var/i = 0, i<numticks, i++)
|
||||
sleep(delayfraction)
|
||||
|
||||
if(needhand && !(user.equipped() == holding)) //Sometimes you don't want the user to have to keep their active hand
|
||||
if(needhand && !(user.get_active_hand() == holding)) //Sometimes you don't want the user to have to keep their active hand
|
||||
return 0
|
||||
if(!user || user.stat || user.weakened || user.stunned || !(user.loc == T))
|
||||
return 0
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
var/turf/T = user.loc
|
||||
user << text("\blue []ing the access hatch... (this is a long process)", (locked) ? "Open" : "Clos")
|
||||
sleep(100)
|
||||
if ((user.loc == T && user.equipped() == W && !( user.stat )))
|
||||
if ((user.loc == T && user.get_active_hand() == W && !( user.stat )))
|
||||
src.locked ^= 1
|
||||
user << text("\blue The access hatch is now [].", (locked) ? "closed" : "open")
|
||||
|
||||
|
||||
@@ -419,7 +419,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
return
|
||||
|
||||
//Gets equipped item or used module of robots
|
||||
var/obj/item/W = usr.equipped()
|
||||
var/obj/item/W = usr.get_active_hand()
|
||||
|
||||
//Attack self
|
||||
if (W == src && usr.stat == 0)
|
||||
@@ -751,7 +751,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
return usr:throw_item(src)
|
||||
|
||||
// ------- ITEM IN HAND DEFINED -------
|
||||
var/obj/item/W = usr.equipped()
|
||||
var/obj/item/W = usr.get_active_hand()
|
||||
|
||||
// ------- ROBOT -------
|
||||
if(istype(usr, /mob/living/silicon/robot))
|
||||
@@ -1035,7 +1035,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
/* // NOT UNTIL I FIGURE OUT A GOOD WAY TO DO THIS SHIT
|
||||
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
if(!istype(src, /obj/item) && !istype(src, /mob) && !istype(src, /turf))
|
||||
if(!usr.equipped())
|
||||
if(!usr.get_active_hand())
|
||||
|
||||
var/liftable = 0
|
||||
for(var/x in liftable_structures)
|
||||
@@ -1048,11 +1048,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
add_fingerprint(usr)
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(usr)
|
||||
G.assailant = usr
|
||||
if (usr.hand)
|
||||
usr.l_hand = G
|
||||
else
|
||||
usr.r_hand = G
|
||||
G.layer = 20
|
||||
usr.put_in_active_hand(G)
|
||||
G.structure = src
|
||||
G.synch()
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/smokebomb/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (user.equipped() == src)
|
||||
if (user.get_active_hand() == src)
|
||||
if (!( src.state ))
|
||||
user << "\red You prime the smoke bomb! [det_time/10] seconds!"
|
||||
src.state = 1
|
||||
@@ -126,7 +126,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/mustardbomb/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (user.equipped() == src)
|
||||
if (user.get_active_hand() == src)
|
||||
if (!( src.state ))
|
||||
user << "\red You prime the mustard gas bomb! [det_time/10] seconds!"
|
||||
src.state = 1
|
||||
@@ -232,7 +232,7 @@
|
||||
//Foreach goto(46)
|
||||
t += W.w_class
|
||||
if (t > 30)
|
||||
user << "You cannot fit the item inside. (Remove larger classed items)"
|
||||
user << "You cannot fit the item inside. (Remove the larger items first)"
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
|
||||
+2
-2
@@ -458,7 +458,7 @@
|
||||
for(var/obj/item/W in (H.contents-implants))
|
||||
if (W==H.w_uniform) // will be teared
|
||||
continue
|
||||
H.drop_from_slot(W)
|
||||
H.drop_from_inventory(W)
|
||||
M.monkeyizing = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
@@ -527,7 +527,7 @@
|
||||
W.loc = null
|
||||
if(!connected)
|
||||
for(var/obj/item/W in (Mo.contents-implants))
|
||||
Mo.drop_from_slot(W)
|
||||
Mo.drop_from_inventory(W)
|
||||
M.monkeyizing = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
|
||||
@@ -89,11 +89,11 @@
|
||||
usr << "\red Not when we are incapacitated."
|
||||
return
|
||||
|
||||
if (!istype(usr.equipped(), /obj/item/weapon/grab))
|
||||
if (!istype(usr.get_active_hand(), /obj/item/weapon/grab))
|
||||
usr << "\red We must be grabbing a creature in our active hand to absorb them."
|
||||
return
|
||||
|
||||
var/obj/item/weapon/grab/G = usr.equipped()
|
||||
var/obj/item/weapon/grab/G = usr.get_active_hand()
|
||||
var/mob/M = G.affecting
|
||||
|
||||
if (!ishuman(M))
|
||||
@@ -278,7 +278,7 @@
|
||||
O.changeling = usr.changeling
|
||||
|
||||
for(var/obj/item/W in usr)
|
||||
usr.drop_from_slot(W)
|
||||
usr.drop_from_inventory(W)
|
||||
|
||||
|
||||
for(var/obj/T in usr)
|
||||
@@ -412,7 +412,7 @@
|
||||
if (usr.monkeyizing)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
usr.drop_from_slot(W)
|
||||
usr.drop_from_inventory(W)
|
||||
usr.regenerate_icons()
|
||||
usr.monkeyizing = 1
|
||||
usr.canmove = 0
|
||||
|
||||
@@ -167,14 +167,14 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
U.put_in_hand(W)
|
||||
U.put_in_hands(W)
|
||||
cell.charge-=(C*10)
|
||||
else
|
||||
U << "\red You can only summon one blade. Try dropping an item first."
|
||||
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
|
||||
if(!U.get_active_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_hand(W)
|
||||
U.put_in_hands(W)
|
||||
if(!U.get_inactive_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_inactive_hand(W)
|
||||
|
||||
@@ -612,7 +612,7 @@ ________________________________________________________________________________
|
||||
if("Eject Disk")
|
||||
var/turf/T = get_turf(loc)
|
||||
if(!U.get_active_hand())
|
||||
U.put_in_hand(t_disk)
|
||||
U.put_in_hands(t_disk)
|
||||
t_disk.add_fingerprint(U)
|
||||
t_disk = null
|
||||
else
|
||||
@@ -633,7 +633,7 @@ ________________________________________________________________________________
|
||||
if("Eject pAI")
|
||||
var/turf/T = get_turf(loc)
|
||||
if(!U.get_active_hand())
|
||||
U.put_in_hand(pai)
|
||||
U.put_in_hands(pai)
|
||||
pai.add_fingerprint(U)
|
||||
pai = null
|
||||
else
|
||||
@@ -834,7 +834,7 @@ ________________________________________________________________________________
|
||||
I:charge = min(I:charge+cell.charge, I:maxcharge)
|
||||
var/obj/item/weapon/cell/old_cell = cell
|
||||
old_cell.charge = 0
|
||||
U.put_in_hand(old_cell)
|
||||
U.put_in_hands(old_cell)
|
||||
old_cell.add_fingerprint(U)
|
||||
old_cell.corrupt()
|
||||
old_cell.updateicon()
|
||||
@@ -1355,7 +1355,7 @@ It is possible to destroy the net by the occupant or someone else.
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(W==M:w_uniform) continue//So all they're left with are shoes and uniform.
|
||||
if(W==M:shoes) continue
|
||||
M.drop_from_slot(W)
|
||||
M.drop_from_inventory(W)
|
||||
|
||||
spawn(0)
|
||||
playsound(M.loc, 'sparks4.ogg', 50, 1)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
src.yes_code = 0
|
||||
src.auth = null
|
||||
else
|
||||
var/obj/item/I = usr.equipped()
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/disk/nuclear))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room."
|
||||
else
|
||||
for(var/obj/item/W in T)
|
||||
T.drop_from_slot(W)
|
||||
T.drop_from_inventory(W)
|
||||
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
|
||||
T.invisibility = 101
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
|
||||
|
||||
@@ -348,22 +348,11 @@
|
||||
usr << browse(null, "window=radio")
|
||||
var/obj/item/device/radio/T = src.origradio
|
||||
var/obj/item/weapon/SWF_uplink/R = src
|
||||
R.loc = T
|
||||
T.loc = usr
|
||||
// R.layer = initial(R.layer)
|
||||
R.layer = 0
|
||||
if (usr.client)
|
||||
usr.client.screen -= R
|
||||
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()
|
||||
|
||||
usr.u_equip(R)
|
||||
usr.put_in_hands(T)
|
||||
R.loc = T
|
||||
T.layer = 20
|
||||
T.set_frequency(initial(T.frequency))
|
||||
T.attack_self(usr)
|
||||
return
|
||||
|
||||
@@ -119,12 +119,12 @@
|
||||
else if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
//if they are holding or wearing a card that has access, that works
|
||||
if(src.check_access(H.equipped()) || src.check_access(H.wear_id))
|
||||
if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id))
|
||||
return 1
|
||||
else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid))
|
||||
var/mob/living/carbon/george = M
|
||||
//they can only hold things :(
|
||||
if(george.equipped() && (istype(george.equipped(), /obj/item/weapon/card/id) || istype(george.equipped(), /obj/item/device/pda)) && src.check_access(george.equipped()))
|
||||
if(george.get_active_hand() && (istype(george.get_active_hand(), /obj/item/weapon/card/id) || istype(george.get_active_hand(), /obj/item/device/pda)) && src.check_access(george.get_active_hand()))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/obj/machinery/optable/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
user.drop_item()
|
||||
if (O.loc != src.loc)
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
|
||||
if (href_list["AAlarmwires"])
|
||||
var/t1 = text2num(href_list["AAlarmwires"])
|
||||
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
usr << "You need wirecutters!"
|
||||
return
|
||||
if (src.isWireColorCut(t1))
|
||||
@@ -384,7 +384,7 @@
|
||||
src.cut(t1)
|
||||
else if (href_list["pulse"])
|
||||
var/t1 = text2num(href_list["pulse"])
|
||||
if (!istype(usr.equipped(), /obj/item/device/multitool))
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return
|
||||
if (src.isWireColorCut(t1))
|
||||
|
||||
@@ -255,7 +255,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
if(href_list["act"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
if(href_list["act"] == "pulse")
|
||||
if (!istype(usr.equipped(), /obj/item/device/multitool))
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
else
|
||||
if(src.wires[temp_wire])
|
||||
@@ -273,7 +273,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
||||
src.shock(usr,50)
|
||||
spawn(100) src.shocked = !src.shocked
|
||||
if(href_list["act"] == "wire")
|
||||
if (!istype(usr.equipped(), /obj/item/weapon/wirecutters))
|
||||
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
|
||||
usr << "You need wirecutters!"
|
||||
else
|
||||
wires[temp_wire] = !wires[temp_wire]
|
||||
|
||||
@@ -349,11 +349,13 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot
|
||||
A.loc = get_turf(src.loc)
|
||||
A.name = src.created_name
|
||||
user << "You add the robot arm to the bucket and sensor assembly! Beep boop!"
|
||||
del(W)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
|
||||
@@ -886,122 +886,131 @@ Auto Patrol: []"},
|
||||
|
||||
/obj/item/weapon/ed209_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(((istype(W, /obj/item/robot_parts/l_leg)) || (istype(W, /obj/item/robot_parts/r_leg))) && (src.build_step == 0 || src.build_step == 1))
|
||||
src.build_step++
|
||||
user << "You add the robot leg to [src]!"
|
||||
src.name = "legs/frame assembly"
|
||||
if (src.build_step == 1)
|
||||
src.item_state = "ed209_leg"
|
||||
src.icon_state = "ed209_leg"
|
||||
if (src.build_step == 2)
|
||||
src.item_state = "ed209_legs"
|
||||
src.icon_state = "ed209_legs"
|
||||
|
||||
del(W)
|
||||
|
||||
else if(istype(W, /obj/item/clothing/suit/armor/vest) && (src.build_step == 2))
|
||||
src.build_step++
|
||||
user << "You add the armor to [src]!"
|
||||
src.name = "vest/legs/frame assembly"
|
||||
src.item_state = "ed209_shell"
|
||||
src.icon_state = "ed209_shell"
|
||||
del(W)
|
||||
else if(istype(W, /obj/item/clothing/suit/bluetag) && (src.build_step == 2))
|
||||
src.build_step++
|
||||
user << "You add the armor to [src]!"
|
||||
src.name = "vest/legs/frame assembly"
|
||||
lasercolor = "b"
|
||||
src.item_state = "[lasercolor]ed209_shell"
|
||||
src.icon_state = "[lasercolor]ed209_shell"
|
||||
del(W)
|
||||
else if(istype(W, /obj/item/clothing/suit/redtag) && (src.build_step == 2))
|
||||
src.build_step++
|
||||
user << "You add the armor to [src]!"
|
||||
src.name = "vest/legs/frame assembly"
|
||||
lasercolor = "r"
|
||||
src.item_state = "[lasercolor]ed209_shell"
|
||||
src.icon_state = "[lasercolor]ed209_shell"
|
||||
del(W)
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && src.build_step == 3)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
src.build_step++
|
||||
src.name = "shielded frame assembly"
|
||||
user << "You welded the vest to [src]!"
|
||||
else if(istype(W, /obj/item/clothing/head/helmet) && (src.build_step == 4))
|
||||
src.build_step++
|
||||
user << "You add the helmet to [src]!"
|
||||
src.name = "covered and shielded frame assembly"
|
||||
src.item_state = "[lasercolor]ed209_hat"
|
||||
src.icon_state = "[lasercolor]ed209_hat"
|
||||
del(W)
|
||||
else if(isprox(W) && (src.build_step == 5))
|
||||
src.build_step++
|
||||
user << "You add the prox sensor to [src]!"
|
||||
src.name = "prox/covered and armed the frame assembly"
|
||||
src.item_state = "[lasercolor]ed209_prox"
|
||||
src.icon_state = "[lasercolor]ed209_prox"
|
||||
del(W)
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && (src.build_step == 6) )
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
var/turf/T = get_turf(user)
|
||||
user.visible_message("[user] wires killbot.", "You start to wire the killbot.")
|
||||
sleep(40)
|
||||
if(get_turf(user) == T)
|
||||
coil.use(1)
|
||||
src.build_step++
|
||||
user << "\blue You wire the ED-209 assembly!"
|
||||
src.name = "Wired ED-209 Assembly"
|
||||
else if(istype(W, /obj/item/weapon/gun/energy/taser) && (src.build_step == 7) && (!lasercolor))
|
||||
src.build_step++
|
||||
user << "You add the taser gun to [src]!"
|
||||
src.name = "Taser/Wired ED-209 Assembly"
|
||||
src.item_state = "[lasercolor]ed209_taser"
|
||||
src.icon_state = "[lasercolor]ed209_taser"
|
||||
del(W)
|
||||
else if(istype(W, /obj/item/weapon/gun/energy/laser/bluetag) && (src.build_step == 7) && (lasercolor == "b"))
|
||||
src.build_step++
|
||||
user << "You add the lasertag gun to [src]!"
|
||||
src.name = "Bluetag ED-209 Assembly"
|
||||
src.item_state = "[lasercolor]ed209_taser"
|
||||
src.icon_state = "[lasercolor]ed209_taser"
|
||||
del(W)
|
||||
else if(istype(W, /obj/item/weapon/gun/energy/laser/redtag) && (src.build_step == 7) && (lasercolor == "r"))
|
||||
src.build_step++
|
||||
user << "You add the lasertag gun to [src]!"
|
||||
src.name = "Redtag ED-209 Assembly"
|
||||
src.item_state = "[lasercolor]ed209_taser"
|
||||
src.icon_state = "[lasercolor]ed209_taser"
|
||||
del(W)
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && (src.build_step == 8) )
|
||||
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
user << "\blue Now attaching the gun to the frame."
|
||||
sleep(40)
|
||||
if(get_turf(user) == T)
|
||||
src.build_step++
|
||||
src.name = "Armed ED-209 Assembly"
|
||||
user << "\blue Taser gun attached!"
|
||||
else if((istype(W, /obj/item/weapon/cell)) && (src.build_step >= 9))
|
||||
src.build_step++
|
||||
user << "You complete the ED-209!"
|
||||
var/obj/machinery/bot/ed209/S = new /obj/machinery/bot/ed209
|
||||
S.loc = get_turf(src)
|
||||
S.name = src.created_name
|
||||
S.lasercolor = src.lasercolor
|
||||
S.New()
|
||||
del(W)
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
created_name = t
|
||||
return
|
||||
|
||||
switch(build_step)
|
||||
if(0,1)
|
||||
if( istype(W, /obj/item/robot_parts/l_leg) || istype(W, /obj/item/robot_parts/r_leg) )
|
||||
user.drop_item()
|
||||
del(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the robot leg to [src].</span>"
|
||||
name = "legs/frame assembly"
|
||||
if(build_step == 1)
|
||||
item_state = "ed209_leg"
|
||||
icon_state = "ed209_leg"
|
||||
else
|
||||
item_state = "ed209_legs"
|
||||
icon_state = "ed209_legs"
|
||||
|
||||
if(2)
|
||||
if( istype(W, /obj/item/clothing/suit/redtag) )
|
||||
lasercolor = "r"
|
||||
else if( istype(W, /obj/item/clothing/suit/bluetag) )
|
||||
lasercolor = "b"
|
||||
if( lasercolor || istype(W, /obj/item/clothing/suit/armor/vest) )
|
||||
user.drop_item()
|
||||
del(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the armor to [src].</span>"
|
||||
name = "vest/legs/frame assembly"
|
||||
item_state = "[lasercolor]ed209_shell"
|
||||
icon_state = "[lasercolor]ed209_shell"
|
||||
|
||||
if(3)
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
build_step++
|
||||
name = "shielded frame assembly"
|
||||
user << "<span class='notice'>You welded the vest to [src].</span>"
|
||||
if(4)
|
||||
if( istype(W, /obj/item/clothing/head/helmet) )
|
||||
user.drop_item()
|
||||
del(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the helmet to [src].</span>"
|
||||
name = "covered and shielded frame assembly"
|
||||
item_state = "[lasercolor]ed209_hat"
|
||||
icon_state = "[lasercolor]ed209_hat"
|
||||
|
||||
if(5)
|
||||
if( isprox(W) )
|
||||
user.drop_item()
|
||||
del(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the prox sensor to [src].</span>"
|
||||
name = "prox/covered and armed the frame assembly"
|
||||
item_state = "[lasercolor]ed209_prox"
|
||||
icon_state = "[lasercolor]ed209_prox"
|
||||
|
||||
if(6)
|
||||
if( istype(W, /obj/item/weapon/cable_coil) )
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
var/turf/T = get_turf(user)
|
||||
user << "<span class='notice'>You start to wire [src]...</span>"
|
||||
sleep(40)
|
||||
if(get_turf(user) == T)
|
||||
coil.use(1)
|
||||
build_step++
|
||||
user << "<span class='notice'>You wire the ED-209 assembly.</span>"
|
||||
name = "wired ED-209 assembly"
|
||||
|
||||
if(7)
|
||||
switch(lasercolor)
|
||||
if("b")
|
||||
if( !istype(W, /obj/item/weapon/gun/energy/laser/bluetag) )
|
||||
return
|
||||
name = "bluetag ED-209 assembly"
|
||||
if("r")
|
||||
if( !istype(W, /obj/item/weapon/gun/energy/laser/redtag) )
|
||||
return
|
||||
name = "redtag ED-209 assembly"
|
||||
if("")
|
||||
if( !istype(W, /obj/item/weapon/gun/energy/taser) )
|
||||
return
|
||||
name = "taser ED-209 assembly"
|
||||
else
|
||||
return
|
||||
build_step++
|
||||
user << "<span class='notice'>You add [W] to [src].</span>"
|
||||
src.item_state = "[lasercolor]ed209_taser"
|
||||
src.icon_state = "[lasercolor]ed209_taser"
|
||||
user.drop_item()
|
||||
del(W)
|
||||
|
||||
if(8)
|
||||
if( istype(W, /obj/item/weapon/screwdriver) )
|
||||
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
user << "<span class='notice'>Now attaching the gun to the frame.</span>"
|
||||
sleep(40)
|
||||
if(get_turf(user) == T)
|
||||
build_step++
|
||||
name = "armed ED-209 assembly"
|
||||
user << "<span class='notice'>Taser gun attached.</span>"
|
||||
|
||||
if(9)
|
||||
if( istype(W, /obj/item/weapon/cell) )
|
||||
build_step++
|
||||
user << "<span class='notice'>You complete the ED-209.</span>"
|
||||
var/obj/machinery/bot/ed209/S = new /obj/machinery/bot/ed209
|
||||
S.loc = get_turf(src)
|
||||
S.name = created_name
|
||||
S.lasercolor = lasercolor
|
||||
S.New()
|
||||
user.drop_item()
|
||||
del(W)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
src.created_name = t
|
||||
|
||||
/obj/machinery/bot/ed209/bullet_act(var/obj/item/projectile/Proj)
|
||||
if((src.lasercolor == "b") && (src.disabled == 0))
|
||||
|
||||
@@ -369,41 +369,26 @@
|
||||
if(src.contents.len >= 1)
|
||||
user << "They wont fit in as there is already stuff inside!"
|
||||
return
|
||||
if (user.s_active)
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
|
||||
B.loc = user
|
||||
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)
|
||||
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
|
||||
user.put_in_hands(B)
|
||||
user << "You add the tiles into the empty toolbox. They stick protrude from the top."
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob)
|
||||
..()
|
||||
if(isprox(W))
|
||||
var/obj/item/weapon/toolbox_tiles_sensor/B = new /obj/item/weapon/toolbox_tiles_sensor
|
||||
B.loc = user
|
||||
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!"
|
||||
del(W)
|
||||
var/obj/item/weapon/toolbox_tiles_sensor/B = new /obj/item/weapon/toolbox_tiles_sensor()
|
||||
B.created_name = src.created_name
|
||||
user.put_in_hands(B)
|
||||
user << "You add the sensor to the toolbox and tiles!"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
@@ -417,16 +402,12 @@
|
||||
/obj/item/weapon/toolbox_tiles_sensor/attackby(var/obj/item/W, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
|
||||
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
|
||||
user << "You add the robot arm to the odd looking toolbox assembly! Boop beep!"
|
||||
del(W)
|
||||
var/obj/machinery/bot/floorbot/A = new /obj/machinery/bot/floorbot
|
||||
A.name = src.created_name
|
||||
user.put_in_hands(A)
|
||||
user << "You add the robot arm to the odd looking toolbox assembly! Boop beep!"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
|
||||
@@ -553,18 +553,10 @@
|
||||
else if(istype(src,/obj/item/weapon/storage/firstaid/o2))
|
||||
A.skin = "o2"
|
||||
|
||||
A.loc = user
|
||||
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)
|
||||
user.put_in_hands(A)
|
||||
user << "You add the robot arm to the first aid kit"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
@@ -320,18 +320,10 @@
|
||||
|
||||
|
||||
if("cellremove")
|
||||
if(open && cell && !usr.equipped())
|
||||
cell.loc = usr
|
||||
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)
|
||||
if(open && cell && !usr.get_active_hand())
|
||||
cell.updateicon()
|
||||
usr.put_in_active_hand(cell)
|
||||
cell.add_fingerprint(usr)
|
||||
cell = null
|
||||
|
||||
usr.visible_message("\blue [usr] removes the power cell from [src].", "\blue You remove the power cell from [src].")
|
||||
@@ -339,7 +331,7 @@
|
||||
|
||||
if("cellinsert")
|
||||
if(open && !cell)
|
||||
var/obj/item/weapon/cell/C = usr.equipped()
|
||||
var/obj/item/weapon/cell/C = usr.get_active_hand()
|
||||
if(istype(C))
|
||||
usr.drop_item()
|
||||
cell = C
|
||||
@@ -409,20 +401,20 @@
|
||||
|
||||
|
||||
if("wirecut")
|
||||
if(istype(usr.equipped(), /obj/item/weapon/wirecutters))
|
||||
if(istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
|
||||
var/wirebit = text2num(href_list["wire"])
|
||||
wires &= ~wirebit
|
||||
else
|
||||
usr << "\blue You need wirecutters!"
|
||||
if("wiremend")
|
||||
if(istype(usr.equipped(), /obj/item/weapon/wirecutters))
|
||||
if(istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
|
||||
var/wirebit = text2num(href_list["wire"])
|
||||
wires |= wirebit
|
||||
else
|
||||
usr << "\blue You need wirecutters!"
|
||||
|
||||
if("wirepulse")
|
||||
if(istype(usr.equipped(), /obj/item/device/multitool))
|
||||
if(istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
switch(href_list["wire"])
|
||||
if("1","2")
|
||||
usr << "\blue \icon[src] The charge light flickers."
|
||||
|
||||
@@ -711,24 +711,15 @@ Auto Patrol: []"},
|
||||
if(src.type != /obj/item/clothing/head/helmet) //Eh, but we don't want people making secbots out of space helmets.
|
||||
return
|
||||
|
||||
if(!S.secured)
|
||||
return
|
||||
else
|
||||
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
|
||||
A.loc = user
|
||||
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."
|
||||
if(S.secured)
|
||||
del(S)
|
||||
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
|
||||
user.put_in_hands(A)
|
||||
user << "You add the signaler to the helmet."
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/secbot_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -740,6 +731,7 @@ Auto Patrol: []"},
|
||||
user << "You weld a hole in [src]!"
|
||||
|
||||
else if(isprox(W) && (src.build_step == 1))
|
||||
user.drop_item()
|
||||
src.build_step++
|
||||
user << "You add the prox sensor to [src]!"
|
||||
src.overlays += image('aibots.dmi', "hs_eye")
|
||||
@@ -747,6 +739,7 @@ Auto Patrol: []"},
|
||||
del(W)
|
||||
|
||||
else if(((istype(W, /obj/item/robot_parts/l_arm)) || (istype(W, /obj/item/robot_parts/r_arm))) && (src.build_step == 2))
|
||||
user.drop_item()
|
||||
src.build_step++
|
||||
user << "You add the robot arm to [src]!"
|
||||
src.name = "helmet/signaler/prox sensor/robot arm assembly"
|
||||
@@ -754,6 +747,7 @@ Auto Patrol: []"},
|
||||
del(W)
|
||||
|
||||
else if((istype(W, /obj/item/weapon/melee/baton)) && (src.build_step >= 3))
|
||||
user.drop_item()
|
||||
src.build_step++
|
||||
user << "You complete the Securitron! Beep boop."
|
||||
var/obj/machinery/bot/secbot/S = new /obj/machinery/bot/secbot
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
attack_hand(mob/user)
|
||||
if(charging)
|
||||
usr.put_in_hand(charging)
|
||||
usr.put_in_hands(charging)
|
||||
charging.add_fingerprint(user)
|
||||
charging.updateicon()
|
||||
|
||||
|
||||
@@ -212,13 +212,14 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/proc/derez(var/obj , var/silent = 1)
|
||||
/obj/machinery/computer/HolodeckControl/proc/derez(var/obj/obj , var/silent = 1)
|
||||
holographic_items.Remove(obj)
|
||||
|
||||
if(istype(obj , /obj/))
|
||||
if(istype(obj:loc , /mob/))
|
||||
var/mob/M = obj:loc
|
||||
M.drop_from_slot(obj)
|
||||
if(isobj(obj))
|
||||
var/mob/M = obj.loc
|
||||
if(ismob(M))
|
||||
M.u_equip(obj)
|
||||
M.update_icons() //so their overlays update
|
||||
|
||||
if(!silent)
|
||||
var/obj/oldobj = obj
|
||||
|
||||
@@ -176,13 +176,13 @@
|
||||
if(ishuman(usr))
|
||||
modify.loc = usr.loc
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hand(modify)
|
||||
usr.put_in_hands(modify)
|
||||
modify = null
|
||||
else
|
||||
modify.loc = loc
|
||||
modify = null
|
||||
else
|
||||
var/obj/item/I = usr.equipped()
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
@@ -194,13 +194,13 @@
|
||||
if(ishuman(usr))
|
||||
scan.loc = usr.loc
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hand(scan)
|
||||
usr.put_in_hands(scan)
|
||||
scan = null
|
||||
else
|
||||
scan.loc = src.loc
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.equipped()
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
src.menu = 4
|
||||
|
||||
else if (src.menu == 4)
|
||||
var/obj/item/weapon/card/id/C = usr.equipped()
|
||||
var/obj/item/weapon/card/id/C = usr.get_active_hand()
|
||||
if (istype(C)||istype(C, /obj/item/device/pda))
|
||||
if(src.check_access(C))
|
||||
src.records.Remove(src.active_record)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
src.state = STATE_DEFAULT
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/card/id/I = M.equipped()
|
||||
var/obj/item/weapon/card/id/I = M.get_active_hand()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
if("swipeidseclevel")
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/card/id/I = M.equipped()
|
||||
var/obj/item/weapon/card/id/I = M.get_active_hand()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
src.scan.loc = src.loc
|
||||
src.scan = null
|
||||
else
|
||||
var/obj/item/I = usr.equipped()
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<A href='?src=\ref[src];temp=1'>Cancel</A>"}
|
||||
|
||||
else if (href_list["eject2"])
|
||||
var/obj/item/weapon/card/id/I = usr.equipped()
|
||||
var/obj/item/weapon/card/id/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
|
||||
@@ -194,12 +194,12 @@ What a mess.*/
|
||||
if("Confirm Identity")
|
||||
if (scan)
|
||||
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
||||
usr.put_in_hand(scan)
|
||||
usr.put_in_hands(scan)
|
||||
else
|
||||
scan.loc = get_turf(src)
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.equipped()
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
|
||||
@@ -867,7 +867,7 @@ About the new airlock wires panel:
|
||||
usr.machine = src
|
||||
if(href_list["wires"])
|
||||
var/t1 = text2num(href_list["wires"])
|
||||
if(!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||
if(!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
usr << "You need wirecutters!"
|
||||
return
|
||||
if(src.isWireColorCut(t1))
|
||||
@@ -876,7 +876,7 @@ About the new airlock wires panel:
|
||||
src.cut(t1)
|
||||
else if(href_list["pulse"])
|
||||
var/t1 = text2num(href_list["pulse"])
|
||||
if(!istype(usr.equipped(), /obj/item/device/multitool))
|
||||
if(!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return
|
||||
if(src.isWireColorCut(t1))
|
||||
@@ -886,13 +886,13 @@ About the new airlock wires panel:
|
||||
src.pulse(t1)
|
||||
else if(href_list["signaler"])
|
||||
var/wirenum = text2num(href_list["signaler"])
|
||||
if(!istype(usr.equipped(), /obj/item/device/assembly/signaler))
|
||||
if(!istype(usr.get_active_hand(), /obj/item/device/assembly/signaler))
|
||||
usr << "You need a signaller!"
|
||||
return
|
||||
if(src.isWireColorCut(wirenum))
|
||||
usr << "You can't attach a signaller to a cut wire."
|
||||
return
|
||||
var/obj/item/device/assembly/signaler/R = usr.equipped()
|
||||
var/obj/item/device/assembly/signaler/R = usr.get_active_hand()
|
||||
if(R.secured)
|
||||
usr << "This radio can't be attached!"
|
||||
return
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
return
|
||||
|
||||
if (href_list["login"])
|
||||
var/obj/item/I = usr.equipped()
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/structure/morgue/attackby(P as obj, mob/user as mob)
|
||||
if (istype(P, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
if (user.equipped() != P)
|
||||
if (user.get_active_hand() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
@@ -212,7 +212,7 @@
|
||||
/obj/structure/crematorium/attackby(P as obj, mob/user as mob)
|
||||
if (istype(P, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
if (user.equipped() != P)
|
||||
if (user.get_active_hand() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) > 1 && src.loc != user))
|
||||
return
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
return
|
||||
else
|
||||
// insert cell
|
||||
var/obj/item/weapon/cell/C = usr.equipped()
|
||||
var/obj/item/weapon/cell/C = usr.get_active_hand()
|
||||
if(istype(C))
|
||||
user.drop_item()
|
||||
cell = C
|
||||
@@ -123,26 +123,17 @@
|
||||
set_temperature = dd_range(20, 90, set_temperature + value)
|
||||
|
||||
if("cellremove")
|
||||
if(open && cell && !usr.equipped())
|
||||
cell.loc = usr
|
||||
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)
|
||||
if(open && cell && !usr.get_active_hand())
|
||||
cell.updateicon()
|
||||
usr.put_in_hands(cell)
|
||||
cell.add_fingerprint(usr)
|
||||
cell = null
|
||||
|
||||
usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].")
|
||||
|
||||
|
||||
if("cellinstall")
|
||||
if(open && !cell)
|
||||
var/obj/item/weapon/cell/C = usr.equipped()
|
||||
var/obj/item/weapon/cell/C = usr.get_active_hand()
|
||||
if(istype(C))
|
||||
usr.drop_item()
|
||||
cell = C
|
||||
|
||||
@@ -98,8 +98,8 @@
|
||||
|
||||
// You need a multitool to use this, or be silicon
|
||||
if(!issilicon(user))
|
||||
if(user.equipped())
|
||||
if(!istype(user.equipped(), /obj/item/device/multitool))
|
||||
if(user.get_active_hand())
|
||||
if(!istype(user.get_active_hand(), /obj/item/device/multitool))
|
||||
return
|
||||
else
|
||||
return
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
var/obj/item/device/multitool/P = null
|
||||
if(!issilicon(user))
|
||||
P = user.equipped()
|
||||
P = user.get_active_hand()
|
||||
|
||||
user.machine = src
|
||||
var/dat
|
||||
@@ -160,8 +160,8 @@
|
||||
Topic(href, href_list)
|
||||
|
||||
if(!issilicon(usr))
|
||||
if(usr.equipped())
|
||||
if(!istype(usr.equipped(), /obj/item/device/multitool))
|
||||
if(usr.get_active_hand())
|
||||
if(!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
return
|
||||
else
|
||||
return
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
var/obj/item/device/multitool/P = null
|
||||
if(!issilicon(usr))
|
||||
P = usr.equipped()
|
||||
P = usr.get_active_hand()
|
||||
|
||||
if(href_list["input"])
|
||||
switch(href_list["input"])
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
src.Exited(target)
|
||||
|
||||
|
||||
//TODO: make teleporting to places trigger Entered() ~Carn
|
||||
// Done.
|
||||
|
||||
/area/turret_protected/Entered(O)
|
||||
..()
|
||||
if( master && master != src )
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
coin.loc = src.loc
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hand(coin)
|
||||
usr.put_in_hands(coin)
|
||||
usr << "\blue You remove the [coin] from the [src]"
|
||||
coin = null
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
|
||||
else if ((href_list["cutwire"]) && (src.panel_open))
|
||||
var/twire = text2num(href_list["cutwire"])
|
||||
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
usr << "You need wirecutters!"
|
||||
return
|
||||
if (src.isWireColorCut(twire))
|
||||
@@ -287,7 +287,7 @@
|
||||
|
||||
else if ((href_list["pulsewire"]) && (src.panel_open))
|
||||
var/twire = text2num(href_list["pulsewire"])
|
||||
if (!istype(usr.equipped(), /obj/item/device/multitool))
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return
|
||||
if (src.isWireColorCut(twire))
|
||||
|
||||
@@ -515,12 +515,12 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
if("Cancel")
|
||||
return
|
||||
if("Read it")
|
||||
if(usr.equipped() != src)
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
user << browse("[tomedat]", "window=Arcane Tome")
|
||||
return
|
||||
if("Notes")
|
||||
if(usr.equipped() != src)
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
notedat = {"
|
||||
<br><b>Word translation notes</b> <br>
|
||||
@@ -538,7 +538,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
// call(/obj/item/weapon/tome/proc/edit_notes)()
|
||||
user << browse("[notedat]", "window=notes")
|
||||
return
|
||||
if(usr.equipped() != src)
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
|
||||
var/w1
|
||||
@@ -563,7 +563,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
if (words[w] == w3)
|
||||
w3 = w
|
||||
|
||||
if(usr.equipped() != src)
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
|
||||
for (var/mob/V in viewers(src))
|
||||
@@ -571,7 +571,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
user << "\red You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world."
|
||||
user.take_overall_damage(1)
|
||||
if(do_after(user, 50))
|
||||
if(usr.equipped() != src)
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/effect/rune/R = new /obj/effect/rune(user.loc)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
return
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hand(choice)
|
||||
user.put_in_hands(choice)
|
||||
else
|
||||
choice.loc = get_turf(src)
|
||||
update_icon()
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(isobj(H.shoes))
|
||||
var/thingy = H.shoes
|
||||
H.drop_from_slot(H.shoes)
|
||||
H.drop_from_inventory(H.shoes)
|
||||
walk_away(thingy,chassis,15,2)
|
||||
spawn(20)
|
||||
if(thingy)
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
return 1
|
||||
else if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/ID in list(H.equipped(), H.wear_id, H.belt))
|
||||
for(var/ID in list(H.get_active_hand(), H.wear_id, H.belt))
|
||||
if(src.check_access(ID))
|
||||
return 1
|
||||
M << "<font color='red'>You don't have required permissions to use [src]</font>"
|
||||
|
||||
@@ -780,7 +780,7 @@
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
|
||||
user.drop_from_slot(W)
|
||||
user.drop_from_inventory(W)
|
||||
W.forceMove(src)
|
||||
user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src]")
|
||||
return
|
||||
@@ -1073,7 +1073,7 @@
|
||||
else if(mmi_as_oc.brainmob.stat)
|
||||
user << "Beta-rhythm below acceptable level."
|
||||
return 0
|
||||
user.drop_from_slot(mmi_as_oc)
|
||||
user.drop_from_inventory(mmi_as_oc)
|
||||
var/mob/brainmob = mmi_as_oc.brainmob
|
||||
brainmob.reset_view(src)
|
||||
/*
|
||||
@@ -1186,14 +1186,14 @@
|
||||
/////////////////////////
|
||||
|
||||
/obj/mecha/proc/operation_allowed(mob/living/carbon/human/H)
|
||||
for(var/ID in list(H.equipped(), H.wear_id, H.belt))
|
||||
for(var/ID in list(H.get_active_hand(), H.wear_id, H.belt))
|
||||
if(src.check_access(ID,src.operation_req_access))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/mecha/proc/internals_access_allowed(mob/living/carbon/human/H)
|
||||
for(var/atom/ID in list(H.equipped(), H.wear_id, H.belt))
|
||||
for(var/atom/ID in list(H.get_active_hand(), H.wear_id, H.belt))
|
||||
if(src.check_access(ID,src.internals_req_access))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
attackby(W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
if (user.equipped() != W)
|
||||
if (user.get_active_hand() != W)
|
||||
return
|
||||
if (!in_range(src, user) && src.loc != user)
|
||||
return
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user as mob)
|
||||
if(has_extinguisher)
|
||||
user.put_in_hand(has_extinguisher)
|
||||
user.put_in_hands(has_extinguisher)
|
||||
has_extinguisher = null
|
||||
user << "\blue You take the extinguisher from the [name]."
|
||||
opened = 1
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
return
|
||||
if(localopened)
|
||||
if(fireaxe)
|
||||
user.put_in_hand(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
user << "\blue You take the fire axe from the [name]."
|
||||
src.add_fingerprint(user)
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
if (localopened)
|
||||
if(fireaxe)
|
||||
usr.put_in_hand(fireaxe)
|
||||
usr.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
usr << "\blue You take the Fire axe from the [name]."
|
||||
else
|
||||
|
||||
@@ -755,14 +755,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/proc/remove_id()
|
||||
if (id)
|
||||
if (istype(loc, /mob))
|
||||
if (ismob(loc))
|
||||
var/mob/M = loc
|
||||
if(M.equipped() == null)
|
||||
M.put_in_hand(id)
|
||||
id = null
|
||||
usr << "\blue You remove the ID from the [name]."
|
||||
return
|
||||
id.loc = get_turf(src)
|
||||
M.put_in_hands(id)
|
||||
usr << "<span class='notice'>You remove the ID from the [name].</span>"
|
||||
else
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
|
||||
/obj/item/device/pda/proc/telecomms_process(var/receipent, var/originator, var/data)
|
||||
@@ -820,8 +818,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(O)
|
||||
if (istype(loc, /mob))
|
||||
var/mob/M = loc
|
||||
if(M.equipped() == null)
|
||||
M.put_in_hand(O)
|
||||
if(M.get_active_hand() == null)
|
||||
M.put_in_hands(O)
|
||||
usr << "<span class='notify'>You remove \the [O] from \the [src].</span>"
|
||||
return
|
||||
O.loc = get_turf(src)
|
||||
@@ -835,23 +833,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (id)
|
||||
remove_id()
|
||||
else
|
||||
var/obj/item/I = user.equipped()
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
id = I
|
||||
else
|
||||
var/obj/item/weapon/card/I = user.equipped()
|
||||
var/obj/item/weapon/card/I = user.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
|
||||
if(id)//Get id and replace it.
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
user.put_in_hand(id)
|
||||
id = I
|
||||
else//Insert id.
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
id = I
|
||||
var/obj/old_id = id
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
id = I
|
||||
user.put_in_hands(old_id)
|
||||
return
|
||||
|
||||
// access to status display signals
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = user
|
||||
O.target = user
|
||||
O.item = user.equipped()
|
||||
O.item = user.get_active_hand()
|
||||
O.s_loc = user.loc
|
||||
O.t_loc = user.loc
|
||||
O.place = "handcuff"
|
||||
@@ -58,7 +58,7 @@
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = user
|
||||
O.target = M
|
||||
O.item = user.equipped()
|
||||
O.item = user.get_active_hand()
|
||||
O.s_loc = user.loc
|
||||
O.t_loc = M.loc
|
||||
O.place = "handcuff"
|
||||
@@ -77,7 +77,7 @@
|
||||
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
|
||||
O.source = user
|
||||
O.target = M
|
||||
O.item = user.equipped()
|
||||
O.item = user.get_active_hand()
|
||||
O.s_loc = user.loc
|
||||
O.t_loc = M.loc
|
||||
O.place = "handcuff"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/item/blueprints/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.restrained() || usr.stat || usr.equipped() != src))
|
||||
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
|
||||
return
|
||||
if (!href_list["action"])
|
||||
return
|
||||
|
||||
@@ -119,14 +119,7 @@
|
||||
return
|
||||
else
|
||||
src.candlecount--
|
||||
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
|
||||
user.put_in_hands(new /obj/item/candle(user))
|
||||
else
|
||||
return ..()
|
||||
src.update_icon()
|
||||
|
||||
@@ -37,16 +37,8 @@ MONKEY CUBE BOX
|
||||
/obj/item/kitchen/donut_box/MouseDrop(mob/user as mob)
|
||||
if ((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
if(!istype(user, /mob/living/carbon/metroid))
|
||||
if (usr.hand)
|
||||
if (!( usr.l_hand ))
|
||||
spawn( 0 )
|
||||
src.attack_hand(usr, 1, 1)
|
||||
return
|
||||
else
|
||||
if (!( usr.r_hand ))
|
||||
spawn( 0 )
|
||||
src.attack_hand(usr, 0, 1)
|
||||
return
|
||||
if( !usr.get_active_hand() )
|
||||
src.attack_hand(usr, usr.hand, 1)
|
||||
return
|
||||
|
||||
/obj/item/kitchen/donut_box/attack_paw(mob/user as mob)
|
||||
@@ -56,36 +48,15 @@ MONKEY CUBE BOX
|
||||
if (flag)
|
||||
return ..()
|
||||
src.add_fingerprint(user)
|
||||
if (locate(/obj/item/weapon/reagent_containers/food/snacks/donut, src))
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/P in src)
|
||||
if (!usr.l_hand)
|
||||
P.loc = usr
|
||||
P.layer = 20
|
||||
usr.l_hand = P
|
||||
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_inv_r_hand()
|
||||
usr << "You take a donut out of the box."
|
||||
break
|
||||
else
|
||||
if (src.amount >= 1)
|
||||
src.amount--
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/donut/D = new /obj/item/weapon/reagent_containers/food/snacks/donut
|
||||
D.loc = usr.loc
|
||||
if(ishuman(usr))
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hand(D)
|
||||
usr << "You take a donut out of the box."
|
||||
else
|
||||
D.loc = get_turf_loc(src)
|
||||
usr << "You take a donut out of the box."
|
||||
|
||||
src.update()
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/donut/P = locate() in src
|
||||
if(!P && (amount >= 1))
|
||||
P = new /obj/item/weapon/reagent_containers/food/snacks/donut( src )
|
||||
if(P)
|
||||
usr.put_in_hands(P)
|
||||
usr << "You take a donut out of the box."
|
||||
src.amount--
|
||||
src.update()
|
||||
return
|
||||
|
||||
/obj/item/kitchen/donut_box/examine()
|
||||
@@ -112,16 +83,9 @@ MONKEY CUBE BOX
|
||||
|
||||
/obj/item/kitchen/egg_box/MouseDrop(mob/user as mob)
|
||||
if ((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
if (usr.hand)
|
||||
if (!( usr.l_hand ))
|
||||
spawn( 0 )
|
||||
src.attack_hand(usr, 1, 1)
|
||||
return
|
||||
else
|
||||
if (!( usr.r_hand ))
|
||||
spawn( 0 )
|
||||
src.attack_hand(usr, 0, 1)
|
||||
return
|
||||
if( !usr.get_active_hand() )
|
||||
attack_hand(usr, usr.hand, 1)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/kitchen/egg_box/attack_paw(mob/user as mob)
|
||||
@@ -131,32 +95,17 @@ MONKEY CUBE BOX
|
||||
if (flag)
|
||||
return ..()
|
||||
src.add_fingerprint(user)
|
||||
if (locate(/obj/item/weapon/reagent_containers/food/snacks/egg, src))
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/egg/P in src)
|
||||
if (!usr.l_hand)
|
||||
P.loc = usr.loc
|
||||
P.layer = 20
|
||||
usr.l_hand = P
|
||||
P = null
|
||||
usr.update_inv_l_hand()
|
||||
usr << "You take an egg out of the box."
|
||||
break
|
||||
else if (!usr.r_hand)
|
||||
P.loc = usr.loc
|
||||
P.layer = 20
|
||||
usr.r_hand = P
|
||||
P = null
|
||||
usr.update_inv_r_hand()
|
||||
usr << "You take an egg out of the box."
|
||||
break
|
||||
else
|
||||
if (src.amount >= 1)
|
||||
src.amount--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/egg( src.loc )
|
||||
usr << "You take an egg out of the box."
|
||||
src.update()
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/P = locate() in src
|
||||
if(!P && (amount >= 1))
|
||||
P = new /obj/item/weapon/reagent_containers/food/snacks/egg( src )
|
||||
if(P)
|
||||
usr.put_in_hands(P)
|
||||
usr << "You take an egg out of the box."
|
||||
src.amount--
|
||||
src.update()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/kitchen/egg_box/examine()
|
||||
set src in oview(1)
|
||||
|
||||
@@ -186,15 +135,7 @@ MONKEY CUBE BOX
|
||||
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(amount)
|
||||
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.put_in_hands(new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(user))
|
||||
user << "You take a monkey cube out of the box."
|
||||
amount--
|
||||
else
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/item/proc/equipped(var/mob/user, var/slot)
|
||||
return
|
||||
//
|
||||
// ***TODO: implement unequipped()
|
||||
// ***TODO: implement unget_active_hand()
|
||||
//
|
||||
|
||||
/obj/item/proc/afterattack()
|
||||
@@ -119,15 +119,8 @@
|
||||
src.pickup(user)
|
||||
user.lastDblClick = world.time + 2
|
||||
user.next_move = world.time + 2
|
||||
src.loc = user
|
||||
src.layer = 20
|
||||
add_fingerprint(user)
|
||||
if (user.hand)
|
||||
user.l_hand = src
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = src
|
||||
user.update_inv_r_hand()
|
||||
user.put_in_active_hand(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -158,14 +151,8 @@
|
||||
src.pickup(user)
|
||||
user.lastDblClick = world.time + 2
|
||||
user.next_move = world.time + 2
|
||||
src.loc = user
|
||||
src.layer = 20
|
||||
if (user.hand)
|
||||
user.l_hand = src
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.r_hand = src
|
||||
user.update_inv_r_hand()
|
||||
|
||||
user.put_in_active_hand(src)
|
||||
return
|
||||
|
||||
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
return
|
||||
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
equipped(var/mob/user, var/slot)
|
||||
if( (slot=="l_hand") || (slot=="r_hand") ) return
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -29,13 +31,7 @@
|
||||
if(!istype(focus,/obj/item)) return
|
||||
if(!check_path()) return//No clear path
|
||||
|
||||
if(user.hand == src)
|
||||
user.l_hand = focus
|
||||
else
|
||||
user.r_hand = focus
|
||||
|
||||
focus.loc = user
|
||||
focus.layer = 20
|
||||
user.put_in_hands(focus)
|
||||
add_fingerprint(user)
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_r_hand()
|
||||
@@ -117,7 +113,7 @@
|
||||
/*
|
||||
if(istype(user, /mob/living/carbon))
|
||||
if(user:mutations & TK && get_dist(source, user) <= 7)
|
||||
if(user:equipped()) return 0
|
||||
if(user:get_active_hand()) return 0
|
||||
var/X = source:x
|
||||
var/Y = source:y
|
||||
var/Z = source:z
|
||||
|
||||
@@ -13,17 +13,13 @@
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
switch(over_object.name)
|
||||
if("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_inv_l_hand()
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -92,17 +92,7 @@ FINGERPRINT CARD
|
||||
if (href_list["remove"])
|
||||
var/obj/item/P = locate(href_list["remove"])
|
||||
if ((P && P.loc == src))
|
||||
if ((usr.hand && !( usr.l_hand )))
|
||||
usr.l_hand = P
|
||||
P.loc = usr
|
||||
P.layer = 20
|
||||
usr.update_inv_l_hand()
|
||||
else
|
||||
if (!( usr.r_hand ))
|
||||
usr.r_hand = P
|
||||
P.loc = usr
|
||||
P.layer = 20
|
||||
usr.update_inv_r_hand()
|
||||
usr.put_in_hands(P)
|
||||
src.add_fingerprint(usr)
|
||||
P.add_fingerprint(usr)
|
||||
src.update()
|
||||
@@ -150,7 +140,7 @@ FINGERPRINT CARD
|
||||
else
|
||||
if (istype(P, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Holder Label:", text("[]", src.name), null) as text
|
||||
if (user.equipped() != P)
|
||||
if (user.get_active_hand() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
@@ -209,11 +199,7 @@ FINGERPRINT CARD
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user )
|
||||
F.amount = 1
|
||||
src.amount--
|
||||
if (user.hand)
|
||||
user.l_hand = F
|
||||
else
|
||||
user.r_hand = F
|
||||
F.layer = 20
|
||||
user.put_in_hands(F)
|
||||
F.add_fingerprint(user)
|
||||
if (src.amount < 1)
|
||||
//SN src = null
|
||||
@@ -244,7 +230,7 @@ FINGERPRINT CARD
|
||||
else
|
||||
if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Card Label:", text("[]", src.name), null) as text
|
||||
if (user.equipped() != W)
|
||||
if (user.get_active_hand() != W)
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
|
||||
@@ -71,14 +71,7 @@ ZIPPO
|
||||
return
|
||||
else
|
||||
src.matchcount--
|
||||
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
|
||||
user.put_in_active_hand(new /obj/item/weapon/match(user))
|
||||
else
|
||||
return ..()
|
||||
if(src.matchcount <= 0)
|
||||
@@ -430,13 +423,7 @@ ZIPPO
|
||||
cigcount--
|
||||
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
|
||||
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
|
||||
user.put_in_active_hand(W)
|
||||
else
|
||||
return ..()
|
||||
update_icon()
|
||||
|
||||
@@ -30,7 +30,7 @@ CRITTER GRENADE
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if((user.equipped() == src)&&(!active)&&(clown_check(user)))
|
||||
if((user.get_active_hand() == src)&&(!active)&&(clown_check(user)))
|
||||
user << "\red You prime the emp grenade! [det_time/10] seconds!"
|
||||
src.active = 1
|
||||
src.icon_state = "empar"
|
||||
@@ -130,7 +130,7 @@ CRITTER GRENADE
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if((user.equipped() == src)&&(!active)&&(clown_check(user)))
|
||||
if((user.get_active_hand() == src)&&(!active)&&(clown_check(user)))
|
||||
user << "\red You prime the flashbang! [det_time/10] seconds!"
|
||||
src.active = 1
|
||||
src.icon_state = "flashbang1"
|
||||
@@ -302,7 +302,7 @@ CRITTER GRENADE
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if((user.equipped() == src)&&(!active))
|
||||
if((user.get_active_hand() == src)&&(!active))
|
||||
//world << "cluster after attack"
|
||||
arm(user)
|
||||
user.dir = get_dir(user, target)
|
||||
@@ -409,7 +409,7 @@ CRITTER GRENADE
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if((user.equipped() == src)&&(!active)&&(clown_check(user)))
|
||||
if((user.get_active_hand() == src)&&(!active)&&(clown_check(user)))
|
||||
user << "\red You prime the delivery grenade! [det_time/10] seconds!"
|
||||
src.active = 1
|
||||
src.icon_state = "delivery1"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
..()
|
||||
if (istype(I, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
if (user.equipped() != I)
|
||||
if (user.get_active_hand() != I)
|
||||
return
|
||||
if((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
var/obj/item/weapon/melee/energy/blade/swordspawn = new /obj/item/weapon/melee/energy/blade
|
||||
if(!source.get_active_hand())
|
||||
source.put_in_hand(swordspawn)
|
||||
source.put_in_hands(swordspawn)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, source.loc)
|
||||
|
||||
@@ -26,18 +26,11 @@
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
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
|
||||
user.put_in_active_hand(case)
|
||||
|
||||
src.case.add_fingerprint(user)
|
||||
src.case = null
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_r_hand()
|
||||
|
||||
src.add_fingerprint(user)
|
||||
update()
|
||||
else
|
||||
|
||||
@@ -53,7 +53,7 @@ var/global/list/cached_icons = list()
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white")
|
||||
if ((user.equipped() != src || user.stat || user.restrained()))
|
||||
if ((user.get_active_hand() != src || user.stat || user.restrained()))
|
||||
return
|
||||
switch(t1)
|
||||
if("red")
|
||||
|
||||
@@ -26,8 +26,8 @@ RACK PARTS
|
||||
user << "\red You need at least four rods to do this."
|
||||
|
||||
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
|
||||
var/obj/structure/table/T = new /obj/structure/table( user.loc )
|
||||
T.add_fingerprint(usr)
|
||||
new /obj/structure/table( user.loc )
|
||||
user.drop_item()
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -35,11 +35,11 @@ RACK PARTS
|
||||
/obj/item/weapon/table_parts/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/wood( src.loc )
|
||||
//SN src = null
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
|
||||
new /obj/structure/table/woodentable( user.loc )
|
||||
user.drop_item()
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -49,11 +49,11 @@ RACK PARTS
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( src.loc )
|
||||
new /obj/item/stack/rods( src.loc )
|
||||
//SN src = null
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/table_parts/reinforced/attack_self(mob/user as mob)
|
||||
new /obj/structure/table/reinforced( user.loc )
|
||||
user.drop_item()
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -73,5 +73,6 @@ RACK PARTS
|
||||
/obj/item/weapon/rack_parts/attack_self(mob/user as mob)
|
||||
var/obj/structure/rack/R = new /obj/structure/rack( user.loc )
|
||||
R.add_fingerprint(user)
|
||||
user.drop_item()
|
||||
del(src)
|
||||
return
|
||||
@@ -122,7 +122,7 @@ Frequency:
|
||||
if(turfs.len)
|
||||
L["None (Dangerous)"] = pick(turfs)
|
||||
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") in L
|
||||
if ((user.equipped() != src || user.stat || user.restrained()))
|
||||
if ((user.get_active_hand() != src || user.stat || user.restrained()))
|
||||
return
|
||||
var/count = 0 //num of portals from this teleport in world
|
||||
for(var/obj/effect/portal/PO in world)
|
||||
|
||||
@@ -25,14 +25,9 @@
|
||||
|
||||
/obj/item/weapon/twohanded/dropped(mob/user as mob)
|
||||
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
|
||||
//bit of a hack but it keeps other code pretty neat and with fewer conditionals
|
||||
var/obj/item/weapon/twohanded/O
|
||||
if(user)
|
||||
if(user.l_hand)
|
||||
O = user.l_hand
|
||||
else
|
||||
O = user.r_hand
|
||||
if(O && istype(O))
|
||||
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
return unwield()
|
||||
|
||||
@@ -67,11 +62,7 @@
|
||||
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
|
||||
O.name = "[initial(name)] - offhand"
|
||||
O.desc = "Your second grip on the [initial(name)]"
|
||||
if(user.hand)
|
||||
user.r_hand = O ///Place dat offhand in the opposite hand
|
||||
else
|
||||
user.l_hand = O
|
||||
O.layer = 20
|
||||
user.put_in_inactive_hand(O)
|
||||
return
|
||||
|
||||
///////////OFFHAND///////////////
|
||||
|
||||
@@ -32,7 +32,6 @@ PHOTOGRAPHS
|
||||
src.add_fingerprint(user)
|
||||
if (src.amount <= 0)
|
||||
new /obj/item/weapon/c_tube( src.loc )
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
@@ -67,7 +66,7 @@ PHOTOGRAPHS
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to wrap [target.name] ([target.ckey])</font>")
|
||||
|
||||
else
|
||||
user << "/blue You need more paper."
|
||||
user << "\blue You need more paper."
|
||||
else
|
||||
user << "Theyre moving around too much. a Straitjacket would help."
|
||||
|
||||
@@ -78,18 +77,12 @@ PHOTOGRAPHS
|
||||
// GIFTS
|
||||
|
||||
/obj/item/weapon/gift/attack_self(mob/user as mob)
|
||||
if(!src.gift)
|
||||
user << "\blue The gift was empty!"
|
||||
del(src)
|
||||
src.gift.loc = user
|
||||
if (user.hand)
|
||||
user.l_hand = src.gift
|
||||
user.update_inv_l_hand()
|
||||
user.drop_item()
|
||||
if(src.gift)
|
||||
user.put_in_active_hand(gift)
|
||||
src.gift.add_fingerprint(user)
|
||||
else
|
||||
user.r_hand = src.gift
|
||||
user.update_inv_r_hand()
|
||||
src.gift.layer = 20
|
||||
src.gift.add_fingerprint(user)
|
||||
user << "\blue The gift was empty!"
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -107,7 +100,7 @@ PHOTOGRAPHS
|
||||
..()
|
||||
|
||||
if (!istype(W, /obj/item/weapon/wirecutters))
|
||||
user << "/blue I need wirecutters for that."
|
||||
user << "\blue I need wirecutters for that."
|
||||
return
|
||||
|
||||
user << "\blue You cut open the present."
|
||||
@@ -125,67 +118,32 @@ PHOTOGRAPHS
|
||||
switch(pick("flash", "t_gun", "l_gun", "shield", "sword", "axe"))
|
||||
if("flash")
|
||||
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
|
||||
M.put_in_active_hand(W)
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if("l_gun")
|
||||
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
|
||||
M.put_in_active_hand(W)
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if("t_gun")
|
||||
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
|
||||
M.put_in_active_hand(W)
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if("sword")
|
||||
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
|
||||
M.put_in_active_hand(W)
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if("axe")
|
||||
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
|
||||
M.put_in_active_hand(W)
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
@@ -195,7 +153,6 @@ PHOTOGRAPHS
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/bedsheet))
|
||||
//W = null
|
||||
del(W)
|
||||
src.amount++
|
||||
return
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (user.equipped() == src)
|
||||
if (user.get_active_hand() == src)
|
||||
if ((CLUMSY in usr.mutations) && prob(50))
|
||||
user << "\red Huh? How does this thing work?!"
|
||||
src.state = 1
|
||||
|
||||
@@ -50,28 +50,23 @@
|
||||
if (istype(W, /obj/item/clothing/head/helmet))
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'assemblies.dmi'
|
||||
user.u_equip(W)
|
||||
W.loc = A
|
||||
A.part1 = W
|
||||
W.layer = initial(W.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= W
|
||||
if (user.r_hand == W)
|
||||
user.u_equip(W)
|
||||
user.r_hand = A
|
||||
user.update_inv_r_hand()
|
||||
|
||||
if(user.r_hand == W)
|
||||
user.put_in_r_hand(A)
|
||||
else
|
||||
user.u_equip(W)
|
||||
user.l_hand = A
|
||||
user.update_inv_l_hand()
|
||||
user.put_in_l_hand(A)
|
||||
|
||||
W.master = A
|
||||
src.master = A
|
||||
src.layer = initial(src.layer)
|
||||
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
|
||||
src.loc = A
|
||||
A.part2 = src
|
||||
A.layer = 20
|
||||
|
||||
src.add_fingerprint(user)
|
||||
A.add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -189,21 +189,14 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
// now transform the regular radio, into a (disguised)syndicate uplink!
|
||||
var/obj/item/device/uplink/radio/T = traitorradio
|
||||
var/obj/item/device/radio/R = src
|
||||
|
||||
usr.u_equip(R)
|
||||
R.loc = T
|
||||
T.loc = usr
|
||||
R.layer = 0
|
||||
if (usr.client)
|
||||
usr.client.screen -= R
|
||||
if (usr.r_hand == R)
|
||||
usr.u_equip(R)
|
||||
usr.r_hand = T
|
||||
usr.update_inv_r_hand()
|
||||
if(usr.r_hand == R)
|
||||
usr.put_in_r_hand(T)
|
||||
else
|
||||
usr.u_equip(R)
|
||||
usr.l_hand = T
|
||||
usr.update_inv_l_hand()
|
||||
R.loc = T
|
||||
T.layer = 20
|
||||
usr.put_in_l_hand(T)
|
||||
|
||||
T.attack_self(usr)
|
||||
return
|
||||
else if (href_list["talk"])
|
||||
@@ -219,7 +212,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
channels[chan_name] |= FREQ_LISTENING
|
||||
else if (href_list["wires"])
|
||||
var/t1 = text2num(href_list["wires"])
|
||||
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
return
|
||||
if (wires & t1)
|
||||
wires &= ~t1
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
pinned_target.loc = user.loc
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hand(pinned_target)
|
||||
user.put_in_hands(pinned_target)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
pinned_target.loc = get_turf_loc(user)
|
||||
@@ -119,7 +119,7 @@
|
||||
loc = user.loc
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hand(src)
|
||||
user.put_in_hands(src)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
src.loc = get_turf_loc(user)
|
||||
|
||||
@@ -38,7 +38,7 @@ SHARDS
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
G.use(1)
|
||||
if (!G && !RG && replace)
|
||||
user.put_in_hand(RG)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ FLOOR TILES
|
||||
var/replace = (user.get_inactive_hand()==R)
|
||||
R.use(2)
|
||||
if (!R && replace)
|
||||
user.put_in_hand(new_item)
|
||||
user.put_in_hands(new_item)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
if (user.get_inactive_hand() == src)
|
||||
var/obj/item/stack/F = new src.type( user, amount=1)
|
||||
F.copy_evidences(src)
|
||||
user.put_in_hand(F)
|
||||
user.put_in_hands(F)
|
||||
src.add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
use(1)
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
/obj/item/stack/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.restrained() || usr.stat || usr.equipped() != src))
|
||||
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
|
||||
return
|
||||
if (href_list["make"])
|
||||
if (src.amount < 1) del(src) //Never should happen
|
||||
@@ -204,7 +204,7 @@
|
||||
usr.before_take_item(oldsrc)
|
||||
del(oldsrc)
|
||||
if (istype(O,/obj/item))
|
||||
usr.put_in_hand(O)
|
||||
usr.put_in_hands(O)
|
||||
O.add_fingerprint(usr)
|
||||
//BubbleWrap - so newly formed boxes are empty
|
||||
if ( istype(O, /obj/item/weapon/storage) )
|
||||
|
||||
+11
-11
@@ -49,8 +49,8 @@
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = 0
|
||||
buckled_mob.lying = 0
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob = null
|
||||
return
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai)))
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
return
|
||||
|
||||
unbuckle()
|
||||
@@ -89,10 +89,10 @@
|
||||
"\blue [M.name] is buckled in to [src] by [user.name]!",\
|
||||
"You are buckled in to [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
M.anchored = 1
|
||||
M.buckled = src
|
||||
M.loc = src.loc
|
||||
M.dir = src.dir
|
||||
M.update_canmove()
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
@@ -100,8 +100,6 @@
|
||||
/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.update_icons() //update our icons to reflect our lying/standing status
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/attack_paw(mob/user as mob)
|
||||
@@ -137,7 +135,6 @@
|
||||
/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
|
||||
@@ -155,7 +152,7 @@
|
||||
buckled_mob.loc = src.loc
|
||||
|
||||
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
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)))
|
||||
if ( !ismob(M) || (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
|
||||
density = 1
|
||||
@@ -165,9 +162,12 @@
|
||||
|
||||
/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.anchored = 0
|
||||
buckled_mob.buckled = null
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob = null
|
||||
density = 0
|
||||
icon_state = "down"
|
||||
..()
|
||||
|
||||
@@ -5,17 +5,13 @@
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
switch(over_object.name)
|
||||
if("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_inv_l_hand()
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -23,17 +23,13 @@
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!M.restrained() && !M.stat && can_use())
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
switch(over_object.name)
|
||||
if("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_inv_l_hand()
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
@@ -94,17 +94,13 @@
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
if ((!( M.restrained() ) && !( M.stat )))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
switch(over_object.name)
|
||||
if("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_inv_l_hand()
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -33,9 +33,8 @@
|
||||
user.show_message(text("\red <B>You reach into the [src.name], but there was a live mousetrap in there!</B>"), 1)
|
||||
else
|
||||
user.show_message(text("\red <B>[user] reaches into the [src.name] and sets off a hidden mousetrap!</B>"), 1)
|
||||
MT.loc = user.loc
|
||||
user.drop_from_inventory(MT)
|
||||
MT.triggered(user, user.hand ? "l_hand" : "r_hand")
|
||||
MT.layer = OBJ_LAYER
|
||||
return
|
||||
user.client.screen -= src.boxes
|
||||
user.client.screen -= src.closer
|
||||
@@ -207,11 +206,11 @@
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.l_store == src && !H.get_active_hand())
|
||||
H.put_in_hand(src)
|
||||
H.put_in_hands(src)
|
||||
H.l_store = null
|
||||
return
|
||||
if(H.r_store == src && !H.get_active_hand())
|
||||
H.put_in_hand(src)
|
||||
H.put_in_hands(src)
|
||||
H.r_store = null
|
||||
return
|
||||
|
||||
@@ -370,17 +369,13 @@
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
if ((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
switch(over_object.name)
|
||||
if("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_inv_l_hand()
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -125,7 +125,7 @@ TABLE AND RACK OBJECT INTERATIONS
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
@@ -323,7 +323,7 @@ TABLE AND RACK OBJECT INTERATIONS
|
||||
return 0
|
||||
|
||||
/obj/structure/rack/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
@@ -41,17 +41,13 @@ CRAYONS
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
if ((!( M.restrained() ) && !( M.stat )))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
switch(over_object.name)
|
||||
if("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_inv_l_hand()
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -528,7 +528,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
var/mob/L = src.loc
|
||||
R.loc = T
|
||||
T.loc = L
|
||||
// R.layer = initial(R.layer)
|
||||
// R.layer = initial(R.layer) //TODO: CARN
|
||||
R.layer = 0
|
||||
if (istype(L))
|
||||
if (L.client)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
I.loc = user.loc
|
||||
user.put_in_hand(I)
|
||||
user.put_in_hands(I)
|
||||
else
|
||||
I.loc = get_turf(src)
|
||||
user << "<span class='notice'>You find \an [I] in the cistern.</span>"
|
||||
|
||||
+5
-12
@@ -1,17 +1,10 @@
|
||||
/mob/living/carbon/proc/toggle_throw_mode()
|
||||
var/W = equipped()
|
||||
var/obj/item/W = get_active_hand()
|
||||
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
|
||||
var/obj/item/tk_grab/O = new(src)
|
||||
put_in_active_hand(O)
|
||||
O.host = src
|
||||
return
|
||||
|
||||
if( istype(W,/obj/item/tk_grab) )
|
||||
@@ -39,7 +32,7 @@
|
||||
return
|
||||
if(target.type == /obj/screen) return
|
||||
|
||||
var/atom/movable/item = src.equipped()
|
||||
var/atom/movable/item = src.get_active_hand()
|
||||
|
||||
if(!item) return
|
||||
|
||||
|
||||
+14
-14
@@ -567,7 +567,7 @@
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == WT )
|
||||
if( user.loc == T && user.get_active_hand() == WT )
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
else
|
||||
@@ -584,7 +584,7 @@
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
@@ -601,7 +601,7 @@
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
@@ -620,7 +620,7 @@
|
||||
sleep(70)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !EB || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
EB.spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(src.loc, 'blade1.ogg', 50, 1)
|
||||
@@ -711,7 +711,7 @@
|
||||
sleep(40)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 1 && user.loc == T && user.equipped() == W )
|
||||
if( d_state == 1 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 2
|
||||
src.icon_state = "r_wall-2"
|
||||
user << "<span class='notice'>You remove the support lines.</span>"
|
||||
@@ -741,7 +741,7 @@
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||
|
||||
if( d_state == 2 && user.loc == T && user.equipped() == WT )
|
||||
if( d_state == 2 && user.loc == T && user.get_active_hand() == WT )
|
||||
src.d_state = 3
|
||||
src.icon_state = "r_wall-3"
|
||||
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
|
||||
@@ -757,7 +757,7 @@
|
||||
sleep(40)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 2 && user.loc == T && user.equipped() == W )
|
||||
if( d_state == 2 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 3
|
||||
src.icon_state = "r_wall-3"
|
||||
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
|
||||
@@ -772,7 +772,7 @@
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 3 && user.loc == T && user.equipped() == W )
|
||||
if( d_state == 3 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 4
|
||||
src.icon_state = "r_wall-4"
|
||||
user << "<span class='notice'>You pry off the cover.</span>"
|
||||
@@ -787,7 +787,7 @@
|
||||
sleep(40)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 4 && user.loc == T && user.equipped() == W )
|
||||
if( d_state == 4 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 5
|
||||
src.icon_state = "r_wall-5"
|
||||
user << "<span class='notice'>You remove the bolts anchoring the support rods.</span>"
|
||||
@@ -804,7 +804,7 @@
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||
|
||||
if( d_state == 5 && user.loc == T && user.equipped() == WT )
|
||||
if( d_state == 5 && user.loc == T && user.get_active_hand() == WT )
|
||||
src.d_state = 6
|
||||
src.icon_state = "r_wall-6"
|
||||
new /obj/item/stack/rods( src )
|
||||
@@ -821,7 +821,7 @@
|
||||
sleep(70)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( d_state == 5 && user.loc == T && user.equipped() == W )
|
||||
if( d_state == 5 && user.loc == T && user.get_active_hand() == W )
|
||||
src.d_state = 6
|
||||
src.icon_state = "r_wall-6"
|
||||
new /obj/item/stack/rods( src )
|
||||
@@ -837,7 +837,7 @@
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>You pry off the outer sheath.</span>"
|
||||
dismantle_wall()
|
||||
return
|
||||
@@ -852,7 +852,7 @@
|
||||
sleep(200)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !W || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == W )
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
|
||||
dismantle_wall()
|
||||
|
||||
@@ -865,7 +865,7 @@
|
||||
sleep( max(20*d_state,100) ) //time taken to repair is proportional to the damage! (max 10 seconds)
|
||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !MS || !T ) return
|
||||
|
||||
if( user.loc == T && user.equipped() == MS && d_state )
|
||||
if( user.loc == T && user.get_active_hand() == MS && d_state )
|
||||
src.d_state = 0
|
||||
src.icon_state = "r_wall"
|
||||
relativewall_neighbours() //call smoothwall stuff
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/W in M)
|
||||
M.drop_from_slot(W)
|
||||
M.drop_from_inventory(W)
|
||||
|
||||
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
|
||||
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
|
||||
@@ -28,7 +28,7 @@
|
||||
return
|
||||
//strip their stuff before they teleport into a cell :downs:
|
||||
for(var/obj/item/W in M)
|
||||
M.drop_from_slot(W)
|
||||
M.drop_from_inventory(W)
|
||||
//teleport person to cell
|
||||
M.Paralyse(5)
|
||||
sleep(5) //so they black out before warping
|
||||
|
||||
@@ -989,7 +989,7 @@ datum
|
||||
for(var/mob/living/carbon/metroid/M in T)
|
||||
M.adjustToxLoss(rand(5,10))
|
||||
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //TODO: CARN
|
||||
M.clean_blood()
|
||||
if(istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
|
||||
@@ -1384,43 +1384,43 @@
|
||||
switch(trash)
|
||||
if ("raisins")
|
||||
var/obj/item/trash/raisins/T = new /obj/item/trash/raisins/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("candy")
|
||||
var/obj/item/trash/candy/T = new /obj/item/trash/candy/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("cheesie")
|
||||
var/obj/item/trash/cheesie/T = new /obj/item/trash/cheesie/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("chips")
|
||||
var/obj/item/trash/chips/T = new /obj/item/trash/chips/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("popcorn")
|
||||
var/obj/item/trash/popcorn/T = new /obj/item/trash/popcorn/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("sosjerky")
|
||||
var/obj/item/trash/sosjerky/T = new /obj/item/trash/sosjerky/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("syndi_cakes")
|
||||
var/obj/item/trash/syndi_cakes/T = new /obj/item/trash/syndi_cakes/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("waffles")
|
||||
var/obj/item/trash/waffles/T = new /obj/item/trash/waffles/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("plate")
|
||||
var/obj/item/trash/plate/T = new /obj/item/trash/plate/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("snack_bowl")
|
||||
var/obj/item/trash/snack_bowl/T = new /obj/item/trash/snack_bowl/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("pistachios")
|
||||
var/obj/item/trash/pistachios/T = new /obj/item/trash/pistachios/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("semki")
|
||||
var/obj/item/trash/semki/T = new /obj/item/trash/semki/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
if ("tray")
|
||||
var/obj/item/trash/tray/T = new /obj/item/trash/tray/( M )
|
||||
M.put_in_hand(T)
|
||||
M.put_in_hands(T)
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -1431,6 +1431,7 @@
|
||||
attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
|
||||
user << "\red None of [src] left, oh no!"
|
||||
M.drop_from_inventory(src) //so icons update :[
|
||||
del(src)
|
||||
return 0
|
||||
if(istype(M, /mob/living/carbon))
|
||||
@@ -1491,6 +1492,7 @@
|
||||
if(!reagents.total_volume)
|
||||
if(M == user) user << "\red You finish eating [src]."
|
||||
else user << "\red [M] finishes eating [src]."
|
||||
M.drop_from_inventory(src) //so icons update :[
|
||||
del(src)
|
||||
playsound(M.loc,'eatfood.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
@@ -1833,22 +1835,14 @@
|
||||
|
||||
attackby(var/obj/D, mob/user as mob)
|
||||
if(isprox(D))
|
||||
var/obj/item/weapon/bucket_sensor/B = new /obj/item/weapon/bucket_sensor
|
||||
B.loc = user
|
||||
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"
|
||||
user << "You add [D] to [src]."
|
||||
del(D)
|
||||
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/cantister
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/glass/canister //not used apparantly
|
||||
desc = "It's a canister. Mainly used for transporting fuel."
|
||||
name = "canister"
|
||||
icon = 'tank.dmi'
|
||||
@@ -1862,7 +1856,7 @@
|
||||
possible_transfer_amounts = list(10,20,30,60)
|
||||
volume = 120
|
||||
flags = FPRINT
|
||||
|
||||
*/
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/dispenser
|
||||
name = "reagent glass"
|
||||
|
||||
@@ -148,7 +148,7 @@ obj/machinery/computer/forensic_scanning
|
||||
temp = "Eject Failed: No Object"
|
||||
if("insert")
|
||||
var/mob/M = usr
|
||||
var/obj/item/I = M.equipped()
|
||||
var/obj/item/I = M.get_active_hand()
|
||||
if(I && istype(I))
|
||||
if(istype(I, /obj/item/weapon/evidencebag))
|
||||
scanning = I.contents[1]
|
||||
@@ -163,7 +163,7 @@ obj/machinery/computer/forensic_scanning
|
||||
usr << "Invalid Object Rejected."
|
||||
if("card") //Processing a fingerprint card.
|
||||
var/mob/M = usr
|
||||
var/obj/item/I = M.equipped()
|
||||
var/obj/item/I = M.get_active_hand()
|
||||
if(!(I && istype(I,/obj/item/weapon/f_card)))
|
||||
I = card
|
||||
if(I && istype(I,/obj/item/weapon/f_card))
|
||||
|
||||
@@ -347,16 +347,20 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
|
||||
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
|
||||
|
||||
/proc/fake_attack(var/mob/target)
|
||||
var/list/possible_clones = new/list()
|
||||
// var/list/possible_clones = new/list()
|
||||
var/mob/living/carbon/human/clone = null
|
||||
var/clone_weapon = null
|
||||
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if(H.stat || H.lying) continue
|
||||
possible_clones += H
|
||||
// possible_clones += H
|
||||
clone = H
|
||||
break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
|
||||
|
||||
// if(!possible_clones.len) return
|
||||
// clone = pick(possible_clones)
|
||||
if(!clone) return
|
||||
|
||||
if(!possible_clones.len) return
|
||||
clone = pick(possible_clones)
|
||||
//var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
|
||||
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(target.loc)
|
||||
if(clone.l_hand)
|
||||
|
||||
@@ -636,7 +636,7 @@
|
||||
var/mob/M = usr
|
||||
var/obj/item/stack/rods/W = new /obj/item/stack/rods( M )
|
||||
M << "\blue You lick clean the rod."
|
||||
M.put_in_hand(W)
|
||||
M.put_in_hands(W)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeykabob
|
||||
name = "Meat-kabob"
|
||||
@@ -651,7 +651,7 @@
|
||||
var/mob/M = usr
|
||||
var/obj/item/stack/rods/W = new /obj/item/stack/rods( M )
|
||||
M << "\blue You lick clean the rod."
|
||||
M.put_in_hand(W)
|
||||
M.put_in_hands(W)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tofukabob
|
||||
name = "Tofu-kabob"
|
||||
@@ -666,7 +666,7 @@
|
||||
var/mob/M = usr
|
||||
var/obj/item/stack/rods/W = new /obj/item/stack/rods( M )
|
||||
M << "\blue You lick clean the rod."
|
||||
M.put_in_hand(W)
|
||||
M.put_in_hands(W)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cubancarp
|
||||
name = "Cuban Carp"
|
||||
@@ -813,7 +813,7 @@
|
||||
"\blue [M] takes a piece of paper from the cookie!", \
|
||||
"\blue You take a piece of paper from the cookie! Read it!" \
|
||||
)
|
||||
M.put_in_hand(paper)
|
||||
M.put_in_hands(paper)
|
||||
paper.add_fingerprint(M)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/badrecipe
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
playsound(src.loc, 'rustle1.ogg', 50, 1) //russle sounds sounded better
|
||||
|
||||
sleep(40)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
if ((user.loc == T && user.get_active_hand() == W))
|
||||
user << "\blue You dug a hole."
|
||||
gets_dug()
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
playsound(src.loc, 'rustle1.ogg', 50, 1) //russle sounds sounded better
|
||||
|
||||
sleep(30)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
if ((user.loc == T && user.get_active_hand() == W))
|
||||
user << "\blue You dug a hole."
|
||||
gets_dug()
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
playsound(src.loc, 'rustle1.ogg', 50, 1) //russle sounds sounded better
|
||||
|
||||
sleep(0)
|
||||
if ((user.loc == T && user.equipped() == W))
|
||||
if ((user.loc == T && user.get_active_hand() == W))
|
||||
user << "\blue You dug a hole."
|
||||
gets_dug()
|
||||
|
||||
|
||||
+131
-95
@@ -1,116 +1,152 @@
|
||||
//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting l_hand = ...etc
|
||||
//as they handle all relevant stuff like adding it to the player's screen and updating their overlays.
|
||||
|
||||
//Returns the thing in our active hand
|
||||
/mob/proc/get_active_hand()
|
||||
if (hand)
|
||||
return l_hand
|
||||
else
|
||||
return r_hand
|
||||
if(hand) return l_hand
|
||||
else return r_hand
|
||||
|
||||
//Returns the thing in our inactive hand
|
||||
/mob/proc/get_inactive_hand()
|
||||
if (!hand)
|
||||
return l_hand
|
||||
else
|
||||
return r_hand
|
||||
if(hand) return r_hand
|
||||
else return l_hand
|
||||
|
||||
/mob/proc/put_in_hand(var/obj/item/I)
|
||||
if(!I) return
|
||||
I.loc = src
|
||||
if (hand)
|
||||
l_hand = I
|
||||
|
||||
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_l_hand(var/obj/item/W)
|
||||
if(!W) return 0
|
||||
if(lying) return 0
|
||||
if(!l_hand)
|
||||
W.loc = src //TODO: move to equipped?
|
||||
l_hand = W
|
||||
W.layer = 20 //TODO: move to equipped?
|
||||
// l_hand.screen_loc = ui_lhand
|
||||
W.equipped(src,"l_hand")
|
||||
if(client) client.screen |= W
|
||||
update_inv_l_hand()
|
||||
else
|
||||
r_hand = I
|
||||
update_inv_r_hand()
|
||||
I.layer = 20
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/proc/put_in_hands(var/obj/item/I) //A suprisingly useful proc. Allows a simple way to place an object in a mob's hands, or, if they are full, on the ground below them.
|
||||
//Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_r_hand(var/obj/item/W)
|
||||
if(!W) return 0
|
||||
if(lying) return 0
|
||||
if(!r_hand)
|
||||
I.loc = src
|
||||
r_hand = I
|
||||
W.loc = src
|
||||
r_hand = W
|
||||
W.layer = 20
|
||||
// r_hand.screen_loc = ui_rhand
|
||||
W.equipped(src,"r_hand")
|
||||
if(client) client.screen |= W
|
||||
update_inv_r_hand()
|
||||
I.layer = 20
|
||||
else if(!l_hand)
|
||||
I.loc = src
|
||||
l_hand = I
|
||||
update_inv_l_hand()
|
||||
I.layer = 20
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Puts the item into our active hand if possible. returns 1 on success.
|
||||
/mob/proc/put_in_active_hand(var/obj/item/W)
|
||||
if(hand) return put_in_l_hand(W)
|
||||
else return put_in_r_hand(W)
|
||||
|
||||
//Puts the item into our inactive hand if possible. returns 1 on success.
|
||||
/mob/proc/put_in_inactive_hand(var/obj/item/W)
|
||||
if(hand) return put_in_r_hand(W)
|
||||
else return put_in_l_hand(W)
|
||||
|
||||
//Puts the item our active hand if possible. Failing that it tries our inactive hand. Returns 1 on success.
|
||||
//If both fail it drops it on the floor and returns 0.
|
||||
//This is probably the main one you need to know :)
|
||||
/mob/proc/put_in_hands(var/obj/item/W)
|
||||
if(!W) return 0
|
||||
if(put_in_active_hand(W)) return 1
|
||||
else if(put_in_inactive_hand(W)) return 1
|
||||
else
|
||||
I.loc = get_turf(src)
|
||||
W.loc = get_turf(src)
|
||||
return 0
|
||||
|
||||
/mob/proc/drop_item_v()
|
||||
if (stat == 0)
|
||||
drop_item()
|
||||
return
|
||||
|
||||
/mob/proc/drop_from_slot(var/obj/item/item)
|
||||
if(!item)
|
||||
return
|
||||
if(!(item in contents))
|
||||
return
|
||||
u_equip(item)
|
||||
if (client)
|
||||
client.screen -= item
|
||||
if (item)
|
||||
item.loc = loc
|
||||
item.dropped(src)
|
||||
if (item)
|
||||
item.layer = initial(item.layer)
|
||||
var/turf/T = get_turf(loc)
|
||||
if (istype(T))
|
||||
T.Entered(item)
|
||||
return
|
||||
|
||||
/mob/proc/drop_item(var/atom/target)
|
||||
var/obj/item/W = equipped()
|
||||
/mob/proc/drop_item_v() //this is dumb.
|
||||
if(stat == CONSCIOUS)
|
||||
return drop_item()
|
||||
return 0
|
||||
|
||||
if (W)
|
||||
|
||||
/mob/proc/drop_from_inventory(var/obj/item/W)
|
||||
if(W)
|
||||
if(client) client.screen -= W
|
||||
u_equip(W)
|
||||
update_icons()
|
||||
if (client)
|
||||
client.screen -= W
|
||||
if (W)
|
||||
W.layer = initial(W.layer)
|
||||
if(target)
|
||||
W.loc = target.loc
|
||||
else
|
||||
W.loc = loc
|
||||
W.dropped(src)
|
||||
var/turf/T = get_turf(loc)
|
||||
if (istype(T))
|
||||
T.Entered(W)
|
||||
return
|
||||
W.layer = initial(W.layer)
|
||||
W.loc = loc
|
||||
|
||||
/mob/proc/before_take_item(var/obj/item/item)
|
||||
item.loc = null
|
||||
item.layer = initial(item.layer)
|
||||
u_equip(item)
|
||||
//if (client)
|
||||
// client.screen -= item
|
||||
var/turf/T = get_turf(loc)
|
||||
if(isturf(T))
|
||||
T.Entered(W)
|
||||
|
||||
W.dropped(src)
|
||||
update_icons()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
//Drops the item in our left hand
|
||||
/mob/proc/drop_l_hand(var/atom/Target)
|
||||
if(l_hand)
|
||||
if(client) client.screen -= l_hand
|
||||
l_hand.layer = initial(l_hand.layer)
|
||||
|
||||
if(Target) l_hand.loc = Target.loc
|
||||
else l_hand.loc = loc
|
||||
|
||||
var/turf/T = get_turf(loc)
|
||||
if(isturf(T))
|
||||
T.Entered(l_hand)
|
||||
|
||||
l_hand.dropped(src)
|
||||
l_hand = null
|
||||
update_inv_l_hand()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Drops the item in our right hand
|
||||
/mob/proc/drop_r_hand(var/atom/Target)
|
||||
if(r_hand)
|
||||
if(client) client.screen -= r_hand
|
||||
r_hand.layer = initial(r_hand.layer)
|
||||
|
||||
if(Target) r_hand.loc = Target.loc
|
||||
else r_hand.loc = loc
|
||||
|
||||
var/turf/T = get_turf(Target)
|
||||
if(istype(T))
|
||||
T.Entered(r_hand)
|
||||
|
||||
r_hand.dropped(src)
|
||||
r_hand = null
|
||||
update_inv_r_hand()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Drops the item in our active hand.
|
||||
/mob/proc/drop_item(var/atom/Target)
|
||||
if(hand) return drop_l_hand(Target)
|
||||
else return drop_r_hand(Target)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//TODO: phase out this proc
|
||||
/mob/proc/before_take_item(var/obj/item/W) //TODO: what is this?
|
||||
W.loc = null
|
||||
W.layer = initial(W.layer)
|
||||
u_equip(W)
|
||||
update_icons()
|
||||
return
|
||||
|
||||
/mob/proc/put_in_inactive_hand(var/obj/item/I)
|
||||
I.loc = src
|
||||
if (!hand)
|
||||
l_hand = I
|
||||
update_inv_l_hand()
|
||||
else
|
||||
r_hand = I
|
||||
update_inv_r_hand()
|
||||
I.layer = 20
|
||||
|
||||
|
||||
/mob/proc/equipped()
|
||||
if(issilicon(src))
|
||||
if(isrobot(src))
|
||||
if(src:module_active)
|
||||
return src:module_active
|
||||
else
|
||||
if (hand)
|
||||
return l_hand
|
||||
else
|
||||
return r_hand
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/proc/u_equip(W as obj)
|
||||
if (W == r_hand)
|
||||
|
||||
@@ -401,14 +401,10 @@
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
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
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
update_inv_l_hand(0)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/db_click(text, t1)
|
||||
var/obj/item/W = equipped()
|
||||
var/obj/item/W = get_active_hand()
|
||||
var/emptyHand = (W == null)
|
||||
if ((!emptyHand) && (!istype(W, /obj/item)))
|
||||
return
|
||||
@@ -42,7 +42,7 @@
|
||||
return
|
||||
u_equip(W)
|
||||
wear_suit = W
|
||||
W.equipped(src, text)
|
||||
W.get_active_hand(src, text)
|
||||
*/
|
||||
if("head")
|
||||
if (head)
|
||||
@@ -57,7 +57,7 @@
|
||||
return
|
||||
u_equip(W)
|
||||
head = W
|
||||
W.equipped(src, text)
|
||||
W.get_active_hand(src, text)
|
||||
*/
|
||||
if("storage1")
|
||||
if (l_store)
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
|
||||
..()
|
||||
|
||||
if (src.stat != 2) //still breathing
|
||||
|
||||
|
||||
if (src.stat != DEAD) //still breathing
|
||||
|
||||
//First, resolve location and get a breath
|
||||
|
||||
@@ -62,36 +60,25 @@
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
//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()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
clamp_values()
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
clamp_values()
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
proc
|
||||
clamp_values()
|
||||
|
||||
SetStunned(min(stunned, 20))
|
||||
// SetStunned(min(stunned, 20))
|
||||
SetParalysis(min(paralysis, 20))
|
||||
SetWeakened(min(weakened, 20))
|
||||
// SetWeakened(min(weakened, 20))
|
||||
sleeping = max(min(sleeping, 20), 0)
|
||||
adjustBruteLoss(0)
|
||||
adjustToxLoss(0)
|
||||
@@ -256,10 +243,6 @@
|
||||
src.internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled) canmove = 0
|
||||
else canmove = 1
|
||||
|
||||
handle_breath(datum/gas_mixture/breath)
|
||||
if(src.nodamage)
|
||||
return
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
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
|
||||
// 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
|
||||
@@ -125,7 +125,7 @@
|
||||
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
|
||||
// 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
|
||||
|
||||
@@ -368,14 +368,10 @@
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
|
||||
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
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
|
||||
@@ -58,32 +58,26 @@
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
// Update clothing
|
||||
// regenerate_icons()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Yup.
|
||||
//Handles updating canmove.
|
||||
update_canmove()
|
||||
|
||||
clamp_values()
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
clamp_values()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva
|
||||
proc
|
||||
clamp_values()
|
||||
|
||||
SetStunned(min(stunned, 20))
|
||||
// SetStunned(min(stunned, 20))
|
||||
SetParalysis(min(paralysis, 20))
|
||||
SetWeakened(min(weakened, 20))
|
||||
// SetWeakened(min(weakened, 20))
|
||||
sleeping = max(min(sleeping, 20), 0)
|
||||
|
||||
handle_mutations_and_radiation()
|
||||
@@ -227,10 +221,6 @@
|
||||
internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled) canmove = 0
|
||||
else canmove = 1
|
||||
|
||||
handle_breath(datum/gas_mixture/breath)
|
||||
if(nodamage)
|
||||
return
|
||||
@@ -506,4 +496,4 @@
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!M.nodamage)
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
nutrition += 10
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user