mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
[MIRROR] Correct instances of destroying baseturfs in ChangeTurf & Select dimensional anomaly theme [MDB IGNORE] (#19255)
* Correct instances of destroying baseturfs in ChangeTurf & Select dimensional anomaly theme * events --------- Co-authored-by: Jacquerel <hnevard@gmail.com> Co-authored-by: lessthnthree <three@lessthanthree.dk> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
Jacquerel
lessthnthree
Gandalf
parent
68b1ed193f
commit
f48b604aff
@@ -42,10 +42,12 @@
|
||||
|
||||
/**
|
||||
* Prepare a new area for transformation into a new theme.
|
||||
* Optionally pass in the typepath of an anomaly theme to use that one.
|
||||
*/
|
||||
/obj/effect/anomaly/dimensional/proc/prepare_area()
|
||||
var/datum/dimension_theme/themes = new()
|
||||
theme = themes.get_random_theme()
|
||||
/obj/effect/anomaly/dimensional/proc/prepare_area(new_theme_path)
|
||||
if (!new_theme_path)
|
||||
new_theme_path = pick(subtypesof(/datum/dimension_theme))
|
||||
theme = new new_theme_path()
|
||||
apply_theme_icon()
|
||||
|
||||
target_turfs = new()
|
||||
|
||||
@@ -32,13 +32,6 @@
|
||||
var/datum/material/using_mat = GET_MATERIAL_REF(material)
|
||||
window_colour = using_mat.greyscale_colors
|
||||
|
||||
/**
|
||||
* Returns a subtype of dimensional theme.
|
||||
*/
|
||||
/datum/dimension_theme/proc/get_random_theme()
|
||||
var/subtype = pick(subtypesof(/datum/dimension_theme))
|
||||
return new subtype()
|
||||
|
||||
/**
|
||||
* Applies themed transformation to the provided turf.
|
||||
*
|
||||
@@ -105,7 +98,7 @@
|
||||
/datum/dimension_theme/proc/transform_floor(turf/open/floor/affected_floor)
|
||||
if (replace_floors.len == 0)
|
||||
return FALSE
|
||||
affected_floor.ChangeTurf(pick_weight(replace_floors), flags = CHANGETURF_INHERIT_AIR)
|
||||
affected_floor.replace_floor(pick_weight(replace_floors), flags = CHANGETURF_INHERIT_AIR)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
@@ -191,6 +184,7 @@
|
||||
if (!permit_replace_material(thing))
|
||||
continue
|
||||
thing.set_custom_materials(custom_materials)
|
||||
thing.update_appearance(updates = UPDATE_ICON)
|
||||
|
||||
#undef PERMITTED_MATERIAL_REPLACE_TYPES
|
||||
|
||||
|
||||
Reference in New Issue
Block a user