mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
[MIRROR] Prevents using invalid materials on airlock assemblies [MDB IGNORE] (#12140)
* checks if airlock type actually exists (#65494) * Prevents using invalid materials on airlock assemblies Co-authored-by: GoblinBackwards <22856555+GoblinBackwards@users.noreply.github.com>
This commit is contained in:
co-authored by
GoblinBackwards
parent
3eae35833c
commit
410014518e
@@ -205,6 +205,10 @@
|
||||
if(!mineral)
|
||||
if(istype(G, /obj/item/stack/sheet/mineral) && G.sheettype)
|
||||
var/M = G.sheettype
|
||||
var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]")
|
||||
if(!ispath(mineralassembly))
|
||||
to_chat(user, span_warning("You cannot add [G] to [src]!"))
|
||||
return
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(src, 'sound/items/crowbar.ogg', 100, TRUE)
|
||||
user.visible_message(span_notice("[user] adds [G.name] to the airlock assembly."), \
|
||||
@@ -214,7 +218,6 @@
|
||||
return
|
||||
to_chat(user, span_notice("You install [M] plating into the airlock assembly."))
|
||||
G.use(2)
|
||||
var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]")
|
||||
var/obj/structure/door_assembly/MA = new mineralassembly(loc)
|
||||
|
||||
if(MA.noglass && glass) //in case the new door doesn't support glass. prevents the new one from reverting to a normal airlock after being constructed.
|
||||
|
||||
Reference in New Issue
Block a user