use_power var now uses a define to reflect it not being a bool (#1842)
This commit is contained in:
committed by
kevinz000
parent
c32da6e2cb
commit
9d5e51777b
@@ -33,7 +33,7 @@
|
||||
var/yes_code = FALSE
|
||||
var/safety = TRUE
|
||||
var/obj/item/weapon/disk/nuclear/auth = null
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
var/previous_level = ""
|
||||
var/obj/item/nuke_core/core = null
|
||||
var/deconstruction_state = NUKESTATE_INTACT
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
level = 1 // underfloor
|
||||
layer = LOW_OBJ_LAYER
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 0
|
||||
var/obj/item/device/radio/beacon/Beacon
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/hack_wire
|
||||
var/disable_wire
|
||||
var/shock_wire
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
var/busy = 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/initialized_button = 0
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 90, acid = 70)
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
desc = "It's used to monitor rooms."
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "camera"
|
||||
use_power = 2
|
||||
use_power = ACTIVE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 10
|
||||
layer = WALL_OBJ_LAYER
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "ccharger0"
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 60
|
||||
power_channel = EQUIP
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "computer"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 300
|
||||
active_power_usage = 300
|
||||
obj_integrity = 200
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
|
||||
icon_screen = "crew"
|
||||
icon_keyboard = "med_key"
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 250
|
||||
active_power_usage = 500
|
||||
circuit = /obj/item/weapon/circuitboard/computer/crew
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/obj/item/weapon/disk/data/diskette = null
|
||||
var/list/delayed_action = null
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 400
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
density = 1
|
||||
var/locked = 0
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 50
|
||||
active_power_usage = 300
|
||||
occupant_typecache = list(/mob/living, /obj/item/bodypart/head, /obj/item/organ/brain)
|
||||
|
||||
@@ -108,4 +108,4 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
name = "integrated tachyon-doppler module"
|
||||
integrated = 1
|
||||
max_dist = 21 //Should detect most explosions in hearing range.
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/obj/machinery/doorButtons
|
||||
power_channel = ENVIRON
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
max_integrity = 250
|
||||
integrity_failure = 100
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100, fire = 90, acid = 30)
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 6
|
||||
power_channel = ENVIRON
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
req_access = list(GLOB.access_security) //reqaccess to access all stored items
|
||||
density = 0
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 100
|
||||
active_power_usage = 2500
|
||||
var/list/stored_items = list()
|
||||
|
||||
@@ -14,7 +14,7 @@ The console is located at computer/gulag_teleporter.dm
|
||||
state_open = 0
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 200
|
||||
active_power_usage = 5000
|
||||
var/locked = FALSE
|
||||
|
||||
@@ -35,7 +35,7 @@ Possible to do for anyone motivated enough:
|
||||
layer = LOW_OBJ_LAYER
|
||||
flags = HEAR
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
obj_integrity = 300
|
||||
@@ -327,7 +327,8 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
|
||||
/obj/machinery/holopad/proc/SetLightsAndPower()
|
||||
var/total_users = masters.len + LAZYLEN(holo_calls)
|
||||
use_power = HOLOPAD_PASSIVE_POWER_USAGE + HOLOGRAM_POWER_USAGE * total_users
|
||||
use_power = total_users > 0 ? ACTIVE_POWER_USE : IDLE_POWER_USE
|
||||
active_power_usage = HOLOPAD_PASSIVE_POWER_USAGE + (HOLOGRAM_POWER_USAGE * total_users)
|
||||
if(total_users)
|
||||
set_light(2)
|
||||
icon_state = "holopad1"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/id = null
|
||||
var/on = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
obj_integrity = 300
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
var/operating = 0
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
var/disabled = 0
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
|
||||
@@ -8,9 +8,9 @@ Class Variables:
|
||||
use_power (num)
|
||||
current state of auto power use.
|
||||
Possible Values:
|
||||
0 -- no auto power use
|
||||
1 -- machine is using power at its idle power level
|
||||
2 -- machine is using power at its active power level
|
||||
NO_POWER_USE -- no auto power use
|
||||
IDLE_POWER_USE -- machine is using power at its idle power level
|
||||
ACTIVE_POWER_USE -- machine is using power at its active power level
|
||||
|
||||
active_power_usage (num)
|
||||
Value for the amount of power to use when in active power mode
|
||||
@@ -104,7 +104,7 @@ Class Procs:
|
||||
|
||||
var/stat = 0
|
||||
var/emagged = 0
|
||||
var/use_power = 1
|
||||
var/use_power = IDLE_POWER_USE
|
||||
//0 = dont run the auto
|
||||
//1 = run auto, use idle
|
||||
//2 = run auto, use active
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
level = 1 // underfloor
|
||||
layer = LOW_OBJ_LAYER
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 50
|
||||
|
||||
var/freq = 1449 // radio frequency
|
||||
@@ -161,10 +161,10 @@
|
||||
|
||||
// Update power usage:
|
||||
if(on)
|
||||
use_power = 2
|
||||
use_power = ACTIVE_POWER_USE
|
||||
active_power_usage = electricity_level*15
|
||||
else
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
|
||||
|
||||
// Overload conditions:
|
||||
@@ -210,7 +210,7 @@
|
||||
icon_state = "airlock_control_standby"
|
||||
density = 0
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 45
|
||||
var/frequency = 1449
|
||||
var/code = 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "mass_driver"
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 50
|
||||
var/power = 1
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
layer = OBJ_LAYER
|
||||
invisibility = INVISIBILITY_OBSERVER //the turret is invisible if it's inside its cover
|
||||
density = 1
|
||||
use_power = 1 //this turret uses and requires power
|
||||
use_power = IDLE_POWER_USE //this turret uses and requires power
|
||||
idle_power_usage = 50 //when inactive, this turret takes up constant 50 Equipment power
|
||||
active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power
|
||||
req_access = list(GLOB.access_security)
|
||||
@@ -551,7 +551,7 @@
|
||||
/obj/machinery/porta_turret/syndicate
|
||||
installation = null
|
||||
always_up = 1
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
has_cover = 0
|
||||
scan_range = 9
|
||||
req_access = list(GLOB.access_syndicate)
|
||||
@@ -620,7 +620,7 @@
|
||||
obj_integrity = 260
|
||||
max_integrity = 260
|
||||
always_up = 1
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
has_cover = 0
|
||||
scan_range = 9
|
||||
stun_projectile = /obj/item/projectile/beam/laser
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "qpad-idle"
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 200
|
||||
active_power_usage = 5000
|
||||
unique_rename = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "recharger0"
|
||||
desc = "A charging dock for energy based weaponry."
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 4
|
||||
active_power_usage = 250
|
||||
var/obj/item/charging = null
|
||||
@@ -60,7 +60,7 @@
|
||||
return 1
|
||||
G.loc = src
|
||||
charging = G
|
||||
use_power = 2
|
||||
use_power = ACTIVE_POWER_USE
|
||||
update_icon(scan = TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] isn't connected to anything!</span>")
|
||||
@@ -88,7 +88,7 @@
|
||||
charging.loc = loc
|
||||
user.put_in_hands(charging)
|
||||
charging = null
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharger/attack_paw(mob/user)
|
||||
@@ -99,7 +99,7 @@
|
||||
charging.update_icon()
|
||||
charging.loc = loc
|
||||
charging = null
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharger/process()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "borgcharger0"
|
||||
density = 0
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 1000
|
||||
req_access = list(GLOB.access_robotics)
|
||||
@@ -95,14 +95,14 @@
|
||||
|
||||
/obj/machinery/recharge_station/open_machine()
|
||||
..()
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
|
||||
/obj/machinery/recharge_station/close_machine()
|
||||
if(!panel_open)
|
||||
for(var/mob/living/silicon/robot/R in loc)
|
||||
R.forceMove(src)
|
||||
occupant = R
|
||||
use_power = 2
|
||||
use_power = ACTIVE_POWER_USE
|
||||
add_fingerprint(R)
|
||||
break
|
||||
state_open = 0
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/metal_amount = 0
|
||||
var/operating = 0
|
||||
var/obj/item/being_built = null
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
|
||||
@@ -128,7 +128,7 @@ Please wait until completion...</TT><BR>
|
||||
if (!isnull(building))
|
||||
if (src.metal_amount >= build_cost)
|
||||
src.operating = 1
|
||||
src.use_power = 2
|
||||
src.use_power = ACTIVE_POWER_USE
|
||||
|
||||
src.metal_amount = max(0, src.metal_amount - build_cost)
|
||||
|
||||
@@ -141,7 +141,7 @@ Please wait until completion...</TT><BR>
|
||||
if (!isnull(src.being_built))
|
||||
src.being_built.loc = get_turf(src)
|
||||
src.being_built = null
|
||||
src.use_power = 1
|
||||
src.use_power = IDLE_POWER_USE
|
||||
src.operating = 0
|
||||
cut_overlay("fab-active")
|
||||
return
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
density = 1
|
||||
req_access = list(GLOB.access_teleporter)
|
||||
flags = CONDUCT
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
obj_integrity = 300
|
||||
max_integrity = 300
|
||||
var/active = FALSE
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
icon_state = "slots1"
|
||||
anchored = 1
|
||||
density = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 50
|
||||
circuit = /obj/item/weapon/circuitboard/computer/slot_machine
|
||||
var/money = 3000 //How much money it has CONSUMED
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
name = "status display"
|
||||
anchored = 1
|
||||
density = 0
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
var/mode = 1 // 0 = Blank
|
||||
// 1 = Emergency Shuttle timer
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
desc = "A compact machine used for portable subspace telecommuniations processing."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
idle_power_usage = 0
|
||||
machinetype = 6
|
||||
var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
|
||||
|
||||
@@ -14,7 +14,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
|
||||
desc = "A dish-shaped machine used to broadcast processed subspace signals."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 25
|
||||
machinetype = 5
|
||||
/*heatgen = 0
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
desc = "A mighty piece of hardware used to send massive amounts of data quickly."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 50
|
||||
machinetype = 2
|
||||
//heatgen = 20
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
desc = "A mighty piece of hardware used to send/receive massive amounts of data."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 80
|
||||
machinetype = 7
|
||||
//heatgen = 40
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
desc = "This machine is used to process large quantities of information."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 30
|
||||
machinetype = 3
|
||||
//heatgen = 100
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
desc = "This machine has a dish-like shape and green lights. It is designed to detect and process subspace radio activity."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 30
|
||||
machinetype = 1
|
||||
//heatgen = 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
desc = "A mighty piece of hardware used to send massive amounts of data far away."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 30
|
||||
machinetype = 8
|
||||
//heatgen = 0
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
desc = "A machine used to store data and network statistics."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 15
|
||||
machinetype = 4
|
||||
//heatgen = 50
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
desc = "It's the hub of a teleporting machine."
|
||||
icon_state = "tele0"
|
||||
var/accurate = 0
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 2000
|
||||
var/obj/machinery/teleport/station/power_station
|
||||
@@ -338,7 +338,7 @@
|
||||
desc = "The power control station for a bluespace teleporter. Used for toggling power, and can activate a test-fire to prevent malfunctions."
|
||||
icon_state = "controller"
|
||||
var/engaged = 0
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 2000
|
||||
var/obj/machinery/computer/teleporter/teleporter_console
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "syndbeacon"
|
||||
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
desc = "Nothing is being built."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
req_access = list(GLOB.access_robotics)
|
||||
@@ -156,10 +156,10 @@
|
||||
|
||||
materials.use_amount(res_coef)
|
||||
add_overlay("fab-active")
|
||||
use_power = 2
|
||||
use_power = ACTIVE_POWER_USE
|
||||
updateUsrDialog()
|
||||
sleep(get_construction_time_w_coeff(D))
|
||||
use_power = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
cut_overlay("fab-active")
|
||||
desc = initial(desc)
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
icon_state = "shower"
|
||||
density = 0
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
use_power = NO_POWER_USE
|
||||
var/on = 0
|
||||
var/obj/effect/mist/mymist = null
|
||||
var/ismist = 0 //needs a var so we can make it linger~
|
||||
|
||||
Reference in New Issue
Block a user