Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+21 -32
View File
@@ -1,17 +1,12 @@
/obj/structure
icon = 'icons/obj/structures.dmi'
pressure_resistance = 8
obj_integrity = 300
max_integrity = 300
var/climb_time = 20
var/climb_stun = 2
var/climbable = FALSE
var/mob/structureclimber
var/broken = 0 //similar to machinery's stat BROKEN
/obj/structure/New()
if (!armor)
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
..()
if(smooth)
queue_smooth(src)
@@ -20,15 +15,28 @@
if(ticker)
cameranet.updateVisibility(src)
/obj/structure/blob_act(obj/effect/blob/B)
if(!density)
qdel(src)
if(prob(50))
qdel(src)
/obj/structure/Destroy()
if(ticker)
cameranet.updateVisibility(src)
if(opacity)
UpdateAffectingLights()
update_light()
if(smooth)
queue_smooth_neighbors(src)
return ..()
/obj/structure/mech_melee_attack(obj/mecha/M)
M.do_attack_animation(src)
if(M.damtype == BRUTE || M.damtype == BURN)
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
return 1
return 0
/obj/structure/attack_hand(mob/user)
. = ..()
add_fingerprint(user)
@@ -46,6 +54,10 @@
..()
add_fingerprint(usr)
/obj/structure/proc/deconstruct(forced = FALSE)
qdel(src)
/obj/structure/MouseDrop_T(atom/movable/O, mob/user)
. = ..()
if(!climbable)
@@ -54,9 +66,9 @@
if(user.canmove)
climb_structure(user)
return
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O))
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
return
if(iscyborg(user))
if(isrobot(user))
return
if(!user.drop_item())
return
@@ -71,7 +83,7 @@
var/adjusted_climb_time = climb_time
if(user.restrained()) //climbing takes twice as long when restrained.
adjusted_climb_time *= 2
if(isalien(user))
if(istype(user, /mob/living/carbon/alien))
adjusted_climb_time *= 0.25 //aliens are terrifyingly fast
structureclimber = user
if(do_mob(user, user, adjusted_climb_time))
@@ -87,26 +99,3 @@
user << "<span class='warning'>You fail to climb onto [src].</span>"
density = 1
structureclimber = null
/obj/structure/examine(mob/user)
..()
if(!(resistance_flags & INDESTRUCTIBLE))
if(resistance_flags & ON_FIRE)
user << "<span class='warning'>It's on fire!</span>"
if(broken)
user << "<span class='notice'>It looks broken.</span>"
var/examine_status = examine_status()
if(examine_status)
user << examine_status
/obj/structure/proc/examine_status() //An overridable proc, mostly for falsewalls.
var/healthpercent = (obj_integrity/max_integrity) * 100
switch(healthpercent)
if(100 to INFINITY)
return "It seems pristine and undamaged."
if(50 to 100)
return "It looks slightly damaged."
if(25 to 50)
return "It appears heavily damaged."
if(0 to 25)
return "<span class='warning'>It's falling apart!</span>"