mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-17 10:57:19 +01:00
374e220be6
**Summary** Converts hardsuit NanoUI to TGUI and overhauls much of the associated UI and module code. The conversion alone is what necessitated quite a bit of cleanup of our 11-year-old hardsuit code, for which I leaned heavily upon tg's implementation of MODsuits. Therefore, this is a PARTIAL (???) port of both https://github.com/tgstation/tgstation/pull/59109 and https://github.com/tgstation/tgstation/pull/77022. While a lot of wonderful code and UI design was ported 1:1 (for which I am grateful!), our hardsuits are still NOT MODsuits. Most of our back-end remains the same. Fixes https://github.com/Aurorastation/Aurora.3/issues/22071 changes: - refactor: "Migrates Hardsuit NanoUI to TGUI." - refactor: "Updates Hardsuit module type definitions, configuration data, many misc other functions for the purpose of the UI refactor (general utility and readability improvements)." - balance: "Hardsuits now passively consume a small amount of energy while online, even when retracted." - balance: "Hardsuit boots can no longer be retracted without also retracting the chest piece first." - balance: "Mounted hardsuit storage module max space increased from 9 to 14." - balance: "Plasma cutter (standalone and mounted) damage increased and range decreased by 50% each." - soundadd: "Adds several new sounds for hardsuit use (attribution located w/ files)." - code_imp: "Makes power_wattage_readable() a global proc and adds power_joules_readable()." - code_imp: "Lots of misc DMdoc updates." - bugfix: "Synthetic Charging Stations now charge hardsuit power cells as intended." **Old UI** <img width="804" height="1321" alt="Screenshot 2026-05-04 135705" src="https://github.com/user-attachments/assets/f01957a0-7cec-4fcc-b862-c9dfde0dcc43" /> **New UI** <img width="998" height="782" alt="Screenshot 2026-05-04 174658" src="https://github.com/user-attachments/assets/ad402902-d489-435a-9c16-82150ed82618" /> ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | icons/mob/rig_modules.dmi (mounted-plasmacutter)| [Ghostsheet](https://github.com/ghostsheet) | CC-BY-SA | --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com>
44 lines
1.8 KiB
Plaintext
44 lines
1.8 KiB
Plaintext
/** MODULE TYPES */
|
|
/**
|
|
* Note that these types describe the primary functionality of a given module; additional configuration data provided by modules can
|
|
* give them behavior modes that might seem to fall into multiple types below.
|
|
*
|
|
* For example, the Leg Actuators is type MODULETYPE_USABLE_ACTIVE, because it has a middle-click use functionality as its primary. However,
|
|
* it provides a configuration option to toggle fall damping on and off.
|
|
*/
|
|
/// Passive module, just acts when put in naturally.
|
|
#define MODULETYPE_PASSIVE 0
|
|
/// Toggle module: you turn it on/off and it does stuff.
|
|
#define MODULETYPE_TOGGLE 1
|
|
/// Usable module: you can use these for a one-time effect; they are things that just Happen w/o a click action.
|
|
#define MODULETYPE_USABLE 2
|
|
/// Actively usable module: you may only have one selected at a time, and give you a special click action.
|
|
#define MODULETYPE_USABLE_ACTIVE 3
|
|
|
|
/*
|
|
* Hardsuit power usage drains this much energy per tick from the cell. We don't accurately model this with CELLRATE and etc. because
|
|
* in testing, it just didn't feel as good; static values felt better because they were more consistent/predictable w different configs.
|
|
* There are 3600 machine ticks in a 2hr round, and a default cell has 30000 power.
|
|
*
|
|
* Note that every additional 1 power usage per tick (due to modules) will DECREASE cell lifetime by ~8m
|
|
*/
|
|
|
|
/// By itself, cell drains fully in 2hr5m
|
|
#define CHARGE_DRAIN_LOW 8
|
|
/// By itself, cell drains fully in 1hr40m
|
|
#define CHARGE_DRAIN_DEFAULT 10
|
|
/// By itself, cell drains fully in 1hr23m
|
|
#define CHARGE_DRAIN_HIGH 12
|
|
|
|
#define MODULE_GENERAL 1
|
|
#define MODULE_LIGHT_COMBAT 2
|
|
#define MODULE_HEAVY_COMBAT 4
|
|
#define MODULE_UTILITY 8
|
|
#define MODULE_MEDICAL 16
|
|
#define MODULE_SPECIAL 32
|
|
#define MODULE_VAURCA 64
|
|
|
|
#define ONLY_DEPLOY 1
|
|
#define ONLY_RETRACT 2
|
|
#define SEAL_DELAY 30
|