Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 27f46b0

Browse files
Exosuit Update 3: Overheat Edition (#22538)
* too slow, mqiib * adds sprites, removes unused equipment * i love pushing untested changes!!! * balance * fix + repair qol * forgor to remove this line * Update declarations.dm
1 parent 24ca467 commit 27f46b0

File tree

46 files changed

+589
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+589
-333
lines changed

code/__DEFINES/atom_hud.dm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@
4040
#define AI_DETECT_HUD "19"
4141
#define NANITE_HUD "20"
4242
#define DIAG_NANITE_FULL_HUD "21"
43+
/// Shows mech overheating status.
44+
#define DIAG_OVERHEAT_HUD "22"
4345
/// Displays launchpads' targeting reticle
44-
#define DIAG_LAUNCHPAD_HUD "22"
46+
#define DIAG_LAUNCHPAD_HUD "23"
4547
//for antag huds. these are used at the /mob level
46-
#define ANTAG_HUD "23"
48+
#define ANTAG_HUD "24"
4749

4850
//by default everything in the hud_list of an atom is an image
4951
//a value in hud_list with one of these will change that behavior

code/__DEFINES/mecha.dm

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#define MECHA_INT_FIRE (1<<0)
2+
#define MECHA_INT_TEMP_CONTROL (1<<1)
3+
#define MECHA_INT_SHORT_CIRCUIT (1<<2)
4+
#define MECHA_INT_TANK_BREACH (1<<3)
5+
#define MECHA_INT_CONTROL_LOST (1<<4)
6+
7+
#define MECHA_MELEE (1<<0)
8+
#define MECHA_RANGED (1<<1)
9+
10+
#define FRONT_ARMOUR 1
11+
#define SIDE_ARMOUR 2
12+
#define BACK_ARMOUR 3
13+
14+
#define MECHA_MAX_COOLDOWN 30 // Prevents long cooldown equipment from messing up combat
15+
16+
/// Minimum overheat to show an alert to the pilot
17+
#define OVERHEAT_WARNING 50
18+
/// Minimum overheat required to cause slowdown
19+
#define OVERHEAT_THRESHOLD 100
20+
/// Maximum overheat caused by EMPs, prevents permanent lockdown from ion rifles
21+
#define OVERHEAT_EMP_MAX 130
22+
/// Maximum overheat level possible, causes total immobilization
23+
#define OVERHEAT_MAXIMUM 150
24+
/// Amount of overheat reduced every process
25+
#define PASSIVE_COOLING -5
26+
/// Amount of cooling per decisecond-tick while stationary
27+
#define STATIONARY_COOLING -0.1
28+
/// Maximum cooling per second-tick from being stationary
29+
#define STATIONARY_COOLING_MAXIMUM -10
30+
/// Maximum heating from being in a hot environment
31+
#define ENVIRONMENT_HEATING 5
32+
/// Overheating per tile moved when overload is active
33+
#define OVERLOAD_HEAT_COST 4
34+
35+
/// This trait is caused by overheating
36+
#define OVERHEAT_TRAIT "overheating"

code/__DEFINES/projectiles.dm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77

88
// Penetration flags
99
#define PENETRATE_OBJECTS (1<<0)
10-
#define PENETRATE_MOBS (1<<1)
10+
#define PENETRATE_WALLS (1<<1)
11+
#define PENETRATE_MOBS (1<<2)

code/__DEFINES/subsystems.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@
200200
#define FIRE_PRIORITY_FIELDS 30
201201
#define FIRE_PRIORITY_SMOOTHING 35
202202
#define FIRE_PRIORITY_OBJ 40
203+
#define FIRE_PRIORITY_MECHA 40
203204
#define FIRE_PRIORITY_ACID 40
204205
#define FIRE_PRIORITY_BURNING 40
205206
#define FIRE_PRIORITY_DEFAULT 50

code/__DEFINES/traits.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@
129129
*
130130
* THAT FILE IS FOUND INSIDE THE TRAITS FOLDER
131131
*/
132-
/////////////////////////////////////////////////////////////////////////////////////////////////
132+
/////////////////////////////////////////////////////////////////////////////////////////////////

code/__DEFINES/traits/declarations.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
#define TRAIT_ALIEN_SNEAK "sneaking_alien"
5353
///This mob can't use vehicles
5454
#define TRAIT_NOVEHICLE "no_vehicle"
55+
/// This mech is fully disabled
56+
#define TRAIT_MECH_DISABLED "mech_disabled"
5557
/// You can't see color!
5658
#define TRAIT_COLORBLIND "color_blind"
5759
/// This person is crying

code/_onclick/hud/alert.dm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,11 @@ so as to remain in compliance with the most up-to-date laws."
605605
desc = "Mech integrity is low."
606606
icon_state = "low_mech_integrity"
607607

608+
/atom/movable/screen/alert/overheating
609+
name = "Mech Overheating"
610+
desc = "Mech internal temperature is high."
611+
icon_state = "overheat"
612+
608613

609614
//GHOSTS
610615
//TODO: expand this system to replace the pollCandidates/CheckAntagonist/"choose quickly"/etc Yes/No messages
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
PROCESSING_SUBSYSTEM_DEF(mecha)
2+
name = "Mecha"
3+
priority = FIRE_PRIORITY_MECHA
4+
flags = SS_NO_INIT
5+
wait = 0.5 SECONDS

code/game/atom/_atom.dm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@
402402
* We then return the protection value
403403
*/
404404
/atom/proc/emp_act(severity)
405-
SEND_SIGNAL(src, COMSIG_ATOM_EMP_ACT, severity)
406-
var/protection = NONE
405+
var/protection = SEND_SIGNAL(src, COMSIG_ATOM_EMP_ACT, severity)
407406
if(HAS_TRAIT(src, TRAIT_EMPPROOF_CONTENTS))
408407
protection |= EMP_PROTECT_CONTENTS
409408
if(HAS_TRAIT(src, TRAIT_EMPPROOF_SELF))

code/game/data_huds.dm

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656

5757
/datum/atom_hud/data/diagnostic/basic
5858
hud_icons = list(DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD, DIAG_TRACK_HUD, \
59-
DIAG_AIRLOCK_HUD, DIAG_LAUNCHPAD_HUD, NANITE_HUD, DIAG_NANITE_FULL_HUD)
59+
DIAG_AIRLOCK_HUD, DIAG_LAUNCHPAD_HUD, NANITE_HUD, DIAG_NANITE_FULL_HUD, DIAG_OVERHEAT_HUD)
6060

6161
/datum/atom_hud/data/diagnostic/advanced
62-
hud_icons = list(DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD, DIAG_TRACK_HUD,
63-
DIAG_AIRLOCK_HUD, DIAG_LAUNCHPAD_HUD, DIAG_PATH_HUD, NANITE_HUD, DIAG_NANITE_FULL_HUD)
62+
hud_icons = list(DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD, DIAG_TRACK_HUD, \
63+
DIAG_AIRLOCK_HUD, DIAG_LAUNCHPAD_HUD, DIAG_PATH_HUD, NANITE_HUD, DIAG_NANITE_FULL_HUD, DIAG_OVERHEAT_HUD)
6464

6565
/datum/atom_hud/data/bot_path
6666
// This hud exists so the bot can see itself, that's all
@@ -388,6 +388,13 @@ Diagnostic HUDs!
388388
holder.icon_state = "hudnobatt"
389389
set_hud_image_active(DIAG_BATT_HUD)
390390

391+
/obj/mecha/proc/diag_hud_set_mechoverheat()
392+
var/image/holder = hud_list[DIAG_OVERHEAT_HUD]
393+
var/icon/I = icon(icon, icon_state, dir)
394+
holder.pixel_y = I.Height() - world.icon_size
395+
holder.icon_state = "overheat[round(10 * overheat / OVERHEAT_MAXIMUM)]"
396+
set_hud_image_active(DIAG_OVERHEAT_HUD)
397+
391398
/obj/mecha/proc/diag_hud_set_mechstat()
392399
var/image/holder = hud_list[DIAG_STAT_HUD]
393400
var/icon/I = icon(icon, icon_state, dir)
@@ -396,6 +403,10 @@ Diagnostic HUDs!
396403
holder.icon_state = "hudwarn"
397404
set_hud_image_active(DIAG_STAT_HUD)
398405
return
406+
else if(HAS_TRAIT(src, TRAIT_MECH_DISABLED))
407+
holder.icon_state = "hudoffline"
408+
set_hud_image_inactive(DIAG_STAT_HUD)
409+
return
399410
holder.icon_state = null
400411
set_hud_image_inactive(DIAG_STAT_HUD)
401412

0 commit comments

Comments
 (0)