mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Replaced before_take_item() and drop_from_inventory() with u_equip
This commit is contained in:
@@ -61,21 +61,21 @@ STI KALY - blind
|
|||||||
if(prob(chance))
|
if(prob(chance))
|
||||||
if(!istype(H.head, /obj/item/clothing/head/wizard))
|
if(!istype(H.head, /obj/item/clothing/head/wizard))
|
||||||
if(H.head)
|
if(H.head)
|
||||||
H.drop_from_inventory(H.head)
|
H.u_equip(H.head)
|
||||||
H.head = new /obj/item/clothing/head/wizard(H)
|
H.head = new /obj/item/clothing/head/wizard(H)
|
||||||
H.head.layer = 20
|
H.head.layer = 20
|
||||||
return
|
return
|
||||||
if(prob(chance))
|
if(prob(chance))
|
||||||
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe))
|
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe))
|
||||||
if(H.wear_suit)
|
if(H.wear_suit)
|
||||||
H.drop_from_inventory(H.wear_suit)
|
H.u_equip(H.wear_suit)
|
||||||
H.wear_suit = new /obj/item/clothing/suit/wizrobe(H)
|
H.wear_suit = new /obj/item/clothing/suit/wizrobe(H)
|
||||||
H.wear_suit.layer = 20
|
H.wear_suit.layer = 20
|
||||||
return
|
return
|
||||||
if(prob(chance))
|
if(prob(chance))
|
||||||
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
|
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
|
||||||
if(H.shoes)
|
if(H.shoes)
|
||||||
H.drop_from_inventory(H.shoes)
|
H.u_equip(H.shoes)
|
||||||
H.shoes = new /obj/item/clothing/shoes/sandal(H)
|
H.shoes = new /obj/item/clothing/shoes/sandal(H)
|
||||||
H.shoes.layer = 20
|
H.shoes.layer = 20
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -877,7 +877,7 @@ datum/mind
|
|||||||
switch(href_list["common"])
|
switch(href_list["common"])
|
||||||
if("undress")
|
if("undress")
|
||||||
for(var/obj/item/W in current)
|
for(var/obj/item/W in current)
|
||||||
current.drop_from_inventory(W)
|
current.u_equip(W)
|
||||||
if("takeuplink")
|
if("takeuplink")
|
||||||
take_uplink()
|
take_uplink()
|
||||||
memory = null//Remove any memory they may have had.
|
memory = null//Remove any memory they may have had.
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
magichead.voicechange = 1 //NEEEEIIGHH
|
magichead.voicechange = 1 //NEEEEIIGHH
|
||||||
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
|
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
|
||||||
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
|
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
|
||||||
target.drop_from_inventory(target.wear_mask)
|
target.u_equip(target.wear_mask)
|
||||||
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
|
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
|
||||||
|
|
||||||
flick("e_flash", target.flash)
|
flick("e_flash", target.flash)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
icon = 'icons/obj/weapons.dmi'
|
icon = 'icons/obj/weapons.dmi'
|
||||||
icon_state = "arm_blade"
|
icon_state = "arm_blade"
|
||||||
item_state = "arm_blade"
|
item_state = "arm_blade"
|
||||||
flags = ABSTRACT
|
flags = ABSTRACT | NODROP
|
||||||
w_class = 5.0
|
w_class = 5.0
|
||||||
force = 25
|
force = 25
|
||||||
throwforce = 0 //Just to be on the safe side
|
throwforce = 0 //Just to be on the safe side
|
||||||
|
|||||||
@@ -541,18 +541,20 @@ var/list/datum/dna/hivemind_bank = list()
|
|||||||
set name = "Arm Blade (20)"
|
set name = "Arm Blade (20)"
|
||||||
|
|
||||||
if(istype(l_hand, /obj/item/weapon/melee/arm_blade)) //Not the nicest way to do it, but eh
|
if(istype(l_hand, /obj/item/weapon/melee/arm_blade)) //Not the nicest way to do it, but eh
|
||||||
u_equip(l_hand)
|
del l_hand //Arm blades can't be dropped, we have to delete them directly.
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(r_hand, /obj/item/weapon/melee/arm_blade))
|
if(istype(r_hand, /obj/item/weapon/melee/arm_blade))
|
||||||
u_equip(r_hand)
|
del r_hand
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/changeling/changeling = changeling_power(20)
|
var/datum/changeling/changeling = changeling_power(20)
|
||||||
if(!changeling)
|
if(!changeling)
|
||||||
return
|
return
|
||||||
|
|
||||||
u_equip(get_active_hand())
|
if(!drop_item())
|
||||||
|
usr << "The [get_active_hand()] is stuck to your hand, you cannot grow a blade over it!"
|
||||||
|
return
|
||||||
|
|
||||||
put_in_hands(new /obj/item/weapon/melee/arm_blade(src))
|
put_in_hands(new /obj/item/weapon/melee/arm_blade(src))
|
||||||
changeling.geneticdamage += 6
|
changeling.geneticdamage += 6
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room."
|
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room."
|
||||||
else
|
else
|
||||||
for(var/obj/item/W in T)
|
for(var/obj/item/W in T)
|
||||||
T.drop_from_inventory(W)
|
T.u_equip(W)
|
||||||
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
|
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
|
||||||
T.invisibility = 101
|
T.invisibility = 101
|
||||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
|
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
|
||||||
|
|||||||
@@ -475,7 +475,7 @@
|
|||||||
magichead.canremove = 0 //curses!
|
magichead.canremove = 0 //curses!
|
||||||
magichead.flags_inv = null //so you can still see their face
|
magichead.flags_inv = null //so you can still see their face
|
||||||
magichead.voicechange = 1 //NEEEEIIGHH
|
magichead.voicechange = 1 //NEEEEIIGHH
|
||||||
user.drop_from_inventory(user.wear_mask)
|
user.u_equip(user.wear_mask)
|
||||||
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
|
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
|
||||||
del(src)
|
del(src)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
flick("autolathe_r",src)//plays glass insertion animation
|
flick("autolathe_r",src)//plays glass insertion animation
|
||||||
stack.use(amount)
|
stack.use(amount)
|
||||||
else
|
else
|
||||||
usr.before_take_item(O)
|
usr.u_equip(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
icon_state = "autolathe"
|
icon_state = "autolathe"
|
||||||
busy = 1
|
busy = 1
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
|||||||
var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot(T)
|
var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot(T)
|
||||||
A.name = src.created_name
|
A.name = src.created_name
|
||||||
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
|
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
else if (istype(W, /obj/item/weapon/pen))
|
else if (istype(W, /obj/item/weapon/pen))
|
||||||
|
|||||||
@@ -1015,7 +1015,7 @@ Auto Patrol: []"},
|
|||||||
new /obj/machinery/bot/ed209(T,created_name,lasercolor)
|
new /obj/machinery/bot/ed209(T,created_name,lasercolor)
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
del(W)
|
del(W)
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -404,7 +404,7 @@
|
|||||||
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
|
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
|
||||||
user.put_in_hands(B)
|
user.put_in_hands(B)
|
||||||
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
|
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob)
|
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob)
|
||||||
@@ -415,7 +415,7 @@
|
|||||||
B.created_name = src.created_name
|
B.created_name = src.created_name
|
||||||
user.put_in_hands(B)
|
user.put_in_hands(B)
|
||||||
user << "<span class='notice'>You add the sensor to the toolbox and tiles!</span>"
|
user << "<span class='notice'>You add the sensor to the toolbox and tiles!</span>"
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
else if (istype(W, /obj/item/weapon/pen))
|
else if (istype(W, /obj/item/weapon/pen))
|
||||||
@@ -435,7 +435,7 @@
|
|||||||
var/obj/machinery/bot/floorbot/A = new /obj/machinery/bot/floorbot(T)
|
var/obj/machinery/bot/floorbot/A = new /obj/machinery/bot/floorbot(T)
|
||||||
A.name = src.created_name
|
A.name = src.created_name
|
||||||
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly! Boop beep!</span>"
|
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly! Boop beep!</span>"
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
else if (istype(W, /obj/item/weapon/pen))
|
else if (istype(W, /obj/item/weapon/pen))
|
||||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||||
|
|||||||
@@ -554,7 +554,7 @@
|
|||||||
del(S)
|
del(S)
|
||||||
user.put_in_hands(A)
|
user.put_in_hands(A)
|
||||||
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
|
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
|
||||||
@@ -588,6 +588,6 @@
|
|||||||
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
|
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
|
||||||
S.skin = src.skin
|
S.skin = src.skin
|
||||||
S.name = src.created_name
|
S.name = src.created_name
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ Auto Patrol: []"},
|
|||||||
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
|
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
|
||||||
user.put_in_hands(A)
|
user.put_in_hands(A)
|
||||||
user << "<span class='notice'>You add the signaler to the helmet.</span>"
|
user << "<span class='notice'>You add the signaler to the helmet.</span>"
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
if (beaker)
|
if (beaker)
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
user.before_take_item(O)
|
user.u_equip(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
beaker = O
|
beaker = O
|
||||||
src.verbs += /obj/machinery/juicer/verb/detach
|
src.verbs += /obj/machinery/juicer/verb/detach
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
if (!is_type_in_list(O, allowed_items))
|
if (!is_type_in_list(O, allowed_items))
|
||||||
user << "It looks as not containing any juice."
|
user << "It looks as not containing any juice."
|
||||||
return 1
|
return 1
|
||||||
user.before_take_item(O)
|
user.u_equip(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
"\blue [user] has added one of [O] to \the [src].", \
|
"\blue [user] has added one of [O] to \the [src].", \
|
||||||
"\blue You add one of [O] to \the [src].")
|
"\blue You add one of [O] to \the [src].")
|
||||||
else
|
else
|
||||||
// user.before_take_item(O) //This just causes problems so far as I can tell. -Pete
|
// user.u_equip(O) //This just causes problems so far as I can tell. -Pete
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
O.loc = src
|
O.loc = src
|
||||||
user.visible_message( \
|
user.visible_message( \
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
/obj/machinery/smartfridge/proc/load(var/obj/item/O as obj)
|
/obj/machinery/smartfridge/proc/load(var/obj/item/O as obj)
|
||||||
if(istype(O.loc,/mob))
|
if(istype(O.loc,/mob))
|
||||||
var/mob/M = O.loc
|
var/mob/M = O.loc
|
||||||
M.before_take_item(O)
|
M.u_equip(O)
|
||||||
else if(istype(O.loc,/obj/item/weapon/storage))
|
else if(istype(O.loc,/obj/item/weapon/storage))
|
||||||
var/obj/item/weapon/storage/S = O.loc
|
var/obj/item/weapon/storage/S = O.loc
|
||||||
S.remove_from_storage(O,src)
|
S.remove_from_storage(O,src)
|
||||||
|
|||||||
@@ -656,7 +656,7 @@
|
|||||||
I:amount -= 2
|
I:amount -= 2
|
||||||
icon_state = "turret_frame2"
|
icon_state = "turret_frame2"
|
||||||
if(I:amount <= 0)
|
if(I:amount <= 0)
|
||||||
user.before_take_item(I)
|
user.u_equip(I)
|
||||||
del(I)
|
del(I)
|
||||||
else
|
else
|
||||||
user << "<span class='warning'>You need two sheets of metal for that.</span>"
|
user << "<span class='warning'>You need two sheets of metal for that.</span>"
|
||||||
@@ -704,7 +704,7 @@
|
|||||||
gun_charge = E.power_supply.charge //the gun's charge is stored in gun_charge
|
gun_charge = E.power_supply.charge //the gun's charge is stored in gun_charge
|
||||||
user << "<span class='notice'>You add [I] to the turret.</span>"
|
user << "<span class='notice'>You add [I] to the turret.</span>"
|
||||||
build_step = 4
|
build_step = 4
|
||||||
user.before_take_item(I)
|
user.u_equip(I)
|
||||||
del(I) //delete the gun :(
|
del(I) //delete the gun :(
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -718,7 +718,7 @@
|
|||||||
if(isprox(I))
|
if(isprox(I))
|
||||||
build_step = 5
|
build_step = 5
|
||||||
user << "<span class='notice'>You add the prox sensor to the turret.</span>"
|
user << "<span class='notice'>You add the prox sensor to the turret.</span>"
|
||||||
user.before_take_item(I)
|
user.u_equip(I)
|
||||||
del(I)
|
del(I)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -740,7 +740,7 @@
|
|||||||
build_step = 7
|
build_step = 7
|
||||||
I:amount -= 2
|
I:amount -= 2
|
||||||
if(I:amount <= 0)
|
if(I:amount <= 0)
|
||||||
user.before_take_item(I)
|
user.u_equip(I)
|
||||||
del(I)
|
del(I)
|
||||||
else
|
else
|
||||||
user << "<span class='warning'>You need two sheets of metal for that.</span>"
|
user << "<span class='warning'>You need two sheets of metal for that.</span>"
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ var/const/SAFETY_COOLDOWN = 100
|
|||||||
|
|
||||||
// Remove and recycle the equipped items.
|
// Remove and recycle the equipped items.
|
||||||
for(var/obj/item/I in L.get_equipped_items())
|
for(var/obj/item/I in L.get_equipped_items())
|
||||||
L.drop_from_inventory(I)
|
L.u_equip(I)
|
||||||
recycle(I, 0)
|
recycle(I, 0)
|
||||||
|
|
||||||
// Instantly lie down, also go unconscious from the pain, before you die.
|
// Instantly lie down, also go unconscious from the pain, before you die.
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
if(istype(I, /obj/item/device/gps))
|
if(istype(I, /obj/item/device/gps))
|
||||||
var/obj/item/device/gps/L = I
|
var/obj/item/device/gps/L = I
|
||||||
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
|
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
|
||||||
user.drop_from_inventory(L)
|
user.u_equip(L)
|
||||||
L.loc = src
|
L.loc = src
|
||||||
locked = L
|
locked = L
|
||||||
user << "<span class = 'caution'>You insert the GPS device into the [name]'s slot.</span>"
|
user << "<span class = 'caution'>You insert the GPS device into the [name]'s slot.</span>"
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
var/mob/living/carbon/human/H = M
|
var/mob/living/carbon/human/H = M
|
||||||
if(isobj(H.shoes))
|
if(isobj(H.shoes))
|
||||||
var/thingy = H.shoes
|
var/thingy = H.shoes
|
||||||
H.drop_from_inventory(H.shoes)
|
H.u_equip(H.shoes)
|
||||||
walk_away(thingy,chassis,15,2)
|
walk_away(thingy,chassis,15,2)
|
||||||
spawn(20)
|
spawn(20)
|
||||||
if(thingy)
|
if(thingy)
|
||||||
|
|||||||
@@ -755,7 +755,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
|
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
|
||||||
user.drop_from_inventory(W)
|
user.u_equip(W)
|
||||||
W.forceMove(src)
|
W.forceMove(src)
|
||||||
user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src]")
|
user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src]")
|
||||||
return
|
return
|
||||||
@@ -1038,7 +1038,7 @@
|
|||||||
else if(mmi_as_oc.brainmob.stat)
|
else if(mmi_as_oc.brainmob.stat)
|
||||||
user << "Beta-rhythm below acceptable level."
|
user << "Beta-rhythm below acceptable level."
|
||||||
return 0
|
return 0
|
||||||
user.drop_from_inventory(mmi_as_oc)
|
user.u_equip(mmi_as_oc)
|
||||||
var/mob/brainmob = mmi_as_oc.brainmob
|
var/mob/brainmob = mmi_as_oc.brainmob
|
||||||
brainmob.reset_view(src)
|
brainmob.reset_view(src)
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -172,7 +172,7 @@
|
|||||||
|
|
||||||
if(!A.has_fine_manipulation || w_class >= 4)
|
if(!A.has_fine_manipulation || w_class >= 4)
|
||||||
if(src in A.contents) // To stop Aliens having items stuck in their pockets
|
if(src in A.contents) // To stop Aliens having items stuck in their pockets
|
||||||
A.drop_from_inventory(src)
|
A.u_equip(src)
|
||||||
user << "Your claws aren't capable of such fine manipulation."
|
user << "Your claws aren't capable of such fine manipulation."
|
||||||
return
|
return
|
||||||
attack_paw(A)
|
attack_paw(A)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
new/obj/item/trash/candle(src.loc)
|
new/obj/item/trash/candle(src.loc)
|
||||||
if(istype(src.loc, /mob))
|
if(istype(src.loc, /mob))
|
||||||
var/mob/M = src.loc
|
var/mob/M = src.loc
|
||||||
M.before_take_item(src)
|
M.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
update_icon()
|
update_icon()
|
||||||
if(istype(loc, /turf)) //start a fire if possible
|
if(istype(loc, /turf)) //start a fire if possible
|
||||||
|
|||||||
@@ -28,12 +28,12 @@
|
|||||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||||
A.icon = 'icons/obj/assemblies.dmi'
|
A.icon = 'icons/obj/assemblies.dmi'
|
||||||
|
|
||||||
user.drop_from_inventory(W)
|
user.u_equip(W)
|
||||||
W.loc = A
|
W.loc = A
|
||||||
W.master = A
|
W.master = A
|
||||||
A.part1 = W
|
A.part1 = W
|
||||||
|
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
loc = A
|
loc = A
|
||||||
master = A
|
master = A
|
||||||
A.part2 = src
|
A.part2 = src
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
user << "You armed the robot frame"
|
user << "You armed the robot frame"
|
||||||
W:use(1)
|
W:use(1)
|
||||||
if (user.get_inactive_hand()==src)
|
if (user.get_inactive_hand()==src)
|
||||||
user.before_take_item(src)
|
user.u_equip(src)
|
||||||
user.put_in_inactive_hand(B)
|
user.put_in_inactive_hand(B)
|
||||||
del(src)
|
del(src)
|
||||||
if(istype(W, /obj/item/robot_parts/l_leg))
|
if(istype(W, /obj/item/robot_parts/l_leg))
|
||||||
|
|||||||
@@ -21,18 +21,18 @@
|
|||||||
var/obj/item/stack/sheet/glass/G = new (user.loc)
|
var/obj/item/stack/sheet/glass/G = new (user.loc)
|
||||||
G.add_fingerprint(user)
|
G.add_fingerprint(user)
|
||||||
if(amount <= 0)
|
if(amount <= 0)
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
if(istype(O,/obj/item/stack/sheet/metal))
|
if(istype(O,/obj/item/stack/sheet/metal))
|
||||||
var/obj/item/stack/sheet/metal/M = O
|
var/obj/item/stack/sheet/metal/M = O
|
||||||
M.amount--
|
M.amount--
|
||||||
if(M.amount <= 0)
|
if(M.amount <= 0)
|
||||||
user.drop_from_inventory(M)
|
user.u_equip(M)
|
||||||
del(M)
|
del(M)
|
||||||
amount--
|
amount--
|
||||||
var/obj/item/stack/tile/light/L = new (user.loc)
|
var/obj/item/stack/tile/light/L = new (user.loc)
|
||||||
L.add_fingerprint(user)
|
L.add_fingerprint(user)
|
||||||
if(amount <= 0)
|
if(amount <= 0)
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
if (src.amount<=0)
|
if (src.amount<=0)
|
||||||
var/oldsrc = src
|
var/oldsrc = src
|
||||||
src = null //dont kill proc after del()
|
src = null //dont kill proc after del()
|
||||||
usr.before_take_item(oldsrc)
|
usr.u_equip(oldsrc)
|
||||||
del(oldsrc)
|
del(oldsrc)
|
||||||
if (istype(O,/obj/item))
|
if (istype(O,/obj/item))
|
||||||
usr.put_in_hands(O)
|
usr.put_in_hands(O)
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
var/oldsrc = src
|
var/oldsrc = src
|
||||||
src = null //dont kill proc after del()
|
src = null //dont kill proc after del()
|
||||||
if(usr)
|
if(usr)
|
||||||
usr.before_take_item(oldsrc)
|
usr.u_equip(oldsrc)
|
||||||
del(oldsrc)
|
del(oldsrc)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -32,5 +32,5 @@
|
|||||||
amount--
|
amount--
|
||||||
new/obj/item/stack/light_w(user.loc)
|
new/obj/item/stack/light_w(user.loc)
|
||||||
if(amount <= 0)
|
if(amount <= 0)
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
@@ -345,8 +345,8 @@
|
|||||||
if(hacked) // That's right, we'll only check the "original" "sword".
|
if(hacked) // That's right, we'll only check the "original" "sword".
|
||||||
newSaber.hacked = 1
|
newSaber.hacked = 1
|
||||||
newSaber.item_color = "rainbow"
|
newSaber.item_color = "rainbow"
|
||||||
user.before_take_item(W)
|
user.u_equip(W)
|
||||||
user.before_take_item(src)
|
user.u_equip(src)
|
||||||
del(W)
|
del(W)
|
||||||
del(src)
|
del(src)
|
||||||
else if(istype(W, /obj/item/device/multitool))
|
else if(istype(W, /obj/item/device/multitool))
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
e.start()
|
e.start()
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
var/mob/M = loc
|
var/mob/M = loc
|
||||||
M.drop_from_inventory(src)
|
M.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently
|
if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently
|
||||||
@@ -162,7 +162,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
e.start()
|
e.start()
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
var/mob/M = loc
|
var/mob/M = loc
|
||||||
M.drop_from_inventory(src)
|
M.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
flags &= ~NOREACT // allowing reagents to react after being lit
|
flags &= ~NOREACT // allowing reagents to react after being lit
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
if(istype(I, /obj/item/device/assembly/igniter))
|
if(istype(I, /obj/item/device/assembly/igniter))
|
||||||
var/obj/item/device/assembly/igniter/G = I
|
var/obj/item/device/assembly/igniter/G = I
|
||||||
var/obj/item/weapon/grenade/iedcasing/W = new /obj/item/weapon/grenade/iedcasing
|
var/obj/item/weapon/grenade/iedcasing/W = new /obj/item/weapon/grenade/iedcasing
|
||||||
user.before_take_item(G)
|
user.u_equip(G)
|
||||||
user.before_take_item(src)
|
user.u_equip(src)
|
||||||
user.put_in_hands(W)
|
user.put_in_hands(W)
|
||||||
user << "<span class='notice'>You stuff the [I] in the [src], emptying the contents beforehand.</span>"
|
user << "<span class='notice'>You stuff the [I] in the [src], emptying the contents beforehand.</span>"
|
||||||
W.underlays += image(src.icon, icon_state = src.icon_state)
|
W.underlays += image(src.icon, icon_state = src.icon_state)
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
/obj/item/weapon/grenade/proc/update_mob()
|
/obj/item/weapon/grenade/proc/update_mob()
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
var/mob/M = loc
|
var/mob/M = loc
|
||||||
M.drop_from_inventory(src)
|
M.u_equip(src)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
||||||
R.use(1)
|
R.use(1)
|
||||||
|
|
||||||
user.before_take_item(src)
|
user.u_equip(src)
|
||||||
|
|
||||||
user.put_in_hands(W)
|
user.put_in_hands(W)
|
||||||
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
||||||
|
|||||||
@@ -111,8 +111,8 @@
|
|||||||
if(src.hacked) // That's right, we'll only check the "original" esword.
|
if(src.hacked) // That's right, we'll only check the "original" esword.
|
||||||
newSaber.hacked = 1
|
newSaber.hacked = 1
|
||||||
newSaber.item_color = "rainbow"
|
newSaber.item_color = "rainbow"
|
||||||
user.before_take_item(W)
|
user.u_equip(W)
|
||||||
user.before_take_item(src)
|
user.u_equip(src)
|
||||||
del(W)
|
del(W)
|
||||||
del(src)
|
del(src)
|
||||||
else if(istype(W, /obj/item/device/multitool))
|
else if(istype(W, /obj/item/device/multitool))
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
if ((!F.status)||(F.ptank)) return
|
if ((!F.status)||(F.ptank)) return
|
||||||
src.master = F
|
src.master = F
|
||||||
F.ptank = src
|
F.ptank = src
|
||||||
user.before_take_item(src)
|
user.u_equip(src)
|
||||||
src.loc = F
|
src.loc = F
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -362,7 +362,7 @@
|
|||||||
var/obj/item/stack/rods/R = I
|
var/obj/item/stack/rods/R = I
|
||||||
R.use(1)
|
R.use(1)
|
||||||
var/obj/item/weapon/flamethrower/F = new /obj/item/weapon/flamethrower(user.loc)
|
var/obj/item/weapon/flamethrower/F = new /obj/item/weapon/flamethrower(user.loc)
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
loc = F
|
loc = F
|
||||||
F.weldtool = src
|
F.weldtool = src
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
|
|||||||
if(istype(I, /obj/item/weapon/shard))
|
if(istype(I, /obj/item/weapon/shard))
|
||||||
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
|
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
|
||||||
|
|
||||||
user.before_take_item(I)
|
user.u_equip(I)
|
||||||
user.before_take_item(src)
|
user.u_equip(src)
|
||||||
|
|
||||||
user.put_in_hands(S)
|
user.put_in_hands(S)
|
||||||
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
|
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
|
||||||
@@ -120,8 +120,8 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
|
|||||||
else if(istype(I, /obj/item/weapon/wirecutters))
|
else if(istype(I, /obj/item/weapon/wirecutters))
|
||||||
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
|
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
|
||||||
|
|
||||||
user.before_take_item(I)
|
user.u_equip(I)
|
||||||
user.before_take_item(src)
|
user.u_equip(src)
|
||||||
|
|
||||||
user.put_in_hands(P)
|
user.put_in_hands(P)
|
||||||
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
|
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
|
||||||
|
|||||||
@@ -295,7 +295,7 @@
|
|||||||
if(istype(M) && M.head)
|
if(istype(M) && M.head)
|
||||||
var/obj/item/clothing/head/H = M.head
|
var/obj/item/clothing/head/H = M.head
|
||||||
if(!istype(H) || prob(M.hat_fall_prob()))
|
if(!istype(H) || prob(M.hat_fall_prob()))
|
||||||
M.drop_from_inventory(H)
|
M.u_equip(H)
|
||||||
if(prob(60))
|
if(prob(60))
|
||||||
step_rand(H)
|
step_rand(H)
|
||||||
if(!M.stat)
|
if(!M.stat)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
for(var/obj/item/W in M)
|
for(var/obj/item/W in M)
|
||||||
M.drop_from_inventory(W)
|
M.u_equip(W)
|
||||||
|
|
||||||
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
|
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)
|
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
item_state = "rdwhimsy"
|
item_state = "rdwhimsy"
|
||||||
item_color = "rdwhimsy"
|
item_color = "rdwhimsy"
|
||||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0)
|
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||||
flags = FPRINT | TABLEPASS
|
flags = FPRINT
|
||||||
|
|
||||||
/obj/item/clothing/under/rank/scientist
|
/obj/item/clothing/under/rank/scientist
|
||||||
desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a scientist."
|
desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a scientist."
|
||||||
|
|||||||
@@ -2690,7 +2690,7 @@ It is possible to destroy the net by the occupant or someone else.
|
|||||||
if(istype(M,/mob/living/carbon/human))
|
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:w_uniform) continue//So all they're left with are shoes and uniform.
|
||||||
if(W==M:shoes) continue
|
if(W==M:shoes) continue
|
||||||
M.drop_from_inventory(W)
|
M.u_equip(W)
|
||||||
|
|
||||||
spawn(0)
|
spawn(0)
|
||||||
playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1)
|
playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
if(beaker)
|
if(beaker)
|
||||||
user << "\red The biogenerator already occuped."
|
user << "\red The biogenerator already occuped."
|
||||||
else
|
else
|
||||||
user.before_take_item(O)
|
user.u_equip(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
beaker = O
|
beaker = O
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
if(i >= 10)
|
if(i >= 10)
|
||||||
user << "\red The biogenerator is full! Activate it."
|
user << "\red The biogenerator is full! Activate it."
|
||||||
else
|
else
|
||||||
user.before_take_item(O)
|
user.u_equip(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
user << "\blue You put [O.name] in [src.name]"
|
user << "\blue You put [O.name] in [src.name]"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
endurance -= rand(1,(endurance/3)+1)
|
endurance -= rand(1,(endurance/3)+1)
|
||||||
else
|
else
|
||||||
usr << "All the petals have fallen off the [name] from violent whacking."
|
usr << "All the petals have fallen off the [name] from violent whacking."
|
||||||
usr.drop_from_inventory(src)
|
usr.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/item/weapon/grown/novaflower/pickup(mob/living/carbon/human/user as mob)
|
/obj/item/weapon/grown/novaflower/pickup(mob/living/carbon/human/user as mob)
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
|
force -= rand(1,(force/3)+1) // When you whack someone with it, leaves fall off
|
||||||
else
|
else
|
||||||
usr << "All the leaves have fallen off the nettle from violent whacking."
|
usr << "All the leaves have fallen off the nettle from violent whacking."
|
||||||
usr.drop_from_inventory(src)
|
usr.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan
|
/obj/item/weapon/grown/nettle/changePotency(newValue) //-QualityVan
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
else
|
else
|
||||||
usr << "All the leaves have fallen off the deathnettle from violent whacking."
|
usr << "All the leaves have fallen off the deathnettle from violent whacking."
|
||||||
usr.drop_from_inventory(src)
|
usr.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan
|
/obj/item/weapon/grown/deathnettle/changePotency(newValue) //-QualityVan
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife))
|
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife))
|
||||||
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
|
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
|
||||||
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
|
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
|
||||||
usr.drop_from_inventory(src)
|
usr.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
if(inner_teleport_radius < 1) //Wasn't potent enough, it just splats.
|
if(inner_teleport_radius < 1) //Wasn't potent enough, it just splats.
|
||||||
new/obj/effect/decal/cleanable/oil(src.loc)
|
new/obj/effect/decal/cleanable/oil(src.loc)
|
||||||
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
|
||||||
usr.drop_from_inventory(src)
|
usr.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
for(var/turf/T in orange(M,outer_teleport_radius))
|
for(var/turf/T in orange(M,outer_teleport_radius))
|
||||||
|
|||||||
@@ -79,39 +79,14 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
/mob/proc/drop_from_inventory(var/obj/item/W)
|
|
||||||
if(W)
|
|
||||||
if(client)
|
|
||||||
client.screen -= W
|
|
||||||
if(!u_equip(W))
|
|
||||||
return 0
|
|
||||||
if(!W)
|
|
||||||
return 1 // self destroying objects (tk, grabs)
|
|
||||||
W.layer = initial(W.layer)
|
|
||||||
W.loc = loc
|
|
||||||
|
|
||||||
var/turf/T = get_turf(loc)
|
|
||||||
if(isturf(T))
|
|
||||||
T.Entered(W)
|
|
||||||
|
|
||||||
W.dropped(src)
|
|
||||||
//update_icons() // Redundant as u_equip will handle updating the specific overlay //WELL HALF OF THIS GODDDAMN PROC IS REDUNDANT DUE TO U_EQUIP
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
//Drops the item in our left hand
|
//Drops the item in our left hand
|
||||||
/mob/proc/drop_l_hand() //I really fucking wonder why this proc had an argument holy shit.
|
/mob/proc/drop_l_hand() //I really fucking wonder why this proc had an argument holy shit.
|
||||||
if(u_equip(l_hand)) //All needed checks are in u_equip
|
return u_equip(l_hand) //All needed checks are in u_equip
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
//Drops the item in our right hand
|
//Drops the item in our right hand
|
||||||
/mob/proc/drop_r_hand()
|
/mob/proc/drop_r_hand()
|
||||||
if(u_equip(r_hand)) //Why was this not calling u_equip in the first place jesus fuck.
|
return u_equip(r_hand) //Why was this not calling u_equip in the first place jesus fuck.
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
//Drops the item in our active hand.
|
//Drops the item in our active hand.
|
||||||
@@ -120,25 +95,23 @@
|
|||||||
else return drop_r_hand()
|
else return drop_r_hand()
|
||||||
|
|
||||||
|
|
||||||
//Things that aren't strictly hand-related are below this comment, apparently.
|
//Here lie drop_from_inventory and before_item_take, already forgotten and not missed.
|
||||||
|
|
||||||
//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)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/mob/proc/u_equip(obj/item/I)
|
/mob/proc/u_equip(obj/item/I)
|
||||||
if(!istype(I) /* ;_; */ || (I.flags & NODROP)) return 0
|
if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(u_equip) should generally be used to check for NODROP.
|
||||||
|
world << "nothing here u fage"
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if(I.flags & NODROP)
|
||||||
|
world << "cant drop this fucking shit"
|
||||||
|
return 0
|
||||||
|
|
||||||
if(I == r_hand)
|
if(I == r_hand)
|
||||||
r_hand = null
|
r_hand = null
|
||||||
update_inv_r_hand(0)
|
update_inv_r_hand()
|
||||||
else if(I == l_hand)
|
else if(I == l_hand)
|
||||||
l_hand = null
|
l_hand = null
|
||||||
update_inv_l_hand(0)
|
update_inv_l_hand()
|
||||||
|
|
||||||
if(I)
|
if(I)
|
||||||
if(client)
|
if(client)
|
||||||
@@ -147,16 +120,13 @@
|
|||||||
I.dropped(src)
|
I.dropped(src)
|
||||||
if(I)
|
if(I)
|
||||||
I.layer = initial(I.layer)
|
I.layer = initial(I.layer)
|
||||||
|
world << "grats u did it m8 u happy now hahaha"
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.
|
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.
|
||||||
/mob/proc/remove_from_mob(var/obj/O)
|
/mob/proc/remove_from_mob(var/obj/O)
|
||||||
src.u_equip(O)
|
u_equip(O)
|
||||||
if (src.client)
|
|
||||||
src.client.screen -= O
|
|
||||||
O.layer = initial(O.layer)
|
|
||||||
O.screen_loc = null
|
O.screen_loc = null
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
|||||||
|
|
||||||
/obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob)
|
/obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
Attach(M)
|
Attach(M)
|
||||||
|
|
||||||
/obj/item/clothing/mask/facehugger/examine()
|
/obj/item/clothing/mask/facehugger/examine()
|
||||||
@@ -130,7 +130,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
|||||||
if(prob(20)) return 0
|
if(prob(20)) return 0
|
||||||
var/obj/item/clothing/W = target.wear_mask
|
var/obj/item/clothing/W = target.wear_mask
|
||||||
if(!W.canremove) return 0
|
if(!W.canremove) return 0
|
||||||
target.drop_from_inventory(W)
|
target.u_equip(W)
|
||||||
|
|
||||||
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
|
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
//End BubbleWrap
|
//End BubbleWrap
|
||||||
|
|
||||||
if(!talked) //BubbleWrap
|
if(!talked) //BubbleWrap
|
||||||
if(!drop_item())
|
if(drop_item())
|
||||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
||||||
"<span class='userdanger'>[M] has disarmed [src]!</span>")
|
"<span class='userdanger'>[M] has disarmed [src]!</span>")
|
||||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ Please contact me on #coderbus IRC. ~Carnie x
|
|||||||
else
|
else
|
||||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
|
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
|
||||||
for(var/obj/item/thing in list(r_store, l_store, wear_id, belt)) //
|
for(var/obj/item/thing in list(r_store, l_store, wear_id, belt)) //
|
||||||
drop_from_inventory(thing)
|
u_equip(thing)
|
||||||
|
|
||||||
apply_overlay(UNIFORM_LAYER)
|
apply_overlay(UNIFORM_LAYER)
|
||||||
|
|
||||||
@@ -486,7 +486,7 @@ Please contact me on #coderbus IRC. ~Carnie x
|
|||||||
overlays_standing[SUIT_LAYER] = standing
|
overlays_standing[SUIT_LAYER] = standing
|
||||||
|
|
||||||
if(istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
if(istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||||
drop_from_inventory(handcuffed)
|
u_equip(handcuffed)
|
||||||
drop_l_hand()
|
drop_l_hand()
|
||||||
drop_r_hand()
|
drop_r_hand()
|
||||||
|
|
||||||
|
|||||||
@@ -483,15 +483,15 @@ var/list/slot_equipment_priority = list( \
|
|||||||
var/slot = text2num(href_list["item"])
|
var/slot = text2num(href_list["item"])
|
||||||
var/obj/item/what = get_item_by_slot(slot)
|
var/obj/item/what = get_item_by_slot(slot)
|
||||||
|
|
||||||
if(what && !(what.flags & NODROP))
|
if(what)
|
||||||
|
if(what.flags & NODROP)
|
||||||
|
usr << "<span class='notice'>You can't remove \the [what.name], it appears to be stuck!</span>"
|
||||||
visible_message("<span class='danger'>[usr] tries to remove [src]'s [what.name].</span>", \
|
visible_message("<span class='danger'>[usr] tries to remove [src]'s [what.name].</span>", \
|
||||||
"<span class='userdanger'>[usr] tries to remove [src]'s [what.name].</span>")
|
"<span class='userdanger'>[usr] tries to remove [src]'s [what.name].</span>")
|
||||||
what.add_fingerprint(usr)
|
what.add_fingerprint(usr)
|
||||||
if(do_mob(usr, src, STRIP_DELAY))
|
if(do_mob(usr, src, STRIP_DELAY))
|
||||||
if(what && Adjacent(usr))
|
if(what && Adjacent(usr))
|
||||||
u_equip(what)
|
u_equip(what)
|
||||||
else if(what.flags & NODROP)
|
|
||||||
usr << "<span class='notice'>You can't remove [src]'s [what.name], it is stuck!</span>"
|
|
||||||
else
|
else
|
||||||
what = usr.get_active_hand()
|
what = usr.get_active_hand()
|
||||||
if(what && what.mob_can_equip(src, slot, 1))
|
if(what && what.mob_can_equip(src, slot, 1))
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
if(tr_flags & TR_KEEPITEMS)
|
if(tr_flags & TR_KEEPITEMS)
|
||||||
for(var/obj/item/W in (src.contents-implants))
|
for(var/obj/item/W in (src.contents-implants))
|
||||||
drop_from_inventory(W)
|
u_equip(W)
|
||||||
|
|
||||||
//Make mob invisible and spawn animation
|
//Make mob invisible and spawn animation
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
W.layer = initial(W.layer)
|
W.layer = initial(W.layer)
|
||||||
|
|
||||||
// for(var/obj/item/W in src)
|
// for(var/obj/item/W in src)
|
||||||
// drop_from_inventory(W)
|
// u_equip(W)
|
||||||
|
|
||||||
//Make mob invisible and spawn animation
|
//Make mob invisible and spawn animation
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
if (notransform)
|
if (notransform)
|
||||||
return
|
return
|
||||||
for(var/obj/item/W in src)
|
for(var/obj/item/W in src)
|
||||||
drop_from_inventory(W)
|
u_equip(W)
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
notransform = 1
|
notransform = 1
|
||||||
canmove = 0
|
canmove = 0
|
||||||
@@ -271,7 +271,7 @@
|
|||||||
if(delete_items)
|
if(delete_items)
|
||||||
del(W)
|
del(W)
|
||||||
else
|
else
|
||||||
drop_from_inventory(W)
|
u_equip(W)
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
notransform = 1
|
notransform = 1
|
||||||
canmove = 0
|
canmove = 0
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
if (notransform)
|
if (notransform)
|
||||||
return
|
return
|
||||||
for(var/obj/item/W in src)
|
for(var/obj/item/W in src)
|
||||||
drop_from_inventory(W)
|
u_equip(W)
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
notransform = 1
|
notransform = 1
|
||||||
canmove = 0
|
canmove = 0
|
||||||
@@ -343,7 +343,7 @@
|
|||||||
if (notransform)
|
if (notransform)
|
||||||
return
|
return
|
||||||
for(var/obj/item/W in src)
|
for(var/obj/item/W in src)
|
||||||
drop_from_inventory(W)
|
u_equip(W)
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
notransform = 1
|
notransform = 1
|
||||||
canmove = 0
|
canmove = 0
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
if (notransform)
|
if (notransform)
|
||||||
return
|
return
|
||||||
for(var/obj/item/W in src)
|
for(var/obj/item/W in src)
|
||||||
drop_from_inventory(W)
|
u_equip(W)
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
notransform = 1
|
notransform = 1
|
||||||
canmove = 0
|
canmove = 0
|
||||||
@@ -413,7 +413,7 @@
|
|||||||
if(notransform)
|
if(notransform)
|
||||||
return
|
return
|
||||||
for(var/obj/item/W in src)
|
for(var/obj/item/W in src)
|
||||||
drop_from_inventory(W)
|
u_equip(W)
|
||||||
|
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
notransform = 1
|
notransform = 1
|
||||||
|
|||||||
@@ -948,7 +948,7 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
|
|||||||
user << "Cannot refine into a reagent."
|
user << "Cannot refine into a reagent."
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
user.before_take_item(O)
|
user.u_equip(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
holdingitems += O
|
holdingitems += O
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume()
|
/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume()
|
||||||
if(!usr) return
|
if(!usr) return
|
||||||
if(!reagents.total_volume)
|
if(!reagents.total_volume)
|
||||||
usr.drop_from_inventory(src) //so icons update :[
|
usr.u_equip(src) //so icons update :[
|
||||||
|
|
||||||
if(trash)
|
if(trash)
|
||||||
if(ispath(trash,/obj/item/weapon/grown))
|
if(ispath(trash,/obj/item/weapon/grown))
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
eatverb = pick("bite","chew","nibble","gnaw","gobble","chomp")
|
eatverb = pick("bite","chew","nibble","gnaw","gobble","chomp")
|
||||||
if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
|
if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
|
||||||
user << "<span class='notice'>None of [src] left, oh no!</span>"
|
user << "<span class='notice'>None of [src] left, oh no!</span>"
|
||||||
M.drop_from_inventory(src) //so icons update :[
|
M.u_equip(src) //so icons update :[
|
||||||
del(src)
|
del(src)
|
||||||
return 0
|
return 0
|
||||||
if(istype(M, /mob/living/carbon))
|
if(istype(M, /mob/living/carbon))
|
||||||
|
|||||||
@@ -205,7 +205,7 @@
|
|||||||
user << "<span class='notice'>You add [D] to [src].</span>"
|
user << "<span class='notice'>You add [D] to [src].</span>"
|
||||||
del(D)
|
del(D)
|
||||||
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
||||||
user.drop_from_inventory(src)
|
user.u_equip(src)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
attack(mob/M, mob/user, def_zone)
|
attack(mob/M, mob/user, def_zone)
|
||||||
if(M == user)
|
if(M == user)
|
||||||
M << "<span class='notice'>You swallow [src].</span>"
|
M << "<span class='notice'>You swallow [src].</span>"
|
||||||
M.drop_from_inventory(src) //icon update
|
M.u_equip(src) //icon update
|
||||||
if(reagents.total_volume)
|
if(reagents.total_volume)
|
||||||
reagents.reaction(M, INGEST)
|
reagents.reaction(M, INGEST)
|
||||||
spawn(5)
|
spawn(5)
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
if(!do_mob(user, M)) return
|
if(!do_mob(user, M)) return
|
||||||
|
|
||||||
user.drop_from_inventory(src) //icon update
|
user.u_equip(src) //icon update
|
||||||
M.visible_message("<span class='danger'>[user] forces [M] to swallow [src].</span>", \
|
M.visible_message("<span class='danger'>[user] forces [M] to swallow [src].</span>", \
|
||||||
"<span class='userdanger'>[user] forces [M] to swallow [src].</span>")
|
"<span class='userdanger'>[user] forces [M] to swallow [src].</span>")
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
else if(istype(W, /obj/item/device/gps))
|
else if(istype(W, /obj/item/device/gps))
|
||||||
if(!inserted_gps)
|
if(!inserted_gps)
|
||||||
inserted_gps = W
|
inserted_gps = W
|
||||||
user.drop_from_inventory(W)
|
user.u_equip(W)
|
||||||
W.loc = src
|
W.loc = src
|
||||||
user.visible_message("<span class='notice'>[user] inserts [W] into \the [src]'s GPS device slot.</span>")
|
user.visible_message("<span class='notice'>[user] inserts [W] into \the [src]'s GPS device slot.</span>")
|
||||||
else if(istype(W, /obj/item/device/multitool))
|
else if(istype(W, /obj/item/device/multitool))
|
||||||
|
|||||||
@@ -211,7 +211,7 @@
|
|||||||
part2 = null
|
part2 = null
|
||||||
|
|
||||||
user.put_in_hand(R)
|
user.put_in_hand(R)
|
||||||
user.before_take_item(W)
|
user.u_equip(W)
|
||||||
R.part3 = W
|
R.part3 = W
|
||||||
R.part3.master = R
|
R.part3.master = R
|
||||||
del(src)
|
del(src)
|
||||||
|
|||||||
Reference in New Issue
Block a user