Merge branch 'master' into upstream-merge-31176

This commit is contained in:
LetterJay
2017-11-09 03:24:38 -06:00
committed by GitHub
1253 changed files with 77070 additions and 91353 deletions
+3 -3
View File
@@ -22,7 +22,7 @@
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
if(can_buckle && istype(M))
if(can_buckle && istype(M) && istype(user))
if(user_buckle_mob(M, user))
return 1
@@ -47,9 +47,9 @@
return FALSE
if(!M.can_buckle() && !force)
if(M == usr)
to_chat(M, "<span class='warning'>You are unable to buckle yourself to the [src]!</span>")
to_chat(M, "<span class='warning'>You are unable to buckle yourself to [src]!</span>")
else
to_chat(usr, "<span class='warning'>You are unable to buckle [M] to the [src]!</span>")
to_chat(usr, "<span class='warning'>You are unable to buckle [M] to [src]!</span>")
return FALSE
if(M.pulledby && buckle_prevents_pull)
+4 -2
View File
@@ -221,8 +221,10 @@
var/y_distance = TO.y - FROM.y
var/x_distance = TO.x - FROM.x
for (var/atom/movable/A in urange(12, FROM )) // iterate thru list of mobs in the area
if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid
if(A.anchored) continue
if(istype(A, /obj/item/device/radio/beacon))
continue // don't teleport beacons because that's just insanely stupid
if(A.anchored)
continue
var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
if(!A.Move(newloc) && newloc) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
+1 -1
View File
@@ -3,7 +3,7 @@
desc = "We're leaving together\n\
But still it's farewell\n\
And maybe we'll come back\n\
To earth, who can tell?"
To Earth, who can tell?"
var/displayed_text
var/atom/attached_to
@@ -4,7 +4,7 @@
var/list/random_icon_states = list()
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
var/mergeable_decal = 1 //when two of these are on a same tile or do we need to merge them into just one?
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
if (random_icon_states && length(src.random_icon_states) > 0)
@@ -20,7 +20,7 @@
icon_state = "xgib1"
layer = LOW_OBJ_LAYER
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
mergeable_decal = 0
mergeable_decal = FALSE
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(list/directions)
set waitfor = 0
@@ -50,7 +50,7 @@
icon_state = "gibbl5"
layer = LOW_OBJ_LAYER
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
mergeable_decal = 0
mergeable_decal = FALSE
/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases)
. = ..()
@@ -135,9 +135,10 @@
var/obj/item/clothing/shoes/S = H.shoes
if(S && S.bloody_shoes[blood_state])
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
entered_dirs|= H.dir
shoe_types |= H.shoes.type
update_icon()
shoe_types |= S.type
if (!(entered_dirs & H.dir))
entered_dirs |= H.dir
update_icon()
/obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O)
..()
@@ -146,9 +147,11 @@
var/obj/item/clothing/shoes/S = H.shoes
if(S && S.bloody_shoes[blood_state])
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
exited_dirs|= H.dir
shoe_types |= H.shoes.type
update_icon()
shoe_types |= S.type
if (!(exited_dirs & H.dir))
exited_dirs |= H.dir
update_icon()
/obj/effect/decal/cleanable/blood/footprints/update_icon()
cut_overlays()
@@ -9,7 +9,7 @@
desc = "Ashes to ashes, dust to dust, and into space."
icon = 'icons/obj/objects.dmi'
icon_state = "ash"
mergeable_decal = 0
mergeable_decal = FALSE
/obj/effect/decal/cleanable/ash/Initialize()
. = ..()
@@ -67,7 +67,7 @@
gender = NEUTER
icon = 'icons/effects/effects.dmi'
icon_state = "molten"
mergeable_decal = 0
mergeable_decal = FALSE
/obj/effect/decal/cleanable/molten_object/large
name = "big gooey grey mass"
@@ -144,7 +144,7 @@
desc = "The shredded remains of what appears to be clothing."
icon_state = "shreds"
gender = PLURAL
mergeable_decal = 0
mergeable_decal = FALSE
/obj/effect/decal/cleanable/shreds/ex_act(severity, target)
if(severity == 1) //so shreds created during an explosion aren't deleted by the explosion.
@@ -9,7 +9,7 @@
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
blood_state = BLOOD_STATE_OIL
bloodiness = MAX_SHOE_BLOODINESS
mergeable_decal = 0
mergeable_decal = FALSE
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions)
set waitfor = 0
+12 -6
View File
@@ -5,20 +5,26 @@
icon_state = "rune1"
gender = NEUTER
var/do_icon_rotate = TRUE
var/rotation = 0
var/paint_colour = "#FFFFFF"
/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/Initialize(mapload, main, type, e_name, graf_rot, alt_icon = null)
. = ..()
name = e_name
if(e_name)
name = e_name
desc = "A [name] vandalizing the station."
if(alt_icon)
icon = alt_icon
icon_state = type
if(type)
icon_state = type
if(graf_rot)
rotation = graf_rot
if(rotation && do_icon_rotate)
var/matrix/M = matrix()
M.Turn(rotation)
src.transform = M
add_atom_colour(main, FIXED_COLOUR_PRIORITY)
if(main)
paint_colour = main
add_atom_colour(paint_colour, FIXED_COLOUR_PRIORITY)
+8 -9
View File
@@ -12,27 +12,26 @@
/obj/effect/decal/HandleTurfChange(turf/T)
..()
if(T == loc && (isspaceturf(T) || isclosedturf(T) || islava(T) || istype(T, /turf/open/water) || istype(T, /turf/open/chasm)))
if(T == loc && (isspaceturf(T) || isclosedturf(T) || islava(T) || istype(T, /turf/open/water) || ischasm(T)))
qdel(src)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/obj/effect/turf_decal
var/group = TURF_DECAL_PAINT
icon = 'icons/turf/decals.dmi'
icon_state = "warningline"
layer = TURF_DECAL_LAYER
anchored = TRUE
//in case we need some special decals
/obj/effect/turf_decal/proc/get_decal()
return image(icon='icons/turf/decals.dmi',icon_state=icon_state,dir=dir,layer=TURF_LAYER)
/obj/effect/turf_decal/Initialize()
..()
return INITIALIZE_HINT_QDEL
/obj/effect/turf_decal/ComponentInitialize()
. = ..()
var/turf/T = loc
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
T.AddComponent(/datum/component/turf_decal, dir, icon, icon_state)
/obj/effect/turf_decal/stripes/line
icon_state = "warningline"
@@ -3,6 +3,12 @@
gender = PLURAL
icon = 'icons/effects/blood.dmi'
/obj/effect/decal/remains/acid_act()
visible_message("<span class='warning'>[src] dissolve[gender==PLURAL?"":"s"] into a puddle of sizzling goop!</span>")
playsound(src, 'sound/items/welder.ogg', 150, 1)
new /obj/effect/decal/cleanable/greenglow(drop_location())
qdel(src)
/obj/effect/decal/remains/human
desc = "They look like human remains. They have a strange aura about them."
icon_state = "remains"
@@ -17,7 +17,7 @@
var/direct = pick(GLOB.alldirs)
var/steps_amt = pick(1;25,2;50,3,4;200)
for(var/j in 1 to steps_amt)
addtimer(CALLBACK(src, .proc/_step, expl, direct), j)
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, expl, direct), j)
/obj/effect/explosion
name = "fire"
@@ -11,7 +11,7 @@
opacity = 0
anchored = TRUE
density = FALSE
layer = WALL_OBJ_LAYER
layer = EDGED_TURF_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/amount = 3
animate_movement = 0
@@ -216,6 +216,7 @@
density = TRUE
opacity = 1 // changed in New()
anchored = TRUE
layer = EDGED_TURF_LAYER
resistance_flags = FIRE_PROOF | ACID_PROOF
name = "foamed metal"
desc = "A lightweight foamed metal wall."
@@ -259,13 +260,12 @@
//Atmos Backpack Resin, transparent, prevents atmos and filters the air
/obj/structure/foamedmetal/resin
name = "ATMOS Resin"
desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature"
name = "\improper ATMOS Resin"
desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature."
opacity = FALSE
icon_state = "atmos_resin"
alpha = 120
max_integrity = 10
layer = EDGED_TURF_LAYER
/obj/structure/foamedmetal/resin/Initialize()
. = ..()
@@ -279,8 +279,9 @@
qdel(H)
var/list/G_gases = G.gases
for(var/I in G_gases)
if(I != "o2" && I != "n2")
G.gases[I][MOLES] = 0
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
continue
G_gases[I][MOLES] = 0
G.garbage_collect()
O.air_update_turf()
for(var/obj/machinery/atmospherics/components/unary/U in O)
@@ -8,8 +8,13 @@
/datum/effect_system/trail_follow
var/turf/oldposition
var/processing = TRUE
var/on = TRUE
var/active = FALSE
var/allow_overlap = FALSE
var/auto_process = TRUE
var/qdel_in_time = 10
var/fadetype = "ion_fade"
var/fade = TRUE
var/nograv_required = FALSE
/datum/effect_system/trail_follow/set_up(atom/atom)
attach(atom)
@@ -17,37 +22,49 @@
/datum/effect_system/trail_follow/Destroy()
oldposition = null
stop()
return ..()
/datum/effect_system/trail_follow/proc/stop()
processing = FALSE
on = FALSE
oldposition = null
STOP_PROCESSING(SSfastprocess, src)
active = FALSE
return TRUE
/datum/effect_system/trail_follow/start()
oldposition = get_turf(holder)
if(!check_conditions())
return FALSE
if(auto_process)
START_PROCESSING(SSfastprocess, src)
active = TRUE
return TRUE
/datum/effect_system/trail_follow/process()
generate_effect()
/datum/effect_system/trail_follow/generate_effect()
if(!check_conditions())
return stop()
if(oldposition && !(oldposition == get_turf(holder)))
if(!oldposition.has_gravity() || !nograv_required)
var/obj/effect/E = new effect_type(oldposition)
set_dir(E)
if(fade)
flick(fadetype, E)
E.icon_state = ""
if(qdel_in_time)
QDEL_IN(E, qdel_in_time)
oldposition = get_turf(holder)
/datum/effect_system/trail_follow/proc/check_conditions()
if(!get_turf(holder))
return FALSE
return TRUE
/datum/effect_system/trail_follow/steam
effect_type = /obj/effect/particle_effect/steam
/datum/effect_system/trail_follow/steam/start()
if(!on)
on = TRUE
processing = TRUE
if(!oldposition)
oldposition = get_turf(holder)
if(processing)
processing = FALSE
if(number < 3)
var/obj/effect/particle_effect/steam/I = new /obj/effect/particle_effect/steam(oldposition)
number++
I.setDir(holder.dir)
oldposition = get_turf(holder)
spawn(10)
qdel(I)
number--
spawn(2)
if(on)
processing = TRUE
start()
/obj/effect/particle_effect/ion_trails
name = "ion trails"
icon_state = "ion_trails"
@@ -58,47 +75,23 @@
/datum/effect_system/trail_follow/ion
effect_type = /obj/effect/particle_effect/ion_trails
var/fadetype = "ion_fade"
var/fade = 1
var/nograv_required = 1
nograv_required = TRUE
qdel_in_time = 20
/datum/effect_system/trail_follow/ion/start() //Whoever is responsible for this abomination of code should become an hero
if(!on)
on = TRUE
processing = TRUE
if(!oldposition)
oldposition = get_turf(holder)
if(processing)
processing = FALSE
var/turf/T = get_turf(holder)
if(T != oldposition)
if(!T.has_gravity() || !nograv_required)
var/obj/effect/particle_effect/ion_trails/I = new effect_type(oldposition)
set_dir(I)
if(fade)
flick(fadetype, I)
I.icon_state = ""
spawn(20)
qdel(I)
oldposition = T
spawn(2)
if(on)
processing = TRUE
start()
/datum/effect_system/trail_follow/ion/proc/set_dir(obj/effect/particle_effect/ion_trails/I)
/datum/effect_system/trail_follow/proc/set_dir(obj/effect/particle_effect/ion_trails/I)
I.setDir(holder.dir)
/datum/effect_system/trail_follow/ion/flight
effect_type = /obj/effect/particle_effect/ion_trails/flight
fadetype = "ion_fade_flight"
nograv_required = 0
nograv_required = FALSE
auto_process = FALSE
/datum/effect_system/trail_follow/ion/flight/set_dir(obj/effect/particle_effect/ion_trails/I)
if(istype(holder, /obj/item/device/flightpack))
var/obj/item/device/flightpack/F = holder
I.setDir(F.suit.user.dir)
if(istype(F.wearer))
I.setDir(F.wearer.dir)
//Reagent-based explosion effect
@@ -168,10 +168,10 @@
for(var/obj/effect/hotspot/H in T)
qdel(H)
var/list/G_gases = G.gases
if(G_gases["plasma"])
ASSERT_GAS("n2", G)
G_gases["n2"][MOLES] += (G_gases["plasma"][MOLES])
G_gases["plasma"][MOLES] = 0
if(G_gases[/datum/gas/plasma])
ASSERT_GAS(/datum/gas/nitrogen, G)
G_gases[/datum/gas/nitrogen][MOLES] += (G_gases[/datum/gas/plasma][MOLES])
G_gases[/datum/gas/plasma][MOLES] = 0
G.garbage_collect()
for(var/obj/machinery/atmospherics/components/unary/U in T)
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
+3 -3
View File
@@ -254,7 +254,7 @@
..()
GLOB.prisonwarp += loc
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/ert_spawn
name = "Emergencyresponseteam"
@@ -310,7 +310,7 @@
/obj/effect/landmark/servant_of_ratvar/Initialize(mapload)
..()
GLOB.servant_spawns += loc
qdel(src)
return INITIALIZE_HINT_QDEL
//City of Cogs entrances
/obj/effect/landmark/city_of_cogs
@@ -320,7 +320,7 @@
/obj/effect/landmark/city_of_cogs/Initialize(mapload)
..()
GLOB.city_of_cogs_spawns += loc
qdel(src)
return INITIALIZE_HINT_QDEL
//generic event spawns
/obj/effect/landmark/event_spawn
+59 -50
View File
@@ -1,52 +1,61 @@
//The effect when you wrap a dead body in gift wrap
/obj/effect/spresent
name = "strange present"
desc = "It's a ... present?"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "strangepresent"
//The effect when you wrap a dead body in gift wrap
/obj/effect/spresent
name = "strange present"
desc = "It's a ... present?"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "strangepresent"
density = TRUE
anchored = FALSE
/obj/effect/beam
name = "beam"
var/def_zone
pass_flags = PASSTABLE
/obj/effect/spawner
name = "object spawner"
/obj/effect/list_container
name = "list container"
/obj/effect/list_container/mobl
name = "mobl"
var/master = null
var/list/container = list( )
//Makes a tile fully lit no matter what
/obj/effect/fullbright
icon = 'icons/effects/alphacolors.dmi'
icon_state = "white"
plane = LIGHTING_PLANE
layer = LIGHTING_LAYER
blend_mode = BLEND_ADD
/obj/effect/abstract/marker
name = "marker"
icon = 'icons/effects/effects.dmi'
anchored = TRUE
icon_state = "wave3"
layer = RIPPLE_LAYER
/obj/effect/abstract/marker/Initialize(mapload)
. = ..()
GLOB.all_abstract_markers += src
/obj/effect/abstract/marker/Destroy()
GLOB.all_abstract_markers -= src
. = ..()
/obj/effect/abstract/marker/at
name = "active turf marker"
/obj/effect/beam
name = "beam"
var/def_zone
pass_flags = PASSTABLE
/obj/effect/spawner
name = "object spawner"
/obj/effect/list_container
name = "list container"
/obj/effect/list_container/mobl
name = "mobl"
var/master = null
var/list/container = list( )
/obj/effect/overlay/thermite
name = "thermite"
desc = "Looks hot."
icon = 'icons/effects/fire.dmi'
icon_state = "2" //what?
anchored = TRUE
opacity = TRUE
density = TRUE
layer = FLY_LAYER
//Makes a tile fully lit no matter what
/obj/effect/fullbright
icon = 'icons/effects/alphacolors.dmi'
icon_state = "white"
plane = LIGHTING_PLANE
layer = LIGHTING_LAYER
blend_mode = BLEND_ADD
/obj/effect/abstract/marker
name = "marker"
icon = 'icons/effects/effects.dmi'
anchored = TRUE
icon_state = "wave3"
layer = RIPPLE_LAYER
/obj/effect/abstract/marker/Initialize(mapload)
. = ..()
GLOB.all_abstract_markers += src
/obj/effect/abstract/marker/Destroy()
GLOB.all_abstract_markers -= src
. = ..()
/obj/effect/abstract/marker/at
name = "active turf marker"
+1 -1
View File
@@ -124,7 +124,7 @@
return ..()
/obj/effect/portal/proc/teleport(atom/movable/M)
if(!istype(M) || istype(M, /obj/effect) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M))) //Things that shouldn't teleport.
if(!istype(M) || istype(M, /obj/effect) || isobserver(M) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M))) //Things that shouldn't teleport.
return
var/turf/real_target = get_link_target_turf()
if(!istype(real_target))
+3 -3
View File
@@ -2,7 +2,7 @@
/obj/structure/spider
name = "web"
icon = 'icons/effects/effects.dmi'
desc = "it's stringy and sticky"
desc = "It's stringy and sticky."
anchored = TRUE
density = FALSE
max_integrity = 15
@@ -48,7 +48,7 @@
/obj/structure/spider/eggcluster
name = "egg cluster"
desc = "They seem to pulse slightly with an inner life"
desc = "They seem to pulse slightly with an inner life."
icon_state = "eggs"
var/amount_grown = 0
var/player_spiders = 0
@@ -205,7 +205,7 @@
/obj/structure/spider/cocoon
name = "cocoon"
desc = "Something wrapped in silky spider web"
desc = "Something wrapped in silky spider web."
icon_state = "cocoon1"
max_integrity = 60
@@ -312,14 +312,10 @@
icon_state = "impact_bullet"
duration = 5
/obj/effect/temp_visual/impact_effect/Initialize(mapload, atom/target, obj/item/projectile/P)
if(target == P.original) //the projectile hit the target originally clicked
pixel_x = P.p_x + target.pixel_x - 16 + rand(-4,4)
pixel_y = P.p_y + target.pixel_y - 16 + rand(-4,4)
else
pixel_x = target.pixel_x + rand(-4,4)
pixel_y = target.pixel_y + rand(-4,4)
. = ..()
/obj/effect/temp_visual/impact_effect/Initialize(mapload, x, y)
pixel_x = x
pixel_y = y
return ..()
/obj/effect/temp_visual/impact_effect/red_laser
icon_state = "impact_laser"
@@ -35,3 +35,5 @@
if(set_dir)
setDir(set_dir)
. = ..()
+2 -1
View File
@@ -1,5 +1,6 @@
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
if(!epicenter) return
if(!epicenter)
return
if(!isturf(epicenter))
epicenter = get_turf(epicenter.loc)
+4 -3
View File
@@ -77,7 +77,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/mob/thrownby = null
/obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
//So items can have custom embedd values
//Because customisation is king
@@ -519,7 +519,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
M.adjust_blurriness(3)
M.adjust_eye_damage(rand(2,4))
var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
if(eyes.eye_damage >= 10)
@@ -558,7 +558,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
..()
if(current_size >= STAGE_FOUR)
throw_at(S,14,3, spin=0)
else return
else
return
/obj/item/throw_impact(atom/A)
if(A && !QDELETED(A))
+19 -17
View File
@@ -8,7 +8,9 @@ RCD
ARCD
*/
obj/item/construction
/obj/item/construction
name = "not for ingame use"
desc = "A device used to rapidly build and deconstruct. Reload with metal, plasteel, glass or compressed matter cartridges."
opacity = 0
density = FALSE
anchored = FALSE
@@ -32,11 +34,13 @@ obj/item/construction
/obj/item/construction/Initialize()
. = ..()
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/construction/examine(mob/user)
..()
to_chat(user, "\A [src]. It currently holds [matter]/[max_matter] matter-units." )
/obj/item/construction/Destroy()
QDEL_NULL(spark_system)
@@ -49,7 +53,7 @@ obj/item/construction
if(istype(W, /obj/item/rcd_ammo))
var/obj/item/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='warning'>The [src] can't hold any more matter-units!</span>")
to_chat(user, "<span class='warning'>[src] can't hold any more matter-units!</span>")
return
qdel(W)
matter += R.ammoamt
@@ -60,8 +64,7 @@ obj/item/construction
else if(istype(W, /obj/item/stack/sheet/plasteel))
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
if(loaded)
to_chat(user, "<span class='notice'>The [src] now holds [matter]/[max_matter] matter-units.</span>")
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
to_chat(user, "<span class='notice'>[src] now holds [matter]/[max_matter] matter-units.</span>")
else
return ..()
@@ -72,9 +75,9 @@ obj/item/construction
S.use(amount_to_use)
matter += value*amount_to_use
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the [src]. </span>")
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into [src]. </span>")
return 1
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!</span>")
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into [src]!</span>")
return 0
/obj/item/construction/proc/activate()
@@ -91,7 +94,6 @@ obj/item/construction
to_chat(user, no_ammo_message)
return 0
matter -= amount
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
update_icon()
return 1
@@ -103,7 +105,7 @@ obj/item/construction
/obj/item/construction/proc/range_check(atom/A, mob/user)
if(!(A in view(7, get_turf(user))))
to_chat(user, "<span class='warning'>The \'Out of Range\' light on the [src] blinks red.</span>")
to_chat(user, "<span class='warning'>The \'Out of Range\' light on [src] blinks red.</span>")
return FALSE
else
return TRUE
@@ -117,7 +119,6 @@ obj/item/construction
/obj/item/construction/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls and floors."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
@@ -125,7 +126,6 @@ obj/item/construction
max_matter = 160
flags_2 = NO_MAT_REDEMPTION_2
var/mode = 1
var/canRturf = 0
var/ranged = FALSE
var/airlock_type = /obj/machinery/door/airlock
var/airlock_glass = FALSE // So the floor's rcd_act knows how much ammo to use
@@ -134,6 +134,7 @@ obj/item/construction
var/list/conf_access = null
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
var/delay_mod = 1
var/canRturf = FALSE //Variable for R walls to deconstruct them
/obj/item/construction/rcd/suicide_act(mob/user)
@@ -362,11 +363,11 @@ obj/item/construction
qdel(src)
/obj/item/construction/rcd/borg/New()
..()
/obj/item/construction/rcd/borg
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
desc = "A device used to rapidly build walls and floors."
canRturf = 1
canRturf = TRUE
/obj/item/construction/rcd/borg/useResource(amount, mob/user)
if(!iscyborg(user))
@@ -401,6 +402,7 @@ obj/item/construction
name = "industrial RCD"
max_matter = 500
matter = 500
canRturf = TRUE
/obj/item/rcd_ammo
name = "compressed matter cartridge"
@@ -420,7 +422,7 @@ obj/item/construction
ammoamt = 160
/obj/item/construction/rcd/admin
/obj/item/construction/rcd/combat/admin
name = "admin RCD"
max_matter = INFINITY
matter = INFINITY
@@ -431,7 +433,7 @@ obj/item/construction
/obj/item/construction/rcd/arcd
name = "advanced rapid-construction-device (ARCD)"
desc = "A prototype RCD with ranged capability and extended capacity"
desc = "A prototype RCD with ranged capability and extended capacity. Reload with metal, plasteel, glass or compressed matter cartridges."
max_matter = 300
matter = 300
delay_mod = 0.6
@@ -454,7 +456,7 @@ obj/item/construction
/obj/item/construction/rld
name = "rapid-light-device (RLD)"
desc = "A device used to rapidly provide lighting sources to an area."
desc = "A device used to rapidly provide lighting sources to an area. Reload with metal, plasteel, glass or compressed matter cartridges."
icon = 'icons/obj/tools.dmi'
icon_state = "rld-5"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
+1 -1
View File
@@ -42,7 +42,7 @@
else
return
update_icon()
to_chat(user, "<span class='notice'>You add the cables to the [src]. It now contains [loaded.amount].</span>")
to_chat(user, "<span class='notice'>You add the cables to [src]. It now contains [loaded.amount].</span>")
else if(istype(W, /obj/item/screwdriver))
if(!loaded)
return
+101 -68
View File
@@ -4,12 +4,6 @@
CONTAINS:
RPD
*/
#define PIPE_BINARY 0
#define PIPE_BENDABLE 1
#define PIPE_TRINARY 2
#define PIPE_TRIN_M 3
#define PIPE_UNARY 4
#define PIPE_QUAD 5
#define PAINT_MODE -2
#define EATING_MODE -1
@@ -22,23 +16,29 @@ RPD
/datum/pipe_info
var/id=-1
var/categoryId = CATEGORY_ATMOS
var/categoryId
var/dir=SOUTH
var/dirtype = PIPE_BENDABLE
var/icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
var/icon_state=""
var/icon
var/icon_state
var/selected=0
/datum/pipe_info/New(pid,direction,dt)
src.id=pid
src.icon_state=GLOB.pipeID2State["[pid]"]
src.dir = direction
src.dirtype=dt
/datum/pipe_info/pipe
categoryId = CATEGORY_ATMOS
icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
/datum/pipe_info/pipe/New(obj/machinery/atmospherics/path)
id = path
icon_state = initial(path.pipe_state)
dirtype = initial(path.construction_type)
/datum/pipe_info/proc/Render(dispenser,label)
/datum/pipe_info/pipe/Render(dispenser,label,dir=NORTH)
return "<li><a href='?src=\ref[dispenser];makepipe=[id];dir=[dir];type=[dirtype]'>[label]</a></li>"
/datum/pipe_info/meter
categoryId = CATEGORY_ATMOS
icon = 'icons/obj/atmospherics/pipes/simple.dmi'
icon_state = "meterX"
@@ -64,13 +64,12 @@ GLOBAL_LIST_INIT(disposalpipeID2State, list(
/datum/pipe_info/disposal
categoryId = CATEGORY_DISPOSALS
icon = 'icons/obj/atmospherics/pipes/disposal.dmi'
icon_state = "meterX"
/datum/pipe_info/disposal/New(var/pid,var/dt)
src.id=pid
src.icon_state=GLOB.disposalpipeID2State[pid+1]
src.dir = SOUTH
src.dirtype=dt
id=pid
icon_state=GLOB.disposalpipeID2State[pid+1]
dir = SOUTH
dirtype=dt
if(pid<DISP_END_BIN || pid>DISP_END_CHUTE)
icon_state = "con[icon_state]"
@@ -80,33 +79,31 @@ GLOBAL_LIST_INIT(disposalpipeID2State, list(
//find these defines in code\game\machinery\pipe\consruction.dm
GLOBAL_LIST_INIT(RPD_recipes, list(
"Pipes" = list(
"Pipe" = new /datum/pipe_info(PIPE_SIMPLE, 1, PIPE_BENDABLE),
//"Bent Pipe" = new /datum/pipe_info(PIPE_SIMPLE, 5, PIPE_BENT),
"Manifold" = new /datum/pipe_info(PIPE_MANIFOLD, 1, PIPE_TRINARY),
"Manual Valve" = new /datum/pipe_info(PIPE_MVALVE, 1, PIPE_BINARY),
"Digital Valve" = new /datum/pipe_info(PIPE_DVALVE, 1, PIPE_BINARY),
"4-Way Manifold" = new /datum/pipe_info(PIPE_4WAYMANIFOLD, 1, PIPE_QUAD),
"Bluespace Pipe" = new /datum/pipe_info(PIPE_BLUESPACE, 1, PIPE_UNARY),
"Pipe" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/simple),
"Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/manifold),
"Manual Valve" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/valve),
"Digital Valve" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/valve/digital),
"4-Way Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/manifold4w),
"Layer Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/layer_manifold),
),
"Devices"=list(
"Connector" = new /datum/pipe_info(PIPE_CONNECTOR, 1, PIPE_UNARY),
"Unary Vent" = new /datum/pipe_info(PIPE_UVENT, 1, PIPE_UNARY),
"Gas Pump" = new /datum/pipe_info(PIPE_PUMP, 1, PIPE_UNARY),
"Passive Gate" = new /datum/pipe_info(PIPE_PASSIVE_GATE, 1, PIPE_UNARY),
"Volume Pump" = new /datum/pipe_info(PIPE_VOLUME_PUMP, 1, PIPE_UNARY),
"Scrubber" = new /datum/pipe_info(PIPE_SCRUBBER, 1, PIPE_UNARY),
"Injector" = new /datum/pipe_info(PIPE_INJECTOR, 1, PIPE_UNARY),
"Devices" = list(
"Connector" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/portables_connector),
"Unary Vent" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/vent_pump),
"Gas Pump" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/pump),
"Passive Gate" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/passive_gate),
"Volume Pump" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/volume_pump),
"Scrubber" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/vent_scrubber),
"Injector" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/outlet_injector),
"Meter" = new /datum/pipe_info/meter(),
"Gas Filter" = new /datum/pipe_info(PIPE_GAS_FILTER, 1, PIPE_TRIN_M),
"Gas Mixer" = new /datum/pipe_info(PIPE_GAS_MIXER, 1, PIPE_TRIN_M),
"Gas Filter" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/trinary/filter),
"Gas Mixer" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/trinary/mixer),
),
"Heat Exchange" = list(
"Pipe" = new /datum/pipe_info(PIPE_HE, 1, PIPE_BENDABLE),
//"Bent Pipe" = new /datum/pipe_info(PIPE_HE, 5, PIPE_BENT),
"Manifold" = new /datum/pipe_info(PIPE_HE_MANIFOLD, 1, PIPE_TRINARY),
"4-Way Manifold" = new /datum/pipe_info(PIPE_HE_4WAYMANIFOLD, 1, PIPE_QUAD),
"Junction" = new /datum/pipe_info(PIPE_JUNCTION, 1, PIPE_UNARY),
"Heat Exchanger" = new /datum/pipe_info(PIPE_HEAT_EXCHANGE, 1, PIPE_UNARY),
"Pipe" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/simple),
"Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/manifold),
"4-Way Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w),
"Junction" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/junction),
"Heat Exchanger" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/heat_exchanger),
),
"Disposal Pipes" = list(
"Pipe" = new /datum/pipe_info/disposal(DISP_PIPE_STRAIGHT, PIPE_BINARY),
@@ -120,6 +117,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
"Sort Junction" = new /datum/pipe_info/disposal(DISP_SORTJUNCTION, PIPE_TRINARY),
)
))
/obj/item/pipe_dispenser
name = "Rapid Piping Device (RPD)"
desc = "A device used to rapidly pipe things."
@@ -137,7 +135,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/working = 0
var/p_type = PIPE_SIMPLE
var/p_type = /obj/machinery/atmospherics/pipe/simple
var/p_conntype = PIPE_BENDABLE
var/p_dir = 1
var/p_flipped = 0
@@ -153,6 +151,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
)
var/paint_color="grey"
var/screen = CATEGORY_ATMOS //Starts on the atmos tab.
var/piping_layer = PIPING_LAYER_DEFAULT
/obj/item/pipe_dispenser/New()
. = ..()
@@ -200,7 +199,15 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
if(screen == CATEGORY_ATMOS)
dat += "<span class='linkOn'>Atmospherics</span> <A href='?src=\ref[src];screen=[CATEGORY_DISPOSALS];dmake=0;type=0'>Disposals</A><BR>"
else if(screen == CATEGORY_DISPOSALS)
dat += "<A href='?src=\ref[src];screen=[CATEGORY_ATMOS];makepipe=0;dir=1;type=0'>Atmospherics</A> <span class='linkOn'>Disposals</span><BR>"
dat += "<A href='?src=\ref[src];screen=[CATEGORY_ATMOS];makepipe=[/obj/machinery/atmospherics/pipe/simple];dir=1;type=0'>Atmospherics</A> <span class='linkOn'>Disposals</span><BR>"
var/generated_layer_list = ""
var/layers_total = PIPING_LAYER_MAX - PIPING_LAYER_MIN + 1
for(var/iter = PIPING_LAYER_MIN, iter <= layers_total, iter++)
if(iter == piping_layer)
generated_layer_list += "<span class='linkOn'><A href='?src=\ref[src];setlayer=[iter]'>[iter]</A></span>"
else
generated_layer_list += "<A href='?src=\ref[src];setlayer=[iter]'>[iter]</A>"
dat += "Atmospherics Piping Layer: [generated_layer_list]<BR>"
dat += "</ul>"
var/icon/preview=null
@@ -211,9 +218,9 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
var/datum/pipe_info/I = cat[label]
var/found=0
if(I.id == p_type)
if((p_class == ATMOS_MODE || p_class == METER_MODE) && (I.type == /datum/pipe_info || I.type == /datum/pipe_info/meter))
if((p_class == ATMOS_MODE || p_class == METER_MODE) && (istype(I, /datum/pipe_info/pipe) || istype(I, /datum/pipe_info/meter)))
found=1
else if(p_class == DISPOSALS_MODE && I.type==/datum/pipe_info/disposal)
else if(p_class == DISPOSALS_MODE && istype(I, /datum/pipe_info/disposal))
found=1
if(found)
preview=new /icon(I.icon,I.icon_state)
@@ -459,7 +466,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
usr << browse(null, "window=pipedispenser")
return
usr.set_machine(src)
src.add_fingerprint(usr)
add_fingerprint(usr)
if(href_list["screen"])
screen = text2num(href_list["screen"])
show_menu(usr)
@@ -469,11 +476,18 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
p_flipped = text2num(href_list["flipped"])
show_menu(usr)
if(href_list["setlayer"])
if(!isnum(href_list["setlayer"]))
piping_layer = text2num(href_list["setlayer"])
else
piping_layer = href_list["setlayer"]
show_menu(usr)
if(href_list["eatpipes"])
p_class = EATING_MODE
p_conntype=-1
p_dir=1
src.spark_system.start()
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
@@ -481,22 +495,23 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
p_class = PAINT_MODE
p_conntype = -1
p_dir = 1
src.spark_system.start()
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["set_color"])
paint_color = href_list["set_color"]
src.spark_system.start()
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makepipe"])
p_type = text2path(href_list["makepipe"])
p_dir = text2num(href_list["dir"])
p_conntype = text2num(href_list["type"])
var/obj/item/pipe/path = text2path(href_list["type"])
p_conntype = initial(path.RPD_type)
p_class = ATMOS_MODE
src.spark_system.start()
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
@@ -504,7 +519,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
p_class = METER_MODE
p_conntype = -1
p_dir = 1
src.spark_system.start()
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
@@ -513,7 +528,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
p_conntype = text2num(href_list["type"])
p_dir = 1
p_class = DISPOSALS_MODE
src.spark_system.start()
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
@@ -522,10 +537,18 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
if(!user.IsAdvancedToolUser() || istype(A, /turf/open/space/transit))
return ..()
var/atmos_piping_mode = p_class == ATMOS_MODE || p_class == METER_MODE
var/temp_piping_layer
if(atmos_piping_mode)
if(istype(A, /obj/machinery/atmospherics))
var/obj/machinery/atmospherics/AM = A
temp_piping_layer = AM.piping_layer
A = get_turf(user)
//make sure what we're clicking is valid for the current mode
var/is_paintable = (p_class == PAINT_MODE && istype(A, /obj/machinery/atmospherics/pipe))
var/is_consumable = (p_class == EATING_MODE && (istype(A, /obj/item/pipe) || istype(A, /obj/item/pipe_meter) || istype(A, /obj/structure/disposalconstruct)))
var/can_make_pipe = ((p_class == ATMOS_MODE || p_class == METER_MODE || p_class == DISPOSALS_MODE) && isturf(A))
var/can_make_pipe = ((atmos_piping_mode || p_class == DISPOSALS_MODE) && (isturf(A)) || istype(A, /obj/structure/lattice) || istype(A, /obj/structure/girder))
if(!is_paintable && !is_consumable && !can_make_pipe)
return ..()
@@ -540,10 +563,8 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
if(PAINT_MODE) //Paint pipes
var/obj/machinery/atmospherics/pipe/P = A
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
P.add_atom_colour(paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
P.pipe_color = paint_colors[paint_color]
P.paint(paint_colors[paint_color])
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
P.update_node_icon()
return
if(EATING_MODE) //Eating pipes
@@ -558,21 +579,39 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 2, target = A))
activate()
var/obj/item/pipe/P = new (A, pipe_type=queued_p_type, dir=queued_p_dir)
P.flipped = queued_p_flipped
var/pipe_item_type = /obj/item/pipe
var/obj/machinery/atmospherics/cached_pipe = SSair.get_pipe_cache(queued_p_type)
if(istype(cached_pipe) && cached_pipe.construction_type)
pipe_item_type = cached_pipe.construction_type
var/obj/item/pipe/P = new pipe_item_type(A, queued_p_type, queued_p_dir)
if(queued_p_flipped)
var/obj/item/pipe/trinary/flippable/F = P
F.flipped = queued_p_flipped
P.update()
P.add_fingerprint(usr)
if(!isnull(temp_piping_layer))
P.setPipingLayer(temp_piping_layer)
else
P.setPipingLayer(piping_layer)
if(METER_MODE) //Making pipe meters
to_chat(user, "<span class='notice'>You start building a meter...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 2, target = A))
activate()
new /obj/item/pipe_meter(A)
var/obj/item/pipe_meter/PM = new /obj/item/pipe_meter(get_turf(A))
if(!isnull(temp_piping_layer))
PM.setAttachLayer(temp_piping_layer)
else
PM.setAttachLayer(piping_layer)
if(DISPOSALS_MODE) //Making disposals pipes
if(isclosedturf(A))
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
to_chat(user, "<span class='warning'>\the [src]'s error light flickers; there's something in the way!</span>")
return
to_chat(user, "<span class='notice'>You start building a disposals pipe...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
@@ -597,12 +636,6 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
/obj/item/pipe_dispenser/proc/activate()
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
#undef PIPE_BINARY
#undef PIPE_BENT
#undef PIPE_TRINARY
#undef PIPE_TRIN_M
#undef PIPE_UNARY
#undef PIPE_QUAD
#undef PAINT_MODE
#undef EATING_MODE
#undef ATMOS_MODE
+3 -3
View File
@@ -135,9 +135,9 @@ RSF
/obj/item/cookiesynth/emag_act(mob/user)
emagged = !emagged
if(emagged)
to_chat(user, "<span class='warning'>You short out the [src]'s reagent safety checker!</span>")
to_chat(user, "<span class='warning'>You short out [src]'s reagent safety checker!</span>")
else
to_chat(user, "<span class='warning'>You reset the [src]'s reagent safety checker!</span>")
to_chat(user, "<span class='warning'>You reset [src]'s reagent safety checker!</span>")
toxin = 0
/obj/item/cookiesynth/attack_self(mob/user)
@@ -166,7 +166,7 @@ RSF
if (!(istype(A, /obj/structure/table) || isfloorturf(A)))
return
if(matter < 1)
to_chat(user, "<span class='warning'>The [src] doesn't have enough matter left. Wait for it to recharge!</span>")
to_chat(user, "<span class='warning'>[src] doesn't have enough matter left. Wait for it to recharge!</span>")
return
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
+126 -126
View File
@@ -1,126 +1,126 @@
/obj/item/airlock_painter
name = "airlock painter"
desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob."
icon = 'icons/obj/objects.dmi'
icon_state = "paint sprayer"
item_state = "paint sprayer"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50, MAT_GLASS=50)
origin_tech = "engineering=2"
flags_1 = CONDUCT_1 | NOBLUDGEON_1
slot_flags = SLOT_BELT
var/obj/item/device/toner/ink = null
/obj/item/airlock_painter/New()
..()
ink = new /obj/item/device/toner(src)
//This proc doesn't just check if the painter can be used, but also uses it.
//Only call this if you are certain that the painter will be used right after this check!
/obj/item/airlock_painter/proc/use(mob/user)
if(can_use(user))
ink.charges--
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1)
return 1
else
return 0
//This proc only checks if the painter can be used.
//Call this if you don't want the painter to be used right after this check, for example
//because you're expecting user input.
/obj/item/airlock_painter/proc/can_use(mob/user)
if(!ink)
to_chat(user, "<span class='notice'>There is no toner cartridge installed in [src]!</span>")
return 0
else if(ink.charges < 1)
to_chat(user, "<span class='notice'>[src] is out of ink!</span>")
return 0
else
return 1
/obj/item/airlock_painter/suicide_act(mob/user)
var/obj/item/organ/lungs/L = user.getorganslot("lungs")
if(can_use(user) && L)
user.visible_message("<span class='suicide'>[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
use(user)
// Once you've inhaled the toner, you throw up your lungs
// and then die.
// Find out if there is an open turf in front of us,
// and if not, pick the turf we are standing on.
var/turf/T = get_step(get_turf(src), user.dir)
if(!isopenturf(T))
T = get_turf(src)
// they managed to lose their lungs between then and
// now. Good job.
if(!L)
return OXYLOSS
L.Remove(user)
// make some colorful reagent, and apply it to the lungs
L.create_reagents(10)
L.reagents.add_reagent("colorful_reagent", 10)
L.reagents.reaction(L, TOUCH, 1)
// TODO maybe add some colorful vomit?
user.visible_message("<span class='suicide'>[user] vomits out their [L]!</span>")
playsound(user.loc, 'sound/effects/splat.ogg', 50, 1)
L.forceMove(T)
return (TOXLOSS|OXYLOSS)
else if(can_use(user) && !L)
user.visible_message("<span class='suicide'>[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
user.reagents.add_reagent("colorful_reagent", 1)
user.reagents.reaction(user, TOUCH, 1)
return TOXLOSS
else
user.visible_message("<span class='suicide'>[user] is trying to inhale toner from [src]! It might be a suicide attempt if [src] had any toner.</span>")
return SHAME
/obj/item/airlock_painter/examine(mob/user)
..()
if(!ink)
to_chat(user, "<span class='notice'>It doesn't have a toner cartridge installed.</span>")
return
var/ink_level = "high"
if(ink.charges < 1)
ink_level = "empty"
else if((ink.charges/ink.max_charges) <= 0.25) //25%
ink_level = "low"
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
ink_level = "dangerously high"
to_chat(user, "<span class='notice'>Its ink levels look [ink_level].</span>")
/obj/item/airlock_painter/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/device/toner))
if(ink)
to_chat(user, "<span class='notice'>[src] already contains \a [ink].</span>")
return
if(!user.transferItemToLoc(W, src))
return
to_chat(user, "<span class='notice'>You install [W] into [src].</span>")
ink = W
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
else
return ..()
/obj/item/airlock_painter/attack_self(mob/user)
if(ink)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
ink.loc = user.loc
user.put_in_hands(ink)
to_chat(user, "<span class='notice'>You remove [ink] from [src].</span>")
ink = null
/obj/item/airlock_painter
name = "airlock painter"
desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob."
icon = 'icons/obj/objects.dmi'
icon_state = "paint sprayer"
item_state = "paint sprayer"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50, MAT_GLASS=50)
origin_tech = "engineering=2"
flags_1 = CONDUCT_1 | NOBLUDGEON_1
slot_flags = SLOT_BELT
var/obj/item/device/toner/ink = null
/obj/item/airlock_painter/New()
..()
ink = new /obj/item/device/toner(src)
//This proc doesn't just check if the painter can be used, but also uses it.
//Only call this if you are certain that the painter will be used right after this check!
/obj/item/airlock_painter/proc/use(mob/user)
if(can_use(user))
ink.charges--
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1)
return 1
else
return 0
//This proc only checks if the painter can be used.
//Call this if you don't want the painter to be used right after this check, for example
//because you're expecting user input.
/obj/item/airlock_painter/proc/can_use(mob/user)
if(!ink)
to_chat(user, "<span class='notice'>There is no toner cartridge installed in [src]!</span>")
return 0
else if(ink.charges < 1)
to_chat(user, "<span class='notice'>[src] is out of ink!</span>")
return 0
else
return 1
/obj/item/airlock_painter/suicide_act(mob/user)
var/obj/item/organ/lungs/L = user.getorganslot(ORGAN_SLOT_LUNGS)
if(can_use(user) && L)
user.visible_message("<span class='suicide'>[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
use(user)
// Once you've inhaled the toner, you throw up your lungs
// and then die.
// Find out if there is an open turf in front of us,
// and if not, pick the turf we are standing on.
var/turf/T = get_step(get_turf(src), user.dir)
if(!isopenturf(T))
T = get_turf(src)
// they managed to lose their lungs between then and
// now. Good job.
if(!L)
return OXYLOSS
L.Remove(user)
// make some colorful reagent, and apply it to the lungs
L.create_reagents(10)
L.reagents.add_reagent("colorful_reagent", 10)
L.reagents.reaction(L, TOUCH, 1)
// TODO maybe add some colorful vomit?
user.visible_message("<span class='suicide'>[user] vomits out their [L]!</span>")
playsound(user.loc, 'sound/effects/splat.ogg', 50, 1)
L.forceMove(T)
return (TOXLOSS|OXYLOSS)
else if(can_use(user) && !L)
user.visible_message("<span class='suicide'>[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
user.reagents.add_reagent("colorful_reagent", 1)
user.reagents.reaction(user, TOUCH, 1)
return TOXLOSS
else
user.visible_message("<span class='suicide'>[user] is trying to inhale toner from [src]! It might be a suicide attempt if [src] had any toner.</span>")
return SHAME
/obj/item/airlock_painter/examine(mob/user)
..()
if(!ink)
to_chat(user, "<span class='notice'>It doesn't have a toner cartridge installed.</span>")
return
var/ink_level = "high"
if(ink.charges < 1)
ink_level = "empty"
else if((ink.charges/ink.max_charges) <= 0.25) //25%
ink_level = "low"
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
ink_level = "dangerously high"
to_chat(user, "<span class='notice'>Its ink levels look [ink_level].</span>")
/obj/item/airlock_painter/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/device/toner))
if(ink)
to_chat(user, "<span class='notice'>[src] already contains \a [ink].</span>")
return
if(!user.transferItemToLoc(W, src))
return
to_chat(user, "<span class='notice'>You install [W] into [src].</span>")
ink = W
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
else
return ..()
/obj/item/airlock_painter/attack_self(mob/user)
if(ink)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
ink.loc = user.loc
user.put_in_hands(ink)
to_chat(user, "<span class='notice'>You remove [ink] from [src].</span>")
ink = null
+1 -1
View File
@@ -83,7 +83,7 @@
// APC HULL
/obj/item/wallframe/apc
name = "\improper APC frame"
desc = "Used for repairing or building APCs"
desc = "Used for repairing or building APCs."
icon_state = "apc"
result_path = /obj/machinery/power/apc
inverse = 1
@@ -67,6 +67,8 @@
push_over()
/obj/item/cardboard_cutout/bullet_act(obj/item/projectile/P)
if(istype(P, /obj/item/projectile/bullet/reusable))
P.on_hit(src, 0)
visible_message("<span class='danger'>[src] has been hit by [P]!</span>")
playsound(src, 'sound/weapons/slice.ogg', 50, 1)
if(prob(P.damage))
+4 -4
View File
@@ -224,7 +224,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/centcom
name = "\improper CentCom ID"
desc = "An ID straight from Cent. Com."
desc = "An ID straight from Central Command."
icon_state = "centcom"
registered_name = "Central Command"
assignment = "General"
@@ -235,7 +235,7 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/ert
name = "\improper CentCom ID"
desc = "A ERT ID card"
desc = "An ERT ID card."
icon_state = "centcom"
registered_name = "Emergency Response Team Commander"
assignment = "Emergency Response Team Commander"
@@ -351,6 +351,6 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/away/old/apc
name = "APC Access ID"
desc = "Special ID card to allow access to APCs"
desc = "Special ID card to allow access to APCs."
icon_state = "centcom"
access = list(ACCESS_ENGINE_EQUIP)
access = list(ACCESS_ENGINE_EQUIP)
+1 -1
View File
@@ -5,7 +5,7 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll2"
desc = "An official document entrusting the governance of the station \
and surrounding space to the Captain. "
and surrounding space to the Captain."
var/used = FALSE
var/name_type = "station"
+3 -3
View File
@@ -240,9 +240,9 @@
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
var/datum/gas_mixture/GM = new
GM.assert_gases("o2","n2")
GM.gases["o2"][MOLES] = MOLES_O2STANDARD
GM.gases["n2"][MOLES] = MOLES_N2STANDARD
GM.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
GM.gases[/datum/gas/oxygen][MOLES] = MOLES_O2STANDARD
GM.gases[/datum/gas/nitrogen][MOLES] = MOLES_N2STANDARD
GM.temperature = T20C
return GM
+17 -16
View File
@@ -77,11 +77,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
if(lit && cig && user.a_intent == INTENT_HELP)
if(cig.lit)
to_chat(user, "<span class='notice'>The [cig.name] is already lit.</span>")
to_chat(user, "<span class='notice'>[cig] is already lit.</span>")
if(M == user)
cig.attackby(src, user)
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
cig.light("<span class='notice'>[user] holds [src] out for [M], and lights [cig].</span>")
else
..()
@@ -301,6 +301,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
item_state = "spliffoff"
smoketime = 180
chem_volume = 50
list_reagents = null
/obj/item/clothing/mask/cigarette/rollie/New()
..()
@@ -627,7 +628,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
//VAPE NATION//
///////////////
/obj/item/clothing/mask/vape
name = "E-Cigarette"
name = "\improper E-Cigarette"
desc = "A classy and highly sophisticated electronic cigarette, for classy and dignified gentlemen. A warning label reads \"Warning: Do not fill with flammable materials.\""//<<< i'd vape to that.
icon = 'icons/obj/clothing/masks.dmi'
icon_state = null
@@ -659,23 +660,23 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(reagents.total_volume < chem_volume)
if(O.reagents.total_volume > 0)
O.reagents.trans_to(src,25)
to_chat(user, "<span class='notice'>You add the contents of [O] to the [src]</span>")
to_chat(user, "<span class='notice'>You add the contents of [O] to [src].</span>")
else
to_chat(user, "<span class='warning'>The [O] is empty!</span>")
to_chat(user, "<span class='warning'>[O] is empty!</span>")
else
to_chat(user, "<span class='warning'>[src] can't hold anymore reagents!</span>")
if(istype(O, /obj/item/screwdriver))
if(!screw)
screw = 1
to_chat(user, "<span class='notice'>You open the cap on the [src]</span>")
to_chat(user, "<span class='notice'>You open the cap on [src].</span>")
if(super)
add_overlay("vapeopen_med")
else
add_overlay("vapeopen_low")
else
screw = 0
to_chat(user, "<span class='notice'>You close the cap on the [src]</span>")
to_chat(user, "<span class='notice'>You close the cap on [src].</span>")
cut_overlays()
if(istype(O, /obj/item/device/multitool))
@@ -683,16 +684,16 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!super)
cut_overlays()
super = 1
to_chat(user, "<span class='notice'>You increase the voltage in the [src]</span>")
to_chat(user, "<span class='notice'>You increase the voltage of [src].</span>")
add_overlay("vapeopen_med")
else
cut_overlays()
super = 0
to_chat(user, "<span class='notice'>You decrease the voltage in the [src]</span>")
to_chat(user, "<span class='notice'>You decrease the voltage of [src].</span>")
add_overlay("vapeopen_low")
if(screw && emagged)
to_chat(user, "<span class='notice'>The [name] can't be modified!</span>")
to_chat(user, "<span class='notice'>[src] can't be modified!</span>")
/obj/item/clothing/mask/vape/emag_act(mob/user)// I WON'T REGRET WRITTING THIS, SURLY.
@@ -701,19 +702,19 @@ CIGARETTE PACKETS ARE IN FANCY.DM
cut_overlays()
emagged = TRUE
super = 0
to_chat(user, "<span class='warning'>You maximize the voltage in the [src]</span>")
to_chat(user, "<span class='warning'>You maximize the voltage of [src].</span>")
add_overlay("vapeopen_high")
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect
sp.set_up(5, 1, src)
sp.start()
else
to_chat(user, "<span class='warning'>The [name] is already emagged!</span>")
to_chat(user, "<span class='warning'>[src] is already emagged!</span>")
else
to_chat(user, "<span class='notice'>You need to open the cap to do that</span>")
to_chat(user, "<span class='notice'>You need to open the cap to do that.</span>")
/obj/item/clothing/mask/vape/attack_self(mob/user)
if(reagents.total_volume > 0)
to_chat(user, "<span class='notice'>you empty [src] of all reagents.</span>")
to_chat(user, "<span class='notice'>You empty [src] of all reagents.</span>")
reagents.clear_reagents()
return
@@ -764,7 +765,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!reagents.total_volume)
if(ismob(loc))
to_chat(M, "<span class='notice'>The [name] is empty!</span>")
to_chat(M, "<span class='notice'>[src] is empty!</span>")
STOP_PROCESSING(SSobj, src)
//it's reusable so it won't unequip when empty
return
@@ -788,7 +789,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
sp.set_up(5, 1, src)
sp.start()
to_chat(M, "<span class='userdanger'>The [name] suddenly explodes in your mouth!</span>")
to_chat(M, "<span class='userdanger'>[src] suddenly explodes in your mouth!</span>")
qdel(src)
return
+12 -4
View File
@@ -3,6 +3,7 @@
* Soap
* Bike Horns
* Air Horns
* Canned Laughter
*/
/*
@@ -57,7 +58,8 @@
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))
target.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
if(user.client && ((target in user.client.screen) && !user.is_holding(target)))
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>")
@@ -92,7 +94,6 @@
* Bike Horns
*/
/obj/item/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
@@ -117,6 +118,7 @@
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
return (BRUTELOSS)
//air horn
/obj/item/bikehorn/airhorn
name = "air horn"
desc = "Damn son, where'd you find this?"
@@ -127,18 +129,22 @@
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/airhorn2.ogg'=1), 50)
//golden bikehorn
/obj/item/bikehorn/golden
name = "golden bike horn"
desc = "Golden? Clearly, it's made with bananium! Honk!"
icon_state = "gold_horn"
item_state = "gold_horn"
var/flip_cooldown = 0
/obj/item/bikehorn/golden/attack()
flip_mobs()
if(flip_cooldown < world.time)
flip_mobs()
return ..()
/obj/item/bikehorn/golden/attack_self(mob/user)
flip_mobs()
if(flip_cooldown < world.time)
flip_mobs()
..()
/obj/item/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
@@ -149,7 +155,9 @@
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
M.emote("flip")
flip_cooldown = world.time + 7
//canned laughter
/obj/item/reagent_containers/food/drinks/soda_cans/canned_laughter
name = "Canned Laughter"
desc = "Just looking at this makes you want to giggle."
+10 -11
View File
@@ -31,7 +31,7 @@
var/drawtype
var/text_buffer = ""
var/list/graffiti = list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","body","cyka","arrow","star","poseur tag")
var/list/graffiti = list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","body","cyka","arrow","star","poseur tag","prolizard","antilizard")
var/list/letters = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
var/list/numerals = list("0","1","2","3","4","5","6","7","8","9")
var/list/oriented = list("arrow","body") // These turn to face the same way as the drawer
@@ -78,10 +78,6 @@
if(name == "crayon")
name = "[item_color] crayon"
if(CONFIG_GET(flag/join_with_mutant_race))
graffiti |= "antilizard"
graffiti |= "prolizard"
all_drawables = graffiti + letters + numerals + oriented + runes + graffiti_large_h
drawtype = pick(all_drawables)
@@ -148,10 +144,11 @@
ui.open()
/obj/item/toy/crayon/spraycan/AltClick(mob/user)
if(has_cap)
is_capped = !is_capped
to_chat(user, "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>")
update_icon()
if(user.canUseTopic(src, be_close=TRUE))
if(has_cap)
is_capped = !is_capped
to_chat(user, "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>")
update_icon()
/obj/item/toy/crayon/ui_data()
var/list/data = list()
@@ -316,13 +313,15 @@
if(actually_paints)
switch(paint_mode)
if(PAINT_NORMAL)
new /obj/effect/decal/cleanable/crayon(target, paint_color, drawing, temp, graf_rot)
var/obj/effect/decal/cleanable/crayon/C = new(target, paint_color, drawing, temp, graf_rot)
C.add_hiddenprint(user)
affected_turfs += target
if(PAINT_LARGE_HORIZONTAL)
var/turf/left = locate(target.x-1,target.y,target.z)
var/turf/right = locate(target.x+1,target.y,target.z)
if(is_type_in_list(left, validSurfaces) && is_type_in_list(right, validSurfaces))
new /obj/effect/decal/cleanable/crayon(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON)
var/obj/effect/decal/cleanable/crayon/C = new(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON)
C.add_hiddenprint(user)
affected_turfs += left
affected_turfs += right
affected_turfs += target
+5 -2
View File
@@ -286,6 +286,7 @@
var/req_defib = 1
var/combat = 0 //If it penetrates armor and gives additional functionality
var/grab_ghost = FALSE
var/tlimit = DEFIB_TIME_LIMIT * 10
/obj/item/twohanded/shockpaddles/proc/recharge(var/time)
if(req_defib || !time)
@@ -387,11 +388,14 @@
if((!req_defib && grab_ghost) || (req_defib && defib.grab_ghost))
H.notify_ghost_cloning("Your heart is being defibrillated!")
H.grab_ghost() // Shove them back in their body.
else if(!H.suiciding && !(H.disabilities & NOCLONE)&& !H.hellbound)
else if(can_defib(H))
H.notify_ghost_cloning("Your heart is being defibrillated. Re-enter your corpse if you want to be revived!", source = src)
do_help(H, user)
/obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/human/H)
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
return (!H.suiciding && !(H.disabilities & NOCLONE) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain)
/obj/item/twohanded/shockpaddles/proc/do_disarm(mob/living/M, mob/living/user)
if(req_defib && defib.safety)
@@ -481,7 +485,6 @@
var/tplus = world.time - H.timeofdeath
// past this much time the patient is unrecoverable
// (in deciseconds)
var/tlimit = DEFIB_TIME_LIMIT * 10
// brain damage starts setting in on the patient after
// some time left rotting
var/tloss = DEFIB_TIME_LOSS * 10
+2 -1
View File
@@ -16,7 +16,8 @@
to_chat(user, "<span class='notice'>You pet [src]. You swear it looks up at you.</span>")
owner = user
owned = 1
else return ..()
else
return ..()
/obj/item/toy/plush/carpplushie/dehy_carp/proc/Swell()
desc = "It's growing!"
+56 -40
View File
@@ -29,7 +29,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again.
var/font_mode = "font-family:monospace;" //The currently selected font.
var/background_color = "#808000" //The currently selected background color.
#define FONT_MONO "font-family:monospace;"
#define FONT_SHARE "font-family:\"Share Tech Mono\", monospace;letter-spacing:0px;"
#define FONT_ORBITRON "font-family:\"Orbitron\", monospace;letter-spacing:0px; font-size:15px"
@@ -71,6 +71,8 @@ GLOBAL_LIST_EMPTY(PDAs)
var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above.
var/overlays_x_offset = 0 //x offset to use for certain overlays
var/underline_flag = TRUE //flag for underline
/obj/item/device/pda/examine(mob/user)
..()
if(!id && !inserted_item)
@@ -162,34 +164,36 @@ GLOBAL_LIST_EMPTY(PDAs)
hidden_uplink.interact(user)
return
var/dat = "<!DOCTYPE html><html><head><title>Personal Data Assistant</title><link href=\"https://fonts.googleapis.com/css?family=Orbitron|Share+Tech+Mono|VT323\" rel=\"stylesheet\"></head><body bgcolor=\"" + background_color + "\"><style>body{" + font_mode + "}ul,ol{list-style-type: none;}a, a:link, a:visited, a:active, a:hover { color: #000000;text-decoration:none; }img {border-style:none;}</style>"
var/dat = "<!DOCTYPE html><html><head><title>Personal Data Assistant</title><link href=\"https://fonts.googleapis.com/css?family=Orbitron|Share+Tech+Mono|VT323\" rel=\"stylesheet\"></head><body bgcolor=\"" + background_color + "\"><style>body{" + font_mode + "}ul,ol{list-style-type: none;}a, a:link, a:visited, a:active, a:hover { color: #000000;text-decoration:none; }img {border-style:none;}a img{padding-right: 9px;}</style>"
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Refresh</a>"
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png>Refresh</a>"
if ((!isnull(cartridge)) && (mode == 0))
dat += " | <a href='byond://?src=\ref[src];choice=Eject'><img src=pda_eject.png> Eject [cartridge]</a>"
dat += " | <a href='byond://?src=\ref[src];choice=Eject'><img src=pda_eject.png>Eject [cartridge]</a>"
if (mode)
dat += " | <a href='byond://?src=\ref[src];choice=Return'><img src=pda_menu.png> Return</a>"
dat += " | <a href='byond://?src=\ref[src];choice=Return'><img src=pda_menu.png>Return</a>"
if (mode == 0)
dat += "<div align=\"center\">"
dat += "<br><a href='byond://?src=\ref[src];choice=Toggle_Font'>Toggle Font</a>"
dat += " | <a href='byond://?src=\ref[src];choice=Change_Color'>Change Color</a>"
dat += " | <a href='byond://?src=\ref[src];choice=Toggle_Underline'>Toggle Underline</a>" //underline button
dat += "</div>"
dat += "<br>"
if (!owner)
dat += "Warning: No owner information entered. Please swipe card.<br><br>"
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png> Retry</a>"
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=pda_refresh.png>Retry</a>"
else
switch (mode)
if (0)
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
dat += "Owner: [owner], [ownjob]<br>"
dat += text("ID: <A href='?src=\ref[src];choice=Authenticate'>[id ? "[id.registered_name], [id.assignment]" : "----------"]")
dat += text("<br><A href='?src=\ref[src];choice=UpdateInfo'>[id ? "Update PDA Info" : ""]</A><br><br>")
dat += text("ID: <a href='?src=\ref[src];choice=Authenticate'>[id ? "[id.registered_name], [id.assignment]" : "----------"]")
dat += text("<br><a href='?src=\ref[src];choice=UpdateInfo'>[id ? "Update PDA Info" : ""]</A><br><br>")
dat += "[worldtime2text()]<br>" //:[world.time / 100 % 6][world.time / 100 % 10]"
dat += "[time2text(world.realtime, "MMM DD")] [GLOB.year_integer+540]"
@@ -198,38 +202,38 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += "<h4>General Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=pda_notes.png> Notekeeper</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=pda_mail.png> Messenger</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=pda_notes.png>Notekeeper</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=pda_mail.png>Messenger</a></li>"
if (cartridge)
if (cartridge.access & CART_CLOWN)
dat += "<li><a href='byond://?src=\ref[src];choice=Honk'><img src=pda_honk.png> Honk Synthesizer</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Trombone'><img src=pda_honk.png> Sad Trombone</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Honk'><img src=pda_honk.png>Honk Synthesizer</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Trombone'><img src=pda_honk.png>Sad Trombone</a></li>"
if (cartridge.access & CART_MANIFEST)
dat += "<li><a href='byond://?src=\ref[src];choice=41'><img src=pda_notes.png> View Crew Manifest</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=41'><img src=pda_notes.png>View Crew Manifest</a></li>"
if(cartridge.access & CART_STATUS_DISPLAY)
dat += "<li><a href='byond://?src=\ref[src];choice=42'><img src=pda_status.png> Set Status Display</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=42'><img src=pda_status.png>Set Status Display</a></li>"
dat += "</ul>"
if (cartridge.access & CART_ENGINE)
dat += "<h4>Engineering Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=43'><img src=pda_power.png> Power Monitor</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=43'><img src=pda_power.png>Power Monitor</a></li>"
dat += "</ul>"
if (cartridge.access & CART_MEDICAL)
dat += "<h4>Medical Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=44'><img src=pda_medical.png> Medical Records</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Medical Scan'><img src=pda_scanner.png> [scanmode == 1 ? "Disable" : "Enable"] Medical Scanner</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=44'><img src=pda_medical.png>Medical Records</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Medical Scan'><img src=pda_scanner.png>[scanmode == 1 ? "Disable" : "Enable"] Medical Scanner</a></li>"
dat += "</ul>"
if (cartridge.access & CART_SECURITY)
dat += "<h4>Security Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=45'><img src=pda_cuffs.png> Security Records</A></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=45'><img src=pda_cuffs.png>Security Records</A></li>"
dat += "</ul>"
if(cartridge.access & CART_QUARTERMASTER)
dat += "<h4>Quartermaster Functions:</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=47'><img src=pda_crate.png> Supply Records</A></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=47'><img src=pda_crate.png>Supply Records</A></li>"
dat += "</ul>"
dat += "</ul>"
@@ -237,25 +241,25 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += "<ul>"
if (cartridge)
if(cartridge.bot_access_flags)
dat += "<li><a href='byond://?src=\ref[src];choice=54'><img src=pda_medbot.png> Bots Access</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=54'><img src=pda_medbot.png>Bots Access</a></li>"
if (cartridge.access & CART_JANITOR)
dat += "<li><a href='byond://?src=\ref[src];choice=49'><img src=pda_bucket.png> Custodial Locator</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=49'><img src=pda_bucket.png>Custodial Locator</a></li>"
if (istype(cartridge.radio, /obj/item/radio/integrated/signal))
dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png> Signaler System</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png>Signaler System</a></li>"
if (cartridge.access & CART_NEWSCASTER)
dat += "<li><a href='byond://?src=\ref[src];choice=53'><img src=pda_notes.png> Newscaster Access </a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=53'><img src=pda_notes.png>Newscaster Access </a></li>"
if (cartridge.access & CART_REAGENT_SCANNER)
dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><img src=pda_reagent.png> [scanmode == 3 ? "Disable" : "Enable"] Reagent Scanner</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><img src=pda_reagent.png>[scanmode == 3 ? "Disable" : "Enable"] Reagent Scanner</a></li>"
if (cartridge.access & CART_ENGINE)
dat += "<li><a href='byond://?src=\ref[src];choice=Halogen Counter'><img src=pda_reagent.png> [scanmode == 4 ? "Disable" : "Enable"] Halogen Counter</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Halogen Counter'><img src=pda_reagent.png>[scanmode == 4 ? "Disable" : "Enable"] Halogen Counter</a></li>"
if (cartridge.access & CART_ATMOS)
dat += "<li><a href='byond://?src=\ref[src];choice=Gas Scan'><img src=pda_reagent.png> [scanmode == 5 ? "Disable" : "Enable"] Gas Scanner</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Gas Scan'><img src=pda_reagent.png>[scanmode == 5 ? "Disable" : "Enable"] Gas Scanner</a></li>"
if (cartridge.access & CART_REMOTE_DOOR)
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png> Toggle Remote Door</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png>Toggle Remote Door</a></li>"
if (cartridge.access & CART_DRONEPHONE)
dat += "<li><a href='byond://?src=\ref[src];choice=Drone Phone'><img src=pda_dronephone.png> Drone Phone</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png> Atmospheric Scan</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Light'><img src=pda_flashlight.png> [fon ? "Disable" : "Enable"] Flashlight</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Drone Phone'><img src=pda_dronephone.png>Drone Phone</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png>Atmospheric Scan</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Light'><img src=pda_flashlight.png>[fon ? "Disable" : "Enable"] Flashlight</a></li>"
if (pai)
if(pai.loc != src)
pai = null
@@ -274,10 +278,10 @@ GLOBAL_LIST_EMPTY(PDAs)
if (2)
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.6</h4>"
dat += "<a href='byond://?src=\ref[src];choice=Toggle Ringer'><img src=pda_bell.png> Ringer: [silent == 1 ? "Off" : "On"]</a> | "
dat += "<a href='byond://?src=\ref[src];choice=Toggle Messenger'><img src=pda_mail.png> Send / Receive: [toff == 1 ? "Off" : "On"]</a> | "
dat += "<a href='byond://?src=\ref[src];choice=Ringtone'><img src=pda_bell.png> Set Ringtone</a> | "
dat += "<a href='byond://?src=\ref[src];choice=21'><img src=pda_mail.png> Messages</a><br>"
dat += "<a href='byond://?src=\ref[src];choice=Toggle Ringer'><img src=pda_bell.png>Ringer: [silent == 1 ? "Off" : "On"]</a> | "
dat += "<a href='byond://?src=\ref[src];choice=Toggle Messenger'><img src=pda_mail.png>Send / Receive: [toff == 1 ? "Off" : "On"]</a> | "
dat += "<a href='byond://?src=\ref[src];choice=Ringtone'><img src=pda_bell.png>Set Ringtone</a> | "
dat += "<a href='byond://?src=\ref[src];choice=21'><img src=pda_mail.png>Messages</a><br>"
if(cartridge)
dat += cartridge.message_header()
@@ -304,7 +308,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if(21)
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.6</h4>"
dat += "<a href='byond://?src=\ref[src];choice=Clear'><img src=pda_blank.png> Clear Messages</a>"
dat += "<a href='byond://?src=\ref[src];choice=Clear'><img src=pda_blank.png>Clear Messages</a>"
dat += "<h4><img src=pda_mail.png> Messages</h4>"
@@ -338,6 +342,12 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += cartridge.generate_menu()
dat += "</body></html>"
if (underline_flag)
dat = replacetext(dat, "text-decoration:none", "text-decoration:underline")
if (!underline_flag)
dat = replacetext(dat, "text-decoration:underline", "text-decoration:none")
user << browse(dat, "window=pda;size=400x450;border=1;can_resize=1;can_minimize=0")
onclose(user, "pda", src)
@@ -355,7 +365,7 @@ GLOBAL_LIST_EMPTY(PDAs)
//BASIC FUNCTIONS===================================
if("Refresh")//Refresh, goes to the end of the proc.
if ("Toggle_Font")
//CODE REVISION 2
font_index = (font_index + 1) % 4
@@ -373,6 +383,9 @@ GLOBAL_LIST_EMPTY(PDAs)
var/new_color = input("Please enter a color name or hex value (Default is \'#808000\').")as color
background_color = new_color
if ("Toggle_Underline")
underline_flag = !underline_flag
if("Return")//Return
if(mode<=9)
mode = 0
@@ -604,7 +617,7 @@ GLOBAL_LIST_EMPTY(PDAs)
P.show_recieved_message(msg,src)
if(!multiple)
show_to_ghosts(user,msg)
log_talk(user,"[key_name(user)] (PDA: [initial(name)]) sent \"[message]\" to [key_name(P,null,TRUE)]",LOGPDA)
log_talk(user,"[key_name(user)] (PDA: [initial(name)]) sent \"[message]\" to [P.name]",LOGPDA)
else
if(!multiple)
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
@@ -836,7 +849,8 @@ GLOBAL_LIST_EMPTY(PDAs)
user.show_message("<span class='notice'>No radiation detected.</span>")
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
switch(scanmode)
if(3)
@@ -886,7 +900,8 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/device/pda/proc/explode() //This needs tuning.
if(!detonatable) return
if(!detonatable)
return
var/turf/T = get_turf(src)
if (ismob(loc))
@@ -998,5 +1013,6 @@ GLOBAL_LIST_EMPTY(PDAs)
. = list()
// Returns a list of PDAs which can be viewed from another PDA/message monitor.
for(var/obj/item/device/pda/P in GLOB.PDAs)
if(!P.owner || P.toff || P.hidden) continue
if(!P.owner || P.toff || P.hidden)
continue
. += P
+2 -1
View File
@@ -202,7 +202,8 @@
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
if(!frequency) return
if(!frequency)
return
var/datum/signal/status_signal = new
status_signal.source = src
@@ -20,7 +20,7 @@
/obj/item/cartridge/virus/clown
name = "\improper Honkworks 5.0 cartridge"
icon_state = "cart-clown"
desc = "A data cartridge for portable microcomputers. It smells vaguely of banannas"
desc = "A data cartridge for portable microcomputers. It smells vaguely of bananas."
access = CART_CLOWN
/obj/item/cartridge/virus/clown/send_virus(obj/item/device/pda/target, mob/living/U)
@@ -15,7 +15,7 @@
throw_speed = 4
throw_range = 20
origin_tech = "syndicate=1;engineering=3"
flags_1 = NOBLUDGEON_1
flags_1 = NOBLUDGEON_1
var/obj/machinery/camera/current = null
@@ -124,7 +124,8 @@
// 15 second intervals ~ 1/4 minute
var/m = round(time_diff/4)
var/s = (time_diff - 4*m) * 15
if(!s) s = "00"
if(!s)
s = "00"
html += "Last seen near [outstring] ([m]:[s] minute\s ago)<br>"
if( C && (C.bug == src)) //Checks to see if the camera has a bug
html += "<a href='?src=\ref[src];emp=\ref[C]'>\[Disable\]</a>"
@@ -218,7 +219,7 @@
var/list/cameras = flatten_list(bugged_cameras)
var/obj/machinery/camera/C = locate(href_list["emp"]) in cameras
if(C && istype(C) && C.bug == src)
C.emp_act(EMP_HEAVY)
C.emp_act(EMP_HEAVY)
C.bug = null
bugged_cameras -= C.c_tag
interact()
@@ -32,7 +32,8 @@
toggle()
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
if(!check_sprite(target))
return
if(!active_dummy)
@@ -51,7 +52,8 @@
return FALSE
/obj/item/device/chameleon/proc/toggle()
if(!can_use || !saved_appearance) return
if(!can_use || !saved_appearance)
return
if(active_dummy)
eject_all()
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
@@ -65,6 +67,7 @@
C.activate(usr, saved_appearance, src)
to_chat(usr, "<span class='notice'>You activate \the [src].</span>")
new /obj/effect/temp_visual/emp/pulse(get_turf(src))
usr.cancel_camera()
/obj/item/device/chameleon/proc/disrupt(delete_dummy = 1)
if(active_dummy)
@@ -69,7 +69,7 @@
to_chat(user, "<span class='notice'>You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>")
return
var/obj/item/organ/eyes/E = M.getorganslot("eye_sight")
var/obj/item/organ/eyes/E = M.getorganslot(ORGAN_SLOT_EYES)
if(!E)
to_chat(user, "<span class='danger'>[M] doesn't have any eyes!</span>")
return
@@ -210,6 +210,7 @@
item_state = "lamp"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
force = 10
brightness_on = 5
w_class = WEIGHT_CLASS_BULKY
flags_1 = CONDUCT_1
@@ -1,8 +1,12 @@
#define RAD_LEVEL_NORMAL 10
#define RAD_LEVEL_MODERATE 30
#define RAD_LEVEL_HIGH 75
#define RAD_LEVEL_VERY_HIGH 125
#define RAD_LEVEL_CRITICAL 200
#define RAD_LEVEL_NORMAL 9
#define RAD_LEVEL_MODERATE 100
#define RAD_LEVEL_HIGH 400
#define RAD_LEVEL_VERY_HIGH 800
#define RAD_LEVEL_CRITICAL 1500
#define RAD_MEASURE_SMOOTHING 5
#define RAD_GRACE_PERIOD 2
/obj/item/device/geiger_counter //DISCLAIMER: I know nothing about how real-life Geiger counters work. This will not be realistic. ~Xhuis
name = "geiger counter"
@@ -14,25 +18,48 @@
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
var/scanning = 0
var/radiation_count = 0
/obj/item/device/geiger_counter/New()
..()
var/grace = RAD_GRACE_PERIOD
var/datum/looping_sound/geiger/soundloop
var/scanning = FALSE
var/radiation_count = 0
var/current_tick_amount = 0
var/last_tick_amount = 0
var/fail_to_receive = 0
var/current_warning = 1
/obj/item/device/geiger_counter/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
soundloop = new(list(src), FALSE)
/obj/item/device/geiger_counter/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/device/geiger_counter/process()
if(emagged)
if(radiation_count < 20)
radiation_count++
return 0
if(radiation_count > 0)
radiation_count--
update_icon()
update_icon()
update_sound()
if(!scanning)
current_tick_amount = 0
return
radiation_count -= radiation_count/RAD_MEASURE_SMOOTHING
radiation_count += current_tick_amount/RAD_MEASURE_SMOOTHING
if(current_tick_amount)
grace = RAD_GRACE_PERIOD
last_tick_amount = current_tick_amount
else if(!emagged)
grace--
if(grace <= 0)
radiation_count = 0
current_tick_amount = 0
/obj/item/device/geiger_counter/examine(mob/user)
..()
@@ -56,6 +83,8 @@
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
to_chat(user, "<span class='boldannounce'>Ambient radiation levels above critical level!</span>")
to_chat(user, "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>")
/obj/item/device/geiger_counter/update_icon()
if(!scanning)
icon_state = "geiger_off"
@@ -78,20 +107,21 @@
icon_state = "geiger_on_5"
..()
/obj/item/device/geiger_counter/proc/update_sound()
var/datum/looping_sound/geiger/loop = soundloop
if(!scanning)
loop.stop()
return
if(!radiation_count)
loop.stop()
return
loop.last_radiation = radiation_count
loop.start()
/obj/item/device/geiger_counter/rad_act(amount)
if(!amount && scanning)
return 0
if(emagged)
amount = Clamp(amount, 0, 25) //Emagged geiger counters can only accept 25 radiation at a time
radiation_count += amount
if(isliving(loc))
var/mob/living/M = loc
if(!emagged)
to_chat(M, "<span class='boldannounce'>[icon2html(src, M)] RADIATION PULSE DETECTED.</span>")
to_chat(M, "<span class='boldannounce'>[icon2html(src, M)] Severity: [amount]</span>")
else
to_chat(M, "<span class='boldannounce'>[icon2html(src, M)] !@%$AT!(N P!LS! D/TEC?ED.</span>")
to_chat(M, "<span class='boldannounce'>[icon2html(src, M)] &!F2rity: <=[amount]#1</span>")
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
return
current_tick_amount += amount
update_icon()
/obj/item/device/geiger_counter/attack_self(mob/user)
@@ -103,12 +133,7 @@
if(user.a_intent == INTENT_HELP)
if(!emagged)
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='notice'>You scan [M]'s radiation levels with [src]...</span>")
if(!M.radiation)
to_chat(user, "<span class='notice'>[icon2html(src, user)] Radiation levels within normal boundaries.</span>")
return 1
else
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation].</span>")
return 1
addtimer(CALLBACK(src, .proc/scan, M, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
else
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='danger'>You project [src]'s stored radiation into [M]'s body!</span>")
M.rad_act(radiation_count)
@@ -116,6 +141,28 @@
return 1
..()
/obj/item/device/geiger_counter/proc/scan(atom/A, mob/user)
var/rad_strength = 0
for(var/i in get_rad_contents(A)) // Yes it's intentional that you can't detect radioactive things under rad protection. Gives traitors a way to hide their glowing green rocks.
var/atom/thing = i
if(!thing)
continue
var/datum/component/radioactive/radiation = thing.GetComponent(/datum/component/radioactive)
if(radiation)
rad_strength += radiation.strength
if(isliving(A))
var/mob/living/M = A
if(!M.radiation)
to_chat(user, "<span class='notice'>[icon2html(src, user)] Radiation levels within normal boundaries.</span>")
else
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation].</span>")
if(rad_strength)
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject has irradiated objects on them. Radioactive strength: [rad_strength]</span>")
else
to_chat(user, "<span class='notice'>[icon2html(src, user)] Subject is free of radioactive contamination.</span>")
/obj/item/device/geiger_counter/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver) && emagged)
if(scanning)
+2 -9
View File
@@ -124,6 +124,8 @@ GLOBAL_LIST_EMPTY(GPS_list)
a = copytext(sanitize(a), 1, 20)
gpstag = a
. = TRUE
name = "global positioning system ([gpstag])"
if("power")
toggletracking(usr)
. = TRUE
@@ -134,15 +136,6 @@ GLOBAL_LIST_EMPTY(GPS_list)
global_mode = !global_mode
. = TRUE
/obj/item/device/gps/Topic(href, href_list)
..()
if(href_list["tag"] )
var/a = input("Please enter desired tag.", name, gpstag) as text
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
icon_state = "gps-s"
+60 -3
View File
@@ -2,6 +2,7 @@
/obj/item/device/instrument
name = "generic instrument"
resistance_flags = FLAMMABLE
force = 10
max_integrity = 100
icon = 'icons/obj/musician.dmi'
lefthand_file = 'icons/mob/inhands/equipment/instruments_lefthand.dmi'
@@ -49,7 +50,6 @@
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon_state = "violin"
item_state = "violin"
force = 10
hitsound = "swing_hit"
instrumentId = "violin"
@@ -80,7 +80,6 @@
icon_state = "guitar"
item_state = "guitar"
instrumentExt = "ogg"
force = 10
attack_verb = list("played metal on", "serenaded", "crashed", "smashed")
hitsound = 'sound/weapons/stringsmash.ogg'
instrumentId = "guitar"
@@ -110,6 +109,30 @@
item_state = "accordion"
instrumentId = "accordion"
/obj/item/device/instrument/trumpet
name = "trumpet"
desc = "To announce the arrival of the king!"
icon_state = "trumpet"
item_state = "trombone"
instrumentId = "trombone"
/obj/item/device/instrument/trumpet/spectral
name = "spectral trumpet"
desc = "Things are about to get spooky!"
icon_state = "trumpet"
item_state = "trombone"
force = 0
instrumentId = "trombone"
attack_verb = list("played","jazzed","trumpeted","mourned","dooted","spooked")
/obj/item/device/instrument/trumpet/spectral/Initialize()
. = ..()
AddComponent(/datum/component/spooky)
/obj/item/device/instrument/trumpet/spectral/attack(mob/living/carbon/C, mob/user)
playsound (loc, 'sound/instruments/trombone/En4.mid', 100,1,-1)
..()
/obj/item/device/instrument/saxophone
name = "saxophone"
desc = "This soothing sound will be sure to leave your audience in tears."
@@ -117,6 +140,23 @@
item_state = "saxophone"
instrumentId = "saxophone"
/obj/item/device/instrument/saxophone/spectral
name = "spectral saxophone"
desc = "This spooky sound will be sure to leave mortals in bones."
icon_state = "saxophone"
item_state = "saxophone"
instrumentId = "saxophone"
force = 0
attack_verb = list("played","jazzed","saxxed","mourned","dooted","spooked")
/obj/item/device/instrument/saxophone/spectral/Initialize()
. = ..()
AddComponent(/datum/component/spooky)
/obj/item/device/instrument/saxophone/spectral/attack(mob/living/carbon/C, mob/user)
playsound (loc, 'sound/instruments/saxophone/En4.mid', 100,1,-1)
..()
/obj/item/device/instrument/trombone
name = "trombone"
desc = "How can any pool table ever hope to compete?"
@@ -124,9 +164,27 @@
item_state = "trombone"
instrumentId = "trombone"
/obj/item/device/instrument/trombone/spectral
name = "spectral trombone"
desc = "A skeleton's favorite instrument. Apply directly on the mortals."
instrumentId = "trombone"
icon_state = "trombone"
item_state = "trombone"
force = 0
attack_verb = list("played","jazzed","tromboned","mourned","dooted","spooked")
/obj/item/device/instrument/trombone/spectral/Initialize()
. = ..()
AddComponent(/datum/component/spooky)
/obj/item/device/instrument/trombone/spectral/attack(mob/living/carbon/C, mob/user)
playsound (loc, 'sound/instruments/trombone/Cn4.mid', 100,1,-1)
..()
/obj/item/device/instrument/recorder
name = "recorder"
desc = "Just like in school, playing ability and all."
force = 5
icon_state = "recorder"
item_state = "recorder"
instrumentId = "recorder"
@@ -163,4 +221,3 @@
throw_speed = 3
throw_range = 15
hitsound = 'sound/items/bikehorn.ogg'
@@ -52,6 +52,7 @@
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
origin_tech = "magnets=3;engineering=4"
force = 8
var/max_uses = 20
var/uses = 0
@@ -192,7 +193,8 @@
if(target.status != LIGHT_OK)
if(CanUse(U))
if(!Use(U)) return
if(!Use(U))
return
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
if(target.status != LIGHT_EMPTY)
+4 -4
View File
@@ -12,8 +12,8 @@
name = "multitool"
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
icon_state = "multitool"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
force = 5
w_class = WEIGHT_CLASS_SMALL
throwforce = 0
@@ -74,7 +74,7 @@
break
/obj/item/device/multitool/ai_detect/admin
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'" //What else should I say for a meme item?
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'." //What else should I say for a meme item?
track_delay = 5
/obj/item/device/multitool/ai_detect/admin/multitool_detect()
@@ -98,4 +98,4 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "multitool"
toolspeed = 0.1
origin_tech = "magnets=5;engineering=5;abductor=3"
origin_tech = "magnets=5;engineering=5;abductor=3"
+20 -10
View File
@@ -128,16 +128,26 @@
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")
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>")
@@ -122,11 +122,11 @@
channels = list("Service" = 1)
/obj/item/device/encryptionkey/headset_cent
name = "centcom radio encryption key"
desc = "An encryption key for a radio headset. To access the centcom channel, use :y."
name = "\improper CentCom radio encryption key"
desc = "An encryption key for a radio headset. To access the CentCom channel, use :y."
icon_state = "cent_cypherkey"
independent = TRUE
channels = list("CentCom" = 1)
channels = list("CentCom" = 1)
/obj/item/device/encryptionkey/ai //ported from NT, this goes 'inside' the AI.
channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1, "Service" = 1, "AI Private" = 1)
@@ -47,11 +47,11 @@
/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."
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"
flags_2 = BANG_PROTECT_2
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
/obj/item/device/radio/headset/syndicate/alt/leader
name = "team leader headset"
@@ -71,50 +71,50 @@
/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."
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."
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"
flags_2 = BANG_PROTECT_2
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
/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. "
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."
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."
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."
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."
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."
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
@@ -123,75 +123,75 @@
/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."
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."
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"
flags_2 = BANG_PROTECT_2
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
/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."
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."
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."
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"
flags_2 = BANG_PROTECT_2
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
/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."
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."
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."
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."
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."
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."
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."
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
@@ -201,11 +201,11 @@
/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."
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
flags_2 = BANG_PROTECT_2
flags_2 = BANG_PROTECT_2 | NO_EMP_WIRES_2
/obj/item/device/radio/headset/ai
name = "\proper Integrated Subspace Transceiver "
@@ -29,6 +29,7 @@
var/emped = 0 //Highjacked to track the number of consecutive EMPs on the radio, allowing consecutive EMP's to stack properly.
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
flags_1 = CONDUCT_1 | HEAR_1
flags_2 = NO_EMP_WIRES_2
slot_flags = SLOT_BELT
throw_speed = 3
throw_range = 7
@@ -195,9 +196,11 @@
return ITALICS | REDUCE_RANGE
/obj/item/device/radio/proc/talk_into_impl(atom/movable/M, message, channel, list/spans, datum/language/language)
if(!on) return // the device has to be on
if(!on)
return // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
if(!M || !message) return
if(!M || !message)
return
if(wires.is_cut(WIRE_TX))
return
+14 -15
View File
@@ -106,8 +106,8 @@ MASS SPECTROMETER
// Used by the PDA medical scanner too
/proc/healthscan(mob/living/user, mob/living/M, mode = 1, advanced = FALSE)
if(user.incapacitated() || user.eye_blind)
/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE)
if(isliving(user) && (user.incapacitated() || user.eye_blind))
return
//Damage specifics
var/oxy_loss = M.getOxyLoss()
@@ -171,7 +171,7 @@ MASS SPECTROMETER
if(advanced)
if(iscarbon(M))
var/mob/living/carbon/C = M
var/obj/item/organ/ears/ears = C.getorganslot("ears")
var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS)
to_chat(user, "\t<span class='info'><b>==EAR STATUS==</b></span>")
if(istype(ears))
var/healthy = TRUE
@@ -189,7 +189,7 @@ MASS SPECTROMETER
to_chat(user, "\t<span class='info'>Healthy.</span>")
else
to_chat(user, "\t<span class='alert'>Subject does not have ears.</span>")
var/obj/item/organ/eyes/eyes = C.getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES)
to_chat(user, "\t<span class='info'><b>==EYE STATUS==</b></span>")
if(istype(eyes))
var/healthy = TRUE
@@ -280,18 +280,17 @@ MASS SPECTROMETER
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)
if(istype(M))
if(M.reagents)
if(M.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)
for(var/datum/reagent/R in M.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)
if(M.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)
for(var/datum/reagent/R in M.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>")
@@ -358,10 +357,10 @@ MASS SPECTROMETER
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
var/o2_concentration = env_gases[/datum/gas/oxygen][MOLES]/total_moles
var/n2_concentration = env_gases[/datum/gas/nitrogen][MOLES]/total_moles
var/co2_concentration = env_gases[/datum/gas/carbon_dioxide][MOLES]/total_moles
var/plasma_concentration = env_gases[/datum/gas/plasma][MOLES]/total_moles
environment.garbage_collect()
if(abs(n2_concentration - N2STANDARD) < 20)
@@ -241,7 +241,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"] [src].</span>")
active = !active
if(active)
GLOB.active_jammers |= src
@@ -5,7 +5,7 @@
item_state = "ttv"
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
desc = "Regulates the transfer of air between two tanks"
desc = "Regulates the transfer of air between two tanks."
var/obj/item/tank/tank_one
var/obj/item/tank/tank_two
var/obj/item/device/assembly/attached_device
+1 -1
View File
@@ -171,7 +171,7 @@
/obj/item/dnainjector/stuttmut
name = "\improper DNA injector (Stutt.)"
desc = "Makes you s-s-stuttterrr"
desc = "Makes you s-s-stuttterrr."
add_mutations_static = list(NERVOUS)
/obj/item/dnainjector/antistutt
+10 -5
View File
@@ -157,19 +157,24 @@
if(precision)
the_targets -= my_target
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
if(!W)
return
W.reagents = R
R.my_atom = W
if(!W || !src) return
if(!W || !src)
return
src.reagents.trans_to(W,1)
for(var/b=0, b<power, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
if(!W || !W.reagents)
return
W.reagents.reaction(get_turf(W))
for(var/A in get_turf(W))
if(!W) return
if(!W)
return
W.reagents.reaction(A)
if(W.loc == my_target) break
if(W.loc == my_target)
break
sleep(2)
else
+3 -2
View File
@@ -140,6 +140,7 @@
user.put_in_hands(ptank)
ptank = null
to_chat(user, "<span class='notice'>You remove the plasma tank from [src]!</span>")
update_icon()
/obj/item/flamethrower/examine(mob/user)
..()
@@ -201,8 +202,8 @@
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
if(air_transfer.gases["plasma"])
air_transfer.gases["plasma"][MOLES] *= 5
if(air_transfer.gases[/datum/gas/plasma])
air_transfer.gases[/datum/gas/plasma][MOLES] *= 5
target.assume_air(air_transfer)
//Burn it based on transfered gas
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500)
@@ -529,7 +529,7 @@
/obj/item/grenade/chem_grenade/bioterrorfoam
name = "Bio terror foam grenade"
desc = "Tiger Cooperative chemical foam grenade. Causes temporary irration, blindness, confusion, mutism, and mutations to carbon based life forms. Contains additional spore toxin"
desc = "Tiger Cooperative chemical foam grenade. Causes temporary irration, blindness, confusion, mutism, and mutations to carbon based life forms. Contains additional spore toxin."
stage = READY
/obj/item/grenade/chem_grenade/bioterrorfoam/Initialize()
+96 -95
View File
@@ -1,50 +1,50 @@
/obj/item/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"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
throw_speed = 3
throw_range = 7
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
resistance_flags = FLAMMABLE
max_integrity = 40
var/active = 0
var/det_time = 50
var/display_timer = 1
/obj/item/grenade/deconstruct(disassembled = TRUE)
if(!disassembled)
prime()
if(!QDELETED(src))
qdel(src)
/obj/item/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>")
/obj/item/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"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
throw_speed = 3
throw_range = 7
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
resistance_flags = FLAMMABLE
max_integrity = 40
var/active = 0
var/det_time = 50
var/display_timer = 1
/obj/item/grenade/deconstruct(disassembled = TRUE)
if(!disassembled)
prime()
if(!QDELETED(src))
qdel(src)
/obj/item/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>")
preprime(user, 5, FALSE)
return FALSE
return TRUE
/obj/item/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/grenade/attack_self(mob/user)
if(!active)
if(clown_check(user))
preprime(user)
/obj/item/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/grenade/attack_self(mob/user)
if(!active)
if(clown_check(user))
preprime(user)
/obj/item/grenade/proc/log_grenade(mob/user, turf/T)
var/area/A = get_area(T)
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed \a [src] for detonation at [ADMIN_COORDJMP(T)]"
@@ -52,57 +52,58 @@
message_admins(message)
log_game("[key_name(user)] has primed \a [src] for detonation at [A.name] [COORD(T)].")
/obj/item/grenade/proc/preprime(mob/user, delayoverride, msg = TRUE)
/obj/item/grenade/proc/preprime(mob/user, delayoverride, msg = TRUE, volume = 60)
var/turf/T = get_turf(src)
log_grenade(user, T)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
if(msg)
to_chat(user, "<span class='warning'>You prime \the [src]! [det_time/10] seconds!</span>")
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
active = TRUE
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
log_grenade(user, T) //Inbuilt admin procs already handle null users
if(user)
add_fingerprint(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
if(msg)
to_chat(user, "<span class='warning'>You prime \the [src]! [det_time/10] seconds!</span>")
playsound(src, 'sound/weapons/armbomb.ogg', volume, 1)
active = TRUE
icon_state = initial(icon_state) + "_active"
addtimer(CALLBACK(src, .proc/prime), isnull(delayoverride)? det_time : delayoverride)
/obj/item/grenade/proc/prime()
/obj/item/grenade/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.dropItemToGround(src)
/obj/item/grenade/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/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/grenade/attack_hand()
walk(src, null, null)
..()
/obj/item/grenade/attack_paw(mob/user)
return attack_hand(user)
/obj/item/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()
/obj/item/grenade/proc/prime()
/obj/item/grenade/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.dropItemToGround(src)
/obj/item/grenade/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/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/grenade/attack_hand()
walk(src, null, null)
..()
/obj/item/grenade/attack_paw(mob/user)
return attack_hand(user)
/obj/item/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 TRUE //It hit the grenade, not them
+14 -18
View File
@@ -2,11 +2,15 @@
name = "plastic explosive"
desc = "Used to put holes in specific areas without too much extra hole."
icon_state = "plastic-explosive0"
item_state = "plasticx"
item_state = "plastic-explosive"
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
flags_1 = NOBLUDGEON_1
flags_2 = NO_EMP_WIRES_2
det_time = 10
display_timer = 0
w_class = WEIGHT_CLASS_SMALL
origin_tech = "syndicate=1"
var/atom/target = null
var/mutable_appearance/plastic_overlay
var/obj/item/device/assembly_holder/nadeassembly = null
@@ -16,7 +20,7 @@
var/boom_sizes = list(0, 0, 3)
/obj/item/grenade/plastic/New()
plastic_overlay = mutable_appearance(icon, "[item_state]2")
plastic_overlay = mutable_appearance(icon, "[item_state]2", HIGH_OBJ_LAYER)
..()
/obj/item/grenade/plastic/Destroy()
@@ -95,7 +99,7 @@
if(ismob(AM))
return
to_chat(user, "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>")
to_chat(user, "<span class='notice'>You start planting [src]. The timer is set to [det_time]...</span>")
if(do_after(user, 30, target = AM))
if(!user.temporarilyRemoveItemFromInventory(src))
@@ -112,7 +116,7 @@
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [det_time] second fuse",0,1)
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(src)] with [det_time] second fuse")
target.add_overlay(plastic_overlay, 1)
target.add_overlay(plastic_overlay, TRUE)
if(!nadeassembly)
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
addtimer(CALLBACK(src, .proc/prime), det_time*10)
@@ -122,7 +126,7 @@
/obj/item/grenade/plastic/suicide_act(mob/user)
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [src] at [ADMIN_COORDJMP(user)]",0,1)
log_game("[key_name(user)] suicided with [src] at [COORD(user)]")
user.visible_message("<span class='suicide'>[user] activates the [src] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!</span>")
user.visible_message("<span class='suicide'>[user] activates [src] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!</span>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
@@ -133,7 +137,7 @@
message_say = "FOR THE HIVE!"
else if(role == "cultist")
message_say = "FOR NAR-SIE!"
else if(role == "revolutionary" || role == "head revolutionary")
else if(is_revolutionary(user))
message_say = "VIVA LA REVOLUTION!"
user.say(message_say)
explosion(user,0,2,0) //Cheap explosion imitation because putting prime() here causes runtimes
@@ -154,21 +158,12 @@
name = "C4"
desc = "Used to put holes in specific areas without too much extra hole. A saboteur's favorite."
gender = PLURAL
icon = 'icons/obj/grenade.dmi'
icon_state = "plastic-explosive0"
item_state = "plasticx"
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
flags_1 = NOBLUDGEON_1
w_class = WEIGHT_CLASS_SMALL
origin_tech = "syndicate=1"
var/timer = 10
var/open_panel = 0
/obj/item/grenade/plastic/c4/New()
wires = new /datum/wires/explosive/c4(src)
..()
plastic_overlay = mutable_appearance(icon, "plastic-explosive2")
/obj/item/grenade/plastic/c4/Destroy()
qdel(wires)
@@ -188,7 +183,7 @@
message_say = "FOR THE HIVE!"
else if(role == "cultist")
message_say = "FOR NAR-SIE!"
else if(role == "revolutionary" || role == "head revolutionary")
else if(is_revolutionary(user))
message_say = "VIVA LA REVOLUTION!"
user.say(message_say)
target = user
@@ -234,14 +229,14 @@
if(!user.temporarilyRemoveItemFromInventory(src))
return
src.target = AM
forceMove(null)
moveToNullspace()
var/message = "[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [timer] second fuse"
GLOB.bombers += message
message_admins(message,0,1)
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(target)] with [timer] second fuse")
target.add_overlay(plastic_overlay, 1)
target.add_overlay(plastic_overlay, TRUE)
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [timer].</span>")
addtimer(CALLBACK(src, .proc/explode), timer * 10)
@@ -272,5 +267,6 @@
desc = "A shaped high-explosive breaching charge. Designed to ensure user safety and wall nonsafety."
icon_state = "plasticx40"
item_state = "plasticx4"
gender = PLURAL
directional = TRUE
boom_sizes = list(0, 2, 5)
@@ -1,53 +1,53 @@
/obj/item/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/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)
/obj/item/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/grenade/syndieminibomb/concussion/prime()
update_mob()
explosion(src.loc,0,2,3,flame_range = 3)
qdel(src)
/obj/item/grenade/syndieminibomb/concussion/frag
name = "frag grenade"
desc = "Fire in the hole."
icon_state = "frag"
/obj/item/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/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)
/obj/item/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/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)
/obj/item/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/grenade/syndieminibomb/concussion/prime()
update_mob()
explosion(src.loc,0,2,3,flame_range = 3)
qdel(src)
/obj/item/grenade/syndieminibomb/concussion/frag
name = "frag grenade"
desc = "Fire in the hole."
icon_state = "frag"
/obj/item/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 = 350
var/stamina_damage = 30
/obj/item/grenade/gluon/prime()
update_mob()
playsound(loc, 'sound/effects/empulse.ogg', 50, 1)
radiation_pulse(src, 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)
+36 -21
View File
@@ -88,8 +88,10 @@
/obj/item/restraints/handcuffs/cable
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_red"
item_state = "coil_red"
icon_state = "cuff"
item_state = "coil"
item_color = "red"
color = "#ff0000"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
materials = list(MAT_METAL=150, MAT_GLASS=75)
@@ -98,6 +100,19 @@
cuffsound = 'sound/weapons/cablecuff.ogg'
var/datum/robot_energy_storage/wirestorage = null
/obj/item/restraints/handcuffs/cable/Initialize(mapload, param_color)
. = ..()
var/list/cable_colors = GLOB.cable_colors
item_color = param_color || item_color || pick(cable_colors)
if(cable_colors[item_color])
item_color = cable_colors[item_color]
update_icon()
/obj/item/restraints/handcuffs/cable/update_icon()
color = null
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
/obj/item/restraints/handcuffs/cable/attack(mob/living/carbon/C, mob/living/carbon/human/user)
if(!istype(C))
return
@@ -116,36 +131,35 @@
return ..()
/obj/item/restraints/handcuffs/cable/red
icon_state = "cuff_red"
item_state = "coil_red"
item_color = "red"
color = "#ff0000"
/obj/item/restraints/handcuffs/cable/yellow
icon_state = "cuff_yellow"
item_state = "coil_yellow"
item_color = "yellow"
color = "#ffff00"
/obj/item/restraints/handcuffs/cable/blue
icon_state = "cuff_blue"
item_state = "coil_blue"
item_color = "blue"
color = "#1919c8"
/obj/item/restraints/handcuffs/cable/green
icon_state = "cuff_green"
item_state = "coil_green"
item_color = "green"
color = "#00aa00"
/obj/item/restraints/handcuffs/cable/pink
icon_state = "cuff_pink"
item_state = "coil_pink"
item_color = "pink"
color = "#ff3ccd"
/obj/item/restraints/handcuffs/cable/orange
icon_state = "cuff_orange"
item_state = "coil_orange"
item_color = "orange"
color = "#ff8000"
/obj/item/restraints/handcuffs/cable/cyan
icon_state = "cuff_cyan"
item_state = "coil_cyan"
item_color = "cyan"
color = "#00ffff"
/obj/item/restraints/handcuffs/cable/white
icon_state = "cuff_white"
item_state = "coil_white"
item_color = "white"
/obj/item/restraints/handcuffs/alien
icon_state = "handcuffAlien"
@@ -209,17 +223,18 @@
/obj/item/restraints/handcuffs/cable/zipties
name = "zipties"
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
icon_state = "cuff_white"
icon_state = "cuff"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
materials = list()
breakouttime = 450 //Deciseconds = 45s
trashtype = /obj/item/restraints/handcuffs/cable/zipties/used
item_color = "white"
/obj/item/restraints/handcuffs/cable/zipties/used
desc = "A pair of broken zipties."
icon_state = "cuff_white_used"
item_state = "cuff_white"
icon_state = "cuff_used"
item_state = "cuff"
/obj/item/restraints/handcuffs/cable/zipties/used/attack()
return
+1 -1
View File
@@ -86,7 +86,7 @@
/obj/item/holosign_creator/cyborg
name = "Energy Barrier Projector"
desc = "A holographic projector that creates fragile energy fields"
desc = "A holographic projector that creates fragile energy fields."
creation_time = 15
max_signs = 9
holosign_type = /obj/structure/holosign/barrier/cyborg
+22
View File
@@ -52,6 +52,8 @@
/obj/item/nullrod/godhand
icon_state = "disintegrate"
item_state = "disintegrate"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
name = "god hand"
desc = "This hand of yours glows with an awesome power!"
flags_1 = ABSTRACT_1 | NODROP_1 | DROPDEL_1
@@ -295,6 +297,26 @@
hitsound = 'sound/items/bikehorn.ogg'
sharpness = IS_SHARP
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/nullrod/pride_hammer
icon_state = "pride"
name = "Pride-struck Hammer"
desc = "It resonates an aura of Pride."
force = 16
throwforce = 15
w_class = 4
slot_flags = SLOT_BACK
attack_verb = list("attacked", "smashed", "crushed", "splattered", "cracked")
hitsound = 'sound/weapons/blade1.ogg'
/obj/item/nullrod/pride_hammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity)
return
if(prob(30) && ishuman(A))
var/mob/living/carbon/human/H = A
user.reagents.trans_to(H, user.reagents.total_volume, 1, 1, 0)
to_chat(user, "<span class='notice'>Your pride reflects on [H].</span>")
to_chat(H, "<span class='userdanger'>You feel insecure, taking on [user]'s burden.</span>")
/obj/item/nullrod/whip
name = "holy whip"
@@ -3,7 +3,7 @@
/obj/item/implant/exile
name = "exile implant"
desc = "Prevents you from returning from away missions"
desc = "Prevents you from returning from away missions."
origin_tech = "materials=2;biotech=3;magnets=2;bluespace=3"
activated = 0
@@ -19,14 +19,18 @@
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = 0)
if(..())
if((target.mind in (SSticker.mode.head_revolutionaries)) || target.mind.unconvertable)
if(!target.mind)
return TRUE
if(target.mind.has_antag_datum(/datum/antagonist/rev/head) || target.mind.unconvertable)
if(!silent)
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
removed(target, 1)
qdel(src)
return FALSE
if(target.mind in SSticker.mode.revolutionaries)
SSticker.mode.remove_revolutionary(target.mind, FALSE, user)
var/datum/antagonist/rev/rev = target.mind.has_antag_datum(/datum/antagonist/rev)
if(rev)
rev.remove_revolutionary(FALSE, user)
if(!silent)
if(target.mind in SSticker.mode.cult)
to_chat(target, "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
@@ -1,6 +1,6 @@
/obj/item/implant/weapons_auth
name = "firearms authentication implant"
desc = "Lets you shoot your guns"
desc = "Lets you shoot your guns."
icon_state = "auth"
origin_tech = "magnets=2;programming=7;biotech=5;syndicate=5"
activated = 0
@@ -151,7 +151,7 @@
/obj/machinery/implantchair/genepurge
name = "Genetic purifier"
desc = "Used to purge human genome of foreign influences"
desc = "Used to purge a human genome of foreign influences."
special = TRUE
special_name = "Purge genome"
injection_cooldown = 0
+2
View File
@@ -96,6 +96,8 @@
return ..()
/obj/item/inducer/proc/recharge(atom/movable/A, mob/user)
if(!isturf(A) && user.loc == A)
return FALSE
if(recharging)
return TRUE
else
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -24,18 +24,17 @@
/obj/item/mop/proc/clean(turf/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1) || reagents.has_reagent("vodka", 1) || reagents.has_reagent("cleaner", 1))
A.clean_blood()
A.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
for(var/obj/effect/O in A)
if(is_cleanable(O))
qdel(O)
if(isclosedturf(A))
var/turf/closed/C = A
C.thermite = 0
reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting.
reagents.remove_any(1) //reaction() doesn't use up the reagents
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(reagents.total_volume < 1)
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
+2 -1
View File
@@ -79,7 +79,8 @@
/obj/item/paint/afterattack(turf/target, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(paintleft <= 0)
icon_state = "paint_empty"
return
+141 -2
View File
@@ -1,20 +1,72 @@
/obj/item/toy/plush
name = "plush"
desc = "this is the special coder plush, do not steal"
desc = "This is the special coder plush, do not steal."
icon = 'icons/obj/plushes.dmi'
icon_state = "debug"
attack_verb = list("thumped", "whomped", "bumped")
w_class = WEIGHT_CLASS_SMALL
resistance_flags = FLAMMABLE
var/list/squeak_override //Weighted list; If you want your plush to have different squeak sounds use this
var/stuffed = TRUE //If the plushie has stuffing in it
var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses*
/obj/item/toy/plush/Initialize()
. = ..()
AddComponent(/datum/component/squeak, squeak_override)
/obj/item/toy/plush/Destroy()
QDEL_NULL(grenade)
return ..()
/obj/item/toy/plush/handle_atom_del(atom/A)
if(A == grenade)
grenade = null
..()
/obj/item/toy/plush/attack_self(mob/user)
. = ..()
to_chat(user, "<span class='notice'>You pet [src]. D'awww.</span>")
if(stuffed || grenade)
to_chat(user, "<span class='notice'>You pet [src]. D'awww.</span>")
if(grenade && !grenade.active)
if(istype(grenade, /obj/item/grenade/chem_grenade))
var/obj/item/grenade/chem_grenade/G = grenade
if(G.nadeassembly) //We're activated through different methods
return
log_game("[key_name(user)] activated a hidden grenade in [src].")
grenade.preprime(user, msg = FALSE, volume = 10)
else
to_chat(user, "<span class='notice'>You try to pet [src], but it has no stuffing. Aww...</span>")
/obj/item/toy/plush/attackby(obj/item/I, mob/living/user, params)
if(I.is_sharp())
if(!grenade)
if(!stuffed)
to_chat(user, "<span class='warning'>You already murdered it!</span>")
return
user.visible_message("<span class='notice'>[user] tears out the stuffing from [src]!</span>", "<span class='notice'>You rip a bunch of the stuffing from [src]. Murderer.</span>")
playsound(I, I.usesound, 50, TRUE)
stuffed = FALSE
else
to_chat(user, "<span class='notice'>You remove the grenade from [src].</span>")
user.put_in_hands(grenade)
grenade = null
return
if(istype(I, /obj/item/grenade))
if(stuffed)
to_chat(user, "<span class='warning'>You need to remove some stuffing first!</span>")
return
if(grenade)
to_chat(user, "<span class='warning'>[src] already has a grenade!</span>")
return
if(!user.transferItemToLoc(I, src))
return
user.visible_message("<span class='warning'>[user] slides [grenade] into [src].</span>", \
"<span class='danger'>You slide [I] into [src].</span>")
grenade = I
var/turf/T = get_turf(user)
log_game("[key_name(user)] added a grenade ([I.name]) to [src] at [COORD(T)].")
return
return ..()
/obj/item/toy/plush/carpplushie
name = "space carp plushie"
@@ -35,11 +87,98 @@
name = "ratvar plushie"
desc = "An adorable plushie of the clockwork justiciar himself with new and improved spring arm action."
icon_state = "plushvar"
var/obj/item/toy/plush/narplush/clash_target
/obj/item/toy/plush/plushvar/Moved()
. = ..()
if(clash_target)
return
var/obj/item/toy/plush/narplush/P = locate() in range(1, src)
if(P && istype(P.loc, /turf/open) && !P.clashing)
clash_of_the_plushies(P)
/obj/item/toy/plush/plushvar/proc/clash_of_the_plushies(obj/item/toy/plush/narplush/P)
clash_target = P
P.clashing = TRUE
say("YOU.")
P.say("Ratvar?!")
var/obj/item/toy/plush/a_winnar_is
var/victory_chance = 10
for(var/i in 1 to 10) //We only fight ten times max
if(QDELETED(src))
P.clashing = FALSE
return
if(QDELETED(P))
clash_target = null
return
if(!Adjacent(P))
visible_message("<span class='warning'>The two plushies angrily flail at each other before giving up.</span>")
clash_target = null
P.clashing = FALSE
return
playsound(src, 'sound/magic/clockwork/ratvar_attack.ogg', 50, TRUE, frequency = 2)
sleep(2.4)
if(QDELETED(src))
P.clashing = FALSE
return
if(QDELETED(P))
clash_target = null
return
if(prob(victory_chance))
a_winnar_is = src
break
P.SpinAnimation(5, 0)
sleep(5)
if(QDELETED(src))
P.clashing = FALSE
return
if(QDELETED(P))
clash_target = null
return
playsound(P, 'sound/magic/clockwork/narsie_attack.ogg', 50, TRUE, frequency = 2)
sleep(3.3)
if(QDELETED(src))
P.clashing = FALSE
return
if(QDELETED(P))
clash_target = null
return
if(prob(victory_chance))
a_winnar_is = P
break
SpinAnimation(5, 0)
victory_chance += 10
sleep(5)
if(!a_winnar_is)
a_winnar_is = pick(src, P)
if(a_winnar_is == src)
say(pick("DIE.", "ROT."))
P.say(pick("Nooooo...", "Not die. To y-", "Die. Ratv-", "Sas tyen re-"))
playsound(src, 'sound/magic/clockwork/anima_fragment_attack.ogg', 50, TRUE, frequency = 2)
playsound(P, 'sound/magic/demon_dies.ogg', 50, TRUE, frequency = 2)
explosion(P, 0, 0, 1)
qdel(P)
clash_target = null
else
say("NO! I will not be banished again...")
P.say(pick("Ha.", "Ra'sha fonn dest.", "You fool. To come here."))
playsound(src, 'sound/magic/clockwork/anima_fragment_death.ogg', 50, TRUE, frequency = 2)
playsound(P, 'sound/magic/demon_attack1.ogg', 50, TRUE, frequency = 2)
explosion(src, 0, 0, 1)
qdel(src)
P.clashing = FALSE
/obj/item/toy/plush/narplush
name = "nar'sie plushie"
desc = "A small stuffed doll of the elder god nar'sie. Who thought this was a good children's toy?"
icon_state = "narplush"
var/clashing
/obj/item/toy/plush/narplush/Moved()
. = ..()
var/obj/item/toy/plush/plushvar/P = locate() in range(1, src)
if(P && istype(P.loc, /turf/open) && !P.clash_target && !clashing)
P.clash_of_the_plushies(src)
/obj/item/toy/plush/lizardplushie
name = "lizard plushie"
+35 -22
View File
@@ -26,8 +26,31 @@
var/fire_mode = PCANNON_FIREALL
var/automatic = FALSE
var/clumsyCheck = TRUE
var/list/allowed_typecache //Leave as null to allow all.
var/charge_amount = 1
var/charge_ticks = 1
var/charge_tick = 0
var/charge_type
var/selfcharge = FALSE
trigger_guard = TRIGGER_GUARD_NORMAL
/obj/item/pneumatic_cannon/Initialize()
. = ..()
if(selfcharge)
init_charge()
/obj/item/pneumatic_cannon/proc/init_charge() //wrapper so it can be vv'd easier
START_PROCESSING(SSobj, src)
/obj/item/pneumatic_cannon/process()
if(++charge_tick >= charge_ticks && charge_type)
fill_with_type(charge_type, charge_amount)
/obj/item/pneumatic_cannon/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/pneumatic_cannon/CanItemAutoclick()
return automatic
@@ -75,6 +98,10 @@
load_item(IW, user)
/obj/item/pneumatic_cannon/proc/can_load_item(obj/item/I, mob/user)
if(allowed_typecache && !is_type_in_typecache(I, allowed_typecache))
if(user)
to_chat(user, "<span class='warning'>[I] won't fit into [src]!</span>")
return
if((loadedWeightClass + I.w_class) > maxWeightClass) //Only make messages if there's a user
if(user)
to_chat(user, "<span class='warning'>\The [I] won't fit into \the [src]!</span>")
@@ -223,7 +250,7 @@
/obj/item/pneumatic_cannon/pie
name = "pie cannon"
desc = "Load cream pie for optimal results"
desc = "Load cream pie for optimal results."
force = 10
icon_state = "piecannon"
gasPerThrow = 0
@@ -233,28 +260,14 @@
throw_amount = 1
maxWeightClass = 150 //50 pies. :^)
clumsyCheck = FALSE
var/static/list/pie_typecache = typecacheof(/obj/item/reagent_containers/food/snacks/pie)
/obj/item/pneumatic_cannon/pie/can_load_item(obj/item/I, mob/user)
if(istype(I, /obj/item/reagent_containers/food/snacks/pie))
return ..()
to_chat(user, "<span class='warning'>[src] only accepts pies!</span>")
return FALSE
/obj/item/pneumatic_cannon/pie/Initialize()
. = ..()
allowed_typecache = pie_typecache
/obj/item/pneumatic_cannon/pie/selfcharge
automatic = TRUE
var/charge_amount = 1
var/charge_ticks = 1
var/charge_tick = 0
selfcharge = TRUE
charge_type = /obj/item/reagent_containers/food/snacks/pie/cream
maxWeightClass = 60 //20 pies.
/obj/item/pneumatic_cannon/pie/selfcharge/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/pneumatic_cannon/pie/selfcharge/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/pneumatic_cannon/pie/selfcharge/process()
if(++charge_tick >= charge_ticks)
fill_with_type(/obj/item/reagent_containers/food/snacks/pie/cream, charge_amount)
+1 -1
View File
@@ -207,7 +207,7 @@
name = "blue banner"
icon_state = "banner-blue"
item_state = "banner-blue"
desc = "A banner with the logo of the blue deity"
desc = "A banner with the logo of the blue deity."
/obj/item/storage/backpack/bannerpack
name = "nanotrasen banner backpack"
+32 -14
View File
@@ -274,17 +274,17 @@
to_chat(user, "<span class='notice'>You stop charging [target].</span>")
/obj/item/device/harmalarm
name = "Sonic Harm Prevention Tool"
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH"
name = "\improper Sonic Harm Prevention Tool"
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH."
icon_state = "megaphone"
var/cooldown = 0
/obj/item/device/harmalarm/emag_act(mob/user)
emagged = !emagged
if(emagged)
to_chat(user, "<font color='red'>You short out the safeties on the [src]!</font>")
to_chat(user, "<font color='red'>You short out the safeties on [src]!</font>")
else
to_chat(user, "<font color='red'>You reset the safeties on the [src]!</font>")
to_chat(user, "<font color='red'>You reset the safeties on [src]!</font>")
/obj/item/device/harmalarm/attack_self(mob/user)
var/safety = !emagged
@@ -503,9 +503,8 @@
//Peacekeeper Cyborg Projectile Dampenening Field
/obj/item/borg/projectile_dampen
name = "Hyperkinetic Dampening projector"
desc = "A device that projects a dampening field that weakenss kinetic energy above a certain threshold. <span class='boldnotice'>Projects a field that drains power per second \
while active, that will weaken and slow damaging projectiles inside its field.</span> Still being a prototype, it tends to induce a charge on ungrounded metallic surfaces."
name = "\improper Hyperkinetic Dampening projector"
desc = "A device that projects a dampening field that weakens kinetic energy above a certain threshold. <span class='boldnotice'>Projects a field that drains power per second while active, that will weaken and slow damaging projectiles inside its field.</span> Still being a prototype, it tends to induce a charge on ungrounded metallic surfaces."
icon = 'icons/obj/device.dmi'
icon_state = "shield"
var/maxenergy = 1500
@@ -544,16 +543,18 @@
/obj/item/borg/projectile_dampen/attack_self(mob/user)
if(cycle_delay > world.time)
to_chat(user, "<span class='boldwarning'>\the [src] is still recycling its projectors!</span>")
to_chat(user, "<span class='boldwarning'>[src] is still recycling its projectors!</span>")
return
cycle_delay = world.time + PKBORG_DAMPEN_CYCLE_DELAY
active = !active
if(active)
activate_field(user)
if(!active)
if(!user.has_buckled_mobs())
activate_field()
else
to_chat(user, "<span class='warning'>[src]'s safety cutoff prevents you from activating it due to living beings being ontop of you!</span>")
else
deactivate_field()
update_icon()
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] the [src].</span>")
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] [src].</span>")
/obj/item/borg/projectile_dampen/update_icon()
icon_state = "[initial(icon_state)][active]"
@@ -562,12 +563,29 @@
if(istype(dampening_field))
QDEL_NULL(dampening_field)
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
var/mob/living/silicon/robot/owner = get_host()
if(owner)
owner.module.allow_riding = FALSE
active = TRUE
/obj/item/borg/projectile_dampen/proc/deactivate_field()
QDEL_NULL(dampening_field)
visible_message("<span class='warning'>\The [src] shuts off!</span>")
for(var/P in tracked)
restore_projectile(P)
active = FALSE
var/mob/living/silicon/robot/owner = get_host()
if(owner)
owner.module.allow_riding = TRUE
/obj/item/borg/projectile_dampen/proc/get_host()
if(istype(host))
return host
else
if(iscyborg(host.loc))
return host.loc
return null
/obj/item/borg/projectile_dampen/dropped()
. = ..()
@@ -601,7 +619,7 @@
energy = Clamp(energy - usage, 0, maxenergy)
if(energy <= 0)
deactivate_field()
visible_message("<span class='warning'>The [src] blinks \"ENERGY DEPLETED\"</span>")
visible_message("<span class='warning'>[src] blinks \"ENERGY DEPLETED\".</span>")
/obj/item/borg/projectile_dampen/proc/process_recharge()
if(!istype(host))
@@ -685,4 +703,4 @@
/obj/item/borg/sight/hud/sec/New()
..()
hud = new /obj/item/clothing/glasses/hud/security(src)
return
return
@@ -172,7 +172,7 @@
/obj/item/borg/upgrade/syndicate
name = "illegal equipment module"
desc = "Unlocks the hidden, deadlier functions of a cyborg"
desc = "Unlocks the hidden, deadlier functions of a cyborg."
icon_state = "cyborg_upgrade3"
require_module = 1
origin_tech = "combat=4;syndicate=1"
@@ -320,7 +320,7 @@
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/reagent_containers/borghypo/H in R.module)
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.add_reagent(re)
@@ -355,7 +355,7 @@
return
var/found_hypo = FALSE
for(var/obj/item/reagent_containers/borghypo/H in R.module)
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
H.bypass_protection = TRUE
found_hypo = TRUE
+1
View File
@@ -3,6 +3,7 @@
icon = 'icons/obj/kitchen.dmi'
icon_state = "sharpener"
desc = "A block that makes things sharp."
force = 5
var/used = 0
var/increment = 4
var/max = 30
+4 -2
View File
@@ -65,10 +65,12 @@
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
/obj/item/target/bullet_act(obj/item/projectile/P)
if(istype(P, /obj/item/projectile/bullet/reusable)) // If it's a foam dart, don't bother with any of this other shit
return P.on_hit(src, 0)
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))
if(istype(P, /obj/item/projectile/bullet))
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)
@@ -92,4 +94,4 @@
return -1
#undef DECALTYPE_SCORCH
#undef DECALTYPE_BULLET
#undef DECALTYPE_BULLET
+2 -1
View File
@@ -58,7 +58,8 @@
return
/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(wielded)
if(charged == 5)
charged = 0
@@ -274,6 +274,9 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \
recipes = GLOB.titanium_recipes
. = ..()
/obj/item/stack/sheet/mineral/titanium/fifty
amount = 50
/*
* Plastitanium
@@ -256,6 +256,18 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
/obj/item/stack/sheet/cardboard/fifty
amount = 50
/obj/item/stack/sheet/cardboard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stamp/clown) && !istype(loc, /obj/item/storage))
var/atom/droploc = drop_location()
if(use(1))
playsound(I, 'sound/items/bikehorn.ogg', 50, 1, -1)
to_chat(user, "<span class='notice'>You stamp the cardboard! Its a clown box! Honk!</span>")
if (amount >= 0)
new/obj/item/storage/box/clown(droploc) //bugfix
else
. = ..()
/*
* Runed Metal
*/
+11 -4
View File
@@ -136,7 +136,8 @@
if (usr.restrained() || usr.stat || usr.get_active_held_item() != src)
return
if (href_list["make"])
if (get_amount() < 1) qdel(src) //Never should happen
if (get_amount() < 1)
qdel(src) //Never should happen
var/datum/stack_recipe/R = recipes[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
@@ -168,6 +169,11 @@
W.ini_dir = W.dir
//END: oh fuck i'm so sorry
else if(istype(O, /obj/item/restraints/handcuffs/cable))
var/obj/item/cuffs = O
cuffs.item_color = item_color
cuffs.update_icon()
if (QDELETED(O))
return //It's a stack and has already been merged
@@ -244,6 +250,7 @@
S.copy_evidences(src)
use(transfer, TRUE)
S.add(transfer)
return transfer
/obj/item/stack/Crossed(obj/o)
if(istype(o, merge_type) && !o.throwing)
@@ -259,7 +266,7 @@
if (user.get_inactive_held_item() == src)
if(zero_amount())
return
change_stack(user,1)
return change_stack(user,1)
else
..()
@@ -298,8 +305,8 @@
/obj/item/stack/attackby(obj/item/W, mob/user, params)
if(istype(W, merge_type))
var/obj/item/stack/S = W
merge(S)
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
if(merge(S))
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
else
. = ..()
@@ -23,15 +23,15 @@
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>")
to_chat(user, "<span class='notice'>You slot [src] into [I] and charge its internal uplink.</span>")
else if(istype(I, /obj/item/cartridge/virus/frame))
var/obj/item/cartridge/virus/frame/cart = I
if(!cart.charges)
to_chat(user, "<span class='notice'>The [cart] is out of charges, it's refusing to accept the [src]</span>")
to_chat(user, "<span class='notice'>[cart] is out of charges, it's refusing to accept [src].</span>")
return
cart.telecrystals += amount
use(amount)
to_chat(user, "<span class='notice'>You slot [src] into the [cart]. The next time it's used, it will also give telecrystals</span>")
to_chat(user, "<span class='notice'>You slot [src] into [cart]. The next time it's used, it will also give telecrystals.</span>")
/obj/item/stack/telecrystal/five
amount = 5
+2 -2
View File
@@ -309,7 +309,7 @@
/obj/item/storage/backpack/satchel/flat/secret/Initialize()
. = ..()
if(isfloorturf(loc) && !istype(loc, /turf/open/floor/plating/))
if(isfloorturf(loc) && !isplatingturf(loc))
hide(1)
/obj/item/storage/backpack/satchel/flat/secret/hide(intact)
@@ -518,7 +518,7 @@
new /obj/item/ammo_box/foambox/riot(src)
/obj/item/storage/backpack/duffelbag/syndie/med/bioterrorbundle
desc = "A large duffel bag containing a deadly chemicals, a chemical spray, chemical grenade, a Donksoft assault rifle, riot grade darts, a minature syringe gun, and a box of syringes"
desc = "A large duffel bag containing a deadly chemicals, a chemical spray, chemical grenade, a Donksoft assault rifle, riot grade darts, a minature syringe gun, and a box of syringes."
/obj/item/storage/backpack/duffelbag/syndie/med/bioterrorbundle/PopulateContents()
new /obj/item/reagent_containers/spray/chemsprayer/bioterror(src)
+4 -2
View File
@@ -173,7 +173,8 @@
// Modified handle_item_insertion. Would prefer not to, but...
/obj/item/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
if(!istype(S))
return 0
var/amount
var/inserted = 0
@@ -254,7 +255,8 @@
// Instead of removing
/obj/item/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
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.
+1 -1
View File
@@ -250,7 +250,7 @@
/obj/item/storage/belt/soulstone
name = "soul stone belt"
desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away"
desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away."
icon_state = "soulstonebelt"
item_state = "soulstonebelt"
storage_slots = 6
+28 -5
View File
@@ -607,6 +607,29 @@
playsound(loc, "rustle", 50, 1, -5)
user.visible_message("<span class='notice'>[user] hugs \the [src].</span>","<span class='notice'>You hug \the [src].</span>")
/////clown box & honkbot assembly
obj/item/storage/box/clown
name = "clown box"
desc = "A colorful cardboard box for the clown"
icon_state = "clownbox"
illustration = null
/obj/item/storage/box/clown/attackby(obj/item/I, mob/user, params)
if((istype(I, /obj/item/bodypart/l_arm/robot)) || (istype(I, /obj/item/bodypart/r_arm/robot)))
if(contents.len) //prevent accidently deleting contents
to_chat(user, "<span class='warning'>You need to empty [src] out first!</span>")
return
if(!user.temporarilyRemoveItemFromInventory(I))
return
qdel(I)
to_chat(user, "<span class='notice'>You add some wheels to the [src]! You've got an honkbot assembly now! Honk!</span>")
var/obj/item/honkbot_assembly/A = new
qdel(src)
user.put_in_hands(A)
else
return ..()
//////
/obj/item/storage/box/hug/medical/PopulateContents()
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/ointment(src)
@@ -681,7 +704,7 @@
if(istype(W, /obj/item/pen))
//if a pen is used on the sack, dialogue to change its design appears
if(contents.len)
to_chat(user, "<span class='warning'>You can't modify this [src] with items still inside!</span>")
to_chat(user, "<span class='warning'>You can't modify [src] with items still inside!</span>")
return
var/list/designs = list(NODESIGN, NANOTRASEN, SYNDI, HEART, SMILE, "Cancel")
var/switchDesign = input("Select a Design:", "Paper Sack Design", designs[1]) in designs
@@ -691,7 +714,7 @@
var/choice = designs.Find(switchDesign)
if(design == designs[choice] || designs[choice] == "Cancel")
return 0
to_chat(usr, "<span class='notice'>You make some modifications to the [src] using your pen.</span>")
to_chat(usr, "<span class='notice'>You make some modifications to [src] using your pen.</span>")
design = designs[choice]
icon_state = "paperbag_[design]"
item_state = "paperbag_[design]"
@@ -710,12 +733,12 @@
else if(W.is_sharp())
if(!contents.len)
if(item_state == "paperbag_None")
user.show_message("<span class='notice'>You cut eyeholes into the [src].</span>", 1)
user.show_message("<span class='notice'>You cut eyeholes into [src].</span>", 1)
new /obj/item/clothing/head/papersack(user.loc)
qdel(src)
return 0
else if(item_state == "paperbag_SmileyFace")
user.show_message("<span class='notice'>You cut eyeholes into the [src] and modify the design.</span>", 1)
user.show_message("<span class='notice'>You cut eyeholes into [src] and modify the design.</span>", 1)
new /obj/item/clothing/head/papersack/smiley(user.loc)
qdel(src)
return 0
@@ -730,7 +753,7 @@
/obj/item/storage/box/ingredients //This box is for the randomely chosen version the chef spawns with, it shouldn't actually exist.
name = "ingredients box"
illustration = "fruit"
var/theme_name
var/theme_name
/obj/item/storage/box/ingredients/Initialize()
. = ..()
+5 -8
View File
@@ -27,10 +27,9 @@
for(var/i = 1 to storage_slots)
new spawn_type(src)
/obj/item/storage/fancy/update_icon(itemremoved = 0)
/obj/item/storage/fancy/update_icon()
if(fancy_open)
var/total_contents = src.contents.len - itemremoved
icon_state = "[icon_type]box[total_contents]"
icon_state = "[icon_type]box[contents.len]"
else
icon_state = "[icon_type]box"
@@ -38,9 +37,9 @@
..()
if(fancy_open)
if(contents.len == 1)
to_chat(user, "There is one [src.icon_type] left.")
to_chat(user, "There is one [icon_type] left.")
else
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
to_chat(user, "There are [contents.len <= 0 ? "no" : "[contents.len]"] [icon_type]s left.")
/obj/item/storage/fancy/attack_self(mob/user)
fancy_open = !fancy_open
@@ -58,9 +57,7 @@
/obj/item/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
fancy_open = TRUE
. = ..()
//Recall update icon with the fancy item snowflake arg (ugh)
update_icon(1)
return ..()
/*
* Donut Box
+6 -5
View File
@@ -128,11 +128,12 @@
if(!locked)
to_chat(user, "<span class='notice'>Alt-click to [open ? "close":"open"] it.</span>")
/obj/item/storage/lockbox/medal/AltClick()
if(!locked)
open = (open ? FALSE : TRUE)
update_icon()
..()
/obj/item/storage/lockbox/medal/AltClick(mob/user)
if(user.canUseTopic(src, be_close=TRUE))
if(!locked)
open = (open ? FALSE : TRUE)
update_icon()
..()
/obj/item/storage/lockbox/medal/PopulateContents()
new /obj/item/clothing/accessory/medal/gold/captain(src)
+202 -202
View File
@@ -1,202 +1,202 @@
/obj/item/melee/baton
name = "stunbaton"
desc = "A stun baton for incapacitating people with."
icon_state = "stunbaton"
item_state = "baton"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
slot_flags = SLOT_BELT
force = 10
throwforce = 7
w_class = WEIGHT_CLASS_NORMAL
origin_tech = "combat=2"
attack_verb = list("beaten")
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 50, bio = 0, rad = 0, fire = 80, acid = 80)
var/stunforce = 140
var/status = 0
var/obj/item/stock_parts/cell/high/cell
var/hitcost = 1000
var/throw_hit_chance = 35
/obj/item/melee/baton/get_cell()
return cell
/obj/item/melee/baton/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (FIRELOSS)
/obj/item/melee/baton/Initialize()
. = ..()
update_icon()
/obj/item/melee/baton/throw_impact(atom/hit_atom)
..()
//Only mob/living types have stun handling
if(status && prob(throw_hit_chance) && iscarbon(hit_atom))
baton_stun(hit_atom)
/obj/item/melee/baton/loaded/Initialize() //this one starts with a cell pre-installed.
cell = new(src)
update_icon()
. = ..()
/obj/item/melee/baton/proc/deductcharge(chrgdeductamt)
if(cell)
//Note this value returned is significant, as it will determine
//if a stun is applied or not
. = cell.use(chrgdeductamt)
if(status && cell.charge < hitcost)
//we're below minimum, turn off
status = 0
update_icon()
playsound(loc, "sparks", 75, 1, -1)
/obj/item/melee/baton/update_icon()
if(status)
icon_state = "[initial(name)]_active"
else if(!cell)
icon_state = "[initial(name)]_nocell"
else
icon_state = "[initial(name)]"
/obj/item/melee/baton/examine(mob/user)
..()
if(cell)
to_chat(user, "<span class='notice'>The baton is [round(cell.percent())]% charged.</span>")
else
to_chat(user, "<span class='warning'>The baton does not have a power source installed.</span>")
/obj/item/melee/baton/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/C = W
if(cell)
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
else
if(C.maxcharge < hitcost)
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
return
if(!user.transferItemToLoc(W, src))
return
cell = W
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_icon()
else if(istype(W, /obj/item/screwdriver))
if(cell)
cell.update_icon()
cell.forceMove(get_turf(src))
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
status = 0
update_icon()
else
return ..()
/obj/item/melee/baton/attack_self(mob/user)
if(cell && cell.charge > hitcost)
status = !status
to_chat(user, "<span class='notice'>[src] is now [status ? "on" : "off"].</span>")
playsound(loc, "sparks", 75, 1, -1)
else
status = 0
if(!cell)
to_chat(user, "<span class='warning'>[src] does not have a power source!</span>")
else
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
update_icon()
add_fingerprint(user)
/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user)
if(status && user.disabilities & CLUMSY && prob(50))
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
user.Knockdown(stunforce*3)
deductcharge(hitcost)
return
if(iscyborg(M))
..()
return
if(ishuman(M))
var/mob/living/carbon/human/L = M
if(check_martial_counter(L, user))
return
if(user.a_intent != INTENT_HARM)
if(status)
if(baton_stun(M, user))
user.do_attack_animation(M)
return
else
M.visible_message("<span class='warning'>[user] has prodded [M] with [src]. Luckily it was off.</span>", \
"<span class='warning'>[user] has prodded you with [src]. Luckily it was off</span>")
else
if(status)
baton_stun(M, user)
..()
/obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/user)
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
return 0
if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc
if(!R || !R.cell || !R.cell.use(hitcost))
return 0
else
if(!deductcharge(hitcost))
return 0
L.Knockdown(stunforce)
L.apply_effect(STUTTER, stunforce)
if(user)
user.lastattacked = L
L.lastattacker = user
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
add_logs(user, L, "stunned")
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.forcesay(GLOB.hit_appends)
return 1
/obj/item/melee/baton/emp_act(severity)
deductcharge(1000 / severity)
..()
//Makeshift stun baton. Replacement for stun gloves.
/obj/item/melee/baton/cattleprod
name = "stunprod"
desc = "An improvised stun baton."
icon_state = "stunprod_nocell"
item_state = "prod"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
force = 3
throwforce = 5
stunforce = 100
hitcost = 2000
throw_hit_chance = 10
slot_flags = SLOT_BACK
var/obj/item/device/assembly/igniter/sparkler = 0
/obj/item/melee/baton/cattleprod/Initialize()
. = ..()
sparkler = new (src)
/obj/item/melee/baton/cattleprod/baton_stun()
if(sparkler.activate())
..()
/obj/item/melee/baton
name = "stunbaton"
desc = "A stun baton for incapacitating people with."
icon_state = "stunbaton"
item_state = "baton"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
slot_flags = SLOT_BELT
force = 10
throwforce = 7
w_class = WEIGHT_CLASS_NORMAL
origin_tech = "combat=2"
attack_verb = list("beaten")
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 50, bio = 0, rad = 0, fire = 80, acid = 80)
var/stunforce = 140
var/status = 0
var/obj/item/stock_parts/cell/high/cell
var/hitcost = 1000
var/throw_hit_chance = 35
/obj/item/melee/baton/get_cell()
return cell
/obj/item/melee/baton/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (FIRELOSS)
/obj/item/melee/baton/Initialize()
. = ..()
update_icon()
/obj/item/melee/baton/throw_impact(atom/hit_atom)
..()
//Only mob/living types have stun handling
if(status && prob(throw_hit_chance) && iscarbon(hit_atom))
baton_stun(hit_atom)
/obj/item/melee/baton/loaded/Initialize() //this one starts with a cell pre-installed.
cell = new(src)
update_icon()
. = ..()
/obj/item/melee/baton/proc/deductcharge(chrgdeductamt)
if(cell)
//Note this value returned is significant, as it will determine
//if a stun is applied or not
. = cell.use(chrgdeductamt)
if(status && cell.charge < hitcost)
//we're below minimum, turn off
status = 0
update_icon()
playsound(loc, "sparks", 75, 1, -1)
/obj/item/melee/baton/update_icon()
if(status)
icon_state = "[initial(name)]_active"
else if(!cell)
icon_state = "[initial(name)]_nocell"
else
icon_state = "[initial(name)]"
/obj/item/melee/baton/examine(mob/user)
..()
if(cell)
to_chat(user, "<span class='notice'>The baton is [round(cell.percent())]% charged.</span>")
else
to_chat(user, "<span class='warning'>The baton does not have a power source installed.</span>")
/obj/item/melee/baton/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/C = W
if(cell)
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
else
if(C.maxcharge < hitcost)
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
return
if(!user.transferItemToLoc(W, src))
return
cell = W
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_icon()
else if(istype(W, /obj/item/screwdriver))
if(cell)
cell.update_icon()
cell.forceMove(get_turf(src))
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
status = 0
update_icon()
else
return ..()
/obj/item/melee/baton/attack_self(mob/user)
if(cell && cell.charge > hitcost)
status = !status
to_chat(user, "<span class='notice'>[src] is now [status ? "on" : "off"].</span>")
playsound(loc, "sparks", 75, 1, -1)
else
status = 0
if(!cell)
to_chat(user, "<span class='warning'>[src] does not have a power source!</span>")
else
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
update_icon()
add_fingerprint(user)
/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user)
if(status && user.disabilities & CLUMSY && prob(50))
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
user.Knockdown(stunforce*3)
deductcharge(hitcost)
return
if(iscyborg(M))
..()
return
if(ishuman(M))
var/mob/living/carbon/human/L = M
if(check_martial_counter(L, user))
return
if(user.a_intent != INTENT_HARM)
if(status)
if(baton_stun(M, user))
user.do_attack_animation(M)
return
else
M.visible_message("<span class='warning'>[user] has prodded [M] with [src]. Luckily it was off.</span>", \
"<span class='warning'>[user] has prodded you with [src]. Luckily it was off</span>")
else
if(status)
baton_stun(M, user)
..()
/obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/user)
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
return 0
if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc
if(!R || !R.cell || !R.cell.use(hitcost))
return 0
else
if(!deductcharge(hitcost))
return 0
L.Knockdown(stunforce)
L.apply_effect(STUTTER, stunforce)
if(user)
L.lastattacker = user.real_name
L.lastattackerckey = user.ckey
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
add_logs(user, L, "stunned")
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.forcesay(GLOB.hit_appends)
return 1
/obj/item/melee/baton/emp_act(severity)
deductcharge(1000 / severity)
..()
//Makeshift stun baton. Replacement for stun gloves.
/obj/item/melee/baton/cattleprod
name = "stunprod"
desc = "An improvised stun baton."
icon_state = "stunprod_nocell"
item_state = "prod"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
force = 3
throwforce = 5
stunforce = 100
hitcost = 2000
throw_hit_chance = 10
slot_flags = SLOT_BACK
var/obj/item/device/assembly/igniter/sparkler = 0
/obj/item/melee/baton/cattleprod/Initialize()
. = ..()
sparkler = new (src)
/obj/item/melee/baton/cattleprod/baton_stun()
if(sparkler.activate())
..()
+2 -2
View File
@@ -8,7 +8,7 @@
w_class = WEIGHT_CLASS_BULKY
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
var/gas_type = "o2"
var/gas_type = /datum/gas/oxygen
var/on = FALSE
var/stabilizers = FALSE
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
@@ -128,7 +128,7 @@
icon_state = "jetpack-black"
item_state = "jetpack-black"
distribute_pressure = 0
gas_type = "co2"
gas_type = /datum/gas/carbon_dioxide
/obj/item/tank/jetpack/suit
+17 -17
View File
@@ -21,8 +21,8 @@
/obj/item/tank/internals/oxygen/New()
..()
ASSERT_GAS("o2", air_contents)
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
ASSERT_GAS(/datum/gas/oxygen, air_contents)
air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -49,9 +49,9 @@
/obj/item/tank/internals/anesthetic/New()
..()
air_contents.assert_gases("o2", "n2o")
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases["n2o"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrous_oxide)
air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrous_oxide][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
@@ -67,9 +67,9 @@
/obj/item/tank/internals/air/New()
..()
air_contents.assert_gases("o2","n2")
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases["n2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrogen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
@@ -87,8 +87,8 @@
/obj/item/tank/internals/plasma/New()
..()
ASSERT_GAS("plasma", air_contents)
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
ASSERT_GAS(/datum/gas/plasma, air_contents)
air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
@@ -106,7 +106,7 @@
/obj/item/tank/internals/plasma/full/New()
..() // Plasma asserted in parent
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -124,13 +124,13 @@
/obj/item/tank/internals/plasmaman/New()
..()
ASSERT_GAS("plasma", air_contents)
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
ASSERT_GAS(/datum/gas/plasma, air_contents)
air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/full/New()
..() // Plasma asserted in parent
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -144,7 +144,7 @@
/obj/item/tank/internals/plasmaman/belt/full/New()
..() // Plasma asserted in parent
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -166,8 +166,8 @@
/obj/item/tank/internals/emergency_oxygen/New()
..()
ASSERT_GAS("o2", air_contents)
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
ASSERT_GAS(/datum/gas/oxygen, air_contents)
air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/emergency_oxygen/engi
+3 -2
View File
@@ -31,7 +31,7 @@
H.internal = null
H.update_internals_hud_icon(0)
else
if(!H.getorganslot("breathing_tube"))
if(!H.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
if(!H.wear_mask)
to_chat(H, "<span class='warning'>You need a mask!</span>")
return
@@ -71,7 +71,8 @@
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if(!in_range(src, user))
if (icon == src) to_chat(user, "<span class='notice'>If you want any more information you'll need to get closer.</span>")
if (icon == src)
to_chat(user, "<span class='notice'>If you want any more information you'll need to get closer.</span>")
return
to_chat(user, "<span class='notice'>The pressure gauge reads [round(src.air_contents.return_pressure(),0.01)] kPa.</span>")
+230 -222
View File
@@ -1,222 +1,230 @@
#define SOURCE_PORTAL 1
#define DESTINATION_PORTAL 2
/* Teleportation devices.
* Contains:
* Locator
* Hand-tele
*/
/*
* Locator
*/
/obj/item/locator
name = "locator"
desc = "Used to track those with locater implants."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
var/temp = null
var/frequency = 1451
var/broadcasting = null
var/listening = 1
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_SMALL
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=400)
origin_tech = "magnets=3;bluespace=2"
/obj/item/locator/attack_self(mob/user)
user.set_machine(src)
var/dat
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
else
dat = {"
<B>Persistent Signal Locator</B><HR>
Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A> [format_frequency(src.frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
<A href='?src=\ref[src];refresh=1'>Refresh</A>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/locator/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
var/turf/current_location = get_turf(usr)//What turf is the user on?
if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2.
to_chat(usr, "The [src] is malfunctioning.")
return
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
usr.set_machine(src)
if (href_list["refresh"])
src.temp = "<B>Persistent Signal Locator</B><HR>"
var/turf/sr = get_turf(src)
if (sr)
src.temp += "<B>Located Beacons:</B><BR>"
for(var/obj/item/device/radio/beacon/W in GLOB.teleportbeacons)
if (W.frequency == src.frequency)
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
if (direct < 20)
direct = "weak"
else
direct = "very weak"
src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>Extranneous Signals:</B><BR>"
for (var/obj/item/implant/tracking/W in GLOB.tracked_implants)
if (!W.imp_in || !ismob(W.loc))
continue
else
var/mob/M = W.loc
if (M.stat == DEAD)
if (M.timeofdeath + 6000 < world.time)
continue
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 20)
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
direct = "weak"
src.temp += "[W.imp_in.name]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B> in orbital coordinates.<BR><BR><A href='byond://?src=\ref[src];refresh=1'>Refresh</A><BR>"
else
src.temp += "<B><FONT color='red'>Processing Error:</FONT></B> Unable to locate orbital position.<BR>"
else
if (href_list["freq"])
src.frequency += text2num(href_list["freq"])
src.frequency = sanitize_frequency(src.frequency)
else
if (href_list["temp"])
src.temp = null
if (ismob(src.loc))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
return
/*
* Hand-tele
*/
/obj/item/hand_tele
name = "hand tele"
desc = "A portable item using blue-space technology."
icon = 'icons/obj/device.dmi'
icon_state = "hand_tele"
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=10000)
origin_tech = "magnets=3;bluespace=4"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 100, acid = 100)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/list/active_portal_pairs
var/max_portal_pairs = 3
/obj/item/hand_tele/Initialize()
. = ..()
active_portal_pairs = list()
/obj/item/hand_tele/afterattack(atom/target, mob/user, proximity, params)
if(is_parent_of_portal(target))
qdel(target)
to_chat(user, "<span class='notice'>You dispel [target] remotely with \the [src]!</span>")
return ..()
/obj/item/hand_tele/attack_self(mob/user)
var/turf/current_location = get_turf(user)//What turf is the user on?
var/area/current_area = current_location.loc
if(!current_location || current_area.noteleport || current_location.z > ZLEVEL_SPACEMAX || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
var/area/A = get_area(com.target)
if(!A || A.noteleport)
continue
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[get_area(com.target)] (Active)"] = com.target
else
L["[get_area(com.target)] (Inactive)"] = com.target
var/list/turfs = list( )
for(var/turf/T in urange(10, orange=1))
if(T.x>world.maxx-8 || T.x<8)
continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8)
continue
var/area/A = T.loc
if(A.noteleport)
continue
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
if (!t1 || user.get_active_held_item() != src || user.incapacitated())
return
if(active_portal_pairs.len >= max_portal_pairs)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
return
var/atom/T = L[t1]
var/area/A = get_area(T)
if(A.noteleport)
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
user.show_message("<span class='notice'>Locked In.</span>", 2)
var/list/obj/effect/portal/created = create_portal_pair(current_location, get_teleport_turf(get_turf(T)), src, 300, 1)
if(!(LAZYLEN(created) == 2))
return
try_move_adjacent(created[1])
active_portal_pairs[created[1]] = created[2]
var/obj/effect/portal/c1 = created[1]
var/obj/effect/portal/c2 = created[2]
investigate_log("was used by [key_name(user)] at [COORD(user)] to create a portal pair with destinations [COORD(c1)] and [COORD(c2)].", INVESTIGATE_PORTAL)
add_fingerprint(user)
/obj/item/hand_tele/proc/on_portal_destroy(obj/effect/portal/P)
active_portal_pairs -= P //If this portal pair is made by us it'll be erased along with the other portal by the portal.
/obj/item/hand_tele/proc/is_parent_of_portal(obj/effect/portal/P)
if(!istype(P))
return FALSE
if(active_portal_pairs[P])
return SOURCE_PORTAL
for(var/i in active_portal_pairs)
if(active_portal_pairs[i] == P)
return DESTINATION_PORTAL
return FALSE
#define SOURCE_PORTAL 1
#define DESTINATION_PORTAL 2
/* Teleportation devices.
* Contains:
* Locator
* Hand-tele
*/
/*
* Locator
*/
/obj/item/locator
name = "locator"
desc = "Used to track those with locater implants."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
var/temp = null
var/frequency = 1451
var/broadcasting = null
var/listening = 1
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_SMALL
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=400)
origin_tech = "magnets=3;bluespace=2"
/obj/item/locator/attack_self(mob/user)
user.set_machine(src)
var/dat
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
else
dat = {"
<B>Persistent Signal Locator</B><HR>
Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A> [format_frequency(src.frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
<A href='?src=\ref[src];refresh=1'>Refresh</A>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/locator/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
var/turf/current_location = get_turf(usr)//What turf is the user on?
if(!current_location || current_location.z == ZLEVEL_CENTCOM)//If turf was not found or they're on CentCom
to_chat(usr, "[src] is malfunctioning.")
return
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
usr.set_machine(src)
if (href_list["refresh"])
src.temp = "<B>Persistent Signal Locator</B><HR>"
var/turf/sr = get_turf(src)
if (sr)
src.temp += "<B>Located Beacons:</B><BR>"
for(var/obj/item/device/radio/beacon/W in GLOB.teleportbeacons)
if (W.frequency == src.frequency)
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
if (direct < 20)
direct = "weak"
else
direct = "very weak"
src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>Extranneous Signals:</B><BR>"
for (var/obj/item/implant/tracking/W in GLOB.tracked_implants)
if (!W.imp_in || !ismob(W.loc))
continue
else
var/mob/M = W.loc
if (M.stat == DEAD)
if (M.timeofdeath + 6000 < world.time)
continue
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 20)
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
direct = "weak"
src.temp += "[W.imp_in.name]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B> in orbital coordinates.<BR><BR><A href='byond://?src=\ref[src];refresh=1'>Refresh</A><BR>"
else
src.temp += "<B><FONT color='red'>Processing Error:</FONT></B> Unable to locate orbital position.<BR>"
else
if (href_list["freq"])
src.frequency += text2num(href_list["freq"])
src.frequency = sanitize_frequency(src.frequency)
else
if (href_list["temp"])
src.temp = null
if (ismob(src.loc))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
return
/*
* Hand-tele
*/
/obj/item/hand_tele
name = "hand tele"
desc = "A portable item using blue-space technology."
icon = 'icons/obj/device.dmi'
icon_state = "hand_tele"
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=10000)
origin_tech = "magnets=3;bluespace=4"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 100, acid = 100)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/list/active_portal_pairs
var/max_portal_pairs = 3
/obj/item/hand_tele/Initialize()
. = ..()
active_portal_pairs = list()
/obj/item/hand_tele/pre_attackby(atom/target, mob/user, params)
if(try_dispel_portal(target, user))
return FALSE
return ..()
/obj/item/hand_tele/proc/try_dispel_portal(atom/target, mob/user)
if(is_parent_of_portal(target))
qdel(target)
to_chat(user, "<span class='notice'>You dispel [target] with \the [src]!</span>")
return TRUE
return FALSE
/obj/item/hand_tele/afterattack(atom/target, mob/user)
try_dispel_portal(target, user)
. = ..()
/obj/item/hand_tele/attack_self(mob/user)
var/turf/current_location = get_turf(user)//What turf is the user on?
var/area/current_area = current_location.loc
if(!current_location || current_area.noteleport || current_location.z > ZLEVEL_SPACEMAX || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
var/area/A = get_area(com.target)
if(!A || A.noteleport)
continue
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[get_area(com.target)] (Active)"] = com.target
else
L["[get_area(com.target)] (Inactive)"] = com.target
var/list/turfs = list( )
for(var/turf/T in urange(10, orange=1))
if(T.x>world.maxx-8 || T.x<8)
continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8)
continue
var/area/A = T.loc
if(A.noteleport)
continue
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
if (!t1 || user.get_active_held_item() != src || user.incapacitated())
return
if(active_portal_pairs.len >= max_portal_pairs)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
return
var/atom/T = L[t1]
var/area/A = get_area(T)
if(A.noteleport)
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
user.show_message("<span class='notice'>Locked In.</span>", 2)
var/list/obj/effect/portal/created = create_portal_pair(current_location, get_teleport_turf(get_turf(T)), src, 300, 1)
if(!(LAZYLEN(created) == 2))
return
try_move_adjacent(created[1])
active_portal_pairs[created[1]] = created[2]
var/obj/effect/portal/c1 = created[1]
var/obj/effect/portal/c2 = created[2]
investigate_log("was used by [key_name(user)] at [COORD(user)] to create a portal pair with destinations [COORD(c1)] and [COORD(c2)].", INVESTIGATE_PORTAL)
add_fingerprint(user)
/obj/item/hand_tele/proc/on_portal_destroy(obj/effect/portal/P)
active_portal_pairs -= P //If this portal pair is made by us it'll be erased along with the other portal by the portal.
/obj/item/hand_tele/proc/is_parent_of_portal(obj/effect/portal/P)
if(!istype(P))
return FALSE
if(active_portal_pairs[P])
return SOURCE_PORTAL
for(var/i in active_portal_pairs)
if(active_portal_pairs[i] == P)
return DESTINATION_PORTAL
return FALSE
+7 -7
View File
@@ -33,7 +33,7 @@
if(cooldown < world.time - 60)
cooldown = world.time
flick(pulseicon, src)
radiation_pulse(get_turf(src), 1, 4, 40, 1)
radiation_pulse(src, 400, 2)
//nuke core box, for carrying the core
/obj/item/nuke_core_container
@@ -140,7 +140,7 @@
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)
radiation_pulse(user, 100)
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
qdel(W)
qdel(src)
@@ -151,13 +151,13 @@
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)
radiation_pulse(user, 500, 2)
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.."
desc = "A tiny receptacle that releases an inert hyper-noblium 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()
@@ -193,7 +193,7 @@
/obj/item/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."
desc = "A scalpel with a tip of condensed hyper-noblium 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
@@ -202,7 +202,7 @@
/obj/item/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."
desc = "A pair of tongs made from condensed hyper-noblium 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
@@ -240,7 +240,7 @@
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)
radiation_pulse(user, 500, 2)
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
user.dust()
icon_state = "supermatter_tongs"
+19 -4
View File
@@ -131,7 +131,7 @@
name = "screwdriver"
desc = "You can be totally screwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = "screwdriver"
icon_state = "screwdriver_map"
item_state = "screwdriver"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
@@ -166,6 +166,7 @@
/obj/item/screwdriver/Initialize()
. = ..()
if(random_color) //random colors!
icon_state = "screwdriver"
var/our_color = pick(screwdriver_colors)
add_atom_colour(screwdriver_colors[our_color], FIXED_COLOUR_PRIORITY)
update_icon()
@@ -269,7 +270,7 @@
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = null
icon_state = "cutters"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
flags_1 = CONDUCT_1
@@ -285,11 +286,12 @@
origin_tech = "materials=1;engineering=1"
toolspeed = 1
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
var/random_color = TRUE
/obj/item/wirecutters/New(loc, var/param_color = null)
..()
if(!icon_state)
if(random_color)
if(!param_color)
param_color = pick("yellow","red")
icon_state = "cutters_[param_color]"
@@ -316,6 +318,7 @@
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
resistance_flags = FIRE_PROOF | ACID_PROOF
icon_state = "cutters_brass"
random_color = FALSE
toolspeed = 0.5
/obj/item/wirecutters/abductor
@@ -325,6 +328,7 @@
icon_state = "cutters"
toolspeed = 0.1
origin_tech = "materials=5;engineering=4;abductor=3"
random_color = FALSE
/obj/item/wirecutters/cyborg
name = "wirecutters"
@@ -340,6 +344,7 @@
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/wirecutters/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
@@ -452,6 +457,15 @@
flamethrower_screwdriver(I, user)
else if(istype(I, /obj/item/stack/rods))
flamethrower_rods(I, user)
else if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
var/amountNeeded = max_fuel - get_fuel()
var/obj/item/reagent_containers/container = I
if(length(container.reagents.reagent_list) > 1)
to_chat(user, "<span class='warning'>[container] has too many chemicals mixed into it. You wouldn't want to put the wrong chemicals into [src].</span>")
return ..()
if(amountNeeded > 0 && container.reagents.has_reagent("welding_fuel"))
container.reagents.trans_id_to(src, "welding_fuel", amountNeeded)
to_chat(user, "<span class='notice'>You transfer some fuel from [container] to [src].</span>")
else
return ..()
@@ -475,7 +489,8 @@
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(welding)
remove_fuel(1)
+5 -4
View File
@@ -49,7 +49,8 @@
return
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if (istype(A, /obj/structure/reagent_dispensers))
var/obj/structure/reagent_dispensers/RD = A
if(RD.reagents.total_volume <= 0)
@@ -274,7 +275,7 @@
*/
/obj/item/toy/foamblade
name = "foam armblade"
desc = "it says \"Sternside Changs #1 fan\" on it. "
desc = "It says \"Sternside Changs #1 fan\" on it."
icon = 'icons/obj/toy.dmi'
icon_state = "foamblade"
item_state = "arm_blade"
@@ -287,7 +288,7 @@
/obj/item/toy/windupToolbox
name = "windup toolbox"
desc = "A replica toolbox that rumbles when you turn the key"
desc = "A replica toolbox that rumbles when you turn the key."
icon_state = "his_grace"
item_state = "artistic_toolbox"
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
@@ -1105,7 +1106,7 @@
/obj/item/toy/figure/attack_self(mob/user as mob)
if(cooldown <= world.time)
cooldown = world.time + 50
to_chat(user, "<span class='notice'>The [src] says \"[toysay]\"</span>")
to_chat(user, "<span class='notice'>[src] says \"[toysay]\"</span>")
playsound(user, toysound, 20, 1)
/obj/item/toy/figure/cmo

Some files were not shown because too many files have changed in this diff Show More