|
722 | 722 | var/list/item_categories = list("Artefacts", "Weapons and Armors", "Staves", "Summons") |
723 | 723 | var/list/loadout_categories = list("Standard", "Unique") |
724 | 724 |
|
725 | | -/obj/item/spellbook/proc/initialize() |
| 725 | +/obj/item/spellbook/proc/create_spellbook() |
726 | 726 | var/entry_types = subtypesof(/datum/spellbook_entry) - /datum/spellbook_entry/item - /datum/spellbook_entry/summon - /datum/spellbook_entry/loadout |
727 | 727 | for(var/T in entry_types) |
728 | 728 | var/datum/spellbook_entry/E = new T |
|
735 | 735 | main_tab = main_categories[1] |
736 | 736 | tab = categories[1] |
737 | 737 |
|
738 | | -/obj/item/spellbook/New() |
739 | | - ..() |
740 | | - initialize() |
| 738 | +/obj/item/spellbook/Initialize(mapload) |
| 739 | + . = ..() |
| 740 | + create_spellbook() |
741 | 741 |
|
742 | 742 | /obj/item/spellbook/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) |
743 | 743 | if(istype(O, /obj/item/contract)) |
|
970 | 970 | uses = 1 |
971 | 971 | desc = "This template spellbook was never meant for the eyes of man..." |
972 | 972 |
|
973 | | -/obj/item/spellbook/oneuse/New() |
974 | | - ..() |
| 973 | +/obj/item/spellbook/oneuse/Initialize(mapload) |
| 974 | + . = ..() |
975 | 975 | name += spellname |
976 | 976 |
|
977 | | -/obj/item/spellbook/oneuse/initialize() //No need to init |
978 | | - return |
979 | | - |
980 | 977 | /obj/item/spellbook/oneuse/attack_self__legacy__attackchain(mob/user) |
981 | 978 | var/datum/spell/S = new spell |
982 | 979 | for(var/datum/spell/knownspell in user.mind.spell_list) |
|
1155 | 1152 | /obj/item/spellbook/oneuse/random |
1156 | 1153 | icon_state = "random_book" |
1157 | 1154 |
|
1158 | | -/obj/item/spellbook/oneuse/random/initialize() |
| 1155 | +/obj/item/spellbook/oneuse/random/create_spellbook() |
1159 | 1156 | . = ..() |
1160 | 1157 | var/static/list/banned_spells = typesof(/obj/item/spellbook/oneuse/mime, /obj/item/spellbook/oneuse/emp) |
1161 | 1158 | var/real_type = pick(subtypesof(/obj/item/spellbook/oneuse) - banned_spells) |
|
0 commit comments