Merge remote-tracking branch 'upstream/master' into sec-rifle

This commit is contained in:
Fox-McCloud
2016-01-03 22:35:28 -05:00
170 changed files with 19726 additions and 18103 deletions
+13 -17
View File
@@ -17,6 +17,7 @@
/obj/structure/alien/resin
name = "resin"
desc = "Looks like some kind of thick resin."
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "resin"
density = 1
opacity = 1
@@ -24,51 +25,46 @@
canSmoothWith = list(/obj/structure/alien/resin)
var/health = 200
var/resintype = null
smooth = SMOOTH_TRUE
/obj/structure/alien/resin/New(location)
relativewall_neighbours()
..()
air_update_turf(1)
return
/obj/structure/alien/resin/Destroy()
var/turf/T = loc
loc = null
T.relativewall_neighbours()
return ..()
/obj/structure/alien/resin/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/structure/alien/resin/CanAtmosPass()
return !density
/obj/structure/alien/resin/wall
name = "resin wall"
desc = "Thick resin solidified into a wall."
icon_state = "wall0" //same as resin, but consistency ho!
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "resin" //same as resin, but consistency ho!
resintype = "wall"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
/obj/structure/alien/resin/wall/New()
..()
relativewall_neighbours()
/obj/structure/alien/resin/wall/BlockSuperconductivity()
return 1
/obj/structure/alien/resin/wall/shadowling //For chrysalis
name = "chrysalis wall"
desc = "Some sort of purple substance in an egglike shape. It pulses and throbs from within and seems impenetrable."
health = INFINITY
icon_state = "wall0"
/obj/structure/alien/resin/membrane
name = "resin membrane"
desc = "Resin just thin enough to let light pass through."
icon_state = "membrane0"
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
icon_state = "membrane"
opacity = 0
health = 120
resintype = "membrane"
/obj/structure/alien/resin/membrane/New()
relativewall_neighbours()
..()
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
/obj/structure/alien/resin/proc/healthcheck()
if(health <=0)
@@ -1,25 +0,0 @@
/obj/item/stack/tile/plasteel
name = "floor tiles"
gender = PLURAL
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon"
icon_state = "tile"
force = 6
materials = list(MAT_METAL=500)
throwforce = 10
throw_speed = 3
throw_range = 7
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
..()
src.pixel_x = rand(1, 14)
src.pixel_y = rand(1, 14)
return
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
if (istype(S,/turf/space))
S.ChangeTurf(/turf/simulated/floor/plating/airless)
else
S.ChangeTurf(/turf/simulated/floor/plating)
return
@@ -18,6 +18,8 @@
throw_range = 20
max_amount = 60
flags = CONDUCT
var/turf_type = null
var/mineralType = null
/*
* Grass
@@ -29,6 +31,7 @@
desc = "A patch of grass like they often use on golf courses"
icon_state = "tile_grass"
origin_tech = "biotech=1"
turf_type = /turf/simulated/floor/grass
/*
* Wood
@@ -39,6 +42,7 @@
singular_name = "wood floor tile"
desc = "an easy to fit wood floor tile"
icon_state = "tile-wood"
turf_type = /turf/simulated/floor/wood
/*
* Carpets
@@ -48,3 +52,22 @@
singular_name = "carpet"
desc = "A piece of carpet. It is the same size as a floor tile"
icon_state = "tile-carpet"
turf_type = /turf/simulated/floor/carpet
/*
* Plasteel
*/
/obj/item/stack/tile/plasteel
name = "floor tiles"
gender = PLURAL
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon."
icon_state = "tile"
force = 6
materials = list(MAT_METAL=500)
throwforce = 10
throw_speed = 3
throw_range = 7
flags = CONDUCT
turf_type = /turf/simulated/floor/plasteel
mineralType = "metal"
+2 -2
View File
@@ -105,7 +105,7 @@
user.visible_message("<span class='notice'>[user] shaves his facial hair clean with the [src].</span>", \
"<span class='notice'>You finish shaving with the [src]. Fast and clean!</span>")
H.f_style = "Shaved"
H.update_hair()
H.update_fhair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
else
var/turf/user_loc = user.loc
@@ -117,7 +117,7 @@
user.visible_message("<span class='danger'>[user] shaves off [H]'s facial hair with \the [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
H.f_style = "Shaved"
H.update_hair()
H.update_fhair()
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
if(user.zone_sel.selecting == "head")
if(!get_location_accessible(H, "head"))
@@ -40,18 +40,23 @@
if(crit_fail)
user << "\red The Bluespace generator isn't working."
return
if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!"
qdel(W)
var/obj/singularity/singulo = new /obj/singularity (get_turf(src))
singulo.energy = 300 //should make it a bit bigger~
message_admins("[key_name_admin(user)] detonated a bag of holding")
log_game("[key_name(user)] detonated a bag of holding")
qdel(src)
return
..()
else if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
var/response = alert(user, "Are you sure you want to put the bag of holding inside another bag of holding?","Are you sure you want to die?","Yes","No")
if(response == "Yes")
user.visible_message("<span class='warning'>[user] grins as he begins to put a Bag of Holding into a Bag of Holding!</span>", "<span class='warning'>You begin to put the Bag of Holding into the Bag of Holding!</span>")
if(do_after(user,30,target=src))
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user.visible_message("<span class='warning'>[user] erupts in evil laughter as he puts the Bag of Holding into another Bag of Holding!</span>", "<span class='warning'>You can't help yourself from laughing as you put the Bag of Holding into another Bag of Holding, complete darkness surrounding you</span>","<span class='warning'> You hear the sound of scientific evil brewing! </span>")
qdel(W)
var/obj/singularity/singulo = new /obj/singularity(get_turf(user))
singulo.energy = 300 //To give it a small boost
message_admins("[key_name_admin(user)] detonated a bag of holding <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
log_game("[key_name(user)] detonated a bag of holding")
qdel(src)
else
user.visible_message("After careful consideration, [user] has decided that putting a Bag of Holding inside another Bag of Holding would not yield the ideal outcome","You come to the realization that this might not be the greatest idea")
else
. = ..()
proc/failcheck(mob/user as mob)
if (prob(src.reliability)) return 1 //No failure
@@ -105,6 +105,7 @@
/obj/item/weapon/storage/belt/medical/response_team
/obj/item/weapon/storage/belt/medical/response_team/New()
..()
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
+6
View File
@@ -29,6 +29,10 @@
/obj/structure/New()
..()
if(smooth)
smooth_icon(src)
smooth_icon_neighbors(src)
icon_state = ""
if(climbable)
verbs += /obj/structure/proc/climb_on
if(ticker)
@@ -37,6 +41,8 @@
/obj/structure/Destroy()
if(ticker)
cameranet.updateVisibility(src)
if(smooth)
smooth_icon_neighbors(src)
return ..()
/obj/structure/proc/climb_on()
+58 -39
View File
@@ -10,7 +10,7 @@
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
anchored = 1
icon = 'icons/turf/walls.dmi'
icon = 'icons/turf/walls/wall.dmi'
var/mineral = "metal"
var/walltype = "metal"
var/opening = 0
@@ -19,36 +19,12 @@
canSmoothWith = list(
/turf/simulated/wall,
/turf/simulated/wall/r_wall,
/obj/structure/falsewall,
/obj/structure/falsewall/reinforced // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS.
)
/obj/structure/falsewall/New()
..()
relativewall_neighbours()
/obj/structure/falsewall/Destroy()
var/temploc = loc
loc = null
for(var/turf/simulated/wall/W in range(temploc,1))
W.relativewall()
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
return ..()
/obj/structure/falsewall/relativewall()
if(!density)
icon_state = "[walltype]fwall_open"
return
var/junction = findSmoothingNeighbors()
icon_state = "[walltype][junction]"
return
/obj/structure/falsewall/reinforced, // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS. //because we do smooth with real r-walls now
/turf/simulated/wall/rust,
/turf/simulated/wall/r_wall/rust)
smooth = SMOOTH_TRUE
/obj/structure/falsewall/attack_hand(mob/user)
if(opening)
@@ -75,17 +51,19 @@
/obj/structure/falsewall/proc/do_the_flick()
if(density)
flick("[walltype]fwall_opening", src)
smooth = SMOOTH_FALSE
clear_smooth_overlays()
icon_state = "fwall_opening"
else
flick("[walltype]fwall_closing", src)
icon_state = "fwall_closing"
/obj/structure/falsewall/update_icon(relativewall = 1)//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
/obj/structure/falsewall/update_icon()
if(density)
icon_state = "[walltype]0"
if(relativewall)
relativewall()
smooth = SMOOTH_TRUE
smooth_icon(src)
icon_state = ""
else
icon_state = "[walltype]fwall_open"
icon_state = "fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
@@ -147,6 +125,7 @@
/obj/structure/falsewall/reinforced
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls/reinforced_wall.dmi'
icon_state = "r_wall"
walltype = "rwall"
@@ -164,11 +143,13 @@
/obj/structure/falsewall/uranium
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon = 'icons/turf/walls/uranium_wall.dmi'
icon_state = ""
mineral = "uranium"
walltype = "uranium"
var/active = null
var/last_event = 0
canSmoothWith = list(/obj/structure/falsewall/uranium, /turf/simulated/wall/mineral/uranium)
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
radiate()
@@ -197,30 +178,39 @@
/obj/structure/falsewall/gold
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon = 'icons/turf/walls/gold_wall.dmi'
icon_state = ""
mineral = "gold"
walltype = "gold"
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/simulated/wall/mineral/gold)
/obj/structure/falsewall/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny."
icon = 'icons/turf/walls/silver_wall.dmi'
icon_state = ""
mineral = "silver"
walltype = "silver"
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/simulated/wall/mineral/silver)
/obj/structure/falsewall/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon = 'icons/turf/walls/diamond_wall.dmi'
icon_state = ""
mineral = "diamond"
walltype = "diamond"
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
/obj/structure/falsewall/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = ""
mineral = "plasma"
walltype = "plasma"
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/simulated/wall/mineral/plasma, /turf/simulated/wall/mineral/alien)
/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user, params)
if(is_hot(W) > 300)
@@ -240,13 +230,24 @@
if(exposed_temperature > 300)
burnbabyburn()
//-----------wtf?-----------start
/obj/structure/falsewall/alien
name = "alien wall"
desc = "A strange-looking alien wall."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = ""
mineral = "alien"
walltype = "alien"
canSmoothWith = list(/obj/structure/falsewall/alien, /turf/simulated/wall/mineral/alien)
/obj/structure/falsewall/clown
name = "bananium wall"
desc = "A wall with bananium plating. Honk!"
icon = 'icons/turf/walls/bananium_wall.dmi'
icon_state = ""
mineral = "clown"
walltype = "clown"
canSmoothWith = list(/obj/structure/falsewall/clown, /turf/simulated/wall/mineral/clown)
/obj/structure/falsewall/sandstone
name = "sandstone wall"
@@ -254,4 +255,22 @@
icon_state = ""
mineral = "sandstone"
walltype = "sandstone"
//------------wtf?------------end
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/simulated/wall/mineral/sandstone)
/obj/structure/falsewall/wood
name = "wooden wall"
desc = "A wall with wooden plating. Stiff."
icon = 'icons/turf/walls/wood_wall.dmi'
icon_state = ""
mineral = "wood"
walltype = "wood"
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
/obj/structure/falsewall/iron
name = "rough metal wall"
desc = "A wall with rough metal plating."
icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = ""
mineral = "metal"
walltype = "iron"
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
+49 -282
View File
@@ -13,7 +13,7 @@
/obj/structure/table
name = "table"
desc = "A square piece of metal standing on four metal legs. It can not move."
icon = 'icons/obj/structures.dmi'
icon = 'icons/obj/smooth_structures/table.dmi'
icon_state = "table"
density = 1
anchored = 1.0
@@ -25,12 +25,8 @@
var/flipped = 0
var/health = 100
var/busy = 0
/obj/structure/table/proc/update_adjacent()
for(var/direction in list(1,2,4,8,5,6,9,10))
if(locate(/obj/structure/table,get_step(src,direction)))
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
T.update_icon()
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
/obj/structure/table/New()
..()
@@ -38,11 +34,6 @@
if(T != src)
qdel(T)
update_icon()
update_adjacent()
/obj/structure/table/Destroy()
update_adjacent()
return ..()
/obj/structure/table/proc/destroy()
new parts(loc)
@@ -50,6 +41,10 @@
qdel(src)
/obj/structure/table/update_icon()
if(smooth && !flipped)
smooth_icon(src)
smooth_icon_neighbors(src)
if(flipped)
var/type = 0
var/tabledirs = 0
@@ -65,214 +60,9 @@
base = "rtable"
icon_state = "[base]flip[type]"
if (type==1)
if (tabledirs & turn(dir,90))
icon_state = icon_state+"-"
if (tabledirs & turn(dir,-90))
icon_state = icon_state+"+"
return 1
spawn(2) //So it properly updates when deleting
var/dir_sum = 0
for(var/direction in list(1,2,4,8,5,6,9,10))
var/skip_sum = 0
for(var/obj/structure/window/W in src.loc)
if(W.dir == direction) //So smooth tables don't go smooth through windows
skip_sum = 1
continue
var/inv_direction //inverse direction
switch(direction)
if(1)
inv_direction = 2
if(2)
inv_direction = 1
if(4)
inv_direction = 8
if(8)
inv_direction = 4
if(5)
inv_direction = 10
if(6)
inv_direction = 9
if(9)
inv_direction = 6
if(10)
inv_direction = 5
for(var/obj/structure/window/W in get_step(src,direction))
if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile
skip_sum = 1
continue
if(!skip_sum) //means there is a window between the two tiles in this direction
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
if(T && !T.flipped)
if(direction <5)
dir_sum += direction
else
if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north)
dir_sum += 16
if(direction == 6)
dir_sum += 32
if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal
dir_sum += 8
if(direction == 10)
dir_sum += 64
if(direction == 9)
dir_sum += 128
var/table_type = 0 //stand_alone table
if(dir_sum%16 in cardinal)
table_type = 1 //endtable
dir_sum %= 16
if(dir_sum%16 in list(3,12))
table_type = 2 //1 tile thick, streight table
if(dir_sum%16 == 3) //3 doesn't exist as a dir
dir_sum = 2
if(dir_sum%16 == 12) //12 doesn't exist as a dir.
dir_sum = 4
if(dir_sum%16 in list(5,6,9,10))
if(locate(/obj/structure/table,get_step(src.loc,dir_sum%16)))
table_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables)
else
table_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on)
dir_sum %= 16
if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection
table_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal
switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal
if(7)
if(dir_sum == 23)
table_type = 6
dir_sum = 8
else if(dir_sum == 39)
dir_sum = 4
table_type = 6
else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183)
dir_sum = 4
table_type = 3
else
dir_sum = 4
if(11)
if(dir_sum == 75)
dir_sum = 5
table_type = 6
else if(dir_sum == 139)
dir_sum = 9
table_type = 6
else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235)
dir_sum = 8
table_type = 3
else
dir_sum = 8
if(13)
if(dir_sum == 29)
dir_sum = 10
table_type = 6
else if(dir_sum == 141)
dir_sum = 6
table_type = 6
else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157)
dir_sum = 1
table_type = 3
else
dir_sum = 1
if(14)
if(dir_sum == 46)
dir_sum = 1
table_type = 6
else if(dir_sum == 78)
dir_sum = 2
table_type = 6
else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126)
dir_sum = 2
table_type = 3
else
dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state.
if(dir_sum%16 == 15)
table_type = 4 //4-way intersection, the 'middle' table sprites will be used.
if(istype(src,/obj/structure/table/reinforced))
switch(table_type)
if(0)
icon_state = "reinf_table"
if(1)
icon_state = "reinf_1tileendtable"
if(2)
icon_state = "reinf_1tilethick"
if(3)
icon_state = "reinf_tabledir"
if(4)
icon_state = "reinf_middle"
if(5)
icon_state = "reinf_tabledir2"
if(6)
icon_state = "reinf_tabledir3"
else if(istype(src,/obj/structure/table/woodentable/poker))
switch(table_type)
if(0)
icon_state = "pokertable_table"
if(1)
icon_state = "pokertable_1tileendtable"
if(2)
icon_state = "pokertable_1tilethick"
if(3)
icon_state = "pokertable_tabledir"
if(4)
icon_state = "pokertable_middle"
if(5)
icon_state = "pokertable_tabledir2"
if(6)
icon_state = "pokertable_tabledir3"
else if(istype(src,/obj/structure/table/woodentable))
switch(table_type)
if(0)
icon_state = "wood_table"
if(1)
icon_state = "wood_1tileendtable"
if(2)
icon_state = "wood_1tilethick"
if(3)
icon_state = "wood_tabledir"
if(4)
icon_state = "wood_middle"
if(5)
icon_state = "wood_tabledir2"
if(6)
icon_state = "wood_tabledir3"
else if(istype(src,/obj/structure/table/glass))
switch(table_type)
if(0)
icon_state = "glass_table"
if(1)
icon_state = "glass_table_1tileendtable"
if(2)
icon_state = "glass_table_1tilethick"
if(3)
icon_state = "glass_table_dir"
if(4)
icon_state = "glass_table_middle"
if(5)
icon_state = "glass_tabledir2"
if(6)
icon_state = "glass_tabledir3"
else
switch(table_type)
if(0)
icon_state = "table"
if(1)
icon_state = "table_1tileendtable"
if(2)
icon_state = "table_1tilethick"
if(3)
icon_state = "tabledir"
if(4)
icon_state = "table_middle"
if(5)
icon_state = "tabledir2"
if(6)
icon_state = "tabledir3"
if (dir_sum in list(1,2,4,8,5,6,9,10))
dir = dir_sum
else
dir = 2
/obj/structure/table/ex_act(severity)
switch(severity)
@@ -395,27 +185,30 @@
step(O, get_dir(O, src))
return
/obj/structure/table/proc/tablepush(obj/item/I, mob/user)
if(get_dist(src, user) < 2)
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='warning'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return 0
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='warning'>You need a better grip to do that!</span>"
return 0
if(!G.confirm())
return 0
G.affecting.forceMove(get_turf(src))
G.affecting.Weaken(5)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
add_logs(G.affecting, G.assailant, "pushed onto a table")
qdel(I)
return 1
qdel(I)
/obj/structure/table/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 < 2)
if(user.a_intent == I_HARM)
if (prob(15)) M.Weaken(5)
M.apply_damage(8,def_zone = "head")
visible_message("\red [G.assailant] slams [G.affecting]'s face against \the [src]!")
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
else
user << "\red You need a better grip to do that!"
return
else
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on \the [src].")
qdel(W)
return
if (istype(W, /obj/item/weapon/grab))
tablepush(W, user)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling table"
@@ -523,7 +316,6 @@
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,D))
T.flip(direction)
update_icon()
update_adjacent()
return 1
@@ -549,7 +341,6 @@
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,D))
T.unflip()
update_icon()
update_adjacent()
return 1
@@ -559,9 +350,11 @@
/obj/structure/table/woodentable
name = "wooden table"
desc = "Do not apply fire to this. Rumour says it burns easily."
icon = 'icons/obj/smooth_structures/wood_table.dmi'
icon_state = "wood_table"
parts = /obj/item/weapon/table_parts/wood
health = 50
canSmoothWith = list(/obj/structure/table/woodentable, /obj/structure/table/woodentable/poker)
/obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params)
@@ -574,20 +367,9 @@
if (istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
qdel(I)
tablepush(I, user)
return
if (istype(I, /obj/item/weapon/wrench))
user << "\blue Now disassembling the wooden table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -628,26 +410,17 @@
/obj/structure/table/woodentable/poker //No specialties, Just a mapping object.
name = "gambling table"
desc = "A seedy table for seedy dealings in seedy places."
icon = 'icons/obj/smooth_structures/poker_table.dmi'
icon_state = "pokertable"
canSmoothWith = list(/obj/structure/table/woodentable/poker, /obj/structure/table/woodentable)
/obj/structure/table/woodentable/poker/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
qdel(W)
tablepush(W, user)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling the wooden table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -721,38 +494,30 @@
/obj/structure/table/glass
name = "glass table"
desc = "Looks fragile. You should totally flip it. It is begging for it."
icon = 'icons/obj/smooth_structures/glass_table.dmi'
icon_state = "glass_table"
parts = /obj/item/weapon/table_parts/glass
health = 10
canSmoothWith = null
/obj/structure/table/glass/flip(var/direction)
src.collapse()
/obj/structure/table/glass/proc/collapse() //glass table collapse is called twice in this code, more efficent to just have a proc
src.visible_message("<span class='warning'>\The [src] shatters, and the frame collapses!</span>", "<span class='warning'>You hear metal collapsing and glass shattering.</span>")
playsound(src.loc, "shatter", 50, 1)
new /obj/item/weapon/table_parts/glass(loc)
new /obj/item/weapon/shard(loc)
if(prob(50)) //50% chance to spawn two shards
new /obj/item/weapon/shard(loc)
qdel(src)
/obj/structure/table/glass/tablepush(obj/item/I, mob/user)
if(..())
collapse()
/obj/structure/table/glass/attackby(obj/item/I as obj, mob/user as mob, params)
if (istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(7)
visible_message("<span class='warning'>[G.assailant] smashes [G.affecting] onto \the [src]!</span>")
qdel(I)
src.collapse()
tablepush(I, user)
return
if (istype(I, /obj/item/weapon/wrench))
@@ -800,10 +565,12 @@
/obj/structure/table/reinforced
name = "reinforced table"
desc = "A version of the four legged table. It is stronger."
icon_state = "reinf_table"
icon = 'icons/obj/smooth_structures/reinforced_table.dmi'
icon_state = "r_table"
health = 200
var/status = 2
parts = /obj/item/weapon/table_parts/reinforced
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
/obj/structure/table/reinforced/flip(var/direction)
if (status == 2)