mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
moves abstract_type up to datum, spawners wont spawn them (#92909)
## About The Pull Request moves all implementations (im aware of) for "Im a parent type dont spawn me please" to the datum layer to standardized behavior adds a standerized proc for filtering out "bad" items that we dont want spawning. applies to it the subtype vendor, gifts, and a new spawner and mystery box for a random gun (neither playerfacing) "port" of https://github.com/shiptest-ss13/Shiptest/pull/4621 https://github.com/user-attachments/assets/22f6f0b2-b44e-411a-b3dc-6b97dc0287aa small warning: I dont have EVERY abstract type defined right now but, ive done a good enough job for now. Im tired of data entry rn ## Why It's Good For The Game standardizing behavior. Might be a micro hit to performance however having this lets us not rely on icon state to determine whether something is a parent type and makes it much easier to tell something is a parent type (could be applied further to things like admin spawning menus and things like that). need feedback on if this is actually good for the game. ## Changelog 🆑 add: Soda cans show up in the silver slime drink table. add: Examine tag for items that are not mean to show up ingame. refactor: Standardizes how gifts rule out abstract types. fix: gifts no longer check if something has an inhand, massively expanding the list of potential items. /🆑
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/// Exploration event
|
||||
/datum/exploration_event
|
||||
/// These types will be ignored in event creation
|
||||
var/root_abstract_type = /datum/exploration_event
|
||||
abstract_type = /datum/exploration_event
|
||||
///This name will show up in exploration list if it's repeatable
|
||||
var/name = "Something interesting"
|
||||
/// encountered at least once
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/// Simple events, not a full fledged adventure, consist only of single encounter screen
|
||||
/datum/exploration_event/simple
|
||||
root_abstract_type = /datum/exploration_event/simple
|
||||
abstract_type = /datum/exploration_event/simple
|
||||
var/ui_image = "default"
|
||||
/// Show ignore button.
|
||||
var/skippable = TRUE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/exploration_event/adventure
|
||||
discovery_log = "Encountered something unexpected"
|
||||
var/datum/adventure/adventure
|
||||
root_abstract_type = /datum/exploration_event/adventure
|
||||
abstract_type = /datum/exploration_event/adventure
|
||||
|
||||
/datum/exploration_event/adventure/encounter(obj/item/exodrone/drone)
|
||||
. = ..()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/// Danger event - unskippable, if you have appriopriate tool you can mitigate damage.
|
||||
/datum/exploration_event/simple/danger
|
||||
root_abstract_type = /datum/exploration_event/simple/danger
|
||||
abstract_type = /datum/exploration_event/simple/danger
|
||||
description = "You encounter a giant error."
|
||||
var/required_tool = EXODRONE_TOOL_LASER
|
||||
var/has_tool_action_text = "Fight"
|
||||
@@ -88,7 +88,7 @@
|
||||
required_tool = EXODRONE_TOOL_MULTITOOL
|
||||
deep_scan_description = "Site is exposed to space radiation. Using self-diagnostic multiool attachment advised."
|
||||
description = "The drone feed suddenly goes haywire! It seems that the drone got hit by a burst of cosmic rays! You'll have to wait for the signal to be restored."
|
||||
has_tool_description = "Your multitool should allow a significant amount of the damage to be repaired on its own." //wait, what?
|
||||
has_tool_description = "Your multitool should allow a significant amount of the damage to be repaired on its own." //wait, what?
|
||||
no_tool_description = "Nothing more to be done than to wait and assess the damage."
|
||||
has_tool_action_text = "Wait"
|
||||
no_tool_action_text = "Wait"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// Simple event type that checks if you have a tool and after a retrieval delay adds loot to drone.
|
||||
/datum/exploration_event/simple/resource
|
||||
name = "retrievable resource"
|
||||
root_abstract_type = /datum/exploration_event/simple/resource
|
||||
abstract_type = /datum/exploration_event/simple/resource
|
||||
discovery_log = "Encountered recoverable resource."
|
||||
action_text = "Extract"
|
||||
/// Tool type required to recover this resource
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/// Trader events - If drone is loaded with X exchanges it for Y, might require translator tool.
|
||||
/datum/exploration_event/simple/trader
|
||||
root_abstract_type = /datum/exploration_event/simple/trader
|
||||
abstract_type = /datum/exploration_event/simple/trader
|
||||
action_text = "Trade"
|
||||
/// Obj path we'll take or list of paths ,one path will be picked from it at init
|
||||
var/required_path
|
||||
|
||||
@@ -120,7 +120,7 @@ GLOBAL_LIST_EMPTY(exploration_sites)
|
||||
. = list()
|
||||
for(var/event_type in subtypesof(/datum/exploration_event))
|
||||
var/datum/exploration_event/event = event_type
|
||||
if(initial(event.root_abstract_type) == event_type)
|
||||
if(initial(event.abstract_type) == event_type)
|
||||
continue
|
||||
event = new event_type
|
||||
.[event_type] = list("required" = event.required_site_traits,"blacklisted" = event.blacklisted_site_traits)
|
||||
|
||||
Reference in New Issue
Block a user