diff --git a/aurorastation.dme b/aurorastation.dme index cd772040a22..1a80c686e7b 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -111,6 +111,7 @@ #include "code\__DEFINES\rust_g_overrides.dm" #include "code\__DEFINES\ship_weapons.dm" #include "code\__DEFINES\shuttle.dm" +#include "code\__DEFINES\si.dm" #include "code\__DEFINES\singletons.dm" #include "code\__DEFINES\smart_token_bucket.dm" #include "code\__DEFINES\solar.dm" diff --git a/code/__DEFINES/machinery.dm b/code/__DEFINES/machinery.dm index 2e57c309280..495fac0beba 100644 --- a/code/__DEFINES/machinery.dm +++ b/code/__DEFINES/machinery.dm @@ -1,6 +1,5 @@ -#define KILOWATTS *1000 -#define MEGAWATTS *1000000 -#define GIGAWATTS *1000000000 +//Watts, yes this is stupid but it's just for visual reference to the code reader, so deal with it +#define WATTS *1 /** * Multiplier for watts per tick <> cell storage (e.g., 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second) diff --git a/code/__DEFINES/si.dm b/code/__DEFINES/si.dm new file mode 100644 index 00000000000..b63f048e0b3 --- /dev/null +++ b/code/__DEFINES/si.dm @@ -0,0 +1,21 @@ +// Prefix values. +#define QUECTO * 1e-30 +#define RONTO * 1e-27 +#define YOCTO * 1e-24 +#define ZEPTO * 1e-21 +#define ATTO * 1e-18 +#define FEMPTO * 1e-15 +#define PICO * 1e-12 +#define NANO * 1e-9 +#define MICRO * 1e-6 +#define MILLI * 1e-3 +#define KILO * 1e3 +#define MEGA * 1e6 +#define GIGA * 1e9 +#define TERA * 1e12 +#define PETA * 1e15 +#define EXA * 1e18 +#define ZETTA * 1e21 +#define YOTTA * 1e24 +#define RONNA * 1e27 +#define QUETTA * 1e30 diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm index 898a45b1082..c2e5890005c 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm @@ -206,7 +206,7 @@ if(!ability_pay(user,price)) return - M.use_power_oneoff(250 KILOWATTS) + M.use_power_oneoff(250 KILO WATTS) // Trigger a powernet alarm. Careful engineers will probably notice something is going on. var/area/temp_area = get_area(M) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index a6b14102470..ee0e39628f0 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -221,7 +221,7 @@ if(stat & NOPOWER) return FALSE - src.use_power_oneoff(2 KILOWATTS) + src.use_power_oneoff(2 KILO WATTS) //Set it to unwillful sleep occupant_resolved.Sleeping(3.5*seconds_per_tick) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 4fa1d50fa18..56895a99467 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -6,7 +6,7 @@ icon_state = "ccharger" anchored = TRUE idle_power_usage = 5 - active_power_usage = 90 KILOWATTS + active_power_usage = 90 KILO WATTS power_channel = EQUIP update_icon_on_init = TRUE diff --git a/code/game/machinery/crusher_piston.dm b/code/game/machinery/crusher_piston.dm index 534a27aeb14..628921bb651 100644 --- a/code/game/machinery/crusher_piston.dm +++ b/code/game/machinery/crusher_piston.dm @@ -402,7 +402,7 @@ QDEL_NULL(pb3) /obj/machinery/crusher_piston/proc/extend_0_1() - use_power_oneoff(5 KILOWATTS) + use_power_oneoff(5 KILO WATTS) var/turf/T = get_turf(src) if(!can_extend_into(T)) return 0 @@ -414,7 +414,7 @@ return 1 /obj/machinery/crusher_piston/proc/extend_1_2() - use_power_oneoff(5 KILOWATTS) + use_power_oneoff(5 KILO WATTS) var/turf/T = get_turf(pb1) var/turf/extension_turf = get_step(T,SOUTH) if(!can_extend_into(extension_turf)) @@ -427,7 +427,7 @@ return 1 /obj/machinery/crusher_piston/proc/extend_2_3() - use_power_oneoff(5 KILOWATTS) + use_power_oneoff(5 KILO WATTS) var/turf/T = get_turf(pb2) var/turf/extension_turf = get_step(T,SOUTH) if(!can_extend_into(extension_turf)) diff --git a/code/game/machinery/from_beyond.dm b/code/game/machinery/from_beyond.dm index 9899c8b00c0..6dde31d3179 100644 --- a/code/game/machinery/from_beyond.dm +++ b/code/game/machinery/from_beyond.dm @@ -7,8 +7,8 @@ anchored = 0 density = 1 - idle_power_usage = 1 KILOWATTS - active_power_usage = 10 KILOWATTS + idle_power_usage = 1 KILO WATTS + active_power_usage = 10 KILO WATTS var/active = FALSE var/static/list/whispers = list( diff --git a/code/game/machinery/mech_recharger.dm b/code/game/machinery/mech_recharger.dm index 9150f8f04d1..4287e64baa1 100644 --- a/code/game/machinery/mech_recharger.dm +++ b/code/game/machinery/mech_recharger.dm @@ -7,11 +7,11 @@ layer = ABOVE_TILE_LAYER anchored = TRUE idle_power_usage = 300 // Some electronics, passive drain. - active_power_usage = 90 KILOWATTS // When charging + active_power_usage = 90 KILO WATTS // When charging var/mob/living/heavy_vehicle/charging - var/base_charge_rate = 90 KILOWATTS - var/repair_power_usage = 15 KILOWATTS // Per 1 HP of health. + var/base_charge_rate = 90 KILO WATTS + var/repair_power_usage = 15 KILO WATTS // Per 1 HP of health. var/repair = 0 var/charge @@ -118,9 +118,9 @@ desc = "A massive vehicle dock elevated slightly above the ground, constructed for equally massive charging speeds." icon_state = "supermechcharger" idle_power_usage = 400 - active_power_usage = 120 KILOWATTS + active_power_usage = 120 KILO WATTS - base_charge_rate = 120 KILOWATTS + base_charge_rate = 120 KILO WATTS repair = 1 component_types = list( diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 2e3b4f7471c..60732eceff1 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -100,7 +100,7 @@ return FALSE //Wikipedia says this is the upper limit for a medium non directional beacon, deal with it - use_power_oneoff(2 KILOWATTS) + use_power_oneoff(2 KILO WATTS) var/datum/radio_frequency/frequency = SSradio.return_frequency(freq) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index babbf201556..096bd39d577 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -7,7 +7,7 @@ icon_state = "recharger_off" anchored = 1 idle_power_usage = 6 - active_power_usage = 45 KILOWATTS + active_power_usage = 45 KILO WATTS pass_flags = PASSTABLE obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED var/charging_efficiency = 1.3 @@ -176,7 +176,7 @@ desc = "A heavy duty wall recharger specialized for energy weaponry." icon = 'icons/obj/stationobjs.dmi' icon_state = "wrecharger_off" - active_power_usage = 75 KILOWATTS + active_power_usage = 75 KILO WATTS allowed_devices = list( /obj/item/gun/energy, /obj/item/melee/baton, diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index ab61436dfc3..12471b51e93 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -9,7 +9,7 @@ clicksound = /singleton/sound_category/switch_sound var/on = FALSE var/active = 0 - var/heating_power = 40 KILOWATTS + var/heating_power = 40 KILO WATTS var/set_temperature = T0C + 20 var/obj/item/cell/apc/cell diff --git a/code/game/machinery/telecomms/machines/broadcaster.dm b/code/game/machinery/telecomms/machines/broadcaster.dm index 7070fb1fc8c..9027cf3ba6d 100644 --- a/code/game/machinery/telecomms/machines/broadcaster.dm +++ b/code/game/machinery/telecomms/machines/broadcaster.dm @@ -11,7 +11,7 @@ desc = "A dish-shaped machine used to broadcast processed subspace signals." telecomms_type = /obj/machinery/telecomms/broadcaster idle_power_usage = 100 // WATTS - active_power_usage = 3 KILOWATTS + active_power_usage = 3 KILO WATTS produces_heat = FALSE delay = 7 circuitboard = "/obj/item/circuitboard/telecomms/broadcaster" diff --git a/code/game/machinery/telecomms/machines/bus.dm b/code/game/machinery/telecomms/machines/bus.dm index c9c56edb5cf..9c7d3ef9737 100644 --- a/code/game/machinery/telecomms/machines/bus.dm +++ b/code/game/machinery/telecomms/machines/bus.dm @@ -12,8 +12,8 @@ icon_state = "bus" desc = "A mighty piece of hardware used to send massive amounts of data quickly." telecomms_type = /obj/machinery/telecomms/bus - idle_power_usage = 1 KILOWATTS - active_power_usage = 3 KILOWATTS + idle_power_usage = 1 KILO WATTS + active_power_usage = 3 KILO WATTS circuitboard = "/obj/item/circuitboard/telecomms/bus" netspeed = 40 var/change_frequency = 0 diff --git a/code/game/machinery/telecomms/machines/hub.dm b/code/game/machinery/telecomms/machines/hub.dm index 10237ab5de3..d801553e727 100644 --- a/code/game/machinery/telecomms/machines/hub.dm +++ b/code/game/machinery/telecomms/machines/hub.dm @@ -15,8 +15,8 @@ telecomms_type = /obj/machinery/telecomms/hub density = TRUE anchored = TRUE - idle_power_usage = 1.6 KILOWATTS - active_power_usage = 5 KILOWATTS + idle_power_usage = 1.6 KILO WATTS + active_power_usage = 5 KILO WATTS circuitboard = "/obj/item/circuitboard/telecomms/hub" netspeed = 40 diff --git a/code/game/machinery/telecomms/machines/server.dm b/code/game/machinery/telecomms/machines/server.dm index f6c24d24f6e..70a6c5fb70a 100644 --- a/code/game/machinery/telecomms/machines/server.dm +++ b/code/game/machinery/telecomms/machines/server.dm @@ -20,7 +20,7 @@ density = TRUE anchored = TRUE idle_power_usage = 300 // WATTS - active_power_usage = 1 KILOWATTS + active_power_usage = 1 KILO WATTS circuitboard = "/obj/item/circuitboard/telecomms/server" var/list/log_entries = list() var/totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes) diff --git a/code/game/machinery/telecomms/telecommunications.dm b/code/game/machinery/telecomms/telecommunications.dm index d2529bf1a59..5226287099d 100644 --- a/code/game/machinery/telecomms/telecommunications.dm +++ b/code/game/machinery/telecomms/telecommunications.dm @@ -22,7 +22,7 @@ density = TRUE anchored = TRUE idle_power_usage = 600 // WATTS - active_power_usage = 2 KILOWATTS + active_power_usage = 2 KILO WATTS var/list/links = list() // list of machines this machine is linked to /* diff --git a/code/modules/cooking/machinery/cooking_machines/fryer.dm b/code/modules/cooking/machinery/cooking_machines/fryer.dm index 2a1ca3b9e50..1b16f9265f2 100644 --- a/code/modules/cooking/machinery/cooking_machines/fryer.dm +++ b/code/modules/cooking/machinery/cooking_machines/fryer.dm @@ -8,10 +8,10 @@ off_icon = "fryer_off" food_color = "#ffad33" appliancetype = FRYER - active_power_usage = 12 KILOWATTS + active_power_usage = 12 KILO WATTS heating_power = 12000 optimal_power = 1.35 - idle_power_usage = 3.6 KILOWATTS + idle_power_usage = 3.6 KILO WATTS //Power used to maintain temperature once it's heated. //Going with 25% of the active power. This is a somewhat arbitrary value resistance = 10000 // Approx. 4 minutes. diff --git a/code/modules/cooking/machinery/cooking_machines/oven.dm b/code/modules/cooking/machinery/cooking_machines/oven.dm index cbcaf65392e..b786c0cb855 100644 --- a/code/modules/cooking/machinery/cooking_machines/oven.dm +++ b/code/modules/cooking/machinery/cooking_machines/oven.dm @@ -7,11 +7,11 @@ appliancetype = OVEN food_color = "#a34719" can_burn_food = TRUE - active_power_usage = 6 KILOWATTS + active_power_usage = 6 KILO WATTS heating_power = 6000 //Based on a double deck electric convection oven resistance = 10000 // Approx. 4 minutes. - idle_power_usage = 2 KILOWATTS + idle_power_usage = 2 KILO WATTS //uses ~30% power to stay warm optimal_power = 1.2 light_x = 2 diff --git a/code/modules/cooking/machinery/cooking_machines/stove.dm b/code/modules/cooking/machinery/cooking_machines/stove.dm index ba9a88c20ff..73aa1560f30 100644 --- a/code/modules/cooking/machinery/cooking_machines/stove.dm +++ b/code/modules/cooking/machinery/cooking_machines/stove.dm @@ -6,14 +6,14 @@ appliancetype = SKILLET | SAUCEPAN | POT food_color = "#a34719" can_burn_food = TRUE - active_power_usage = 6 KILOWATTS + active_power_usage = 6 KILO WATTS heating_power = 6000 on_icon = "stove" off_icon = "stove" place_verb = "onto" resistance = 5000 // Approx. 2 minutes. - idle_power_usage = 1 KILOWATTS + idle_power_usage = 1 KILO WATTS //uses ~30% power to stay warm optimal_temp = T0C + 100 // can boil water! optimal_power = 1.2 diff --git a/code/modules/heavy_vehicle/equipment/_equipment.dm b/code/modules/heavy_vehicle/equipment/_equipment.dm index 69becc1c2c5..cc6a1f26e14 100644 --- a/code/modules/heavy_vehicle/equipment/_equipment.dm +++ b/code/modules/heavy_vehicle/equipment/_equipment.dm @@ -13,7 +13,7 @@ var/mech_layer = MECH_GEAR_LAYER var/equipment_delay = 0 var/passive_power_use = 0 - var/active_power_use = 1 KILOWATTS + var/active_power_use = 1 KILO WATTS var/require_adjacent = TRUE var/active = FALSE //For gear that has an active state (ie, floodlights) diff --git a/code/modules/heavy_vehicle/equipment/combat.dm b/code/modules/heavy_vehicle/equipment/combat.dm index cdd3ee67596..1e169c0e86b 100644 --- a/code/modules/heavy_vehicle/equipment/combat.dm +++ b/code/modules/heavy_vehicle/equipment/combat.dm @@ -335,7 +335,7 @@ else STOP_PROCESSING(SSprocessing, src) active = aura.active - passive_power_use = active ? 1 KILOWATTS : 0 + passive_power_use = active ? 1 KILO WATTS : 0 owner.update_icon() /obj/item/mecha_equipment/shield/deactivate() diff --git a/code/modules/heavy_vehicle/equipment/utility.dm b/code/modules/heavy_vehicle/equipment/utility.dm index 89a1588760d..0aa216955c6 100644 --- a/code/modules/heavy_vehicle/equipment/utility.dm +++ b/code/modules/heavy_vehicle/equipment/utility.dm @@ -209,7 +209,7 @@ update_icon() owner.update_icon() active = on - passive_power_use = on ? 0.1 KILOWATTS : 0 + passive_power_use = on ? 0.1 KILO WATTS : 0 /obj/item/mecha_equipment/light/deactivate() if(on) @@ -658,7 +658,7 @@ restricted_hardpoints = list(HARDPOINT_BACK) w_class = ITEMSIZE_HUGE origin_tech = list(TECH_MATERIAL = 6, TECH_ENGINEERING = 6, TECH_BLUESPACE = 6) - active_power_use = 88 KILOWATTS + active_power_use = 88 KILO WATTS var/obj/item/anomaly_core/AC var/image/anomaly_overlay diff --git a/code/modules/modular_computers/hardware/ai_slot.dm b/code/modules/modular_computers/hardware/ai_slot.dm index 9a9a091966f..d287fe345d8 100644 --- a/code/modules/modular_computers/hardware/ai_slot.dm +++ b/code/modules/modular_computers/hardware/ai_slot.dm @@ -9,7 +9,7 @@ origin_tech = list(TECH_POWER = 2, TECH_DATA = 3) var/obj/item/aicard/stored_card var/power_usage_idle = 100 - var/power_usage_occupied = 2 KILOWATTS + var/power_usage_occupied = 2 KILO WATTS /obj/item/computer_hardware/ai_slot/proc/update_power_usage() if(!stored_card?.carded_ai) diff --git a/code/modules/overmap/ship_weaponry/weaponry/leviathan.dm b/code/modules/overmap/ship_weaponry/weaponry/leviathan.dm index e64dc2fd9c1..0d17f6eee38 100644 --- a/code/modules/overmap/ship_weaponry/weaponry/leviathan.dm +++ b/code/modules/overmap/ship_weaponry/weaponry/leviathan.dm @@ -15,8 +15,8 @@ layer = ABOVE_HUMAN_LAYER use_power = POWER_USE_OFF //Start off. - idle_power_usage = 100 KILOWATTS - active_power_usage = 20 MEGAWATTS + idle_power_usage = 100 KILO WATTS + active_power_usage = 20 MEGA WATTS var/obj/machinery/power/smes/buildable/smes /obj/machinery/ship_weapon/leviathan/Destroy() diff --git a/html/changelogs/fluffyghost-implementsiprefixes.yml b/html/changelogs/fluffyghost-implementsiprefixes.yml new file mode 100644 index 00000000000..11359042c49 --- /dev/null +++ b/html/changelogs/fluffyghost-implementsiprefixes.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - refactor: "Implemented SI prefixes (KILO, MEGA, GIGA, TERA etc.)."