-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:
giacomand@gmail.com
2013-01-02 11:26:30 +00:00
parent 411b4ece9c
commit f2854db4b0
19 changed files with 226 additions and 192 deletions
+3
View File
@@ -233,6 +233,9 @@ its easier to just keep the beam vertical.
/atom/proc/blob_act()
return
/atom/proc/fire_act()
return
/atom/proc/attack_hand(mob/user as mob)
return
+10 -8
View File
@@ -127,15 +127,17 @@
else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid))
var/mob/living/carbon/george = M
//they can only hold things :(
if(george.get_active_hand() && (istype(george.get_active_hand(), /obj/item/weapon/card/id) || istype(george.get_active_hand(), /obj/item/device/pda)) && src.check_access(george.get_active_hand()))
if(src.check_access(george.get_active_hand()))
return 1
return 0
/obj/proc/check_access(obj/item/weapon/card/id/I)
/obj/item/proc/GetAccess()
return list()
if (istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
/obj/item/proc/GetID()
return null
/obj/proc/check_access(obj/item/I)
if(!src.req_access && !src.req_one_access) //no requirements
return 1
@@ -145,14 +147,14 @@
var/list/L = src.req_access
if(!L.len && (!src.req_one_access || !src.req_one_access.len)) //no requirements
return 1
if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
if(!I)
return 0
for(var/req in src.req_access)
if(!(req in I.access)) //doesn't have this access
if(!(req in I.GetAccess())) //doesn't have this access
return 0
if(src.req_one_access && src.req_one_access.len)
for(var/req in src.req_one_access)
if(req in I.access) //has an access from the single access list
if(req in I.GetAccess()) //has an access from the single access list
return 1
return 0
return 1
+1 -1
View File
@@ -368,7 +368,7 @@ var/global/datum/controller/occupations/job_master
if(locate(/obj/item/device/pda,H))//I bet this could just use locate. It can --SkyMarshal
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
pda.ownjob = H.wear_id.assignment
pda.ownjob = C.assignment
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
return 1
+7 -12
View File
@@ -705,22 +705,17 @@ Auto Patrol: []"},
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag))
threatcount += 2
if (src.check_records)
if(src.check_records)
for (var/datum/data/record/E in data_core.general)
var/perpname = perp.name
if (perp:wear_id)
var/obj/item/weapon/card/id/id = perp:wear_id
if(istype(perp:wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = perp:wear_id
id = pda.id
if (id)
if(perp.wear_id)
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
if(id)
perpname = id.registered_name
else
var/obj/item/device/pda/pda = perp:wear_id
perpname = pda.owner
if (E.fields["name"] == perpname)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
threatcount = 4
break
+3 -8
View File
@@ -621,16 +621,11 @@ Auto Patrol: []"},
if(src.check_records)
for (var/datum/data/record/E in data_core.general)
var/perpname = perp.name
if(perp:wear_id)
var/obj/item/weapon/card/id/id = perp:wear_id
if(istype(perp:wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = perp:wear_id
id = pda.id
if(perp.wear_id)
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
if(id)
perpname = id.registered_name
else
var/obj/item/device/pda/pda = perp:wear_id
perpname = pda.owner
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
+1 -1
View File
@@ -384,7 +384,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
updateUsrDialog()
if(screen == 10)
var/obj/item/weapon/card/id/ID = O
if (access_RC_announce in ID.access)
if (access_RC_announce in ID.GetAccess())
announceAuth = 1
else
announceAuth = 0
@@ -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())
+5 -7
View File
@@ -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)