mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 20:22:07 +00:00
* Cleans up + Improves bows, Sorts files, Adds the Divine Archer clothing, weapon, rite * fix --------- Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> Co-authored-by: ghost sheep <sheepwiththemask@gmail.com>
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
/**
|
|
* sect nullrod bonus component; for sekret rite combos
|
|
*
|
|
* Good example is the bow and pyre sect. pick the bow, get a special rite in the pyre sect.
|
|
*/
|
|
/datum/component/sect_nullrod_bonus
|
|
/// assoc list of nullrod type -> rites it unlocks
|
|
var/list/bonus_rites
|
|
/// has this component given the bonus yet
|
|
var/bonus_applied = FALSE
|
|
|
|
/datum/component/sect_nullrod_bonus/Initialize(list/bonus_rites)
|
|
if(!istype(parent, /datum/religion_sect))
|
|
return COMPONENT_INCOMPATIBLE
|
|
src.bonus_rites = bonus_rites
|
|
check_bonus_rites()
|
|
|
|
/datum/component/sect_nullrod_bonus/RegisterWithParent()
|
|
RegisterSignal(SSdcs, COMSIG_GLOB_NULLROD_PICKED, PROC_REF(on_nullrod_picked))
|
|
|
|
/datum/component/sect_nullrod_bonus/UnregisterFromParent()
|
|
UnregisterSignal(SSdcs, COMSIG_GLOB_NULLROD_PICKED)
|
|
|
|
/datum/component/sect_nullrod_bonus/proc/on_nullrod_picked(datum/source)
|
|
SIGNAL_HANDLER
|
|
check_bonus_rites()
|
|
|
|
/datum/component/sect_nullrod_bonus/proc/check_bonus_rites()
|
|
if(bonus_applied || !GLOB.holy_weapon_type)
|
|
return
|
|
var/list/unlocked_rites = bonus_rites[GLOB.holy_weapon_type]
|
|
if(!unlocked_rites)
|
|
return
|
|
GLOB.religious_sect.rites_list.Add(unlocked_rites)
|
|
bonus_applied = TRUE
|