mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 13:02:38 +00:00
* Beauty component improvements. Two new fantasy component prefixes (#54622) Title. Changed the component backend code slightly to allow a single component to hold the total score instead of spawning new components. This should fix cases, such as material stacks without the MATERIAL_NO_EFFECTS flag, where multiple set_costum_materials calls can be made and new beauty components spawned. * Beauty component improvements. Two new fantasy component prefixes Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
95 lines
2.7 KiB
Plaintext
95 lines
2.7 KiB
Plaintext
/datum/fantasy_affix/cosmetic_prefixes
|
|
placement = AFFIX_PREFIX
|
|
alignment = AFFIX_GOOD | AFFIX_EVIL
|
|
|
|
var/list/goodPrefixes
|
|
var/list/badPrefixes
|
|
|
|
/datum/fantasy_affix/cosmetic_prefixes/New()
|
|
goodPrefixes = list(
|
|
"greater",
|
|
"major",
|
|
"blessed",
|
|
"superior",
|
|
"empowered",
|
|
"honed",
|
|
"true",
|
|
"glorious",
|
|
"robust",
|
|
)
|
|
badPrefixes = list(
|
|
"lesser",
|
|
"minor",
|
|
"blighted",
|
|
"inferior",
|
|
"enfeebled",
|
|
"rusted",
|
|
"unsteady",
|
|
"tragic",
|
|
"gimped",
|
|
"cursed",
|
|
)
|
|
|
|
weight = (length(goodPrefixes) + length(badPrefixes)) * 10
|
|
|
|
/datum/fantasy_affix/cosmetic_prefixes/apply(datum/component/fantasy/comp, newName)
|
|
if(comp.quality > 0 || (comp.quality == 0 && prob(50)))
|
|
return "[pick(goodPrefixes)] [newName]"
|
|
else
|
|
return "[pick(badPrefixes)] [newName]"
|
|
|
|
/datum/fantasy_affix/tactical
|
|
placement = AFFIX_PREFIX
|
|
alignment = AFFIX_GOOD
|
|
weight = 1 // Very powerful, no one should have such power
|
|
|
|
/datum/fantasy_affix/tactical/apply(datum/component/fantasy/comp, newName)
|
|
var/obj/item/master = comp.parent
|
|
comp.appliedComponents += master.AddComponent(/datum/component/tactical)
|
|
return "tactical [newName]"
|
|
|
|
/datum/fantasy_affix/pyromantic
|
|
placement = AFFIX_PREFIX
|
|
alignment = AFFIX_GOOD
|
|
|
|
/datum/fantasy_affix/pyromantic/apply(datum/component/fantasy/comp, newName)
|
|
var/obj/item/master = comp.parent
|
|
comp.appliedComponents += master.AddComponent(/datum/component/igniter, clamp(comp.quality, 1, 10))
|
|
return "pyromantic [newName]"
|
|
|
|
/datum/fantasy_affix/vampiric
|
|
placement = AFFIX_PREFIX
|
|
alignment = AFFIX_GOOD
|
|
weight = 5
|
|
|
|
/datum/fantasy_affix/vampiric/apply(datum/component/fantasy/comp, newName)
|
|
var/obj/item/master = comp.parent
|
|
comp.appliedComponents += master.AddComponent(/datum/component/lifesteal, comp.quality)
|
|
return "vampiric [newName]"
|
|
|
|
/datum/fantasy_affix/beautiful
|
|
placement = AFFIX_PREFIX
|
|
alignment = AFFIX_GOOD
|
|
|
|
/datum/fantasy_affix/beautiful/apply(datum/component/fantasy/comp, newName)
|
|
var/obj/item/master = comp.parent
|
|
master.AddComponent(/datum/component/beauty, max(comp.quality, 1) * 250)
|
|
return "[pick("aesthetic", "beautiful", "gorgeous", "pretty")] [newName]"
|
|
|
|
/datum/fantasy_affix/beautiful/remove(datum/component/fantasy/comp)
|
|
var/obj/item/master = comp.parent
|
|
master.AddComponent(/datum/component/beauty, -max(comp.quality, 1) * 250)
|
|
|
|
/datum/fantasy_affix/ugly
|
|
placement = AFFIX_PREFIX
|
|
alignment = AFFIX_EVIL
|
|
|
|
/datum/fantasy_affix/ugly/apply(datum/component/fantasy/comp, newName)
|
|
var/obj/item/master = comp.parent
|
|
master.AddComponent(/datum/component/beauty, min(comp.quality, -1) * 250)
|
|
return "[pick("fugly", "ugly", "grotesque", "hideous")] [newName]"
|
|
|
|
/datum/fantasy_affix/ugly/remove(datum/component/fantasy/comp)
|
|
var/obj/item/master = comp.parent
|
|
master.AddComponent(/datum/component/beauty, -min(comp.quality, -1) * 250)
|