NODROP flag addition & handling

- Purges canremove
- Implements functionality for NODROP flag, replaces canremove
- Refactors mob inventory unequipping.
This commit is contained in:
DZD
2015-02-18 13:22:41 -05:00
parent 723dc2ad98
commit fbd9c367c0
128 changed files with 618 additions and 659 deletions
+27 -27
View File
@@ -599,13 +599,13 @@
if(counter >= 5) //So things dont get squiiiiished!
jobs += "</tr><tr align='center'>"
counter = 0
//Drone
if(jobban_isbanned(M, "Drone"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Drone;jobban4=\ref[M]'><font color=red>Drone</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Drone;jobban4=\ref[M]'>Drone</a></td>"
//pAI
if(jobban_isbanned(M, "pAI"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'><font color=red>pAI</font></a></td>"
@@ -675,19 +675,19 @@
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=ninja;jobban4=\ref[M]'><font color=red>[replacetext("Ninja", " ", "&nbsp")]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=ninja;jobban4=\ref[M]'>[replacetext("Ninja", " ", "&nbsp")]</a></td>"
//Raider
if(jobban_isbanned(M, "raider") || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=raider;jobban4=\ref[M]'><font color=red>[replacetext("Raider", " ", "&nbsp")]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=raider;jobban4=\ref[M]'>[replacetext("Raider", " ", "&nbsp")]</a></td>"
//Mutineer
if(jobban_isbanned(M, "mutineer") || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=mutineer;jobban4=\ref[M]'><font color=red>[replacetext("Mutineer", " ", "&nbsp")]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=mutineer;jobban4=\ref[M]'>[replacetext("Mutineer", " ", "&nbsp")]</a></td>"
//Blob
if(jobban_isbanned(M, "blob") || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=blob;jobban4=\ref[M]'><font color=red>[replacetext("Blob", " ", "&nbsp")]</font></a></td>"
@@ -706,12 +706,12 @@
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Dionaea;jobban4=\ref[M]'><font color=red>Dionaea Nymph</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Dionaea;jobban4=\ref[M]'>Dionaea Nymph</a></td>"
//NPC
if(jobban_isbanned(M, "NPC"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=NPC;jobban4=\ref[M]'><font color=red>NPC</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=NPC;jobban4=\ref[M]'>NPC</a></td>"
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=NPC;jobban4=\ref[M]'>NPC</a></td>"
//ANTAG HUD
if(jobban_isbanned(M, "AntagHUD"))
@@ -1149,7 +1149,7 @@
//strip their stuff and stick it in the crate
for(var/obj/item/I in M)
M.u_equip(I)
M.unEquip(I)
if(I)
I.loc = locker
I.layer = initial(I.layer)
@@ -1170,7 +1170,7 @@
M << "\red You have been sent to the prison station!"
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1)
else if(href_list["sendbacktolobby"])
if(!check_rights(R_ADMIN))
return
@@ -1193,7 +1193,7 @@
var/mob/new_player/NP = new()
NP.ckey = M.ckey
qdel(M)
qdel(M)
else if(href_list["tdome1"])
if(!check_rights(R_SERVER|R_EVENT)) return
@@ -1210,7 +1210,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
M.unEquip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
@@ -1239,7 +1239,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
M.unEquip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
@@ -1290,7 +1290,7 @@
return
for(var/obj/item/I in M)
M.u_equip(I)
M.unEquip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
@@ -1666,11 +1666,11 @@
//open a browse window listing the contents instead
var/data = ""
var/obj/item/weapon/paper_bundle/B = fax
for (var/page = 1, page <= B.amount + 1, page++)
var/obj/pageobj = B.contents[page]
data += "<A href='?src=\ref[src];AdminFaxViewPage=[page];paper_bundle=\ref[B]'>Page [page] - [pageobj.name]</A><BR>"
usr << browse(data, "window=[B.name]")
else
usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]"
@@ -1678,9 +1678,9 @@
else if (href_list["AdminFaxViewPage"])
var/page = text2num(href_list["AdminFaxViewPage"])
var/obj/item/weapon/paper_bundle/bundle = locate(href_list["paper_bundle"])
if (!bundle) return
if (istype(bundle.contents[page], /obj/item/weapon/paper))
var/obj/item/weapon/paper/P = bundle.contents[page]
P.show_content(src.owner, 1)
@@ -1688,7 +1688,7 @@
var/obj/item/weapon/photo/H = bundle.contents[page]
H.show(src.owner)
return
else if(href_list["CentcommFaxReply"])
var/mob/sender = locate(href_list["CentcommFaxReply"])
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
@@ -1697,26 +1697,26 @@
if(!input) return
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
// Create the reply message
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( null ) //hopefully the null loc won't cause trouble for us
P.name = "[command_name()]- [customname]"
P.info = input
P.update_icon()
P.stamps += "<HR><img src=large_stamp-cent.png>"
P.stamps += "<HR><img src=large_stamp-cent.png>"
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
P.x = rand(-2, 0)
P.y = rand(-1, 2)
P.y = rand(-1, 2)
P.offset_x += P.x
P.offset_y += P.y
stampoverlay.pixel_x = P.x
stampoverlay.pixel_y = P.y
if(!P.ico)
P.ico = new
P.ico += "paper_stamp-cent"
stampoverlay.icon_state = "paper_stamp-cent"
// Stamps
if(!P.stamped)
P.stamped = new
@@ -1729,7 +1729,7 @@
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)]", 1)
else
src.owner << "\red Message reply failed."
spawn(100)
del(P)
return
@@ -2033,12 +2033,12 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BLOB")
message_admins("[key_name_admin(usr)] has triggered a blob.")
new /datum/game_mode/blob()
new /datum/game_mode/blob()
if("aliens")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ALIEN")
message_admins("[key_name_admin(usr)] has triggered an alien infestation.")
new /datum/event/alien_infestation()
new /datum/event/alien_infestation()
if("power")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","P")
@@ -2111,7 +2111,7 @@
if(istype(W, /datum/organ/external))
continue
//don't strip organs
H.u_equip(W)
H.unEquip(W)
if (H.client)
H.client.screen -= W
if (W)
+3 -3
View File
@@ -10,7 +10,7 @@
return
for(var/obj/item/W in M)
M.drop_from_inventory(W)
M.unEquip(W)
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
@@ -28,7 +28,7 @@
return
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/W in M)
M.drop_from_inventory(W)
M.unEquip(W)
//teleport person to cell
M.Paralyse(5)
sleep(5) //so they black out before warping
@@ -941,7 +941,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice != "Confirm")
return
if(emergency_shuttle.no_escape)
choice = input("The shuttle will not be able to leave if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice != "Confirm")
+5 -5
View File
@@ -79,20 +79,20 @@
..()
return
if(!canremove)
if(flags & NODROP)
return
var/obj/item/clothing/ears/O
if(slot_flags & SLOT_TWOEARS )
O = (H.l_ear == src ? H.r_ear : H.l_ear)
user.u_equip(O)
user.unEquip(O)
if(!istype(src,/obj/item/clothing/ears/offear))
del(O)
O = src
else
O = src
user.u_equip(src)
user.unEquip(src)
if (O)
user.put_in_hands(O)
@@ -388,10 +388,10 @@ BLIND // can't see anything
if (!( usr.restrained() ) && !( usr.stat ) && ( over_object ))
switch(over_object.name)
if("r_hand")
usr.u_equip(src)
usr.unEquip(src)
usr.put_in_r_hand(src)
if("l_hand")
usr.u_equip(src)
usr.unEquip(src)
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
return
+3 -3
View File
@@ -35,7 +35,7 @@
desc = "An implanted replacement for a left eye with meson vision capabilities."
icon_state = "cybereye-green"
item_state = "eyepatch"
canremove = 0
flags = NODROP
/obj/item/clothing/glasses/science
name = "Science Goggles"
@@ -88,7 +88,7 @@
desc = "An implanted replacement for a left eye with material vision capabilities."
icon_state = "cybereye-blue"
item_state = "eyepatch"
canremove = 0
flags = NODROP
/obj/item/clothing/glasses/regular
name = "Prescription Glasses"
@@ -293,4 +293,4 @@
desc = "An implanted replacement for a left eye with thermal vision capabilities."
icon_state = "cybereye-red"
item_state = "eyepatch"
canremove = 0
flags = NODROP
+1 -1
View File
@@ -335,4 +335,4 @@
icon_state = "shamebrero"
item_state = "shamebrero"
desc = "Once it's on, it never comes off."
canremove = 0
flags = NODROP
+3 -3
View File
@@ -111,7 +111,7 @@
/obj/item/clothing/mask/horsehead/equipped(mob/user, slot)
if(!canremove) //cursed masks only
if(flags & NODROP) //cursed masks only
originalname = user.real_name
if(!user.real_name || user.real_name == "Unknown")
user.real_name = "A Horse With No Name" //it felt good to be out of the rain
@@ -120,12 +120,12 @@
..()
/obj/item/clothing/mask/horsehead/dropped() //this really shouldn't happen, but call it extreme caution
if(!canremove)
if(flags & NODROP)
goodbye_horses(loc)
..()
/obj/item/clothing/mask/horsehead/Destroy()
if(!canremove)
if(flags & NODROP)
goodbye_horses(loc)
..()
+3 -3
View File
@@ -204,7 +204,7 @@
if(src.magpulse)
flags &= ~NOSLIP
magpulse = 0
canremove = 1
flags |= NODROP
user << "You relax your deathgrip on the flooring."
else
//make sure these can only be used when equipped.
@@ -218,7 +218,7 @@
flags |= NOSLIP
magpulse = 1
canremove = 0 //kinda hard to take off magclaws when you are gripping them tightly.
flags &= ~NODROP //kinda hard to take off magclaws when you are gripping them tightly.
user << "You dig your claws deeply into the flooring, bracing yourself."
user << "It would be hard to take off the [src] without relaxing your grip first."
@@ -229,7 +229,7 @@
user.visible_message("The [src] go limp as they are removed from [usr]'s feet.", "The [src] go limp as they are removed from your feet.")
flags &= ~NOSLIP
magpulse = 0
canremove = 1
flags &= ~NODROP
/obj/item/clothing/shoes/magboots/vox/examine()
set src in view()
@@ -139,9 +139,9 @@
if(user.head && istype(user.head, /obj/item/clothing/head/helmet/space/chronos))
user << "\[ <span style='color: #00ff00;'>ok</span> \] Mounting /dev/helmet"
helmet = user.head
helmet.canremove = 0
helmet.flags |= NODROP
helmet.suit = src
src.canremove = 0
src.flags |= NODROP
user << "\[ <span style='color: #00ff00;'>ok</span> \] Starting brainwave scanner"
user << "\[ <span style='color: #00ff00;'>ok</span> \] Starting ui display driver"
user << "\[ <span style='color: #00ff00;'>ok</span> \] Initializing chronowalk4-view"
@@ -169,11 +169,11 @@
user << "\[ <span style='color: #ff5500;'>ok</span> \] Stopping ui display driver"
user << "\[ <span style='color: #ff5500;'>ok</span> \] Stopping brainwave scanner"
user << "\[ <span style='color: #ff5500;'>ok</span> \] Unmounting /dev/helmet"
helmet.canremove = 1
helmet.flags &= ~NODROP
helmet.suit = null
helmet = null
user << "logout"
src.canremove = 1
src.flags &= ~NODROP
cooldown = world.time + cooldowntime * 1.5
activated = 0
activating = 0
+9 -9
View File
@@ -112,7 +112,7 @@
//TODO: Species check, skull damage for forcing an unfitting helmet on?
helmet.loc = H
H.equip_to_slot(helmet, slot_head)
helmet.canremove = 0
helmet.flags |= NODROP
if(attached_boots && boots)
if(H.shoes)
@@ -121,7 +121,7 @@
M << "Your suit's boots deploy with a hiss."
boots.loc = H
H.equip_to_slot(boots, slot_shoes)
boots.canremove = 0
boots.flags |= NODROP
/obj/item/clothing/suit/space/rig/dropped()
..()
@@ -132,16 +132,16 @@
H = helmet.loc
if(istype(H))
if(helmet && H.head == helmet)
helmet.canremove = 1
H.drop_from_inventory(helmet)
helmet.flags &= ~NODROP
H.unEquip(helmet)
helmet.loc = src
if(boots)
H = boots.loc
if(istype(H))
if(boots && H.shoes == boots)
boots.canremove = 1
H.drop_from_inventory(boots)
boots.flags &= ~NODROP
H.unEquip(boots)
boots.loc = src
/*
@@ -206,8 +206,8 @@
if(H.wear_suit != src) return
if(H.head == helmet)
helmet.canremove = 1
H.drop_from_inventory(helmet)
helmet.flags &= ~NODROP
H.unEquip(helmet)
helmet.loc = src
H << "\blue You retract your hardsuit helmet."
else
@@ -218,7 +218,7 @@
helmet.loc = H
helmet.pickup(H)
H.equip_to_slot(helmet, slot_head)
helmet.canremove = 0
helmet.flags |= NODROP
H << "\blue You deploy your hardsuit helmet, sealing you off from the world."
/obj/item/clothing/suit/space/rig/attackby(obj/item/W as obj, mob/user as mob)
+1 -1
View File
@@ -207,7 +207,7 @@
desc = "Forced to live on your shameful acting as a fake Mexican, you and your poncho have grown inseperable. Literally."
icon_state = "ponchoshame"
item_state = "ponchoshame"
canremove = 0
flags = NODROP
/*
* Misc
@@ -17,7 +17,7 @@
return 0
else
return 1
/obj/item/clothing/accessory/holster/attack_self()
var/holsteritem = usr.get_active_hand()
if(!holstered)
@@ -40,7 +40,7 @@
return
holstered = W
user.drop_from_inventory(holstered)
user.unEquip(holstered)
holstered.loc = src
holstered.add_fingerprint(user)
user.visible_message("<span class='notice'>[user] holsters the [holstered].</span>", "<span class='notice'>You holster the [holstered].</span>")
+2 -2
View File
@@ -32,7 +32,7 @@
flags = ONESIZEFITSALL
/obj/item/clothing/under/color/blue/dodgeball
canremove = 0
flags = ONESIZEFITSALL | NODROP
/obj/item/clothing/under/color/green
name = "green jumpsuit"
@@ -84,7 +84,7 @@
flags = ONESIZEFITSALL
/obj/item/clothing/under/color/red/dodgeball
canremove = 0
flags = ONESIZEFITSALL | NODROP
/obj/item/clothing/under/color/white
name = "white jumpsuit"
@@ -154,7 +154,7 @@
if(isobj(obj))
var/mob/M = obj.loc
if(ismob(M))
M.u_equip(obj)
M.unEquip(obj)
M.update_icons() //so their overlays update
if(!silent)
+4 -4
View File
@@ -58,7 +58,7 @@
/obj/machinery/mill/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.u_equip(W)
user.unEquip(W)
W.loc = src
input += W
else
@@ -128,7 +128,7 @@
/obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.u_equip(W)
user.unEquip(W)
W.loc = src
input += W
else
@@ -189,7 +189,7 @@
/obj/machinery/still/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.u_equip(W)
user.unEquip(W)
W.loc = src
input += W
else
@@ -274,7 +274,7 @@
/obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.u_equip(W)
user.unEquip(W)
W.loc = src
input += W
else
+2 -2
View File
@@ -374,13 +374,13 @@
else ..()
if (load == 1)
user.u_equip(W)
user.unEquip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
W.dropped()
else if (load == 2)
user.u_equip(W)
user.unEquip(W)
W.dropped()
if ((user.client && user.s_active != src))
user.client.screen -= W
+1 -1
View File
@@ -20,7 +20,7 @@
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/ore))
user.u_equip(W)
user.unEquip(W)
src.contents += W
if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
+32 -79
View File
@@ -80,98 +80,51 @@
return drop_item()
return 0
/mob/proc/drop_from_inventory(var/obj/item/W)
if(W)
if(client) client.screen -= W
u_equip(W)
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()
return 1
return 0
//Drops the item in our left hand
/mob/proc/drop_l_hand(var/atom/Target)
if(l_hand)
if(client) client.screen -= l_hand
l_hand.layer = initial(l_hand.layer)
if(Target) l_hand.loc = Target.loc
else l_hand.loc = loc
var/turf/T = get_turf(loc)
if(isturf(T))
T.Entered(l_hand)
l_hand.dropped(src)
l_hand = null
update_inv_l_hand()
return 1
return 0
/mob/proc/drop_l_hand()
return unEquip(l_hand) //All needed checks are in unEquip
//Drops the item in our right hand
/mob/proc/drop_r_hand(var/atom/Target)
if(r_hand)
if(client) client.screen -= r_hand
r_hand.layer = initial(r_hand.layer)
if(Target) r_hand.loc = Target.loc
else r_hand.loc = loc
var/turf/T = get_turf(Target)
if(istype(T))
T.Entered(r_hand)
r_hand.dropped(src)
r_hand = null
update_inv_r_hand()
return 1
return 0
/mob/proc/drop_r_hand()
return unEquip(r_hand) //Why was this not calling unEquip in the first place jesus fuck.
//Drops the item in our active hand.
/mob/proc/drop_item(var/atom/Target)
if(hand) return drop_l_hand(Target)
else return drop_r_hand(Target)
/mob/proc/drop_item() //THIS. DOES. NOT. NEED. AN. ARGUMENT.
if(hand)
return drop_l_hand()
else
return drop_r_hand()
//TODO: phase out this proc
/mob/proc/before_take_item(var/obj/item/W) //TODO: what is this?
W.loc = null
W.layer = initial(W.layer)
u_equip(W)
update_icons()
return
//Here lie unEquip and before_item_take, already forgotten and not missed.
/mob/proc/u_equip(W as obj)
if (W == r_hand)
/mob/proc/unEquip(obj/item/I, force) //Force overrides NODROP for things like wizarditis and admin undress.
if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(unEquip) should generally be used to check for NODROP.
return 1
if((I.flags & NODROP) && !force)
return 0
if(I == r_hand)
r_hand = null
update_inv_r_hand(0)
else if (W == l_hand)
update_inv_r_hand()
else if(I == l_hand)
l_hand = null
update_inv_l_hand(0)
else if (W == back)
back = null
update_inv_back(0)
else if (W == wear_mask)
wear_mask = null
update_inv_wear_mask(0)
return
update_inv_l_hand()
if(I)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
return 1
//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)
src.u_equip(O)
if (src.client)
src.client.screen -= O
O.layer = initial(O.layer)
unEquip(O)
O.screen_loc = null
return 1
@@ -1,23 +1,16 @@
//unequip
/mob/living/carbon/alien/humanoid/u_equip(obj/item/W as obj)
if (W == wear_suit)
wear_suit = null
update_inv_wear_suit(0,0)
else if (W == head)
head = null
update_inv_head(0,0)
else if (W == r_store)
/mob/living/carbon/alien/humanoid/unEquip(obj/item/I as obj)
. = ..()
if(!. || !I)
return
if(I == r_store)
r_store = null
update_inv_pockets(0)
else if (W == l_store)
else if(I == l_store)
l_store = null
update_inv_pockets(0)
else if (W == r_hand)
r_hand = null
update_inv_r_hand(0)
else if (W == l_hand)
l_hand = null
update_inv_l_hand(0)
/mob/living/carbon/alien/humanoid/attack_ui(slot_id)
var/obj/item/W = get_active_hand()
@@ -31,7 +24,7 @@
return
if(W.w_class > 3)
return
u_equip(W)
unEquip(W)
l_store = W
update_inv_pockets()
if(slot_r_store)
@@ -39,7 +32,7 @@
return
if(W.w_class > 3)
return
u_equip(W)
unEquip(W)
r_store = W
update_inv_pockets()
else
@@ -104,7 +104,7 @@
//TODO
wear_suit.screen_loc = ui_alien_oclothing
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
drop_from_inventory(handcuffed)
unEquip(handcuffed)
drop_r_hand()
drop_l_hand()
@@ -1,3 +1,3 @@
//can't unequip since it can't equip anything
/mob/living/carbon/alien/larva/u_equip(obj/item/W as obj)
/mob/living/carbon/alien/larva/unEquip(obj/item/W as obj)
return
@@ -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)
..()
user.before_take_item(src)
user.unEquip(src)
Attach(M)
/obj/item/clothing/mask/facehugger/examine(mob/user)
@@ -131,9 +131,12 @@ var/const/MAX_ACTIVE_TIME = 400
if(iscarbon(M))
var/mob/living/carbon/target = L
if(target.wear_mask)
if(prob(20)) return 0
if(prob(20))
return 0
var/obj/item/clothing/W = target.wear_mask
target.before_take_item(W)
if(W.flags & NODROP)
return 0
target.unEquip(W)
target.visible_message("<span class='danger'>[src] tears [W] off of [target]'s face!</span>", \
"<span class='userdanger'>[src] tears [W] off of [target]'s face!</span>")
@@ -162,7 +165,7 @@ var/const/MAX_ACTIVE_TIME = 400
var/mob/living/carbon/C = target
if(C.wear_mask != src)
return
if(ishuman(target))
var/mob/living/carbon/human/H = target
if((H.species.flags & IS_SYNTHETIC))
@@ -233,7 +236,7 @@ var/const/MAX_ACTIVE_TIME = 400
/proc/CanHug(var/mob/M)
if(!M || !ismob(M))
return 0
if(M.stat == DEAD)
return 0
@@ -255,4 +258,4 @@ var/const/MAX_ACTIVE_TIME = 400
gender = FEMALE
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
return
return
+26 -18
View File
@@ -378,11 +378,13 @@
throw_mode_off()
if(usr.stat || !target)
return
if(target.type == /obj/screen) return
if(target.type == /obj/screen)
return
var/atom/movable/item = src.get_active_hand()
if(!item) return
if(!item || (item.flags & NODROP))
return
if (istype(item, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = item
@@ -404,10 +406,10 @@
else
M.LAssailant = usr
if(!item) return //Grab processing has a chance of returning null
item.layer = initial(item.layer)
u_equip(item)
if(!item)
return //Grab processing has a chance of returning null
if(!ismob(item)) //Honk mobs don't have a dropped() proc honk
unEquip(item)
update_icons()
if (istype(usr, /mob/living/carbon)) //Check if a carbon mob is throwing. Modify/remove this line as required.
@@ -419,6 +421,7 @@
//actually throw it!
if (item)
item.layer = initial(item.layer)
src.visible_message("\red [src] has thrown [item].")
if(!src.lastarea)
@@ -453,20 +456,25 @@
return 1
return
/mob/living/carbon/u_equip(obj/item/W as obj)
if(!W) return 0
/mob/living/carbon/unEquip(obj/item/I) //THIS PROC DID NOT CALL ..()
. = ..() //Sets the default return value to what the parent returns.
if(!. || !I) //We don't want to set anything to null if the parent returned 0.
return
else if (W == handcuffed)
if(I == back)
back = null
update_inv_back(0)
else if(I == wear_mask)
if(istype(src, /mob/living/carbon/human)) //If we don't do this hair won't be properly rebuilt.
return
wear_mask = null
update_inv_wear_mask(0)
else if(I == handcuffed)
handcuffed = null
update_inv_handcuffed()
else if (W == legcuffed)
update_inv_handcuffed(0)
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed()
else
..()
return
update_inv_legcuffed(0)
/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
user.set_machine(src)
@@ -579,4 +587,4 @@
return
/mob/living/carbon/proc/canBeHandcuffed()
return 0
return 0
@@ -641,6 +641,8 @@
var/obj/item/place_item = usr.get_active_hand() // Item to place in the pocket, if it's empty
if(pocket_item && !(pocket_item.flags & ABSTRACT))
if(pocket_item.flags & NODROP)
usr << "<span class='notice'>You try to empty [src]'s [pocket_side] pocket, it seems to be stuck!</span>"
usr << "<span class='notice'>You try to empty [src]'s [pocket_side] pocket.</span>"
else if(place_item && place_item.mob_can_equip(src, pocket_id, 1) && !(place_item.flags & ABSTRACT))
usr << "<span class='notice'>You try to place [place_item] into [src]'s [pocket_side] pocket.</span>"
@@ -649,11 +651,11 @@
if(do_mob(usr, src, STRIP_DELAY))
if(pocket_item)
u_equip(pocket_item)
unEquip(pocket_item)
usr.put_in_hands(pocket_item)
else
if(place_item)
usr.u_equip(place_item)
usr.unEquip(place_item)
equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
// Update strip window
@@ -687,11 +689,11 @@
if(do_mob(usr, src, STRIP_DELAY))
if(worn_id)
u_equip(worn_id)
unEquip(worn_id)
usr.put_in_hands(worn_id)
else
if(place_item)
usr.u_equip(place_item)
usr.unEquip(place_item)
equip_to_slot_if_possible(place_item, slot_wear_id, 0, 1)
// Update strip window
@@ -176,11 +176,11 @@
if(head)
var/obj/item/clothing/head/H = head
if(!istype(H) || prob(H.loose))
drop_from_inventory(H)
if(prob(60))
step_away(H,M)
visible_message("<span class='warning'>[M] has knocked [src]'s [H] off!</span>",
"<span class='warning'>[M] knocked \the [H] clean off your head!</span>") */
if(unEquip(H))
if(prob(60))
step_away(H,M)
visible_message("<span class='warning'>[M] has knocked [src]'s [H] off!</span>",
"<span class='warning'>[M] knocked \the [H] clean off your head!</span>") */
var/talked = 0 // BubbleWrap
@@ -209,8 +209,8 @@
//End BubbleWrap
if(!talked) //BubbleWrap
drop_item()
visible_message("\red <B>[M] has disarmed [src]!</B>")
if(drop_item())
visible_message("\red <B>[M] has disarmed [src]!</B>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
@@ -348,7 +348,7 @@ This function restores all organs.
multiplier = 2
var/obj/item/clothing/head/H = head
if(!istype(H) || prob(H.loose * multiplier))
drop_from_inventory(H)
unEquip(H)
if(prob(60))
step_rand(H)
if(!stat)
@@ -72,7 +72,7 @@ emp_act
if(c_hand && (stun_amount || agony_amount > 10))
msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect")
u_equip(c_hand)
unEquip(c_hand)
if (affected.status & ORGAN_ROBOT)
emote("me", 1, "drops what they were holding, their [affected.display_name] malfunctioning!")
else
+67 -114
View File
@@ -104,123 +104,76 @@
if(slot_tie)
return 1
/mob/living/carbon/human/u_equip(obj/item/W as obj)
if(!W) return 0
/mob/living/carbon/human/unEquip(obj/item/I)
. = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should.
if(!. || !I)
return
var/success
if (W == wear_suit)
if(I == wear_suit)
if(s_store)
drop_from_inventory(s_store)
if(W)
success = 1
unEquip(s_store, 1) //It makes no sense for your suit storage to stay on you if you drop your suit.
wear_suit = null
update_inv_wear_suit()
else if (W == w_uniform)
if (r_store)
drop_from_inventory(r_store)
if (l_store)
drop_from_inventory(l_store)
if (wear_id)
drop_from_inventory(wear_id)
if (belt)
drop_from_inventory(belt)
if(I.flags_inv & HIDEJUMPSUIT)
update_inv_w_uniform()
update_inv_wear_suit(0)
else if(I == w_uniform)
if(r_store)
unEquip(r_store, 1) //Again, makes sense for pockets to drop.
if(l_store)
unEquip(l_store, 1)
if(wear_id)
unEquip(wear_id)
if(belt)
unEquip(belt)
w_uniform = null
success = 1
update_inv_w_uniform()
else if (W == gloves)
update_inv_w_uniform(0)
else if(I == gloves)
gloves = null
success = 1
update_inv_gloves()
else if (W == glasses)
update_inv_gloves(0)
else if(I == glasses)
glasses = null
success = 1
update_inv_glasses()
else if (W == head)
update_inv_glasses(0)
else if(I == head)
head = null
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
if(I.flags & BLOCKHAIR)
update_hair(0) //rebuild hair
success = 1
update_inv_head()
else if (W == l_ear)
l_ear = null
success = 1
update_inv_ears()
else if (W == r_ear)
update_inv_head(0)
else if(I == r_ear)
r_ear = null
success = 1
update_inv_ears()
else if (W == shoes)
update_inv_ears(0)
else if (I == l_ear)
l_ear = null
update_inv_ears(0)
else if(I == shoes)
shoes = null
success = 1
update_inv_shoes()
else if (W == belt)
update_inv_shoes(0)
else if(I == belt)
belt = null
success = 1
update_inv_belt()
else if (W == wear_mask)
update_inv_belt(0)
else if(I == wear_mask)
wear_mask = null
success = 1
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
if(I.flags & BLOCKHAIR)
update_hair(0) //rebuild hair
if(internal)
if(internals)
internals.icon_state = "internal0"
internal = null
update_inv_wear_mask()
else if (W == wear_id)
update_inv_wear_mask(0)
else if(I == wear_id)
wear_id = null
success = 1
update_inv_wear_id()
else if (W == wear_pda)
wear_pda = null
success = 1
update_inv_wear_pda()
else if (W == r_store)
update_inv_wear_id(0)
else if(I == r_store)
r_store = null
success = 1
update_inv_pockets()
else if (W == l_store)
update_inv_pockets(0)
else if(I == l_store)
l_store = null
success = 1
update_inv_pockets()
else if (W == s_store)
update_inv_pockets(0)
else if(I == s_store)
s_store = null
success = 1
update_inv_s_store()
else if (W == back)
back = null
success = 1
update_inv_back()
else if (W == handcuffed)
handcuffed = null
success = 1
update_inv_handcuffed()
else if (W == legcuffed)
legcuffed = null
success = 1
update_inv_legcuffed()
else if (W == r_hand)
r_hand = null
success = 1
update_inv_r_hand()
else if (W == l_hand)
l_hand = null
success = 1
update_inv_l_hand()
else
return 0
update_inv_s_store(0)
if(success)
if (W)
if (client)
client.screen -= W
W.loc = loc
W.dropped(src)
//if(W)
//W.layer = initial(W.layer)
update_action_buttons()
return 1
@@ -337,7 +290,7 @@
update_inv_s_store(redraw_mob)
if(slot_in_backpack)
if(src.get_active_hand() == W)
src.u_equip(W)
src.unEquip(W)
W.loc = src.back
if(slot_tie)
var/obj/item/clothing/under/uniform = src.w_uniform
@@ -454,7 +407,7 @@
if("mask")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had their mask removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) mask</font>")
if(target.wear_mask && !target.wear_mask.canremove)
if(target.wear_mask && (target.wear_mask.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
return
else if(target.wear_mask)
@@ -470,7 +423,7 @@
if("gloves")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their gloves ([target.gloves]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) gloves ([target.gloves])</font>")
if(target.gloves && !target.gloves.canremove)
if(target.gloves && (target.gloves.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.gloves] from [target]'s hands!</B>"
return
else if(target.gloves)
@@ -478,7 +431,7 @@
if("eyes")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their eyewear ([target.glasses]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) eyewear ([target.glasses])</font>")
if(target.glasses && !target.glasses.canremove)
if(target.glasses && (target.glasses.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.glasses] from [target]'s eyes!</B>"
return
else if(target.glasses)
@@ -486,7 +439,7 @@
if("l_ear")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their left ear item ([target.l_ear]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) left ear item ([target.l_ear])</font>")
if(target.l_ear && !target.l_ear.canremove)
if(target.l_ear && (target.l_ear.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.l_ear] from [target]'s left ear!</B>"
return
else if(target.l_ear)
@@ -494,7 +447,7 @@
if("r_ear")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their right ear item ([target.r_ear]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) right ear item ([target.r_ear])</font>")
if(target.r_ear && !target.r_ear.canremove)
if(target.r_ear && (target.r_ear.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.r_ear] from [target]'s right ear!</B>"
return
else if(target.r_ear)
@@ -502,7 +455,7 @@
if("head")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their hat ([target.head]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) hat ([target.head])</font>")
if(target.head && !target.head.canremove)
if(target.head && (target.head.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.head] from [target]'s head!</B>"
return
else if(target.head)
@@ -510,7 +463,7 @@
if("shoes")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their shoes ([target.shoes]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) shoes ([target.shoes])</font>")
if(target.shoes && !target.shoes.canremove)
if(target.shoes && (target.shoes.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.shoes] from [target]'s feet!</B>"
return
else if(target.shoes)
@@ -523,7 +476,7 @@
if("suit")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their suit ([target.wear_suit]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) suit ([target.wear_suit])</font>")
if(target.wear_suit && !target.wear_suit.canremove)
if(target.wear_suit && (target.wear_suit.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.wear_suit] from [target]'s body!</B>"
return
else if(target.wear_suit)
@@ -550,7 +503,7 @@
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
if(target.w_uniform && !target.w_uniform.canremove)
if(target.w_uniform && (target.w_uniform.flags & NODROP))
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
return
else
@@ -633,7 +586,7 @@ It works in conjuction with the process() above.
This proc works for humans only. Aliens stripping humans and the like will all use this proc. Stripping monkeys or somesuch will use their version of this proc.
The first if statement for "mask" and such refers to items that are already equipped and un-equipping them.
The else statement is for equipping stuff to empty slots.
!canremove refers to variable of /obj/item/clothing which either allows or disallows that item to be removed.
The NODROP flag refers to variable of /obj/item/clothing which either allows or disallows that item to be removed.
It can still be worn/put on as normal.
*/
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
@@ -652,11 +605,11 @@ It can still be worn/put on as normal.
switch(place) //here we go again...
if("mask")
slot_to_process = slot_wear_mask
if (target.wear_mask && target.wear_mask.canremove)
if (target.wear_mask && !(target.wear_mask.flags & NODROP))
strip_item = target.wear_mask
if("gloves")
slot_to_process = slot_gloves
if (target.gloves && target.gloves.canremove)
if (target.gloves && !(target.gloves.flags & NODROP))
strip_item = target.gloves
if("eyes")
slot_to_process = slot_glasses
@@ -672,7 +625,7 @@ It can still be worn/put on as normal.
strip_item = target.s_store
if("head")
slot_to_process = slot_head
if (target.head && target.head.canremove)
if (target.head && !(target.head.flags & NODROP))
strip_item = target.head
if("l_ear")
slot_to_process = slot_l_ear
@@ -684,7 +637,7 @@ It can still be worn/put on as normal.
strip_item = target.r_ear
if("shoes")
slot_to_process = slot_shoes
if (target.shoes && target.shoes.canremove)
if (target.shoes && !(target.shoes.flags & NODROP))
strip_item = target.shoes
if("l_hand")
if (istype(target, /obj/item/clothing/suit/straight_jacket))
@@ -700,11 +653,11 @@ It can still be worn/put on as normal.
strip_item = target.r_hand
if("uniform")
slot_to_process = slot_w_uniform
if(target.w_uniform && target.w_uniform.canremove)
if(target.w_uniform && !(target.w_uniform.flags & NODROP))
strip_item = target.w_uniform
if("suit")
slot_to_process = slot_wear_suit
if (target.wear_suit && target.wear_suit.canremove)
if (target.wear_suit && !(target.wear_suit.flags & NODROP))
strip_item = target.wear_suit
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
@@ -810,7 +763,7 @@ It can still be worn/put on as normal.
if(slot_to_process)
if(strip_item) //Stripping an item from the mob
var/obj/item/W = strip_item
target.u_equip(W)
target.unEquip(W)
if (target.client)
target.client.screen -= W
if (W)
@@ -820,11 +773,11 @@ It can still be worn/put on as normal.
W.add_fingerprint(source)
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
if(target.r_store)
target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
target.unEquip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
else
if(item && target.has_organ_for_slot(slot_to_process)) //Placing an item on the mob
if(item.mob_can_equip(target, slot_to_process, 0))
source.u_equip(item)
source.unEquip(item)
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
item.dropped(source)
source.update_icons()
@@ -843,7 +796,7 @@ It can still be worn/put on as normal.
if(slot_r_hand)
return r_hand
return null
/mob/living/carbon/get_item_by_slot(slot_id)
switch(slot_id)
if(slot_back)
@@ -24,10 +24,10 @@
H.fire_sprite = "Plasmaman"
// Unequip existing suits and hats.
H.u_equip(H.wear_suit)
H.u_equip(H.head)
H.unEquip(H.wear_suit)
H.unEquip(H.head)
if(H.mind.assigned_role!="Clown")
H.u_equip(H.wear_mask)
H.unEquip(H.wear_mask)
H.equip_or_collect(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
var/suit=/obj/item/clothing/suit/space/plasmaman
@@ -598,7 +598,7 @@ proc/get_damage_icon_part(damage_state, body_part)
standing.icon = 'icons/mob/uniform_fat.dmi'
else
src << "\red You burst out of \the [w_uniform]!"
drop_from_inventory(w_uniform)
unEquip(w_uniform)
return
else
standing.icon = 'icons/mob/uniform.dmi'
@@ -626,7 +626,7 @@ proc/get_damage_icon_part(damage_state, body_part)
// 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, wear_pda, belt) ) //
if(thing) //
u_equip(thing) //
unEquip(thing) //
if (client) //
client.screen -= thing //
//
@@ -819,14 +819,14 @@ proc/get_damage_icon_part(damage_state, body_part)
standing = image("icon" = 'icons/mob/suit_fat.dmi', "icon_state" = "[wear_suit.icon_state]")
else
src << "\red You burst out of \the [wear_suit]!"
drop_from_inventory(wear_suit)
unEquip(wear_suit)
return
else
standing = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]")
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
drop_from_inventory(handcuffed)
unEquip(handcuffed)
drop_l_hand()
drop_r_hand()
@@ -230,7 +230,7 @@
return
/mob/living/carbon/slime/u_equip(obj/item/W as obj)
/mob/living/carbon/slime/unEquip(obj/item/W as obj)
return
/mob/living/carbon/slime/attack_ui(slot)
@@ -897,9 +897,8 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
item_state = "golem"
_color = "golem"
has_sensor = 0
flags = ABSTRACT
flags = ABSTRACT | NODROP
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
canremove = 0
/obj/item/clothing/suit/golem
name = "adamantine shell"
@@ -912,12 +911,11 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS|HEAD
slowdown = 1.0
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
flags = ONESIZEFITSALL | STOPSPRESSUREDMAGE | ABSTRACT
flags = ONESIZEFITSALL | STOPSPRESSUREDMAGE | ABSTRACT | NODROP
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS | HEAD
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS | HEAD
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
canremove = 0
armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/shoes/golem
@@ -925,8 +923,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
desc = "sturdy adamantine feet"
icon_state = "golem"
item_state = "golem"
canremove = 0
flags = NOSLIP | ABSTRACT | MASKINTERNALS | MASKCOVERSMOUTH
flags = NOSLIP | ABSTRACT | MASKINTERNALS | MASKCOVERSMOUTH | NODROP
slowdown = SHOES_SLOWDOWN+1
@@ -935,10 +932,9 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
desc = "the imposing face of an adamantine golem"
icon_state = "golem"
item_state = "golem"
canremove = 0
siemens_coefficient = 0
unacidable = 1
flags = ABSTRACT
flags = ABSTRACT | NODROP
/obj/item/clothing/gloves/golem
@@ -947,8 +943,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
icon_state = "golem"
item_state = null
siemens_coefficient = 0
canremove = 0
flags = ABSTRACT
flags = ABSTRACT | NODROP
/obj/item/clothing/head/space/golem
@@ -957,9 +952,8 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
_color = "dermal"
name = "golem's head"
desc = "a golem's head"
canremove = 0
unacidable = 1
flags = STOPSPRESSUREDMAGE | ABSTRACT
flags = STOPSPRESSUREDMAGE | ABSTRACT | NODROP
heat_protection = HEAD
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0)
@@ -193,7 +193,7 @@
adult.rename_self("diona")
for (var/obj/item/W in src.contents)
src.drop_from_inventory(W)
src.unEquip(W)
del(src)
@@ -41,7 +41,7 @@
var/message = null
switch(place)
if("mask")
if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove)
if(istype(target.wear_mask, /obj/item/clothing)&&(target.wear_mask:flags & NODROP))
message = text("\red <B>[] fails to take off \a [] from []'s body!</B>", source, target.wear_mask, target)
else
message = text("\red <B>[] is trying to take off \a [] from []'s head!</B>", source, target.wear_mask, target)
@@ -76,10 +76,10 @@
switch(place)
if("mask")
if (target.wear_mask)
if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove)
if(istype(target.wear_mask, /obj/item/clothing)&& (target.wear_mask:flags & NODROP))
return
var/obj/item/W = target.wear_mask
target.u_equip(W)
target.unEquip(W)
if (target.client)
target.client.screen -= W
if (W)
@@ -97,7 +97,7 @@
if("l_hand")
if (target.l_hand)
var/obj/item/W = target.l_hand
target.u_equip(W)
target.unEquip(W)
if (target.client)
target.client.screen -= W
if (W)
@@ -117,7 +117,7 @@
if("r_hand")
if (target.r_hand)
var/obj/item/W = target.r_hand
target.u_equip(W)
target.unEquip(W)
if (target.client)
target.client.screen -= W
if (W)
@@ -137,7 +137,7 @@
if("back")
if (target.back)
var/obj/item/W = target.back
target.u_equip(W)
target.unEquip(W)
if (target.client)
target.client.screen -= W
if (W)
@@ -155,7 +155,7 @@
if("handcuff")
if (target.handcuffed)
var/obj/item/W = target.handcuffed
target.u_equip(W)
target.unEquip(W)
if (target.client)
target.client.screen -= W
if (W)
@@ -199,7 +199,7 @@
if(!istype(W)) return
if(W == get_active_hand())
u_equip(W)
unEquip(W)
switch(slot)
if(slot_back)
@@ -274,11 +274,11 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
else
drop_item()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
if(drop_item())
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
return
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
@@ -344,10 +344,10 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
else
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
if(drop_item())
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
adjustBruteLoss(damage)
updatehealth()
return
+5 -5
View File
@@ -286,11 +286,11 @@
var/mob/living/carbon/C = src
if (C.handcuffed && !initial(C.handcuffed))
C.drop_from_inventory(C.handcuffed)
C.unEquip(C.handcuffed)
C.handcuffed = initial(C.handcuffed)
if (C.legcuffed && !initial(C.legcuffed))
C.drop_from_inventory(C.legcuffed)
C.unEquip(C.legcuffed)
C.legcuffed = initial(C.legcuffed)
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
@@ -466,7 +466,7 @@
var/mob/M = H.loc //Get our mob holder (if any).
if(istype(M))
M.drop_from_inventory(H)
M.unEquip(H)
M << "[H] wriggles out of your grip!"
src << "You wriggle out of [M]'s grip!"
else if(istype(H.loc,/obj/item))
@@ -674,7 +674,7 @@
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the handcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.handcuffed]."
CM.drop_from_inventory(CM.handcuffed)
CM.unEquip(CM.handcuffed)
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
@@ -711,7 +711,7 @@
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
CM << "\blue You successfully remove \the [CM.legcuffed]."
CM.drop_from_inventory(CM.legcuffed)
CM.unEquip(CM.legcuffed)
CM.legcuffed = null
CM.update_inv_legcuffed()
+4 -4
View File
@@ -63,7 +63,7 @@ var/list/ai_list = list()
var/obj/item/borg/sight/hud/sec/sechud = null
var/obj/item/borg/sight/hud/med/healthhud = null
var/arrivalmsg = "$name, $rank, has arrived on the station."
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
@@ -842,12 +842,12 @@ var/list/ai_list = list()
set desc = "Augment visual feed with internal sensor overlays."
set category = "AI Commands"
toggle_sensor_mode()
/mob/living/silicon/ai/proc/change_arrival_message()
set name = "Set Arrival Message"
set desc = "Change the message that's transmitted when a new crew member arrives on station."
set category = "AI Commands"
var/newmsg = input("What would you like the arrival message to be? Use $name to substitute the crew member's name, and use $rank to substitute the crew member's rank.", "Change Arrival Message", arrivalmsg) as text
if(newmsg != arrivalmsg)
arrivalmsg = newmsg
@@ -921,7 +921,7 @@ var/list/ai_list = list()
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
src << "Unable to locate an airlock"
return
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && !H.head.canremove)
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP))
src << "Unable to locate an airlock"
return
if(H.digitalcamo)
+1 -1
View File
@@ -334,7 +334,7 @@
//I'm not sure how much of this is necessary, but I would rather avoid issues.
if(istype(card.loc,/mob))
var/mob/holder = card.loc
holder.drop_from_inventory(card)
holder.unEquip(card)
else if(istype(card.loc,/obj/item/clothing/suit/space/space_ninja))
var/obj/item/clothing/suit/space/space_ninja/holder = card.loc
holder.pai = null
@@ -625,7 +625,7 @@
stolen_item = C.r_hand
if(stolen_item)
C.u_equip(stolen_item)
C.unEquip(stolen_item)
held_item = stolen_item
stolen_item.loc = src
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.")
+12 -12
View File
@@ -246,7 +246,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & SLOT_BACK) )
return 0
if(H.back)
if(H.back.canremove)
if(!(H.back.flags & NODROP))
return 2
else
return 0
@@ -255,7 +255,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & SLOT_OCLOTHING) )
return 0
if(H.wear_suit)
if(H.wear_suit.canremove)
if(!(H.wear_suit.flags & NODROP))
return 2
else
return 0
@@ -264,7 +264,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & SLOT_GLOVES) )
return 0
if(H.gloves)
if(H.gloves.canremove)
if(!(H.gloves.flags & NODROP))
return 2
else
return 0
@@ -273,7 +273,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & SLOT_FEET) )
return 0
if(H.shoes)
if(H.shoes.canremove)
if(!(H.shoes.flags & NODROP))
return 2
else
return 0
@@ -286,7 +286,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & SLOT_BELT) )
return 0
if(H.belt)
if(H.belt.canremove)
if(!(H.belt.flags & NODROP))
return 2
else
return 0
@@ -295,7 +295,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & SLOT_EYES) )
return 0
if(H.glasses)
if(H.glasses.canremove)
if(!(H.glasses.flags & NODROP))
return 2
else
return 0
@@ -304,7 +304,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & SLOT_HEAD) )
return 0
if(H.head)
if(H.head.canremove)
if(!(H.head.flags & NODROP))
return 2
else
return 0
@@ -313,7 +313,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & slot_l_ear) )
return 0
if(H.l_ear)
if(H.l_ear.canremove)
if(!(H.l_ear.flags & NODROP))
return 2
else
return 0
@@ -322,7 +322,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & slot_r_ear) )
return 0
if(H.r_ear)
if(H.r_ear.canremove)
if(!(H.r_ear.flags & NODROP))
return 2
else
return 0
@@ -333,7 +333,7 @@ var/list/slot_equipment_priority = list( \
if((M_FAT in H.mutations) && !(flags & ONESIZEFITSALL))
return 0
if(H.w_uniform)
if(H.w_uniform.canremove)
if(!(H.w_uniform.flags & NODROP))
return 2
else
return 0
@@ -346,7 +346,7 @@ var/list/slot_equipment_priority = list( \
if( !(slot_flags & SLOT_ID) )
return 0
if(H.wear_id)
if(H.wear_id.canremove)
if(!(H.wear_id.flags & NODROP))
return 2
else
return 0
@@ -389,7 +389,7 @@ var/list/slot_equipment_priority = list( \
return 0
if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) )
if(H.s_store)
if(H.s_store.canremove)
if(!(H.s_store.flags & NODROP))
return 2
else
return 0
+10 -10
View File
@@ -10,7 +10,7 @@
for(var/obj/item/W in src)
if (W==w_uniform) // will be torn
continue
drop_from_inventory(W)
unEquip(W)
regenerate_icons()
monkeyizing = 1
canmove = 0
@@ -73,7 +73,7 @@
if (monkeyizing)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
unEquip(W)
monkeyizing = 1
canmove = 0
icon = null
@@ -150,7 +150,7 @@
if(!should_remove_items)
for(var/obj/item/W in src)
drop_from_inventory(W)
unEquip(W)
var/mob/spirit/mask/new_spirit = new()
@@ -193,7 +193,7 @@
if (monkeyizing)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
unEquip(W)
regenerate_icons()
monkeyizing = 1
canmove = 0
@@ -249,7 +249,7 @@
if (monkeyizing)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
unEquip(W)
regenerate_icons()
monkeyizing = 1
canmove = 0
@@ -280,7 +280,7 @@
if (monkeyizing)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
unEquip(W)
regenerate_icons()
monkeyizing = 1
canmove = 0
@@ -315,7 +315,7 @@
if (monkeyizing)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
unEquip(W)
regenerate_icons()
monkeyizing = 1
canmove = 0
@@ -345,7 +345,7 @@
if(monkeyizing)
return
for(var/obj/item/W in src)
drop_from_inventory(W)
unEquip(W)
regenerate_icons()
monkeyizing = 1
@@ -434,7 +434,7 @@
if(ispath(MP, /mob/living/simple_animal/pony))
return 1 // ZOMG PONIES WHEEE
if(ispath(MP, /mob/living/simple_animal/fox))
return 1
return 1
//Not in here? Must be untested!
return 0
@@ -459,7 +459,7 @@
if(ispath(MP, /mob/living/simple_animal/pony))
return 1
if(ispath(MP, /mob/living/simple_animal/fox))
return 1
return 1
//Antag Creatures!
/* if(ispath(MP, /mob/living/simple_animal/hostile/carp) && !jobban_isbanned(src, "Syndicate"))
+13 -13
View File
@@ -614,11 +614,11 @@ Note that amputating the affected organ does in fact remove the infection from t
else
organ= new /obj/item/weapon/organ/head(owner.loc, owner)
owner.death()
owner.u_equip(owner.glasses)
owner.u_equip(owner.head)
owner.u_equip(owner.l_ear)
owner.u_equip(owner.r_ear)
owner.u_equip(owner.wear_mask)
owner.unEquip(owner.glasses)
owner.unEquip(owner.head)
owner.unEquip(owner.l_ear)
owner.unEquip(owner.r_ear)
owner.unEquip(owner.wear_mask)
if(ARM_RIGHT)
if(!spawn_limb)
if(status & ORGAN_ROBOT)
@@ -658,7 +658,7 @@ Note that amputating the affected organ does in fact remove the infection from t
organ = new /obj/item/weapon/skeleton/r_hand(owner.loc)
else
organ= new /obj/item/weapon/organ/r_hand(owner.loc, owner)
owner.u_equip(owner.gloves)
owner.unEquip(owner.gloves)
if(HAND_LEFT)
if(!spawn_limb)
if(!(status & ORGAN_ROBOT))
@@ -666,7 +666,7 @@ Note that amputating the affected organ does in fact remove the infection from t
organ = new /obj/item/weapon/skeleton/l_hand(owner.loc)
else
organ= new /obj/item/weapon/organ/l_hand(owner.loc, owner)
owner.u_equip(owner.gloves)
owner.unEquip(owner.gloves)
if(FOOT_RIGHT)
if(!spawn_limb)
if(!(status & ORGAN_ROBOT))
@@ -674,7 +674,7 @@ Note that amputating the affected organ does in fact remove the infection from t
organ = new /obj/item/weapon/skeleton/r_foot(owner.loc)
else
organ= new /obj/item/weapon/organ/r_foot/(owner.loc, owner)
owner.u_equip(owner.shoes)
owner.unEquip(owner.shoes)
if(FOOT_LEFT)
if(!spawn_limb)
if(!(status & ORGAN_ROBOT))
@@ -682,7 +682,7 @@ Note that amputating the affected organ does in fact remove the infection from t
organ = new /obj/item/weapon/skeleton/l_foot(owner.loc)
else
organ = new /obj/item/weapon/organ/l_foot(owner.loc, owner)
owner.u_equip(owner.shoes)
owner.unEquip(owner.shoes)
destspawn = 1
//Robotic limbs explode if sabotaged.
@@ -724,14 +724,14 @@ Note that amputating the affected organ does in fact remove the infection from t
"\The [owner.handcuffed.name] falls off of [owner.name].",\
"\The [owner.handcuffed.name] falls off you.")
owner.drop_from_inventory(owner.handcuffed)
owner.unEquip(owner.handcuffed)
if (owner.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
owner.visible_message(\
"\The [owner.legcuffed.name] falls off of [owner.name].",\
"\The [owner.legcuffed.name] falls off you.")
owner.drop_from_inventory(owner.legcuffed)
owner.unEquip(owner.legcuffed)
/datum/organ/external/proc/bandage()
var/rval = 0
@@ -842,11 +842,11 @@ Note that amputating the affected organ does in fact remove the infection from t
return
if(is_broken())
owner.u_equip(c_hand)
owner.unEquip(c_hand)
var/emote_scream = pick("screams in pain and", "lets out a sharp cry and", "cries out and")
owner.emote("me", 1, "[(owner.species && owner.species.flags & NO_PAIN) ? "" : emote_scream ] drops what they were holding in their [hand_name]!")
if(is_malfunctioning())
owner.u_equip(c_hand)
owner.unEquip(c_hand)
owner.emote("me", 1, "drops what they were holding, their [hand_name] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, owner)
+2 -2
View File
@@ -23,10 +23,10 @@
if(!M.restrained() && !M.stat)
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)
+8 -8
View File
@@ -39,7 +39,7 @@
..()
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
spawn(2)
update_icon()
updateinfolinks()
@@ -293,7 +293,7 @@
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
if(user.get_inactive_hand() == src)
user.drop_from_inventory(src)
user.unEquip(src)
new /obj/effect/decal/cleanable/ash(get_turf(src))
del(src)
@@ -366,29 +366,29 @@
B.name = name
else if (P.name != "paper" && P.name != "photo")
B.name = P.name
user.drop_from_inventory(P)
user.unEquip(P)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/h_user = user
if (h_user.r_hand == src)
h_user.drop_from_inventory(src)
h_user.unEquip(src)
h_user.put_in_r_hand(B)
else if (h_user.l_hand == src)
h_user.drop_from_inventory(src)
h_user.unEquip(src)
h_user.put_in_l_hand(B)
else if (h_user.l_store == src)
h_user.drop_from_inventory(src)
h_user.unEquip(src)
B.loc = h_user
B.layer = 20
h_user.l_store = B
h_user.update_inv_pockets()
else if (h_user.r_store == src)
h_user.drop_from_inventory(src)
h_user.unEquip(src)
B.loc = h_user
B.layer = 20
h_user.r_store = B
h_user.update_inv_pockets()
else if (h_user.head == src)
h_user.u_equip(src)
h_user.unEquip(src)
h_user.put_in_hands(B)
else if (!istype(src.loc, /turf))
src.loc = get_turf(h_user)
+6 -6
View File
@@ -32,7 +32,7 @@
if(screen == 2)
screen = 1
user << "<span class='notice'>You add [(P.name == "paper") ? "the paper" : P.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
user.drop_from_inventory(P)
user.unEquip(P)
P.loc = src
if(istype(user,/mob/living/carbon/human))
user:update_inv_l_hand()
@@ -42,12 +42,12 @@
if(screen == 2)
screen = 1
user << "<span class='notice'>You add [(W.name == "photo") ? "the photo" : W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
user.drop_from_inventory(W)
user.unEquip(W)
W.loc = src
else if(istype(W, /obj/item/weapon/lighter))
burnpaper(W, user)
else if(istype(W, /obj/item/weapon/paper_bundle))
user.drop_from_inventory(W)
user.unEquip(W)
for(var/obj/O in W)
O.loc = src
O.add_fingerprint(usr)
@@ -85,7 +85,7 @@
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
if(user.get_inactive_hand() == src)
user.drop_from_inventory(src)
user.unEquip(src)
new /obj/effect/decal/cleanable/ash(get_turf(src))
del(src)
@@ -166,7 +166,7 @@
usr << "<span class='notice'>You remove the [W.name] from the bundle.</span>"
if(amount == 1)
var/obj/item/weapon/paper/P = src[1]
usr.drop_from_inventory(src)
usr.unEquip(src)
usr.put_in_hands(P)
del(src)
else if(page == amount)
@@ -206,7 +206,7 @@
O.loc = usr.loc
O.layer = initial(O.layer)
O.add_fingerprint(usr)
usr.drop_from_inventory(src)
usr.unEquip(src)
del(src)
return
+3 -3
View File
@@ -61,7 +61,7 @@
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
if(user.get_inactive_hand() == src)
user.drop_from_inventory(src)
user.unEquip(src)
new /obj/effect/decal/cleanable/ash(get_turf(src))
del(src)
@@ -118,10 +118,10 @@
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)
return
+1 -1
View File
@@ -174,7 +174,7 @@
W.loc = src
if(user.client)
user.client.screen -= W
user.u_equip(W)
user.unEquip(W)
user.update_icons()
user.visible_message("[user.name] loads an [W.name] into the [src.name].", \
"You load an [W.name].", \
+1 -1
View File
@@ -313,7 +313,7 @@
//handle mob icon update
if(ismob(loc))
var/mob/M = loc
M.u_equip(src)
M.unEquip(src)
del(src)
else
amount -= used
+3 -3
View File
@@ -440,7 +440,7 @@
usr << browse(null, "window=chemmaster")
usr.unset_machine()
return
if (href_list["print_p"])
if (!(src.printing))
src.printing = 1
@@ -465,7 +465,7 @@
P.info += "<br><br><b>Notes:</b><br>"
P.name = "Chemical Analysis - [href_list["name"]]"
src.printing = null
if(beaker)
var/datum/reagents/R = beaker:reagents
if (href_list["analyze"])
@@ -1069,7 +1069,7 @@
user << "Cannot refine into a reagent."
return 1
user.before_take_item(O)
user.unEquip(O)
O.loc = src
holdingitems += O
src.updateUsrDialog()
@@ -22,7 +22,7 @@
if(M == usr)
usr << "<span class='notice'>You finish eating \the [src].</span>"
usr.visible_message("<span class='notice'>[usr] finishes eating \the [src].</span>")
usr.drop_from_inventory(src) //so icons update :[
usr.unEquip(src) //so icons update :[
if(trash)
if(ispath(trash,/obj/item))
@@ -39,7 +39,7 @@
/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone)
if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
user << "\red None of [src] left, oh no!"
M.drop_from_inventory(src) //so icons update :[
M.unEquip(src) //so icons update :[
del(src)
return 0
@@ -194,7 +194,7 @@
if(!iscarbon(user))
return 1
user << "\red You slip [W] inside [src]."
user.u_equip(W)
user.unEquip(W)
if ((user.client && user.s_active != src))
user.client.screen -= W
W.dropped(user)
@@ -241,7 +241,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/weapon/rollingpaper))
user.u_equip(W)
user.unEquip(W)
var/obj/item/clothing/mask/cigarette/joint/J = new /obj/item/clothing/mask/cigarette/joint(user.loc)
J.chem_volume = src.reagents.total_volume
src.reagents.trans_to(J, J.chem_volume)
@@ -264,7 +264,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/weapon/rollingpaper))
user.u_equip(W)
user.unEquip(W)
var/obj/item/clothing/mask/cigarette/joint/deus/J = new /obj/item/clothing/mask/cigarette/joint/deus(user.loc)
J.chem_volume = src.reagents.total_volume
src.reagents.trans_to(J, J.chem_volume)
@@ -298,7 +298,7 @@
user << "You add [D] to [src]."
del(D)
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
user.unEquip(src)
del(src)
/obj/item/weapon/reagent_containers/glass/beaker/vial
@@ -27,7 +27,7 @@
return
M << "\blue You swallow [src]."
M.drop_from_inventory(src) //icon update
M.unEquip(src) //icon update
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
@@ -49,7 +49,7 @@
if(!do_mob(user, M)) return
user.drop_from_inventory(src) //icon update
user.unEquip(src) //icon update
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] forces [M] to swallow [src].", 1)
@@ -195,7 +195,7 @@
New()
..()
reagents.add_reagent("paroxetine", 15)
/obj/item/weapon/reagent_containers/pill/inaprovaline
name = "Inaprovaline pill"
desc = "Used to stabilize patients."
@@ -294,7 +294,7 @@
if (target != user && target.getarmor(target_zone, "melee") > 5 && prob(50))
for(var/mob/O in viewers(world.view, user))
O.show_message(text("\red <B>[user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!</B>"), 1)
user.u_equip(src)
user.unEquip(src)
del(src)
return
+3 -3
View File
@@ -44,7 +44,7 @@
// attack by item places it in to disposal
attackby(var/obj/item/I, var/mob/user)
if(stat & BROKEN || !I || !user)
if(stat & BROKEN || !I || !user || (I.flags & NODROP))
return
if(isrobot(user) && !istype(I, /obj/item/weapon/storage/bag/trash))
@@ -102,7 +102,7 @@
T.update_icon()
update()
return
if(istype(I, /obj/item/weapon/storage/part_replacer))
var/obj/item/weapon/storage/part_replacer/P = I
if(P.contents.len)
@@ -111,7 +111,7 @@
P.remove_from_storage(O,src)
update()
return
var/obj/item/weapon/grab/G = I
if(istype(G)) // handle grabbed mob
if(ismob(G.affecting))
+1 -1
View File
@@ -283,7 +283,7 @@
"<span class=\"danger\">You touch \the [W] to \the [src] when everything suddenly goes silent.\"</span>\n<span class=\"notice\">\The [W] flashes into dust as you flinch away from \the [src].</span>",\
"<span class=\"warning\">Everything suddenly goes silent.</span>")
user.drop_from_inventory(W)
user.unEquip(W)
Consume(W)
user.apply_effect(150, IRRADIATE)
+1 -1
View File
@@ -73,7 +73,7 @@
else if(istype(W, /obj/item/device/gps))
if(!inserted_gps)
inserted_gps = W
user.before_take_item(W)
user.unEquip(W)
W.loc = src
user.visible_message("<span class='notice'>[user] inserts [W] into \the [src]'s GPS device slot.</span>")
updateUsrDialog()
+1 -1
View File
@@ -242,7 +242,7 @@
if(!istype(C))
return
H.drop_from_inventory(C)
H.unEquip(C)
C.forceMove(src)
cell = C
powercheck()
+1 -1
View File
@@ -32,7 +32,7 @@
state("The [src.name] Buzzes", "blue")
return
..()
return
return
/obj/machinery/computer/curer/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
+8 -8
View File
@@ -382,12 +382,12 @@
/obj/item/clothing/mask/gas/virusclown_hat
dropped(mob/user as mob)
canremove = 1
flags &= ~NODROP
..()
equipped(var/mob/user, var/slot)
if (slot == slot_l_hand)
canremove = 1 //curses!
flags &= ~NODROP //curses!
..()
*/
@@ -626,12 +626,12 @@
/obj/item/clothing/glasses/virussunglasses
dropped(mob/user as mob)
canremove = 1
flags &= ~NODROP
..()
equipped(var/mob/user, var/slot)
if (slot == slot_glasses)
canremove = 0 //curses!
flags |= NODROP //curses!
..()
@@ -650,12 +650,12 @@
/obj/item/clothing/mask/gas/virusclown_hat
dropped(mob/user as mob)
canremove = 1
flags &= ~NODROP
..()
equipped(var/mob/user, var/slot)
if (slot == slot_wear_mask)
canremove = 0 //curses!
flags |= NODROP //curses!
..()
@@ -678,12 +678,12 @@ var/list/compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/mon
voicechange = 1 //NEEEEIIGHH
dropped(mob/user as mob)
canremove = 1
flags &= ~NODROP
..()
equipped(var/mob/user, var/slot)
if (slot == slot_wear_mask)
canremove = 0 //curses!
flags |= NODROP //curses!
..()