From bdf50ea89400a5d080df567b99025b399eaeee5a Mon Sep 17 00:00:00 2001 From: KalevTait <107985691+KalevTait@users.noreply.github.com> Date: Tue, 5 Jul 2022 14:38:47 +0100 Subject: [PATCH] Code Readability - Machinery (#18153) * machinery * comment change as per suggestion Co-authored-by: moxian * added always_gib var to recycler as per recomendation Co-authored-by: moxian --- code/game/machinery/Beacon.dm | 4 +-- code/game/machinery/OpTable.dm | 4 +-- code/game/machinery/PDApainter.dm | 4 +-- code/game/machinery/Sleeper.dm | 4 +-- code/game/machinery/autolathe.dm | 10 +++--- code/game/machinery/buttons.dm | 18 +++++------ code/game/machinery/camera/camera.dm | 6 ++-- code/game/machinery/camera/tracking.dm | 10 +++--- code/game/machinery/cell_charger.dm | 2 +- code/game/machinery/cloning.dm | 2 +- code/game/machinery/constructable_frame.dm | 4 +-- code/game/machinery/cryopod.dm | 12 +++---- code/game/machinery/doppler_array.dm | 4 +-- .../embedded_controller_base.dm | 6 ++-- code/game/machinery/firealarm.dm | 8 ++--- code/game/machinery/flasher.dm | 16 +++++----- code/game/machinery/floodlight.dm | 2 +- code/game/machinery/gameboard.dm | 4 +-- code/game/machinery/guestpass.dm | 2 +- code/game/machinery/hologram.dm | 10 +++--- code/game/machinery/holosign.dm | 10 +++--- code/game/machinery/igniter.dm | 4 +-- code/game/machinery/lightswitch.dm | 8 ++--- code/game/machinery/machinery.dm | 8 ++--- code/game/machinery/magnet.dm | 16 +++++----- code/game/machinery/mass_driver.dm | 20 ++++++------ code/game/machinery/navbeacon.dm | 6 ++-- code/game/machinery/overview.dm | 12 +++---- code/game/machinery/pipe/construction.dm | 6 ++-- code/game/machinery/poolcontroller.dm | 4 +-- code/game/machinery/quantum_pad.dm | 14 ++++---- code/game/machinery/rechargestation.dm | 4 +-- code/game/machinery/recycler.dm | 21 ++++++------ code/game/machinery/shieldgen.dm | 32 +++++++++---------- code/game/machinery/slotmachine.dm | 6 ++-- code/game/machinery/spaceheater.dm | 10 +++--- code/game/machinery/status_display.dm | 20 ++++++------ code/game/machinery/supply_display.dm | 2 +- code/game/machinery/syndicatebeacon.dm | 18 +++++------ code/game/machinery/syndicatebomb.dm | 4 +-- code/game/machinery/transformer.dm | 4 +-- code/game/machinery/vending.dm | 2 +- code/game/machinery/washing_machine.dm | 14 ++++---- 43 files changed, 188 insertions(+), 189 deletions(-) diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index 6833c49a63c..b3516470bdc 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -6,10 +6,10 @@ level = 1 // underfloor layer = WIRE_LAYER plane = FLOOR_PLANE - anchored = 1 + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 0 - var/syndicate = 0 + var/syndicate = FALSE var/area_bypass = FALSE var/obj/item/radio/beacon/Beacon var/enabled = TRUE diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 6ab6aeef60d..16c001bce66 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -3,8 +3,8 @@ desc = "Used for advanced medical procedures." icon = 'icons/obj/surgery.dmi' icon_state = "table2-idle" - density = 1 - anchored = 1.0 + density = TRUE + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 1 active_power_usage = 5 diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index f879a7fe372..1eca027330f 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -3,8 +3,8 @@ desc = "A PDA painting machine. To use, simply insert your PDA and choose the desired preset paint scheme." icon = 'icons/obj/pda.dmi' icon_state = "pdapainter" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE max_integrity = 200 var/obj/item/pda/storedpda = null var/list/colorlist = list() diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 9a13820528e..9d2f894634d 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -9,8 +9,8 @@ icon = 'icons/obj/cryogenic2.dmi' icon_state = "sleeper-open" var/base_icon = "sleeper" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE dir = WEST var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r" var/mob/living/carbon/human/occupant = null diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 5028f082b4a..f7654b71c3c 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -6,18 +6,18 @@ name = "autolathe" desc = "It produces items using metal and glass." icon_state = "autolathe" - density = 1 + density = TRUE var/operating = 0.0 var/list/queue = list() var/queue_max_len = 12 var/turf/BuildTurf - anchored = 1.0 + anchored = TRUE var/list/L = list() var/list/LL = list() - var/hacked = 0 - var/disabled = 0 - var/shocked = 0 + var/hacked = FALSE + var/disabled = FALSE + var/shocked = FALSE var/hack_wire var/disable_wire var/shock_wire diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 0e14964527c..318c0757e0e 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -9,9 +9,9 @@ icon_state = "launcherbtt" desc = "A remote control switch for a mass driver." var/id_tag = "default" - var/active = 0 + var/active = FALSE settagwhitelist = list("id_tag", "logic_id_tag") - anchored = 1.0 + anchored = TRUE armor = list(melee = 50, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 90, acid = 70) use_power = IDLE_POWER_USE idle_power_usage = 2 @@ -19,7 +19,7 @@ resistance_flags = LAVA_PROOF | FIRE_PROOF var/range = 7 var/logic_id_tag = "default" //Defines the ID tag to send logic signals to, so you don't have to unlink from doors and stuff - var/logic_connect = 0 //Set this to allow the button to send out logic signals when pressed in addition to normal stuff + var/logic_connect = FALSE //Set this to allow the button to send out logic signals when pressed in addition to normal stuff /obj/machinery/button/indestructible resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF @@ -103,7 +103,7 @@ launch_sequence() /obj/machinery/driver_button/proc/launch_sequence() - active = 1 + active = TRUE icon_state = "launcheract" if(logic_connect) @@ -145,7 +145,7 @@ return icon_state = "launcherbtt" - active = 0 + active = FALSE /obj/machinery/driver_button/multitool_topic(mob/user, list/href_list, obj/O) ..() @@ -162,8 +162,8 @@ icon_state = "launcherbtt" desc = "A remote control switch for a mounted igniter." var/id = null - var/active = 0 - anchored = 1.0 + var/active = FALSE + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 2 active_power_usage = 4 @@ -183,7 +183,7 @@ use_power(5) - active = 1 + active = TRUE icon_state = "launcheract" for(var/obj/machinery/sparker/M in GLOB.machines) @@ -200,4 +200,4 @@ sleep(50) icon_state = "launcherbtt" - active = 0 + active = FALSE diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index e9fc6de202f..dbf19e21626 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -16,7 +16,7 @@ var/list/network = list("SS13") var/c_tag = null var/c_tag_order = 999 - var/status = 1 + var/status = TRUE anchored = TRUE var/start_active = FALSE //If it ignores the random chance to start broken on round start var/invuln = null @@ -40,7 +40,7 @@ wires = new(src) assembly = new(src) assembly.state = 4 - assembly.anchored = 1 + assembly.anchored = TRUE assembly.update_icon() GLOB.cameranet.cameras += src @@ -386,7 +386,7 @@ /obj/machinery/camera/portable/Initialize(mapload) . = ..() assembly.state = 0 //These cameras are portable, and so shall be in the portable state if removed. - assembly.anchored = 0 + assembly.anchored = FALSE assembly.update_icon() /obj/machinery/camera/portable/process() //Updates whenever the camera is moved. diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index b67357fead3..260973d20b6 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -173,12 +173,12 @@ var/mob/living/silicon/ai/U = usr U.cameraFollow = target - U.tracking = 1 + U.tracking = TRUE to_chat(U, "Attempting to track [target.get_visible_name()]...") sleep(min(30, get_dist(target, U.eyeobj) / 4)) spawn(15) //give the AI a grace period to stop moving. - U.tracking = 0 + U.tracking = FALSE if(!target || !target.can_track(usr)) to_chat(U, "Target is not near any active cameras.") @@ -194,14 +194,14 @@ return if(!target.can_track(usr)) - U.tracking = 1 + U.tracking = TRUE if(!cameraticks) to_chat(U, "Target is not near any active cameras. Attempting to reacquire...") cameraticks++ if(cameraticks > 9) U.cameraFollow = null to_chat(U, "Unable to reacquire, cancelling track...") - U.tracking = 0 + U.tracking = FALSE return else sleep(10) @@ -209,7 +209,7 @@ else cameraticks = 0 - U.tracking = 0 + U.tracking = FALSE if(U.eyeobj) U.eyeobj.setLoc(get_turf(target)) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 675d18ebb32..6e8c7f4e094 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -3,7 +3,7 @@ desc = "It charges power cells." icon = 'icons/obj/power.dmi' icon_state = "ccharger0" - anchored = 1 + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 5 active_power_usage = 60 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index d62a6c9eb26..deb4f9f24b7 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -68,7 +68,7 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\ countdown = new(src) Radio = new /obj/item/radio(src) - Radio.listening = 0 + Radio.listening = FALSE Radio.config(list("Medical" = 0)) component_parts = list() diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 3771f2a0665..1bcd87b81e6 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -2,8 +2,8 @@ name = "machine frame" icon = 'icons/obj/stock_parts.dmi' icon_state = "box_0" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE use_power = NO_POWER_USE max_integrity = 250 var/obj/item/circuitboard/circuit = null diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 0cc913f677e..af54c6c29bb 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -19,8 +19,8 @@ icon = 'icons/obj/cryogenic2.dmi' icon_state = "cellconsole" circuit = /obj/item/circuitboard/cryopodcontrol - density = 0 - interact_offline = 1 + density = FALSE + interact_offline = TRUE req_one_access = list(ACCESS_HEADS, ACCESS_ARMORY) //Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with. resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags = NODECONSTRUCT @@ -39,7 +39,7 @@ var/storage_type = "crewmembers" var/storage_name = "Cryogenic Oversight Control" - var/allow_items = 1 + var/allow_items = TRUE /obj/machinery/computer/cryopod/Initialize(mapload) @@ -185,8 +185,8 @@ desc = "A man-sized pod for entering suspended animation." icon = 'icons/obj/cryogenic2.dmi' icon_state = "bodyscanner-open" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags = NODECONSTRUCT dir = WEST @@ -687,7 +687,7 @@ storage_type = "cyborgs" storage_name = "Robotic Storage Control" - allow_items = 0 + allow_items = FALSE /obj/machinery/cryopod/robot name = "robotic storage unit" diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index d27ad7d86df..8147095aef0 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -5,8 +5,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays) desc = "A highly precise directional sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array." icon = 'icons/obj/machines/research.dmi' icon_state = "tdoppler" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE atom_say_verb = "states coldly" var/list/logged_explosions = list() var/explosion_target diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 2a049958488..8e12c17bf7e 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -2,12 +2,12 @@ var/datum/computer/file/embedded_program/program //the currently executing program name = "Embedded Controller" - anchored = 1 + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 10 - var/on = 1 + var/on = TRUE /obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line) return 0 @@ -41,7 +41,7 @@ icon = 'icons/obj/airlock_machines.dmi' icon_state = "airlock_control_standby" power_channel = ENVIRON - density = 0 + density = FALSE var/id_tag //var/radio_power_use = 50 //power used to xmit signals diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 3769521130a..40b17ff6bb3 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -11,12 +11,12 @@ FIRE ALARM desc = "\"Pull this in case of emergency\". Thus, keep pulling it forever." icon = 'icons/obj/monitors.dmi' icon_state = "firealarm_on" - var/detecting = 1.0 - var/working = 1.0 + var/detecting = TRUE + var/working = TRUE var/time = 10.0 var/timing = 0.0 var/lockdownbyai = 0 - anchored = 1.0 + anchored = TRUE 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) @@ -30,7 +30,7 @@ FIRE ALARM light_range = 7 light_color = "#ff3232" - var/wiresexposed = 0 + var/wiresexposed = FALSE var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone var/report_fire_alarms = TRUE // Should triggered fire alarms also trigger an actual alarm? diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 0ea1d295bbf..077fe0b48ff 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -10,20 +10,20 @@ damage_deflection = 10 var/id = null var/range = 2 //this is roughly the size of brig cell - var/disable = 0 + var/disable = FALSE var/last_flash = 0 //Don't want it getting spammed like regular flashes var/strength = 10 SECONDS //How weakened targets are when flashed. var/base_state = "mflash" - anchored = 1 + anchored = TRUE /obj/machinery/flasher/portable //Portable version of the flasher. Only flashes when anchored name = "portable flasher" desc = "A portable flashing device. Wrench to activate and deactivate. Cannot detect slow movements." icon_state = "pflash1" strength = 4 - anchored = 0 + anchored = FALSE base_state = "pflash" - density = 1 + density = TRUE /obj/machinery/flasher/portable/ComponentInitialize() . = ..() @@ -114,8 +114,8 @@ icon = 'icons/obj/objects.dmi' icon_state = "launcherbtt" var/id = null - var/active = 0 - anchored = 1.0 + var/active = FALSE + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 2 active_power_usage = 4 @@ -135,7 +135,7 @@ use_power(5) - active = 1 + active = TRUE icon_state = "launcheract" for(var/obj/machinery/flasher/M in GLOB.machines) @@ -146,4 +146,4 @@ sleep(50) icon_state = "launcherbtt" - active = 0 + active = FALSE diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index b4babfbabfd..8c4df9e9efa 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -144,6 +144,6 @@ return ..() /obj/machinery/floodlight/extinguish_light() - on = 0 + on = FALSE set_light(0) update_icon() diff --git a/code/game/machinery/gameboard.dm b/code/game/machinery/gameboard.dm index 427bc033c4f..e631d30dcb6 100644 --- a/code/game/machinery/gameboard.dm +++ b/code/game/machinery/gameboard.dm @@ -3,8 +3,8 @@ icon = 'icons/obj/stationobjs.dmi' icon_state = "gboard_on" desc = "A holographic table allowing the crew to have fun(TM) on boring shifts! One player per board." - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE use_power = IDLE_POWER_USE var/cooling_down = 0 light_color = LIGHT_COLOR_LIGHTBLUE diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 2292b20728a..87413aa5ce6 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -36,7 +36,7 @@ icon_state = "guest" icon_screen = "pass" icon_keyboard = null - density = 0 + density = FALSE var/obj/item/card/id/scan diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 702d583c33d..ec2fdbfcf88 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -39,7 +39,7 @@ GLOBAL_LIST_EMPTY(holopads) name = "holopad" desc = "It's a floor-mounted device for projecting holographic images." icon_state = "holopad0" - anchored = 1 + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 5 active_power_usage = 100 @@ -363,10 +363,10 @@ GLOBAL_LIST_EMPTY(holopads) hologram.alpha = 100 hologram.Impersonation = user - hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it. - hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them. - hologram.anchored = 1//So space wind cannot drag it. - hologram.name = "[user.name] (hologram)"//If someone decides to right click. + hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT //So you can't click on it. + hologram.layer = FLY_LAYER //Above all the other objects/mobs. Or the vast majority of them. + hologram.anchored = TRUE //So space wind cannot drag it. + hologram.name = "[user.name] (hologram)" //If someone decides to right click. hologram.set_light(2) //hologram lighting move_hologram() diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index aa541ec8619..ca62fab70ad 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -5,8 +5,8 @@ icon = 'icons/obj/holosign.dmi' icon_state = "sign_off" layer = 4 - anchored = 1 - var/lit = 0 + anchored = TRUE + var/lit = FALSE var/id = null var/on_icon = "sign_on" @@ -24,7 +24,7 @@ /obj/machinery/holosign/power_change() if(stat & NOPOWER) - lit = 0 + lit = FALSE update_icon() /obj/machinery/holosign/surgery @@ -39,8 +39,8 @@ icon_state = "light0" desc = "A remote control switch for holosign." var/id = null - var/active = 0 - anchored = 1.0 + var/active = FALSE + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 2 active_power_usage = 4 diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 693148c44ce..41eeffffc18 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -60,10 +60,10 @@ var/disable = FALSE var/last_spark = FALSE var/base_state = "migniter" - anchored = 1 + anchored = TRUE /obj/machinery/sparker/power_change() - if( powered() && disable == 0 ) + if(powered() && !disable) stat &= ~NOPOWER icon_state = "[base_state]" // src.sd_set_light(2) diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 22751575b04..68304cdedec 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -6,15 +6,15 @@ desc = "It turns lights on and off. What are you, simple?" icon = 'icons/obj/power.dmi' icon_state = "light1" - anchored = 1.0 - var/on = 1 + anchored = TRUE + var/on = TRUE var/area/area = null var/otherarea = null // luminosity = 1 settagwhitelist = list("logic_id_tag") - var/light_connect = 1 //Allows the switch to control lights in its associated areas. When set to 0, using the switch won't affect the lights. + var/light_connect = TRUE //Allows the switch to control lights in its associated areas. When set to FALSE, using the switch won't affect the lights. var/logic_id_tag = "default" //Defines the ID tag to send logic signals to. - var/logic_connect = 0 //Set this to allow the switch to send out logic signals. + var/logic_connect = FALSE //Set this to allow the switch to send out logic signals. /obj/machinery/light_switch/New(turf/loc, w_dir=null) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 0e858affad3..bc9fb4653a2 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -112,9 +112,9 @@ Class Procs: var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames. var/uid var/global/gl_uid = 1 - var/panel_open = 0 + var/panel_open = FALSE var/area/myArea - var/interact_offline = 0 // Can the machine be interacted with while de-powered. + var/interact_offline = FALSE // Can the machine be interacted with while de-powered. var/list/settagwhitelist // (Init this list if needed) WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST. atom_say_verb = "beeps" var/siemens_strength = 0.7 // how badly will it shock you? @@ -446,11 +446,11 @@ Class Procs: return FALSE if(!(flags & NODECONSTRUCT)) if(!panel_open) - panel_open = 1 + panel_open = TRUE icon_state = icon_state_open to_chat(user, "You open the maintenance hatch of [src].") else - panel_open = 0 + panel_open = FALSE icon_state = icon_state_closed to_chat(user, "You close the maintenance hatch of [src].") I.play_tool_sound(user, I.tool_volume) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 9e2826a9bb9..15636bb9383 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -12,7 +12,7 @@ desc = "A device that uses station power to create points of magnetic energy." level = 1 // underfloor layer = WIRE_LAYER+0.001 - anchored = 1 + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 50 @@ -21,8 +21,8 @@ var/magnetic_field = 1 // the range of magnetic attraction var/code = 0 // frequency code, they should be different unless you have a group of magnets working together or something var/turf/center // the center of magnetic attraction - var/on = 0 - var/magpulling = 0 + var/on = FALSE + var/magpulling = FALSE // x, y modifiers to the center turf; (0, 0) is centered on the magnet, whereas (1, -1) is one tile right, one tile down var/center_x = 0 @@ -124,7 +124,7 @@ /obj/machinery/magnetic_module/process() if(stat & NOPOWER) - on = 0 + on = FALSE // Sanity checks: if(electricity_level <= 0) @@ -156,7 +156,7 @@ if(magpulling) return while(on) - magpulling = 1 + magpulling = TRUE center = locate(x+center_x, y+center_y, z) if(center) for(var/obj/M in orange(magnetic_field, center)) @@ -170,14 +170,14 @@ use_power(electricity_level * 5) sleep(13 - electricity_level) - magpulling = 0 + magpulling = FALSE /obj/machinery/magnetic_controller name = "Magnetic Control Console" icon = 'icons/obj/airlock_machines.dmi' // uses an airlock machine icon, THINK GREEN HELP THE ENVIRONMENT - RECYCLING! icon_state = "airlock_control_standby" - density = 1 - anchored = 1.0 + density = TRUE + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 45 frequency = AIRLOCK_FREQ diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index ab4ecb6ce1b..087701d5ed1 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -3,7 +3,7 @@ desc = "Shoots things into space." icon = 'icons/obj/objects.dmi' icon_state = "mass_driver" - anchored = 1.0 + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 2 active_power_usage = 50 @@ -26,7 +26,7 @@ if(do_after(user, 30 * W.toolspeed, target = src)) var/obj/machinery/mass_driver_frame/F = new(get_turf(src)) F.dir = src.dir - F.anchored = 1 + F.anchored = TRUE F.build = 4 F.update_icon() qdel(src) @@ -68,7 +68,7 @@ /obj/machinery/mass_driver/emag_act(mob/user) if(!emagged) - emagged = 1 + emagged = TRUE to_chat(user, "You hack the Mass Driver, radically increasing the force at which it'll throw things. Better not stand in its way.") return 1 return -1 @@ -78,13 +78,13 @@ /obj/machinery/mass_driver/bumper name = "mass bumper" desc = "Now you're here, now you're over there." - density = 1 + density = TRUE /obj/machinery/mass_driver/bumper/Bumped(M as mob|obj) - density = 0 + density = FALSE step(M, get_dir(M,src)) spawn(1) - density = 1 + density = TRUE drive() return @@ -94,8 +94,8 @@ name = "mass driver frame" icon = 'icons/obj/objects.dmi' icon_state = "mass_driver_frame" - density = 0 - anchored = 0 + density = FALSE + anchored = FALSE var/build = 0 /obj/machinery/mass_driver_frame/attackby(obj/item/W as obj, mob/user as mob) @@ -106,7 +106,7 @@ playsound(get_turf(src), W.usesound, 50, 1) if(do_after(user, 10 * W.toolspeed, target = src) && (build == 0)) to_chat(user, "You anchor \the [src]!") - anchored = 1 + anchored = TRUE build++ return 1 return @@ -116,7 +116,7 @@ playsound(get_turf(src), W.usesound, 50, 1) if(do_after(user, 10 * W.toolspeed, target = src) && (build == 1)) build-- - anchored = 0 + anchored = FALSE to_chat(user, "You de-anchored \the [src]!") return 1 if(2) // Welded to the floor diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 11854cb9bbf..7cfa60344e3 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -10,11 +10,11 @@ level = 1 // underfloor layer = WIRE_LAYER plane = FLOOR_PLANE - anchored = 1 + anchored = TRUE max_integrity = 500 armor = list(melee = 70, bullet = 70, laser = 70, energy = 70, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80) - var/open = 0 // true if cover is open - var/locked = 1 // true if controls are locked + var/open = FALSE // true if cover is open + var/locked = TRUE // true if controls are locked var/location = "" // location response text var/list/codes // assoc. list of transponder codes var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value" diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm index a3254458337..b8805c93792 100644 --- a/code/game/machinery/overview.dm +++ b/code/game/machinery/overview.dm @@ -48,17 +48,17 @@ colour = rgb(0,0,0) else - var/sense = 1 + var/sense = TRUE switch("[T.type]") if("/turf/space") colour = rgb(10,10,10) - sense = 0 + sense = FALSE if("/turf/simulated/floor") colour = rgb(150,150,150) var/turf/simulated/floor/TF = T - if(TF.burnt == 1) - sense = 0 + if(TF.burnt) + sense = FALSE colour = rgb(130,130,130) if("/turf/simulated/floor/engine") @@ -197,11 +197,11 @@ colour = rgb(0,0,0) else - var/sense = 1 + var/sense = TRUE switch("[T.type]") if("/turf/space") colour = rgb(10,10,10) - sense = 0 + sense = FALSE if("/turf/simulated/floor", "/turf/simulated/floor/engine") var/datum/gas_mixture/environment = T.return_air() diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 98eaf1ceb2e..f8e94480465 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -13,7 +13,7 @@ item_state = "buildpipe" w_class = WEIGHT_CLASS_NORMAL level = 2 - var/flipped = 0 + var/flipped = FALSE /obj/item/pipe/New(loc, pipe_type, dir, obj/machinery/atmospherics/make_from) ..() @@ -114,11 +114,11 @@ var/obj/machinery/atmospherics/trinary/triP = make_from if(istype(triP) && triP.flipped) - src.flipped = 1 + src.flipped = TRUE var/obj/machinery/atmospherics/binary/circulator/circP = make_from if(istype(circP) && circP.side == CIRC_RIGHT) - src.flipped = 1 + src.flipped = TRUE else src.pipe_type = pipe_type diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index 044acd8ce5d..71e4ff8cacf 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -9,7 +9,7 @@ desc = "A controller for the nearby pool." icon = 'icons/obj/airlock_machines.dmi' icon_state = "airlock_control_standby" - anchored = 1 //this is what I get for assuming /obj/machinery has anchored set to 1 by default + anchored = TRUE //this is what I get for assuming /obj/machinery has anchored set to 1 by default var/list/linkedturfs = list() //List contains all of the linked pool turfs to this controller, assignment happens on New() var/mobinpool = list() //List contains all of the mob in the pool, to prevent looping through the entire area to find mobs inside.. var/decalinpool = list() // List containing all of the cleanable decals in pool @@ -54,7 +54,7 @@ if(!emagged) //If it is not already emagged, emag it. to_chat(user, "You disable \the [src]'s temperature safeguards.")//Inform the mob of what emagging does. - emagged = 1 //Set the emag var to true. + emagged = TRUE //Set the emag var to true. /obj/machinery/poolcontroller/multitool_act(mob/user, obj/item/I) . = TRUE diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index 9c248c7de2b..47f6746904c 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -3,14 +3,14 @@ desc = "A bluespace quantum-linked telepad used for teleporting objects to other quantum pads." icon = 'icons/obj/telescience.dmi' icon_state = "qpad-idle" - anchored = 1 + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 200 active_power_usage = 5000 var/teleport_cooldown = 400 //30 seconds base due to base parts var/teleport_speed = 50 var/last_teleport //to handle the cooldown - var/teleporting = 0 //if it's in the process of teleporting + var/teleporting = FALSE //if it's in the process of teleporting var/power_efficiency = 1 var/obj/machinery/quantumpad/linked_pad = null @@ -108,22 +108,22 @@ /obj/machinery/quantumpad/proc/doteleport(mob/user) if(linked_pad) playsound(get_turf(src), 'sound/weapons/flash.ogg', 25, 1) - teleporting = 1 + teleporting = TRUE spawn(teleport_speed) if(!src || QDELETED(src)) - teleporting = 0 + teleporting = FALSE return if(stat & NOPOWER) to_chat(user, "[src] is unpowered!") - teleporting = 0 + teleporting = FALSE return if(!linked_pad || QDELETED(linked_pad) || linked_pad.stat & NOPOWER) to_chat(user, "Linked pad is not responding to ping. Teleport aborted.") - teleporting = 0 + teleporting = FALSE return - teleporting = 0 + teleporting = FALSE last_teleport = world.time // use a lot of power diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 9cba4cf0676..5caf5558b55 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -2,8 +2,8 @@ name = "cyborg recharging station" icon = 'icons/obj/objects.dmi' icon_state = "borgcharger0" - density = 1 - anchored = 1.0 + density = TRUE + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 5 active_power_usage = 1000 diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 5dff319a796..212ae457c99 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -6,17 +6,19 @@ icon = 'icons/obj/recycling.dmi' icon_state = "grinder-o0" layer = MOB_LAYER+1 // Overhead - anchored = 1 - density = 1 + anchored = TRUE + density = TRUE damage_deflection = 15 var/emergency_mode = FALSE // Temporarily stops machine if it detects a mob var/icon_name = "grinder-o" - var/blood = 0 + var/blood = FALSE var/eat_dir = WEST var/amount_produced = 1 var/crush_damage = 1000 - var/eat_victim_items = 1 + var/eat_victim_items = TRUE var/item_recycle_sound = 'sound/machines/recycler.ogg' + /// For admin fun, var edit always_gib to TRUE (1) + var/always_gib = FALSE /obj/machinery/recycler/Initialize(mapload) . = ..() @@ -75,7 +77,7 @@ /obj/machinery/recycler/emag_act(mob/user) if(!emagged) - emagged = 1 + emagged = TRUE if(emergency_mode) emergency_mode = FALSE update_icon() @@ -176,7 +178,7 @@ add_mob_blood(L) if(!blood && !issilicon(L)) - blood = 1 + blood = TRUE update_icon() // Remove and recycle the equipped items @@ -188,10 +190,9 @@ // Instantly lie down, also go unconscious from the pain, before you die. L.Paralyse(10 SECONDS) - // For admin fun, var edit emagged to 2. - if(gib || emagged == 2) + if(gib || always_gib) L.gib() - else if(emagged == 1) + else if(emagged) L.adjustBruteLoss(crush_damage) @@ -230,7 +231,7 @@ /obj/machinery/recycler/deathtrap name = "dangerous old crusher" - emagged = 1 + emagged = TRUE crush_damage = 120 diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index a018763276c..f4280632970 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -3,9 +3,9 @@ desc = "An energy shield used to contain hull breaches." icon = 'icons/effects/effects.dmi' icon_state = "shield-old" - density = 1 + density = TRUE opacity = FALSE - anchored = 1 + anchored = TRUE move_resist = INFINITY resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags_2 = RAD_NO_CONTAMINATE_2 @@ -18,7 +18,7 @@ /obj/machinery/shield/Destroy() opacity = FALSE - density = 0 + density = FALSE air_update_turf(1) return ..() @@ -128,14 +128,14 @@ desc = "Used to seal minor hull breaches." icon = 'icons/obj/objects.dmi' icon_state = "shieldoff" - density = 1 + density = TRUE opacity = FALSE - anchored = 0 + anchored = FALSE pressure_resistance = 2*ONE_ATMOSPHERE req_access = list(ACCESS_ENGINE) var/const/max_health = 100 var/health = max_health - var/active = 0 + var/active = FALSE var/malfunction = FALSE //Malfunction causes parts of the shield to slowly dissapate var/list/deployed_shields = list() var/is_open = FALSE //Whether or not the wires are exposed @@ -151,9 +151,9 @@ if(active) return //If it's already turned on, how did this get called? - active = 1 + active = TRUE update_icon() - anchored = 1 + anchored = TRUE for(var/turf/target_tile in range(2, src)) if(istype(target_tile,/turf/space) && !(locate(/obj/machinery/shield) in target_tile)) @@ -169,7 +169,7 @@ if(!active) return //If it's already off, how did this get called? - active = 0 + active = FALSE update_icon() QDEL_LIST(deployed_shields) @@ -308,8 +308,8 @@ desc = "A shield generator." icon = 'icons/obj/stationobjs.dmi' icon_state = "Shield_Gen" - anchored = 0 - density = 1 + anchored = FALSE + density = TRUE req_access = list(ACCESS_TELEPORTER) var/active = 0 var/power = 0 @@ -469,14 +469,14 @@ state = 1 playsound(loc, I.usesound, 75, 1) to_chat(user, "You secure the external reinforcing bolts to the floor.") - anchored = 1 + anchored = TRUE return else if(state == 1) state = 0 playsound(loc, I.usesound, 75, 1) to_chat(user, "You undo the external reinforcing bolts.") - anchored = 0 + anchored = FALSE return if(istype(I, /obj/item/card/id)||istype(I, /obj/item/pda)) @@ -528,13 +528,13 @@ desc = "An energy shield." icon = 'icons/effects/effects.dmi' icon_state = "shieldwall" - anchored = 1 - density = 1 + anchored = TRUE + density = TRUE move_resist = INFINITY resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF light_range = 3 var/needs_power = 0 - var/active = 1 + var/active = TRUE var/delay = 5 var/last_active var/mob/U diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 677fe5e7c25..15981a57ea2 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -3,10 +3,10 @@ desc = "Gambling for the antisocial." icon = 'icons/obj/economy.dmi' icon_state = "slots-off" - anchored = 1 - density = 1 + anchored = TRUE + density = TRUE var/plays = 0 - var/working = 0 + var/working = FALSE var/datum/money_account/account = null var/result = null var/resultlvl = null diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 8a6f5344e92..bf53a9685b2 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -1,6 +1,6 @@ /obj/machinery/space_heater - anchored = 0 - density = 1 + anchored = FALSE + density = TRUE icon = 'icons/obj/atmos.dmi' icon_state = "sheater0" name = "space heater" @@ -8,8 +8,8 @@ max_integrity = 250 armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, RAD = 100, FIRE = 80, ACID = 10) var/obj/item/stock_parts/cell/cell - var/on = 0 - var/open = 0 + var/on = FALSE + var/open = FALSE var/set_temperature = 50 // in celcius, add T0C for kelvin var/heating_power = 40000 @@ -184,5 +184,5 @@ env.merge(removed) air_update_turf() else - on = 0 + on = FALSE update_icon() diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 81835d19c82..c5881886781 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -14,8 +14,8 @@ icon = 'icons/obj/status_display.dmi' icon_state = "frame" name = "status display" - anchored = 1 - density = 0 + anchored = TRUE + density = FALSE use_power = IDLE_POWER_USE idle_power_usage = 10 var/mode = 1 // 0 = Blank @@ -32,10 +32,10 @@ frequency = DISPLAY_FREQ // radio frequency - var/friendc = 0 // track if Friend Computer mode - var/ignore_friendc = 0 + var/friendc = FALSE // track if Friend Computer mode + var/ignore_friendc = FALSE - var/spookymode = 0 + var/spookymode = FALSE maptext_height = 26 maptext_width = 32 @@ -66,7 +66,7 @@ remove_display() return if(spookymode) - spookymode = 0 + spookymode = FALSE remove_display() return update() @@ -200,10 +200,10 @@ icon = 'icons/obj/status_display.dmi' icon_state = "frame" name = "AI display" - anchored = 1 - density = 0 + anchored = TRUE + density = FALSE - var/spookymode = 0 + var/spookymode = FALSE var/mode = 0 // 0 = Blank // 1 = AI emoticon @@ -222,7 +222,7 @@ overlays.Cut() return if(spookymode) - spookymode = 0 + spookymode = FALSE overlays.Cut() return update() diff --git a/code/game/machinery/supply_display.dm b/code/game/machinery/supply_display.dm index 1fe7ee6e4cb..54d72e2a44c 100644 --- a/code/game/machinery/supply_display.dm +++ b/code/game/machinery/supply_display.dm @@ -1,6 +1,6 @@ /obj/machinery/status_display/supply_display name = "supply status display" - ignore_friendc = 1 + ignore_friendc = TRUE /obj/machinery/status_display/supply_display/update() if(!..() && mode == STATUS_DISPLAY_CUSTOM) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index cef0a62c6bd..cbc0514d107 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -10,11 +10,11 @@ icon = 'icons/obj/device.dmi' icon_state = "syndbeacon" - anchored = 1 - density = 1 + anchored = TRUE + density = TRUE var/temptext = "" - var/selfdestructing = 0 + var/selfdestructing = FALSE var/charges = 1 /obj/machinery/syndicate_beacon/attack_hand(mob/user as mob) @@ -92,7 +92,7 @@ /obj/machinery/syndicate_beacon/proc/selfdestruct() - selfdestructing = 1 + selfdestructing = TRUE spawn() explosion(src.loc, rand(3,8), rand(1,3), 1, 10) @@ -106,12 +106,12 @@ icon = 'icons/obj/singularity.dmi' icon_state = "beacon" - anchored = 0 - density = 1 + anchored = FALSE + density = TRUE layer = MOB_LAYER - 0.2 //so people can't hide it and it's REALLY OBVIOUS stat = 0 - var/active = 0 + var/active = FALSE var/icontype = "beacon" @@ -125,7 +125,7 @@ if(singulo.z == z) singulo.target = src icon_state = "[icontype]1" - active = 1 + active = TRUE START_PROCESSING(SSmachines, src) if(user) to_chat(user, "You activate the beacon.") @@ -137,7 +137,7 @@ if(singulo.target == src) singulo.target = null icon_state = "[icontype]0" - active = 0 + active = FALSE if(user) to_chat(user, "You deactivate the beacon.") diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 209176e21b1..76e0690f78d 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -7,8 +7,8 @@ icon_state = "syndicate-bomb" desc = "A large and menacing device. Can be bolted down with a wrench." - anchored = 0 - density = 0 + anchored = FALSE + density = FALSE layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS resistance_flags = FIRE_PROOF | ACID_PROOF diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 1f21199521a..846c39917b3 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -4,8 +4,8 @@ icon = 'icons/obj/recycling.dmi' icon_state = "separator-AO1" layer = MOB_LAYER+1 // Overhead - anchored = 1 - density = 1 + anchored = TRUE + density = TRUE /// TRUE if the factory can transform dead mobs. var/transform_dead = TRUE /// TRUE if the mob can be standing and still be transformed. diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 7e373b2657f..27ea6f63022 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -87,7 +87,7 @@ // Things that can go wrong /// Allows people to access a vendor that's normally access restricted. - emagged = 0 + emagged = FALSE /// Shocks people like an airlock var/seconds_electrified = 0 /// Fire items at customers! We're broken! diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index c585d04b885..5123417bf4d 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -3,8 +3,8 @@ desc = "Gets rid of those pesky bloodstains, or your money back!" icon = 'icons/obj/machines/washing_machine.dmi' icon_state = "wm_10" - density = 1 - anchored = 1.0 + density = TRUE + anchored = TRUE var/state = 1 //1 = empty, open door //2 = empty, closed door @@ -14,12 +14,10 @@ //6 = blood, open door //7 = blood, closed door //8 = blood, running - var/panel = 0 - //0 = closed - //1 = open - var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default. - //0 = not hacked - //1 = hacked + var/panel = FALSE + //FALSE = closed + //TRUE = open + var/hacked = TRUE //Bleh, screw hacking, let's have it hacked by default. var/gibs_ready = 0 var/obj/crayon