Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/__DEFINES/clockcult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ GLOBAL_LIST_EMPTY(all_scripture)

//Eminence defines
/// How many walls can be superheated at once
#define SUPERHEATED_CLOCKWORK_WALL_LIMIT 20
#define SUPERHEATED_CLOCKWORK_WALL_LIMIT 30

//misc clockcult stuff

Expand Down Expand Up @@ -136,4 +136,4 @@ GLOBAL_LIST_EMPTY(all_scripture)
#define ARK_SCREAM_COOLDOWN 600

/// The percent of servant over living players before they enter hardmode and have a warp penalty on non-clockwork tiles
#define SERVANT_HARDMODE_PERCENT 0.2
#define SERVANT_HARDMODE_PERCENT 0.2
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
desc = "A small cogwheel that fits in the palm of your hand."
clockwork_desc = "A small cogwheel that can be inserted into an open APC to siphon power from it passively.<br>\
<span class='brass'>It can be used on a locked APC to open its cover!</span><br>\
<span class='brass'>Siphons <b>10 W</b> of power per second while in a powered APC.</span><br>\
<span class='brass'>Siphons <b>5 W</b> of power per second while in an unpowered APC.</span>"
<span class='brass'>Siphons <b>20 W</b> of power per second while in a powered APC.</span><br>\
<span class='brass'>Siphons <b>10 W</b> of power per second while in an unpowered APC.</span>"
icon_state = "wall_gear"
w_class = WEIGHT_CLASS_TINY
item_flags = NOBLUDGEON
var/obj/machinery/power/apc/apc
var/watts_per_second = 20
var/depowered_multiplier = 0.5

/obj/item/clockwork/integration_cog/Initialize()
. = ..()
Expand All @@ -28,11 +30,13 @@
else
STOP_PROCESSING(SSfastprocess, src)
else
var/power_adjust = watts_per_second / 5
var/obj/item/stock_parts/cell/cell = apc.cell
if(cell && (cell.charge / cell.maxcharge > COG_MAX_SIPHON_THRESHOLD))
cell.use(1)
adjust_clockwork_power(2) //Power is shared, so only do it once; this runs very quickly so it's about 10 W/second
cell.use(2)
adjust_clockwork_power(power_adjust) //Power is shared, so only do it once; this runs very quickly so it's about 10 W/second

else
adjust_clockwork_power(1) //Continue generating power when the cell has run dry; 5 W/second
adjust_clockwork_power(power_adjust * depowered_multiplier) //Continue generating power when the cell has run dry; 5 W/second

#undef COG_MAX_SIPHON_THRESHOLD