ore_vent
Vars | |
artifact_chance | Percent chance that this vent will produce an artifact boulder. |
---|---|
boulder_icon_state | What base icon_state do we use for this vent's boulders? |
boulder_size | What size boulders does this vent produce? |
defending_mobs | A list of mobs that can be spawned by this vent during a wave defense event. |
discovered | Has this vent been scanned by a mining scanner? Cannot be scanned again. Adds ores to the vent's description. |
excavation_warning | What string do we use to warn the player about the excavation event? |
icon_state_tapped | What icon_state do we use when the ore vent has been tapped? |
manual_vent_cooldown | We use a cooldown to prevent players from tapping boulders rapidly from vents. |
mineral_breakdown | A weighted list of what minerals are contained in this vent, with weight determining how likely each mineral is to be picked in produced boulders. |
node | Reference to this ore vent's NODE drone, to track wave success. |
ore_string | String containing the formatted list of ores that this vent can produce, and who first discovered this vent. |
ore_vent_options | Associated list of vent size weights to pick from. |
scanning_equipment | What items can be used to scan a vent? |
spawn_drone_on_tap | Does this vent spawn a node drone when tapped? Currently unique to boss vents so try not to VV it. |
tapped | Has this vent been tapped to produce boulders? Cannot be untapped. |
unique_vent | Is this type of vent exempt from the map's vent budget/limit? Think the free iron/glass vent or boss vents. This also causes it to not roll for random mineral breakdown. |
wave_cooldown | We use a cooldown to prevent the wave defense from being started multiple times. |
Procs | |
add_mineral_overlays | Adds floating temp_visual overlays to the vent, showcasing what minerals are contained within it. If undiscovered, adds a single overlay with the icon_state "unknown". |
anti_cheese | When the ore vent cannot spawn a mob due to being blocked from all sides, we cause some MILD, MILD explosions. Explosion matches a gibtonite light explosion, as a way to clear nearby solid structures, with a high likelihood of breaking the NODE drone. |
generate_description | Generates a description of the ore vent to ore_string, based on the minerals contained within it. Ore_string is passed to examine(). |
generate_mineral_breakdown | This proc is called when the ore vent is initialized, in order to determine what minerals boulders it spawns can contain. The materials available are determined by SSore_generation.ore_vent_minerals, which is a list of all minerals that can be contained in ore vents for a given cave generation. As a result, minerals use a weighted list as seen by ore_vent_minerals_lavaland, which is then copied to ore_vent_minerals. Once a material is picked from the weighted list, it's removed from ore_vent_minerals, so that it can't be picked again and provided its own internal weight used when assigning minerals to boulders spawned by this vent. May also be called after the fact, as seen in SSore_generation's initialize, to add more minerals to an existing vent. |
handle_wave_conclusion | Called when the wave defense event ends, after a variable amount of time in start_wave_defense. |
initiate_wave_loss | Handles reseting our ore vent to its original state so we can start over |
initiate_wave_win | Handles winning the event, gives everyone a payout and start boulder production |
log_mob_killed | Handle logging for mobs killed |
log_mob_spawned | Handle logging for mobs spawned |
ore_quantity_function | Returns the quantity of mineral sheets in each ore vent's boulder contents roll. First roll can produce the most ore, with subsequent rolls scaling lower logarithmically. Inversely scales with ore_floor, so that the first roll is the largest, and subsequent rolls are smaller. (1 -> from 16 to 7 sheets of materials, and 3 -> from 8 to 6 sheets of materials on a small vent) This also means a large boulder can highroll a boulder with a full stack of 50 sheets of material. @params ore_floor The number of minerals already rolled. Used to scale the logarithmic function. |
pre_wave_defense | This confirms that the user wants to start the wave defense event, and that they can start it. |
produce_boulder | Here is where we handle producing a new boulder, based on the qualities of this ore vent. Returns the boulder produced. @params apply_cooldown Should we apply a cooldown to producing boulders? Default's false, used by manual boulder production (goldgrubs, golems, etc). |
reset_drone | Sends our node back to base and cleans up after the reference |
scan_and_confirm | Called when the ore vent is tapped by a scanning device. Gives a readout of the ores available in the vent that gets added to the description, then asks the user if they want to start wave defense if it's already been discovered. @params user The user who tapped the vent. @params mech_scan If TRUE, will bypass interaction checks to allow mechs to be able to begin the wave defense. |
start_wave_defense | Starts the wave defense event, which will spawn a number of lavaland mobs based on the size of the ore vent. Called after the vent has been tapped by a scanning device. Will summon a number of waves of mobs, ending in the vent being tapped after the final wave. |
Var Details
artifact_chance
Percent chance that this vent will produce an artifact boulder.
boulder_icon_state
What base icon_state do we use for this vent's boulders?
boulder_size
What size boulders does this vent produce?
defending_mobs
A list of mobs that can be spawned by this vent during a wave defense event.
discovered
Has this vent been scanned by a mining scanner? Cannot be scanned again. Adds ores to the vent's description.
excavation_warning
What string do we use to warn the player about the excavation event?
icon_state_tapped
What icon_state do we use when the ore vent has been tapped?
manual_vent_cooldown
We use a cooldown to prevent players from tapping boulders rapidly from vents.
mineral_breakdown
A weighted list of what minerals are contained in this vent, with weight determining how likely each mineral is to be picked in produced boulders.
node
Reference to this ore vent's NODE drone, to track wave success.
ore_string
String containing the formatted list of ores that this vent can produce, and who first discovered this vent.
ore_vent_options
Associated list of vent size weights to pick from.
scanning_equipment
What items can be used to scan a vent?
spawn_drone_on_tap
Does this vent spawn a node drone when tapped? Currently unique to boss vents so try not to VV it.
tapped
Has this vent been tapped to produce boulders? Cannot be untapped.
unique_vent
Is this type of vent exempt from the map's vent budget/limit? Think the free iron/glass vent or boss vents. This also causes it to not roll for random mineral breakdown.
wave_cooldown
We use a cooldown to prevent the wave defense from being started multiple times.
Proc Details
add_mineral_overlays
Adds floating temp_visual overlays to the vent, showcasing what minerals are contained within it. If undiscovered, adds a single overlay with the icon_state "unknown".
anti_cheese
When the ore vent cannot spawn a mob due to being blocked from all sides, we cause some MILD, MILD explosions. Explosion matches a gibtonite light explosion, as a way to clear nearby solid structures, with a high likelihood of breaking the NODE drone.
generate_description
Generates a description of the ore vent to ore_string, based on the minerals contained within it. Ore_string is passed to examine().
generate_mineral_breakdown
This proc is called when the ore vent is initialized, in order to determine what minerals boulders it spawns can contain. The materials available are determined by SSore_generation.ore_vent_minerals, which is a list of all minerals that can be contained in ore vents for a given cave generation. As a result, minerals use a weighted list as seen by ore_vent_minerals_lavaland, which is then copied to ore_vent_minerals. Once a material is picked from the weighted list, it's removed from ore_vent_minerals, so that it can't be picked again and provided its own internal weight used when assigning minerals to boulders spawned by this vent. May also be called after the fact, as seen in SSore_generation's initialize, to add more minerals to an existing vent.
The above applies only when spawning in at mapload, otherwise we pick randomly from ore_vent_minerals_lavaland.
@params new_minerals How many minerals should be added to this vent? Defaults to MINERAL_TYPE_OPTIONS_RANDOM, which is 4. @params map_loading Is this vent being spawned in at mapload? If so, we use the ore_generation subsystem's ore_vent_minerals list to pick minerals. Otherwise, we pick randomly from ore_vent_minerals_lavaland.
handle_wave_conclusion
Called when the wave defense event ends, after a variable amount of time in start_wave_defense.
If the node drone is still alive, the ore vent is tapped and the ore vent will begin generating boulders. If the node drone is dead, the ore vent is not tapped and the wave defense can be reattempted.
Also gives xp and mining points to all nearby miners in equal measure. Arguments:
- force: Set to true if you want to just skip all checks and make the vent start producing boulders.
initiate_wave_loss
Handles reseting our ore vent to its original state so we can start over
initiate_wave_win
Handles winning the event, gives everyone a payout and start boulder production
log_mob_killed
Handle logging for mobs killed
log_mob_spawned
Handle logging for mobs spawned
ore_quantity_function
Returns the quantity of mineral sheets in each ore vent's boulder contents roll. First roll can produce the most ore, with subsequent rolls scaling lower logarithmically. Inversely scales with ore_floor, so that the first roll is the largest, and subsequent rolls are smaller. (1 -> from 16 to 7 sheets of materials, and 3 -> from 8 to 6 sheets of materials on a small vent) This also means a large boulder can highroll a boulder with a full stack of 50 sheets of material. @params ore_floor The number of minerals already rolled. Used to scale the logarithmic function.
pre_wave_defense
This confirms that the user wants to start the wave defense event, and that they can start it.
produce_boulder
Here is where we handle producing a new boulder, based on the qualities of this ore vent. Returns the boulder produced. @params apply_cooldown Should we apply a cooldown to producing boulders? Default's false, used by manual boulder production (goldgrubs, golems, etc).
reset_drone
Sends our node back to base and cleans up after the reference
scan_and_confirm
Called when the ore vent is tapped by a scanning device. Gives a readout of the ores available in the vent that gets added to the description, then asks the user if they want to start wave defense if it's already been discovered. @params user The user who tapped the vent. @params mech_scan If TRUE, will bypass interaction checks to allow mechs to be able to begin the wave defense.
start_wave_defense
Starts the wave defense event, which will spawn a number of lavaland mobs based on the size of the ore vent. Called after the vent has been tapped by a scanning device. Will summon a number of waves of mobs, ending in the vent being tapped after the final wave.