Skip to content

Commit

Permalink
Use full typepath
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Jun 2, 2024
1 parent 92d8d9e commit 4e61427
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/monkestation/ruins.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[oldstation]
["/datum/map_template/ruin/space/oldstation"]
always_place = true
10 changes: 3 additions & 7 deletions monkestation/code/datums/ruins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ GLOBAL_LIST_INIT(ruin_config, load_ruin_config())
log_config("ruin token config file is empty, using empty config.")
return
for(var/ruin_config_id in ruin_config)
if(!istext(ruin_config_id))
var/ruin_path = text2path(ruin_config_id)
if(!ispath(ruin_path, /datum/map_template/ruin))
continue
for(var/datum/map_template/ruin/ruin_type as anything in subtypesof(/datum/map_template/ruin))
var/ruin_id = ruin_type::id
if(istext(ruin_id) && cmptext(ruin_config_id, ruin_id))
.[ruin_type] = ruin_config[ruin_config_id]
log_config("Loaded ruin overrides for [ruin_id] ([ruin_type]).")
break
.[ruin_path] = ruin_config[ruin_config_id]

#undef RUIN_CONFIG_FILE

0 comments on commit 4e61427

Please sign in to comment.