Skip to content

Commit

Permalink
Vending, ORM, and SSUs consume power now
Browse files Browse the repository at this point in the history
  • Loading branch information
Thera-Pissed committed Jan 9, 2024
1 parent b3b942a commit 717c5ef
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 6 deletions.
3 changes: 1 addition & 2 deletions code/__DEFINES/power.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#define TESLA_DEFAULT_POWER 1738260
#define TESLA_MINI_POWER 869130

#define LIGHT_DRAW 5 // mulitplied by brightness, which is 4-8

#define LIGHT_DRAW 5 // mulitplied by brightness, typically 4-8

#define IDLE_DRAW_MINIMAL 50 // 20x = 1kw, used for small things and computers on stand-by
#define IDLE_DRAW_LOW 200 //5x = 1kw, used for always-active computers
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/suit_storage_unit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@
uv = TRUE
locked = TRUE
update_appearance()
use_power(100)
if(occupant)
if(uv_super)
mob_occupant.adjustFireLoss(rand(20, 36))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

var/temperature_delta= abs(old_temperature - air_contents.return_temperature())
if(temperature_delta > 1)
active_power_usage = (heat_capacity * temperature_delta) / 10 + idle_power_usage //FIXLATER
active_power_usage = (heat_capacity * temperature_delta) / 10 + idle_power_usage
update_parents()
else
active_power_usage = idle_power_usage
Expand Down
2 changes: 1 addition & 1 deletion code/modules/atmospherics/machinery/portable/scrubber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
name = "huge air scrubber"
icon_state = "scrubber:0"
anchored = TRUE
idle_power_usage = ACTIVE_DRAW_MINIMAL
idle_power_usage = IDLE_DRAW_MINIMAL
active_power_usage = ACTIVE_DRAW_MEDIUM

overpressure_m = 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
icon = 'icons/obj/machines/coffeemaker.dmi'
icon_state = "coffeemaker_nopot_nocart"
base_icon_state = "coffeemaker"
active_power_usage = ACTIVE_DRAW_MINIMAL
resistance_flags = FIRE_PROOF | ACID_PROOF
circuit = /obj/item/circuitboard/machine/coffeemaker
var/obj/item/reagent_containers/food/drinks/bottle/coffeepot/coffeepot = null
Expand Down
2 changes: 1 addition & 1 deletion code/modules/holodeck/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ and clear when youre done! if you dont i will use :newspaper2: on you
for(var/_effect in effects)
var/obj/effect/holodeck_effect/holo_effect = _effect
holo_effect.tick()
active_power_usage = 50 + spawned.len * 3 + effects.len * 5 //FIXLATER
active_power_usage = 50 + spawned.len * 3 + effects.len * 5

/obj/machinery/computer/holodeck/proc/toggle_power(toggleOn = FALSE)
if(active == toggleOn)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/hydroponics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
pixel_z = 1
obj_flags = CAN_BE_HIT | UNIQUE_RENAME
circuit = /obj/item/circuitboard/machine/hydroponics
idle_power_usage = 0 //FIXLATER
idle_power_usage = 0
var/waterlevel = 100 //The amount of water in the tray (max 100)
var/maxwater = 100 //The maximum amount of water in the tray
var/nutridrain = 1 // How many units of nutrient will be drained in the tray
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mining/machine_redemption.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
icon = 'icons/obj/machines/orm.dmi' // WS Edit - Directional ORM Sprites
icon_state = "ore_redemption"
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = IDLE_DRAW_MEDIUM
input_dir = NORTH
output_dir = SOUTH
layer = BELOW_OBJ_LAYER
Expand Down
2 changes: 2 additions & 0 deletions code/modules/vending/_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
icon_state = "generic"
layer = BELOW_OBJ_LAYER
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = IDLE_DRAW_MINIMAL
verb_say = "beeps"
verb_ask = "beeps"
verb_exclaim = "beeps"
Expand Down

0 comments on commit 717c5ef

Please sign in to comment.