July 5th TG sync (#1883)

July 5th TG sync
This commit is contained in:
Poojawa
2017-07-05 22:14:19 -05:00
committed by GitHub
parent 454b9c3d68
commit b1b4826c0c
1264 changed files with 149689 additions and 570309 deletions
+165 -35
View File
@@ -11,20 +11,22 @@
obj_integrity = 25
var/ini_dir = null
var/state = WINDOW_OUT_OF_FRAME
var/reinf = 0
var/reinf = FALSE
var/heat_resistance = 800
var/decon_speed = 30
var/wtype = "glass"
var/fulltile = 0
var/fulltile = FALSE
var/glass_type = /obj/item/stack/sheet/glass
var/glass_amount = 1
var/mutable_appearance/crack_overlay
var/list/debris = list()
can_be_unanchored = 1
resistance_flags = ACID_PROOF
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 100)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
CanAtmosPass = ATMOS_PASS_PROC
var/real_explosion_block //ignore this, just use explosion_block
var/breaksound = "shatter"
var/hitsound = 'sound/effects/Glasshit.ogg'
/obj/structure/window/examine(mob/user)
..()
@@ -144,7 +146,7 @@
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
playsound(src, 'sound/effects/Glassknock.ogg', 50, 1)
/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(!can_be_reached(user))
@@ -157,7 +159,7 @@
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("[user] knocks on [src].")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
playsound(src, 'sound/effects/Glassknock.ogg', 50, 1)
/obj/structure/window/attack_paw(mob/user)
return attack_hand(user)
@@ -178,10 +180,10 @@
if(obj_integrity < max_integrity)
if(WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
playsound(loc, WT.usesound, 40, 1)
playsound(src, WT.usesound, 40, 1)
if(do_after(user, 40*I.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src, 'sound/items/Welder2.ogg', 50, 1)
update_nearby_icons()
to_chat(user, "<span class='notice'>You repair [src].</span>")
else
@@ -190,7 +192,7 @@
if(!(flags&NODECONSTRUCT))
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, I.usesound, 75, 1)
playsound(src, I.usesound, 75, 1)
if(reinf)
if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME)
to_chat(user, "<span class='notice'>You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...</span>")
@@ -214,19 +216,19 @@
else if (istype(I, /obj/item/weapon/crowbar) && reinf && (state == WINDOW_OUT_OF_FRAME || state == WINDOW_IN_FRAME))
to_chat(user, "<span class='notice'>You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...</span>")
playsound(loc, I.usesound, 75, 1)
playsound(src, I.usesound, 75, 1)
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME)
to_chat(user, "<span class='notice'>You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.</span>")
return
else if(istype(I, /obj/item/weapon/wrench) && !anchored)
playsound(loc, I.usesound, 75, 1)
playsound(src, I.usesound, 75, 1)
to_chat(user, "<span class='notice'> You begin to disassemble [src]...</span>")
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
G.add_fingerprint(user)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You successfully disassemble [src].</span>")
qdel(src)
return
@@ -265,18 +267,18 @@
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src, hitsound, 75, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/window/deconstruct(disassembled = TRUE)
if(QDELETED(src))
return
if(!disassembled)
playsound(src, "shatter", 70, 1)
playsound(src, breaksound, 70, 1)
var/turf/T = loc
if(!(flags & NODECONSTRUCT))
for(var/i in debris)
@@ -408,7 +410,6 @@
/obj/structure/window/GetExplosionBlock()
return reinf && fulltile ? real_explosion_block : 0
/obj/structure/window/unanchored
anchored = FALSE
@@ -416,21 +417,48 @@
name = "reinforced window"
desc = "A window that is reinforced with metal rods."
icon_state = "rwindow"
reinf = 1
reinf = TRUE
heat_resistance = 1600
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
max_integrity = 50
explosion_block = 1
glass_type = /obj/item/stack/sheet/rglass
/obj/structure/window/reinforced/unanchored
anchored = FALSE
/obj/structure/window/plasma
name = "plasma window"
desc = "A window made out of a plasma-silicate alloy. It looks insanely tough to break and burn through."
icon_state = "plasma_window"
reinf = FALSE
heat_resistance = 25000
armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 00, "acid" = 100)
max_integrity = 50
explosion_block = 1
glass_type = /obj/item/stack/sheet/glass/plasma
/obj/structure/window/plasma/unanchored
anchored = FALSE
/obj/structure/window/plasma/reinforced
name = "reinforced plasma window"
desc = "A window made out of a plasma-silicate alloy and a rod matrice. It looks hopelessly tough to break and is most likely nigh fireproof."
icon_state = "rplasmawindow"
reinf = TRUE
heat_resistance = 50000
armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
max_integrity = 100
explosion_block = 2
glass_type = /obj/item/stack/sheet/rglass/plasma
/obj/structure/window/plasma/reinforced/unanchored
anchored = FALSE
/obj/structure/window/reinforced/tinted
name = "tinted window"
icon_state = "twindow"
opacity = 1
/obj/structure/window/reinforced/tinted/frosted
name = "frosted window"
icon_state = "fwindow"
@@ -448,25 +476,52 @@
icon_state = "window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 50
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
glass_amount = 2
/obj/structure/window/fulltile/unanchored
anchored = FALSE
/obj/structure/window/plasma/fulltile
icon = 'icons/obj/smooth_structures/plasma_window.dmi'
icon_state = "plasma_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 60
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
glass_amount = 2
/obj/structure/window/plasma/fulltile/unanchored
anchored = FALSE
/obj/structure/window/plasma/reinforced/fulltile
icon = 'icons/obj/smooth_structures/rplasma_window.dmi'
icon_state = "rplasma_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 120
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
glass_amount = 2
/obj/structure/window/plasma/reinforced/fulltile/unanchored
anchored = FALSE
/obj/structure/window/reinforced/fulltile
icon = 'icons/obj/smooth_structures/reinforced_window.dmi'
icon_state = "r_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 100
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -475,10 +530,10 @@
icon_state = "r_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 1000
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -489,10 +544,10 @@
icon = 'icons/obj/smooth_structures/tinted_window.dmi'
icon_state = "tinted_window"
dir = FULLTILE_WINDOW_DIR
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile/)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -500,7 +555,7 @@
icon = 'icons/obj/smooth_structures/rice_window.dmi'
icon_state = "ice_window"
max_integrity = 150
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/reinforced/fulltile/ice)
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile,/obj/structure/window/reinforced/highpressure/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -512,11 +567,11 @@
dir = FULLTILE_WINDOW_DIR
max_integrity = 100
wtype = "shuttle"
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
reinf = 1
reinf = TRUE
heat_resistance = 1600
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
smooth = SMOOTH_TRUE
canSmoothWith = null
explosion_block = 1
@@ -537,7 +592,7 @@
icon_state = "clockwork_window_single"
resistance_flags = FIRE_PROOF | ACID_PROOF
max_integrity = 80
armor = list(melee = 60, bullet = 25, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
decon_speed = 40
glass_type = /obj/item/stack/tile/brass
@@ -549,9 +604,7 @@
if(fulltile)
made_glow = TRUE
..()
for(var/obj/item/I in debris)
debris -= I
qdel(I)
QDEL_LIST(debris)
var/amount_of_gears = 2
if(fulltile)
new /obj/effect/temp_visual/ratvar/window(get_turf(src))
@@ -591,7 +644,7 @@
icon_state = "clockwork_window"
smooth = SMOOTH_TRUE
canSmoothWith = null
fulltile = 1
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
dir = FULLTILE_WINDOW_DIR
max_integrity = 120
@@ -600,3 +653,80 @@
/obj/structure/window/reinforced/clockwork/fulltile/unanchored
anchored = FALSE
/obj/structure/window/paperframe
name = "paper frame"
desc = "A fragile separator made of thin wood and paper."
icon = 'icons/obj/smooth_structures/paperframes.dmi'
icon_state = "frame"
dir = FULLTILE_WINDOW_DIR
opacity = TRUE
max_integrity = 15
obj_integrity = 15
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/paperframe, /obj/structure/mineral_door/paperframe)
glass_amount = 2
glass_type = /obj/item/stack/sheet/paperframes
heat_resistance = 233
decon_speed = 10
CanAtmosPass = ATMOS_PASS_YES
resistance_flags = FLAMMABLE
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
breaksound = 'sound/items/poster_ripped.ogg'
hitsound = 'sound/weapons/slashmiss.ogg'
var/static/mutable_appearance/torn = mutable_appearance('icons/obj/smooth_structures/paperframes.dmi',icon_state = "torn", layer = ABOVE_OBJ_LAYER - 0.1)
var/static/mutable_appearance/paper = mutable_appearance('icons/obj/smooth_structures/paperframes.dmi',icon_state = "paper", layer = ABOVE_OBJ_LAYER - 0.1)
/obj/structure/window/paperframe/Initialize()
. = ..()
QDEL_LIST(debris)
var/papers = rand(1,4)
debris += new /obj/item/stack/sheet/mineral/wood()
for(var/i in 1 to papers)
debris += new /obj/item/weapon/paper/natural()
update_icon()
/obj/structure/window/paperframe/attack_hand(mob/user)
add_fingerprint(user)
if(user.a_intent != INTENT_HARM)
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("[user] knocks on [src].")
playsound(src, "pageturn", 50, 1)
else
take_damage(4,BRUTE,"melee", 0)
playsound(src, hitsound, 50, 1)
if(!QDELETED(src))
user.visible_message("<span class='danger'>[user] tears a hole in [src].</span>")
update_icon()
/obj/structure/window/paperframe/update_icon()
if(obj_integrity < max_integrity)
cut_overlay(paper)
add_overlay(torn)
set_opacity(FALSE)
else
cut_overlay(torn)
add_overlay(paper)
set_opacity(TRUE)
queue_smooth(src)
/obj/structure/window/paperframe/attackby(obj/item/weapon/W, mob/user)
if(W.is_hot())
fire_act(W.is_hot())
return
if(user.a_intent == INTENT_HARM)
return ..()
if(istype(W, /obj/item/weapon/paper) && obj_integrity < max_integrity)
user.visible_message("[user] starts to patch the holes in \the [src].")
if(do_after(user, 20, target = src))
obj_integrity = min(obj_integrity+4,max_integrity)
qdel(W)
user.visible_message("[user] patches some of the holes in \the [src].")
if(obj_integrity == max_integrity)
update_icon()
return
..()
update_icon()