mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Modular PDAs: The End of an Era (#10319)
PDAs are dead, long live PDAs. All trace of old PDAs has been scoured from the codebase, and in its place are modular computer PDAs that are feature-equivalent. Essentially every PDA function except the Syndicate detonation feature and Notepad has been ported over, and battery life for handheld computers has been boosted alongside the addition of charging cables to make things easier.
This commit is contained in:
@@ -2,51 +2,57 @@
|
||||
// have tremendeous capacity in comparsion. Higher tier cells would provide your device with nearly infinite battery life, which is something i want to avoid.
|
||||
/obj/item/computer_hardware/battery_module
|
||||
name = "standard battery"
|
||||
desc = "A standard power cell, commonly seen in high-end portable microcomputers or low-end laptops. Its rating is 750."
|
||||
desc = "A standard power cell, commonly seen in high-end portable microcomputers or low-end laptops. It provides 1,500 Wh of power."
|
||||
icon_state = "battery_normal"
|
||||
critical = TRUE
|
||||
malfunction_probability = 1
|
||||
origin_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1)
|
||||
var/battery_rating = 750
|
||||
var/battery_rating = 1500
|
||||
var/obj/item/cell/battery
|
||||
var/hotswappable = FALSE
|
||||
|
||||
/obj/item/computer_hardware/battery_module/hotswap
|
||||
name = "hotswappable battery"
|
||||
desc = "A standard power cell, providing 1000 mWh of power. This is a slightly more expensive model, designed to be replaced and recharged separately."
|
||||
hotswappable = TRUE
|
||||
|
||||
/obj/item/computer_hardware/battery_module/advanced
|
||||
name = "advanced battery"
|
||||
desc = "An advanced power cell, often used in most laptops. It is too large to be fitted into smaller devices. Its rating is 1100."
|
||||
desc = "An advanced power cell, often used in higher-end laptops and other large devices. It provides 2,000 mWh of power."
|
||||
icon_state = "battery_advanced"
|
||||
origin_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 2)
|
||||
battery_rating = 1100
|
||||
battery_rating = 2000
|
||||
hardware_size = 2
|
||||
|
||||
/obj/item/computer_hardware/battery_module/super
|
||||
name = "super battery"
|
||||
desc = "A very advanced power cell, often used in high-end devices, or as uninterruptable power supply for important consoles or servers. Its rating is 1500."
|
||||
desc = "A very advanced power cell, often used in high-end devices, or as uninterruptable power supply for important consoles or servers. It provides a sizable 2,500 mWh worth of power."
|
||||
icon_state = "battery_super"
|
||||
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3)
|
||||
hardware_size = 3
|
||||
battery_rating = 1500
|
||||
battery_rating = 2500
|
||||
|
||||
/obj/item/computer_hardware/battery_module/ultra
|
||||
name = "ultra battery"
|
||||
desc = "A very advanced large power cell. Its often used as uninterruptable power supply for critical consoles or servers. Its rating is 2000."
|
||||
desc = "A very advanced large power cell. Its often used as uninterruptable power supply for critical consoles or servers. It provides a staggering 4,000 mWh worth of power."
|
||||
icon_state = "battery_ultra"
|
||||
origin_tech = list(TECH_POWER = 5, TECH_ENGINEERING = 4)
|
||||
hardware_size = 3
|
||||
battery_rating = 2000
|
||||
battery_rating = 4000
|
||||
|
||||
/obj/item/computer_hardware/battery_module/micro
|
||||
name = "micro battery"
|
||||
desc = "A small power cell, commonly seen in most portable microcomputers. Its rating is 500."
|
||||
desc = "A small power cell, commonly seen in most portable microcomputers. It provides 750 mWh of power."
|
||||
icon_state = "battery_micro"
|
||||
origin_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 2)
|
||||
battery_rating = 500
|
||||
battery_rating = 750
|
||||
|
||||
/obj/item/computer_hardware/battery_module/nano
|
||||
name = "nano battery"
|
||||
desc = "A tiny power cell, commonly seen in low-end portable microcomputers. Its rating is 300."
|
||||
desc = "A tiny power cell, commonly seen in low-end portable microcomputers. It provides 500 mWh of power."
|
||||
icon_state = "battery_nano"
|
||||
origin_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1)
|
||||
battery_rating = 300
|
||||
battery_rating = 500
|
||||
|
||||
// This is not intended to be obtainable in-game. Intended for adminbus and debugging purposes.
|
||||
/obj/item/computer_hardware/battery_module/lambda
|
||||
|
||||
@@ -9,10 +9,43 @@
|
||||
|
||||
var/obj/item/card/id/stored_card
|
||||
|
||||
// Storing items (We PDAs now boys)
|
||||
var/list/allowed_items = list(/obj/item/pen,
|
||||
/obj/item/lipstick,
|
||||
/obj/item/device/flashlight/pen,
|
||||
/obj/item/clothing/mask/smokable/cigarette
|
||||
)
|
||||
var/obj/item/stored_item //Used for pen, crayon, and lipstick insertion/removal
|
||||
|
||||
/obj/item/computer_hardware/card_slot/Destroy()
|
||||
if(parent_computer?.card_slot == src)
|
||||
parent_computer.card_slot = null
|
||||
if(stored_card)
|
||||
stored_card.forceMove(get_turf(parent_computer))
|
||||
parent_computer = null
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/obj/item/computer_hardware/card_slot/proc/insert_id(var/obj/item/card/id/id)
|
||||
if(!istype(id))
|
||||
return
|
||||
|
||||
id.forceMove(src)
|
||||
stored_card = id
|
||||
|
||||
if(parent_computer)
|
||||
parent_computer.verbs += /obj/item/modular_computer/proc/eject_id
|
||||
parent_computer.initial_name = parent_computer.name
|
||||
parent_computer.name = "[parent_computer.name] ([id.registered_name] ([id.assignment]))"
|
||||
|
||||
/obj/item/computer_hardware/card_slot/proc/eject_id(mob/user)
|
||||
if(!stored_card)
|
||||
return
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(stored_card)
|
||||
else
|
||||
stored_card.forceMove(get_turf(src))
|
||||
stored_card = null
|
||||
|
||||
if(parent_computer)
|
||||
parent_computer.verbs -= /obj/item/modular_computer/proc/eject_id
|
||||
parent_computer.name = parent_computer.initial_name
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
/obj/item/computer_hardware/hard_drive/micro
|
||||
name = "micro hard drive"
|
||||
desc = "A small micro hard drive for portable devices."
|
||||
power_usage = 2
|
||||
power_usage = 5
|
||||
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
|
||||
max_capacity = 32
|
||||
icon_state = "hdd_micro"
|
||||
|
||||
@@ -3,7 +3,7 @@ var/global/ntnet_card_uid = 1
|
||||
/obj/item/computer_hardware/network_card
|
||||
name = "basic NTNet network card"
|
||||
desc = "A basic network card for usage with standard NTNet frequencies."
|
||||
power_usage = 50
|
||||
power_usage = 25
|
||||
origin_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 1)
|
||||
critical = FALSE
|
||||
icon_state = "netcard_basic"
|
||||
@@ -12,6 +12,7 @@ var/global/ntnet_card_uid = 1
|
||||
var/identification_string = "" // Identification string, technically nickname seen in the network. Can be set by user.
|
||||
var/long_range = FALSE
|
||||
var/ethernet = FALSE // Hard-wired, therefore always on, ignores NTNet wireless checks.
|
||||
var/obj/item/radio/integrated/signal/sradio = FALSE // integrated signaler - not present on basic model.
|
||||
malfunction_probability = 1
|
||||
|
||||
/obj/item/computer_hardware/network_card/diagnostics(mob/user)
|
||||
@@ -20,8 +21,10 @@ var/global/ntnet_card_uid = 1
|
||||
to_chat(user, SPAN_NOTICE("NIX User Tag: [identification_string]"))
|
||||
to_chat(user, SPAN_NOTICE("Supported protocols:"))
|
||||
to_chat(user, SPAN_NOTICE("511.m SFS (Subspace) - Standard Frequency Spread"))
|
||||
if(sradio)
|
||||
to_chat(user, SPAN_NOTICE("511.s WFS (Subspace) - Wide Frequency Spread / Signaling"))
|
||||
if(long_range)
|
||||
to_chat(user, SPAN_NOTICE("511.n WFS/HB (Subspace) - Wide Frequency Spread/High Bandwidth"))
|
||||
to_chat(user, SPAN_NOTICE("511.n HB (Subspace) - High Bandwidth / Long Range"))
|
||||
if(ethernet)
|
||||
to_chat(user, SPAN_NOTICE("OpenEth (Physical Connection) - Physical Network Connection Port"))
|
||||
|
||||
@@ -30,6 +33,16 @@ var/global/ntnet_card_uid = 1
|
||||
identification_id = ntnet_card_uid
|
||||
ntnet_card_uid++
|
||||
|
||||
/obj/item/computer_hardware/network_card/signaler
|
||||
name = "NTNet signaler network card"
|
||||
desc = "An upgraded version of the basic network card, capable of transmitting and receiving over NTNet as well as custom frequencies."
|
||||
power_usage = 75
|
||||
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 1)
|
||||
|
||||
/obj/item/computer_hardware/network_card/signaler/Initialize()
|
||||
. = ..()
|
||||
sradio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
/obj/item/computer_hardware/network_card/advanced
|
||||
name = "advanced NTNet network card"
|
||||
desc = "An advanced network card for usage with standard NTNet frequencies. Its transmitter is strong enough to connect even off-station."
|
||||
@@ -39,6 +52,10 @@ var/global/ntnet_card_uid = 1
|
||||
icon_state = "netcard_advanced"
|
||||
hardware_size = 2
|
||||
|
||||
/obj/item/computer_hardware/network_card/advanced/Initialize()
|
||||
. = ..()
|
||||
sradio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
/obj/item/computer_hardware/network_card/wired
|
||||
name = "wired NTNet network card"
|
||||
desc = "An advanced network card for usage with standard NTNet frequencies. This one also supports wired connection."
|
||||
@@ -48,6 +65,10 @@ var/global/ntnet_card_uid = 1
|
||||
icon_state = "netcard_ethernet"
|
||||
hardware_size = 3
|
||||
|
||||
/obj/item/computer_hardware/network_card/wired/Initialize()
|
||||
. = ..()
|
||||
sradio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
// Returns a string identifier of this network card
|
||||
/obj/item/computer_hardware/network_card/proc/get_network_tag()
|
||||
return "[identification_string] (NID [identification_id])"
|
||||
@@ -83,6 +104,8 @@ var/global/ntnet_card_uid = 1
|
||||
return 0 // Computer is not on station and does not have upgraded network card. No signal.
|
||||
|
||||
/obj/item/computer_hardware/network_card/Destroy()
|
||||
if(sradio)
|
||||
QDEL_NULL(sradio)
|
||||
if(parent_computer?.network_card == src)
|
||||
parent_computer.network_card = null
|
||||
parent_computer = null
|
||||
|
||||
@@ -17,10 +17,19 @@
|
||||
desc = "A standard miniaturised CPU used in portable devices. It can run up to two programs simultaneously."
|
||||
icon_state = "cpu_small"
|
||||
hardware_size = 1
|
||||
power_usage = 25
|
||||
power_usage = 50
|
||||
max_idle_programs = 1
|
||||
origin_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
|
||||
|
||||
/obj/item/computer_hardware/processor_unit/small/adv
|
||||
name = "upgraded microprocessor"
|
||||
desc = "An expensive, upgraded mini-CPU used in portable devices. It can run up to three programs simultaneously, though with less power efficiency than slower models."
|
||||
icon_state = "cpu_small"
|
||||
hardware_size = 1
|
||||
power_usage = 100
|
||||
max_idle_programs = 2
|
||||
origin_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
|
||||
|
||||
/obj/item/computer_hardware/processor_unit/photonic
|
||||
name = "photonic processor"
|
||||
desc = "An advanced experimental CPU that uses photonic core instead of regular circuitry. It can run up to five programs simultaneously, but uses a lot of power."
|
||||
@@ -35,6 +44,6 @@
|
||||
desc = "An advanced miniaturised CPU for use in portable devices. It uses photonic core instead of regular circuitry. It can run up to three programs simultaneously."
|
||||
icon_state = "cpu_small_photonic"
|
||||
hardware_size = 1
|
||||
power_usage = 100
|
||||
max_idle_programs = 2
|
||||
power_usage = 75
|
||||
max_idle_programs = 3
|
||||
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3)
|
||||
@@ -5,9 +5,65 @@
|
||||
icon_state = "teslalink"
|
||||
hardware_size = 3
|
||||
origin_tech = list(TECH_DATA = 2, TECH_POWER = 3, TECH_ENGINEERING = 2)
|
||||
var/passive_charging_rate = 250 // W
|
||||
var/passive_charging_rate = 2500 // mW
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/Destroy()
|
||||
if(parent_computer?.tesla_link == src)
|
||||
parent_computer.tesla_link = null
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/charging_cable
|
||||
name = "charging cable"
|
||||
desc = "An integrated charging cable used to recharge small devices manually, by hooking into the local area power controller."
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "wire"
|
||||
hardware_size = 1
|
||||
origin_tech = list(TECH_ENGINEERING = 1, TECH_POWER = 1)
|
||||
passive_charging_rate = 2500 // mW
|
||||
var/obj/machinery/power/source
|
||||
var/datum/beam/beam
|
||||
var/cable_length = 3
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/charging_cable/Destroy()
|
||||
if(source || beam)
|
||||
deactivate()
|
||||
return ..()
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/charging_cable/proc/toggle(var/obj/machinery/power/power_source, mob/user)
|
||||
if(!source)
|
||||
to_chat(user, SPAN_NOTICE("You connect \the [src] to \the [power_source]."))
|
||||
activate(power_source)
|
||||
else
|
||||
deactivate()
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/charging_cable/proc/activate(var/power_source)
|
||||
var/obj/machinery/power/P = power_source
|
||||
if(!istype(P))
|
||||
return
|
||||
tether(P)
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/charging_cable/proc/deactivate()
|
||||
untether()
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/charging_cable/check_functionality()
|
||||
. = ..()
|
||||
if(!source || !enabled)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/charging_cable/proc/tether(var/obj/machinery/power/P)
|
||||
source = P
|
||||
var/datum/beam/power/B = new/datum/beam/power(src, source, beam_icon_state = "explore_beam", time = -1, maxdistance = cable_length)
|
||||
B.owner = src
|
||||
B.Start()
|
||||
beam = B
|
||||
|
||||
/obj/item/computer_hardware/tesla_link/charging_cable/proc/untether(var/destroy_beam = TRUE)
|
||||
source = null
|
||||
if(parent_computer)
|
||||
parent_computer.visible_message(SPAN_WARNING("The charging cable suddenly disconnects from the APC, quickly reeling back into the computer!"))
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 30, 0)
|
||||
if(!destroy_beam)
|
||||
return
|
||||
if(beam)
|
||||
beam.End()
|
||||
Reference in New Issue
Block a user