mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge remote-tracking branch 'upstream/master' into disco-inferno
# Conflicts: # code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
bloodiness = MAX_SHOE_BLOODINESS
|
||||
blood_state = BLOOD_STATE_XENO
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xeno/splatter
|
||||
random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
|
||||
amount = 2
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno
|
||||
name = "xeno gibs"
|
||||
desc = "Gnarly..."
|
||||
|
||||
@@ -58,4 +58,4 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/oil/streak
|
||||
random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
|
||||
amount = 2
|
||||
amount = 2
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
return
|
||||
|
||||
/obj/effect/overlay/beam//Not actually a projectile, just an effect.
|
||||
name="beam"
|
||||
icon='icons/effects/beam.dmi'
|
||||
icon_state="b_beam"
|
||||
name = "beam"
|
||||
icon = 'icons/effects/beam.dmi'
|
||||
icon_state = "b_beam"
|
||||
var/tmp/atom/BeamSource
|
||||
New()
|
||||
..()
|
||||
spawn(10)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/overlay/beam/New()
|
||||
..()
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/overlay/palmtree_r
|
||||
name = "Palm tree"
|
||||
@@ -51,168 +51,6 @@
|
||||
icon_state = "admin"
|
||||
layer = 4.1
|
||||
|
||||
/obj/effect/overlay/temp
|
||||
anchored = 1
|
||||
layer = 4.1
|
||||
mouse_opacity = 0
|
||||
var/duration = 10
|
||||
var/randomdir = 1
|
||||
|
||||
/obj/effect/overlay/temp/New()
|
||||
if(randomdir)
|
||||
dir = pick(cardinal)
|
||||
|
||||
flick("[icon_state]", src) //Because we might be pulling it from a pool, flick whatever icon it uses so it starts at the start of the icon's animation.
|
||||
|
||||
spawn(duration)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/overlay/temp/revenant
|
||||
name = "spooky lights"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "purplesparkles"
|
||||
|
||||
/obj/effect/overlay/temp/revenant/cracks
|
||||
name = "glowing cracks"
|
||||
icon_state = "purplecrack"
|
||||
duration = 6
|
||||
|
||||
/obj/effect/overlay/temp/guardian
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/guardian/phase
|
||||
duration = 5
|
||||
icon_state = "phasein"
|
||||
|
||||
/obj/effect/overlay/temp/guardian/phase/out
|
||||
icon_state = "phaseout"
|
||||
|
||||
/obj/effect/overlay/temp/emp
|
||||
name = "emp sparks"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "empdisable"
|
||||
|
||||
/obj/effect/overlay/temp/emp/pulse
|
||||
name = "emp pulse"
|
||||
icon_state = "emppulse"
|
||||
duration = 8
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed
|
||||
name = "healing glow"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "heal"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/heal/New(loc, colour)
|
||||
..()
|
||||
pixel_x = rand(-12, 12)
|
||||
pixel_y = rand(-9, 0)
|
||||
if(colour)
|
||||
color = colour
|
||||
|
||||
/obj/effect/overlay/temp/kinetic_blast
|
||||
name = "kinetic explosion"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "kinetic_blast"
|
||||
layer = 4.1
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/explosion
|
||||
name = "explosion"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
duration = 8
|
||||
|
||||
/obj/effect/overlay/temp/explosion/fast
|
||||
icon_state = "explosionfast"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/overlay/temp/decoy
|
||||
desc = "It's a decoy!"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/decoy/New(loc, atom/mimiced_atom)
|
||||
..()
|
||||
alpha = initial(alpha)
|
||||
if(mimiced_atom)
|
||||
name = mimiced_atom.name
|
||||
appearance = mimiced_atom.appearance
|
||||
dir = mimiced_atom.dir
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/overlay/temp/decoy/fading/New(loc, atom/mimiced_atom)
|
||||
..()
|
||||
animate(src, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/overlay/temp/cult
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
randomdir = 0
|
||||
duration = 10
|
||||
|
||||
/obj/effect/overlay/temp/cult/sparks
|
||||
randomdir = 1
|
||||
name = "blood sparks"
|
||||
icon_state = "bloodsparkles"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/New(loc, set_dir)
|
||||
if(set_dir)
|
||||
setDir(set_dir)
|
||||
..()
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
layer = MOB_LAYER - 0.1
|
||||
color = "#C80000"
|
||||
var/splatter_type = "splatter"
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter/New(loc, set_dir, blood_color)
|
||||
if(blood_color)
|
||||
color = blood_color
|
||||
if(set_dir in diagonals)
|
||||
icon_state = "[splatter_type][pick(1, 2, 6)]"
|
||||
else
|
||||
icon_state = "[splatter_type][pick(3, 4, 5)]"
|
||||
..()
|
||||
var/target_pixel_x = 0
|
||||
var/target_pixel_y = 0
|
||||
switch(set_dir)
|
||||
if(NORTH)
|
||||
target_pixel_y = 16
|
||||
if(SOUTH)
|
||||
target_pixel_y = -16
|
||||
layer = MOB_LAYER + 0.1
|
||||
if(EAST)
|
||||
target_pixel_x = 16
|
||||
if(WEST)
|
||||
target_pixel_x = -16
|
||||
if(NORTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = 16
|
||||
if(NORTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = 16
|
||||
if(SOUTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = -16
|
||||
layer = MOB_LAYER + 0.1
|
||||
if(SOUTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = -16
|
||||
layer = MOB_LAYER + 0.1
|
||||
animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/overlay/temp/dir_setting/bloodsplatter/xenosplatter
|
||||
color = null
|
||||
splatter_type = "xsplatter"
|
||||
|
||||
/obj/effect/overlay/wall_rot
|
||||
name = "Wallrot"
|
||||
desc = "Ick..."
|
||||
@@ -226,68 +64,3 @@
|
||||
..()
|
||||
pixel_x += rand(-10, 10)
|
||||
pixel_y += rand(-10, 10)
|
||||
/obj/effect/overlay/temp/cult
|
||||
randomdir = 0
|
||||
duration = 10
|
||||
|
||||
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
|
||||
/obj/effect/overlay/temp/cult/sparks
|
||||
randomdir = 1
|
||||
name = "blood sparks"
|
||||
icon_state = "bloodsparkles"
|
||||
|
||||
/obj/effect/overlay/temp/cult/phase
|
||||
name = "phase glow"
|
||||
duration = 7
|
||||
icon_state = "cultin"
|
||||
|
||||
/obj/effect/overlay/temp/cult/phase/New(loc, set_dir)
|
||||
..()
|
||||
if(set_dir)
|
||||
dir = set_dir
|
||||
|
||||
/obj/effect/overlay/temp/cult/phase/out
|
||||
icon_state = "cultout"
|
||||
|
||||
/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed
|
||||
name = "healing glow"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "heal"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/heal/New(loc, colour)
|
||||
..()
|
||||
pixel_x = rand(-12, 12)
|
||||
pixel_y = rand(-9, 0)
|
||||
if(colour)
|
||||
color = colour
|
||||
|
||||
/obj/effect/overlay/temp/cult/sac
|
||||
name = "maw of Nar-Sie"
|
||||
icon_state = "sacconsume"
|
||||
|
||||
/obj/effect/overlay/temp/cult/door
|
||||
name = "unholy glow"
|
||||
icon_state = "doorglow"
|
||||
layer = 3.17 //above closed doors
|
||||
|
||||
/obj/effect/overlay/temp/cult/door/unruned
|
||||
icon_state = "unruneddoorglow"
|
||||
|
||||
/obj/effect/overlay/temp/cult/turf
|
||||
name = "unholy glow"
|
||||
icon_state = "wallglow"
|
||||
layer = TURF_LAYER + 0.07
|
||||
|
||||
/obj/effect/overlay/temp/cult/turf/open/floor
|
||||
icon_state = "floorglow"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/overlay/temp/shieldflash
|
||||
icon_state = "shield-flash"
|
||||
duration = 3
|
||||
|
||||
/obj/effect/overlay/temp/shieldflash/New(var/flash_color)
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
//temporary visual effects(/obj/effect/temp_visual) used by cult stuff
|
||||
/obj/effect/temp_visual/cult
|
||||
icon = 'icons/effects/cult_effects.dmi'
|
||||
randomdir = FALSE
|
||||
duration = 10
|
||||
|
||||
/obj/effect/temp_visual/cult/sparks
|
||||
randomdir = TRUE
|
||||
name = "blood sparks"
|
||||
icon_state = "bloodsparkles"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/cult/phase
|
||||
name = "phase glow"
|
||||
duration = 7
|
||||
icon = 'icons/effects/cult_effects.dmi'
|
||||
icon_state = "cultin"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/cult/phase/out
|
||||
icon_state = "cultout"
|
||||
|
||||
/obj/effect/temp_visual/cult/sac
|
||||
name = "maw of Nar-Sie"
|
||||
icon_state = "sacconsume"
|
||||
|
||||
/obj/effect/temp_visual/cult/door
|
||||
name = "unholy glow"
|
||||
icon_state = "doorglow"
|
||||
layer = 3.17 //above closed doors
|
||||
|
||||
/obj/effect/temp_visual/cult/door/unruned
|
||||
icon_state = "unruneddoorglow"
|
||||
|
||||
/obj/effect/temp_visual/cult/turf
|
||||
name = "unholy glow"
|
||||
icon_state = "wallglow"
|
||||
layer = TURF_LAYER + 0.07
|
||||
|
||||
/obj/effect/temp_visual/cult/turf/open/floor
|
||||
icon_state = "floorglow"
|
||||
duration = 5
|
||||
@@ -0,0 +1,204 @@
|
||||
/obj/effect/temp_visual/dir_setting/bloodsplatter
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
layer = MOB_LAYER - 0.1
|
||||
color = "#C80000"
|
||||
var/splatter_type = "splatter"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/bloodsplatter/New(loc, set_dir, blood_color)
|
||||
if(blood_color)
|
||||
color = blood_color
|
||||
if(set_dir in diagonals)
|
||||
icon_state = "[splatter_type][pick(1, 2, 6)]"
|
||||
else
|
||||
icon_state = "[splatter_type][pick(3, 4, 5)]"
|
||||
..()
|
||||
var/target_pixel_x = 0
|
||||
var/target_pixel_y = 0
|
||||
switch(set_dir)
|
||||
if(NORTH)
|
||||
target_pixel_y = 16
|
||||
if(SOUTH)
|
||||
target_pixel_y = -16
|
||||
layer = MOB_LAYER + 0.1
|
||||
if(EAST)
|
||||
target_pixel_x = 16
|
||||
if(WEST)
|
||||
target_pixel_x = -16
|
||||
if(NORTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = 16
|
||||
if(NORTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = 16
|
||||
if(SOUTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = -16
|
||||
layer = MOB_LAYER + 0.1
|
||||
if(SOUTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = -16
|
||||
layer = MOB_LAYER + 0.1
|
||||
animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter
|
||||
color = null
|
||||
splatter_type = "xsplatter"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/speedbike_trail
|
||||
name = "speedbike trails"
|
||||
icon_state = "ion_fade"
|
||||
duration = 10
|
||||
randomdir = FALSE
|
||||
layer = MOB_LAYER - 0.2
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/ninja
|
||||
name = "ninja shadow"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "uncloak"
|
||||
duration = 9
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/ninja/cloak
|
||||
icon_state = "cloak"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/ninja/shadow
|
||||
icon_state = "shadow"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/ninja/phase
|
||||
name = "ninja energy"
|
||||
icon_state = "phasein"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/ninja/phase/out
|
||||
icon_state = "phaseout"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/wraith
|
||||
name = "blood"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "phase_shift2"
|
||||
duration = 12
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/wraith/out
|
||||
icon_state = "phase_shift"
|
||||
|
||||
/obj/effect/temp_visual/wizard
|
||||
name = "water"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "reappear"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/temp_visual/wizard/out
|
||||
icon_state = "liquify"
|
||||
duration = 12
|
||||
|
||||
/obj/effect/temp_visual/monkeyify
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "h2monkey"
|
||||
duration = 22
|
||||
|
||||
/obj/effect/temp_visual/monkeyify/humanify
|
||||
icon_state = "monkey2h"
|
||||
|
||||
/obj/effect/temp_visual/borgflash
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "blspell"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/temp_visual/guardian
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/temp_visual/guardian/phase
|
||||
duration = 5
|
||||
icon_state = "phasein"
|
||||
|
||||
/obj/effect/temp_visual/guardian/phase/out
|
||||
icon_state = "phaseout"
|
||||
|
||||
/obj/effect/temp_visual/decoy
|
||||
desc = "It's a decoy!"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/temp_visual/decoy/New(loc, atom/mimiced_atom)
|
||||
..()
|
||||
alpha = initial(alpha)
|
||||
if(mimiced_atom)
|
||||
name = mimiced_atom.name
|
||||
appearance = mimiced_atom.appearance
|
||||
setDir(mimiced_atom.dir)
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/temp_visual/decoy/fading/New(loc, atom/mimiced_atom)
|
||||
..()
|
||||
animate(src, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/temp_visual/revenant
|
||||
name = "spooky lights"
|
||||
icon_state = "purplesparkles"
|
||||
|
||||
/obj/effect/temp_visual/revenant/cracks
|
||||
name = "glowing cracks"
|
||||
icon_state = "purplecrack"
|
||||
duration = 6
|
||||
|
||||
/obj/effect/temp_visual/gravpush
|
||||
name = "gravity wave"
|
||||
icon_state = "shieldsparkles"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/temp_visual/telekinesis
|
||||
name = "telekinetic force"
|
||||
icon_state = "empdisable"
|
||||
duration = 5
|
||||
|
||||
/obj/effect/temp_visual/emp
|
||||
name = "emp sparks"
|
||||
icon_state = "empdisable"
|
||||
|
||||
/obj/effect/temp_visual/emp/pulse
|
||||
name = "emp pulse"
|
||||
icon_state = "emppulse"
|
||||
duration = 8
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/temp_visual/heal //color is white by default, set to whatever is needed
|
||||
name = "healing glow"
|
||||
icon_state = "heal"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/temp_visual/heal/New(loc, colour)
|
||||
..()
|
||||
pixel_x = rand(-12, 12)
|
||||
pixel_y = rand(-9, 0)
|
||||
if(colour)
|
||||
color = colour
|
||||
|
||||
/obj/effect/temp_visual/kinetic_blast
|
||||
name = "kinetic explosion"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "kinetic_blast"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 4
|
||||
|
||||
/obj/effect/temp_visual/explosion
|
||||
name = "explosion"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
duration = 8
|
||||
|
||||
/obj/effect/temp_visual/explosion/fast
|
||||
icon_state = "explosionfast"
|
||||
duration = 4
|
||||
|
||||
/obj/effect/temp_visual/heart
|
||||
name = "heart"
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "heart"
|
||||
duration = 25
|
||||
|
||||
/obj/effect/temp_visual/heart/New(loc)
|
||||
..()
|
||||
pixel_x = rand(-4,4)
|
||||
pixel_y = rand(-4,4)
|
||||
animate(src, pixel_y = pixel_y + 32, alpha = 0, time = 25)
|
||||
@@ -0,0 +1,30 @@
|
||||
//temporary visual effects
|
||||
/obj/effect/temp_visual
|
||||
anchored = 1
|
||||
layer = ABOVE_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
var/duration = 10
|
||||
var/randomdir = TRUE
|
||||
|
||||
/obj/effect/temp_visual/New()
|
||||
if(randomdir)
|
||||
setDir(pick(cardinal))
|
||||
|
||||
QDEL_IN(src, duration)
|
||||
|
||||
/obj/effect/temp_visual/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/temp_visual/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/temp_visual/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/temp_visual/dir_setting
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/New(loc, set_dir)
|
||||
if(set_dir)
|
||||
setDir(set_dir)
|
||||
..()
|
||||
@@ -9,7 +9,7 @@
|
||||
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
||||
|
||||
if(heavy_range > 1)
|
||||
new/obj/effect/overlay/temp/emp/pulse(epicenter)
|
||||
new/obj/effect/temp_visual/emp/pulse(epicenter)
|
||||
|
||||
if(heavy_range > light_range)
|
||||
light_range = heavy_range
|
||||
|
||||
@@ -179,21 +179,11 @@
|
||||
|
||||
/obj/item/device/flash/cyborg/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
cyborg_flash_animation(user)
|
||||
new /obj/effect/temp_visual/borgflash(get_turf(src))
|
||||
|
||||
/obj/item/device/flash/cyborg/attack_self(mob/user)
|
||||
..()
|
||||
cyborg_flash_animation(user)
|
||||
|
||||
/obj/item/device/flash/cyborg/proc/cyborg_flash_animation(var/mob/living/user)
|
||||
var/atom/movable/overlay/animation = new(user.loc)
|
||||
animation.layer = user.layer + 1
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
qdel(animation)
|
||||
new /obj/effect/temp_visual/borgflash(get_turf(src))
|
||||
|
||||
/obj/item/device/flash/memorizer
|
||||
name = "memorizer"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
||||
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/rods
|
||||
|
||||
@@ -96,7 +96,7 @@ var/global/list/datum/stack_recipe/tranquillite_recipes = list ( \
|
||||
var/global/list/datum/stack_recipe/abductor_recipes = list ( \
|
||||
new/datum/stack_recipe("alien bed", /obj/structure/stool/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien locker", /obj/structure/closet/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien table frame", /obj/structure/abductor_tableframe, 1, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien table frame", /obj/structure/table_frame/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \
|
||||
)
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
/* Diffrent misc types of sheets
|
||||
/* Different misc types of sheets
|
||||
* Contains:
|
||||
* Metal
|
||||
* Plasteel
|
||||
* Wood
|
||||
* Cloth
|
||||
* Plastic
|
||||
* Cardboard
|
||||
* Runed Metal (cult)
|
||||
* Metal
|
||||
* Plasteel
|
||||
* Wood
|
||||
* Cloth
|
||||
* Plastic
|
||||
* Cardboard
|
||||
* Runed Metal (cult)
|
||||
* Brass (clockwork cult)
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -42,8 +43,6 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
|
||||
)),
|
||||
|
||||
null,
|
||||
new /datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2),
|
||||
new /datum/stack_recipe("glass table frame parts", /obj/item/weapon/table_parts/glass, 2),
|
||||
new /datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts),
|
||||
new /datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1),
|
||||
null,
|
||||
@@ -109,10 +108,13 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
|
||||
/obj/item/stack/sheet/metal/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/metal/ratvar_act()
|
||||
new /obj/item/stack/tile/brass(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/metal/narsie_act()
|
||||
if(prob(20))
|
||||
new /obj/item/stack/sheet/runed_metal(loc, amount)
|
||||
qdel(src)
|
||||
new /obj/item/stack/sheet/runed_metal(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
||||
recipes = metal_recipes
|
||||
@@ -156,7 +158,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list(
|
||||
var/global/list/datum/stack_recipe/wood_recipes = list(
|
||||
new /datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1),
|
||||
new /datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20),
|
||||
new /datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2),
|
||||
new /datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
|
||||
new /datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
@@ -275,12 +277,15 @@ var/global/list/datum/stack_recipe/cult = list ( \
|
||||
/obj/item/stack/sheet/runed_metal
|
||||
name = "runed metal"
|
||||
desc = "Sheets of cold metal with shifting inscriptions writ upon them."
|
||||
singular_name = "runed metal"
|
||||
singular_name = "runed metal sheet"
|
||||
icon_state = "sheet-runed"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
sheettype = "runed"
|
||||
merge_type = /obj/item/stack/sheet/runed_metal
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/ratvar_act()
|
||||
new /obj/item/stack/tile/brass(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user)
|
||||
if(!iscultist(user))
|
||||
to_chat(user, "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>")
|
||||
@@ -308,6 +313,39 @@ var/global/list/datum/stack_recipe/cult = list ( \
|
||||
recipes = cult
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Brass
|
||||
*/
|
||||
var/global/list/datum/stack_recipe/brass_recipes = list ( \
|
||||
new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
)
|
||||
|
||||
/obj/item/stack/tile/brass
|
||||
name = "brass"
|
||||
desc = "Sheets made out of brass."
|
||||
singular_name = "brass sheet"
|
||||
icon_state = "sheet-brass"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
burn_state = FIRE_PROOF
|
||||
throwforce = 10
|
||||
max_amount = 50
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
turf_type = /turf/simulated/floor/clockwork
|
||||
|
||||
/obj/item/stack/tile/brass/narsie_act()
|
||||
new /obj/item/stack/sheet/runed_metal(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/tile/brass/New(loc, amount=null)
|
||||
recipes = brass_recipes
|
||||
. = ..()
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
|
||||
/obj/item/stack/tile/brass/fifty
|
||||
amount = 50
|
||||
|
||||
/*
|
||||
* Bones
|
||||
*/
|
||||
|
||||
@@ -114,6 +114,14 @@
|
||||
icon_state = "syndballoon"
|
||||
item_state = "syndballoon"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
var/lastused = null
|
||||
|
||||
/obj/item/toy/syndicateballoon/attack_self(mob/user)
|
||||
if(world.time - lastused < CLICK_CD_MELEE)
|
||||
return
|
||||
var/playverb = pick("bat [src]", "tug on [src]'s string", "play with [src]")
|
||||
user.visible_message("<span class='notice'>[user] plays with [src].</span>", "<span class='notice'>You [playverb].</span>")
|
||||
lastused = world.time
|
||||
|
||||
/*
|
||||
* Fake telebeacon
|
||||
|
||||
@@ -3,12 +3,18 @@
|
||||
icon_state = "flashbang"
|
||||
item_state = "flashbang"
|
||||
origin_tech = "materials=2;combat=3"
|
||||
light_power = 10
|
||||
light_color = LIGHT_COLOR_WHITE
|
||||
var/light_time = 2
|
||||
|
||||
/obj/item/weapon/grenade/flashbang/prime()
|
||||
update_mob()
|
||||
var/flashbang_turf = get_turf(src)
|
||||
if(!flashbang_turf)
|
||||
return
|
||||
|
||||
set_light(7)
|
||||
|
||||
for(var/mob/living/M in hearers(7, flashbang_turf))
|
||||
bang(get_turf(M), M)
|
||||
|
||||
@@ -16,7 +22,9 @@
|
||||
var/damage = round(30/(get_dist(B,get_turf(src))+1))
|
||||
B.health -= damage
|
||||
B.update_icon()
|
||||
qdel(src)
|
||||
|
||||
spawn(light_time)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/flashbang/proc/bang(var/turf/T , var/mob/living/M)
|
||||
M.show_message("<span class='warning'>BANG</span>", 2)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
target.apply_damage(force * fisto_setting, BRUTE)
|
||||
target.visible_message("<span class='danger'>[user]'s powerfist lets out a loud hiss as they punch [target.name]!</span>", \
|
||||
"<span class='userdanger'>You cry out in pain as [user]'s punch flings you backwards!</span>")
|
||||
new /obj/effect/overlay/temp/kinetic_blast(target.loc)
|
||||
new /obj/effect/temp_visual/kinetic_blast(target.loc)
|
||||
playsound(loc, 'sound/weapons/resonator_blast.ogg', 50, 1)
|
||||
playsound(loc, 'sound/weapons/genhit2.ogg', 50, 1)
|
||||
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
/* Table parts and rack parts
|
||||
* Contains:
|
||||
* Table Parts
|
||||
* Reinforced Table Parts
|
||||
* Wooden Table Parts
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
/obj/item/weapon/table_parts
|
||||
name = "table parts"
|
||||
desc = "Parts of a table. Poor table."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "table_parts"
|
||||
materials = list(MAT_METAL=4000)
|
||||
flags = CONDUCT
|
||||
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
var/upgradable = 1
|
||||
var/result = /obj/structure/table
|
||||
var/parts = list(
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/metal)
|
||||
|
||||
/obj/item/weapon/table_parts/reinforced
|
||||
name = "reinforced table parts"
|
||||
desc = "Hard table parts. Well...harder..."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "reinf_tableparts"
|
||||
materials = list(MAT_METAL=8000)
|
||||
flags = CONDUCT
|
||||
upgradable = 0
|
||||
result = /obj/structure/table/reinforced
|
||||
parts = list(
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/rods)
|
||||
|
||||
/obj/item/weapon/table_parts/wood
|
||||
name = "wooden table parts"
|
||||
desc = "Keep away from fire."
|
||||
icon_state = "wood_tableparts"
|
||||
flags = null
|
||||
upgradable = 0
|
||||
burn_state = FLAMMABLE
|
||||
result = /obj/structure/table/woodentable
|
||||
parts = list(
|
||||
/obj/item/stack/sheet/wood,
|
||||
/obj/item/stack/sheet/wood)
|
||||
|
||||
/obj/item/weapon/table_parts/wood/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/tile/carpet))
|
||||
var/target = /obj/item/weapon/table_parts/fancy
|
||||
if(istype(W, /obj/item/stack/tile/carpet/black))
|
||||
target = /obj/item/weapon/table_parts/fancy/black
|
||||
var/obj/item/stack/S = W
|
||||
if(S.use(1))
|
||||
new target(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/table_parts/glass
|
||||
name = "glass table parts"
|
||||
desc = "fragile!"
|
||||
icon_state = "glass_tableparts"
|
||||
flags = null
|
||||
upgradable = 0
|
||||
result = /obj/structure/glasstable_frame
|
||||
parts = list(
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/metal)
|
||||
|
||||
/obj/item/weapon/table_parts/fancy
|
||||
name = "fancy table parts"
|
||||
desc = "Pretty!"
|
||||
icon_state = "fancy_tableparts"
|
||||
result = /obj/structure/table/wood/fancy
|
||||
|
||||
/obj/item/weapon/table_parts/fancy/black
|
||||
name = "black fancy table parts"
|
||||
icon_state = "black_fancy_tableparts"
|
||||
result = /obj/structure/table/wood/fancy/black
|
||||
|
||||
/obj/item/weapon/rack_parts
|
||||
name = "rack parts"
|
||||
desc = "Parts of a rack."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "rack_parts"
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=2000)
|
||||
|
||||
/*
|
||||
* Table Parts
|
||||
*/
|
||||
/obj/item/weapon/table_parts/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
for(var/p in parts)
|
||||
new p(user.loc)
|
||||
qdel(src)
|
||||
else if(upgradable && istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(R.amount >= 4)
|
||||
new /obj/item/weapon/table_parts/reinforced(user.loc)
|
||||
to_chat(user, "<span class=notice>You reinforce the [name].</span>")
|
||||
R.use(4)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class=warning>You need at least four rods to do this.</span>")
|
||||
|
||||
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
|
||||
for(var/obj/structure/table/T in user.loc)
|
||||
to_chat(user, "<span class=warning>You can't build tables on top of tables!</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = loc))
|
||||
new result(user.loc)
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Rack Parts
|
||||
*/
|
||||
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/rack_parts/attack_self(mob/user as mob)
|
||||
if(do_after(user, 20, target = loc))
|
||||
var/obj/structure/rack/R = new /obj/structure/rack(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
@@ -46,8 +46,7 @@
|
||||
|
||||
playsound(user.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(user.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(user.loc,user,'icons/mob/mob.dmi',,"phasein",,user.dir)
|
||||
|
||||
new /obj/effect/temp_visual/dir_setting/ninja/phase(get_turf(user), user.dir)
|
||||
to_chat(user, "<span class='boldnotice'>VOID-Shift</span> translocation successful")
|
||||
|
||||
if("No")
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/* Table Frames
|
||||
* Contains:
|
||||
* Frames
|
||||
* Wooden Frames
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Normal Frames
|
||||
*/
|
||||
|
||||
/obj/structure/table_frame
|
||||
name = "table frame"
|
||||
desc = "Four metal legs with four framing rods for a table. You could easily pass through this."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "table_frame"
|
||||
density = FALSE
|
||||
anchored = FALSE
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
max_integrity = 100
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/framestackamount = 2
|
||||
|
||||
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I))
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE)
|
||||
else if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
var/obj/item/stack/sheet/plasteel/P = I
|
||||
if(P.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one plasteel sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [P] to [src]...</span>")
|
||||
if(do_after(user, 50, target = src) && P.use(1))
|
||||
make_new_table(/obj/structure/table/reinforced)
|
||||
else if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one metal sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [M] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && M.use(1))
|
||||
make_new_table(/obj/structure/table)
|
||||
else if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one glass sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [G] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && G.use(1))
|
||||
make_new_table(/obj/structure/table/glass)
|
||||
else if(istype(I, /obj/item/stack/tile/carpet/black))
|
||||
var/obj/item/stack/tile/carpet/black/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one black carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/fancy/black)
|
||||
else if(istype(I, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/fancy)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/proc/make_new_table(table_type) //makes sure the new table made retains what we had as a frame
|
||||
var/obj/structure/table/T = new table_type(loc)
|
||||
T.frame = type
|
||||
T.framestack = framestack
|
||||
T.framestackamount = framestackamount
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table_frame/deconstruct(disassembled = TRUE)
|
||||
new framestack(get_turf(src), framestackamount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table_frame/narsie_act()
|
||||
new /obj/structure/table_frame/wood(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table_frame/ratvar_act()
|
||||
new /obj/structure/table_frame/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Wooden Frames
|
||||
*/
|
||||
|
||||
/obj/structure/table_frame/wood
|
||||
name = "wooden table frame"
|
||||
desc = "Four wooden legs with four framing wooden rods for a wooden table. You could easily pass through this."
|
||||
icon_state = "wood_frame"
|
||||
framestack = /obj/item/stack/sheet/wood
|
||||
framestackamount = 2
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
/obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/sheet/wood))
|
||||
var/obj/item/stack/sheet/wood/W = I
|
||||
if(W.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one wood sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [W] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && W.use(1))
|
||||
make_new_table(/obj/structure/table/wood)
|
||||
return
|
||||
else if(istype(I, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/poker)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/brass
|
||||
name = "brass table frame"
|
||||
desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch."
|
||||
icon_state = "brass_frame"
|
||||
burn_state = FIRE_PROOF
|
||||
framestack = /obj/item/stack/tile/brass
|
||||
framestackamount = 1
|
||||
|
||||
/obj/structure/table_frame/brass/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/tile/brass))
|
||||
var/obj/item/stack/tile/brass/W = I
|
||||
if(W.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one brass sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [W] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && W.use(1))
|
||||
make_new_table(/obj/structure/table/reinforced/brass)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/brass/narsie_act()
|
||||
..()
|
||||
if(src) //do we still exist?
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
@@ -1,49 +1,51 @@
|
||||
/* Tables and Racks
|
||||
* Contains:
|
||||
* Tables
|
||||
* Wooden tables
|
||||
* Reinforced tables
|
||||
* Glass Tables
|
||||
* Wooden Tables
|
||||
* Reinforced Tables
|
||||
* Racks
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Tables
|
||||
*/
|
||||
|
||||
/obj/structure/table
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/smooth_structures/table.dmi'
|
||||
icon_state = "table"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
layer = TABLE_LAYER
|
||||
pass_flags = LETPASSTHROW
|
||||
climbable = 1
|
||||
|
||||
var/parts = /obj/item/weapon/table_parts
|
||||
var/flipped = 0
|
||||
var/health = 100
|
||||
var/busy = 0
|
||||
climbable = TRUE
|
||||
max_integrity = 100
|
||||
integrity_failure = 30
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
|
||||
var/frame = /obj/structure/table_frame
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/buildstack = /obj/item/stack/sheet/metal
|
||||
var/busy = FALSE
|
||||
var/buildstackamount = 1
|
||||
var/framestackamount = 2
|
||||
var/deconstruction_ready = TRUE
|
||||
var/flipped = 0
|
||||
|
||||
/obj/structure/table/New()
|
||||
..()
|
||||
for(var/obj/structure/table/T in src.loc)
|
||||
if(T != src)
|
||||
qdel(T)
|
||||
if(flipped)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/table/proc/destroy()
|
||||
new parts(loc)
|
||||
density = 0
|
||||
qdel(src)
|
||||
/obj/structure/table/examine(mob/user)
|
||||
..()
|
||||
deconstruction_hints(user)
|
||||
|
||||
/obj/structure/table/narsie_act()
|
||||
if(prob(20))
|
||||
new /obj/structure/table/woodentable(loc)
|
||||
/obj/structure/table/proc/deconstruction_hints(mob/user)
|
||||
to_chat(user, "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>")
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
if(smooth && !flipped)
|
||||
@@ -63,7 +65,7 @@
|
||||
if(type == 1)
|
||||
subtype = direction == turn(dir,90) ? "-" : "+"
|
||||
var/base = "table"
|
||||
if(istype(src, /obj/structure/table/woodentable))
|
||||
if(istype(src, /obj/structure/table/wood))
|
||||
base = "wood"
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
base = "rtable"
|
||||
@@ -72,51 +74,57 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/table/narsie_act()
|
||||
new /obj/structure/table/wood(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/ratvar_act()
|
||||
new /obj/structure/table/reinforced/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(1)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(3)
|
||||
if(prob(25))
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/blob_act()
|
||||
if(prob(75))
|
||||
destroy()
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/mech_melee_attack(obj/mecha/M)
|
||||
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
if(HULK in user.mutations)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
playsound(loc, 'sound/effects/bang.ogg', 50, 1)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
else
|
||||
..()
|
||||
if(climber)
|
||||
@@ -171,17 +179,17 @@
|
||||
else
|
||||
return 1 //But only from one side
|
||||
if(prob(chance))
|
||||
health -= P.damage/2
|
||||
if(health > 0)
|
||||
obj_integrity -= P.damage/2
|
||||
if(obj_integrity > 0)
|
||||
visible_message("<span class='warning'>[P] hits \the [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
visible_message("<span class='warning'>[src] breaks down!</span>")
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
/obj/structure/table/CheckExit(atom/movable/O, turf/target)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(flipped)
|
||||
@@ -191,7 +199,7 @@
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
/obj/structure/table/MouseDrop_T(obj/O, mob/user)
|
||||
..()
|
||||
if((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
@@ -223,58 +231,74 @@
|
||||
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))
|
||||
tablepush(W, user)
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
tablepush(I, user)
|
||||
return
|
||||
if(can_deconstruct)
|
||||
if(isscrewdriver(I) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
user.visible_message("<span class='notice'>[user] is disassembling \a [src].</span>", "<span class='notice'>You start disassembling \the [src].</span>")
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
destroy()
|
||||
return
|
||||
if(iswrench(I) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start deconstructing [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE, 1)
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
if(istype(I, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.set_up(5, 0, loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("<span class='notice'>The [src] was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear [src] coming apart.</span>", 2)
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
return
|
||||
|
||||
if(!(W.flags & ABSTRACT))
|
||||
if(!(I.flags & ABSTRACT))
|
||||
if(user.drop_item())
|
||||
W.Move(loc)
|
||||
I.Move(loc)
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
W.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
W.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(var/direction)
|
||||
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
var/turf/T = get_turf(src)
|
||||
new buildstack(T, buildstackamount)
|
||||
if(!wrench_disassembly)
|
||||
new frame(T)
|
||||
else
|
||||
new framestack(T, framestackamount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(direction)
|
||||
var/obj/structure/table/T
|
||||
for(var/angle in list(-90,90))
|
||||
T = locate() in get_step(src.loc,turn(direction,angle))
|
||||
T = locate() in get_step(loc,turn(direction,angle))
|
||||
if(T && !T.flipped)
|
||||
return 0
|
||||
T = locate() in get_step(src.loc,direction)
|
||||
T = locate() in get_step(loc,direction)
|
||||
if(!T || T.flipped)
|
||||
return 1
|
||||
if(istype(T,/obj/structure/table/reinforced/))
|
||||
var/obj/structure/table/reinforced/R = T
|
||||
if(R.status == 2)
|
||||
if(!T.deconstruction_ready)
|
||||
return 0
|
||||
return T.straight_table_check(direction)
|
||||
|
||||
@@ -309,7 +333,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/proc/flip(var/direction)
|
||||
/obj/structure/table/proc/flip(direction)
|
||||
if(flipped)
|
||||
return 0
|
||||
|
||||
@@ -344,7 +368,7 @@
|
||||
return 0
|
||||
|
||||
var/can_flip = 1
|
||||
for(var/mob/A in oview(src,0))//src.loc)
|
||||
for(var/mob/A in oview(src,0))//loc)
|
||||
if(istype(A))
|
||||
can_flip = 0
|
||||
if(!can_flip)
|
||||
@@ -365,52 +389,111 @@
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/*
|
||||
* Glass Tables
|
||||
*/
|
||||
|
||||
/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"
|
||||
buildstack = /obj/item/stack/sheet/glass
|
||||
max_integrity = 70
|
||||
canSmoothWith = null
|
||||
var/list/debris = list()
|
||||
|
||||
/obj/structure/table/glass/New()
|
||||
. = ..()
|
||||
debris += new frame
|
||||
debris += new /obj/item/weapon/shard
|
||||
|
||||
/obj/structure/table/glass/Destroy()
|
||||
for(var/i in debris)
|
||||
qdel(i)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/table/glass/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(!can_deconstruct)
|
||||
return
|
||||
if(!isliving(AM))
|
||||
return
|
||||
// Don't break if they're just flying past
|
||||
if(AM.throwing)
|
||||
addtimer(src, "throw_check", 5, FALSE, AM)
|
||||
else
|
||||
check_break(AM)
|
||||
|
||||
/obj/structure/table/glass/proc/throw_check(mob/living/M)
|
||||
if(M.loc == get_turf(src))
|
||||
check_break(M)
|
||||
|
||||
/obj/structure/table/glass/proc/check_break(mob/living/M)
|
||||
if(has_gravity(M) && M.mob_size > MOB_SIZE_SMALL)
|
||||
table_shatter(M)
|
||||
|
||||
/obj/structure/table/glass/flip(direction)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/glass/proc/table_shatter(mob/living/L)
|
||||
visible_message("<span class='warning'>[src] breaks!</span>",
|
||||
"<span class='danger'>You hear breaking glass.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, "shatter", 50, 1)
|
||||
for(var/I in debris)
|
||||
var/atom/movable/AM = I
|
||||
AM.forceMove(T)
|
||||
debris -= AM
|
||||
if(istype(AM, /obj/item/weapon/shard))
|
||||
AM.throw_impact(L)
|
||||
L.Weaken(5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
if(disassembled)
|
||||
..()
|
||||
return
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, "shatter", 50, 1)
|
||||
for(var/X in debris)
|
||||
var/atom/movable/AM = X
|
||||
AM.forceMove(T)
|
||||
debris -= AM
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Wooden tables
|
||||
*/
|
||||
/obj/structure/table/woodentable
|
||||
/obj/structure/table/wood
|
||||
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)
|
||||
frame = /obj/structure/table_frame/wood
|
||||
framestack = /obj/item/stack/sheet/wood
|
||||
buildstack = /obj/item/stack/sheet/wood
|
||||
max_integrity = 70
|
||||
canSmoothWith = list(/obj/structure/table/wood, /obj/structure/table/wood/poker)
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
var/canPokerize = 1
|
||||
|
||||
/obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(canPokerize && istype(I, /obj/item/stack/tile/grass))
|
||||
var/obj/item/stack/tile/grass/gr = I
|
||||
gr.use(1)
|
||||
new /obj/structure/table/woodentable/poker( src.loc )
|
||||
qdel(src)
|
||||
visible_message("<span class='notice'>[user] adds the grass to the wooden table</span>")
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/table/wood/narsie_act(total_override = TRUE)
|
||||
if(!total_override)
|
||||
..()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/table/woodentable/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/table/woodentable/poker //No specialties, Just a mapping object.
|
||||
/obj/structure/table/wood/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)
|
||||
canPokerize = 0
|
||||
icon_state = "poker_table"
|
||||
buildstack = /obj/item/stack/tile/carpet
|
||||
|
||||
/obj/structure/table/woodentable/poker/destroy()
|
||||
new /obj/item/stack/tile/grass(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable/poker/narsie_act()
|
||||
return
|
||||
/obj/structure/table/wood/poker/narsie_act()
|
||||
..(FALSE)
|
||||
|
||||
/*
|
||||
* Fancy Tables
|
||||
@@ -421,7 +504,9 @@
|
||||
desc = "A standard metal table frame covered with an amazingly fancy, patterned cloth."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "fancy_table"
|
||||
parts = /obj/item/weapon/table_parts/fancy
|
||||
frame = /obj/structure/table_frame
|
||||
framestack = /obj/item/stack/rods
|
||||
buildstack = /obj/item/stack/tile/carpet
|
||||
canSmoothWith = list(/obj/structure/table/wood/fancy, /obj/structure/table/wood/fancy/black)
|
||||
|
||||
/obj/structure/table/wood/fancy/New()
|
||||
@@ -430,123 +515,82 @@
|
||||
|
||||
/obj/structure/table/wood/fancy/black
|
||||
icon_state = "fancy_table_black"
|
||||
parts = /obj/item/weapon/table_parts/fancy/black
|
||||
buildstack = /obj/item/stack/tile/carpet/black
|
||||
|
||||
/obj/structure/table/wood/fancy/black/New()
|
||||
..()
|
||||
icon = 'icons/obj/smooth_structures/fancy_table_black.dmi' //so that the tables place correctly in the map editor
|
||||
|
||||
|
||||
/*
|
||||
* Glass Tables
|
||||
*/
|
||||
|
||||
/obj/structure/glasstable_frame
|
||||
name = "glass table frame"
|
||||
desc = "A metal frame for a glass table."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "glass_table_frame"
|
||||
density = 1
|
||||
|
||||
/obj/structure/glasstable_frame/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.amount >= 2)
|
||||
to_chat(user, "<span class='notice'>You start to add the glass to \the [src].</span>")
|
||||
if(do_after(user, 10 * G.toolspeed, target = src))
|
||||
G.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the glass to \the [src].</span>")
|
||||
playsound(get_turf(src), G.usesound, 50, 1)
|
||||
new /obj/structure/table/glass(loc)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You don't have enough glass! You need at least 2 sheets.</span>")
|
||||
return
|
||||
|
||||
if(iswrench(I))
|
||||
to_chat(user, "<span class='notice'>You start to deconstruct \the [src].</span>")
|
||||
playsound(src.loc, I.usesound, 75, 1)
|
||||
if(do_after(user, 10 * I.toolspeed, target = src))
|
||||
playsound(src.loc, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
qdel(src)
|
||||
|
||||
/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)
|
||||
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)
|
||||
destroy(1)
|
||||
|
||||
/obj/structure/table/glass/destroy(dirty)
|
||||
if(dirty)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(loc, 2)
|
||||
..()
|
||||
|
||||
/obj/structure/table/glass/tablepush(obj/item/I, mob/user)
|
||||
if(..())
|
||||
collapse()
|
||||
|
||||
/*
|
||||
* Reinforced tables
|
||||
*/
|
||||
/obj/structure/table/reinforced
|
||||
name = "reinforced table"
|
||||
desc = "A version of the four legged table. It is stronger."
|
||||
desc = "A reinforced version of the four legged 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
|
||||
deconstruction_ready = FALSE
|
||||
buildstack = /obj/item/stack/sheet/plasteel
|
||||
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
|
||||
/obj/structure/table/reinforced/flip(var/direction)
|
||||
if(status == 2)
|
||||
/obj/structure/table/reinforced/deconstruction_hints(mob/user)
|
||||
if(deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>The top cover has been <i>welded</i> loose and the main frame's <b>bolts</b> are exposed.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The top cover is firmly <b>welded</b> on.</span>")
|
||||
|
||||
/obj/structure/table/reinforced/flip(direction)
|
||||
if(!deconstruction_ready)
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(src.status == 2)
|
||||
to_chat(user, "<span class='notice'>Now weakening the reinforced table</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(do_after(user, 50 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>Table weakened</span>")
|
||||
src.status = 1
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start strengthening the reinforced table...</span>")
|
||||
if (do_after(user, 50*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You strengthen the table.</span>")
|
||||
deconstruction_ready = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Now strengthening the reinforced table</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(do_after(user, 50 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>Table strengthened</span>")
|
||||
src.status = 2
|
||||
return
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start weakening the reinforced table...</span>")
|
||||
if (do_after(user, 50*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weaken the table.</span>")
|
||||
deconstruction_ready = TRUE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(src.status == 2)
|
||||
return
|
||||
/obj/structure/table/reinforced/brass
|
||||
name = "brass table"
|
||||
desc = "A solid, slightly beveled brass table."
|
||||
icon = 'icons/obj/smooth_structures/brass_table.dmi'
|
||||
icon_state = "brass_table"
|
||||
burn_state = FIRE_PROOF
|
||||
frame = /obj/structure/table_frame/brass
|
||||
framestack = /obj/item/stack/tile/brass
|
||||
buildstack = /obj/item/stack/tile/brass
|
||||
framestackamount = 1
|
||||
buildstackamount = 1
|
||||
canSmoothWith = list(/obj/structure/table/reinforced/brass)
|
||||
|
||||
..()
|
||||
/obj/structure/table/reinforced/brass/narsie_act()
|
||||
take_damage(rand(15, 45), BRUTE)
|
||||
if(src) //do we still exist?
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/table/reinforced/brass/ratvar_act()
|
||||
obj_integrity = max_integrity
|
||||
|
||||
/*
|
||||
* Racks
|
||||
@@ -556,42 +600,42 @@
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
layer = TABLE_LAYER
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
anchored = 1
|
||||
pass_flags = LETPASSTHROW
|
||||
var/parts = /obj/item/weapon/rack_parts
|
||||
var/health = 5
|
||||
max_integrity = 20
|
||||
|
||||
/obj/structure/rack/proc/destroy()
|
||||
new parts(loc)
|
||||
density = 0
|
||||
qdel(src)
|
||||
/obj/structure/rack/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
|
||||
|
||||
/obj/structure/rack/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2.0)
|
||||
if(2)
|
||||
qdel(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
if(3.0)
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
if(3)
|
||||
if(prob(25))
|
||||
qdel(src)
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
|
||||
/obj/structure/rack/blob_act()
|
||||
if(prob(75))
|
||||
qdel(src)
|
||||
return
|
||||
else if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
if(height==0)
|
||||
return 1
|
||||
if(density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
@@ -606,7 +650,7 @@
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
/obj/structure/rack/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
|
||||
if((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
@@ -615,13 +659,11 @@
|
||||
return
|
||||
if(O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/weapon/rack_parts( src.loc )
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
qdel(src)
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iswrench(W) && can_deconstruct)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
@@ -634,38 +676,47 @@
|
||||
if(HULK in user.mutations)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
destroy()
|
||||
deconstruct()
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='danger'>You kick [src].</span>")
|
||||
health -= rand(1,2)
|
||||
obj_integrity -= rand(1,2)
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/rack/mech_melee_attack(obj/mecha/M)
|
||||
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/rack/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
destroy()
|
||||
if(obj_integrity <= 0)
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 40, 1)
|
||||
|
||||
/obj/structure/rack/skeletal_bar
|
||||
name = "skeletal minibar"
|
||||
@@ -678,3 +729,49 @@
|
||||
|
||||
/obj/structure/rack/skeletal_bar/right
|
||||
icon_state = "minibar_right"
|
||||
|
||||
/*
|
||||
* Rack destruction
|
||||
*/
|
||||
|
||||
/obj/structure/rack/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
density = FALSE
|
||||
var/obj/item/weapon/rack_parts/newparts = new(loc)
|
||||
transfer_fingerprints_to(newparts)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
/obj/item/weapon/rack_parts
|
||||
name = "rack parts"
|
||||
desc = "Parts of a rack."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "rack_parts"
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=2000)
|
||||
var/building = FALSE
|
||||
|
||||
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iswrench(W))
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/rack_parts/attack_self(mob/user)
|
||||
if(building)
|
||||
return
|
||||
building = TRUE
|
||||
to_chat(user, "<span class='notice'>You start constructing a rack...</span>")
|
||||
if(do_after(user, 50, target = user, progress=TRUE))
|
||||
if(!user.drop_item(src))
|
||||
return
|
||||
var/obj/structure/rack/R = new /obj/structure/rack(user.loc)
|
||||
user.visible_message("<span class='notice'>[user] assembles \a [R].\
|
||||
</span>", "<span class='notice'>You assemble \a [R].</span>")
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
building = FALSE
|
||||
|
||||
Reference in New Issue
Block a user