mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Persistent Map Vote Tallies (#86788)
## About The Pull Request Changes map votes to be based on a persistent tally count. Tallies for maps are cached between rounds and are added to by map votes. When a map is chosen, and it wasn't the only valid one, the tallies for said chosen map will be reset. Refactors map vote handling and moves it from SSmapping to SSmap_vote. Rock the Vote has been removed as a result of this refactor. ## Why It's Good For The Game Makes it more likely that all maps will be played over the course of a server instead of always being truly random. Removes some clutter off of SSmapping. 🆑 refactor: Map Votes are now carried over between rounds. When a map vote is actually a contest, the winning map will have its votes reset. /🆑
This commit is contained in:
@@ -111,7 +111,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
for(var/map in config.maplist)
|
||||
var/datum/map_config/VM = config.maplist[map]
|
||||
var/run = 0
|
||||
if(VM.map_name == SSmapping.config.map_name)
|
||||
if(VM.map_name == SSmapping.current_map.map_name)
|
||||
run++
|
||||
for(var/name in SSpersistence.saved_maps)
|
||||
if(VM.map_name == name)
|
||||
@@ -128,7 +128,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
saved_maps += mapstosave
|
||||
for(var/i = mapstosave; i > 1; i--)
|
||||
saved_maps[i] = saved_maps[i-1]
|
||||
saved_maps[1] = SSmapping.config.map_name
|
||||
saved_maps[1] = SSmapping.current_map.map_name
|
||||
var/json_file = file(FILE_RECENT_MAPS)
|
||||
var/list/file_data = list()
|
||||
file_data["data"] = saved_maps
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
saved_engravings = json["entries"]
|
||||
|
||||
if(!saved_engravings.len)
|
||||
log_world("Failed to load engraved messages on map [SSmapping.config.map_name]")
|
||||
log_world("Failed to load engraved messages on map [SSmapping.current_map.map_name]")
|
||||
return
|
||||
|
||||
var/list/viable_turfs = get_area_turfs(/area/station/maintenance, subtypes = TRUE) + get_area_turfs(/area/station/security/prison, subtypes = TRUE)
|
||||
@@ -42,7 +42,7 @@
|
||||
successfully_loaded_engravings++
|
||||
turfs_to_pick_from -= engraved_wall
|
||||
|
||||
log_world("Loaded [successfully_loaded_engravings] engraved messages on map [SSmapping.config.map_name]")
|
||||
log_world("Loaded [successfully_loaded_engravings] engraved messages on map [SSmapping.current_map.map_name]")
|
||||
|
||||
///Saves all new engravings in the world.
|
||||
/datum/controller/subsystem/persistence/proc/save_wall_engravings()
|
||||
|
||||
Reference in New Issue
Block a user