[MIRROR] Add new H.E.C.K. suit GAGS sprite, recolorable via spray can [MDB IGNORE] (#14006)

* Add new H.E.C.K. suit GAGS sprite, recolorable via spray can (#67217)

imageadd: The H.E.C.K. suit has a new sprite. (by Meyhazah)
add: You can now use a spray can to completely recolor the H.E.C.K. suit.

* Add new H.E.C.K. suit GAGS sprite, recolorable via spray can

Co-authored-by: Urumasi <Urumasi@email.cz>
This commit is contained in:
SkyratBot
2022-05-31 04:01:33 +01:00
committed by GitHub
co-authored by Urumasi
parent 2275d9d008
commit b290c49a94
13 changed files with 225 additions and 14 deletions
@@ -0,0 +1,73 @@
/datum/component/gags_recolorable
/datum/component/gags_recolorable/RegisterWithParent()
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/on_attackby)
/datum/component/gags_recolorable/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_PARENT_ATTACKBY)
/datum/component/gags_recolorable/proc/on_attackby(datum/source, obj/item/attacking_item, mob/user)
SIGNAL_HANDLER
if(!isatom(parent))
return
if(!istype(attacking_item, /obj/item/toy/crayon/spraycan))
return
var/obj/item/toy/crayon/spraycan/can = attacking_item
if(can.is_capped || can.check_empty())
return
INVOKE_ASYNC(src, .proc/open_ui, user, can)
return COMPONENT_NO_AFTERATTACK
/datum/component/gags_recolorable/proc/open_ui(mob/user, obj/item/toy/crayon/spraycan/can)
var/atom/atom_parent = parent
var/list/allowed_configs = list()
var/config = initial(atom_parent.greyscale_config)
if(!config)
return
allowed_configs += "[config]"
if(ispath(atom_parent, /obj/item))
var/obj/item/item = atom_parent
if(initial(item.greyscale_config_worn))
allowed_configs += "[initial(item.greyscale_config_worn)]"
if(initial(item.greyscale_config_inhand_left))
allowed_configs += "[initial(item.greyscale_config_inhand_left)]"
if(initial(item.greyscale_config_inhand_right))
allowed_configs += "[initial(item.greyscale_config_inhand_right)]"
var/datum/greyscale_modify_menu/spray_paint/menu = new(
atom_parent, user, allowed_configs, CALLBACK(src, .proc/recolor, user, can),
starting_icon_state = initial(atom_parent.icon_state),
starting_config = initial(atom_parent.greyscale_config),
starting_colors = atom_parent.greyscale_colors,
used_spraycan = can
)
menu.ui_interact(user)
/datum/component/gags_recolorable/proc/recolor(mob/user, obj/item/toy/crayon/spraycan/can, datum/greyscale_modify_menu/menu)
if(!isatom(parent))
return
var/atom/atom_parent = parent
if(can.is_capped || can.check_empty(user))
menu.ui_close()
return
can.use_charges()
if(can.pre_noise)
atom_parent.audible_message(span_hear("You hear spraying."))
playsound(atom_parent.loc, 'sound/effects/spray.ogg', 5, TRUE, 5)
atom_parent.set_greyscale(menu.split_colors)
// If the item is a piece of clothing and is being worn, make sure it updates on the player
if(!isclothing(atom_parent))
return
if(!ishuman(atom_parent.loc))
return
var/obj/item/clothing/clothing_parent = atom_parent
var/mob/living/carbon/human/wearer = atom_parent.loc
wearer.update_clothing(clothing_parent.slot_flags)
@@ -542,3 +542,23 @@
/datum/greyscale_config/vape/open_high
name = "Open Vape High"
json_config = 'code/datums/greyscale/json_configs/vape_open_high.json'
/datum/greyscale_config/heck_suit
name = "H.E.C.K. Suit"
icon_file = 'icons/obj/clothing/suits.dmi'
json_config = 'code/datums/greyscale/json_configs/heck_suit.json'
/datum/greyscale_config/heck_suit/worn
name = "H.E.C.K. Suit Worn"
icon_file = 'icons/mob/clothing/suit.dmi'
json_config = 'code/datums/greyscale/json_configs/heck_suit_worn.json'
/datum/greyscale_config/heck_helmet
name = "H.E.C.K. Helmet"
icon_file = 'icons/obj/clothing/hats.dmi'
json_config = 'code/datums/greyscale/json_configs/heck_helmet.json'
/datum/greyscale_config/heck_helmet/worn
name = "H.E.C.K. Helmet Worn"
icon_file = 'icons/mob/clothing/head.dmi'
json_config = 'code/datums/greyscale/json_configs/heck_helmet_worn.json'
@@ -0,0 +1,22 @@
{
"hostile_env": [
{
"type": "icon_state",
"icon_state": "hostile_env_head",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "hostile_env_jaw",
"blend_mode": "overlay",
"color_ids": [ 2 ]
},
{
"type": "icon_state",
"icon_state": "hostile_env_visor",
"blend_mode": "overlay",
"color_ids": [ 3 ]
}
]
}
@@ -0,0 +1,22 @@
{
"hostile_env": [
{
"type": "icon_state",
"icon_state": "hostile_env_head",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "hostile_env_jaw",
"blend_mode": "overlay",
"color_ids": [ 2 ]
},
{
"type": "icon_state",
"icon_state": "hostile_env_visor",
"blend_mode": "overlay",
"color_ids": [ 3 ]
}
]
}
@@ -0,0 +1,30 @@
{
"hostile_env": [
{
"type": "icon_state",
"icon_state": "hostile_env_plates",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "hostile_env_detail",
"blend_mode": "overlay",
"color_ids": [ 2 ]
}
],
"hostile_env_t": [
{
"type": "icon_state",
"icon_state": "hostile_env_plates",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "hostile_env_detail",
"blend_mode": "overlay",
"color_ids": [ 2 ]
}
]
}
@@ -0,0 +1,30 @@
{
"hostile_env": [
{
"type": "icon_state",
"icon_state": "hostile_env_plates",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "hostile_env_detail",
"blend_mode": "overlay",
"color_ids": [ 2 ]
}
],
"hostile_env_t": [
{
"type": "icon_state",
"icon_state": "hostile_env_plates",
"blend_mode": "overlay",
"color_ids": [ 1 ]
},
{
"type": "icon_state",
"icon_state": "hostile_env_detail",
"blend_mode": "overlay",
"color_ids": [ 2 ]
}
]
}
@@ -308,3 +308,19 @@ This is highly likely to cause massive amounts of lag as every object in the gam
current = parent
parent = type2parent(current)
config_owner_type = current
/// Used for spray painting items in the gags_recolorable component
/datum/greyscale_modify_menu/spray_paint
var/obj/item/toy/crayon/spraycan/spraycan = null
/datum/greyscale_modify_menu/spray_paint/New(atom/target, client/user, list/allowed_configs, datum/callback/apply_callback, starting_icon_state, starting_config, starting_colors, obj/item/toy/crayon/spraycan/used_spraycan)
..()
spraycan = used_spraycan
/datum/greyscale_modify_menu/spray_paint/ui_status(mob/user, datum/ui_state/state)
return min(
ui_status_only_living(user, target),
ui_status_user_is_abled(user, target),
ui_status_user_strictly_adjacent(user, target),
user.is_holding(spraycan)? UI_INTERACTIVE : UI_CLOSE
)
+11 -14
View File
@@ -275,16 +275,21 @@
resistance_flags = FIRE_PROOF|LAVA_PROOF|ACID_PROOF
transparent_protection = HIDEGLOVES|HIDESUITSTORAGE|HIDEJUMPSUIT|HIDESHOES
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/recharge/kinetic_accelerator, /obj/item/pickaxe)
greyscale_colors = "#4d4d4d#808080"
greyscale_config = /datum/greyscale_config/heck_suit
greyscale_config_worn = /datum/greyscale_config/heck_suit/worn
flags_1 = IS_PLAYER_COLORABLE_1
/obj/item/clothing/suit/hooded/hostile_environment/Initialize(mapload)
. = ..()
AddElement(/datum/element/radiation_protected_clothing)
AddComponent(/datum/component/gags_recolorable)
/obj/item/clothing/suit/hooded/hostile_environment/process(delta_time)
. = ..()
var/mob/living/carbon/wearer = loc
if(istype(wearer) && DT_PROB(1, delta_time)) //cursed by bubblegum
if(DT_PROB(7.5, delta_time))
if(prob(7.5))
new /datum/hallucination/oh_yeah(wearer)
to_chat(wearer, span_colossus("<b>[pick("I AM IMMORTAL.","I SHALL TAKE BACK WHAT'S MINE.","I SEE YOU.","YOU CANNOT ESCAPE ME FOREVER.","DEATH CANNOT HOLD ME.")]</b>"))
else
@@ -305,12 +310,17 @@
flags_inv = HIDEMASK|HIDEEARS|HIDEFACE|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
flags_cover = HEADCOVERSMOUTH
actions_types = list()
greyscale_colors = "#4d4d4d#808080#ff3300"
greyscale_config = /datum/greyscale_config/heck_helmet
greyscale_config_worn = /datum/greyscale_config/heck_helmet/worn
flags_1 = IS_PLAYER_COLORABLE_1
/obj/item/clothing/head/hooded/hostile_environment/Initialize(mapload)
. = ..()
update_appearance()
AddComponent(/datum/component/butchering, 5, 150, null, null, null, TRUE, CALLBACK(src, .proc/consume))
AddElement(/datum/element/radiation_protected_clothing)
AddComponent(/datum/component/gags_recolorable)
/obj/item/clothing/head/hooded/hostile_environment/equipped(mob/user, slot, initial = FALSE)
. = ..()
@@ -341,19 +351,6 @@
var/datum/client_colour/color = user.add_client_colour(/datum/client_colour/bloodlust)
QDEL_IN(color, 1 SECONDS)
/obj/item/clothing/head/hooded/hostile_environment/update_overlays()
. = ..()
var/mutable_appearance/glass_overlay = mutable_appearance(icon, "hostile_env_glass")
glass_overlay.appearance_flags = RESET_COLOR
. += glass_overlay
/obj/item/clothing/head/hooded/hostile_environment/worn_overlays(mutable_appearance/standing, isinhands)
. = ..()
if(!isinhands)
var/mutable_appearance/glass_overlay = mutable_appearance('icons/mob/clothing/head.dmi', "hostile_env_glass")
glass_overlay.appearance_flags = RESET_COLOR
. += glass_overlay
#define MAX_BLOOD_LEVEL 100
/obj/item/soulscythe
Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 118 KiB

+1
View File
@@ -811,6 +811,7 @@
#include "code\datums\components\force_move.dm"
#include "code\datums\components\fov_handler.dm"
#include "code\datums\components\fullauto.dm"
#include "code\datums\components\gags_recolorable.dm"
#include "code\datums\components\gas_leaker.dm"
#include "code\datums\components\geiger_sound.dm"
#include "code\datums\components\genetic_damage.dm"