mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Adds PoI loader landmarks
This commit is contained in:
73
code/game/objects/effects/landmarks_poi_vr.dm
Normal file
73
code/game/objects/effects/landmarks_poi_vr.dm
Normal 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)
|
||||||
@@ -511,6 +511,20 @@
|
|||||||
desc = "Wilderness"
|
desc = "Wilderness"
|
||||||
mappath = 'maps/groundbase/southwilds/southwilds2.dmm'
|
mappath = 'maps/groundbase/southwilds/southwilds2.dmm'
|
||||||
associated_map_datum = /datum/map_z_level/gb_lateload/gb_south_wilds
|
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
|
/datum/map_template/gb_lateload/wilds/east/type1
|
||||||
name = "Eastern Wilds 1"
|
name = "Eastern Wilds 1"
|
||||||
|
|||||||
@@ -885,7 +885,7 @@
|
|||||||
name = "Cave 49"
|
name = "Cave 49"
|
||||||
mappath = 'pois/cave49c.dmm'
|
mappath = 'pois/cave49c.dmm'
|
||||||
|
|
||||||
/datum/map_template/groundbase/maintcaves/cavething
|
/datum/map_template/groundbase/maintcaves/cavething
|
||||||
name = "Cavething 1"
|
name = "Cavething 1"
|
||||||
mappath = 'pois/cavething1.dmm'
|
mappath = 'pois/cavething1.dmm'
|
||||||
cost = 10
|
cost = 10
|
||||||
@@ -938,3 +938,148 @@
|
|||||||
mappath = 'pois/cavething14.dmm'
|
mappath = 'pois/cavething14.dmm'
|
||||||
cost = 3
|
cost = 3
|
||||||
allow_duplicates = FALSE
|
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
|
||||||
|
|||||||
19976
maps/groundbase/southwilds/southwilds3.dmm
Normal file
19976
maps/groundbase/southwilds/southwilds3.dmm
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1143,6 +1143,7 @@
|
|||||||
#include "code\game\objects\effects\item_pickup_ghost.dm"
|
#include "code\game\objects\effects\item_pickup_ghost.dm"
|
||||||
#include "code\game\objects\effects\job_start_landmarks.dm"
|
#include "code\game\objects\effects\job_start_landmarks.dm"
|
||||||
#include "code\game\objects\effects\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\landmarks_vr.dm"
|
||||||
#include "code\game\objects\effects\manifest.dm"
|
#include "code\game\objects\effects\manifest.dm"
|
||||||
#include "code\game\objects\effects\mines.dm"
|
#include "code\game\objects\effects\mines.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user