mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user