Hardcore random gets a sixpack (#72992)

Have you ever really thought about how incredible ripped paraplegics
must be? Moving is much more difficult and they're always using their
arms


![image](https://user-images.githubusercontent.com/7501474/215131388-14075809-fa38-4986-a0b0-9b2e76fbfece.png)

🆑
qol: Hardcore random gets a sixpack
/🆑

### Why is this good for the game?

Everyone currently doing hardcore random gets a sixpack, it's a very
obscure visual distinction that I think is fun to just mess with people
with. "Why is the anemic quadruple amputee with brain cancer ripped to
shreds?"

This is also all just an elaborate scheme to display how the new
bodypart_overlay system can be used with absolutely minimal effort
This commit is contained in:
Time-Green
2023-01-28 14:54:11 -05:00
committed by GitHub
parent a68f7c081e
commit 37220c18fb
6 changed files with 28 additions and 15 deletions
+7 -7
View File
@@ -737,13 +737,13 @@ GLOBAL_LIST_INIT(layers_to_offset, list(
// WOUND_LAYER (full body)
))
//Bitflags for the layers an external organ can draw on (organs can be drawn on multiple layers)
/// Draws organ on the BODY_FRONT_LAYER
#define EXTERNAL_FRONT (1 << 1)
/// Draws organ on the BODY_ADJ_LAYER
#define EXTERNAL_ADJACENT (1 << 2)
/// Draws organ on the BODY_BEHIND_LAYER
#define EXTERNAL_BEHIND (1 << 3)
//Bitflags for the layers a bodypart overlay can draw on (can be drawn on multiple layers)
/// Draws overlay on the BODY_FRONT_LAYER
#define EXTERNAL_FRONT (1 << 0)
/// Draws overlay on the BODY_ADJ_LAYER
#define EXTERNAL_ADJACENT (1 << 1)
/// Draws overlay on the BODY_BEHIND_LAYER
#define EXTERNAL_BEHIND (1 << 2)
/// Draws organ on all EXTERNAL layers
#define ALL_EXTERNAL_OVERLAYS EXTERNAL_FRONT | EXTERNAL_ADJACENT | EXTERNAL_BEHIND
@@ -40,22 +40,22 @@
*/
/datum/bodypart_overlay/proc/mutant_bodyparts_layertext(layer)
switch(layer)
if(BODY_BEHIND_LAYER)
if(-BODY_BEHIND_LAYER)
return "BEHIND"
if(BODY_ADJ_LAYER)
if(-BODY_ADJ_LAYER)
return "ADJ"
if(BODY_FRONT_LAYER)
if(-BODY_FRONT_LAYER)
return "FRONT"
///Converts a bitflag to the right layer. I'd love to make this a static index list, but byond made an attempt on my life when i did
/datum/bodypart_overlay/proc/bitflag_to_layer(layer)
switch(layer)
if(EXTERNAL_BEHIND)
return BODY_BEHIND_LAYER
return -BODY_BEHIND_LAYER
if(EXTERNAL_ADJACENT)
return BODY_ADJ_LAYER
return -BODY_ADJ_LAYER
if(EXTERNAL_FRONT)
return BODY_FRONT_LAYER
return -BODY_FRONT_LAYER
///Check whether we can draw the overlays. You generally don't want lizard snouts to draw over an EVA suit
/datum/bodypart_overlay/proc/can_draw_on_bodypart(mob/living/carbon/human/human)
@@ -52,7 +52,7 @@
var/finished_icon_state = icon_state_builder.Join("_")
var/mutable_appearance/appearance = mutable_appearance(sprite_datum.icon, finished_icon_state, layer = -image_layer)
var/mutable_appearance/appearance = mutable_appearance(sprite_datum.icon, finished_icon_state, layer = image_layer)
if(sprite_datum.center)
center_image(appearance, sprite_datum.dimension_x, sprite_datum.dimension_y)
@@ -4,7 +4,7 @@
///Icon state of the overlay
var/icon_state
///Icon of the overlay
var/icon
var/icon = 'icons/mob/species/misc/bodypart_overlay_simple.dmi'
///Color we apply to our overlay (none by default)
var/draw_color
@@ -13,3 +13,13 @@
/datum/bodypart_overlay/simple/color_image(image/overlay, layer)
overlay.color = draw_color
/datum/bodypart_overlay/simple/generate_icon_cache()
. = ..()
. += "[icon_state]"
///A sixpack drawn on the chest
/datum/bodypart_overlay/simple/sixpack
icon_state = "sixpack"
layers = EXTERNAL_ADJACENT
@@ -26,6 +26,9 @@
var/next_hardcore_score = select_hardcore_quirks()
character.hardcore_survival_score = next_hardcore_score ** 1.2 //30 points would be about 60 score
//Add a sixpack because honestly
var/obj/item/bodypart/chest/chest = character.get_bodypart(BODY_ZONE_CHEST)
chest.add_bodypart_overlay(new /datum/bodypart_overlay/simple/sixpack() )
/**
* Goes through all quirks that can be used in hardcore mode and select some based on a random budget.
Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B