added defines for window construction states and full window diagonal dir

added a proc to check for valid window location, added var/fulltile to windows instead of using a proc
added clockwork windoors and windows to brass recipes
added titanium glass and plastitanium glass, made glass types use recipes like other stacks, you can smelt the new glasses in the ORM
removed force from RCD and added NOBLUDGEON flag, fixing a bug where you couldn't deconstruct airlocks with an RCD
slight nerf to wielded fireaxe, does high damage to windows and grilles instead of insta-deleting them
deleted fullwindow.dm and moved windows to window.dm
added some feedback to placing glass on grilles
examining windoor assembly shows you can rotate it, examining windows show deconstruction hints and rotation
added cracks to windows, you can repair windows using a welding tool on help intent, slight buff to window health
added var/cancolor to windows and blacklists some windows from being auto-colored, window shards also get colored on narsie_act()
full windows now use icon smoothing system, windows now use the obj_integrity damage system
added is_glass_sheet() helper
This commit is contained in:
uraniummeltdown
2018-06-03 13:11:37 +04:00
parent 49e49591a1
commit 75bded82cf
40 changed files with 812 additions and 844 deletions
@@ -27,6 +27,10 @@
var/secure = FALSE //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed
/obj/structure/windoor_assembly/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to rotate it clockwise.</span>")
obj/structure/windoor_assembly/New(loc, set_dir)
..()
if(set_dir)
@@ -42,7 +46,7 @@ obj/structure/windoor_assembly/Destroy()
/obj/structure/windoor_assembly/Move()
var/turf/T = loc
. = ..()
..()
setDir(ini_dir)
move_update_air(T)
@@ -54,8 +58,17 @@ obj/structure/windoor_assembly/Destroy()
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
return !density
else
return 1
if(istype(mover, /obj/structure/window))
var/obj/structure/window/W = mover
if(!valid_window_location(loc, W.ini_dir))
return FALSE
else if(istype(mover, /obj/structure/windoor_assembly))
var/obj/structure/windoor_assembly/W = mover
if(!valid_window_location(loc, W.ini_dir))
return FALSE
else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir))
return FALSE
return 1
/obj/structure/windoor_assembly/CanAtmosPass(turf/T)
if(get_dir(loc, T) == dir)
@@ -317,9 +330,16 @@ obj/structure/windoor_assembly/Destroy()
if(usr.stat || !usr.canmove || usr.restrained())
return
if(anchored)
to_chat(usr, "It is fastened to the floor; therefore, you can't rotate it!")
return 0
setDir(turn(dir, 270))
to_chat(usr, "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>")
return FALSE
var/target_dir = turn(dir, 270)
if(!valid_window_location(loc, target_dir))
to_chat(usr, "<span class='warning'>[src] cannot be rotated in that direction!</span>")
return FALSE
setDir(target_dir)
ini_dir = dir
update_icon()
return TRUE