Removes All Weapons

This commit is contained in:
Fox McCloud
2018-04-15 16:25:56 -04:00
parent 8b576c4d42
commit 5c4aa9b3fd
1100 changed files with 17642 additions and 17666 deletions
+17 -11
View File
@@ -100,6 +100,12 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
for(var/path in actions_types)
new path(src)
if(!hitsound)
if(damtype == "fire")
hitsound = 'sound/items/welder.ogg'
if(damtype == "brute")
hitsound = "swing_hit"
/obj/item/Destroy()
flags &= ~DROPDEL //prevent reqdels
QDEL_NULL(hidden_uplink)
@@ -232,9 +238,9 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
else
extinguish()
if(istype(src.loc, /obj/item/weapon/storage))
if(istype(src.loc, /obj/item/storage))
//If the item is in a storage item, take it out
var/obj/item/weapon/storage/S = src.loc
var/obj/item/storage/S = src.loc
S.remove_from_storage(src)
if(throwing)
@@ -263,7 +269,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
attack_hand(A)
/obj/item/attack_ai(mob/user as mob)
if(istype(src.loc, /obj/item/weapon/robot_module))
if(istype(src.loc, /obj/item/robot_module))
//If the item is part of a cyborg module, equip it
if(!isrobot(user))
return
@@ -274,9 +280,9 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
// Due to storage type consolidation this should get used more now.
// I have cleaned it up a little, but it could probably use more. -Sayu
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
/obj/item/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/storage))
var/obj/item/storage/S = W
if(S.use_to_pickup)
if(S.collection_mode) //Mode is set to collect all items on a tile and we clicked on a valid one.
if(isturf(src.loc))
@@ -326,11 +332,11 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
return
// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
/obj/item/proc/on_exit_storage(obj/item/weapon/storage/S as obj)
/obj/item/proc/on_exit_storage(obj/item/storage/S as obj)
return
// called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
/obj/item/proc/on_enter_storage(obj/item/weapon/storage/S as obj)
/obj/item/proc/on_enter_storage(obj/item/storage/S as obj)
return
// called when "found" in pockets and storage items. Returns 1 if the search should end.
@@ -507,11 +513,11 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
/obj/item/proc/pwr_drain()
return 0 // Process Kill
/obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/weapon/storage
/obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/storage
if(!newLoc)
return 0
if(istype(loc,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = loc
if(istype(loc,/obj/item/storage))
var/obj/item/storage/S = loc
S.remove_from_storage(src,newLoc)
return 1
return 0