mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 18:33:36 +00:00
Fixing stuff, it now should be ready.
This commit is contained in:
@@ -288,6 +288,8 @@
|
||||
|
||||
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
|
||||
|
||||
/datum/config_entry/flag/roundstart_vr //Will virtual reality missions be loaded?
|
||||
|
||||
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
|
||||
config_entry_value = 18000
|
||||
min_val = 0
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define INIT_ANNOUNCE(X) to_chat(world, "<span class='boldannounce'>[X]</span>"); log_world(X)
|
||||
|
||||
SUBSYSTEM_DEF(mapping)
|
||||
name = "Mapping"
|
||||
init_order = INIT_ORDER_MAPPING
|
||||
@@ -183,7 +185,6 @@ SUBSYSTEM_DEF(mapping)
|
||||
|
||||
z_list = SSmapping.z_list
|
||||
|
||||
#define INIT_ANNOUNCE(X) to_chat(world, "<span class='boldannounce'>[X]</span>"); log_world(X)
|
||||
/datum/controller/subsystem/mapping/proc/LoadGroup(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE)
|
||||
. = list()
|
||||
var/start_time = REALTIMEOFDAY
|
||||
@@ -267,7 +268,6 @@ SUBSYSTEM_DEF(mapping)
|
||||
msg += ", [FailedZs[I]]"
|
||||
msg += ". Yell at your server host!"
|
||||
INIT_ANNOUNCE(msg)
|
||||
#undef INIT_ANNOUNCE
|
||||
|
||||
GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
|
||||
@@ -450,14 +450,12 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
lvl_name = "[mapfile] custom"
|
||||
to_chat(usr,"<span class='notice'>Loading [lvl_name]...</span>")
|
||||
var/datum/map_template/template = new(mapfile, choice, ztraits)
|
||||
level = template.load_new_z()
|
||||
level = template.load_new_z(ztraits)
|
||||
else
|
||||
lvl_name = answer
|
||||
to_chat(usr,"<span class='notice'>Loading [lvl_name]...</span>")
|
||||
var/datum/map_template/template = new(lvl_name, choice, ztraits)
|
||||
level = template.load_new_z()
|
||||
else
|
||||
return
|
||||
var/datum/map_template/template = new(lvl_name, choice)
|
||||
level = template.load_new_z(ztraits)
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has loaded [lvl_name] [choice].")
|
||||
log_admin("Admin [key_name(usr)] has loaded [lvl_name] [choice].")
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
|
||||
/proc/createRandomZlevel(name = AWAY_MISSION_NAME, list/traits = list(ZTRAIT_AWAY = TRUE), list/potential_levels = potential_away_levels)
|
||||
if(GLOB.random_zlevels_generated[name] || !length(potential_levels))
|
||||
/proc/createRandomZlevel(name = AWAY_MISSION_NAME, list/traits = list(ZTRAIT_AWAY = TRUE), list/potential_levels = GLOB.potential_away_levels)
|
||||
if(GLOB.random_zlevels_generated[name])
|
||||
stack_trace("[name] level already generated.")
|
||||
return
|
||||
if(!length(potential_levels))
|
||||
stack_trace("No potential [name] level to load has been found.")
|
||||
return
|
||||
|
||||
to_chat(world, "<span class='boldannounce'>Loading [name]...</span>")
|
||||
var/start_time = REALTIMEOFDAY
|
||||
var/map = pick(potential_levels)
|
||||
load_new_z_level(map, name, traits)
|
||||
to_chat(world, "<span class='boldannounce'>[name] loaded.</span>")
|
||||
random_zlevels_generated[name] = TRUE
|
||||
if(!load_new_z_level(map, name, traits))
|
||||
INIT_ANNOUNCE("Failed to load [name]! map filepath: [map]!")
|
||||
return
|
||||
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
|
||||
GLOB.random_zlevels_generated[name] = TRUE
|
||||
|
||||
/proc/reset_gateway_spawns(reset = FALSE)
|
||||
for(var/obj/machinery/gateway/G in world)
|
||||
|
||||
@@ -123,4 +123,4 @@
|
||||
//❤ - Cyberboss
|
||||
/proc/load_new_z_level(file, name, list/traits)
|
||||
var/datum/map_template/template = new(file, name)
|
||||
template.load_new_z(traits)
|
||||
return template.load_new_z(traits)
|
||||
|
||||
@@ -288,6 +288,9 @@ MINIMUM_SECBORG_ALERT 3
|
||||
## Uncomment to load one of the missions from awaymissionconfig.txt at roundstart.
|
||||
#ROUNDSTART_AWAY
|
||||
|
||||
## Uncomment to load one of the virtual reality levels from vr_config at roundstart.
|
||||
#ROUNDSTART_VR
|
||||
|
||||
## How long the delay is before the Away Mission gate opens. Default is half an hour.
|
||||
## 600 is one minute.
|
||||
GATEWAY_DELAY 18000
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
#DO tick the associated code file for the virtual reality levels you are enabling. Otherwise, the map will be trying to reference objects which do not exist, which will cause runtime errors!
|
||||
|
||||
_maps/RandomZLevels/VR/murderdome.dmm
|
||||
_maps/RandomZLevels/VR/snowdin_VR.dm
|
||||
_maps/RandomZLevels/VR/syndicate_trainer.dm
|
||||
_maps/RandomZLevels/VR/snowdin_VR.dmm
|
||||
_maps/RandomZLevels/VR/syndicate_trainer.dmm
|
||||
Reference in New Issue
Block a user