Files
Evandorf 4e2d34df8f New Away Site: Hiskyn Treasure Trove (#21324)
EDIT: This is complete and no longer a work in progress. I've tried to
make sure that everything is tested and working properly but if there
are issues please let me know.

This away site is intended to be a high risk, high reward, encounter.
I'm also attempting to increase its replayability by incorporating a
number of sections and submaps that will be newly generated each time.

Things added or changed:
- Additional traps and environmental hazards.
- Lava is now more deadly. It used to only set you on fire, now it will
burn you appropriately.
- Minor sprite fixes for uncommon elements for easier mapping; throwers,
step triggers.
- Map and associated files, submap json, landmarks, areas, ect.

---------

Signed-off-by: Evandorf <ej_denton@msn.com>
Co-authored-by: Kano <89972582+kano-dot@users.noreply.github.com>
2025-10-16 20:04:28 +00:00

46 lines
1.3 KiB
Plaintext

/obj/random
name = "random object"
desc = "This item type is used to spawn random objects at round-start"
icon = 'icons/obj/random.dmi'
icon_state = "need-sprite"
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
var/list/spawnlist
var/list/problist
var/has_postspawn
// creates a new object and deletes itself
/obj/random/Initialize()
. = ..()
if (!prob(spawn_nothing_percentage))
var/obj/spawned_item = spawn_item()
if(spawned_item)
spawned_item.pixel_x = pixel_x
spawned_item.pixel_y = pixel_y
if(has_postspawn)
post_spawn(spawned_item)
return INITIALIZE_HINT_QDEL
/obj/random/proc/post_spawn(obj/thing)
LOG_DEBUG("random_obj: [DEBUG_REF(src)] registered itself as having post_spawn, but did not override post_spawn()!")
// creates the random item
/obj/random/proc/spawn_item()
if(spawnlist)
var/itemtype = pick(spawnlist)
. = new itemtype(loc)
if(problist)
var/itemtype = pickweight(problist)
. = new itemtype(loc)
if (!.)
LOG_DEBUG("random_obj: [DEBUG_REF(src)] returned null item!")
/obj/random/single
name = "randomly spawned object"
desc = "This item type is used to randomly spawn a given object at round-start"
icon_state = "x3"
var/spawn_object = null