mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-09 00:52:09 +00:00
* refactor: Enforce ruin cost as factor of ruin size. * remove cost-related comment * bump up space ruin numbers based on testing * remove old lavaland_ruin_budget setting * one more tiny tweak down * Update config/example/config.toml Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> * Update config/example/config.toml Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> --------- Signed-off-by: warriorstar-orion <orion@snowfrost.garden> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
34 lines
1.4 KiB
Plaintext
34 lines
1.4 KiB
Plaintext
/datum/map_template/ruin
|
|
//name = "A Chest of Doubloons"
|
|
name = null
|
|
var/id = null // For blacklisting purposes, all ruins need an id
|
|
var/description = "In the middle of a clearing in the rockface, there's a \
|
|
chest filled with gold coins with Spanish engravings. How is there a \
|
|
wooden container filled with 18th century coinage in the middle of a \
|
|
lavawracked hellscape? It is clearly a mystery."
|
|
|
|
var/unpickable = FALSE //If TRUE these won't be placed automatically (can still be forced or loaded with another ruin)
|
|
var/always_place = FALSE //Will skip the whole weighting process and just plop this down, ideally you want the ruins of this kind to have no cost.
|
|
var/placement_weight = 1 //How often should this ruin appear
|
|
var/allow_duplicates = TRUE
|
|
var/list/never_spawn_with = null //If this ruin is spawned these will not eg list(/datum/map_template/ruin/base_alternate)
|
|
|
|
var/prefix = null
|
|
var/suffix = null
|
|
|
|
/datum/map_template/ruin/New()
|
|
if(!name && id)
|
|
name = id
|
|
|
|
mappath = prefix + suffix
|
|
..(path = mappath)
|
|
|
|
/// The cost of a ruin is the square root of the product of its dimensions.
|
|
/// This encodes the size of the ruin relative to each other without the
|
|
/// numbers getting ridiculous.
|
|
/datum/map_template/ruin/proc/get_cost()
|
|
if(!width || !height)
|
|
CRASH("cost of [name]/[suffix] requested before loaded size")
|
|
|
|
return floor(sqrt(width * height))
|