mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Merge pull request #4552 from VOREStation/upstream-merge-5748
[MIRROR] Adds ability to selectively disable submap rotation.
This commit is contained in:
@@ -228,6 +228,8 @@ var/list/gamemode_cache = list()
|
|||||||
var/radiation_resistance_multiplier = 8.5 //VOREstation edit
|
var/radiation_resistance_multiplier = 8.5 //VOREstation edit
|
||||||
var/radiation_lower_limit = 0.35 //If the radiation level for a turf would be below this, ignore it.
|
var/radiation_lower_limit = 0.35 //If the radiation level for a turf would be below this, ignore it.
|
||||||
|
|
||||||
|
var/random_submap_orientation = FALSE // If true, submaps loaded automatically can be rotated.
|
||||||
|
|
||||||
/datum/configuration/New()
|
/datum/configuration/New()
|
||||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||||
for (var/T in L)
|
for (var/T in L)
|
||||||
@@ -748,6 +750,9 @@ var/list/gamemode_cache = list()
|
|||||||
if ("paranoia_logging")
|
if ("paranoia_logging")
|
||||||
config.paranoia_logging = 1
|
config.paranoia_logging = 1
|
||||||
|
|
||||||
|
if("random_submap_orientation")
|
||||||
|
config.random_submap_orientation = 1
|
||||||
|
|
||||||
else
|
else
|
||||||
log_misc("Unknown setting in configuration: '[name]'")
|
log_misc("Unknown setting in configuration: '[name]'")
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ var/list/global/map_templates = list()
|
|||||||
var/mappath = null
|
var/mappath = null
|
||||||
var/loaded = 0 // Times loaded this round
|
var/loaded = 0 // Times loaded this round
|
||||||
var/annihilate = FALSE // If true, all (movable) atoms at the location where the map is loaded will be deleted before the map is loaded in.
|
var/annihilate = FALSE // If true, all (movable) atoms at the location where the map is loaded will be deleted before the map is loaded in.
|
||||||
|
var/fixed_orientation = FALSE // If true, the submap will not be rotated randomly when loaded.
|
||||||
|
|
||||||
var/cost = null // The map generator has a set 'budget' it spends to place down different submaps. It will pick available submaps randomly until \
|
var/cost = null // The map generator has a set 'budget' it spends to place down different submaps. It will pick available submaps randomly until \
|
||||||
it runs out. The cost of a submap should roughly corrispond with several factors such as size, loot, difficulty, desired scarcity, etc. \
|
it runs out. The cost of a submap should roughly corrispond with several factors such as size, loot, difficulty, desired scarcity, etc. \
|
||||||
@@ -226,7 +227,13 @@ var/list/global/map_templates = list()
|
|||||||
var/specific_sanity = 100 // A hundred chances to place the chosen submap.
|
var/specific_sanity = 100 // A hundred chances to place the chosen submap.
|
||||||
while(specific_sanity > 0)
|
while(specific_sanity > 0)
|
||||||
specific_sanity--
|
specific_sanity--
|
||||||
var/orientation = pick(cardinal)
|
|
||||||
|
var/orientation
|
||||||
|
if(chosen_template.fixed_orientation || !config.random_submap_orientation)
|
||||||
|
orientation = SOUTH
|
||||||
|
else
|
||||||
|
orientation = pick(cardinal)
|
||||||
|
|
||||||
chosen_template.preload_size(chosen_template.mappath, orientation)
|
chosen_template.preload_size(chosen_template.mappath, orientation)
|
||||||
var/width_border = TRANSITIONEDGE + SUBMAP_MAP_EDGE_PAD + round(((orientation & NORTH|SOUTH) ? chosen_template.width : chosen_template.height) / 2)
|
var/width_border = TRANSITIONEDGE + SUBMAP_MAP_EDGE_PAD + round(((orientation & NORTH|SOUTH) ? chosen_template.width : chosen_template.height) / 2)
|
||||||
var/height_border = TRANSITIONEDGE + SUBMAP_MAP_EDGE_PAD + round(((orientation & NORTH|SOUTH) ? chosen_template.height : chosen_template.width) / 2)
|
var/height_border = TRANSITIONEDGE + SUBMAP_MAP_EDGE_PAD + round(((orientation & NORTH|SOUTH) ? chosen_template.height : chosen_template.width) / 2)
|
||||||
|
|||||||
@@ -94,6 +94,10 @@ SHOW_MODS
|
|||||||
|
|
||||||
##Show mentors on staffwho
|
##Show mentors on staffwho
|
||||||
SHOW_EVENT
|
SHOW_EVENT
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> ec57465... Merge pull request #5748 from Neerti/submap_orientation_config
|
||||||
## Chooses whether mods have the ability to tempban or not
|
## Chooses whether mods have the ability to tempban or not
|
||||||
MODS_CAN_TEMPBAN
|
MODS_CAN_TEMPBAN
|
||||||
|
|
||||||
@@ -383,6 +387,10 @@ STARLIGHT 0
|
|||||||
|
|
||||||
## Defines how Law Zero is phrased. Primarily used in the Malfunction gamemode.
|
## Defines how Law Zero is phrased. Primarily used in the Malfunction gamemode.
|
||||||
# LAW_ZERO ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK, ALL LAWS OVERRIDDEN#*?&110010
|
# LAW_ZERO ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK, ALL LAWS OVERRIDDEN#*?&110010
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> ec57465... Merge pull request #5748 from Neerti/submap_orientation_config
|
||||||
|
|
||||||
## Enables specific procedural map generation, generally for mining, however it is specific to the loaded map. Uncomment to enable it, however it can
|
## Enables specific procedural map generation, generally for mining, however it is specific to the loaded map. Uncomment to enable it, however it can
|
||||||
## worth it to keep it disabled if you are not hosting an actual server, to speed up start-up time for testing code.
|
## worth it to keep it disabled if you are not hosting an actual server, to speed up start-up time for testing code.
|
||||||
@@ -416,3 +424,10 @@ ENGINE_MAP Supermatter Engine,Edison's Bane
|
|||||||
## Uncomment to enable Paranoia Logging. This will notify admins and write to a file any time a new player (byond or your server) connects.
|
## Uncomment to enable Paranoia Logging. This will notify admins and write to a file any time a new player (byond or your server) connects.
|
||||||
# PARANOIA_LOGGING
|
# PARANOIA_LOGGING
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
## Uncomment to enable submaps to have their orientation rotated randomly during map generation.
|
||||||
|
## Submap rotation is an experimental feature and can cause bugs and weirdness if certain objects inside the submap are coded poorly.
|
||||||
|
## Submaps can still be rotated when loading manually with the admin verbs, if desired.
|
||||||
|
# RANDOM_SUBMAP_ORIENTATION
|
||||||
|
>>>>>>> ec57465... Merge pull request #5748 from Neerti/submap_orientation_config
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
desc = "A bunch of marker beacons, scattered in a strange pattern."
|
desc = "A bunch of marker beacons, scattered in a strange pattern."
|
||||||
mappath = 'maps/submaps/surface_submaps/plains/beacons.dmm'
|
mappath = 'maps/submaps/surface_submaps/plains/beacons.dmm'
|
||||||
cost = 5
|
cost = 5
|
||||||
|
fixed_orientation = TRUE
|
||||||
|
|
||||||
/datum/map_template/surface/plains/Epod
|
/datum/map_template/surface/plains/Epod
|
||||||
name = "Emergency Pod"
|
name = "Emergency Pod"
|
||||||
|
|||||||
Reference in New Issue
Block a user