Skip to content

Commit

Permalink
tele-pda and tele-wrist
Browse files Browse the repository at this point in the history
  • Loading branch information
polerno committed Jul 12, 2023
1 parent 52acb23 commit 13f5adc
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 56 deletions.
5 changes: 5 additions & 0 deletions code/modules/client/preference_setup/loadout/lists/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,8 @@
cointype["coin, phoron"] = /obj/item/material/coin/phoron
cointype["coin, platinum"] = /obj/item/material/coin/platinum
gear_tweaks += new/datum/gear_tweak/path(cointype)

/datum/gear/telepda
display_name = "tele-pda"
path = /obj/item/device/holopad
cost = 3
20 changes: 10 additions & 10 deletions maps/torch/torch6_bridge.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@
pixel_x = 8;
pixel_y = -3
},
/obj/item/device/holopad,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/carpet,
/area/crew_quarters/heads/office/xo)
"cq" = (
Expand Down Expand Up @@ -2324,6 +2324,7 @@
/obj/item/device/flashlight/lamp{
pixel_y = 3
},
/obj/item/device/holopad/wrist,
/turf/simulated/floor/tiled/dark,
/area/crew_quarters/heads/office/cos)
"en" = (
Expand Down Expand Up @@ -2429,7 +2430,6 @@
desc = "A 'Space Life' brand Security Officer action figure. This one seems rather old. A small heart is sewn into the armor vest."
},
/obj/item/sticky_pad/random,
/obj/item/device/holopad,
/turf/simulated/floor/tiled/dark/monotile,
/area/crew_quarters/heads/office/cos)
"ev" = (
Expand Down Expand Up @@ -4407,7 +4407,6 @@
},
/obj/random_multi/single_item/memo_engineering,
/obj/item/storage/box/encryptionkey/engineering,
/obj/item/device/holopad,
/turf/simulated/floor/tiled,
/area/crew_quarters/heads/office/ce)
"iU" = (
Expand Down Expand Up @@ -5015,6 +5014,7 @@
name = "plastic table frame"
},
/obj/item/toy/desk/newtoncradle,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/tiled,
/area/crew_quarters/heads/office/ce)
"kJ" = (
Expand Down Expand Up @@ -5618,7 +5618,7 @@
pixel_x = 9;
pixel_y = -24
},
/obj/item/device/holopad,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/tiled/dark/monotile,
/area/crew_quarters/heads/office/sea)
"mA" = (
Expand Down Expand Up @@ -5749,7 +5749,7 @@
/area/hallway/primary/bridge/aft)
"mT" = (
/obj/structure/table/woodentable/walnut,
/obj/item/device/holopad,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/wood/walnut,
/area/crew_quarters/heads/cobed)
"mU" = (
Expand Down Expand Up @@ -9572,7 +9572,7 @@
/obj/effect/floor_decal/corner/brown/mono,
/obj/structure/closet/secure_closet/deckofficer,
/obj/effect/floor_decal/industrial/outline/yellow,
/obj/item/device/holopad,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/tiled/dark/monotile,
/area/quartermaster/deckchief)
"wP" = (
Expand Down Expand Up @@ -10258,6 +10258,7 @@
/obj/structure/table/woodentable_reinforced/walnut,
/obj/item/sticky_pad/random,
/obj/item/book/manual/nt_regs,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/carpet/green,
/area/crew_quarters/heads/office/cl)
"yV" = (
Expand Down Expand Up @@ -11757,7 +11758,7 @@
dir = 4;
pixel_x = 21
},
/obj/item/device/holopad,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/tiled/white,
/area/crew_quarters/heads/office/cmo)
"EV" = (
Expand Down Expand Up @@ -13030,7 +13031,7 @@
/obj/effect/floor_decal/corner/research/half{
dir = 1
},
/obj/item/device/holopad,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/tiled/monotile,
/area/crew_quarters/heads/office/rd)
"IW" = (
Expand Down Expand Up @@ -14363,7 +14364,6 @@
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 8
},
/obj/item/device/holopad,
/turf/simulated/floor/carpet/green,
/area/crew_quarters/heads/office/cl)
"OD" = (
Expand Down Expand Up @@ -15812,7 +15812,7 @@
pixel_y = -4
},
/obj/item/hand_labeler,
/obj/item/device/holopad,
/obj/item/device/holopad/wrist,
/turf/simulated/floor/wood/walnut,
/area/crew_quarters/heads/office/sgr)
"Ug" = (
Expand Down
55 changes: 9 additions & 46 deletions proxima/code/game/items/devices/holopad_hand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#define CALL_IN_CALL 3

/obj/item/device/holopad
name = "Holopad"
desc = "Small handheld disk with controls."
icon = 'proxima/icons/obj/holopad.dmi'
name = "Tele-pda"
desc = "Tele-pda is a convenient device that allows you to talk over a closed third-party connection that will protect you from sudden wiretapping or intrusion into your conversations. Rejoice in such a useful thing."
icon = 'proxima/icons/obj/holopda.dmi'
icon_state = "holopad"
item_state = "card-id"
w_class = ITEM_SIZE_TINY
Expand All @@ -15,8 +15,6 @@
var/uniq_id
var/obj/item/device/holopad/abonent = null
var/call_state = CALL_NONE
var/obj/effect/hologram = null
var/updatingPos = 0
origin_tech = list(TECH_DATA = 4, TECH_BLUESPACE = 2, TECH_MAGNET = 4)

/obj/item/device/holopad/Initialize()
Expand Down Expand Up @@ -90,7 +88,6 @@
abonent.acceptCall()
call_state = CALL_IN_CALL
icon_state = "holopad_in_call"
addtimer(CALLBACK(src, .proc/update_holo), 1)

audible_message("<span class='name'>[voice]</span> transmits, \"Connection established\"", hearing_distance = 1)
else
Expand All @@ -102,7 +99,6 @@
else if(call_state == CALL_CALLING)
call_state = CALL_IN_CALL
icon_state = "holopad_in_call"
addtimer(CALLBACK(src, .proc/update_holo), 1)

audible_message("<span class='name'>[voice]</span> transmits, \"Connection established\"", hearing_distance = 1)

Expand All @@ -118,45 +114,7 @@
icon_state = initial(icon_state)
desc = initial(desc)
abonent = null
qdel(hologram)

/obj/item/device/holopad/dropped()
update_holo()

/obj/item/device/holopad/proc/update_holo()
if(call_state == CALL_IN_CALL)
if(!abonent)
return
if(!abonent.hologram)
abonent.hologram = new()
abonent.hologram.name = "Hologram [sanitize(id)]"
abonent.hologram.layer = 5
if(isliving(loc))
abonent.hologram.icon = getHologramIcon(build_composite_icon_omnidir(loc))
else
abonent.hologram.icon = icon('icons/effects/effects.dmi', "icon_state"="nothing")
if(!abonent.updatingPos)
abonent.update_holo_pos()

/obj/item/device/holopad/proc/update_holo_pos()
if(call_state != CALL_IN_CALL)
updatingPos = 0
return
updatingPos = 1
if(isliving(loc))
var/mob/living/L = loc
hologram.dir = turn(L.dir,180)
hologram.loc = L.loc
hologram.pixel_x = ((L.dir&4)?32:((L.dir&8)?-32:0))
hologram.pixel_y = ((L.dir&1)?32:((L.dir&2)?-32:0))
else if(isturf(loc))
hologram.dir = 2
hologram.loc = loc
hologram.pixel_x = 0
hologram.pixel_y = 0
else
hangUp()
addtimer(CALLBACK(src, .proc/update_holo_pos), 2)


/obj/item/device/holopad/attack_self(mob/user)
Expand All @@ -183,10 +141,15 @@
listening |= G

if(!user)
voice = "Holopad Background Voice"
voice = "Tele-link Background Voice"
for(var/mob/M in listening)
to_chat(M, "<span class='name'>[voice]</span> transmits, \"[speaking]\" ")

/obj/item/device/holopad/wrist
name = "Tele-wrist"
desc = "The tele-wrist is a useful device if it is inconvenient for you to hold your tele-pda to your ear, now you can hook it on your hand and chat while jogging or working."
icon = 'proxima/icons/obj/telewatch.dmi'
slot_flags = SLOT_GLOVES

#undef CALL_NONE
#undef CALL_CALLING
Expand Down
Binary file added proxima/icons/obj/Telewatch.dmi
Binary file not shown.
Binary file removed proxima/icons/obj/holopad.dmi
Binary file not shown.

0 comments on commit 13f5adc

Please sign in to comment.