Re-adds PDA slot

This commit is contained in:
TheDZD
2016-07-18 23:22:21 -04:00
parent 212ba735ad
commit 7fa74a1d1e
27 changed files with 138 additions and 82 deletions

View File

@@ -859,7 +859,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
pda.owner = M.real_name
pda.ownjob = "Reaper"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_belt)
M.equip_to_slot_or_del(pda, slot_wear_pda)
equip_special_id(M,get_all_accesses(), "Reaper", /obj/item/weapon/card/id/syndicate, "syndie")
if("spy")
@@ -976,7 +976,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_or_collect(new /obj/item/clothing/head/that(M), slot_head)
M.equip_or_collect(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
M.equip_or_collect(new /obj/item/device/pda/(M), slot_belt)
M.equip_or_collect(new /obj/item/device/pda/(M), slot_wear_pda)
equip_special_id(M,get_centcom_access("VIP Guest"), "VIP Guest", /obj/item/weapon/card/id/centcom)
if("nt navy officer")
@@ -985,10 +985,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/gloves/color/white(M), slot_gloves)
M.equip_or_collect(new /obj/item/device/radio/headset/centcom(M), slot_l_ear)
M.equip_or_collect(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
M.equip_or_collect(new /obj/item/device/pda/centcom(M), slot_belt)
M.equip_or_collect(new /obj/item/device/pda/centcom(M), slot_wear_pda)
M.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/death_alarm(M), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
@@ -1003,10 +1003,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/gloves/color/white(M), slot_gloves)
M.equip_or_collect(new /obj/item/device/radio/headset/centcom(M), slot_l_ear)
M.equip_or_collect(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
M.equip_or_collect(new /obj/item/device/pda/centcom(M), slot_belt)
M.equip_or_collect(new /obj/item/device/pda/centcom(M), slot_wear_pda)
M.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/death_alarm(M), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
@@ -1047,7 +1047,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/centcom(src), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head) // job has /obj/item/clothing/head/beret/centcom/officer/navy
M.equip_to_slot_or_del(new /obj/item/device/pda/centcom(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/device/pda/centcom(M), slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/cyber(M), slot_glasses) // job has /obj/item/clothing/glasses/hud/security/sunglasses
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(M), slot_back)
@@ -1075,7 +1075,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/centcom(src), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/cyber(M), slot_glasses) // special
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/matches(M), slot_r_store)
@@ -1088,7 +1088,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition designed for military field work."
M.equip_or_collect(pda, slot_belt)
M.equip_or_collect(pda, slot_wear_pda)
M.equip_or_collect(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/death_alarm(M), slot_in_backpack)
equip_special_id(M,get_centcom_access("Special Operations Officer"), "Special Operations Officer", /obj/item/weapon/card/id/centcom)

View File

@@ -111,7 +111,7 @@ var/global/sent_honksquad = 0
equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(src), slot_wear_mask)
equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(src), slot_shoes)
equip_to_slot_or_del(new /obj/item/device/pda/clown(src), slot_belt)
equip_to_slot_or_del(new /obj/item/device/pda/clown(src), slot_wear_pda)
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(src), slot_wear_mask)
equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/weapon/bikehorn(src), slot_in_backpack)

View File

@@ -43,7 +43,7 @@
. = list()
. += user.r_hand
. += user.l_hand
if(!istype(user.loc, /turf))
if(!isturf(user.loc))
return
var/list/L = block(get_step(user, SOUTHWEST), get_step(user, NORTHEAST))
for(var/A in L)
@@ -231,8 +231,7 @@
var/list/surroundings = get_surroundings(user)
var/dat = "<h3>Crafting menu</h3>"
if(busy)
dat += "<div class='statusDisplay'>"
dat += "Crafting in progress...</div>"
dat += "<div class='statusDisplay'>Crafting in progress...</div>"
else
dat += "<A href='?src=\ref[src];backwardCat=1'><--</A>"
dat += " [categories[prev_cat()]] |"

View File

@@ -602,6 +602,7 @@
dat += "<tr><td>&nbsp;&#8627;<B>Pockets:</B></td><td><A href='?src=\ref[src];pockets=left'>[(l_store && !(l_store.flags&ABSTRACT)) ? "Left (Full)" : "<font color=grey>Left (Empty)</font>"]</A>"
dat += "&nbsp;<A href='?src=\ref[src];pockets=right'>[(r_store && !(r_store.flags&ABSTRACT)) ? "Right (Full)" : "<font color=grey>Right (Empty)</font>"]</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>ID:</B></td><td><A href='?src=\ref[src];item=[slot_wear_id]'>[(wear_id && !(wear_id.flags&ABSTRACT)) ? wear_id : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>PDA:</B></td><td><A href='?src=\ref[src];item=[slot_wear_pda]'>[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? wear_pda : "<font color=grey>Empty</font>"]</A></td></tr>"
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform

View File

@@ -262,7 +262,7 @@
MYPDA = wear_pda
else
MYPDA = new(src)
equip_to_slot_or_del(MYPDA, slot_belt)
equip_to_slot_or_del(MYPDA, slot_wear_pda)
MYPDA.owner = real_name
MYPDA.ownjob = alt_title
MYPDA.ownrank = job

View File

@@ -78,6 +78,8 @@
if(slot_wear_id)
// the only relevant check for this is the uniform check
return 1
if(slot_wear_pda)
return 1
if(slot_l_ear)
return has_organ("head")
if(slot_r_ear)
@@ -248,6 +250,9 @@
wear_id = W
sec_hud_set_ID()
update_inv_wear_id(redraw_mob)
if(slot_wear_pda)
wear_pda = W
update_inv_wear_pda(redraw_mob)
if(slot_l_ear)
l_ear = W
if(l_ear.slot_flags & SLOT_TWOEARS)
@@ -334,6 +339,8 @@
return belt
if(slot_wear_id)
return wear_id
if(slot_wear_pda)
return wear_pda
if(slot_l_ear)
return l_ear
if(slot_r_ear)
@@ -513,6 +520,16 @@
if(!(I.slot_flags & SLOT_ID))
return 0
return 1
if(slot_wear_pda)
if(wear_pda)
return 0
if(!w_uniform)
if(!disable_warning)
to_chat(src, "<span class='alert'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if(!(I.slot_flags & SLOT_PDA))
return 0
return 1
if(slot_l_store)
if(I.flags & NODROP) //Pockets aren't visible, so you can't move NODROP items into them.
return 0

View File

@@ -968,6 +968,16 @@ var/global/list/damage_icon_parts = list()
client.screen += r_store
r_store.screen_loc = ui_storage2
/mob/living/carbon/human/update_inv_wear_pda()
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_pda]
if(inv)
inv.update_icon()
if(wear_pda)
client.screen += wear_pda
wear_pda.screen_loc = ui_pda
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons = 1)
..()
if(client && hud_used)

View File

@@ -256,6 +256,7 @@
var/list/slot_equipment_priority = list( \
slot_back,\
slot_wear_id,\
slot_wear_pda,\
slot_w_uniform,\
slot_wear_suit,\
slot_wear_mask,\

View File

@@ -11,7 +11,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
icon_state = "pda"
item_state = "electronic"
w_class = 1
slot_flags = SLOT_ID | SLOT_BELT
slot_flags = SLOT_ID | SLOT_BELT | SLOT_PDA
//Main variables
var/owner = null