Skip to content

Commit

Permalink
De-hardcodes shrine god choosing
Browse files Browse the repository at this point in the history
  • Loading branch information
Gboster-0 committed Nov 4, 2024
1 parent 7f2d526 commit 4912525
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 39 deletions.
52 changes: 13 additions & 39 deletions ModularTegustation/fishing/code/fishing_items/fishing_shrine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,49 +65,23 @@

//Godpicking shit
/obj/structure/fishshrine/proc/pick_god(mob/living/user)
var/list/display_names = list("Lir", "Tefnut", "Arnapkapfaaluk", "Susanoo" , "Kukulkan", "Abena Mansa", "Glaucus")
if(!display_names.len)
var/list/god_names = list()
for(var/datum/planet/planet as anything in SSfishing.planets)
god_names[planet.god] = planet.god_desc

for(var/god as anything in SSfishing.sleeping_gods)
god_names[god] = "Warning, [god]'s planet has been destroyed, this can negativelly affect you in several situations.\n[SSfishing.sleeping_gods[god]]"

if(!length(god_names))
return
var/choice = input(user,"Which god would you like to align yourself with?","Select a god") as null|anything in display_names

var/choice = input(user, "Which god would you like to align yourself with?", "Select a god") as null|anything in god_names
if(!choice || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
to_chat(user, span_notice("You decide to stay a fish athiest for now."))
return

switch(choice)
if("Lir")
var/confirm = alert("Lir is the God of The Sea, and represents Mercury. Devoting yourself to Lir will give you better fortune with the sizes of fish.", "God Choser", "Devote Yourself", "Take more time")
if(confirm == "Devote Yourself")
user.god_aligned = FISHGOD_MERCURY

if("Tefnut")
var/confirm = alert("Tefnut is the Goddess of moisture, fertility and water, and represents Venus. Devoting yourself to Tefnut will make it less likely for enemies to spawn while catching with nets.", "God Choser", "Devote Yourself", "Take more time")
if(confirm == "Devote Yourself")
user.god_aligned = FISHGOD_VENUS

if("Arnapkapfaaluk")
var/confirm = alert("Arnapkapfaaluk is the Goddess of aquatic combat, and represents Mars. Devoting yourself to Arnapkapfaaluk will give you strength with fishing weapons.", "God Choser", "Devote Yourself", "Take more time")
if(confirm == "Devote Yourself")
user.god_aligned = FISHGOD_MARS

if("Susanoo")
var/confirm = alert("Susanoo is the God of harvest and storms, and represents Jupiter. Devoting yourself to Susanoo will make fishing weapons heal on kill.", "God Choser", "Devote Yourself", "Take more time")
if(confirm == "Devote Yourself")
user.god_aligned = FISHGOD_JUPITER

if("Kukulkan")
var/confirm = alert("Kukulkan is the Serpent Deity, and represents Saturn. Devoting yourself to Kukulkan will decrease the cost of all spells by 1 devotion.", "God Choser", "Devote Yourself", "Take more time")
if(confirm == "Devote Yourself")
user.god_aligned = FISHGOD_SATURN

if("Abena Mansa")
var/confirm = alert("Abena Mansa is a sea Goddess of gold, and represents Uranus. Devoting yourself to Abena Mansa will make fishing up ahn possible, scaling with your devotion.", "God Choser", "Devote Yourself", "Take more time")
if(confirm == "Devote Yourself")
user.god_aligned = FISHGOD_URANUS

if("Glaucus")
var/confirm = alert("Glaucus is the God of fishing, and represents Neptune. Devoting yourself to Glaucus will enhance all of your fishing skills.", "God Choser", "Devote Yourself", "Take more time")
if(confirm == "Devote Yourself")
user.god_aligned = FISHGOD_NEPTUNE

if(alert(god_names[choice], "God Choser", "Devote Yourself", "Take more time") != "Devote Yourself")
return

user.god_aligned = choice
to_chat(user, span_notice("You devote yourself to [user.god_aligned]."))
15 changes: 15 additions & 0 deletions code/controllers/subsystem/fishing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ SUBSYSTEM_DEF(fishing)
var/moonphase = 1 //Four phases, Waning, New, Waxing, and Full
var/stopnext = FALSE //Do we want to stop the planets until the moon is next full?

/// Gets filled on Initialize() with created datums of planets
var/list/planets = list()
/// When a planet is destroyed, its god goes into this list.
var/list/sleeping_gods = list()

/datum/controller/subsystem/fishing/Initialize(start_timeofday)
if(!(SSmaptype.maptype in SSmaptype.citymaps)) // Don't start if it's not a city map.
Expand Down Expand Up @@ -78,54 +81,66 @@ SUBSYSTEM_DEF(fishing)
var/phase = 1
/// What god commands this planet
var/god = FISHGOD_NONE
/// A general description of what the god's buffs are, showed in the altar
var/god_desc = "oh my god!"
/// The subsystem we are linked to, for cleanup purposes
var/datum/controller/subsystem/fishing/linked_subsystem = null

/datum/planet/Destroy(force, ...)
if(god != FISHGOD_NONE)
linked_subsystem.sleeping_gods[god] = god_desc
if(linked_subsystem)
linked_subsystem.planets -= src
linked_subsystem = null
return ..()

/// God is Lir. Buffs the minimum and maximum size of fish.
/datum/planet/mercury
name = "Mercury"
orbit_time = 2
god = FISHGOD_MERCURY
god_desc = "Lir is the God of The Sea, and represents Mercury. Devoting yourself to Lir will give you better fortune with the sizes of fish."

/// God is Tefnut. Small chance to fish up a tamed enemy.
/datum/planet/venus
name = "Venus"
orbit_time = 3
god = FISHGOD_VENUS
god_desc = "Tefnut is the Goddess of moisture, fertility and water, and represents Venus. Devoting yourself to Tefnut will make it less likely for enemies to spawn while catching with nets."

/// God is Arnapkapfaaluk. Buffs the damage of fishing based weapons.
/// (Please don't laugh at the god's name, he was born with it.)
/datum/planet/mars
name = "Mars"
orbit_time = 4
god = FISHGOD_MARS
god_desc = "Arnapkapfaaluk is the Goddess of aquatic combat, and represents Mars. Devoting yourself to Arnapkapfaaluk will give you strength with fishing weapons."

/// God is Susanoo. Heals everyone around you, as well as AOE feeds people
/datum/planet/jupiter
name = "Jupiter"
orbit_time = 5
god = FISHGOD_JUPITER
god_desc = "Susanoo is the God of harvest and storms, and represents Jupiter. Devoting yourself to Susanoo will make fishing weapons heal on kill."

/// God is Kukulkan. Buffs aquarium stuff, not only will you heal to full SP on examining fish aquariums.
/// If your aligned god is the same, You feed the fish for significantly longer
/datum/planet/saturn
name = "Saturn"
orbit_time = 6
god = FISHGOD_SATURN
god_desc = "Kukulkan is the Serpent Deity, and represents Saturn. Devoting yourself to Kukulkan will decrease the cost of all spells by 1 devotion."

/// God is Abena Mansa. Fishing gives you a wallet with ahn in it.
/datum/planet/uranus
name = "Uranus"
orbit_time = 7
god = FISHGOD_URANUS
god_desc = "Abena Mansa is a sea Goddess of gold, and represents Uranus. Devoting yourself to Abena Mansa will make fishing up ahn possible, scaling with your devotion."

/// God is Glaucus. Gives massive buffs to all things fishing related when aligned.
/datum/planet/neptune
name = "Neptune"
orbit_time = 8
god = FISHGOD_NEPTUNE
god_desc = "Glaucus is the God of fishing, and represents Neptune. Devoting yourself to Glaucus will enhance all of your fishing skills."

0 comments on commit 4912525

Please sign in to comment.