mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Glass table port from /tg/ (#9412)
* Adds glass tables to the requisite files, and icons. All lovingly borrowstolen from /tg/ * Adds glass table_part sprites. Adds special glass table breaking code for tableslammers. Changes some recycling datums to properly give back glass. * Flipped states for tables! Thank you DragonBro for spriting them! Adds some kicking action. * forgot to edit its material return recipe * fixes shitcode, same problem as before but its been moved to destroying the table. * EVERYONE BUT ME CAN GO TO HELL. ME AND MRSTONEDONE WHO SAID WHAT TO ME WHEN I WAS CRYING FOR HELP. * changes some chatter * Adds painful critical failure consequences for kicking over glass tables * cl * Changes meltpoint to silicon? * Incorporates changes from PJB3005 * trailing return * seems like a trailing return to me but ok * Adds a glass hit sound for flipping * Forgot to remove the shatter ogg * tweaking flip to destroy rates * changes do_flip() to flip() * "Removing kick_act" * Rewrites all the previous code related to kick and flip behavior and replaces it with health. * It's 2:03 in the morning and not only does it compile, it works. Its missing the damage to mob features the previous iteration had but FUCK YOU. * Sanity changes if(health <= 0) to if(health <= 0 && istype(src, /obj/structure/table/glass)) Regular tables don't have any code for harm intent but just in case, I don't want them producing glass shards when they're broken! * removes var/budgemute = 0 that I added in an earlier iteration and no longer is needed. * Hiding the diffs with smooth improvements to hide incompetence.
This commit is contained in:
@@ -735,6 +735,17 @@
|
||||
melt_temperature=MELTPOINT_STEEL
|
||||
flags = FPRINT
|
||||
siemens_coefficient = 1
|
||||
|
||||
/obj/item/weapon/table_parts/glass
|
||||
name = "glass table parts"
|
||||
desc = "Glass table parts for the spaceman with style."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "glass_tableparts"
|
||||
starting_materials = list(MAT_GLASS = 3750)
|
||||
w_type = RECYK_GLASS
|
||||
melt_temperature=MELTPOINT_GLASS
|
||||
flags = FPRINT
|
||||
siemens_coefficient = 0 //copying from glass sheets and shards even if its bad balance
|
||||
|
||||
/obj/item/weapon/table_parts/wood
|
||||
name = "wooden table parts"
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Table Parts
|
||||
*/
|
||||
@@ -27,12 +25,20 @@
|
||||
qdel(src)
|
||||
else if (rods.amount < 4)
|
||||
to_chat(user, "<span class='warning'>You need at least four rods to do this.</span>")
|
||||
if (istype(W, /obj/item/stack/sheet/glass/glass))
|
||||
var/obj/item/stack/sheet/glass/glass = W
|
||||
if (glass.amount >= 1)
|
||||
new /obj/item/weapon/table_parts/glass( user.loc )
|
||||
to_chat(user, "<span class='notice'>You add glass panes to \the [name].</span>")
|
||||
glass.use(1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
|
||||
new /obj/structure/table( user.loc )
|
||||
user.drop_item(src, force_drop = 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -91,6 +97,21 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/*
|
||||
* Glass
|
||||
*/
|
||||
|
||||
/obj/item/weapon/table_parts/glass/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (iswrench(W))
|
||||
new /obj/item/stack/sheet/glass/glass( user.loc )
|
||||
new /obj/item/stack/sheet/metal( user.loc )
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/table_parts/glass/attack_self(mob/user as mob)
|
||||
new /obj/structure/table/glass( user.loc )
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Rack Parts
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Tables
|
||||
*/
|
||||
@@ -45,6 +46,13 @@
|
||||
update_adjacent()
|
||||
..()
|
||||
|
||||
/obj/structure/table/glass/proc/checkhealth()
|
||||
if(health <= 0)
|
||||
playsound(get_turf(src), "shatter", 50, 1)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/table_parts(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.destroy)
|
||||
src.ex_act(1)
|
||||
@@ -80,6 +88,8 @@
|
||||
base = "wood"
|
||||
if (istype(src, /obj/structure/table/reinforced))
|
||||
base = "rtable"
|
||||
if (istype(src, /obj/structure/table/glass))
|
||||
base = "glasstable"
|
||||
|
||||
icon_state = "[base]flip[type]"
|
||||
if (type==1)
|
||||
@@ -247,6 +257,11 @@
|
||||
if(!usr) return
|
||||
do_flip()
|
||||
|
||||
/obj/structure/table/glass/kick_act()
|
||||
health -= 5
|
||||
checkhealth()
|
||||
..()
|
||||
|
||||
/obj/structure/table/blob_act()
|
||||
if(prob(75))
|
||||
destroy()
|
||||
@@ -356,8 +371,9 @@
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
if (G.state < 2)
|
||||
if (G.state < GRAB_AGGRESSIVE)
|
||||
if(user.a_intent == I_HURT)
|
||||
G.affecting.forceMove(loc)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = "head")
|
||||
visible_message("<span class='warning'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||
@@ -366,7 +382,7 @@
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
else
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.forceMove(loc)
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("<span class='warning'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
||||
returnToPool(W)
|
||||
@@ -413,6 +429,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/table/verb/do_flip()
|
||||
set name = "Flip table"
|
||||
set desc = "Flips a non-reinforced table"
|
||||
@@ -582,6 +599,57 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Glass
|
||||
*/
|
||||
|
||||
/obj/structure/table/glass
|
||||
name = "glass table"
|
||||
desc = "A standard table with a fine glass finish."
|
||||
icon_state = "glass_table"
|
||||
parts = /obj/item/weapon/table_parts/glass
|
||||
health = 30
|
||||
|
||||
/obj/structure/table/glass/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
if (G.state < GRAB_AGGRESSIVE)
|
||||
if(user.a_intent == I_HURT)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(15,def_zone = "head")
|
||||
visible_message("<span class='warning'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||
playsound(get_turf(src), 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||
playsound(get_turf(src), "shatter", 50, 1) //WRESTLEMANIA tax
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
new /obj/item/weapon/table_parts(src.loc)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
else
|
||||
G.affecting.forceMove(loc)
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("<span class='warning'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
||||
returnToPool(W)
|
||||
|
||||
else if (user.a_intent == I_HURT)
|
||||
user.delayNextAttack(10)
|
||||
health -= W.force
|
||||
user.visible_message("<span class='warning'>\The [user] hits \the [src] with \the [W].</span>", \
|
||||
"<span class='warning'>You hit \the [src] with \the [W].</span>")
|
||||
playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
checkhealth()
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Racks
|
||||
*/
|
||||
|
||||
6
html/changelogs/Probe1.yml
Normal file
6
html/changelogs/Probe1.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
author: Probe1
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: Ports glass tables from /tg/ with lots of new sprites thanks to Dragonbro.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 85 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 164 KiB |
Reference in New Issue
Block a user