mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into newmalf-merge
This commit is contained in:
+30
-90
@@ -5,13 +5,11 @@
|
||||
icon = 'icons/effects/chemsmoke.dmi'
|
||||
opacity = 0
|
||||
time_to_live = 300
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass
|
||||
|
||||
/obj/effect/effect/smoke/chem/New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
create_reagents(500)
|
||||
return
|
||||
|
||||
/datum/effect/effect/system/smoke_spread/chem
|
||||
@@ -37,21 +35,16 @@
|
||||
/datum/effect/effect/system/smoke_spread/chem/New()
|
||||
..()
|
||||
chemholder = new/obj()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
chemholder.create_reagents(500)
|
||||
|
||||
//------------------------------------------
|
||||
//Sets up the chem smoke effect
|
||||
//
|
||||
// Calculates the max range smoke can travel, then gets all turfs in that view range.
|
||||
// Culls the selected turfs to a (roughly) circle shape, then calls smokeFlow() to make
|
||||
// sure the smoke can actually path to the turfs. This culls any turfs it can't reach.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct)
|
||||
range = n * 0.3
|
||||
cardinals = c
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
carry.trans_to_obj(chemholder, carry.total_volume, copy = 1)
|
||||
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
@@ -62,28 +55,19 @@
|
||||
|
||||
targetTurfs = new()
|
||||
|
||||
//build affected area list
|
||||
for(var/turf/T in view(range, location))
|
||||
//cull turfs to circle
|
||||
if(cheap_pythag(T.x - location.x, T.y - location.y) <= range)
|
||||
for(var/turf/T in view(range, location)) //build affected area list
|
||||
if(cheap_pythag(T.x - location.x, T.y - location.y) <= range) //cull turfs to circle
|
||||
targetTurfs += T
|
||||
|
||||
//make secondary list for reagents that affect walls
|
||||
if(chemholder.reagents.has_reagent("thermite") || chemholder.reagents.has_reagent("plantbgone"))
|
||||
wallList = new()
|
||||
wallList = new()
|
||||
|
||||
//pathing check
|
||||
smokeFlow(location, targetTurfs, wallList)
|
||||
smokeFlow() //pathing check
|
||||
|
||||
//set the density of the cloud - for diluting reagents
|
||||
density = max(1, targetTurfs.len / 4) //clamp the cloud density minimum to 1 so it cant multiply the reagents
|
||||
density = max(1, targetTurfs.len / 4) //clamp the cloud density minimum to 1 so it cant multiply the reagents
|
||||
|
||||
//Admin messaging
|
||||
var/contained = ""
|
||||
for(var/reagent in carry.reagent_list)
|
||||
contained += " [reagent] "
|
||||
if(contained)
|
||||
contained = "\[[contained]\]"
|
||||
var/contained = carry.get_reagents()
|
||||
var/area/A = get_area(location)
|
||||
|
||||
var/where = "[A.name] | [location.x], [location.y]"
|
||||
@@ -101,61 +85,27 @@
|
||||
message_admins("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.")
|
||||
|
||||
|
||||
//------------------------------------------
|
||||
//Runs the chem smoke effect
|
||||
//
|
||||
// Spawns damage over time loop for each reagent held in the cloud.
|
||||
// Applies reagents to walls that affect walls (only thermite and plant-b-gone at the moment).
|
||||
// Also calculates target locations to spawn the visual smoke effect on, so the whole area
|
||||
// is covered fairly evenly.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/start()
|
||||
|
||||
if(!location) //kill grenade if it somehow ends up in nullspace
|
||||
if(!location)
|
||||
return
|
||||
|
||||
//reagent application - only run if there are extra reagents in the smoke
|
||||
if(chemholder.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in chemholder.reagents.reagent_list)
|
||||
var/proba = 100
|
||||
var/runs = 5
|
||||
if(chemholder.reagents.reagent_list.len) //reagent application - only run if there are extra reagents in the smoke
|
||||
for(var/turf/T in wallList)
|
||||
chemholder.reagents.touch_turf(T)
|
||||
for(var/turf/T in targetTurfs)
|
||||
chemholder.reagents.touch_turf(T)
|
||||
for(var/atom/A in T.contents)
|
||||
if(istype(A, /obj/effect/effect/smoke/chem) || istype(A, /mob))
|
||||
continue
|
||||
else if(isobj(A) && !A.simulated)
|
||||
chemholder.reagents.touch_obj(A)
|
||||
|
||||
//dilute the reagents according to cloud density
|
||||
R.volume /= density
|
||||
chemholder.reagents.update_total()
|
||||
|
||||
//apply wall affecting reagents to walls
|
||||
if(R.id in list("thermite", "plantbgone"))
|
||||
for(var/turf/T in wallList)
|
||||
R.reaction_turf(T, R.volume)
|
||||
|
||||
//reagents that should be applied to turfs in a random pattern
|
||||
if(R.id == "carbon")
|
||||
proba = 75
|
||||
else if(R.id in list("blood", "radium", "uranium"))
|
||||
proba = 25
|
||||
|
||||
spawn(0)
|
||||
for(var/i = 0, i < runs, i++)
|
||||
for(var/turf/T in targetTurfs)
|
||||
if(prob(proba))
|
||||
R.reaction_turf(T, R.volume)
|
||||
for(var/atom/A in T.contents)
|
||||
if(istype(A, /obj/effect/effect/smoke/chem)) //skip the item if it is chem smoke
|
||||
continue
|
||||
else if(istype(A, /mob))
|
||||
var/dist = cheap_pythag(T.x - location.x, T.y - location.y)
|
||||
if(!dist)
|
||||
dist = 1
|
||||
R.reaction_mob(A, volume = R.volume / dist)
|
||||
else if(istype(A, /obj))
|
||||
R.reaction_obj(A, R.volume)
|
||||
sleep(30)
|
||||
|
||||
|
||||
//build smoke icon
|
||||
var/color = chemholder.reagents.get_color()
|
||||
var/color = chemholder.reagents.get_color() //build smoke icon
|
||||
var/icon/I
|
||||
if(color)
|
||||
I = icon('icons/effects/chemsmoke.dmi')
|
||||
@@ -163,13 +113,9 @@
|
||||
else
|
||||
I = icon('icons/effects/96x96.dmi', "smoke")
|
||||
|
||||
var/const/arcLength = 2.3559 //distance between each smoke cloud
|
||||
|
||||
//distance between each smoke cloud
|
||||
var/const/arcLength = 2.3559
|
||||
|
||||
|
||||
//calculate positions for smoke coverage - then spawn smoke
|
||||
for(var/i = 0, i < range, i++)
|
||||
for(var/i = 0, i < range, i++) //calculate positions for smoke coverage - then spawn smoke
|
||||
var/radius = i * 1.5
|
||||
if(!radius)
|
||||
spawn(0)
|
||||
@@ -207,12 +153,12 @@
|
||||
smoke = PoolOrNew(/obj/effect/effect/smoke/chem, location)
|
||||
|
||||
if(chemholder.reagents.reagent_list.len)
|
||||
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
|
||||
chemholder.reagents.trans_to_obj(smoke, chemholder.reagents.total_volume / dist, copy = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
|
||||
smoke.icon = I
|
||||
smoke.layer = 6
|
||||
smoke.set_dir(pick(cardinal))
|
||||
smoke.pixel_x = -32 + rand(-8,8)
|
||||
smoke.pixel_y = -32 + rand(-8,8)
|
||||
smoke.pixel_x = -32 + rand(-8, 8)
|
||||
smoke.pixel_y = -32 + rand(-8, 8)
|
||||
walk_to(smoke, T)
|
||||
smoke.opacity = 1 //switching opacity on after the smoke has spawned, and then
|
||||
sleep(150+rand(0,20)) // turning it off before it is deleted results in cleaner
|
||||
@@ -225,10 +171,7 @@
|
||||
spores.name = "cloud of [seed.seed_name] [seed.seed_noun]"
|
||||
..(T, I, dist, spores)
|
||||
|
||||
//------------------------------------------
|
||||
// Fades out the smoke smoothly using it's alpha variable.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16)
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable.
|
||||
if(A.alpha == 0) //Handle already transparent case
|
||||
return
|
||||
if(frames == 0)
|
||||
@@ -239,11 +182,8 @@
|
||||
sleep(world.tick_lag)
|
||||
return
|
||||
|
||||
//------------------------------------------
|
||||
// Smoke pathfinder. Uses a flood fill method based on zones to
|
||||
// quickly check what turfs the smoke (airflow) can actually reach.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow()
|
||||
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow() // Smoke pathfinder. Uses a flood fill method based on zones to quickly check what turfs the smoke (airflow) can actually reach.
|
||||
|
||||
var/list/pending = new()
|
||||
var/list/complete = new()
|
||||
@@ -0,0 +1,184 @@
|
||||
// Foam
|
||||
// Similar to smoke, but spreads out more
|
||||
// metal foams leave behind a foamed metal wall
|
||||
|
||||
/obj/effect/effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = OBJ_LAYER + 0.9
|
||||
mouse_opacity = 0
|
||||
animate_movement = 0
|
||||
var/amount = 3
|
||||
var/expand = 1
|
||||
var/metal = 0
|
||||
|
||||
/obj/effect/effect/foam/New(var/loc, var/ismetal = 0)
|
||||
..(loc)
|
||||
icon_state = "[ismetal? "m" : ""]foam"
|
||||
metal = ismetal
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
spawn(3 + metal * 3)
|
||||
process()
|
||||
checkReagents()
|
||||
spawn(120)
|
||||
processing_objects.Remove(src)
|
||||
sleep(30)
|
||||
if(metal)
|
||||
var/obj/structure/foamedmetal/M = new(src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
flick("[icon_state]-disolve", src)
|
||||
sleep(5)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/effect/foam/proc/checkReagents() // transfer any reagents to the floor
|
||||
if(!metal && reagents)
|
||||
var/turf/T = get_turf(src)
|
||||
reagents.touch_turf(T)
|
||||
|
||||
/obj/effect/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/effect/foam/F = locate() in T
|
||||
if(F)
|
||||
continue
|
||||
|
||||
F = new(T, metal)
|
||||
F.amount = amount
|
||||
if(!metal)
|
||||
F.create_reagents(10)
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
|
||||
|
||||
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams
|
||||
if(!metal && prob(max(0, exposed_temperature - 475)))
|
||||
flick("[icon_state]-disolve", src)
|
||||
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
|
||||
if(metal)
|
||||
return
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the foam", 6)
|
||||
|
||||
/datum/effect/effect/system/foam_spread
|
||||
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
|
||||
|
||||
/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
|
||||
amount = round(sqrt(amt / 3), 1)
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
carried_reagents = list()
|
||||
metal = metalfoam
|
||||
|
||||
// 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
|
||||
|
||||
/datum/effect/effect/system/foam_spread/start()
|
||||
spawn(0)
|
||||
var/obj/effect/effect/foam/F = locate() in location
|
||||
if(F)
|
||||
F.amount += amount
|
||||
return
|
||||
|
||||
F = PoolOrNew(/obj/effect/effect/foam, list(location, metal))
|
||||
F.amount = amount
|
||||
|
||||
if(!metal) // don't carry other chemicals if a metal foam
|
||||
F.create_reagents(10)
|
||||
|
||||
if(carried_reagents)
|
||||
for(var/id in carried_reagents)
|
||||
F.reagents.add_reagent(id, 1, safety = 1) //makes a safety call because all reagents should have already reacted anyway
|
||||
else
|
||||
F.reagents.add_reagent("water", 1, safety = 1)
|
||||
|
||||
// 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 = 1 // 1 = aluminum, 2 = iron
|
||||
|
||||
/obj/structure/foamedmetal/New()
|
||||
..()
|
||||
update_nearby_tiles(1)
|
||||
|
||||
/obj/structure/foamedmetal/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles(1)
|
||||
..()
|
||||
|
||||
/obj/structure/foamedmetal/proc/updateicon()
|
||||
if(metal == 1)
|
||||
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 == 1 || prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(var/mob/user)
|
||||
if ((HULK in user.mutations) || (prob(75 - metal * 25)))
|
||||
user.visible_message("<span class='warning'>[user] smashes through the foamed metal.</span>", "<span class='notice'>You smash through the metal foam wall.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='notice'>You hit the metal foam but bounce off it.</span>"
|
||||
return
|
||||
|
||||
/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
G.affecting.loc = src.loc
|
||||
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.</span>", "<span class='notice'>You smash through the foamed metal with \the [I].</span>")
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='notice'>You hit the metal foam to no effect.</span>"
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(air_group)
|
||||
return 0
|
||||
return !density
|
||||
@@ -0,0 +1,50 @@
|
||||
/obj/effect/effect/water
|
||||
name = "water"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "extinguish"
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/effect/water/New(loc)
|
||||
..()
|
||||
spawn(150) // In case whatever made it forgets to delete it
|
||||
if(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/effect/water/proc/set_color() // Call it after you move reagents to it
|
||||
icon += reagents.get_color()
|
||||
|
||||
/obj/effect/effect/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5)
|
||||
if(!target)
|
||||
return
|
||||
for(var/i = 1 to step_count)
|
||||
step_towards(src, target)
|
||||
var/turf/T = get_turf(src)
|
||||
reagents.touch_turf(T)
|
||||
var/mob/M = locate() in T
|
||||
if(M)
|
||||
reagents.splash_mob(M, reagents.total_volume)
|
||||
break
|
||||
for(var/atom/A in T)
|
||||
reagents.touch(A)
|
||||
if(T == get_turf(target))
|
||||
break
|
||||
sleep(delay)
|
||||
sleep(10)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/effect/water/Move(turf/newloc)
|
||||
if(newloc.density)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/effect/effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
reagents.touch(A)
|
||||
return ..()
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/effect/water/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
icon_state = ""
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
@@ -11,10 +11,4 @@
|
||||
/obj/effect/decal/spraystill
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 50
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/decal/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = 50
|
||||
@@ -13,35 +13,11 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
unacidable = 1//So effect are not targeted by alien acid.
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/effect/water
|
||||
name = "water"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "extinguish"
|
||||
var/life = 15.0
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/Destroy()
|
||||
/obj/effect/Destroy()
|
||||
if(reagents)
|
||||
reagents.delete()
|
||||
return ..()
|
||||
|
||||
/obj/effect/effect/water/Move(turf/newloc)
|
||||
//var/turf/T = src.loc
|
||||
//if (istype(T, /turf))
|
||||
// T.firelevel = 0 //TODO: FIX
|
||||
if (--src.life < 1)
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
if(newloc.density)
|
||||
return 0
|
||||
.=..()
|
||||
|
||||
/obj/effect/effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
reagents.reaction(A)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/datum/effect/effect/system
|
||||
var/number = 3
|
||||
var/cardinals = 0
|
||||
@@ -479,228 +455,7 @@ steam.start() -- spawns the effect
|
||||
proc/stop()
|
||||
src.processing = 0
|
||||
src.on = 0
|
||||
|
||||
|
||||
|
||||
// Foam
|
||||
// Similar to smoke, but spreads out more
|
||||
// metal foams leave behind a foamed metal wall
|
||||
|
||||
/obj/effect/effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = OBJ_LAYER + 0.9
|
||||
mouse_opacity = 0
|
||||
var/amount = 3
|
||||
var/expand = 1
|
||||
animate_movement = 0
|
||||
var/metal = 0
|
||||
|
||||
|
||||
/obj/effect/effect/foam/New(loc, var/ismetal=0)
|
||||
..(loc)
|
||||
icon_state = "[ismetal ? "m":""]foam"
|
||||
metal = ismetal
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
spawn(3 + metal*3)
|
||||
process()
|
||||
checkReagents()
|
||||
spawn(120)
|
||||
processing_objects.Remove(src)
|
||||
sleep(30)
|
||||
|
||||
if(metal)
|
||||
var/obj/structure/foamedmetal/M = PoolOrNew(/obj/structure/foamedmetal, src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
|
||||
flick("[icon_state]-disolve", src)
|
||||
sleep(5)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// transfer any reagents to the floor
|
||||
/obj/effect/effect/foam/proc/checkReagents()
|
||||
if(!metal && reagents)
|
||||
for(var/atom/A in src.loc.contents)
|
||||
if(A == src)
|
||||
continue
|
||||
reagents.reaction(A, 1, 1)
|
||||
|
||||
/obj/effect/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/effect/foam/F = locate() in T
|
||||
if(F)
|
||||
continue
|
||||
|
||||
F = PoolOrNew(/obj/effect/effect/foam, list(T, metal))
|
||||
F.amount = amount
|
||||
if(!metal)
|
||||
F.create_reagents(10)
|
||||
if (reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
|
||||
|
||||
// foam disolves when heated
|
||||
// except metal foams
|
||||
/obj/effect/effect/foam/fire_act(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/effect/foam/Crossed(var/atom/movable/AM)
|
||||
if(metal)
|
||||
return
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the foam",6)
|
||||
|
||||
/datum/effect/effect/system/foam_spread
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
|
||||
amount = round(sqrt(amt / 3), 1)
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
carried_reagents = list()
|
||||
metal = metalfoam
|
||||
|
||||
|
||||
// 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
|
||||
|
||||
start()
|
||||
spawn(0)
|
||||
var/obj/effect/effect/foam/F = locate() in location
|
||||
if(F)
|
||||
F.amount += amount
|
||||
return
|
||||
|
||||
F = PoolOrNew(/obj/effect/effect/foam, list(src.location, metal))
|
||||
F.amount = amount
|
||||
|
||||
if(!metal) // don't carry other chemicals if a metal foam
|
||||
F.create_reagents(10)
|
||||
|
||||
if(carried_reagents)
|
||||
for(var/id in carried_reagents)
|
||||
F.reagents.add_reagent(id, 1, null, 1) //makes a safety call because all reagents should have already reacted anyway
|
||||
else
|
||||
F.reagents.add_reagent("water", 1, safety = 1)
|
||||
|
||||
// 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 = 1 // 1=aluminum, 2=iron
|
||||
|
||||
New()
|
||||
..()
|
||||
update_nearby_tiles(1)
|
||||
|
||||
|
||||
|
||||
Destroy()
|
||||
|
||||
density = 0
|
||||
update_nearby_tiles(1)
|
||||
..()
|
||||
|
||||
proc/updateicon()
|
||||
if(metal == 1)
|
||||
icon_state = "metalfoam"
|
||||
else
|
||||
icon_state = "ironfoam"
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
|
||||
blob_act()
|
||||
qdel(src)
|
||||
|
||||
bullet_act()
|
||||
if(metal==1 || prob(50))
|
||||
qdel(src)
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
if ((HULK in user.mutations) || (prob(75 - metal*25)))
|
||||
user << "\blue You smash through the metal foam wall."
|
||||
for(var/mob/O in oviewers(user))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes through the foamed metal."
|
||||
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You hit the metal foam but bounce off it."
|
||||
return
|
||||
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
|
||||
if (istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
G.affecting.loc = src.loc
|
||||
for(var/mob/O in viewers(src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall."
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(prob(I.force*20 - metal*25))
|
||||
user << "\blue You smash through the foamed metal with \the [I]."
|
||||
for(var/mob/O in oviewers(user))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes through the foamed metal."
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You hit the metal foam to no effect."
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
|
||||
|
||||
/datum/effect/effect/system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
|
||||
@@ -269,7 +269,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
if(!M) return 0
|
||||
|
||||
if(!ishuman(M)) return 0
|
||||
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/mob_equip = list()
|
||||
if(H.species.hud && H.species.hud.equip_slots)
|
||||
@@ -277,22 +277,22 @@ var/list/global/slot_flags_enumeration = list(
|
||||
|
||||
if(H.species && !(slot in mob_equip))
|
||||
return 0
|
||||
|
||||
|
||||
//First check if the item can be equipped to the desired slot.
|
||||
if("[slot]" in slot_flags_enumeration)
|
||||
var/req_flags = slot_flags_enumeration["[slot]"]
|
||||
if(!(req_flags & slot_flags))
|
||||
return 0
|
||||
|
||||
|
||||
//Next check that the slot is free
|
||||
if(H.get_equipped_item(slot))
|
||||
return 0
|
||||
|
||||
|
||||
//Next check if the slot is accessible.
|
||||
var/mob/_user = disable_warning? null : H
|
||||
if(!H.slot_is_accessible(slot, src, _user))
|
||||
return 0
|
||||
|
||||
|
||||
//Lastly, check special rules for the desired slot.
|
||||
switch(slot)
|
||||
if(slot_l_ear, slot_r_ear)
|
||||
@@ -355,7 +355,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
/obj/item/proc/mob_can_unequip(mob/M, slot, disable_warning = 0)
|
||||
if(!slot) return 0
|
||||
if(!M) return 0
|
||||
|
||||
|
||||
if(!canremove)
|
||||
return 0
|
||||
if(!M.slot_is_accessible(slot, src, disable_warning? null : M))
|
||||
@@ -601,3 +601,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
usr.visible_message("[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].")
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/item/proc/pwr_drain()
|
||||
return 0 // Process Kill
|
||||
@@ -10,7 +10,7 @@
|
||||
/obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
|
||||
new /obj/item/stack/material/steel( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
|
||||
/obj/item/apc_frame/proc/try_build(turf/on_wall)
|
||||
|
||||
@@ -1,25 +1,54 @@
|
||||
/obj/item/ashtray
|
||||
icon = 'icons/ashtray.dmi'
|
||||
var/
|
||||
max_butts = 0
|
||||
empty_desc = ""
|
||||
icon_empty = ""
|
||||
icon_half = ""
|
||||
icon_full = ""
|
||||
icon_broken = ""
|
||||
var/global/list/ashtray_cache = list()
|
||||
|
||||
/obj/item/ashtray/New()
|
||||
..()
|
||||
/obj/item/weapon/material/ashtray
|
||||
name = "ashtray"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "blank"
|
||||
force_divisor = 0.1
|
||||
thrown_force_divisor = 0.1
|
||||
var/image/base_image
|
||||
var/max_butts = 10
|
||||
|
||||
/obj/item/weapon/material/ashtray/New(var/newloc, var/material_name)
|
||||
..(newloc, material_name)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
max_butts = round(material.hardness/10) //This is arbitrary but whatever.
|
||||
src.pixel_y = rand(-5, 5)
|
||||
src.pixel_x = rand(-6, 6)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (health < 1)
|
||||
/obj/item/weapon/material/ashtray/update_icon()
|
||||
color = null
|
||||
overlays.Cut()
|
||||
var/cache_key = "base-[material.name]"
|
||||
if(!ashtray_cache[cache_key])
|
||||
var/image/I = image('icons/obj/objects.dmi',"ashtray")
|
||||
I.color = material.icon_colour
|
||||
ashtray_cache[cache_key] = I
|
||||
overlays |= ashtray_cache[cache_key]
|
||||
|
||||
if (contents.len == max_butts)
|
||||
if(!ashtray_cache["full"])
|
||||
ashtray_cache["full"] = image('icons/obj/objects.dmi',"ashtray_full")
|
||||
overlays |= ashtray_cache["full"]
|
||||
desc = "It's stuffed full."
|
||||
else if (contents.len > max_butts/2)
|
||||
if(!ashtray_cache["half"])
|
||||
ashtray_cache["half"] = image('icons/obj/objects.dmi',"ashtray_half")
|
||||
overlays |= ashtray_cache["half"]
|
||||
desc = "It's half-filled."
|
||||
else
|
||||
desc = "An ashtray made of [material.display_name]."
|
||||
|
||||
/obj/item/weapon/material/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (health <= 0)
|
||||
return
|
||||
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/smokable/cigarette) || istype(W, /obj/item/weapon/flame/match))
|
||||
if (contents.len >= max_butts)
|
||||
user << "This ashtray is full."
|
||||
user << "\The [src] is full."
|
||||
return
|
||||
user.remove_from_mob(W)
|
||||
W.loc = src
|
||||
@@ -27,12 +56,14 @@
|
||||
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cig = W
|
||||
if (cig.lit == 1)
|
||||
src.visible_message("[user] crushes [cig] in [src], putting it out.")
|
||||
src.visible_message("[user] crushes [cig] in \the [src], putting it out.")
|
||||
processing_objects.Remove(cig)
|
||||
var/obj/item/butt = new cig.type_butt(src)
|
||||
cig.transfer_fingerprints_to(butt)
|
||||
qdel(cig)
|
||||
W = butt
|
||||
spawn(1)
|
||||
TemperatureAct(150)
|
||||
else if (cig.lit == 0)
|
||||
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
|
||||
|
||||
@@ -40,12 +71,7 @@
|
||||
user.update_inv_l_hand()
|
||||
user.update_inv_r_hand()
|
||||
add_fingerprint(user)
|
||||
if (contents.len == max_butts)
|
||||
icon_state = icon_full
|
||||
desc = empty_desc + " It's stuffed full."
|
||||
else if (contents.len > max_butts/2)
|
||||
icon_state = icon_half
|
||||
desc = empty_desc + " It's half-filled."
|
||||
update_icon()
|
||||
else
|
||||
health = max(0,health - W.force)
|
||||
user << "You hit [src] with [W]."
|
||||
@@ -53,83 +79,29 @@
|
||||
die()
|
||||
return
|
||||
|
||||
/obj/item/ashtray/throw_impact(atom/hit_atom)
|
||||
/obj/item/weapon/material/ashtray/throw_impact(atom/hit_atom)
|
||||
if (health > 0)
|
||||
health = max(0,health - 3)
|
||||
if (health < 1)
|
||||
die()
|
||||
return
|
||||
if (contents.len)
|
||||
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
|
||||
src.visible_message("<span class='danger'>\The [src] slams into [hit_atom], spilling its contents!</span>")
|
||||
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
|
||||
O.loc = src.loc
|
||||
icon_state = icon_empty
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/ashtray/proc/die()
|
||||
src.visible_message("\red [src] shatters spilling its contents!")
|
||||
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
|
||||
O.loc = src.loc
|
||||
icon_state = icon_broken
|
||||
/obj/item/weapon/material/ashtray/proc/die()
|
||||
material.place_shard(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/ashtray/plastic
|
||||
name = "plastic ashtray"
|
||||
desc = "Cheap plastic ashtray."
|
||||
icon_state = "ashtray_bl"
|
||||
icon_empty = "ashtray_bl"
|
||||
icon_half = "ashtray_half_bl"
|
||||
icon_full = "ashtray_full_bl"
|
||||
icon_broken = "ashtray_bork_bl"
|
||||
max_butts = 14
|
||||
health = 24.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 30)
|
||||
empty_desc = "Cheap plastic ashtray."
|
||||
throwforce = 3.0
|
||||
die()
|
||||
..()
|
||||
name = "pieces of plastic"
|
||||
desc = "Pieces of plastic with ash on them."
|
||||
return
|
||||
/obj/item/weapon/material/ashtray/plastic/New(var/newloc)
|
||||
..(newloc, "plastic")
|
||||
|
||||
/obj/item/weapon/material/ashtray/bronze/New(var/newloc)
|
||||
..(newloc, "gold") //placeholder
|
||||
|
||||
/obj/item/ashtray/bronze
|
||||
name = "bronze ashtray"
|
||||
desc = "Massive bronze ashtray."
|
||||
icon_state = "ashtray_br"
|
||||
icon_empty = "ashtray_br"
|
||||
icon_half = "ashtray_half_br"
|
||||
icon_full = "ashtray_full_br"
|
||||
icon_broken = "ashtray_bork_br"
|
||||
max_butts = 10
|
||||
health = 72.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 80)
|
||||
empty_desc = "Massive bronze ashtray."
|
||||
throwforce = 10.0
|
||||
|
||||
die()
|
||||
..()
|
||||
name = "pieces of bronze"
|
||||
desc = "Pieces of bronze with ash on them."
|
||||
return
|
||||
|
||||
|
||||
/obj/item/ashtray/glass
|
||||
name = "glass ashtray"
|
||||
desc = "Glass ashtray. Looks fragile."
|
||||
icon_state = "ashtray_gl"
|
||||
icon_empty = "ashtray_gl"
|
||||
icon_half = "ashtray_half_gl"
|
||||
icon_full = "ashtray_full_gl"
|
||||
icon_broken = "ashtray_bork_gl"
|
||||
max_butts = 12
|
||||
health = 12.0
|
||||
matter = list("glass" = 60)
|
||||
empty_desc = "Glass ashtray. Looks fragile."
|
||||
throwforce = 6.0
|
||||
|
||||
die()
|
||||
..()
|
||||
name = "shards of glass"
|
||||
desc = "Shards of glass with ash on them."
|
||||
playsound(src, "shatter", 30, 1)
|
||||
return
|
||||
/obj/item/weapon/material/ashtray/glass/New(var/newloc)
|
||||
..(newloc, "glass")
|
||||
|
||||
@@ -523,10 +523,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
data["feed"] = feed
|
||||
|
||||
data["manifest"] = list("__json_cache" = ManifestJSON)
|
||||
|
||||
nanoUI = data
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
if(ui)
|
||||
ui.load_cached_data(ManifestJSON)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
@@ -536,8 +536,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400, state = inventory_state)
|
||||
// when the ui is first opened this is the data it will use
|
||||
|
||||
ui.load_cached_data(ManifestJSON)
|
||||
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
mode_nice = design
|
||||
mode = "[replacetext(design, "-", "")]full"
|
||||
if("corner")
|
||||
var/design = input("Which design?", "Floor painter") in list("black", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-grey", "white-red", "white-blue", "white-green", "white-yellow", "white-purple")
|
||||
var/design = input("Which design?", "Floor painter") in list("black", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-red", "white-blue", "white-green", "white-yellow", "white-purple")
|
||||
mode_nice = "[design] corner"
|
||||
mode = "[replacetext(design, "-", "")]corner"
|
||||
tile_dir_mode = 2
|
||||
@@ -128,11 +128,13 @@
|
||||
if(design == "white")
|
||||
mode = "whitehall"
|
||||
mode_nice = "white side"
|
||||
tile_dir_mode = 1
|
||||
else if(design == "black") // because SOMEONE made the black/grey side/corner sprite have the same name as the 'empty space' sprite :(
|
||||
mode = "blackfloor"
|
||||
mode_nice = design
|
||||
else
|
||||
mode_nice = design
|
||||
mode = replacetext(design, "-", "")
|
||||
tile_dir_mode = 1
|
||||
tile_dir_mode = 1
|
||||
if("special")
|
||||
var/design = input("Which design?", "Floor painter") in list("arrival", "escape", "caution", "warning", "white-warning", "white-blue-green", "loadingarea", "delivery", "bot", "white-delivery", "white-bot")
|
||||
if(design == "white-blue-green")
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
Emag()
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(istype(W, /obj/item/stack/material/glass))
|
||||
var/obj/item/stack/material/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
user << "<span class='warning'>[src.name] is full."
|
||||
return
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
/obj/item/device/powersink/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
processing_power_items.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
|
||||
@@ -49,6 +50,7 @@
|
||||
else
|
||||
if (mode == 2)
|
||||
processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
|
||||
processing_power_items.Remove(src)
|
||||
anchored = 0
|
||||
mode = 0
|
||||
src.visible_message("<span class='notice'>[user] detaches [src] from the cable!</span>")
|
||||
@@ -71,25 +73,27 @@
|
||||
mode = 2
|
||||
icon_state = "powersink1"
|
||||
processing_objects.Add(src)
|
||||
processing_power_items.Add(src)
|
||||
if(2) //This switch option wasn't originally included. It exists now. --NeoFite
|
||||
src.visible_message("<span class='notice'>[user] deactivates [src]!</span>")
|
||||
mode = 1
|
||||
set_light(0)
|
||||
icon_state = "powersink0"
|
||||
processing_objects.Remove(src)
|
||||
processing_power_items.Remove(src)
|
||||
|
||||
/obj/item/device/powersink/proc/drain()
|
||||
/obj/item/device/powersink/pwr_drain()
|
||||
if(!attached)
|
||||
return
|
||||
return 0
|
||||
|
||||
if(drained_this_tick)
|
||||
return
|
||||
return 1
|
||||
drained_this_tick = 1
|
||||
|
||||
var/drained = 0
|
||||
|
||||
if(!PN)
|
||||
return
|
||||
return 1
|
||||
|
||||
set_light(12)
|
||||
PN.trigger_warning()
|
||||
@@ -110,6 +114,7 @@
|
||||
A.cell.use(drain_val * CELLRATE)
|
||||
drained += drain_val
|
||||
power_drained += drained
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/powersink/process()
|
||||
|
||||
@@ -212,6 +212,13 @@
|
||||
freerange = 1
|
||||
ks2type = /obj/item/device/encryptionkey/ert
|
||||
|
||||
/obj/item/device/radio/headset/ia
|
||||
name = "internal affair's headset"
|
||||
desc = "The headset of your worst enemy."
|
||||
icon_state = "com_headset"
|
||||
item_state = "headset"
|
||||
ks2type = /obj/item/device/encryptionkey/heads/hos
|
||||
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -211,6 +211,9 @@
|
||||
|
||||
M.last_target_radio = world.time // For the projectile targeting system
|
||||
|
||||
if(!radio_connection)
|
||||
set_frequency(frequency)
|
||||
|
||||
/* Quick introduction:
|
||||
This new radio system uses a very robust FTL signaling technology unoriginally
|
||||
dubbed "subspace" which is somewhat similar to 'blue-space' but can't
|
||||
|
||||
@@ -192,10 +192,12 @@ REAGENT SCANNER
|
||||
|
||||
for(var/name in H.organs_by_name)
|
||||
var/obj/item/organ/external/e = H.organs_by_name[name]
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
if(e && e.status & ORGAN_BROKEN)
|
||||
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
|
||||
break
|
||||
for(var/obj/item/organ/external/e in H.organs)
|
||||
if(!e)
|
||||
continue
|
||||
for(var/datum/wound/W in e.wounds) if(W.internal)
|
||||
user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1)
|
||||
break
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
/obj/item/device/kit
|
||||
icon_state = "modkit"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
var/new_name = "mech" //What is the variant called?
|
||||
var/new_desc = "A mech." //How is the new mech described?
|
||||
var/new_icon = "ripley" //What base icon will the new mech use?
|
||||
var/new_icon_file
|
||||
var/uses = 1 // Uses before the kit deletes itself.
|
||||
|
||||
/obj/item/device/kit/examine()
|
||||
..()
|
||||
usr << "It has [uses] [uses>1?"uses":"use"] left."
|
||||
|
||||
/obj/item/device/kit/proc/use(var/amt, var/mob/user)
|
||||
uses -= amt
|
||||
playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(uses<1)
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
|
||||
// Root hardsuit kit defines.
|
||||
// Icons for modified hardsuits need to be in the proper .dmis because suit cyclers may cock them up.
|
||||
/obj/item/device/kit/suit
|
||||
name = "voidsuit modification kit"
|
||||
desc = "A kit for modifying a voidsuit."
|
||||
uses = 2
|
||||
var/new_light_overlay
|
||||
var/new_mob_icon_file
|
||||
|
||||
/obj/item/clothing/head/helmet/space/void/attackby(var/obj/item/O, var/mob/user)
|
||||
if(istype(O,/obj/item/device/kit/suit))
|
||||
var/obj/item/device/kit/suit/kit = O
|
||||
name = "[kit.new_name] suit helmet"
|
||||
desc = kit.new_desc
|
||||
icon_state = "[kit.new_icon]_helmet"
|
||||
item_state = "[kit.new_icon]_helmet"
|
||||
if(kit.new_icon_file)
|
||||
icon = kit.new_icon_file
|
||||
if(kit.new_mob_icon_file)
|
||||
icon_override = kit.new_mob_icon_file
|
||||
if(kit.new_light_overlay)
|
||||
light_overlay = kit.new_light_overlay
|
||||
user << "You set about modifying the helmet into [src]."
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H))
|
||||
species_restricted = list(H.species.name)
|
||||
kit.use(1,user)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/void/attackby(var/obj/item/O, var/mob/user)
|
||||
if(istype(O,/obj/item/device/kit/suit))
|
||||
var/obj/item/device/kit/suit/kit = O
|
||||
name = "[kit.new_name] voidsuit"
|
||||
desc = kit.new_desc
|
||||
icon_state = "[kit.new_icon]_suit"
|
||||
item_state = "[kit.new_icon]_suit"
|
||||
if(kit.new_icon_file)
|
||||
icon = kit.new_icon_file
|
||||
if(kit.new_mob_icon_file)
|
||||
icon_override = kit.new_mob_icon_file
|
||||
user << "You set about modifying the suit into [src]."
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H))
|
||||
species_restricted = list(H.species.name)
|
||||
kit.use(1,user)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/item/device/kit/paint
|
||||
name = "mecha customisation kit"
|
||||
desc = "A kit containing all the needed tools and parts to repaint a mech."
|
||||
var/removable = null
|
||||
var/list/allowed_types = list()
|
||||
|
||||
/obj/item/device/kit/paint/examine()
|
||||
..()
|
||||
usr << "This kit will convert an exosuit into: [new_name]."
|
||||
usr << "This kit can be used on the following exosuit models:"
|
||||
for(var/exotype in allowed_types)
|
||||
usr << "- [capitalize(exotype)]"
|
||||
|
||||
/obj/mecha/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(istype(W, /obj/item/device/kit/paint))
|
||||
if(occupant)
|
||||
user << "You can't customize a mech while someone is piloting it - that would be unsafe!"
|
||||
return
|
||||
|
||||
var/obj/item/device/kit/paint/P = W
|
||||
var/found = null
|
||||
|
||||
for(var/type in P.allowed_types)
|
||||
if(type==src.initial_icon)
|
||||
found = 1
|
||||
break
|
||||
|
||||
if(!found)
|
||||
user << "That kit isn't meant for use on this class of exosuit."
|
||||
return
|
||||
|
||||
user.visible_message("[user] opens [P] and spends some quality time customising [src].")
|
||||
src.name = P.new_name
|
||||
src.desc = P.new_desc
|
||||
src.initial_icon = P.new_icon
|
||||
if(P.new_icon_file)
|
||||
src.icon = P.new_icon_file
|
||||
src.reset_icon()
|
||||
P.use(1, user)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
//Ripley APLU kits.
|
||||
/obj/item/device/kit/paint/ripley
|
||||
name = "\"Classic\" APLU customisation kit"
|
||||
new_name = "APLU \"Classic\""
|
||||
new_desc = "A very retro APLU unit; didn't they retire these back in 2543?"
|
||||
new_icon = "ripley-old"
|
||||
allowed_types = list("ripley")
|
||||
|
||||
/obj/item/device/kit/paint/ripley/death
|
||||
name = "\"Reaper\" APLU customisation kit"
|
||||
new_name = "APLU \"Reaper\""
|
||||
new_desc = "A terrifying, grim power loader. Why do those clamps have spikes?"
|
||||
new_icon = "deathripley"
|
||||
allowed_types = list("ripley","firefighter")
|
||||
|
||||
/obj/item/device/kit/paint/ripley/flames_red
|
||||
name = "\"Firestarter\" APLU customisation kit"
|
||||
new_name = "APLU \"Firestarter\""
|
||||
new_desc = "A standard APLU exosuit with stylish orange flame decals."
|
||||
new_icon = "ripley_flames_red"
|
||||
|
||||
/obj/item/device/kit/paint/ripley/flames_blue
|
||||
name = "\"Burning Chrome\" APLU customisation kit"
|
||||
new_name = "APLU \"Burning Chrome\""
|
||||
new_desc = "A standard APLU exosuit with stylish blue flame decals."
|
||||
new_icon = "ripley_flames_blue"
|
||||
|
||||
// Durand kits.
|
||||
/obj/item/device/kit/paint/durand
|
||||
name = "\"Classic\" Durand customisation kit"
|
||||
new_name = "Durand \"Classic\""
|
||||
new_desc = "An older model of Durand combat exosuit. This model was retired for rotating a pilot's torso 180 degrees."
|
||||
new_icon = "old_durand"
|
||||
allowed_types = list("durand")
|
||||
|
||||
/obj/item/device/kit/paint/durand/seraph
|
||||
name = "\"Cherubim\" Durand customisation kit"
|
||||
new_name = "Durand \"Cherubim\""
|
||||
new_desc = "A Durand combat exosuit modelled after ancient Earth entertainment. Your heart goes doki-doki just looking at it."
|
||||
new_icon = "old_durand"
|
||||
|
||||
/obj/item/device/kit/paint/durand/phazon
|
||||
name = "\"Sypher\" Durand customisation kit"
|
||||
new_name = "Durand \"Sypher\""
|
||||
new_desc = "A Durand combat exosuit with some very stylish neons and decals. Seems to blur slightly at the edges; probably an optical illusion."
|
||||
new_icon = "phazon"
|
||||
|
||||
// Gygax kits.
|
||||
/obj/item/device/kit/paint/gygax
|
||||
name = "\"Jester\" Gygax customisation kit"
|
||||
new_name = "Gygax \"Jester\""
|
||||
new_desc = "A Gygax exosuit modelled after the infamous combat-troubadors of Earth's distant past. Terrifying to behold."
|
||||
new_icon = "honker"
|
||||
allowed_types = list("gygax")
|
||||
|
||||
/obj/item/device/kit/paint/gygax/darkgygax
|
||||
name = "\"Silhouette\" Gygax customisation kit"
|
||||
new_name = "Gygax \"Silhouette\""
|
||||
new_desc = "An ominous Gygax exosuit modelled after the fictional corporate 'death squads' that were popular in pulp action-thrillers back in 2554."
|
||||
new_icon = "darkgygax"
|
||||
|
||||
/obj/item/device/kit/paint/gygax/recitence
|
||||
name = "\"Gaoler\" Gygax customisation kit"
|
||||
new_name = "Durand \"Gaoler\""
|
||||
new_desc = "A bulky silver Gygax exosuit. The extra armour appears to be painted on, but it's very shiny."
|
||||
new_icon = "recitence"
|
||||
@@ -125,8 +125,8 @@
|
||||
|
||||
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
|
||||
var/obj/item/stack/sheet/metal/M = W
|
||||
if(istype(W, /obj/item/stack/material/steel) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
|
||||
var/obj/item/stack/material/steel/M = W
|
||||
if (M.use(1))
|
||||
var/obj/item/weapon/secbot_assembly/ed209_assembly/B = new /obj/item/weapon/secbot_assembly/ed209_assembly
|
||||
B.loc = get_turf(src)
|
||||
|
||||
@@ -217,27 +217,27 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
if(!((affecting.name == "l_arm") || (affecting.name == "r_arm") || (affecting.name == "l_leg") || (affecting.name == "r_leg")))
|
||||
user << "\red You can't apply a splint there!"
|
||||
if(!(affecting.limb_name in list("l_arm","r_arm","l_leg","r_leg")))
|
||||
user << "<span class='danger'>You can't apply a splint there!</span>"
|
||||
return
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
user << "\red [M]'s [limb] is already splinted!"
|
||||
user << "<span class='danger'>[M]'s [limb] is already splinted!</span>"
|
||||
return
|
||||
if (M != user)
|
||||
user.visible_message("\red [user] starts to apply \the [src] to [M]'s [limb].", "\red You start to apply \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You start to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
else
|
||||
if((!user.hand && affecting.name == "r_arm") || (user.hand && affecting.name == "l_arm"))
|
||||
user << "\red You can't apply a splint to the arm you're using!"
|
||||
if((!user.hand && affecting.limb_name == "r_arm") || (user.hand && affecting.limb_name == "l_arm"))
|
||||
user << "<span class='danger'>You can't apply a splint to the arm you're using!</span>"
|
||||
return
|
||||
user.visible_message("\red [user] starts to apply \the [src] to their [limb].", "\red You start to apply \the [src] to your [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to their [limb].</span>", "<span class='danger'>You start to apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
if(do_after(user, 50))
|
||||
if (M != user)
|
||||
user.visible_message("\red [user] finishes applying \the [src] to [M]'s [limb].", "\red You finish applying \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] finishes applying \the [src] to [M]'s [limb].</span>", "<span class='danger'>You finish applying \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
else
|
||||
if(prob(25))
|
||||
user.visible_message("\red [user] successfully applies \the [src] to their [limb].", "\red You successfully apply \the [src] to your [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] successfully applies \the [src] to their [limb].</span>", "<span class='danger'>You successfully apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
else
|
||||
user.visible_message("\red [user] fumbles \the [src].", "\red You fumble \the [src].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] fumbles \the [src].</span>", "<span class='danger'>You fumble \the [src].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
return
|
||||
affecting.status |= ORGAN_SPLINTED
|
||||
use(1)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
|
||||
var/obj/item/stack/material/steel/new_item = new(usr.loc)
|
||||
new_item.add_to_stacks(usr)
|
||||
for (var/mob/M in viewers(src))
|
||||
M.show_message("\red [src] is shaped into metal by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2)
|
||||
|
||||
@@ -10,31 +10,19 @@
|
||||
/*
|
||||
* Glass sheets
|
||||
*/
|
||||
/obj/item/stack/sheet/glass
|
||||
/obj/item/stack/material/glass
|
||||
name = "glass"
|
||||
desc = "HOLY SHEET! That is a lot of glass."
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
matter = list("glass" = 3750)
|
||||
origin_tech = "materials=1"
|
||||
var/created_window = /obj/structure/window/basic
|
||||
var/is_reinforced = 0
|
||||
var/list/construction_options = list("One Direction", "Full Window")
|
||||
default_type = "glass"
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
name = "glass synthesizer"
|
||||
desc = "A device that makes glass."
|
||||
gender = NEUTER
|
||||
singular_name = "glass"
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_costs = list(1000)
|
||||
stacktype = /obj/item/stack/sheet/glass
|
||||
|
||||
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
|
||||
/obj/item/stack/material/glass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
|
||||
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
|
||||
/obj/item/stack/material/glass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if(!is_reinforced)
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
@@ -53,10 +41,10 @@
|
||||
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
|
||||
return
|
||||
|
||||
var/obj/item/stack/sheet/glass/reinforced/RG = new (user.loc)
|
||||
var/obj/item/stack/material/glass/reinforced/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
var/obj/item/stack/material/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
V.use(1)
|
||||
@@ -64,7 +52,7 @@
|
||||
if (!G && replace)
|
||||
user.put_in_hands(RG)
|
||||
|
||||
/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob)
|
||||
/obj/item/stack/material/glass/proc/construct_window(mob/user as mob)
|
||||
if(!user || !src) return 0
|
||||
if(!istype(user.loc,/turf)) return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
@@ -138,52 +126,34 @@
|
||||
/*
|
||||
* Reinforced glass sheets
|
||||
*/
|
||||
/obj/item/stack/sheet/glass/reinforced
|
||||
/obj/item/stack/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
desc = "Glass which has been reinforced with metal rods."
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1875,"glass" = 3750)
|
||||
origin_tech = "materials=2"
|
||||
|
||||
default_type = "reinforced glass"
|
||||
created_window = /obj/structure/window/reinforced
|
||||
is_reinforced = 1
|
||||
construction_options = list("One Direction", "Full Window", "Windoor")
|
||||
|
||||
/obj/item/stack/sheet/glass/reinforced/cyborg
|
||||
name = "reinforced glass synthesizer"
|
||||
desc = "A device that makes reinforced glass."
|
||||
gender = NEUTER
|
||||
matter = null
|
||||
uses_charge = 2
|
||||
charge_costs = list(1000)
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
charge_costs = list(500, 1000)
|
||||
stacktype = /obj/item/stack/sheet/glass/reinforced
|
||||
|
||||
/*
|
||||
* Phoron Glass sheets
|
||||
*/
|
||||
/obj/item/stack/sheet/glass/phoronglass
|
||||
/obj/item/stack/material/glass/phoronglass
|
||||
name = "phoron glass"
|
||||
desc = "A very strong and very resistant sheet of a phoron-glass alloy."
|
||||
singular_name = "phoron glass sheet"
|
||||
icon_state = "sheet-phoronglass"
|
||||
matter = list("glass" = 7500)
|
||||
origin_tech = "materials=3;phorontech=2"
|
||||
created_window = /obj/structure/window/phoronbasic
|
||||
default_type = "phoron glass"
|
||||
|
||||
/obj/item/stack/sheet/glass/phoronglass/attackby(obj/item/W, mob/user)
|
||||
/obj/item/stack/material/glass/phoronglass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if( istype(W, /obj/item/stack/rods) )
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/glass/phoronrglass/RG = new (user.loc)
|
||||
var/obj/item/stack/material/glass/phoronrglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
V.use(1)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
var/obj/item/stack/material/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
G.use(1)
|
||||
@@ -195,13 +165,10 @@
|
||||
/*
|
||||
* Reinforced phoron glass sheets
|
||||
*/
|
||||
/obj/item/stack/sheet/glass/phoronrglass
|
||||
/obj/item/stack/material/glass/phoronrglass
|
||||
name = "reinforced phoron glass"
|
||||
desc = "Phoron glass which has been reinforced with metal rods."
|
||||
singular_name = "reinforced phoron glass sheet"
|
||||
icon_state = "sheet-phoronrglass"
|
||||
matter = list("glass" = 7500,DEFAULT_WALL_MATERIAL = 1875)
|
||||
|
||||
origin_tech = "materials=4;phorontech=2"
|
||||
default_type = "reinforced phoron glass"
|
||||
created_window = /obj/structure/window/phoronreinforced
|
||||
is_reinforced = 1
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
/obj/item/stack/sheet/animalhide/human
|
||||
/obj/item/stack/material/animalhide/human
|
||||
name = "human skin"
|
||||
desc = "The by-product of human farming."
|
||||
singular_name = "human skin piece"
|
||||
icon_state = "sheet-hide"
|
||||
origin_tech = ""
|
||||
|
||||
/obj/item/stack/sheet/animalhide/corgi
|
||||
/obj/item/stack/material/animalhide/corgi
|
||||
name = "corgi hide"
|
||||
desc = "The by-product of corgi farming."
|
||||
singular_name = "corgi hide piece"
|
||||
icon_state = "sheet-corgi"
|
||||
origin_tech = ""
|
||||
|
||||
/obj/item/stack/sheet/animalhide/cat
|
||||
/obj/item/stack/material/animalhide/cat
|
||||
name = "cat hide"
|
||||
desc = "The by-product of cat farming."
|
||||
singular_name = "cat hide piece"
|
||||
icon_state = "sheet-cat"
|
||||
origin_tech = ""
|
||||
|
||||
/obj/item/stack/sheet/animalhide/monkey
|
||||
/obj/item/stack/material/animalhide/monkey
|
||||
name = "monkey hide"
|
||||
desc = "The by-product of monkey farming."
|
||||
singular_name = "monkey hide piece"
|
||||
icon_state = "sheet-monkey"
|
||||
origin_tech = ""
|
||||
|
||||
/obj/item/stack/sheet/animalhide/lizard
|
||||
/obj/item/stack/material/animalhide/lizard
|
||||
name = "lizard skin"
|
||||
desc = "Sssssss..."
|
||||
singular_name = "lizard skin piece"
|
||||
icon_state = "sheet-lizard"
|
||||
origin_tech = ""
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno
|
||||
/obj/item/stack/material/animalhide/xeno
|
||||
name = "alien hide"
|
||||
desc = "The skin of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
@@ -41,7 +41,7 @@
|
||||
origin_tech = ""
|
||||
|
||||
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
|
||||
/obj/item/stack/sheet/xenochitin
|
||||
/obj/item/stack/material/xenochitin
|
||||
name = "alien chitin"
|
||||
desc = "A piece of the hide of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
@@ -63,14 +63,14 @@
|
||||
icon_state = "weed_extract"
|
||||
origin_tech = ""
|
||||
|
||||
/obj/item/stack/sheet/hairlesshide
|
||||
/obj/item/stack/material/hairlesshide
|
||||
name = "hairless hide"
|
||||
desc = "This hide was stripped of it's hair, but still needs tanning."
|
||||
singular_name = "hairless hide piece"
|
||||
icon_state = "sheet-hairlesshide"
|
||||
origin_tech = ""
|
||||
|
||||
/obj/item/stack/sheet/wetleather
|
||||
/obj/item/stack/material/wetleather
|
||||
name = "wet leather"
|
||||
desc = "This leather has been cleaned but still needs to be dried."
|
||||
singular_name = "wet leather piece"
|
||||
@@ -79,35 +79,25 @@
|
||||
var/wetness = 30 //Reduced when exposed to high temperautres
|
||||
var/drying_threshold_temperature = 500 //Kelvin to start drying
|
||||
|
||||
/obj/item/stack/sheet/leather
|
||||
name = "leather"
|
||||
desc = "The by-product of mob grinding."
|
||||
singular_name = "leather piece"
|
||||
icon_state = "sheet-leather"
|
||||
origin_tech = "materials=2"
|
||||
|
||||
|
||||
|
||||
//Step one - dehairing.
|
||||
|
||||
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if( istype(W, /obj/item/weapon/kitchenknife) || \
|
||||
istype(W, /obj/item/weapon/kitchen/utensil/knife) || \
|
||||
istype(W, /obj/item/weapon/twohanded/fireaxe) || \
|
||||
istype(W, /obj/item/weapon/hatchet) )
|
||||
/obj/item/stack/material/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if( istype(W, /obj/item/weapon/material/knife) || \
|
||||
istype(W, /obj/item/weapon/material/kitchen/utensil/knife) || \
|
||||
istype(W, /obj/item/weapon/material/twohanded/fireaxe) || \
|
||||
istype(W, /obj/item/weapon/material/hatchet) )
|
||||
|
||||
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
|
||||
usr.visible_message("\blue \the [usr] starts cutting hair off \the [src]", "\blue You start cutting the hair off \the [src]", "You hear the sound of a knife rubbing against flesh")
|
||||
if(do_after(user,50))
|
||||
usr << "\blue You cut the hair from this [src.singular_name]"
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
for(var/obj/item/stack/sheet/hairlesshide/HS in usr.loc)
|
||||
for(var/obj/item/stack/material/hairlesshide/HS in usr.loc)
|
||||
if(HS.amount < 50)
|
||||
HS.amount++
|
||||
src.use(1)
|
||||
break
|
||||
//If it gets to here it means it did not find a suitable stack on the tile.
|
||||
var/obj/item/stack/sheet/hairlesshide/HS = new(usr.loc)
|
||||
var/obj/item/stack/material/hairlesshide/HS = new(usr.loc)
|
||||
HS.amount = 1
|
||||
src.use(1)
|
||||
else
|
||||
@@ -117,20 +107,20 @@
|
||||
//Step two - washing..... it's actually in washing machine code.
|
||||
|
||||
//Step three - drying
|
||||
/obj/item/stack/sheet/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/item/stack/material/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature >= drying_threshold_temperature)
|
||||
wetness--
|
||||
if(wetness == 0)
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
for(var/obj/item/stack/sheet/leather/HS in src.loc)
|
||||
for(var/obj/item/stack/material/leather/HS in src.loc)
|
||||
if(HS.amount < 50)
|
||||
HS.amount++
|
||||
src.use(1)
|
||||
wetness = initial(wetness)
|
||||
break
|
||||
//If it gets to here it means it did not find a suitable stack on the tile.
|
||||
var/obj/item/stack/sheet/leather/HS = new(src.loc)
|
||||
var/obj/item/stack/material/leather/HS = new(src.loc)
|
||||
HS.amount = 1
|
||||
wetness = initial(wetness)
|
||||
src.use(1)
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
|
||||
CC.amount = 5
|
||||
amount--
|
||||
new/obj/item/stack/sheet/glass(user.loc)
|
||||
new/obj/item/stack/material/glass(user.loc)
|
||||
if(amount <= 0)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
|
||||
if(istype(O,/obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = O
|
||||
if(istype(O,/obj/item/stack/material/steel))
|
||||
var/obj/item/stack/material/steel/M = O
|
||||
if (M.use(1))
|
||||
use(1)
|
||||
new/obj/item/stack/tile/light(get_turf(user))
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
/*
|
||||
Mineral Sheets
|
||||
Contains:
|
||||
- Sandstone
|
||||
- Diamond
|
||||
- Uranium
|
||||
- Phoron
|
||||
- Gold
|
||||
- Silver
|
||||
- Enriched Uranium
|
||||
- Platinum
|
||||
- Metallic Hydrogen
|
||||
- Tritium
|
||||
- Osmium
|
||||
*/
|
||||
|
||||
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
|
||||
new/datum/stack_recipe("pile of dirt", /obj/machinery/portable_atmospherics/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/silver_recipes = list ( \
|
||||
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/diamond_recipes = list ( \
|
||||
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/uranium_recipes = list ( \
|
||||
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/gold_recipes = list ( \
|
||||
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/phoron_recipes = list ( \
|
||||
new/datum/stack_recipe("phoron door", /obj/structure/mineral_door/transparent/phoron, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
|
||||
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
|
||||
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 knife", /obj/item/weapon/kitchen/utensil/pknife, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
|
||||
new/datum/stack_recipe("blood pack", /obj/item/weapon/reagent_containers/blood/empty, 4, on_floor = 0), \
|
||||
new/datum/stack_recipe("reagent dispenser cartridge (large)", /obj/item/weapon/reagent_containers/chem_disp_cartridge, 5, on_floor=0), // 500u
|
||||
new/datum/stack_recipe("reagent dispenser cartridge (med)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/medium, 3, on_floor=0), // 250u
|
||||
new/datum/stack_recipe("reagent dispenser cartridge (small)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/small, 1, on_floor=0) // 100u
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/iron_recipes = list ( \
|
||||
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
|
||||
/obj/item/stack/sheet/mineral/New()
|
||||
..()
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
|
||||
obj/item/stack/sheet/mineral/iron
|
||||
name = "iron"
|
||||
icon_state = "sheet-silver"
|
||||
origin_tech = "materials=1"
|
||||
sheettype = "iron"
|
||||
color = "#333333"
|
||||
perunit = 3750
|
||||
|
||||
obj/item/stack/sheet/mineral/iron/New()
|
||||
..()
|
||||
recipes = iron_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandstone
|
||||
name = "sandstone brick"
|
||||
desc = "This appears to be a combination of both sand and stone."
|
||||
singular_name = "sandstone brick"
|
||||
icon_state = "sheet-sandstone"
|
||||
throw_speed = 4
|
||||
throw_range = 5
|
||||
origin_tech = "materials=1"
|
||||
sheettype = "sandstone"
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandstone/New()
|
||||
..()
|
||||
recipes = sandstone_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/diamond
|
||||
name = "diamond"
|
||||
icon_state = "sheet-diamond"
|
||||
origin_tech = "materials=6"
|
||||
perunit = 3750
|
||||
sheettype = "diamond"
|
||||
|
||||
|
||||
/obj/item/stack/sheet/mineral/diamond/New()
|
||||
..()
|
||||
recipes = diamond_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/uranium
|
||||
name = "uranium"
|
||||
icon_state = "sheet-uranium"
|
||||
origin_tech = "materials=5"
|
||||
perunit = 2000
|
||||
sheettype = "uranium"
|
||||
|
||||
/obj/item/stack/sheet/mineral/uranium/New()
|
||||
..()
|
||||
recipes = uranium_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/phoron
|
||||
name = "solid phoron"
|
||||
icon_state = "sheet-phoron"
|
||||
origin_tech = "phorontech=2;materials=2"
|
||||
perunit = 2000
|
||||
sheettype = "phoron"
|
||||
|
||||
/obj/item/stack/sheet/mineral/phoron/New()
|
||||
..()
|
||||
recipes = phoron_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic
|
||||
name = "Plastic"
|
||||
icon_state = "sheet-plastic"
|
||||
origin_tech = "materials=3"
|
||||
perunit = 2000
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/New()
|
||||
..()
|
||||
recipes = plastic_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/cyborg
|
||||
name = "plastic sheets synthesizer"
|
||||
gender = NEUTER
|
||||
uses_charge = 1
|
||||
charge_costs = list(1000)
|
||||
stacktype = /obj/item/stack/sheet/mineral/plastic
|
||||
|
||||
/obj/item/stack/sheet/mineral/gold
|
||||
name = "gold"
|
||||
icon_state = "sheet-gold"
|
||||
origin_tech = "materials=4"
|
||||
perunit = 2000
|
||||
sheettype = "gold"
|
||||
|
||||
/obj/item/stack/sheet/mineral/gold/New()
|
||||
..()
|
||||
recipes = gold_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/silver
|
||||
name = "silver"
|
||||
icon_state = "sheet-silver"
|
||||
origin_tech = "materials=3"
|
||||
perunit = 2000
|
||||
sheettype = "silver"
|
||||
|
||||
/obj/item/stack/sheet/mineral/silver/New()
|
||||
..()
|
||||
recipes = silver_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/enruranium
|
||||
name = "enriched uranium"
|
||||
icon_state = "sheet-enruranium"
|
||||
origin_tech = "materials=5"
|
||||
perunit = 1000
|
||||
|
||||
//Valuable resource, cargo can sell it.
|
||||
/obj/item/stack/sheet/mineral/platinum
|
||||
name = "platinum"
|
||||
icon_state = "sheet-adamantine"
|
||||
origin_tech = "materials=2"
|
||||
sheettype = "platinum"
|
||||
perunit = 2000
|
||||
|
||||
//Extremely valuable to Research.
|
||||
/obj/item/stack/sheet/mineral/mhydrogen
|
||||
name = "metallic hydrogen"
|
||||
icon_state = "sheet-mythril"
|
||||
origin_tech = "materials=6;powerstorage=5;magnets=5"
|
||||
sheettype = "mhydrogen"
|
||||
perunit = 2000
|
||||
|
||||
//Fuel for MRSPACMAN generator.
|
||||
/obj/item/stack/sheet/mineral/tritium
|
||||
name = "tritium"
|
||||
icon_state = "sheet-silver"
|
||||
sheettype = "tritium"
|
||||
origin_tech = "materials=5"
|
||||
color = "#777777"
|
||||
perunit = 2000
|
||||
|
||||
/obj/item/stack/sheet/mineral/osmium
|
||||
name = "osmium"
|
||||
icon_state = "sheet-silver"
|
||||
sheettype = "osmium"
|
||||
origin_tech = "materials=5"
|
||||
color = "#9999FF"
|
||||
perunit = 2000
|
||||
@@ -1,223 +0,0 @@
|
||||
/* Diffrent misc types of sheets
|
||||
* Contains:
|
||||
* Metal
|
||||
* Plasteel
|
||||
* Wood
|
||||
* Cloth
|
||||
* Cardboard
|
||||
*/
|
||||
|
||||
/*
|
||||
* Metal
|
||||
*/
|
||||
var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe_list("office chairs",list( \
|
||||
new/datum/stack_recipe("dark office chair", /obj/structure/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("light office chair", /obj/structure/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/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("black comfy chair", /obj/structure/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("red comfy chair", /obj/structure/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("blue comfy chair", /obj/structure/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("purple comfy chair", /obj/structure/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("green comfy chair", /obj/structure/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("rack parts", /obj/item/weapon/table_parts/rack), \
|
||||
new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("cannon frame", /obj/item/weapon/cannonframe, 10, time = 15, one_per_turf = 0, on_floor = 0), \
|
||||
null, \
|
||||
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
|
||||
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
|
||||
null, \
|
||||
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
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("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 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("emergency shutter", /obj/structure/firedoor_assembly, 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), \
|
||||
null, \
|
||||
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
|
||||
new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2), \
|
||||
new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
|
||||
new/datum/stack_recipe("air alarm frame", /obj/item/frame/air_alarm, 2), \
|
||||
new/datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2), \
|
||||
null, \
|
||||
new/datum/stack_recipe("knife blade", /obj/item/butterflyblade, 6, time = 20, one_per_turf = 0, on_floor = 1) \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/metal
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
desc = "Sheets made out off steel."
|
||||
singular_name = "metal sheet"
|
||||
icon_state = "sheet-metal"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3750)
|
||||
throwforce = 14.0
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=1"
|
||||
sheettype = DEFAULT_WALL_MATERIAL
|
||||
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
name = "steel synthesizer"
|
||||
desc = "A device that makes steel sheets."
|
||||
gender = NEUTER
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_costs = list(1000)
|
||||
stacktype = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
||||
recipes = metal_recipes
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
* Plasteel
|
||||
*/
|
||||
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/frame/rust/assembly, 12, time = 50, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/frame/rust, 12, time = 50, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("knife grip", /obj/item/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1),
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/plasteel
|
||||
name = "plasteel"
|
||||
singular_name = "plasteel sheet"
|
||||
desc = "This sheet is an alloy of iron and platinum."
|
||||
icon_state = "sheet-plasteel"
|
||||
item_state = "sheet-metal"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 7500)
|
||||
throwforce = 15.0
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=2"
|
||||
sheettype = "plasteel"
|
||||
|
||||
/obj/item/stack/sheet/plasteel/cyborg
|
||||
name = "plasteel synthesizer"
|
||||
desc = "A device that makes plasteel sheets."
|
||||
gender = NEUTER
|
||||
singular_name = "plasteel sheet"
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_costs = list(1000)
|
||||
stacktype = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
|
||||
recipes = plasteel_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Wood
|
||||
*/
|
||||
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("wooden chair", /obj/structure/bed/chair/wood, 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("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("baseball bat", /obj/item/weapon/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
|
||||
// new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/wood
|
||||
name = "wooden plank"
|
||||
desc = "One can only guess that this is a bunch of wood."
|
||||
singular_name = "wood plank"
|
||||
icon_state = "sheet-wood"
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
|
||||
/obj/item/stack/sheet/wood/cyborg
|
||||
name = "wood synthesizer"
|
||||
desc = "A device that makes wooden planks."
|
||||
gender = NEUTER
|
||||
singular_name = "wood plank"
|
||||
icon_state = "sheet-wood"
|
||||
uses_charge = 1
|
||||
charge_costs = list(1000)
|
||||
stacktype = /obj/item/stack/sheet/wood
|
||||
|
||||
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
|
||||
recipes = wood_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Cloth
|
||||
*/
|
||||
/obj/item/stack/sheet/cloth
|
||||
name = "cloth"
|
||||
desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits."
|
||||
singular_name = "cloth roll"
|
||||
icon_state = "sheet-cloth"
|
||||
origin_tech = "materials=2"
|
||||
|
||||
/*
|
||||
* Cardboard
|
||||
*/
|
||||
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
|
||||
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
|
||||
new/datum/stack_recipe("donut box", /obj/item/weapon/storage/box/donut/empty), \
|
||||
new/datum/stack_recipe("egg box", /obj/item/weapon/storage/fancy/egg_box), \
|
||||
new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \
|
||||
new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \
|
||||
new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \
|
||||
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
|
||||
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
|
||||
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
|
||||
null, \
|
||||
new/datum/stack_recipe_list("folders",list( \
|
||||
new/datum/stack_recipe("blue folder", /obj/item/weapon/folder/blue), \
|
||||
new/datum/stack_recipe("grey folder", /obj/item/weapon/folder), \
|
||||
new/datum/stack_recipe("red folder", /obj/item/weapon/folder/red), \
|
||||
new/datum/stack_recipe("white folder", /obj/item/weapon/folder/white), \
|
||||
new/datum/stack_recipe("yellow folder", /obj/item/weapon/folder/yellow), \
|
||||
)) \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
name = "cardboard"
|
||||
desc = "Large sheets of card, like boxes folded flat."
|
||||
singular_name = "cardboard sheet"
|
||||
icon_state = "sheet-card"
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
|
||||
recipes = cardboard_recipes
|
||||
return ..()
|
||||
@@ -1,25 +0,0 @@
|
||||
/obj/item/stack/sheet
|
||||
name = "sheet"
|
||||
w_class = 3.0
|
||||
force = 5
|
||||
throwforce = 5
|
||||
max_amount = 50
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
|
||||
var/perunit = 3750
|
||||
var/sheettype = null //this is used for girders in the creation of walls/false walls
|
||||
|
||||
|
||||
// Since the sheetsnatcher was consolidated into weapon/storage/bag we now use
|
||||
// item/attackby() properly, making this unnecessary
|
||||
|
||||
/*/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/storage/bag/sheetsnatcher))
|
||||
var/obj/item/weapon/storage/bag/sheetsnatcher/S = W
|
||||
if(!S.mode)
|
||||
S.add(src,user)
|
||||
else
|
||||
for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
|
||||
S.add(stack,user)
|
||||
..()*/
|
||||
@@ -129,7 +129,11 @@
|
||||
return
|
||||
|
||||
if (use(required))
|
||||
var/atom/O = new recipe.result_type(user.loc)
|
||||
var/atom/O
|
||||
if(recipe.use_material)
|
||||
O = new recipe.result_type(user.loc, recipe.use_material)
|
||||
else
|
||||
O = new recipe.result_type(user.loc)
|
||||
O.set_dir(user.dir)
|
||||
O.add_fingerprint(user)
|
||||
|
||||
@@ -338,7 +342,9 @@
|
||||
var/time = 0
|
||||
var/one_per_turf = 0
|
||||
var/on_floor = 0
|
||||
New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0)
|
||||
var/use_material
|
||||
|
||||
New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, supplied_material = null)
|
||||
src.title = title
|
||||
src.result_type = result_type
|
||||
src.req_amount = req_amount
|
||||
@@ -347,6 +353,7 @@
|
||||
src.time = time
|
||||
src.one_per_turf = one_per_turf
|
||||
src.on_floor = on_floor
|
||||
src.use_material = supplied_material
|
||||
|
||||
/*
|
||||
* Recipe list datum
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/item/stack/tile/light/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
..()
|
||||
if(istype(O,/obj/item/weapon/crowbar))
|
||||
new/obj/item/stack/sheet/metal(user.loc)
|
||||
new/obj/item/stack/material/steel(user.loc)
|
||||
amount--
|
||||
new/obj/item/stack/light_w(user.loc)
|
||||
if(amount <= 0)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1)
|
||||
A.reagents.trans_to(src, 10)
|
||||
A.reagents.trans_to_obj(src, 10)
|
||||
user << "\blue You fill the balloon with the contents of [A]."
|
||||
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
src.update_icon()
|
||||
@@ -60,22 +60,22 @@
|
||||
user << "The [O] is empty."
|
||||
else if(O.reagents.total_volume >= 1)
|
||||
if(O.reagents.has_reagent("pacid", 1))
|
||||
user << "The acid chews through the balloon!"
|
||||
O.reagents.reaction(user)
|
||||
qdel(src)
|
||||
user << "The acid chews through the balloon!"
|
||||
O.reagents.splash_mob(user, reagents.total_volume)
|
||||
qdel(src)
|
||||
else
|
||||
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
user << "\blue You fill the balloon with the contents of [O]."
|
||||
O.reagents.trans_to(src, 10)
|
||||
O.reagents.trans_to_obj(src, 10)
|
||||
src.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/toy/balloon/throw_impact(atom/hit_atom)
|
||||
if(src.reagents.total_volume >= 1)
|
||||
src.visible_message("\red The [src] bursts!","You hear a pop and a splash.")
|
||||
src.reagents.reaction(get_turf(hit_atom))
|
||||
src.reagents.touch_turf(get_turf(hit_atom))
|
||||
for(var/atom/A in get_turf(hit_atom))
|
||||
src.reagents.reaction(A)
|
||||
src.reagents.touch(A)
|
||||
src.icon_state = "burst"
|
||||
spawn(5)
|
||||
if(src)
|
||||
@@ -456,15 +456,15 @@
|
||||
D.icon = 'icons/obj/chemical.dmi'
|
||||
D.icon_state = "chempuff"
|
||||
D.create_reagents(5)
|
||||
src.reagents.trans_to(D, 1)
|
||||
src.reagents.trans_to_obj(D, 1)
|
||||
playsound(src.loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
|
||||
spawn(0)
|
||||
for(var/i=0, i<1, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
D.reagents.touch_turf(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
D.reagents.touch(T)
|
||||
if(ismob(T) && T:client)
|
||||
T:client << "\red [user] has sprayed you with water!"
|
||||
sleep(4)
|
||||
@@ -923,6 +923,11 @@
|
||||
desc = "A plushie of a fuzzy spider! It has eight legs - all the better to hug you with."
|
||||
icon_state = "spiderplushie"
|
||||
|
||||
/obj/item/toy/plushie/farwa
|
||||
name = "farwa plush"
|
||||
desc = "A farwa plush doll. It's soft and comforting!"
|
||||
icon_state = "farwaplushie"
|
||||
|
||||
//Toy cult sword
|
||||
/obj/item/toy/cultsword
|
||||
name = "foam sword"
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
/obj/item/device/taperecorder,
|
||||
/obj/item/device/hailer,
|
||||
/obj/item/device/megaphone,
|
||||
/obj/item/clothing/accessory/holobadge,
|
||||
/obj/item/clothing/accessory/badge/holo,
|
||||
/obj/structure/closet/crate/secure,
|
||||
/obj/structure/closet/secure_closet,
|
||||
/obj/machinery/librarycomp,
|
||||
@@ -162,17 +162,6 @@
|
||||
/obj/item/weapon/card/id/GetID()
|
||||
return src
|
||||
|
||||
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W,/obj/item/weapon/id_wallet))
|
||||
user << "You slip [src] into [W]."
|
||||
src.name = "[src.registered_name]'s [W.name] ([src.assignment])"
|
||||
src.desc = W.desc
|
||||
src.icon = W.icon
|
||||
src.icon_state = W.icon_state
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/verb/read()
|
||||
set name = "Read ID Card"
|
||||
set category = "Object"
|
||||
@@ -297,7 +286,7 @@
|
||||
/obj/item/weapon/card/id/centcom/ERT
|
||||
name = "\improper Emergency Response Team ID"
|
||||
assignment = "Emergency Response Team"
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/centcom/ERT/New()
|
||||
..()
|
||||
access += get_all_accesses()
|
||||
|
||||
@@ -114,10 +114,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return
|
||||
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM, 0.2) // Most of it is not inhaled... balance reasons.
|
||||
reagents.reaction(C)
|
||||
reagents.trans_to_mob(C, REM, CHEM_INGEST, 0.2) // Most of it is not inhaled... balance reasons.
|
||||
else // else just remove some of the reagents
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
reagents.remove_any(REM)
|
||||
|
||||
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
@@ -232,7 +231,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(glass)) //you can dip cigarettes into beakers
|
||||
var/transfered = glass.reagents.trans_to(src, chem_volume)
|
||||
var/transfered = glass.reagents.trans_to_obj(src, chem_volume)
|
||||
if(transfered) //if reagents were transfered, show the message
|
||||
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
|
||||
else //if not, either the beaker was empty, or the cigarette was full
|
||||
@@ -377,7 +376,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
smoketime = 1000
|
||||
if(G.reagents)
|
||||
G.reagents.trans_to(src, G.reagents.total_volume)
|
||||
G.reagents.trans_to_obj(src, G.reagents.total_volume)
|
||||
name = "[G.name]-packed [initial(name)]"
|
||||
qdel(G)
|
||||
|
||||
@@ -416,35 +415,33 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "lighter-g"
|
||||
item_state = "lighter-g"
|
||||
var/icon_on = "lighter-g-on"
|
||||
var/icon_off = "lighter-g"
|
||||
w_class = 1
|
||||
throwforce = 4
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("burnt", "singed")
|
||||
var/base_state
|
||||
|
||||
/obj/item/weapon/flame/lighter/zippo
|
||||
name = "\improper Zippo lighter"
|
||||
desc = "The zippo."
|
||||
icon_state = "zippo"
|
||||
item_state = "zippo"
|
||||
icon_on = "zippoon"
|
||||
icon_off = "zippo"
|
||||
|
||||
/obj/item/weapon/flame/lighter/random
|
||||
New()
|
||||
var/color = pick("r","c","y","g")
|
||||
icon_on = "lighter-[color]-on"
|
||||
icon_off = "lighter-[color]"
|
||||
icon_state = icon_off
|
||||
icon_state = "lighter-[pick("r","c","y","g")]"
|
||||
item_state = icon_state
|
||||
base_state = icon_state
|
||||
|
||||
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
|
||||
if(!base_state)
|
||||
base_state = icon_state
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(!lit)
|
||||
lit = 1
|
||||
icon_state = icon_on
|
||||
item_state = icon_on
|
||||
icon_state = "[base_state]on"
|
||||
item_state = "[base_state]on"
|
||||
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
|
||||
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
|
||||
else
|
||||
@@ -462,8 +459,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
lit = 0
|
||||
icon_state = icon_off
|
||||
item_state = icon_off
|
||||
icon_state = "[base_state]"
|
||||
item_state = "[base_state]"
|
||||
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
|
||||
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
|
||||
else
|
||||
|
||||
@@ -98,101 +98,41 @@
|
||||
/obj/item/weapon/dnainjector/attack(mob/M as mob, mob/user as mob)
|
||||
if (!istype(M, /mob))
|
||||
return
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
if (!usr.IsAdvancedToolUser())
|
||||
return
|
||||
if(inuse)
|
||||
return 0
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] is trying to inject \the [M] with \the [src]!</span>")
|
||||
inuse = 1
|
||||
s_time = world.time
|
||||
spawn(50)
|
||||
inuse = 0
|
||||
|
||||
if(!do_after(user,50))
|
||||
return
|
||||
|
||||
M.visible_message("<span class='danger'>\The [M] has been injected with \the [src] by \the [user].</span>")
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!istype(H))
|
||||
user << "<span class='warning'>Apparently it didn't work...</span>"
|
||||
return
|
||||
|
||||
// Used by admin log.
|
||||
var/injected_with_monkey = ""
|
||||
if((buf.types & DNA2_BUF_SE) && (block ? (GetState() && block == MONKEYBLOCK) : GetState(MONKEYBLOCK)))
|
||||
injected_with_monkey = " <span class='danger'>(MONKEY)</span>"
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
|
||||
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with \the [src][injected_with_monkey]")
|
||||
|
||||
if (user)
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if(!inuse)
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = user
|
||||
O.target = M
|
||||
O.item = src
|
||||
O.s_loc = user.loc
|
||||
O.t_loc = M.loc
|
||||
O.place = "dnainjector"
|
||||
src.inuse = 1
|
||||
spawn(50) // Not the best fix. There should be an failure proc, for /effect/equip_e/, which is called when the first initital checks fail
|
||||
inuse = 0
|
||||
M.requests += O
|
||||
if (buf.types & DNA2_BUF_SE)
|
||||
if(block)// Isolated injector
|
||||
testing("Isolated block [block] injector with contents: [GetValue()]")
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
testing("DNA injector with contents: [english_list(buf.dna.SE)]")
|
||||
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
else
|
||||
if(!inuse)
|
||||
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been injected with [] by [].", M, src, user), 1)
|
||||
//Foreach goto(192)
|
||||
if (!(istype(M, /mob/living/carbon/human)))
|
||||
user << "\red Apparently it didn't work."
|
||||
return
|
||||
|
||||
if (buf.types & DNA2_BUF_SE)
|
||||
if(block)// Isolated injector
|
||||
testing("Isolated block [block] injector with contents: [GetValue()]")
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
testing("DNA injector with contents: [english_list(buf.dna.SE)]")
|
||||
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
inuse = 1
|
||||
inject(M, user)//Now we actually do the heavy lifting.
|
||||
spawn(50)
|
||||
inuse = 0
|
||||
/*
|
||||
A user injecting themselves could mean their own transformation and deletion of mob.
|
||||
I don't have the time to figure out how this code works so this will do for now.
|
||||
I did rearrange things a bit.
|
||||
*/
|
||||
if(user)//If the user still exists. Their mob may not.
|
||||
if(M)//Runtime fix: If the mob doesn't exist, mob.name doesnt work. - Nodrak
|
||||
user.show_message(text("\red You inject [M.name]"))
|
||||
else
|
||||
user.show_message(text("\red You finish the injection."))
|
||||
// Apply the DNA shit.
|
||||
inject(M, user)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
|
||||
@@ -31,15 +31,11 @@
|
||||
w_class = 2.0
|
||||
force = 3.0
|
||||
max_water = 60
|
||||
spray_particles = 6
|
||||
spray_amount = 2
|
||||
sprite_name = "miniFE"
|
||||
|
||||
/obj/item/weapon/extinguisher/New()
|
||||
var/datum/reagents/R = new/datum/reagents(max_water)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("water", max_water)
|
||||
create_reagents(max_water)
|
||||
reagents.add_reagent("water", max_water)
|
||||
|
||||
/obj/item/weapon/extinguisher/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
@@ -53,19 +49,19 @@
|
||||
user << "The safety is [safety ? "on" : "off"]."
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
|
||||
/obj/item/weapon/extinguisher/afterattack(var/atom/target, var/mob/user, var/flag)
|
||||
//TODO; Add support for reagents in water.
|
||||
|
||||
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1)
|
||||
if( istype(target, /obj/structure/reagent_dispensers/watertank) && flag)
|
||||
var/obj/o = target
|
||||
var/amount = o.reagents.trans_to(src, 50)
|
||||
user << "\blue You fill [src] with [amount] units of the contents of [target]."
|
||||
var/amount = o.reagents.trans_to_obj(src, 50)
|
||||
user << "<span class='notice'>You fill [src] with [amount] units of the contents of [target].</span>"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
|
||||
if (!safety)
|
||||
if (src.reagents.total_volume < 1)
|
||||
usr << "\red \The [src] is empty."
|
||||
usr << "<span class='notice'>\The [src] is empty.</span>"
|
||||
return
|
||||
|
||||
if (world.time < src.last_use + 20)
|
||||
@@ -77,35 +73,35 @@
|
||||
|
||||
var/direction = get_dir(src,target)
|
||||
|
||||
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
|
||||
if(user.buckled && isobj(user.buckled) && !user.buckled.anchored )
|
||||
spawn(0)
|
||||
var/obj/structure/bed/chair/C = null
|
||||
if(istype(usr.buckled, /obj/structure/bed/chair))
|
||||
C = usr.buckled
|
||||
var/obj/B = usr.buckled
|
||||
if(istype(user.buckled, /obj/structure/bed/chair))
|
||||
C = user.buckled
|
||||
var/obj/B = user.buckled
|
||||
var/movementdirection = turn(direction,180)
|
||||
if(C) C.propelled = 4
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 3
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 2
|
||||
sleep(2)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 1
|
||||
sleep(2)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 0
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
@@ -113,33 +109,24 @@
|
||||
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
|
||||
for(var/a=0, a < spray_particles, a++)
|
||||
for(var/a = 1 to spray_particles)
|
||||
spawn(0)
|
||||
var/obj/effect/effect/water/W = PoolOrNew(/obj/effect/effect/water, get_turf(src))
|
||||
var/turf/my_target = pick(the_targets)
|
||||
var/datum/reagents/R = new/datum/reagents(spray_amount)
|
||||
if(!W) return
|
||||
W.reagents = R
|
||||
R.my_atom = W
|
||||
if(!W || !src) return
|
||||
src.reagents.trans_to(W, spray_amount)
|
||||
|
||||
for(var/b=0, b<5, b++)
|
||||
step_towards(W,my_target)
|
||||
if(!W || !W.reagents) return
|
||||
W.reagents.reaction(get_turf(W))
|
||||
for(var/atom/atm in get_turf(W))
|
||||
if(!W)
|
||||
return
|
||||
if(!W.reagents)
|
||||
break
|
||||
W.reagents.reaction(atm)
|
||||
if(isliving(atm)) //For extinguishing mobs on fire
|
||||
var/mob/living/M = atm
|
||||
M.ExtinguishMob()
|
||||
if(W.loc == my_target) break
|
||||
sleep(2)
|
||||
qdel(W)
|
||||
var/turf/my_target
|
||||
if(a == 1)
|
||||
my_target = T
|
||||
else if(a == 2)
|
||||
my_target = T1
|
||||
else if(a == 3)
|
||||
my_target = T2
|
||||
else
|
||||
my_target = pick(the_targets)
|
||||
W.create_reagents(spray_amount)
|
||||
if(!src)
|
||||
return
|
||||
reagents.trans_to_obj(W, spray_amount)
|
||||
W.set_color()
|
||||
W.set_up(my_target)
|
||||
|
||||
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
|
||||
user.inertia_dir = get_dir(target, user)
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
for(var/atom/A in view(affected_area, src.loc))
|
||||
if( A == src ) continue
|
||||
src.reagents.reaction(A, 1, 10)
|
||||
src.reagents.touch(A)
|
||||
|
||||
if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand
|
||||
var/mob/living/carbon/C = loc
|
||||
|
||||
@@ -15,58 +15,76 @@
|
||||
var/dispenser = 0
|
||||
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
|
||||
var/cuff_sound = 'sound/weapons/handcuffs.ogg'
|
||||
var/cuff_type = "handcuffs"
|
||||
|
||||
/obj/item/weapon/handcuffs/attack(mob/living/carbon/C as mob, mob/user as mob)
|
||||
if (!istype(user, /mob/living/carbon/human))
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
/obj/item/weapon/handcuffs/attack(var/mob/living/carbon/C, var/mob/living/user)
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return
|
||||
if ((CLUMSY in usr.mutations) && prob(50))
|
||||
user << "\red Uh ... how do those things work?!"
|
||||
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "<span class='warning'>Uh ... how do those things work?!</span>"
|
||||
place_handcuffs(user, user)
|
||||
return
|
||||
|
||||
if(!C.handcuffed)
|
||||
if (C == user)
|
||||
place_handcuffs(user, user)
|
||||
return
|
||||
|
||||
//check for an aggressive grab
|
||||
for (var/obj/item/weapon/grab/G in C.grabbed_by)
|
||||
if (G.loc == user && G.state >= GRAB_AGGRESSIVE)
|
||||
place_handcuffs(C, user)
|
||||
return
|
||||
user << "\red You need to have a firm grip on [C] before you can put \the [src] on!"
|
||||
//check for an aggressive grab (or robutts)
|
||||
var/can_place
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
can_place = 1
|
||||
else
|
||||
for (var/obj/item/weapon/grab/G in C.grabbed_by)
|
||||
if (G.loc == user && G.state >= GRAB_AGGRESSIVE)
|
||||
can_place = 1
|
||||
break
|
||||
|
||||
if(can_place)
|
||||
place_handcuffs(C, user)
|
||||
else
|
||||
user << "<span class='danger'>You need to have a firm grip on [C] before you can put \the [src] on!</span>"
|
||||
|
||||
/obj/item/weapon/handcuffs/proc/place_handcuffs(var/mob/living/carbon/target, var/mob/user)
|
||||
playsound(src.loc, cuff_sound, 30, 1, -2)
|
||||
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
|
||||
if (!H.has_organ_for_slot(slot_handcuffed))
|
||||
user << "<span class='danger'>\The [H] needs at least two wrists before you can cuff them together!</span>"
|
||||
return
|
||||
|
||||
if(istype(H.gloves,/obj/item/clothing/gloves/rig)) // Can't cuff someone who's in a deployed hardsuit.
|
||||
user << "<span class='danger'>The cuffs won't fit around \the [H.gloves]!</span>"
|
||||
return
|
||||
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
|
||||
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = user
|
||||
O.target = H
|
||||
O.item = user.get_active_hand()
|
||||
O.s_loc = user.loc
|
||||
O.t_loc = H.loc
|
||||
O.place = "handcuff"
|
||||
H.requests += O
|
||||
spawn( 0 )
|
||||
feedback_add_details("handcuffs","H")
|
||||
O.process()
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
if (!H.has_organ_for_slot(slot_handcuffed))
|
||||
user << "<span class='danger'>\The [H] needs at least two wrists before you can cuff them together!</span>"
|
||||
return
|
||||
|
||||
if(istype(H.gloves,/obj/item/clothing/gloves/rig)) // Can't cuff someone who's in a deployed hardsuit.
|
||||
user << "<span class='danger'>The cuffs won't fit around \the [H.gloves]!</span>"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] is attempting to put [cuff_type] on \the [H]!</span>")
|
||||
|
||||
if(!do_after(user,30))
|
||||
return
|
||||
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
|
||||
feedback_add_details("handcuffs","H")
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] has put [cuff_type] on \the [H]!</span>")
|
||||
|
||||
// Apply cuffs.
|
||||
var/obj/item/weapon/handcuffs/cuffs = src
|
||||
if(dispenser)
|
||||
cuffs = new(get_turf(user))
|
||||
else
|
||||
user.drop_from_inventory(cuffs)
|
||||
cuffs.loc = target
|
||||
target.handcuffed = cuffs
|
||||
target.update_inv_handcuffed()
|
||||
return
|
||||
|
||||
var/last_chew = 0
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
|
||||
if (A != src) return ..()
|
||||
@@ -98,6 +116,7 @@ var/last_chew = 0
|
||||
icon_state = "cuff_white"
|
||||
breakouttime = 300 //Deciseconds = 30s
|
||||
cuff_sound = 'sound/weapons/cablecuff.ogg'
|
||||
cuff_type = "cable restraints"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/red
|
||||
color = "#DD0000"
|
||||
@@ -128,32 +147,11 @@ var/last_chew = 0
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
if (R.use(1))
|
||||
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
||||
|
||||
var/obj/item/weapon/material/wirerod/W = new(get_turf(user))
|
||||
user.put_in_hands(W)
|
||||
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
||||
qdel(src)
|
||||
update_icon(user)
|
||||
|
||||
|
||||
/obj/item/weapon/handcuffs/cyborg
|
||||
dispenser = 1
|
||||
|
||||
/obj/item/weapon/handcuffs/cyborg/attack(mob/living/carbon/C as mob, mob/user as mob)
|
||||
if(!C.handcuffed)
|
||||
var/turf/p_loc = user.loc
|
||||
var/turf/p_loc_m = C.loc
|
||||
playsound(src.loc, cuff_sound, 30, 1, -2)
|
||||
user.visible_message("\red <B>[user] is trying to put handcuffs on [C]!</B>")
|
||||
|
||||
if (ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if (!H.has_organ_for_slot(slot_handcuffed))
|
||||
user << "\red \The [H] needs at least two wrists before you can cuff them together!"
|
||||
return
|
||||
|
||||
spawn(30)
|
||||
if(!C) return
|
||||
if(p_loc == user.loc && p_loc_m == C.loc)
|
||||
C.handcuffed = new /obj/item/weapon/handcuffs(C)
|
||||
C.update_inv_handcuffed()
|
||||
|
||||
@@ -291,7 +291,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
activate(var/cause)
|
||||
if((!cause) || (!src.imp_in)) return 0
|
||||
var/mob/living/carbon/R = src.imp_in
|
||||
src.reagents.trans_to(R, cause)
|
||||
src.reagents.trans_to_mob(R, cause, CHEM_BLOOD)
|
||||
R << "You hear a faint *beep*."
|
||||
if(!src.reagents.total_volume)
|
||||
R << "You hear a faint click from your chest."
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
user << "\red [src] is full."
|
||||
else
|
||||
spawn(5)
|
||||
I.reagents.trans_to(src.imp, 5)
|
||||
I.reagents.trans_to_mob(src.imp, 5)
|
||||
user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units."
|
||||
else if (istype(I, /obj/item/weapon/implanter))
|
||||
var/obj/item/weapon/implanter/M = I
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/obj/item/weapon/material/butterflyconstruction
|
||||
name = "unfinished concealed knife"
|
||||
desc = "An unfinished concealed knife, it looks like the screws need to be tightened."
|
||||
icon = 'icons/obj/buildingobject.dmi'
|
||||
icon_state = "butterflystep1"
|
||||
force_divisor = 0.1
|
||||
thrown_force_divisor = 0.1
|
||||
|
||||
/obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
user << "You finish the concealed blade weapon."
|
||||
new /obj/item/weapon/material/butterfly(user.loc, material.name)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/butterflyblade
|
||||
name = "knife blade"
|
||||
desc = "A knife blade. Unusable as a weapon without a grip."
|
||||
icon = 'icons/obj/buildingobject.dmi'
|
||||
icon_state = "butterfly2"
|
||||
force_divisor = 0.1
|
||||
thrown_force_divisor = 0.1
|
||||
|
||||
/obj/item/weapon/material/butterflyhandle
|
||||
name = "concealed knife grip"
|
||||
desc = "A plasteel grip with screw fittings for a blade."
|
||||
icon = 'icons/obj/buildingobject.dmi'
|
||||
icon_state = "butterfly1"
|
||||
force_divisor = 0.1
|
||||
thrown_force_divisor = 0.1
|
||||
|
||||
/obj/item/weapon/material/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/material/butterflyblade))
|
||||
var/obj/item/weapon/material/butterflyblade/B = W
|
||||
user << "You attach the two concealed blade parts."
|
||||
new /obj/item/weapon/material/butterflyconstruction(user.loc, B.material.name)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/wirerod
|
||||
name = "wired rod"
|
||||
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
|
||||
icon_state = "wiredrod"
|
||||
item_state = "rods"
|
||||
flags = CONDUCT
|
||||
force = 8
|
||||
throwforce = 10
|
||||
w_class = 3
|
||||
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
|
||||
force_divisor = 0.1
|
||||
thrown_force_divisor = 0.1
|
||||
|
||||
/obj/item/weapon/material/wirerod/attackby(var/obj/item/I, mob/user as mob)
|
||||
..()
|
||||
var/obj/item/finished
|
||||
if(istype(I, /obj/item/weapon/material/shard))
|
||||
var/obj/item/weapon/material/tmp_shard = I
|
||||
finished = new /obj/item/weapon/material/twohanded/spear(get_turf(user), tmp_shard.material.name)
|
||||
user << "<span class='notice'>You fasten \the [I] to the top of the rod with the cable.</span>"
|
||||
else if(istype(I, /obj/item/weapon/wirecutters))
|
||||
finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user))
|
||||
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
|
||||
if(finished)
|
||||
user.drop_from_inventory(src)
|
||||
user.drop_from_inventory(I)
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
user.put_in_hands(finished)
|
||||
update_icon(user)
|
||||
@@ -1,462 +0,0 @@
|
||||
/* Kitchen tools
|
||||
* Contains:
|
||||
* Utensils
|
||||
* Spoons
|
||||
* Forks
|
||||
* Knives
|
||||
* Kitchen knives
|
||||
* Butcher's cleaver
|
||||
* Rolling Pins
|
||||
* Trays
|
||||
*/
|
||||
|
||||
/obj/item/weapon/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
|
||||
/*
|
||||
* Utensils
|
||||
*/
|
||||
/obj/item/weapon/kitchen/utensil
|
||||
force = 5.0
|
||||
w_class = 1.0
|
||||
throwforce = 5.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
sharp = 0
|
||||
|
||||
var/loaded //Descriptive string for currently loaded food object.
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/New()
|
||||
if (prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
|
||||
create_reagents(5)
|
||||
return
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(user.a_intent != I_HELP)
|
||||
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
if (reagents.total_volume > 0)
|
||||
reagents.trans_to_ingest(M, reagents.total_volume)
|
||||
if(M == user)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\blue [] eats some [] from \the [].", user, loaded, src), 1)
|
||||
M.reagents.add_reagent("nutriment", 1)
|
||||
else
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\blue [] feeds [] some [] from \the []", user, M, loaded, src), 1)
|
||||
M.reagents.add_reagent("nutriment", 1)
|
||||
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
|
||||
overlays.Cut()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/fork
|
||||
name = "fork"
|
||||
desc = "It's a fork. Sure is pointy."
|
||||
icon_state = "fork"
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/pfork
|
||||
name = "plastic fork"
|
||||
desc = "Yay, no washing up to do."
|
||||
icon_state = "pfork"
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/spoon
|
||||
name = "spoon"
|
||||
desc = "It's a spoon. You can see your own upside-down face in it."
|
||||
icon_state = "spoon"
|
||||
attack_verb = list("attacked", "poked")
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/pspoon
|
||||
name = "plastic spoon"
|
||||
desc = "It's a plastic spoon. How dull."
|
||||
icon_state = "pspoon"
|
||||
attack_verb = list("attacked", "poked")
|
||||
|
||||
/*
|
||||
* Knives
|
||||
*/
|
||||
/obj/item/weapon/kitchen/utensil/knife
|
||||
name = "knife"
|
||||
desc = "Can cut through any food."
|
||||
icon_state = "knife"
|
||||
force = 10.0
|
||||
throwforce = 10.0
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You accidentally cut yourself with the [src]."
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/pknife
|
||||
name = "plastic knife"
|
||||
desc = "The bluntest of blades."
|
||||
icon_state = "pknife"
|
||||
force = 1
|
||||
throwforce = 1
|
||||
sharp = 0
|
||||
edge = 1 //for cutting pizzas
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You somehow managed to cut yourself with the [src]."
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Kitchen knives
|
||||
*/
|
||||
/obj/item/weapon/kitchenknife
|
||||
name = "kitchen knife"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
flags = CONDUCT
|
||||
sharp = 1
|
||||
edge = 1
|
||||
force = 10.0
|
||||
w_class = 3.0
|
||||
throwforce = 6.0
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 12000)
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/kitchenknife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
|
||||
/*
|
||||
* Bucher's cleaver
|
||||
*/
|
||||
/obj/item/weapon/butch
|
||||
name = "butcher's cleaver"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "butch"
|
||||
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
|
||||
flags = CONDUCT
|
||||
force = 15.0
|
||||
w_class = 2.0
|
||||
throwforce = 8.0
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 12000)
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
/obj/item/weapon/butch/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/weapon/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
force = 8.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 2
|
||||
throw_range = 7
|
||||
w_class = 3.0
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
|
||||
|
||||
/obj/item/weapon/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red The [src] slips out of your hand and hits your head."
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(2)
|
||||
return
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
var/t = user:zone_sel.selecting
|
||||
if (t == "head")
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (H.stat < 2 && H.health < 50 && prob(90))
|
||||
// ******* Check
|
||||
if (istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))
|
||||
H << "\red The helmet protects you from being hit hard in the head!"
|
||||
return
|
||||
var/time = rand(2, 6)
|
||||
if (prob(75))
|
||||
H.Paralyse(time)
|
||||
else
|
||||
H.Stun(time)
|
||||
if(H.stat != 2) H.stat = 1
|
||||
user.visible_message("\red <B>[H] has been knocked unconscious!</B>", "\red <B>You knock [H] unconscious!</B>")
|
||||
return
|
||||
else
|
||||
H.visible_message("\red [user] tried to knock [H] unconscious!", "\red [user] tried to knock you unconscious!")
|
||||
H.eye_blurry += 3
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/weapon/tray
|
||||
name = "tray"
|
||||
icon = 'icons/obj/food.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
throwforce = 12.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 3.0
|
||||
flags = CONDUCT
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3000)
|
||||
/* // NOPE
|
||||
var/food_total= 0
|
||||
var/burger_amt = 0
|
||||
var/cheese_amt = 0
|
||||
var/fries_amt = 0
|
||||
var/classyalcdrink_amt = 0
|
||||
var/alcdrink_amt = 0
|
||||
var/bottle_amt = 0
|
||||
var/soda_amt = 0
|
||||
var/carton_amt = 0
|
||||
var/pie_amt = 0
|
||||
var/meatbreadslice_amt = 0
|
||||
var/salad_amt = 0
|
||||
var/miscfood_amt = 0
|
||||
*/
|
||||
var/list/carrying = list() // List of things on the tray. - Doohl
|
||||
var/max_carry = 10 // w_class = 1 -- takes up 1
|
||||
// w_class = 2 -- takes up 3
|
||||
// w_class = 3 -- takes up 5
|
||||
|
||||
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
|
||||
// Drop all the things. All of them.
|
||||
overlays.Cut()
|
||||
for(var/obj/item/I in carrying)
|
||||
I.loc = M.loc
|
||||
carrying.Remove(I)
|
||||
if(isturf(I.loc))
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
|
||||
if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown?
|
||||
M << "\red You accidentally slam yourself with the [src]!"
|
||||
M.Weaken(1)
|
||||
user.take_organ_damage(2)
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
return
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
|
||||
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
|
||||
|
||||
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
|
||||
|
||||
|
||||
if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
|
||||
if(prob(33))
|
||||
src.add_blood(H)
|
||||
var/turf/location = H.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(H) ///Plik plik, the sound of blood
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(prob(15))
|
||||
M.Weaken(3)
|
||||
M.take_organ_damage(3)
|
||||
else
|
||||
M.take_organ_damage(5)
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
|
||||
return
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
|
||||
M << "\red You get slammed in the face with the tray, against your mask!"
|
||||
if(prob(33))
|
||||
src.add_blood(H)
|
||||
if (H.wear_mask)
|
||||
H.wear_mask.add_blood(H)
|
||||
if (H.head)
|
||||
H.head.add_blood(H)
|
||||
if (H.glasses && prob(33))
|
||||
H.glasses.add_blood(H)
|
||||
var/turf/location = H.loc
|
||||
if (istype(location, /turf/simulated)) //Addin' blood! At least on the floor and item :v
|
||||
location.add_blood(H)
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
|
||||
if(prob(10))
|
||||
M.Stun(rand(1,3))
|
||||
M.take_organ_damage(3)
|
||||
return
|
||||
else
|
||||
M.take_organ_damage(5)
|
||||
return
|
||||
|
||||
else //No eye or head protection, tough luck!
|
||||
M << "\red You get slammed in the face with the tray!"
|
||||
if(prob(33))
|
||||
src.add_blood(M)
|
||||
var/turf/location = H.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(H)
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
|
||||
if(prob(30))
|
||||
M.Stun(rand(2,4))
|
||||
M.take_organ_damage(4)
|
||||
return
|
||||
else
|
||||
M.take_organ_damage(8)
|
||||
if(prob(30))
|
||||
M.Weaken(2)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
|
||||
/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/kitchen/rollingpin))
|
||||
if(cooldown < world.time - 25)
|
||||
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
cooldown = world.time
|
||||
else
|
||||
..()
|
||||
|
||||
/*
|
||||
===============~~~~~================================~~~~~====================
|
||||
= =
|
||||
= Code for trays carrying things. By Doohl for Doohl erryday Doohl Doohl~ =
|
||||
= =
|
||||
===============~~~~~================================~~~~~====================
|
||||
*/
|
||||
/obj/item/weapon/tray/proc/calc_carry()
|
||||
// calculate the weight of the items on the tray
|
||||
var/val = 0 // value to return
|
||||
|
||||
for(var/obj/item/I in carrying)
|
||||
if(I.w_class == 1.0)
|
||||
val ++
|
||||
else if(I.w_class == 2.0)
|
||||
val += 3
|
||||
else
|
||||
val += 5
|
||||
|
||||
return val
|
||||
|
||||
/obj/item/weapon/tray/pickup(mob/user)
|
||||
|
||||
if(!isturf(loc))
|
||||
return
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) )
|
||||
var/add = 0
|
||||
if(I.w_class == 1.0)
|
||||
add = 1
|
||||
else if(I.w_class == 2.0)
|
||||
add = 3
|
||||
else
|
||||
add = 5
|
||||
if(calc_carry() + add >= max_carry)
|
||||
break
|
||||
|
||||
I.loc = src
|
||||
carrying.Add(I)
|
||||
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
|
||||
|
||||
/obj/item/weapon/tray/dropped(mob/user)
|
||||
|
||||
var/mob/living/M
|
||||
for(M in src.loc) //to handle hand switching
|
||||
return
|
||||
|
||||
var/foundtable = 0
|
||||
for(var/obj/structure/table/T in loc)
|
||||
foundtable = 1
|
||||
break
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
for(var/obj/item/I in carrying)
|
||||
I.loc = loc
|
||||
carrying.Remove(I)
|
||||
if(!foundtable && isturf(loc))
|
||||
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/obj/item/weapon/material/twohanded/baseballbat
|
||||
name = "bat"
|
||||
desc = "HOME RUN!"
|
||||
icon_state = "metalbat0"
|
||||
base_icon = "metalbat"
|
||||
item_state = "metalbat"
|
||||
throwforce = 7
|
||||
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
|
||||
hitsound = 'sound/weapons/genhit3.ogg'
|
||||
default_material = "wood"
|
||||
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
|
||||
unwielded_force_divisor = 0.7 // 15 when unwielded based on above.
|
||||
|
||||
//Predefined materials go here.
|
||||
/obj/item/weapon/material/twohanded/baseballbat/metal/New(var/newloc)
|
||||
..(newloc,"steel")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/uranium/New(var/newloc)
|
||||
..(newloc,"uranium")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/gold/New(var/newloc)
|
||||
..(newloc,"gold")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/platinum/New(var/newloc)
|
||||
..(newloc,"platinum")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/diamond/New(var/newloc)
|
||||
..(newloc,"diamond")
|
||||
@@ -0,0 +1,114 @@
|
||||
/obj/item/weapon/material/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
|
||||
/*
|
||||
* Utensils
|
||||
*/
|
||||
/obj/item/weapon/material/kitchen/utensil
|
||||
w_class = 1
|
||||
thrown_force_divisor = 1
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
sharp = 1
|
||||
edge = 1
|
||||
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
|
||||
var/loaded //Descriptive string for currently loaded food object.
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/New()
|
||||
..()
|
||||
if (prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
create_reagents(5)
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(user.a_intent != I_HELP)
|
||||
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
if (reagents.total_volume > 0)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>")
|
||||
else
|
||||
M.visible_message("<span class='notice'>\The [user] feeds some [loaded] to \the [M] with \the [src].</span>")
|
||||
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
|
||||
overlays.Cut()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/fork
|
||||
name = "fork"
|
||||
desc = "It's a fork. Sure is pointy."
|
||||
icon_state = "fork"
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/fork/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spoon
|
||||
name = "spoon"
|
||||
desc = "It's a spoon. You can see your own upside-down face in it."
|
||||
icon_state = "spoon"
|
||||
attack_verb = list("attacked", "poked")
|
||||
edge = 0
|
||||
sharp = 0
|
||||
force_divisor = 0.25 //5 when wielded with weight 20 (steel)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spoon/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/*
|
||||
* Knives
|
||||
*/
|
||||
/obj/item/weapon/material/kitchen/utensil/knife
|
||||
name = "knife"
|
||||
desc = "Can cut through any food."
|
||||
icon_state = "knife"
|
||||
force_divisor = 0.2 // 12 when wielded with hardness 60 (steel)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You accidentally cut yourself with the [src]."
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You somehow managed to cut yourself with the [src]."
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/knife/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/*
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/weapon/material/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
|
||||
default_material = "wood"
|
||||
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
|
||||
thrown_force_divisor = 1 // as above
|
||||
|
||||
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red The [src] slips out of your hand and hits your head."
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(2)
|
||||
return
|
||||
return ..()
|
||||
@@ -0,0 +1,90 @@
|
||||
/obj/item/weapon/material/butterfly
|
||||
name = "butterfly knife"
|
||||
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
|
||||
icon_state = "butterflyknife"
|
||||
item_state = null
|
||||
hitsound = null
|
||||
var/active = 0
|
||||
w_class = 2
|
||||
attack_verb = list("patted", "tapped")
|
||||
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
|
||||
|
||||
/obj/item/weapon/material/butterfly/update_force()
|
||||
if(active)
|
||||
edge = 1
|
||||
sharp = 1
|
||||
..() //Updates force.
|
||||
throwforce = max(3,force-3)
|
||||
hitsound = initial(hitsound)
|
||||
icon_state += "_open"
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
else
|
||||
force = 3
|
||||
edge = 0
|
||||
sharp = 0
|
||||
hitsound = null
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
attack_verb = initial(attack_verb)
|
||||
|
||||
/obj/item/weapon/material/butterfly/switchblade
|
||||
name = "switchblade"
|
||||
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
|
||||
icon_state = "switchblade"
|
||||
unbreakable = 1
|
||||
|
||||
/obj/item/weapon/material/butterfly/attack_self(mob/user)
|
||||
active = !active
|
||||
if(active)
|
||||
user << "<span class='notice'>You flip out your [src].</span>"
|
||||
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
|
||||
else
|
||||
user << "<span class='notice'>The butterfly knife can now be concealed.</span>"
|
||||
update_force()
|
||||
add_fingerprint(user)
|
||||
|
||||
/*
|
||||
* Kitchen knives
|
||||
*/
|
||||
/obj/item/weapon/material/knife
|
||||
name = "kitchen knife"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
flags = CONDUCT
|
||||
sharp = 1
|
||||
edge = 1
|
||||
force_divisor = 0.15 // 9 when wielded with hardness 60 (steel)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 12000)
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
unbreakable = 1
|
||||
|
||||
/obj/item/weapon/material/knife/suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/material/knife/hook
|
||||
name = "meat hook"
|
||||
desc = "A sharp, metal hook what sticks into things."
|
||||
icon_state = "hook_knife"
|
||||
item_state = "hook_knife"
|
||||
|
||||
/obj/item/weapon/material/knife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/knife/butch
|
||||
name = "butcher's cleaver"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "butch"
|
||||
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
|
||||
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
@@ -0,0 +1,104 @@
|
||||
// SEE code/modules/materials/materials.dm FOR DETAILS ON INHERITED DATUM.
|
||||
// This class of weapons takes force and appearance data from a material datum.
|
||||
// They are also fragile based on material data and many can break/smash apart.
|
||||
/obj/item/weapon/material
|
||||
health = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
gender = NEUTER
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = 3
|
||||
sharp = 0
|
||||
edge = 0
|
||||
|
||||
var/applies_material_colour = 1
|
||||
var/unbreakable
|
||||
var/force_divisor = 0.5
|
||||
var/thrown_force_divisor = 0.5
|
||||
var/default_material = DEFAULT_WALL_MATERIAL
|
||||
var/material/material
|
||||
|
||||
/obj/item/weapon/material/New(var/newloc, var/material_key)
|
||||
..(newloc)
|
||||
if(!material_key)
|
||||
material_key = default_material
|
||||
set_material(material_key)
|
||||
|
||||
/obj/item/weapon/material/proc/update_force()
|
||||
if(edge || sharp)
|
||||
force = material.get_edge_damage()
|
||||
else
|
||||
force = material.get_blunt_damage()
|
||||
force = round(force*force_divisor)
|
||||
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
|
||||
//spawn(1)
|
||||
// world << "[src] has force [force] and throwforce [throwforce] when made from default material [material.name]"
|
||||
|
||||
/obj/item/weapon/material/proc/set_material(var/new_material)
|
||||
material = get_material_by_name(new_material)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
else
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
health = round(material.integrity/10)
|
||||
if(applies_material_colour)
|
||||
color = material.icon_colour
|
||||
if(material.products_need_process())
|
||||
processing_objects |= src
|
||||
update_force()
|
||||
|
||||
/obj/item/weapon/material/Destroy()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/attack()
|
||||
if(!..())
|
||||
return
|
||||
if(!unbreakable)
|
||||
if(material.is_brittle())
|
||||
health = 0
|
||||
else if(!prob(material.hardness))
|
||||
health--
|
||||
check_health()
|
||||
|
||||
/obj/item/weapon/material/proc/check_health()
|
||||
if(health<=0)
|
||||
shatter()
|
||||
|
||||
/obj/item/weapon/material/proc/shatter()
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
new material.shard_type(T)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/material/process()
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
|
||||
|
||||
/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > material.ignition_point)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
// This might need adjustment. Will work that out later.
|
||||
/obj/item/weapon/material/proc/TemperatureAct(temperature)
|
||||
if(temperature > material.ignition_point)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
var/phoronToDeduce = temperature/30
|
||||
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
health -= phoronToDeduce/100
|
||||
check_health()
|
||||
|
||||
/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(material.ignition_point && WT.remove_fuel(0, user))
|
||||
TemperatureAct(150)
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,67 @@
|
||||
/obj/item/weapon/material/harpoon
|
||||
name = "harpoon"
|
||||
sharp = 1
|
||||
edge = 1
|
||||
desc = "Tharr she blows!"
|
||||
icon_state = "harpoon"
|
||||
item_state = "harpoon"
|
||||
force_divisor = 0.3 // 18 with hardness 60 (steel)
|
||||
attack_verb = list("jabbed","stabbed","ripped")
|
||||
|
||||
/obj/item/weapon/material/hatchet
|
||||
name = "hatchet"
|
||||
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hatchet"
|
||||
force_divisor = 0.2 // 12 with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
|
||||
w_class = 2
|
||||
sharp = 1
|
||||
edge = 1
|
||||
origin_tech = "materials=2;combat=1"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/hatchet/unathiknife
|
||||
name = "duelling knife"
|
||||
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "unathiknife"
|
||||
attack_verb = list("ripped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/material/hatchet/tacknife
|
||||
name = "tactical knife"
|
||||
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Nyx."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "tacknife"
|
||||
item_state = "knife"
|
||||
attack_verb = list("stabbed", "chopped", "cut")
|
||||
applies_material_colour = 1
|
||||
|
||||
/obj/item/weapon/material/minihoe // -- Numbers
|
||||
name = "mini hoe"
|
||||
desc = "It's used for removing weeds or scratching your back."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hoe"
|
||||
item_state = "hoe"
|
||||
flags = CONDUCT | NOBLUDGEON
|
||||
force_divisor = 0.25 // 5 with weight 20 (steel)
|
||||
thrown_force_divisor = 0.25 // as above
|
||||
w_class = 2
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
/obj/item/weapon/material/scythe
|
||||
icon_state = "scythe0"
|
||||
name = "scythe"
|
||||
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
||||
force_divisor = 0.275 // 16 with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.25 // 5 with weight 20 (steel)
|
||||
sharp = 1
|
||||
edge = 1
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
w_class = 4
|
||||
flags = NOSHIELD
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "materials=2;combat=2"
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
@@ -0,0 +1,89 @@
|
||||
// Glass shards
|
||||
|
||||
/obj/item/weapon/material/shard
|
||||
name = "shard"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
desc = "Made of nothing. How does this even exist?" // set based on material, if this desc is visible it's a bug (shards default to being made of glass)
|
||||
icon_state = "large"
|
||||
sharp = 1
|
||||
edge = 1
|
||||
w_class = 2
|
||||
force_divisor = 0.2 // 6 with hardness 30 (glass)
|
||||
thrown_force_divisor = 0.4 // 4 with weight 15 (glass)
|
||||
item_state = "shard-glass"
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
default_material = "glass"
|
||||
unbreakable = 1 //It's already broken.
|
||||
|
||||
/obj/item/weapon/material/shard/suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/material/shard/set_material(var/new_material)
|
||||
..(new_material)
|
||||
if(!istype(material))
|
||||
return
|
||||
|
||||
icon_state = "[material.shard_icon][pick("large", "medium", "small")]"
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-8, 8)
|
||||
update_icon()
|
||||
|
||||
if(material.shard_type)
|
||||
name = "[material.display_name] [material.shard_type]"
|
||||
desc = "A small piece of [material.display_name]. It looks sharp, you wouldn't want to step on it barefoot. Could probably be used as ... a throwing weapon?"
|
||||
switch(material.shard_type)
|
||||
if(SHARD_SPLINTER, SHARD_SHRAPNEL)
|
||||
gender = PLURAL
|
||||
else
|
||||
gender = NEUTER
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/material/shard/update_icon()
|
||||
if(material)
|
||||
color = material.icon_colour
|
||||
// 1-(1-x)^2, so that glass shards with 0.3 opacity end up somewhat visible at 0.51 opacity
|
||||
alpha = 255 * (1 - (1 - material.opacity)*(1 - material.opacity))
|
||||
else
|
||||
color = "#ffffff"
|
||||
alpha = 255
|
||||
|
||||
/obj/item/weapon/material/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && material.shard_can_repair)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
material.place_sheet(loc)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/material/shard/Crossed(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M << "\red <B>You step on \the [src]!</B>"
|
||||
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5)) //Thick skin.
|
||||
return
|
||||
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
if(affecting.take_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
if(!(H.species && (H.species.flags & NO_PAIN)))
|
||||
H.Weaken(3)
|
||||
..()
|
||||
|
||||
// Preset types - left here for the code that uses them
|
||||
/obj/item/weapon/material/shard/shrapnel/New(loc)
|
||||
..(loc, "steel")
|
||||
|
||||
/obj/item/weapon/material/shard/phoron/New(loc)
|
||||
..(loc, "phoron glass")
|
||||
@@ -0,0 +1,30 @@
|
||||
/obj/item/weapon/material/sword
|
||||
name = "claymore"
|
||||
desc = "What are you standing around staring at this for? Get to killing!"
|
||||
icon_state = "claymore"
|
||||
item_state = "claymore"
|
||||
slot_flags = SLOT_BELT
|
||||
force_divisor = 0.7 // 42 when wielded with hardnes 60 (steel)
|
||||
thrown_force_divisor = 0.5 // 10 when thrown with weight 20 (steel)
|
||||
sharp = 1
|
||||
edge = 1
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/weapon/material/sword/IsShield()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/material/sword/suicide_act(mob/user)
|
||||
viewers(user) << "<span class='danger'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/material/sword/katana
|
||||
name = "katana"
|
||||
desc = "Woefully underpowered in D20. This one looks pretty sharp."
|
||||
icon_state = "katana"
|
||||
item_state = "katana"
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
|
||||
/obj/item/weapon/material/sword/katana/suicide_act(mob/user)
|
||||
viewers(user) << "<span class='danger'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"
|
||||
return(BRUTELOSS)
|
||||
@@ -0,0 +1,24 @@
|
||||
/obj/item/weapon/material/star
|
||||
name = "shuriken"
|
||||
desc = "A sharp, perfectly weighted piece of metal."
|
||||
icon_state = "star"
|
||||
force_divisor = 0.1 // 6 with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
|
||||
throw_speed = 10
|
||||
throw_range = 15
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
/obj/item/weapon/material/star/New()
|
||||
..()
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
|
||||
/obj/item/weapon/material/star/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(material.radioactivity>0 && istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.adjustToxLoss(rand(20,40))
|
||||
|
||||
/obj/item/weapon/material/star/ninja
|
||||
default_material = "uranium"
|
||||
+70
-74
@@ -16,53 +16,69 @@
|
||||
/*
|
||||
* Twohanded
|
||||
*/
|
||||
/obj/item/weapon/twohanded
|
||||
/obj/item/weapon/material/twohanded
|
||||
w_class = 4
|
||||
var/wielded = 0
|
||||
var/force_wielded = 0
|
||||
var/force_unwielded
|
||||
var/wieldsound = null
|
||||
var/unwieldsound = null
|
||||
var/base_icon
|
||||
var/base_name
|
||||
var/unwielded_force_divisor = 0.25
|
||||
|
||||
/obj/item/weapon/twohanded/proc/unwield()
|
||||
/obj/item/weapon/material/twohanded/proc/unwield()
|
||||
wielded = 0
|
||||
force = initial(force)
|
||||
name = "[initial(name)]"
|
||||
force = force_unwielded
|
||||
name = "[base_name]"
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/twohanded/proc/wield()
|
||||
/obj/item/weapon/material/twohanded/proc/wield()
|
||||
wielded = 1
|
||||
force = force_wielded
|
||||
name = "[initial(name)] (Wielded)"
|
||||
name = "[base_name] (Wielded)"
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/twohanded/New()
|
||||
/obj/item/weapon/material/twohanded/update_force()
|
||||
base_name = name
|
||||
if(sharp || edge)
|
||||
force_wielded = material.get_edge_damage()
|
||||
else
|
||||
force_wielded = material.get_blunt_damage()
|
||||
force_wielded = round(force_wielded*force_divisor)
|
||||
force_unwielded = round(force_wielded*unwielded_force_divisor)
|
||||
force = force_unwielded
|
||||
throwforce = round(force*thrown_force_divisor)
|
||||
//world << "[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]"
|
||||
|
||||
/obj/item/weapon/material/twohanded/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/twohanded/mob_can_equip(M as mob, slot)
|
||||
/obj/item/weapon/material/twohanded/mob_can_equip(M as mob, slot)
|
||||
//Cannot equip wielded items.
|
||||
if(wielded)
|
||||
M << "<span class='warning'>Unwield the [initial(name)] first!</span>"
|
||||
M << "<span class='warning'>Unwield the [base_name] first!</span>"
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/twohanded/dropped(mob/user as mob)
|
||||
/obj/item/weapon/material/twohanded/dropped(mob/user as mob)
|
||||
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
|
||||
if(user)
|
||||
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
|
||||
var/obj/item/weapon/material/twohanded/O = user.get_inactive_hand()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
return unwield()
|
||||
|
||||
/obj/item/weapon/twohanded/update_icon()
|
||||
/obj/item/weapon/material/twohanded/update_icon()
|
||||
icon_state = "[base_icon][wielded]"
|
||||
item_state = icon_state
|
||||
|
||||
/obj/item/weapon/twohanded/pickup(mob/user)
|
||||
/obj/item/weapon/material/twohanded/pickup(mob/user)
|
||||
unwield()
|
||||
|
||||
/obj/item/weapon/twohanded/attack_self(mob/user as mob)
|
||||
/obj/item/weapon/material/twohanded/attack_self(mob/user as mob)
|
||||
|
||||
..()
|
||||
|
||||
@@ -80,7 +96,7 @@
|
||||
if (src.unwieldsound)
|
||||
playsound(src.loc, unwieldsound, 50, 1)
|
||||
|
||||
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
|
||||
var/obj/item/weapon/material/twohanded/offhand/O = user.get_inactive_hand()
|
||||
if(O && istype(O))
|
||||
O.unwield()
|
||||
|
||||
@@ -89,13 +105,13 @@
|
||||
user << "<span class='warning'>You need your other hand to be empty</span>"
|
||||
return
|
||||
wield()
|
||||
user << "<span class='notice'>You grab the [initial(name)] with both hands.</span>"
|
||||
user << "<span class='notice'>You grab the [base_name] with both hands.</span>"
|
||||
if (src.wieldsound)
|
||||
playsound(src.loc, wieldsound, 50, 1)
|
||||
|
||||
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
|
||||
O.name = "[initial(name)] - offhand"
|
||||
O.desc = "Your second grip on the [initial(name)]"
|
||||
var/obj/item/weapon/material/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
|
||||
O.name = "[base_name] - offhand"
|
||||
O.desc = "Your second grip on the [base_name]."
|
||||
user.put_in_inactive_hand(O)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
@@ -106,56 +122,59 @@
|
||||
return
|
||||
|
||||
///////////OFFHAND///////////////
|
||||
/obj/item/weapon/twohanded/offhand
|
||||
w_class = 5.0
|
||||
/obj/item/weapon/material/twohanded/offhand
|
||||
w_class = 5
|
||||
icon_state = "offhand"
|
||||
name = "offhand"
|
||||
default_material = "placeholder"
|
||||
|
||||
unwield()
|
||||
qdel(src)
|
||||
/obj/item/weapon/material/twohanded/offhand/unwield()
|
||||
qdel(src)
|
||||
|
||||
wield()
|
||||
qdel(src)
|
||||
/obj/item/weapon/material/twohanded/offhand/wield()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/twohanded/offhand/update_icon()
|
||||
/obj/item/weapon/material/twohanded/offhand/update_icon()
|
||||
return
|
||||
|
||||
/*
|
||||
* Fireaxe
|
||||
*/
|
||||
/obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
|
||||
/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
|
||||
icon_state = "fireaxe0"
|
||||
base_icon = "fireaxe"
|
||||
name = "fire axe"
|
||||
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
|
||||
force = 15
|
||||
unwielded_force_divisor = 0.25
|
||||
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
|
||||
sharp = 1
|
||||
edge = 1
|
||||
w_class = 4.0
|
||||
slot_flags = SLOT_BACK
|
||||
force_wielded = 30
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
|
||||
/obj/item/weapon/material/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
..()
|
||||
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
|
||||
if(istype(A,/obj/structure/window)) //should just make a window.Break() proc but couldn't bother with it
|
||||
if(A && wielded)
|
||||
if(istype(A,/obj/structure/window))
|
||||
var/obj/structure/window/W = A
|
||||
W.shatter()
|
||||
else if(istype(A,/obj/structure/grille))
|
||||
qdel(A)
|
||||
else if(istype(A,/obj/effect/plant))
|
||||
var/obj/effect/plant/P = A
|
||||
P.die_off()
|
||||
|
||||
new /obj/item/weapon/shard( W.loc )
|
||||
if(W.reinf) PoolOrNew(/obj/item/stack/rods, W.loc)
|
||||
|
||||
if (W.dir == SOUTHWEST)
|
||||
new /obj/item/weapon/shard( W.loc )
|
||||
if(W.reinf) PoolOrNew(/obj/item/stack/rods, W.loc)
|
||||
qdel(A)
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Double-Bladed Energy Swords - Cheridan
|
||||
*/
|
||||
/obj/item/weapon/twohanded/dualsaber
|
||||
// Not sure what to do with this one, it won't work nicely with the material system,
|
||||
// but I don't want to copypaste all the twohanded procs..
|
||||
/obj/item/weapon/material/twohanded/dualsaber
|
||||
icon_state = "dualsaber0"
|
||||
base_icon = "dualsaber"
|
||||
name = "double-bladed energy sword"
|
||||
@@ -173,8 +192,9 @@
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharp = 1
|
||||
edge = 1
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
|
||||
/obj/item/weapon/material/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
|
||||
..()
|
||||
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
|
||||
user << "\red You twirl around a bit before losing your balance and impaling yourself on the [src]."
|
||||
@@ -186,14 +206,15 @@
|
||||
user.set_dir(i)
|
||||
sleep(1)
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/IsShield()
|
||||
/obj/item/weapon/material/twohanded/dualsaber/IsShield()
|
||||
if(wielded)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
*/
|
||||
|
||||
//spears, bay edition
|
||||
/obj/item/weapon/twohanded/spear
|
||||
/obj/item/weapon/material/twohanded/spear
|
||||
icon_state = "spearglass0"
|
||||
base_icon = "spearglass"
|
||||
name = "spear"
|
||||
@@ -201,38 +222,13 @@
|
||||
force = 10
|
||||
w_class = 4.0
|
||||
slot_flags = SLOT_BACK
|
||||
force_wielded = 22 // Was 13, Buffed - RR
|
||||
throwforce = 20
|
||||
force_wielded = 0.75 // 22 when wielded with hardness 15 (glass)
|
||||
unwielded_force_divisor = 0.65 // 14 when unwielded based on above
|
||||
thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass)
|
||||
throw_speed = 3
|
||||
edge = 0
|
||||
edge = 1
|
||||
sharp = 1
|
||||
flags = NOSHIELD
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||
|
||||
/obj/item/weapon/twohanded/baseballbat
|
||||
name = "wooden bat"
|
||||
desc = "HOME RUN!"
|
||||
icon_state = "woodbat0"
|
||||
base_icon = "woodbat"
|
||||
item_state = "woodbat"
|
||||
sharp = 0
|
||||
edge = 0
|
||||
w_class = 3
|
||||
force = 10
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
throwforce = 7
|
||||
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
|
||||
hitsound = 'sound/weapons/genhit3.ogg'
|
||||
force_wielded = 20
|
||||
|
||||
/obj/item/weapon/twohanded/baseballbat/metal
|
||||
name = "metal bat"
|
||||
desc = "A shiny metal bat."
|
||||
icon_state = "metalbat0"
|
||||
base_icon = "metalbat"
|
||||
item_state = "metalbat"
|
||||
force = 15
|
||||
w_class = 3.0
|
||||
force_wielded = 25
|
||||
default_material = "glass"
|
||||
@@ -0,0 +1,234 @@
|
||||
/* Two-handed Weapons
|
||||
* Contains:
|
||||
* Twohanded
|
||||
* Fireaxe
|
||||
* Double-Bladed Energy Swords
|
||||
*/
|
||||
|
||||
/*##################################################################
|
||||
##################### TWO HANDED WEAPONS BE HERE~ -Agouri :3 ########
|
||||
####################################################################*/
|
||||
|
||||
//Rewrote TwoHanded weapons stuff and put it all here. Just copypasta fireaxe to make new ones ~Carn
|
||||
//This rewrite means we don't have two variables for EVERY item which are used only by a few weapons.
|
||||
//It also tidies stuff up elsewhere.
|
||||
|
||||
/*
|
||||
* Twohanded
|
||||
*/
|
||||
/obj/item/weapon/material/twohanded
|
||||
w_class = 4
|
||||
var/wielded = 0
|
||||
var/force_wielded = 0
|
||||
var/force_unwielded
|
||||
var/wieldsound = null
|
||||
var/unwieldsound = null
|
||||
var/base_icon
|
||||
var/base_name
|
||||
var/unwielded_force_divisor = 0.25
|
||||
|
||||
/obj/item/weapon/material/twohanded/proc/unwield()
|
||||
wielded = 0
|
||||
force = force_unwielded
|
||||
name = "[base_name]"
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/twohanded/proc/wield()
|
||||
wielded = 1
|
||||
force = force_wielded
|
||||
name = "[base_name] (Wielded)"
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/twohanded/update_force()
|
||||
base_name = name
|
||||
if(sharp || edge)
|
||||
force_wielded = material.get_edge_damage()
|
||||
else
|
||||
force_wielded = material.get_blunt_damage()
|
||||
force_wielded = round(force_wielded*force_divisor)
|
||||
force_unwielded = round(force_wielded*unwielded_force_divisor)
|
||||
force = force_unwielded
|
||||
throwforce = round(force*thrown_force_divisor)
|
||||
//world << "[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]"
|
||||
|
||||
/obj/item/weapon/material/twohanded/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/twohanded/mob_can_equip(M as mob, slot)
|
||||
//Cannot equip wielded items.
|
||||
if(wielded)
|
||||
M << "<span class='warning'>Unwield the [base_name] first!</span>"
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/material/twohanded/dropped(mob/user as mob)
|
||||
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
|
||||
if(user)
|
||||
var/obj/item/weapon/material/twohanded/O = user.get_inactive_hand()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
return unwield()
|
||||
|
||||
/obj/item/weapon/material/twohanded/update_icon()
|
||||
icon_state = "[base_icon][wielded]"
|
||||
item_state = icon_state
|
||||
|
||||
/obj/item/weapon/material/twohanded/pickup(mob/user)
|
||||
unwield()
|
||||
|
||||
/obj/item/weapon/material/twohanded/attack_self(mob/user as mob)
|
||||
|
||||
..()
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.is_small)
|
||||
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
if(wielded) //Trying to unwield it
|
||||
unwield()
|
||||
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
|
||||
if (src.unwieldsound)
|
||||
playsound(src.loc, unwieldsound, 50, 1)
|
||||
|
||||
var/obj/item/weapon/material/twohanded/offhand/O = user.get_inactive_hand()
|
||||
if(O && istype(O))
|
||||
O.unwield()
|
||||
|
||||
else //Trying to wield it
|
||||
if(user.get_inactive_hand())
|
||||
user << "<span class='warning'>You need your other hand to be empty</span>"
|
||||
return
|
||||
wield()
|
||||
user << "<span class='notice'>You grab the [base_name] with both hands.</span>"
|
||||
if (src.wieldsound)
|
||||
playsound(src.loc, wieldsound, 50, 1)
|
||||
|
||||
var/obj/item/weapon/material/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
|
||||
O.name = "[base_name] - offhand"
|
||||
O.desc = "Your second grip on the [base_name]."
|
||||
user.put_in_inactive_hand(O)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
return
|
||||
|
||||
///////////OFFHAND///////////////
|
||||
/obj/item/weapon/material/twohanded/offhand
|
||||
w_class = 5
|
||||
icon_state = "offhand"
|
||||
name = "offhand"
|
||||
default_material = "placeholder"
|
||||
|
||||
/obj/item/weapon/material/twohanded/offhand/unwield()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/material/twohanded/offhand/wield()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/material/twohanded/offhand/update_icon()
|
||||
return
|
||||
|
||||
/*
|
||||
* Fireaxe
|
||||
*/
|
||||
/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
|
||||
icon_state = "fireaxe0"
|
||||
base_icon = "fireaxe"
|
||||
name = "fire axe"
|
||||
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
|
||||
unwielded_force_divisor = 0.25
|
||||
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
|
||||
sharp = 1
|
||||
edge = 1
|
||||
slot_flags = SLOT_BACK
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
..()
|
||||
if(A && wielded)
|
||||
if(istype(A,/obj/structure/window))
|
||||
var/obj/structure/window/W = A
|
||||
W.shatter()
|
||||
<<<<<<< HEAD:code/game/objects/items/weapons/material/twohanded.dm
|
||||
|
||||
/*
|
||||
=======
|
||||
else if(istype(A,/obj/structure/grille))
|
||||
qdel(A)
|
||||
else if(istype(A,/obj/effect/plant))
|
||||
var/obj/effect/plant/P = A
|
||||
P.die_off()
|
||||
|
||||
qdel(A)
|
||||
>>>>>>> 284d1cc1f5c67503fe0da89ce01985d73bb02038:code/game/objects/items/weapons/twohanded.dm
|
||||
/*
|
||||
* Double-Bladed Energy Swords - Cheridan
|
||||
*/
|
||||
// Not sure what to do with this one, it won't work nicely with the material system,
|
||||
// but I don't want to copypaste all the twohanded procs..
|
||||
/obj/item/weapon/material/twohanded/dualsaber
|
||||
icon_state = "dualsaber0"
|
||||
base_icon = "dualsaber"
|
||||
name = "double-bladed energy sword"
|
||||
desc = "Handle with care."
|
||||
force = 3
|
||||
throwforce = 5.0
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 2.0
|
||||
force_wielded = 30
|
||||
wieldsound = 'sound/weapons/saberon.ogg'
|
||||
unwieldsound = 'sound/weapons/saberoff.ogg'
|
||||
flags = NOSHIELD
|
||||
origin_tech = "magnets=3;syndicate=4"
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharp = 1
|
||||
edge = 1
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
|
||||
..()
|
||||
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
|
||||
user << "\red You twirl around a bit before losing your balance and impaling yourself on the [src]."
|
||||
user.take_organ_damage(20,25)
|
||||
return
|
||||
if((wielded) && prob(50))
|
||||
spawn(0)
|
||||
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2))
|
||||
user.set_dir(i)
|
||||
sleep(1)
|
||||
|
||||
/obj/item/weapon/material/twohanded/dualsaber/IsShield()
|
||||
if(wielded)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
*/
|
||||
|
||||
//spears, bay edition
|
||||
/obj/item/weapon/material/twohanded/spear
|
||||
icon_state = "spearglass0"
|
||||
base_icon = "spearglass"
|
||||
name = "spear"
|
||||
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
|
||||
slot_flags = SLOT_BACK
|
||||
force_wielded = 0.75 // 22 when wielded with hardness 15 (glass)
|
||||
unwielded_force_divisor = 0.65 // 14 when unwielded based on above
|
||||
thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass)
|
||||
throw_speed = 3
|
||||
edge = 1
|
||||
sharp = 1
|
||||
flags = NOSHIELD
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||
default_material = "glass"
|
||||
@@ -25,9 +25,7 @@
|
||||
for(var/obj/effect/O in src)
|
||||
if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
|
||||
qdel(O)
|
||||
source.reagents.reaction(src, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
|
||||
source.reagents.remove_any(1) //reaction() doesn't use up the reagents
|
||||
|
||||
source.reagents.trans_to_turf(src, 1, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
|
||||
|
||||
/obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
@@ -20,11 +20,8 @@ var/global/list/cached_icons = list()
|
||||
afterattack(turf/simulated/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(target) && reagents.total_volume > 5)
|
||||
for(var/mob/O in viewers(user))
|
||||
O.show_message("\red \The [target] has been splashed with something by [user]!", 1)
|
||||
spawn(5)
|
||||
reagents.reaction(target, TOUCH)
|
||||
reagents.remove_any(5)
|
||||
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>")
|
||||
reagents.trans_to_turf(target, 5)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -105,8 +105,11 @@
|
||||
name = "infinite-capacity power cell!"
|
||||
icon_state = "icell"
|
||||
origin_tech = null
|
||||
maxcharge = 30000
|
||||
maxcharge = 30000 //determines how badly mobs get shocked
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 80)
|
||||
|
||||
check_charge()
|
||||
return 1
|
||||
use()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
// Glass shards
|
||||
|
||||
/obj/item/weapon/shard
|
||||
name = "glass shard"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "large"
|
||||
sharp = 1
|
||||
edge = 1
|
||||
desc = "Could probably be used as ... a throwing weapon?"
|
||||
w_class = 2.0
|
||||
force = 5.0
|
||||
throwforce = 8.0
|
||||
item_state = "shard-glass"
|
||||
matter = list("glass" = 3750)
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
|
||||
/obj/item/weapon/shard/suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/shard/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/Bump()
|
||||
|
||||
spawn( 0 )
|
||||
if (prob(20))
|
||||
src.force = 15
|
||||
else
|
||||
src.force = 4
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/New()
|
||||
|
||||
src.icon_state = pick("large", "medium", "small")
|
||||
switch(src.icon_state)
|
||||
if("small")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("medium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("large")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/Crossed(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M << "\red <B>You step on \the [src]!</B>"
|
||||
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5)) //Thick skin.
|
||||
return
|
||||
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
if(affecting.take_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
if(!(H.species && (H.species.flags & NO_PAIN)))
|
||||
H.Weaken(3)
|
||||
..()
|
||||
|
||||
// Shrapnel
|
||||
|
||||
/obj/item/weapon/shard/shrapnel
|
||||
name = "shrapnel"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "shrapnellarge"
|
||||
desc = "A bunch of tiny bits of shattered metal."
|
||||
|
||||
/obj/item/weapon/shard/shrapnel/New()
|
||||
|
||||
src.icon_state = pick("shrapnellarge", "shrapnelmedium", "shrapnelsmall")
|
||||
switch(src.icon_state)
|
||||
if("shrapnelsmall")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("shrapnelmedium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("shrapnellarge")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
@@ -119,12 +119,12 @@
|
||||
//verbs += /obj/item/weapon/storage/bag/sheetsnatcher/quick_empty
|
||||
|
||||
can_be_inserted(obj/item/W as obj, stop_messages = 0)
|
||||
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/wood))
|
||||
if(!istype(W,/obj/item/stack/material) || istype(W,/obj/item/stack/material/sandstone) || istype(W,/obj/item/stack/material/wood))
|
||||
if(!stop_messages)
|
||||
usr << "The snatcher does not accept [W]."
|
||||
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
|
||||
var/current = 0
|
||||
for(var/obj/item/stack/sheet/S in contents)
|
||||
for(var/obj/item/stack/material/S in contents)
|
||||
current += S.amount
|
||||
if(capacity == current)//If it's full, you're done
|
||||
if(!stop_messages)
|
||||
@@ -135,20 +135,20 @@
|
||||
|
||||
// Modified handle_item_insertion. Would prefer not to, but...
|
||||
handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
var/obj/item/stack/material/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
var/amount
|
||||
var/inserted = 0
|
||||
var/current = 0
|
||||
for(var/obj/item/stack/sheet/S2 in contents)
|
||||
for(var/obj/item/stack/material/S2 in contents)
|
||||
current += S2.amount
|
||||
if(capacity < current + S.amount)//If the stack will fill it up
|
||||
amount = capacity - current
|
||||
else
|
||||
amount = S.amount
|
||||
|
||||
for(var/obj/item/stack/sheet/sheet in contents)
|
||||
for(var/obj/item/stack/material/sheet in contents)
|
||||
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
|
||||
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
|
||||
S.amount -= amount
|
||||
@@ -183,7 +183,7 @@
|
||||
if(display_contents_with_number)
|
||||
numbered_contents = list()
|
||||
adjusted_contents = 0
|
||||
for(var/obj/item/stack/sheet/I in contents)
|
||||
for(var/obj/item/stack/material/I in contents)
|
||||
adjusted_contents++
|
||||
var/datum/numbered_display/D = new/datum/numbered_display(I)
|
||||
D.number = I.amount
|
||||
@@ -200,9 +200,9 @@
|
||||
// Modified quick_empty verb drops appropriate sized stacks
|
||||
quick_empty()
|
||||
var/location = get_turf(src)
|
||||
for(var/obj/item/stack/sheet/S in contents)
|
||||
for(var/obj/item/stack/material/S in contents)
|
||||
while(S.amount)
|
||||
var/obj/item/stack/sheet/N = new S.type(location)
|
||||
var/obj/item/stack/material/N = new S.type(location)
|
||||
var/stacksize = min(S.amount,N.max_amount)
|
||||
N.amount = stacksize
|
||||
S.amount -= stacksize
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
// Instead of removing
|
||||
remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
var/obj/item/stack/material/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
//I would prefer to drop a new stack, but the item/attack_hand code
|
||||
@@ -224,7 +224,7 @@
|
||||
// -Sayu
|
||||
|
||||
if(S.amount > S.max_amount)
|
||||
var/obj/item/stack/sheet/temp = new S.type(src)
|
||||
var/obj/item/stack/material/temp = new S.type(src)
|
||||
temp.amount = S.amount - S.max_amount
|
||||
S.amount = S.max_amount
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
/obj/item/device/analyzer,
|
||||
/obj/item/taperoll/engineering,
|
||||
/obj/item/device/robotanalyzer,
|
||||
/obj/item/weapon/minihoe,
|
||||
/obj/item/weapon/hatchet,
|
||||
/obj/item/weapon/material/minihoe,
|
||||
/obj/item/weapon/material/hatchet,
|
||||
/obj/item/device/analyzer/plant_analyzer,
|
||||
/obj/item/weapon/extinguisher/mini
|
||||
)
|
||||
@@ -92,12 +92,9 @@
|
||||
/obj/item/weapon/storage/belt/medical/emt
|
||||
name = "EMT utility belt"
|
||||
desc = "A sturdy black webbing belt with attached pouches."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "emsbelt"
|
||||
item_state = "emsbelt"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/security
|
||||
name = "security belt"
|
||||
desc = "Can hold security gear like handcuffs and flashes."
|
||||
|
||||
@@ -53,21 +53,20 @@
|
||||
/obj/item/weapon/storage/box/survival/
|
||||
New()
|
||||
..()
|
||||
contents = list()
|
||||
sleep(1)
|
||||
new /obj/item/clothing/mask/breath( src )
|
||||
new /obj/item/weapon/tank/emergency_oxygen( src )
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/survival/vox/
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/mask/breath( src )
|
||||
new /obj/item/weapon/tank/emergency_nitrogen( src )
|
||||
|
||||
/obj/item/weapon/storage/box/engineer/
|
||||
New()
|
||||
..()
|
||||
contents = list()
|
||||
sleep(1)
|
||||
new /obj/item/clothing/mask/breath( src )
|
||||
new /obj/item/weapon/tank/emergency_oxygen/engi( src )
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/gloves
|
||||
name = "box of latex gloves"
|
||||
@@ -599,7 +598,7 @@
|
||||
icon_state = "light"
|
||||
desc = "This box is shaped on the inside so that only light tubes and bulbs fit."
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
foldable = /obj/item/stack/material/cardboard //BubbleWrap
|
||||
storage_slots=21
|
||||
can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
|
||||
max_storage_space = 42 //holds 21 items of w_class 2
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/C = W
|
||||
if(!istype(C)) return // what
|
||||
reagents.trans_to(C, (reagents.total_volume/contents.len))
|
||||
reagents.trans_to_obj(C, (reagents.total_volume/contents.len))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/W = new /obj/item/clothing/mask/smokable/cigarette(user)
|
||||
reagents.trans_to(W, (reagents.total_volume/contents.len))
|
||||
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
|
||||
user.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
reagents.maximum_volume = 15 * contents.len
|
||||
contents.len--
|
||||
@@ -213,7 +213,7 @@
|
||||
/obj/item/weapon/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W
|
||||
if(!istype(C)) return
|
||||
reagents.trans_to(C, (reagents.total_volume/contents.len))
|
||||
reagents.trans_to_obj(C, (reagents.total_volume/contents.len))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigar/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cigar/W = new /obj/item/clothing/mask/smokable/cigarette/cigar(user)
|
||||
reagents.trans_to(W, (reagents.total_volume/contents.len))
|
||||
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
|
||||
user.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
reagents.maximum_volume = 15 * contents.len
|
||||
contents.len--
|
||||
|
||||
@@ -289,3 +289,17 @@
|
||||
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/citalopram
|
||||
name = "bottle of Citalopram pills"
|
||||
desc = "Contains pills used to stabilize a patient's mood."
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/pill/citalopram( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/citalopram( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/citalopram( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/citalopram( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/citalopram( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/citalopram( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/citalopram( src )
|
||||
@@ -18,7 +18,7 @@
|
||||
storage_slots = 6
|
||||
var/startswith = 6
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
|
||||
foldable = /obj/item/stack/sheet/cardboard
|
||||
foldable = /obj/item/stack/material/cardboard
|
||||
|
||||
/obj/item/weapon/storage/box/donut/New()
|
||||
..()
|
||||
|
||||
@@ -35,12 +35,13 @@
|
||||
|
||||
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
|
||||
if(bcell)
|
||||
if(bcell.use(chrgdeductamt))
|
||||
if(bcell.checked_use(chrgdeductamt))
|
||||
return 1
|
||||
else
|
||||
status = 0
|
||||
update_icon()
|
||||
return 0
|
||||
return null
|
||||
|
||||
/obj/item/weapon/melee/baton/update_icon()
|
||||
if(status)
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
// Table parts and 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"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3750)
|
||||
flags = CONDUCT
|
||||
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
var/build_type = /obj/structure/table
|
||||
var/alter_type = /obj/item/weapon/table_parts/reinforced
|
||||
var/alter_with = /obj/item/stack/rods
|
||||
var/alter_cost = 4
|
||||
var/list/stack_types = list(/obj/item/stack/sheet/metal)
|
||||
|
||||
/obj/item/weapon/table_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
for(var/material_type in stack_types)
|
||||
new material_type(get_turf(user))
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
if(alter_type && alter_with && istype(W,alter_with))
|
||||
var/obj/item/stack/R = W
|
||||
if (R.use(alter_cost))
|
||||
var/obj/item/new_parts = new alter_type (get_turf(loc))
|
||||
user << "<span class='notice'>You modify \the [name] into \a [new_parts].</span>"
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need at least [alter_cost] sheets to reinforce the [name].</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
|
||||
if(locate(/obj/structure/table) in user.loc)
|
||||
user << "<span class='warning'>There is already a table here.</span>"
|
||||
return
|
||||
|
||||
new build_type( user.loc )
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/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"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 7500)
|
||||
flags = CONDUCT
|
||||
|
||||
stack_types = list(/obj/item/stack/sheet/metal, /obj/item/stack/rods)
|
||||
build_type = /obj/structure/table/reinforced
|
||||
alter_type = null
|
||||
alter_with = null
|
||||
alter_cost = null
|
||||
|
||||
/obj/item/weapon/table_parts/wood
|
||||
name = "wooden table parts"
|
||||
desc = "Keep away from fire."
|
||||
icon_state = "wood_tableparts"
|
||||
flags = null
|
||||
|
||||
stack_types = list(/obj/item/stack/sheet/wood)
|
||||
build_type = /obj/structure/table/woodentable
|
||||
alter_type = /obj/item/weapon/table_parts/gambling
|
||||
alter_with = /obj/item/stack/tile/carpet
|
||||
alter_cost = 1
|
||||
|
||||
/obj/item/weapon/table_parts/gambling
|
||||
name = "gambling table parts"
|
||||
desc = "Keep away from security."
|
||||
icon_state = "gamble_tableparts"
|
||||
flags = null
|
||||
|
||||
stack_types = list(/obj/item/stack/tile/carpet,/obj/item/stack/sheet/wood)
|
||||
build_type = /obj/structure/table/gamblingtable
|
||||
alter_type = null
|
||||
alter_with = null
|
||||
alter_cost = null
|
||||
|
||||
/obj/item/weapon/table_parts/gambling/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/stack/tile/carpet( get_turf(loc) )
|
||||
new /obj/item/weapon/table_parts/wood( get_turf(loc) )
|
||||
user << "<span class='notice'>You pry the carpet out of the table.</span>"
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/table_parts/rack
|
||||
name = "rack parts"
|
||||
desc = "Parts of a rack."
|
||||
icon_state = "rack_parts"
|
||||
stack_types = list(/obj/item/stack/sheet/metal)
|
||||
build_type = /obj/structure/table/rack
|
||||
alter_type = null
|
||||
alter_with = null
|
||||
alter_cost = null
|
||||
@@ -144,6 +144,29 @@
|
||||
icon_state = "emergency_double"
|
||||
volume = 10
|
||||
|
||||
/obj/item/weapon/tank/emergency_nitrogen
|
||||
name = "emergency nitrogen tank"
|
||||
desc = "An emergency air tank hastily painted red and issued to Vox crewmembers."
|
||||
icon_state = "emergency_nitro"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 2.0
|
||||
force = 4.0
|
||||
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
|
||||
volume = 2
|
||||
|
||||
New()
|
||||
..()
|
||||
src.air_contents.adjust_gas("nitrogen", (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
|
||||
return
|
||||
|
||||
|
||||
examine(mob/user)
|
||||
if(..(user, 0) && air_contents.gas["nitrogen"] < 0.2 && loc==user)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
user << sound('sound/effects/alert.ogg')
|
||||
|
||||
/*
|
||||
* Nitrogen
|
||||
*/
|
||||
|
||||
@@ -162,6 +162,10 @@
|
||||
R.add_reagent("fuel", max_fuel)
|
||||
return
|
||||
|
||||
/obj/item/weapon/weldingtool/Destroy()
|
||||
if(welding)
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/weapon/weldingtool/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
@@ -171,13 +175,13 @@
|
||||
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(welding)
|
||||
user << "\red Stop welding first!"
|
||||
user << "<span class='danger'>Stop welding first!</span>"
|
||||
return
|
||||
status = !status
|
||||
if(status)
|
||||
user << "\blue You resecure the welder."
|
||||
user << "<span class='notice'>You secure the welder.</span>"
|
||||
else
|
||||
user << "\blue The welder can now be attached and modified."
|
||||
user << "<span class='notice'>The welder can now be attached and modified.</span>"
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -207,31 +211,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/process()
|
||||
switch(welding)
|
||||
//If off
|
||||
if(0)
|
||||
if(src.icon_state != "welder") //Check that the sprite is correct, if it isnt, it means toggle() was not called
|
||||
src.force = 3
|
||||
src.damtype = "brute"
|
||||
src.icon_state = "welder"
|
||||
src.welding = 0
|
||||
processing_objects.Remove(src)
|
||||
return
|
||||
//Welders left on now use up fuel, but lets not have them run out quite that fast
|
||||
if(1)
|
||||
if(src.icon_state != "welder1") //Check that the sprite is correct, if it isnt, it means toggle() was not called
|
||||
src.force = 15
|
||||
src.damtype = "fire"
|
||||
src.icon_state = "welder1"
|
||||
if(prob(5))
|
||||
remove_fuel(1)
|
||||
|
||||
//If you're actually actively welding, use fuel faster.
|
||||
//Is this actually used or set anywhere? - Nodrak
|
||||
if(2)
|
||||
if(prob(75))
|
||||
remove_fuel(1)
|
||||
|
||||
if(welding && prob(5) && !remove_fuel(1))
|
||||
setWelding(0)
|
||||
|
||||
//I'm not sure what this does. I assume it has to do with starting fires...
|
||||
//...but it doesnt check to see if the welder is on or not.
|
||||
@@ -247,8 +228,8 @@
|
||||
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
|
||||
O.reagents.trans_to(src, max_fuel)
|
||||
user << "\blue Welder refueled"
|
||||
O.reagents.trans_to_obj(src, max_fuel)
|
||||
user << "<span class='notice'>Welder refueled</span>"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.welding)
|
||||
@@ -270,7 +251,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/attack_self(mob/user as mob)
|
||||
toggle()
|
||||
setWelding(!welding, usr)
|
||||
return
|
||||
|
||||
//Returns the amount of fuel in the welder
|
||||
@@ -280,80 +261,63 @@
|
||||
|
||||
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
|
||||
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
|
||||
if(!welding || !check_fuel())
|
||||
return 0
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("fuel", amount)
|
||||
check_fuel()
|
||||
if(M)
|
||||
eyecheck(M)
|
||||
return 1
|
||||
else
|
||||
if(M)
|
||||
M << "\blue You need more welding fuel to complete this task."
|
||||
M << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return 0
|
||||
|
||||
//Returns whether or not the welding tool is currently on.
|
||||
/obj/item/weapon/weldingtool/proc/isOn()
|
||||
return src.welding
|
||||
|
||||
/obj/item/weapon/weldingtool/update_icon()
|
||||
..()
|
||||
icon_state = welding ? "welder1" : "welder"
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1)
|
||||
//so that the welding tool updates accordingly
|
||||
/obj/item/weapon/weldingtool/proc/setWelding(var/temp_welding)
|
||||
/obj/item/weapon/weldingtool/proc/setWelding(var/set_welding, var/mob/M)
|
||||
if(!status) return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
//If we're turning it on
|
||||
if(temp_welding > 0)
|
||||
if(set_welding && !welding)
|
||||
if (remove_fuel(1))
|
||||
usr << "\blue The [src] switches on."
|
||||
if(M)
|
||||
M << "<span class='notice'>You switch the [src] on.</span>"
|
||||
else if(T)
|
||||
T.visible_message("<span class='danger'>\The [src] turns on.</span>")
|
||||
src.force = 15
|
||||
src.damtype = "fire"
|
||||
src.icon_state = "welder1"
|
||||
processing_objects.Add(src)
|
||||
src.w_class = 4
|
||||
welding = 1
|
||||
update_icon()
|
||||
processing_objects |= src
|
||||
else
|
||||
usr << "\blue Need more fuel!"
|
||||
src.welding = 0
|
||||
if(M)
|
||||
M << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
//Otherwise
|
||||
else
|
||||
usr << "\blue The [src] switches off."
|
||||
else if(!set_welding && welding)
|
||||
processing_objects -= src
|
||||
if(M)
|
||||
M << "<span class='notice'>You switch \the [src] off.</span>"
|
||||
else if(T)
|
||||
T.visible_message("<span class='warning'>\The [src] turns off.</span>")
|
||||
src.force = 3
|
||||
src.damtype = "brute"
|
||||
src.icon_state = "welder"
|
||||
src.welding = 0
|
||||
|
||||
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
|
||||
/obj/item/weapon/weldingtool/proc/check_fuel()
|
||||
if((get_fuel() <= 0) && welding)
|
||||
toggle(1)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
//Toggles the welder off and on
|
||||
/obj/item/weapon/weldingtool/proc/toggle(var/message = 0)
|
||||
if(!status) return
|
||||
src.welding = !( src.welding )
|
||||
if (src.welding)
|
||||
if (remove_fuel(1))
|
||||
usr << "\blue You switch the [src] on."
|
||||
src.force = 15
|
||||
src.damtype = "fire"
|
||||
src.icon_state = "welder1"
|
||||
src.w_class = 4
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
usr << "\blue Need more fuel!"
|
||||
src.welding = 0
|
||||
return
|
||||
else
|
||||
if(!message)
|
||||
usr << "\blue You switch the [src] off."
|
||||
else
|
||||
usr << "\blue The [src] shuts off!"
|
||||
src.force = 3
|
||||
src.damtype = "brute"
|
||||
src.icon_state = "welder"
|
||||
src.welding = 0
|
||||
src.w_class = initial(src.w_class)
|
||||
src.welding = 0
|
||||
update_icon()
|
||||
|
||||
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
|
||||
//Note: This should probably be moved to mob
|
||||
@@ -491,9 +455,9 @@
|
||||
/obj/item/weapon/screwdriver,
|
||||
/obj/item/weapon/wrench,
|
||||
/obj/item/weapon/wirecutters,
|
||||
/obj/item/weapon/kitchen/utensil/knife,
|
||||
/obj/item/weapon/kitchen/utensil/fork,
|
||||
/obj/item/weapon/hatchet
|
||||
/obj/item/weapon/material/kitchen/utensil/knife,
|
||||
/obj/item/weapon/material/kitchen/utensil/fork,
|
||||
/obj/item/weapon/material/hatchet
|
||||
)
|
||||
var/list/tools = list()
|
||||
var/current_tool = 1
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/weapon/tray
|
||||
name = "tray"
|
||||
icon = 'icons/obj/food.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
throwforce = 12.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 3.0
|
||||
flags = CONDUCT
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3000)
|
||||
var/list/carrying = list() // List of things on the tray. - Doohl
|
||||
var/max_carry = 10
|
||||
|
||||
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
|
||||
// Drop all the things. All of them.
|
||||
overlays.Cut()
|
||||
for(var/obj/item/I in carrying)
|
||||
I.loc = M.loc
|
||||
carrying.Remove(I)
|
||||
if(isturf(I.loc))
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
|
||||
if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown?
|
||||
M << "\red You accidentally slam yourself with the [src]!"
|
||||
M.Weaken(1)
|
||||
user.take_organ_damage(2)
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
return
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
|
||||
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
|
||||
|
||||
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
|
||||
|
||||
|
||||
if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
|
||||
if(prob(33))
|
||||
src.add_blood(H)
|
||||
var/turf/location = H.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(H) ///Plik plik, the sound of blood
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(prob(15))
|
||||
M.Weaken(3)
|
||||
M.take_organ_damage(3)
|
||||
else
|
||||
M.take_organ_damage(5)
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
|
||||
return
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
|
||||
return
|
||||
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
|
||||
M << "\red You get slammed in the face with the tray, against your mask!"
|
||||
if(prob(33))
|
||||
src.add_blood(H)
|
||||
if (H.wear_mask)
|
||||
H.wear_mask.add_blood(H)
|
||||
if (H.head)
|
||||
H.head.add_blood(H)
|
||||
if (H.glasses && prob(33))
|
||||
H.glasses.add_blood(H)
|
||||
var/turf/location = H.loc
|
||||
if (istype(location, /turf/simulated)) //Addin' blood! At least on the floor and item :v
|
||||
location.add_blood(H)
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
|
||||
if(prob(10))
|
||||
M.Stun(rand(1,3))
|
||||
M.take_organ_damage(3)
|
||||
return
|
||||
else
|
||||
M.take_organ_damage(5)
|
||||
return
|
||||
|
||||
else //No eye or head protection, tough luck!
|
||||
M << "\red You get slammed in the face with the tray!"
|
||||
if(prob(33))
|
||||
src.add_blood(M)
|
||||
var/turf/location = H.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(H)
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
|
||||
if(prob(30))
|
||||
M.Stun(rand(2,4))
|
||||
M.take_organ_damage(4)
|
||||
return
|
||||
else
|
||||
M.take_organ_damage(8)
|
||||
if(prob(30))
|
||||
M.Weaken(2)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
|
||||
/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/material/kitchen/rollingpin))
|
||||
if(cooldown < world.time - 25)
|
||||
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
cooldown = world.time
|
||||
else
|
||||
..()
|
||||
|
||||
/*
|
||||
===============~~~~~================================~~~~~====================
|
||||
= =
|
||||
= Code for trays carrying things. By Doohl for Doohl erryday Doohl Doohl~ =
|
||||
= =
|
||||
===============~~~~~================================~~~~~====================
|
||||
*/
|
||||
/obj/item/weapon/tray/proc/calc_carry()
|
||||
// calculate the weight of the items on the tray
|
||||
var/val = 0 // value to return
|
||||
|
||||
for(var/obj/item/I in carrying)
|
||||
if(I.w_class == 1.0)
|
||||
val ++
|
||||
else if(I.w_class == 2.0)
|
||||
val += 3
|
||||
else
|
||||
val += 5
|
||||
|
||||
return val
|
||||
|
||||
/obj/item/weapon/tray/pickup(mob/user)
|
||||
|
||||
if(!isturf(loc))
|
||||
return
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) )
|
||||
var/add = 0
|
||||
if(I.w_class == 1.0)
|
||||
add = 1
|
||||
else if(I.w_class == 2.0)
|
||||
add = 3
|
||||
else
|
||||
add = 5
|
||||
if(calc_carry() + add >= max_carry)
|
||||
break
|
||||
|
||||
I.loc = src
|
||||
carrying.Add(I)
|
||||
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
|
||||
|
||||
/obj/item/weapon/tray/dropped(mob/user)
|
||||
|
||||
var/mob/living/M
|
||||
for(M in src.loc) //to handle hand switching
|
||||
return
|
||||
|
||||
var/foundtable = 0
|
||||
for(var/obj/structure/table/T in loc)
|
||||
foundtable = 1
|
||||
break
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
for(var/obj/item/I in carrying)
|
||||
I.loc = loc
|
||||
carrying.Remove(I)
|
||||
if(!foundtable && isturf(loc))
|
||||
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
@@ -89,215 +89,6 @@
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/claymore
|
||||
name = "claymore"
|
||||
desc = "What are you standing around staring at this for? Get to killing!"
|
||||
icon_state = "claymore"
|
||||
item_state = "claymore"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 40
|
||||
throwforce = 10
|
||||
sharp = 1
|
||||
edge = 1
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
IsShield()
|
||||
return 1
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "<span class='danger'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/katana
|
||||
name = "katana"
|
||||
desc = "Woefully underpowered in D20"
|
||||
icon_state = "katana"
|
||||
item_state = "katana"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
force = 40
|
||||
throwforce = 10
|
||||
sharp = 1
|
||||
edge = 1
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "<span class='danger'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/katana/IsShield()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/katana/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/harpoon
|
||||
name = "harpoon"
|
||||
sharp = 1
|
||||
edge = 0
|
||||
desc = "Tharr she blows!"
|
||||
icon_state = "harpoon"
|
||||
item_state = "harpoon"
|
||||
force = 20
|
||||
throwforce = 15
|
||||
w_class = 3
|
||||
attack_verb = list("jabbed","stabbed","ripped")
|
||||
|
||||
/obj/item/weapon/butterfly
|
||||
name = "butterfly knife"
|
||||
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
|
||||
icon_state = "butterflyknife"
|
||||
item_state = null
|
||||
hitsound = null
|
||||
var/active = 0
|
||||
w_class = 2
|
||||
force = 2
|
||||
sharp = 0
|
||||
edge = 0
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
throwforce = 7
|
||||
attack_verb = list("patted", "tapped")
|
||||
|
||||
/obj/item/butterflyconstruction
|
||||
name = "unfinished concealed knife"
|
||||
desc = "An unfinished concealed knife, it looks like the screws need to be tightened."
|
||||
icon = 'icons/obj/buildingobject.dmi'
|
||||
icon_state = "butterflystep1"
|
||||
|
||||
/obj/item/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
user << "You finish the concealed blade weapon."
|
||||
new /obj/item/weapon/butterfly(user.loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/butterflyblade
|
||||
name = "knife blade"
|
||||
desc = "A knife blade. Unusable as a weapon without a grip."
|
||||
icon = 'icons/obj/buildingobject.dmi'
|
||||
icon_state = "butterfly2"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 5000)
|
||||
|
||||
/obj/item/butterflyhandle
|
||||
name = "concealed knife grip"
|
||||
desc = "A plasteel grip with screw fittings for a blade."
|
||||
icon = 'icons/obj/buildingobject.dmi'
|
||||
icon_state = "butterfly1"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 4000)
|
||||
|
||||
/obj/item/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/butterflyblade))
|
||||
user << "You attach the two concealed blade parts."
|
||||
new /obj/item/butterflyconstruction(user.loc)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
return
|
||||
update_icon(user)
|
||||
|
||||
/obj/item/weapon/butterfly/switchblade
|
||||
name = "switchblade"
|
||||
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
|
||||
icon_state = "switchblade"
|
||||
|
||||
/obj/item/weapon/butterfly/attack_self(mob/user)
|
||||
active = !active
|
||||
if(active)
|
||||
user << "<span class='notice'>You flip out your [src].</span>"
|
||||
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
|
||||
force = 15 //bay adjustments
|
||||
throwforce = 12
|
||||
edge = 1
|
||||
sharp = 1
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
icon_state += "_open"
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
else
|
||||
user << "<span class='notice'>The butterfly knife can now be concealed.</span>"
|
||||
force = initial(force)
|
||||
edge = 0
|
||||
sharp = 0
|
||||
hitsound = initial(hitsound)
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
attack_verb = initial(attack_verb)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
obj/item/weapon/wirerod
|
||||
name = "wired rod"
|
||||
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
|
||||
icon_state = "wiredrod"
|
||||
item_state = "rods"
|
||||
flags = CONDUCT
|
||||
force = 8
|
||||
throwforce = 10
|
||||
w_class = 3
|
||||
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
|
||||
|
||||
|
||||
obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
|
||||
..()
|
||||
if(istype(I, /obj/item/weapon/shard))
|
||||
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
|
||||
|
||||
user.put_in_hands(S)
|
||||
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
update_icon(user)
|
||||
|
||||
else if(istype(I, /obj/item/weapon/wirecutters))
|
||||
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
|
||||
|
||||
user.put_in_hands(P)
|
||||
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
update_icon(user)
|
||||
update_icon(user)
|
||||
|
||||
/obj/item/weapon/star
|
||||
name = "shuriken"
|
||||
desc = "A sharp, perfectly weighted piece of metal."
|
||||
icon_state = "star"
|
||||
force = 5
|
||||
throw_speed = 10
|
||||
throwforce = 15
|
||||
throw_range = 15
|
||||
sharp = 1
|
||||
edge = 1
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 500)
|
||||
|
||||
var/poisoned = 0
|
||||
|
||||
/obj/item/weapon/star/New()
|
||||
..()
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
|
||||
//TODO: consider making this something done with reagents.
|
||||
/obj/item/weapon/star/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(poisoned && istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.adjustToxLoss(rand(20,40))
|
||||
poisoned = 0
|
||||
color = null
|
||||
|
||||
/obj/item/weapon/star/ninja
|
||||
color = "#007700"
|
||||
poisoned = 1
|
||||
|
||||
/obj/item/weapon/energy_net
|
||||
name = "energy net"
|
||||
desc = "It's a net made of green energy."
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
else
|
||||
if(T.welding)
|
||||
user << "\red That was close!"
|
||||
src.reagents.trans_to(W, T.max_fuel)
|
||||
src.reagents.trans_to_obj(W, T.max_fuel)
|
||||
user << "\blue Welder refilled!"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
@@ -38,7 +38,7 @@
|
||||
if(!proximity) // this replaces and improves the get_dist(src,O) <= 1 checks used previously
|
||||
return
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume < max_fuel)
|
||||
O.reagents.trans_to(src, max_fuel)
|
||||
O.reagents.trans_to_obj(src, max_fuel)
|
||||
user << "\blue You crack the cap off the top of the pack and fill it back up again from the tank."
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
|
||||
@@ -158,15 +158,15 @@
|
||||
spawn_nothing_percentage = 50
|
||||
item_to_spawn()
|
||||
return pick(prob(3);/obj/item/weapon/storage/pill_bottle/tramadol,\
|
||||
prob(4);/obj/item/weapon/haircomb/fluff/cado_keppel_1,\
|
||||
prob(4);/obj/item/weapon/haircomb,\
|
||||
prob(2);/obj/item/weapon/storage/pill_bottle/happy,\
|
||||
prob(2);/obj/item/weapon/storage/pill_bottle/zoom,\
|
||||
prob(5);/obj/item/weapon/contraband/poster,\
|
||||
prob(2);/obj/item/weapon/butterfly,\
|
||||
prob(3);/obj/item/butterflyblade,\
|
||||
prob(3);/obj/item/butterflyhandle,\
|
||||
prob(3);/obj/item/weapon/wirerod,\
|
||||
prob(1);/obj/item/weapon/butterfly/switchblade,\
|
||||
prob(2);/obj/item/weapon/material/butterfly,\
|
||||
prob(3);/obj/item/weapon/material/butterflyblade,\
|
||||
prob(3);/obj/item/weapon/material/butterflyhandle,\
|
||||
prob(3);/obj/item/weapon/material/wirerod,\
|
||||
prob(1);/obj/item/weapon/material/butterfly/switchblade,\
|
||||
prob(1);/obj/item/weapon/reagent_containers/syringe/drugs)
|
||||
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/proc/can_climb(var/mob/living/user)
|
||||
if (!can_touch(user) || !climbable || (user in climbers))
|
||||
/obj/structure/proc/can_climb(var/mob/living/user, post_climb_check=0)
|
||||
if (!can_touch(user) || !climbable || (!post_climb_check && (user in climbers)))
|
||||
return 0
|
||||
|
||||
if (!user.Adjacent(src))
|
||||
@@ -115,7 +115,7 @@
|
||||
climbers -= user
|
||||
return
|
||||
|
||||
if (!can_climb(user))
|
||||
if (!can_climb(user, post_climb_check=1))
|
||||
climbers -= user
|
||||
return
|
||||
|
||||
@@ -192,5 +192,6 @@
|
||||
if(!breakable || !damage || !wallbreaker)
|
||||
return 0
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
|
||||
user.do_attack_animation(src)
|
||||
spawn(1) qdel(src)
|
||||
return 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/coatrack.dmi'
|
||||
icon_state = "coatrack0"
|
||||
var/obj/item/clothing/suit/coat
|
||||
var/list/allowed = list(/obj/item/clothing/suit/storage/labcoat, /obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/det_suit)
|
||||
var/list/allowed = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/det_suit)
|
||||
|
||||
/obj/structure/coatrack/attack_hand(mob/user as mob)
|
||||
user.visible_message("[user] takes [coat] off \the [src].", "You take [coat] off the \the [src]")
|
||||
|
||||
@@ -24,9 +24,39 @@
|
||||
|
||||
/obj/structure/closet/initialize()
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
for(var/obj/item/I in src.loc)
|
||||
var/obj/item/I
|
||||
for(I in src.loc)
|
||||
if(I.density || I.anchored || I == src) continue
|
||||
I.loc = src
|
||||
// adjust locker size to hold all items with 5 units of free store room
|
||||
var/content_size = 0
|
||||
for(I in src.contents)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
if(content_size > storage_capacity-5)
|
||||
storage_capacity = content_size + 5
|
||||
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
if(get_dist(src, user) > 1)
|
||||
return ..(user)
|
||||
|
||||
if(opened)
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(!I.anchored)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
if(!content_size)
|
||||
user << "It is empty."
|
||||
else if(storage_capacity > content_size*4)
|
||||
user << "It is barely filled."
|
||||
else if(storage_capacity > content_size*2)
|
||||
user << "It is less than half full."
|
||||
else if(storage_capacity > content_size)
|
||||
user << "There is still some free space."
|
||||
else
|
||||
user << "It is full."
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
@@ -202,7 +232,7 @@
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
new /obj/item/stack/material/steel(src.loc)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
|
||||
qdel(src)
|
||||
@@ -305,6 +335,7 @@
|
||||
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
dump_contents()
|
||||
spawn(1) qdel(src)
|
||||
@@ -329,25 +360,25 @@
|
||||
escapee.next_move = world.time + 100
|
||||
escapee.last_special = world.time + 100
|
||||
escapee << "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>"
|
||||
|
||||
|
||||
visible_message("<span class='danger'>The [src] begins to shake violently!</span>")
|
||||
|
||||
breakout = 1 //can't think of a better way to do this right now.
|
||||
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
animate_shake()
|
||||
|
||||
|
||||
if(!do_after(escapee, 50)) //5 seconds
|
||||
breakout = 0
|
||||
return
|
||||
if(!escapee || escapee.stat || escapee.loc != src)
|
||||
if(!escapee || escapee.stat || escapee.loc != src)
|
||||
breakout = 0
|
||||
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!req_breakout())
|
||||
breakout = 0
|
||||
return
|
||||
|
||||
|
||||
//Well then break it!
|
||||
breakout = 0
|
||||
escapee << "<span class='warning'>You successfully break out!</span>"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/obj/structure/closet/fireaxecabinet
|
||||
name = "fire axe cabinet"
|
||||
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
|
||||
var/obj/item/weapon/twohanded/fireaxe/fireaxe
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/fireaxe
|
||||
icon_state = "fireaxe1000"
|
||||
icon_closed = "fireaxe1000"
|
||||
icon_opened = "fireaxe1100"
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
fireaxe = new /obj/item/weapon/twohanded/fireaxe(src)
|
||||
fireaxe = new /obj/item/weapon/material/twohanded/fireaxe(src)
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
//..() //That's very useful, Erro
|
||||
@@ -55,7 +55,7 @@
|
||||
src.localopened = 1
|
||||
update_icon()
|
||||
return
|
||||
if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
|
||||
if (istype(O, /obj/item/weapon/material/twohanded/fireaxe) && src.localopened)
|
||||
if(!fireaxe)
|
||||
if(O:wielded)
|
||||
user << "\red Unwield the axe first."
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
new /obj/item/device/analyzer/plant_analyzer(src)
|
||||
new /obj/item/device/radio/headset/headset_service(src)
|
||||
new /obj/item/clothing/head/greenbandana(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/material/minihoe(src)
|
||||
new /obj/item/weapon/material/hatchet(src)
|
||||
new /obj/item/weapon/wirecutters/clippers(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(access_medical_equip)
|
||||
|
||||
|
||||
New()
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3
|
||||
name = "medical doctor's locker"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(access_medical_equip)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
@@ -187,7 +187,7 @@
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
req_access = list(access_medical)
|
||||
req_access = list(access_medical_equip)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall/update_icon()
|
||||
if(broken)
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "security officer's locker"
|
||||
req_access = list(access_security)
|
||||
req_access = list(access_brig)
|
||||
icon_state = "sec1"
|
||||
icon_closed = "sec"
|
||||
icon_locked = "sec1"
|
||||
@@ -286,8 +286,8 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
|
||||
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
|
||||
new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src)
|
||||
new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
|
||||
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
|
||||
health -= I.force
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
|
||||
if(health <= 0)
|
||||
for(var/mob/M in src)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
|
||||
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
@@ -86,35 +86,35 @@
|
||||
|
||||
//Metal (common ore)
|
||||
if(pickednum >= 2)
|
||||
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
|
||||
new /obj/item/stack/material/steel(src, rand(common_min, common_max))
|
||||
|
||||
//Glass (common ore)
|
||||
if(pickednum >= 5)
|
||||
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
|
||||
new /obj/item/stack/material/glass(src, rand(common_min, common_max))
|
||||
|
||||
//Plasteel (common ore) Because it has a million more uses then phoron
|
||||
if(pickednum >= 10)
|
||||
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
|
||||
new /obj/item/stack/material/plasteel(src, rand(common_min, common_max))
|
||||
|
||||
//Phoron (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/sheet/mineral/phoron(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/phoron(src, rand(rare_min, rare_max))
|
||||
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/silver(src, rand(rare_min, rare_max))
|
||||
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/gold(src, rand(rare_min, rare_max))
|
||||
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/uranium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/diamond(src, rand(rare_min, rare_max))
|
||||
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
@@ -127,14 +127,14 @@
|
||||
|
||||
New()
|
||||
var/list/resources = list(
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/mineral/gold,
|
||||
/obj/item/stack/sheet/mineral/silver,
|
||||
/obj/item/stack/sheet/mineral/phoron,
|
||||
/obj/item/stack/sheet/mineral/uranium,
|
||||
/obj/item/stack/sheet/mineral/diamond,
|
||||
/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/material/steel,
|
||||
/obj/item/stack/material/glass,
|
||||
/obj/item/stack/material/gold,
|
||||
/obj/item/stack/material/silver,
|
||||
/obj/item/stack/material/phoron,
|
||||
/obj/item/stack/material/uranium,
|
||||
/obj/item/stack/material/diamond,
|
||||
/obj/item/stack/material/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/material/minihoe(src)
|
||||
// new /obj/item/weapon/weedspray(src)
|
||||
// new /obj/item/weapon/weedspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/stack/sheet/wood(src)
|
||||
new /obj/item/stack/material/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/O in contents)
|
||||
O.loc = T
|
||||
@@ -23,44 +23,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/largecrate/mule
|
||||
icon_state = "mulecrate"
|
||||
|
||||
/obj/structure/largecrate/lisa
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/lisa/attackby(obj/item/weapon/W as obj, mob/user as mob) //ugly but oh well
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /mob/living/simple_animal/corgi/Lisa(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/cow
|
||||
name = "cow crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/cow/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /mob/living/simple_animal/cow(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/goat
|
||||
name = "goat crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/goat/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /mob/living/simple_animal/hostile/retaliate/goat(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/chick
|
||||
name = "chicken crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/chick/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
var/num = rand(4, 6)
|
||||
for(var/i = 0, i < num, i++)
|
||||
new /mob/living/simple_animal/chick(loc)
|
||||
..()
|
||||
name = "MULE crate"
|
||||
|
||||
/obj/structure/largecrate/hoverpod
|
||||
name = "\improper Hoverpod assembly crate"
|
||||
@@ -71,9 +34,43 @@
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME
|
||||
var/obj/mecha/working/hoverpod/H = new (loc)
|
||||
|
||||
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
|
||||
ME.attach(H)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
|
||||
ME.attach(H)
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/animal
|
||||
icon_state = "mulecrate"
|
||||
var/held_count = 1
|
||||
var/held_type
|
||||
|
||||
/obj/structure/largecrate/animal/New()
|
||||
..()
|
||||
for(var/i = 1;i<=held_count;i++)
|
||||
new held_type(src)
|
||||
|
||||
/obj/structure/largecrate/animal/corgi
|
||||
name = "corgi carrier"
|
||||
held_type = /mob/living/simple_animal/corgi
|
||||
|
||||
/obj/structure/largecrate/animal/cow
|
||||
name = "cow crate"
|
||||
held_type = /mob/living/simple_animal/cow
|
||||
|
||||
/obj/structure/largecrate/animal/goat
|
||||
name = "goat crate"
|
||||
held_type = /mob/living/simple_animal/hostile/retaliate/goat
|
||||
|
||||
/obj/structure/largecrate/animal/cat
|
||||
name = "cat carrier"
|
||||
held_type = /mob/living/simple_animal/cat
|
||||
|
||||
/obj/structure/largecrate/animal/cat/bones
|
||||
held_type = /mob/living/simple_animal/cat/fluff/bones
|
||||
|
||||
/obj/structure/largecrate/animal/chick
|
||||
name = "chicken crate"
|
||||
held_count = 5
|
||||
held_type = /mob/living/simple_animal/chick
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/displaycase/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/obj/structure/displaycase/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
|
||||
/obj/structure/displaycase/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
qdel(src)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
update_icon()
|
||||
else
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You welded the [glass] plating off!"
|
||||
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
|
||||
var/M = text2path("/obj/item/stack/material/[glass]")
|
||||
new M(src.loc, 2)
|
||||
glass = 0
|
||||
else if(glass == 1)
|
||||
@@ -158,14 +158,14 @@
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You welded the glass panel out!"
|
||||
new /obj/item/stack/sheet/glass/reinforced(src.loc)
|
||||
new /obj/item/stack/material/glass/reinforced(src.loc)
|
||||
glass = 0
|
||||
else if(!anchored)
|
||||
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You dissasembled the airlock assembly!"
|
||||
new /obj/item/stack/sheet/metal(src.loc, 4)
|
||||
new /obj/item/stack/material/steel(src.loc, 4)
|
||||
qdel (src)
|
||||
else
|
||||
user << "\blue You need more welding fuel."
|
||||
@@ -235,19 +235,19 @@
|
||||
electronics.loc = src.loc
|
||||
electronics = null
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet) && !glass)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
else if(istype(W, /obj/item/stack/material) && !glass)
|
||||
var/obj/item/stack/material/S = W
|
||||
if (S)
|
||||
if (S.get_amount() >= 1)
|
||||
if(istype(S, /obj/item/stack/sheet/glass/reinforced))
|
||||
if(istype(S, /obj/item/stack/material/glass/reinforced))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 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) && !glass)
|
||||
if (S.use(1))
|
||||
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
|
||||
glass = 1
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
else if(istype(S, /obj/item/stack/material) && S.default_type)
|
||||
var/M = S.default_type
|
||||
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
|
||||
if(M in list("mhydrogen","osmium","tritium","platinum","iron"))
|
||||
user << "You cannot make an airlock out of that material."
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
return 0
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
spawn(1) dismantle()
|
||||
return 1
|
||||
@@ -105,13 +106,13 @@
|
||||
health = 50
|
||||
cover = 25
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet))
|
||||
else if(istype(W, /obj/item/stack/material))
|
||||
|
||||
var/obj/item/stack/sheet/S = W
|
||||
var/obj/item/stack/material/S = W
|
||||
if(S.get_amount() < 2)
|
||||
return ..()
|
||||
|
||||
var/material/M = name_to_material[S.sheettype]
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
@@ -171,7 +172,7 @@
|
||||
user << "\The [src] is already reinforced."
|
||||
return
|
||||
|
||||
var/obj/item/stack/sheet/S = user.l_hand
|
||||
var/obj/item/stack/material/S = user.l_hand
|
||||
if(!istype(S))
|
||||
S = user.r_hand
|
||||
if(!istype(S))
|
||||
@@ -182,7 +183,7 @@
|
||||
user << "There is not enough material here to reinforce the girder."
|
||||
return
|
||||
|
||||
var/material/M = name_to_material[S.sheettype]
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
if(!istype(M) || M.integrity < 50)
|
||||
user << "You cannot reinforce \the [src] with that; it is too soft."
|
||||
return
|
||||
@@ -197,7 +198,7 @@
|
||||
|
||||
|
||||
/obj/structure/girder/proc/dismantle()
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
new /obj/item/stack/material/steel(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
/obj/structure/grille/attack_hand(mob/user as mob)
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.do_attack_animation(src)
|
||||
|
||||
var/damage_dealt = 1
|
||||
var/attack_message = "kicks"
|
||||
@@ -114,8 +115,8 @@
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/ST = W
|
||||
else if(istype(W,/obj/item/stack/material/glass))
|
||||
var/obj/item/stack/material/glass/ST = W
|
||||
var/dir_to_set = 1
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
@@ -153,9 +154,10 @@
|
||||
return
|
||||
//window placing end
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard))
|
||||
else if(istype(W, /obj/item/weapon/material/shard))
|
||||
health -= W.force * 0.1
|
||||
else if(!shock(user, 70))
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
@@ -217,6 +219,7 @@
|
||||
|
||||
/obj/structure/grille/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
|
||||
user.do_attack_animation(src)
|
||||
health -= damage
|
||||
spawn(1) healthcheck()
|
||||
return 1
|
||||
|
||||
@@ -111,10 +111,12 @@
|
||||
if(isobserver(usr)) //to stop ghosts from deflating
|
||||
return
|
||||
|
||||
verbs -= /obj/structure/inflatable/verb/hand_deflate
|
||||
deflate()
|
||||
|
||||
/obj/structure/inflatable/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
health -= damage
|
||||
user.do_attack_animation(src)
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] [attack_verb] open the [src]!</span>")
|
||||
spawn(1) deflate(1)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(I, 5) //
|
||||
reagents.trans_to_obj(I, 5) //
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
return
|
||||
@@ -186,7 +186,7 @@
|
||||
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume > 1)
|
||||
reagents.trans_to(I, 2)
|
||||
reagents.trans_to_obj(I, 2)
|
||||
user << "<span class='notice'>You wet [I] in the [callme].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/lamarr/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
if (2)
|
||||
@@ -35,13 +35,13 @@
|
||||
|
||||
/obj/structure/lamarr/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/lamarr/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
Break()
|
||||
else
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
//NOT using the existing /obj/machinery/door type, since that has some complications on its own, mainly based on its
|
||||
//machineryness
|
||||
|
||||
/obj/structure/mineral_door
|
||||
name = "mineral door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 1
|
||||
|
||||
icon = 'icons/obj/doors/mineral_doors.dmi'
|
||||
icon_state = "metal"
|
||||
|
||||
var/mineralType = DEFAULT_WALL_MATERIAL
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/hardness = 1
|
||||
var/oreAmount = 7
|
||||
|
||||
New(location)
|
||||
..()
|
||||
icon_state = mineralType
|
||||
name = "[mineralType] door"
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
Destroy()
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
return TryToSwitchState(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
else
|
||||
SwitchState()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
|
||||
proc/Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
proc/Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
update_icon()
|
||||
if(state)
|
||||
icon_state = "[mineralType]open"
|
||||
else
|
||||
icon_state = mineralType
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
user << "You start digging the [name]."
|
||||
if(do_after(user,digTool.digspeed*hardness) && src)
|
||||
user << "You finished digging."
|
||||
Dismantle()
|
||||
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
|
||||
hardness -= W.force/100
|
||||
user << "You hit the [name] with your [W.name]!"
|
||||
CheckHardness()
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
Dismantle(1)
|
||||
|
||||
proc/Dismantle(devastated = 0)
|
||||
var/material/M = name_to_material[mineralType]
|
||||
if(istype(M))
|
||||
for(var/i = (devastated? 1 : 3), i <= oreAmount, i++)
|
||||
new M.stack_type(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Dismantle(1)
|
||||
if(2)
|
||||
if(prob(20))
|
||||
Dismantle(1)
|
||||
else
|
||||
hardness--
|
||||
CheckHardness()
|
||||
if(3)
|
||||
hardness -= 0.1
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
mineralType = "iron"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/silver
|
||||
mineralType = "silver"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/gold
|
||||
mineralType = "gold"
|
||||
|
||||
/obj/structure/mineral_door/uranium
|
||||
mineralType = "uranium"
|
||||
hardness = 3
|
||||
light_range = 2
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
mineralType = "sandstone"
|
||||
hardness = 0.5
|
||||
|
||||
/obj/structure/mineral_door/transparent
|
||||
opacity = 0
|
||||
|
||||
Close()
|
||||
..()
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/mineral_door/transparent/phoron
|
||||
mineralType = "phoron"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
TemperatureAct(100)
|
||||
..()
|
||||
|
||||
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
proc/TemperatureAct(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
var/phoronToDeduce = temperature/10
|
||||
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
|
||||
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
|
||||
hardness -= phoronToDeduce/100
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/mineral_door/transparent/diamond
|
||||
mineralType = "diamond"
|
||||
hardness = 10
|
||||
|
||||
/obj/structure/mineral_door/wood
|
||||
mineralType = "wood"
|
||||
hardness = 1
|
||||
|
||||
Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/doorcreaky.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/doorcreaky.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Dismantle(devastated = 0)
|
||||
if(!devastated)
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new/obj/item/stack/sheet/wood(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mineral_door/resin
|
||||
mineralType = "resin"
|
||||
hardness = 1.5
|
||||
var/close_delay = 100
|
||||
|
||||
TryToSwitchState(atom/user)
|
||||
|
||||
var/mob/living/carbon/M = user
|
||||
if(istype(M) && locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)
|
||||
return ..()
|
||||
|
||||
Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
spawn(close_delay)
|
||||
if(!isSwitchingStates && state == 1)
|
||||
Close()
|
||||
|
||||
Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Dismantle(devastated = 0)
|
||||
qdel(src)
|
||||
|
||||
CheckHardness()
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
..()
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
|
||||
|
||||
user.do_attack_animation(src)
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return 0
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(I, 5)
|
||||
reagents.trans_to_obj(I, 5)
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/obj/structure/simple_door
|
||||
name = "door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
icon = 'icons/obj/doors/material_doors.dmi'
|
||||
icon_state = "metal"
|
||||
|
||||
var/material/material
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/hardness = 1
|
||||
var/oreAmount = 7
|
||||
|
||||
/obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > material.ignition_point)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
/obj/structure/simple_door/proc/TemperatureAct(temperature)
|
||||
if(temperature > material.ignition_point)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
var/phoronToDeduce = temperature/10
|
||||
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
hardness -= phoronToDeduce/100
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/simple_door/New(var/newloc, var/material_name)
|
||||
..()
|
||||
if(!material_name)
|
||||
material_name = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(material_name)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
hardness = max(1,round(material.integrity/10))
|
||||
icon_state = material.door_icon_base
|
||||
name = "[material.display_name] door"
|
||||
color = material.icon_colour
|
||||
if(material.opacity < 0.5)
|
||||
opacity = 0
|
||||
else
|
||||
opacity = 1
|
||||
if(material.products_need_process())
|
||||
processing_objects |= src
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
/obj/structure/simple_door/Destroy()
|
||||
processing_objects -= src
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
/obj/structure/simple_door/Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
return TryToSwitchState(user)
|
||||
return
|
||||
|
||||
/obj/structure/simple_door/attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/simple_door/attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/simple_door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
/obj/structure/simple_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
if(!material.can_open_material_door(user))
|
||||
return
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
return
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
else
|
||||
SwitchState()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
/obj/structure/simple_door/proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
|
||||
/obj/structure/simple_door/proc/Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, material.dooropen_noise, 100, 1)
|
||||
flick("[material.door_icon_base]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
/obj/structure/simple_door/proc/Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, material.dooropen_noise, 100, 1)
|
||||
flick("[material.door_icon_base]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
/obj/structure/simple_door/update_icon()
|
||||
if(state)
|
||||
icon_state = "[material.door_icon_base]open"
|
||||
else
|
||||
icon_state = material.door_icon_base
|
||||
|
||||
/obj/structure/simple_door/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
user << "You start digging the [name]."
|
||||
if(do_after(user,digTool.digspeed*hardness) && src)
|
||||
user << "You finished digging."
|
||||
Dismantle()
|
||||
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
|
||||
hardness -= W.force/100
|
||||
user << "You hit the [name] with your [W.name]!"
|
||||
CheckHardness()
|
||||
else if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(material.ignition_point && WT.remove_fuel(0, user))
|
||||
TemperatureAct(150)
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/structure/simple_door/proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
Dismantle(1)
|
||||
|
||||
/obj/structure/simple_door/proc/Dismantle(devastated = 0)
|
||||
material.place_dismantled_product(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/simple_door/ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Dismantle(1)
|
||||
if(2)
|
||||
if(prob(20))
|
||||
Dismantle(1)
|
||||
else
|
||||
hardness--
|
||||
CheckHardness()
|
||||
if(3)
|
||||
hardness -= 0.1
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
/obj/structure/simple_door/process()
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
|
||||
|
||||
/obj/structure/simple_door/iron/New(var/newloc,var/material_name)
|
||||
..(newloc, "iron")
|
||||
|
||||
/obj/structure/simple_door/silver/New(var/newloc,var/material_name)
|
||||
..(newloc, "silver")
|
||||
|
||||
/obj/structure/simple_door/gold/New(var/newloc,var/material_name)
|
||||
..(newloc, "gold")
|
||||
|
||||
/obj/structure/simple_door/uranium/New(var/newloc,var/material_name)
|
||||
..(newloc, "uranium")
|
||||
|
||||
/obj/structure/simple_door/sandstone/New(var/newloc,var/material_name)
|
||||
..(newloc, "sandstone")
|
||||
|
||||
/obj/structure/simple_door/phoron/New(var/newloc,var/material_name)
|
||||
..(newloc, "phoron")
|
||||
|
||||
/obj/structure/simple_door/diamond/New(var/newloc,var/material_name)
|
||||
..(newloc, "diamond")
|
||||
|
||||
/obj/structure/simple_door/wood/New(var/newloc,var/material_name)
|
||||
..(newloc, "wood")
|
||||
|
||||
/obj/structure/simple_door/resin/New(var/newloc,var/material_name)
|
||||
..(newloc, "resin")
|
||||
@@ -16,6 +16,22 @@
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
var/material/material
|
||||
var/apply_cosmetics = 1
|
||||
|
||||
/obj/structure/bed/New(var/newloc, var/new_material)
|
||||
..(newloc)
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
|
||||
material = get_material_by_name(new_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
return
|
||||
if(apply_cosmetics)
|
||||
color = material.icon_colour
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
desc = "[initial(desc)] It's made of [material.display_name]."
|
||||
|
||||
/obj/structure/bed/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -33,13 +49,13 @@
|
||||
|
||||
/obj/structure/bed/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/weapon/grab))
|
||||
user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>")
|
||||
@@ -54,14 +70,23 @@
|
||||
..()
|
||||
|
||||
/obj/structure/bed/psych
|
||||
name = "psychiatrists couch"
|
||||
name = "psychiatrist's couch"
|
||||
desc = "For prime comfort during psychiatric evaluations."
|
||||
icon_state = "psychbed"
|
||||
apply_cosmetics = 0
|
||||
|
||||
/obj/structure/bed/psych/New(var/newloc)
|
||||
..(newloc,"leather")
|
||||
|
||||
/obj/structure/bed/alien
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
||||
icon_state = "abed"
|
||||
apply_cosmetics = 0
|
||||
|
||||
|
||||
/obj/structure/bed/alien/New(var/newloc)
|
||||
..(newloc,"resin")
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
@@ -71,6 +96,7 @@
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
apply_cosmetics = 0
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/roller_holder))
|
||||
|
||||
@@ -3,11 +3,10 @@
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon_state = "chair"
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
/obj/structure/bed/chair/New()
|
||||
..()
|
||||
/obj/structure/bed/chair/New(var/newloc, var/material)
|
||||
..(newloc, material) //Todo make metal/stone chairs display as thrones
|
||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||
update_layer()
|
||||
return
|
||||
@@ -20,7 +19,7 @@
|
||||
user << "<span class='notice'>[SK] is not ready to be attached!</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
|
||||
var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
E.set_dir(dir)
|
||||
E.part = SK
|
||||
@@ -71,24 +70,21 @@
|
||||
icon_state = "wooden_chair"
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
apply_cosmetics = 0
|
||||
|
||||
/obj/structure/bed/chair/wood/New(var/newloc)
|
||||
..(newloc, "wood")
|
||||
|
||||
/obj/structure/bed/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings"
|
||||
|
||||
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/wood(src.loc)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255,255,255)
|
||||
var/image/armrest = null
|
||||
apply_cosmetics = 0
|
||||
|
||||
/obj/structure/bed/chair/comfy/New()
|
||||
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
||||
@@ -129,6 +125,7 @@
|
||||
/obj/structure/bed/chair/office
|
||||
anchored = 0
|
||||
buckle_movable = 1
|
||||
apply_cosmetics = 0
|
||||
|
||||
/obj/structure/bed/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
@@ -1,18 +1,80 @@
|
||||
//Todo: add leather and cloth for arbitrary coloured stools.
|
||||
var/global/list/stool_cache = list() //haha stool
|
||||
|
||||
/obj/item/weapon/stool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "stool"
|
||||
icon_state = "stool_preview" //set for the map
|
||||
force = 10
|
||||
throwforce = 10
|
||||
w_class = 5
|
||||
var/base_icon = "stool_base"
|
||||
var/material/material
|
||||
var/material/padding_material
|
||||
|
||||
/obj/item/weapon/stool/padded
|
||||
icon_state = "stool_padded_preview" //set for the map
|
||||
|
||||
/obj/item/weapon/stool/New(var/newloc, var/new_material, var/new_padding_material)
|
||||
..(newloc)
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(new_material)
|
||||
if(new_padding_material)
|
||||
padding_material = get_material_by_name(new_padding_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
return
|
||||
force = round(material.get_blunt_damage()*0.4)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/stool/padded/New(var/newloc, var/new_material)
|
||||
..(newloc, "steel", "leather")
|
||||
|
||||
/obj/item/weapon/stool/update_icon()
|
||||
// Prep icon.
|
||||
icon_state = "stool"
|
||||
overlays.Cut()
|
||||
// Base icon.
|
||||
var/cache_key = "stool-[material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
var/image/I = image('icons/obj/objects.dmi', base_icon)
|
||||
color = material.icon_colour
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
overlays |= stool_cache[cache_key]
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "stool-padding-[padding_material.name]"
|
||||
if(isnull(stool_cache[padding_cache_key]))
|
||||
var/image/I = image('icons/obj/objects.dmi', "stool_padding")
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
overlays |= stool_cache[padding_cache_key]
|
||||
// Strings.
|
||||
if(padding_material)
|
||||
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
|
||||
desc = "A padded stool. Apply butt. It's made of [material.display_name] and covered with [padding_material.display_name]."
|
||||
else
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
desc = "A stool. Apply butt with care. It's made of [material.display_name]."
|
||||
|
||||
/obj/item/weapon/stool/proc/add_padding(var/padding_type)
|
||||
padding_material = get_material_by_name(padding_type)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/stool/proc/remove_padding()
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
padding_material = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if (prob(5) && istype(M,/mob/living))
|
||||
user.visible_message("\red [user] breaks [src] over [M]'s back!")
|
||||
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!</span>")
|
||||
user.remove_from_mob(src)
|
||||
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
|
||||
m.loc = get_turf(src)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
var/mob/living/T = M
|
||||
T.Weaken(10)
|
||||
@@ -36,12 +98,53 @@
|
||||
|
||||
/obj/item/weapon/stool/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stool/proc/dismantle()
|
||||
if(material)
|
||||
material.place_sheet(get_turf(src))
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
qdel(src)
|
||||
..()
|
||||
dismantle()
|
||||
qdel(src)
|
||||
else if(istype(W,/obj/item/stack))
|
||||
if(padding_material)
|
||||
user << "\The [src] is already padded."
|
||||
return
|
||||
var/obj/item/stack/C = W
|
||||
if(C.get_amount() < 1) // How??
|
||||
user.drop_from_inventory(C)
|
||||
qdel(C)
|
||||
return
|
||||
var/padding_type //This is awful but it needs to be like this until tiles are given a material var.
|
||||
if(istype(W,/obj/item/stack/tile/carpet))
|
||||
padding_type = "carpet"
|
||||
else if(istype(W,/obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = W
|
||||
if(M.material && (M.material.name in list("leather", "cloth")))
|
||||
padding_type = "[M.material.name]"
|
||||
if(!padding_type)
|
||||
user << "You cannot pad \the [src] with that."
|
||||
return
|
||||
C.use(1)
|
||||
if(!istype(src.loc, /turf))
|
||||
user.drop_from_inventory(src)
|
||||
src.loc = get_turf(src)
|
||||
user << "You add padding to \the [src]."
|
||||
add_padding(padding_type)
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!padding_material)
|
||||
user << "\The [src] has no padding to remove."
|
||||
return
|
||||
user << "You remove the padding from \the [src]."
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
remove_padding()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -1,558 +0,0 @@
|
||||
// Tables and racks.
|
||||
|
||||
/obj/structure/table
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "table"
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 2.8
|
||||
throwpass = 1
|
||||
climbable = 1
|
||||
breakable = 1
|
||||
parts = /obj/item/weapon/table_parts
|
||||
|
||||
var/flipped = 0
|
||||
var/health = 100
|
||||
|
||||
/obj/structure/table/woodentable
|
||||
name = "wooden table"
|
||||
desc = "Do not apply fire to this. Rumour says it burns easily."
|
||||
icon_state = "wood_table"
|
||||
parts = /obj/item/weapon/table_parts/wood
|
||||
health = 50
|
||||
|
||||
/obj/structure/table/gamblingtable
|
||||
name = "gambling table"
|
||||
desc = "A curved wooden table with a thin carpet of green fabric."
|
||||
icon_state = "gamble_table"
|
||||
parts = /obj/item/weapon/table_parts/gambling
|
||||
health = 50
|
||||
|
||||
/obj/structure/table/reinforced
|
||||
icon_state = "reinf_table"
|
||||
health = 200
|
||||
parts = /obj/item/weapon/table_parts/reinforced
|
||||
|
||||
/obj/structure/table/rack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
health = 100
|
||||
parts = /obj/item/weapon/table_parts/rack
|
||||
flipped = -1 //Cannot flip.
|
||||
|
||||
/obj/structure/table/examine()
|
||||
..()
|
||||
if(health > 100)
|
||||
usr << "This one looks like it has been reinforced."
|
||||
|
||||
/obj/structure/table/proc/update_adjacent()
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
if(locate(/obj/structure/table,get_step(src,direction)))
|
||||
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
|
||||
T.update_icon()
|
||||
|
||||
/obj/structure/table/New()
|
||||
..()
|
||||
for(var/obj/structure/table/T in src.loc)
|
||||
if(T != src)
|
||||
qdel(T)
|
||||
update_icon()
|
||||
update_adjacent()
|
||||
|
||||
/obj/structure/table/Destroy()
|
||||
update_adjacent()
|
||||
..()
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
|
||||
if(health > 100)
|
||||
name = "reinforced [initial(name)]"
|
||||
|
||||
spawn(2) //So it properly updates when deleting
|
||||
|
||||
if(flipped == 1)
|
||||
var/type = 0
|
||||
var/tabledirs = 0
|
||||
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
|
||||
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
|
||||
if (T && T.flipped == 1 && T.dir == src.dir)
|
||||
type++
|
||||
tabledirs |= direction
|
||||
var/base = "table"
|
||||
if (istype(src, /obj/structure/table/woodentable))
|
||||
base = "wood"
|
||||
if (istype(src, /obj/structure/table/reinforced))
|
||||
base = "rtable"
|
||||
|
||||
icon_state = "[base]flip[type]"
|
||||
if (type==1)
|
||||
if (tabledirs & turn(dir,90))
|
||||
icon_state = icon_state+"-"
|
||||
if (tabledirs & turn(dir,-90))
|
||||
icon_state = icon_state+"+"
|
||||
return 1
|
||||
|
||||
var/dir_sum = 0
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
var/skip_sum = 0
|
||||
for(var/obj/structure/window/W in src.loc)
|
||||
if(W.dir == direction) //So smooth tables don't go smooth through windows
|
||||
skip_sum = 1
|
||||
continue
|
||||
var/inv_direction //inverse direction
|
||||
switch(direction)
|
||||
if(1)
|
||||
inv_direction = 2
|
||||
if(2)
|
||||
inv_direction = 1
|
||||
if(4)
|
||||
inv_direction = 8
|
||||
if(8)
|
||||
inv_direction = 4
|
||||
if(5)
|
||||
inv_direction = 10
|
||||
if(6)
|
||||
inv_direction = 9
|
||||
if(9)
|
||||
inv_direction = 6
|
||||
if(10)
|
||||
inv_direction = 5
|
||||
for(var/obj/structure/window/W in get_step(src,direction))
|
||||
if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile
|
||||
skip_sum = 1
|
||||
continue
|
||||
if(!skip_sum) //means there is a window between the two tiles in this direction
|
||||
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
|
||||
if(T && T.flipped == 0) // This should let us ignore racks for table icons/flipping. Should.
|
||||
if(direction <5)
|
||||
dir_sum += direction
|
||||
else
|
||||
if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north)
|
||||
dir_sum += 16
|
||||
if(direction == 6)
|
||||
dir_sum += 32
|
||||
if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal
|
||||
dir_sum += 8
|
||||
if(direction == 10)
|
||||
dir_sum += 64
|
||||
if(direction == 9)
|
||||
dir_sum += 128
|
||||
|
||||
var/table_type = 0 //stand_alone table
|
||||
if(dir_sum%16 in cardinal)
|
||||
table_type = 1 //endtable
|
||||
dir_sum %= 16
|
||||
if(dir_sum%16 in list(3,12))
|
||||
table_type = 2 //1 tile thick, streight table
|
||||
if(dir_sum%16 == 3) //3 doesn't exist as a dir
|
||||
dir_sum = 2
|
||||
if(dir_sum%16 == 12) //12 doesn't exist as a dir.
|
||||
dir_sum = 4
|
||||
if(dir_sum%16 in list(5,6,9,10))
|
||||
if(locate(/obj/structure/table,get_step(src.loc,dir_sum%16)))
|
||||
table_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables)
|
||||
else
|
||||
table_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on)
|
||||
dir_sum %= 16
|
||||
if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection
|
||||
table_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal
|
||||
switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal
|
||||
if(7)
|
||||
if(dir_sum == 23)
|
||||
table_type = 6
|
||||
dir_sum = 8
|
||||
else if(dir_sum == 39)
|
||||
dir_sum = 4
|
||||
table_type = 6
|
||||
else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183)
|
||||
dir_sum = 4
|
||||
table_type = 3
|
||||
else
|
||||
dir_sum = 4
|
||||
if(11)
|
||||
if(dir_sum == 75)
|
||||
dir_sum = 5
|
||||
table_type = 6
|
||||
else if(dir_sum == 139)
|
||||
dir_sum = 9
|
||||
table_type = 6
|
||||
else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235)
|
||||
dir_sum = 8
|
||||
table_type = 3
|
||||
else
|
||||
dir_sum = 8
|
||||
if(13)
|
||||
if(dir_sum == 29)
|
||||
dir_sum = 10
|
||||
table_type = 6
|
||||
else if(dir_sum == 141)
|
||||
dir_sum = 6
|
||||
table_type = 6
|
||||
else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157)
|
||||
dir_sum = 1
|
||||
table_type = 3
|
||||
else
|
||||
dir_sum = 1
|
||||
if(14)
|
||||
if(dir_sum == 46)
|
||||
dir_sum = 1
|
||||
table_type = 6
|
||||
else if(dir_sum == 78)
|
||||
dir_sum = 2
|
||||
table_type = 6
|
||||
else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126)
|
||||
dir_sum = 2
|
||||
table_type = 3
|
||||
else
|
||||
dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state.
|
||||
if(dir_sum%16 == 15)
|
||||
table_type = 4 //4-way intersection, the 'middle' table sprites will be used.
|
||||
|
||||
if(istype(src,/obj/structure/table/reinforced))
|
||||
switch(table_type)
|
||||
if(0)
|
||||
icon_state = "reinf_table"
|
||||
if(1)
|
||||
icon_state = "reinf_1tileendtable"
|
||||
if(2)
|
||||
icon_state = "reinf_1tilethick"
|
||||
if(3)
|
||||
icon_state = "reinf_tabledir"
|
||||
if(4)
|
||||
icon_state = "reinf_middle"
|
||||
if(5)
|
||||
icon_state = "reinf_tabledir2"
|
||||
if(6)
|
||||
icon_state = "reinf_tabledir3"
|
||||
else if(istype(src,/obj/structure/table/woodentable))
|
||||
switch(table_type)
|
||||
if(0)
|
||||
icon_state = "wood_table"
|
||||
if(1)
|
||||
icon_state = "wood_1tileendtable"
|
||||
if(2)
|
||||
icon_state = "wood_1tilethick"
|
||||
if(3)
|
||||
icon_state = "wood_tabledir"
|
||||
if(4)
|
||||
icon_state = "wood_middle"
|
||||
if(5)
|
||||
icon_state = "wood_tabledir2"
|
||||
if(6)
|
||||
icon_state = "wood_tabledir3"
|
||||
else if(istype(src,/obj/structure/table/gamblingtable))
|
||||
switch(table_type)
|
||||
if(0)
|
||||
icon_state = "gamble_table"
|
||||
if(1)
|
||||
icon_state = "gamble_1tileendtable"
|
||||
if(2)
|
||||
icon_state = "gamble_1tilethick"
|
||||
if(3)
|
||||
icon_state = "gamble_tabledir"
|
||||
if(4)
|
||||
icon_state = "gamble_middle"
|
||||
if(5)
|
||||
icon_state = "gamble_tabledir2"
|
||||
if(6)
|
||||
icon_state = "gamble_tabledir3"
|
||||
else
|
||||
switch(table_type)
|
||||
if(0)
|
||||
icon_state = "table"
|
||||
if(1)
|
||||
icon_state = "table_1tileendtable"
|
||||
if(2)
|
||||
icon_state = "table_1tilethick"
|
||||
if(3)
|
||||
icon_state = "tabledir"
|
||||
if(4)
|
||||
icon_state = "table_middle"
|
||||
if(5)
|
||||
icon_state = "tabledir2"
|
||||
if(6)
|
||||
icon_state = "tabledir3"
|
||||
if (dir_sum in list(1,2,4,8,5,6,9,10))
|
||||
set_dir(dir_sum)
|
||||
else
|
||||
set_dir(2)
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
return (check_cover(mover,target))
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
if (flipped == 1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
||||
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||
var/turf/cover
|
||||
if(flipped==1)
|
||||
cover = get_turf(src)
|
||||
else if(flipped==0)
|
||||
cover = get_step(loc, get_dir(from, loc))
|
||||
if(!cover)
|
||||
return 1
|
||||
if (get_dist(P.starting, loc) <= 1) //Tables won't help you if people are THIS close
|
||||
return 1
|
||||
if (get_turf(P.original) == cover)
|
||||
var/chance = 20
|
||||
if (ismob(P.original))
|
||||
var/mob/M = P.original
|
||||
if (M.lying)
|
||||
chance += 20 //Lying down lets you catch less bullets
|
||||
if(flipped==1)
|
||||
if(get_dir(loc, from) == dir) //Flipped tables catch mroe bullets
|
||||
chance += 20
|
||||
else
|
||||
return 1 //But only from one side
|
||||
if(prob(chance))
|
||||
health -= P.damage/2
|
||||
if (health > 0)
|
||||
visible_message("<span class='warning'>[P] hits \the [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
visible_message("<span class='warning'>[src] breaks down!</span>")
|
||||
qdel(src)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if (flipped==1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return ..()
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if (O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (!W) return
|
||||
|
||||
// Handle harm intent grabbing/tabling.
|
||||
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
if (G.state < 2)
|
||||
if(user.a_intent == I_HURT)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = "head")
|
||||
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||
else
|
||||
user << "<span class='danger'>You need a better grip to do that!</span>"
|
||||
return
|
||||
else
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("<span class='danger'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
// Handle dissembly.
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if(health > 100)
|
||||
user << "<span class='danger'>\The [src] is too well constructed to be collapsed. Weaken it first.</span>"
|
||||
return
|
||||
user << "<span class='notice'>You locate the bolts and begin disassembling \the [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user,50))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// Handle weakening.
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
if(initial(health)>100)
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(src.health>100)
|
||||
user << "<span class='notice'>You start weakening \the [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(!do_after(user, 50) || !src || health<100 || !WT.isOn())
|
||||
return
|
||||
user << "<span class='notice'>You have weakened \the [src].</span>"
|
||||
health -= 100
|
||||
else if(src.health <= 100)
|
||||
user << "<span class='notice'>You start strengthening \the [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(!do_after(user, 50) || !src || health > 100 || !WT.isOn())
|
||||
return
|
||||
user << "<span class='notice'>You have strengthened \the [src].</span>"
|
||||
health += 100
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='notice'>\The [src] is too flimsy to be reinforced or weakened.</span>"
|
||||
return
|
||||
|
||||
|
||||
// Handle dismantling or placing things on the table from here on.
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
user.visible_message("<span class='danger'>The [src] was sliced apart by [user]!</span>")
|
||||
qdel(src)
|
||||
|
||||
user.drop_item(src.loc)
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(var/direction)
|
||||
var/obj/structure/table/T
|
||||
for(var/angle in list(-90,90))
|
||||
T = locate() in get_step(src.loc,turn(direction,angle))
|
||||
if(T && T.flipped == 0)
|
||||
return 0
|
||||
T = locate() in get_step(src.loc,direction)
|
||||
if (!T || T.flipped == 1)
|
||||
return 1
|
||||
if (istype(T,/obj/structure/table/reinforced/))
|
||||
var/obj/structure/table/reinforced/R = T
|
||||
if (R.health > 100)
|
||||
return 0
|
||||
return T.straight_table_check(direction)
|
||||
|
||||
/obj/structure/table/verb/do_flip()
|
||||
set name = "Flip table"
|
||||
set desc = "Flips a non-reinforced table"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr) || ismouse(usr))
|
||||
return
|
||||
|
||||
if(flipped < 0 || !flip(get_cardinal_dir(usr,src)))
|
||||
usr << "<span class='notice'>It won't budge.</span>"
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
|
||||
|
||||
if(climbable)
|
||||
structure_shaken()
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/unflipping_check(var/direction)
|
||||
|
||||
for(var/mob/M in oview(src,0))
|
||||
return 0
|
||||
|
||||
var/obj/occupied = turf_is_crowded()
|
||||
if(occupied)
|
||||
usr << "There's \a [occupied] in the way."
|
||||
return 0
|
||||
|
||||
var/list/L = list()
|
||||
if(direction)
|
||||
L.Add(direction)
|
||||
else
|
||||
L.Add(turn(src.dir,-90))
|
||||
L.Add(turn(src.dir,90))
|
||||
for(var/new_dir in L)
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,new_dir)
|
||||
if(T)
|
||||
if(T.flipped == 1 && T.dir == src.dir && !T.unflipping_check(new_dir))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/do_put()
|
||||
set name = "Put table back"
|
||||
set desc = "Puts flipped table back"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr))
|
||||
return
|
||||
|
||||
if (!unflipping_check())
|
||||
usr << "<span class='notice'>It won't budge.</span>"
|
||||
return
|
||||
unflip()
|
||||
|
||||
/obj/structure/table/proc/flip(var/direction)
|
||||
if( !straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)) )
|
||||
return 0
|
||||
|
||||
verbs -=/obj/structure/table/verb/do_flip
|
||||
verbs +=/obj/structure/table/proc/do_put
|
||||
|
||||
var/list/targets = list(get_step(src,dir),get_step(src,turn(dir, 45)),get_step(src,turn(dir, -45)))
|
||||
for (var/atom/movable/A in get_turf(src))
|
||||
if (!A.anchored)
|
||||
spawn(0)
|
||||
A.throw_at(pick(targets),1,1)
|
||||
|
||||
set_dir(direction)
|
||||
if(dir != NORTH)
|
||||
layer = 5
|
||||
climbable = 0 //flipping tables allows them to be used as makeshift barriers
|
||||
flipped = 1
|
||||
flags |= ON_BORDER
|
||||
for(var/D in list(turn(direction, 90), turn(direction, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src,D)
|
||||
if(T && T.flipped == 0)
|
||||
T.flip(direction)
|
||||
update_icon()
|
||||
update_adjacent()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/unflip()
|
||||
verbs -=/obj/structure/table/proc/do_put
|
||||
verbs +=/obj/structure/table/verb/do_flip
|
||||
|
||||
layer = initial(layer)
|
||||
flipped = 0
|
||||
climbable = initial(climbable)
|
||||
flags &= ~ON_BORDER
|
||||
for(var/D in list(turn(dir, 90), turn(dir, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,D)
|
||||
if(T && T.flipped == 1 && T.dir == src.dir)
|
||||
T.unflip()
|
||||
update_icon()
|
||||
update_adjacent()
|
||||
|
||||
return 1
|
||||
|
||||
// No need to handle any of this, racks are not contiguous..
|
||||
/obj/structure/table/rack/update_icon()
|
||||
return
|
||||
/obj/structure/table/rack/update_adjacent()
|
||||
return
|
||||
@@ -34,7 +34,7 @@ obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
|
||||
set_dir(start_dir)
|
||||
else //If the user is facing northeast. northwest, southeast, southwest or north, default to north
|
||||
set_dir(NORTH)
|
||||
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
obj/structure/windoor_assembly/Destroy()
|
||||
@@ -76,7 +76,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You dissasembled the windoor assembly!"
|
||||
new /obj/item/stack/sheet/glass/reinforced(get_turf(src), 5)
|
||||
new /obj/item/stack/material/glass/reinforced(get_turf(src), 5)
|
||||
if(secure)
|
||||
PoolOrNew(/obj/item/stack/rods, list(get_turf(src), 4))
|
||||
qdel(src)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/state = 2
|
||||
var/reinf = 0
|
||||
var/basestate
|
||||
var/shardtype = /obj/item/weapon/shard
|
||||
var/shardtype = /obj/item/weapon/material/shard
|
||||
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
|
||||
var/silicate = 0 // number of units of silicate
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
var/index = null
|
||||
index = 0
|
||||
while(index < 2)
|
||||
new shardtype(loc)
|
||||
new shardtype(loc) //todo pooling?
|
||||
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
|
||||
index++
|
||||
else
|
||||
new shardtype(loc)
|
||||
new shardtype(loc) //todo pooling?
|
||||
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -178,6 +178,7 @@
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
user.do_attack_animation(src)
|
||||
shatter()
|
||||
|
||||
else if (usr.a_intent == I_HURT)
|
||||
@@ -189,13 +190,14 @@
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
||||
"\red You bang against the [src.name]!", \
|
||||
user.do_attack_animation(src)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!",
|
||||
"\red You bang against the [src.name]!",
|
||||
"You hear a banging sound.")
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].", \
|
||||
"You knock on the [src.name].", \
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].",
|
||||
"You knock on the [src.name].",
|
||||
"You hear a knocking sound.")
|
||||
return
|
||||
|
||||
@@ -207,6 +209,7 @@
|
||||
take_damage(damage)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||
user.do_attack_animation(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
|
||||
@@ -262,13 +265,14 @@
|
||||
else
|
||||
visible_message("<span class='notice'>[user] dismantles \the [src].</span>")
|
||||
if(dir == SOUTHWEST)
|
||||
var/obj/item/stack/sheet/mats = new glasstype(loc)
|
||||
var/obj/item/stack/material/mats = new glasstype(loc)
|
||||
mats.amount = is_fulltile() ? 4 : 2
|
||||
else
|
||||
new glasstype(loc)
|
||||
qdel(src)
|
||||
else
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
user.do_attack_animation(src)
|
||||
hit(W.force)
|
||||
if(health <= 7)
|
||||
anchored = 0
|
||||
@@ -398,7 +402,7 @@
|
||||
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
|
||||
icon_state = "window"
|
||||
basestate = "window"
|
||||
glasstype = /obj/item/stack/sheet/glass
|
||||
glasstype = /obj/item/stack/material/glass
|
||||
|
||||
|
||||
/obj/structure/window/phoronbasic
|
||||
@@ -406,8 +410,8 @@
|
||||
desc = "A phoron-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
|
||||
basestate = "phoronwindow"
|
||||
icon_state = "phoronwindow"
|
||||
shardtype = /obj/item/weapon/shard/phoron
|
||||
glasstype = /obj/item/stack/sheet/glass/phoronglass
|
||||
shardtype = /obj/item/weapon/material/shard/phoron
|
||||
glasstype = /obj/item/stack/material/glass/phoronglass
|
||||
maxhealth = 120
|
||||
|
||||
/obj/structure/window/phoronbasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
@@ -420,8 +424,8 @@
|
||||
desc = "A phoron-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic phoron windows are insanely fireproof."
|
||||
basestate = "phoronrwindow"
|
||||
icon_state = "phoronrwindow"
|
||||
shardtype = /obj/item/weapon/shard/phoron
|
||||
glasstype = /obj/item/stack/sheet/glass/phoronrglass
|
||||
shardtype = /obj/item/weapon/material/shard/phoron
|
||||
glasstype = /obj/item/stack/material/glass/phoronrglass
|
||||
reinf = 1
|
||||
maxhealth = 160
|
||||
|
||||
@@ -435,7 +439,7 @@
|
||||
basestate = "rwindow"
|
||||
maxhealth = 40
|
||||
reinf = 1
|
||||
glasstype = /obj/item/stack/sheet/glass/reinforced
|
||||
glasstype = /obj/item/stack/material/glass/reinforced
|
||||
|
||||
/obj/structure/window/New(Loc, constructed=0)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user