mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Removes "/" from ends of map names in voting options (#29235)
* Attempt at fixing map names * Proper attempt * Fixing redundant string trim Co-authored-by: kanef <kanef9x@protonmail.com>
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
if(skipping < 3)
|
||||
var/fullpath = path+binary
|
||||
if(copytext(fullpath,-4,0) == ".dmb")
|
||||
all_maps[potential] = path + binary
|
||||
all_maps[copytext(potential,1,length(potential))] = path + binary // Makes key not have / at end, looks better in lists
|
||||
else
|
||||
binary = null
|
||||
continue
|
||||
@@ -103,7 +103,7 @@
|
||||
if(!binary)
|
||||
warning("Map folder [path] does not contain a valid byond binary, skipping.")
|
||||
else
|
||||
maps[potential] = path + binary
|
||||
maps[copytext(potential,1,length(potential))] = path + binary // Makes key not have / at end, looks better in lists
|
||||
binary = null
|
||||
recursion_limit--
|
||||
var/list/maplist = get_list_of_keys(maps)
|
||||
|
||||
@@ -471,7 +471,7 @@ var/datum/controller/gameticker/ticker
|
||||
choices.Add(key)
|
||||
var/mapname=pick(choices)
|
||||
vote.chosen_map = maps[mapname] // Hack, but at this point I could not give a shit.
|
||||
watchdog.chosen_map = copytext(mapname,1,(length(mapname)))
|
||||
watchdog.chosen_map = mapname
|
||||
log_game("Server chose [watchdog.chosen_map]!")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user