[MIRROR] [READY]Circuit balance (#5760)
* [READY]Circuit balance * [READY]Circuit balance (#35931) * cooldowns, power cell,disks * NUMBERS NUMBERS NUMBERS * 1 8 9 * PR PR PR * DESC DESCDSCDCC * <br> * GET ALL CONTENTS * Update power.dm * Update power.dm * Update time.dm
This commit is contained in:
committed by
Poojawa
parent
7d9dbcd0c3
commit
59d61d5e0d
@@ -3,6 +3,7 @@
|
||||
|
||||
/obj/item/device/electronic_assembly
|
||||
name = "electronic assembly"
|
||||
obj_flags = CAN_BE_HIT
|
||||
desc = "It's a case, for building small electronics with."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/assemblies/electronic_setups.dmi'
|
||||
@@ -20,6 +21,8 @@
|
||||
var/charge_tick = FALSE
|
||||
var/charge_delay = 4
|
||||
var/use_cyborg_cell = TRUE
|
||||
var/ext_next_use = 0
|
||||
var/atom/movable/collw
|
||||
var/allowed_circuit_action_flags = IC_ACTION_COMBAT | IC_ACTION_LONG_RANGE //which circuit flags are allowed
|
||||
var/combat_circuits = 0 //number of combat cicuits in the assembly, used for diagnostic hud
|
||||
var/long_range_circuits = 0 //number of long range cicuits in the assembly, used for diagnostic hud
|
||||
@@ -31,6 +34,9 @@
|
||||
/obj/item/device/electronic_assembly/proc/check_interactivity(mob/user)
|
||||
return user.canUseTopic(src, BE_CLOSE)
|
||||
|
||||
/obj/item/device/electronic_assembly/CollidedWith(atom/movable/AM)
|
||||
collw = AM
|
||||
..()
|
||||
|
||||
/obj/item/device/electronic_assembly/Initialize()
|
||||
.=..()
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
var/next_use = 0 // Uses world.time
|
||||
var/complexity = 1 // This acts as a limitation on building machines, more resource-intensive components cost more 'space'.
|
||||
var/size = 1 // This acts as a limitation on building machines, bigger components cost more 'space'. -1 for size 0
|
||||
var/cooldown_per_use = 9 // Circuits are limited in how many times they can be work()'d by this variable.
|
||||
var/cooldown_per_use = 1 // Circuits are limited in how many times they can be work()'d by this variable.
|
||||
var/ext_cooldown = 0 // Circuits are limited in how many times they can be work()'d with external world by this variable.
|
||||
var/power_draw_per_use = 0 // How much power is drawn when work()'d.
|
||||
var/power_draw_idle = 0 // How much power is drawn when doing nothing.
|
||||
var/spawn_flags // Used for world initializing, see the #defines above.
|
||||
@@ -212,6 +213,9 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
HTML += "</div>"
|
||||
|
||||
HTML += "<br><font color='0000AA'>Complexity: [complexity]</font>"
|
||||
HTML += "<br><font color='0000AA'>Cooldown per use: [cooldown_per_use/10] sec</font>"
|
||||
if(ext_cooldown)
|
||||
HTML += "<br><font color='0000AA'>External manipulation cooldown: [ext_cooldown/10] sec</font>"
|
||||
if(power_draw_idle)
|
||||
HTML += "<br><font color='0000AA'>Power Draw: [power_draw_idle] W (Idle)</font>"
|
||||
if(power_draw_per_use)
|
||||
@@ -301,11 +305,15 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
/obj/item/integrated_circuit/proc/check_then_do_work(ord,var/ignore_power = FALSE)
|
||||
if(world.time < next_use) // All intergrated circuits have an internal cooldown, to protect from spam.
|
||||
return FALSE
|
||||
if(assembly && ext_cooldown && (world.time < assembly.ext_next_use)) // Some circuits have external cooldown, to protect from spam.
|
||||
return FALSE
|
||||
if(power_draw_per_use && !ignore_power)
|
||||
if(!check_power())
|
||||
power_fail()
|
||||
return FALSE
|
||||
next_use = world.time + cooldown_per_use
|
||||
if(assembly)
|
||||
assembly.ext_next_use = world.time + ext_cooldown
|
||||
do_work(ord)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
/obj/item/device/integrated_circuit_printer/debug //translation: "integrated_circuit_printer/local_server"
|
||||
name = "debug circuit printer"
|
||||
debug = TRUE
|
||||
upgraded = TRUE
|
||||
can_clone = TRUE
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/device/integrated_circuit_printer/Initialize()
|
||||
@@ -56,7 +58,6 @@
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You install [O] into [src]. </span>")
|
||||
upgraded = TRUE
|
||||
qdel(O)
|
||||
interact(user)
|
||||
return TRUE
|
||||
|
||||
@@ -66,7 +67,6 @@
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You install [O] into [src]. Circuit cloning will now be instant. </span>")
|
||||
fast_clone = TRUE
|
||||
qdel(O)
|
||||
interact(user)
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user