mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
[MIRROR] Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] (#28376)
* Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] * Multi chargers * all this other shit * maps * more fixes * even more * mapping * map fixes * MCR * map2 * map3 * map4 * map5 --------- Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com> Co-authored-by: Fluffles <piecopresident@gmail.com>
This commit is contained in:
co-authored by
Watermelon914
SpaceLoveSs13
Fluffles
parent
271db887c2
commit
65f0e6bd76
@@ -19,7 +19,7 @@
|
||||
///The disk in this PDA. If set, this will be inserted on Initialize.
|
||||
var/obj/item/computer_disk/inserted_disk
|
||||
///The power cell the computer uses to run on.
|
||||
var/obj/item/stock_parts/cell/internal_cell = /obj/item/stock_parts/cell
|
||||
var/obj/item/stock_parts/power_store/internal_cell = /obj/item/stock_parts/power_store/cell
|
||||
///A pAI currently loaded into the modular computer.
|
||||
var/obj/item/pai_card/inserted_pai
|
||||
///Does the console update the crew manifest when the ID is removed?
|
||||
@@ -75,9 +75,9 @@
|
||||
var/comp_light_color = COLOR_WHITE
|
||||
|
||||
///Power usage when the computer is open (screen is active) and can be interacted with.
|
||||
var/base_active_power_usage = 15 // SKYRAT EDIT CHANGE - Original: 125
|
||||
var/base_active_power_usage = 0.4 WATTS // SKYRAT EDIT CHANGE - ORIGINAL: 2 WATTS
|
||||
///Power usage when the computer is idle and screen is off.
|
||||
var/base_idle_power_usage = 2 // SKYRAT EDIT CHANGE - Original: 5
|
||||
var/base_idle_power_usage = 0.2 WATTS //SKYRAT EDIT CHANGE - ORIGINAL: 1 WATTS
|
||||
|
||||
// Modular computers can run on various devices. Each DEVICE (Laptop, Console & Tablet)
|
||||
// must have it's own DMI file. Icon states must be called exactly the same in all files, but may look differently
|
||||
@@ -831,7 +831,7 @@
|
||||
if(istype(tool, /obj/item/pai_card))
|
||||
return pai_act(user, tool)
|
||||
|
||||
if(istype(tool, /obj/item/stock_parts/cell))
|
||||
if(istype(tool, /obj/item/stock_parts/power_store/cell))
|
||||
return cell_act(user, tool)
|
||||
|
||||
if(istype(tool, /obj/item/photo))
|
||||
@@ -871,7 +871,7 @@
|
||||
update_appearance(UPDATE_ICON)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/modular_computer/proc/cell_act(mob/user, obj/item/stock_parts/cell/new_cell)
|
||||
/obj/item/modular_computer/proc/cell_act(mob/user, obj/item/stock_parts/power_store/cell/new_cell)
|
||||
if(ismachinery(physical))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(internal_cell)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
icon_state_unpowered = null
|
||||
icon_state_menu = null
|
||||
hardware_flag = NONE
|
||||
internal_cell = /obj/item/stock_parts/cell/crap
|
||||
internal_cell = /obj/item/stock_parts/power_store/cell/crap
|
||||
|
||||
///The modular computer MACHINE that hosts us.
|
||||
var/obj/machinery/modular_computer/machinery_computer
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
///Try to recharge our internal cell if it isn't fully charged.
|
||||
/obj/machinery/modular_computer/process(seconds_per_tick)
|
||||
var/obj/item/stock_parts/cell/cell = get_cell()
|
||||
var/obj/item/stock_parts/power_store/cell = get_cell()
|
||||
if(isnull(cell) || cell.percent() >= 100)
|
||||
return
|
||||
charge_cell(idle_power_usage * seconds_per_tick, cell)
|
||||
|
||||
Reference in New Issue
Block a user