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:
kane-f
2021-04-19 09:50:54 +01:00
committed by GitHub
parent 3c47b1c825
commit c68c0fb6d5
2 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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]!")