mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Refactors unique_reskin, deletes retool kit (#93775)
## About The Pull Request Closes #93635 `unique_reskin` is no longer a list on `/item`, now `/datum/atom_skin` The actual reskinning behavior has been moved out to `/datum/component/reskinable_item` PKC reskinning is now handled via alt-click reskin, rather than via the retooling kit. The retooling kit has been removed. There's no limit on how many times you can reskin your PKC (though perhaps we limit it to one reskin and keep the retooling kit as a way to allow a miner to reskin it a second time?) The Ashen Skull unique reskin is still a trophy, and instead unlocks its unique reskin option in the alt-click radial. ## Why It's Good For The Game I'm unsure why the retooling kit exists on its own, when it's relatively cheap and just performs the behavior of alt-click reskinning. So to keep it consistent with all other forms of reskinning I've just made it baseline. To accomplish that I refactored reskinning. The new form of reskinning allows for greater potential in adding reskins, allowing far more than just an icon state change. Also we can put it on turfs and mobs and structures now which is cool I guess There's also the added benefit of being able to see an item's reskins without needing to instantiate it, which the loadout menu uses to great effect. ## Changelog 🆑 Melbert refactor: Refactored item reskinning (the alt-click way), report any oddities with that del: Deleted the crusher retool kit, now you can just reskin your crusher with alt-click. The Skull skin is still locked behind having the Ashen Skull trophy applied. fix: Stunswords no longer have an incorrect lore blurb fix: Fixed loadout item reskinning's UI /🆑
This commit is contained in:
@@ -1,3 +1,31 @@
|
||||
// Gel skins
|
||||
/datum/atom_skin/med_gel
|
||||
abstract_type = /datum/atom_skin/med_gel
|
||||
|
||||
/datum/atom_skin/med_gel/blue
|
||||
preview_name = "Blue"
|
||||
new_icon_state = "medigel_blue"
|
||||
|
||||
/datum/atom_skin/med_gel/cyan
|
||||
preview_name = "Cyan"
|
||||
new_icon_state = "medigel_cyan"
|
||||
|
||||
/datum/atom_skin/med_gel/green
|
||||
preview_name = "Green"
|
||||
new_icon_state = "medigel_green"
|
||||
|
||||
/datum/atom_skin/med_gel/red
|
||||
preview_name = "Red"
|
||||
new_icon_state = "medigel_red"
|
||||
|
||||
/datum/atom_skin/med_gel/orange
|
||||
preview_name = "Orange"
|
||||
new_icon_state = "medigel_orange"
|
||||
|
||||
/datum/atom_skin/med_gel/purple
|
||||
preview_name = "Purple"
|
||||
new_icon_state = "medigel_purple"
|
||||
|
||||
/obj/item/reagent_containers/medigel
|
||||
name = "medical gel"
|
||||
desc = "A medical gel applicator bottle, designed for precision application, with an unscrewable cap."
|
||||
@@ -23,15 +51,11 @@
|
||||
var/apply_method = "spray" //the thick gel is sprayed and then dries into patch like film.
|
||||
var/self_delay = 30
|
||||
custom_price = PAYCHECK_CREW * 2
|
||||
unique_reskin = list(
|
||||
"Blue" = "medigel_blue",
|
||||
"Cyan" = "medigel_cyan",
|
||||
"Green" = "medigel_green",
|
||||
"Red" = "medigel_red",
|
||||
"Orange" = "medigel_orange",
|
||||
"Purple" = "medigel_purple"
|
||||
)
|
||||
|
||||
/obj/item/reagent_containers/medigel/Initialize(mapload)
|
||||
. = ..()
|
||||
if(icon_state == "medigel") // oh yeah baby raw icon state check to make sure we can't reskin preset gels
|
||||
AddComponent(/datum/component/reskinable_item, /datum/atom_skin/med_gel)
|
||||
|
||||
/obj/item/reagent_containers/medigel/mode_change_message(mob/user)
|
||||
var/squirt_mode = amount_per_transfer_from_this == initial(amount_per_transfer_from_this)
|
||||
@@ -78,21 +102,18 @@
|
||||
name = "medical gel (libital)"
|
||||
desc = "A medical gel applicator bottle, designed for precision application, with an unscrewable cap. This one contains libital, for treating cuts and bruises. Libital does minor liver damage. Diluted with granibitaluri."
|
||||
icon_state = "brutegel"
|
||||
current_skin = "brutegel"
|
||||
list_reagents = list(/datum/reagent/medicine/c2/libital = 24, /datum/reagent/medicine/granibitaluri = 36)
|
||||
|
||||
/obj/item/reagent_containers/medigel/aiuri
|
||||
name = "medical gel (aiuri)"
|
||||
desc = "A medical gel applicator bottle, designed for precision application, with an unscrewable cap. This one contains aiuri, useful for treating burns. Aiuri does minor eye damage. Diluted with granibitaluri."
|
||||
icon_state = "burngel"
|
||||
current_skin = "burngel"
|
||||
list_reagents = list(/datum/reagent/medicine/c2/aiuri = 24, /datum/reagent/medicine/granibitaluri = 36)
|
||||
|
||||
/obj/item/reagent_containers/medigel/synthflesh
|
||||
name = "medical gel (synthflesh)"
|
||||
desc = "A medical gel applicator bottle, designed for precision application, with an unscrewable cap. This one contains synthflesh, a slightly toxic medicine capable of healing bruises, burns, and husks."
|
||||
icon_state = "synthgel"
|
||||
current_skin = "synthgel"
|
||||
list_reagents = list(/datum/reagent/medicine/c2/synthflesh = 60)
|
||||
list_reagents_purity = 1
|
||||
amount_per_transfer_from_this = 60
|
||||
@@ -117,6 +138,5 @@
|
||||
name = "sterilizer gel"
|
||||
desc = "gel bottle loaded with non-toxic sterilizer. Useful in preparation for surgery."
|
||||
icon_state = "medigel_blue"
|
||||
current_skin = "medigel_blue"
|
||||
list_reagents = list(/datum/reagent/space_cleaner/sterilizine = 60)
|
||||
custom_price = PAYCHECK_CREW * 2
|
||||
|
||||
@@ -420,6 +420,23 @@
|
||||
. = ..()
|
||||
icon_state = pick("sprayer_sus_1", "sprayer_sus_2", "sprayer_sus_3", "sprayer_sus_4", "sprayer_sus_5","sprayer_sus_6", "sprayer_sus_7", "sprayer_sus_8")
|
||||
|
||||
// Spray bottle skins
|
||||
/datum/atom_skin/med_spray
|
||||
abstract_type = /datum/atom_skin/med_spray
|
||||
change_inhand_icon_state = TRUE
|
||||
|
||||
/datum/atom_skin/med_spray/red
|
||||
preview_name = "Red"
|
||||
new_icon_state = "sprayer_med_red"
|
||||
|
||||
/datum/atom_skin/med_spray/yellow
|
||||
preview_name = "Yellow"
|
||||
new_icon_state = "sprayer_med_yellow"
|
||||
|
||||
/datum/atom_skin/med_spray/blue
|
||||
preview_name = "Blue"
|
||||
new_icon_state = "sprayer_med_blue"
|
||||
|
||||
/obj/item/reagent_containers/spray/medical
|
||||
name = "medical spray bottle"
|
||||
icon = 'icons/obj/medical/chemical.dmi'
|
||||
@@ -428,20 +445,10 @@
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
volume = 100
|
||||
unique_reskin = list("Red" = "sprayer_med_red",
|
||||
"Yellow" = "sprayer_med_yellow",
|
||||
"Blue" = "sprayer_med_blue")
|
||||
|
||||
/obj/item/reagent_containers/spray/medical/reskin_obj(mob/M)
|
||||
..()
|
||||
switch(icon_state)
|
||||
if("sprayer_med_red")
|
||||
inhand_icon_state = "sprayer_med_red"
|
||||
if("sprayer_med_yellow")
|
||||
inhand_icon_state = "sprayer_med_yellow"
|
||||
if("sprayer_med_blue")
|
||||
inhand_icon_state = "sprayer_med_blue"
|
||||
M.update_held_items()
|
||||
/obj/item/reagent_containers/spray/medical/Initialize(mapload, vol)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/reskinable_item, /datum/atom_skin/med_spray)
|
||||
|
||||
/obj/item/reagent_containers/spray/hercuri
|
||||
name = "medical spray (hercuri)"
|
||||
|
||||
Reference in New Issue
Block a user