mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Removes AI and Charge parts from tablets, adds support for more later. (#70012)
* Removes recharger tablet parts Removes 'advanced' tablet subtypes that we used before PDAs were added, in some jobs. Replaces Roboticist's advanced tablet mail with a laptop Moves the notepad's note var from the tablet, to the note app Moves modular computer's defines into their own file Machine computers now directly use power from the machine they're in, while the rest uses power cells. Silicon tablets don't use power at all. Co-authored-by: san7890 <the@san7890.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
co-authored by
san7890
Mothblocks
parent
c7f5bc49da
commit
ca229574f6
@@ -71,7 +71,8 @@
|
||||
|
||||
/// Called on multitool click, prints diagnostic information to the user.
|
||||
/obj/item/computer_hardware/proc/diagnostics(mob/user)
|
||||
to_chat(user, "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]")
|
||||
to_chat(user, "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) \
|
||||
[damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]")
|
||||
|
||||
/// Handles damage checks
|
||||
/obj/item/computer_hardware/proc/check_functionality()
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/obj/item/computer_hardware/ai_slot
|
||||
name = "intelliCard interface slot"
|
||||
desc = "A module allowing this computer to interface with most common intelliCard modules. Necessary for some programs to run properly."
|
||||
power_usage = 100 //W
|
||||
icon_state = "card_mini"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
device_type = MC_AI
|
||||
expansion_hw = TRUE
|
||||
|
||||
var/obj/item/aicard/stored_card
|
||||
var/locked = FALSE
|
||||
|
||||
///What happens when the intellicard is removed (or deleted) from the module, through try_eject() or not.
|
||||
/obj/item/computer_hardware/ai_slot/Exited(atom/movable/gone, direction)
|
||||
if(stored_card == gone)
|
||||
stored_card = null
|
||||
return ..()
|
||||
|
||||
/obj/item/computer_hardware/ai_slot/examine(mob/user)
|
||||
. = ..()
|
||||
if(stored_card)
|
||||
. += "There appears to be an intelliCard loaded. There appears to be a pinhole protecting a manual eject button. A screwdriver could probably press it."
|
||||
|
||||
/obj/item/computer_hardware/ai_slot/try_insert(obj/item/I, mob/living/user = null)
|
||||
if(!holder)
|
||||
return FALSE
|
||||
|
||||
if(!istype(I, /obj/item/aicard))
|
||||
return FALSE
|
||||
|
||||
if(stored_card)
|
||||
to_chat(user, span_warning("You try to insert \the [I] into \the [src], but the slot is occupied."))
|
||||
return FALSE
|
||||
if(user && !user.transferItemToLoc(I, src))
|
||||
return FALSE
|
||||
|
||||
stored_card = I
|
||||
to_chat(user, span_notice("You insert \the [I] into \the [src]."))
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/computer_hardware/ai_slot/try_eject(mob/living/user = null, forced = FALSE)
|
||||
if(!stored_card)
|
||||
to_chat(user, span_warning("There is no card in \the [src]."))
|
||||
return FALSE
|
||||
|
||||
if(locked && !forced)
|
||||
to_chat(user, span_warning("Safeties prevent you from removing the card until reconstruction is complete..."))
|
||||
return FALSE
|
||||
|
||||
if(stored_card)
|
||||
to_chat(user, span_notice("You remove [stored_card] from [src]."))
|
||||
locked = FALSE
|
||||
if(Adjacent(user))
|
||||
user.put_in_hands(stored_card)
|
||||
else
|
||||
stored_card.forceMove(drop_location())
|
||||
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/computer_hardware/ai_slot/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
to_chat(user, span_notice("You press down on the manual eject button with [tool]."))
|
||||
try_eject(user, TRUE)
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
@@ -4,8 +4,8 @@
|
||||
icon_state = "cell_con"
|
||||
critical = 1
|
||||
malfunction_probability = 1
|
||||
var/obj/item/stock_parts/cell/battery
|
||||
device_type = MC_CELL
|
||||
var/obj/item/stock_parts/cell/battery
|
||||
|
||||
/obj/item/computer_hardware/battery/get_cell()
|
||||
return battery
|
||||
|
||||
@@ -88,6 +88,10 @@
|
||||
return FALSE
|
||||
|
||||
if(F in stored_files)
|
||||
if(istype(F, /datum/computer_file/program))
|
||||
var/datum/computer_file/program/program_file = F
|
||||
if(program_file.program_state != PROGRAM_STATE_KILLED)
|
||||
program_file.kill_program(TRUE)
|
||||
SEND_SIGNAL(F, COMSIG_MODULAR_COMPUTER_FILE_DELETING)
|
||||
stored_files -= F
|
||||
recalculate_size()
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
var/obj/item/paper/printed_paper = new/obj/item/paper(holder.drop_location())
|
||||
|
||||
// Damaged printer causes the resulting paper to be somewhat harder to read.
|
||||
|
||||
if(damage > damage_malfunction)
|
||||
printed_paper.add_raw_text(stars(text_to_print, 100-malfunction_probability))
|
||||
else
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
/obj/item/computer_hardware/recharger
|
||||
critical = TRUE
|
||||
enabled = TRUE
|
||||
device_type = MC_CHARGE
|
||||
var/charge_rate = 100
|
||||
|
||||
/obj/item/computer_hardware/recharger/proc/use_power(amount, charging=0)
|
||||
if(charging)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/computer_hardware/recharger/process()
|
||||
..()
|
||||
var/obj/item/computer_hardware/battery/battery_module = holder.all_components[MC_CELL]
|
||||
if(!holder || !battery_module || !battery_module.battery)
|
||||
return
|
||||
|
||||
var/obj/item/stock_parts/cell/cell = battery_module.battery
|
||||
if(cell.charge >= cell.maxcharge)
|
||||
return
|
||||
|
||||
if(use_power(charge_rate, charging=1))
|
||||
holder.give_power(charge_rate JOULES)
|
||||
|
||||
|
||||
/obj/item/computer_hardware/recharger/apc_recharger
|
||||
name = "area power connector"
|
||||
desc = "A device that wirelessly recharges connected device from nearby APC."
|
||||
icon_state = "charger_APC"
|
||||
w_class = WEIGHT_CLASS_SMALL // Can't be installed into tablets/PDAs
|
||||
|
||||
/obj/item/computer_hardware/recharger/apc_recharger/use_power(amount, charging=0)
|
||||
if(ismachinery(holder.physical))
|
||||
var/obj/machinery/M = holder.physical
|
||||
if(M.powered())
|
||||
M.use_power(amount)
|
||||
return TRUE
|
||||
|
||||
else
|
||||
var/area/A = get_area(src)
|
||||
if(!istype(A))
|
||||
return FALSE
|
||||
|
||||
if(A.powered(AREA_USAGE_EQUIP))
|
||||
A.use_power(amount, AREA_USAGE_EQUIP)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/computer_hardware/recharger/wired
|
||||
name = "wired power connector"
|
||||
desc = "A power connector that recharges connected device from nearby power wire. Incompatible with portable computers."
|
||||
icon_state = "charger_wire"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/computer_hardware/recharger/wired/can_install(obj/item/modular_computer/install_into, mob/living/user = null)
|
||||
if(ismachinery(install_into.physical) && install_into.physical.anchored)
|
||||
return ..()
|
||||
to_chat(user, span_warning("\The [src] is incompatible with portable computers!"))
|
||||
return FALSE
|
||||
|
||||
/obj/item/computer_hardware/recharger/wired/use_power(amount, charging=0)
|
||||
if(ismachinery(holder.physical) && holder.physical.anchored)
|
||||
var/obj/machinery/M = holder.physical
|
||||
var/turf/T = M.loc
|
||||
if(!T || !istype(T))
|
||||
return FALSE
|
||||
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(!C || !C.powernet)
|
||||
return FALSE
|
||||
|
||||
var/power_in_net = C.powernet.avail-C.powernet.load
|
||||
|
||||
if(power_in_net && power_in_net > amount)
|
||||
C.powernet.load += amount
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/// This recharger exists only in borg built-in tablets. I would have tied it to the borg's cell but
|
||||
/// the program that displays laws should always be usable, and the exceptions were starting to pile.
|
||||
/obj/item/computer_hardware/recharger/cyborg
|
||||
name = "modular interface power harness"
|
||||
desc = "A standard connection to power a small computer device from a cyborg's chassis."
|
||||
|
||||
/obj/item/computer_hardware/recharger/cyborg/use_power(amount, charging=0)
|
||||
return TRUE
|
||||
|
||||
|
||||
// This is not intended to be obtainable in-game. Intended for adminbus and debugging purposes.
|
||||
/obj/item/computer_hardware/recharger/lambda
|
||||
name = "lambda coil"
|
||||
desc = "A very complex device that draws power from its own bluespace dimension."
|
||||
icon_state = "charger_lambda"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
charge_rate = 100000
|
||||
|
||||
/obj/item/computer_hardware/recharger/lambda/use_power(amount, charging=0)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user