mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes, improvements, suggestions.
This commit is contained in:
@@ -109,7 +109,7 @@ var/list/name_to_material
|
|||||||
icon_colour = "#666666"
|
icon_colour = "#666666"
|
||||||
|
|
||||||
/material/steel/holographic
|
/material/steel/holographic
|
||||||
name = "holographic [DEFAULT_WALL_MATERIAL]"
|
name = "holographic " + DEFAULT_WALL_MATERIAL
|
||||||
display_name = DEFAULT_WALL_MATERIAL
|
display_name = DEFAULT_WALL_MATERIAL
|
||||||
stack_type = null
|
stack_type = null
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
var/obj/structure/table/T = locate() in get_step(src,D)
|
var/obj/structure/table/T = locate() in get_step(src,D)
|
||||||
if(T && T.flipped == 0 && material && T.material && T.material.name == material.name)
|
if(T && T.flipped == 0 && material && T.material && T.material.name == material.name)
|
||||||
T.flip(direction)
|
T.flip(direction)
|
||||||
take_damage(rand(5, 20))
|
take_damage(rand(5, 10))
|
||||||
update_connections(1)
|
update_connections(1)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,7 @@
|
|||||||
M.apply_damage(8,def_zone = "head")
|
M.apply_damage(8,def_zone = "head")
|
||||||
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||||
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
|
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||||
|
take_damage(rand(1,5))
|
||||||
else
|
else
|
||||||
user << "<span class='danger'>You need a better grip to do that!</span>"
|
user << "<span class='danger'>You need a better grip to do that!</span>"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
var/can_reinforce = 1
|
var/can_reinforce = 1
|
||||||
var/can_plate = 1
|
var/can_plate = 1
|
||||||
|
|
||||||
|
var/manipulating = 0
|
||||||
var/material/material = null
|
var/material/material = null
|
||||||
var/material/reinforced = null
|
var/material/reinforced = null
|
||||||
|
|
||||||
@@ -131,6 +132,7 @@
|
|||||||
var/obj/item/weapon/weldingtool/F = W
|
var/obj/item/weapon/weldingtool/F = W
|
||||||
if(F.welding)
|
if(F.welding)
|
||||||
user << "<span class='notice'>You begin reparing damage to \the [src].</span>"
|
user << "<span class='notice'>You begin reparing damage to \the [src].</span>"
|
||||||
|
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||||
if(!do_after(user, 20) || !F.remove_fuel(1, user))
|
if(!do_after(user, 20) || !F.remove_fuel(1, user))
|
||||||
return
|
return
|
||||||
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>",
|
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>",
|
||||||
@@ -192,37 +194,52 @@
|
|||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
user << "<span class='warning'>You cannot [verb]e \the [src] with \the [S].</span>"
|
user << "<span class='warning'>You cannot [verb]e \the [src] with \the [S].</span>"
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
if(manipulating) return M
|
||||||
|
manipulating = 1
|
||||||
user << "<span class='notice'>You begin [verb]ing \the [src] with [M.display_name].</span>"
|
user << "<span class='notice'>You begin [verb]ing \the [src] with [M.display_name].</span>"
|
||||||
if(!do_after(user, 20) || !S.use(1))
|
if(!do_after(user, 20) || !S.use(1))
|
||||||
|
manipulating = 0
|
||||||
return null
|
return null
|
||||||
user.visible_message("<span class='notice'>\The [user] [verb]es \the [src] with [M.display_name].</span>", "<span class='notice'>You finish [verb]ing \the [src].</span>")
|
user.visible_message("<span class='notice'>\The [user] [verb]es \the [src] with [M.display_name].</span>", "<span class='notice'>You finish [verb]ing \the [src].</span>")
|
||||||
|
manipulating = 0
|
||||||
return M
|
return M
|
||||||
|
|
||||||
// Returns the material to set the table to.
|
// Returns the material to set the table to.
|
||||||
/obj/structure/table/proc/common_material_remove(mob/user, material/M, delay, what, type_holding)
|
/obj/structure/table/proc/common_material_remove(mob/user, material/M, delay, what, type_holding, sound)
|
||||||
if(!M.stack_type)
|
if(!M.stack_type)
|
||||||
user << "<span class='warning'>You are unable to remove the [what] from this table!</span>"
|
user << "<span class='warning'>You are unable to remove the [what] from this table!</span>"
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
if(manipulating) return M
|
||||||
|
manipulating = 1
|
||||||
user.visible_message("<span class='notice'>\The [user] begins removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>",
|
user.visible_message("<span class='notice'>\The [user] begins removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>",
|
||||||
"<span class='notice'>You begin removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>")
|
"<span class='notice'>You begin removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>")
|
||||||
|
if(sound)
|
||||||
|
playsound(src.loc, sound, 50, 1)
|
||||||
if(!do_after(user, 40))
|
if(!do_after(user, 40))
|
||||||
|
manipulating = 0
|
||||||
return M
|
return M
|
||||||
user.visible_message("<span class='notice'>\The [user] removes the [M.display_name] [what] from \the [src].</span>",
|
user.visible_message("<span class='notice'>\The [user] removes the [M.display_name] [what] from \the [src].</span>",
|
||||||
"<span class='notice'>You remove the [M.display_name] [what] from \the [src].</span>")
|
"<span class='notice'>You remove the [M.display_name] [what] from \the [src].</span>")
|
||||||
new M.stack_type(src.loc)
|
new M.stack_type(src.loc)
|
||||||
|
manipulating = 0
|
||||||
return null
|
return null
|
||||||
|
|
||||||
/obj/structure/table/proc/remove_reinforced(obj/item/weapon/screwdriver/S, mob/user)
|
/obj/structure/table/proc/remove_reinforced(obj/item/weapon/screwdriver/S, mob/user)
|
||||||
reinforced = common_material_remove(user, reinforced, 40, "reinforcements", "screws")
|
reinforced = common_material_remove(user, reinforced, 40, "reinforcements", "screws", 'sound/items/Screwdriver.ogg')
|
||||||
|
|
||||||
/obj/structure/table/proc/remove_material(obj/item/weapon/wrench/W, mob/user)
|
/obj/structure/table/proc/remove_material(obj/item/weapon/wrench/W, mob/user)
|
||||||
material = common_material_remove(user, material, 20, "plating", "bolts")
|
material = common_material_remove(user, material, 20, "plating", "bolts", 'sound/items/Ratchet.ogg')
|
||||||
|
|
||||||
/obj/structure/table/proc/dismantle(obj/item/weapon/wrench/W, mob/user)
|
/obj/structure/table/proc/dismantle(obj/item/weapon/wrench/W, mob/user)
|
||||||
|
if(manipulating) return
|
||||||
|
manipulating = 1
|
||||||
user.visible_message("<span class='notice'>\The [user] begins dismantling \the [src].</span>",
|
user.visible_message("<span class='notice'>\The [user] begins dismantling \the [src].</span>",
|
||||||
"<span class='notice'>You begin dismantling \the [src].</span>")
|
"<span class='notice'>You begin dismantling \the [src].</span>")
|
||||||
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
if(!do_after(user, 20))
|
if(!do_after(user, 20))
|
||||||
|
manipulating = 0
|
||||||
return
|
return
|
||||||
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>",
|
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>",
|
||||||
"<span class='notice'>You dismantle \the [src].</span>")
|
"<span class='notice'>You dismantle \the [src].</span>")
|
||||||
@@ -276,7 +293,7 @@
|
|||||||
var/tabledirs = 0
|
var/tabledirs = 0
|
||||||
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
|
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
|
||||||
var/obj/structure/table/T = locate(/obj/structure/table ,get_step(src,direction))
|
var/obj/structure/table/T = locate(/obj/structure/table ,get_step(src,direction))
|
||||||
if (T && T.flipped == 1 && T.dir == src.dir && T.material.name == material.name)
|
if (T && T.flipped == 1 && T.dir == src.dir && material && T.material && T.material.name == material.name)
|
||||||
type++
|
type++
|
||||||
tabledirs |= direction
|
tabledirs |= direction
|
||||||
|
|
||||||
@@ -353,7 +370,7 @@
|
|||||||
for(var/obj/structure/table/T in oview(src, 1))
|
for(var/obj/structure/table/T in oview(src, 1))
|
||||||
var/T_dir = get_dir(src, T)
|
var/T_dir = get_dir(src, T)
|
||||||
if(T_dir in blocked_dirs) continue
|
if(T_dir in blocked_dirs) continue
|
||||||
if(material.name == T.material.name && flipped == T.flipped)
|
if(material && T.material && material.name == T.material.name && flipped == T.flipped)
|
||||||
connection_dirs |= T_dir
|
connection_dirs |= T_dir
|
||||||
if(propagate)
|
if(propagate)
|
||||||
spawn(0)
|
spawn(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user