@@ -47,7 +47,7 @@
|
||||
return 0
|
||||
|
||||
if(prob(5))
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
for(var/obj/O in target)
|
||||
if(prob(20) && !(resistance_flags & UNACIDABLE))
|
||||
@@ -82,7 +82,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
if(prob(45))
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, 1)
|
||||
target_strength--
|
||||
if(target_strength <= 0)
|
||||
target.visible_message("<span class='warning'>[target] collapses under its own weight into a puddle of goop and undigested debris!</span>")
|
||||
|
||||
@@ -113,9 +113,9 @@
|
||||
/obj/effect/anomaly/grav/Bumped(mob/A)
|
||||
gravShock(A)
|
||||
|
||||
/obj/effect/anomaly/grav/proc/gravShock(mob/A)
|
||||
/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
|
||||
if(boing && isliving(A) && !A.stat)
|
||||
A.Weaken(2)
|
||||
A.Knockdown(40)
|
||||
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
|
||||
A.throw_at(target, 5, 1)
|
||||
boing = 0
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
/obj/effect/decal/cleanable/crayon
|
||||
name = "rune"
|
||||
desc = "Graffiti. Damn kids."
|
||||
icon = 'icons/effects/crayondecal.dmi'
|
||||
icon_state = "rune1"
|
||||
gender = NEUTER
|
||||
var/do_icon_rotate = TRUE
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main = "#FFFFFF", var/type = "rune1", var/e_name = "rune", var/rotation = 0, var/alt_icon = null)
|
||||
..()
|
||||
/obj/effect/decal/cleanable/crayon
|
||||
name = "rune"
|
||||
desc = "Graffiti. Damn kids."
|
||||
icon = 'icons/effects/crayondecal.dmi'
|
||||
icon_state = "rune1"
|
||||
gender = NEUTER
|
||||
var/do_icon_rotate = TRUE
|
||||
|
||||
name = e_name
|
||||
desc = "A [name] vandalizing the station."
|
||||
if(type == "poseur tag")
|
||||
type = pick(GLOB.gang_name_pool)
|
||||
|
||||
if(alt_icon)
|
||||
icon = alt_icon
|
||||
icon_state = type
|
||||
|
||||
if(rotation && do_icon_rotate)
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(rotation)
|
||||
src.transform = M
|
||||
|
||||
add_atom_colour(main, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang
|
||||
layer = HIGH_OBJ_LAYER //Harder to hide
|
||||
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
|
||||
var/datum/gang/gang
|
||||
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main = "#FFFFFF", var/type = "rune1", var/e_name = "rune", var/rotation = 0, var/alt_icon = null)
|
||||
..()
|
||||
|
||||
name = e_name
|
||||
desc = "A [name] vandalizing the station."
|
||||
if(type == "poseur tag")
|
||||
type = pick(GLOB.gang_name_pool)
|
||||
|
||||
if(alt_icon)
|
||||
icon = alt_icon
|
||||
icon_state = type
|
||||
|
||||
if(rotation && do_icon_rotate)
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(rotation)
|
||||
src.transform = M
|
||||
|
||||
add_atom_colour(main, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang
|
||||
layer = HIGH_OBJ_LAYER //Harder to hide
|
||||
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
|
||||
var/datum/gang/gang
|
||||
var/datum/mind/user_mind
|
||||
var/area/territory
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/Initialize(mapload, var/datum/gang/G, var/e_name = "gang tag", var/rotation = 0, var/mob/user)
|
||||
if(!type || !G)
|
||||
qdel(src)
|
||||
if(!type || !G)
|
||||
qdel(src)
|
||||
user_mind = user.mind
|
||||
territory = get_area(src)
|
||||
gang = G
|
||||
var/newcolor = G.color_hex
|
||||
icon_state = G.name
|
||||
G.territory_new |= list(territory.type = territory.name)
|
||||
gang = G
|
||||
var/newcolor = G.color_hex
|
||||
icon_state = G.name
|
||||
G.territory_new |= list(territory.type = territory.name)
|
||||
//If this isn't tagged by a specific gangster there's no bonus income.
|
||||
set_mind_owner(user_mind)
|
||||
..(mapload, newcolor, icon_state, e_name, rotation)
|
||||
|
||||
..(mapload, newcolor, icon_state, e_name, rotation)
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/proc/set_mind_owner(datum/mind/mind)
|
||||
if(istype(user_mind) && istype(gang) && islist(gang.tags_by_mind[user_mind])) //Clear us out of old ownership
|
||||
gang.tags_by_mind[user_mind] -= src
|
||||
@@ -55,10 +55,10 @@
|
||||
gang.tags_by_mind[mind] += src
|
||||
user_mind = mind
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/Destroy()
|
||||
if(gang)
|
||||
gang.territory -= territory.type
|
||||
/obj/effect/decal/cleanable/crayon/gang/Destroy()
|
||||
if(gang)
|
||||
gang.territory -= territory.type
|
||||
set_mind_owner(null)
|
||||
gang.territory_new -= territory.type
|
||||
gang.territory_lost |= list(territory.type = territory.name)
|
||||
return ..()
|
||||
gang.territory_new -= territory.type
|
||||
gang.territory_lost |= list(territory.type = territory.name)
|
||||
return ..()
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
if(!istype(T)) //you know this will happen somehow
|
||||
CRASH("Turf decal initialized in an object/nullspace")
|
||||
T.add_decal(get_decal(),group)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/turf_decal/stripes/line
|
||||
icon_state = "warningline"
|
||||
@@ -66,4 +67,4 @@
|
||||
icon_state = "sandyplating"
|
||||
|
||||
/obj/effect/turf_decal/plaque
|
||||
icon_state = "plaque"
|
||||
icon_state = "plaque"
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
/obj/effect/temp_visual/point
|
||||
name = "pointer"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = POINT_LAYER
|
||||
duration = 25
|
||||
|
||||
name = "pointer"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = POINT_LAYER
|
||||
duration = 25
|
||||
|
||||
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)
|
||||
..()
|
||||
var/atom/old_loc = loc
|
||||
loc = get_turf(src)
|
||||
pixel_x = old_loc.pixel_x
|
||||
pixel_y = old_loc.pixel_y
|
||||
invisibility = set_invis
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/decal/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/effect/decal/sandeffect
|
||||
name = "sandy tile"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "sandeffect"
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
|
||||
/obj/effect/decal/fakelattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = 1
|
||||
..()
|
||||
var/atom/old_loc = loc
|
||||
loc = get_turf(src)
|
||||
pixel_x = old_loc.pixel_x
|
||||
pixel_y = old_loc.pixel_y
|
||||
invisibility = set_invis
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/decal/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/effect/decal/sandeffect
|
||||
name = "sandy tile"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "sandeffect"
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
|
||||
/obj/effect/decal/fakelattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = 1
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
/obj/effect/particle_effect/foam/Crossed(atom/movable/AM)
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(5, 2, src)
|
||||
M.slip(100, src)
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/Crossed(atom/movable/AM)
|
||||
return
|
||||
@@ -276,6 +276,10 @@
|
||||
for(var/obj/item/Item in O)
|
||||
Item.extinguish()
|
||||
|
||||
/obj/structure/foamedmetal/resin/CanPass(atom/movable/mover, turf/target, height)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
#undef ALUMINUM_FOAM
|
||||
#undef IRON_FOAM
|
||||
|
||||
@@ -128,10 +128,10 @@
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
for(var/mob/M in viewers(1, location))
|
||||
if (prob (50 * amount))
|
||||
to_chat(M, "<span class='danger'>The explosion knocks you down.</span>")
|
||||
M.Weaken(rand(1,5))
|
||||
for(var/mob/living/L in viewers(1, location))
|
||||
if(prob(50 * amount))
|
||||
to_chat(L, "<span class='danger'>The explosion knocks you down.</span>")
|
||||
L.Knockdown(rand(20,100))
|
||||
return
|
||||
else
|
||||
dyn_explosion(location, amount, flashing_factor)
|
||||
@@ -207,7 +207,7 @@
|
||||
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.drop_item()
|
||||
M.Sleeping(max(M.sleeping,10))
|
||||
M.Sleeping(200)
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/obj/effect/forcefield
|
||||
desc = "A space wizard's magic wall."
|
||||
name = "FORCEWALL"
|
||||
icon_state = "m_shield"
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 1
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
|
||||
/obj/effect/forcefield/cult
|
||||
desc = "An unholy shield that blocks all attacks."
|
||||
name = "glowing wall"
|
||||
/obj/effect/forcefield
|
||||
desc = "A space wizard's magic wall."
|
||||
name = "FORCEWALL"
|
||||
icon_state = "m_shield"
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 1
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
|
||||
/obj/effect/forcefield/cult
|
||||
desc = "An unholy shield that blocks all attacks."
|
||||
name = "glowing wall"
|
||||
icon = 'icons/effects/cult_effects.dmi'
|
||||
icon_state = "cultshield"
|
||||
|
||||
///////////Mimewalls///////////
|
||||
|
||||
/obj/effect/forcefield/mime
|
||||
icon_state = "empty"
|
||||
name = "invisible wall"
|
||||
desc = "You have a bad feeling about this."
|
||||
var/timeleft = 300
|
||||
|
||||
/obj/effect/forcefield/mime/New()
|
||||
..()
|
||||
QDEL_IN(src, timeleft)
|
||||
|
||||
/obj/effect/forcefield/mime/advanced
|
||||
name = "invisible blockade"
|
||||
desc = "You're goona be here a while."
|
||||
icon_state = "cultshield"
|
||||
|
||||
///////////Mimewalls///////////
|
||||
|
||||
/obj/effect/forcefield/mime
|
||||
icon_state = "empty"
|
||||
name = "invisible wall"
|
||||
desc = "You have a bad feeling about this."
|
||||
var/timeleft = 300
|
||||
|
||||
/obj/effect/forcefield/mime/New()
|
||||
..()
|
||||
QDEL_IN(src, timeleft)
|
||||
|
||||
/obj/effect/forcefield/mime/advanced
|
||||
name = "invisible blockade"
|
||||
desc = "You're goona be here a while."
|
||||
timeleft = 600
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
/obj/structure/glowshroom/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
if(damage_type == BURN && damage_amount)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/structure/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
|
||||
+170
-170
@@ -1,173 +1,173 @@
|
||||
/obj/effect/mine
|
||||
name = "dummy mine"
|
||||
desc = "Better stay away from that thing."
|
||||
density = 0
|
||||
anchored = 1
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "uglymine"
|
||||
var/triggered = 0
|
||||
|
||||
/obj/effect/mine/proc/mineEffect(mob/victim)
|
||||
to_chat(victim, "<span class='danger'>*click*</span>")
|
||||
|
||||
/obj/effect/mine/Crossed(AM as mob|obj)
|
||||
if(isturf(loc))
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
triggermine(AM)
|
||||
else
|
||||
triggermine(AM)
|
||||
|
||||
/obj/effect/mine/proc/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
/obj/effect/mine
|
||||
name = "dummy mine"
|
||||
desc = "Better stay away from that thing."
|
||||
density = 0
|
||||
anchored = 1
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "uglymine"
|
||||
var/triggered = 0
|
||||
|
||||
/obj/effect/mine/proc/mineEffect(mob/victim)
|
||||
to_chat(victim, "<span class='danger'>*click*</span>")
|
||||
|
||||
/obj/effect/mine/Crossed(AM as mob|obj)
|
||||
if(isturf(loc))
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
triggermine(AM)
|
||||
else
|
||||
triggermine(AM)
|
||||
|
||||
/obj/effect/mine/proc/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
visible_message("<span class='danger'>[victim] sets off [bicon(src)] [src]!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
mineEffect(victim)
|
||||
triggered = 1
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/explosive
|
||||
name = "explosive mine"
|
||||
var/range_devastation = 0
|
||||
var/range_heavy = 1
|
||||
var/range_light = 2
|
||||
var/range_flash = 3
|
||||
|
||||
/obj/effect/mine/explosive/mineEffect(mob/victim)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
mineEffect(victim)
|
||||
triggered = 1
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/explosive
|
||||
name = "explosive mine"
|
||||
var/range_devastation = 0
|
||||
var/range_heavy = 1
|
||||
var/range_light = 2
|
||||
var/range_flash = 3
|
||||
|
||||
/obj/effect/mine/explosive/mineEffect(mob/victim)
|
||||
explosion(loc, range_devastation, range_heavy, range_light, range_flash)
|
||||
|
||||
|
||||
/obj/effect/mine/stun
|
||||
name = "stun mine"
|
||||
var/stun_time = 8
|
||||
|
||||
/obj/effect/mine/stun/mineEffect(mob/victim)
|
||||
if(isliving(victim))
|
||||
victim.Weaken(stun_time)
|
||||
|
||||
/obj/effect/mine/kickmine
|
||||
name = "kick mine"
|
||||
|
||||
/obj/effect/mine/kickmine/mineEffect(mob/victim)
|
||||
if(isliving(victim) && victim.client)
|
||||
to_chat(victim, "<span class='userdanger'>You have been kicked FOR NO REISIN!</span>")
|
||||
qdel(victim.client)
|
||||
|
||||
|
||||
/obj/effect/mine/gas
|
||||
name = "oxygen mine"
|
||||
var/gas_amount = 360
|
||||
var/gas_type = "o2"
|
||||
|
||||
/obj/effect/mine/gas/mineEffect(mob/victim)
|
||||
atmos_spawn_air("[gas_type]=[gas_amount]")
|
||||
|
||||
|
||||
/obj/effect/mine/gas/plasma
|
||||
name = "plasma mine"
|
||||
gas_type = "plasma"
|
||||
|
||||
|
||||
/obj/effect/mine/gas/n2o
|
||||
name = "\improper N2O mine"
|
||||
gas_type = "n2o"
|
||||
|
||||
|
||||
/obj/effect/mine/sound
|
||||
name = "honkblaster 1000"
|
||||
var/sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/obj/effect/mine/sound/mineEffect(mob/victim)
|
||||
playsound(loc, sound, 100, 1)
|
||||
|
||||
|
||||
/obj/effect/mine/sound/bwoink
|
||||
name = "bwoink mine"
|
||||
sound = 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/obj/effect/mine/pickup
|
||||
name = "pickup"
|
||||
desc = "pick me up"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "electricity2"
|
||||
density = 0
|
||||
var/duration = 0
|
||||
|
||||
/obj/effect/mine/pickup/New()
|
||||
..()
|
||||
animate(src, pixel_y = 4, time = 20, loop = -1)
|
||||
|
||||
/obj/effect/mine/pickup/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
triggered = 1
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
mineEffect(victim)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath
|
||||
name = "Red Orb"
|
||||
desc = "You feel angry just looking at it."
|
||||
duration = 1200 //2min
|
||||
color = "#FF0000"
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
|
||||
victim << 'sound/misc/e1m1.ogg'
|
||||
var/old_color = victim.client.color
|
||||
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
||||
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
||||
|
||||
spawn(0)
|
||||
|
||||
|
||||
/obj/effect/mine/stun
|
||||
name = "stun mine"
|
||||
var/stun_time = 80
|
||||
|
||||
/obj/effect/mine/stun/mineEffect(mob/living/victim)
|
||||
if(isliving(victim))
|
||||
victim.Knockdown(stun_time)
|
||||
|
||||
/obj/effect/mine/kickmine
|
||||
name = "kick mine"
|
||||
|
||||
/obj/effect/mine/kickmine/mineEffect(mob/victim)
|
||||
if(isliving(victim) && victim.client)
|
||||
to_chat(victim, "<span class='userdanger'>You have been kicked FOR NO REISIN!</span>")
|
||||
qdel(victim.client)
|
||||
|
||||
|
||||
/obj/effect/mine/gas
|
||||
name = "oxygen mine"
|
||||
var/gas_amount = 360
|
||||
var/gas_type = "o2"
|
||||
|
||||
/obj/effect/mine/gas/mineEffect(mob/victim)
|
||||
atmos_spawn_air("[gas_type]=[gas_amount]")
|
||||
|
||||
|
||||
/obj/effect/mine/gas/plasma
|
||||
name = "plasma mine"
|
||||
gas_type = "plasma"
|
||||
|
||||
|
||||
/obj/effect/mine/gas/n2o
|
||||
name = "\improper N2O mine"
|
||||
gas_type = "n2o"
|
||||
|
||||
|
||||
/obj/effect/mine/sound
|
||||
name = "honkblaster 1000"
|
||||
var/sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/obj/effect/mine/sound/mineEffect(mob/victim)
|
||||
playsound(loc, sound, 100, 1)
|
||||
|
||||
|
||||
/obj/effect/mine/sound/bwoink
|
||||
name = "bwoink mine"
|
||||
sound = 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/obj/effect/mine/pickup
|
||||
name = "pickup"
|
||||
desc = "pick me up"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "electricity2"
|
||||
density = 0
|
||||
var/duration = 0
|
||||
|
||||
/obj/effect/mine/pickup/New()
|
||||
..()
|
||||
animate(src, pixel_y = 4, time = 20, loop = -1)
|
||||
|
||||
/obj/effect/mine/pickup/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
triggered = 1
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
mineEffect(victim)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath
|
||||
name = "Red Orb"
|
||||
desc = "You feel angry just looking at it."
|
||||
duration = 1200 //2min
|
||||
color = "#FF0000"
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
|
||||
victim << 'sound/misc/e1m1.ogg'
|
||||
var/old_color = victim.client.color
|
||||
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
||||
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
||||
|
||||
spawn(0)
|
||||
new /obj/effect/hallucination/delusion(victim.loc,victim,"demon",duration,0)
|
||||
|
||||
var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||
chainsaw.flags |= NODROP
|
||||
victim.drop_all_held_items()
|
||||
victim.put_in_hands(chainsaw)
|
||||
chainsaw.attack_self(victim)
|
||||
chainsaw.wield(victim)
|
||||
victim.reagents.add_reagent("adminordrazine",25)
|
||||
|
||||
victim.client.color = pure_red
|
||||
animate(victim.client,color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(10)
|
||||
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(duration)
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.<span>")
|
||||
qdel(chainsaw)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/mine/pickup/healing
|
||||
name = "Blue Orb"
|
||||
desc = "You feel better just looking at it."
|
||||
color = "#0000FF"
|
||||
|
||||
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel great!</span>")
|
||||
victim.revive(full_heal = 1, admin_revive = 1)
|
||||
|
||||
/obj/effect/mine/pickup/speed
|
||||
name = "Yellow Orb"
|
||||
desc = "You feel faster just looking at it."
|
||||
color = "#FFFF00"
|
||||
duration = 300
|
||||
|
||||
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel fast!</span>")
|
||||
victim.status_flags |= GOTTAGOREALLYFAST
|
||||
sleep(duration)
|
||||
victim.status_flags &= ~GOTTAGOREALLYFAST
|
||||
to_chat(victim, "<span class='notice'>You slow down.</span>")
|
||||
|
||||
var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||
chainsaw.flags |= NODROP
|
||||
victim.drop_all_held_items()
|
||||
victim.put_in_hands(chainsaw)
|
||||
chainsaw.attack_self(victim)
|
||||
chainsaw.wield(victim)
|
||||
victim.reagents.add_reagent("adminordrazine",25)
|
||||
|
||||
victim.client.color = pure_red
|
||||
animate(victim.client,color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(10)
|
||||
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(duration)
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.<span>")
|
||||
qdel(chainsaw)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/mine/pickup/healing
|
||||
name = "Blue Orb"
|
||||
desc = "You feel better just looking at it."
|
||||
color = "#0000FF"
|
||||
|
||||
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel great!</span>")
|
||||
victim.revive(full_heal = 1, admin_revive = 1)
|
||||
|
||||
/obj/effect/mine/pickup/speed
|
||||
name = "Yellow Orb"
|
||||
desc = "You feel faster just looking at it."
|
||||
color = "#FFFF00"
|
||||
duration = 300
|
||||
|
||||
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel fast!</span>")
|
||||
victim.status_flags |= GOTTAGOREALLYFAST
|
||||
sleep(duration)
|
||||
victim.status_flags &= ~GOTTAGOREALLYFAST
|
||||
to_chat(victim, "<span class='notice'>You slow down.</span>")
|
||||
|
||||
@@ -1,25 +1,42 @@
|
||||
|
||||
/proc/create_portal_pair(turf/source, turf/destination, _creator = null, _lifespan = 300, accuracy = 0, newtype = /obj/effect/portal)
|
||||
if(!istype(source) || !istype(destination))
|
||||
return
|
||||
var/turf/actual_destination = get_teleport_turf(destination, accuracy)
|
||||
var/obj/effect/portal/P1 = new newtype(source, _creator, _lifespan, null, FALSE)
|
||||
var/obj/effect/portal/P2 = new newtype(actual_destination, _creator, _lifespan, P1, TRUE)
|
||||
if(!istype(P1)||!istype(P2))
|
||||
return
|
||||
P1.link_portal(P2)
|
||||
P1.hardlinked = TRUE
|
||||
return list(P1, P2)
|
||||
|
||||
/obj/effect/portal
|
||||
name = "portal"
|
||||
desc = "Looks unstable. Best to test it with the clown."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "portal"
|
||||
density = 1
|
||||
var/obj/item/target = null
|
||||
var/creator = null
|
||||
anchored = 1
|
||||
var/precision = 1 // how close to the portal you will teleport. 0 = on the portal, 1 = adjacent
|
||||
anchored = TRUE
|
||||
var/mech_sized = FALSE
|
||||
var/obj/effect/portal/linked
|
||||
var/hardlinked = TRUE //Requires a linked portal at all times. Destroy if there's no linked portal, if there is destroy it when this one is deleted.
|
||||
var/creator
|
||||
var/turf/hard_target //For when a portal needs a hard target and isn't to be linked.
|
||||
var/atmos_link = FALSE //Link source/destination atmos.
|
||||
var/turf/open/atmos_source //Atmos link source
|
||||
var/turf/open/atmos_destination //Atmos link destination
|
||||
|
||||
/obj/effect/portal/Bumped(mob/M as mob|obj)
|
||||
teleport(M)
|
||||
/obj/effect/portal/anom
|
||||
name = "wormhole"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "anom"
|
||||
mech_sized = TRUE
|
||||
|
||||
/obj/effect/portal/attack_tk(mob/user)
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
if(Adjacent(user))
|
||||
teleport(user)
|
||||
/obj/effect/portal/Move(newloc)
|
||||
for(var/T in newloc)
|
||||
if(istype(T, /obj/effect/portal))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(user && Adjacent(user))
|
||||
@@ -28,42 +45,115 @@
|
||||
/obj/effect/portal/make_frozen_visual()
|
||||
return
|
||||
|
||||
/obj/effect/portal/New(loc, turf/target, creator=null, lifespan=300)
|
||||
..()
|
||||
/obj/effect/portal/Crossed(atom/movable/AM, oldloc)
|
||||
if(get_turf(oldloc) == get_turf(linked))
|
||||
return ..()
|
||||
if(!teleport(AM))
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attack_tk(mob/user)
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
if(Adjacent(user))
|
||||
teleport(user)
|
||||
|
||||
/obj/effect/portal/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override)
|
||||
. = ..()
|
||||
GLOB.portals += src
|
||||
src.target = target
|
||||
src.creator = creator
|
||||
if(!istype(_linked) && automatic_link)
|
||||
. = INITIALIZE_HINT_QDEL
|
||||
CRASH("Somebody fucked up.")
|
||||
if(_lifespan > 0)
|
||||
QDEL_IN(src, _lifespan)
|
||||
if(!isnull(atmos_link_override))
|
||||
atmos_link = atmos_link_override
|
||||
link_portal(_linked)
|
||||
hardlinked = automatic_link
|
||||
creator = _creator
|
||||
if(isturf(hard_target_override))
|
||||
hard_target = hard_target_override
|
||||
|
||||
var/area/A = get_area(target)
|
||||
if(A && A.noteleport) // No point in persisting if the target is unreachable.
|
||||
qdel(src)
|
||||
return
|
||||
if(lifespan > 0)
|
||||
QDEL_IN(src, lifespan)
|
||||
/obj/effect/portal/proc/link_portal(obj/effect/portal/newlink)
|
||||
linked = newlink
|
||||
if(atmos_link)
|
||||
link_atmos()
|
||||
|
||||
/obj/effect/portal/Destroy()
|
||||
GLOB.portals -= src
|
||||
if(istype(creator, /obj/item/weapon/hand_tele))
|
||||
var/obj/item/weapon/hand_tele/O = creator
|
||||
O.active_portals--
|
||||
else if(istype(creator, /obj/item/weapon/gun/energy/wormhole_projector))
|
||||
var/obj/item/weapon/gun/energy/wormhole_projector/P = creator
|
||||
P.portal_destroyed(src)
|
||||
/obj/effect/portal/proc/link_atmos()
|
||||
if(atmos_source || atmos_destination)
|
||||
unlink_atmos()
|
||||
if(!isopenturf(get_turf(src)))
|
||||
return FALSE
|
||||
if(linked)
|
||||
if(isopenturf(get_turf(linked)))
|
||||
atmos_source = get_turf(src)
|
||||
atmos_destination = get_turf(linked)
|
||||
else if(hard_target)
|
||||
if(isopenturf(hard_target))
|
||||
atmos_source = get_turf(src)
|
||||
atmos_destination = hard_target
|
||||
else
|
||||
return FALSE
|
||||
if(!istype(atmos_source) || !istype(atmos_destination))
|
||||
return FALSE
|
||||
LAZYINITLIST(atmos_source.atmos_adjacent_turfs)
|
||||
LAZYINITLIST(atmos_destination.atmos_adjacent_turfs)
|
||||
if(atmos_source.atmos_adjacent_turfs[atmos_destination] || atmos_destination.atmos_adjacent_turfs[atmos_source]) //Already linked!
|
||||
return FALSE
|
||||
atmos_source.atmos_adjacent_turfs[atmos_destination] = TRUE
|
||||
atmos_destination.atmos_adjacent_turfs[atmos_source] = TRUE
|
||||
atmos_source.air_update_turf(FALSE)
|
||||
atmos_destination.air_update_turf(FALSE)
|
||||
|
||||
/obj/effect/portal/proc/unlink_atmos()
|
||||
if(istype(atmos_source))
|
||||
if(istype(atmos_destination) && !atmos_source.Adjacent(atmos_destination) && !CANATMOSPASS(atmos_destination, atmos_source))
|
||||
LAZYREMOVE(atmos_source.atmos_adjacent_turfs, atmos_destination)
|
||||
atmos_source = null
|
||||
if(istype(atmos_destination))
|
||||
if(istype(atmos_source) && !atmos_destination.Adjacent(atmos_source) && !CANATMOSPASS(atmos_source, atmos_destination))
|
||||
LAZYREMOVE(atmos_destination.atmos_adjacent_turfs, atmos_source)
|
||||
atmos_destination = null
|
||||
|
||||
/obj/effect/portal/Destroy() //Calls on_portal_destroy(destroyed portal, location of destroyed portal) on creator if creator has such call.
|
||||
if(creator && hascall(creator, "on_portal_destroy"))
|
||||
call(creator, "on_portal_destroy")(src, src.loc)
|
||||
creator = null
|
||||
GLOB.portals -= src
|
||||
unlink_atmos()
|
||||
if(hardlinked && !QDELETED(linked))
|
||||
QDEL_NULL(linked)
|
||||
else
|
||||
linked = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
|
||||
if(istype(M, /obj/effect)) //sparks don't teleport
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M)
|
||||
if(!istype(M) || istype(M, /obj/effect) || (istype(M, /obj/mecha) && !mech_sized) || (!isobj(M) && !ismob(M))) //Things that shouldn't teleport.
|
||||
return
|
||||
if(M.anchored)
|
||||
if(!(istype(M, /obj/mecha) && mech_sized))
|
||||
var/turf/real_target = get_link_target_turf()
|
||||
if(!istype(real_target))
|
||||
return FALSE
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_COORDJMP(src)] made by [usr].")
|
||||
if(do_teleport(M, real_target, 0))
|
||||
if(istype(M, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = M
|
||||
P.ignore_source_check = TRUE
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/effect/portal/proc/get_link_target_turf()
|
||||
var/turf/real_target
|
||||
if(!istype(linked) || QDELETED(linked))
|
||||
if(hardlinked)
|
||||
qdel(src)
|
||||
if(!istype(hard_target) || QDELETED(hard_target))
|
||||
hard_target = null
|
||||
return
|
||||
if (!( target ))
|
||||
qdel(src)
|
||||
return
|
||||
if (istype(M, /atom/movable))
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] [ADMIN_FLW(M)] has teleported through [src].")
|
||||
do_teleport(M, target, precision) ///You will appear adjacent to the beacon
|
||||
|
||||
else
|
||||
real_target = hard_target
|
||||
linked = null
|
||||
else
|
||||
real_target = get_turf(linked)
|
||||
return real_target
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(loc)
|
||||
if(istype(loc,/mob/living/carbon))
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/digester = loc
|
||||
digester.stomach_contents += gib
|
||||
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
/obj/effect/spawner/lootdrop
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
color = "#00FF00"
|
||||
var/lootcount = 1 //how many items will be spawned
|
||||
var/lootdoubles = TRUE //if the same item can be spawned twice
|
||||
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
|
||||
|
||||
/obj/effect/spawner/lootdrop/Initialize(mapload)
|
||||
..()
|
||||
if(loot && loot.len)
|
||||
var/turf/T = get_turf(src)
|
||||
while(lootcount && loot.len)
|
||||
var/lootspawn = pickweight(loot)
|
||||
if(!lootdoubles)
|
||||
loot.Remove(lootspawn)
|
||||
|
||||
if(lootspawn)
|
||||
new lootspawn(T)
|
||||
lootcount--
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spawner/lootdrop/armory_contraband
|
||||
name = "armory contraband gun spawner"
|
||||
lootdoubles = FALSE
|
||||
|
||||
loot = list(
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol = 8,
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat = 5,
|
||||
/obj/item/weapon/gun/ballistic/revolver/mateba,
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/gambling
|
||||
name = "gambling valuables spawner"
|
||||
loot = list(
|
||||
/obj/item/weapon/gun/ballistic/revolver/russian = 5,
|
||||
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons = 1,
|
||||
/obj/item/toy/cards/deck/syndicate = 2
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/grille_or_trash
|
||||
name = "maint grille or trash spawner"
|
||||
loot = list(/obj/structure/grille = 5,
|
||||
/obj/item/weapon/cigbutt = 1,
|
||||
/obj/item/trash/cheesie = 1,
|
||||
/obj/item/trash/candy = 1,
|
||||
/obj/item/trash/chips = 1,
|
||||
/obj/item/trash/deadmouse = 1,
|
||||
/obj/item/trash/pistachios = 1,
|
||||
/obj/item/trash/plate = 1,
|
||||
/obj/item/trash/popcorn = 1,
|
||||
/obj/item/trash/raisins = 1,
|
||||
/obj/item/trash/sosjerky = 1,
|
||||
/obj/item/trash/syndi_cakes = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
color = "#00FF00"
|
||||
var/lootcount = 1 //how many items will be spawned
|
||||
var/lootdoubles = TRUE //if the same item can be spawned twice
|
||||
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
|
||||
|
||||
/obj/effect/spawner/lootdrop/Initialize(mapload)
|
||||
..()
|
||||
if(loot && loot.len)
|
||||
var/turf/T = get_turf(src)
|
||||
while(lootcount && loot.len)
|
||||
var/lootspawn = pickweight(loot)
|
||||
if(!lootdoubles)
|
||||
loot.Remove(lootspawn)
|
||||
|
||||
if(lootspawn)
|
||||
new lootspawn(T)
|
||||
lootcount--
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spawner/lootdrop/armory_contraband
|
||||
name = "armory contraband gun spawner"
|
||||
lootdoubles = FALSE
|
||||
|
||||
loot = list(
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol = 8,
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat = 5,
|
||||
/obj/item/weapon/gun/ballistic/revolver/mateba,
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/gambling
|
||||
name = "gambling valuables spawner"
|
||||
loot = list(
|
||||
/obj/item/weapon/gun/ballistic/revolver/russian = 5,
|
||||
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons = 1,
|
||||
/obj/item/toy/cards/deck/syndicate = 2
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/grille_or_trash
|
||||
name = "maint grille or trash spawner"
|
||||
loot = list(/obj/structure/grille = 5,
|
||||
/obj/item/weapon/cigbutt = 1,
|
||||
/obj/item/trash/cheesie = 1,
|
||||
/obj/item/trash/candy = 1,
|
||||
/obj/item/trash/chips = 1,
|
||||
/obj/item/trash/deadmouse = 1,
|
||||
/obj/item/trash/pistachios = 1,
|
||||
/obj/item/trash/plate = 1,
|
||||
/obj/item/trash/popcorn = 1,
|
||||
/obj/item/trash/raisins = 1,
|
||||
/obj/item/trash/sosjerky = 1,
|
||||
/obj/item/trash/syndi_cakes = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/three_course_meal
|
||||
name = "three course meal spawner"
|
||||
lootcount = 3
|
||||
@@ -83,83 +83,83 @@
|
||||
loot = list(pick(soups) = 1,pick(salads) = 1,pick(mains) = 1)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/lootdrop/maintenance
|
||||
name = "maintenance loot spawner"
|
||||
/obj/effect/spawner/lootdrop/maintenance
|
||||
name = "maintenance loot spawner"
|
||||
// see code/_globalvars/lists/maintenance_loot.dm for loot table
|
||||
|
||||
|
||||
/obj/effect/spawner/lootdrop/maintenance/Initialize(mapload)
|
||||
loot = GLOB.maintenance_loot
|
||||
..()
|
||||
|
||||
/obj/effect/spawner/lootdrop/crate_spawner
|
||||
name = "lootcrate spawner" //USE PROMO CODE "SELLOUT" FOR 20% OFF!
|
||||
lootdoubles = FALSE
|
||||
|
||||
loot = list(
|
||||
/obj/structure/closet/crate/secure/loot = 20,
|
||||
"" = 80
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/organ_spawner
|
||||
name = "organ spawner"
|
||||
loot = list(
|
||||
/obj/item/organ/heart/gland/bloody = 7,
|
||||
/obj/item/organ/heart/gland/bodysnatch = 4,
|
||||
/obj/item/organ/heart/gland/egg = 7,
|
||||
/obj/item/organ/heart/gland/emp = 3,
|
||||
/obj/item/organ/heart/gland/mindshock = 5,
|
||||
/obj/item/organ/heart/gland/plasma = 7,
|
||||
/obj/item/organ/heart/gland/pop = 5,
|
||||
/obj/item/organ/heart/gland/slime = 4,
|
||||
/obj/item/organ/heart/gland/spiderman = 5,
|
||||
/obj/item/organ/heart/gland/ventcrawling = 1,
|
||||
/obj/item/organ/body_egg/alien_embryo = 1,
|
||||
|
||||
/obj/effect/spawner/lootdrop/crate_spawner
|
||||
name = "lootcrate spawner" //USE PROMO CODE "SELLOUT" FOR 20% OFF!
|
||||
lootdoubles = FALSE
|
||||
|
||||
loot = list(
|
||||
/obj/structure/closet/crate/secure/loot = 20,
|
||||
"" = 80
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/organ_spawner
|
||||
name = "organ spawner"
|
||||
loot = list(
|
||||
/obj/item/organ/heart/gland/bloody = 7,
|
||||
/obj/item/organ/heart/gland/bodysnatch = 4,
|
||||
/obj/item/organ/heart/gland/egg = 7,
|
||||
/obj/item/organ/heart/gland/emp = 3,
|
||||
/obj/item/organ/heart/gland/mindshock = 5,
|
||||
/obj/item/organ/heart/gland/plasma = 7,
|
||||
/obj/item/organ/heart/gland/pop = 5,
|
||||
/obj/item/organ/heart/gland/slime = 4,
|
||||
/obj/item/organ/heart/gland/spiderman = 5,
|
||||
/obj/item/organ/heart/gland/ventcrawling = 1,
|
||||
/obj/item/organ/body_egg/alien_embryo = 1,
|
||||
/obj/item/organ/regenerative_core = 2)
|
||||
lootcount = 3
|
||||
|
||||
/obj/effect/spawner/lootdrop/two_percent_xeno_egg_spawner
|
||||
name = "2% chance xeno egg spawner"
|
||||
loot = list(
|
||||
/obj/effect/decal/remains/xeno = 49,
|
||||
/obj/effect/spawner/xeno_egg_delivery = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/costume
|
||||
name = "random costume spawner"
|
||||
|
||||
/obj/effect/spawner/lootdrop/costume/Initialize()
|
||||
loot = list()
|
||||
for(var/path in subtypesof(/obj/effect/spawner/bundle/costume))
|
||||
loot[path] = TRUE
|
||||
..()
|
||||
|
||||
// Minor lootdrops follow
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears
|
||||
name = "beret or rabbit ears spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/beret = 1,
|
||||
/obj/item/clothing/head/rabbitears = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/bowler_or_that
|
||||
name = "bowler or top hat spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/bowler = 1,
|
||||
/obj/item/clothing/head/that = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/kittyears_or_rabbitears
|
||||
name = "kitty ears or rabbit ears spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/kitty = 1,
|
||||
/obj/item/clothing/head/rabbitears = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/pirate_or_bandana
|
||||
name = "pirate hat or bandana spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/pirate = 1,
|
||||
/obj/item/clothing/head/bandana = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/twentyfive_percent_cyborg_mask
|
||||
name = "25% cyborg mask spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/mask/gas/cyborg = 25,
|
||||
"" = 75)
|
||||
lootcount = 3
|
||||
|
||||
/obj/effect/spawner/lootdrop/two_percent_xeno_egg_spawner
|
||||
name = "2% chance xeno egg spawner"
|
||||
loot = list(
|
||||
/obj/effect/decal/remains/xeno = 49,
|
||||
/obj/effect/spawner/xeno_egg_delivery = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/costume
|
||||
name = "random costume spawner"
|
||||
|
||||
/obj/effect/spawner/lootdrop/costume/Initialize()
|
||||
loot = list()
|
||||
for(var/path in subtypesof(/obj/effect/spawner/bundle/costume))
|
||||
loot[path] = TRUE
|
||||
..()
|
||||
|
||||
// Minor lootdrops follow
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears
|
||||
name = "beret or rabbit ears spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/beret = 1,
|
||||
/obj/item/clothing/head/rabbitears = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/bowler_or_that
|
||||
name = "bowler or top hat spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/bowler = 1,
|
||||
/obj/item/clothing/head/that = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/kittyears_or_rabbitears
|
||||
name = "kitty ears or rabbit ears spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/kitty = 1,
|
||||
/obj/item/clothing/head/rabbitears = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/pirate_or_bandana
|
||||
name = "pirate hat or bandana spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/pirate = 1,
|
||||
/obj/item/clothing/head/bandana = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/twentyfive_percent_cyborg_mask
|
||||
name = "25% cyborg mask spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/mask/gas/cyborg = 25,
|
||||
"" = 75)
|
||||
|
||||
@@ -1,215 +1,215 @@
|
||||
//generic procs copied from obj/effect/alien
|
||||
/obj/structure/spider
|
||||
name = "web"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
desc = "it's stringy and sticky"
|
||||
anchored = 1
|
||||
density = 0
|
||||
obj_integrity = 15
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
if(damage_type == BURN)//the stickiness of the web mutes all attack sounds except fire damage type
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee")
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
damage_amount *= 2
|
||||
if(BRUTE)
|
||||
damage_amount *= 0.25
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/spider/stickyweb
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/structure/spider/stickyweb/Initialize()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return 1
|
||||
else if(isliving(mover))
|
||||
if(prob(50))
|
||||
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
|
||||
return 0
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
return 1
|
||||
|
||||
/obj/structure/spider/eggcluster
|
||||
name = "egg cluster"
|
||||
desc = "They seem to pulse slightly with an inner life"
|
||||
icon_state = "eggs"
|
||||
var/amount_grown = 0
|
||||
var/player_spiders = 0
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/structure/spider/eggcluster/Initialize()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(3,12)
|
||||
for(var/i=0, i<num, i++)
|
||||
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
|
||||
S.poison_type = poison_type
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.faction = faction.Copy()
|
||||
if(player_spiders)
|
||||
S.player_spiders = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/spider/spiderling
|
||||
name = "spiderling"
|
||||
desc = "It never stays still for long."
|
||||
icon_state = "spiderling"
|
||||
anchored = 0
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
obj_integrity = 3
|
||||
var/amount_grown = 0
|
||||
var/grow_as = null
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
var/player_spiders = 0
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/structure/spider/spiderling/Initialize()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/spiderling/hunter
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
|
||||
|
||||
/obj/structure/spider/spiderling/nurse
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse
|
||||
|
||||
/obj/structure/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
src.loc = user.loc
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/spider/spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(isturf(loc))
|
||||
travelling_in_vent = 0
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
if(get_dist(src, entry_vent) <= 1)
|
||||
var/list/vents = list()
|
||||
var/datum/pipeline/entry_vent_parent = entry_vent.PARENT1
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
|
||||
vents.Add(temp_vent)
|
||||
if(!vents.len)
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent = pick(vents)
|
||||
if(prob(50))
|
||||
visible_message("<B>[src] scrambles into the ventillation ducts!</B>", \
|
||||
"<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
|
||||
spawn(rand(20,60))
|
||||
loc = exit_vent
|
||||
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
|
||||
spawn(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
loc = entry_vent
|
||||
entry_vent = null
|
||||
return
|
||||
|
||||
if(prob(50))
|
||||
audible_message("<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
sleep(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
loc = entry_vent
|
||||
entry_vent = null
|
||||
return
|
||||
loc = exit_vent.loc
|
||||
entry_vent = null
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
//=================
|
||||
|
||||
else if(prob(33))
|
||||
var/list/nearby = oview(10, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom)
|
||||
if(prob(40))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
|
||||
else if(prob(10))
|
||||
//ventcrawl!
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 1)
|
||||
break
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
if(!grow_as)
|
||||
//generic procs copied from obj/effect/alien
|
||||
/obj/structure/spider
|
||||
name = "web"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
desc = "it's stringy and sticky"
|
||||
anchored = 1
|
||||
density = 0
|
||||
obj_integrity = 15
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
if(damage_type == BURN)//the stickiness of the web mutes all attack sounds except fire damage type
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee")
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
damage_amount *= 2
|
||||
if(BRUTE)
|
||||
damage_amount *= 0.25
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/spider/stickyweb
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/structure/spider/stickyweb/Initialize()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return 1
|
||||
else if(isliving(mover))
|
||||
if(prob(50))
|
||||
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
|
||||
return 0
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
return 1
|
||||
|
||||
/obj/structure/spider/eggcluster
|
||||
name = "egg cluster"
|
||||
desc = "They seem to pulse slightly with an inner life"
|
||||
icon_state = "eggs"
|
||||
var/amount_grown = 0
|
||||
var/player_spiders = 0
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/structure/spider/eggcluster/Initialize()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(3,12)
|
||||
for(var/i=0, i<num, i++)
|
||||
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
|
||||
S.poison_type = poison_type
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.faction = faction.Copy()
|
||||
if(player_spiders)
|
||||
S.player_spiders = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/spider/spiderling
|
||||
name = "spiderling"
|
||||
desc = "It never stays still for long."
|
||||
icon_state = "spiderling"
|
||||
anchored = 0
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
obj_integrity = 3
|
||||
var/amount_grown = 0
|
||||
var/grow_as = null
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
var/player_spiders = 0
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/structure/spider/spiderling/Initialize()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/spiderling/hunter
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
|
||||
|
||||
/obj/structure/spider/spiderling/nurse
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse
|
||||
|
||||
/obj/structure/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
src.loc = user.loc
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/spider/spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(isturf(loc))
|
||||
travelling_in_vent = 0
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
if(get_dist(src, entry_vent) <= 1)
|
||||
var/list/vents = list()
|
||||
var/datum/pipeline/entry_vent_parent = entry_vent.PARENT1
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
|
||||
vents.Add(temp_vent)
|
||||
if(!vents.len)
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent = pick(vents)
|
||||
if(prob(50))
|
||||
visible_message("<B>[src] scrambles into the ventillation ducts!</B>", \
|
||||
"<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
|
||||
spawn(rand(20,60))
|
||||
loc = exit_vent
|
||||
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
|
||||
spawn(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
loc = entry_vent
|
||||
entry_vent = null
|
||||
return
|
||||
|
||||
if(prob(50))
|
||||
audible_message("<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
sleep(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
loc = entry_vent
|
||||
entry_vent = null
|
||||
return
|
||||
loc = exit_vent.loc
|
||||
entry_vent = null
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
//=================
|
||||
|
||||
else if(prob(33))
|
||||
var/list/nearby = oview(10, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom)
|
||||
if(prob(40))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
|
||||
else if(prob(10))
|
||||
//ventcrawl!
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 1)
|
||||
break
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
if(!grow_as)
|
||||
grow_as = pick(/mob/living/simple_animal/hostile/poison/giant_spider, /mob/living/simple_animal/hostile/poison/giant_spider/hunter, /mob/living/simple_animal/hostile/poison/giant_spider/nurse)
|
||||
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.poison_type = poison_type
|
||||
S.faction = faction.Copy()
|
||||
if(player_spiders)
|
||||
S.playable_spider = TRUE
|
||||
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=\ref[S];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon
|
||||
name = "cocoon"
|
||||
desc = "Something wrapped in silky spider web"
|
||||
icon_state = "cocoon1"
|
||||
obj_integrity = 60
|
||||
|
||||
/obj/structure/spider/cocoon/Initialize()
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/cocoon/container_resist(mob/living/user)
|
||||
var/breakout_time = 1
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You struggle against the tight bonds... (This will take about [breakout_time] minutes.)</span>")
|
||||
visible_message("You see something struggling and writhing in \the [src]!")
|
||||
if(do_after(user,(breakout_time*60*10), target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src)
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
|
||||
for(var/atom/movable/A in contents)
|
||||
A.forceMove(T)
|
||||
return ..()
|
||||
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.poison_type = poison_type
|
||||
S.faction = faction.Copy()
|
||||
if(player_spiders)
|
||||
S.playable_spider = TRUE
|
||||
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=\ref[S];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon
|
||||
name = "cocoon"
|
||||
desc = "Something wrapped in silky spider web"
|
||||
icon_state = "cocoon1"
|
||||
obj_integrity = 60
|
||||
|
||||
/obj/structure/spider/cocoon/Initialize()
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/cocoon/container_resist(mob/living/user)
|
||||
var/breakout_time = 1
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You struggle against the tight bonds... (This will take about [breakout_time] minutes.)</span>")
|
||||
visible_message("You see something struggling and writhing in \the [src]!")
|
||||
if(do_after(user,(breakout_time*60*10), target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src)
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
|
||||
for(var/atom/movable/A in contents)
|
||||
A.forceMove(T)
|
||||
return ..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return
|
||||
if(isobserver(H) && !affect_ghosts)
|
||||
return
|
||||
if(!istype(H, /mob) && mobs_only)
|
||||
if(!ismob(H) && mobs_only)
|
||||
return
|
||||
Trigger(H)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
var/list/affecting = list()
|
||||
|
||||
/obj/effect/step_trigger/thrower/Trigger(atom/A)
|
||||
if(!A || !istype(A, /atom/movable))
|
||||
if(!A || !ismovableatom(A))
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
|
||||
@@ -162,10 +162,16 @@
|
||||
/obj/effect/temp_visual/decoy/fading/fivesecond
|
||||
duration = 50
|
||||
|
||||
/obj/effect/temp_visual/decoy/fading/halfsecond
|
||||
duration = 5
|
||||
|
||||
/obj/effect/temp_visual/small_smoke
|
||||
icon_state = "smoke"
|
||||
duration = 50
|
||||
|
||||
/obj/effect/temp_visual/small_smoke/halfsecond
|
||||
duration = 5
|
||||
|
||||
/obj/effect/temp_visual/fire
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "3"
|
||||
@@ -312,3 +318,30 @@
|
||||
pixel_x = rand(-4,4)
|
||||
pixel_y = rand(-4,4)
|
||||
animate(src, pixel_y = pixel_y + 32, alpha = 0, time = 25)
|
||||
|
||||
/obj/effect/temp_visual/bleed
|
||||
name = "bleed"
|
||||
icon = 'icons/effects/bleed.dmi'
|
||||
icon_state = "bleed0"
|
||||
duration = 10
|
||||
var/shrink = TRUE
|
||||
|
||||
/obj/effect/temp_visual/bleed/Initialize(mapload, atom/size_calc_target)
|
||||
. = ..()
|
||||
var/size_matrix = matrix()
|
||||
if(size_calc_target)
|
||||
layer = size_calc_target.layer + 0.01
|
||||
var/icon/I = icon(size_calc_target.icon, size_calc_target.icon_state, size_calc_target.dir)
|
||||
size_matrix = matrix() * (I.Height()/world.icon_size)
|
||||
transform = size_matrix //scale the bleed overlay's size based on the target's icon size
|
||||
var/matrix/M = transform
|
||||
if(shrink)
|
||||
M = size_matrix*0.1
|
||||
else
|
||||
M = size_matrix*2
|
||||
animate(src, alpha = 20, transform = M, time = duration, flags = ANIMATION_PARALLEL)
|
||||
|
||||
/obj/effect/temp_visual/bleed/explode
|
||||
icon_state = "bleed10"
|
||||
duration = 12
|
||||
shrink = FALSE
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
|
||||
if(!epicenter) return
|
||||
|
||||
if(!isturf(epicenter))
|
||||
epicenter = get_turf(epicenter.loc)
|
||||
|
||||
if(log)
|
||||
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
||||
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
||||
|
||||
if(heavy_range > 1)
|
||||
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
|
||||
if(!epicenter) return
|
||||
|
||||
if(!isturf(epicenter))
|
||||
epicenter = get_turf(epicenter.loc)
|
||||
|
||||
if(log)
|
||||
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
||||
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
||||
|
||||
if(heavy_range > 1)
|
||||
new /obj/effect/temp_visual/emp/pulse(epicenter)
|
||||
|
||||
if(heavy_range > light_range)
|
||||
light_range = heavy_range
|
||||
|
||||
for(var/A in spiral_range(light_range, epicenter))
|
||||
var/atom/T = A
|
||||
var/distance = get_dist(epicenter, T)
|
||||
if(distance < 0)
|
||||
distance = 0
|
||||
if(distance < heavy_range)
|
||||
T.emp_act(1)
|
||||
else if(distance == heavy_range)
|
||||
if(prob(50))
|
||||
T.emp_act(1)
|
||||
else
|
||||
T.emp_act(2)
|
||||
else if(distance <= light_range)
|
||||
T.emp_act(2)
|
||||
|
||||
if(heavy_range > light_range)
|
||||
light_range = heavy_range
|
||||
|
||||
for(var/A in spiral_range(light_range, epicenter))
|
||||
var/atom/T = A
|
||||
var/distance = get_dist(epicenter, T)
|
||||
if(distance < 0)
|
||||
distance = 0
|
||||
if(distance < heavy_range)
|
||||
T.emp_act(1)
|
||||
else if(distance == heavy_range)
|
||||
if(prob(50))
|
||||
T.emp_act(1)
|
||||
else
|
||||
T.emp_act(2)
|
||||
else if(distance <= light_range)
|
||||
T.emp_act(2)
|
||||
return 1
|
||||
+627
-624
File diff suppressed because it is too large
Load Diff
@@ -188,7 +188,7 @@
|
||||
|
||||
/proc/create_area(mob/living/creator)
|
||||
var/res = detect_room(get_turf(creator))
|
||||
if(!istype(res,/list))
|
||||
if(!islist(res))
|
||||
switch(res)
|
||||
if(ROOM_ERR_SPACE)
|
||||
to_chat(creator, "<span class='warning'>The new area must be completely airtight.</span>")
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(user.a_intent == INTENT_HELP || pushed_over)
|
||||
return ..()
|
||||
user.visible_message("<span class='warning'>[user] pushes over [src]!</span>", "<span class='danger'>You push over [src]!</span>")
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
push_over()
|
||||
|
||||
/obj/item/cardboard_cutout/proc/push_over()
|
||||
@@ -172,11 +172,10 @@
|
||||
desc = "A cardboard cutout of a laughter demon."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "bowmon"
|
||||
if("Private Security Officer")
|
||||
name = "Private Security Officer"
|
||||
desc = "A cardboard cutout of a private security officer."
|
||||
icon_state = "cutout_ntsec"
|
||||
|
||||
if("Private Security Officer")
|
||||
name = "Private Security Officer"
|
||||
desc = "A cardboard cutout of a private security officer."
|
||||
icon_state = "cutout_ntsec"
|
||||
return 1
|
||||
|
||||
/obj/item/cardboard_cutout/setDir(newdir)
|
||||
|
||||
@@ -634,7 +634,7 @@
|
||||
C.blind_eyes(1)
|
||||
if(C.get_eye_protection() <= 0) // no eye protection? ARGH IT BURNS.
|
||||
C.confused = max(C.confused, 3)
|
||||
C.Weaken(3)
|
||||
C.Knockdown(60)
|
||||
if(ishuman(C) && actually_paints)
|
||||
var/mob/living/carbon/human/H = C
|
||||
H.lip_style = "spray_face"
|
||||
|
||||
@@ -838,18 +838,14 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
/obj/item/device/pda/Destroy()
|
||||
GLOB.PDAs -= src
|
||||
if(id)
|
||||
qdel(id)
|
||||
id = null
|
||||
if(cartridge)
|
||||
qdel(cartridge)
|
||||
cartridge = null
|
||||
if(pai)
|
||||
qdel(pai)
|
||||
pai = null
|
||||
if(inserted_item)
|
||||
qdel(inserted_item)
|
||||
inserted_item = null
|
||||
if(istype(id))
|
||||
QDEL_NULL(id)
|
||||
if(istype(cartridge))
|
||||
QDEL_NULL(cartridge)
|
||||
if(istype(pai))
|
||||
QDEL_NULL(pai)
|
||||
if(istype(inserted_item))
|
||||
QDEL_NULL(inserted_item)
|
||||
return ..()
|
||||
|
||||
//AI verb and proc for sending PDA messages.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/obj/item/device/pda/clown
|
||||
name = "clown PDA"
|
||||
default_cartridge = /obj/item/weapon/cartridge/virus/clown
|
||||
inserted_item = /obj/item/toy/crayon/rainbow
|
||||
icon_state = "pda-clown"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
|
||||
ttone = "honk"
|
||||
@@ -9,7 +10,7 @@
|
||||
/obj/item/device/pda/clown/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
if(M.slip(0, 6, src, NO_SLIP_WHEN_WALKING))
|
||||
if(M.slip(120, src, NO_SLIP_WHEN_WALKING))
|
||||
if (ishuman(M) && (M.real_name != src.owner))
|
||||
if (istype(src.cartridge, /obj/item/weapon/cartridge/virus/clown))
|
||||
var/obj/item/weapon/cartridge/virus/cart = src.cartridge
|
||||
@@ -80,6 +81,7 @@
|
||||
/obj/item/device/pda/mime
|
||||
name = "mime PDA"
|
||||
default_cartridge = /obj/item/weapon/cartridge/virus/mime
|
||||
inserted_item = /obj/item/toy/crayon/mime
|
||||
icon_state = "pda-mime"
|
||||
silent = 1
|
||||
ttone = "silence"
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
/obj/item/radio/integrated
|
||||
name = "\improper PDA radio module"
|
||||
desc = "An electronic radio system of nanotrasen origin."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "power_mod"
|
||||
|
||||
var/on = 0 //Are we currently active??
|
||||
var/menu_message = ""
|
||||
|
||||
/obj/item/radio/integrated
|
||||
name = "\improper PDA radio module"
|
||||
desc = "An electronic radio system of nanotrasen origin."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "power_mod"
|
||||
|
||||
var/on = 0 //Are we currently active??
|
||||
var/menu_message = ""
|
||||
|
||||
/obj/item/radio/integrated/Initialize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/radio/integrated/Destroy()
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Radio Cartridge, essentially a signaler.
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/radio/integrated/signal
|
||||
var/frequency = 1457
|
||||
var/code = 30
|
||||
var/last_transmission
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/item/radio/integrated/signal/Destroy()
|
||||
if(SSradio)
|
||||
SSradio.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/signal/Initialize()
|
||||
..()
|
||||
if (src.frequency < 1200 || src.frequency > 1600)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
|
||||
|
||||
if(last_transmission && world.time < (last_transmission + 5))
|
||||
return
|
||||
last_transmission = world.time
|
||||
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
var/turf/T = get_turf(src)
|
||||
GLOB.lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.source = src
|
||||
signal.encryption = code
|
||||
signal.data["message"] = message
|
||||
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
|
||||
/obj/item/radio/integrated/Destroy()
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Radio Cartridge, essentially a signaler.
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/radio/integrated/signal
|
||||
var/frequency = 1457
|
||||
var/code = 30
|
||||
var/last_transmission
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/item/radio/integrated/signal/Destroy()
|
||||
if(SSradio)
|
||||
SSradio.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/signal/Initialize()
|
||||
..()
|
||||
if (src.frequency < 1200 || src.frequency > 1600)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
|
||||
|
||||
if(last_transmission && world.time < (last_transmission + 5))
|
||||
return
|
||||
last_transmission = world.time
|
||||
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
var/turf/T = get_turf(src)
|
||||
GLOB.lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.source = src
|
||||
signal.encryption = code
|
||||
signal.data["message"] = message
|
||||
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
return
|
||||
|
||||
@@ -1,87 +1,87 @@
|
||||
/obj/item/device/aicard
|
||||
name = "intelliCard"
|
||||
desc = "A storage device for AIs. Patent pending."
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "aicard" // aicard-full
|
||||
item_state = "electronic"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
flags = NOBLUDGEON
|
||||
var/flush = FALSE
|
||||
var/mob/living/silicon/ai/AI
|
||||
origin_tech = "programming=3;materials=3"
|
||||
|
||||
/obj/item/device/aicard/afterattack(atom/target, mob/user, proximity)
|
||||
..()
|
||||
if(!proximity || !target)
|
||||
return
|
||||
if(AI) //AI is on the card, implies user wants to upload it.
|
||||
target.transfer_ai(AI_TRANS_FROM_CARD, user, AI, src)
|
||||
add_logs(user, AI, "carded", src)
|
||||
else //No AI on the card, therefore the user wants to download one.
|
||||
target.transfer_ai(AI_TRANS_TO_CARD, user, null, src)
|
||||
update_icon() //Whatever happened, update the card's state (icon, name) to match.
|
||||
|
||||
/obj/item/device/aicard/update_icon()
|
||||
/obj/item/device/aicard
|
||||
name = "intelliCard"
|
||||
desc = "A storage device for AIs. Patent pending."
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "aicard" // aicard-full
|
||||
item_state = "electronic"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
flags = NOBLUDGEON
|
||||
var/flush = FALSE
|
||||
var/mob/living/silicon/ai/AI
|
||||
origin_tech = "programming=3;materials=3"
|
||||
|
||||
/obj/item/device/aicard/afterattack(atom/target, mob/user, proximity)
|
||||
..()
|
||||
if(!proximity || !target)
|
||||
return
|
||||
if(AI) //AI is on the card, implies user wants to upload it.
|
||||
target.transfer_ai(AI_TRANS_FROM_CARD, user, AI, src)
|
||||
add_logs(user, AI, "carded", src)
|
||||
else //No AI on the card, therefore the user wants to download one.
|
||||
target.transfer_ai(AI_TRANS_TO_CARD, user, null, src)
|
||||
update_icon() //Whatever happened, update the card's state (icon, name) to match.
|
||||
|
||||
/obj/item/device/aicard/update_icon()
|
||||
cut_overlays()
|
||||
if(AI)
|
||||
name = "[initial(name)]- [AI.name]"
|
||||
if(AI.stat == DEAD)
|
||||
icon_state = "aicard-404"
|
||||
else
|
||||
icon_state = "aicard-full"
|
||||
if(!AI.control_disabled)
|
||||
if(AI)
|
||||
name = "[initial(name)]- [AI.name]"
|
||||
if(AI.stat == DEAD)
|
||||
icon_state = "aicard-404"
|
||||
else
|
||||
icon_state = "aicard-full"
|
||||
if(!AI.control_disabled)
|
||||
add_overlay("aicard-on")
|
||||
AI.cancel_camera()
|
||||
else
|
||||
name = initial(name)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/aicard/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "intellicard", name, 500, 500, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/device/aicard/ui_data()
|
||||
var/list/data = list()
|
||||
if(AI)
|
||||
data["name"] = AI.name
|
||||
data["laws"] = AI.laws.get_law_list(include_zeroth = 1)
|
||||
data["health"] = (AI.health + 100) / 2
|
||||
data["wireless"] = !AI.control_disabled //todo disabled->enabled
|
||||
data["radio"] = AI.radio_enabled
|
||||
data["isDead"] = AI.stat == DEAD
|
||||
data["isBraindead"] = AI.client ? FALSE : TRUE
|
||||
data["wiping"] = flush
|
||||
return data
|
||||
|
||||
/obj/item/device/aicard/ui_act(action,params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("wipe")
|
||||
if(flush)
|
||||
flush = FALSE
|
||||
else
|
||||
var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No")
|
||||
if(confirm == "Yes" && !..())
|
||||
flush = TRUE
|
||||
if(AI && AI.loc == src)
|
||||
to_chat(AI, "Your core files are being wiped!")
|
||||
while(AI.stat != DEAD && flush)
|
||||
AI.adjustOxyLoss(1)
|
||||
AI.updatehealth()
|
||||
sleep(5)
|
||||
flush = FALSE
|
||||
. = TRUE
|
||||
if("wireless")
|
||||
AI.control_disabled = !AI.control_disabled
|
||||
to_chat(AI, "[src]'s wireless port has been [AI.control_disabled ? "disabled" : "enabled"]!")
|
||||
. = TRUE
|
||||
if("radio")
|
||||
AI.radio_enabled = !AI.radio_enabled
|
||||
to_chat(AI, "Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!")
|
||||
. = TRUE
|
||||
update_icon()
|
||||
AI.cancel_camera()
|
||||
else
|
||||
name = initial(name)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/aicard/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "intellicard", name, 500, 500, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/device/aicard/ui_data()
|
||||
var/list/data = list()
|
||||
if(AI)
|
||||
data["name"] = AI.name
|
||||
data["laws"] = AI.laws.get_law_list(include_zeroth = 1)
|
||||
data["health"] = (AI.health + 100) / 2
|
||||
data["wireless"] = !AI.control_disabled //todo disabled->enabled
|
||||
data["radio"] = AI.radio_enabled
|
||||
data["isDead"] = AI.stat == DEAD
|
||||
data["isBraindead"] = AI.client ? FALSE : TRUE
|
||||
data["wiping"] = flush
|
||||
return data
|
||||
|
||||
/obj/item/device/aicard/ui_act(action,params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("wipe")
|
||||
if(flush)
|
||||
flush = FALSE
|
||||
else
|
||||
var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No")
|
||||
if(confirm == "Yes" && !..())
|
||||
flush = TRUE
|
||||
if(AI && AI.loc == src)
|
||||
to_chat(AI, "Your core files are being wiped!")
|
||||
while(AI.stat != DEAD && flush)
|
||||
AI.adjustOxyLoss(1)
|
||||
AI.updatehealth()
|
||||
sleep(5)
|
||||
flush = FALSE
|
||||
. = TRUE
|
||||
if("wireless")
|
||||
AI.control_disabled = !AI.control_disabled
|
||||
to_chat(AI, "[src]'s wireless port has been [AI.control_disabled ? "disabled" : "enabled"]!")
|
||||
. = TRUE
|
||||
if("radio")
|
||||
AI.radio_enabled = !AI.radio_enabled
|
||||
to_chat(AI, "Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!")
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(!check_sprite(target))
|
||||
return
|
||||
if(!active_dummy)
|
||||
if(istype(target,/obj/item) && !istype(target, /obj/item/weapon/disk/nuclear))
|
||||
if(isitem(target) && !istype(target, /obj/item/weapon/disk/nuclear))
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
|
||||
to_chat(user, "<span class='notice'>Scanned [target].</span>")
|
||||
var/obj/temp = new/obj()
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
/obj/item/device/flashlight
|
||||
name = "flashlight"
|
||||
desc = "A hand-held emergency light."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "flashlight"
|
||||
item_state = "flashlight"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
actions_types = list(/datum/action/item_action/toggle_light)
|
||||
var/on = 0
|
||||
var/brightness_on = 4 //range of light when on
|
||||
/obj/item/device/flashlight
|
||||
name = "flashlight"
|
||||
desc = "A hand-held emergency light."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "flashlight"
|
||||
item_state = "flashlight"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
actions_types = list(/datum/action/item_action/toggle_light)
|
||||
var/on = 0
|
||||
var/brightness_on = 4 //range of light when on
|
||||
var/flashlight_power = 1 //strength of the light when on
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
..()
|
||||
update_brightness()
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
if(flashlight_power)
|
||||
set_light(l_range = brightness_on, l_power = flashlight_power)
|
||||
else
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
..()
|
||||
update_brightness()
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
if(flashlight_power)
|
||||
set_light(l_range = brightness_on, l_power = flashlight_power)
|
||||
else
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
return 1
|
||||
|
||||
/obj/item/device/flashlight/suicide_act(mob/living/carbon/human/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] close to [user.p_their()] eyes and turning it on! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/device/flashlight/attack(mob/living/carbon/M, mob/living/carbon/human/user)
|
||||
add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
if(istype(M) && on && user.zone_selected in list("eyes", "mouth"))
|
||||
|
||||
if((user.disabilities & CLUMSY || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
|
||||
return ..() //just hit them in the head
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
|
||||
if((user.disabilities & CLUMSY || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
|
||||
return ..() //just hit them in the head
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
if(!M.get_bodypart("head"))
|
||||
to_chat(user, "<span class='warning'>[M] doesn't have a head!</span>")
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
if(flashlight_power < 1)
|
||||
to_chat(user, "<span class='warning'>\The [src] isn't bright enough to see anything!</span> ")
|
||||
return
|
||||
|
||||
|
||||
switch(user.zone_selected)
|
||||
if("eyes")
|
||||
if((M.head && M.head.flags_cover & HEADCOVERSEYES) || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) || (M.glasses && M.glasses.flags_cover & GLASSESCOVERSEYES))
|
||||
@@ -152,366 +152,366 @@
|
||||
if(pill_count)
|
||||
to_chat(user, "<span class='notice'>[M] has [pill_count] pill[pill_count > 1 ? "s" : ""] implanted in [their] teeth.")
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
name = "penlight"
|
||||
desc = "A pen-sized light, used by medical staff. It can also be used to create a hologram to alert people of incoming medical assistance."
|
||||
icon_state = "penlight"
|
||||
item_state = ""
|
||||
flags = CONDUCT
|
||||
brightness_on = 2
|
||||
var/holo_cooldown = 0
|
||||
|
||||
/obj/item/device/flashlight/pen/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(!proximity_flag)
|
||||
if(holo_cooldown > world.time)
|
||||
to_chat(user, "<span class='warning'>[src] is not ready yet!</span>")
|
||||
return
|
||||
var/T = get_turf(target)
|
||||
if(locate(/mob/living) in T)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
name = "penlight"
|
||||
desc = "A pen-sized light, used by medical staff. It can also be used to create a hologram to alert people of incoming medical assistance."
|
||||
icon_state = "penlight"
|
||||
item_state = ""
|
||||
flags = CONDUCT
|
||||
brightness_on = 2
|
||||
var/holo_cooldown = 0
|
||||
|
||||
/obj/item/device/flashlight/pen/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(!proximity_flag)
|
||||
if(holo_cooldown > world.time)
|
||||
to_chat(user, "<span class='warning'>[src] is not ready yet!</span>")
|
||||
return
|
||||
var/T = get_turf(target)
|
||||
if(locate(/mob/living) in T)
|
||||
new /obj/effect/temp_visual/medical_holosign(T,user) //produce a holographic glow
|
||||
holo_cooldown = world.time + 100
|
||||
return
|
||||
..()
|
||||
|
||||
holo_cooldown = world.time + 100
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/effect/temp_visual/medical_holosign
|
||||
name = "medical holosign"
|
||||
desc = "A small holographic glow that indicates a medic is coming to treat a patient."
|
||||
icon_state = "medi_holo"
|
||||
duration = 30
|
||||
|
||||
name = "medical holosign"
|
||||
desc = "A small holographic glow that indicates a medic is coming to treat a patient."
|
||||
icon_state = "medi_holo"
|
||||
duration = 30
|
||||
|
||||
/obj/effect/temp_visual/medical_holosign/Initialize(mapload, creator)
|
||||
. = ..()
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, 0) //make some noise!
|
||||
if(creator)
|
||||
visible_message("<span class='danger'>[creator] created a medical hologram!</span>")
|
||||
|
||||
|
||||
/obj/item/device/flashlight/seclite
|
||||
name = "seclite"
|
||||
desc = "A robust flashlight used by security."
|
||||
icon_state = "seclite"
|
||||
item_state = "seclite"
|
||||
force = 9 // Not as good as a stun baton.
|
||||
brightness_on = 5 // A little better than the standard flashlight.
|
||||
hitsound = 'sound/weapons/genhit1.ogg'
|
||||
|
||||
// the desk lamps are a bit special
|
||||
/obj/item/device/flashlight/lamp
|
||||
name = "desk lamp"
|
||||
desc = "A desk lamp with an adjustable mount."
|
||||
icon_state = "lamp"
|
||||
item_state = "lamp"
|
||||
brightness_on = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
materials = list()
|
||||
on = 1
|
||||
|
||||
|
||||
// green-shaded desk lamp
|
||||
/obj/item/device/flashlight/lamp/green
|
||||
desc = "A classic green-shaded desk lamp."
|
||||
icon_state = "lampgreen"
|
||||
item_state = "lampgreen"
|
||||
|
||||
|
||||
|
||||
/obj/item/device/flashlight/lamp/verb/toggle_light()
|
||||
set name = "Toggle light"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!usr.stat)
|
||||
attack_self(usr)
|
||||
|
||||
//Bananalamp
|
||||
/obj/item/device/flashlight/lamp/bananalamp
|
||||
name = "banana lamp"
|
||||
desc = "Only a clown would think to make a ghetto banana-shaped lamp. Even has a goofy pullstring."
|
||||
icon_state = "bananalamp"
|
||||
item_state = "bananalamp"
|
||||
|
||||
// FLARES
|
||||
|
||||
/obj/item/device/flashlight/flare
|
||||
name = "flare"
|
||||
desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 7 // Pretty bright.
|
||||
icon_state = "flare"
|
||||
item_state = "flare"
|
||||
actions_types = list()
|
||||
var/fuel = 0
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
heat = 1000
|
||||
light_color = LIGHT_COLOR_FLARE
|
||||
|
||||
/obj/item/device/flashlight/flare/New()
|
||||
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
|
||||
..()
|
||||
|
||||
/obj/item/device/flashlight/flare/process()
|
||||
open_flame(heat)
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel || !on)
|
||||
turn_off()
|
||||
if(!fuel)
|
||||
icon_state = "[initial(icon_state)]-empty"
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/flare/ignition_effect(atom/A, mob/user)
|
||||
if(fuel && on)
|
||||
. = "<span class='notice'>[user] lights [A] with [src] like a real \
|
||||
badass.</span>"
|
||||
else
|
||||
. = ""
|
||||
|
||||
/obj/item/device/flashlight/flare/proc/turn_off()
|
||||
on = 0
|
||||
force = initial(src.force)
|
||||
damtype = initial(src.damtype)
|
||||
if(ismob(loc))
|
||||
var/mob/U = loc
|
||||
update_brightness(U)
|
||||
else
|
||||
update_brightness(null)
|
||||
|
||||
/obj/item/device/flashlight/flare/update_brightness(mob/user = null)
|
||||
..()
|
||||
if(on)
|
||||
item_state = "[initial(item_state)]-on"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/device/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>[src] is already on.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
// All good, turn it on.
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] lights \the [src].</span>", "<span class='notice'>You light \the [src]!</span>")
|
||||
force = on_damage
|
||||
damtype = "fire"
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/flare/is_hot()
|
||||
return on * heat
|
||||
|
||||
/obj/item/device/flashlight/flare/torch
|
||||
name = "torch"
|
||||
desc = "A torch fashioned from some leaves and a log."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
brightness_on = 4
|
||||
icon_state = "torch"
|
||||
item_state = "torch"
|
||||
on_damage = 10
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/device/flashlight/lantern
|
||||
name = "lantern"
|
||||
icon_state = "lantern"
|
||||
item_state = "lantern"
|
||||
desc = "A mining lantern."
|
||||
brightness_on = 6 // luminosity when on
|
||||
|
||||
|
||||
/obj/item/device/flashlight/slime
|
||||
gender = PLURAL
|
||||
name = "glowing slime extract"
|
||||
desc = "Extract from a yellow slime. It emits a strong light when squeezed."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "slime"
|
||||
item_state = "slime"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list()
|
||||
brightness_on = 6 //luminosity when on
|
||||
|
||||
/obj/item/device/flashlight/emp
|
||||
origin_tech = "magnets=3;syndicate=1"
|
||||
var/emp_max_charges = 4
|
||||
var/emp_cur_charges = 4
|
||||
var/charge_tick = 0
|
||||
|
||||
|
||||
/obj/item/device/flashlight/emp/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/emp/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/emp/process()
|
||||
charge_tick++
|
||||
if(charge_tick < 10)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/flashlight/emp/attack(mob/living/M, mob/living/user)
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, 0) //make some noise!
|
||||
if(creator)
|
||||
visible_message("<span class='danger'>[creator] created a medical hologram!</span>")
|
||||
|
||||
|
||||
/obj/item/device/flashlight/seclite
|
||||
name = "seclite"
|
||||
desc = "A robust flashlight used by security."
|
||||
icon_state = "seclite"
|
||||
item_state = "seclite"
|
||||
force = 9 // Not as good as a stun baton.
|
||||
brightness_on = 5 // A little better than the standard flashlight.
|
||||
hitsound = 'sound/weapons/genhit1.ogg'
|
||||
|
||||
// the desk lamps are a bit special
|
||||
/obj/item/device/flashlight/lamp
|
||||
name = "desk lamp"
|
||||
desc = "A desk lamp with an adjustable mount."
|
||||
icon_state = "lamp"
|
||||
item_state = "lamp"
|
||||
brightness_on = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
materials = list()
|
||||
on = 1
|
||||
|
||||
|
||||
// green-shaded desk lamp
|
||||
/obj/item/device/flashlight/lamp/green
|
||||
desc = "A classic green-shaded desk lamp."
|
||||
icon_state = "lampgreen"
|
||||
item_state = "lampgreen"
|
||||
|
||||
|
||||
|
||||
/obj/item/device/flashlight/lamp/verb/toggle_light()
|
||||
set name = "Toggle light"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!usr.stat)
|
||||
attack_self(usr)
|
||||
|
||||
//Bananalamp
|
||||
/obj/item/device/flashlight/lamp/bananalamp
|
||||
name = "banana lamp"
|
||||
desc = "Only a clown would think to make a ghetto banana-shaped lamp. Even has a goofy pullstring."
|
||||
icon_state = "bananalamp"
|
||||
item_state = "bananalamp"
|
||||
|
||||
// FLARES
|
||||
|
||||
/obj/item/device/flashlight/flare
|
||||
name = "flare"
|
||||
desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 7 // Pretty bright.
|
||||
icon_state = "flare"
|
||||
item_state = "flare"
|
||||
actions_types = list()
|
||||
var/fuel = 0
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
heat = 1000
|
||||
light_color = LIGHT_COLOR_FLARE
|
||||
|
||||
/obj/item/device/flashlight/flare/New()
|
||||
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
|
||||
..()
|
||||
|
||||
/obj/item/device/flashlight/flare/process()
|
||||
open_flame(heat)
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel || !on)
|
||||
turn_off()
|
||||
if(!fuel)
|
||||
icon_state = "[initial(icon_state)]-empty"
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/flare/ignition_effect(atom/A, mob/user)
|
||||
if(fuel && on)
|
||||
. = "<span class='notice'>[user] lights [A] with [src] like a real \
|
||||
badass.</span>"
|
||||
else
|
||||
. = ""
|
||||
|
||||
/obj/item/device/flashlight/flare/proc/turn_off()
|
||||
on = 0
|
||||
force = initial(src.force)
|
||||
damtype = initial(src.damtype)
|
||||
if(ismob(loc))
|
||||
var/mob/U = loc
|
||||
update_brightness(U)
|
||||
else
|
||||
update_brightness(null)
|
||||
|
||||
/obj/item/device/flashlight/flare/update_brightness(mob/user = null)
|
||||
..()
|
||||
if(on)
|
||||
item_state = "[initial(item_state)]-on"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/device/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>[src] is already on.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
// All good, turn it on.
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] lights \the [src].</span>", "<span class='notice'>You light \the [src]!</span>")
|
||||
force = on_damage
|
||||
damtype = "fire"
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/flare/is_hot()
|
||||
return on * heat
|
||||
|
||||
/obj/item/device/flashlight/flare/torch
|
||||
name = "torch"
|
||||
desc = "A torch fashioned from some leaves and a log."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
brightness_on = 4
|
||||
icon_state = "torch"
|
||||
item_state = "torch"
|
||||
on_damage = 10
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/device/flashlight/lantern
|
||||
name = "lantern"
|
||||
icon_state = "lantern"
|
||||
item_state = "lantern"
|
||||
desc = "A mining lantern."
|
||||
brightness_on = 6 // luminosity when on
|
||||
|
||||
|
||||
/obj/item/device/flashlight/slime
|
||||
gender = PLURAL
|
||||
name = "glowing slime extract"
|
||||
desc = "Extract from a yellow slime. It emits a strong light when squeezed."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "slime"
|
||||
item_state = "slime"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list()
|
||||
brightness_on = 6 //luminosity when on
|
||||
|
||||
/obj/item/device/flashlight/emp
|
||||
origin_tech = "magnets=3;syndicate=1"
|
||||
var/emp_max_charges = 4
|
||||
var/emp_cur_charges = 4
|
||||
var/charge_tick = 0
|
||||
|
||||
|
||||
/obj/item/device/flashlight/emp/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/emp/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/emp/process()
|
||||
charge_tick++
|
||||
if(charge_tick < 10)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/flashlight/emp/attack(mob/living/M, mob/living/user)
|
||||
if(on && user.zone_selected in list("eyes", "mouth")) // call original attack when examining organs
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/device/flashlight/emp/afterattack(atom/movable/A, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(emp_cur_charges > 0)
|
||||
emp_cur_charges -= 1
|
||||
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
add_logs(user, M, "attacked", "EMP-light")
|
||||
M.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].", \
|
||||
"<span class='userdanger'>[user] blinks \the [src] at you.")
|
||||
else
|
||||
A.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].")
|
||||
to_chat(user, "\The [src] now has [emp_cur_charges] charge\s.")
|
||||
A.emp_act(1)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
|
||||
return
|
||||
|
||||
// Glowsticks, in the uncomfortable range of similar to flares,
|
||||
// but not similar enough to make it worth a refactor
|
||||
/obj/item/device/flashlight/glowstick
|
||||
name = "glowstick"
|
||||
desc = "A military-grade glowstick."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 4
|
||||
color = LIGHT_COLOR_GREEN
|
||||
icon_state = "glowstick"
|
||||
item_state = "glowstick"
|
||||
var/fuel = 0
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
light_color = color
|
||||
..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/process()
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel)
|
||||
turn_off()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/proc/turn_off()
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/update_icon()
|
||||
item_state = "glowstick"
|
||||
overlays.Cut()
|
||||
if(!fuel)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
set_light(0)
|
||||
else if(on)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/device/flashlight/emp/afterattack(atom/movable/A, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(emp_cur_charges > 0)
|
||||
emp_cur_charges -= 1
|
||||
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
add_logs(user, M, "attacked", "EMP-light")
|
||||
M.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].", \
|
||||
"<span class='userdanger'>[user] blinks \the [src] at you.")
|
||||
else
|
||||
A.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].")
|
||||
to_chat(user, "\The [src] now has [emp_cur_charges] charge\s.")
|
||||
A.emp_act(1)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
|
||||
return
|
||||
|
||||
// Glowsticks, in the uncomfortable range of similar to flares,
|
||||
// but not similar enough to make it worth a refactor
|
||||
/obj/item/device/flashlight/glowstick
|
||||
name = "glowstick"
|
||||
desc = "A military-grade glowstick."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 4
|
||||
color = LIGHT_COLOR_GREEN
|
||||
icon_state = "glowstick"
|
||||
item_state = "glowstick"
|
||||
var/fuel = 0
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
light_color = color
|
||||
..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/process()
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel)
|
||||
turn_off()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/proc/turn_off()
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/update_icon()
|
||||
item_state = "glowstick"
|
||||
overlays.Cut()
|
||||
if(!fuel)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
set_light(0)
|
||||
else if(on)
|
||||
var/mutable_appearance/glowstick_overlay = mutable_appearance(icon, "glowstick-glow")
|
||||
glowstick_overlay.color = color
|
||||
add_overlay(glowstick_overlay)
|
||||
item_state = "glowstick-on"
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = "glowstick"
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/attack_self(mob/user)
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='notice'>[src] is spent.</span>")
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>[src] is already lit.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] cracks and shakes [src].</span>", "<span class='notice'>You crack and shake [src], turning it on!</span>")
|
||||
activate()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/proc/activate()
|
||||
if(!on)
|
||||
on = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/glowstick/red
|
||||
name = "red glowstick"
|
||||
color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/device/flashlight/glowstick/blue
|
||||
name = "blue glowstick"
|
||||
color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/device/flashlight/glowstick/cyan
|
||||
name = "cyan glowstick"
|
||||
color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/item/device/flashlight/glowstick/orange
|
||||
name = "orange glowstick"
|
||||
color = LIGHT_COLOR_ORANGE
|
||||
|
||||
/obj/item/device/flashlight/glowstick/yellow
|
||||
name = "yellow glowstick"
|
||||
color = LIGHT_COLOR_YELLOW
|
||||
|
||||
/obj/item/device/flashlight/glowstick/pink
|
||||
name = "pink glowstick"
|
||||
color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/item/device/flashlight/glowstick/random
|
||||
name = "random colored glowstick"
|
||||
|
||||
/obj/item/device/flashlight/glowstick/random/Initialize()
|
||||
var/list/glowtypes = typesof(/obj/item/device/flashlight/glowstick)
|
||||
glowtypes -= /obj/item/device/flashlight/glowstick/random
|
||||
|
||||
var/obj/item/device/flashlight/glowstick/glowtype = pick(glowtypes)
|
||||
|
||||
name = initial(glowtype.name)
|
||||
color = initial(glowtype.color)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/spotlight //invisible lighting source
|
||||
item_state = "glowstick-on"
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = "glowstick"
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/attack_self(mob/user)
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='notice'>[src] is spent.</span>")
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>[src] is already lit.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] cracks and shakes [src].</span>", "<span class='notice'>You crack and shake [src], turning it on!</span>")
|
||||
activate()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/proc/activate()
|
||||
if(!on)
|
||||
on = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/glowstick/red
|
||||
name = "red glowstick"
|
||||
color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/device/flashlight/glowstick/blue
|
||||
name = "blue glowstick"
|
||||
color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/device/flashlight/glowstick/cyan
|
||||
name = "cyan glowstick"
|
||||
color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/item/device/flashlight/glowstick/orange
|
||||
name = "orange glowstick"
|
||||
color = LIGHT_COLOR_ORANGE
|
||||
|
||||
/obj/item/device/flashlight/glowstick/yellow
|
||||
name = "yellow glowstick"
|
||||
color = LIGHT_COLOR_YELLOW
|
||||
|
||||
/obj/item/device/flashlight/glowstick/pink
|
||||
name = "pink glowstick"
|
||||
color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/item/device/flashlight/glowstick/random
|
||||
name = "random colored glowstick"
|
||||
|
||||
/obj/item/device/flashlight/glowstick/random/Initialize()
|
||||
var/list/glowtypes = typesof(/obj/item/device/flashlight/glowstick)
|
||||
glowtypes -= /obj/item/device/flashlight/glowstick/random
|
||||
|
||||
var/obj/item/device/flashlight/glowstick/glowtype = pick(glowtypes)
|
||||
|
||||
name = initial(glowtype.name)
|
||||
color = initial(glowtype.color)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/spotlight //invisible lighting source
|
||||
name = "disco light"
|
||||
desc = "Groovy..."
|
||||
icon_state = null
|
||||
light_color = null
|
||||
brightness_on = 0
|
||||
light_range = 0
|
||||
light_power = 10
|
||||
alpha = 0
|
||||
layer = 0
|
||||
on = TRUE
|
||||
anchored = TRUE
|
||||
var/range = null
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/item/device/flashlight/flashdark
|
||||
name = "flashdark"
|
||||
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
|
||||
icon_state = "flashdark"
|
||||
item_state = "flashdark"
|
||||
brightness_on = 2.5
|
||||
flashlight_power = -3
|
||||
icon_state = null
|
||||
light_color = null
|
||||
brightness_on = 0
|
||||
light_range = 0
|
||||
light_power = 10
|
||||
alpha = 0
|
||||
layer = 0
|
||||
on = TRUE
|
||||
anchored = TRUE
|
||||
var/range = null
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/item/device/flashlight/flashdark
|
||||
name = "flashdark"
|
||||
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
|
||||
icon_state = "flashdark"
|
||||
item_state = "flashdark"
|
||||
brightness_on = 2.5
|
||||
flashlight_power = -3
|
||||
|
||||
/obj/item/device/flashlight/eyelight
|
||||
name = "eyelight"
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
return !density
|
||||
|
||||
/obj/structure/projected_forcefield/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
|
||||
|
||||
/obj/structure/projected_forcefield/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
if(sound_effect)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
if(!do_after(user, 40*I.toolspeed, target = user))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
|
||||
playsound(user, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
emagged = 0
|
||||
radiation_count = 0
|
||||
update_icon()
|
||||
|
||||
@@ -118,9 +118,8 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
switch(action)
|
||||
if("rename")
|
||||
var/a = input("Please enter desired tag.", name, gpstag) as text
|
||||
a = uppertext(copytext(sanitize(a), 1, 5))
|
||||
a = copytext(sanitize(a), 1, 20)
|
||||
gpstag = a
|
||||
name = "global positioning system ([gpstag])"
|
||||
. = TRUE
|
||||
if("power")
|
||||
toggletracking(usr)
|
||||
@@ -136,9 +135,10 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
..()
|
||||
if(href_list["tag"] )
|
||||
var/a = input("Please enter desired tag.", name, gpstag) as text
|
||||
a = copytext(sanitize(a), 1, 20)
|
||||
a = uppertext(copytext(sanitize(a), 1, 5))
|
||||
if(in_range(src, usr))
|
||||
gpstag = a
|
||||
name = "global positioning system ([gpstag])"
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/device/gps/science
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
//20% chance to actually hit the sensors
|
||||
if(prob(effectchance * diode.rating))
|
||||
S.flash_act(affect_silicon = 1)
|
||||
S.Weaken(rand(5,10))
|
||||
S.Knockdown(rand(100,200))
|
||||
to_chat(S, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
|
||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
|
||||
add_logs(user, S, "shone in the sensors", src)
|
||||
|
||||
@@ -1,147 +1,147 @@
|
||||
/obj/item/device/paicard
|
||||
name = "personal AI device"
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "pai"
|
||||
item_state = "electronic"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "programming=2"
|
||||
var/mob/living/silicon/pai/pai
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE
|
||||
|
||||
/obj/item/device/paicard/Initialize()
|
||||
SSpai.pai_card_list += src
|
||||
add_overlay("pai-off")
|
||||
/obj/item/device/paicard
|
||||
name = "personal AI device"
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "pai"
|
||||
item_state = "electronic"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "programming=2"
|
||||
var/mob/living/silicon/pai/pai
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE
|
||||
|
||||
/obj/item/device/paicard/Initialize()
|
||||
SSpai.pai_card_list += src
|
||||
add_overlay("pai-off")
|
||||
return ..()
|
||||
|
||||
/obj/item/device/paicard/Destroy()
|
||||
//Will stop people throwing friend pAIs into the singularity so they can respawn
|
||||
SSpai.pai_card_list -= src
|
||||
|
||||
/obj/item/device/paicard/Destroy()
|
||||
//Will stop people throwing friend pAIs into the singularity so they can respawn
|
||||
SSpai.pai_card_list -= src
|
||||
QDEL_NULL(pai)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/paicard/attack_self(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Personal AI Device</B><BR>"
|
||||
if(pai)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/paicard/attack_self(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Personal AI Device</B><BR>"
|
||||
if(pai)
|
||||
if(!pai.master_dna || !pai.master)
|
||||
dat += "<a href='byond://?src=\ref[src];setdna=1'>Imprint Master DNA</a><br>"
|
||||
dat += "Installed Personality: [pai.name]<br>"
|
||||
dat += "Prime directive: <br>[pai.laws.zeroth]<br>"
|
||||
for(var/slaws in pai.laws.supplied)
|
||||
dat += "Additional directives: <br>[slaws]<br>"
|
||||
dat += "<a href='byond://?src=\ref[src];setlaws=1'>Configure Directives</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<h3>Device Settings</h3><br>"
|
||||
if(pai.radio)
|
||||
dat += "<b>Radio Uplink</b><br>"
|
||||
dat += "Transmit: <A href='byond://?src=\ref[src];wires=[WIRE_TX]'>[(pai.radio.wires.is_cut(WIRE_TX)) ? "Disabled" : "Enabled"]</A><br>"
|
||||
dat += "Receive: <A href='byond://?src=\ref[src];wires=[WIRE_RX]'>[(pai.radio.wires.is_cut(WIRE_RX)) ? "Disabled" : "Enabled"]</A><br>"
|
||||
else
|
||||
dat += "<b>Radio Uplink</b><br>"
|
||||
dat += "<font color=red><i>Radio firmware not loaded. Please install a pAI personality to load firmware.</i></font><br>"
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.real_name == pai.master || H.dna.unique_enzymes == pai.master_dna)
|
||||
dat += "<A href='byond://?src=\ref[src];toggle_holo=1'>\[[pai.canholo? "Disable" : "Enable"] holomatrix projectors\]</a><br>"
|
||||
dat += "<A href='byond://?src=\ref[src];wipe=1'>\[Wipe current pAI personality\]</a><br>"
|
||||
else
|
||||
dat += "No personality installed.<br>"
|
||||
dat += "Searching for a personality... Press view available personalities to notify potential candidates."
|
||||
dat += "<A href='byond://?src=\ref[src];request=1'>\[View available personalities\]</a><br>"
|
||||
user << browse(dat, "window=paicard")
|
||||
onclose(user, "paicard")
|
||||
return
|
||||
|
||||
/obj/item/device/paicard/Topic(href, href_list)
|
||||
|
||||
if(!usr || usr.stat)
|
||||
return
|
||||
|
||||
if(href_list["request"])
|
||||
SSpai.findPAI(src, usr)
|
||||
|
||||
if(pai)
|
||||
if(!(loc == usr))
|
||||
return
|
||||
if(href_list["setdna"])
|
||||
if(pai.master_dna)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon))
|
||||
to_chat(usr, "<span class='warning'>You don't have any DNA, or your DNA is incompatible with this device!</span>")
|
||||
else
|
||||
var/mob/living/carbon/M = usr
|
||||
pai.master = M.real_name
|
||||
pai.master_dna = M.dna.unique_enzymes
|
||||
to_chat(pai, "<span class='notice'>You have been bound to a new master.</span>")
|
||||
pai.emittersemicd = FALSE
|
||||
if(href_list["wipe"])
|
||||
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
if(pai)
|
||||
to_chat(pai, "<span class='warning'>You feel yourself slipping away from reality.</span>")
|
||||
to_chat(pai, "<span class='danger'>Byte by byte you lose your sense of self.</span>")
|
||||
to_chat(pai, "<span class='userdanger'>Your mental faculties leave you.</span>")
|
||||
to_chat(pai, "<span class='rose'>oblivion... </span>")
|
||||
dat += "Installed Personality: [pai.name]<br>"
|
||||
dat += "Prime directive: <br>[pai.laws.zeroth]<br>"
|
||||
for(var/slaws in pai.laws.supplied)
|
||||
dat += "Additional directives: <br>[slaws]<br>"
|
||||
dat += "<a href='byond://?src=\ref[src];setlaws=1'>Configure Directives</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<h3>Device Settings</h3><br>"
|
||||
if(pai.radio)
|
||||
dat += "<b>Radio Uplink</b><br>"
|
||||
dat += "Transmit: <A href='byond://?src=\ref[src];wires=[WIRE_TX]'>[(pai.radio.wires.is_cut(WIRE_TX)) ? "Disabled" : "Enabled"]</A><br>"
|
||||
dat += "Receive: <A href='byond://?src=\ref[src];wires=[WIRE_RX]'>[(pai.radio.wires.is_cut(WIRE_RX)) ? "Disabled" : "Enabled"]</A><br>"
|
||||
else
|
||||
dat += "<b>Radio Uplink</b><br>"
|
||||
dat += "<font color=red><i>Radio firmware not loaded. Please install a pAI personality to load firmware.</i></font><br>"
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.real_name == pai.master || H.dna.unique_enzymes == pai.master_dna)
|
||||
dat += "<A href='byond://?src=\ref[src];toggle_holo=1'>\[[pai.canholo? "Disable" : "Enable"] holomatrix projectors\]</a><br>"
|
||||
dat += "<A href='byond://?src=\ref[src];wipe=1'>\[Wipe current pAI personality\]</a><br>"
|
||||
else
|
||||
dat += "No personality installed.<br>"
|
||||
dat += "Searching for a personality... Press view available personalities to notify potential candidates."
|
||||
dat += "<A href='byond://?src=\ref[src];request=1'>\[View available personalities\]</a><br>"
|
||||
user << browse(dat, "window=paicard")
|
||||
onclose(user, "paicard")
|
||||
return
|
||||
|
||||
/obj/item/device/paicard/Topic(href, href_list)
|
||||
|
||||
if(!usr || usr.stat)
|
||||
return
|
||||
|
||||
if(href_list["request"])
|
||||
SSpai.findPAI(src, usr)
|
||||
|
||||
if(pai)
|
||||
if(!(loc == usr))
|
||||
return
|
||||
if(href_list["setdna"])
|
||||
if(pai.master_dna)
|
||||
return
|
||||
if(!iscarbon(usr))
|
||||
to_chat(usr, "<span class='warning'>You don't have any DNA, or your DNA is incompatible with this device!</span>")
|
||||
else
|
||||
var/mob/living/carbon/M = usr
|
||||
pai.master = M.real_name
|
||||
pai.master_dna = M.dna.unique_enzymes
|
||||
to_chat(pai, "<span class='notice'>You have been bound to a new master.</span>")
|
||||
pai.emittersemicd = FALSE
|
||||
if(href_list["wipe"])
|
||||
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
if(pai)
|
||||
to_chat(pai, "<span class='warning'>You feel yourself slipping away from reality.</span>")
|
||||
to_chat(pai, "<span class='danger'>Byte by byte you lose your sense of self.</span>")
|
||||
to_chat(pai, "<span class='userdanger'>Your mental faculties leave you.</span>")
|
||||
to_chat(pai, "<span class='rose'>oblivion... </span>")
|
||||
removePersonality()
|
||||
if(href_list["wires"])
|
||||
var/wire = text2num(href_list["wires"])
|
||||
if(pai.radio)
|
||||
pai.radio.wires.cut(wire)
|
||||
if(href_list["setlaws"])
|
||||
var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.laws.supplied[1]) as message),1,MAX_MESSAGE_LEN)
|
||||
if(newlaws && pai)
|
||||
pai.add_supplied_law(0,newlaws)
|
||||
if(href_list["toggle_holo"])
|
||||
if(pai.canholo)
|
||||
to_chat(pai, "<span class='userdanger'>Your owner has disabled your holomatrix projectors!</span>")
|
||||
pai.canholo = FALSE
|
||||
to_chat(usr, "<span class='warning'>You disable your pAI's holomatrix!</span>")
|
||||
else
|
||||
to_chat(pai, "<span class='boldnotice'>Your owner has enabled your holomatrix projectors!</span>")
|
||||
pai.canholo = TRUE
|
||||
to_chat(usr, "<span class='notice'>You enable your pAI's holomatrix!</span>")
|
||||
|
||||
attack_self(usr)
|
||||
|
||||
// WIRE_SIGNAL = 1
|
||||
// WIRE_RECEIVE = 2
|
||||
// WIRE_TRANSMIT = 4
|
||||
|
||||
/obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
|
||||
src.pai = personality
|
||||
src.add_overlay("pai-null")
|
||||
|
||||
playsound(loc, 'sound/effects/pai_boot.ogg', 50, 1, -1)
|
||||
audible_message("\The [src] plays a cheerful startup noise!")
|
||||
|
||||
/obj/item/device/paicard/proc/removePersonality()
|
||||
if(href_list["wires"])
|
||||
var/wire = text2num(href_list["wires"])
|
||||
if(pai.radio)
|
||||
pai.radio.wires.cut(wire)
|
||||
if(href_list["setlaws"])
|
||||
var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.laws.supplied[1]) as message),1,MAX_MESSAGE_LEN)
|
||||
if(newlaws && pai)
|
||||
pai.add_supplied_law(0,newlaws)
|
||||
if(href_list["toggle_holo"])
|
||||
if(pai.canholo)
|
||||
to_chat(pai, "<span class='userdanger'>Your owner has disabled your holomatrix projectors!</span>")
|
||||
pai.canholo = FALSE
|
||||
to_chat(usr, "<span class='warning'>You disable your pAI's holomatrix!</span>")
|
||||
else
|
||||
to_chat(pai, "<span class='boldnotice'>Your owner has enabled your holomatrix projectors!</span>")
|
||||
pai.canholo = TRUE
|
||||
to_chat(usr, "<span class='notice'>You enable your pAI's holomatrix!</span>")
|
||||
|
||||
attack_self(usr)
|
||||
|
||||
// WIRE_SIGNAL = 1
|
||||
// WIRE_RECEIVE = 2
|
||||
// WIRE_TRANSMIT = 4
|
||||
|
||||
/obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
|
||||
src.pai = personality
|
||||
src.add_overlay("pai-null")
|
||||
|
||||
playsound(loc, 'sound/effects/pai_boot.ogg', 50, 1, -1)
|
||||
audible_message("\The [src] plays a cheerful startup noise!")
|
||||
|
||||
/obj/item/device/paicard/proc/removePersonality()
|
||||
QDEL_NULL(pai)
|
||||
cut_overlays()
|
||||
add_overlay("pai-off")
|
||||
|
||||
/obj/item/device/paicard/proc/setEmotion(emotion)
|
||||
if(pai)
|
||||
src.cut_overlays()
|
||||
switch(emotion)
|
||||
if(1) src.add_overlay("pai-happy")
|
||||
if(2) src.add_overlay("pai-cat")
|
||||
if(3) src.add_overlay("pai-extremely-happy")
|
||||
if(4) src.add_overlay("pai-face")
|
||||
if(5) src.add_overlay("pai-laugh")
|
||||
if(6) src.add_overlay("pai-off")
|
||||
if(7) src.add_overlay("pai-sad")
|
||||
if(8) src.add_overlay("pai-angry")
|
||||
if(9) src.add_overlay("pai-what")
|
||||
if(10) src.add_overlay("pai-null")
|
||||
|
||||
/obj/item/device/paicard/proc/alertUpdate()
|
||||
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")
|
||||
|
||||
/obj/item/device/paicard/emp_act(severity)
|
||||
if(pai)
|
||||
pai.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/paicard/proc/setEmotion(emotion)
|
||||
if(pai)
|
||||
src.cut_overlays()
|
||||
switch(emotion)
|
||||
if(1) src.add_overlay("pai-happy")
|
||||
if(2) src.add_overlay("pai-cat")
|
||||
if(3) src.add_overlay("pai-extremely-happy")
|
||||
if(4) src.add_overlay("pai-face")
|
||||
if(5) src.add_overlay("pai-laugh")
|
||||
if(6) src.add_overlay("pai-off")
|
||||
if(7) src.add_overlay("pai-sad")
|
||||
if(8) src.add_overlay("pai-angry")
|
||||
if(9) src.add_overlay("pai-what")
|
||||
if(10) src.add_overlay("pai-null")
|
||||
|
||||
/obj/item/device/paicard/proc/alertUpdate()
|
||||
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")
|
||||
|
||||
/obj/item/device/paicard/emp_act(severity)
|
||||
if(pai)
|
||||
pai.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
@@ -1,145 +1,145 @@
|
||||
// Powersink - used to drain station power
|
||||
|
||||
/obj/item/device/powersink
|
||||
desc = "A nulling power sink which drains energy from electrical systems."
|
||||
name = "power sink"
|
||||
icon_state = "powersink0"
|
||||
item_state = "electronic"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
throwforce = 5
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
materials = list(MAT_METAL=750)
|
||||
origin_tech = "powerstorage=5;syndicate=5"
|
||||
var/drain_rate = 1600000 // amount of power to drain per tick
|
||||
var/power_drained = 0 // has drained this much power
|
||||
var/max_power = 1e10 // maximum power that can be drained before exploding
|
||||
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
|
||||
var/admins_warned = 0 // stop spam, only warn the admins once that we are about to boom
|
||||
|
||||
var/const/DISCONNECTED = 0
|
||||
var/const/CLAMPED_OFF = 1
|
||||
var/const/OPERATING = 2
|
||||
|
||||
var/obj/structure/cable/attached // the attached cable
|
||||
|
||||
/obj/item/device/powersink/update_icon()
|
||||
icon_state = "powersink[mode == OPERATING]"
|
||||
|
||||
/obj/item/device/powersink/proc/set_mode(value)
|
||||
if(value == mode)
|
||||
return
|
||||
switch(value)
|
||||
if(DISCONNECTED)
|
||||
attached = null
|
||||
if(mode == OPERATING)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
anchored = 0
|
||||
|
||||
if(CLAMPED_OFF)
|
||||
if(!attached)
|
||||
return
|
||||
if(mode == OPERATING)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
anchored = 1
|
||||
|
||||
if(OPERATING)
|
||||
if(!attached)
|
||||
return
|
||||
START_PROCESSING(SSobj, src)
|
||||
anchored = 1
|
||||
|
||||
mode = value
|
||||
update_icon()
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/powersink/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(mode == DISCONNECTED)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !T.intact)
|
||||
attached = locate() in T
|
||||
if(!attached)
|
||||
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
|
||||
else
|
||||
set_mode(CLAMPED_OFF)
|
||||
user.visible_message( \
|
||||
"[user] attaches \the [src] to the cable.", \
|
||||
"<span class='notice'>You attach \the [src] to the cable.</span>",
|
||||
"<span class='italics'>You hear some wires being connected to something.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
|
||||
else
|
||||
set_mode(DISCONNECTED)
|
||||
user.visible_message( \
|
||||
"[user] detaches \the [src] from the cable.", \
|
||||
"<span class='notice'>You detach \the [src] from the cable.</span>",
|
||||
"<span class='italics'>You hear some wires being disconnected from something.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/powersink/attack_paw()
|
||||
return
|
||||
|
||||
/obj/item/device/powersink/attack_ai()
|
||||
return
|
||||
|
||||
/obj/item/device/powersink/attack_hand(mob/user)
|
||||
switch(mode)
|
||||
if(DISCONNECTED)
|
||||
..()
|
||||
|
||||
if(CLAMPED_OFF)
|
||||
user.visible_message( \
|
||||
"[user] activates \the [src]!", \
|
||||
"<span class='notice'>You activate \the [src].</span>",
|
||||
"<span class='italics'>You hear a click.</span>")
|
||||
message_admins("Power sink activated by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(src)]")
|
||||
log_game("Power sink activated by [key_name(user)] at [COORD(src)]")
|
||||
set_mode(OPERATING)
|
||||
|
||||
if(OPERATING)
|
||||
user.visible_message( \
|
||||
"[user] deactivates \the [src]!", \
|
||||
"<span class='notice'>You deactivate \the [src].</span>",
|
||||
"<span class='italics'>You hear a click.</span>")
|
||||
set_mode(CLAMPED_OFF)
|
||||
|
||||
/obj/item/device/powersink/process()
|
||||
if(!attached)
|
||||
set_mode(DISCONNECTED)
|
||||
return
|
||||
|
||||
var/datum/powernet/PN = attached.powernet
|
||||
if(PN)
|
||||
set_light(5)
|
||||
|
||||
// found a powernet, so drain up to max power from it
|
||||
|
||||
var/drained = min ( drain_rate, PN.avail )
|
||||
PN.load += drained
|
||||
power_drained += drained
|
||||
|
||||
// if tried to drain more than available on powernet
|
||||
// now look for APCs and drain their cells
|
||||
if(drained < drain_rate)
|
||||
for(var/obj/machinery/power/terminal/T in PN.nodes)
|
||||
if(istype(T.master, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = T.master
|
||||
if(A.operating && A.cell)
|
||||
A.cell.charge = max(0, A.cell.charge - 50)
|
||||
power_drained += 50
|
||||
if(A.charging == 2) // If the cell was full
|
||||
A.charging = 1 // It's no longer full
|
||||
|
||||
if(power_drained > max_power * 0.98)
|
||||
if (!admins_warned)
|
||||
admins_warned = 1
|
||||
message_admins("Power sink at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) is 95% full. Explosion imminent.")
|
||||
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
|
||||
|
||||
if(power_drained >= max_power)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
// Powersink - used to drain station power
|
||||
|
||||
/obj/item/device/powersink
|
||||
desc = "A nulling power sink which drains energy from electrical systems."
|
||||
name = "power sink"
|
||||
icon_state = "powersink0"
|
||||
item_state = "electronic"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
throwforce = 5
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
materials = list(MAT_METAL=750)
|
||||
origin_tech = "powerstorage=5;syndicate=5"
|
||||
var/drain_rate = 1600000 // amount of power to drain per tick
|
||||
var/power_drained = 0 // has drained this much power
|
||||
var/max_power = 1e10 // maximum power that can be drained before exploding
|
||||
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
|
||||
var/admins_warned = 0 // stop spam, only warn the admins once that we are about to boom
|
||||
|
||||
var/const/DISCONNECTED = 0
|
||||
var/const/CLAMPED_OFF = 1
|
||||
var/const/OPERATING = 2
|
||||
|
||||
var/obj/structure/cable/attached // the attached cable
|
||||
|
||||
/obj/item/device/powersink/update_icon()
|
||||
icon_state = "powersink[mode == OPERATING]"
|
||||
|
||||
/obj/item/device/powersink/proc/set_mode(value)
|
||||
if(value == mode)
|
||||
return
|
||||
switch(value)
|
||||
if(DISCONNECTED)
|
||||
attached = null
|
||||
if(mode == OPERATING)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
anchored = 0
|
||||
|
||||
if(CLAMPED_OFF)
|
||||
if(!attached)
|
||||
return
|
||||
if(mode == OPERATING)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
anchored = 1
|
||||
|
||||
if(OPERATING)
|
||||
if(!attached)
|
||||
return
|
||||
START_PROCESSING(SSobj, src)
|
||||
anchored = 1
|
||||
|
||||
mode = value
|
||||
update_icon()
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/powersink/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(mode == DISCONNECTED)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !T.intact)
|
||||
attached = locate() in T
|
||||
if(!attached)
|
||||
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
|
||||
else
|
||||
set_mode(CLAMPED_OFF)
|
||||
user.visible_message( \
|
||||
"[user] attaches \the [src] to the cable.", \
|
||||
"<span class='notice'>You attach \the [src] to the cable.</span>",
|
||||
"<span class='italics'>You hear some wires being connected to something.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
|
||||
else
|
||||
set_mode(DISCONNECTED)
|
||||
user.visible_message( \
|
||||
"[user] detaches \the [src] from the cable.", \
|
||||
"<span class='notice'>You detach \the [src] from the cable.</span>",
|
||||
"<span class='italics'>You hear some wires being disconnected from something.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/powersink/attack_paw()
|
||||
return
|
||||
|
||||
/obj/item/device/powersink/attack_ai()
|
||||
return
|
||||
|
||||
/obj/item/device/powersink/attack_hand(mob/user)
|
||||
switch(mode)
|
||||
if(DISCONNECTED)
|
||||
..()
|
||||
|
||||
if(CLAMPED_OFF)
|
||||
user.visible_message( \
|
||||
"[user] activates \the [src]!", \
|
||||
"<span class='notice'>You activate \the [src].</span>",
|
||||
"<span class='italics'>You hear a click.</span>")
|
||||
message_admins("Power sink activated by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(src)]")
|
||||
log_game("Power sink activated by [key_name(user)] at [COORD(src)]")
|
||||
set_mode(OPERATING)
|
||||
|
||||
if(OPERATING)
|
||||
user.visible_message( \
|
||||
"[user] deactivates \the [src]!", \
|
||||
"<span class='notice'>You deactivate \the [src].</span>",
|
||||
"<span class='italics'>You hear a click.</span>")
|
||||
set_mode(CLAMPED_OFF)
|
||||
|
||||
/obj/item/device/powersink/process()
|
||||
if(!attached)
|
||||
set_mode(DISCONNECTED)
|
||||
return
|
||||
|
||||
var/datum/powernet/PN = attached.powernet
|
||||
if(PN)
|
||||
set_light(5)
|
||||
|
||||
// found a powernet, so drain up to max power from it
|
||||
|
||||
var/drained = min ( drain_rate, PN.avail )
|
||||
PN.load += drained
|
||||
power_drained += drained
|
||||
|
||||
// if tried to drain more than available on powernet
|
||||
// now look for APCs and drain their cells
|
||||
if(drained < drain_rate)
|
||||
for(var/obj/machinery/power/terminal/T in PN.nodes)
|
||||
if(istype(T.master, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = T.master
|
||||
if(A.operating && A.cell)
|
||||
A.cell.charge = max(0, A.cell.charge - 50)
|
||||
power_drained += 50
|
||||
if(A.charging == 2) // If the cell was full
|
||||
A.charging = 1 // It's no longer full
|
||||
|
||||
if(power_drained > max_power * 0.98)
|
||||
if (!admins_warned)
|
||||
admins_warned = 1
|
||||
message_admins("Power sink at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) is 95% full. Explosion imminent.")
|
||||
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
|
||||
|
||||
if(power_drained >= max_power)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
explosion(src.loc, 4,8,16,32)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
sigdev = new
|
||||
sigdev.code = roundstart_signaller_code
|
||||
sigdev.frequency = roundstart_signaller_freq
|
||||
if(istype(loc, /turf/open))
|
||||
if(isopenturf(loc))
|
||||
hide(TRUE)
|
||||
|
||||
/obj/item/device/pressure_plate/Crossed(atom/movable/AM)
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
/obj/item/device/radio/beacon
|
||||
name = "tracking beacon"
|
||||
desc = "A beacon used by a teleporter."
|
||||
icon_state = "beacon"
|
||||
item_state = "beacon"
|
||||
var/code = "electronic"
|
||||
origin_tech = "bluespace=1"
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/device/radio/beacon
|
||||
name = "tracking beacon"
|
||||
desc = "A beacon used by a teleporter."
|
||||
icon_state = "beacon"
|
||||
item_state = "beacon"
|
||||
var/code = "electronic"
|
||||
origin_tech = "bluespace=1"
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/device/radio/beacon/Initialize()
|
||||
. = ..()
|
||||
GLOB.teleportbeacons += src
|
||||
|
||||
/obj/item/device/radio/beacon/Destroy()
|
||||
GLOB.teleportbeacons.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/beacon/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, message_mode)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/beacon/send_hear()
|
||||
return null
|
||||
|
||||
|
||||
/obj/item/device/radio/beacon/verb/alter_signal(t as text)
|
||||
set name = "Alter Beacon's Signal"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if ((usr.canmove && !( usr.restrained() )))
|
||||
src.code = t
|
||||
if (!( src.code ))
|
||||
src.code = "beacon"
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/*
|
||||
//Probably a better way of doing this, I'm lazy.
|
||||
/obj/item/device/radio/beacon/bacon/proc/digest_delay()
|
||||
spawn(600)
|
||||
qdel(src)*/ //Bacon beacons are no more rip in peace
|
||||
GLOB.teleportbeacons += src
|
||||
|
||||
/obj/item/device/radio/beacon/Destroy()
|
||||
GLOB.teleportbeacons.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/beacon/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, message_mode)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/beacon/send_hear()
|
||||
return null
|
||||
|
||||
|
||||
/obj/item/device/radio/beacon/verb/alter_signal(t as text)
|
||||
set name = "Alter Beacon's Signal"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if ((usr.canmove && !( usr.restrained() )))
|
||||
src.code = t
|
||||
if (!( src.code ))
|
||||
src.code = "beacon"
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/*
|
||||
//Probably a better way of doing this, I'm lazy.
|
||||
/obj/item/device/radio/beacon/bacon/proc/digest_delay()
|
||||
spawn(600)
|
||||
qdel(src)*/ //Bacon beacons are no more rip in peace
|
||||
|
||||
@@ -78,14 +78,14 @@
|
||||
on = !( on )
|
||||
icon_state = "electropack[on]"
|
||||
if(!( master ))
|
||||
if(istype(loc, /mob))
|
||||
if(ismob(loc))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
else
|
||||
if(istype(master.loc, /mob))
|
||||
if(ismob(master.loc))
|
||||
attack_self(master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, master))
|
||||
@@ -100,21 +100,21 @@
|
||||
if(!signal || signal.encryption != code)
|
||||
return
|
||||
|
||||
if(ismob(loc) && on)
|
||||
if(isliving(loc) && on)
|
||||
if(shock_cooldown != 0)
|
||||
return
|
||||
shock_cooldown = 1
|
||||
spawn(100)
|
||||
shock_cooldown = 0
|
||||
var/mob/M = loc
|
||||
step(M, pick(GLOB.cardinal))
|
||||
var/mob/living/L = loc
|
||||
step(L, pick(GLOB.cardinal))
|
||||
|
||||
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
|
||||
to_chat(L, "<span class='danger'>You feel a sharp shock!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, M)
|
||||
s.set_up(3, 1, L)
|
||||
s.start()
|
||||
|
||||
M.Weaken(5)
|
||||
L.Knockdown(100)
|
||||
|
||||
if(master)
|
||||
master.receive_signal()
|
||||
|
||||
@@ -1,309 +1,309 @@
|
||||
/obj/item/device/radio/headset
|
||||
name = "radio headset"
|
||||
desc = "An updated, modular intercom that fits over the head. Takes encryption keys. \nTo speak on the general radio frequency, use ; before speaking."
|
||||
icon_state = "headset"
|
||||
item_state = "headset"
|
||||
materials = list(MAT_METAL=75)
|
||||
subspace_transmission = 1
|
||||
canhear_range = 0 // can't hear headsets from very far away
|
||||
|
||||
slot_flags = SLOT_EARS
|
||||
var/obj/item/device/encryptionkey/keyslot2 = null
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/device/radio/headset
|
||||
name = "radio headset"
|
||||
desc = "An updated, modular intercom that fits over the head. Takes encryption keys. \nTo speak on the general radio frequency, use ; before speaking."
|
||||
icon_state = "headset"
|
||||
item_state = "headset"
|
||||
materials = list(MAT_METAL=75)
|
||||
subspace_transmission = 1
|
||||
canhear_range = 0 // can't hear headsets from very far away
|
||||
|
||||
slot_flags = SLOT_EARS
|
||||
var/obj/item/device/encryptionkey/keyslot2 = null
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/device/radio/headset/Initialize()
|
||||
. = ..()
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/headset/Destroy()
|
||||
qdel(keyslot)
|
||||
qdel(keyslot2)
|
||||
keyslot = null
|
||||
keyslot2 = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/talk_into(mob/living/M, message, channel, list/spans,datum/language/language)
|
||||
if (!listening)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level, AIuser)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.ears == src)
|
||||
return ..(freq, level)
|
||||
else if(AIuser)
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
|
||||
/obj/item/device/radio/headset/syndicate //disguised to look like a normal headset for stealth ops
|
||||
origin_tech = "syndicate=3"
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt //undisguised bowman with flash protection
|
||||
name = "syndicate headset"
|
||||
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs. \nTo access the syndicate channel, use ; before speaking."
|
||||
origin_tech = "syndicate=3"
|
||||
icon_state = "syndie_headset"
|
||||
item_state = "syndie_headset"
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt/Initialize(mapload)
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/headset/Destroy()
|
||||
qdel(keyslot)
|
||||
qdel(keyslot2)
|
||||
keyslot = null
|
||||
keyslot2 = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/talk_into(mob/living/M, message, channel, list/spans,datum/language/language)
|
||||
if (!listening)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level, AIuser)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.ears == src)
|
||||
return ..(freq, level)
|
||||
else if(AIuser)
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
|
||||
/obj/item/device/radio/headset/syndicate //disguised to look like a normal headset for stealth ops
|
||||
origin_tech = "syndicate=3"
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt //undisguised bowman with flash protection
|
||||
name = "syndicate headset"
|
||||
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs. \nTo access the syndicate channel, use ; before speaking."
|
||||
origin_tech = "syndicate=3"
|
||||
icon_state = "syndie_headset"
|
||||
item_state = "syndie_headset"
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt/leader
|
||||
name = "team leader headset"
|
||||
command = TRUE
|
||||
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt/leader
|
||||
name = "team leader headset"
|
||||
command = TRUE
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/Initialize()
|
||||
. = ..()
|
||||
make_syndie()
|
||||
|
||||
/obj/item/device/radio/headset/binary
|
||||
origin_tech = "syndicate=3"
|
||||
make_syndie()
|
||||
|
||||
/obj/item/device/radio/headset/binary
|
||||
origin_tech = "syndicate=3"
|
||||
/obj/item/device/radio/headset/binary/Initialize()
|
||||
. = ..()
|
||||
qdel(keyslot)
|
||||
keyslot = new /obj/item/device/encryptionkey/binary
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec
|
||||
name = "security radio headset"
|
||||
desc = "This is used by your elite security force. \nTo access the security channel, use :s."
|
||||
icon_state = "sec_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_sec
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec/alt
|
||||
name = "security bowman headset"
|
||||
desc = "This is used by your elite security force. Protects ears from flashbangs. \nTo access the security channel, use :s."
|
||||
icon_state = "sec_headset_alt"
|
||||
item_state = "sec_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec/alt/Initialize(mapload)
|
||||
qdel(keyslot)
|
||||
keyslot = new /obj/item/device/encryptionkey/binary
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec
|
||||
name = "security radio headset"
|
||||
desc = "This is used by your elite security force. \nTo access the security channel, use :s."
|
||||
icon_state = "sec_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_sec
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec/alt
|
||||
name = "security bowman headset"
|
||||
desc = "This is used by your elite security force. Protects ears from flashbangs. \nTo access the security channel, use :s."
|
||||
icon_state = "sec_headset_alt"
|
||||
item_state = "sec_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec/alt/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/headset_eng
|
||||
name = "engineering radio headset"
|
||||
desc = "When the engineers wish to chat like girls. \nTo access the engineering channel, use :e. "
|
||||
icon_state = "eng_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_eng
|
||||
|
||||
/obj/item/device/radio/headset/headset_rob
|
||||
name = "robotics radio headset"
|
||||
desc = "Made specifically for the roboticists, who cannot decide between departments. \nTo access the engineering channel, use :e. For research, use :n."
|
||||
icon_state = "rob_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_rob
|
||||
|
||||
/obj/item/device/radio/headset/headset_med
|
||||
name = "medical radio headset"
|
||||
desc = "A headset for the trained staff of the medbay. \nTo access the medical channel, use :m."
|
||||
icon_state = "med_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_med
|
||||
|
||||
/obj/item/device/radio/headset/headset_sci
|
||||
name = "science radio headset"
|
||||
desc = "A sciency headset. Like usual. \nTo access the science channel, use :n."
|
||||
icon_state = "sci_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_sci
|
||||
|
||||
/obj/item/device/radio/headset/headset_medsci
|
||||
name = "medical research radio headset"
|
||||
desc = "A headset that is a result of the mating between medical and science. \nTo access the medical channel, use :m. For science, use :n."
|
||||
icon_state = "medsci_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_medsci
|
||||
|
||||
/obj/item/device/radio/headset/headset_com
|
||||
name = "command radio headset"
|
||||
desc = "A headset with a commanding channel. \nTo access the command channel, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_com
|
||||
|
||||
/obj/item/device/radio/headset/heads
|
||||
command = TRUE
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain
|
||||
name = "\proper the captain's headset"
|
||||
desc = "The headset of the king. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/captain
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain/alt
|
||||
name = "\proper the captain's bowman headset"
|
||||
desc = "The headset of the boss. Protects ears from flashbangs. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain/alt/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/heads/rd
|
||||
name = "\proper the research director's headset"
|
||||
desc = "Headset of the fellow who keeps society marching towards technological singularity. \nTo access the science channel, use :n. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/rd
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos
|
||||
name = "\proper the head of security's headset"
|
||||
desc = "The headset of the man in charge of keeping order and protecting the station. \nTo access the security channel, use :s. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/hos
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos/alt
|
||||
name = "\proper the head of security's bowman headset"
|
||||
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs. \nTo access the security channel, use :s. For command, use :c."
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos/alt/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/heads/ce
|
||||
name = "\proper the chief engineer's headset"
|
||||
desc = "The headset of the guy in charge of keeping the station powered and undamaged. \nTo access the engineering channel, use :e. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/ce
|
||||
|
||||
/obj/item/device/radio/headset/heads/cmo
|
||||
name = "\proper the chief medical officer's headset"
|
||||
desc = "The headset of the highly trained medical chief. \nTo access the medical channel, use :m. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/cmo
|
||||
|
||||
/obj/item/device/radio/headset/heads/hop
|
||||
name = "\proper the head of personnel's headset"
|
||||
desc = "The headset of the guy who will one day be captain. \nChannels are as follows: :u - supply, :v - service, :c - command."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/hop
|
||||
|
||||
/obj/item/device/radio/headset/headset_cargo
|
||||
name = "supply radio headset"
|
||||
desc = "A headset used by the QM and his slaves. \nTo access the supply channel, use :u."
|
||||
icon_state = "cargo_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_cargo
|
||||
|
||||
/obj/item/device/radio/headset/headset_cargo/mining
|
||||
name = "mining radio headset"
|
||||
desc = "Headset used by shaft miners. \nTo access the supply channel, use :u. For science, use :n."
|
||||
icon_state = "mine_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_mining
|
||||
|
||||
/obj/item/device/radio/headset/headset_srv
|
||||
name = "service radio headset"
|
||||
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean. \nTo access the service channel, use :v."
|
||||
icon_state = "srv_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_service
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent
|
||||
name = "\improper Centcom headset"
|
||||
desc = "A headset used by the upper echelons of Nanotrasen. \nTo access the centcom channel, use :y."
|
||||
icon_state = "cent_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_com
|
||||
keyslot2 = new /obj/item/device/encryptionkey/headset_cent
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent/commander
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/captain
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent/alt
|
||||
name = "\improper Centcom bowman headset"
|
||||
desc = "A headset especially for emergency response personnel. Protects ears from flashbangs. \nTo access the centcom channel, use :y."
|
||||
icon_state = "cent_headset_alt"
|
||||
item_state = "cent_headset_alt"
|
||||
keyslot = null
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent/alt/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/ai
|
||||
name = "\proper Integrated Subspace Transceiver "
|
||||
keyslot2 = new /obj/item/device/encryptionkey/ai
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/headset_eng
|
||||
name = "engineering radio headset"
|
||||
desc = "When the engineers wish to chat like girls. \nTo access the engineering channel, use :e. "
|
||||
icon_state = "eng_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_eng
|
||||
|
||||
/obj/item/device/radio/headset/headset_rob
|
||||
name = "robotics radio headset"
|
||||
desc = "Made specifically for the roboticists, who cannot decide between departments. \nTo access the engineering channel, use :e. For research, use :n."
|
||||
icon_state = "rob_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_rob
|
||||
|
||||
/obj/item/device/radio/headset/headset_med
|
||||
name = "medical radio headset"
|
||||
desc = "A headset for the trained staff of the medbay. \nTo access the medical channel, use :m."
|
||||
icon_state = "med_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_med
|
||||
|
||||
/obj/item/device/radio/headset/headset_sci
|
||||
name = "science radio headset"
|
||||
desc = "A sciency headset. Like usual. \nTo access the science channel, use :n."
|
||||
icon_state = "sci_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_sci
|
||||
|
||||
/obj/item/device/radio/headset/headset_medsci
|
||||
name = "medical research radio headset"
|
||||
desc = "A headset that is a result of the mating between medical and science. \nTo access the medical channel, use :m. For science, use :n."
|
||||
icon_state = "medsci_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_medsci
|
||||
|
||||
/obj/item/device/radio/headset/headset_com
|
||||
name = "command radio headset"
|
||||
desc = "A headset with a commanding channel. \nTo access the command channel, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_com
|
||||
|
||||
/obj/item/device/radio/headset/heads
|
||||
command = TRUE
|
||||
|
||||
/obj/item/device/radio/headset/ai/receive_range(freq, level)
|
||||
return ..(freq, level, 1)
|
||||
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W, mob/user, params)
|
||||
user.set_machine(src)
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(keyslot || keyslot2)
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
|
||||
if(keyslot)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot.loc = T
|
||||
keyslot = null
|
||||
|
||||
|
||||
|
||||
if(keyslot2)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot2.loc = T
|
||||
keyslot2 = null
|
||||
|
||||
recalculateChannels()
|
||||
to_chat(user, "<span class='notice'>You pop out the encryption keys in the headset.</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This headset doesn't have any unique encryption keys! How useless...</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/encryptionkey/))
|
||||
if(keyslot && keyslot2)
|
||||
to_chat(user, "<span class='warning'>The headset can't hold another key!</span>")
|
||||
return
|
||||
|
||||
if(!keyslot)
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
keyslot = W
|
||||
|
||||
else
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
keyslot2 = W
|
||||
|
||||
|
||||
recalculateChannels()
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device/radio/headset/recalculateChannels()
|
||||
..()
|
||||
if(keyslot2)
|
||||
for(var/ch_name in keyslot2.channels)
|
||||
if(ch_name in src.channels)
|
||||
continue
|
||||
src.channels += ch_name
|
||||
src.channels[ch_name] = keyslot2.channels[ch_name]
|
||||
|
||||
if(keyslot2.translate_binary)
|
||||
src.translate_binary = 1
|
||||
|
||||
if(keyslot2.syndie)
|
||||
src.syndie = 1
|
||||
|
||||
if (keyslot2.independent)
|
||||
independent = TRUE
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = add_radio(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
return
|
||||
|
||||
/obj/item/device/radio/headset/AltClick(mob/living/user)
|
||||
if(!istype(user) || !Adjacent(user) || user.incapacitated())
|
||||
return
|
||||
if (command)
|
||||
use_command = !use_command
|
||||
to_chat(user, "<span class='notice'>You toggle high-volume mode [use_command ? "on" : "off"].</span>")
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain
|
||||
name = "\proper the captain's headset"
|
||||
desc = "The headset of the king. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/captain
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain/alt
|
||||
name = "\proper the captain's bowman headset"
|
||||
desc = "The headset of the boss. Protects ears from flashbangs. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain/alt/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/heads/rd
|
||||
name = "\proper the research director's headset"
|
||||
desc = "Headset of the fellow who keeps society marching towards technological singularity. \nTo access the science channel, use :n. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/rd
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos
|
||||
name = "\proper the head of security's headset"
|
||||
desc = "The headset of the man in charge of keeping order and protecting the station. \nTo access the security channel, use :s. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/hos
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos/alt
|
||||
name = "\proper the head of security's bowman headset"
|
||||
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs. \nTo access the security channel, use :s. For command, use :c."
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos/alt/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/heads/ce
|
||||
name = "\proper the chief engineer's headset"
|
||||
desc = "The headset of the guy in charge of keeping the station powered and undamaged. \nTo access the engineering channel, use :e. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/ce
|
||||
|
||||
/obj/item/device/radio/headset/heads/cmo
|
||||
name = "\proper the chief medical officer's headset"
|
||||
desc = "The headset of the highly trained medical chief. \nTo access the medical channel, use :m. For command, use :c."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/cmo
|
||||
|
||||
/obj/item/device/radio/headset/heads/hop
|
||||
name = "\proper the head of personnel's headset"
|
||||
desc = "The headset of the guy who will one day be captain. \nChannels are as follows: :u - supply, :v - service, :c - command."
|
||||
icon_state = "com_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/hop
|
||||
|
||||
/obj/item/device/radio/headset/headset_cargo
|
||||
name = "supply radio headset"
|
||||
desc = "A headset used by the QM and his slaves. \nTo access the supply channel, use :u."
|
||||
icon_state = "cargo_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_cargo
|
||||
|
||||
/obj/item/device/radio/headset/headset_cargo/mining
|
||||
name = "mining radio headset"
|
||||
desc = "Headset used by shaft miners. \nTo access the supply channel, use :u. For science, use :n."
|
||||
icon_state = "mine_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_mining
|
||||
|
||||
/obj/item/device/radio/headset/headset_srv
|
||||
name = "service radio headset"
|
||||
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean. \nTo access the service channel, use :v."
|
||||
icon_state = "srv_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_service
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent
|
||||
name = "\improper Centcom headset"
|
||||
desc = "A headset used by the upper echelons of Nanotrasen. \nTo access the centcom channel, use :y."
|
||||
icon_state = "cent_headset"
|
||||
keyslot = new /obj/item/device/encryptionkey/headset_com
|
||||
keyslot2 = new /obj/item/device/encryptionkey/headset_cent
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent/commander
|
||||
keyslot = new /obj/item/device/encryptionkey/heads/captain
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent/alt
|
||||
name = "\improper Centcom bowman headset"
|
||||
desc = "A headset especially for emergency response personnel. Protects ears from flashbangs. \nTo access the centcom channel, use :y."
|
||||
icon_state = "cent_headset_alt"
|
||||
item_state = "cent_headset_alt"
|
||||
keyslot = null
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent/alt/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/ai
|
||||
name = "\proper Integrated Subspace Transceiver "
|
||||
keyslot2 = new /obj/item/device/encryptionkey/ai
|
||||
command = TRUE
|
||||
|
||||
/obj/item/device/radio/headset/ai/receive_range(freq, level)
|
||||
return ..(freq, level, 1)
|
||||
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W, mob/user, params)
|
||||
user.set_machine(src)
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(keyslot || keyslot2)
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
|
||||
if(keyslot)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot.loc = T
|
||||
keyslot = null
|
||||
|
||||
|
||||
|
||||
if(keyslot2)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot2.loc = T
|
||||
keyslot2 = null
|
||||
|
||||
recalculateChannels()
|
||||
to_chat(user, "<span class='notice'>You pop out the encryption keys in the headset.</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This headset doesn't have any unique encryption keys! How useless...</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/encryptionkey/))
|
||||
if(keyslot && keyslot2)
|
||||
to_chat(user, "<span class='warning'>The headset can't hold another key!</span>")
|
||||
return
|
||||
|
||||
if(!keyslot)
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
keyslot = W
|
||||
|
||||
else
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
keyslot2 = W
|
||||
|
||||
|
||||
recalculateChannels()
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device/radio/headset/recalculateChannels()
|
||||
..()
|
||||
if(keyslot2)
|
||||
for(var/ch_name in keyslot2.channels)
|
||||
if(ch_name in src.channels)
|
||||
continue
|
||||
src.channels += ch_name
|
||||
src.channels[ch_name] = keyslot2.channels[ch_name]
|
||||
|
||||
if(keyslot2.translate_binary)
|
||||
src.translate_binary = 1
|
||||
|
||||
if(keyslot2.syndie)
|
||||
src.syndie = 1
|
||||
|
||||
if (keyslot2.independent)
|
||||
independent = TRUE
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = add_radio(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
return
|
||||
|
||||
/obj/item/device/radio/headset/AltClick(mob/living/user)
|
||||
if(!istype(user) || !Adjacent(user) || user.incapacitated())
|
||||
return
|
||||
if (command)
|
||||
use_command = !use_command
|
||||
to_chat(user, "<span class='notice'>You toggle high-volume mode [use_command ? "on" : "off"].</span>")
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
/obj/item/device/radio/intercom
|
||||
name = "station intercom"
|
||||
desc = "Talk through this."
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
canhear_range = 2
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
var/last_tick //used to delay the powercheck
|
||||
dog_fashion = null
|
||||
/obj/item/device/radio/intercom
|
||||
name = "station intercom"
|
||||
desc = "Talk through this."
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
canhear_range = 2
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
var/last_tick //used to delay the powercheck
|
||||
dog_fashion = null
|
||||
var/unfastened = FALSE
|
||||
|
||||
/obj/item/device/radio/intercom/unscrewed
|
||||
unfastened = TRUE
|
||||
|
||||
|
||||
/obj/item/device/radio/intercom/Initialize(mapload, ndir, building)
|
||||
. = ..()
|
||||
if(building)
|
||||
setDir(ndir)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/radio/intercom/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/radio/intercom/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/intercom/examine(mob/user)
|
||||
..()
|
||||
if(!unfastened)
|
||||
@@ -68,56 +68,56 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/intercom/attack_ai(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/radio/intercom/attack_hand(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/radio/intercom/interact(mob/user)
|
||||
..()
|
||||
ui_interact(user, state = GLOB.default_state)
|
||||
|
||||
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||
if(!on)
|
||||
return -1
|
||||
if(wires.is_cut(WIRE_RX))
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
if(!src.listening)
|
||||
return -1
|
||||
if(freq == GLOB.SYND_FREQ)
|
||||
if(!(src.syndie))
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
return canhear_range
|
||||
|
||||
|
||||
/obj/item/device/radio/intercom/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, message_mode)
|
||||
if(!anyai && !(speaker in ai))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/intercom/process()
|
||||
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
||||
last_tick = world.timeofday
|
||||
|
||||
var/area/A = get_area(src)
|
||||
if(!A || emped)
|
||||
on = 0
|
||||
else
|
||||
on = A.powered(EQUIP) // set "on" to the power status
|
||||
|
||||
if(!on)
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
icon_state = "intercom"
|
||||
|
||||
/obj/item/device/radio/intercom/add_blood(list/blood_dna)
|
||||
return 0
|
||||
/obj/item/device/radio/intercom/attack_ai(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/radio/intercom/attack_hand(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/radio/intercom/interact(mob/user)
|
||||
..()
|
||||
ui_interact(user, state = GLOB.default_state)
|
||||
|
||||
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||
if(!on)
|
||||
return -1
|
||||
if(wires.is_cut(WIRE_RX))
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
if(!src.listening)
|
||||
return -1
|
||||
if(freq == GLOB.SYND_FREQ)
|
||||
if(!(src.syndie))
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
return canhear_range
|
||||
|
||||
|
||||
/obj/item/device/radio/intercom/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, message_mode)
|
||||
if(!anyai && !(speaker in ai))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/intercom/process()
|
||||
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
||||
last_tick = world.timeofday
|
||||
|
||||
var/area/A = get_area(src)
|
||||
if(!A || emped)
|
||||
on = 0
|
||||
else
|
||||
on = A.powered(EQUIP) // set "on" to the power status
|
||||
|
||||
if(!on)
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
icon_state = "intercom"
|
||||
|
||||
/obj/item/device/radio/intercom/add_blood(list/blood_dna)
|
||||
return 0
|
||||
|
||||
//Created through the autolathe or through deconstructing intercoms. Can be applied to wall to make a new intercom on it!
|
||||
/obj/item/wallframe/intercom
|
||||
|
||||
@@ -293,7 +293,6 @@
|
||||
// --- Cold, emotionless machines. ---
|
||||
else if(isobj(M))
|
||||
jobname = "Machine"
|
||||
voice = capitalize(voice)
|
||||
|
||||
// --- Unidentifiable mob ---
|
||||
else
|
||||
@@ -597,4 +596,4 @@
|
||||
|
||||
/obj/item/device/radio/off // Station bounced radios, their only difference is spawning with the speakers off, this was made to help the lag.
|
||||
listening = 0 // And it's nice to have a subtype too for future features.
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
|
||||
/*
|
||||
CONTAINS:
|
||||
T-RAY
|
||||
DETECTIVE SCANNER
|
||||
HEALTH ANALYZER
|
||||
GAS ANALYZER
|
||||
MASS SPECTROMETER
|
||||
|
||||
*/
|
||||
/obj/item/device/t_scanner
|
||||
name = "\improper T-ray scanner"
|
||||
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
|
||||
icon_state = "t-ray0"
|
||||
var/on = 0
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_state = "electronic"
|
||||
materials = list(MAT_METAL=150)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/device/t_scanner/attack_self(mob/user)
|
||||
|
||||
on = !on
|
||||
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
|
||||
|
||||
if(on)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/t_scanner/proc/flick_sonar(obj/pipe)
|
||||
|
||||
/*
|
||||
CONTAINS:
|
||||
T-RAY
|
||||
DETECTIVE SCANNER
|
||||
HEALTH ANALYZER
|
||||
GAS ANALYZER
|
||||
MASS SPECTROMETER
|
||||
|
||||
*/
|
||||
/obj/item/device/t_scanner
|
||||
name = "\improper T-ray scanner"
|
||||
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
|
||||
icon_state = "t-ray0"
|
||||
var/on = 0
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_state = "electronic"
|
||||
materials = list(MAT_METAL=150)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/device/t_scanner/attack_self(mob/user)
|
||||
|
||||
on = !on
|
||||
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
|
||||
|
||||
if(on)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/t_scanner/proc/flick_sonar(obj/pipe)
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/image/I = new(loc = get_turf(pipe))
|
||||
@@ -36,386 +36,381 @@ MASS SPECTROMETER
|
||||
I.appearance = MA
|
||||
if(M.client)
|
||||
flick_overlay(I, list(M.client), 8)
|
||||
|
||||
/obj/item/device/t_scanner/process()
|
||||
if(!on)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return null
|
||||
scan()
|
||||
|
||||
/obj/item/device/t_scanner/proc/scan()
|
||||
|
||||
for(var/turf/T in range(2, src.loc) )
|
||||
for(var/obj/O in T.contents)
|
||||
|
||||
if(O.level != 1)
|
||||
continue
|
||||
|
||||
if(O.invisibility == INVISIBILITY_MAXIMUM)
|
||||
|
||||
/obj/item/device/t_scanner/process()
|
||||
if(!on)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return null
|
||||
scan()
|
||||
|
||||
/obj/item/device/t_scanner/proc/scan()
|
||||
|
||||
for(var/turf/T in range(2, src.loc) )
|
||||
for(var/obj/O in T.contents)
|
||||
|
||||
if(O.level != 1)
|
||||
continue
|
||||
|
||||
if(O.invisibility == INVISIBILITY_MAXIMUM)
|
||||
flick_sonar(O)
|
||||
|
||||
/obj/item/device/healthanalyzer
|
||||
name = "health analyzer"
|
||||
icon_state = "health"
|
||||
item_state = "analyzer"
|
||||
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
|
||||
flags = CONDUCT | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=200)
|
||||
origin_tech = "magnets=1;biotech=1"
|
||||
var/mode = 1
|
||||
var/scanmode = 0
|
||||
|
||||
/obj/item/device/healthanalyzer/attack_self(mob/user)
|
||||
if(!scanmode)
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>")
|
||||
scanmode = 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to check physical health.</span>")
|
||||
scanmode = 0
|
||||
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
|
||||
// Clumsiness/brain damage check
|
||||
if ((user.disabilities & CLUMSY || user.getBrainLoss() >= 60) && prob(50))
|
||||
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
||||
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
|
||||
to_chat(user, "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>")
|
||||
to_chat(user, "<span class='info'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>")
|
||||
to_chat(user, "<span class='info'>\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>")
|
||||
to_chat(user, "<span class='info'>Body temperature: ???</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
|
||||
|
||||
if(scanmode == 0)
|
||||
healthscan(user, M, mode)
|
||||
else if(scanmode == 1)
|
||||
chemscan(user, M)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
// Used by the PDA medical scanner too
|
||||
/proc/healthscan(mob/living/user, mob/living/M, mode = 1)
|
||||
if(user.incapacitated() || user.eye_blind)
|
||||
return
|
||||
//Damage specifics
|
||||
var/oxy_loss = M.getOxyLoss()
|
||||
var/tox_loss = M.getToxLoss()
|
||||
var/fire_loss = M.getFireLoss()
|
||||
var/brute_loss = M.getBruteLoss()
|
||||
var/mob_status = (M.stat > 1 ? "<span class='alert'><b>Deceased</b></span>" : "<b>[round(M.health/M.maxHealth,0.01)*100] % healthy</b>")
|
||||
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
mob_status = "<span class='alert'>Deceased</span>"
|
||||
oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
|
||||
to_chat(user, "<span class='danger'>Subject suffering from heart attack: Apply defibrillator immediately!</span>")
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.has_brain_worms())
|
||||
to_chat(user, "<span class='danger'>Foreign organism detected in subject's cranium. Recommended treatment: Dosage of sucrose solution and removal of object via surgery.</span>")
|
||||
|
||||
to_chat(user, "<span class='info'>Analyzing results for [M]:\n\tOverall status: [mob_status]</span>")
|
||||
|
||||
// Damage descriptions
|
||||
if(brute_loss > 10)
|
||||
to_chat(user, "\t<span class='alert'>[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected.</span>")
|
||||
if(fire_loss > 10)
|
||||
to_chat(user, "\t<span class='alert'>[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected.</span>")
|
||||
if(oxy_loss > 10)
|
||||
to_chat(user, "\t<span class='info'><span class='alert'>[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.</span>")
|
||||
if(tox_loss > 10)
|
||||
to_chat(user, "\t<span class='alert'>[tox_loss > 50 ? "Critical" : "Dangerous"] amount of toxins detected.</span>")
|
||||
if(M.getStaminaLoss())
|
||||
to_chat(user, "\t<span class='alert'>Subject appears to be suffering from fatigue.</span>")
|
||||
if (M.getCloneLoss())
|
||||
to_chat(user, "\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
|
||||
if (M.reagents && M.reagents.get_reagent_amount("epinephrine"))
|
||||
to_chat(user, "\t<span class='info'>Bloodstream analysis located [M.reagents:get_reagent_amount("epinephrine")] units of rejuvenation chemicals.</span>")
|
||||
if (M.getBrainLoss() >= 100 || !M.getorgan(/obj/item/organ/brain))
|
||||
to_chat(user, "\t<span class='alert'>Subject brain function is non-existent.</span>")
|
||||
else if (M.getBrainLoss() >= 60)
|
||||
to_chat(user, "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental retardation.</span>")
|
||||
else if (M.getBrainLoss() >= 10)
|
||||
to_chat(user, "\t<span class='alert'>Brain damage detected. Subject may have had a concussion.</span>")
|
||||
|
||||
// Organ damage report
|
||||
if(iscarbon(M) && mode == 1)
|
||||
var/mob/living/carbon/C = M
|
||||
var/list/damaged = C.get_damaged_bodyparts(1,1)
|
||||
if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0)
|
||||
to_chat(user, "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>")
|
||||
for(var/obj/item/bodypart/org in damaged)
|
||||
to_chat(user, "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]")
|
||||
|
||||
// Species and body temperature
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
to_chat(user, "<span class='info'>Species: [H.dna.species.name]</span>")
|
||||
to_chat(user, "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)</span>")
|
||||
|
||||
// Time of death
|
||||
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
to_chat(user, "<span class='info'>Time of Death:</span> [M.tod]")
|
||||
var/tdelta = round(world.time - M.timeofdeath)
|
||||
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
to_chat(user, "<span class='danger'>Subject died [tdelta / 10] seconds ago, defibrillation may be possible!</span>")
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
to_chat(user, "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
|
||||
|
||||
// Blood Level
|
||||
if(M.has_dna())
|
||||
var/mob/living/carbon/C = M
|
||||
var/blood_id = C.get_blood_id()
|
||||
if(blood_id)
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.bleed_rate)
|
||||
to_chat(user, "<span class='danger'>Subject is bleeding!</span>")
|
||||
var/blood_percent = round((C.blood_volume / BLOOD_VOLUME_NORMAL)*100)
|
||||
var/blood_type = C.dna.blood_type
|
||||
if(blood_id != "blood")//special blood substance
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
else
|
||||
blood_type = blood_id
|
||||
if(C.blood_volume <= BLOOD_VOLUME_SAFE && C.blood_volume > BLOOD_VOLUME_OKAY)
|
||||
to_chat(user, "<span class='danger'>LOW blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else if(C.blood_volume <= BLOOD_VOLUME_OKAY)
|
||||
to_chat(user, "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]</span>")
|
||||
|
||||
var/cyberimp_detect
|
||||
for(var/obj/item/organ/cyberimp/CI in C.internal_organs)
|
||||
if(CI.status == ORGAN_ROBOTIC)
|
||||
cyberimp_detect += "[C.name] is modified with a [CI.name].<br>"
|
||||
if(cyberimp_detect)
|
||||
to_chat(user, "<span class='notice'>Detected cybernetic modifications:</span>")
|
||||
to_chat(user, "<span class='notice'>[cyberimp_detect]</span>")
|
||||
|
||||
/proc/chemscan(mob/living/user, mob/living/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.reagents)
|
||||
if(H.reagents.reagent_list.len)
|
||||
to_chat(user, "<span class='notice'>Subject contains the following reagents:</span>")
|
||||
for(var/datum/reagent/R in H.reagents.reagent_list)
|
||||
to_chat(user, "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Subject contains no reagents.</span>")
|
||||
if(H.reagents.addiction_list.len)
|
||||
to_chat(user, "<span class='boldannounce'>Subject is addicted to the following reagents:</span>")
|
||||
for(var/datum/reagent/R in H.reagents.addiction_list)
|
||||
to_chat(user, "<span class='danger'>[R.name]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Subject is not addicted to any reagents.</span>")
|
||||
|
||||
/obj/item/device/healthanalyzer/verb/toggle_mode()
|
||||
set name = "Switch Verbosity"
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
mode = !mode
|
||||
switch (mode)
|
||||
if(1)
|
||||
to_chat(usr, "The scanner now shows specific limb damage.")
|
||||
if(0)
|
||||
to_chat(usr, "The scanner no longer shows limb damage.")
|
||||
|
||||
|
||||
/obj/item/device/analyzer
|
||||
desc = "A hand-held environmental scanner which reports current gas levels."
|
||||
name = "analyzer"
|
||||
icon_state = "atmos"
|
||||
item_state = "analyzer"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/device/analyzer/attack_self(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if (user.stat || user.eye_blind)
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!istype(location))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
to_chat(user, "<span class='info'><B>Results:</B></span>")
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
to_chat(user, "<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Pressure: [round(pressure,0.1)] kPa</span>")
|
||||
if(total_moles)
|
||||
var/list/env_gases = environment.gases
|
||||
|
||||
environment.assert_gases(arglist(GLOB.hardcoded_gases))
|
||||
var/o2_concentration = env_gases["o2"][MOLES]/total_moles
|
||||
var/n2_concentration = env_gases["n2"][MOLES]/total_moles
|
||||
var/co2_concentration = env_gases["co2"][MOLES]/total_moles
|
||||
var/plasma_concentration = env_gases["plasma"][MOLES]/total_moles
|
||||
environment.garbage_collect()
|
||||
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(plasma_concentration > 0.005)
|
||||
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
|
||||
|
||||
|
||||
for(var/id in env_gases)
|
||||
if(id in GLOB.hardcoded_gases)
|
||||
continue
|
||||
var/gas_concentration = env_gases[id][MOLES]/total_moles
|
||||
to_chat(user, "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C)] °C</span>")
|
||||
|
||||
|
||||
/obj/item/device/mass_spectrometer
|
||||
desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
|
||||
name = "mass-spectrometer"
|
||||
icon_state = "spectrometer"
|
||||
item_state = "analyzer"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
container_type = OPENCONTAINER
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=150, MAT_GLASS=100)
|
||||
origin_tech = "magnets=2;biotech=1;plasmatech=2"
|
||||
var/details = 0
|
||||
|
||||
/obj/item/device/mass_spectrometer/New()
|
||||
..()
|
||||
create_reagents(5)
|
||||
|
||||
/obj/item/device/mass_spectrometer/on_reagent_change()
|
||||
if(reagents.total_volume)
|
||||
icon_state = initial(icon_state) + "_s"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/mass_spectrometer/attack_self(mob/user)
|
||||
if (user.stat || user.eye_blind)
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(reagents.total_volume)
|
||||
var/list/blood_traces = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id != "blood")
|
||||
reagents.clear_reagents()
|
||||
to_chat(user, "<span class='warning'>The sample was contaminated! Please insert another sample.</span>")
|
||||
return
|
||||
else
|
||||
blood_traces = params2list(R.data["trace_chem"])
|
||||
break
|
||||
var/dat = "<i><b>Trace Chemicals Found:</b>"
|
||||
if(!blood_traces.len)
|
||||
dat += "<br>None"
|
||||
else
|
||||
for(var/R in blood_traces)
|
||||
dat += "<br>[GLOB.chemical_reagents_list[R]]"
|
||||
if(details)
|
||||
dat += " ([blood_traces[R]] units)"
|
||||
dat += "</i>"
|
||||
to_chat(user, dat)
|
||||
reagents.clear_reagents()
|
||||
|
||||
|
||||
/obj/item/device/mass_spectrometer/adv
|
||||
name = "advanced mass-spectrometer"
|
||||
icon_state = "adv_spectrometer"
|
||||
details = 1
|
||||
origin_tech = "magnets=4;biotech=3;plasmatech=3"
|
||||
|
||||
/obj/item/device/slime_scanner
|
||||
name = "slime scanner"
|
||||
desc = "A device that analyzes a slime's internal composition and measures its stats."
|
||||
icon_state = "adv_spectrometer"
|
||||
item_state = "analyzer"
|
||||
origin_tech = "biotech=2"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
||||
|
||||
/obj/item/device/slime_scanner/attack(mob/living/M, mob/living/user)
|
||||
if(user.stat || user.eye_blind)
|
||||
return
|
||||
if (!isslime(M))
|
||||
to_chat(user, "<span class='warning'>This device can only scan slimes!</span>")
|
||||
return
|
||||
var/mob/living/simple_animal/slime/T = M
|
||||
to_chat(user, "Slime scan results:")
|
||||
to_chat(user, "[T.colour] [T.is_adult ? "adult" : "baby"] slime")
|
||||
to_chat(user, "Nutrition: [T.nutrition]/[T.get_max_nutrition()]")
|
||||
if (T.nutrition < T.get_starve_nutrition())
|
||||
to_chat(user, "<span class='warning'>Warning: slime is starving!</span>")
|
||||
else if (T.nutrition < T.get_hunger_nutrition())
|
||||
to_chat(user, "<span class='warning'>Warning: slime is hungry</span>")
|
||||
to_chat(user, "Electric change strength: [T.powerlevel]")
|
||||
to_chat(user, "Health: [round(T.health/T.maxHealth,0.01)*100]")
|
||||
if (T.slime_mutation[4] == T.colour)
|
||||
to_chat(user, "This slime does not evolve any further.")
|
||||
else
|
||||
if (T.slime_mutation[3] == T.slime_mutation[4])
|
||||
if (T.slime_mutation[2] == T.slime_mutation[1])
|
||||
to_chat(user, "Possible mutation: [T.slime_mutation[3]]")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting")
|
||||
else
|
||||
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
|
||||
else
|
||||
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
|
||||
if (T.cores > 1)
|
||||
to_chat(user, "Anomalious slime core amount detected")
|
||||
to_chat(user, "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]")
|
||||
|
||||
/obj/item/device/healthanalyzer
|
||||
name = "health analyzer"
|
||||
icon_state = "health"
|
||||
item_state = "analyzer"
|
||||
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
|
||||
flags = CONDUCT | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=200)
|
||||
origin_tech = "magnets=1;biotech=1"
|
||||
var/mode = 1
|
||||
var/scanmode = 0
|
||||
|
||||
/obj/item/device/healthanalyzer/attack_self(mob/user)
|
||||
if(!scanmode)
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>")
|
||||
scanmode = 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to check physical health.</span>")
|
||||
scanmode = 0
|
||||
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
|
||||
// Clumsiness/brain damage check
|
||||
if ((user.disabilities & CLUMSY || user.getBrainLoss() >= 60) && prob(50))
|
||||
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
||||
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
|
||||
to_chat(user, "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>")
|
||||
to_chat(user, "<span class='info'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>")
|
||||
to_chat(user, "<span class='info'>\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>")
|
||||
to_chat(user, "<span class='info'>Body temperature: ???</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
|
||||
|
||||
if(scanmode == 0)
|
||||
healthscan(user, M, mode)
|
||||
else if(scanmode == 1)
|
||||
chemscan(user, M)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
// Used by the PDA medical scanner too
|
||||
/proc/healthscan(mob/living/user, mob/living/M, mode = 1)
|
||||
if(user.incapacitated() || user.eye_blind)
|
||||
return
|
||||
//Damage specifics
|
||||
var/oxy_loss = M.getOxyLoss()
|
||||
var/tox_loss = M.getToxLoss()
|
||||
var/fire_loss = M.getFireLoss()
|
||||
var/brute_loss = M.getBruteLoss()
|
||||
var/mob_status = (M.stat > 1 ? "<span class='alert'><b>Deceased</b></span>" : "<b>[round(M.health/M.maxHealth,0.01)*100] % healthy</b>")
|
||||
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
mob_status = "<span class='alert'>Deceased</span>"
|
||||
oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
|
||||
to_chat(user, "<span class='danger'>Subject suffering from heart attack: Apply defibrillator immediately!</span>")
|
||||
|
||||
to_chat(user, "<span class='info'>Analyzing results for [M]:\n\tOverall status: [mob_status]</span>")
|
||||
|
||||
// Damage descriptions
|
||||
if(brute_loss > 10)
|
||||
to_chat(user, "\t<span class='alert'>[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected.</span>")
|
||||
if(fire_loss > 10)
|
||||
to_chat(user, "\t<span class='alert'>[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected.</span>")
|
||||
if(oxy_loss > 10)
|
||||
to_chat(user, "\t<span class='info'><span class='alert'>[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.</span>")
|
||||
if(tox_loss > 10)
|
||||
to_chat(user, "\t<span class='alert'>[tox_loss > 50 ? "Critical" : "Dangerous"] amount of toxins detected.</span>")
|
||||
if(M.getStaminaLoss())
|
||||
to_chat(user, "\t<span class='alert'>Subject appears to be suffering from fatigue.</span>")
|
||||
if (M.getCloneLoss())
|
||||
to_chat(user, "\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
|
||||
if (M.reagents && M.reagents.get_reagent_amount("epinephrine"))
|
||||
to_chat(user, "\t<span class='info'>Bloodstream analysis located [M.reagents:get_reagent_amount("epinephrine")] units of rejuvenation chemicals.</span>")
|
||||
if (M.getBrainLoss() >= 100 || !M.getorgan(/obj/item/organ/brain))
|
||||
to_chat(user, "\t<span class='alert'>Subject brain function is non-existent.</span>")
|
||||
else if (M.getBrainLoss() >= 60)
|
||||
to_chat(user, "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental retardation.</span>")
|
||||
else if (M.getBrainLoss() >= 10)
|
||||
to_chat(user, "\t<span class='alert'>Brain damage detected. Subject may have had a concussion.</span>")
|
||||
|
||||
// Organ damage report
|
||||
if(iscarbon(M) && mode == 1)
|
||||
var/mob/living/carbon/C = M
|
||||
var/list/damaged = C.get_damaged_bodyparts(1,1)
|
||||
if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0)
|
||||
to_chat(user, "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>")
|
||||
for(var/obj/item/bodypart/org in damaged)
|
||||
to_chat(user, "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]")
|
||||
|
||||
// Species and body temperature
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
to_chat(user, "<span class='info'>Species: [H.dna.species.name]</span>")
|
||||
to_chat(user, "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)</span>")
|
||||
|
||||
// Time of death
|
||||
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
to_chat(user, "<span class='info'>Time of Death:</span> [M.tod]")
|
||||
var/tdelta = round(world.time - M.timeofdeath)
|
||||
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
to_chat(user, "<span class='danger'>Subject died [tdelta / 10] seconds ago, defibrillation may be possible!</span>")
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
to_chat(user, "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
|
||||
|
||||
// Blood Level
|
||||
if(M.has_dna())
|
||||
var/mob/living/carbon/C = M
|
||||
var/blood_id = C.get_blood_id()
|
||||
if(blood_id)
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.bleed_rate)
|
||||
to_chat(user, "<span class='danger'>Subject is bleeding!</span>")
|
||||
var/blood_percent = round((C.blood_volume / BLOOD_VOLUME_NORMAL)*100)
|
||||
var/blood_type = C.dna.blood_type
|
||||
if(blood_id != "blood")//special blood substance
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
else
|
||||
blood_type = blood_id
|
||||
if(C.blood_volume <= BLOOD_VOLUME_SAFE && C.blood_volume > BLOOD_VOLUME_OKAY)
|
||||
to_chat(user, "<span class='danger'>LOW blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else if(C.blood_volume <= BLOOD_VOLUME_OKAY)
|
||||
to_chat(user, "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]</span>")
|
||||
|
||||
var/cyberimp_detect
|
||||
for(var/obj/item/organ/cyberimp/CI in C.internal_organs)
|
||||
if(CI.status == ORGAN_ROBOTIC)
|
||||
cyberimp_detect += "[C.name] is modified with a [CI.name].<br>"
|
||||
if(cyberimp_detect)
|
||||
to_chat(user, "<span class='notice'>Detected cybernetic modifications:</span>")
|
||||
to_chat(user, "<span class='notice'>[cyberimp_detect]</span>")
|
||||
|
||||
/proc/chemscan(mob/living/user, mob/living/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.reagents)
|
||||
if(H.reagents.reagent_list.len)
|
||||
to_chat(user, "<span class='notice'>Subject contains the following reagents:</span>")
|
||||
for(var/datum/reagent/R in H.reagents.reagent_list)
|
||||
to_chat(user, "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Subject contains no reagents.</span>")
|
||||
if(H.reagents.addiction_list.len)
|
||||
to_chat(user, "<span class='boldannounce'>Subject is addicted to the following reagents:</span>")
|
||||
for(var/datum/reagent/R in H.reagents.addiction_list)
|
||||
to_chat(user, "<span class='danger'>[R.name]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Subject is not addicted to any reagents.</span>")
|
||||
|
||||
/obj/item/device/healthanalyzer/verb/toggle_mode()
|
||||
set name = "Switch Verbosity"
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
mode = !mode
|
||||
switch (mode)
|
||||
if(1)
|
||||
to_chat(usr, "The scanner now shows specific limb damage.")
|
||||
if(0)
|
||||
to_chat(usr, "The scanner no longer shows limb damage.")
|
||||
|
||||
|
||||
/obj/item/device/analyzer
|
||||
desc = "A hand-held environmental scanner which reports current gas levels."
|
||||
name = "analyzer"
|
||||
icon_state = "atmos"
|
||||
item_state = "analyzer"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/device/analyzer/attack_self(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if (user.stat || user.eye_blind)
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!istype(location))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
to_chat(user, "<span class='info'><B>Results:</B></span>")
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
to_chat(user, "<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Pressure: [round(pressure,0.1)] kPa</span>")
|
||||
if(total_moles)
|
||||
var/list/env_gases = environment.gases
|
||||
|
||||
environment.assert_gases(arglist(GLOB.hardcoded_gases))
|
||||
var/o2_concentration = env_gases["o2"][MOLES]/total_moles
|
||||
var/n2_concentration = env_gases["n2"][MOLES]/total_moles
|
||||
var/co2_concentration = env_gases["co2"][MOLES]/total_moles
|
||||
var/plasma_concentration = env_gases["plasma"][MOLES]/total_moles
|
||||
environment.garbage_collect()
|
||||
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(plasma_concentration > 0.005)
|
||||
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
|
||||
|
||||
|
||||
for(var/id in env_gases)
|
||||
if(id in GLOB.hardcoded_gases)
|
||||
continue
|
||||
var/gas_concentration = env_gases[id][MOLES]/total_moles
|
||||
to_chat(user, "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C)] °C</span>")
|
||||
|
||||
|
||||
/obj/item/device/mass_spectrometer
|
||||
desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample."
|
||||
name = "mass-spectrometer"
|
||||
icon_state = "spectrometer"
|
||||
item_state = "analyzer"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
container_type = OPENCONTAINER
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=150, MAT_GLASS=100)
|
||||
origin_tech = "magnets=2;biotech=1;plasmatech=2"
|
||||
var/details = 0
|
||||
|
||||
/obj/item/device/mass_spectrometer/New()
|
||||
..()
|
||||
create_reagents(5)
|
||||
|
||||
/obj/item/device/mass_spectrometer/on_reagent_change()
|
||||
if(reagents.total_volume)
|
||||
icon_state = initial(icon_state) + "_s"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/mass_spectrometer/attack_self(mob/user)
|
||||
if (user.stat || user.eye_blind)
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(reagents.total_volume)
|
||||
var/list/blood_traces = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id != "blood")
|
||||
reagents.clear_reagents()
|
||||
to_chat(user, "<span class='warning'>The sample was contaminated! Please insert another sample.</span>")
|
||||
return
|
||||
else
|
||||
blood_traces = params2list(R.data["trace_chem"])
|
||||
break
|
||||
var/dat = "<i><b>Trace Chemicals Found:</b>"
|
||||
if(!blood_traces.len)
|
||||
dat += "<br>None"
|
||||
else
|
||||
for(var/R in blood_traces)
|
||||
dat += "<br>[GLOB.chemical_reagents_list[R]]"
|
||||
if(details)
|
||||
dat += " ([blood_traces[R]] units)"
|
||||
dat += "</i>"
|
||||
to_chat(user, dat)
|
||||
reagents.clear_reagents()
|
||||
|
||||
|
||||
/obj/item/device/mass_spectrometer/adv
|
||||
name = "advanced mass-spectrometer"
|
||||
icon_state = "adv_spectrometer"
|
||||
details = 1
|
||||
origin_tech = "magnets=4;biotech=3;plasmatech=3"
|
||||
|
||||
/obj/item/device/slime_scanner
|
||||
name = "slime scanner"
|
||||
desc = "A device that analyzes a slime's internal composition and measures its stats."
|
||||
icon_state = "adv_spectrometer"
|
||||
item_state = "analyzer"
|
||||
origin_tech = "biotech=2"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
||||
|
||||
/obj/item/device/slime_scanner/attack(mob/living/M, mob/living/user)
|
||||
if(user.stat || user.eye_blind)
|
||||
return
|
||||
if (!isslime(M))
|
||||
to_chat(user, "<span class='warning'>This device can only scan slimes!</span>")
|
||||
return
|
||||
var/mob/living/simple_animal/slime/T = M
|
||||
to_chat(user, "Slime scan results:")
|
||||
to_chat(user, "[T.colour] [T.is_adult ? "adult" : "baby"] slime")
|
||||
to_chat(user, "Nutrition: [T.nutrition]/[T.get_max_nutrition()]")
|
||||
if (T.nutrition < T.get_starve_nutrition())
|
||||
to_chat(user, "<span class='warning'>Warning: slime is starving!</span>")
|
||||
else if (T.nutrition < T.get_hunger_nutrition())
|
||||
to_chat(user, "<span class='warning'>Warning: slime is hungry</span>")
|
||||
to_chat(user, "Electric change strength: [T.powerlevel]")
|
||||
to_chat(user, "Health: [round(T.health/T.maxHealth,0.01)*100]")
|
||||
if (T.slime_mutation[4] == T.colour)
|
||||
to_chat(user, "This slime does not evolve any further.")
|
||||
else
|
||||
if (T.slime_mutation[3] == T.slime_mutation[4])
|
||||
if (T.slime_mutation[2] == T.slime_mutation[1])
|
||||
to_chat(user, "Possible mutation: [T.slime_mutation[3]]")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting")
|
||||
else
|
||||
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
|
||||
else
|
||||
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
|
||||
if (T.cores > 1)
|
||||
to_chat(user, "Anomalious slime core amount detected")
|
||||
to_chat(user, "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]")
|
||||
|
||||
@@ -42,9 +42,7 @@ effective or pretty fucking useless.
|
||||
for(var/mob/living/carbon/human/M in urange(10, user, 1))
|
||||
if(prob(50))
|
||||
|
||||
M.Weaken(rand(10,20))
|
||||
if(prob(25))
|
||||
M.Stun(rand(5,10))
|
||||
M.Knockdown(rand(200,400))
|
||||
to_chat(M, "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
|
||||
|
||||
else
|
||||
@@ -90,7 +88,7 @@ effective or pretty fucking useless.
|
||||
spawn((wavelength+(intensity*4))*5)
|
||||
if(M)
|
||||
if(intensity >= 5)
|
||||
M.apply_effect(round(intensity/1.5), PARALYZE)
|
||||
M.apply_effect(round(intensity/0.075), UNCONSCIOUS)
|
||||
M.rad_act(intensity*10)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
|
||||
@@ -233,7 +231,7 @@ effective or pretty fucking useless.
|
||||
var/range = 12
|
||||
|
||||
/obj/item/device/jammer/attack_self(mob/user)
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src]<span>")
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src]<span>")
|
||||
active = !active
|
||||
if(active)
|
||||
GLOB.active_jammers |= src
|
||||
@@ -241,4 +239,3 @@ effective or pretty fucking useless.
|
||||
GLOB.active_jammers -= src
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/item/latexballon/proc/burst()
|
||||
if (!air_contents || icon_state != "latexballon_blow")
|
||||
return
|
||||
playsound(src, 'sound/weapons/Gunshot.ogg', 100, 1)
|
||||
playsound(src, 'sound/weapons/gunshot.ogg', 100, 1)
|
||||
icon_state = "latexballon_bursted"
|
||||
item_state = "lgloves"
|
||||
if(isliving(loc))
|
||||
|
||||
@@ -17,10 +17,9 @@
|
||||
to_chat(H, "<span class='notice'>Your morale is increased by [user]'s banner!</span>")
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStunned(-2)
|
||||
H.AdjustWeakened(-2)
|
||||
H.AdjustParalysis(-2)
|
||||
|
||||
H.AdjustStun(-40)
|
||||
H.AdjustKnockdown(-40)
|
||||
H.AdjustUnconscious(-40)
|
||||
|
||||
/obj/item/weapon/banner/red
|
||||
name = "red banner"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,338 +1,338 @@
|
||||
|
||||
|
||||
//The robot bodyparts have been moved to code/module/surgery/bodyparts/robot_bodyparts.dm
|
||||
|
||||
|
||||
/obj/item/robot_suit
|
||||
name = "cyborg endoskeleton"
|
||||
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
|
||||
icon = 'icons/obj/robot_parts.dmi'
|
||||
icon_state = "robo_suit"
|
||||
var/obj/item/bodypart/l_arm/robot/l_arm = null
|
||||
var/obj/item/bodypart/r_arm/robot/r_arm = null
|
||||
var/obj/item/bodypart/l_leg/robot/l_leg = null
|
||||
var/obj/item/bodypart/r_leg/robot/r_leg = null
|
||||
var/obj/item/bodypart/chest/robot/chest = null
|
||||
var/obj/item/bodypart/head/robot/head = null
|
||||
|
||||
var/created_name = ""
|
||||
var/mob/living/silicon/ai/forced_ai
|
||||
var/locomotion = 1
|
||||
var/lawsync = 1
|
||||
var/aisync = 1
|
||||
var/panel_locked = 1
|
||||
|
||||
/obj/item/robot_suit/New()
|
||||
..()
|
||||
updateicon()
|
||||
|
||||
/obj/item/robot_suit/prebuilt/New()
|
||||
l_arm = new(src)
|
||||
r_arm = new(src)
|
||||
l_leg = new(src)
|
||||
r_leg = new(src)
|
||||
head = new(src)
|
||||
head.flash1 = new(head)
|
||||
head.flash2 = new(head)
|
||||
chest = new(src)
|
||||
chest.wired = TRUE
|
||||
chest.cell = new /obj/item/weapon/stock_parts/cell/high/plus(chest)
|
||||
..()
|
||||
|
||||
/obj/item/robot_suit/proc/updateicon()
|
||||
cut_overlays()
|
||||
if(l_arm)
|
||||
add_overlay("[l_arm.icon_state]+o")
|
||||
if(r_arm)
|
||||
add_overlay("[r_arm.icon_state]+o")
|
||||
if(chest)
|
||||
add_overlay("[chest.icon_state]+o")
|
||||
if(l_leg)
|
||||
add_overlay("[l_leg.icon_state]+o")
|
||||
if(r_leg)
|
||||
add_overlay("[r_leg.icon_state]+o")
|
||||
if(head)
|
||||
add_overlay("[head.icon_state]+o")
|
||||
|
||||
/obj/item/robot_suit/proc/check_completion()
|
||||
if(src.l_arm && src.r_arm)
|
||||
if(src.l_leg && src.r_leg)
|
||||
if(src.chest && src.head)
|
||||
|
||||
|
||||
//The robot bodyparts have been moved to code/module/surgery/bodyparts/robot_bodyparts.dm
|
||||
|
||||
|
||||
/obj/item/robot_suit
|
||||
name = "cyborg endoskeleton"
|
||||
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
|
||||
icon = 'icons/obj/robot_parts.dmi'
|
||||
icon_state = "robo_suit"
|
||||
var/obj/item/bodypart/l_arm/robot/l_arm = null
|
||||
var/obj/item/bodypart/r_arm/robot/r_arm = null
|
||||
var/obj/item/bodypart/l_leg/robot/l_leg = null
|
||||
var/obj/item/bodypart/r_leg/robot/r_leg = null
|
||||
var/obj/item/bodypart/chest/robot/chest = null
|
||||
var/obj/item/bodypart/head/robot/head = null
|
||||
|
||||
var/created_name = ""
|
||||
var/mob/living/silicon/ai/forced_ai
|
||||
var/locomotion = 1
|
||||
var/lawsync = 1
|
||||
var/aisync = 1
|
||||
var/panel_locked = 1
|
||||
|
||||
/obj/item/robot_suit/New()
|
||||
..()
|
||||
updateicon()
|
||||
|
||||
/obj/item/robot_suit/prebuilt/New()
|
||||
l_arm = new(src)
|
||||
r_arm = new(src)
|
||||
l_leg = new(src)
|
||||
r_leg = new(src)
|
||||
head = new(src)
|
||||
head.flash1 = new(head)
|
||||
head.flash2 = new(head)
|
||||
chest = new(src)
|
||||
chest.wired = TRUE
|
||||
chest.cell = new /obj/item/weapon/stock_parts/cell/high/plus(chest)
|
||||
..()
|
||||
|
||||
/obj/item/robot_suit/proc/updateicon()
|
||||
cut_overlays()
|
||||
if(l_arm)
|
||||
add_overlay("[l_arm.icon_state]+o")
|
||||
if(r_arm)
|
||||
add_overlay("[r_arm.icon_state]+o")
|
||||
if(chest)
|
||||
add_overlay("[chest.icon_state]+o")
|
||||
if(l_leg)
|
||||
add_overlay("[l_leg.icon_state]+o")
|
||||
if(r_leg)
|
||||
add_overlay("[r_leg.icon_state]+o")
|
||||
if(head)
|
||||
add_overlay("[head.icon_state]+o")
|
||||
|
||||
/obj/item/robot_suit/proc/check_completion()
|
||||
if(src.l_arm && src.r_arm)
|
||||
if(src.l_leg && src.r_leg)
|
||||
if(src.chest && src.head)
|
||||
SSblackbox.inc("cyborg_frames_built",1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/robot_suit/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = W
|
||||
if(!l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
|
||||
if (M.use(1))
|
||||
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
||||
B.loc = get_turf(src)
|
||||
to_chat(user, "<span class='notice'>You arm the robot frame.</span>")
|
||||
var/holding_this = user.get_inactive_held_item()==src
|
||||
qdel(src)
|
||||
if (holding_this)
|
||||
user.put_in_inactive_hand(B)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of metal to start building ED-209!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/bodypart/l_leg/robot))
|
||||
if(src.l_leg)
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.l_leg = W
|
||||
src.updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/r_leg/robot))
|
||||
if(src.r_leg)
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.r_leg = W
|
||||
src.updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/l_arm/robot))
|
||||
if(src.l_arm)
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.l_arm = W
|
||||
src.updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/r_arm/robot))
|
||||
if(src.r_arm)
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.icon_state = initial(W.icon_state)//in case it is a dismembered robotic limb
|
||||
W.cut_overlays()
|
||||
src.r_arm = W
|
||||
src.updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/chest/robot))
|
||||
var/obj/item/bodypart/chest/robot/CH = W
|
||||
if(src.chest)
|
||||
return
|
||||
if(CH.wired && CH.cell)
|
||||
if(!user.transferItemToLoc(CH, src))
|
||||
return
|
||||
CH.icon_state = initial(CH.icon_state) //in case it is a dismembered robotic limb
|
||||
CH.cut_overlays()
|
||||
src.chest = CH
|
||||
src.updateicon()
|
||||
else if(!CH.wired)
|
||||
to_chat(user, "<span class='warning'>You need to attach wires to it first!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a cell to it first!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/head/robot))
|
||||
var/obj/item/bodypart/head/robot/HD = W
|
||||
for(var/X in HD.contents)
|
||||
if(istype(X, /obj/item/organ))
|
||||
to_chat(user, "<span class='warning'>There are organs inside [HD]!</span>")
|
||||
return
|
||||
if(src.head)
|
||||
return
|
||||
if(HD.flash2 && HD.flash1)
|
||||
if(!user.transferItemToLoc(HD, src))
|
||||
return
|
||||
HD.icon_state = initial(HD.icon_state)//in case it is a dismembered robotic limb
|
||||
HD.cut_overlays()
|
||||
src.head = HD
|
||||
src.updateicon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
|
||||
|
||||
else if (istype(W, /obj/item/device/multitool))
|
||||
if(check_completion())
|
||||
Interact(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The endoskeleton must be assembled before debugging can begin!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/M = W
|
||||
if(check_completion())
|
||||
if(!isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You can't put [M] in, the frame has to be standing on the ground to be perfectly precise!</span>")
|
||||
return
|
||||
if(!M.brainmob)
|
||||
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/brain/BM = M.brainmob
|
||||
if(!BM.key || !BM.mind)
|
||||
to_chat(user, "<span class='warning'>The MMI indicates that their mind is completely unresponsive; there's no point!</span>")
|
||||
return
|
||||
|
||||
if(!BM.client) //braindead
|
||||
to_chat(user, "<span class='warning'>The MMI indicates that their mind is currently inactive; it might change!</span>")
|
||||
return
|
||||
|
||||
if(BM.stat == DEAD || (M.brain && M.brain.damaged_brain))
|
||||
to_chat(user, "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
|
||||
if(jobban_isbanned(BM, "Cyborg"))
|
||||
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
|
||||
return
|
||||
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
|
||||
if(!O)
|
||||
return
|
||||
|
||||
if(M.laws && M.laws.id != DEFAULT_AI_LAWID)
|
||||
aisync = 0
|
||||
lawsync = 0
|
||||
O.laws = M.laws
|
||||
M.laws.associate(O)
|
||||
|
||||
O.invisibility = 0
|
||||
//Transfer debug settings to new mob
|
||||
O.custom_name = created_name
|
||||
O.locked = panel_locked
|
||||
if(!aisync)
|
||||
lawsync = 0
|
||||
O.connected_ai = null
|
||||
else
|
||||
O.notify_ai(NEW_BORG)
|
||||
if(forced_ai)
|
||||
O.connected_ai = forced_ai
|
||||
if(!lawsync)
|
||||
O.lawupdate = 0
|
||||
if(M.laws.id == DEFAULT_AI_LAWID)
|
||||
O.make_laws()
|
||||
|
||||
SSticker.mode.remove_antag_for_borging(BM.mind)
|
||||
if(!istype(M.laws, /datum/ai_laws/ratvar))
|
||||
remove_servant_of_ratvar(BM, TRUE)
|
||||
BM.mind.transfer_to(O)
|
||||
|
||||
if(O.mind && O.mind.special_role)
|
||||
O.mind.store_memory("As a cyborg, you must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.")
|
||||
to_chat(O, "<span class='userdanger'>You have been robotized!</span>")
|
||||
to_chat(O, "<span class='danger'>You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.</span>")
|
||||
|
||||
O.job = "Cyborg"
|
||||
|
||||
O.cell = chest.cell
|
||||
chest.cell.loc = O
|
||||
chest.cell = null
|
||||
W.forceMove(O)//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
if(O.mmi) //we delete the mmi created by robot/New()
|
||||
qdel(O.mmi)
|
||||
O.mmi = W //and give the real mmi to the borg.
|
||||
O.updatename()
|
||||
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/robot_suit/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = W
|
||||
if(!l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
|
||||
if (M.use(1))
|
||||
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
||||
B.loc = get_turf(src)
|
||||
to_chat(user, "<span class='notice'>You arm the robot frame.</span>")
|
||||
var/holding_this = user.get_inactive_held_item()==src
|
||||
qdel(src)
|
||||
if (holding_this)
|
||||
user.put_in_inactive_hand(B)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of metal to start building ED-209!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/bodypart/l_leg/robot))
|
||||
if(src.l_leg)
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.l_leg = W
|
||||
src.updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/r_leg/robot))
|
||||
if(src.r_leg)
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.r_leg = W
|
||||
src.updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/l_arm/robot))
|
||||
if(src.l_arm)
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.icon_state = initial(W.icon_state)
|
||||
W.cut_overlays()
|
||||
src.l_arm = W
|
||||
src.updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/r_arm/robot))
|
||||
if(src.r_arm)
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.icon_state = initial(W.icon_state)//in case it is a dismembered robotic limb
|
||||
W.cut_overlays()
|
||||
src.r_arm = W
|
||||
src.updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/chest/robot))
|
||||
var/obj/item/bodypart/chest/robot/CH = W
|
||||
if(src.chest)
|
||||
return
|
||||
if(CH.wired && CH.cell)
|
||||
if(!user.transferItemToLoc(CH, src))
|
||||
return
|
||||
CH.icon_state = initial(CH.icon_state) //in case it is a dismembered robotic limb
|
||||
CH.cut_overlays()
|
||||
src.chest = CH
|
||||
src.updateicon()
|
||||
else if(!CH.wired)
|
||||
to_chat(user, "<span class='warning'>You need to attach wires to it first!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a cell to it first!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/head/robot))
|
||||
var/obj/item/bodypart/head/robot/HD = W
|
||||
for(var/X in HD.contents)
|
||||
if(istype(X, /obj/item/organ))
|
||||
to_chat(user, "<span class='warning'>There are organs inside [HD]!</span>")
|
||||
return
|
||||
if(src.head)
|
||||
return
|
||||
if(HD.flash2 && HD.flash1)
|
||||
if(!user.transferItemToLoc(HD, src))
|
||||
return
|
||||
HD.icon_state = initial(HD.icon_state)//in case it is a dismembered robotic limb
|
||||
HD.cut_overlays()
|
||||
src.head = HD
|
||||
src.updateicon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
|
||||
|
||||
else if (istype(W, /obj/item/device/multitool))
|
||||
if(check_completion())
|
||||
Interact(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The endoskeleton must be assembled before debugging can begin!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/M = W
|
||||
if(check_completion())
|
||||
if(!isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You can't put [M] in, the frame has to be standing on the ground to be perfectly precise!</span>")
|
||||
return
|
||||
if(!M.brainmob)
|
||||
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/brain/BM = M.brainmob
|
||||
if(!BM.key || !BM.mind)
|
||||
to_chat(user, "<span class='warning'>The MMI indicates that their mind is completely unresponsive; there's no point!</span>")
|
||||
return
|
||||
|
||||
if(!BM.client) //braindead
|
||||
to_chat(user, "<span class='warning'>The MMI indicates that their mind is currently inactive; it might change!</span>")
|
||||
return
|
||||
|
||||
if(BM.stat == DEAD || (M.brain && M.brain.damaged_brain))
|
||||
to_chat(user, "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
|
||||
if(jobban_isbanned(BM, "Cyborg"))
|
||||
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
|
||||
return
|
||||
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
|
||||
if(!O)
|
||||
return
|
||||
|
||||
if(M.laws && M.laws.id != DEFAULT_AI_LAWID)
|
||||
aisync = 0
|
||||
lawsync = 0
|
||||
O.laws = M.laws
|
||||
M.laws.associate(O)
|
||||
|
||||
O.invisibility = 0
|
||||
//Transfer debug settings to new mob
|
||||
O.custom_name = created_name
|
||||
O.locked = panel_locked
|
||||
if(!aisync)
|
||||
lawsync = 0
|
||||
O.connected_ai = null
|
||||
else
|
||||
O.notify_ai(NEW_BORG)
|
||||
if(forced_ai)
|
||||
O.connected_ai = forced_ai
|
||||
if(!lawsync)
|
||||
O.lawupdate = 0
|
||||
if(M.laws.id == DEFAULT_AI_LAWID)
|
||||
O.make_laws()
|
||||
|
||||
SSticker.mode.remove_antag_for_borging(BM.mind)
|
||||
if(!istype(M.laws, /datum/ai_laws/ratvar))
|
||||
remove_servant_of_ratvar(BM, TRUE)
|
||||
BM.mind.transfer_to(O)
|
||||
|
||||
if(O.mind && O.mind.special_role)
|
||||
O.mind.store_memory("As a cyborg, you must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.")
|
||||
to_chat(O, "<span class='userdanger'>You have been robotized!</span>")
|
||||
to_chat(O, "<span class='danger'>You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.</span>")
|
||||
|
||||
O.job = "Cyborg"
|
||||
|
||||
O.cell = chest.cell
|
||||
chest.cell.loc = O
|
||||
chest.cell = null
|
||||
W.forceMove(O)//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
if(O.mmi) //we delete the mmi created by robot/New()
|
||||
qdel(O.mmi)
|
||||
O.mmi = W //and give the real mmi to the borg.
|
||||
O.updatename()
|
||||
|
||||
SSblackbox.inc("cyborg_birth",1)
|
||||
|
||||
forceMove(O)
|
||||
O.robot_suit = src
|
||||
|
||||
if(!locomotion)
|
||||
O.lockcharge = 1
|
||||
O.update_canmove()
|
||||
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/borg/upgrade/ai))
|
||||
var/obj/item/borg/upgrade/ai/M = W
|
||||
if(check_completion())
|
||||
if(!isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You cannot install[M], the frame has to be standing on the ground to be perfectly precise!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>[M] is stuck to your hand!</span>")
|
||||
return
|
||||
qdel(M)
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot/shell(get_turf(src))
|
||||
|
||||
if(!aisync)
|
||||
lawsync = FALSE
|
||||
O.connected_ai = null
|
||||
else
|
||||
if(forced_ai)
|
||||
O.connected_ai = forced_ai
|
||||
O.notify_ai(AI_SHELL)
|
||||
if(!lawsync)
|
||||
O.lawupdate = FALSE
|
||||
O.make_laws()
|
||||
|
||||
|
||||
O.cell = chest.cell
|
||||
chest.cell.loc = O
|
||||
chest.cell = null
|
||||
O.locked = panel_locked
|
||||
O.job = "Cyborg"
|
||||
forceMove(O)
|
||||
O.robot_suit = src
|
||||
if(!locomotion)
|
||||
O.lockcharge = TRUE
|
||||
O.update_canmove()
|
||||
|
||||
else if(istype(W,/obj/item/weapon/pen))
|
||||
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/robot_suit/proc/Interact(mob/user)
|
||||
var/t1 = text("Designation: <A href='?src=\ref[];Name=1'>[(created_name ? "[created_name]" : "Default Cyborg")]</a><br>\n",src)
|
||||
t1 += text("Master AI: <A href='?src=\ref[];Master=1'>[(forced_ai ? "[forced_ai.name]" : "Automatic")]</a><br><br>\n",src)
|
||||
|
||||
t1 += text("LawSync Port: <A href='?src=\ref[];Law=1'>[(lawsync ? "Open" : "Closed")]</a><br>\n",src)
|
||||
t1 += text("AI Connection Port: <A href='?src=\ref[];AI=1'>[(aisync ? "Open" : "Closed")]</a><br>\n",src)
|
||||
t1 += text("Servo Motor Functions: <A href='?src=\ref[];Loco=1'>[(locomotion ? "Unlocked" : "Locked")]</a><br>\n",src)
|
||||
t1 += text("Panel Lock: <A href='?src=\ref[];Panel=1'>[(panel_locked ? "Engaged" : "Disengaged")]</a><br>\n",src)
|
||||
var/datum/browser/popup = new(user, "robotdebug", "Cyborg Boot Debug", 310, 220)
|
||||
popup.set_content(t1)
|
||||
popup.open()
|
||||
|
||||
/obj/item/robot_suit/Topic(href, href_list)
|
||||
if(usr.incapacitated() || !Adjacent(usr))
|
||||
return
|
||||
|
||||
var/mob/living/living_user = usr
|
||||
var/obj/item/item_in_hand = living_user.get_active_held_item()
|
||||
if(!istype(item_in_hand, /obj/item/device/multitool))
|
||||
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")
|
||||
return
|
||||
|
||||
if(href_list["Name"])
|
||||
var/new_name = reject_bad_name(input(usr, "Enter new designation. Set to blank to reset to default.", "Cyborg Debug", src.created_name),1)
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
if(new_name)
|
||||
created_name = new_name
|
||||
else
|
||||
created_name = ""
|
||||
|
||||
else if(href_list["Master"])
|
||||
forced_ai = select_active_ai(usr)
|
||||
if(!forced_ai)
|
||||
to_chat(usr, "<span class='error'>No active AIs detected.</span>")
|
||||
|
||||
else if(href_list["Law"])
|
||||
lawsync = !lawsync
|
||||
else if(href_list["AI"])
|
||||
aisync = !aisync
|
||||
else if(href_list["Loco"])
|
||||
locomotion = !locomotion
|
||||
else if(href_list["Panel"])
|
||||
panel_locked = !panel_locked
|
||||
|
||||
add_fingerprint(usr)
|
||||
Interact(usr)
|
||||
|
||||
|
||||
forceMove(O)
|
||||
O.robot_suit = src
|
||||
|
||||
if(!locomotion)
|
||||
O.lockcharge = 1
|
||||
O.update_canmove()
|
||||
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/borg/upgrade/ai))
|
||||
var/obj/item/borg/upgrade/ai/M = W
|
||||
if(check_completion())
|
||||
if(!isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You cannot install[M], the frame has to be standing on the ground to be perfectly precise!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>[M] is stuck to your hand!</span>")
|
||||
return
|
||||
qdel(M)
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot/shell(get_turf(src))
|
||||
|
||||
if(!aisync)
|
||||
lawsync = FALSE
|
||||
O.connected_ai = null
|
||||
else
|
||||
if(forced_ai)
|
||||
O.connected_ai = forced_ai
|
||||
O.notify_ai(AI_SHELL)
|
||||
if(!lawsync)
|
||||
O.lawupdate = FALSE
|
||||
O.make_laws()
|
||||
|
||||
|
||||
O.cell = chest.cell
|
||||
chest.cell.loc = O
|
||||
chest.cell = null
|
||||
O.locked = panel_locked
|
||||
O.job = "Cyborg"
|
||||
forceMove(O)
|
||||
O.robot_suit = src
|
||||
if(!locomotion)
|
||||
O.lockcharge = TRUE
|
||||
O.update_canmove()
|
||||
|
||||
else if(istype(W,/obj/item/weapon/pen))
|
||||
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/robot_suit/proc/Interact(mob/user)
|
||||
var/t1 = text("Designation: <A href='?src=\ref[];Name=1'>[(created_name ? "[created_name]" : "Default Cyborg")]</a><br>\n",src)
|
||||
t1 += text("Master AI: <A href='?src=\ref[];Master=1'>[(forced_ai ? "[forced_ai.name]" : "Automatic")]</a><br><br>\n",src)
|
||||
|
||||
t1 += text("LawSync Port: <A href='?src=\ref[];Law=1'>[(lawsync ? "Open" : "Closed")]</a><br>\n",src)
|
||||
t1 += text("AI Connection Port: <A href='?src=\ref[];AI=1'>[(aisync ? "Open" : "Closed")]</a><br>\n",src)
|
||||
t1 += text("Servo Motor Functions: <A href='?src=\ref[];Loco=1'>[(locomotion ? "Unlocked" : "Locked")]</a><br>\n",src)
|
||||
t1 += text("Panel Lock: <A href='?src=\ref[];Panel=1'>[(panel_locked ? "Engaged" : "Disengaged")]</a><br>\n",src)
|
||||
var/datum/browser/popup = new(user, "robotdebug", "Cyborg Boot Debug", 310, 220)
|
||||
popup.set_content(t1)
|
||||
popup.open()
|
||||
|
||||
/obj/item/robot_suit/Topic(href, href_list)
|
||||
if(usr.incapacitated() || !Adjacent(usr))
|
||||
return
|
||||
|
||||
var/mob/living/living_user = usr
|
||||
var/obj/item/item_in_hand = living_user.get_active_held_item()
|
||||
if(!istype(item_in_hand, /obj/item/device/multitool))
|
||||
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")
|
||||
return
|
||||
|
||||
if(href_list["Name"])
|
||||
var/new_name = reject_bad_name(input(usr, "Enter new designation. Set to blank to reset to default.", "Cyborg Debug", src.created_name),1)
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
if(new_name)
|
||||
created_name = new_name
|
||||
else
|
||||
created_name = ""
|
||||
|
||||
else if(href_list["Master"])
|
||||
forced_ai = select_active_ai(usr)
|
||||
if(!forced_ai)
|
||||
to_chat(usr, "<span class='error'>No active AIs detected.</span>")
|
||||
|
||||
else if(href_list["Law"])
|
||||
lawsync = !lawsync
|
||||
else if(href_list["AI"])
|
||||
aisync = !aisync
|
||||
else if(href_list["Loco"])
|
||||
locomotion = !locomotion
|
||||
else if(href_list["Panel"])
|
||||
panel_locked = !panel_locked
|
||||
|
||||
add_fingerprint(usr)
|
||||
Interact(usr)
|
||||
|
||||
|
||||
@@ -1,92 +1,92 @@
|
||||
/obj/item/target
|
||||
name = "shooting target"
|
||||
desc = "A shooting target."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_h"
|
||||
density = 0
|
||||
var/hp = 1800
|
||||
var/obj/structure/target_stake/pinnedLoc
|
||||
|
||||
/obj/item/target/Destroy()
|
||||
removeOverlays()
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.nullPinnedTarget()
|
||||
return ..()
|
||||
|
||||
/obj/item/target/proc/nullPinnedLoc()
|
||||
pinnedLoc = null
|
||||
density = 0
|
||||
|
||||
/obj/item/target/proc/removeOverlays()
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/target/Move()
|
||||
..()
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.loc = loc
|
||||
|
||||
/obj/item/target/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
removeOverlays()
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/target/attack_hand(mob/user)
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.removeTarget(user)
|
||||
..()
|
||||
|
||||
/obj/item/target/syndicate
|
||||
icon_state = "target_s"
|
||||
desc = "A shooting target that looks like a syndicate scum."
|
||||
hp = 2600
|
||||
|
||||
/obj/item/target/alien
|
||||
icon_state = "target_q"
|
||||
desc = "A shooting target that looks like a xenomorphic alien."
|
||||
hp = 2350
|
||||
|
||||
/obj/item/target/clown
|
||||
icon_state = "target_c"
|
||||
desc = "A shooting target that looks like a useless clown."
|
||||
hp = 2000
|
||||
|
||||
#define DECALTYPE_SCORCH 1
|
||||
#define DECALTYPE_BULLET 2
|
||||
|
||||
/obj/item/target/clown/bullet_act(obj/item/projectile/P)
|
||||
..()
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
|
||||
/obj/item/target/bullet_act(obj/item/projectile/P)
|
||||
var/p_x = P.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset P.p_x!"
|
||||
var/p_y = P.p_y + pick(0,0,0,0,0,-1,1)
|
||||
var/decaltype = DECALTYPE_SCORCH
|
||||
if(istype(/obj/item/projectile/bullet, P))
|
||||
decaltype = DECALTYPE_BULLET
|
||||
var/icon/C = icon(icon,icon_state)
|
||||
if(C.GetPixel(p_x, p_y) && P.original == src && overlays.len <= 35) // if the located pixel isn't blank (null)
|
||||
hp -= P.damage
|
||||
if(hp <= 0)
|
||||
visible_message("<span class='danger'>[src] breaks into tiny pieces and collapses!</span>")
|
||||
qdel(src)
|
||||
/obj/item/target
|
||||
name = "shooting target"
|
||||
desc = "A shooting target."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_h"
|
||||
density = 0
|
||||
var/hp = 1800
|
||||
var/obj/structure/target_stake/pinnedLoc
|
||||
|
||||
/obj/item/target/Destroy()
|
||||
removeOverlays()
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.nullPinnedTarget()
|
||||
return ..()
|
||||
|
||||
/obj/item/target/proc/nullPinnedLoc()
|
||||
pinnedLoc = null
|
||||
density = 0
|
||||
|
||||
/obj/item/target/proc/removeOverlays()
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/target/Move()
|
||||
..()
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.loc = loc
|
||||
|
||||
/obj/item/target/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
removeOverlays()
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/target/attack_hand(mob/user)
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.removeTarget(user)
|
||||
..()
|
||||
|
||||
/obj/item/target/syndicate
|
||||
icon_state = "target_s"
|
||||
desc = "A shooting target that looks like a syndicate scum."
|
||||
hp = 2600
|
||||
|
||||
/obj/item/target/alien
|
||||
icon_state = "target_q"
|
||||
desc = "A shooting target that looks like a xenomorphic alien."
|
||||
hp = 2350
|
||||
|
||||
/obj/item/target/clown
|
||||
icon_state = "target_c"
|
||||
desc = "A shooting target that looks like a useless clown."
|
||||
hp = 2000
|
||||
|
||||
#define DECALTYPE_SCORCH 1
|
||||
#define DECALTYPE_BULLET 2
|
||||
|
||||
/obj/item/target/clown/bullet_act(obj/item/projectile/P)
|
||||
..()
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
|
||||
/obj/item/target/bullet_act(obj/item/projectile/P)
|
||||
var/p_x = P.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset P.p_x!"
|
||||
var/p_y = P.p_y + pick(0,0,0,0,0,-1,1)
|
||||
var/decaltype = DECALTYPE_SCORCH
|
||||
if(istype(/obj/item/projectile/bullet, P))
|
||||
decaltype = DECALTYPE_BULLET
|
||||
var/icon/C = icon(icon,icon_state)
|
||||
if(C.GetPixel(p_x, p_y) && P.original == src && overlays.len <= 35) // if the located pixel isn't blank (null)
|
||||
hp -= P.damage
|
||||
if(hp <= 0)
|
||||
visible_message("<span class='danger'>[src] breaks into tiny pieces and collapses!</span>")
|
||||
qdel(src)
|
||||
var/image/bullet_hole = image('icons/effects/effects.dmi', "scorch", OBJ_LAYER + 0.5)
|
||||
bullet_hole.pixel_x = p_x - 1 //offset correction
|
||||
bullet_hole.pixel_y = p_y - 1
|
||||
if(decaltype == DECALTYPE_SCORCH)
|
||||
if(decaltype == DECALTYPE_SCORCH)
|
||||
bullet_hole.setDir(pick(NORTH,SOUTH,EAST,WEST))// random scorch design
|
||||
if(P.damage >= 20 || istype(P, /obj/item/projectile/beam/practice))
|
||||
if(P.damage >= 20 || istype(P, /obj/item/projectile/beam/practice))
|
||||
bullet_hole.setDir(pick(NORTH,SOUTH,EAST,WEST))
|
||||
else
|
||||
else
|
||||
bullet_hole.icon_state = "light_scorch"
|
||||
else
|
||||
else
|
||||
bullet_hole.icon_state = "dent"
|
||||
add_overlay(bullet_hole)
|
||||
return
|
||||
return -1
|
||||
|
||||
#undef DECALTYPE_SCORCH
|
||||
return
|
||||
return -1
|
||||
|
||||
#undef DECALTYPE_SCORCH
|
||||
#undef DECALTYPE_BULLET
|
||||
@@ -1,81 +1,81 @@
|
||||
//Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.
|
||||
/obj/item/weapon/ore/bluespace_crystal
|
||||
name = "bluespace crystal"
|
||||
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "bluespace_crystal"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_BLUESPACE=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "bluespace=6;materials=3"
|
||||
points = 50
|
||||
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
|
||||
refined_type = /obj/item/stack/sheet/bluespace_crystal
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/refined
|
||||
name = "refined bluespace crystal"
|
||||
points = 0
|
||||
refined_type = null
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/New()
|
||||
..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/attack_self(mob/user)
|
||||
user.visible_message("<span class='warning'>[user] crushes [src]!</span>", "<span class='danger'>You crush [src]!</span>")
|
||||
new /obj/effect/particle_effect/sparks(loc)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
blink_mob(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/proc/blink_mob(mob/living/L)
|
||||
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
if(!..()) // not caught in mid-air
|
||||
visible_message("<span class='notice'>[src] fizzles and disappears upon impact!</span>")
|
||||
var/turf/T = get_turf(hit_atom)
|
||||
new /obj/effect/particle_effect/sparks(T)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
if(isliving(hit_atom))
|
||||
blink_mob(hit_atom)
|
||||
qdel(src)
|
||||
|
||||
//Artifical bluespace crystal, doesn't give you much research.
|
||||
/obj/item/weapon/ore/bluespace_crystal/artificial
|
||||
name = "artificial bluespace crystal"
|
||||
desc = "An artificially made bluespace crystal, it looks delicate."
|
||||
origin_tech = "bluespace=3;plasmatech=4"
|
||||
materials = list(MAT_BLUESPACE=MINERAL_MATERIAL_AMOUNT / 2)
|
||||
blink_range = 4 // Not as good as the organic stuff!
|
||||
points = 0 //nice try
|
||||
refined_type = null
|
||||
|
||||
//Polycrystals, aka stacks
|
||||
/obj/item/stack/sheet/bluespace_crystal
|
||||
name = "bluespace polycrystal"
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "polycrystal"
|
||||
desc = "A stable polycrystal, made of fused-together bluespace crystals. You could probably break one off."
|
||||
origin_tech = "bluespace=6;materials=3"
|
||||
materials = list(MAT_BLUESPACE=MINERAL_MATERIAL_AMOUNT)
|
||||
attack_verb = list("bluespace polybashed", "bluespace polybattered", "bluespace polybludgeoned", "bluespace polythrashed", "bluespace polysmashed")
|
||||
//Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.
|
||||
/obj/item/weapon/ore/bluespace_crystal
|
||||
name = "bluespace crystal"
|
||||
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "bluespace_crystal"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_BLUESPACE=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "bluespace=6;materials=3"
|
||||
points = 50
|
||||
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
|
||||
refined_type = /obj/item/stack/sheet/bluespace_crystal
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/refined
|
||||
name = "refined bluespace crystal"
|
||||
points = 0
|
||||
refined_type = null
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/New()
|
||||
..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/attack_self(mob/user)
|
||||
user.visible_message("<span class='warning'>[user] crushes [src]!</span>", "<span class='danger'>You crush [src]!</span>")
|
||||
new /obj/effect/particle_effect/sparks(loc)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
blink_mob(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/proc/blink_mob(mob/living/L)
|
||||
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
|
||||
|
||||
/obj/item/weapon/ore/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
if(!..()) // not caught in mid-air
|
||||
visible_message("<span class='notice'>[src] fizzles and disappears upon impact!</span>")
|
||||
var/turf/T = get_turf(hit_atom)
|
||||
new /obj/effect/particle_effect/sparks(T)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
if(isliving(hit_atom))
|
||||
blink_mob(hit_atom)
|
||||
qdel(src)
|
||||
|
||||
//Artifical bluespace crystal, doesn't give you much research.
|
||||
/obj/item/weapon/ore/bluespace_crystal/artificial
|
||||
name = "artificial bluespace crystal"
|
||||
desc = "An artificially made bluespace crystal, it looks delicate."
|
||||
origin_tech = "bluespace=3;plasmatech=4"
|
||||
materials = list(MAT_BLUESPACE=MINERAL_MATERIAL_AMOUNT / 2)
|
||||
blink_range = 4 // Not as good as the organic stuff!
|
||||
points = 0 //nice try
|
||||
refined_type = null
|
||||
|
||||
//Polycrystals, aka stacks
|
||||
/obj/item/stack/sheet/bluespace_crystal
|
||||
name = "bluespace polycrystal"
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "polycrystal"
|
||||
desc = "A stable polycrystal, made of fused-together bluespace crystals. You could probably break one off."
|
||||
origin_tech = "bluespace=6;materials=3"
|
||||
materials = list(MAT_BLUESPACE=MINERAL_MATERIAL_AMOUNT)
|
||||
attack_verb = list("bluespace polybashed", "bluespace polybattered", "bluespace polybludgeoned", "bluespace polythrashed", "bluespace polysmashed")
|
||||
novariants = TRUE
|
||||
var/crystal_type = /obj/item/weapon/ore/bluespace_crystal/refined
|
||||
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_self(mob/user)// to prevent the construction menu from ever happening
|
||||
to_chat(user, "<span class='warning'>You cannot crush the polycrystal in-hand, try breaking one off.</span>")
|
||||
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user)
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
var/BC = new crystal_type(src)
|
||||
user.put_in_hands(BC)
|
||||
use(1)
|
||||
if(!amount)
|
||||
to_chat(user, "<span class='notice'>You break the final crystal off.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You break off a crystal.</span>")
|
||||
else
|
||||
..()
|
||||
var/crystal_type = /obj/item/weapon/ore/bluespace_crystal/refined
|
||||
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_self(mob/user)// to prevent the construction menu from ever happening
|
||||
to_chat(user, "<span class='warning'>You cannot crush the polycrystal in-hand, try breaking one off.</span>")
|
||||
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user)
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
var/BC = new crystal_type(src)
|
||||
user.put_in_hands(BC)
|
||||
use(1)
|
||||
if(!amount)
|
||||
to_chat(user, "<span class='notice'>You break the final crystal off.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You break off a crystal.</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -1,144 +1,144 @@
|
||||
/obj/item/stack/medical
|
||||
name = "medical pack"
|
||||
singular_name = "medical pack"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
amount = 6
|
||||
max_amount = 6
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
/obj/item/stack/medical
|
||||
name = "medical pack"
|
||||
singular_name = "medical pack"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
amount = 6
|
||||
max_amount = 6
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
full_w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
resistance_flags = FLAMMABLE
|
||||
obj_integrity = 40
|
||||
max_integrity = 40
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
resistance_flags = FLAMMABLE
|
||||
obj_integrity = 40
|
||||
max_integrity = 40
|
||||
novariants = FALSE
|
||||
var/heal_brute = 0
|
||||
var/heal_burn = 0
|
||||
var/stop_bleeding = 0
|
||||
var/self_delay = 50
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/M, mob/user)
|
||||
|
||||
if(M.stat == 2)
|
||||
var/t_him = "it"
|
||||
if(M.gender == MALE)
|
||||
t_him = "him"
|
||||
else if(M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
to_chat(user, "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>")
|
||||
return
|
||||
|
||||
if(!istype(M, /mob/living/carbon) && !istype(M, /mob/living/simple_animal))
|
||||
to_chat(user, "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>")
|
||||
return 1
|
||||
|
||||
var/obj/item/bodypart/affecting
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting) //Missing limb?
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(stop_bleeding)
|
||||
if(H.bleedsuppress)
|
||||
to_chat(user, "<span class='warning'>[H]'s bleeding is already bandaged!</span>")
|
||||
return
|
||||
else if(!H.bleed_rate)
|
||||
to_chat(user, "<span class='warning'>[H] isn't bleeding!</span>")
|
||||
return
|
||||
|
||||
|
||||
if(isliving(M))
|
||||
if(!M.can_inject(user, 1))
|
||||
return
|
||||
|
||||
if(user)
|
||||
if (M != user)
|
||||
if (istype(M, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/critter = M
|
||||
if (!(critter.healable))
|
||||
to_chat(user, "<span class='notice'> You cannot use [src] on [M]!</span>")
|
||||
return
|
||||
else if (critter.health == critter.maxHealth)
|
||||
to_chat(user, "<span class='notice'> [M] is at full health.</span>")
|
||||
return
|
||||
else if(src.heal_brute < 1)
|
||||
to_chat(user, "<span class='notice'> [src] won't help [M] at all.</span>")
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", "<span class='green'>You apply [src] on [M].</span>")
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
if(user.gender == MALE)
|
||||
t_himself = "himself"
|
||||
else if(user.gender == FEMALE)
|
||||
t_himself = "herself"
|
||||
user.visible_message("<span class='notice'>[user] starts to apply [src] on [t_himself]...</span>", "<span class='notice'>You begin applying [src] on yourself...</span>")
|
||||
if(!do_mob(user, M, self_delay, extra_checks=CALLBACK(M, /mob/living/proc/can_inject,user,1)))
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [t_himself].</span>", "<span class='green'>You apply [src] on yourself.</span>")
|
||||
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting) //Missing limb?
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(stop_bleeding)
|
||||
if(!H.bleedsuppress) //so you can't stack bleed suppression
|
||||
H.suppress_bloodloss(stop_bleeding)
|
||||
if(affecting.status == BODYPART_ORGANIC) //Limb must be organic to be healed - RR
|
||||
if(affecting.heal_damage(heal_brute, heal_burn))
|
||||
C.update_damage_overlays()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
|
||||
else
|
||||
M.heal_bodypart_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
use(1)
|
||||
|
||||
|
||||
|
||||
/obj/item/stack/medical/bruise_pack
|
||||
name = "bruise pack"
|
||||
singular_name = "bruise pack"
|
||||
desc = "A theraputic gel pack and bandages designed to treat blunt-force trauma."
|
||||
icon_state = "brutepack"
|
||||
heal_brute = 40
|
||||
origin_tech = "biotech=2"
|
||||
self_delay = 20
|
||||
|
||||
/obj/item/stack/medical/gauze
|
||||
name = "medical gauze"
|
||||
desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds."
|
||||
gender = PLURAL
|
||||
singular_name = "medical gauze"
|
||||
icon_state = "gauze"
|
||||
stop_bleeding = 1800
|
||||
self_delay = 20
|
||||
max_amount = 12
|
||||
|
||||
/obj/item/stack/medical/gauze/improvised
|
||||
name = "improvised gauze"
|
||||
singular_name = "improvised gauze"
|
||||
desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
|
||||
stop_bleeding = 900
|
||||
|
||||
/obj/item/stack/medical/gauze/cyborg
|
||||
materials = list()
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
name = "ointment"
|
||||
desc = "Used to treat those nasty burn wounds."
|
||||
gender = PLURAL
|
||||
singular_name = "ointment"
|
||||
icon_state = "ointment"
|
||||
heal_burn = 40
|
||||
origin_tech = "biotech=2"
|
||||
self_delay = 20
|
||||
var/heal_brute = 0
|
||||
var/heal_burn = 0
|
||||
var/stop_bleeding = 0
|
||||
var/self_delay = 50
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/M, mob/user)
|
||||
|
||||
if(M.stat == 2)
|
||||
var/t_him = "it"
|
||||
if(M.gender == MALE)
|
||||
t_him = "him"
|
||||
else if(M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
to_chat(user, "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>")
|
||||
return
|
||||
|
||||
if(!iscarbon(M) && !isanimal(M))
|
||||
to_chat(user, "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>")
|
||||
return 1
|
||||
|
||||
var/obj/item/bodypart/affecting
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting) //Missing limb?
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(stop_bleeding)
|
||||
if(H.bleedsuppress)
|
||||
to_chat(user, "<span class='warning'>[H]'s bleeding is already bandaged!</span>")
|
||||
return
|
||||
else if(!H.bleed_rate)
|
||||
to_chat(user, "<span class='warning'>[H] isn't bleeding!</span>")
|
||||
return
|
||||
|
||||
|
||||
if(isliving(M))
|
||||
if(!M.can_inject(user, 1))
|
||||
return
|
||||
|
||||
if(user)
|
||||
if (M != user)
|
||||
if (isanimal(M))
|
||||
var/mob/living/simple_animal/critter = M
|
||||
if (!(critter.healable))
|
||||
to_chat(user, "<span class='notice'> You cannot use [src] on [M]!</span>")
|
||||
return
|
||||
else if (critter.health == critter.maxHealth)
|
||||
to_chat(user, "<span class='notice'> [M] is at full health.</span>")
|
||||
return
|
||||
else if(src.heal_brute < 1)
|
||||
to_chat(user, "<span class='notice'> [src] won't help [M] at all.</span>")
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", "<span class='green'>You apply [src] on [M].</span>")
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
if(user.gender == MALE)
|
||||
t_himself = "himself"
|
||||
else if(user.gender == FEMALE)
|
||||
t_himself = "herself"
|
||||
user.visible_message("<span class='notice'>[user] starts to apply [src] on [t_himself]...</span>", "<span class='notice'>You begin applying [src] on yourself...</span>")
|
||||
if(!do_mob(user, M, self_delay, extra_checks=CALLBACK(M, /mob/living/proc/can_inject,user,1)))
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [t_himself].</span>", "<span class='green'>You apply [src] on yourself.</span>")
|
||||
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting) //Missing limb?
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(stop_bleeding)
|
||||
if(!H.bleedsuppress) //so you can't stack bleed suppression
|
||||
H.suppress_bloodloss(stop_bleeding)
|
||||
if(affecting.status == BODYPART_ORGANIC) //Limb must be organic to be healed - RR
|
||||
if(affecting.heal_damage(heal_brute, heal_burn))
|
||||
C.update_damage_overlays()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
|
||||
else
|
||||
M.heal_bodypart_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
use(1)
|
||||
|
||||
|
||||
|
||||
/obj/item/stack/medical/bruise_pack
|
||||
name = "bruise pack"
|
||||
singular_name = "bruise pack"
|
||||
desc = "A theraputic gel pack and bandages designed to treat blunt-force trauma."
|
||||
icon_state = "brutepack"
|
||||
heal_brute = 40
|
||||
origin_tech = "biotech=2"
|
||||
self_delay = 20
|
||||
|
||||
/obj/item/stack/medical/gauze
|
||||
name = "medical gauze"
|
||||
desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds."
|
||||
gender = PLURAL
|
||||
singular_name = "medical gauze"
|
||||
icon_state = "gauze"
|
||||
stop_bleeding = 1800
|
||||
self_delay = 20
|
||||
max_amount = 12
|
||||
|
||||
/obj/item/stack/medical/gauze/improvised
|
||||
name = "improvised gauze"
|
||||
singular_name = "improvised gauze"
|
||||
desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
|
||||
stop_bleeding = 900
|
||||
|
||||
/obj/item/stack/medical/gauze/cyborg
|
||||
materials = list()
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
name = "ointment"
|
||||
desc = "Used to treat those nasty burn wounds."
|
||||
gender = PLURAL
|
||||
singular_name = "ointment"
|
||||
icon_state = "ointment"
|
||||
heal_burn = 40
|
||||
origin_tech = "biotech=2"
|
||||
self_delay = 20
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \
|
||||
))
|
||||
|
||||
/obj/item/stack/rods
|
||||
name = "metal rod"
|
||||
desc = "Some rods. Can be used for building or something."
|
||||
singular_name = "metal rod"
|
||||
icon_state = "rods"
|
||||
item_state = "rods"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
force = 9
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=1000)
|
||||
max_amount = 50
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \
|
||||
))
|
||||
|
||||
/obj/item/stack/rods
|
||||
name = "metal rod"
|
||||
desc = "Some rods. Can be used for building or something."
|
||||
singular_name = "metal rod"
|
||||
icon_state = "rods"
|
||||
item_state = "rods"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
force = 9
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=1000)
|
||||
max_amount = 50
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
novariants = TRUE
|
||||
|
||||
/obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE)
|
||||
..()
|
||||
|
||||
recipes = GLOB.rod_recipes
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
var/amount = get_amount()
|
||||
if((amount <= 5) && (amount > 0))
|
||||
icon_state = "rods-[amount]"
|
||||
else
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
|
||||
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_held_item()==R)
|
||||
R.use(2)
|
||||
if (!R && replace)
|
||||
user.put_in_hands(new_item)
|
||||
|
||||
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/S = W
|
||||
if(amount != 1)
|
||||
to_chat(user, "<span class='warning'>You must use a single rod!</span>")
|
||||
else if(S.w_class > WEIGHT_CLASS_SMALL)
|
||||
to_chat(user, "<span class='warning'>The ingredient is too big for [src]!</span>")
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/A = new/obj/item/weapon/reagent_containers/food/snacks/customizable/kebab(get_turf(src))
|
||||
A.initialize_custom_food(src, S, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/rods/cyborg
|
||||
materials = list()
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/rods/cyborg/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE)
|
||||
..()
|
||||
|
||||
recipes = GLOB.rod_recipes
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
var/amount = get_amount()
|
||||
if((amount <= 5) && (amount > 0))
|
||||
icon_state = "rods-[amount]"
|
||||
else
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
|
||||
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_held_item()==R)
|
||||
R.use(2)
|
||||
if (!R && replace)
|
||||
user.put_in_hands(new_item)
|
||||
|
||||
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/S = W
|
||||
if(amount != 1)
|
||||
to_chat(user, "<span class='warning'>You must use a single rod!</span>")
|
||||
else if(S.w_class > WEIGHT_CLASS_SMALL)
|
||||
to_chat(user, "<span class='warning'>The ingredient is too big for [src]!</span>")
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/A = new/obj/item/weapon/reagent_containers/food/snacks/customizable/kebab(get_turf(src))
|
||||
A.initialize_custom_food(src, S, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/rods/cyborg
|
||||
materials = list()
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/rods/cyborg/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/stack/rods/ten
|
||||
amount = 10
|
||||
|
||||
@@ -1,215 +1,282 @@
|
||||
/* Glass stack types
|
||||
* Contains:
|
||||
* Glass sheets
|
||||
* Reinforced glass sheets
|
||||
* Glass shards - TODO: Move this into code/game/object/item/weapons
|
||||
*/
|
||||
|
||||
/*
|
||||
* Glass sheets
|
||||
*/
|
||||
GLOBAL_LIST_INIT(glass_recipes, list ( \
|
||||
new/datum/stack_recipe("directional window", /obj/structure/window/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
new/datum/stack_recipe("fulltile window", /obj/structure/window/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/glass
|
||||
name = "glass"
|
||||
desc = "HOLY SHEET! That is a lot of glass."
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "materials=1"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/glass
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
materials = list()
|
||||
is_cyborg = 1
|
||||
cost = 500
|
||||
|
||||
/obj/item/stack/sheet/glass/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/glass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.glass_recipes
|
||||
..()
|
||||
|
||||
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if (get_amount() < 1 || CC.get_amount() < 5)
|
||||
to_chat(user, "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass!</span>")
|
||||
return
|
||||
CC.use(5)
|
||||
use(1)
|
||||
to_chat(user, "<span class='notice'>You attach wire to the [name].</span>")
|
||||
var/obj/item/stack/light_w/new_tile = new(user.loc)
|
||||
new_tile.add_fingerprint(user)
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
if (V.get_amount() >= 1 && src.get_amount() >= 1)
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_held_item()==G)
|
||||
V.use(1)
|
||||
G.use(1)
|
||||
if (!G && replace)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass!</span>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
* Reinforced glass sheets
|
||||
*/
|
||||
GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
|
||||
new/datum/stack_recipe("windoor frame", /obj/structure/windoor_assembly, 5, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("directional reinforced window", /obj/structure/window/reinforced/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
new/datum/stack_recipe("fulltile reinforced window", /obj/structure/window/reinforced/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
|
||||
))
|
||||
|
||||
|
||||
/obj/item/stack/sheet/rglass
|
||||
name = "reinforced glass"
|
||||
desc = "Glass which seems to have rods or something stuck in them."
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "materials=2"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/rglass
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
materials = list()
|
||||
var/datum/robot_energy_storage/glasource
|
||||
var/metcost = 250
|
||||
var/glacost = 500
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/get_amount()
|
||||
return min(round(source.energy / metcost), round(glasource.energy / glacost))
|
||||
|
||||
/* Glass stack types
|
||||
* Contains:
|
||||
* Glass sheets
|
||||
* Reinforced glass sheets
|
||||
* Glass shards - TODO: Move this into code/game/object/item/weapons
|
||||
*/
|
||||
|
||||
/*
|
||||
* Glass sheets
|
||||
*/
|
||||
GLOBAL_LIST_INIT(glass_recipes, list ( \
|
||||
new/datum/stack_recipe("directional window", /obj/structure/window/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
new/datum/stack_recipe("fulltile window", /obj/structure/window/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/glass
|
||||
name = "glass"
|
||||
desc = "HOLY SHEET! That is a lot of glass."
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "materials=1"
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/glass
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
materials = list()
|
||||
is_cyborg = 1
|
||||
cost = 500
|
||||
|
||||
/obj/item/stack/sheet/glass/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/glass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.glass_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if (get_amount() < 1 || CC.get_amount() < 5)
|
||||
to_chat(user, "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass!</span>")
|
||||
return
|
||||
CC.use(5)
|
||||
use(1)
|
||||
to_chat(user, "<span class='notice'>You attach wire to the [name].</span>")
|
||||
var/obj/item/stack/light_w/new_tile = new(user.loc)
|
||||
new_tile.add_fingerprint(user)
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
if (V.get_amount() >= 1 && get_amount() >= 1)
|
||||
var/obj/item/stack/sheet/rglass/RG = new (get_turf(user))
|
||||
RG.add_fingerprint(user)
|
||||
var/replace = user.get_inactive_held_item()==src
|
||||
V.use(1)
|
||||
use(1)
|
||||
if(QDELETED(src) && replace)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass!</span>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(pglass_recipes, list ( \
|
||||
new/datum/stack_recipe("directional window", /obj/structure/window/plasma/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
new/datum/stack_recipe("fulltile window", /obj/structure/window/plasma/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/glass/plasma
|
||||
name = "plasma glass"
|
||||
desc = "A glass sheet made out of a plasma-silicate alloy. It looks extremely tough and heavily fire resistant."
|
||||
singular_name = "plasma glass sheet"
|
||||
icon_state = "sheet-pglass"
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/glass/plasma
|
||||
|
||||
/obj/item/stack/sheet/glass/plasma/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/glass/plasma/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.pglass_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/glass/plasma/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
if (V.get_amount() >= 1 && get_amount() >= 1)
|
||||
var/obj/item/stack/sheet/rglass/plasma/RG = new (get_turf(user))
|
||||
RG.add_fingerprint(user)
|
||||
var/replace = user.get_inactive_held_item()==src
|
||||
V.use(1)
|
||||
use(1)
|
||||
if(QDELETED(src) && replace)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod and one sheet of plamsa glass to make reinforced plasma glass!</span>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Reinforced glass sheets
|
||||
*/
|
||||
GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
|
||||
new/datum/stack_recipe("windoor frame", /obj/structure/windoor_assembly, 5, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("directional reinforced window", /obj/structure/window/reinforced/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
new/datum/stack_recipe("fulltile reinforced window", /obj/structure/window/reinforced/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
|
||||
))
|
||||
|
||||
|
||||
/obj/item/stack/sheet/rglass
|
||||
name = "reinforced glass"
|
||||
desc = "Glass which seems to have rods or something stuck in them."
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "materials=2"
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/rglass
|
||||
|
||||
/obj/item/stack/sheet/rglass/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
..()
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
materials = list()
|
||||
var/datum/robot_energy_storage/glasource
|
||||
var/metcost = 250
|
||||
var/glacost = 500
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/get_amount()
|
||||
return min(round(source.energy / metcost), round(glasource.energy / glacost))
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/use(used, transfer = FALSE) // Requires special checks, because it uses two storages
|
||||
source.use_charge(used * metcost)
|
||||
glasource.use_charge(used * glacost)
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/add(amount)
|
||||
source.add_charge(amount * metcost)
|
||||
glasource.add_charge(amount * glacost)
|
||||
|
||||
/obj/item/stack/sheet/rglass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.reinforced_glass_recipes
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/shard
|
||||
name = "shard"
|
||||
desc = "A nasty looking shard of glass."
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "large"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
force = 5
|
||||
throwforce = 10
|
||||
item_state = "shard-glass"
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list(melee = 100, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 100)
|
||||
obj_integrity = 40
|
||||
max_integrity = 40
|
||||
var/cooldown = 0
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/weapon/shard/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] [pick("wrists", "throat")] with the shard of glass! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
|
||||
/obj/item/weapon/shard/Initialize()
|
||||
. = ..()
|
||||
icon_state = pick("large", "medium", "small")
|
||||
switch(icon_state)
|
||||
if("small")
|
||||
pixel_x = rand(-12, 12)
|
||||
pixel_y = rand(-12, 12)
|
||||
if("medium")
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-8, 8)
|
||||
if("large")
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/weapon/shard/afterattack(atom/A as mob|obj, mob/user, proximity)
|
||||
if(!proximity || !(src in user))
|
||||
return
|
||||
if(isturf(A))
|
||||
return
|
||||
if(istype(A, /obj/item/weapon/storage))
|
||||
return
|
||||
var/hit_hand = ((user.active_hand_index % 2 == 0) ? "r_" : "l_") + "arm"
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.species_traits)) // golems, etc
|
||||
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
H.apply_damage(force*0.5, BRUTE, hit_hand)
|
||||
else if(ismonkey(user))
|
||||
var/mob/living/carbon/monkey/M = user
|
||||
to_chat(M, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
M.apply_damage(force*0.5, BRUTE, hit_hand)
|
||||
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/lightreplacer))
|
||||
I.attackby(src, user)
|
||||
else if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
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)
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/Crossed(mob/AM)
|
||||
if(istype(AM) && has_gravity(loc))
|
||||
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(PIERCEIMMUNE in H.dna.species.species_traits)
|
||||
return
|
||||
var/picked_def_zone = pick("l_leg", "r_leg")
|
||||
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
|
||||
if(!istype(O))
|
||||
return
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg/add(amount)
|
||||
source.add_charge(amount * metcost)
|
||||
glasource.add_charge(amount * glacost)
|
||||
|
||||
/obj/item/stack/sheet/rglass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.reinforced_glass_recipes
|
||||
return ..()
|
||||
|
||||
GLOBAL_LIST_INIT(prglass_recipes, list ( \
|
||||
new/datum/stack_recipe("directional reinforced window", /obj/structure/window/plasma/reinforced/unanchored, time = 0, on_floor = TRUE, window_checks = TRUE), \
|
||||
new/datum/stack_recipe("fulltile reinforced window", /obj/structure/window/plasma/reinforced/fulltile/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/rglass/plasma
|
||||
name = "reinforced plasma glass"
|
||||
desc = "A glass sheet made out of a plasma-silicate alloy and a rod matrice. It looks hopelessly tough and nearly fire-proof!"
|
||||
singular_name = "reinforced plasma glass sheet"
|
||||
icon_state = "sheet-prglass"
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
origin_tech = "materials=2;plasmatech=2"
|
||||
armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/rglass/plasma
|
||||
|
||||
/obj/item/stack/sheet/rglass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.prglass_recipes
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/shard
|
||||
name = "shard"
|
||||
desc = "A nasty looking shard of glass."
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "large"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
force = 5
|
||||
throwforce = 10
|
||||
item_state = "shard-glass"
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 100, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100)
|
||||
obj_integrity = 40
|
||||
max_integrity = 40
|
||||
var/cooldown = 0
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/weapon/shard/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] [pick("wrists", "throat")] with the shard of glass! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
|
||||
/obj/item/weapon/shard/Initialize()
|
||||
. = ..()
|
||||
icon_state = pick("large", "medium", "small")
|
||||
switch(icon_state)
|
||||
if("small")
|
||||
pixel_x = rand(-12, 12)
|
||||
pixel_y = rand(-12, 12)
|
||||
if("medium")
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-8, 8)
|
||||
if("large")
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/weapon/shard/afterattack(atom/A as mob|obj, mob/user, proximity)
|
||||
if(!proximity || !(src in user))
|
||||
return
|
||||
if(isturf(A))
|
||||
return
|
||||
if(istype(A, /obj/item/weapon/storage))
|
||||
return
|
||||
var/hit_hand = ((user.active_hand_index % 2 == 0) ? "r_" : "l_") + "arm"
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.species_traits)) // golems, etc
|
||||
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
H.apply_damage(force*0.5, BRUTE, hit_hand)
|
||||
else if(ismonkey(user))
|
||||
var/mob/living/carbon/monkey/M = user
|
||||
to_chat(M, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
M.apply_damage(force*0.5, BRUTE, hit_hand)
|
||||
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/lightreplacer))
|
||||
I.attackby(src, user)
|
||||
else if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
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)
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/Crossed(mob/AM)
|
||||
if(istype(AM) && has_gravity(loc))
|
||||
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(PIERCEIMMUNE in H.dna.species.species_traits)
|
||||
return
|
||||
var/picked_def_zone = pick("l_leg", "r_leg")
|
||||
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
|
||||
if(!istype(O))
|
||||
return
|
||||
if(O.status == BODYPART_ROBOTIC)
|
||||
return
|
||||
var/feetCover = (H.wear_suit && H.wear_suit.body_parts_covered & FEET) || (H.w_uniform && H.w_uniform.body_parts_covered & FEET)
|
||||
if(H.shoes || feetCover || H.movement_type & FLYING || H.buckled)
|
||||
return
|
||||
H.apply_damage(5, BRUTE, picked_def_zone)
|
||||
if(cooldown < world.time - 10) //cooldown to avoid message spam.
|
||||
if(!H.incapacitated())
|
||||
H.visible_message("<span class='danger'>[H] steps in the broken glass!</span>", \
|
||||
"<span class='userdanger'>You step in the broken glass!</span>")
|
||||
else
|
||||
H.visible_message("<span class='danger'>[H] slides on the broken glass!</span>", \
|
||||
"<span class='userdanger'>You slide on the broken glass!</span>")
|
||||
|
||||
cooldown = world.time
|
||||
H.Weaken(3)
|
||||
var/feetCover = (H.wear_suit && H.wear_suit.body_parts_covered & FEET) || (H.w_uniform && H.w_uniform.body_parts_covered & FEET)
|
||||
if(H.shoes || feetCover || H.movement_type & FLYING || H.buckled)
|
||||
return
|
||||
H.apply_damage(5, BRUTE, picked_def_zone)
|
||||
if(cooldown < world.time - 10) //cooldown to avoid message spam.
|
||||
if(!H.incapacitated())
|
||||
H.visible_message("<span class='danger'>[H] steps in the broken glass!</span>", \
|
||||
"<span class='userdanger'>You step in the broken glass!</span>")
|
||||
else
|
||||
H.visible_message("<span class='danger'>[H] slides on the broken glass!</span>", \
|
||||
"<span class='userdanger'>You slide on the broken glass!</span>")
|
||||
|
||||
cooldown = world.time
|
||||
H.Knockdown(60)
|
||||
|
||||
@@ -1,237 +1,237 @@
|
||||
/obj/item/stack/sheet/animalhide
|
||||
name = "hide"
|
||||
desc = "Something went wrong."
|
||||
origin_tech = "biotech=3"
|
||||
/obj/item/stack/sheet/animalhide
|
||||
name = "hide"
|
||||
desc = "Something went wrong."
|
||||
origin_tech = "biotech=3"
|
||||
novariants = TRUE
|
||||
|
||||
/obj/item/stack/sheet/animalhide/human
|
||||
name = "human skin"
|
||||
desc = "The by-product of human farming."
|
||||
singular_name = "human skin piece"
|
||||
icon_state = "sheet-hide"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/human
|
||||
name = "human skin"
|
||||
desc = "The by-product of human farming."
|
||||
singular_name = "human skin piece"
|
||||
icon_state = "sheet-hide"
|
||||
novariants = FALSE
|
||||
|
||||
GLOBAL_LIST_INIT(human_recipes, list( \
|
||||
new/datum/stack_recipe("bloated human costume", /obj/item/clothing/suit/hooded/bloated_human, 5, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/human/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.human_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/generic
|
||||
name = "skin"
|
||||
desc = "A piece of skin."
|
||||
singular_name = "skin piece"
|
||||
icon_state = "sheet-hide"
|
||||
|
||||
GLOBAL_LIST_INIT(human_recipes, list( \
|
||||
new/datum/stack_recipe("bloated human costume", /obj/item/clothing/suit/hooded/bloated_human, 5, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/human/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.human_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/generic
|
||||
name = "skin"
|
||||
desc = "A piece of skin."
|
||||
singular_name = "skin piece"
|
||||
icon_state = "sheet-hide"
|
||||
novariants = FALSE
|
||||
|
||||
/obj/item/stack/sheet/animalhide/corgi
|
||||
name = "corgi hide"
|
||||
desc = "The by-product of corgi farming."
|
||||
singular_name = "corgi hide piece"
|
||||
icon_state = "sheet-corgi"
|
||||
|
||||
GLOBAL_LIST_INIT(corgi_recipes, list ( \
|
||||
new/datum/stack_recipe("corgi costume", /obj/item/clothing/suit/hooded/ian_costume, 3, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/corgi/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.corgi_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/cat
|
||||
name = "cat hide"
|
||||
desc = "The by-product of cat farming."
|
||||
singular_name = "cat hide piece"
|
||||
icon_state = "sheet-cat"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/monkey
|
||||
name = "monkey hide"
|
||||
desc = "The by-product of monkey farming."
|
||||
singular_name = "monkey hide piece"
|
||||
icon_state = "sheet-monkey"
|
||||
|
||||
GLOBAL_LIST_INIT(monkey_recipes, list ( \
|
||||
new/datum/stack_recipe("monkey mask", /obj/item/clothing/mask/gas/monkeymask, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("monkey suit", /obj/item/clothing/suit/monkeysuit, 2, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/monkey/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.monkey_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/lizard
|
||||
name = "lizard skin"
|
||||
desc = "Sssssss..."
|
||||
singular_name = "lizard skin piece"
|
||||
icon_state = "sheet-lizard"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno
|
||||
name = "alien hide"
|
||||
desc = "The skin of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
icon_state = "sheet-xeno"
|
||||
|
||||
GLOBAL_LIST_INIT(xeno_recipes, list ( \
|
||||
new/datum/stack_recipe("alien helmet", /obj/item/clothing/head/xenos, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien suit", /obj/item/clothing/suit/xenos, 2, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.xeno_recipes
|
||||
return ..()
|
||||
|
||||
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
|
||||
/obj/item/stack/sheet/xenochitin
|
||||
name = "alien chitin"
|
||||
desc = "A piece of the hide of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "chitin"
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/stack/sheet/animalhide/corgi
|
||||
name = "corgi hide"
|
||||
desc = "The by-product of corgi farming."
|
||||
singular_name = "corgi hide piece"
|
||||
icon_state = "sheet-corgi"
|
||||
|
||||
GLOBAL_LIST_INIT(corgi_recipes, list ( \
|
||||
new/datum/stack_recipe("corgi costume", /obj/item/clothing/suit/hooded/ian_costume, 3, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/corgi/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.corgi_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/cat
|
||||
name = "cat hide"
|
||||
desc = "The by-product of cat farming."
|
||||
singular_name = "cat hide piece"
|
||||
icon_state = "sheet-cat"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/monkey
|
||||
name = "monkey hide"
|
||||
desc = "The by-product of monkey farming."
|
||||
singular_name = "monkey hide piece"
|
||||
icon_state = "sheet-monkey"
|
||||
|
||||
GLOBAL_LIST_INIT(monkey_recipes, list ( \
|
||||
new/datum/stack_recipe("monkey mask", /obj/item/clothing/mask/gas/monkeymask, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("monkey suit", /obj/item/clothing/suit/monkeysuit, 2, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/monkey/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.monkey_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/lizard
|
||||
name = "lizard skin"
|
||||
desc = "Sssssss..."
|
||||
singular_name = "lizard skin piece"
|
||||
icon_state = "sheet-lizard"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno
|
||||
name = "alien hide"
|
||||
desc = "The skin of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
icon_state = "sheet-xeno"
|
||||
|
||||
GLOBAL_LIST_INIT(xeno_recipes, list ( \
|
||||
new/datum/stack_recipe("alien helmet", /obj/item/clothing/head/xenos, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("alien suit", /obj/item/clothing/suit/xenos, 2, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.xeno_recipes
|
||||
return ..()
|
||||
|
||||
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
|
||||
/obj/item/stack/sheet/xenochitin
|
||||
name = "alien chitin"
|
||||
desc = "A piece of the hide of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "chitin"
|
||||
origin_tech = null
|
||||
novariants = TRUE
|
||||
|
||||
/obj/item/xenos_claw
|
||||
name = "alien claw"
|
||||
desc = "The claw of a terrible creature."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "claw"
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/weed_extract
|
||||
name = "weed extract"
|
||||
desc = "A piece of slimy, purplish weed."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "weed_extract"
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/stack/sheet/hairlesshide
|
||||
name = "hairless hide"
|
||||
desc = "This hide was stripped of its hair, but still needs washing and tanning."
|
||||
singular_name = "hairless hide piece"
|
||||
icon_state = "sheet-hairlesshide"
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/stack/sheet/wetleather
|
||||
name = "wet leather"
|
||||
desc = "This leather has been cleaned but still needs to be dried."
|
||||
singular_name = "wet leather piece"
|
||||
icon_state = "sheet-wetleather"
|
||||
origin_tech = null
|
||||
var/wetness = 30 //Reduced when exposed to high temperautres
|
||||
var/drying_threshold_temperature = 500 //Kelvin to start drying
|
||||
|
||||
/*
|
||||
* Leather SHeet
|
||||
*/
|
||||
/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"
|
||||
|
||||
GLOBAL_LIST_INIT(leather_recipes, list ( \
|
||||
new/datum/stack_recipe("wallet", /obj/item/weapon/storage/wallet, 1), \
|
||||
new/datum/stack_recipe("muzzle", /obj/item/clothing/mask/muzzle, 2), \
|
||||
new/datum/stack_recipe("botany gloves", /obj/item/clothing/gloves/botanic_leather, 3), \
|
||||
new/datum/stack_recipe("toolbelt", /obj/item/weapon/storage/belt/utility, 4), \
|
||||
new/datum/stack_recipe("leather satchel", /obj/item/weapon/storage/backpack/satchel, 5), \
|
||||
new/datum/stack_recipe("bandolier", /obj/item/weapon/storage/belt/bandolier, 5), \
|
||||
new/datum/stack_recipe("leather jacket", /obj/item/clothing/suit/jacket/leather, 7), \
|
||||
new/datum/stack_recipe("leather overcoat", /obj/item/clothing/suit/jacket/leather/overcoat, 10), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/leather/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.leather_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Sinew
|
||||
*/
|
||||
/obj/item/stack/sheet/sinew
|
||||
name = "watcher sinew"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
desc = "Long stringy filaments which presumably came from a watcher's wings."
|
||||
singular_name = "watcher sinew"
|
||||
icon_state = "sinew"
|
||||
origin_tech = "biotech=4"
|
||||
|
||||
/obj/item/xenos_claw
|
||||
name = "alien claw"
|
||||
desc = "The claw of a terrible creature."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "claw"
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/weed_extract
|
||||
name = "weed extract"
|
||||
desc = "A piece of slimy, purplish weed."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "weed_extract"
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/stack/sheet/hairlesshide
|
||||
name = "hairless hide"
|
||||
desc = "This hide was stripped of its hair, but still needs washing and tanning."
|
||||
singular_name = "hairless hide piece"
|
||||
icon_state = "sheet-hairlesshide"
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/stack/sheet/wetleather
|
||||
name = "wet leather"
|
||||
desc = "This leather has been cleaned but still needs to be dried."
|
||||
singular_name = "wet leather piece"
|
||||
icon_state = "sheet-wetleather"
|
||||
origin_tech = null
|
||||
var/wetness = 30 //Reduced when exposed to high temperautres
|
||||
var/drying_threshold_temperature = 500 //Kelvin to start drying
|
||||
|
||||
/*
|
||||
* Leather SHeet
|
||||
*/
|
||||
/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"
|
||||
|
||||
GLOBAL_LIST_INIT(leather_recipes, list ( \
|
||||
new/datum/stack_recipe("wallet", /obj/item/weapon/storage/wallet, 1), \
|
||||
new/datum/stack_recipe("muzzle", /obj/item/clothing/mask/muzzle, 2), \
|
||||
new/datum/stack_recipe("botany gloves", /obj/item/clothing/gloves/botanic_leather, 3), \
|
||||
new/datum/stack_recipe("toolbelt", /obj/item/weapon/storage/belt/utility, 4), \
|
||||
new/datum/stack_recipe("leather satchel", /obj/item/weapon/storage/backpack/satchel, 5), \
|
||||
new/datum/stack_recipe("bandolier", /obj/item/weapon/storage/belt/bandolier, 5), \
|
||||
new/datum/stack_recipe("leather jacket", /obj/item/clothing/suit/jacket/leather, 7), \
|
||||
new/datum/stack_recipe("leather overcoat", /obj/item/clothing/suit/jacket/leather/overcoat, 10), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/leather/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.leather_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Sinew
|
||||
*/
|
||||
/obj/item/stack/sheet/sinew
|
||||
name = "watcher sinew"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
desc = "Long stringy filaments which presumably came from a watcher's wings."
|
||||
singular_name = "watcher sinew"
|
||||
icon_state = "sinew"
|
||||
origin_tech = "biotech=4"
|
||||
novariants = TRUE
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
||||
new/datum/stack_recipe("sinew restraints", /obj/item/weapon/restraints/handcuffs/sinew, 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/sinew/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.sinew_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Plates
|
||||
*/
|
||||
/obj/item/stack/sheet/animalhide/goliath_hide
|
||||
name = "goliath hide plates"
|
||||
desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "goliath_hide"
|
||||
singular_name = "hide plate"
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
||||
new/datum/stack_recipe("sinew restraints", /obj/item/weapon/restraints/handcuffs/sinew, 1, on_floor = 1), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/sinew/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.sinew_recipes
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Plates
|
||||
*/
|
||||
/obj/item/stack/sheet/animalhide/goliath_hide
|
||||
name = "goliath hide plates"
|
||||
desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "goliath_hide"
|
||||
singular_name = "hide plate"
|
||||
max_amount = 6
|
||||
novariants = FALSE
|
||||
flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
|
||||
flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
|
||||
/obj/item/stack/sheet/animalhide/ashdrake
|
||||
name = "ash drake hide"
|
||||
desc = "The strong, scaled hide of an ash drake."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "dragon_hide"
|
||||
singular_name = "drake plate"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/ashdrake
|
||||
name = "ash drake hide"
|
||||
desc = "The strong, scaled hide of an ash drake."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "dragon_hide"
|
||||
singular_name = "drake plate"
|
||||
max_amount = 10
|
||||
novariants = FALSE
|
||||
flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
|
||||
|
||||
//Step one - dehairing.
|
||||
|
||||
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.is_sharp())
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
|
||||
user.visible_message("[user] starts cutting hair off \the [src].", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='italics'>You hear the sound of a knife rubbing against flesh.</span>")
|
||||
if(do_after(user,50, target = src))
|
||||
to_chat(user, "<span class='notice'>You cut the hair from this [src.singular_name].</span>")
|
||||
var/obj/item/stack/sheet/hairlesshide/HS = new(user.loc)
|
||||
HS.amount = 1
|
||||
use(1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
//Step two - washing..... it's actually in washing machine code.
|
||||
|
||||
//Step three - drying
|
||||
/obj/item/stack/sheet/wetleather/temperature_expose(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)
|
||||
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)
|
||||
HS.amount = 1
|
||||
wetness = initial(wetness)
|
||||
src.use(1)
|
||||
flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
layer = MOB_LAYER
|
||||
|
||||
|
||||
//Step one - dehairing.
|
||||
|
||||
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.is_sharp())
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
|
||||
user.visible_message("[user] starts cutting hair off \the [src].", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='italics'>You hear the sound of a knife rubbing against flesh.</span>")
|
||||
if(do_after(user,50, target = src))
|
||||
to_chat(user, "<span class='notice'>You cut the hair from this [src.singular_name].</span>")
|
||||
var/obj/item/stack/sheet/hairlesshide/HS = new(user.loc)
|
||||
HS.amount = 1
|
||||
use(1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
//Step two - washing..... it's actually in washing machine code.
|
||||
|
||||
//Step three - drying
|
||||
/obj/item/stack/sheet/wetleather/temperature_expose(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)
|
||||
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)
|
||||
HS.amount = 1
|
||||
wetness = initial(wetness)
|
||||
src.use(1)
|
||||
|
||||
/obj/item/stack/sheet/wetleather/microwave_act(obj/machinery/microwave/MW)
|
||||
..()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Cloth
|
||||
* Plastic
|
||||
* Cardboard
|
||||
* Paper Frames
|
||||
* Runed Metal (cult)
|
||||
* Brass (clockwork cult)
|
||||
*/
|
||||
@@ -14,31 +15,31 @@
|
||||
* Metal
|
||||
*/
|
||||
GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bar stool", /obj/structure/chair/stool/bar, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("swivel chair", /obj/structure/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bar stool", /obj/structure/chair/stool/bar, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("swivel chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
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("wall girders", /obj/structure/girder, 2, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("computer frame", /obj/structure/frame/computer, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("modular console", /obj/machinery/modular_computer/console/buildable/, 10, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("machine frame", /obj/structure/frame/machine, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("firelock frame", /obj/structure/firelock_frame, 3, time = 50, 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), \
|
||||
new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("computer frame", /obj/structure/frame/computer, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("modular console", /obj/machinery/modular_computer/console/buildable/, 10, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("machine frame", /obj/structure/frame/machine, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("firelock frame", /obj/structure/firelock_frame, 3, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
|
||||
new/datum/stack_recipe("light fixture frame", /obj/item/wallframe/light_fixture, 2), \
|
||||
@@ -50,8 +51,8 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("extinguisher cabinet frame", /obj/item/wallframe/extinguisher_cabinet, 2), \
|
||||
new/datum/stack_recipe("button frame", /obj/item/wallframe/button, 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("floodlight frame", /obj/structure/floodlight_frame, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("floodlight frame", /obj/structure/floodlight_frame, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/metal
|
||||
@@ -96,7 +97,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
* Plasteel
|
||||
*/
|
||||
GLOBAL_LIST_INIT(plasteel_recipes, list ( \
|
||||
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
|
||||
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = TRUE), \
|
||||
new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \
|
||||
))
|
||||
|
||||
@@ -133,23 +134,23 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
|
||||
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
|
||||
new/datum/stack_recipe("rolling pin", /obj/item/weapon/kitchen/rollingpin, 2, time = 30), \
|
||||
new/datum/stack_recipe("wooden chair", /obj/structure/chair/wood/, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 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("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("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("dresser", /obj/structure/dresser, 10, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wooden chair", /obj/structure/chair/wood/, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("dresser", /obj/structure/dresser, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("picture frame", /obj/item/wallframe/picture, 1, time = 10),\
|
||||
new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40), \
|
||||
new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\
|
||||
new/datum/stack_recipe("tiki mask", /obj/item/clothing/mask/gas/tiki_mask, 2), \
|
||||
new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\
|
||||
new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = 1, on_floor = 1),\
|
||||
new/datum/stack_recipe("wooden crate", /obj/structure/closet/crate/wooden, 6, time = 50, one_per_turf = 1, on_floor = 1),\
|
||||
new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
new/datum/stack_recipe("wooden crate", /obj/structure/closet/crate/wooden, 6, time = 50, one_per_turf = TRUE, on_floor = TRUE),\
|
||||
new/datum/stack_recipe("baseball bat", /obj/item/weapon/melee/baseball_bat, 5, time = 15),\
|
||||
))
|
||||
|
||||
@@ -181,7 +182,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
|
||||
new/datum/stack_recipe("black shoes", /obj/item/clothing/shoes/sneakers/black, 2), \
|
||||
null, \
|
||||
new/datum/stack_recipe("backpack", /obj/item/weapon/storage/backpack, 4), \
|
||||
new/datum/stack_recipe("duffelbag", /obj/item/weapon/storage/backpack/duffelbag, 6), \
|
||||
new/datum/stack_recipe("duffel bag", /obj/item/weapon/storage/backpack/duffelbag, 6), \
|
||||
null, \
|
||||
new/datum/stack_recipe("plant bag", /obj/item/weapon/storage/bag/plants, 4), \
|
||||
new/datum/stack_recipe("book bag", /obj/item/weapon/storage/bag/books, 4), \
|
||||
@@ -256,12 +257,12 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(runed_metal_recipes, list ( \
|
||||
new/datum/stack_recipe("runed door", /obj/machinery/door/airlock/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("runed girder", /obj/structure/girder/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("pylon", /obj/structure/destructible/cult/pylon, 4, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("forge", /obj/structure/destructible/cult/forge, 3, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("archives", /obj/structure/destructible/cult/tome, 3, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("altar", /obj/structure/destructible/cult/talisman, 3, time = 40, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("runed door", /obj/machinery/door/airlock/cult, 1, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("runed girder", /obj/structure/girder/cult, 1, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("pylon", /obj/structure/destructible/cult/pylon, 4, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("forge", /obj/structure/destructible/cult/forge, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("archives", /obj/structure/destructible/cult/tome, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("altar", /obj/structure/destructible/cult/talisman, 3, time = 40, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/runed_metal
|
||||
@@ -374,7 +375,7 @@ GLOBAL_LIST_INIT(brass_recipes, list ( \
|
||||
origin_tech = "materials=2;biotech=2"
|
||||
|
||||
GLOBAL_LIST_INIT(plastic_recipes, list(
|
||||
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40), \
|
||||
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = TRUE, on_floor = TRUE, time = 40), \
|
||||
new /datum/stack_recipe("water bottle", /obj/item/weapon/reagent_containers/glass/beaker/waterbottle/empty), \
|
||||
new /datum/stack_recipe("large water bottle", /obj/item/weapon/reagent_containers/glass/beaker/waterbottle/large/empty,3), \
|
||||
new /datum/stack_recipe("wet floor sign", /obj/item/weapon/caution, 2)))
|
||||
@@ -398,3 +399,26 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
|
||||
/obj/item/stack/sheet/plastic/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.plastic_recipes
|
||||
. = ..()
|
||||
|
||||
GLOBAL_LIST_INIT(paperframe_recipes, list(
|
||||
new /datum/stack_recipe("paper frame separator", /obj/structure/window/paperframe, 2, one_per_turf = TRUE, on_floor = TRUE, time = 10), \
|
||||
new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperframe, 3, one_per_turf = TRUE, on_floor = TRUE, time = 10 )))
|
||||
|
||||
/obj/item/stack/sheet/paperframes
|
||||
name = "paper frames"
|
||||
desc = "A thin wooden frame with paper attached."
|
||||
singular_name = "paper frame"
|
||||
icon_state = "sheet-paper"
|
||||
origin_tech = "materials=1"
|
||||
merge_type = /obj/item/stack/sheet/paperframes
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/stack/sheet/paperframes/Initialize()
|
||||
recipes = GLOB.paperframe_recipes
|
||||
. = ..()
|
||||
/obj/item/stack/sheet/paperframes/five
|
||||
amount = 5
|
||||
/obj/item/stack/sheet/paperframes/twenty
|
||||
amount = 20
|
||||
/obj/item/stack/sheet/paperframes/fifty
|
||||
amount = 50
|
||||
@@ -1,12 +1,12 @@
|
||||
/obj/item/stack/sheet
|
||||
name = "sheet"
|
||||
/obj/item/stack/sheet
|
||||
name = "sheet"
|
||||
full_w_class = WEIGHT_CLASS_NORMAL
|
||||
force = 5
|
||||
throwforce = 5
|
||||
max_amount = 50
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
|
||||
force = 5
|
||||
throwforce = 5
|
||||
max_amount = 50
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
|
||||
novariants = FALSE
|
||||
var/perunit = MINERAL_MATERIAL_AMOUNT
|
||||
var/perunit = MINERAL_MATERIAL_AMOUNT
|
||||
var/sheettype = null //this is used for girders in the creation of walls/false walls
|
||||
@@ -171,7 +171,7 @@
|
||||
if(new_item.amount <= 0)//if the stack is empty, i.e it has been merged with an existing stack and has been garbage collected
|
||||
return
|
||||
|
||||
if (istype(O,/obj/item))
|
||||
if (isitem(O))
|
||||
usr.put_in_hands(O)
|
||||
O.add_fingerprint(usr)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(I, /obj/item) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
if(isitem(I) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
I.hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, "<span class='notice'>You slot [src] into the [I] and charge its internal uplink.</span>")
|
||||
|
||||
@@ -115,7 +115,6 @@
|
||||
/obj/item/stack/tile/carpet/black/fifty
|
||||
amount = 50
|
||||
|
||||
|
||||
/obj/item/stack/tile/fakespace
|
||||
name = "astral carpet"
|
||||
singular_name = "astral carpet"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if(target.anchored)
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item))
|
||||
if(isitem(target))
|
||||
var/obj/item/I = target
|
||||
if(!I.can_be_package_wrapped())
|
||||
return
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
//Items for nuke theft, supermatter theft traitor objective
|
||||
|
||||
|
||||
// STEALING THE NUKE
|
||||
|
||||
//the nuke core - objective item
|
||||
/obj/item/nuke_core
|
||||
name = "plutonium core"
|
||||
desc = "Extremely radioactive. Wear goggles."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "plutonium_core"
|
||||
item_state = "plutoniumcore"
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/pulse = 0
|
||||
var/cooldown = 0
|
||||
var/pulseicon = "plutonium_core_pulse"
|
||||
|
||||
/obj/item/nuke_core/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/nuke_core/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/nuke_core/attackby(obj/item/nuke_core_container/container, mob/user)
|
||||
if(istype(container))
|
||||
container.load(src, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/nuke_core/process()
|
||||
if(cooldown < world.time - 60)
|
||||
cooldown = world.time
|
||||
flick(pulseicon, src)
|
||||
radiation_pulse(get_turf(src), 1, 4, 40, 1)
|
||||
|
||||
//nuke core box, for carrying the core
|
||||
/obj/item/nuke_core_container
|
||||
name = "nuke core container"
|
||||
desc = "Solid container for radioactive objects."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "core_container_empty"
|
||||
item_state = "tile"
|
||||
var/obj/item/nuke_core/core
|
||||
|
||||
/obj/item/nuke_core_container/Destroy()
|
||||
QDEL_NULL(core)
|
||||
return ..()
|
||||
|
||||
/obj/item/nuke_core_container/proc/load(obj/item/nuke_core/ncore, mob/user)
|
||||
if(core || !istype(ncore))
|
||||
return FALSE
|
||||
ncore.forceMove(src)
|
||||
core = ncore
|
||||
icon_state = "core_container_loaded"
|
||||
to_chat(user, "<span class='warning'>Container is sealing...</span>")
|
||||
addtimer(CALLBACK(src, .proc/seal), 50)
|
||||
return TRUE
|
||||
|
||||
/obj/item/nuke_core_container/proc/seal()
|
||||
if(istype(core))
|
||||
STOP_PROCESSING(SSobj, core)
|
||||
icon_state = "core_container_sealed"
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 60, 1)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] is permanently sealed, [core]'s radiation is contained.</span>")
|
||||
|
||||
/obj/item/nuke_core_container/attackby(obj/item/nuke_core/core, mob/user)
|
||||
if(istype(core))
|
||||
if(!user.temporarilyRemoveItemFromInventory(core))
|
||||
to_chat(user, "<span class='warning'>The [core] is stuck to your hand!</span>")
|
||||
return
|
||||
else
|
||||
load(core, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
//snowflake screwdriver, works as a key to start nuke theft, traitor only
|
||||
/obj/item/weapon/screwdriver/nuke
|
||||
name = "screwdriver"
|
||||
desc = "A screwdriver with an ultra thin tip."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "screwdriver_nuke"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weapon/paper/nuke_instructions
|
||||
info = "How to break into a Nanotrasen self-destruct terminal and remove its plutonium core:<br>\
|
||||
<ul>\
|
||||
<li>Use a screwdriver with a very thin tip (provided) to unscrew the terminal's front panel</li>\
|
||||
<li>Dislodge and remove the front panel with a crowbar</li>\
|
||||
<li>Cut the inner metal plate with a welding tool</li>\
|
||||
<li>Pry off the inner plate with a crowbar to expose the radioactive core</li>\
|
||||
<li>Use the core container to remove the plutonium core; the container will take some time to seal</li>\
|
||||
<li>???</li>\
|
||||
</ul>"
|
||||
|
||||
// STEALING SUPERMATTER
|
||||
|
||||
/obj/item/weapon/paper/supermatter_sliver_instructions
|
||||
info = "How to safely extract a supermatter sliver:<br>\
|
||||
<ul>\
|
||||
<li>Approach an active supermatter crystal with proper protective gear. DO NOT MAKE PHYSICAL CONTACT.</li>\
|
||||
<li>Use a supermatter scalpel (provided) to slice off a sliver of the crystal.</li>\
|
||||
<li>Use supermatter extraction tongs (also provided) to safely remove the sliver.</li>\
|
||||
<li>Physical contact of any object with the sliver will dust the object, as well as yourself.</li>\
|
||||
<li>Use the tongs to place the sliver into the provided container, which will take some time to seal</li>\
|
||||
<li>Get the hell out before the crystal delaminates.</li>\
|
||||
<li>???</li>\
|
||||
</ul>"
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver
|
||||
name = "supermatter sliver"
|
||||
desc = "A tiny, highly volatile sliver of a supermatter crystal. Do not handle without protection!"
|
||||
icon_state = "supermatter_sliver"
|
||||
item_state = "supermattersliver"
|
||||
pulseicon = "supermatter_sliver_pulse"
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/attack_tk() // no TK dusting memes
|
||||
return FALSE
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/can_be_pulled(user) // no drag memes
|
||||
return FALSE
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/weapon/hemostat/supermatter))
|
||||
var/obj/item/weapon/hemostat/supermatter/tongs = W
|
||||
if (tongs.sliver)
|
||||
to_chat(user, "<span class='notice'>\The [tongs] is already holding a supermatter sliver!</span>")
|
||||
return FALSE
|
||||
forceMove(tongs)
|
||||
tongs.sliver = src
|
||||
tongs.icon_state = "supermatter_tongs_loaded"
|
||||
to_chat(user, "<span class='notice'>You carefully pick up [src] with [tongs].</span>")
|
||||
else if(istype(W, /obj/item/weapon/scalpel/supermatter) || istype(W, /obj/item/nuke_core_container/supermatter/)) // we don't want it to dust
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>As it touches \the [src], both \the [src] and \the [W] burst into dust!</span>")
|
||||
radiation_pulse(get_turf(user), 1, 2, 10, 1)
|
||||
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/pickup(mob/living/user)
|
||||
..()
|
||||
if(!iscarbon(user))
|
||||
return FALSE
|
||||
var/mob/ded = user
|
||||
to_chat(user, "<span class='warning'>You reach for the supermatter sliver with your hands. That was dumb.</span>")
|
||||
radiation_pulse(get_turf(user), 2, 4, 50, 1)
|
||||
playsound(get_turf(user), 'sound/effects/supermatter.ogg', 50, 1)
|
||||
ded.dust()
|
||||
|
||||
/obj/item/nuke_core_container/supermatter
|
||||
name = "supermatter bin"
|
||||
desc = "A tiny receptacle that releases an inert freon mix upon sealing, allowing a sliver of a supermatter crystal to be safely stored.."
|
||||
var/obj/item/nuke_core/supermatter_sliver/sliver
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/Destroy()
|
||||
QDEL_NULL(sliver)
|
||||
return ..()
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/load(obj/item/weapon/hemostat/supermatter/T, mob/user)
|
||||
if(!istype(T) || !T.sliver)
|
||||
return FALSE
|
||||
T.sliver.forceMove(src)
|
||||
sliver = T.sliver
|
||||
T.sliver = null
|
||||
icon_state = "core_container_loaded"
|
||||
to_chat(user, "<span class='warning'>Container is sealing...</span>")
|
||||
addtimer(CALLBACK(src, .proc/seal), 50)
|
||||
return TRUE
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/seal()
|
||||
if(istype(sliver))
|
||||
STOP_PROCESSING(SSobj, sliver)
|
||||
icon_state = "core_container_sealed"
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 60, 1)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] is permanently sealed, [sliver] is safely contained.</span>")
|
||||
|
||||
/obj/item/nuke_core_container/supermatter/attackby(obj/item/weapon/hemostat/supermatter/tongs, mob/user)
|
||||
if(istype(tongs))
|
||||
if(!user.temporarilyRemoveItemFromInventory(tongs))
|
||||
to_chat(user, "<span class='warning'>\The [tongs] is stuck to your hand!</span>")
|
||||
else
|
||||
load(sliver, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/scalpel/supermatter
|
||||
name = "supermatter scalpel"
|
||||
desc = "A scalpel with a tip of condensed freon gas, searingly cold to the touch, that can safely shave a sliver off a supermatter crystal."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "supermatter_scalpel"
|
||||
toolspeed = 0.5
|
||||
damtype = "fire"
|
||||
usesound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/weapon/hemostat/supermatter
|
||||
name = "supermatter extraction tongs"
|
||||
desc = "A pair of tongs made from condensed freon gas, searingly cold to the touch, that can safely grip a supermatter sliver."
|
||||
icon = 'icons/obj/nuke_tools.dmi'
|
||||
icon_state = "supermatter_tongs"
|
||||
toolspeed = 0.75
|
||||
damtype = "fire"
|
||||
var/obj/item/nuke_core/supermatter_sliver/sliver
|
||||
|
||||
/obj/item/weapon/hemostat/supermatter/Destroy()
|
||||
QDEL_NULL(sliver)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/hemostat/supermatter/afterattack(atom/O, mob/user, proximity)
|
||||
if(!sliver)
|
||||
return
|
||||
if(ismovableatom(O))
|
||||
Consume(O)
|
||||
to_chat(usr, "<span class='notice'>\The [sliver] is dusted along with \the [O]!</span>")
|
||||
QDEL_NULL(sliver)
|
||||
|
||||
/obj/item/weapon/hemostat/supermatter/throw_impact(atom/hit_atom) // no instakill supermatter javelins
|
||||
if(sliver)
|
||||
sliver.forceMove(loc)
|
||||
to_chat(usr, "<span class='notice'>\The [sliver] falls out of \the [src] as you throw them.</span>")
|
||||
sliver = null
|
||||
..()
|
||||
|
||||
/obj/item/weapon/hemostat/supermatter/proc/Consume(atom/movable/AM, mob/user)
|
||||
if(ismob(AM))
|
||||
var/mob/victim = AM
|
||||
victim.dust()
|
||||
message_admins("[src] has consumed [key_name_admin(victim)] [ADMIN_JMP(src)].")
|
||||
investigate_log("has consumed [key_name(victim)].", "supermatter")
|
||||
else
|
||||
investigate_log("has consumed [AM].", "supermatter")
|
||||
qdel(AM)
|
||||
user.visible_message("<span class='danger'>As [user] touches \the [AM] with \a [src], silence fills the room...</span>",\
|
||||
"<span class='userdanger'>You touch \the [AM] with \the [src], and everything suddenly goes silent.</span>\n<span class='notice'>\The [AM] flashes into dust, and soon as you can register this, you do as well.</span>",\
|
||||
"<span class='italics'>Everything suddenly goes silent.</span>")
|
||||
radiation_pulse(get_turf(user), 2, 4, 50, 1)
|
||||
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
|
||||
user.dust()
|
||||
icon_state = "supermatter_tongs"
|
||||
QDEL_NULL(sliver)
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
user.show_message("<span class='warning'>*click*</span>", 2)
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
return
|
||||
playsound(user, 'sound/weapons/Gunshot.ogg', 100, 1)
|
||||
playsound(user, 'sound/weapons/gunshot.ogg', 100, 1)
|
||||
src.bullets--
|
||||
user.visible_message("<span class='danger'>[user] fires [src] at [target]!</span>", \
|
||||
"<span class='danger'>You fire [src] at [target]!</span>", \
|
||||
@@ -316,7 +316,7 @@
|
||||
origin_tech = null
|
||||
attack_verb = list("attacked", "struck", "hit")
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/toy/hit_reaction()
|
||||
/obj/item/weapon/twohanded/dualsaber/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles
|
||||
@@ -947,7 +947,7 @@
|
||||
user.visible_message("<span class='warning'>[user] presses a button on [src].</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='italics'>You hear the click of a button.</span>")
|
||||
sleep(5)
|
||||
icon_state = "nuketoy"
|
||||
playsound(src, 'sound/machines/Alarm.ogg', 100, 0, surround = 0)
|
||||
playsound(src, 'sound/machines/alarm.ogg', 100, 0, surround = 0)
|
||||
sleep(135)
|
||||
icon_state = "nuketoycool"
|
||||
sleep(cooldown - world.time)
|
||||
@@ -1270,7 +1270,7 @@
|
||||
name = "Wizard action figure"
|
||||
icon_state = "wizard"
|
||||
toysay = "Ei Nath!"
|
||||
toysound = 'sound/magic/Disintegrate.ogg'
|
||||
toysound = 'sound/magic/disintegrate.ogg'
|
||||
|
||||
/obj/item/toy/figure/rd
|
||||
name = "Research Director action figure"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -78,7 +78,7 @@ obj/item/weapon/construction
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/construction/proc/activate()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/construction/attack_self(mob/user)
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
|
||||
@@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
/obj/item/weapon/pipe_dispenser/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] points the end of the RPD down [user.p_their()] throat and presses a button! It looks like [user.p_theyre()] trying to commit suicide...</span>")
|
||||
playsound(get_turf(user), 'sound/machines/click.ogg', 50, 1)
|
||||
playsound(get_turf(user), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(get_turf(user), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/proc/render_dir_img(_dir,pic,title,flipped=0)
|
||||
@@ -594,7 +594,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/proc/activate()
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
#undef PIPE_BINARY
|
||||
#undef PIPE_BENT
|
||||
|
||||
@@ -1,319 +1,319 @@
|
||||
/* Cards
|
||||
* Contains:
|
||||
* DATA CARD
|
||||
* ID CARD
|
||||
* FINGERPRINT CARD HOLDER
|
||||
* FINGERPRINT CARD
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* DATA CARDS - Used for the teleporter
|
||||
*/
|
||||
/obj/item/weapon/card
|
||||
name = "card"
|
||||
desc = "Does card things."
|
||||
icon = 'icons/obj/card.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/list/files = list()
|
||||
|
||||
/obj/item/weapon/card/data
|
||||
name = "data disk"
|
||||
desc = "A disk of data."
|
||||
icon_state = "data"
|
||||
var/function = "storage"
|
||||
var/data = "null"
|
||||
var/special = null
|
||||
item_state = "card-id"
|
||||
|
||||
/obj/item/weapon/card/data/verb/label(t as text)
|
||||
set name = "Label Disk"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if (t)
|
||||
src.name = "data disk- '[t]'"
|
||||
else
|
||||
src.name = "data disk"
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/*
|
||||
* ID CARDS
|
||||
*/
|
||||
/obj/item/weapon/card/emag
|
||||
desc = "It's a card with a magnetic strip attached to some circuitry."
|
||||
name = "cryptographic sequencer"
|
||||
icon_state = "emag"
|
||||
item_state = "card-id"
|
||||
origin_tech = "magnets=2;syndicate=2"
|
||||
flags = NOBLUDGEON
|
||||
var/prox_check = TRUE //If the emag requires you to be in range
|
||||
|
||||
/obj/item/weapon/card/emag/bluespace
|
||||
name = "bluespace cryptographic sequencer"
|
||||
desc = "It's a blue card with a magnetic strip attached to some circuitry. It appears to have some sort of transmitter attached to it."
|
||||
color = rgb(40, 130, 255)
|
||||
origin_tech = "bluespace=4;magnets=4;syndicate=5"
|
||||
prox_check = FALSE
|
||||
|
||||
/obj/item/weapon/card/emag/attack()
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity)
|
||||
var/atom/A = target
|
||||
if(!proximity && prox_check)
|
||||
return
|
||||
A.emag_act(user)
|
||||
|
||||
/obj/item/weapon/card/id
|
||||
name = "identification card"
|
||||
desc = "A card used to provide ID and determine access across the station."
|
||||
icon_state = "id"
|
||||
item_state = "card-id"
|
||||
slot_flags = SLOT_ID
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
var/mining_points = 0 //For redeeming at mining equipment vendors
|
||||
var/list/access = list()
|
||||
var/registered_name = null // The name registered_name on the card
|
||||
var/assignment = null
|
||||
var/access_txt // mapping aid
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload && access_txt)
|
||||
access = text2access(access_txt)
|
||||
|
||||
/obj/item/weapon/card/id/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(.)
|
||||
switch(var_name)
|
||||
if("assignment","registered_name")
|
||||
update_label()
|
||||
|
||||
/obj/item/weapon/card/id/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] shows you: [bicon(src)] [src.name].</span>", \
|
||||
"<span class='notice'>You show \the [src.name].</span>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/examine(mob/user)
|
||||
..()
|
||||
if(mining_points)
|
||||
to_chat(user, "There's [mining_points] mining equipment redemption point\s loaded onto this card.")
|
||||
|
||||
/obj/item/weapon/card/id/GetAccess()
|
||||
return access
|
||||
|
||||
/obj/item/weapon/card/id/GetID()
|
||||
return src
|
||||
|
||||
/*
|
||||
Usage:
|
||||
update_label()
|
||||
Sets the id name to whatever registered_name and assignment is
|
||||
|
||||
update_label("John Doe", "Clowny")
|
||||
Properly formats the name and occupation and sets the id name to the arguments
|
||||
*/
|
||||
/obj/item/weapon/card/id/proc/update_label(newname, newjob)
|
||||
if(newname || newjob)
|
||||
name = "[(!newname) ? "identification card" : "[newname]'s ID Card"][(!newjob) ? "" : " ([newjob])"]"
|
||||
return
|
||||
|
||||
name = "[(!registered_name) ? "identification card" : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
|
||||
|
||||
/obj/item/weapon/card/id/silver
|
||||
name = "silver identification card"
|
||||
desc = "A silver card which shows honour and dedication."
|
||||
icon_state = "silver"
|
||||
item_state = "silver_id"
|
||||
|
||||
/obj/item/weapon/card/id/gold
|
||||
name = "gold identification card"
|
||||
desc = "A golden card which shows power and might."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
|
||||
/obj/item/weapon/card/id/syndicate
|
||||
name = "agent card"
|
||||
access = list(GLOB.access_maint_tunnels, GLOB.access_syndicate)
|
||||
origin_tech = "syndicate=1"
|
||||
var/anyone = FALSE //Can anyone forge the ID or just syndicate?
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/Initialize()
|
||||
..()
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action = new(src)
|
||||
chameleon_action.chameleon_type = /obj/item/weapon/card/id
|
||||
chameleon_action.chameleon_name = "ID Card"
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/afterattack(obj/item/weapon/O, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = O
|
||||
src.access |= I.access
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role)
|
||||
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user)
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role || anyone)
|
||||
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm
|
||||
if (t)
|
||||
alert("Invalid name.")
|
||||
return
|
||||
registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN)
|
||||
if(!u)
|
||||
registered_name = ""
|
||||
return
|
||||
assignment = u
|
||||
update_label()
|
||||
to_chat(user, "<span class='notice'>You successfully forge the ID card.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/anyone
|
||||
anyone = TRUE
|
||||
|
||||
/obj/item/weapon/card/id/syndicate_command
|
||||
name = "syndicate ID card"
|
||||
desc = "An ID straight from the Syndicate."
|
||||
registered_name = "Syndicate"
|
||||
assignment = "Syndicate Overlord"
|
||||
access = list(GLOB.access_syndicate)
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare
|
||||
name = "captain's spare ID"
|
||||
desc = "The spare ID of the High Lord himself."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
registered_name = "Captain"
|
||||
assignment = "Captain"
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare/Initialize()
|
||||
var/datum/job/captain/J = new/datum/job/captain
|
||||
access = J.get_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/centcom
|
||||
name = "\improper Centcom ID"
|
||||
desc = "An ID straight from Cent. Com."
|
||||
icon_state = "centcom"
|
||||
registered_name = "Central Command"
|
||||
assignment = "General"
|
||||
|
||||
/obj/item/weapon/card/id/centcom/Initialize()
|
||||
access = get_all_centcom_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert
|
||||
name = "\improper Centcom ID"
|
||||
desc = "A ERT ID card"
|
||||
icon_state = "centcom"
|
||||
registered_name = "Emergency Response Team Commander"
|
||||
assignment = "Emergency Response Team Commander"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("commander")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Security
|
||||
registered_name = "Security Response Officer"
|
||||
assignment = "Security Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Security/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("sec")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Engineer
|
||||
registered_name = "Engineer Response Officer"
|
||||
assignment = "Engineer Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Engineer/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("eng")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Medical
|
||||
registered_name = "Medical Response Officer"
|
||||
assignment = "Medical Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Medical/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("med")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/prisoner
|
||||
name = "prisoner ID card"
|
||||
desc = "You are a number, you are not a free man."
|
||||
icon_state = "orange"
|
||||
item_state = "orange-id"
|
||||
assignment = "Prisoner"
|
||||
registered_name = "Scum"
|
||||
var/goal = 0 //How far from freedom?
|
||||
var/points = 0
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/attack_self(mob/user)
|
||||
to_chat(usr, "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/one
|
||||
name = "Prisoner #13-001"
|
||||
registered_name = "Prisoner #13-001"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/two
|
||||
name = "Prisoner #13-002"
|
||||
registered_name = "Prisoner #13-002"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/three
|
||||
name = "Prisoner #13-003"
|
||||
registered_name = "Prisoner #13-003"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/four
|
||||
name = "Prisoner #13-004"
|
||||
registered_name = "Prisoner #13-004"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/five
|
||||
name = "Prisoner #13-005"
|
||||
registered_name = "Prisoner #13-005"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/six
|
||||
name = "Prisoner #13-006"
|
||||
registered_name = "Prisoner #13-006"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/seven
|
||||
name = "Prisoner #13-007"
|
||||
registered_name = "Prisoner #13-007"
|
||||
|
||||
/obj/item/weapon/card/id/mining
|
||||
name = "mining ID"
|
||||
access = list(GLOB.access_mining, GLOB.access_mining_station, GLOB.access_mineral_storeroom)
|
||||
|
||||
/obj/item/weapon/card/id/away
|
||||
name = "a perfectly generic identification card"
|
||||
desc = "A perfectly generic identification card. Looks like it could use some flavor."
|
||||
access = list(GLOB.access_away_general)
|
||||
|
||||
/obj/item/weapon/card/id/away/hotel
|
||||
name = "Staff ID"
|
||||
desc = "A staff ID used to access the hotel's doors."
|
||||
access = list(GLOB.access_away_general, GLOB.access_away_maint)
|
||||
|
||||
/obj/item/weapon/card/id/away/hotel/securty
|
||||
name = "Officer ID"
|
||||
access = list(GLOB.access_away_general, GLOB.access_away_maint, GLOB.access_away_sec)
|
||||
/* Cards
|
||||
* Contains:
|
||||
* DATA CARD
|
||||
* ID CARD
|
||||
* FINGERPRINT CARD HOLDER
|
||||
* FINGERPRINT CARD
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* DATA CARDS - Used for the teleporter
|
||||
*/
|
||||
/obj/item/weapon/card
|
||||
name = "card"
|
||||
desc = "Does card things."
|
||||
icon = 'icons/obj/card.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/list/files = list()
|
||||
|
||||
/obj/item/weapon/card/data
|
||||
name = "data disk"
|
||||
desc = "A disk of data."
|
||||
icon_state = "data"
|
||||
var/function = "storage"
|
||||
var/data = "null"
|
||||
var/special = null
|
||||
item_state = "card-id"
|
||||
|
||||
/obj/item/weapon/card/data/verb/label(t as text)
|
||||
set name = "Label Disk"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if (t)
|
||||
src.name = "data disk- '[t]'"
|
||||
else
|
||||
src.name = "data disk"
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/*
|
||||
* ID CARDS
|
||||
*/
|
||||
/obj/item/weapon/card/emag
|
||||
desc = "It's a card with a magnetic strip attached to some circuitry."
|
||||
name = "cryptographic sequencer"
|
||||
icon_state = "emag"
|
||||
item_state = "card-id"
|
||||
origin_tech = "magnets=2;syndicate=2"
|
||||
flags = NOBLUDGEON
|
||||
var/prox_check = TRUE //If the emag requires you to be in range
|
||||
|
||||
/obj/item/weapon/card/emag/bluespace
|
||||
name = "bluespace cryptographic sequencer"
|
||||
desc = "It's a blue card with a magnetic strip attached to some circuitry. It appears to have some sort of transmitter attached to it."
|
||||
color = rgb(40, 130, 255)
|
||||
origin_tech = "bluespace=4;magnets=4;syndicate=5"
|
||||
prox_check = FALSE
|
||||
|
||||
/obj/item/weapon/card/emag/attack()
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity)
|
||||
var/atom/A = target
|
||||
if(!proximity && prox_check)
|
||||
return
|
||||
A.emag_act(user)
|
||||
|
||||
/obj/item/weapon/card/id
|
||||
name = "identification card"
|
||||
desc = "A card used to provide ID and determine access across the station."
|
||||
icon_state = "id"
|
||||
item_state = "card-id"
|
||||
slot_flags = SLOT_ID
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
var/mining_points = 0 //For redeeming at mining equipment vendors
|
||||
var/list/access = list()
|
||||
var/registered_name = null // The name registered_name on the card
|
||||
var/assignment = null
|
||||
var/access_txt // mapping aid
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload && access_txt)
|
||||
access = text2access(access_txt)
|
||||
|
||||
/obj/item/weapon/card/id/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(.)
|
||||
switch(var_name)
|
||||
if("assignment","registered_name")
|
||||
update_label()
|
||||
|
||||
/obj/item/weapon/card/id/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] shows you: [bicon(src)] [src.name].</span>", \
|
||||
"<span class='notice'>You show \the [src.name].</span>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/examine(mob/user)
|
||||
..()
|
||||
if(mining_points)
|
||||
to_chat(user, "There's [mining_points] mining equipment redemption point\s loaded onto this card.")
|
||||
|
||||
/obj/item/weapon/card/id/GetAccess()
|
||||
return access
|
||||
|
||||
/obj/item/weapon/card/id/GetID()
|
||||
return src
|
||||
|
||||
/*
|
||||
Usage:
|
||||
update_label()
|
||||
Sets the id name to whatever registered_name and assignment is
|
||||
|
||||
update_label("John Doe", "Clowny")
|
||||
Properly formats the name and occupation and sets the id name to the arguments
|
||||
*/
|
||||
/obj/item/weapon/card/id/proc/update_label(newname, newjob)
|
||||
if(newname || newjob)
|
||||
name = "[(!newname) ? "identification card" : "[newname]'s ID Card"][(!newjob) ? "" : " ([newjob])"]"
|
||||
return
|
||||
|
||||
name = "[(!registered_name) ? "identification card" : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
|
||||
|
||||
/obj/item/weapon/card/id/silver
|
||||
name = "silver identification card"
|
||||
desc = "A silver card which shows honour and dedication."
|
||||
icon_state = "silver"
|
||||
item_state = "silver_id"
|
||||
|
||||
/obj/item/weapon/card/id/gold
|
||||
name = "gold identification card"
|
||||
desc = "A golden card which shows power and might."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
|
||||
/obj/item/weapon/card/id/syndicate
|
||||
name = "agent card"
|
||||
access = list(GLOB.access_maint_tunnels, GLOB.access_syndicate)
|
||||
origin_tech = "syndicate=1"
|
||||
var/anyone = FALSE //Can anyone forge the ID or just syndicate?
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/Initialize()
|
||||
..()
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action = new(src)
|
||||
chameleon_action.chameleon_type = /obj/item/weapon/card/id
|
||||
chameleon_action.chameleon_name = "ID Card"
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/afterattack(obj/item/weapon/O, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = O
|
||||
src.access |= I.access
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role)
|
||||
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user)
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role || anyone)
|
||||
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm
|
||||
if (t)
|
||||
alert("Invalid name.")
|
||||
return
|
||||
registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN)
|
||||
if(!u)
|
||||
registered_name = ""
|
||||
return
|
||||
assignment = u
|
||||
update_label()
|
||||
to_chat(user, "<span class='notice'>You successfully forge the ID card.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/anyone
|
||||
anyone = TRUE
|
||||
|
||||
/obj/item/weapon/card/id/syndicate_command
|
||||
name = "syndicate ID card"
|
||||
desc = "An ID straight from the Syndicate."
|
||||
registered_name = "Syndicate"
|
||||
assignment = "Syndicate Overlord"
|
||||
access = list(GLOB.access_syndicate)
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare
|
||||
name = "captain's spare ID"
|
||||
desc = "The spare ID of the High Lord himself."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
registered_name = "Captain"
|
||||
assignment = "Captain"
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare/Initialize()
|
||||
var/datum/job/captain/J = new/datum/job/captain
|
||||
access = J.get_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/centcom
|
||||
name = "\improper Centcom ID"
|
||||
desc = "An ID straight from Cent. Com."
|
||||
icon_state = "centcom"
|
||||
registered_name = "Central Command"
|
||||
assignment = "General"
|
||||
|
||||
/obj/item/weapon/card/id/centcom/Initialize()
|
||||
access = get_all_centcom_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert
|
||||
name = "\improper Centcom ID"
|
||||
desc = "A ERT ID card"
|
||||
icon_state = "centcom"
|
||||
registered_name = "Emergency Response Team Commander"
|
||||
assignment = "Emergency Response Team Commander"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("commander")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Security
|
||||
registered_name = "Security Response Officer"
|
||||
assignment = "Security Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Security/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("sec")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Engineer
|
||||
registered_name = "Engineer Response Officer"
|
||||
assignment = "Engineer Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Engineer/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("eng")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Medical
|
||||
registered_name = "Medical Response Officer"
|
||||
assignment = "Medical Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Medical/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("med")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/prisoner
|
||||
name = "prisoner ID card"
|
||||
desc = "You are a number, you are not a free man."
|
||||
icon_state = "orange"
|
||||
item_state = "orange-id"
|
||||
assignment = "Prisoner"
|
||||
registered_name = "Scum"
|
||||
var/goal = 0 //How far from freedom?
|
||||
var/points = 0
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/attack_self(mob/user)
|
||||
to_chat(usr, "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/one
|
||||
name = "Prisoner #13-001"
|
||||
registered_name = "Prisoner #13-001"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/two
|
||||
name = "Prisoner #13-002"
|
||||
registered_name = "Prisoner #13-002"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/three
|
||||
name = "Prisoner #13-003"
|
||||
registered_name = "Prisoner #13-003"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/four
|
||||
name = "Prisoner #13-004"
|
||||
registered_name = "Prisoner #13-004"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/five
|
||||
name = "Prisoner #13-005"
|
||||
registered_name = "Prisoner #13-005"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/six
|
||||
name = "Prisoner #13-006"
|
||||
registered_name = "Prisoner #13-006"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/seven
|
||||
name = "Prisoner #13-007"
|
||||
registered_name = "Prisoner #13-007"
|
||||
|
||||
/obj/item/weapon/card/id/mining
|
||||
name = "mining ID"
|
||||
access = list(GLOB.access_mining, GLOB.access_mining_station, GLOB.access_mineral_storeroom)
|
||||
|
||||
/obj/item/weapon/card/id/away
|
||||
name = "a perfectly generic identification card"
|
||||
desc = "A perfectly generic identification card. Looks like it could use some flavor."
|
||||
access = list(GLOB.access_away_general)
|
||||
|
||||
/obj/item/weapon/card/id/away/hotel
|
||||
name = "Staff ID"
|
||||
desc = "A staff ID used to access the hotel's doors."
|
||||
access = list(GLOB.access_away_general, GLOB.access_away_maint)
|
||||
|
||||
/obj/item/weapon/card/id/away/hotel/securty
|
||||
name = "Officer ID"
|
||||
access = list(GLOB.access_away_general, GLOB.access_away_maint, GLOB.access_away_sec)
|
||||
|
||||
/obj/item/weapon/card/id/away/old
|
||||
name = "a perfectly generic identification card"
|
||||
|
||||
@@ -16,22 +16,16 @@
|
||||
|
||||
var/static/regex/standard_station_regex
|
||||
|
||||
/obj/item/weapon/station_charter/New()
|
||||
/obj/item/weapon/station_charter/Initialize()
|
||||
. = ..()
|
||||
if(!standard_station_regex)
|
||||
var/prefixes = jointext(GLOB.station_prefixes, "|")
|
||||
var/names = jointext(GLOB.station_names, "|")
|
||||
var/suffixes = jointext(GLOB.station_suffixes, "|")
|
||||
var/numerals = jointext(GLOB.station_numerals, "|")
|
||||
var/regexstr = "(([prefixes]) )?(([names]) ?)([suffixes]) ([numerals])"
|
||||
var/regexstr = "^(([prefixes]) )?(([names]) ?)([suffixes]) ([numerals])$"
|
||||
standard_station_regex = new(regexstr)
|
||||
|
||||
/obj/item/weapon/station_charter/Destroy()
|
||||
if(response_timer_id)
|
||||
deltimer(response_timer_id)
|
||||
response_timer_id = null
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/station_charter/attack_self(mob/living/user)
|
||||
if(used)
|
||||
to_chat(user, "The [name_type] has already been named.")
|
||||
@@ -48,6 +42,10 @@
|
||||
rejected by your employers, while names using the standard format, \
|
||||
will automatically be accepted.", max_length=MAX_CHARTER_LEN)
|
||||
|
||||
if(response_timer_id)
|
||||
to_chat(user, "You're still waiting for approval from your employers about your proposed name change, it'd be best to wait for now.")
|
||||
return
|
||||
|
||||
if(!new_name)
|
||||
return
|
||||
log_game("[key_name(user)] has proposed to name the station as \
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
qdel(captured)
|
||||
qdel(src)
|
||||
else
|
||||
captured.Paralyse(4)
|
||||
captured.Unconscious(80)
|
||||
if(captured.loc != src)
|
||||
captured.loc = src
|
||||
update_icon()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,170 +1,170 @@
|
||||
/* Clown Items
|
||||
* Contains:
|
||||
* Soap
|
||||
* Bike Horns
|
||||
* Air Horns
|
||||
*/
|
||||
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
|
||||
/obj/item/weapon/soap
|
||||
name = "soap"
|
||||
desc = "A cheap bar of soap. Doesn't smell."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "soap"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
flags = NOBLUDGEON
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
/* Clown Items
|
||||
* Contains:
|
||||
* Soap
|
||||
* Bike Horns
|
||||
* Air Horns
|
||||
*/
|
||||
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
|
||||
/obj/item/weapon/soap
|
||||
name = "soap"
|
||||
desc = "A cheap bar of soap. Doesn't smell."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "soap"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
flags = NOBLUDGEON
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
force_string = "robust... against germs"
|
||||
|
||||
/obj/item/weapon/soap/nanotrasen
|
||||
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
|
||||
icon_state = "soapnt"
|
||||
|
||||
/obj/item/weapon/soap/homemade
|
||||
desc = "A homemade bar of soap. Smells of... well...."
|
||||
icon_state = "soapgibs"
|
||||
cleanspeed = 45 // a little faster to reward chemists for going to the effort
|
||||
|
||||
/obj/item/weapon/soap/deluxe
|
||||
desc = "A deluxe Waffle Co. brand bar of soap. Smells of high-class luxury."
|
||||
icon_state = "soapdeluxe"
|
||||
cleanspeed = 40 //same speed as mop because deluxe -- captain gets one of these
|
||||
|
||||
/obj/item/weapon/soap/syndie
|
||||
desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster."
|
||||
icon_state = "soapsyndie"
|
||||
cleanspeed = 10 //much faster than mop so it is useful for traitors who want to clean crime scenes
|
||||
|
||||
/obj/item/weapon/soap/suicide_act(mob/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!")
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/soap/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(4, 2, src)
|
||||
|
||||
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity || !check_allowed_items(target))
|
||||
return
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
|
||||
if(user.client && (target in user.client.screen))
|
||||
to_chat(user, "<span class='warning'>You need to take that [target.name] off before cleaning it!</span>")
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
user.visible_message("[user] begins to scrub \the [target.name] out with [src].", "<span class='warning'>You begin to scrub \the [target.name] out with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
|
||||
qdel(target)
|
||||
else if(ishuman(target) && user.zone_selected == "mouth")
|
||||
var/mob/living/carbon/human/H = user
|
||||
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
|
||||
H.lip_style = null //removes lipstick
|
||||
H.update_body()
|
||||
return
|
||||
else if(istype(target, /obj/structure/window))
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.set_opacity(initial(target.opacity))
|
||||
else
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
var/obj/effect/decal/cleanable/C = locate() in target
|
||||
qdel(C)
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.clean_blood()
|
||||
target.wash_cream()
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Bike Horns
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/weapon/bikehorn
|
||||
name = "bike horn"
|
||||
desc = "A horn off of a bicycle."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "bike_horn"
|
||||
item_state = "bike_horn"
|
||||
throwforce = 0
|
||||
hitsound = null //To prevent tap.ogg playing, as the item lacks of force
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
attack_verb = list("HONKED")
|
||||
|
||||
/obj/item/weapon/soap/nanotrasen
|
||||
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
|
||||
icon_state = "soapnt"
|
||||
|
||||
/obj/item/weapon/soap/homemade
|
||||
desc = "A homemade bar of soap. Smells of... well...."
|
||||
icon_state = "soapgibs"
|
||||
cleanspeed = 45 // a little faster to reward chemists for going to the effort
|
||||
|
||||
/obj/item/weapon/soap/deluxe
|
||||
desc = "A deluxe Waffle Co. brand bar of soap. Smells of high-class luxury."
|
||||
icon_state = "soapdeluxe"
|
||||
cleanspeed = 40 //same speed as mop because deluxe -- captain gets one of these
|
||||
|
||||
/obj/item/weapon/soap/syndie
|
||||
desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster."
|
||||
icon_state = "soapsyndie"
|
||||
cleanspeed = 10 //much faster than mop so it is useful for traitors who want to clean crime scenes
|
||||
|
||||
/obj/item/weapon/soap/suicide_act(mob/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!")
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/soap/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(80, src)
|
||||
|
||||
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity || !check_allowed_items(target))
|
||||
return
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
|
||||
if(user.client && (target in user.client.screen))
|
||||
to_chat(user, "<span class='warning'>You need to take that [target.name] off before cleaning it!</span>")
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
user.visible_message("[user] begins to scrub \the [target.name] out with [src].", "<span class='warning'>You begin to scrub \the [target.name] out with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
|
||||
qdel(target)
|
||||
else if(ishuman(target) && user.zone_selected == "mouth")
|
||||
var/mob/living/carbon/human/H = user
|
||||
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
|
||||
H.lip_style = null //removes lipstick
|
||||
H.update_body()
|
||||
return
|
||||
else if(istype(target, /obj/structure/window))
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.set_opacity(initial(target.opacity))
|
||||
else
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
var/obj/effect/decal/cleanable/C = locate() in target
|
||||
qdel(C)
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.clean_blood()
|
||||
target.wash_cream()
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Bike Horns
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/weapon/bikehorn
|
||||
name = "bike horn"
|
||||
desc = "A horn off of a bicycle."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "bike_horn"
|
||||
item_state = "bike_horn"
|
||||
throwforce = 0
|
||||
hitsound = null //To prevent tap.ogg playing, as the item lacks of force
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
attack_verb = list("HONKED")
|
||||
var/next_usable = 0
|
||||
var/honksound = 'sound/items/bikehorn.ogg'
|
||||
var/cooldowntime = 20
|
||||
|
||||
/obj/item/weapon/bikehorn/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src.loc, honksound, 50, 1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
var/honksound = 'sound/items/bikehorn.ogg'
|
||||
var/cooldowntime = 20
|
||||
|
||||
/obj/item/weapon/bikehorn/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src.loc, honksound, 50, 1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!(next_usable > world.time))
|
||||
playsound(loc, honksound, 50, 1, -1) //plays instead of tap.ogg!
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/attack_self(mob/user)
|
||||
playsound(loc, honksound, 50, 1, -1) //plays instead of tap.ogg!
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/attack_self(mob/user)
|
||||
if(!(next_usable > world.time))
|
||||
next_usable = world.time + cooldowntime
|
||||
playsound(src.loc, honksound, 50, 1)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/bikehorn/Crossed(mob/living/L)
|
||||
if(isliving(L))
|
||||
playsound(loc, honksound, 50, 1, -1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/airhorn
|
||||
name = "air horn"
|
||||
desc = "Damn son, where'd you find this?"
|
||||
icon_state = "air_horn"
|
||||
honksound = 'sound/items/AirHorn2.ogg'
|
||||
cooldowntime = 50
|
||||
origin_tech = "materials=4;engineering=4"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden
|
||||
name = "golden bike horn"
|
||||
desc = "Golden? Clearly, it's made with bananium! Honk!"
|
||||
icon_state = "gold_horn"
|
||||
item_state = "gold_horn"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack()
|
||||
flip_mobs()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack_self(mob/user)
|
||||
flip_mobs()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
|
||||
playsound(src.loc, honksound, 50, 1)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/bikehorn/Crossed(mob/living/L)
|
||||
if(isliving(L))
|
||||
playsound(loc, honksound, 50, 1, -1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/airhorn
|
||||
name = "air horn"
|
||||
desc = "Damn son, where'd you find this?"
|
||||
icon_state = "air_horn"
|
||||
honksound = 'sound/items/airhorn2.ogg'
|
||||
cooldowntime = 50
|
||||
origin_tech = "materials=4;engineering=4"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden
|
||||
name = "golden bike horn"
|
||||
desc = "Golden? Clearly, it's made with bananium! Honk!"
|
||||
icon_state = "gold_horn"
|
||||
item_state = "gold_horn"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack()
|
||||
flip_mobs()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack_self(mob/user)
|
||||
flip_mobs()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
|
||||
if(!(next_usable > world.time))
|
||||
var/turf/T = get_turf(src)
|
||||
for(M in ohearers(7, T))
|
||||
var/turf/T = get_turf(src)
|
||||
for(M in ohearers(7, T))
|
||||
if(ishuman(M) && M.can_hear())
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
|
||||
continue
|
||||
M.emote("flip")
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/canned_laughter
|
||||
name = "Canned Laughter"
|
||||
desc = "Just looking at this makes you want to giggle."
|
||||
icon_state = "laughter"
|
||||
list_reagents = list("laughter" = 50)
|
||||
continue
|
||||
M.emote("flip")
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/canned_laughter
|
||||
name = "Canned Laughter"
|
||||
desc = "Just looking at this makes you want to giggle."
|
||||
icon_state = "laughter"
|
||||
list_reagents = list("laughter" = 50)
|
||||
|
||||
@@ -1,186 +1,186 @@
|
||||
/obj/item/weapon/lipstick
|
||||
gender = PLURAL
|
||||
name = "red lipstick"
|
||||
desc = "A generic brand of lipstick."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "lipstick"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/colour = "red"
|
||||
var/open = 0
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/purple
|
||||
name = "purple lipstick"
|
||||
colour = "purple"
|
||||
|
||||
/obj/item/weapon/lipstick/jade
|
||||
//It's still called Jade, but theres no HTML color for jade, so we use lime.
|
||||
name = "jade lipstick"
|
||||
colour = "lime"
|
||||
|
||||
/obj/item/weapon/lipstick/black
|
||||
name = "black lipstick"
|
||||
colour = "black"
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/random
|
||||
name = "lipstick"
|
||||
|
||||
/obj/item/weapon/lipstick/random/New()
|
||||
..()
|
||||
colour = pick("red","purple","lime","black","green","blue","white")
|
||||
name = "[colour] lipstick"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/attack_self(mob/user)
|
||||
cut_overlays()
|
||||
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
||||
open = !open
|
||||
if(open)
|
||||
/obj/item/weapon/lipstick
|
||||
gender = PLURAL
|
||||
name = "red lipstick"
|
||||
desc = "A generic brand of lipstick."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "lipstick"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/colour = "red"
|
||||
var/open = 0
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/purple
|
||||
name = "purple lipstick"
|
||||
colour = "purple"
|
||||
|
||||
/obj/item/weapon/lipstick/jade
|
||||
//It's still called Jade, but theres no HTML color for jade, so we use lime.
|
||||
name = "jade lipstick"
|
||||
colour = "lime"
|
||||
|
||||
/obj/item/weapon/lipstick/black
|
||||
name = "black lipstick"
|
||||
colour = "black"
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/random
|
||||
name = "lipstick"
|
||||
|
||||
/obj/item/weapon/lipstick/random/New()
|
||||
..()
|
||||
colour = pick("red","purple","lime","black","green","blue","white")
|
||||
name = "[colour] lipstick"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/attack_self(mob/user)
|
||||
cut_overlays()
|
||||
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
||||
open = !open
|
||||
if(open)
|
||||
var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color")
|
||||
colored_overlay.color = colour
|
||||
icon_state = "lipstick_uncap"
|
||||
icon_state = "lipstick_uncap"
|
||||
add_overlay(colored_overlay)
|
||||
else
|
||||
icon_state = "lipstick"
|
||||
|
||||
/obj/item/weapon/lipstick/attack(mob/M, mob/user)
|
||||
if(!open)
|
||||
return
|
||||
|
||||
if(!istype(M, /mob))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.is_mouth_covered())
|
||||
to_chat(user, "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>")
|
||||
return
|
||||
if(H.lip_style) //if they already have lipstick on
|
||||
to_chat(user, "<span class='warning'>You need to wipe off the old lipstick first!</span>")
|
||||
return
|
||||
if(H == user)
|
||||
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
|
||||
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to apply \the [src] on [H]'s lips...</span>")
|
||||
if(do_after(user, 20, target = H))
|
||||
user.visible_message("[user] does [H]'s lips with \the [src].", \
|
||||
"<span class='notice'>You apply \the [src] on [H]'s lips.</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Where are the lips on that?</span>")
|
||||
|
||||
//you can wipe off lipstick with paper!
|
||||
/obj/item/weapon/paper/attack(mob/M, mob/user)
|
||||
if(user.zone_selected == "mouth")
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H == user)
|
||||
to_chat(user, "<span class='notice'>You wipe off the lipstick with [src].</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to wipe off [H]'s lipstick...</span>")
|
||||
if(do_after(user, 10, target = H))
|
||||
user.visible_message("[user] wipes [H]'s lipstick off with \the [src].", \
|
||||
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/razor
|
||||
name = "electric razor"
|
||||
desc = "The latest and greatest power razor born from the science of shaving."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "razor"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
|
||||
/obj/item/weapon/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
|
||||
if(location == "mouth")
|
||||
H.facial_hair_style = "Shaved"
|
||||
else
|
||||
H.hair_style = "Skinhead"
|
||||
|
||||
H.update_hair()
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 20, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/razor/attack(mob/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/location = user.zone_selected
|
||||
if(location == "mouth")
|
||||
if(!(FACEHAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
|
||||
return
|
||||
if(H.facial_hair_style == "Shaved")
|
||||
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("[user] starts to shave their facial hair with [src].", \
|
||||
"<span class='notice'>You take a moment to shave your facial hair with [src]...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
user.visible_message("[user] shaves his facial hair clean with [src].", \
|
||||
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
var/turf/H_loc = H.loc
|
||||
user.visible_message("<span class='warning'>[user] tries to shave [H]'s facial hair with [src].</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s facial hair...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
if(H_loc == H.loc)
|
||||
user.visible_message("<span class='warning'>[user] shaves off [H]'s facial hair with [src].</span>", \
|
||||
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
|
||||
shave(H, location)
|
||||
|
||||
else if(location == "head")
|
||||
if(!(HAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
|
||||
return
|
||||
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
|
||||
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("[user] starts to shave their head with [src].", \
|
||||
"<span class='notice'>You start to shave your head with [src]...</span>")
|
||||
if(do_after(user, 5, target = H))
|
||||
user.visible_message("[user] shaves his head with [src].", \
|
||||
"<span class='notice'>You finish shaving with [src].</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
var/turf/H_loc = H.loc
|
||||
user.visible_message("<span class='warning'>[user] tries to shave [H]'s head with [src]!</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s head...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
if(H_loc == H.loc)
|
||||
user.visible_message("<span class='warning'>[user] shaves [H]'s head bald with [src]!</span>", \
|
||||
"<span class='notice'>You shave [H]'s head bald.</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
..()
|
||||
else
|
||||
else
|
||||
icon_state = "lipstick"
|
||||
|
||||
/obj/item/weapon/lipstick/attack(mob/M, mob/user)
|
||||
if(!open)
|
||||
return
|
||||
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.is_mouth_covered())
|
||||
to_chat(user, "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>")
|
||||
return
|
||||
if(H.lip_style) //if they already have lipstick on
|
||||
to_chat(user, "<span class='warning'>You need to wipe off the old lipstick first!</span>")
|
||||
return
|
||||
if(H == user)
|
||||
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
|
||||
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to apply \the [src] on [H]'s lips...</span>")
|
||||
if(do_after(user, 20, target = H))
|
||||
user.visible_message("[user] does [H]'s lips with \the [src].", \
|
||||
"<span class='notice'>You apply \the [src] on [H]'s lips.</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Where are the lips on that?</span>")
|
||||
|
||||
//you can wipe off lipstick with paper!
|
||||
/obj/item/weapon/paper/attack(mob/M, mob/user)
|
||||
if(user.zone_selected == "mouth")
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H == user)
|
||||
to_chat(user, "<span class='notice'>You wipe off the lipstick with [src].</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to wipe off [H]'s lipstick...</span>")
|
||||
if(do_after(user, 10, target = H))
|
||||
user.visible_message("[user] wipes [H]'s lipstick off with \the [src].", \
|
||||
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/razor
|
||||
name = "electric razor"
|
||||
desc = "The latest and greatest power razor born from the science of shaving."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "razor"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
|
||||
/obj/item/weapon/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
|
||||
if(location == "mouth")
|
||||
H.facial_hair_style = "Shaved"
|
||||
else
|
||||
H.hair_style = "Skinhead"
|
||||
|
||||
H.update_hair()
|
||||
playsound(loc, 'sound/items/welder2.ogg', 20, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/razor/attack(mob/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/location = user.zone_selected
|
||||
if(location == "mouth")
|
||||
if(!(FACEHAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
|
||||
return
|
||||
if(H.facial_hair_style == "Shaved")
|
||||
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("[user] starts to shave their facial hair with [src].", \
|
||||
"<span class='notice'>You take a moment to shave your facial hair with [src]...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
user.visible_message("[user] shaves his facial hair clean with [src].", \
|
||||
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
var/turf/H_loc = H.loc
|
||||
user.visible_message("<span class='warning'>[user] tries to shave [H]'s facial hair with [src].</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s facial hair...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
if(H_loc == H.loc)
|
||||
user.visible_message("<span class='warning'>[user] shaves off [H]'s facial hair with [src].</span>", \
|
||||
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
|
||||
shave(H, location)
|
||||
|
||||
else if(location == "head")
|
||||
if(!(HAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
|
||||
return
|
||||
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
|
||||
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("[user] starts to shave their head with [src].", \
|
||||
"<span class='notice'>You start to shave your head with [src]...</span>")
|
||||
if(do_after(user, 5, target = H))
|
||||
user.visible_message("[user] shaves his head with [src].", \
|
||||
"<span class='notice'>You finish shaving with [src].</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
var/turf/H_loc = H.loc
|
||||
user.visible_message("<span class='warning'>[user] tries to shave [H]'s head with [src]!</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s head...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
if(H_loc == H.loc)
|
||||
user.visible_message("<span class='warning'>[user] shaves [H]'s head bald with [src]!</span>", \
|
||||
"<span class='notice'>You shave [H]'s head bald.</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
@@ -23,15 +23,15 @@
|
||||
var/combat = 0 //can we revive through space suits?
|
||||
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
|
||||
|
||||
/obj/item/weapon/defibrillator/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/weapon/defibrillator/Initialize() //starts without a cell for rnd
|
||||
. = ..()
|
||||
paddles = make_paddles()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/defibrillator/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/weapon/defibrillator/loaded/Initialize() //starts with hicap
|
||||
. = ..()
|
||||
paddles = make_paddles()
|
||||
@@ -123,7 +123,7 @@
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.loc = get_turf(src.loc)
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
update_icon()
|
||||
@@ -400,7 +400,7 @@
|
||||
M.visible_message("<span class='danger'>[user] has touched [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has touched [M] with [src]!</span>")
|
||||
M.adjustStaminaLoss(50)
|
||||
M.Weaken(5)
|
||||
M.Knockdown(100)
|
||||
M.updatehealth() //forces health update before next life tick
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
M.emote("gasp")
|
||||
@@ -446,7 +446,7 @@
|
||||
return
|
||||
user.visible_message("<span class='boldannounce'><i>[user] shocks [H] with \the [src]!</span>", "<span class='warning'>You shock [H] with \the [src]!</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 100, 1, -1)
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 100, 1, -1)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 100, 1, -1)
|
||||
H.emote("scream")
|
||||
if(H.can_heartattack() && !H.undergoing_cardiac_arrest())
|
||||
if(!H.stat)
|
||||
@@ -455,7 +455,7 @@
|
||||
H.set_heartattack(TRUE)
|
||||
H.apply_damage(50, BURN, "chest")
|
||||
add_logs(user, H, "overloaded the heart of", defib)
|
||||
H.Weaken(5)
|
||||
H.Knockdown(100)
|
||||
H.Jitter(100)
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
return 0
|
||||
to_chat(H, "<span class='userdanger'>You step on the D4!</span>")
|
||||
H.apply_damage(4,BRUTE,(pick("l_leg", "r_leg")))
|
||||
H.Weaken(3)
|
||||
H.Knockdown(60)
|
||||
|
||||
/obj/item/weapon/dice/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
@@ -1,368 +1,368 @@
|
||||
/obj/item/weapon/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "dnainjector"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/weapon/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
/obj/item/weapon/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "dnainjector"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/weapon/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/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."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/weapon/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/weapon/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/weapon/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/weapon/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/weapon/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/weapon/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/weapon/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/weapon/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/weapon/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/weapon/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/weapon/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/weapon/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/weapon/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/weapon/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/weapon/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/weapon/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/weapon/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/weapon/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/weapon/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/weapon/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/weapon/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/weapon/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/weapon/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/weapon/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/weapon/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/weapon/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/weapon/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/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."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/weapon/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/weapon/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/weapon/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/weapon/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/weapon/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/weapon/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/weapon/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/weapon/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/weapon/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/weapon/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/weapon/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/weapon/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/weapon/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/weapon/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/weapon/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/weapon/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/weapon/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/weapon/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/weapon/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/weapon/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/weapon/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/weapon/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/weapon/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/weapon/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/weapon/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/weapon/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/weapon/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
else
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
@@ -232,8 +232,8 @@
|
||||
/obj/item/weapon/flamethrower/full/tank
|
||||
create_with_tank = TRUE
|
||||
|
||||
/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type, atom/movable/AM)
|
||||
var/obj/item/projectile/P = AM
|
||||
/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/item/projectile/P = hitby
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
|
||||
var/target_turf = get_turf(owner)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,13 +27,11 @@
|
||||
|
||||
//Flash
|
||||
if(M.flash_act(affect_silicon = 1))
|
||||
M.Stun(max(10/max(1,distance), 3))
|
||||
M.Weaken(max(10/max(1,distance), 3))
|
||||
M.Knockdown(max(100/max(1,distance), 3))
|
||||
//Bang
|
||||
if(!distance || loc == M || loc == M.loc) //Stop allahu akbarring rooms with this.
|
||||
M.Stun(10)
|
||||
M.Weaken(10)
|
||||
M.soundbang_act(1, 10, 10, 15)
|
||||
M.Knockdown(200)
|
||||
M.soundbang_act(1, 200, 10, 15)
|
||||
|
||||
else
|
||||
M.soundbang_act(1, max(10/max(1,distance), 3), rand(0, 5))
|
||||
M.soundbang_act(1, max(20/max(1,distance), 3), rand(0, 5))
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
//improvised explosives//
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing
|
||||
name = "improvised firebomb"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
active = 0
|
||||
det_time = 50
|
||||
display_timer = 0
|
||||
var/range = 3
|
||||
//improvised explosives//
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing
|
||||
name = "improvised firebomb"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
active = 0
|
||||
det_time = 50
|
||||
display_timer = 0
|
||||
var/range = 3
|
||||
var/list/times
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/Initialize()
|
||||
. = ..()
|
||||
add_overlay("improvised_grenade_filled")
|
||||
add_overlay("improvised_grenade_wired")
|
||||
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20)// "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
|
||||
det_time = text2num(pickweight(times))
|
||||
if(det_time < 0) //checking for 'duds'
|
||||
range = 1
|
||||
det_time = rand(30,80)
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/soda_cans/can = locate() in contents
|
||||
if(can)
|
||||
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20)// "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
|
||||
det_time = text2num(pickweight(times))
|
||||
if(det_time < 0) //checking for 'duds'
|
||||
range = 1
|
||||
det_time = rand(30,80)
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/soda_cans/can = locate() in contents
|
||||
if(can)
|
||||
can.pixel_x = 0 //Reset the sprite's position to make it consistent with the rest of the IED
|
||||
can.pixel_y = 0
|
||||
var/mutable_appearance/can_underlay = new(can)
|
||||
can_underlay.layer = FLOAT_LAYER
|
||||
can_underlay.plane = FLOAT_PLANE
|
||||
underlays += can_underlay
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
active = TRUE
|
||||
cut_overlay("improvised_grenade_filled")
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
explosion(src.loc,-1,-1,2, flame_range = 4) // small explosion, plus a very large fireball.
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "You can't tell when it will explode!")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "You can't tell when it will explode!")
|
||||
|
||||
@@ -1,112 +1,112 @@
|
||||
/obj/item/weapon/grenade
|
||||
name = "grenade"
|
||||
desc = "It has an adjustable timer."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
resistance_flags = FLAMMABLE
|
||||
obj_integrity = 40
|
||||
max_integrity = 40
|
||||
var/active = 0
|
||||
var/det_time = 50
|
||||
var/display_timer = 1
|
||||
|
||||
/obj/item/weapon/grenade/deconstruct(disassembled = TRUE)
|
||||
if(!disassembled)
|
||||
prime()
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
spawn(5)
|
||||
if(user)
|
||||
user.drop_item()
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/examine(mob/user)
|
||||
..()
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
to_chat(user, "The timer is set to [det_time/10] second\s.")
|
||||
else
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
preprime(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
/obj/item/weapon/grenade/proc/preprime(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = TRUE
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
if(user)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/proc/prime()
|
||||
|
||||
/obj/item/weapon/grenade/proc/update_mob()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.dropItemToGround(src)
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/grenade/attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/grenade/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type, atom/movable/AM)
|
||||
var/obj/item/projectile/P = AM
|
||||
/obj/item/weapon/grenade
|
||||
name = "grenade"
|
||||
desc = "It has an adjustable timer."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
resistance_flags = FLAMMABLE
|
||||
obj_integrity = 40
|
||||
max_integrity = 40
|
||||
var/active = 0
|
||||
var/det_time = 50
|
||||
var/display_timer = 1
|
||||
|
||||
/obj/item/weapon/grenade/deconstruct(disassembled = TRUE)
|
||||
if(!disassembled)
|
||||
prime()
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
spawn(5)
|
||||
if(user)
|
||||
user.drop_item()
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/examine(mob/user)
|
||||
..()
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
to_chat(user, "The timer is set to [det_time/10] second\s.")
|
||||
else
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
preprime(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
/obj/item/weapon/grenade/proc/preprime(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = TRUE
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
if(user)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/proc/prime()
|
||||
|
||||
/obj/item/weapon/grenade/proc/update_mob()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.dropItemToGround(src)
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/grenade/attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/grenade/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/item/projectile/P = hitby
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
prime()
|
||||
return 1 //It hit the grenade, not them
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
prime()
|
||||
return 1 //It hit the grenade, not them
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
else
|
||||
explosion(location, boom_sizes[1], boom_sizes[2], boom_sizes[3])
|
||||
location.ex_act(2, target)
|
||||
if(istype(target, /mob))
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
/obj/item/weapon/grenade/syndieminibomb
|
||||
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
|
||||
name = "syndicate minibomb"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "syndicate"
|
||||
item_state = "flashbang"
|
||||
origin_tech = "materials=3;magnets=4;syndicate=3"
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/prime()
|
||||
update_mob()
|
||||
/obj/item/weapon/grenade/syndieminibomb
|
||||
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
|
||||
name = "syndicate minibomb"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "syndicate"
|
||||
item_state = "flashbang"
|
||||
origin_tech = "materials=3;magnets=4;syndicate=3"
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/prime()
|
||||
update_mob()
|
||||
explosion(src.loc,1,2,4,flame_range = 2)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion
|
||||
name = "HE Grenade"
|
||||
desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction."
|
||||
icon_state = "concussion"
|
||||
origin_tech = "materials=3;magnets=4;syndicate=2"
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion/prime()
|
||||
update_mob()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion
|
||||
name = "HE Grenade"
|
||||
desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction."
|
||||
icon_state = "concussion"
|
||||
origin_tech = "materials=3;magnets=4;syndicate=2"
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion/prime()
|
||||
update_mob()
|
||||
explosion(src.loc,0,2,3,flame_range = 3)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion/frag
|
||||
name = "frag grenade"
|
||||
desc = "Fire in the hole."
|
||||
icon_state = "frag"
|
||||
|
||||
/obj/item/weapon/grenade/gluon
|
||||
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
|
||||
name = "gluon frag grenade"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "bluefrag"
|
||||
item_state = "flashbang"
|
||||
var/freeze_range = 4
|
||||
var/rad_damage = 35
|
||||
var/stamina_damage = 30
|
||||
|
||||
/obj/item/weapon/grenade/gluon/prime()
|
||||
update_mob()
|
||||
playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1)
|
||||
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
|
||||
for(var/turf/T in view(freeze_range,loc))
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
F.wet = TURF_WET_PERMAFROST
|
||||
addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100))
|
||||
for(var/mob/living/carbon/L in T)
|
||||
L.adjustStaminaLoss(stamina_damage)
|
||||
L.bodytemperature -= 230
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion/frag
|
||||
name = "frag grenade"
|
||||
desc = "Fire in the hole."
|
||||
icon_state = "frag"
|
||||
|
||||
/obj/item/weapon/grenade/gluon
|
||||
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
|
||||
name = "gluon frag grenade"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "bluefrag"
|
||||
item_state = "flashbang"
|
||||
var/freeze_range = 4
|
||||
var/rad_damage = 35
|
||||
var/stamina_damage = 30
|
||||
|
||||
/obj/item/weapon/grenade/gluon/prime()
|
||||
update_mob()
|
||||
playsound(loc, 'sound/effects/empulse.ogg', 50, 1)
|
||||
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
|
||||
for(var/turf/T in view(freeze_range,loc))
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
F.wet = TURF_WET_PERMAFROST
|
||||
addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100))
|
||||
for(var/mob/living/carbon/L in T)
|
||||
L.adjustStaminaLoss(stamina_damage)
|
||||
L.bodytemperature -= 230
|
||||
qdel(src)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return
|
||||
|
||||
// chance of monkey retaliation
|
||||
if(istype(C, /mob/living/carbon/monkey) && prob(MONKEY_CUFF_RETALIATION_PROB))
|
||||
if(ismonkey(C) && prob(MONKEY_CUFF_RETALIATION_PROB))
|
||||
var/mob/living/carbon/monkey/M
|
||||
M = C
|
||||
M.retaliate(user)
|
||||
@@ -303,7 +303,7 @@
|
||||
addtimer(CALLBACK(src, .proc/dissipate), 100)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate()
|
||||
if(!istype(loc, /mob))
|
||||
if(!ismob(loc))
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
breakouttime = 35//easy to apply, easy to break out of
|
||||
gender = NEUTER
|
||||
origin_tech = "engineering=3;combat=1"
|
||||
var/weaken = 0
|
||||
var/knockdown = 0
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/bola/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
if(!..())
|
||||
@@ -338,7 +338,7 @@
|
||||
C.update_inv_legcuffed()
|
||||
SSblackbox.add_details("handcuffs","[type]")
|
||||
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
|
||||
C.Weaken(weaken)
|
||||
C.Knockdown(knockdown)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/bola/tactical//traitor variant
|
||||
name = "reinforced bola"
|
||||
@@ -346,7 +346,7 @@
|
||||
icon_state = "bola_r"
|
||||
breakouttime = 70
|
||||
origin_tech = "engineering=4;combat=3"
|
||||
weaken = 1
|
||||
knockdown = 20
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/bola/energy //For Security
|
||||
name = "energy bola"
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
master.emote("scream")
|
||||
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
|
||||
flags &= ~NODROP
|
||||
master.Weaken(3)
|
||||
master.Knockdown(60)
|
||||
master.adjustBruteLoss(master.maxHealth)
|
||||
playsound(master, 'sound/effects/splat.ogg', 100, 0)
|
||||
else
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //Don't bring a sword to a gunfight
|
||||
return ..()
|
||||
|
||||
@@ -68,18 +68,18 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implant/explosive/proc/timed_explosion()
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] starts beeping ominously!</span>")
|
||||
imp_in.visible_message("<span class='warning'>[imp_in] starts beeping ominously!</span>")
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(delay*0.25)
|
||||
if(imp_in && !imp_in.stat)
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
|
||||
imp_in.Weaken(7)
|
||||
imp_in.visible_message("<span class='warning'>[imp_in] doubles over in pain!</span>")
|
||||
imp_in.Knockdown(140)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(delay*0.25)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(delay*0.25)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(delay*0.25)
|
||||
explosion(src,heavy,medium,weak,weak, flame_range = weak)
|
||||
if(imp_in)
|
||||
imp_in.gib(1)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/item/weapon/implant/adrenalin
|
||||
name = "adrenal implant"
|
||||
desc = "Removes all stuns and knockdowns."
|
||||
desc = "Removes all stuns."
|
||||
icon_state = "adrenal"
|
||||
origin_tech = "materials=2;biotech=4;combat=3;syndicate=4"
|
||||
uses = 3
|
||||
@@ -35,9 +35,9 @@
|
||||
/obj/item/weapon/implant/adrenalin/activate()
|
||||
uses--
|
||||
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
|
||||
imp_in.SetStunned(0)
|
||||
imp_in.SetWeakened(0)
|
||||
imp_in.SetParalysis(0)
|
||||
imp_in.SetStun(0)
|
||||
imp_in.SetKnockdown(0)
|
||||
imp_in.SetUnconscious(0)
|
||||
imp_in.adjustStaminaLoss(-75)
|
||||
imp_in.lying = 0
|
||||
imp_in.update_canmove()
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
/obj/item/weapon/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
origin_tech = imp.origin_tech
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
origin_tech = initial(origin_tech)
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
/obj/item/weapon/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
origin_tech = imp.origin_tech
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
origin_tech = initial(origin_tech)
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
M.visible_message("<span class='warning'>[user] is attempting to implant [M].</span>")
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_mob(user, M, 50)))
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implanter/Initialize(mapload)
|
||||
..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
imp_type = /obj/item/weapon/implant/adrenalin
|
||||
|
||||
/obj/item/weapon/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
imp_type = /obj/item/weapon/implant/emp
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_mob(user, M, 50)))
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implanter/Initialize(mapload)
|
||||
..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
imp_type = /obj/item/weapon/implant/adrenalin
|
||||
|
||||
/obj/item/weapon/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
imp_type = /obj/item/weapon/implant/emp
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
|
||||
usr.set_machine(src)
|
||||
|
||||
if(istype(loc, /mob))
|
||||
if(ismob(loc))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/item/weapon/inducer/emp_act(severity)
|
||||
..()
|
||||
if(cell)
|
||||
cell.emp_act()
|
||||
cell.emp_act(severity)
|
||||
|
||||
/obj/item/weapon/inducer/attack_obj(obj/O, mob/living/carbon/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
|
||||
@@ -1,160 +1,160 @@
|
||||
/* Kitchen tools
|
||||
* Contains:
|
||||
* Fork
|
||||
* Kitchen knives
|
||||
* Ritual Knife
|
||||
* Butcher's cleaver
|
||||
* Combat Knife
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/weapon/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/weapon/kitchen/fork
|
||||
name = "fork"
|
||||
desc = "Pointy."
|
||||
icon_state = "fork"
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=80)
|
||||
flags = CONDUCT
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
var/datum/reagent/forkload //used to eat omelette
|
||||
|
||||
/obj/item/weapon/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(forkload)
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] eats a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
else
|
||||
M.visible_message("<span class='notice'>[user] feeds [M] a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
icon_state = "fork"
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/kitchen/knife
|
||||
name = "kitchen knife"
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
flags = CONDUCT
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
materials = list(MAT_METAL=12000)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
/* Kitchen tools
|
||||
* Contains:
|
||||
* Fork
|
||||
* Kitchen knives
|
||||
* Ritual Knife
|
||||
* Butcher's cleaver
|
||||
* Combat Knife
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/weapon/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/weapon/kitchen/fork
|
||||
name = "fork"
|
||||
desc = "Pointy."
|
||||
icon_state = "fork"
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=80)
|
||||
flags = CONDUCT
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
var/datum/reagent/forkload //used to eat omelette
|
||||
|
||||
/obj/item/weapon/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(forkload)
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] eats a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
else
|
||||
M.visible_message("<span class='notice'>[user] feeds [M] a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
icon_state = "fork"
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/kitchen/knife
|
||||
name = "kitchen knife"
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
flags = CONDUCT
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
materials = list(MAT_METAL=12000)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
var/bayonet = FALSE //Can this be attached to a gun?
|
||||
|
||||
/obj/item/weapon/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/kitchen/knife/suicide_act(mob/user)
|
||||
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [src.name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/kitchen/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"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/kitchen/knife/butcher
|
||||
name = "butcher's cleaver"
|
||||
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
|
||||
throwforce = 10
|
||||
materials = list(MAT_METAL=18000)
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat
|
||||
name = "combat knife"
|
||||
icon_state = "buckknife"
|
||||
item_state = "knife"
|
||||
desc = "A military combat utility survival knife."
|
||||
force = 20
|
||||
throwforce = 20
|
||||
origin_tech = "materials=3;combat=4"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
|
||||
|
||||
/obj/item/weapon/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/kitchen/knife/suicide_act(mob/user)
|
||||
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [src.name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/kitchen/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"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/kitchen/knife/butcher
|
||||
name = "butcher's cleaver"
|
||||
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
|
||||
throwforce = 10
|
||||
materials = list(MAT_METAL=18000)
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat
|
||||
name = "combat knife"
|
||||
icon_state = "buckknife"
|
||||
item_state = "knife"
|
||||
desc = "A military combat utility survival knife."
|
||||
force = 20
|
||||
throwforce = 20
|
||||
origin_tech = "materials=3;combat=4"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
|
||||
bayonet = TRUE
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/survival
|
||||
name = "survival knife"
|
||||
icon_state = "survivalknife"
|
||||
desc = "A hunting grade survival knife."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/survival
|
||||
name = "survival knife"
|
||||
icon_state = "survivalknife"
|
||||
desc = "A hunting grade survival knife."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
bayonet = TRUE
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/bone
|
||||
name = "bone dagger"
|
||||
item_state = "bone_dagger"
|
||||
icon_state = "bone_dagger"
|
||||
desc = "A sharpened bone. The bare mimimum in survival."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
materials = list()
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/cyborg
|
||||
name = "cyborg knife"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable."
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/weapon/kitchen/knife/carrotshiv
|
||||
name = "carrot shiv"
|
||||
icon_state = "carrotshiv"
|
||||
item_state = "carrotshiv"
|
||||
desc = "Unlike other carrots, you should probably keep this far away from your eyes."
|
||||
force = 8
|
||||
throwforce = 12//fuck git
|
||||
materials = list()
|
||||
origin_tech = "biotech=3;combat=2"
|
||||
attack_verb = list("shanked", "shivved")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/weapon/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
force = 8
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/* Trays moved to /obj/item/weapon/storage/bag */
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/bone
|
||||
name = "bone dagger"
|
||||
item_state = "bone_dagger"
|
||||
icon_state = "bone_dagger"
|
||||
desc = "A sharpened bone. The bare mimimum in survival."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
materials = list()
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/cyborg
|
||||
name = "cyborg knife"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable."
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/weapon/kitchen/knife/carrotshiv
|
||||
name = "carrot shiv"
|
||||
icon_state = "carrotshiv"
|
||||
item_state = "carrotshiv"
|
||||
desc = "Unlike other carrots, you should probably keep this far away from your eyes."
|
||||
force = 8
|
||||
throwforce = 12//fuck git
|
||||
materials = list()
|
||||
origin_tech = "biotech=3;combat=2"
|
||||
attack_verb = list("shanked", "shivved")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/weapon/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
force = 8
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/* Trays moved to /obj/item/weapon/storage/bag */
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
|
||||
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(active)
|
||||
return ..()
|
||||
return 0
|
||||
@@ -188,7 +188,7 @@
|
||||
icon_state = "esaw_0"
|
||||
item_color = null
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction()
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind their back!</span>",
|
||||
"<span class='userdanger'>You block the attack!</span>")
|
||||
user.Stun(2)
|
||||
user.Stun(40)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
hitsound = 'sound/weapons/rapierhit.ogg'
|
||||
materials = list(MAT_METAL = 1000)
|
||||
|
||||
/obj/item/weapon/melee/sabre/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/melee/sabre/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //Don't bring a sword to a gunfight
|
||||
return ..()
|
||||
@@ -77,14 +77,14 @@
|
||||
var/cooldown = 0
|
||||
var/on = 1
|
||||
|
||||
/obj/item/weapon/melee/classic_baton/attack(mob/target, mob/living/user)
|
||||
/obj/item/weapon/melee/classic_baton/attack(mob/living/target, mob/living/user)
|
||||
if(!on)
|
||||
return ..()
|
||||
|
||||
add_fingerprint(user)
|
||||
if((CLUMSY in user.disabilities) && prob(50))
|
||||
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
|
||||
user.Weaken(3 * force)
|
||||
user.Knockdown(60 * force)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, "head")
|
||||
@@ -105,12 +105,12 @@
|
||||
if(cooldown <= world.time)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if (H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK))
|
||||
if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
|
||||
return
|
||||
if(check_martial_counter(H, user))
|
||||
return
|
||||
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||
target.Weaken(3)
|
||||
target.Knockdown(60)
|
||||
add_logs(user, target, "stunned", src)
|
||||
src.add_fingerprint(user)
|
||||
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/obj/item/weapon/melee/transforming //TODO: make transforming energy weapons a subtype of this
|
||||
var/active = FALSE
|
||||
var/force_on = 30 //force when active
|
||||
var/throwforce_on = 20
|
||||
var/icon_state_on = "axe1"
|
||||
var/hitsound_on = 'sound/weapons/blade1.ogg'
|
||||
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
var/list/attack_verb_off = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sharpness = IS_SHARP
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
|
||||
/obj/item/weapon/melee/transforming/Initialize()
|
||||
. = ..()
|
||||
if(active)
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
else
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
|
||||
/obj/item/weapon/melee/transforming/attack_self(mob/living/carbon/user)
|
||||
if(transform_weapon(user))
|
||||
clumsy_transform_effect(user)
|
||||
|
||||
/obj/item/weapon/melee/transforming/proc/transform_weapon(mob/living/user, supress_message_text)
|
||||
active = !active
|
||||
if(active)
|
||||
force = force_on
|
||||
throwforce = throwforce_on
|
||||
hitsound = hitsound_on
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
icon_state = icon_state_on
|
||||
w_class = w_class_on
|
||||
else
|
||||
force = initial(force)
|
||||
throwforce = initial(throwforce)
|
||||
hitsound = initial(hitsound)
|
||||
throw_speed = initial(throw_speed)
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
transform_messages(user, supress_message_text)
|
||||
add_fingerprint(user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/melee/transforming/proc/transform_messages(mob/living/user, supress_message_text)
|
||||
playsound(user, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
|
||||
if(!supress_message_text)
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
|
||||
/obj/item/weapon/melee/transforming/proc/clumsy_transform_effect(mob/living/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_bodypart_damage(5,5)
|
||||
@@ -43,7 +43,6 @@
|
||||
out += "<span class='notice'>[bicon(tank)] It has \the [tank] mounted onto it.</span>"
|
||||
to_chat(user, out.Join("<br>"))
|
||||
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
@@ -70,7 +69,7 @@
|
||||
updateTank(tank, 1, user)
|
||||
else if(loadedWeightClass >= maxWeightClass)
|
||||
to_chat(user, "<span class='warning'>\The [src] can't hold any more items!</span>")
|
||||
else if(istype(W, /obj/item))
|
||||
else if(isitem(W))
|
||||
var/obj/item/IW = W
|
||||
load_item(IW, user)
|
||||
|
||||
@@ -142,7 +141,7 @@
|
||||
fire_items(T, user)
|
||||
if(pressureSetting >= 3 && user)
|
||||
user.visible_message("<span class='warning'>[user] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||
user.Weaken(3)
|
||||
user.Knockdown(60)
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
|
||||
if(fire_mode == PCANNON_FIREALL)
|
||||
@@ -224,7 +223,6 @@
|
||||
return loaded
|
||||
loaded++
|
||||
CHECK_TICK
|
||||
return loaded
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/pie
|
||||
name = "pie cannon"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shield/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == THROWN_PROJECTILE_ATTACK)
|
||||
final_block_chance += 30
|
||||
if(attack_type == LEAP_ATTACK)
|
||||
@@ -66,7 +66,7 @@
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/active = 0
|
||||
|
||||
/obj/item/weapon/shield/energy/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
|
||||
/obj/item/weapon/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/shield/energy/IsReflect()
|
||||
@@ -109,7 +109,7 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/active = 0
|
||||
|
||||
/obj/item/weapon/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
|
||||
/obj/item/weapon/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(active)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
@@ -1,114 +1,109 @@
|
||||
/obj/item/weapon/twohanded/singularityhammer
|
||||
name = "singularity hammer"
|
||||
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 20
|
||||
throwforce = 15
|
||||
throw_range = 1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/charged = 5
|
||||
origin_tech = "combat=4;bluespace=4;plasmatech=7"
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 50, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
/obj/item/weapon/twohanded/singularityhammer
|
||||
name = "singularity hammer"
|
||||
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 20
|
||||
throwforce = 15
|
||||
throw_range = 1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/charged = 5
|
||||
origin_tech = "combat=4;bluespace=4;plasmatech=7"
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 50, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
force_string = "LORD SINGULOTH HIMSELF"
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/process()
|
||||
if(charged < 5)
|
||||
charged++
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
for(var/atom/X in orange(5,pull))
|
||||
if(istype(X, /atom/movable))
|
||||
var/atom/movable/A = X
|
||||
if(A == wielder)
|
||||
continue
|
||||
if(A && !A.anchored && !ishuman(X))
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
else if(ishuman(X))
|
||||
var/mob/living/carbon/human/H = X
|
||||
if(istype(H.shoes,/obj/item/clothing/shoes/magboots))
|
||||
var/obj/item/clothing/shoes/magboots/M = H.shoes
|
||||
if(M.magpulse)
|
||||
continue
|
||||
H.apply_effect(1, WEAKEN, 0)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(wielded)
|
||||
if(charged == 5)
|
||||
charged = 0
|
||||
if(istype(A, /mob/living/))
|
||||
var/mob/living/Z = A
|
||||
Z.take_bodypart_damage(20,0)
|
||||
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
|
||||
var/turf/target = get_turf(A)
|
||||
vortex(target,user)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir
|
||||
name = "Mjolnir"
|
||||
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 25
|
||||
throwforce = 30
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
//var/charged = 5
|
||||
origin_tech = "combat=4;powerstorage=7"
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/proc/shock(mob/living/target)
|
||||
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
|
||||
s.set_up(5, 1, target.loc)
|
||||
s.start()
|
||||
target.visible_message("<span class='danger'>[target.name] was shocked by the [src.name]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock course through your body sending you flying!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack!</span>")
|
||||
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
|
||||
target.throw_at(throw_target, 200, 4)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
if(wielded)
|
||||
//if(charged == 5)
|
||||
//charged = 0
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
M.Stun(3)
|
||||
shock(M)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/throw_impact(atom/target)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.Stun(3)
|
||||
shock(L)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/process()
|
||||
if(charged < 5)
|
||||
charged++
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
for(var/atom/X in orange(5,pull))
|
||||
if(ismovableatom(X))
|
||||
var/atom/movable/A = X
|
||||
if(A == wielder)
|
||||
continue
|
||||
if(A && !A.anchored && !ishuman(X))
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
else if(ishuman(X))
|
||||
var/mob/living/carbon/human/H = X
|
||||
if(istype(H.shoes,/obj/item/clothing/shoes/magboots))
|
||||
var/obj/item/clothing/shoes/magboots/M = H.shoes
|
||||
if(M.magpulse)
|
||||
continue
|
||||
H.apply_effect(20, KNOCKDOWN, 0)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(wielded)
|
||||
if(charged == 5)
|
||||
charged = 0
|
||||
if(istype(A, /mob/living/))
|
||||
var/mob/living/Z = A
|
||||
Z.take_bodypart_damage(20,0)
|
||||
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
|
||||
var/turf/target = get_turf(A)
|
||||
vortex(target,user)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir
|
||||
name = "Mjolnir"
|
||||
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 25
|
||||
throwforce = 30
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
origin_tech = "combat=4;powerstorage=7"
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/proc/shock(mob/living/target)
|
||||
target.Stun(60)
|
||||
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
|
||||
s.set_up(5, 1, target.loc)
|
||||
s.start()
|
||||
target.visible_message("<span class='danger'>[target.name] was shocked by [src]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock course through your body sending you flying!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack!</span>")
|
||||
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
|
||||
target.throw_at(throw_target, 200, 4)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
if(wielded)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
shock(M)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/throw_impact(atom/target)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
shock(target)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,378 +1,378 @@
|
||||
/*
|
||||
* These absorb the functionality of the plant bag, ore satchel, etc.
|
||||
* They use the use_to_pickup, quick_gather, and quick_empty functions
|
||||
* that were already defined in weapon/storage, but which had been
|
||||
* re-implemented in other classes.
|
||||
*
|
||||
* Contains:
|
||||
* Trash Bag
|
||||
* Mining Satchel
|
||||
* Plant Bag
|
||||
* Sheet Snatcher
|
||||
* Book Bag
|
||||
* Biowaste Bag
|
||||
*
|
||||
* -Sayu
|
||||
*/
|
||||
|
||||
// Generic non-item
|
||||
/obj/item/weapon/storage/bag
|
||||
allow_quick_gather = 1
|
||||
allow_quick_empty = 1
|
||||
display_contents_with_number = 1 // should work fine now
|
||||
use_to_pickup = 1
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
// -----------------------------
|
||||
// Trash bag
|
||||
// -----------------------------
|
||||
/obj/item/weapon/storage/bag/trash
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 30
|
||||
storage_slots = 30
|
||||
can_hold = list() // any
|
||||
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else icon_state = "[initial(icon_state)]3"
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/bluespace
|
||||
name = "trash bag of holding"
|
||||
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
|
||||
icon_state = "bluetrashbag"
|
||||
origin_tech = "materials=4;bluespace=4;engineering=4;plasmatech=3"
|
||||
max_combined_w_class = 60
|
||||
storage_slots = 60
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/ore
|
||||
name = "mining satchel"
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "satchel"
|
||||
origin_tech = "engineering=2"
|
||||
slot_flags = SLOT_BELT | SLOT_POCKET
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
can_hold = list(/obj/item/weapon/ore)
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/holding //miners, your messiah has arrived
|
||||
name = "mining satchel of holding"
|
||||
desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures."
|
||||
storage_slots = INFINITY
|
||||
max_combined_w_class = INFINITY
|
||||
origin_tech = "bluespace=4;materials=3;engineering=3"
|
||||
icon_state = "satchel_bspace"
|
||||
|
||||
// -----------------------------
|
||||
// Plant bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/plants
|
||||
name = "plant bag"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbag"
|
||||
storage_slots = 100; //the number of plant pieces it can carry.
|
||||
max_combined_w_class = 100 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown,/obj/item/weapon/reagent_containers/food/snacks/ash_flora,/obj/item/weapon/reagent_containers/honeycomb)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
////////
|
||||
|
||||
/obj/item/weapon/storage/bag/plants/portaseeder
|
||||
name = "portable seed extractor"
|
||||
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
|
||||
icon_state = "portaseeder"
|
||||
origin_tech = "biotech=3;engineering=2"
|
||||
|
||||
/obj/item/weapon/storage/bag/plants/portaseeder/verb/dissolve_contents()
|
||||
set name = "Activate Seed Extraction"
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
close_all()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher
|
||||
// -----------------------------
|
||||
// Because it stacks stacks, this doesn't operate normally.
|
||||
// However, making it a storage/bag allows us to reuse existing code in some places. -Sayu
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher
|
||||
name = "sheet snatcher"
|
||||
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "sheetsnatcher"
|
||||
|
||||
var/capacity = 300; //the number of sheets it can carry.
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
allow_quick_empty = 1 // this function is superceded
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/mineral/wood))
|
||||
if(!stop_messages)
|
||||
to_chat(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)
|
||||
current += S.amount
|
||||
if(capacity == current)//If it's full, you're done
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='danger'>The snatcher is full.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
// Modified handle_item_insertion. Would prefer not to, but...
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
var/amount
|
||||
var/inserted = 0
|
||||
var/current = 0
|
||||
for(var/obj/item/stack/sheet/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)
|
||||
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
|
||||
inserted = 1
|
||||
break
|
||||
|
||||
if(!inserted || !S.amount)
|
||||
usr.dropItemToGround(S)
|
||||
if (usr.client && usr.s_active != src)
|
||||
usr.client.screen -= S
|
||||
S.dropped(usr)
|
||||
if(!S.amount)
|
||||
qdel(S)
|
||||
else
|
||||
if(S.pulledby)
|
||||
S.pulledby.stop_pulling()
|
||||
S.loc = src
|
||||
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
// Sets up numbered display to show the stack size of each stored mineral
|
||||
// NOTE: numbered display is turned off currently because it's broken
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/orient2hud(mob/user)
|
||||
var/adjusted_contents = contents.len
|
||||
|
||||
//Numbered contents display
|
||||
var/list/datum/numbered_display/numbered_contents
|
||||
if(display_contents_with_number)
|
||||
numbered_contents = list()
|
||||
adjusted_contents = 0
|
||||
for(var/obj/item/stack/sheet/I in contents)
|
||||
adjusted_contents++
|
||||
var/datum/numbered_display/D = new/datum/numbered_display(I)
|
||||
D.number = I.amount
|
||||
numbered_contents.Add( D )
|
||||
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (adjusted_contents > 7)
|
||||
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
|
||||
src.standard_orient_objs(row_num, col_count, numbered_contents)
|
||||
return
|
||||
|
||||
|
||||
// Modified quick_empty verb drops appropriate sized stacks
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/quick_empty()
|
||||
var/location = get_turf(src)
|
||||
for(var/obj/item/stack/sheet/S in contents)
|
||||
while(S.amount)
|
||||
var/obj/item/stack/sheet/N = new S.type(location)
|
||||
var/stacksize = min(S.amount,N.max_amount)
|
||||
N.amount = stacksize
|
||||
S.amount -= stacksize
|
||||
if(!S.amount)
|
||||
qdel(S)// todo: there's probably something missing here
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
|
||||
// Instead of removing
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
//I would prefer to drop a new stack, but the item/attack_hand code
|
||||
// that calls this can't recieve a different object than you clicked on.
|
||||
//Therefore, make a new stack internally that has the remainder.
|
||||
// -Sayu
|
||||
|
||||
if(S.amount > S.max_amount)
|
||||
var/obj/item/stack/sheet/temp = new S.type(src)
|
||||
temp.amount = S.amount - S.max_amount
|
||||
S.amount = S.max_amount
|
||||
|
||||
return ..(S,new_location)
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher (Cyborg)
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/borg
|
||||
name = "sheet snatcher 9000"
|
||||
desc = ""
|
||||
capacity = 500//Borgs get more because >specialization
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Book bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/books
|
||||
name = "book bag"
|
||||
desc = "A bag for books."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bookbag"
|
||||
display_contents_with_number = 0 //This would look really stupid otherwise
|
||||
storage_slots = 7
|
||||
max_combined_w_class = 21
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics
|
||||
can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/book, /obj/item/weapon/spellbook)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/weapon/storage/bag/tray
|
||||
name = "tray"
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
force = 5
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=3000)
|
||||
preposition = "on"
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/attack(mob/living/M, mob/living/user)
|
||||
..()
|
||||
// Drop all the things. All of them.
|
||||
var/list/obj/item/oldContents = contents.Copy()
|
||||
quick_empty()
|
||||
|
||||
// Make each item scatter a bit
|
||||
for(var/obj/item/I in oldContents)
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1)
|
||||
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
if(prob(10))
|
||||
M.Weaken(2)
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/proc/rebuild_overlays()
|
||||
cut_overlays()
|
||||
for(var/obj/item/I in contents)
|
||||
/*
|
||||
* These absorb the functionality of the plant bag, ore satchel, etc.
|
||||
* They use the use_to_pickup, quick_gather, and quick_empty functions
|
||||
* that were already defined in weapon/storage, but which had been
|
||||
* re-implemented in other classes.
|
||||
*
|
||||
* Contains:
|
||||
* Trash Bag
|
||||
* Mining Satchel
|
||||
* Plant Bag
|
||||
* Sheet Snatcher
|
||||
* Book Bag
|
||||
* Biowaste Bag
|
||||
*
|
||||
* -Sayu
|
||||
*/
|
||||
|
||||
// Generic non-item
|
||||
/obj/item/weapon/storage/bag
|
||||
allow_quick_gather = 1
|
||||
allow_quick_empty = 1
|
||||
display_contents_with_number = 1 // should work fine now
|
||||
use_to_pickup = 1
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
// -----------------------------
|
||||
// Trash bag
|
||||
// -----------------------------
|
||||
/obj/item/weapon/storage/bag/trash
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 30
|
||||
storage_slots = 30
|
||||
can_hold = list() // any
|
||||
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else icon_state = "[initial(icon_state)]3"
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/bluespace
|
||||
name = "trash bag of holding"
|
||||
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
|
||||
icon_state = "bluetrashbag"
|
||||
origin_tech = "materials=4;bluespace=4;engineering=4;plasmatech=3"
|
||||
max_combined_w_class = 60
|
||||
storage_slots = 60
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/ore
|
||||
name = "mining satchel"
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "satchel"
|
||||
origin_tech = "engineering=2"
|
||||
slot_flags = SLOT_BELT | SLOT_POCKET
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
can_hold = list(/obj/item/weapon/ore)
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/holding //miners, your messiah has arrived
|
||||
name = "mining satchel of holding"
|
||||
desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures."
|
||||
storage_slots = INFINITY
|
||||
max_combined_w_class = INFINITY
|
||||
origin_tech = "bluespace=4;materials=3;engineering=3"
|
||||
icon_state = "satchel_bspace"
|
||||
|
||||
// -----------------------------
|
||||
// Plant bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/plants
|
||||
name = "plant bag"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbag"
|
||||
storage_slots = 100; //the number of plant pieces it can carry.
|
||||
max_combined_w_class = 100 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown,/obj/item/weapon/reagent_containers/honeycomb)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
////////
|
||||
|
||||
/obj/item/weapon/storage/bag/plants/portaseeder
|
||||
name = "portable seed extractor"
|
||||
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
|
||||
icon_state = "portaseeder"
|
||||
origin_tech = "biotech=3;engineering=2"
|
||||
|
||||
/obj/item/weapon/storage/bag/plants/portaseeder/verb/dissolve_contents()
|
||||
set name = "Activate Seed Extraction"
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
close_all()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher
|
||||
// -----------------------------
|
||||
// Because it stacks stacks, this doesn't operate normally.
|
||||
// However, making it a storage/bag allows us to reuse existing code in some places. -Sayu
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher
|
||||
name = "sheet snatcher"
|
||||
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "sheetsnatcher"
|
||||
|
||||
var/capacity = 300; //the number of sheets it can carry.
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
allow_quick_empty = 1 // this function is superceded
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/mineral/wood))
|
||||
if(!stop_messages)
|
||||
to_chat(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)
|
||||
current += S.amount
|
||||
if(capacity == current)//If it's full, you're done
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='danger'>The snatcher is full.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
// Modified handle_item_insertion. Would prefer not to, but...
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
var/amount
|
||||
var/inserted = 0
|
||||
var/current = 0
|
||||
for(var/obj/item/stack/sheet/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)
|
||||
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
|
||||
inserted = 1
|
||||
break
|
||||
|
||||
if(!inserted || !S.amount)
|
||||
usr.dropItemToGround(S)
|
||||
if (usr.client && usr.s_active != src)
|
||||
usr.client.screen -= S
|
||||
S.dropped(usr)
|
||||
if(!S.amount)
|
||||
qdel(S)
|
||||
else
|
||||
if(S.pulledby)
|
||||
S.pulledby.stop_pulling()
|
||||
S.loc = src
|
||||
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
// Sets up numbered display to show the stack size of each stored mineral
|
||||
// NOTE: numbered display is turned off currently because it's broken
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/orient2hud(mob/user)
|
||||
var/adjusted_contents = contents.len
|
||||
|
||||
//Numbered contents display
|
||||
var/list/datum/numbered_display/numbered_contents
|
||||
if(display_contents_with_number)
|
||||
numbered_contents = list()
|
||||
adjusted_contents = 0
|
||||
for(var/obj/item/stack/sheet/I in contents)
|
||||
adjusted_contents++
|
||||
var/datum/numbered_display/D = new/datum/numbered_display(I)
|
||||
D.number = I.amount
|
||||
numbered_contents.Add( D )
|
||||
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (adjusted_contents > 7)
|
||||
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
|
||||
src.standard_orient_objs(row_num, col_count, numbered_contents)
|
||||
return
|
||||
|
||||
|
||||
// Modified quick_empty verb drops appropriate sized stacks
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/quick_empty()
|
||||
var/location = get_turf(src)
|
||||
for(var/obj/item/stack/sheet/S in contents)
|
||||
while(S.amount)
|
||||
var/obj/item/stack/sheet/N = new S.type(location)
|
||||
var/stacksize = min(S.amount,N.max_amount)
|
||||
N.amount = stacksize
|
||||
S.amount -= stacksize
|
||||
if(!S.amount)
|
||||
qdel(S)// todo: there's probably something missing here
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
|
||||
// Instead of removing
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
//I would prefer to drop a new stack, but the item/attack_hand code
|
||||
// that calls this can't recieve a different object than you clicked on.
|
||||
//Therefore, make a new stack internally that has the remainder.
|
||||
// -Sayu
|
||||
|
||||
if(S.amount > S.max_amount)
|
||||
var/obj/item/stack/sheet/temp = new S.type(src)
|
||||
temp.amount = S.amount - S.max_amount
|
||||
S.amount = S.max_amount
|
||||
|
||||
return ..(S,new_location)
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher (Cyborg)
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/borg
|
||||
name = "sheet snatcher 9000"
|
||||
desc = ""
|
||||
capacity = 500//Borgs get more because >specialization
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Book bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/books
|
||||
name = "book bag"
|
||||
desc = "A bag for books."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bookbag"
|
||||
display_contents_with_number = 0 //This would look really stupid otherwise
|
||||
storage_slots = 7
|
||||
max_combined_w_class = 21
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics
|
||||
can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/book, /obj/item/weapon/spellbook)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/weapon/storage/bag/tray
|
||||
name = "tray"
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
force = 5
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=3000)
|
||||
preposition = "on"
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/attack(mob/living/M, mob/living/user)
|
||||
..()
|
||||
// Drop all the things. All of them.
|
||||
var/list/obj/item/oldContents = contents.Copy()
|
||||
quick_empty()
|
||||
|
||||
// Make each item scatter a bit
|
||||
for(var/obj/item/I in oldContents)
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1)
|
||||
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
if(prob(10))
|
||||
M.Knockdown(40)
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/proc/rebuild_overlays()
|
||||
cut_overlays()
|
||||
for(var/obj/item/I in contents)
|
||||
add_overlay(mutable_appearance(I.icon, I.icon_state))
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
..()
|
||||
rebuild_overlays()
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/handle_item_insertion(obj/item/I, prevent_warning = 0)
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
..()
|
||||
rebuild_overlays()
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/handle_item_insertion(obj/item/I, prevent_warning = 0)
|
||||
add_overlay(mutable_appearance(I.icon, I.icon_state))
|
||||
. = ..()
|
||||
|
||||
|
||||
/*
|
||||
* Chemistry bag
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/chemistry
|
||||
name = "chemistry bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bag"
|
||||
desc = "A bag for storing pills, patches, and bottles."
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/pill, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Biowaste bag (mostly for xenobiologists)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/bio
|
||||
name = "bio bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
storage_slots = 25
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/slime_extract, /obj/item/weapon/reagent_containers/syringe, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle, /obj/item/weapon/reagent_containers/blood, /obj/item/weapon/reagent_containers/hypospray/medipen, /obj/item/trash/deadmouse, /obj/item/weapon/reagent_containers/food/snacks/monkeycube)
|
||||
resistance_flags = FLAMMABLE
|
||||
. = ..()
|
||||
|
||||
|
||||
/*
|
||||
* Chemistry bag
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/chemistry
|
||||
name = "chemistry bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bag"
|
||||
desc = "A bag for storing pills, patches, and bottles."
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/pill, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Biowaste bag (mostly for xenobiologists)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/bio
|
||||
name = "bio bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
storage_slots = 25
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/slime_extract, /obj/item/weapon/reagent_containers/syringe, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle, /obj/item/weapon/reagent_containers/blood, /obj/item/weapon/reagent_containers/hypospray/medipen, /obj/item/trash/deadmouse, /obj/item/weapon/reagent_containers/food/snacks/monkeycube)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
|
||||
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
@@ -95,7 +95,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
if (user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='danger'>[src] slips out of your hand and hits your head.</span>")
|
||||
user.take_bodypart_damage(10)
|
||||
user.Paralyse(20)
|
||||
user.Unconscious(400)
|
||||
return
|
||||
|
||||
var/chaplain = 0
|
||||
@@ -106,10 +106,10 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
to_chat(user, "<span class='danger'>The book sizzles in your hands.</span>")
|
||||
user.take_bodypart_damage(0,10)
|
||||
return
|
||||
|
||||
|
||||
if (!heal_mode)
|
||||
return ..()
|
||||
|
||||
|
||||
var/smack = 1
|
||||
|
||||
if (M.stat != DEAD)
|
||||
@@ -175,7 +175,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
var/uses = 1
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/book/bible/syndicate/attack_self(mob/living/carbon/human/H)
|
||||
if (uses)
|
||||
H.mind.isholy = TRUE
|
||||
|
||||
@@ -886,14 +886,4 @@
|
||||
|
||||
/obj/item/weapon/storage/box/fountainpens/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/pen/fountain(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/medipens/surival_box
|
||||
name = "Survival Pen Pack"
|
||||
desc = "A pack of survival Pens to keep even the most retarded of miners alive"
|
||||
illustration = "syringe"
|
||||
|
||||
/obj/item/weapon/storage/box/medipens/surival_box/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen/survival(src)
|
||||
new /obj/item/weapon/pen/fountain(src)
|
||||
@@ -1,271 +1,271 @@
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/weapon/storage/fancy/PopulateContents()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/weapon/storage/fancy/update_icon(itemremoved = 0)
|
||||
if(fancy_open)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/weapon/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(contents.len == 1)
|
||||
to_chat(user, "There is one [src.icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
|
||||
|
||||
/obj/item/weapon/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/content_can_dump(atom/dest_object, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
|
||||
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/weapon/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/weapon/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.get_active_held_item())
|
||||
return
|
||||
for(var/obj/item/weapon/lighter/lighter in src)
|
||||
remove_from_storage(lighter, user.loc)
|
||||
user.put_in_active_hand(lighter)
|
||||
break
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/i = contents.len
|
||||
for(var/C in contents)
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/weapon/storage/fancy/PopulateContents()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/weapon/storage/fancy/update_icon(itemremoved = 0)
|
||||
if(fancy_open)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/weapon/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(contents.len == 1)
|
||||
to_chat(user, "There is one [src.icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
|
||||
|
||||
/obj/item/weapon/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/content_can_dump(atom/dest_object, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
|
||||
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/weapon/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/weapon/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.get_active_held_item())
|
||||
return
|
||||
for(var/obj/item/weapon/lighter/lighter in src)
|
||||
remove_from_storage(lighter, user.loc)
|
||||
user.put_in_active_hand(lighter)
|
||||
break
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/i = contents.len
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
inserted_overlay.pixel_x = 1 * (i - 1)
|
||||
if(istype(C, /obj/item/weapon/lighter/greyscale))
|
||||
if(istype(C, /obj/item/weapon/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/weapon/lighter))
|
||||
else if(istype(C, /obj/item/weapon/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
add_overlay(inserted_overlay)
|
||||
i--
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
remove_from_storage(W, M)
|
||||
M.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of NanoTrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/weapon/rollingpaper)
|
||||
spawn_type = /obj/item/weapon/rollingpaper
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 5
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/update_icon()
|
||||
i--
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
remove_from_storage(W, M)
|
||||
M.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of NanoTrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/weapon/rollingpaper)
|
||||
spawn_type = /obj/item/weapon/rollingpaper
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
add_overlay("[icon_state]_open")
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 5
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, icon_type)
|
||||
for(var/c = contents.len, c >= 1, c--)
|
||||
for(var/c = contents.len, c >= 1, c--)
|
||||
cigar_overlay.pixel_x = 4 * (c - 1)
|
||||
add_overlay(cigar_overlay)
|
||||
else
|
||||
icon_state = "cigarcase"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper cohiba robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
else
|
||||
icon_state = "cigarcase"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper cohiba robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user