mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Removes/Refactors /mob/unEquip (#22918)
* Part1 * IT COMPILES!!!! * Fuck wait this was missing from that last * Update handlabeler.dm * Update handlabeler.dm * Fixes n shit * Fix this * Fixes #23310 * Fucking @RemieRichards was right * Fixes devil unEquip * WTF ARE BITFLAGS? * THERES THE FUCKING PROBLEM * Fixes
This commit is contained in:
@@ -107,9 +107,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
actions_types = null
|
||||
|
||||
/obj/item/Destroy()
|
||||
flags &= ~DROPDEL //prevent reqdels
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.unEquip(src, 1)
|
||||
m.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
for(var/X in actions)
|
||||
qdel(X)
|
||||
return ..()
|
||||
@@ -235,7 +236,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
|
||||
throwing = 0
|
||||
if(loc == user)
|
||||
if(!user.unEquip(src))
|
||||
if(!user.dropItemToGround(src))
|
||||
return
|
||||
|
||||
pickup(user)
|
||||
@@ -256,7 +257,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
|
||||
throwing = 0
|
||||
if(loc == user)
|
||||
if(!user.unEquip(src))
|
||||
if(!user.dropItemToGround(src))
|
||||
return
|
||||
|
||||
pickup(user)
|
||||
@@ -269,7 +270,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
|
||||
if(!A.has_fine_manipulation)
|
||||
if(src in A.contents) // To stop Aliens having items stuck in their pockets
|
||||
A.unEquip(src)
|
||||
A.dropItemToGround(src)
|
||||
user << "<span class='warning'>Your claws aren't capable of such fine manipulation!</span>"
|
||||
return
|
||||
attack_paw(A)
|
||||
@@ -342,8 +343,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
var/datum/action/A = X
|
||||
A.Remove(user)
|
||||
if(DROPDEL & flags)
|
||||
//Prevents infinite loops where Destroy() calls an objects dropped() function
|
||||
flags &= ~DROPDEL
|
||||
qdel(src)
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
|
||||
@@ -58,9 +58,6 @@
|
||||
wax--
|
||||
if(!wax)
|
||||
new/obj/item/trash/candle(src.loc)
|
||||
if(istype(src.loc, /mob))
|
||||
var/mob/M = src.loc
|
||||
M.unEquip(src, 1) //src is being deleted anyway
|
||||
qdel(src)
|
||||
update_icon()
|
||||
open_flame()
|
||||
|
||||
@@ -761,10 +761,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
I = C
|
||||
|
||||
if(I && I.registered_name)
|
||||
if(!user.unEquip(I))
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return 0
|
||||
var/obj/old_id = id
|
||||
I.forceMove(src)
|
||||
id = I
|
||||
if(old_id)
|
||||
user.put_in_hands(old_id)
|
||||
@@ -774,10 +773,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
// access to status display signals
|
||||
/obj/item/device/pda/attackby(obj/item/C, mob/user, params)
|
||||
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
|
||||
if(!user.unEquip(C))
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
cartridge = C
|
||||
cartridge.loc = src
|
||||
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
@@ -803,9 +801,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return //Return in case of failed check or when successful.
|
||||
updateSelfDialog()//For the non-input related code.
|
||||
else if(istype(C, /obj/item/device/paicard) && !src.pai)
|
||||
if(!user.unEquip(C))
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
C.loc = src
|
||||
pai = C
|
||||
user << "<span class='notice'>You slot \the [C] into [src].</span>"
|
||||
update_icon()
|
||||
@@ -814,9 +811,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(inserted_item)
|
||||
user << "<span class='warning'>There is already \a [inserted_item] in \the [src]!</span>"
|
||||
else
|
||||
if(!user.unEquip(C))
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
C.forceMove(src)
|
||||
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
|
||||
inserted_item = C
|
||||
update_icon()
|
||||
|
||||
@@ -41,9 +41,8 @@
|
||||
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/stock_parts/micro_laser))
|
||||
if(!diode)
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
diode = W
|
||||
user << "<span class='notice'>You install a [diode.name] in [src].</span>"
|
||||
else
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
if(uses >= max_uses)
|
||||
user << "<span class='warning'>[src.name] is full.</span>"
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(round(increment*0.75))
|
||||
user << "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>"
|
||||
@@ -104,12 +104,12 @@
|
||||
var/obj/item/weapon/light/L = W
|
||||
if(L.status == 0) // LIGHT OKAY
|
||||
if(uses < max_uses)
|
||||
if(!user.unEquip(W))
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
else
|
||||
if(!user.unEquip(W))
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
user << "<span class='notice'>You insert the [L.name] into the [src.name]</span>"
|
||||
AddShards(1, user)
|
||||
|
||||
@@ -39,15 +39,13 @@
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, A))
|
||||
user << "<span class='warning'>[W] is stuck to your hand, you cannot attach it to [src]!</span>"
|
||||
return
|
||||
W.loc = A
|
||||
W.master = A
|
||||
A.part1 = W
|
||||
|
||||
user.unEquip(src)
|
||||
loc = A
|
||||
user.transferItemToLoc(src, A, TRUE)
|
||||
master = A
|
||||
A.part2 = src
|
||||
|
||||
|
||||
@@ -246,15 +246,13 @@
|
||||
return
|
||||
|
||||
if(!keyslot)
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
keyslot = W
|
||||
|
||||
else
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
keyslot2 = W
|
||||
|
||||
|
||||
|
||||
@@ -581,9 +581,8 @@
|
||||
return
|
||||
|
||||
if(!keyslot)
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
keyslot = W
|
||||
|
||||
recalculateChannels()
|
||||
|
||||
@@ -32,9 +32,8 @@
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
|
||||
if(!mytape && istype(I, /obj/item/device/tape))
|
||||
if(!user.unEquip(I))
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
I.loc = src
|
||||
mytape = I
|
||||
user << "<span class='notice'>You insert [I] into [src].</span>"
|
||||
update_icon()
|
||||
|
||||
@@ -22,18 +22,16 @@
|
||||
return
|
||||
|
||||
if(!tank_one)
|
||||
if(!user.unEquip(item))
|
||||
if(!user.transferItemToLoc(item, src))
|
||||
return
|
||||
tank_one = item
|
||||
item.loc = src
|
||||
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
|
||||
if(item.w_class > w_class)
|
||||
w_class = item.w_class
|
||||
else if(!tank_two)
|
||||
if(!user.unEquip(item))
|
||||
if(!user.transferItemToLoc(item, src))
|
||||
return
|
||||
tank_two = item
|
||||
item.loc = src
|
||||
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
|
||||
if(item.w_class > w_class)
|
||||
w_class = item.w_class
|
||||
@@ -48,9 +46,9 @@
|
||||
if(attached_device)
|
||||
user << "<span class='warning'>There is already a device attached to the valve, remove it first!</span>"
|
||||
return
|
||||
user.remove_from_mob(item)
|
||||
if(!user.transferItemToLoc(item, src))
|
||||
return
|
||||
attached_device = A
|
||||
A.loc = src
|
||||
user << "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>"
|
||||
A.holder = src
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/obj/item/nuke_core_container/proc/load(obj/item/nuke_core/ncore, mob/user)
|
||||
if(core || !istype(ncore))
|
||||
return 0
|
||||
ncore.loc = src
|
||||
ncore.forceMove(src)
|
||||
core = ncore
|
||||
icon_state = "core_container_loaded"
|
||||
user << "<span class='warning'>Container is sealing...</span>"
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/obj/item/nuke_core_container/attackby(obj/item/nuke_core/core, mob/user)
|
||||
if(istype(core))
|
||||
if(!user.unEquip(core))
|
||||
if(!user.temporarilyRemoveItemFromInventory(core))
|
||||
user << "<span class='warning'>The [core] is stuck to your hand!</span>"
|
||||
return
|
||||
else
|
||||
|
||||
@@ -71,19 +71,18 @@
|
||||
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
||||
B.loc = get_turf(src)
|
||||
user << "<span class='notice'>You arm the robot frame.</span>"
|
||||
if (user.get_inactive_held_item()==src)
|
||||
user.unEquip(src)
|
||||
user.put_in_inactive_hand(B)
|
||||
var/holding_this = user.get_inactive_held_item()==src
|
||||
qdel(src)
|
||||
if (holding_this)
|
||||
user.put_in_inactive_hand(B)
|
||||
else
|
||||
user << "<span class='warning'>You need one sheet of metal to start building ED-209!</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/bodypart/l_leg/robot))
|
||||
if(src.l_leg)
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.forceMove(src)
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.l_leg = W
|
||||
@@ -92,9 +91,8 @@
|
||||
else if(istype(W, /obj/item/bodypart/r_leg/robot))
|
||||
if(src.r_leg)
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.forceMove(src)
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.r_leg = W
|
||||
@@ -103,9 +101,8 @@
|
||||
else if(istype(W, /obj/item/bodypart/l_arm/robot))
|
||||
if(src.l_arm)
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.forceMove(src)
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.l_arm = W
|
||||
@@ -114,9 +111,8 @@
|
||||
else if(istype(W, /obj/item/bodypart/r_arm/robot))
|
||||
if(src.r_arm)
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.forceMove(src)
|
||||
W.icon_state = initial(W.icon_state)//in case it is a dismembered robotic limb
|
||||
W.cut_overlays()
|
||||
src.r_arm = W
|
||||
@@ -127,9 +123,8 @@
|
||||
if(src.chest)
|
||||
return
|
||||
if(CH.wired && CH.cell)
|
||||
if(!user.unEquip(CH))
|
||||
if(!user.transferItemToLoc(CH, src))
|
||||
return
|
||||
CH.forceMove(src)
|
||||
CH.icon_state = initial(CH.icon_state) //in case it is a dismembered robotic limb
|
||||
CH.cut_overlays()
|
||||
src.chest = CH
|
||||
@@ -148,9 +143,8 @@
|
||||
if(src.head)
|
||||
return
|
||||
if(HD.flash2 && HD.flash1)
|
||||
if(!user.unEquip(HD))
|
||||
if(!user.transferItemToLoc(HD, src))
|
||||
return
|
||||
HD.loc = src
|
||||
HD.icon_state = initial(HD.icon_state)//in case it is a dismembered robotic limb
|
||||
HD.cut_overlays()
|
||||
src.head = HD
|
||||
@@ -191,7 +185,7 @@
|
||||
user << "<span class='warning'>This [M.name] does not seem to fit!</span>"
|
||||
return
|
||||
|
||||
if(!user.unEquip(W))
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
|
||||
@@ -235,7 +229,7 @@
|
||||
O.cell = chest.cell
|
||||
chest.cell.loc = O
|
||||
chest.cell = null
|
||||
W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
W.forceMove(O)//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
if(O.mmi) //we delete the mmi created by robot/New()
|
||||
qdel(O.mmi)
|
||||
O.mmi = W //and give the real mmi to the borg.
|
||||
@@ -243,7 +237,7 @@
|
||||
|
||||
feedback_inc("cyborg_birth",1)
|
||||
|
||||
src.loc = O
|
||||
forceMove(O)
|
||||
O.robot_suit = src
|
||||
|
||||
if(!locomotion)
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
var/obj/item/stack/sheet/glass/G = new (user.loc)
|
||||
G.add_fingerprint(user)
|
||||
if(amount <= 0)
|
||||
user.unEquip(src, 1)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(O, /obj/item/stack/sheet/metal))
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
amount--
|
||||
new/obj/item/stack/light_w(user.loc)
|
||||
if(amount <= 0)
|
||||
user.unEquip(src, 1)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
@@ -59,7 +59,7 @@
|
||||
if(!I.can_be_package_wrapped())
|
||||
return
|
||||
if(user.is_holding(I))
|
||||
if(!user.unEquip(I))
|
||||
if(!user.dropItemToGround(I))
|
||||
return
|
||||
else if(!isturf(I.loc))
|
||||
return
|
||||
|
||||
@@ -249,8 +249,6 @@
|
||||
if(hacked) // That's right, we'll only check the "original" "sword".
|
||||
newSaber.hacked = 1
|
||||
newSaber.item_color = "rainbow"
|
||||
user.unEquip(W)
|
||||
user.unEquip(src)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/device/multitool))
|
||||
@@ -733,7 +731,7 @@
|
||||
if(istype(I, /obj/item/toy/cards/singlecard))
|
||||
var/obj/item/toy/cards/singlecard/SC = I
|
||||
if(SC.parentdeck == src)
|
||||
if(!user.unEquip(SC))
|
||||
if(!user.temporarilyRemoveItemFromInventory(SC))
|
||||
user << "<span class='warning'>The card is stuck to your hand, you can't add it to the deck!</span>"
|
||||
return
|
||||
cards += SC.cardname
|
||||
@@ -745,7 +743,7 @@
|
||||
else if(istype(I, /obj/item/toy/cards/cardhand))
|
||||
var/obj/item/toy/cards/cardhand/CH = I
|
||||
if(CH.parentdeck == src)
|
||||
if(!user.unEquip(CH))
|
||||
if(!user.temporarilyRemoveItemFromInventory(CH))
|
||||
user << "<span class='warning'>The hand of cards is stuck to your hand, you can't add it to the deck!</span>"
|
||||
return
|
||||
cards += CH.currenthand
|
||||
@@ -769,8 +767,10 @@
|
||||
else if(istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(!remove_item_from_storage(M))
|
||||
M.unEquip(src)
|
||||
M.put_in_hand(src, H.held_index)
|
||||
M.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
if(!M.put_in_hand(src, H.held_index))
|
||||
qdel(src)
|
||||
return
|
||||
usr << "<span class='notice'>You pick up the deck.</span>"
|
||||
|
||||
else
|
||||
@@ -834,20 +834,19 @@
|
||||
N.parentdeck = src.parentdeck
|
||||
N.cardname = src.currenthand[1]
|
||||
N.apply_card_vars(N,O)
|
||||
cardUser.unEquip(src)
|
||||
qdel(src)
|
||||
N.pickup(cardUser)
|
||||
cardUser.put_in_hands(N)
|
||||
cardUser << "<span class='notice'>You also take [currenthand[1]] and hold it.</span>"
|
||||
cardUser << browse(null, "window=cardhand")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/toy/cards/cardhand/attackby(obj/item/toy/cards/singlecard/C, mob/living/user, params)
|
||||
if(istype(C))
|
||||
if(C.parentdeck == src.parentdeck)
|
||||
src.currenthand += C.cardname
|
||||
user.unEquip(C)
|
||||
user.visible_message("[user] adds a card to [user.p_their()] hand.", "<span class='notice'>You add the [C.cardname] to your hand.</span>")
|
||||
qdel(C)
|
||||
interact(user)
|
||||
if(currenthand.len > 4)
|
||||
src.icon_state = "[deckstyle]_hand5"
|
||||
@@ -855,7 +854,6 @@
|
||||
src.icon_state = "[deckstyle]_hand4"
|
||||
else if(currenthand.len > 2)
|
||||
src.icon_state = "[deckstyle]_hand3"
|
||||
qdel(C)
|
||||
else
|
||||
user << "<span class='warning'>You can't mix cards from other decks!</span>"
|
||||
else
|
||||
@@ -923,12 +921,11 @@
|
||||
H.currenthand += src.cardname
|
||||
H.parentdeck = C.parentdeck
|
||||
H.apply_card_vars(H,C)
|
||||
user.unEquip(C)
|
||||
H.pickup(user)
|
||||
user.put_in_active_hand(H)
|
||||
user << "<span class='notice'>You combine the [C.cardname] and the [src.cardname] into a hand.</span>"
|
||||
qdel(C)
|
||||
qdel(src)
|
||||
H.pickup(user)
|
||||
user.put_in_active_hand(H)
|
||||
else
|
||||
user << "<span class='warning'>You can't mix cards from other decks!</span>"
|
||||
|
||||
@@ -936,8 +933,8 @@
|
||||
var/obj/item/toy/cards/cardhand/H = I
|
||||
if(H.parentdeck == parentdeck)
|
||||
H.currenthand += cardname
|
||||
user.unEquip(src)
|
||||
user.visible_message("[user] adds a card to [user.p_their()] hand.", "<span class='notice'>You add the [cardname] to your hand.</span>")
|
||||
qdel(src)
|
||||
H.interact(user)
|
||||
if(H.currenthand.len > 4)
|
||||
H.icon_state = "[deckstyle]_hand5"
|
||||
@@ -945,7 +942,6 @@
|
||||
H.icon_state = "[deckstyle]_hand4"
|
||||
else if(H.currenthand.len > 2)
|
||||
H.icon_state = "[deckstyle]_hand3"
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You can't mix cards from other decks!</span>"
|
||||
else
|
||||
|
||||
@@ -263,8 +263,6 @@ RCD
|
||||
if((matter + R.ammoamt) > max_matter)
|
||||
user << "<span class='warning'>The RCD can't hold any more matter-units!</span>"
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
return
|
||||
qdel(W)
|
||||
matter += R.ammoamt
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
@@ -280,24 +278,16 @@ RCD
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/rcd/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
|
||||
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
|
||||
if(maxsheets > 0)
|
||||
if(S.amount > maxsheets)
|
||||
//S.amount -= maxsheets
|
||||
S.use(maxsheets)
|
||||
matter += value*maxsheets
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user << "<span class='notice'>You insert [maxsheets] [S.name] sheets into the RCD. </span>"
|
||||
else
|
||||
matter += value*(S.amount)
|
||||
user.unEquip()
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user << "<span class='notice'>You insert [S.amount] [S.name] sheets into the RCD. </span>"
|
||||
S.use(S.amount)
|
||||
|
||||
return 1
|
||||
user << "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!"
|
||||
return 0
|
||||
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
|
||||
if(maxsheets > 0)
|
||||
var/amount_to_use = min(S.amount, maxsheets)
|
||||
S.use(amount_to_use)
|
||||
matter += value*amount_to_use
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user << "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the RCD. </span>"
|
||||
return 1
|
||||
user << "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!"
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rcd/attack_self(mob/user)
|
||||
//Change the mode
|
||||
|
||||
@@ -109,9 +109,8 @@
|
||||
if(ink)
|
||||
user << "<span class='notice'>[src] already contains \a [ink].</span>"
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
user << "<span class='notice'>You install [W] into [src].</span>"
|
||||
ink = W
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
@@ -163,18 +163,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/datum/effect_system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.unEquip(src, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(reagents.get_reagent_amount("welding_fuel")) // the fuel explodes, too, but much less violently
|
||||
var/datum/effect_system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount("welding_fuel") / 5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.unEquip(src, 1)
|
||||
qdel(src)
|
||||
return
|
||||
// allowing reagents to react after being lit
|
||||
@@ -217,7 +211,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
new type_butt(location)
|
||||
if(ismob(loc))
|
||||
M << "<span class='notice'>Your [name] goes out.</span>"
|
||||
M.unEquip(src, 1) //un-equip it so the overlays can update //Force the un-equip so the overlays update
|
||||
qdel(src)
|
||||
return
|
||||
open_flame()
|
||||
@@ -566,16 +559,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(istype(target, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/grown/O = target
|
||||
if(O.dry)
|
||||
user.unEquip(target, 1)
|
||||
user.unEquip(src, 1)
|
||||
var/obj/item/clothing/mask/cigarette/rollie/R = new /obj/item/clothing/mask/cigarette/rollie(user.loc)
|
||||
R.chem_volume = target.reagents.total_volume
|
||||
target.reagents.trans_to(R, R.chem_volume)
|
||||
qdel(target)
|
||||
qdel(src)
|
||||
user.put_in_active_hand(R)
|
||||
user << "<span class='notice'>You roll the [target.name] into a rolling paper.</span>"
|
||||
R.desc = "Dried [target.name] rolled up in a thin piece of paper."
|
||||
qdel(target)
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need to dry this first!</span>"
|
||||
else
|
||||
@@ -707,9 +698,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/datum/effect_system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.unEquip(src, 1)
|
||||
qdel(src)
|
||||
return
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
@@ -744,7 +732,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
|
||||
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
|
||||
M.apply_damage(20, BURN, "head")
|
||||
M.unEquip(src, 1)
|
||||
M.Weaken(15, 1, 0)
|
||||
qdel(src)
|
||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
|
||||
|
||||
@@ -95,9 +95,10 @@
|
||||
var/mob/M = src.loc
|
||||
if(istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(!M.unEquip(src))
|
||||
if(!M.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
M.put_in_hand(src, H.held_index)
|
||||
if(!M.put_in_hand(src, H.held_index))
|
||||
qdel(src) //wewie
|
||||
|
||||
|
||||
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
|
||||
@@ -112,9 +113,8 @@
|
||||
if(C.maxcharge < paddles.revivecost)
|
||||
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
bcell = W
|
||||
user << "<span class='notice'>You install a cell in [src].</span>"
|
||||
update_icon()
|
||||
@@ -191,7 +191,7 @@
|
||||
/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user) //this fox the bug with the paddles when other player stole you the defib when you have the paddles equiped
|
||||
if(ismob(paddles.loc))
|
||||
var/mob/M = paddles.loc
|
||||
M.unEquip(paddles,1)
|
||||
M.dropItemToGround(paddles, TRUE)
|
||||
return
|
||||
|
||||
/obj/item/weapon/defibrillator/Destroy()
|
||||
@@ -337,7 +337,6 @@
|
||||
if(!req_defib)
|
||||
return 1 //If it doesn't need a defib, just say it exists
|
||||
if (!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
|
||||
M.unEquip(O)
|
||||
qdel(O)
|
||||
return 0
|
||||
else
|
||||
|
||||
@@ -82,10 +82,10 @@
|
||||
user << "<span class='notice'>You start planting the bomb...</span>"
|
||||
|
||||
if(do_after(user, 50, target = AM))
|
||||
if(!user.unEquip(src))
|
||||
if(!user.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
src.target = AM
|
||||
loc = null
|
||||
forceMove(null)
|
||||
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [timer] second fuse"
|
||||
bombers += message
|
||||
|
||||
@@ -98,9 +98,8 @@
|
||||
return
|
||||
if(igniter)
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
I.loc = src
|
||||
igniter = I
|
||||
update_icon()
|
||||
return
|
||||
@@ -109,10 +108,9 @@
|
||||
if(ptank)
|
||||
user << "<span class='notice'>There is already a plasma tank loaded in [src]!</span>"
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
ptank = W
|
||||
W.loc = src
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
@@ -75,9 +75,7 @@
|
||||
if(!ispath(gift_type,/obj/item))
|
||||
return
|
||||
|
||||
var/obj/item/I = new gift_type(M)
|
||||
M.unEquip(src, 1)
|
||||
M.put_in_hands(I)
|
||||
I.add_fingerprint(M)
|
||||
qdel(src)
|
||||
return
|
||||
var/obj/item/I = new gift_type(M)
|
||||
M.put_in_hands(I)
|
||||
I.add_fingerprint(M)
|
||||
@@ -71,10 +71,9 @@
|
||||
return
|
||||
else
|
||||
if(I.reagents.total_volume)
|
||||
if(!user.unEquip(I))
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
|
||||
I.loc = src
|
||||
beakers += I
|
||||
else
|
||||
user << "<span class='warning'>[I] is empty!</span>"
|
||||
@@ -84,12 +83,11 @@
|
||||
var/obj/item/device/assembly_holder/A = I
|
||||
if(isigniter(A.a_left) == isigniter(A.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
|
||||
return
|
||||
if(!user.unEquip(I))
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
|
||||
nadeassembly = A
|
||||
A.master = src
|
||||
A.loc = src
|
||||
assemblyattacher = user.ckey
|
||||
|
||||
stage_change(WIRED)
|
||||
@@ -229,10 +227,9 @@
|
||||
//make a special case you might as well do it explicitly. -Sayu
|
||||
/obj/item/weapon/grenade/chem_grenade/large/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/slime_extract) && stage == WIRED)
|
||||
if(!user.unEquip(I))
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
|
||||
I.loc = src
|
||||
beakers += I
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
/obj/item/weapon/grenade/proc/update_mob()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.unEquip(src)
|
||||
M.dropItemToGround(src)
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W, mob/user, params)
|
||||
|
||||
@@ -24,11 +24,10 @@
|
||||
/obj/item/weapon/grenade/plastic/attackby(obj/item/I, mob/user, params)
|
||||
if(!nadeassembly && istype(I, /obj/item/device/assembly_holder))
|
||||
var/obj/item/device/assembly_holder/A = I
|
||||
if(!user.unEquip(I))
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return ..()
|
||||
nadeassembly = A
|
||||
A.master = src
|
||||
A.loc = src
|
||||
assemblyattacher = user.ckey
|
||||
user << "<span class='notice'>You add [A] to the [name].</span>"
|
||||
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
|
||||
@@ -36,7 +35,7 @@
|
||||
return
|
||||
if(nadeassembly && istype(I, /obj/item/weapon/wirecutters))
|
||||
playsound(src, I.usesound, 20, 1)
|
||||
nadeassembly.loc = get_turf(src)
|
||||
nadeassembly.forceMove(get_turf(src))
|
||||
nadeassembly.master = null
|
||||
nadeassembly = null
|
||||
update_icon()
|
||||
@@ -70,13 +69,14 @@
|
||||
return
|
||||
if (ismob(AM))
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>"
|
||||
|
||||
if(do_after(user, 50, target = AM))
|
||||
if(!user.unEquip(src))
|
||||
if(!user.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
src.target = AM
|
||||
loc = null
|
||||
forceMove(null) //Yep
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [det_time] second fuse",0,1)
|
||||
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(src)] with [det_time] second fuse")
|
||||
@@ -85,6 +85,8 @@
|
||||
if(!nadeassembly)
|
||||
user << "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>"
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time*10)
|
||||
else
|
||||
qdel(src) //How?
|
||||
|
||||
/obj/item/weapon/grenade/plastic/suicide_act(mob/user)
|
||||
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) suicided with [src] at ([user.x],[user.y],[user.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",0,1)
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
user << "<span class='warning'>Uh... how do those things work?!</span>"
|
||||
apply_cuffs(user,user)
|
||||
return
|
||||
|
||||
|
||||
// chance of monkey retaliation
|
||||
if(istype(C, /mob/living/carbon/monkey) && prob(MONKEY_CUFF_RETALIATION_PROB))
|
||||
var/mob/living/carbon/monkey/M
|
||||
M = C
|
||||
M.retaliate(user)
|
||||
|
||||
|
||||
if(!C.handcuffed)
|
||||
if(C.get_num_arms() >= 2 || C.get_arm_ignore())
|
||||
C.visible_message("<span class='danger'>[user] is trying to put [src.name] on [C]!</span>", \
|
||||
@@ -165,8 +165,7 @@
|
||||
var/obj/item/stack/rods/R = I
|
||||
if (R.use(1))
|
||||
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
||||
if(!remove_item_from_storage(user))
|
||||
user.unEquip(src)
|
||||
remove_item_from_storage(user)
|
||||
user.put_in_hands(W)
|
||||
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
||||
qdel(src)
|
||||
@@ -186,8 +185,7 @@
|
||||
M.use(6)
|
||||
user.put_in_hands(S)
|
||||
user << "<span class='notice'>You make some weights out of [I] and tie them to [src].</span>"
|
||||
if(!remove_item_from_storage(user))
|
||||
user.unEquip(src)
|
||||
remove_item_from_storage(user)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -49,9 +49,8 @@
|
||||
|
||||
if(holy_weapon)
|
||||
holy_weapon.reskinned = TRUE
|
||||
M.unEquip(src)
|
||||
M.put_in_active_hand(holy_weapon)
|
||||
qdel(src)
|
||||
M.put_in_active_hand(holy_weapon)
|
||||
|
||||
/obj/item/weapon/nullrod/godhand
|
||||
icon_state = "disintegrate"
|
||||
|
||||
@@ -35,9 +35,8 @@
|
||||
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C, mob/user, params)
|
||||
if(istype(C, /obj/item/weapon/implantcase))
|
||||
if(!case)
|
||||
if(!user.unEquip(C))
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
C.loc = src
|
||||
case = C
|
||||
update_icon()
|
||||
else
|
||||
|
||||
@@ -193,8 +193,6 @@
|
||||
if(hacked || other_esword.hacked)
|
||||
newSaber.hacked = TRUE
|
||||
newSaber.item_color = "rainbow"
|
||||
user.unEquip(W)
|
||||
user.unEquip(src)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
user.put_in_hands(newSaber)
|
||||
|
||||
@@ -61,12 +61,11 @@
|
||||
if(IW.w_class > src.w_class)
|
||||
user << "<span class='warning'>\The [IW] is too large to fit into \the [src]!</span>"
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
user << "<span class='notice'>You load \the [IW] into \the [src].</span>"
|
||||
loadedItems.Add(IW)
|
||||
loadedWeightClass += IW.w_class
|
||||
IW.loc = src
|
||||
|
||||
|
||||
|
||||
@@ -147,11 +146,10 @@
|
||||
if(src.tank)
|
||||
user << "<span class='warning'>\The [src] already has a tank.</span>"
|
||||
return
|
||||
if(!user.unEquip(thetank))
|
||||
if(!user.transferItemToLoc(thetank, src))
|
||||
return
|
||||
user << "<span class='notice'>You hook \the [thetank] up to \the [src].</span>"
|
||||
src.tank = thetank
|
||||
thetank.loc = src
|
||||
src.update_icons()
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/proc/update_icons()
|
||||
|
||||
@@ -63,11 +63,10 @@
|
||||
if(tank)
|
||||
user << "<span class='warning'>\The [src] already has a tank.</span>"
|
||||
return
|
||||
if(!user.unEquip(thetank))
|
||||
if(!user.transferItemToLoc(thetank, src))
|
||||
return
|
||||
user << "<span class='notice'>You hook \the [thetank] up to \the [src].</span>"
|
||||
tank = thetank
|
||||
thetank.forceMove(src)
|
||||
|
||||
|
||||
/obj/item/weapon/melee/powerfist/attack(mob/living/target, mob/living/user)
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
break
|
||||
|
||||
if(!inserted || !S.amount)
|
||||
usr.unEquip(S)
|
||||
usr.dropItemToGround(S)
|
||||
if (usr.client && usr.s_active != src)
|
||||
usr.client.screen -= S
|
||||
S.dropped(usr)
|
||||
|
||||
@@ -140,9 +140,11 @@
|
||||
return ..()
|
||||
if(!M.restrained() && !M.stat && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(!M.unEquip(src))
|
||||
if(!M.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
if(!M.put_in_hand(src,H.held_index))
|
||||
qdel(src)
|
||||
return
|
||||
M.put_in_hand(src,H.held_index)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
|
||||
@@ -57,9 +57,11 @@
|
||||
|
||||
if(istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(!M.unEquip(src))
|
||||
if(!M.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
if(!M.put_in_hand(src,H.held_index))
|
||||
qdel(src)
|
||||
return
|
||||
M.put_in_hand(src,H.held_index)
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
@@ -303,13 +305,14 @@
|
||||
if(!istype(W))
|
||||
return 0
|
||||
if(usr)
|
||||
if(!usr.unEquip(W))
|
||||
if(!usr.transferItemToLoc(W, src))
|
||||
return 0
|
||||
else
|
||||
W.forceMove(src)
|
||||
if(silent)
|
||||
prevent_warning = 1
|
||||
if(W.pulledby)
|
||||
W.pulledby.stop_pulling()
|
||||
W.loc = src
|
||||
W.on_enter_storage(src)
|
||||
if(usr)
|
||||
if(usr.client && usr.s_active != src)
|
||||
|
||||
@@ -73,9 +73,8 @@
|
||||
if(C.maxcharge < hitcost)
|
||||
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
bcell = W
|
||||
user << "<span class='notice'>You install a cell in [src].</span>"
|
||||
update_icon()
|
||||
|
||||
@@ -95,10 +95,10 @@
|
||||
var/obj/item/weapon/flamethrower/F = W
|
||||
if ((!F.status)||(F.ptank))
|
||||
return
|
||||
if(!user.transferItemToLoc(src, F))
|
||||
return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
user.unEquip(src)
|
||||
src.loc = F
|
||||
F.update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
playsound(loc, 'sound/effects/spray.ogg', 10, 1, -3)
|
||||
if (H && !qdeleted(H))
|
||||
for(var/obj/item/W in H)
|
||||
H.unEquip(W)
|
||||
H.dropItemToGround(W)
|
||||
if(prob(50))
|
||||
step(W, pick(alldirs))
|
||||
H.hair_style = "Bald"
|
||||
|
||||
@@ -67,14 +67,12 @@
|
||||
/obj/item/weapon/watertank/proc/remove_noz()
|
||||
if(ismob(noz.loc))
|
||||
var/mob/M = noz.loc
|
||||
M.unEquip(noz, 1)
|
||||
M.temporarilyRemoveItemFromInventory(noz, TRUE)
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/Destroy()
|
||||
if (on)
|
||||
remove_noz()
|
||||
qdel(noz)
|
||||
noz = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/watertank/attack_hand(mob/user)
|
||||
@@ -87,7 +85,7 @@
|
||||
var/mob/M = src.loc
|
||||
if(istype(M) && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(!M.unEquip(src))
|
||||
if(!M.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
M.put_in_hand(src, H.held_index)
|
||||
|
||||
@@ -138,8 +136,7 @@
|
||||
|
||||
/proc/check_tank_exists(parent_tank, mob/living/carbon/human/M, obj/O)
|
||||
if (!parent_tank || !istype(parent_tank, /obj/item/weapon/watertank)) //To avoid weird issues from admin spawns
|
||||
M.unEquip(O)
|
||||
qdel(0)
|
||||
qdel(O)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
@@ -30,13 +30,11 @@
|
||||
if(istype(I, /obj/item/weapon/ore/bluespace_crystal))
|
||||
if(!bcell)
|
||||
var/obj/item/weapon/melee/baton/cattleprod/teleprod/S = new /obj/item/weapon/melee/baton/cattleprod/teleprod
|
||||
if(!remove_item_from_storage(user))
|
||||
user.unEquip(src)
|
||||
user.unEquip(I)
|
||||
remove_item_from_storage(user)
|
||||
qdel(src)
|
||||
qdel(I)
|
||||
user.put_in_hands(S)
|
||||
user << "<span class='notice'>You place the bluespace crystal firmly into the igniter.</span>"
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
else
|
||||
user.visible_message("<span class='warning'>You can't put the crystal onto the stunprod while it has a power cell installed!</span>")
|
||||
else
|
||||
|
||||
@@ -73,9 +73,8 @@
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
|
||||
var/obj/item/weapon/wirecutters/power/s_drill = new /obj/item/weapon/screwdriver/power
|
||||
user << "<span class='notice'>You attach the screw driver bit to [src].</span>"
|
||||
user.unEquip(src)
|
||||
user.put_in_active_hand(s_drill)
|
||||
qdel(src)
|
||||
user.put_in_active_hand(s_drill)
|
||||
|
||||
/obj/item/weapon/wrench/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
|
||||
@@ -106,7 +105,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/W in user)
|
||||
user.unEquip(W)
|
||||
user.dropItemToGround(W)
|
||||
|
||||
var/obj/item/weapon/wrench/medical/W = new /obj/item/weapon/wrench/medical(loc)
|
||||
W.add_fingerprint(user)
|
||||
@@ -203,9 +202,8 @@
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
|
||||
var/obj/item/weapon/wrench/power/b_drill = new /obj/item/weapon/wrench/power
|
||||
user << "<span class='notice'>You attach the bolt driver bit to [src].</span>"
|
||||
user.unEquip(src)
|
||||
user.put_in_active_hand(b_drill)
|
||||
qdel(src)
|
||||
user.put_in_active_hand(b_drill)
|
||||
|
||||
/obj/item/weapon/screwdriver/cyborg
|
||||
name = "powered screwdriver"
|
||||
@@ -302,9 +300,8 @@
|
||||
playsound(get_turf(user),"sound/items/change_jaws.ogg",50,1)
|
||||
var/obj/item/weapon/crowbar/power/pryjaws = new /obj/item/weapon/crowbar/power
|
||||
user << "<span class='notice'>You attach the pry jaws to [src].</span>"
|
||||
user.unEquip(src)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
qdel(src)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
/*
|
||||
* Welding Tool
|
||||
*/
|
||||
@@ -561,8 +558,7 @@
|
||||
if (R.use(1))
|
||||
var/obj/item/weapon/flamethrower/F = new /obj/item/weapon/flamethrower(user.loc)
|
||||
if(!remove_item_from_storage(F))
|
||||
user.unEquip(src)
|
||||
loc = F
|
||||
user.transferItemToLoc(src, F, TRUE)
|
||||
F.weldtool = src
|
||||
add_fingerprint(user)
|
||||
user << "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>"
|
||||
@@ -742,6 +738,5 @@
|
||||
playsound(get_turf(user),"sound/items/change_jaws.ogg",50,1)
|
||||
var/obj/item/weapon/wirecutters/power/cutjaws = new /obj/item/weapon/wirecutters/power
|
||||
user << "<span class='notice'>You attach the cutting jaws to [src].</span>"
|
||||
user.unEquip(src)
|
||||
user.put_in_active_hand(cutjaws)
|
||||
qdel(src)
|
||||
user.put_in_active_hand(cutjaws)
|
||||
|
||||
@@ -182,13 +182,13 @@
|
||||
/obj/item/weapon/twohanded/required/wield(mob/living/carbon/user)
|
||||
..()
|
||||
if(!wielded)
|
||||
user.unEquip(src)
|
||||
user.dropItemToGround(src)
|
||||
|
||||
/obj/item/weapon/twohanded/required/unwield(mob/living/carbon/user, show_message = TRUE)
|
||||
if(show_message)
|
||||
user << "<span class='notice'>You drop [src].</span>"
|
||||
..(user, FALSE)
|
||||
user.unEquip(src)
|
||||
user.dropItemToGround(src)
|
||||
|
||||
/*
|
||||
* Fireaxe
|
||||
|
||||
@@ -219,26 +219,24 @@ var/highlander_claymores = 0
|
||||
if(istype(I, /obj/item/weapon/shard))
|
||||
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
|
||||
|
||||
if(!remove_item_from_storage(user))
|
||||
user.unEquip(src)
|
||||
user.unEquip(I)
|
||||
remove_item_from_storage(user)
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
|
||||
user.put_in_hands(S)
|
||||
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/device/assembly/igniter) && !(I.flags & NODROP))
|
||||
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
|
||||
|
||||
if(!remove_item_from_storage(user))
|
||||
user.unEquip(src)
|
||||
user.unEquip(I)
|
||||
remove_item_from_storage(user)
|
||||
|
||||
user.put_in_hands(P)
|
||||
user << "<span class='notice'>You fasten [I] to the top of the rod with the cable.</span>"
|
||||
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
|
||||
user.put_in_hands(P)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/obj/structure/easel/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/canvas))
|
||||
var/obj/item/weapon/canvas/C = I
|
||||
user.unEquip(C)
|
||||
user.dropItemToGround(C)
|
||||
painting = C
|
||||
C.loc = get_turf(src)
|
||||
C.layer = layer+0.1
|
||||
|
||||
@@ -254,7 +254,6 @@
|
||||
if(remaining_mats)
|
||||
for(var/M=1 to remaining_mats)
|
||||
new stack_type(get_turf(loc))
|
||||
user.unEquip(src,1) //Even NODROP chairs are destroyed.
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -213,8 +213,7 @@
|
||||
else if(istype(I, /obj/item/weapon/electronics/airlock))
|
||||
user << "<span class='notice'>You start installing the electronics into [src]...</span>"
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(user.unEquip(I) && do_after(user, 30, target = src))
|
||||
I.loc = src
|
||||
if(do_after(user, 30, target = src) && user.transferItemToLoc(I,src))
|
||||
electronics = I
|
||||
user << "<span class='notice'>You install the airlock electronics.</span>"
|
||||
|
||||
|
||||
@@ -29,9 +29,8 @@
|
||||
user << "<span class='info'>You are not authorized to add notices</span>"
|
||||
return
|
||||
if(notices < 5)
|
||||
if(!user.unEquip(O))
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
return
|
||||
O.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]"
|
||||
user << "<span class='notice'>You pin the [O] to the noticeboard.</span>"
|
||||
|
||||
Reference in New Issue
Block a user