Adds PoI loader landmarks

This commit is contained in:
Casey
2022-04-26 17:23:46 -04:00
committed by CHOMPStation2
parent 96ccd4af68
commit 35df5c5164
5 changed files with 20210 additions and 1 deletions

View File

@@ -0,0 +1,73 @@
var/global/list/global_used_pois = list()
/obj/effect/landmark/poi_loader
name = "PoI Loader"
var/size_x
var/size_y
var/poi_type = null
var/remove_from_pool = TRUE
/obj/effect/landmark/poi_loader/New()
INITIALIZE_IMMEDIATE(/obj/effect/landmark/poi_loader)
/obj/effect/landmark/poi_loader/Initialize()
src.load_poi()
return ..()
/obj/effect/landmark/poi_loader/proc/get_turfs_to_clean()
return block(locate(src.x, src.y, src.z), locate((src.x + size_x - 1), (src.y + size_y - 1), src.z))
/obj/effect/landmark/poi_loader/proc/annihilate_bounds()
//var/deleted_atoms = 0
//admin_notice("<span class='danger'>Annihilating objects in poi loading location.</span>", R_DEBUG)
var/list/turfs_to_clean = get_turfs_to_clean()
if(turfs_to_clean.len)
for(var/x in 1 to 2) // Requires two passes to get everything.
for(var/turf/T in turfs_to_clean)
for(var/atom/movable/AM in T)
//++deleted_atoms
qdel(AM)
//admin_notice("<span class='danger'>Annihilated [deleted_atoms] objects.</span>", R_DEBUG)
/obj/effect/landmark/poi_loader/proc/load_poi()
var/turf/T = get_turf(src)
if(!isturf(T))
to_world_log("[log_info_line(src)] not on a turf! Cannot place poi template.")
return
// Choose a poi
if(!poi_type)
return
if(!(global_used_pois.len) || !(global_used_pois[poi_type]))
global_used_pois[poi_type] = list()
var/list/poi_list = global_used_pois[poi_type]
for(var/map in SSmapping.map_templates)
var/template = SSmapping.map_templates[map]
if(istype(template, poi_type))
poi_list += template
var/datum/map_template/template_to_use = null
var/list/our_poi_list = global_used_pois[poi_type]
if(!our_poi_list.len)
return
else
template_to_use = pick(our_poi_list)
if(!template_to_use)
return
//admin_notice("<span class='danger'>Chosen Predefined PoI Map: [chosen_type.name]</span>", R_DEBUG)
if(remove_from_pool)
global_used_pois[poi_type] -= template_to_use
// Annihilate movable atoms
annihilate_bounds()
//CHECK_TICK //Don't let anything else happen for now
// Actually load it
template_to_use.load(T)

View File

@@ -511,6 +511,20 @@
desc = "Wilderness"
mappath = 'maps/groundbase/southwilds/southwilds2.dmm'
associated_map_datum = /datum/map_z_level/gb_lateload/gb_south_wilds
<<<<<<< HEAD
=======
/datum/map_template/gb_lateload/wilds/south/type3
name = "Southern Wilds 3"
desc = "Wilderness"
mappath = 'maps/groundbase/southwilds/southwilds3.dmm'
associated_map_datum = /datum/map_z_level/gb_lateload/gb_south_wilds
/datum/map_template/gb_lateload/wilds/south/type3/on_map_loaded(z)
. = ..()
// Using landmarks for this now.
//seed_submaps(list(Z_LEVEL_GB_WILD_S), 6, /area/submap/groundbase/poi/wildvillage/plot/square, /datum/map_template/groundbase/wildvillage/square) //POI seeding
//seed_submaps(list(Z_LEVEL_GB_WILD_S), 2, /area/submap/groundbase/poi/wildvillage/plot/wide, /datum/map_template/groundbase/wildvillage/wide)
//seed_submaps(list(Z_LEVEL_GB_WILD_S), 1, /area/submap/groundbase/poi/wildvillage/plot/long, /datum/map_template/groundbase/wildvillage/long)
>>>>>>> 6aa6c45620... Merge pull request #12842 from Heroman3003/poi-guarantee
/datum/map_template/gb_lateload/wilds/east/type1
name = "Eastern Wilds 1"

View File

@@ -885,7 +885,7 @@
name = "Cave 49"
mappath = 'pois/cave49c.dmm'
/datum/map_template/groundbase/maintcaves/cavething
/datum/map_template/groundbase/maintcaves/cavething
name = "Cavething 1"
mappath = 'pois/cavething1.dmm'
cost = 10
@@ -938,3 +938,148 @@
mappath = 'pois/cavething14.dmm'
cost = 3
allow_duplicates = FALSE
<<<<<<< HEAD
=======
/obj/effect/landmark/poi_loader/gb_square
name = "Square House Loader"
size_x = 12
size_y = 12
poi_type = /datum/map_template/groundbase/wildvillage/square
/obj/effect/landmark/poi_loader/gb_wide
name = "Wide House Loader"
size_x = 17
size_y = 12
poi_type = /datum/map_template/groundbase/wildvillage/wide
/obj/effect/landmark/poi_loader/gb_long
name = "Long House Loader"
size_x = 17
size_y = 24
poi_type = /datum/map_template/groundbase/wildvillage/long
/area/submap/groundbase/poi/wildvillage
name = "POI - Wilderness Village"
icon = 'icons/turf/areas_vr.dmi'
ambience = AMBIENCE_OUTPOST
flags = AREA_FLAG_IS_NOT_PERSISTENT
requires_power = 0
/area/submap/groundbase/poi/wildvillage/plot
icon_state = "grewhisqu"
/area/submap/groundbase/poi/wildvillage/plot/square
/area/submap/groundbase/poi/wildvillage/plot/wide
/area/submap/groundbase/poi/wildvillage/plot/long
/area/submap/groundbase/poi/wildvillage/square
name = "square building"
icon_state = "grewhisqu"
/area/submap/groundbase/poi/wildvillage/wide
name = "wide building"
icon_state = "grewhisqu"
/area/submap/groundbase/poi/wildvillage/long
name = "long building"
icon_state = "grewhisqu"
/datum/map_template/groundbase/wildvillage
name = "building"
mappath = null
cost = 1
allow_duplicates = FALSE
/datum/map_template/groundbase/wildvillage/square/square1
name = "square building 1"
mappath = 'southwilds/villagepois/square1.dmm'
/area/submap/groundbase/poi/wildvillage/square/square1
/datum/map_template/groundbase/wildvillage/square/square2
name = "square building 2"
mappath = 'southwilds/villagepois/square2.dmm'
/area/submap/groundbase/poi/wildvillage/square/square2
/datum/map_template/groundbase/wildvillage/square/square3
name = "square building 3"
mappath = 'southwilds/villagepois/square3.dmm'
/area/submap/groundbase/poi/wildvillage/square/square3
/datum/map_template/groundbase/wildvillage/square/square4
name = "square building 4"
mappath = 'southwilds/villagepois/square4.dmm'
/area/submap/groundbase/poi/wildvillage/square/square4
/datum/map_template/groundbase/wildvillage/square/square5
name = "square building 5"
mappath = 'southwilds/villagepois/square5.dmm'
/area/submap/groundbase/poi/wildvillage/square/square5
/datum/map_template/groundbase/wildvillage/square/square6
name = "square building 6"
mappath = 'southwilds/villagepois/square6.dmm'
/area/submap/groundbase/poi/wildvillage/square/square6
/datum/map_template/groundbase/wildvillage/square/square7
name = "square building 7"
mappath = 'southwilds/villagepois/square7.dmm'
/area/submap/groundbase/poi/wildvillage/square/square7
/datum/map_template/groundbase/wildvillage/square/square8
name = "square building 8"
mappath = 'southwilds/villagepois/square8.dmm'
/area/submap/groundbase/poi/wildvillage/square/square8
/datum/map_template/groundbase/wildvillage/square/square9
name = "square building 9"
mappath = 'southwilds/villagepois/square9.dmm'
/area/submap/groundbase/poi/wildvillage/square/square9
/datum/map_template/groundbase/wildvillage/square/square10
name = "square building 10"
mappath = 'southwilds/villagepois/square10.dmm'
/area/submap/groundbase/poi/wildvillage/square/square10
/datum/map_template/groundbase/wildvillage/square/square11
name = "square building 11"
mappath = 'southwilds/villagepois/square11.dmm'
/area/submap/groundbase/poi/wildvillage/square/square11
/datum/map_template/groundbase/wildvillage/square/square12
name = "square building 12"
mappath = 'southwilds/villagepois/square12.dmm'
/area/submap/groundbase/poi/wildvillage/square/square12
/datum/map_template/groundbase/wildvillage/wide/wide1
name = "wide building 1"
mappath = 'southwilds/villagepois/wide1.dmm'
/area/submap/groundbase/poi/wildvillage/wide/wide1
/datum/map_template/groundbase/wildvillage/wide/wide2
name = "wide building 2"
mappath = 'southwilds/villagepois/wide2.dmm'
/area/submap/groundbase/poi/wildvillage/wide/wide2
/datum/map_template/groundbase/wildvillage/wide/wide3
name = "wide building 3"
mappath = 'southwilds/villagepois/wide3.dmm'
/area/submap/groundbase/poi/wildvillage/wide/wide3
/datum/map_template/groundbase/wildvillage/wide/wide4
name = "wide building 4"
mappath = 'southwilds/villagepois/wide4.dmm'
/area/submap/groundbase/poi/wildvillage/wide/wide4
/datum/map_template/groundbase/wildvillage/wide/wide5
name = "wide building 5"
mappath = 'southwilds/villagepois/wide5.dmm'
/area/submap/groundbase/poi/wildvillage/wide/wide5
/datum/map_template/groundbase/wildvillage/wide/wide6
name = "wide building 6"
mappath = 'southwilds/villagepois/wide6.dmm'
/area/submap/groundbase/poi/wildvillage/wide/wide6
/datum/map_template/groundbase/wildvillage/long/long1
name = "long building 1"
mappath = 'southwilds/villagepois/long1.dmm'
/area/submap/groundbase/poi/wildvillage/long/long1
/datum/map_template/groundbase/wildvillage/long/long2
name = "long building 2"
mappath = 'southwilds/villagepois/long2.dmm'
/area/submap/groundbase/poi/wildvillage/long/long2
/datum/map_template/groundbase/wildvillage/wide/long3
name = "wide building 3"
mappath = 'southwilds/villagepois/long3.dmm'
/area/submap/groundbase/poi/wildvillage/long/long3
/datum/map_template/groundbase/wildvillage/wide/long4
name = "wide building 4"
mappath = 'southwilds/villagepois/long4.dmm'
/area/submap/groundbase/poi/wildvillage/long/long4
>>>>>>> 6aa6c45620... Merge pull request #12842 from Heroman3003/poi-guarantee

File diff suppressed because it is too large Load Diff

View File

@@ -1143,6 +1143,7 @@
#include "code\game\objects\effects\item_pickup_ghost.dm"
#include "code\game\objects\effects\job_start_landmarks.dm"
#include "code\game\objects\effects\landmarks.dm"
#include "code\game\objects\effects\landmarks_poi_vr.dm"
#include "code\game\objects\effects\landmarks_vr.dm"
#include "code\game\objects\effects\manifest.dm"
#include "code\game\objects\effects\mines.dm"