mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-20 12:42:43 +01:00
-Made firesuits effective again by changing the proc which damages the humans due to the flames to fire_act(). The flames themselves will hurt people, who are directly on top of it, but if they're wearing a firesuit the damage is much less.
-Added some procs for getting IDs and getting access. Helps clean it up so we don't have "istype(A, IDCARD) OR istype(A, PDA)" everywhere. -Made wallets equip able in the ID slot and be able to be used as an ID. -Added a PACMAN generator in Engineering to jump start the Singularity if they run out of power. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5450 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -229,6 +229,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/device/pda/GetAccess()
|
||||
if(id)
|
||||
return id.GetAccess()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/pda/GetID()
|
||||
return id
|
||||
|
||||
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if((!istype(over_object, /obj/screen)) && !M.restrained() && !M.stat && can_use())
|
||||
|
||||
@@ -79,13 +79,11 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/attack_hand(mob/user as mob)
|
||||
var/obj/item/weapon/storage/wallet/WL
|
||||
if( istype(loc, /obj/item/weapon/storage/wallet) )
|
||||
WL = loc
|
||||
..()
|
||||
if(WL)
|
||||
WL.update_icon()
|
||||
/obj/item/weapon/card/id/GetAccess()
|
||||
return access
|
||||
|
||||
/obj/item/weapon/card/id/GetID()
|
||||
return src
|
||||
|
||||
/obj/item/weapon/card/id/verb/read()
|
||||
set name = "Read ID Card"
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
//The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once,
|
||||
//such as when picking up all the items on a tile with one click.
|
||||
/obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
|
||||
if(!istype(W)) return
|
||||
if(!istype(W)) return 0
|
||||
if(usr)
|
||||
usr.u_equip(W)
|
||||
usr.update_icons() //update our overlays
|
||||
@@ -251,10 +251,11 @@
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target
|
||||
/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
if(!istype(W)) return
|
||||
if(!istype(W)) return 0
|
||||
|
||||
if(istype(src, /obj/item/weapon/storage/fancy))
|
||||
var/obj/item/weapon/storage/fancy/F = src
|
||||
@@ -284,6 +285,7 @@
|
||||
W.maptext = ""
|
||||
W.on_exit_storage(src)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
//This proc is called when you want to place an item into the storage item.
|
||||
/obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
@@ -24,49 +24,66 @@
|
||||
"/obj/item/weapon/reagent_containers/dropper",
|
||||
"/obj/item/weapon/screwdriver",
|
||||
"/obj/item/weapon/stamp")
|
||||
slot_flags = SLOT_ID
|
||||
|
||||
attackby(obj/item/A as obj, mob/user as mob)
|
||||
..()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
update_icon()
|
||||
for(var/obj/item/weapon/card/id/ID in contents)
|
||||
switch(ID.icon_state)
|
||||
if("id")
|
||||
icon_state = "walletid"
|
||||
return
|
||||
if("silver")
|
||||
icon_state = "walletid_silver"
|
||||
return
|
||||
if("gold")
|
||||
icon_state = "walletid_gold"
|
||||
return
|
||||
if("centcom")
|
||||
icon_state = "walletid_centcom"
|
||||
return
|
||||
icon_state = "wallet"
|
||||
var/obj/item/weapon/card/id/front_id = null
|
||||
|
||||
|
||||
/obj/item/weapon/storage/wallet/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
. = ..(W, new_location)
|
||||
if(.)
|
||||
if(W == front_id)
|
||||
front_id = null
|
||||
update_icon()
|
||||
|
||||
proc/get_id()
|
||||
for(var/obj/item/weapon/card/id/ID in contents)
|
||||
if(istype(ID))
|
||||
return ID
|
||||
/obj/item/weapon/storage/wallet/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
|
||||
. = ..(W, prevent_warning)
|
||||
if(.)
|
||||
if(!front_id && istype(W, /obj/item/weapon/card/id))
|
||||
front_id = W
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/wallet/random
|
||||
New()
|
||||
..()
|
||||
var/item1_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
|
||||
var/item2_type
|
||||
if(prob(50))
|
||||
item2_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
|
||||
var/item3_type = pick( /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron )
|
||||
/obj/item/weapon/storage/wallet/update_icon()
|
||||
|
||||
spawn(2)
|
||||
if(item1_type)
|
||||
new item1_type(src)
|
||||
if(item2_type)
|
||||
new item2_type(src)
|
||||
if(item3_type)
|
||||
new item3_type(src)
|
||||
if(front_id)
|
||||
switch(front_id.icon_state)
|
||||
if("id")
|
||||
icon_state = "walletid"
|
||||
return
|
||||
if("silver")
|
||||
icon_state = "walletid_silver"
|
||||
return
|
||||
if("gold")
|
||||
icon_state = "walletid_gold"
|
||||
return
|
||||
if("centcom")
|
||||
icon_state = "walletid_centcom"
|
||||
return
|
||||
icon_state = "wallet"
|
||||
|
||||
|
||||
/obj/item/weapon/storage/wallet/GetID()
|
||||
return front_id
|
||||
|
||||
/obj/item/weapon/storage/wallet/GetAccess()
|
||||
var/obj/item/I = GetID()
|
||||
if(I)
|
||||
return I.GetAccess()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/wallet/random/New()
|
||||
..()
|
||||
var/item1_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
|
||||
var/item2_type
|
||||
if(prob(50))
|
||||
item2_type = pick( /obj/item/weapon/spacecash/c10,/obj/item/weapon/spacecash/c100,/obj/item/weapon/spacecash/c1000,/obj/item/weapon/spacecash/c20,/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50, /obj/item/weapon/spacecash/c500)
|
||||
var/item3_type = pick( /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron )
|
||||
|
||||
spawn(2)
|
||||
if(item1_type)
|
||||
new item1_type(src)
|
||||
if(item2_type)
|
||||
new item2_type(src)
|
||||
if(item3_type)
|
||||
new item3_type(src)
|
||||
Reference in New Issue
Block a user