mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 17:13:46 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into DisMemberments
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
/obj/effect/anomaly/proc/anomalyNeutralize()
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
new /obj/effect/effect/bad_smoke(T)
|
||||
new /obj/effect/particle_effect/smoke/bad(T)
|
||||
|
||||
if(aSignal)
|
||||
aSignal.forceMove(T)
|
||||
|
||||
@@ -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..."
|
||||
|
||||
@@ -22,6 +22,7 @@ var/global/list/image/splatter_cache=list()
|
||||
var/amount = 5
|
||||
appearance_flags = NO_CLIENT_COLOR
|
||||
var/dry_timer = 0
|
||||
var/off_floor = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
@@ -88,7 +89,7 @@ var/global/list/image/splatter_cache=list()
|
||||
|
||||
//Add "bloodiness" of this blood's type, to the human's shoes
|
||||
/obj/effect/decal/cleanable/blood/Crossed(atom/movable/O)
|
||||
if(ishuman(O))
|
||||
if(!off_floor && ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
|
||||
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc)
|
||||
streak.update_icon()
|
||||
else if(prob(10))
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if(step_to(src, get_step(src, direction), 0))
|
||||
@@ -58,4 +58,4 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/oil/streak
|
||||
random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
|
||||
amount = 2
|
||||
amount = 2
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/effect/decal/remains/robot/New()
|
||||
..()
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/effect/decal/remains/slime/New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(5)
|
||||
var/obj/effect/effect/water/W = new(get_turf(src))
|
||||
var/obj/effect/particle_effect/water/W = new(get_turf(src))
|
||||
W.reagents = R
|
||||
R.my_atom = W
|
||||
R.add_reagent("water", 5)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
/* This is an attempt to make some easily reusable "particle" type effect, to stop the code
|
||||
constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one
|
||||
defined, then set up when it is created with New(). Then this same system can just be reused each time
|
||||
it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam
|
||||
would spawn and follow the beaker, even if it is carried or thrown.
|
||||
*/
|
||||
|
||||
/obj/effect/particle_effect
|
||||
name = "particle effect"
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So effects are not targeted by alien acid.
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/particle_effect/New()
|
||||
..()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
/obj/effect/particle_effect/Destroy()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
return ..()
|
||||
|
||||
/datum/effect_system
|
||||
var/number = 3
|
||||
var/cardinals = 0
|
||||
var/turf/location
|
||||
var/atom/holder
|
||||
var/effect_type
|
||||
var/total_effects = 0
|
||||
|
||||
/datum/effect_system/Destroy()
|
||||
holder = null
|
||||
location = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/proc/set_up(n = 3, c = 0, loca)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
/datum/effect_system/proc/attach(atom/atom)
|
||||
holder = atom
|
||||
|
||||
/datum/effect_system/proc/start()
|
||||
for(var/i in 1 to number)
|
||||
if(total_effects > 20)
|
||||
return
|
||||
addtimer(src, "generate_effect", 0)
|
||||
|
||||
/datum/effect_system/proc/generate_effect()
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/E = new effect_type(location)
|
||||
total_effects++
|
||||
var/direction
|
||||
if(cardinals)
|
||||
direction = pick(cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
var/steps_amt = pick(1,2,3)
|
||||
for(var/j in 1 to steps_amt)
|
||||
sleep(5)
|
||||
step(E,direction)
|
||||
addtimer(src, "decrement_total_effect", 20)
|
||||
|
||||
/datum/effect_system/proc/decrement_total_effect()
|
||||
total_effects--
|
||||
@@ -0,0 +1,61 @@
|
||||
/obj/effect/particle_effect/expl_particles
|
||||
name = "explosive particles"
|
||||
icon_state = "explosion_particle"
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/particle_effect/expl_particles/New()
|
||||
..()
|
||||
QDEL_IN(src, 15)
|
||||
|
||||
/datum/effect_system/expl_particles
|
||||
number = 10
|
||||
|
||||
/datum/effect_system/expl_particles/start()
|
||||
for(var/i in 1 to number)
|
||||
spawn(0)
|
||||
var/obj/effect/particle_effect/expl_particles/expl = new /obj/effect/particle_effect/expl_particles(location)
|
||||
var/direct = pick(alldirs)
|
||||
var/steps_amt = pick(1;25,2;50,3,4;200)
|
||||
for(var/j in 1 to steps_amt)
|
||||
sleep(1)
|
||||
step(expl,direct)
|
||||
|
||||
/obj/effect/explosion
|
||||
name = "explosive particles"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effect/explosion/New()
|
||||
..()
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/datum/effect_system/explosion
|
||||
|
||||
/datum/effect_system/explosion/set_up(loca)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
/datum/effect_system/explosion/start()
|
||||
new/obj/effect/explosion(location)
|
||||
var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles()
|
||||
P.set_up(10, 0, location)
|
||||
P.start()
|
||||
|
||||
/datum/effect_system/explosion/smoke
|
||||
|
||||
/datum/effect_system/explosion/smoke/proc/create_smoke()
|
||||
var/datum/effect_system/smoke_spread/S = new
|
||||
S.set_up(5,0,location,null)
|
||||
S.start()
|
||||
|
||||
/datum/effect_system/explosion/smoke/start()
|
||||
..()
|
||||
addtimer(src, "create_smoke", 5)
|
||||
@@ -0,0 +1,249 @@
|
||||
// Foam
|
||||
// Similar to smoke, but spreads out more
|
||||
// metal foams leave behind a foamed metal wall
|
||||
|
||||
/obj/effect/particle_effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = OBJ_LAYER + 0.9
|
||||
animate_movement = 0
|
||||
var/amount = 3
|
||||
var/expand = 1
|
||||
var/metal = 0
|
||||
|
||||
/obj/effect/particle_effect/foam/New(loc, ismetal=0)
|
||||
..(loc)
|
||||
icon_state = "[ismetal ? "m":""]foam"
|
||||
if(!ismetal && reagents)
|
||||
color = mix_color_from_reagents(reagents.reagent_list)
|
||||
metal = ismetal
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
spawn(3 + metal*3)
|
||||
process()
|
||||
spawn(120)
|
||||
processing_objects.Remove(src)
|
||||
sleep(30)
|
||||
|
||||
if(metal)
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T, /turf/space))
|
||||
T.ChangeTurf(/turf/simulated/floor/plating/metalfoam)
|
||||
var/turf/simulated/floor/plating/metalfoam/MF = get_turf(src)
|
||||
MF.metal = metal
|
||||
MF.update_icon()
|
||||
|
||||
var/obj/structure/foamedmetal/M = new(src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
|
||||
flick("[icon_state]-disolve", src)
|
||||
sleep(5)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// on delete, transfer any reagents to the floor
|
||||
/obj/effect/particle_effect/foam/Destroy()
|
||||
if(!metal && reagents)
|
||||
reagents.handle_reactions()
|
||||
for(var/atom/A in oview(1, src))
|
||||
if(A == src)
|
||||
continue
|
||||
if(reagents.total_volume)
|
||||
var/fraction = 5 / reagents.total_volume
|
||||
reagents.reaction(A, TOUCH, fraction)
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/foam/process()
|
||||
if(--amount < 0)
|
||||
return
|
||||
|
||||
for(var/direction in cardinal)
|
||||
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(!T)
|
||||
continue
|
||||
|
||||
if(!T.Enter(src))
|
||||
continue
|
||||
|
||||
var/obj/effect/particle_effect/foam/F = locate() in T
|
||||
if(F)
|
||||
continue
|
||||
|
||||
F = new /obj/effect/particle_effect/foam(T, metal)
|
||||
F.amount = amount
|
||||
if(!metal)
|
||||
F.create_reagents(15)
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
F.reagents.add_reagent(R.id, min(R.volume, 3), R.data, reagents.chem_temp)
|
||||
F.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
|
||||
// foam disolves when heated
|
||||
// except metal foams
|
||||
/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(!metal && prob(max(0, exposed_temperature - 475)))
|
||||
flick("[icon_state]-disolve", src)
|
||||
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/particle_effect/foam/Crossed(atom/movable/AM)
|
||||
if(metal)
|
||||
return
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/M = AM
|
||||
if(M.slip("foam", 5, 2))
|
||||
if(reagents)
|
||||
for(var/reagent_id in reagents.reagent_list)
|
||||
var/amount = M.reagents.get_reagent_amount(reagent_id)
|
||||
if(amount < 25)
|
||||
M.reagents.add_reagent(reagent_id, min(round(amount / 2), 15))
|
||||
if(reagents.total_volume)
|
||||
var/fraction = 5 / reagents.total_volume
|
||||
reagents.reaction(M, TOUCH, fraction)
|
||||
|
||||
/datum/effect_system/foam_spread
|
||||
effect_type = /obj/effect/particle_effect/foam
|
||||
var/amount = 5 // the size of the foam spread.
|
||||
var/list/carried_reagents // the IDs of reagents present when the foam was mixed
|
||||
var/metal = 0 // 0=foam, 1=metalfoam, 2=ironfoam
|
||||
var/temperature = T0C
|
||||
var/list/banned_reagents = list("smoke_powder", "fluorosurfactant", "stimulants")
|
||||
|
||||
/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null, metalfoam = 0)
|
||||
amount = min(round(amt/5, 1), 7)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
carried_reagents = list()
|
||||
metal = metalfoam
|
||||
temperature = carry.chem_temp
|
||||
|
||||
// bit of a hack here. Foam carries along any reagent also present in the glass it is mixed
|
||||
// with (defaults to water if none is present). Rather than actually transfer the reagents,
|
||||
// this makes a list of the reagent ids and spawns 1 unit of that reagent when the foam disolves.
|
||||
|
||||
if(carry && !metal)
|
||||
for(var/datum/reagent/R in carry.reagent_list)
|
||||
carried_reagents[R.id] = R.volume
|
||||
|
||||
/datum/effect_system/foam_spread/start()
|
||||
spawn(0)
|
||||
var/obj/effect/particle_effect/foam/F = locate() in location
|
||||
if(F)
|
||||
F.amount += amount
|
||||
F.amount = min(F.amount, 27)
|
||||
return
|
||||
|
||||
F = new /obj/effect/particle_effect/foam(location, metal)
|
||||
F.amount = amount
|
||||
|
||||
if(!metal) // don't carry other chemicals if a metal foam
|
||||
F.create_reagents(15)
|
||||
|
||||
if(carried_reagents)
|
||||
for(var/id in carried_reagents)
|
||||
if(banned_reagents.Find("[id]"))
|
||||
continue
|
||||
var/datum/reagent/reagent_volume = carried_reagents[id]
|
||||
F.reagents.add_reagent(id, min(reagent_volume, 3), null, temperature)
|
||||
F.color = mix_color_from_reagents(F.reagents.reagent_list)
|
||||
else
|
||||
F.reagents.add_reagent("cleaner", 1)
|
||||
F.color = mix_color_from_reagents(F.reagents.reagent_list)
|
||||
|
||||
// wall formed by metal foams
|
||||
// dense and opaque, but easy to break
|
||||
|
||||
/obj/structure/foamedmetal
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "metalfoam"
|
||||
density = 1
|
||||
opacity = 1 // changed in New()
|
||||
anchored = 1
|
||||
name = "foamed metal"
|
||||
desc = "A lightweight foamed metal wall."
|
||||
var/metal = MFOAM_ALUMINUM
|
||||
|
||||
/obj/structure/foamedmetal/initialize()
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/foamedmetal/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/foamedmetal/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/foamedmetal/proc/updateicon()
|
||||
if(metal == MFOAM_ALUMINUM)
|
||||
icon_state = "metalfoam"
|
||||
else
|
||||
icon_state = "ironfoam"
|
||||
|
||||
/obj/structure/foamedmetal/ex_act(severity)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/blob_act()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/bullet_act()
|
||||
if(metal==MFOAM_ALUMINUM || prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if((HULK in user.mutations) || (prob(75 - metal*25)))
|
||||
user.visible_message("<span class='warning'>[user] smashes through \the [src].</span>", "<span class='notice'>You smash through \the [src].</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You hit the metal foam but bounce off it.</span>")
|
||||
|
||||
/obj/structure/foamedmetal/attackby(obj/item/I, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
G.affecting.loc = src.loc
|
||||
user.visible_message("<span class='warning'>[G.assailant] smashes [G.affecting] through the foamed metal wall.</span>")
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(prob(I.force*20 - metal*25))
|
||||
user.visible_message("<span class='warning'>[user] smashes through the foamed metal with \the [I].</span>", "<span class='notice'>You smash through the foamed metal with \the [I].</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You hit the metal foam to no effect.</span>")
|
||||
|
||||
/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/M)
|
||||
M.do_attack_animation(src)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.visible_message("<span class='notice'>[M] nudges \the [src].</span>")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
M.visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
M.visible_message("<span class='danger'>[M] tears apart \the [src]!</span>");
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
return !density
|
||||
|
||||
/obj/structure/foamedmetal/CanAtmosPass()
|
||||
return !density
|
||||
@@ -0,0 +1,205 @@
|
||||
/////////////////////////////////////////////
|
||||
//////// Attach a trail to any object, that spawns when it moves (like for the jetpack)
|
||||
/// just pass in the object to attach it to in set_up
|
||||
/// Then do start() to start it and stop() to stop it, obviously
|
||||
/// and don't call start() in a loop that will be repeated otherwise it'll get spammed!
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/datum/effect_system/trail_follow
|
||||
var/turf/oldposition
|
||||
var/processing = 1
|
||||
var/on = 1
|
||||
|
||||
/datum/effect_system/trail_follow/set_up(atom/atom)
|
||||
attach(atom)
|
||||
oldposition = get_turf(atom)
|
||||
|
||||
/datum/effect_system/trail_follow/Destroy()
|
||||
oldposition = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/trail_follow/proc/stop()
|
||||
processing = 0
|
||||
on = 0
|
||||
oldposition = null
|
||||
|
||||
/datum/effect_system/trail_follow/steam
|
||||
effect_type = /obj/effect/particle_effect/steam
|
||||
|
||||
/datum/effect_system/trail_follow/steam/start() //Whoever is responsible for this abomination of code should become an hero
|
||||
if(!on)
|
||||
on = 1
|
||||
processing = 1
|
||||
if(!oldposition)
|
||||
oldposition = get_turf(holder)
|
||||
if(processing)
|
||||
processing = 0
|
||||
if(number < 3)
|
||||
var/obj/effect/particle_effect/steam/I = new effect_type(oldposition)
|
||||
number++
|
||||
I.dir = holder.dir
|
||||
oldposition = get_turf(holder)
|
||||
spawn(10)
|
||||
qdel(I)
|
||||
number--
|
||||
spawn(2)
|
||||
if(on)
|
||||
processing = 1
|
||||
start()
|
||||
|
||||
/obj/effect/particle_effect/ion_trails
|
||||
name = "ion trails"
|
||||
icon_state = "ion_trails"
|
||||
anchored = 1
|
||||
|
||||
/datum/effect_system/trail_follow/ion
|
||||
effect_type = /obj/effect/particle_effect/ion_trails
|
||||
|
||||
/datum/effect_system/trail_follow/ion/start() //Whoever is responsible for this abomination of code should become an hero
|
||||
if(!on)
|
||||
on = 1
|
||||
processing = 1
|
||||
if(processing)
|
||||
processing = 0
|
||||
var/turf/T = get_turf(src.holder)
|
||||
if(T != oldposition)
|
||||
if(!has_gravity(T))
|
||||
var/obj/effect/particle_effect/ion_trails/I = new effect_type(oldposition)
|
||||
I.dir = holder.dir
|
||||
flick("ion_fade", I)
|
||||
I.icon_state = ""
|
||||
spawn(20)
|
||||
qdel(I)
|
||||
oldposition = T
|
||||
spawn(2)
|
||||
if(on)
|
||||
processing = 1
|
||||
start()
|
||||
|
||||
/datum/effect_system/trail_follow/ion/space_trail
|
||||
var/turf/oldloc // secondary ion trail loc
|
||||
var/turf/currloc
|
||||
|
||||
/datum/effect_system/trail_follow/ion/space_trail/Destroy()
|
||||
oldloc = null
|
||||
currloc = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/trail_follow/ion/space_trail/start()
|
||||
if(!on)
|
||||
on = 1
|
||||
processing = 1
|
||||
if(processing)
|
||||
processing = 0
|
||||
spawn(0)
|
||||
var/turf/T = get_turf(src.holder)
|
||||
if(currloc != T)
|
||||
switch(holder.dir)
|
||||
if(NORTH)
|
||||
src.oldposition = T
|
||||
src.oldposition = get_step(oldposition, SOUTH)
|
||||
src.oldloc = get_step(oldposition,EAST)
|
||||
//src.oldloc = get_step(oldloc, SOUTH)
|
||||
if(SOUTH) // More difficult, offset to the north!
|
||||
src.oldposition = get_step(holder,NORTH)
|
||||
src.oldposition = get_step(oldposition,NORTH)
|
||||
src.oldloc = get_step(oldposition,EAST)
|
||||
//src.oldloc = get_step(oldloc,NORTH)
|
||||
if(EAST) // Just one to the north should suffice
|
||||
src.oldposition = T
|
||||
src.oldposition = get_step(oldposition, WEST)
|
||||
src.oldloc = get_step(oldposition,NORTH)
|
||||
//src.oldloc = get_step(oldloc,WEST)
|
||||
if(WEST) // One to the east and north from there
|
||||
src.oldposition = get_step(holder,EAST)
|
||||
src.oldposition = get_step(oldposition,EAST)
|
||||
src.oldloc = get_step(oldposition,NORTH)
|
||||
//src.oldloc = get_step(oldloc,EAST)
|
||||
if(istype(T, /turf/space))
|
||||
var/obj/effect/particle_effect/ion_trails/I = new effect_type(oldposition)
|
||||
var/obj/effect/particle_effect/ion_trails/II = new effect_type(oldloc)
|
||||
//src.oldposition = T
|
||||
I.dir = holder.dir
|
||||
II.dir = holder.dir
|
||||
flick("ion_fade", I)
|
||||
flick("ion_fade", II)
|
||||
I.icon_state = ""
|
||||
II.icon_state = ""
|
||||
spawn(20)
|
||||
if(I)
|
||||
qdel(I)
|
||||
if(II)
|
||||
qdel(II)
|
||||
spawn(2)
|
||||
if(on)
|
||||
processing = 1
|
||||
start()
|
||||
currloc = T
|
||||
|
||||
//Reagent-based explosion effect
|
||||
/datum/effect_system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
|
||||
|
||||
/datum/effect_system/reagents_explosion/set_up(amt, loca, flash = 0, flash_fact = 0)
|
||||
amount = amt
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
flashing = flash
|
||||
flashing_factor = flash_fact
|
||||
|
||||
|
||||
/datum/effect_system/reagents_explosion/start()
|
||||
if(amount <= 2)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
for(var/mob/M in viewers(1, location))
|
||||
if(prob(50 * amount))
|
||||
to_chat(M, "<span class='warning'>The explosion knocks you down.</span>")
|
||||
M.Weaken(rand(1,5))
|
||||
return
|
||||
else
|
||||
var/devastation = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
if(round(amount/12) > 0)
|
||||
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
|
||||
|
||||
if(round(amount/6) > 0)
|
||||
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
|
||||
|
||||
if(round(amount/3) > 0)
|
||||
light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3))
|
||||
|
||||
if(flashing && flashing_factor)
|
||||
flash += (round(amount/4) * flashing_factor)
|
||||
|
||||
for(var/mob/M in viewers(8, location))
|
||||
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
|
||||
|
||||
explosion(location, devastation, heavy, light, flash)
|
||||
|
||||
/datum/effect_system/reagents_explosion/proc/holder_damage(atom/holder)
|
||||
if(holder)
|
||||
var/dmglevel = 4
|
||||
|
||||
if(round(amount/8) > 0)
|
||||
dmglevel = 1
|
||||
else if(round(amount/4) > 0)
|
||||
dmglevel = 2
|
||||
else if(round(amount/2) > 0)
|
||||
dmglevel = 3
|
||||
|
||||
if(dmglevel<4)
|
||||
holder.ex_act(dmglevel)
|
||||
@@ -0,0 +1,305 @@
|
||||
/////////////////////////////////////////////
|
||||
//// SMOKE SYSTEMS
|
||||
// direct can be optionally added when set_up, to make the smoke always travel in one direction
|
||||
// in case you wanted a vent to always smoke north for example
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke
|
||||
name = "smoke"
|
||||
icon_state = "smoke"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
opacity = 1
|
||||
anchored = 0
|
||||
var/steps = 0
|
||||
var/lifetime = 5
|
||||
var/direction
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/fade_out(frames = 16)
|
||||
if(alpha == 0) //Handle already transparent case
|
||||
return
|
||||
if(frames == 0)
|
||||
frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame".
|
||||
var/step = alpha / frames
|
||||
for(var/i = 0, i < frames, i++)
|
||||
alpha -= step
|
||||
if(alpha < 160)
|
||||
set_opacity(0)
|
||||
stoplag()
|
||||
|
||||
/obj/effect/particle_effect/smoke/New()
|
||||
..()
|
||||
processing_objects |= src
|
||||
lifetime += rand(-1,1)
|
||||
|
||||
/obj/effect/particle_effect/smoke/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/kill_smoke()
|
||||
processing_objects.Remove(src)
|
||||
addtimer(src, "fade_out", 0)
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/particle_effect/smoke/process()
|
||||
lifetime--
|
||||
if(lifetime < 1)
|
||||
kill_smoke()
|
||||
return 0
|
||||
if(steps >= 1)
|
||||
step(src,direction)
|
||||
steps--
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/Crossed(mob/living/M)
|
||||
if(!istype(M))
|
||||
return
|
||||
smoke_mob(M)
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C)
|
||||
if(!istype(C))
|
||||
return FALSE
|
||||
if(lifetime<1)
|
||||
return FALSE
|
||||
if(!C.can_breathe_gas())
|
||||
return FALSE
|
||||
if(C.smoke_delay)
|
||||
return FALSE
|
||||
C.smoke_delay++
|
||||
addtimer(src, "remove_smoke_delay", 10, FALSE, C)
|
||||
return TRUE
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
|
||||
if(C)
|
||||
C.smoke_delay = 0
|
||||
|
||||
/datum/effect_system/smoke_spread
|
||||
effect_type = /obj/effect/particle_effect/smoke
|
||||
var/direction
|
||||
|
||||
/datum/effect_system/smoke_spread/set_up(n = 5, c = 0, loca, direct)
|
||||
if(n > 20)
|
||||
n = 20
|
||||
number = n
|
||||
cardinals = c
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
if(direct)
|
||||
direction = direct
|
||||
|
||||
/datum/effect_system/smoke_spread/start()
|
||||
for(var/i=0, i<number, i++)
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/S = new effect_type(location)
|
||||
if(!direction)
|
||||
if(cardinals)
|
||||
S.direction = pick(cardinal)
|
||||
else
|
||||
S.direction = pick(alldirs)
|
||||
else
|
||||
S.direction = direction
|
||||
S.steps = pick(0,1,1,1,2,2,2,3)
|
||||
S.process()
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Bad smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad
|
||||
lifetime = 8
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/process()
|
||||
if(..())
|
||||
for(var/mob/living/carbon/M in range(1,src))
|
||||
smoke_mob(M)
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.drop_item()
|
||||
M.adjustOxyLoss(1)
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
if(istype(mover, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/beam/B = mover
|
||||
B.damage = (B.damage/2)
|
||||
return 1
|
||||
|
||||
/datum/effect_system/smoke_spread/bad
|
||||
effect_type = /obj/effect/particle_effect/smoke/bad
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Nanofrost smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/freezing
|
||||
name = "nanofrost smoke"
|
||||
color = "#B2FFFF"
|
||||
opacity = 0
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing
|
||||
effect_type = /obj/effect/particle_effect/smoke/freezing
|
||||
var/blast = 0
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
|
||||
if(istype(A, /turf/simulated))
|
||||
var/turf/simulated/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = 2
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
if(G.toxins)
|
||||
G.nitrogen += (G.toxins)
|
||||
G.toxins = 0
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/V in T)
|
||||
if(!isnull(V.welded) && !V.welded) //must be an unwelded vent pump.
|
||||
V.welded = 1
|
||||
V.update_icon()
|
||||
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/U in T)
|
||||
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent scrubber.
|
||||
U.welded = 1
|
||||
U.update_icon()
|
||||
U.visible_message("<span class='danger'>[U] was frozen shut!</span>")
|
||||
for(var/mob/living/L in T)
|
||||
L.ExtinguishMob()
|
||||
for(var/obj/item/Item in T)
|
||||
Item.extinguish()
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/set_up(n = 5, c = 0, loca, direct, blasting = 0)
|
||||
..()
|
||||
blast = blasting
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/start()
|
||||
if(blast)
|
||||
for(var/turf/T in RANGE_TURFS(2, location))
|
||||
Chilled(T)
|
||||
..()
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Sleep smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping
|
||||
color = "#9C3636"
|
||||
lifetime = 10
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping/process()
|
||||
if(..())
|
||||
for(var/mob/living/carbon/M in range(1,src))
|
||||
smoke_mob(M)
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.drop_item()
|
||||
M.Sleeping(max(M.sleeping,10))
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
/datum/effect_system/smoke_spread/sleeping
|
||||
effect_type = /obj/effect/particle_effect/smoke/sleeping
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Chem smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem
|
||||
icon = 'icons/effects/chemsmoke.dmi'
|
||||
opacity = 0
|
||||
lifetime = 10
|
||||
|
||||
/datum/effect_system/smoke_spread/chem
|
||||
effect_type = /obj/effect/particle_effect/smoke/chem
|
||||
var/obj/chemholder
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/New()
|
||||
..()
|
||||
chemholder = new/obj()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/Destroy()
|
||||
QDEL_NULL(chemholder)
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, n = 5, c = 0, loca, direct, silent = 0)
|
||||
if(n > 20)
|
||||
n = 20
|
||||
number = n
|
||||
cardinals = c
|
||||
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
if(direct)
|
||||
direction = direct
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
if(!silent)
|
||||
var/contained = ""
|
||||
for(var/reagent in carry.reagent_list)
|
||||
contained += " [reagent] "
|
||||
if(contained)
|
||||
contained = "\[[contained]\]"
|
||||
var/area/A = get_area(location)
|
||||
|
||||
var/where = "[A.name] | [location.x], [location.y]"
|
||||
var/whereLink = "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
|
||||
|
||||
if(carry && carry.my_atom)
|
||||
if(carry.my_atom.fingerprintslast)
|
||||
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = " "
|
||||
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
else
|
||||
msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.")
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/start(effect_range = 2)
|
||||
var/color = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
var/obj/effect/particle_effect/smoke/chem/smokeholder = new effect_type(location)
|
||||
for(var/atom/A in view(effect_range, smokeholder))
|
||||
chemholder.reagents.reaction(A)
|
||||
if(iscarbon(A))
|
||||
var/mob/living/carbon/C = A
|
||||
if(C.can_breathe_gas())
|
||||
chemholder.reagents.copy_to(C, chemholder.reagents.total_volume)
|
||||
qdel(smokeholder)
|
||||
for(var/i=0, i<number, i++)
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/chem/S = new effect_type(location)
|
||||
if(!direction)
|
||||
if(cardinals)
|
||||
S.direction = pick(cardinal)
|
||||
else
|
||||
S.direction = pick(alldirs)
|
||||
else
|
||||
S.direction = direction
|
||||
|
||||
S.steps = pick(0,1,1,1,2,2,2,3)
|
||||
|
||||
if(color)
|
||||
S.icon += color // give the smoke color, if it has any to begin with
|
||||
else
|
||||
// if no color, just use the old smoke icon
|
||||
S.icon = 'icons/effects/96x96.dmi'
|
||||
S.icon_state = "smoke"
|
||||
S.process()
|
||||
@@ -0,0 +1,58 @@
|
||||
/////////////////////////////////////////////
|
||||
//SPARK SYSTEM (like steam system)
|
||||
// The attach(atom/atom) proc is optional, and can be called to attach the effect
|
||||
// to something, like the RCD, so then you can just call start() and the sparks
|
||||
// will always spawn at the items location.
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/sparks
|
||||
name = "sparks"
|
||||
desc = "it's a spark what do you need to know?"
|
||||
icon_state = "sparks"
|
||||
anchored = 1
|
||||
var/hotspottemp = 1000
|
||||
|
||||
/obj/effect/particle_effect/sparks/New()
|
||||
..()
|
||||
playsound(loc, "sparks", 100, 1)
|
||||
var/turf/T = loc
|
||||
if(isturf(T))
|
||||
T.hotspot_expose(hotspottemp, 100)
|
||||
QDEL_IN(src, 20)
|
||||
|
||||
/obj/effect/particle_effect/sparks/Destroy()
|
||||
var/turf/T = loc
|
||||
if(isturf(T))
|
||||
T.hotspot_expose(hotspottemp,100)
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/sparks/Move()
|
||||
..()
|
||||
var/turf/T = loc
|
||||
if(isturf(T))
|
||||
T.hotspot_expose(hotspottemp,100)
|
||||
|
||||
/datum/effect_system/spark_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks
|
||||
|
||||
//////////////////////////////////
|
||||
//////SPARKLE FIREWORKS
|
||||
/////////////////////////////////
|
||||
////////////////////////////
|
||||
/obj/effect/particle_effect/sparks/sparkles
|
||||
name = "sparkle"
|
||||
icon = 'icons/obj/fireworks.dmi'//findback
|
||||
icon_state = "sparkel"
|
||||
hotspottemp = 3000
|
||||
|
||||
/obj/effect/particle_effect/sparks/sparkles/New()
|
||||
var/icon/I = new(src.icon,src.icon_state)
|
||||
var/r = rand(0,255)
|
||||
var/g = rand(0,255)
|
||||
var/b = rand(0,255)
|
||||
I.Blend(rgb(r,g,b),ICON_MULTIPLY)
|
||||
src.icon = I
|
||||
..()
|
||||
|
||||
/datum/effect_system/sparkle_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks/sparkles
|
||||
@@ -0,0 +1,52 @@
|
||||
//WATER EFFECTS
|
||||
/obj/effect/particle_effect/water
|
||||
name = "water"
|
||||
icon_state = "extinguish"
|
||||
var/life = 15
|
||||
|
||||
/obj/effect/particle_effect/water/New()
|
||||
..()
|
||||
QDEL_IN(src, 70)
|
||||
|
||||
/obj/effect/particle_effect/water/Move(turf/newloc)
|
||||
if(--life < 1)
|
||||
qdel()
|
||||
return 0
|
||||
if(newloc.density)
|
||||
return 0
|
||||
.=..()
|
||||
|
||||
/obj/effect/particle_effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
reagents.reaction(A)
|
||||
if(istype(A,/atom/movable))
|
||||
var/atom/movable/AM = A
|
||||
AM.water_act(life, 310.15, src)
|
||||
return ..()
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// GENERIC STEAM SPREAD SYSTEM
|
||||
|
||||
//Usage: set_up(number of bits of steam, use North/South/East/West only, spawn location)
|
||||
// The attach(atom/atom) proc is optional, and can be called to attach the effect
|
||||
// to something, like a smoking beaker, so then you can just call start() and the steam
|
||||
// will always spawn at the items location, even if it's moved.
|
||||
|
||||
/* Example:
|
||||
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() -- creates new system
|
||||
steam.set_up(5, 0, mob.loc) -- sets up variables
|
||||
OPTIONAL: steam.attach(mob)
|
||||
steam.start() -- spawns the effect
|
||||
*/
|
||||
/////////////////////////////////////////////
|
||||
/obj/effect/particle_effect/steam
|
||||
name = "steam"
|
||||
icon_state = "extinguish"
|
||||
density = 0
|
||||
|
||||
/obj/effect/particle_effect/steam/New()
|
||||
..()
|
||||
QDEL_IN(src, 20)
|
||||
|
||||
/datum/effect_system/steam_spread
|
||||
effect_type = /obj/effect/particle_effect/steam
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
//objects in /obj/effect should never be things that are attackable, use obj/structure instead.
|
||||
//Effects are mostly temporary visual effects like sparks, smoke, as well as decals, etc...
|
||||
|
||||
/obj/effect
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
@@ -1,68 +0,0 @@
|
||||
/obj/effect/expl_particles
|
||||
name = "explosive particles"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "explosion_particle"
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/expl_particles/New()
|
||||
..()
|
||||
spawn (15)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/expl_particles/Move()
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/effect/system/expl_particles
|
||||
number = 10
|
||||
|
||||
/datum/effect/system/expl_particles/set_up(n = 10, loca)
|
||||
number = n
|
||||
if(istype(loca, /turf/)) location = loca
|
||||
else location = get_turf(loca)
|
||||
|
||||
/datum/effect/system/expl_particles/start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
spawn(0)
|
||||
var/obj/effect/expl_particles/expl = new /obj/effect/expl_particles(src.location)
|
||||
var/direct = pick(alldirs)
|
||||
for(i=0, i<pick(1;25,2;50,3,4;200), i++)
|
||||
sleep(1)
|
||||
step(expl,direct)
|
||||
|
||||
/obj/effect/explosion
|
||||
name = "explosive particles"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effect/explosion/New()
|
||||
..()
|
||||
spawn (10)
|
||||
qdel(src)
|
||||
|
||||
/datum/effect/system/explosion/set_up(turf/loc)
|
||||
..(loc=loc)
|
||||
|
||||
/datum/effect/system/explosion/start()
|
||||
new/obj/effect/explosion( location )
|
||||
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
|
||||
P.set_up(10,location)
|
||||
P.start()
|
||||
|
||||
/datum/effect/system/explosion/smoke
|
||||
|
||||
/datum/effect/system/explosion/smoke/start()
|
||||
..()
|
||||
spawn(5)
|
||||
var/datum/effect/system/harmless_smoke_spread/S = new/datum/effect/system/harmless_smoke_spread()
|
||||
S.set_up(5,0,location,null)
|
||||
S.start()
|
||||
@@ -30,7 +30,7 @@
|
||||
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
||||
|
||||
if(sparks)
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(triggered)
|
||||
return
|
||||
visible_message("<span class='danger'>[victim] sets off [bicon(src)] [src]!</span>")
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
mineEffect(victim)
|
||||
|
||||
@@ -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"
|
||||
@@ -46,167 +46,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
|
||||
splatter_type = "xsplatter"
|
||||
|
||||
/obj/effect/overlay/wall_rot
|
||||
name = "Wallrot"
|
||||
desc = "Ick..."
|
||||
@@ -220,68 +59,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)
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
name = "web"
|
||||
desc = "it's stringy and sticky"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
anchored = 1
|
||||
density = 0
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
var/health = 15
|
||||
var/master_commander = null
|
||||
var/mob/living/carbon/human/master_commander = null
|
||||
|
||||
/obj/structure/spider/Destroy()
|
||||
master_commander = null
|
||||
@@ -15,25 +15,24 @@
|
||||
//similar to weeds, but only barfed out by nurses manually
|
||||
/obj/structure/spider/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2.0)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
if(3.0)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/spider/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
/obj/structure/spider/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.attack_verb.len)
|
||||
visible_message("<span class='danger'>[user] has [pick(W.attack_verb)] \the [src] with \the [W]!</span>")
|
||||
visible_message("<span class='danger'>[user] has [pick(W.attack_verb)] [src] with [W]!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[user] has attacked \the [src] with \the [W]!</span>")
|
||||
visible_message("<span class='danger'>[user] has attacked [src] with [W]!</span>")
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
var/damage = W.force / 4
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
@@ -43,7 +42,7 @@
|
||||
health -= damage
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/spider/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/spider/bullet_act(obj/item/projectile/Proj)
|
||||
..()
|
||||
health -= Proj.damage
|
||||
healthcheck()
|
||||
@@ -61,20 +60,22 @@
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/structure/spider/stickyweb/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
|
||||
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(height == 0)
|
||||
return TRUE
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return 1
|
||||
return TRUE
|
||||
else if(istype(mover, /mob/living))
|
||||
if(prob(50))
|
||||
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
|
||||
return 0
|
||||
to_chat(mover, "<span class='danger'>You get stuck in [src] for a moment.</span>")
|
||||
return FALSE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/spider/eggcluster
|
||||
name = "egg cluster"
|
||||
@@ -82,9 +83,10 @@
|
||||
icon_state = "eggs"
|
||||
var/amount_grown = 0
|
||||
var/player_spiders = 0
|
||||
var/faction = list()
|
||||
var/list/faction = list()
|
||||
|
||||
/obj/structure/spider/eggcluster/New()
|
||||
..()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
processing_objects.Add(src)
|
||||
@@ -92,10 +94,10 @@
|
||||
/obj/structure/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(3,12)
|
||||
for(var/i=0, i<num, i++)
|
||||
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
|
||||
S.faction = faction
|
||||
var/num = rand(3, 12)
|
||||
for(var/i in 1 to num)
|
||||
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(loc)
|
||||
S.faction = faction.Copy()
|
||||
S.master_commander = master_commander
|
||||
if(player_spiders)
|
||||
S.player_spiders = 1
|
||||
@@ -113,10 +115,11 @@
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
var/player_spiders = 0
|
||||
var/faction = list()
|
||||
var/list/faction = list()
|
||||
var/selecting_player = 0
|
||||
|
||||
/obj/structure/spider/spiderling/New()
|
||||
..()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
processing_objects.Add(src)
|
||||
@@ -128,13 +131,13 @@
|
||||
|
||||
/obj/structure/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
src.loc = user.loc
|
||||
loc = user.loc
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/spider/spiderling/proc/die()
|
||||
visible_message("<span class='alert'>[src] dies!</span>")
|
||||
new /obj/effect/decal/cleanable/spiderling_remains(src.loc)
|
||||
new /obj/effect/decal/cleanable/spiderling_remains(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/spider/spiderling/healthcheck()
|
||||
@@ -143,7 +146,7 @@
|
||||
|
||||
/obj/structure/spider/spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(istype(src.loc, /turf))
|
||||
if(istype(loc, /turf))
|
||||
travelling_in_vent = 0
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
@@ -190,7 +193,7 @@
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom)
|
||||
if(prob(40))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
|
||||
visible_message("<span class='notice'>[src] skitters[pick(" away"," around","")].</span>")
|
||||
else if(prob(10))
|
||||
//ventcrawl!
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
|
||||
@@ -203,8 +206,8 @@
|
||||
if(amount_grown >= 100)
|
||||
if(!grow_as)
|
||||
grow_as = pick(typesof(/mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
|
||||
S.faction = faction
|
||||
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(loc)
|
||||
S.faction = faction.Copy()
|
||||
S.master_commander = master_commander
|
||||
if(player_spiders && !selecting_player)
|
||||
selecting_player = 1
|
||||
@@ -213,9 +216,10 @@
|
||||
|
||||
if(candidates.len)
|
||||
var/mob/C = pick(candidates)
|
||||
S.key = C.key
|
||||
if(master_commander)
|
||||
to_chat(S, "<span class='userdanger'>You are a spider who is loyal to [master_commander], obey [master_commander]'s every order and assist them in completing their goals at any cost.</span>")
|
||||
if(C)
|
||||
S.key = C.key
|
||||
if(S.master_commander)
|
||||
to_chat(S, "<span class='biggerdanger'>You are a spider who is loyal to [S.master_commander], obey [S.master_commander]'s every order and assist them in completing their goals at any cost.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/spiderling_remains
|
||||
@@ -232,7 +236,8 @@
|
||||
health = 60
|
||||
|
||||
/obj/structure/spider/cocoon/New()
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
..()
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
|
||||
/obj/structure/spider/cocoon/Destroy()
|
||||
visible_message("<span class='danger'>[src] splits open.</span>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -59,11 +59,11 @@
|
||||
|
||||
if(heavy_impact_range > 1)
|
||||
if(smoke)
|
||||
var/datum/effect/system/explosion/smoke/E = new/datum/effect/system/explosion/smoke()
|
||||
var/datum/effect_system/explosion/smoke/E = new/datum/effect_system/explosion/smoke()
|
||||
E.set_up(epicenter)
|
||||
E.start()
|
||||
else
|
||||
var/datum/effect/system/explosion/E = new/datum/effect/system/explosion()
|
||||
var/datum/effect_system/explosion/E = new/datum/effect_system/explosion()
|
||||
E.set_up(epicenter)
|
||||
E.start()
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You burn your hand on [src]!</span>")
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_arm")
|
||||
if(affecting && affecting.take_damage(0, 5)) // 5 burn damage
|
||||
if(affecting && affecting.receive_damage(0, 5)) // 5 burn damage
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
return
|
||||
@@ -377,15 +377,12 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
|
||||
if(!(usr)) //BS12 EDIT
|
||||
return
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr))
|
||||
if(usr.incapacitated() || !Adjacent(usr))
|
||||
return
|
||||
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
|
||||
if(!iscarbon(usr) || isbrain(usr)) //Is humanoid, and is not a brain
|
||||
to_chat(usr, "<span class='warning'>You can't pick things up!</span>")
|
||||
return
|
||||
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
|
||||
to_chat(usr, "<span class='warning'>You can't pick things up!</span>")
|
||||
return
|
||||
if(src.anchored) //Object isn't anchored
|
||||
if(anchored) //Object isn't anchored
|
||||
to_chat(usr, "<span class='warning'>You can't pick that up!</span>")
|
||||
return
|
||||
if(!usr.hand && usr.r_hand) //Right hand is not full
|
||||
@@ -394,12 +391,11 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
if(usr.hand && usr.l_hand) //Left hand is not full
|
||||
to_chat(usr, "<span class='warning'>Your left hand is full.</span>")
|
||||
return
|
||||
if(!istype(src.loc, /turf)) //Object is on a turf
|
||||
if(!isturf(loc)) //Object is on a turf
|
||||
to_chat(usr, "<span class='warning'>You can't pick that up!</span>")
|
||||
return
|
||||
//All checks are done, time to pick it up!
|
||||
usr.UnarmedAttack(src)
|
||||
return
|
||||
|
||||
|
||||
//This proc is executed when someone clicks the on-screen UI button.
|
||||
@@ -458,9 +454,9 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(!eyes) // should still get stabbed in the head
|
||||
var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"]
|
||||
head.take_damage(rand(10,14), 1)
|
||||
head.receive_damage(rand(10,14), 1)
|
||||
return
|
||||
eyes.take_damage(rand(3,4), 1)
|
||||
eyes.receive_damage(rand(3,4), 1)
|
||||
if(eyes.damage >= eyes.min_bruised_damage)
|
||||
if(M.stat != 2)
|
||||
if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly
|
||||
@@ -476,7 +472,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
if(M.stat != 2)
|
||||
to_chat(M, "<span class='danger'>You go blind!</span>")
|
||||
var/obj/item/organ/external/affecting = H.get_organ("head")
|
||||
if(affecting.take_damage(7))
|
||||
if(affecting.receive_damage(7))
|
||||
H.UpdateDamageIcon()
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/obj/item/device/chameleon/proc/disrupt(var/delete_dummy = 1)
|
||||
if(active_dummy)
|
||||
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
for(var/obj/item/borg/combat/shield/S in R.module.modules)
|
||||
if(R.activated(S))
|
||||
add_logs(user, M, "flashed", object="[src.name]")
|
||||
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but if blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by his shield!</span>")
|
||||
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by their shield!</span>")
|
||||
return 1
|
||||
add_logs(user, M, "flashed", object="[src.name]")
|
||||
if(M.flash_eyes(affect_silicon = 1))
|
||||
@@ -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"
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils are unresponsive to the light!</span>")
|
||||
else if((XRAY in M.mutations) || (eyes.colourblind_darkview && eyes.colourblind_darkview == eyes.get_dark_view())) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
|
||||
else if((XRAY in M.mutations) || eyes.get_dark_view() >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils glow eerily!</span>")
|
||||
else //they're okay!
|
||||
if(M.flash_eyes(visual = 1))
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
if(M)
|
||||
M.moved_recently = 0
|
||||
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, M)
|
||||
s.start()
|
||||
|
||||
|
||||
@@ -675,6 +675,13 @@ var/global/list/default_medbay_channels = list(
|
||||
..()
|
||||
set_frequency(DTH_FREQ)
|
||||
|
||||
/obj/item/device/radio/borg/ert
|
||||
keyslot = new /obj/item/device/encryptionkey/ert
|
||||
|
||||
/obj/item/device/radio/borg/ert/New()
|
||||
..()
|
||||
set_frequency(ERT_FREQ)
|
||||
|
||||
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
// -------------------------------------
|
||||
/obj/item/toy/random
|
||||
name = "Random Toy"
|
||||
New()
|
||||
..()
|
||||
var/list/types = list(/obj/item/weapon/gun/projectile/shotgun/toy/crossbow, /obj/item/toy/balloon,/obj/item/toy/spinningtoy,/obj/item/weapon/reagent_containers/spray/waterflower) + subtypesof(/obj/item/toy/prize)
|
||||
var/T = pick(types)
|
||||
new T(loc)
|
||||
spawn(1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/toy/random/New()
|
||||
..()
|
||||
var/list/types = list(/obj/item/weapon/gun/projectile/shotgun/toy/crossbow, /obj/item/toy/balloon,/obj/item/toy/spinningtoy,/obj/item/weapon/reagent_containers/spray/waterflower) + subtypesof(/obj/item/toy/prize)
|
||||
var/T = pick(types)
|
||||
new T(loc)
|
||||
spawn(1)
|
||||
qdel(src)
|
||||
|
||||
// -------------------------------------
|
||||
// Random cleanables, clearly this makes sense
|
||||
@@ -17,24 +18,26 @@
|
||||
|
||||
/obj/effect/decal/cleanable/random
|
||||
name = "Random Mess"
|
||||
New()
|
||||
..()
|
||||
var/list/list = subtypesof(/obj/effect/decal/cleanable) - list(/obj/effect/decal/cleanable/random,/obj/effect/decal/cleanable/cobweb,/obj/effect/decal/cleanable/cobweb2)
|
||||
var/T = pick(list)
|
||||
new T(loc)
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/random/New()
|
||||
..()
|
||||
var/list/list = subtypesof(/obj/effect/decal/cleanable) - list(/obj/effect/decal/cleanable/random,/obj/effect/decal/cleanable/cobweb,/obj/effect/decal/cleanable/cobweb2)
|
||||
var/T = pick(list)
|
||||
new T(loc)
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/stack/sheet/animalhide/random
|
||||
name = "random animal hide"
|
||||
New()
|
||||
..()
|
||||
spawn(1)
|
||||
var/htype = pick(/obj/item/stack/sheet/animalhide/cat,/obj/item/stack/sheet/animalhide/corgi,/obj/item/stack/sheet/animalhide/human,/obj/item/stack/sheet/animalhide/lizard,/obj/item/stack/sheet/animalhide/monkey)
|
||||
var/obj/item/stack/S = new htype(loc)
|
||||
S.amount = amount
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/animalhide/random/New()
|
||||
..()
|
||||
spawn(1)
|
||||
var/htype = pick(/obj/item/stack/sheet/animalhide/cat,/obj/item/stack/sheet/animalhide/corgi,/obj/item/stack/sheet/animalhide/human,/obj/item/stack/sheet/animalhide/lizard,/obj/item/stack/sheet/animalhide/monkey)
|
||||
var/obj/item/stack/S = new htype(loc)
|
||||
S.amount = amount
|
||||
qdel(src)
|
||||
|
||||
// -------------------------------------
|
||||
// Not yet identified chemical.
|
||||
@@ -43,103 +46,108 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/random_reagent
|
||||
name = "unlabelled bottle"
|
||||
// identify_probability = 0
|
||||
New()
|
||||
..()
|
||||
var/datum/reagent/R = pick(chemical_reagents_list)
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R,10)
|
||||
else
|
||||
reagents.add_reagent(R,rand(2,3)*10)
|
||||
pixel_x = rand(-10,10)
|
||||
pixel_y = rand(-10,10)
|
||||
// identify_probability = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/random_reagent/New()
|
||||
..()
|
||||
var/list/possible_chems = chemical_reagents_list.Copy()
|
||||
possible_chems -= blocked_chems.Copy()
|
||||
var/datum/reagent/R = pick(possible_chems)
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R, 10)
|
||||
else
|
||||
reagents.add_reagent(R, rand(2, 3)*10)
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, 10)
|
||||
|
||||
//Cuts out the food and drink reagents
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/random_chem
|
||||
name = "unlabelled chemical bottle"
|
||||
// identify_probability = 0
|
||||
New()
|
||||
..()
|
||||
// identify_probability = 0
|
||||
|
||||
var/datum/reagent/R = pick(standard_chemicals + rare_chemicals)
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R,10)
|
||||
else
|
||||
reagents.add_reagent(R,rand(2,3)*10)
|
||||
name = "unlabelled bottle"
|
||||
pixel_x = rand(-10,10)
|
||||
pixel_y = rand(-10,10)
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/random_chem/New()
|
||||
..()
|
||||
var/R = get_random_reagent_id()
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R, 10)
|
||||
else
|
||||
reagents.add_reagent(R, rand(2, 3)*10)
|
||||
name = "unlabelled bottle"
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem
|
||||
name = "unlabelled chemical bottle"
|
||||
// identify_probability = 0
|
||||
New()
|
||||
..()
|
||||
var/datum/reagent/R = pick(base_chemicals)
|
||||
reagents.add_reagent(R,rand(2,6)*5)
|
||||
name = "unlabelled bottle"
|
||||
pixel_x = rand(-10,10)
|
||||
pixel_y = rand(-10,10)
|
||||
// identify_probability = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem/New()
|
||||
..()
|
||||
var/datum/reagent/R = pick(base_chemicals)
|
||||
reagents.add_reagent(R, rand(2, 6)*5)
|
||||
name = "unlabelled bottle"
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink
|
||||
name = "unlabelled drink"
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
New()
|
||||
..()
|
||||
var/list/additional_drinks = list()
|
||||
if(prob(50))
|
||||
additional_drinks += list("pancuronium","lsd","omnizine","blood")
|
||||
|
||||
var/datum/reagent/R = pick(drinks + additional_drinks)
|
||||
reagents.add_reagent(R,volume)
|
||||
name = "unlabelled bottle"
|
||||
icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red")
|
||||
pixel_x = rand(-5,5)
|
||||
pixel_y = rand(-5,5)
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink/New()
|
||||
..()
|
||||
var/list/possible_drinks = drinks.Copy()
|
||||
if(prob(50))
|
||||
possible_drinks += list("pancuronium","lsd","omnizine","blood")
|
||||
|
||||
var/datum/reagent/R = pick(possible_drinks)
|
||||
reagents.add_reagent(R, volume)
|
||||
name = "unlabelled bottle"
|
||||
icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red")
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent // Same as the chembottle code except the container
|
||||
name = "unlabelled drink?"
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
New()
|
||||
..()
|
||||
var/datum/reagent/R = pick(chemical_reagents_list)
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R,10)
|
||||
else
|
||||
reagents.add_reagent(R,rand(3,10)*10)
|
||||
name = "unlabelled bottle"
|
||||
icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red")
|
||||
pixel_x = rand(-5,5)
|
||||
pixel_y = rand(-5,5)
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent/New()
|
||||
..()
|
||||
|
||||
var/R = get_random_reagent_id()
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R, 10)
|
||||
else
|
||||
reagents.add_reagent(R, rand(3, 10)*10)
|
||||
name = "unlabelled bottle"
|
||||
icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red")
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/random_meds
|
||||
name = "unlabelled pillbottle"
|
||||
desc = "The sheer recklessness of this bottle's existence astounds you."
|
||||
|
||||
New()
|
||||
..()
|
||||
var/i = 1
|
||||
while(i < storage_slots)
|
||||
/obj/item/weapon/storage/pill_bottle/random_meds/New()
|
||||
..()
|
||||
var/i = 1
|
||||
while(i < storage_slots)
|
||||
var/list/possible_medicines = standard_medicines.Copy()
|
||||
if(prob(50))
|
||||
possible_medicines += rare_medicines.Copy()
|
||||
var/datum/reagent/R = pick(possible_medicines)
|
||||
var/obj/item/weapon/reagent_containers/food/pill/P = new(src)
|
||||
|
||||
var/datum/reagent/R
|
||||
if(prob(50))
|
||||
R = pick(standard_medicines + rare_medicines)
|
||||
else
|
||||
R = pick(standard_medicines)
|
||||
var/obj/item/weapon/reagent_containers/food/pill/P = new(src)
|
||||
if(rare_medicines.Find(R))
|
||||
P.reagents.add_reagent(R, 10)
|
||||
else
|
||||
P.reagents.add_reagent(R, rand(2, 5)*10)
|
||||
P.name = "Unlabelled Pill"
|
||||
P.desc = "Something about this pill entices you to try it, against your better judgement."
|
||||
i++
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, 10)
|
||||
|
||||
if(rare_medicines.Find(R))
|
||||
P.reagents.add_reagent(R,10)
|
||||
else
|
||||
P.reagents.add_reagent(R,rand(2,5)*10)
|
||||
P.name = "Unlabelled Pill"
|
||||
P.desc = "Something about this pill entices you to try it, against your better judgement."
|
||||
i++
|
||||
pixel_x = rand(-10,10)
|
||||
pixel_y = rand(-10,10)
|
||||
return
|
||||
|
||||
// -------------------------------------
|
||||
// Containers full of unknown crap
|
||||
@@ -150,43 +158,43 @@
|
||||
desc = "Crate full of chemicals of unknown type and value from a 'trusted' source."
|
||||
req_one_access = list(access_chemistry,access_research,access_qm) // the qm knows a guy, you see.
|
||||
|
||||
New()
|
||||
..()
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
|
||||
while(prob(50))
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_reagent(src)
|
||||
/obj/structure/closet/crate/secure/unknownchemicals/New()
|
||||
..()
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src)
|
||||
while(prob(50))
|
||||
new/obj/item/weapon/reagent_containers/glass/bottle/random_reagent(src)
|
||||
|
||||
new/obj/item/weapon/storage/pill_bottle/random_meds(src)
|
||||
while(prob(25))
|
||||
new/obj/item/weapon/storage/pill_bottle/random_meds(src)
|
||||
while(prob(25))
|
||||
new/obj/item/weapon/storage/pill_bottle/random_meds(src)
|
||||
|
||||
/obj/structure/closet/crate/secure/chemicals
|
||||
name = "chemical supply kit"
|
||||
desc = "Full of basic chemistry supplies."
|
||||
req_one_access = list(access_chemistry,access_research)
|
||||
name = "chemical supply kit"
|
||||
desc = "Full of basic chemistry supplies."
|
||||
req_one_access = list(access_chemistry,access_research)
|
||||
|
||||
New()
|
||||
..()
|
||||
for(var/chem in standard_chemicals)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new(src)
|
||||
B.reagents.add_reagent(chem,B.volume)
|
||||
if(prob(85))
|
||||
var/datum/reagent/r = chemical_reagents_list[chem]
|
||||
B.name = "[r.name] bottle"
|
||||
// B.identify_probability = 100
|
||||
else
|
||||
B.name = "unlabelled bottle"
|
||||
B.desc = "Looks like the label fell off."
|
||||
// B.identify_probability = 0
|
||||
/obj/structure/closet/crate/secure/chemicals/New()
|
||||
..()
|
||||
for(var/chem in standard_chemicals)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new(src)
|
||||
B.reagents.add_reagent(chem, B.volume)
|
||||
if(prob(85))
|
||||
var/datum/reagent/r = chemical_reagents_list[chem]
|
||||
B.name = "[r.name] bottle"
|
||||
// B.identify_probability = 100
|
||||
else
|
||||
B.name = "unlabelled bottle"
|
||||
B.desc = "Looks like the label fell off."
|
||||
// B.identify_probability = 0
|
||||
|
||||
/*
|
||||
/obj/structure/closet/crate/bin/flowers
|
||||
@@ -235,15 +243,15 @@
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
while(prob(25))
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent(src)
|
||||
/obj/structure/closet/secure_closet/random_drinks/New()
|
||||
..()
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src)
|
||||
while(prob(25))
|
||||
new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent(src)
|
||||
|
||||
|
||||
// -------------------------------------
|
||||
@@ -257,23 +265,23 @@
|
||||
name = "\improper Mysterious Crate"
|
||||
desc = "What could it be?"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
var/list/menace = pick( /mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/faithless,/mob/living/simple_animal/hostile/pirate,
|
||||
/mob/living/simple_animal/hostile/creature,/mob/living/simple_animal/hostile/pirate/ranged,
|
||||
/mob/living/simple_animal/hostile/hivebot,/mob/living/simple_animal/hostile/viscerator,/mob/living/simple_animal/hostile/pirate)
|
||||
/obj/structure/largecrate/evil/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
var/list/menace = pick( /mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/faithless,/mob/living/simple_animal/hostile/pirate,
|
||||
/mob/living/simple_animal/hostile/creature,/mob/living/simple_animal/hostile/pirate/ranged,
|
||||
/mob/living/simple_animal/hostile/hivebot,/mob/living/simple_animal/hostile/viscerator,/mob/living/simple_animal/hostile/pirate)
|
||||
|
||||
visible_message("<span class='warning'>Something falls out of the [src]!</span>")
|
||||
var/obj/item/weapon/grenade/clusterbuster/C = new(src.loc)
|
||||
C.prime()
|
||||
spawn(10)
|
||||
new menace(src.loc)
|
||||
while(prob(15))
|
||||
new menace(get_step_rand(src.loc))
|
||||
..()
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
visible_message("<span class='warning'>Something falls out of the [src]!</span>")
|
||||
var/obj/item/weapon/grenade/clusterbuster/C = new(src.loc)
|
||||
C.prime()
|
||||
spawn(10)
|
||||
new menace(src.loc)
|
||||
while(prob(15))
|
||||
new menace(get_step_rand(src.loc))
|
||||
..()
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
//
|
||||
@@ -288,22 +296,22 @@
|
||||
name = "Schrodinger's Crate"
|
||||
desc = "What happens if you open it?"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
var/mob/living/simple_animal/pet/cat/Cat1 = new(loc)
|
||||
Cat1.apply_damage(250)//,TOX)
|
||||
Cat1.name = "Schrodinger's Cat"
|
||||
Cat1.desc = "It seems it's been dead for a while."
|
||||
/obj/structure/largecrate/schrodinger/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
var/mob/living/simple_animal/pet/cat/Cat1 = new(loc)
|
||||
Cat1.apply_damage(250)//,TOX)
|
||||
Cat1.name = "Schrodinger's Cat"
|
||||
Cat1.desc = "It seems it's been dead for a while."
|
||||
|
||||
var/mob/living/simple_animal/pet/cat/Cat2 = new(loc)
|
||||
Cat2.name = "Schrodinger's Cat"
|
||||
Cat2.desc = "It's was alive the whole time!"
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
qdel(Cat1)
|
||||
else
|
||||
qdel(Cat2)
|
||||
return ..()
|
||||
var/mob/living/simple_animal/pet/cat/Cat2 = new(loc)
|
||||
Cat2.name = "Schrodinger's Cat"
|
||||
Cat2.desc = "It's was alive the whole time!"
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
qdel(Cat1)
|
||||
else
|
||||
qdel(Cat2)
|
||||
return ..()
|
||||
|
||||
// --------------------------------------
|
||||
// Collen's box of wonder and mystery
|
||||
@@ -318,18 +326,18 @@
|
||||
/obj/item/weapon/grenade/chem_grenade/dirt, /obj/item/weapon/grenade/chem_grenade/lube, /obj/item/weapon/grenade/smokebomb,
|
||||
/obj/item/weapon/grenade/chem_grenade/drugs, /obj/item/weapon/grenade/chem_grenade/ethanol) // holy list batman
|
||||
|
||||
New()
|
||||
..()
|
||||
var/nade1 = pick(grenadelist)
|
||||
var/nade2 = pick(grenadelist)
|
||||
var/nade3 = pick(grenadelist)
|
||||
var/nade4 = pick(grenadelist)
|
||||
var/nade5 = pick(grenadelist)
|
||||
var/nade6 = pick(grenadelist)
|
||||
/obj/item/weapon/storage/box/grenades/New()
|
||||
..()
|
||||
var/nade1 = pick(grenadelist)
|
||||
var/nade2 = pick(grenadelist)
|
||||
var/nade3 = pick(grenadelist)
|
||||
var/nade4 = pick(grenadelist)
|
||||
var/nade5 = pick(grenadelist)
|
||||
var/nade6 = pick(grenadelist)
|
||||
|
||||
new nade1(src)
|
||||
new nade2(src)
|
||||
new nade3(src)
|
||||
new nade4(src)
|
||||
new nade5(src)
|
||||
new nade6(src)
|
||||
new nade1(src)
|
||||
new nade2(src)
|
||||
new nade3(src)
|
||||
new nade4(src)
|
||||
new nade5(src)
|
||||
new nade6(src)
|
||||
|
||||
@@ -36,198 +36,3 @@
|
||||
name = "Overdrive"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "shock"
|
||||
|
||||
#define BORG_HUG 0
|
||||
#define BORG_HUG_SUPER 1
|
||||
#define BORG_HUG_SHOCK 2
|
||||
#define BORG_HUG_CRUSH 3
|
||||
|
||||
/obj/item/borg/cyborghug
|
||||
name = "Hugging Module"
|
||||
icon_state = "hugmodule"
|
||||
desc = "For when a someone really needs a hug."
|
||||
var/mode = BORG_HUG //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH
|
||||
var/ccooldown = 0
|
||||
var/scooldown = 0
|
||||
var/shockallowed = FALSE//Can it be a stunarm when emagged. Only PK borgs get this by default.
|
||||
var/boop = FALSE
|
||||
|
||||
/obj/item/borg/cyborghug/attack_self(mob/living/user)
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/P = user
|
||||
if(P.emagged && shockallowed)
|
||||
if(mode < BORG_HUG_CRUSH)
|
||||
mode++
|
||||
else
|
||||
mode = BORG_HUG
|
||||
else if(mode < BORG_HUG_SUPER)
|
||||
mode++
|
||||
else
|
||||
mode = BORG_HUG
|
||||
switch(mode)
|
||||
if(BORG_HUG)
|
||||
to_chat(user, "<span class='notice'>Power reset. Hugs!</span>")
|
||||
if(BORG_HUG_SUPER)
|
||||
to_chat(user, "<span class='notice'>Power increased!</span>")
|
||||
if(BORG_HUG_SHOCK)
|
||||
to_chat(user, "<span class='warning'>BZZT. Electrifying arms...</span>")
|
||||
if(BORG_HUG_CRUSH)
|
||||
to_chat(user, "<span class='warning'>ERROR: ARM ACTUATORS OVERLOADED.</span>")
|
||||
|
||||
/obj/item/borg/cyborghug/attack(mob/living/M, mob/living/silicon/robot/user)
|
||||
if(M == user)
|
||||
return
|
||||
switch(mode)
|
||||
if(BORG_HUG)
|
||||
if(M.health >= config.health_threshold_crit)
|
||||
if(user.zone_sel.selecting == "head")
|
||||
user.visible_message("<span class='notice'>[user] playfully boops [M] on the head!</span>", \
|
||||
"<span class='notice'>You playfully boop [M] on the head!</span>")
|
||||
user.do_attack_animation(M)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1)
|
||||
else if(ishuman(M))
|
||||
if(M.lying)
|
||||
user.visible_message("<span class='notice'>[user] shakes [M] trying to get \him up!</span>", \
|
||||
"<span class='notice'>You shake [M] trying to get \him up!</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] hugs [M] to make \him feel better!</span>", \
|
||||
"<span class='notice'>You hug [M] to make \him feel better!</span>")
|
||||
if(M.resting)
|
||||
M.resting = FALSE
|
||||
M.update_canmove()
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
|
||||
"<span class='notice'>You pet [M]!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
if(BORG_HUG_SUPER)
|
||||
if(M.health >= config.health_threshold_crit)
|
||||
if(ishuman(M))
|
||||
if(M.lying)
|
||||
user.visible_message("<span class='notice'>[user] shakes [M] trying to get \him up!</span>", \
|
||||
"<span class='notice'>You shake [M] trying to get \him up!</span>")
|
||||
else if(user.zone_sel.selecting == "head")
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
user.do_attack_animation(M)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
|
||||
"<span class='warning'>You hug [M] firmly to make \him feel better! [M] looks uncomfortable...</span>")
|
||||
if(M.resting)
|
||||
M.resting = FALSE
|
||||
M.update_canmove()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1)
|
||||
if(BORG_HUG_SHOCK)
|
||||
if(!scooldown)
|
||||
if(M.health >= config.health_threshold_crit)
|
||||
if(ishuman(M))
|
||||
M.electrocute_act(5, "[user]", safety = 1)
|
||||
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with their touch!</span>", \
|
||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||
M.update_canmove()
|
||||
else
|
||||
if(!isrobot(M))
|
||||
M.adjustFireLoss(10)
|
||||
user.visible_message("<span class='userdanger'>[user] shocks [M]!</span>", \
|
||||
"<span class='danger'>You shock [M]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='userdanger'>[user] shocks [M]. It does not seem to have an effect</span>", \
|
||||
"<span class='danger'>You shock [M] to no effect.</span>")
|
||||
playsound(loc, 'sound/effects/sparks2.ogg', 50, 1, -1)
|
||||
user.cell.charge -= 500
|
||||
scooldown = TRUE
|
||||
spawn(20)
|
||||
scooldown = FALSE
|
||||
if(BORG_HUG_CRUSH)
|
||||
if(!ccooldown)
|
||||
if(M.health >= config.health_threshold_crit)
|
||||
if(ishuman(M))
|
||||
user.visible_message("<span class='userdanger'>[user] crushes [M] in their grip!</span>", \
|
||||
"<span class='danger'>You crush [M] in your grip!</span>")
|
||||
else
|
||||
user.visible_message("<span class='userdanger'>[user] crushes [M]!</span>", \
|
||||
"<span class='danger'>You crush [M]!</span>")
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1, -1)
|
||||
M.adjustBruteLoss(15)
|
||||
user.cell.charge -= 300
|
||||
ccooldown = TRUE
|
||||
spawn(10)
|
||||
ccooldown = FALSE
|
||||
|
||||
#undef BORG_HUG
|
||||
#undef BORG_HUG_SUPER
|
||||
#undef BORG_HUG_SHOCK
|
||||
#undef BORG_HUG_CRUSH
|
||||
|
||||
/obj/item/borg/cyborghug/peacekeeper
|
||||
shockallowed = TRUE
|
||||
|
||||
/obj/item/device/harmalarm
|
||||
name = "Sonic Harm Prevention Tool"
|
||||
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH"
|
||||
icon_state = "megaphone"
|
||||
var/cooldown = 0
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/device/harmalarm/emag_act(mob/user)
|
||||
emagged = !emagged
|
||||
if(emagged)
|
||||
to_chat(user, "<span class='warning'>You short out the safeties on the [src]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You reset the safeties on the [src]!</span>")
|
||||
|
||||
/obj/item/device/harmalarm/attack_self(mob/user)
|
||||
var/safety = !emagged
|
||||
if(cooldown > world.time)
|
||||
to_chat(user, "<span class='warning'>The device is still recharging!</span>")
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell.charge < 1200)
|
||||
to_chat(user, "<span class='warning'>You don't have enough charge to do this!</span>")
|
||||
return
|
||||
R.cell.charge -= 1000
|
||||
if(R.emagged)
|
||||
safety = FALSE
|
||||
|
||||
if(safety)
|
||||
user.visible_message("<span class='danger'>[user] blares out a near-deafening siren from its speakers!</span>")
|
||||
for(var/mob/living/carbon/M in get_mobs_in_view(9, user))
|
||||
if(!M.check_ear_prot())
|
||||
M.AdjustConfused(6)
|
||||
to_chat(M, "<span class='userdanger'>The siren pierces your hearing!</span>")
|
||||
audible_message("<span class='biggerdanger'>HUMAN HARM</span>")
|
||||
playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3)
|
||||
cooldown = world.time + 200
|
||||
log_game("[key_name(user)] used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.connected_ai)
|
||||
to_chat(R.connected_ai, "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>")
|
||||
|
||||
return
|
||||
|
||||
user.audible_message("<span class='biggerdanger'>BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZT</span>")
|
||||
for(var/mob/living/carbon/human/H in get_mobs_in_view(9, user))
|
||||
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs) || H.ear_deaf)
|
||||
continue
|
||||
var/earsafety = FALSE
|
||||
if(H.check_ear_prot())
|
||||
earsafety = TRUE
|
||||
|
||||
if(earsafety)
|
||||
H.AdjustConfused(5)
|
||||
H.AdjustStuttering(10)
|
||||
H.Jitter(10)
|
||||
else
|
||||
H.Weaken(2)
|
||||
H.AdjustConfused(10)
|
||||
H.AdjustStuttering(15)
|
||||
H.Jitter(25)
|
||||
|
||||
playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3)
|
||||
cooldown = world.time + 600
|
||||
log_game("[key_name(user)] used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
if(!R.allow_rename)
|
||||
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
|
||||
return 0
|
||||
R.notify_ai(3, R.name, heldname)
|
||||
R.name = heldname
|
||||
R.custom_name = heldname
|
||||
@@ -215,6 +218,10 @@
|
||||
if(R.emagged)
|
||||
return
|
||||
|
||||
if(R.weapons_unlock)
|
||||
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
|
||||
return
|
||||
|
||||
R.emagged = 1
|
||||
|
||||
return 1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
icon_state = "sheet-glass"
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "materials=1"
|
||||
var/created_window = /obj/structure/window/basic
|
||||
var/full_window = /obj/structure/window/full/basic
|
||||
created_window = /obj/structure/window/basic
|
||||
full_window = /obj/structure/window/full/basic
|
||||
merge_type = /obj/item/stack/sheet/glass
|
||||
|
||||
/obj/item/stack/sheet/glass/fifty
|
||||
@@ -154,8 +154,8 @@
|
||||
icon_state = "sheet-rglass"
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "materials=2"
|
||||
var/created_window = /obj/structure/window/reinforced
|
||||
var/full_window = /obj/structure/window/full/reinforced
|
||||
created_window = /obj/structure/window/reinforced
|
||||
full_window = /obj/structure/window/full/reinforced
|
||||
merge_type = /obj/item/stack/sheet/rglass
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
@@ -268,8 +268,8 @@
|
||||
icon_state = "sheet-plasmaglass"
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT*2)
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
var/created_window = /obj/structure/window/plasmabasic
|
||||
var/full_window = /obj/structure/window/full/plasmabasic
|
||||
created_window = /obj/structure/window/plasmabasic
|
||||
full_window = /obj/structure/window/full/plasmabasic
|
||||
|
||||
|
||||
/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob)
|
||||
@@ -357,8 +357,8 @@
|
||||
icon_state = "sheet-plasmarglass"
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT*2)
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
var/created_window = /obj/structure/window/plasmareinforced
|
||||
var/full_window = /obj/structure/window/full/plasmareinforced
|
||||
created_window = /obj/structure/window/plasmareinforced
|
||||
full_window = /obj/structure/window/full/plasmareinforced
|
||||
|
||||
|
||||
/obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob)
|
||||
|
||||
@@ -96,7 +96,8 @@ 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), \
|
||||
new/datum/stack_recipe("alien airlock assembly", /obj/structure/door_assembly/door_assembly_abductor, 4, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \
|
||||
)
|
||||
@@ -168,6 +169,7 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
|
||||
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
|
||||
message_admins("Plasma sheets ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
fire_act()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -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)
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -27,7 +28,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
|
||||
new /datum/stack_recipe_list("office chairs",list(
|
||||
new /datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1),
|
||||
), 5),
|
||||
)),
|
||||
|
||||
new /datum/stack_recipe_list("comfy chairs", list(
|
||||
new /datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1),
|
||||
@@ -39,11 +40,9 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
|
||||
new /datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1),
|
||||
), 2),
|
||||
)),
|
||||
|
||||
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,
|
||||
@@ -62,21 +61,23 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
|
||||
null,
|
||||
new /datum/stack_recipe_list("airlock assemblies", list(
|
||||
new /datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("public airlock assembly", /obj/structure/door_assembly/door_assembly_public, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("external maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_extmai, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
), 4),
|
||||
new /datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 8, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
)),
|
||||
null,
|
||||
new /datum/stack_recipe("mass driver button frame", /obj/item/mounted/frame/driver_button, 1, time = 50, one_per_turf = 0, on_floor = 1),
|
||||
new /datum/stack_recipe("light switch frame", /obj/item/mounted/frame/light_switch, 1, time = 50, one_per_turf = 0, on_floor = 1),
|
||||
@@ -109,10 +110,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
|
||||
@@ -126,7 +130,12 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list(
|
||||
new /datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50),
|
||||
new /datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1),
|
||||
new /datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 50, one_per_turf = 1)
|
||||
new /datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 50, one_per_turf = 1),
|
||||
null,
|
||||
new /datum/stack_recipe_list("airlock assemblies", list(
|
||||
new /datum/stack_recipe("vault door assembly", /obj/structure/door_assembly/door_assembly_vault, 6, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 6, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
), 4),
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/plasteel
|
||||
@@ -135,7 +144,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list(
|
||||
desc = "This sheet is an alloy of iron and plasma."
|
||||
icon_state = "sheet-plasteel"
|
||||
item_state = "sheet-metal"
|
||||
materials = list(MAT_METAL=6000, MAT_PLASMA=6000)
|
||||
materials = list(MAT_METAL=2000, MAT_PLASMA=2000)
|
||||
throwforce = 10.0
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=2"
|
||||
@@ -151,7 +160,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),
|
||||
@@ -258,37 +267,87 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list (
|
||||
* Runed Metal
|
||||
*/
|
||||
|
||||
var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
|
||||
new/datum/stack_recipe("runed door", /obj/machinery/door/airlock/cult, 1, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new/datum/stack_recipe("runed girder", /obj/structure/girder/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("pylon", /obj/structure/cult/functional/pylon, 3, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("forge", /obj/structure/cult/functional/forge, 5, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("archives", /obj/structure/cult/functional/tome, 2, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("altar", /obj/structure/cult/functional/talisman, 5, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
var/global/list/datum/stack_recipe/cult = list ( \
|
||||
new/datum/stack_recipe/cult("runed door", /obj/machinery/door/airlock/cult, 1, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new/datum/stack_recipe/cult("runed girder", /obj/structure/girder/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe/cult("pylon", /obj/structure/cult/functional/pylon, 3, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe/cult("forge", /obj/structure/cult/functional/forge, 5, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe/cult("archives", /obj/structure/cult/functional/tome, 2, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe/cult("altar", /obj/structure/cult/functional/talisman, 5, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/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>")
|
||||
return
|
||||
if(!is_level_reachable(user.z))
|
||||
to_chat(user, "<span class='warning'>The energies of this place interfere with the metal shaping!</span>")
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/stack_recipe/cult
|
||||
one_per_turf = 1
|
||||
on_floor = 1
|
||||
|
||||
/datum/stack_recipe/cult/post_build(obj/item/stack/S, obj/result)
|
||||
if(ishuman(S.loc))
|
||||
var/mob/living/carbon/human/H = S.loc
|
||||
H.bleed(5)
|
||||
..()
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/New(var/loc, var/amount=null)
|
||||
recipes = runed_metal_recipes
|
||||
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
|
||||
*/
|
||||
@@ -311,6 +370,7 @@ var/global/list/datum/stack_recipe/plastic_recipes = list ( \
|
||||
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic spork", /obj/item/weapon/kitchen/utensil/pspork, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
|
||||
new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
|
||||
var/perunit = MINERAL_MATERIAL_AMOUNT
|
||||
var/sheettype = null //this is used for girders in the creation of walls/false walls
|
||||
var/created_window = null //apparently glass sheets don't share a base type for glass specifically, so each had to define these vars individually
|
||||
var/full_window = null //moving the var declaration to here so this can be checked cleaner until someone is willing to make them share a base type properly
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
toolspeed = 1
|
||||
|
||||
|
||||
@@ -80,10 +80,7 @@
|
||||
|
||||
if(istype(E, /datum/stack_recipe_list))
|
||||
var/datum/stack_recipe_list/srl = E
|
||||
if(amount >= srl.req_amount)
|
||||
t1 += "<a href='?src=[UID()];sublist=[i]'>[srl.title] ([srl.req_amount] [singular_name]\s)</a>"
|
||||
else
|
||||
t1 += "[srl.title] ([srl.req_amount] [singular_name]\s)<br>"
|
||||
t1 += "<a href='?src=[UID()];sublist=[i]'>[srl.title]</a>"
|
||||
|
||||
if(istype(E, /datum/stack_recipe))
|
||||
var/datum/stack_recipe/R = E
|
||||
|
||||
@@ -46,10 +46,8 @@
|
||||
/datum/stack_recipe_list
|
||||
var/title = "ERROR"
|
||||
var/list/recipes = null
|
||||
var/req_amount = 1
|
||||
|
||||
/datum/stack_recipe_list/New(title, recipes, req_amount = 1)
|
||||
/datum/stack_recipe_list/New(title, recipes)
|
||||
src.title = title
|
||||
src.recipes = recipes
|
||||
src.req_amount = req_amount
|
||||
|
||||
|
||||
@@ -166,3 +166,15 @@
|
||||
desc = "A grooved floor tile."
|
||||
icon_state = "tile_pod"
|
||||
turf_type = /turf/simulated/floor/pod
|
||||
|
||||
/obj/item/stack/tile/arcade_carpet
|
||||
name = "arcade carpet"
|
||||
singular_name = "arcade carpet"
|
||||
desc= "A piece of carpet with a retro spaceship pattern."
|
||||
icon_state = "tile_space"
|
||||
turf_type = /turf/simulated/floor/carpet/arcade
|
||||
merge_type = /obj/item/stack/tile/arcade_carpet
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
/obj/item/stack/tile/arcade_carpet/loaded
|
||||
amount = 20
|
||||
|
||||
@@ -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
|
||||
@@ -201,6 +209,7 @@
|
||||
force_wielded = 0
|
||||
origin_tech = null
|
||||
attack_verb = list("attacked", "struck", "hit")
|
||||
brightness_on = 0
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/toy/hit_reaction()
|
||||
return 0
|
||||
@@ -244,7 +253,7 @@
|
||||
|
||||
/obj/item/toy/snappop/virus/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
@@ -264,7 +273,7 @@
|
||||
var/ash_type = /obj/effect/decal/cleanable/ash
|
||||
|
||||
/obj/item/toy/snappop/proc/pop_burst(var/n=3, var/c=1)
|
||||
var/datum/effect/system/spark_spread/s = new()
|
||||
var/datum/effect_system/spark_spread/s = new()
|
||||
s.set_up(n, c, src)
|
||||
s.start()
|
||||
new ash_type(loc)
|
||||
|
||||
@@ -20,7 +20,7 @@ RCD
|
||||
origin_tech = "engineering=4;materials=2"
|
||||
toolspeed = 1
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
var/datum/effect/system/spark_spread/spark_system
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/max_matter = 100
|
||||
var/matter = 0
|
||||
var/working = 0
|
||||
@@ -34,20 +34,26 @@ RCD
|
||||
var/list/door_accesses_list = list()
|
||||
var/one_access
|
||||
var/locked = 1
|
||||
var/static/list/allowed_door_types = list(/obj/machinery/door/airlock = "Standard",
|
||||
/obj/machinery/door/airlock/command = "Command", /obj/machinery/door/airlock/security = "Security",
|
||||
/obj/machinery/door/airlock/engineering = "Engineering", /obj/machinery/door/airlock/medical = "Medical",
|
||||
/obj/machinery/door/airlock/maintenance = "Maintenance", /obj/machinery/door/airlock/external = "External",
|
||||
/obj/machinery/door/airlock/glass = "Standard (Glass)", /obj/machinery/door/airlock/freezer = "Freezer",
|
||||
/obj/machinery/door/airlock/glass_command = "Command (Glass)", /obj/machinery/door/airlock/glass_engineering = "Engineering (Glass)",
|
||||
/obj/machinery/door/airlock/glass_security = "Security (Glass)", /obj/machinery/door/airlock/glass_medical = "Medical (Glass)",
|
||||
/obj/machinery/door/airlock/mining = "Mining", /obj/machinery/door/airlock/atmos = "Atmospherics",
|
||||
/obj/machinery/door/airlock/research = "Research", /obj/machinery/door/airlock/glass_research = "Research (Glass)",
|
||||
/obj/machinery/door/airlock/glass_mining = "Mining (Glass)", /obj/machinery/door/airlock/glass_atmos = "Atmospherics (Glass)")
|
||||
var/static/list/allowed_door_types = list(
|
||||
/obj/machinery/door/airlock = "Standard", /obj/machinery/door/airlock/glass = "Standard (Glass)",
|
||||
/obj/machinery/door/airlock/command = "Command", /obj/machinery/door/airlock/command/glass = "Command (Glass)",
|
||||
/obj/machinery/door/airlock/security = "Security", /obj/machinery/door/airlock/security/glass = "Security (Glass)",
|
||||
/obj/machinery/door/airlock/engineering = "Engineering", /obj/machinery/door/airlock/engineering/glass = "Engineering (Glass)",
|
||||
/obj/machinery/door/airlock/medical = "Medical", /obj/machinery/door/airlock/medical/glass = "Medical (Glass)",
|
||||
/obj/machinery/door/airlock/maintenance = "Maintenance", /obj/machinery/door/airlock/maintenance/glass = "Maintenance (Glass)",
|
||||
/obj/machinery/door/airlock/external = "External", /obj/machinery/door/airlock/external/glass = "External (Glass)",
|
||||
/obj/machinery/door/airlock/maintenance/external = "External Maintenance", /obj/machinery/door/airlock/maintenance/external/glass = "External Maintenance (Glass)",
|
||||
/obj/machinery/door/airlock/freezer = "Freezer",
|
||||
/obj/machinery/door/airlock/mining = "Mining", /obj/machinery/door/airlock/mining/glass = "Mining (Glass)",
|
||||
/obj/machinery/door/airlock/research = "Research", /obj/machinery/door/airlock/research/glass = "Research (Glass)",
|
||||
/obj/machinery/door/airlock/atmos = "Atmospherics", /obj/machinery/door/airlock/atmos/glass = "Atmospherics (Glass)",
|
||||
/obj/machinery/door/airlock/science = "Science", /obj/machinery/door/airlock/science/glass = "Science (Glass)",
|
||||
/obj/machinery/door/airlock/hatch = "Airtight Hatch",
|
||||
/obj/machinery/door/airlock/maintenance_hatch = "Maintenance Hatch")
|
||||
|
||||
/obj/item/weapon/rcd/New()
|
||||
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
spark_system = new /datum/effect/system/spark_spread
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
rcd_list += src
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
RSF
|
||||
|
||||
*/
|
||||
|
||||
/obj/item/weapon/rsf
|
||||
name = "\improper Rapid-Service-Fabricator"
|
||||
desc = "A device used to rapidly deploy service items."
|
||||
@@ -14,9 +14,21 @@ RSF
|
||||
var/matter = 0
|
||||
var/mode = 1
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/list/configured_items = list()
|
||||
|
||||
/obj/item/weapon/rsf/New()
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
// configured_items[ID_NUMBER] = list("Human-readable name", price in energy, /type/path)
|
||||
configured_items[++configured_items.len] = list("Dosh", 50, /obj/item/stack/spacecash/c10)
|
||||
configured_items[++configured_items.len] = list("Drinking Glass", 50, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass)
|
||||
configured_items[++configured_items.len] = list("Paper", 50, /obj/item/weapon/paper)
|
||||
configured_items[++configured_items.len] = list("Pen", 50, /obj/item/weapon/pen)
|
||||
configured_items[++configured_items.len] = list("Dice Pack", 50, /obj/item/weapon/storage/pill_bottle/dice)
|
||||
configured_items[++configured_items.len] = list("Cigarette", 50, /obj/item/clothing/mask/cigarette)
|
||||
configured_items[++configured_items.len] = list("Snack - Newdles", 4000, /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles)
|
||||
configured_items[++configured_items.len] = list("Snack - Donut", 4000, /obj/item/weapon/reagent_containers/food/snacks/donut)
|
||||
configured_items[++configured_items.len] = list("Snack - Chicken Soup", 4000, /obj/item/weapon/reagent_containers/food/drinks/chicken_soup)
|
||||
configured_items[++configured_items.len] = list("Snack - Turkey Burger", 4000, /obj/item/weapon/reagent_containers/food/snacks/tofuburger)
|
||||
return
|
||||
|
||||
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
@@ -34,274 +46,41 @@ RSF
|
||||
|
||||
/obj/item/weapon/rsf/attack_self(mob/user as mob)
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
if(mode == 1)
|
||||
mode = 2
|
||||
to_chat(user, "Changed dispensing mode to 'Drinking Glass'")
|
||||
return
|
||||
if(mode == 2)
|
||||
mode = 3
|
||||
to_chat(user, "Changed dispensing mode to 'Paper'")
|
||||
return
|
||||
if(mode == 3)
|
||||
mode = 4
|
||||
to_chat(user, "Changed dispensing mode to 'Pen'")
|
||||
return
|
||||
if(mode == 4)
|
||||
mode = 5
|
||||
to_chat(user, "Changed dispensing mode to 'Dice Pack'")
|
||||
return
|
||||
if(mode == 5)
|
||||
mode = 6
|
||||
to_chat(user, "Changed dispensing mode to 'Cigarette'")
|
||||
return
|
||||
if(mode == 6)
|
||||
if(mode == configured_items.len)
|
||||
mode = 1
|
||||
to_chat(user, "Changed dispensing mode to 'Dosh'")
|
||||
return
|
||||
// Change mode
|
||||
else
|
||||
mode++
|
||||
to_chat(user, "Changed dispensing mode to '" + configured_items[mode][1] + "'")
|
||||
|
||||
|
||||
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/structure/table) && mode == 1)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Dosh...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/stack/spacecash/c10( A.loc )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 1)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Dosh...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/stack/spacecash/c10( A )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /obj/structure/table) && mode == 2)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Drinking Glass...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A.loc )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 2)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Drinking Glass...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /obj/structure/table) && mode == 3)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Paper Sheet...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/paper( A.loc )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 3)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Paper Sheet...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/paper( A )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /obj/structure/table) && mode == 4)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Pen...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/pen( A.loc )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 4)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Pen...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/pen( A )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /obj/structure/table) && mode == 5)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Dice Pack...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/storage/pill_bottle/dice( A.loc )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 5)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Dice Pack...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/storage/pill_bottle/dice( A )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /obj/structure/table) && mode == 6)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Cigarette...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/clothing/mask/cigarette( A.loc )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 6)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Cigarette...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/clothing/mask/cigarette( A )
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
matter--
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
/obj/item/weapon/cookiesynth
|
||||
name = "\improper Cookie Synthesizer"
|
||||
desc = "A self-recharging device used to rapidly deploy cookies."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rcd"
|
||||
var/matter = 10
|
||||
var/toxin = FALSE
|
||||
var/cooldown = 0
|
||||
var/cooldowndelay = 10
|
||||
var/emagged = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/cookiesynth/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>It currently holds [matter]/10 cookie-units.</span>")
|
||||
|
||||
/obj/item/weapon/cookiesynth/attackby()
|
||||
return
|
||||
|
||||
/obj/item/weapon/cookiesynth/emag_act(mob/user)
|
||||
emagged = !emagged
|
||||
if(emagged)
|
||||
to_chat(user, "<span class='warning'>You short out [src]'s reagent safety checker!</span>")
|
||||
var spawn_location
|
||||
if(istype(A, /obj/structure/table))
|
||||
spawn_location = A.loc
|
||||
else if (istype(A, /obj/structure/table))
|
||||
spawn_location = A
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You reset [src]'s reagent safety checker!</span>")
|
||||
toxin = FALSE
|
||||
to_chat(user, "The RSF can only create service items on tables, or floors.")
|
||||
return
|
||||
|
||||
/obj/item/weapon/cookiesynth/attack_self(mob/user)
|
||||
var/mob/living/silicon/robot/P = null
|
||||
if(isrobot(user))
|
||||
P = user
|
||||
if(emagged && !toxin)
|
||||
toxin = TRUE
|
||||
to_chat(user, "<span class='warning'>Cookie Synthesizer Hacked.</span>")
|
||||
else if(P.emagged && !toxin)
|
||||
toxin = TRUE
|
||||
to_chat(user, "<span class='warning'>Cookie Synthesizer Hacked.</span>")
|
||||
else
|
||||
toxin = FALSE
|
||||
to_chat(user, "<span class='notice'>Cookie Synthesizer Reset.</span>")
|
||||
|
||||
/obj/item/weapon/cookiesynth/process()
|
||||
if(matter < 10)
|
||||
matter++
|
||||
|
||||
/obj/item/weapon/cookiesynth/afterattack(atom/A, mob/user, proximity)
|
||||
if(cooldown > world.time)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!(istype(A, /obj/structure/table) || isfloorturf(A)))
|
||||
return
|
||||
if(matter < 1)
|
||||
to_chat(user, "<span class='warning'>[src] doesn't have enough matter left. Wait for it to recharge!</span>")
|
||||
return
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 400)
|
||||
to_chat(user, "<span class='warning'>You do not have enough power to use [src].</span>")
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
if(!engy.cell.use(configured_items[mode][2]))
|
||||
to_chat(user, "<span class='warning'>Insufficient energy.</span>")
|
||||
return
|
||||
var/turf/T = get_turf(A)
|
||||
playsound(loc, 'sound/machines/click.ogg', 10, 1)
|
||||
to_chat(user, "Fabricating Cookie..")
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T)
|
||||
if(toxin)
|
||||
S.reagents.add_reagent("pancuronium", 2.4)
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.charge -= 100
|
||||
else
|
||||
if(!matter)
|
||||
to_chat(user, "<span class='warning'>Insufficient matter.</span>")
|
||||
return
|
||||
matter--
|
||||
cooldown = world.time + cooldowndelay
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
|
||||
to_chat(user, "Dispensing " + configured_items[mode][1] + "...")
|
||||
playsound(loc, 'sound/machines/click.ogg', 10, 1)
|
||||
var/type_path = configured_items[mode][3]
|
||||
new type_path(spawn_location)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
to_chat(user, "<span class='notice'>\The [src] is full.</span>")
|
||||
return
|
||||
reagents.remove_reagent(25,"water")
|
||||
var/datum/effect/system/bad_smoke_spread/smoke = new /datum/effect/system/bad_smoke_spread()
|
||||
var/datum/effect_system/smoke_spread/bad/smoke = new
|
||||
smoke.set_up(5, 0, user.loc)
|
||||
smoke.start()
|
||||
playsound(user.loc, 'sound/effects/bamf.ogg', 50, 2)
|
||||
|
||||
@@ -130,7 +130,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
src.lit = 1
|
||||
damtype = "fire"
|
||||
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
|
||||
var/datum/effect/system/reagents_explosion/e = new()
|
||||
var/datum/effect_system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
if(ismob(loc))
|
||||
@@ -139,7 +139,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
qdel(src)
|
||||
return
|
||||
if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently
|
||||
var/datum/effect/system/reagents_explosion/e = new()
|
||||
var/datum/effect_system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount("fuel") / 5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
if(ismob(loc))
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
user.visible_message("<span class='notice'>[user] starts to shave their facial hair with \the [src].</span>", \
|
||||
"<span class='notice'>You take a moment shave your facial hair with \the [src].</span>")
|
||||
if(do_after(user, 50 * toolspeed, target = H))
|
||||
user.visible_message("<span class='notice'>[user] shaves his facial hair clean with the [src].</span>", \
|
||||
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>")
|
||||
C.f_style = "Shaved"
|
||||
H.update_fhair()
|
||||
@@ -143,8 +143,8 @@
|
||||
user.visible_message("<span class='warning'>[user] starts to shave their head with \the [src].</span>", \
|
||||
"<span class='warning'>You start to shave your head with \the [src].</span>")
|
||||
if(do_after(user, 50 * toolspeed, target = H))
|
||||
user.visible_message("<span class='notice'>[user] shaves his head with the [src].</span>", \
|
||||
"<span class='notice'>You finish shaving with the [src].</span>")
|
||||
user.visible_message("<span class='notice'>[user] shaves \his head with \the [src].</span>", \
|
||||
"<span class='notice'>You finish shaving with \the [src].</span>")
|
||||
C.h_style = "Skinhead"
|
||||
H.update_hair()
|
||||
playsound(src.loc, usesound, 40, 1)
|
||||
|
||||
@@ -251,23 +251,23 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/dnainjector/nobreath
|
||||
name = "DNA-Injector (No Breath)"
|
||||
name = "DNA-Injector (Breathless)"
|
||||
desc = "Hold your breath and count to infinity."
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0xFFF
|
||||
//block = 2
|
||||
New()
|
||||
block = NOBREATHBLOCK
|
||||
block = BREATHLESSBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/weapon/dnainjector/antinobreath
|
||||
name = "DNA-Injector (Anti-No Breath)"
|
||||
name = "DNA-Injector (Anti-Breathless)"
|
||||
desc = "Hold your breath and count to 100."
|
||||
datatype = DNA2_BUF_SE
|
||||
value = 0x001
|
||||
//block = 2
|
||||
New()
|
||||
block = NOBREATHBLOCK
|
||||
block = BREATHLESSBLOCK
|
||||
..()
|
||||
|
||||
/obj/item/weapon/dnainjector/remoteview
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
for(var/a=0, a<5, a++)
|
||||
spawn(0)
|
||||
var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) )
|
||||
var/obj/effect/particle_effect/water/W = new /obj/effect/particle_effect/water( get_turf(src) )
|
||||
var/turf/my_target = pick(the_targets)
|
||||
if(precision)
|
||||
the_targets -= my_target
|
||||
|
||||
@@ -3,7 +3,7 @@ obj/item/weapon/firework
|
||||
icon = 'icons/obj/fireworks.dmi'
|
||||
icon_state = "rocket_0"
|
||||
var/litzor = 0
|
||||
var/datum/effect/system/sparkle_spread/S
|
||||
var/datum/effect_system/sparkle_spread/S
|
||||
obj/item/weapon/firework/attackby(obj/item/weapon/W,mob/user, params)
|
||||
if(litzor)
|
||||
return
|
||||
@@ -25,7 +25,7 @@ obj/item/weapon/sparkler
|
||||
icon = 'icons/obj/fireworks.dmi'
|
||||
icon_state = "sparkler_0"
|
||||
var/litzor = 0
|
||||
var/datum/effect/system/spark_spread/S
|
||||
var/datum/effect_system/spark_spread/S
|
||||
obj/item/weapon/sparkler/attackby(obj/item/weapon/W,mob/user, params)
|
||||
if(litzor)
|
||||
return
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
materials = list(MAT_METAL=500)
|
||||
origin_tech = "combat=1;plasmatech=2;engineering=2"
|
||||
var/status = 0
|
||||
var/throw_amount = 100
|
||||
var/lit = 0 //on or off
|
||||
var/operating = 0//cooldown
|
||||
var/turf/previousturf = null
|
||||
@@ -124,7 +123,7 @@
|
||||
if(!ptank)
|
||||
to_chat(user, "<span class='notice'>Attach a plasma tank first!</span>")
|
||||
return
|
||||
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=[UID()];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\nAmount to throw: <A HREF='?src=[UID()];amount=-100'>-</A> <A HREF='?src=[UID()];amount=-10'>-</A> <A HREF='?src=[UID()];amount=-1'>-</A> [throw_amount] <A HREF='?src=[UID()];amount=1'>+</A> <A HREF='?src=[UID()];amount=10'>+</A> <A HREF='?src=[UID()];amount=100'>+</A><BR>\n<A HREF='?src=[UID()];remove=1'>Remove plasmatank</A> - <A HREF='?src=[UID()];close=1'>Close</A></TT>")
|
||||
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=[UID()];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\n<A HREF='?src=[UID()];remove=1'>Remove plasmatank</A> - <A HREF='?src=[UID()];close=1'>Close</A></TT>")
|
||||
user << browse(dat, "window=flamethrower;size=600x300")
|
||||
onclose(user, "flamethrower")
|
||||
return
|
||||
@@ -143,9 +142,6 @@
|
||||
lit = !lit
|
||||
if(lit)
|
||||
processing_objects.Add(src)
|
||||
if(href_list["amount"])
|
||||
throw_amount = throw_amount + text2num(href_list["amount"])
|
||||
throw_amount = max(50, min(5000, throw_amount))
|
||||
if(href_list["remove"])
|
||||
if(!ptank) return
|
||||
usr.put_in_hands(ptank)
|
||||
@@ -191,10 +187,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05)
|
||||
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
|
||||
//Transfer 5% of current tank air contents to turf
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
|
||||
air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
|
||||
air_transfer.toxins = air_transfer.toxins // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
G = user.r_hand
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] loses his grip on [strangling]'s neck.</span>", \
|
||||
user.visible_message("<span class='warning'>[user] loses \his grip on [strangling]'s neck.</span>", \
|
||||
"<span class='warning'>You lose your grip on [strangling]'s neck.</span>")
|
||||
|
||||
strangling = null
|
||||
@@ -144,7 +144,7 @@
|
||||
return
|
||||
|
||||
if(!G.affecting)
|
||||
user.visible_message("<span class='warning'>[user] loses his grip on [strangling]'s neck.</span>", \
|
||||
user.visible_message("<span class='warning'>[user] loses \his grip on [strangling]'s neck.</span>", \
|
||||
"<span class='warning'>You lose your grip on [strangling]'s neck.</span>")
|
||||
|
||||
strangling = null
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
var/ignition_temp = 10 // The amount of heat added to the reagents when this grenade goes off.
|
||||
var/threatscale = 1 // Used by advanced grenades to make them slightly more worthy.
|
||||
var/no_splash = FALSE //If the grenade deletes even if it has no reagents to splash with. Used for slime core reactions.
|
||||
var/contained = "" // For logging
|
||||
var/cores = "" // Also for logging
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/New()
|
||||
create_reagents(1000)
|
||||
@@ -98,9 +100,9 @@
|
||||
update_icon()
|
||||
else if(clown_check(user))
|
||||
// This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it.
|
||||
message_admins("[key_name_admin(usr)] has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])"
|
||||
message_admins("[key_name_admin(usr)] has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> [contained].")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) [contained].")
|
||||
bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])[contained]."
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>")
|
||||
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = 1
|
||||
@@ -136,8 +138,8 @@
|
||||
playsound(loc, prime_sound, 25, -3)
|
||||
stage = READY
|
||||
update_icon()
|
||||
var/contained = ""
|
||||
var/cores = ""
|
||||
contained = ""
|
||||
cores = "" // clear them out so no recursive logging by accidentally
|
||||
for(var/obj/O in beakers)
|
||||
if(!O.reagents) continue
|
||||
if(istype(O,/obj/item/slime_extract))
|
||||
@@ -287,8 +289,8 @@
|
||||
var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast)
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(T)
|
||||
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> ([admin_jump_link(M)]) and last touched by [key_name_admin(last)]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
|
||||
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
|
||||
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> ([admin_jump_link(M)]) and last touched by [key_name_admin(last)]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>. [contained]")
|
||||
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z]) [contained]")
|
||||
|
||||
update_mob()
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -37,7 +45,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(E)
|
||||
E.take_damage(8, 1)
|
||||
E.receive_damage(8, 1)
|
||||
|
||||
if(M.flash_eyes(affect_silicon = 1))
|
||||
M.Stun(max(10/distance, 3))
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
det_time = 20
|
||||
item_state = "flashbang"
|
||||
slot_flags = SLOT_BELT
|
||||
var/datum/effect/system/bad_smoke_spread/smoke
|
||||
var/datum/effect_system/smoke_spread/bad/smoke
|
||||
|
||||
New()
|
||||
..()
|
||||
src.smoke = new /datum/effect/system/bad_smoke_spread
|
||||
src.smoke = new /datum/effect_system/smoke_spread/bad
|
||||
src.smoke.attach(src)
|
||||
|
||||
Destroy()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/item/weapon/nullrod/attack_self(mob/user)
|
||||
if(reskinned)
|
||||
return
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain"))
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain" || user.mind.special_role == SPECIAL_ROLE_ERT))
|
||||
reskin_holy_weapon(user)
|
||||
|
||||
/obj/item/weapon/nullrod/proc/reskin_holy_weapon(mob/M)
|
||||
@@ -335,7 +335,7 @@
|
||||
/obj/item/weapon/nullrod/carp/attack_self(mob/living/user)
|
||||
if(used_blessing)
|
||||
return
|
||||
if(user.mind && (user.mind.assigned_role != "Chaplain"))
|
||||
if(user.mind && (user.mind.assigned_role != "Chaplain" && user.mind.special_role != SPECIAL_ROLE_ERT))
|
||||
return
|
||||
to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.")
|
||||
user.faction |= "carp"
|
||||
@@ -406,7 +406,7 @@
|
||||
if(!iscarbon(M))
|
||||
return ..()
|
||||
|
||||
if(!user.mind || user.mind.assigned_role != "Chaplain")
|
||||
if(!user.mind || (user.mind.assigned_role != "Chaplain" && user.mind.special_role != SPECIAL_ROLE_ERT))
|
||||
to_chat(user, "<span class='notice'>You are not close enough with [ticker.Bible_deity_name] to use [src].</span>")
|
||||
return
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
|
||||
/obj/item/weapon/nullrod/salt/attack_self(mob/user)
|
||||
|
||||
if(!user.mind || user.mind.assigned_role != "Chaplain")
|
||||
if(!user.mind || (user.mind.assigned_role != "Chaplain" && user.mind.special_role != SPECIAL_ROLE_ERT ))
|
||||
to_chat(user, "<span class='notice'>You are not close enough with [ticker.Bible_deity_name] to use [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -82,6 +82,18 @@
|
||||
icon_state = "pspoon"
|
||||
attack_verb = list("attacked", "poked")
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/spork
|
||||
name = "spork"
|
||||
desc = "It's a spork. Marvel at its innovative design."
|
||||
icon_state = "spork"
|
||||
attack_verb = list("attacked", "sporked")
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/pspork
|
||||
name = "plastic spork"
|
||||
desc = "It's a plastic spork. It's the fork side of the spoon!"
|
||||
icon_state = "pspork"
|
||||
attack_verb = list("attacked", "sporked")
|
||||
|
||||
/*
|
||||
* Knives
|
||||
*/
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
..()
|
||||
spawn(100)
|
||||
if(!istype(loc, /mob))
|
||||
var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
qdel(src)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
|
||||
if(affecting.take_damage( 0, 5 )) //INFERNO
|
||||
if(affecting.receive_damage( 0, 5 )) //INFERNO
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
|
||||
usesound = 'sound/weapons/blade1.ogg'
|
||||
toolspeed = 1
|
||||
|
||||
light_power = 2
|
||||
var/brightness_on = 2
|
||||
var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE)
|
||||
|
||||
/obj/item/weapon/melee/energy/suicide_act(mob/user)
|
||||
user.visible_message(pick("<span class='suicide'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>", \
|
||||
"<span class='suicide'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"))
|
||||
@@ -29,8 +32,10 @@
|
||||
attack_verb = attack_verb_on
|
||||
if(!item_color)
|
||||
icon_state = icon_state_on
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = "sword[item_color]"
|
||||
set_light(brightness_on, l_color=colormap[item_color])
|
||||
w_class = w_class_on
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
@@ -44,6 +49,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
|
||||
set_light(0)
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -71,6 +77,7 @@
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
attack_verb_on = list()
|
||||
sharp = 1
|
||||
light_color = LIGHT_COLOR_WHITE
|
||||
|
||||
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] swings the [src.name] towards /his head! It looks like \he's trying to commit suicide.</span>")
|
||||
@@ -92,7 +99,6 @@
|
||||
block_chance = 50
|
||||
sharp = 1
|
||||
var/hacked = 0
|
||||
var/blade_color
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/New()
|
||||
if(item_color == null)
|
||||
@@ -129,6 +135,7 @@
|
||||
hitcost = 75 //Costs more than a standard cyborg esword
|
||||
item_color = null
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
light_color = LIGHT_COLOR_WHITE
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/saw/New()
|
||||
..()
|
||||
@@ -192,6 +199,7 @@
|
||||
desc = "Arrrr matey."
|
||||
icon_state = "cutlass0"
|
||||
icon_state_on = "cutlass1"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/pirate/New()
|
||||
return
|
||||
@@ -207,13 +215,13 @@
|
||||
throw_speed = 3
|
||||
throw_range = 1
|
||||
w_class = WEIGHT_CLASS_BULKY //So you can't hide it in your pocket or some such.
|
||||
var/datum/effect/system/spark_spread/spark_system
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
sharp = 1
|
||||
|
||||
//Most of the other special functions are handled in their own files. aka special snowflake code so kewl
|
||||
/obj/item/weapon/melee/energy/blade/New()
|
||||
..()
|
||||
spark_system = new /datum/effect/system/spark_spread()
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
@@ -224,4 +232,4 @@
|
||||
name = "hardlight blade"
|
||||
desc = "An extremely sharp blade made out of hard light. Packs quite a punch."
|
||||
icon_state = "lightblade"
|
||||
item_state = "lightblade"
|
||||
item_state = "lightblade"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL = 75000, MAT_GLASS = 37500)
|
||||
origin_tech = "engineering=4;materials=2"
|
||||
var/datum/effect/system/spark_spread/spark_system
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/lastused
|
||||
var/iconrotation = 0 //used to orient icons and pipes
|
||||
var/mode = 1 //Disposals, atmospherics, etc.
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/item/weapon/rpd/New()
|
||||
..()
|
||||
spark_system = new /datum/effect/system/spark_spread()
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(1, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
to_chat(user, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.")
|
||||
return
|
||||
|
||||
var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread()
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(5, 0, user.loc)
|
||||
smoke.attach(user)
|
||||
smoke.start()
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
if(affecting.take_damage(force*0.5))
|
||||
if(affecting.receive_damage(force*0.5))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
H.Weaken(3)
|
||||
if(affecting.take_damage(5, 0))
|
||||
if(affecting.receive_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
..()
|
||||
|
||||
@@ -165,12 +165,12 @@
|
||||
/obj/item/weapon/storage/firstaid/tactical/New()
|
||||
..()
|
||||
if(empty) return
|
||||
new /obj/item/clothing/accessory/stethoscope( src )
|
||||
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/combat(src)
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/styptic(src)
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/silver_sulf(src)
|
||||
new /obj/item/weapon/reagent_containers/ld50_syringe/lethal(src)
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/synthflesh(src) // Because you ain't got no time to look at what damage dey taking yo
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/synthflesh(src)
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/synthflesh(src)
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/synthflesh(src)
|
||||
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
|
||||
new /obj/item/clothing/glasses/hud/health/night(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
overlays += image('icons/obj/storage.dmi', icon_locking)
|
||||
locked = 0
|
||||
if(istype(weapon, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/* Weapons
|
||||
* Contains:
|
||||
* Banhammer
|
||||
* Sword
|
||||
* Classic Baton
|
||||
* Energy Shield
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -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)
|
||||
@@ -5,7 +5,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
item_state = "jetpack"
|
||||
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
|
||||
var/datum/effect/system/ion_trail_follow/ion_trail
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail
|
||||
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
var/on = 0
|
||||
var/stabilizers = 0
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/obj/item/weapon/tank/jetpack/New()
|
||||
..()
|
||||
ion_trail = new /datum/effect/system/ion_trail_follow()
|
||||
ion_trail = new /datum/effect_system/trail_follow/ion()
|
||||
ion_trail.set_up(src)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/Destroy()
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide/New()
|
||||
..()
|
||||
ion_trail = new /datum/effect/system/ion_trail_follow()
|
||||
ion_trail = new /datum/effect_system/trail_follow/ion()
|
||||
ion_trail.set_up(src)
|
||||
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
if(C.internal == src)
|
||||
to_chat(C, "<span class='notice'>You close \the [src] valve.</span>")
|
||||
C.internal = null
|
||||
C.update_internals_hud_icon(0)
|
||||
else
|
||||
var/can_open_valve = 0
|
||||
if(C.get_organ_slot("breathing_tube"))
|
||||
@@ -71,7 +70,6 @@
|
||||
if(!silent)
|
||||
to_chat(C, "<span class='notice'>You open \the [src] valve.</span>")
|
||||
C.internal = src
|
||||
C.update_internals_hud_icon(1)
|
||||
else
|
||||
if(!silent)
|
||||
to_chat(C, "<span class='notice'>You are not wearing a suitable mask or helmet.</span>")
|
||||
|
||||
@@ -277,22 +277,22 @@
|
||||
if(Adj)
|
||||
return //Safety check so you don't blast yourself trying to refill your tank
|
||||
var/datum/reagents/R = reagents
|
||||
if(R.total_volume < 100)
|
||||
to_chat(user, "You need at least 100 units of water to use the nanofrost launcher!")
|
||||
if(R.total_volume < 50)
|
||||
to_chat(user, "You need at least 50 units of water to use the nanofrost launcher!")
|
||||
return
|
||||
if(nanofrost_cooldown)
|
||||
to_chat(user, "Nanofrost launcher is still recharging")
|
||||
return
|
||||
nanofrost_cooldown = 1
|
||||
R.remove_any(100)
|
||||
R.remove_any(50)
|
||||
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
|
||||
log_game("[user.ckey] ([user.name]) used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(A, target)
|
||||
sleep(2)
|
||||
sleep(1)
|
||||
A.Smoke()
|
||||
spawn(100)
|
||||
spawn(50)
|
||||
if(src)
|
||||
nanofrost_cooldown = 0
|
||||
return
|
||||
@@ -300,7 +300,7 @@
|
||||
if(!Adj|| !istype(target, /turf))
|
||||
return
|
||||
if(metal_synthesis_cooldown < 5)
|
||||
var/obj/structure/foam/F = new /obj/structure/foam(get_turf(target), 1)
|
||||
var/obj/effect/particle_effect/foam/F = new /obj/effect/particle_effect/foam(get_turf(target), 1)
|
||||
F.amount = 0
|
||||
metal_synthesis_cooldown++
|
||||
spawn(100)
|
||||
@@ -319,7 +319,9 @@
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/obj/effect/nanofrost_container/proc/Smoke()
|
||||
new /obj/effect/effect/freezing_smoke(src.loc, 6, 1)
|
||||
var/datum/effect_system/smoke_spread/freezing/S = new
|
||||
S.set_up(6, 0, loc, null, 1)
|
||||
S.start()
|
||||
var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc)
|
||||
F.color = "#B2FFFF"
|
||||
F.name = "nanofrost residue"
|
||||
@@ -327,78 +329,6 @@
|
||||
playsound(src,'sound/effects/bamf.ogg',100,1)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/effect/freezing_smoke
|
||||
name = "nanofrost smoke"
|
||||
icon_state = "smoke"
|
||||
opacity = 0
|
||||
anchored = 0.0
|
||||
mouse_opacity = 0
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
color = "#B2FFFF"
|
||||
var/amount = 0
|
||||
|
||||
/obj/effect/effect/freezing_smoke/New(loc, var/amt, var/blast)
|
||||
..()
|
||||
spawn(100+rand(10,30))
|
||||
delete()
|
||||
amount = amt
|
||||
if(amount)
|
||||
var/datum/effect/system/freezing_smoke_spread/F = new /datum/effect/system/freezing_smoke_spread
|
||||
F.set_up(amount, 0, src.loc)
|
||||
F.start()
|
||||
if(blast)
|
||||
for(var/turf/T in spiral_range_turfs(2, src.loc))
|
||||
Chilled(T)
|
||||
return
|
||||
|
||||
/obj/effect/effect/freezing_smoke/proc/Chilled(atom/A)
|
||||
if(istype(A, /turf/simulated))
|
||||
var/turf/simulated/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = 2
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
if(G.toxins)
|
||||
G.nitrogen += (G.toxins)
|
||||
G.toxins = 0
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/V in T)
|
||||
V.welded = 1
|
||||
V.update_icon()
|
||||
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
|
||||
for(var/mob/living/L in T)
|
||||
L.ExtinguishMob()
|
||||
for(var/obj/item/Item in T)
|
||||
Item.extinguish()
|
||||
|
||||
/datum/effect/system/freezing_smoke_spread
|
||||
|
||||
/datum/effect/system/freezing_smoke_spread/set_up(n = 6, c = 0, loca)
|
||||
number = n
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
/datum/effect/system/freezing_smoke_spread/start()
|
||||
var/i = 0
|
||||
for(i=0, i<number, i++)
|
||||
spawn(0)
|
||||
var/obj/effect/effect/freezing_smoke/smoke = new /obj/effect/effect/freezing_smoke(location, 0, 0)
|
||||
smoke.amount = 0
|
||||
var/direction = pick(alldirs)
|
||||
for(i=0, i<rand(1,3), i++)
|
||||
sleep(5)
|
||||
step(smoke,direction)
|
||||
spawn(150+rand(10,30))
|
||||
if(smoke)
|
||||
fadeOut(smoke)
|
||||
smoke.delete()
|
||||
|
||||
#undef EXTINGUISHER
|
||||
#undef NANOFROST
|
||||
#undef METAL_FOAM
|
||||
|
||||
@@ -208,15 +208,21 @@
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
block_chance = 75
|
||||
sharp = 1
|
||||
light_power = 2
|
||||
var/brightness_on = 2
|
||||
var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE)
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/New()
|
||||
blade_color = pick("red", "blue", "green", "purple")
|
||||
if(!blade_color)
|
||||
blade_color = pick("red", "blue", "green", "purple")
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/update_icon()
|
||||
if(wielded)
|
||||
icon_state = "dualsaber[blade_color][wielded]"
|
||||
set_light(brightness_on, l_color=colormap[blade_color])
|
||||
else
|
||||
icon_state = "dualsaber0"
|
||||
set_light(0)
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
|
||||
if(HULK in user.mutations)
|
||||
@@ -239,16 +245,16 @@
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/green/New()
|
||||
/obj/item/weapon/twohanded/dualsaber/green
|
||||
blade_color = "green"
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/red/New()
|
||||
/obj/item/weapon/twohanded/dualsaber/red
|
||||
blade_color = "red"
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/purple/New()
|
||||
/obj/item/weapon/twohanded/dualsaber/purple
|
||||
blade_color = "purple"
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/blue/New()
|
||||
/obj/item/weapon/twohanded/dualsaber/blue
|
||||
blade_color = "blue"
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/unwield()
|
||||
@@ -607,7 +613,7 @@
|
||||
origin_tech = "combat=4;powerstorage=7"
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/proc/shock(mob/living/target as mob)
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread()
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
|
||||
s.set_up(5, 1, target.loc)
|
||||
s.start()
|
||||
target.visible_message("<span class='danger'>[target.name] was shocked by the [src.name]!</span>", \
|
||||
@@ -735,7 +741,7 @@
|
||||
Z.take_organ_damage(0,30)
|
||||
user.visible_message("<span class='danger'>[user] slams the charged axe into [Z.name] with all their might!</span>")
|
||||
playsound(loc, 'sound/magic/lightningbolt.ogg', 5, 1)
|
||||
var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
/obj/proc/take_damage()
|
||||
return
|
||||
|
||||
//the sound played when the obj is damaged.
|
||||
/obj/proc/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/singularity_act()
|
||||
ex_act(1)
|
||||
if(src && !qdeleted(src))
|
||||
qdel(src)
|
||||
return 2
|
||||
|
||||
//// FIRE
|
||||
|
||||
/obj/fire_act(global_overlay=1)
|
||||
if(!burn_state)
|
||||
burn_state = ON_FIRE
|
||||
fire_master.burning += src
|
||||
burn_world_time = world.time + burntime*rand(10,20)
|
||||
if(global_overlay)
|
||||
overlays += fire_overlay
|
||||
return 1
|
||||
|
||||
/obj/proc/burn()
|
||||
empty_object_contents(1, loc)
|
||||
var/obj/effect/decal/cleanable/ash/A = new(loc)
|
||||
A.desc = "Looks like this used to be a [name] some time ago."
|
||||
fire_master.burning -= src
|
||||
qdel(src)
|
||||
|
||||
/obj/proc/extinguish()
|
||||
if(burn_state == ON_FIRE)
|
||||
burn_state = FLAMMABLE
|
||||
overlays -= fire_overlay
|
||||
fire_master.burning -= src
|
||||
|
||||
/obj/proc/tesla_act(power)
|
||||
being_shocked = TRUE
|
||||
var/power_bounced = power * 0.5
|
||||
tesla_zap(src, 3, power_bounced)
|
||||
addtimer(src, "reset_shocked", 10)
|
||||
|
||||
/obj/proc/reset_shocked()
|
||||
being_shocked = FALSE
|
||||
|
||||
//the obj is deconstructed into pieces, whether through careful disassembly or when destroyed.
|
||||
/obj/proc/deconstruct(disassembled = TRUE)
|
||||
qdel(src)
|
||||
@@ -9,10 +9,14 @@
|
||||
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/sharp = 0 // whether this object cuts
|
||||
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
||||
|
||||
var/can_deconstruct = TRUE
|
||||
var/damtype = "brute"
|
||||
var/force = 0
|
||||
|
||||
var/obj_integrity //defaults to max_integrity
|
||||
var/max_integrity = 500
|
||||
var/integrity_failure = 0 //0 if we have no special broken behavior
|
||||
|
||||
var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it
|
||||
|
||||
var/burn_state = FIRE_PROOF // LAVA_PROOF | FIRE_PROOF | FLAMMABLE | ON_FIRE
|
||||
@@ -25,7 +29,8 @@
|
||||
|
||||
/obj/New()
|
||||
. = ..()
|
||||
|
||||
if(obj_integrity == null)
|
||||
obj_integrity = max_integrity
|
||||
if(on_blueprints && isturf(loc))
|
||||
var/turf/T = loc
|
||||
if(force_blueprints)
|
||||
@@ -158,10 +163,6 @@
|
||||
if(istype(M) && M.client && M.machine == src)
|
||||
src.attack_self(M)
|
||||
|
||||
|
||||
/obj/proc/alter_health()
|
||||
return 1
|
||||
|
||||
/obj/proc/hide(h)
|
||||
return
|
||||
|
||||
@@ -253,12 +254,6 @@ a {
|
||||
user.set_machine(src)
|
||||
onclose(user, "mtcomputer")
|
||||
|
||||
/obj/singularity_act()
|
||||
ex_act(1.0)
|
||||
if(src && isnull(gcDestroyed))
|
||||
qdel(src)
|
||||
return 2
|
||||
|
||||
/obj/singularity_pull(S, current_size)
|
||||
if(anchored)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
@@ -269,40 +264,9 @@ a {
|
||||
/obj/proc/container_resist(var/mob/living)
|
||||
return
|
||||
|
||||
/obj/proc/tesla_act(var/power)
|
||||
being_shocked = 1
|
||||
var/power_bounced = power * 0.5
|
||||
tesla_zap(src, 3, power_bounced)
|
||||
addtimer(src, "reset_shocked", 10)
|
||||
|
||||
/obj/proc/reset_shocked()
|
||||
being_shocked = 0
|
||||
|
||||
/obj/proc/CanAStarPass()
|
||||
. = !density
|
||||
|
||||
/obj/fire_act(global_overlay=1)
|
||||
if(!burn_state)
|
||||
burn_state = ON_FIRE
|
||||
fire_master.burning += src
|
||||
burn_world_time = world.time + burntime*rand(10,20)
|
||||
if(global_overlay)
|
||||
overlays += fire_overlay
|
||||
return 1
|
||||
|
||||
/obj/proc/burn()
|
||||
empty_object_contents(1, loc)
|
||||
var/obj/effect/decal/cleanable/ash/A = new(loc)
|
||||
A.desc = "Looks like this used to be a [name] some time ago."
|
||||
fire_master.burning -= src
|
||||
qdel(src)
|
||||
|
||||
/obj/proc/extinguish()
|
||||
if(burn_state == ON_FIRE)
|
||||
burn_state = FLAMMABLE
|
||||
overlays -= fire_overlay
|
||||
fire_master.burning -= src
|
||||
|
||||
/obj/proc/empty_object_contents(burn = 0, new_loc = loc)
|
||||
for(var/obj/item/Item in contents) //Empty out the contents
|
||||
Item.forceMove(new_loc)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
if(affecting)
|
||||
to_chat(M, "<span class='warning'>You land heavily on your [affecting.name]!</span>")
|
||||
affecting.take_damage(damage, 0)
|
||||
affecting.receive_damage(damage, 0)
|
||||
if(affecting.parent)
|
||||
affecting.parent.add_autopsy_data("Misadventure", damage)
|
||||
else
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0 || wall_mounted) return 1
|
||||
return (!density)
|
||||
@@ -212,7 +209,7 @@
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_teleport(src, E.pad, 0)
|
||||
@@ -239,7 +236,7 @@
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_teleport(src, L)
|
||||
|
||||
@@ -141,4 +141,3 @@
|
||||
new /obj/item/clothing/suit/storage/paramedic(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/key/ambulance(src)
|
||||
|
||||
@@ -245,8 +245,9 @@
|
||||
..()
|
||||
new /obj/item/clothing/suit/space/eva/paramedic(src)
|
||||
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
|
||||
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
|
||||
new /obj/item/device/sensor_device(src)
|
||||
new /obj/item/key/ambulance(src)
|
||||
new /obj/item/weapon/pinpointer/crew(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/reagents
|
||||
name = "chemical storage closet"
|
||||
|
||||
@@ -234,6 +234,7 @@
|
||||
..()
|
||||
new /obj/item/weapon/storage/briefcase(src)
|
||||
new /obj/item/weapon/storage/firstaid/adv(src)
|
||||
new /obj/item/weapon/pinpointer/crew(src)
|
||||
new /obj/item/weapon/storage/belt/security/sec(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/device/flash(src)
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi(src)
|
||||
new /obj/item/weapon/tank/jetpack/oxygen/harness(src)
|
||||
new /obj/item/clothing/shoes/magboots/syndie(src)
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for a Syndicate boarding party.."
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
if(L.electrocute_act(17, src))
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 2
|
||||
@@ -115,7 +115,7 @@
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_teleport(src, E.pad, 0)
|
||||
@@ -139,7 +139,7 @@
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_teleport(src, L)
|
||||
@@ -217,7 +217,7 @@
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
if(L.electrocute_act(17, src))
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/curtain/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/curtain/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/cloth(loc, 2)
|
||||
new /obj/item/stack/sheet/plastic(loc, 2)
|
||||
new /obj/item/stack/rods(loc, 1)
|
||||
|
||||
@@ -1,331 +1,298 @@
|
||||
/obj/structure/door_assembly
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
|
||||
name = "Airlock Assembly"
|
||||
icon_state = "door_as_0"
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/state = 0
|
||||
var/base_icon_state = ""
|
||||
var/base_name = "Airlock"
|
||||
name = "airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/public.dmi'
|
||||
icon_state = "construction"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
var/overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
var/state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
var/mineral = null
|
||||
var/base_name = "airlock"
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/airlock_type = "" //the type path of the airlock once completed
|
||||
var/glass_type = "/glass"
|
||||
var/glass = 0 // 0 = glass can be installed. -1 = glass can't be installed. 1 = glass is already installed. Text = mineral plating is installed instead.
|
||||
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
|
||||
var/glass_type = /obj/machinery/door/airlock/glass
|
||||
var/glass = 0 // 0 = glass can be installed. 1 = glass is already installed.
|
||||
var/created_name = null
|
||||
var/heat_proof_finished = 0 //whether to heat-proof the finished airlock
|
||||
var/previous_assembly = /obj/structure/door_assembly
|
||||
var/noglass = FALSE //airlocks with no glass version, also cannot be modified with sheets
|
||||
var/material_type = /obj/item/stack/sheet/metal
|
||||
var/material_amt = 4
|
||||
|
||||
/obj/structure/door_assembly/New()
|
||||
update_state()
|
||||
update_icon()
|
||||
update_name()
|
||||
..()
|
||||
|
||||
/obj/structure/door_assembly/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
return ..()
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_com
|
||||
base_icon_state = "com"
|
||||
base_name = "Command Airlock"
|
||||
glass_type = "/glass_command"
|
||||
airlock_type = "/command"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sec
|
||||
base_icon_state = "sec"
|
||||
base_name = "Security Airlock"
|
||||
glass_type = "/glass_security"
|
||||
airlock_type = "/security"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_eng
|
||||
base_icon_state = "eng"
|
||||
base_name = "Engineering Airlock"
|
||||
glass_type = "/glass_engineering"
|
||||
airlock_type = "/engineering"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_min
|
||||
base_icon_state = "min"
|
||||
base_name = "Mining Airlock"
|
||||
glass_type = "/glass_mining"
|
||||
airlock_type = "/mining"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_atmo
|
||||
base_icon_state = "atmo"
|
||||
base_name = "Atmospherics Airlock"
|
||||
glass_type = "/glass_atmos"
|
||||
airlock_type = "/atmos"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_research
|
||||
base_icon_state = "res"
|
||||
base_name = "Research Airlock"
|
||||
glass_type = "/glass_research"
|
||||
airlock_type = "/research"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_science
|
||||
base_icon_state = "sci"
|
||||
base_name = "Science Airlock"
|
||||
glass_type = "/glass_science"
|
||||
airlock_type = "/science"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_med
|
||||
base_icon_state = "med"
|
||||
base_name = "Medical Airlock"
|
||||
glass_type = "/glass_medical"
|
||||
airlock_type = "/medical"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mai
|
||||
base_icon_state = "mai"
|
||||
base_name = "Maintenance Airlock"
|
||||
airlock_type = "/maintenance"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_ext
|
||||
base_icon_state = "ext"
|
||||
base_name = "External Airlock"
|
||||
airlock_type = "/external"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_fre
|
||||
base_icon_state = "fre"
|
||||
base_name = "Freezer Airlock"
|
||||
airlock_type = "/freezer"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_hatch
|
||||
base_icon_state = "hatch"
|
||||
base_name = "Airtight Hatch"
|
||||
airlock_type = "/hatch"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mhatch
|
||||
base_icon_state = "mhatch"
|
||||
base_name = "Maintenance Hatch"
|
||||
airlock_type = "/maintenance_hatch"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
|
||||
base_icon_state = "highsec"
|
||||
base_name = "High Security Airlock"
|
||||
airlock_type = "/highsecurity"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_shuttle
|
||||
base_icon_state = "shuttle"
|
||||
base_name = "Shuttle Airlock"
|
||||
airlock_type = "/shuttle"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/multi_tile
|
||||
icon = 'icons/obj/doors/door_assembly2x1.dmi'
|
||||
dir = EAST
|
||||
var/width = 1
|
||||
base_icon_state = "g" //Remember to delete this line when reverting "glass" var to 1.
|
||||
airlock_type = "/multi_tile/glass"
|
||||
glass = -1 //To prevent bugs in deconstruction process.
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/New()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
/obj/structure/door_assembly/examine(mob/user)
|
||||
..()
|
||||
var/doorname = ""
|
||||
if(created_name)
|
||||
doorname = ", written on it is '[created_name]'"
|
||||
switch(state)
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>The anchoring bolts are <b>wrenched</b> in place, but the maintenance panel lacks <i>wiring</i>.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The assembly is <b>welded together</b>, but the anchoring bolts are <i>unwrenched</i>.</span>")
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
to_chat(user, "<span class='notice'>The maintenance panel is <b>wired</b>, but the circuit slot is <i>empty</i>.</span>")
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
to_chat(user, "<span class='notice'>The circuit is <b>connected loosely</b> to its slot, but the maintenance panel is <i>unscrewed and open</i>.</span>")
|
||||
if(!mineral && !glass && !noglass)
|
||||
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows and mineral covers.</span>")
|
||||
else if(!mineral && glass && !noglass)
|
||||
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for mineral covers.</span>")
|
||||
else if(mineral && !glass && !noglass)
|
||||
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows.</span>")
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
update_state()
|
||||
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>")
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Move()
|
||||
. = ..()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult
|
||||
icon = 'icons/obj/doors/Doorcult.dmi'
|
||||
base_icon_state = "construction"
|
||||
base_name = "engraved airlock"
|
||||
airlock_type = "/cult"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cultruned
|
||||
icon = 'icons/obj/doors/Doorcultruned.dmi'
|
||||
base_icon_state = "construction"
|
||||
base_name = "runed airlock"
|
||||
airlock_type = "/cult/runed"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
var/t = copytext(stripped_input(user, "Enter the name for the door.", name, created_name),1,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && loc != usr)
|
||||
return
|
||||
created_name = t
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
|
||||
else if(iswelder(W) && (mineral || glass || !anchored ))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(istext(glass))
|
||||
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
if(mineral)
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
user.visible_message("[user] welds the [mineral] plating off the airlock assembly.", "You start to weld the [mineral] plating off the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
|
||||
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
|
||||
new M(src.loc, 2)
|
||||
glass = 0
|
||||
else if(glass == 1)
|
||||
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weld the [mineral] plating off.</span>")
|
||||
new mineral_path(loc, 2)
|
||||
var/obj/structure/door_assembly/PA = new previous_assembly(loc)
|
||||
transfer_assembly_vars(src, PA)
|
||||
|
||||
else if(glass)
|
||||
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weld the glass panel out.</span>")
|
||||
if(heat_proof_finished)
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||
heat_proof_finished = 0
|
||||
heat_proof_finished = FALSE
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = 0
|
||||
glass = FALSE
|
||||
else if(!anchored)
|
||||
user.visible_message("[user] disassembles the airlock assembly.", "You start to disassemble the airlock assembly.")
|
||||
user.visible_message("<span class='warning'>[user] disassembles the airlock assembly.</span>", \
|
||||
"You start to disassemble the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
|
||||
new /obj/item/stack/sheet/metal(src.loc, 4)
|
||||
qdel(src)
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
else if(iswrench(W) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor...")
|
||||
else
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secured the airlock assembly!</span>")
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure the airlock assembly.</span>")
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
else if(iscoil(W) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES && anchored)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
|
||||
if (coil.amount < 1)
|
||||
to_chat(user, "<span class='warning'>You need one length of cable to wire the airlock assembly!</span>")
|
||||
return
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly...")
|
||||
if(do_after(user, 40 * coil.toolspeed, target = src))
|
||||
if(!src) return
|
||||
if(coil.amount < 1 || state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
coil.use(1)
|
||||
src.state = 1
|
||||
to_chat(user, "<span class='notice'>You wire the Airlock!</span>")
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
else if(iswirecutter(W) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You cut the airlock's wires!</span>")
|
||||
if(state == 1)
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the airlock assembly.</span>")
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS && W.icon_state != "door_electronics_smoked")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You installed the airlock electronics!</span>")
|
||||
src.state = 2
|
||||
src.name = "Near finished Airlock Assembly"
|
||||
src.electronics = W
|
||||
else
|
||||
W.loc = src.loc
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER
|
||||
name = "near finished airlock assembly"
|
||||
electronics = W
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
else if(iscrowbar(W) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
|
||||
src.state = 1
|
||||
src.name = "Wired Airlock Assembly"
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
name = "wired airlock assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
ae = new/obj/item/weapon/airlock_electronics(loc)
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
ae.forceMove(loc)
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet) && !glass)
|
||||
else if(istype(W, /obj/item/stack/sheet) && (!glass || !mineral))
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(S)
|
||||
if(S.amount>=1)
|
||||
if(istype(S, /obj/item/stack/sheet/rglass) || istype(S, /obj/item/stack/sheet/glass))
|
||||
playsound(src.loc, S.usesound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
if(S.type == /obj/item/stack/sheet/rglass)
|
||||
to_chat(user, "<span class='notice'>You install reinforced glass windows into the airlock assembly.</span>")
|
||||
heat_proof_finished = 1 //reinforced glass makes the airlock heat-proof
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You install regular glass windows into the airlock assembly.</span>")
|
||||
S.use(1)
|
||||
glass = 1
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(S.amount>=2)
|
||||
playsound(src.loc, S.usesound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You installed [M] plating into the airlock assembly!</span>")
|
||||
S.use(2)
|
||||
glass = "[M]"
|
||||
if(!noglass)
|
||||
if(!glass)
|
||||
if(istype(S, /obj/item/stack/sheet/rglass) || istype(S, /obj/item/stack/sheet/glass))
|
||||
playsound(loc, S.usesound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly...")
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
if(S.amount < 1 || glass)
|
||||
return
|
||||
if(S.type == /obj/item/stack/sheet/rglass)
|
||||
to_chat(user, "<span class='notice'>You install reinforced glass windows into the airlock assembly.</span>")
|
||||
heat_proof_finished = TRUE //reinforced glass makes the airlock heat-proof
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You install regular glass windows into the airlock assembly.</span>")
|
||||
S.use(1)
|
||||
glass = TRUE
|
||||
if(!mineral)
|
||||
if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(S.amount>=2)
|
||||
playsound(loc, S.usesound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly...")
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
if(S.amount < 2 || mineral)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You install [M] plating into the airlock assembly.</span>")
|
||||
S.use(2)
|
||||
var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]")
|
||||
var/obj/structure/door_assembly/MA = new mineralassembly(loc)
|
||||
transfer_assembly_vars(src, MA, TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets add a mineral cover!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot add [S] to [src]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot add [S] to [src]!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
|
||||
else if(isscrewdriver(W) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] finishes the airlock.", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
|
||||
var/path
|
||||
if(istext(glass))
|
||||
path = text2path("/obj/machinery/door/airlock/[glass]")
|
||||
else if(glass == 1)
|
||||
path = text2path("/obj/machinery/door/airlock[glass_type]")
|
||||
else
|
||||
path = text2path("/obj/machinery/door/airlock[airlock_type]")
|
||||
var/obj/machinery/door/airlock/door = new path(src.loc)
|
||||
door.setDir(dir)
|
||||
door.assembly_type = type
|
||||
door.electronics = src.electronics
|
||||
door.heat_proof = heat_proof_finished
|
||||
if(src.electronics.one_access)
|
||||
door.req_access = null
|
||||
door.req_one_access = src.electronics.conf_access
|
||||
else
|
||||
door.req_access = src.electronics.conf_access
|
||||
if(created_name)
|
||||
door.name = created_name
|
||||
else
|
||||
door.name = "[istext(glass) ? "[glass] airlock" : base_name]"
|
||||
src.electronics.loc = door
|
||||
qdel(src)
|
||||
if(loc && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
to_chat(user, "<span class='notice'>You finish the airlock.</span>")
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(glass)
|
||||
door = new glass_type(loc)
|
||||
else
|
||||
door = new airlock_type(loc)
|
||||
door.setDir(dir)
|
||||
door.electronics = electronics
|
||||
door.heat_proof = heat_proof_finished
|
||||
if(electronics.one_access)
|
||||
door.req_access = null
|
||||
door.req_one_access = electronics.conf_access
|
||||
else
|
||||
door.req_access = electronics.conf_access
|
||||
if(created_name)
|
||||
door.name = created_name
|
||||
else
|
||||
door.name = base_name
|
||||
door.previous_airlock = previous_assembly
|
||||
electronics.forceMove(door)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
update_state()
|
||||
update_name()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/proc/update_state()
|
||||
icon_state = "door_as_[glass == 1 ? "g" : ""][istext(glass) ? glass : base_icon_state][state]"
|
||||
/obj/structure/door_assembly/update_icon()
|
||||
overlays.Cut()
|
||||
if(!glass)
|
||||
overlays += get_airlock_overlay("fill_construction", icon)
|
||||
else if(glass)
|
||||
overlays += get_airlock_overlay("glass_construction", overlays_file)
|
||||
overlays += get_airlock_overlay("panel_c[state+1]", overlays_file)
|
||||
|
||||
/obj/structure/door_assembly/proc/update_name()
|
||||
name = ""
|
||||
switch(state)
|
||||
if(0)
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
if(anchored)
|
||||
name = "Secured "
|
||||
if(1)
|
||||
name = "Wired "
|
||||
if(2)
|
||||
name = "Near Finished "
|
||||
name += "[heat_proof_finished ? "Heat-Proofed " : ""][glass == 1 ? "Window " : ""][istext(glass) ? "[glass] Airlock" : base_name] Assembly"
|
||||
name = "secured "
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
name = "wired "
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
name = "near finished "
|
||||
name += "[heat_proof_finished ? "heat-proofed " : ""][glass ? "window " : ""][base_name] assembly"
|
||||
|
||||
/obj/structure/door_assembly/proc/transfer_assembly_vars(obj/structure/door_assembly/source, obj/structure/door_assembly/target, previous = FALSE)
|
||||
target.glass = source.glass
|
||||
target.heat_proof_finished = source.heat_proof_finished
|
||||
target.created_name = source.created_name
|
||||
target.state = source.state
|
||||
target.anchored = source.anchored
|
||||
if(previous)
|
||||
target.previous_assembly = source.type
|
||||
if(electronics)
|
||||
target.electronics = source.electronics
|
||||
source.electronics.forceMove(target)
|
||||
target.update_icon()
|
||||
target.update_name()
|
||||
qdel(source)
|
||||
|
||||
/obj/structure/door_assembly/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!disassembled)
|
||||
material_amt = rand(2,4)
|
||||
new material_type(T, material_amt)
|
||||
if(glass)
|
||||
if(disassembled)
|
||||
if(heat_proof_finished)
|
||||
new /obj/item/stack/sheet/rglass(T)
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(T)
|
||||
else
|
||||
new /obj/item/weapon/shard(T)
|
||||
if(mineral)
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
new mineral_path(T, 2)
|
||||
qdel(src)
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
/obj/structure/door_assembly/door_assembly_public
|
||||
name = "public airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station2/glass.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station2/overlays.dmi'
|
||||
glass_type = /obj/machinery/door/airlock/public/glass
|
||||
airlock_type = /obj/machinery/door/airlock/public
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_com
|
||||
name = "command airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/command.dmi'
|
||||
base_name = "command airlock"
|
||||
glass_type = /obj/machinery/door/airlock/command/glass
|
||||
airlock_type = /obj/machinery/door/airlock/command
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sec
|
||||
name = "security airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/security.dmi'
|
||||
base_name = "security airlock"
|
||||
glass_type = /obj/machinery/door/airlock/security/glass
|
||||
airlock_type = /obj/machinery/door/airlock/security
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_eng
|
||||
name = "engineering airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/engineering.dmi'
|
||||
base_name = "engineering airlock"
|
||||
glass_type = /obj/machinery/door/airlock/engineering/glass
|
||||
airlock_type = /obj/machinery/door/airlock/engineering
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_min
|
||||
name = "mining airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/mining.dmi'
|
||||
base_name = "mining airlock"
|
||||
glass_type = /obj/machinery/door/airlock/mining/glass
|
||||
airlock_type = /obj/machinery/door/airlock/mining
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_atmo
|
||||
name = "atmospherics airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/atmos.dmi'
|
||||
base_name = "atmospherics airlock"
|
||||
glass_type = /obj/machinery/door/airlock/atmos/glass
|
||||
airlock_type = /obj/machinery/door/airlock/atmos
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_research
|
||||
name = "research airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/research.dmi'
|
||||
base_name = "research airlock"
|
||||
glass_type = /obj/machinery/door/airlock/research/glass
|
||||
airlock_type = /obj/machinery/door/airlock/research
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_science
|
||||
name = "science airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/science.dmi'
|
||||
base_name = "science airlock"
|
||||
glass_type = /obj/machinery/door/airlock/science/glass
|
||||
airlock_type = /obj/machinery/door/airlock/science
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_med
|
||||
name = "medical airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/medical.dmi'
|
||||
base_name = "medical airlock"
|
||||
glass_type = /obj/machinery/door/airlock/medical/glass
|
||||
airlock_type = /obj/machinery/door/airlock/medical
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mai
|
||||
name = "maintenance airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
|
||||
base_name = "maintenance airlock"
|
||||
glass_type = /obj/machinery/door/airlock/maintenance/glass
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_extmai
|
||||
name = "external maintenance airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/maintenanceexternal.dmi'
|
||||
base_name = "external maintenance airlock"
|
||||
glass_type = /obj/machinery/door/airlock/maintenance/external/glass
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance/external
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_ext
|
||||
name = "external airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/external/external.dmi'
|
||||
base_name = "external airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/external/overlays.dmi'
|
||||
glass_type = /obj/machinery/door/airlock/external/glass
|
||||
airlock_type = /obj/machinery/door/airlock/external
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_fre
|
||||
name = "freezer airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/freezer.dmi'
|
||||
base_name = "freezer airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/freezer
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_hatch
|
||||
name = "airtight hatch assembly"
|
||||
icon = 'icons/obj/doors/airlocks/hatch/centcom.dmi'
|
||||
base_name = "airtight hatch"
|
||||
overlays_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/hatch
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mhatch
|
||||
name = "maintenance hatch assembly"
|
||||
icon = 'icons/obj/doors/airlocks/hatch/maintenance.dmi'
|
||||
base_name = "maintenance hatch"
|
||||
overlays_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance_hatch
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_highsecurity
|
||||
name = "high security airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/highsec/highsec.dmi'
|
||||
base_name = "high security airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/highsec/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/highsecurity
|
||||
noglass = TRUE
|
||||
material_type = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_vault
|
||||
name = "vault door assembly"
|
||||
icon = 'icons/obj/doors/airlocks/vault/vault.dmi'
|
||||
base_name = "vault door"
|
||||
overlays_file = 'icons/obj/doors/airlocks/vault/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/vault
|
||||
noglass = TRUE
|
||||
material_type = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_shuttle
|
||||
name = "shuttle airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/shuttle/shuttle.dmi'
|
||||
base_name = "shuttle airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/shuttle/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/shuttle
|
||||
glass_type = /obj/machinery/door/airlock/shuttle/glass
|
||||
|
||||
/obj/structure/door_assembly/multi_tile
|
||||
name = "large airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/glass_large/glass_large.dmi'
|
||||
base_name = "large airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/glass_large/overlays.dmi'
|
||||
dir = EAST
|
||||
var/width = 1
|
||||
airlock_type = /obj/machinery/door/airlock/multi_tile
|
||||
glass_type = /obj/machinery/door/airlock/multi_tile/glass
|
||||
material_amt = 8
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/New()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Move()
|
||||
. = ..()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult
|
||||
name = "cult airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/cult/runed/cult.dmi'
|
||||
base_name = "cult airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/cult/runed/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/cult
|
||||
glass_type = /obj/machinery/door/airlock/cult/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult/unruned
|
||||
icon = 'icons/obj/doors/airlocks/cult/unruned/cult.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/cult/unruned/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/cult/unruned
|
||||
glass_type = /obj/machinery/door/airlock/cult/unruned/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_centcom
|
||||
icon = 'icons/obj/doors/airlocks/centcom/centcom.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/centcom/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/centcom
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_gold
|
||||
name = "gold airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/gold.dmi'
|
||||
base_name = "gold airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/gold
|
||||
mineral = "gold"
|
||||
glass_type = /obj/machinery/door/airlock/gold/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_silver
|
||||
name = "silver airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/silver.dmi'
|
||||
base_name = "silver airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/silver
|
||||
mineral = "silver"
|
||||
glass_type = /obj/machinery/door/airlock/silver/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_diamond
|
||||
name = "diamond airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/diamond.dmi'
|
||||
base_name = "diamond airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/diamond
|
||||
mineral = "diamond"
|
||||
glass_type = /obj/machinery/door/airlock/diamond/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_uranium
|
||||
name = "uranium airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/uranium.dmi'
|
||||
base_name = "uranium airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/uranium
|
||||
mineral = "uranium"
|
||||
glass_type = /obj/machinery/door/airlock/uranium/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_plasma
|
||||
name = "plasma airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/plasma.dmi'
|
||||
base_name = "plasma airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/plasma
|
||||
mineral = "plasma"
|
||||
glass_type = /obj/machinery/door/airlock/plasma/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_bananium
|
||||
name = "bananium airlock assembly"
|
||||
desc = "Honk."
|
||||
icon = 'icons/obj/doors/airlocks/station/bananium.dmi'
|
||||
base_name = "bananium airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/bananium
|
||||
mineral = "bananium"
|
||||
glass_type = /obj/machinery/door/airlock/bananium/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_tranquillite
|
||||
name = "tranquillite airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/freezer.dmi'
|
||||
base_name = "tranquillite airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/tranquillite
|
||||
mineral = "tranquillite"
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sandstone
|
||||
name = "sandstone airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/sandstone.dmi'
|
||||
base_name = "sandstone airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
mineral = "sandstone"
|
||||
glass_type = /obj/machinery/door/airlock/sandstone/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_wood
|
||||
name = "wooden airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/wood.dmi'
|
||||
base_name = "wooden airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/wood
|
||||
mineral = "wood"
|
||||
glass_type = /obj/machinery/door/airlock/wood/glass
|
||||
@@ -72,7 +72,7 @@
|
||||
A.updateicon()
|
||||
|
||||
flick("echair_shock", src)
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(12, 1, src)
|
||||
s.start()
|
||||
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='danger'>You hear a deep sharp shock!</span>")
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
anchored = 1
|
||||
icon = 'icons/turf/walls/wall.dmi'
|
||||
icon_state = "wall"
|
||||
var/mineral = "metal"
|
||||
var/walltype = "metal"
|
||||
var/opening = 0
|
||||
@@ -164,7 +165,7 @@
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon = 'icons/turf/walls/uranium_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "uranium"
|
||||
mineral = "uranium"
|
||||
walltype = "uranium"
|
||||
var/active = null
|
||||
@@ -199,7 +200,7 @@
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon = 'icons/turf/walls/gold_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "gold"
|
||||
mineral = "gold"
|
||||
walltype = "gold"
|
||||
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/simulated/wall/mineral/gold)
|
||||
@@ -208,7 +209,7 @@
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny."
|
||||
icon = 'icons/turf/walls/silver_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "silver"
|
||||
mineral = "silver"
|
||||
walltype = "silver"
|
||||
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/simulated/wall/mineral/silver)
|
||||
@@ -217,7 +218,7 @@
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon = 'icons/turf/walls/diamond_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "diamond"
|
||||
mineral = "diamond"
|
||||
walltype = "diamond"
|
||||
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
|
||||
@@ -227,7 +228,7 @@
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "plasma"
|
||||
mineral = "plasma"
|
||||
walltype = "plasma"
|
||||
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/simulated/wall/mineral/plasma, /turf/simulated/wall/mineral/alien)
|
||||
@@ -236,6 +237,7 @@
|
||||
if(is_hot(W) > 300)
|
||||
message_admins("Plasma falsewall ignited by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma falsewall ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
burnbabyburn()
|
||||
return
|
||||
..()
|
||||
@@ -254,7 +256,7 @@
|
||||
name = "alien wall"
|
||||
desc = "A strange-looking alien wall."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "plasma"
|
||||
mineral = "alien"
|
||||
walltype = "alien"
|
||||
canSmoothWith = list(/obj/structure/falsewall/alien, /turf/simulated/wall/mineral/alien)
|
||||
@@ -264,7 +266,7 @@
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon = 'icons/turf/walls/bananium_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "bananium"
|
||||
mineral = "clown"
|
||||
walltype = "clown"
|
||||
canSmoothWith = list(/obj/structure/falsewall/bananium, /turf/simulated/wall/mineral/bananium)
|
||||
@@ -272,7 +274,7 @@
|
||||
/obj/structure/falsewall/sandstone
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating."
|
||||
icon_state = ""
|
||||
icon_state = "sandstone"
|
||||
mineral = "sandstone"
|
||||
walltype = "sandstone"
|
||||
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/simulated/wall/mineral/sandstone)
|
||||
@@ -281,7 +283,7 @@
|
||||
name = "wooden wall"
|
||||
desc = "A wall with wooden plating. Stiff."
|
||||
icon = 'icons/turf/walls/wood_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "wood"
|
||||
mineral = "wood"
|
||||
walltype = "wood"
|
||||
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
|
||||
@@ -290,7 +292,7 @@
|
||||
name = "rough metal wall"
|
||||
desc = "A wall with rough metal plating."
|
||||
icon = 'icons/turf/walls/iron_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "iron"
|
||||
mineral = "metal"
|
||||
walltype = "iron"
|
||||
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
icon_state = "plasmawindow"
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
glasstype = /obj/item/stack/sheet/plasmaglass
|
||||
health = 120
|
||||
health = 240
|
||||
|
||||
/obj/structure/window/full/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + 32000)
|
||||
@@ -59,7 +59,7 @@
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
glasstype = /obj/item/stack/sheet/plasmaglass
|
||||
reinf = 1
|
||||
health = 160
|
||||
health = 320
|
||||
|
||||
/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
@@ -69,7 +69,7 @@
|
||||
desc = "It looks rather strong. Might take a few good hits to shatter it."
|
||||
icon_state = "rwindow"
|
||||
basestate = "rwindow"
|
||||
health = 40
|
||||
health = 80
|
||||
reinf = 1
|
||||
|
||||
/obj/structure/window/full/reinforced/tinted
|
||||
@@ -84,7 +84,7 @@
|
||||
desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
|
||||
icon_state = "fwindow"
|
||||
basestate = "fwindow"
|
||||
health = 30
|
||||
health = 60
|
||||
|
||||
/obj/structure/window/full/shuttle
|
||||
name = "shuttle window"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
var/health = 200
|
||||
var/can_displace = TRUE //If the girder can be moved around by crowbarring it
|
||||
var/metalUsed = 2 //used to determine amount returned in deconstruction
|
||||
var/can_deconstruct = TRUE
|
||||
|
||||
/obj/structure/girder/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -42,7 +41,7 @@
|
||||
take_damage(rand(25, 75))
|
||||
return
|
||||
|
||||
/obj/structure/girder/proc/take_damage(amount)
|
||||
/obj/structure/girder/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
@@ -369,7 +368,7 @@
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/girder/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/girder/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
level = 3
|
||||
var/health = 10
|
||||
var/broken = 0
|
||||
var/can_deconstruct = TRUE
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/rods_broken = 1
|
||||
@@ -159,65 +158,82 @@
|
||||
|
||||
//window placing begin
|
||||
else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass))
|
||||
if(!broken)
|
||||
var/obj/item/stack/ST = W
|
||||
if (ST.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
|
||||
return
|
||||
var/dir_to_set = NORTH
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be fastened to the floor first!</span>")
|
||||
return
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
if((x == user.x) || (y == user.y)) //Only supposed to work for cardinal directions.
|
||||
if(x == user.x)
|
||||
if(y > user.y)
|
||||
dir_to_set = SOUTH
|
||||
else
|
||||
dir_to_set = NORTH
|
||||
else if(y == user.y)
|
||||
if(x > user.x)
|
||||
dir_to_set = WEST
|
||||
else
|
||||
dir_to_set = EAST
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't reach.</span>")
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start placing the window...</span>")
|
||||
if(do_after(user, 20 * W.toolspeed, target = src))
|
||||
if(!loc || !anchored) //Grille destroyed or unanchored while waiting
|
||||
return
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
|
||||
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
|
||||
else
|
||||
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
|
||||
WD.setDir(dir_to_set)
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
ST.use(1)
|
||||
to_chat(user, "<span class='notice'>You place the [WD] on [src].</span>")
|
||||
WD.update_icon()
|
||||
return
|
||||
build_window(W, user)
|
||||
return
|
||||
//window placing end
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
|
||||
return attacked_by(W, user)
|
||||
|
||||
/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user)
|
||||
if(!istype(S) || !user)
|
||||
return
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>You must repair or replace [src] first!</span>")
|
||||
return
|
||||
if(S.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
|
||||
return
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be fastened to the floor first!</span>")
|
||||
return
|
||||
if(!getRelativeDirection(src, user) && (user.loc != loc)) //essentially a cardinal direction adjacent or sharing same loc check
|
||||
to_chat(user, "<span class='warning'>You can't reach.</span>")
|
||||
return
|
||||
if(/obj/structure/window/full in loc) //check for a full window already present (blocks the whole tile)
|
||||
to_chat(user, "<span class='warning'>There is already a full window there.</span>")
|
||||
return
|
||||
var/selection = alert(user, "What type of window would you like to place?", "Window Construction", "One Direction", "Full", "Cancel")
|
||||
if(selection == "Cancel")
|
||||
return
|
||||
if(selection == "Full")
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets of glass for that!</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = src)) //glass doesn't have a toolspeed, so no multiplier
|
||||
if(broken || !anchored || !src) //make sure the grille is still intact, anchored, and exists!
|
||||
return
|
||||
if(S.get_amount() < 2) //make sure we still have enough for this!
|
||||
return
|
||||
if(!getRelativeDirection(src, user) && (user.loc != loc)) //make sure we can still do this from our location
|
||||
return
|
||||
var/obj/structure/window/W = new S.full_window(get_turf(src))
|
||||
S.use(2)
|
||||
W.anchored = 0
|
||||
W.state = 0
|
||||
to_chat(user, "<span class='notice'>You place [W] on [src].</span>")
|
||||
W.update_icon()
|
||||
return
|
||||
if(selection == "One Direction")
|
||||
var/dir_selection = input("Which direction will this window face?", "Direction") as null|anything in list("north", "east", "south", "west")
|
||||
if(!dir_selection)
|
||||
return
|
||||
var/temp_dir = text2dir(dir_selection)
|
||||
for(var/obj/structure/window/W in loc)
|
||||
if(istype(W, /obj/structure/window/full)) //double checking in case a full window was created while selecting direction
|
||||
to_chat(user, "<span class='warning'>There is already a full window there.</span>")
|
||||
return
|
||||
if(W.dir == temp_dir) //to avoid building a window on top of an existing window
|
||||
to_chat(user, "<span class='warning'>There is already a window facing this direction there.</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = src))
|
||||
if(broken || !anchored || !src) //make sure the grille is still intact, anchored, and exists!
|
||||
return
|
||||
if(S.get_amount() < 1) //make sure we still have enough fir this!
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
|
||||
return
|
||||
if(!getRelativeDirection(src, user) && (user.loc != loc)) //make sure we can still do this from our location
|
||||
return
|
||||
var/obj/structure/window/W = new S.created_window(get_turf(src))
|
||||
S.use(1)
|
||||
W.setDir(temp_dir)
|
||||
W.ini_dir = temp_dir
|
||||
W.anchored = 0
|
||||
W.state = 0
|
||||
to_chat(user, "<span class='notice'>You place [W] on [src].</span>")
|
||||
W.update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/grille/proc/attacked_by(obj/item/I, mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
@@ -226,7 +242,17 @@
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>")
|
||||
take_damage(I.force * 0.3, I.damtype)
|
||||
|
||||
/obj/structure/grille/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 80, 1)
|
||||
|
||||
/obj/structure/grille/deconstruct(disassembled = TRUE)
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(can_deconstruct)
|
||||
@@ -241,20 +267,10 @@
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, 1)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
if(sound_effect)
|
||||
play_attack_sound(damage_amount, damage_type, damage_flag)
|
||||
health -= damage_amount
|
||||
if(health <= 0)
|
||||
if(!broken)
|
||||
obj_break()
|
||||
@@ -276,7 +292,7 @@
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
if(electrocute_mob(user, C, src))
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
/obj/structure/mineral_door/attack_animal(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
|
||||
/obj/structure/mineral_door/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
SwitchState()
|
||||
@@ -68,11 +68,11 @@
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates)
|
||||
if(isSwitchingStates)
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
@@ -101,7 +101,7 @@
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
|
||||
if(close_delay != -1)
|
||||
spawn(close_delay)
|
||||
Close()
|
||||
@@ -157,7 +157,7 @@
|
||||
if(hardness <= 0)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/mineral_door/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/mineral_door/deconstruct(disassembled = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
if(sheetType)
|
||||
if(disassembled)
|
||||
@@ -223,6 +223,7 @@
|
||||
if(is_hot(W))
|
||||
message_admins("Plasma mineral door ignited by [key_name_admin(user)] in ([x], [y], [z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", 0, 1)
|
||||
log_game("Plasma mineral door ignited by [key_name(user)] in ([x], [y], [z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
TemperatureAct(100)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -92,10 +92,6 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/morgue/alter_health()
|
||||
return loc
|
||||
|
||||
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
@@ -290,10 +286,6 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/alter_health()
|
||||
return loc
|
||||
|
||||
|
||||
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
||||
if(cremating)
|
||||
to_chat(usr, "<span class='warning'>It's locked.</span>")
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/obj/structure/plasticflaps
|
||||
name = "plastic flaps"
|
||||
desc = "Completely impassable - or are they?"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "plasticflaps"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 4
|
||||
var/list/mobs_can_pass = list(
|
||||
/mob/living/carbon/slime,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/silicon/robot/drone,
|
||||
/mob/living/simple_animal/bot/mulebot
|
||||
)
|
||||
var/state = PLASTIC_FLAPS_NORMAL
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(PLASTIC_FLAPS_NORMAL)
|
||||
to_chat(user, "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>")
|
||||
if(PLASTIC_FLAPS_DETACHED)
|
||||
to_chat(user, "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>")
|
||||
|
||||
/obj/structure/plasticflaps/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(isscrewdriver(W))
|
||||
if(state == PLASTIC_FLAPS_NORMAL)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 180*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_NORMAL)
|
||||
return
|
||||
state = PLASTIC_FLAPS_DETACHED
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else if(state == PLASTIC_FLAPS_DETACHED)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
state = PLASTIC_FLAPS_NORMAL
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] to the floor.</span>")
|
||||
else if(iswelder(W))
|
||||
if(state == PLASTIC_FLAPS_DETACHED)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
playsound(loc, WT.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] slices apart [src].</span>", "<span class='notice'>You start to slice apart [src].</span>", "You hear welding.")
|
||||
if(do_after(user, 120*WT.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice apart [src].</span>")
|
||||
var/obj/item/stack/sheet/plastic/five/P = new(loc)
|
||||
P.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/stool/bed/B = A
|
||||
if(istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/closet/cardboard))
|
||||
var/obj/structure/closet/cardboard/C = A
|
||||
if(C.move_delay)
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
return 0
|
||||
|
||||
var/mob/living/M = A
|
||||
if(istype(M))
|
||||
if(M.lying)
|
||||
return ..()
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(A, mob_type))
|
||||
return ..()
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.is_small)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
|
||||
if(istype(caller, /mob/living))
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(caller, mob_type))
|
||||
return 1
|
||||
|
||||
var/mob/living/M = caller
|
||||
if(!M.ventcrawler && M.mob_size > MOB_SIZE_SMALL)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
new /obj/item/stack/sheet/plastic/five(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
/obj/structure/plasticflaps/mining/initialize()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
/obj/structure/plasticflaps/mining/Destroy()
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/mining/CanAtmosPass(turf/T)
|
||||
return 0
|
||||
@@ -184,6 +184,7 @@
|
||||
if(Proj.firer)
|
||||
message_admins("Plasma statue ignited by [key_name_admin(Proj.firer)](<A HREF='?_src_=holder;adminmoreinfo=\ref[Proj.firer]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Proj.firer]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [key_name(Proj.firer)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(Proj.firer)]","atmos")
|
||||
else
|
||||
message_admins("Plasma statue ignited by [Proj]. No known firer.(<A HREF='?_src_=holder;adminmoreinfo=\ref[Proj.firer]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Proj.firer]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [Proj] in ([x],[y],[z]). No known firer.")
|
||||
@@ -193,6 +194,7 @@
|
||||
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
|
||||
message_admins("Plasma statue ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
ignite(is_hot(W))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -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))
|
||||
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
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, 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
|
||||
|
||||
@@ -252,8 +252,8 @@
|
||||
|
||||
/obj/machinery/shower/New(turf/T, newdir = SOUTH, building = FALSE)
|
||||
..()
|
||||
dir = newdir
|
||||
if(building)
|
||||
dir = newdir
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
switch(newdir)
|
||||
@@ -349,6 +349,8 @@
|
||||
qdel(mymist)
|
||||
ismist = 0
|
||||
return
|
||||
if(mymist)
|
||||
return
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else
|
||||
|
||||
@@ -180,7 +180,8 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
|
||||
|
||||
/obj/structure/window/attackby(obj/item/I as obj, mob/living/user as mob, params)
|
||||
if(!istype(I)) return//I really wish I did not need this
|
||||
if(!istype(I))
|
||||
return//I really wish I did not need this
|
||||
if(istype(I, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = I
|
||||
if(istype(G.affecting,/mob/living))
|
||||
@@ -209,67 +210,97 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
M.apply_damage(30)
|
||||
hit(75)
|
||||
return
|
||||
if(I.flags & NOBLUDGEON)
|
||||
return
|
||||
|
||||
if(I.flags & NOBLUDGEON) return
|
||||
if(handle_decon(I, user, is_fulltile()))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>"))
|
||||
else if(reinf && state == 0)
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
hit(I.force)
|
||||
if(health <= 7)
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(user, src))
|
||||
else
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
..()
|
||||
|
||||
/obj/structure/window/proc/handle_decon(obj/item/weapon/W, mob/user, var/takes_time = FALSE)
|
||||
//screwdriver
|
||||
if(isscrewdriver(W))
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
if(reinf)
|
||||
if(state == 0)
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unfasten the frame from" : "fasten the frame to"] the floor.</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You have [anchored? "fastened the frame to" : "unfastened the frame from"] the floor.</span>")
|
||||
if(state >= 1)
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to [(state == 1) ? "fasten the window to" : "unfasten the window from"] the frame.</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
state = 3 - state
|
||||
to_chat(user, "<span class='notice'>You have [(state == 1) ? "unfastened the window from" : "fastened the window to"] the frame.</span>")
|
||||
else
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unfasten the frame from" : "fasten the frame to"] the floor.</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>"))
|
||||
else if(!reinf)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>"))
|
||||
else if(istype(I, /obj/item/weapon/crowbar) && reinf && state <= 1)
|
||||
to_chat(user, "<span class='notice'>You have [anchored ? "fastened the window to" : "unfastened the window from"] the floor.</span>")
|
||||
return 1
|
||||
//crowbar
|
||||
if(iscrowbar(W))
|
||||
if(!reinf || state > 1)
|
||||
return 0
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to pry the window [state ? "out of" : "in to"] the frame.</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
state = 1 - state
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>"))
|
||||
else if(istype(I, /obj/item/weapon/wrench) && !anchored && health > 7) //Disassemble deconstructed window into parts
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
for(var/i=0;i<sheets;i++)
|
||||
var/obj/item/stack/sheet/glass/NG = new glasstype(src.loc)
|
||||
for(var/obj/item/stack/sheet/glass/G in src.loc) //Stack em up
|
||||
if(G==NG)
|
||||
to_chat(user, "<span class='notice'>You have pried the window [state ? "into" : "out of"] the frame.</span>")
|
||||
return 1
|
||||
//wrench
|
||||
if(iswrench(W))
|
||||
if(anchored)
|
||||
return 0
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to disassemble [src]...</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
for(var/i=0; i<sheets; i++)
|
||||
var/obj/item/stack/sheet/NS = new glasstype(get_turf(src)) //glass types don't share a base tye of /glass, so this didn't work for plasma glass
|
||||
for(var/obj/item/stack/sheet/S in loc) //Stack em up
|
||||
if(S == NS)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
if(S.amount >= S.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user, params)
|
||||
S.attackby(NS, user)
|
||||
|
||||
if(reinf)
|
||||
var/obj/item/stack/rods/NR = new (src.loc)
|
||||
for(var/obj/item/stack/rods/R in src.loc)
|
||||
if(R==NR)
|
||||
var/obj/item/stack/rods/NR = new (get_turf(src))
|
||||
for(var/obj/item/stack/rods/R in loc)
|
||||
if(R == NR)
|
||||
continue
|
||||
if(R.amount>=R.max_amount)
|
||||
if(R.amount >= R.max_amount)
|
||||
continue
|
||||
R.attackby(NR, user, params)
|
||||
R.attackby(NR, user)
|
||||
|
||||
to_chat(user, "<span class='notice'>You have disassembled the window.</span>")
|
||||
to_chat(user, "<span class='notice'>You have disassembled [src].</span>")
|
||||
disassembled = 1
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
update_nearby_icons()
|
||||
qdel(src)
|
||||
else
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
hit(I.force)
|
||||
if(health <= 7)
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(user, src))
|
||||
else
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
..()
|
||||
return
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/window/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
|
||||
Reference in New Issue
Block a user