Removed turf_animation for now, ported vg hasproximity optimisation. Rewrite and refactor of how turfs handle icon updates, edge smoothing and

construction/deconstruction. Major map rework/changes.
This commit is contained in:
Zuhayr
2015-08-16 06:05:21 -07:00
parent 4a0a6e7163
commit c8baafed2a
91 changed files with 7763 additions and 8513 deletions
+4 -3
View File
@@ -80,7 +80,6 @@ By design, d1 is the smallest direction and d2 is the highest
d2 = text2num( copytext( icon_state, dash+1 ) )
var/turf/T = src.loc // hide if turf is not intact
if(level==1) hide(T.intact)
cable_list += src //add it to the global cable list
@@ -97,11 +96,13 @@ By design, d1 is the smallest direction and d2 is the highest
//If underfloor, hide the cable
/obj/structure/cable/hide(var/i)
if(level == 1 && istype(loc, /turf))
if(istype(loc, /turf))
invisibility = i ? 101 : 0
updateicon()
/obj/structure/cable/hides_under_flooring()
return 1
/obj/structure/cable/proc/updateicon()
icon_state = "[d1]-[d2]"
alpha = invisibility ? 127 : 255
-37
View File
@@ -1,37 +0,0 @@
/turf/simulated/floor/engine/attack_hand(var/mob/user as mob)
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
return
if (user.pulling.anchored)
return
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
return
if (ismob(user.pulling))
var/mob/M = user.pulling
var/atom/movable/t = M.pulling
M.stop_pulling()
step(user.pulling, get_dir(user.pulling.loc, src))
M.start_pulling(t)
else
step(user.pulling, get_dir(user.pulling.loc, src))
return
/turf/simulated/floor/engine/ex_act(severity)
switch(severity)
if(1.0)
ChangeTurf(get_base_turf(src.z))
qdel(src)
return
if(2.0)
if (prob(50))
ChangeTurf(get_base_turf(src.z))
qdel(src)
return
else
return
/turf/simulated/floor/engine/blob_act()
if (prob(25))
ChangeTurf(get_base_turf(src.z))
qdel(src)
return
return
@@ -10,6 +10,7 @@
unacidable = 1
use_power = 0
light_range = 4
flags = PROXMOVE
var/obj/machinery/field_generator/FG1 = null
var/obj/machinery/field_generator/FG2 = null
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
@@ -62,7 +63,7 @@
user.throw_at(target, 200, 4)
sleep(20)
hasShocked = 0
return
+5 -6
View File
@@ -27,12 +27,11 @@
return ..()
/obj/machinery/power/terminal/hide(var/i)
if(i)
invisibility = 101
icon_state = "term-f"
else
invisibility = 0
icon_state = "term"
invisibility = i ? 101 : 0
icon_state = i ? "term-f" : "term"
/obj/structure/power/terminal/hides_under_flooring()
return 1
// Needed so terminals are not removed from machines list.
// Powernet rebuilds need this to work properly.