Merge branch 'master' into upstream-merge-30056
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
M.setDir(dir)
|
||||
buckled_mobs |= M
|
||||
M.update_canmove()
|
||||
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src)
|
||||
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
|
||||
post_buckle_mob(M)
|
||||
|
||||
return TRUE
|
||||
@@ -131,5 +131,3 @@
|
||||
"<span class='italics'>You hear metal clanking.</span>")
|
||||
add_fingerprint(user)
|
||||
return M
|
||||
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
sleep(10)
|
||||
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(duration)
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.<span>")
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.</span>")
|
||||
qdel(chainsaw)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
pressure_resistance = 4
|
||||
var/obj/item/master = null
|
||||
|
||||
var/heat_protection = 0 //flags_1 which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags_1. See setup.dm
|
||||
var/cold_protection = 0 //flags_1 which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags_1. See setup.dm
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags_1
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags_1
|
||||
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
|
||||
var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
|
||||
|
||||
var/list/actions //list of /datum/action's that this item has.
|
||||
var/list/actions_types //list of paths of action datums to give to the item on New().
|
||||
@@ -48,7 +48,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
var/item_color = null //this needs deprecating, soonish
|
||||
|
||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags_1
|
||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
|
||||
//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
|
||||
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
|
||||
var/permeability_coefficient = 1 // for chemicals/diseases
|
||||
@@ -64,6 +64,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/list/materials
|
||||
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
|
||||
var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use.
|
||||
var/emagged = FALSE
|
||||
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
||||
@@ -86,7 +87,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
||||
var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class.
|
||||
|
||||
var/flags_cover = 0 //for flags_1 such as GLASSESCOVERSEYES
|
||||
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
|
||||
var/heat = 0
|
||||
var/sharpness = IS_BLUNT
|
||||
var/toolspeed = 1
|
||||
@@ -128,6 +129,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(force_string)
|
||||
force_string_override = TRUE
|
||||
|
||||
if(!hitsound)
|
||||
if(damtype == "fire")
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
|
||||
/obj/item/Destroy()
|
||||
flags_1 &= ~DROPDEL_1 //prevent reqdels
|
||||
if(ismob(loc))
|
||||
@@ -542,9 +549,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
transfer_blood = 0
|
||||
|
||||
/obj/item/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(current_size >= STAGE_FOUR)
|
||||
throw_at(S,14,3, spin=0)
|
||||
else ..()
|
||||
else return
|
||||
|
||||
/obj/item/throw_impact(atom/A)
|
||||
if(A && !QDELETED(A))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -74,7 +74,7 @@ obj/item/construction
|
||||
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>")
|
||||
return 1
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!")
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!</span>")
|
||||
return 0
|
||||
|
||||
/obj/item/construction/proc/activate()
|
||||
|
||||
@@ -123,7 +123,6 @@ RSF
|
||||
var/toxin = 0
|
||||
var/cooldown = 0
|
||||
var/cooldowndelay = 10
|
||||
var/emagged = FALSE
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/cookiesynth/examine(mob/user)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
icon = 'icons/obj/chronos.dmi'
|
||||
icon_state = "chronobackpack"
|
||||
item_state = "backpack"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = SLOT_BACK
|
||||
slowdown = 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -212,7 +212,6 @@
|
||||
build_path = /obj/machinery/computer/cargo
|
||||
origin_tech = "programming=3"
|
||||
var/contraband = FALSE
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/circuitboard/computer/cargo/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
|
||||
@@ -720,4 +720,12 @@
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/vending/donksofttoyvendor
|
||||
name = "Donksoft Toy Vendor (Machine Board)"
|
||||
build_path = /obj/machinery/vending/donksofttoyvendor
|
||||
origin_tech = "programming=1;syndicate=2"
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/console_screen = 1,
|
||||
/obj/item/vending_refill/donksoft = 3)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/obj/item/soap/suicide_act(mob/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!</span>")
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
return (TOXLOSS)
|
||||
|
||||
|
||||
@@ -135,10 +135,10 @@
|
||||
/obj/item/defibrillator/emag_act(mob/user)
|
||||
if(safety)
|
||||
safety = 0
|
||||
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer.")
|
||||
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer.</span>")
|
||||
else
|
||||
safety = 1
|
||||
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.")
|
||||
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.</span>")
|
||||
|
||||
/obj/item/defibrillator/emp_act(severity)
|
||||
if(cell)
|
||||
@@ -497,7 +497,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(H.stat == DEAD)
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.")
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.</span>")
|
||||
playsound(get_turf(src), "bodyfall", 50, 1)
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
total_brute = H.getBruteLoss()
|
||||
|
||||
@@ -30,7 +30,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
//Secondary variables
|
||||
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
|
||||
var/fon = 0 //Is the flashlight function on?
|
||||
var/f_lum = 3 //Luminosity for the flashlight function
|
||||
var/f_lum = 2.3 //Luminosity for the flashlight function
|
||||
var/silent = 0 //To beep or not to beep, that is the question
|
||||
var/toff = 0 //If 1, messenger disabled
|
||||
var/tnote = null //Current Texts
|
||||
@@ -352,9 +352,9 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(fon)
|
||||
fon = 0
|
||||
set_light(0)
|
||||
else
|
||||
else if(f_lum)
|
||||
fon = 1
|
||||
set_light(2.3)
|
||||
set_light(f_lum)
|
||||
update_icon()
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
@@ -856,7 +856,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/list/plist = list()
|
||||
var/list/namecounts = list()
|
||||
|
||||
if(user.stat == 2)
|
||||
if(user.stat == DEAD)
|
||||
return //won't work if dead
|
||||
|
||||
if(src.aiPDA.toff)
|
||||
@@ -889,7 +889,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
/mob/living/silicon/ai/verb/cmd_toggle_pda_receiver()
|
||||
set category = "AI Commands"
|
||||
set name = "PDA - Toggle Sender/Receiver"
|
||||
if(usr.stat == 2)
|
||||
if(usr.stat == DEAD)
|
||||
return //won't work if dead
|
||||
if(!isnull(aiPDA))
|
||||
aiPDA.toff = !aiPDA.toff
|
||||
@@ -900,7 +900,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
/mob/living/silicon/ai/verb/cmd_toggle_pda_silent()
|
||||
set category = "AI Commands"
|
||||
set name = "PDA - Toggle Ringer"
|
||||
if(usr.stat == 2)
|
||||
if(usr.stat == DEAD)
|
||||
return //won't work if dead
|
||||
if(!isnull(aiPDA))
|
||||
//0
|
||||
@@ -910,7 +910,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
|
||||
|
||||
/mob/living/silicon/ai/proc/cmd_show_message_log(mob/user)
|
||||
if(user.stat == 2)
|
||||
if(user.stat == DEAD)
|
||||
return //won't work if dead
|
||||
if(!isnull(aiPDA))
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>[aiPDA.tnote]</body></html>"
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
access = CART_REAGENT_SCANNER | CART_ATMOS
|
||||
|
||||
/obj/item/cartridge/signal/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT
|
||||
|
||||
/obj/item/cartridge/rd/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
/obj/item/cartridge/captain
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/signal/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if (src.frequency < 1200 || src.frequency > 1600)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
return
|
||||
if(!isnull(target) && !target.toff)
|
||||
charges--
|
||||
var/lock_code = "[rand(100,999)] [pick("Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-ray","Yankee","Zulu")]"
|
||||
var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||
to_chat(U, "<span class='notice'>Virus Sent! The unlock code to the target is: [lock_code]</span>")
|
||||
if(!target.hidden_uplink)
|
||||
var/obj/item/device/uplink/uplink = new(target)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/flashlight_power = 1 //strength of the light when on
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_brightness()
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
|
||||
@@ -152,7 +152,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[M] doesn't have any organs in [their] mouth.</span>")
|
||||
if(pill_count)
|
||||
to_chat(user, "<span class='notice'>[M] has [pill_count] pill[pill_count > 1 ? "s" : ""] implanted in [their] teeth.")
|
||||
to_chat(user, "<span class='notice'>[M] has [pill_count] pill[pill_count > 1 ? "s" : ""] implanted in [their] teeth.</span>")
|
||||
|
||||
else
|
||||
return ..()
|
||||
@@ -208,6 +208,8 @@
|
||||
desc = "A desk lamp with an adjustable mount."
|
||||
icon_state = "lamp"
|
||||
item_state = "lamp"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
brightness_on = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags_1 = CONDUCT_1
|
||||
@@ -407,7 +409,7 @@
|
||||
/obj/item/device/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
light_color = color
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -426,7 +428,7 @@
|
||||
|
||||
/obj/item/device/flashlight/glowstick/update_icon()
|
||||
item_state = "glowstick"
|
||||
overlays.Cut()
|
||||
cut_overlays()
|
||||
if(!fuel)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
|
||||
var/scanning = 0
|
||||
var/radiation_count = 0
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/device/geiger_counter/New()
|
||||
..()
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
|
||||
|
||||
/obj/item/device/gps/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
GLOB.GPS_list += src
|
||||
name = "global positioning system ([gpstag])"
|
||||
add_overlay("working")
|
||||
|
||||
@@ -1,269 +1,268 @@
|
||||
|
||||
// Light Replacer (LR)
|
||||
//
|
||||
// ABOUT THE DEVICE
|
||||
//
|
||||
// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will
|
||||
// allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since
|
||||
// they don't have hands or a way to replace lightbulbs.
|
||||
//
|
||||
// HOW IT WORKS
|
||||
//
|
||||
// You attack a light fixture with it, if the light fixture is broken it will replace the
|
||||
// light fixture with a working light; the broken light is then placed on the floor for the
|
||||
// user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture.
|
||||
//
|
||||
// HOW TO REFILL THE DEVICE
|
||||
//
|
||||
// It will need to be manually refilled with lights.
|
||||
// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station.
|
||||
//
|
||||
// EMAGGED FEATURES
|
||||
//
|
||||
// NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore.
|
||||
//
|
||||
// I'm not sure everyone will react the emag's features so please say what your opinions are of it.
|
||||
//
|
||||
// When emagged it will rig every light it replaces, which will explode when the light is on.
|
||||
// This is VERY noticable, even the device's name changes when you emag it so if anyone
|
||||
// examines you when you're holding it in your hand, you will be discovered.
|
||||
// It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy
|
||||
// access to them, and only one of them can emag their device.
|
||||
//
|
||||
// The explosion cannot insta-kill anyone with 30% or more health.
|
||||
|
||||
#define LIGHT_OK 0
|
||||
#define LIGHT_EMPTY 1
|
||||
#define LIGHT_BROKEN 2
|
||||
#define LIGHT_BURNED 3
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer
|
||||
|
||||
name = "light replacer"
|
||||
desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass."
|
||||
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "lightreplacer0"
|
||||
item_state = "electronic"
|
||||
|
||||
// Light Replacer (LR)
|
||||
//
|
||||
// ABOUT THE DEVICE
|
||||
//
|
||||
// This is a device supposedly to be used by Janitors and Janitor Cyborgs which will
|
||||
// allow them to easily replace lights. This was mostly designed for Janitor Cyborgs since
|
||||
// they don't have hands or a way to replace lightbulbs.
|
||||
//
|
||||
// HOW IT WORKS
|
||||
//
|
||||
// You attack a light fixture with it, if the light fixture is broken it will replace the
|
||||
// light fixture with a working light; the broken light is then placed on the floor for the
|
||||
// user to then pickup with a trash bag. If it's empty then it will just place a light in the fixture.
|
||||
//
|
||||
// HOW TO REFILL THE DEVICE
|
||||
//
|
||||
// It will need to be manually refilled with lights.
|
||||
// If it's part of a robot module, it will charge when the Robot is inside a Recharge Station.
|
||||
//
|
||||
// EMAGGED FEATURES
|
||||
//
|
||||
// NOTICE: The Cyborg cannot use the emagged Light Replacer and the light's explosion was nerfed. It cannot create holes in the station anymore.
|
||||
//
|
||||
// I'm not sure everyone will react the emag's features so please say what your opinions are of it.
|
||||
//
|
||||
// When emagged it will rig every light it replaces, which will explode when the light is on.
|
||||
// This is VERY noticable, even the device's name changes when you emag it so if anyone
|
||||
// examines you when you're holding it in your hand, you will be discovered.
|
||||
// It will also be very obvious who is setting all these lights off, since only Janitor Borgs and Janitors have easy
|
||||
// access to them, and only one of them can emag their device.
|
||||
//
|
||||
// The explosion cannot insta-kill anyone with 30% or more health.
|
||||
|
||||
#define LIGHT_OK 0
|
||||
#define LIGHT_EMPTY 1
|
||||
#define LIGHT_BROKEN 2
|
||||
#define LIGHT_BURNED 3
|
||||
|
||||
|
||||
/obj/item/device/lightreplacer
|
||||
|
||||
name = "light replacer"
|
||||
desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass."
|
||||
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "lightreplacer0"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
|
||||
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "magnets=3;engineering=4"
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
var/emagged = FALSE
|
||||
var/failmsg = ""
|
||||
// How much to increase per each glass?
|
||||
var/increment = 5
|
||||
// How much to take from the glass?
|
||||
var/decrement = 1
|
||||
var/charge = 1
|
||||
|
||||
// Eating used bulbs gives us bulb shards
|
||||
var/bulb_shards = 0
|
||||
// when we get this many shards, we get a free bulb.
|
||||
var/shards_required = 4
|
||||
|
||||
/obj/item/device/lightreplacer/New()
|
||||
uses = max_uses / 2
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
else if(G.use(decrement))
|
||||
AddUses(increment)
|
||||
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
||||
|
||||
if(istype(W, /obj/item/shard))
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(round(increment*0.75))
|
||||
to_chat(user, "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/light))
|
||||
var/obj/item/light/L = W
|
||||
if(L.status == 0) // LIGHT OKAY
|
||||
if(uses < max_uses)
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
else
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
var/found_lightbulbs = FALSE
|
||||
var/replaced_something = TRUE
|
||||
|
||||
for(var/obj/item/I in S.contents)
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "magnets=3;engineering=4"
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
var/failmsg = ""
|
||||
// How much to increase per each glass?
|
||||
var/increment = 5
|
||||
// How much to take from the glass?
|
||||
var/decrement = 1
|
||||
var/charge = 1
|
||||
|
||||
// Eating used bulbs gives us bulb shards
|
||||
var/bulb_shards = 0
|
||||
// when we get this many shards, we get a free bulb.
|
||||
var/shards_required = 4
|
||||
|
||||
/obj/item/device/lightreplacer/New()
|
||||
uses = max_uses / 2
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
else if(G.use(decrement))
|
||||
AddUses(increment)
|
||||
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
||||
|
||||
if(istype(W, /obj/item/shard))
|
||||
if(uses >= max_uses)
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(round(increment*0.75))
|
||||
to_chat(user, "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/light))
|
||||
var/obj/item/light/L = W
|
||||
if(L.status == 0) // LIGHT OKAY
|
||||
if(uses < max_uses)
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
else
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
var/found_lightbulbs = FALSE
|
||||
var/replaced_something = TRUE
|
||||
|
||||
for(var/obj/item/I in S.contents)
|
||||
if(istype(I, /obj/item/light))
|
||||
var/obj/item/light/L = I
|
||||
found_lightbulbs = TRUE
|
||||
if(src.uses >= max_uses)
|
||||
break
|
||||
if(L.status == LIGHT_OK)
|
||||
replaced_something = TRUE
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
|
||||
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
|
||||
replaced_something = TRUE
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
|
||||
if(!found_lightbulbs)
|
||||
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
||||
return
|
||||
|
||||
if(!replaced_something && src.uses == max_uses)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act()
|
||||
var/obj/item/light/L = I
|
||||
found_lightbulbs = TRUE
|
||||
if(src.uses >= max_uses)
|
||||
break
|
||||
if(L.status == LIGHT_OK)
|
||||
replaced_something = TRUE
|
||||
AddUses(1)
|
||||
qdel(L)
|
||||
|
||||
else if(L.status == LIGHT_BROKEN || L.status == LIGHT_BURNED)
|
||||
replaced_something = TRUE
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
|
||||
if(!found_lightbulbs)
|
||||
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
||||
return
|
||||
|
||||
if(!replaced_something && src.uses == max_uses)
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act()
|
||||
if(emagged)
|
||||
return
|
||||
Emag()
|
||||
|
||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/update_icon()
|
||||
icon_state = "lightreplacer[emagged]"
|
||||
|
||||
/obj/item/device/lightreplacer/proc/status_string()
|
||||
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(mob/user)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
AddUses(-1)
|
||||
return 1
|
||||
|
||||
// Negative numbers will subtract
|
||||
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
|
||||
uses = Clamp(uses + amount, 0, max_uses)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
|
||||
bulb_shards += amount
|
||||
var/new_bulbs = round(bulb_shards / shards_required)
|
||||
if(new_bulbs > 0)
|
||||
AddUses(new_bulbs)
|
||||
bulb_shards = bulb_shards % shards_required
|
||||
if(new_bulbs != 0)
|
||||
to_chat(user, "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>")
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return new_bulbs
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
||||
charge += 1
|
||||
if(charge > 3)
|
||||
AddUses(1)
|
||||
charge = 1
|
||||
|
||||
/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
|
||||
|
||||
if(target.status != LIGHT_OK)
|
||||
if(CanUse(U))
|
||||
if(!Use(U)) return
|
||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||
|
||||
if(target.status != LIGHT_EMPTY)
|
||||
AddShards(1, U)
|
||||
target.status = LIGHT_EMPTY
|
||||
target.update()
|
||||
|
||||
var/obj/item/light/L2 = new target.light_type()
|
||||
|
||||
target.status = L2.status
|
||||
target.switchcount = L2.switchcount
|
||||
target.rigged = emagged
|
||||
target.brightness = L2.brightness
|
||||
target.on = target.has_power()
|
||||
target.update()
|
||||
qdel(L2)
|
||||
|
||||
if(target.on && target.rigged)
|
||||
target.explode()
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(U, failmsg)
|
||||
return
|
||||
else
|
||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Emag()
|
||||
emagged = !emagged
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
if(emagged)
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
|
||||
src.add_fingerprint(user)
|
||||
if(uses > 0)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
var/used = FALSE
|
||||
for(var/atom/A in T)
|
||||
if(!CanUse(U))
|
||||
break
|
||||
used = TRUE
|
||||
if(istype(A, /obj/machinery/light))
|
||||
ReplaceLight(A, U)
|
||||
|
||||
if(!used)
|
||||
to_chat(U, failmsg)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
#undef LIGHT_OK
|
||||
#undef LIGHT_EMPTY
|
||||
#undef LIGHT_BROKEN
|
||||
#undef LIGHT_BURNED
|
||||
|
||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/update_icon()
|
||||
icon_state = "lightreplacer[emagged]"
|
||||
|
||||
/obj/item/device/lightreplacer/proc/status_string()
|
||||
return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)."
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(mob/user)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
AddUses(-1)
|
||||
return 1
|
||||
|
||||
// Negative numbers will subtract
|
||||
/obj/item/device/lightreplacer/proc/AddUses(amount = 1)
|
||||
uses = Clamp(uses + amount, 0, max_uses)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/AddShards(amount = 1, user)
|
||||
bulb_shards += amount
|
||||
var/new_bulbs = round(bulb_shards / shards_required)
|
||||
if(new_bulbs > 0)
|
||||
AddUses(new_bulbs)
|
||||
bulb_shards = bulb_shards % shards_required
|
||||
if(new_bulbs != 0)
|
||||
to_chat(user, "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>")
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return new_bulbs
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
||||
charge += 1
|
||||
if(charge > 3)
|
||||
AddUses(1)
|
||||
charge = 1
|
||||
|
||||
/obj/item/device/lightreplacer/proc/ReplaceLight(obj/machinery/light/target, mob/living/U)
|
||||
|
||||
if(target.status != LIGHT_OK)
|
||||
if(CanUse(U))
|
||||
if(!Use(U)) return
|
||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||
|
||||
if(target.status != LIGHT_EMPTY)
|
||||
AddShards(1, U)
|
||||
target.status = LIGHT_EMPTY
|
||||
target.update()
|
||||
|
||||
var/obj/item/light/L2 = new target.light_type()
|
||||
|
||||
target.status = L2.status
|
||||
target.switchcount = L2.switchcount
|
||||
target.rigged = emagged
|
||||
target.brightness = L2.brightness
|
||||
target.on = target.has_power()
|
||||
target.update()
|
||||
qdel(L2)
|
||||
|
||||
if(target.on && target.rigged)
|
||||
target.explode()
|
||||
return
|
||||
|
||||
else
|
||||
to_chat(U, failmsg)
|
||||
return
|
||||
else
|
||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Emag()
|
||||
emagged = !emagged
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
if(emagged)
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/proc/CanUse(mob/living/user)
|
||||
src.add_fingerprint(user)
|
||||
if(uses > 0)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/device/lightreplacer/afterattack(atom/T, mob/U, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
var/used = FALSE
|
||||
for(var/atom/A in T)
|
||||
if(!CanUse(U))
|
||||
break
|
||||
used = TRUE
|
||||
if(istype(A, /obj/machinery/light))
|
||||
ReplaceLight(A, U)
|
||||
|
||||
if(!used)
|
||||
to_chat(U, failmsg)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/device/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
#undef LIGHT_OK
|
||||
#undef LIGHT_EMPTY
|
||||
#undef LIGHT_BROKEN
|
||||
#undef LIGHT_BURNED
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
siemens_coefficient = 1
|
||||
var/spamcheck = 0
|
||||
var/emagged = FALSE
|
||||
var/list/voicespan = list(SPAN_COMMAND)
|
||||
|
||||
/obj/item/device/megaphone/get_held_item_speechspans(mob/living/carbon/user)
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
//Pinpointers are used to track atoms from a distance as long as they're on the same z-level. The captain and nuke ops have ones that track the nuclear authentication disk.
|
||||
/obj/item/weapon/pinpointer
|
||||
name = "pinpointer"
|
||||
desc = "A handheld tracking device that locks onto certain signals."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "pinpointer"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
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 = 500, MAT_GLASS = 250)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/active = FALSE
|
||||
var/atom/movable/target = null //The thing we're searching for
|
||||
var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
|
||||
var/alert = FALSE // TRUE to display things more seriously
|
||||
|
||||
/obj/item/weapon/pinpointer/New()
|
||||
..()
|
||||
GLOB.pinpointer_list += src
|
||||
|
||||
/obj/item/weapon/pinpointer/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
GLOB.pinpointer_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/pinpointer/attack_self(mob/living/user)
|
||||
active = !active
|
||||
user.visible_message("<span class='notice'>[user] [active ? "" : "de"]activates their pinpointer.</span>", "<span class='notice'>You [active ? "" : "de"]activate your pinpointer.</span>")
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
if(active)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
else
|
||||
target = null
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_pointer_overlay()
|
||||
|
||||
/obj/item/weapon/pinpointer/process()
|
||||
if(!active)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return
|
||||
scan_for_target()
|
||||
update_pointer_overlay()
|
||||
|
||||
/obj/item/weapon/pinpointer/proc/scan_for_target()
|
||||
return
|
||||
|
||||
/obj/item/weapon/pinpointer/proc/update_pointer_overlay()
|
||||
cut_overlays()
|
||||
if(!active)
|
||||
return
|
||||
if(!target)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
var/turf/here = get_turf(src)
|
||||
var/turf/there = get_turf(target)
|
||||
if(here.z != there.z)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
return
|
||||
if(get_dist_euclidian(here,there) <= minimum_range)
|
||||
add_overlay("pinon[alert ? "alert" : ""]direct")
|
||||
else
|
||||
setDir(get_dir(here, there))
|
||||
switch(get_dist(here, there))
|
||||
if(1 to 8)
|
||||
add_overlay("pinon[alert ? "alert" : "close"]")
|
||||
if(9 to 16)
|
||||
add_overlay("pinon[alert ? "alert" : "medium"]")
|
||||
if(16 to INFINITY)
|
||||
add_overlay("pinon[alert ? "alert" : "far"]")
|
||||
|
||||
/obj/item/weapon/pinpointer/crew // A replacement for the old crew monitoring consoles
|
||||
name = "crew pinpointer"
|
||||
desc = "A handheld tracking device that points to crew suit sensors."
|
||||
icon_state = "pinpointer_crew"
|
||||
|
||||
/obj/item/weapon/pinpointer/crew/proc/trackable(mob/living/carbon/human/H)
|
||||
var/turf/here = get_turf(src)
|
||||
if((H.z == 0 || H.z == here.z) && istype(H.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
|
||||
// Suit sensors must be on maximum.
|
||||
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS)
|
||||
return FALSE
|
||||
|
||||
var/turf/there = get_turf(H)
|
||||
return (H.z != 0 || (there && there.z == H.z))
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/pinpointer/crew/attack_self(mob/living/user)
|
||||
if(active)
|
||||
active = FALSE
|
||||
user.visible_message("<span class='notice'>[user] deactivates their pinpointer.</span>", "<span class='notice'>You deactivate your pinpointer.</span>")
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
target = null //Restarting the pinpointer forces a target reset
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_pointer_overlay()
|
||||
return
|
||||
|
||||
var/list/name_counts = list()
|
||||
var/list/names = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(!trackable(H))
|
||||
continue
|
||||
|
||||
var/name = "Unknown"
|
||||
if(H.wear_id)
|
||||
var/obj/item/weapon/card/id/I = H.wear_id.GetID()
|
||||
name = I.registered_name
|
||||
|
||||
while(name in name_counts)
|
||||
name_counts[name]++
|
||||
name = text("[] ([])", name, name_counts[name])
|
||||
names[name] = H
|
||||
name_counts[name] = 1
|
||||
|
||||
if(!names.len)
|
||||
user.visible_message("<span class='notice'>[user]'s pinpointer fails to detect a signal.</span>", "<span class='notice'>Your pinpointer fails to detect a signal.</span>")
|
||||
return
|
||||
|
||||
var/A = input(user, "Person to track", "Pinpoint") in names
|
||||
if(!src || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !A)
|
||||
return
|
||||
|
||||
target = names[A]
|
||||
active = TRUE
|
||||
user.visible_message("<span class='notice'>[user] activates their pinpointer.</span>", "<span class='notice'>You activate your pinpointer.</span>")
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
update_pointer_overlay()
|
||||
|
||||
/obj/item/weapon/pinpointer/crew/scan_for_target()
|
||||
if(target)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(!trackable(H))
|
||||
target = null
|
||||
if(!target)
|
||||
active = FALSE
|
||||
|
||||
/obj/item/weapon/pinpointer/process()
|
||||
if(!active)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return
|
||||
scan_for_target()
|
||||
update_pointer_overlay()
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
icon_state = null
|
||||
active = TRUE
|
||||
if(tile_overlay)
|
||||
loc.overlays += tile_overlay
|
||||
loc.add_overlay(tile_overlay)
|
||||
else
|
||||
if(crossed)
|
||||
trigger() //no cheesing.
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
signal.frequency = freqnum // Quick frequency set
|
||||
for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
|
||||
// Allinone can act as receivers. (Unless of course whoever coded this last time forgot to put it in somewhere!)
|
||||
for(var/obj/machinery/telecomms/allinone/R in GLOB.telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
@@ -449,6 +449,8 @@
|
||||
return
|
||||
if(broadcasting)
|
||||
if(get_dist(src, speaker) <= canhear_range)
|
||||
if(message_mode == MODE_WHISPER || message_mode == MODE_WHISPER_CRIT)
|
||||
raw_message = stars(raw_message)
|
||||
talk_into(speaker, raw_message, , spans, language=message_language)
|
||||
/*
|
||||
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
|
||||
@@ -553,7 +555,7 @@
|
||||
flags_2 = NO_EMP_WIRES_2
|
||||
|
||||
/obj/item/device/radio/borg/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/radio/borg/syndicate
|
||||
syndie = 1
|
||||
|
||||
@@ -113,7 +113,7 @@ MASS SPECTROMETER
|
||||
var/tox_loss = M.getToxLoss()
|
||||
var/fire_loss = M.getFireLoss()
|
||||
var/brute_loss = M.getBruteLoss()
|
||||
var/mob_status = (M.stat > 1 ? "<span class='alert'><b>Deceased</b></span>" : "<b>[round(M.health/M.maxHealth,0.01)*100] % healthy</b>")
|
||||
var/mob_status = (M.stat == DEAD ? "<span class='alert'><b>Deceased</b></span>" : "<b>[round(M.health/M.maxHealth,0.01)*100] % healthy</b>")
|
||||
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
mob_status = "<span class='alert'>Deceased</span>"
|
||||
|
||||
@@ -1,294 +1,294 @@
|
||||
/obj/item/device/taperecorder
|
||||
name = "universal recorder"
|
||||
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
|
||||
icon_state = "taperecorder_empty"
|
||||
item_state = "analyzer"
|
||||
/obj/item/device/taperecorder
|
||||
name = "universal recorder"
|
||||
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
|
||||
icon_state = "taperecorder_empty"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags_1 = HEAR_1
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=60, MAT_GLASS=30)
|
||||
force = 2
|
||||
throwforce = 0
|
||||
var/recording = 0
|
||||
var/playing = 0
|
||||
var/playsleepseconds = 0
|
||||
var/obj/item/device/tape/mytape
|
||||
var/starting_tape_type = /obj/item/device/tape/random
|
||||
var/open_panel = 0
|
||||
var/canprint = 1
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Initialize(mapload)
|
||||
..()
|
||||
if(starting_tape_type)
|
||||
mytape = new starting_tape_type(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
|
||||
if(!mytape && istype(I, /obj/item/device/tape))
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/taperecorder/fire_act(exposed_temperature, exposed_volume)
|
||||
mytape.ruin() //Fires destroy the tape
|
||||
..()
|
||||
|
||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(!user.is_holding(src))
|
||||
..()
|
||||
return
|
||||
eject(user)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(!user.incapacitated())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/ejectverb()
|
||||
set name = "Eject Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/update_icon()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
icon_state = "taperecorder_recording"
|
||||
else if(playing)
|
||||
icon_state = "taperecorder_playing"
|
||||
else
|
||||
icon_state = "taperecorder_idle"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
if(mytape && recording)
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [message]"
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
if(mytape.used_capacity < mytape.max_capacity)
|
||||
to_chat(usr, "<span class='notice'>Recording started.</span>")
|
||||
recording = 1
|
||||
update_icon()
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started."
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(used, used < max)
|
||||
if(recording == 0)
|
||||
break
|
||||
mytape.used_capacity++
|
||||
used++
|
||||
sleep(10)
|
||||
recording = 0
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>The tape is full.</span>")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
set name = "Stop"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
if(recording)
|
||||
recording = 0
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
|
||||
to_chat(usr, "<span class='notice'>Recording stopped.</span>")
|
||||
return
|
||||
else if(playing)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/play()
|
||||
set name = "Play Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
playing = 1
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='notice'>Playing started.</span>")
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
|
||||
if(!mytape)
|
||||
break
|
||||
if(playing == 0)
|
||||
break
|
||||
if(mytape.storedinfo.len < i)
|
||||
break
|
||||
say(mytape.storedinfo[i])
|
||||
if(mytape.storedinfo.len < i + 1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
say("End of recording.")
|
||||
else
|
||||
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
say("Skipping [playsleepseconds] seconds of silence")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
|
||||
playing = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
stop()
|
||||
else
|
||||
record()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/print_transcript()
|
||||
set name = "Print Transcript"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
if(!canprint)
|
||||
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
|
||||
return
|
||||
if(recording || playing)
|
||||
return
|
||||
|
||||
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
|
||||
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
t1 += "[mytape.storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
usr.put_in_hands(P)
|
||||
canprint = 0
|
||||
sleep(300)
|
||||
canprint = 1
|
||||
|
||||
|
||||
//empty tape recorders
|
||||
/obj/item/device/taperecorder/empty
|
||||
starting_tape_type = null
|
||||
|
||||
|
||||
/obj/item/device/tape
|
||||
name = "tape"
|
||||
desc = "A magnetic tape that can hold up to ten minutes of content."
|
||||
icon_state = "tape_white"
|
||||
item_state = "analyzer"
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=60, MAT_GLASS=30)
|
||||
force = 2
|
||||
throwforce = 0
|
||||
var/recording = 0
|
||||
var/playing = 0
|
||||
var/playsleepseconds = 0
|
||||
var/obj/item/device/tape/mytape
|
||||
var/starting_tape_type = /obj/item/device/tape/random
|
||||
var/open_panel = 0
|
||||
var/canprint = 1
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Initialize(mapload)
|
||||
. = ..()
|
||||
if(starting_tape_type)
|
||||
mytape = new starting_tape_type(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
|
||||
if(!mytape && istype(I, /obj/item/device/tape))
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/taperecorder/fire_act(exposed_temperature, exposed_volume)
|
||||
mytape.ruin() //Fires destroy the tape
|
||||
..()
|
||||
|
||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(!user.is_holding(src))
|
||||
..()
|
||||
return
|
||||
eject(user)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(!user.incapacitated())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/ejectverb()
|
||||
set name = "Eject Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/update_icon()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
icon_state = "taperecorder_recording"
|
||||
else if(playing)
|
||||
icon_state = "taperecorder_playing"
|
||||
else
|
||||
icon_state = "taperecorder_idle"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
if(mytape && recording)
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [message]"
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
if(mytape.used_capacity < mytape.max_capacity)
|
||||
to_chat(usr, "<span class='notice'>Recording started.</span>")
|
||||
recording = 1
|
||||
update_icon()
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started."
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(used, used < max)
|
||||
if(recording == 0)
|
||||
break
|
||||
mytape.used_capacity++
|
||||
used++
|
||||
sleep(10)
|
||||
recording = 0
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>The tape is full.</span>")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
set name = "Stop"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
if(recording)
|
||||
recording = 0
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
|
||||
to_chat(usr, "<span class='notice'>Recording stopped.</span>")
|
||||
return
|
||||
else if(playing)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/play()
|
||||
set name = "Play Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
playing = 1
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='notice'>Playing started.</span>")
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
|
||||
if(!mytape)
|
||||
break
|
||||
if(playing == 0)
|
||||
break
|
||||
if(mytape.storedinfo.len < i)
|
||||
break
|
||||
say(mytape.storedinfo[i])
|
||||
if(mytape.storedinfo.len < i + 1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
say("End of recording.")
|
||||
else
|
||||
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
say("Skipping [playsleepseconds] seconds of silence")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
|
||||
playing = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
stop()
|
||||
else
|
||||
record()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/print_transcript()
|
||||
set name = "Print Transcript"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
if(!canprint)
|
||||
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
|
||||
return
|
||||
if(recording || playing)
|
||||
return
|
||||
|
||||
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
|
||||
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
t1 += "[mytape.storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
usr.put_in_hands(P)
|
||||
canprint = 0
|
||||
sleep(300)
|
||||
canprint = 1
|
||||
|
||||
|
||||
//empty tape recorders
|
||||
/obj/item/device/taperecorder/empty
|
||||
starting_tape_type = null
|
||||
|
||||
|
||||
/obj/item/device/tape
|
||||
name = "tape"
|
||||
desc = "A magnetic tape that can hold up to ten minutes of content."
|
||||
icon_state = "tape_white"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=20, MAT_GLASS=5)
|
||||
force = 1
|
||||
throwforce = 0
|
||||
var/max_capacity = 600
|
||||
var/used_capacity = 0
|
||||
var/list/storedinfo = list()
|
||||
var/list/timestamp = list()
|
||||
var/ruined = 0
|
||||
|
||||
/obj/item/device/tape/fire_act(exposed_temperature, exposed_volume)
|
||||
ruin()
|
||||
..()
|
||||
|
||||
/obj/item/device/tape/attack_self(mob/user)
|
||||
if(!ruined)
|
||||
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
|
||||
ruin()
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/ruin()
|
||||
//Lets not add infinite amounts of overlays when our fireact is called
|
||||
//repeatedly
|
||||
if(!ruined)
|
||||
add_overlay("ribbonoverlay")
|
||||
ruined = 1
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/fix()
|
||||
cut_overlay("ribbonoverlay")
|
||||
ruined = 0
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined)
|
||||
var/delay = -1
|
||||
if (istype(I, /obj/item/screwdriver))
|
||||
delay = 120*I.toolspeed
|
||||
else if(istype(I, /obj/item/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random/New()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
..()
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=20, MAT_GLASS=5)
|
||||
force = 1
|
||||
throwforce = 0
|
||||
var/max_capacity = 600
|
||||
var/used_capacity = 0
|
||||
var/list/storedinfo = list()
|
||||
var/list/timestamp = list()
|
||||
var/ruined = 0
|
||||
|
||||
/obj/item/device/tape/fire_act(exposed_temperature, exposed_volume)
|
||||
ruin()
|
||||
..()
|
||||
|
||||
/obj/item/device/tape/attack_self(mob/user)
|
||||
if(!ruined)
|
||||
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
|
||||
ruin()
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/ruin()
|
||||
//Lets not add infinite amounts of overlays when our fireact is called
|
||||
//repeatedly
|
||||
if(!ruined)
|
||||
add_overlay("ribbonoverlay")
|
||||
ruined = 1
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/fix()
|
||||
cut_overlay("ribbonoverlay")
|
||||
ruined = 0
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined)
|
||||
var/delay = -1
|
||||
if (istype(I, /obj/item/screwdriver))
|
||||
delay = 120*I.toolspeed
|
||||
else if(istype(I, /obj/item/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random/New()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
..()
|
||||
|
||||
@@ -147,7 +147,7 @@ effective or pretty fucking useless.
|
||||
usr.set_machine(src)
|
||||
if(href_list["rad"])
|
||||
irradiate = !irradiate
|
||||
|
||||
|
||||
else if(href_list["stealthy"])
|
||||
stealth = !stealth
|
||||
|
||||
@@ -242,11 +242,10 @@ effective or pretty fucking useless.
|
||||
var/range = 12
|
||||
|
||||
/obj/item/device/jammer/attack_self(mob/user)
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src]<span>")
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src].</span>")
|
||||
active = !active
|
||||
if(active)
|
||||
GLOB.active_jammers |= src
|
||||
else
|
||||
GLOB.active_jammers -= src
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -1,370 +1,370 @@
|
||||
/obj/item/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "dnainjector"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
/obj/item/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "dnainjector"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
desc = "PRESENTS!!!! eek!"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "giftdeliverypackage3"
|
||||
item_state = "gift1"
|
||||
item_state = "gift"
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/a_gift/New()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "plastic explosive"
|
||||
desc = "Used to put holes in specific areas without too much extra hole."
|
||||
icon_state = "plastic-explosive0"
|
||||
item_state = "plastic-explosive"
|
||||
item_state = "plasticx"
|
||||
flags_1 = NOBLUDGEON_1
|
||||
flags_2 = NO_EMP_WIRES_2
|
||||
det_time = 10
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
desc = "A toolbox painted bright green. Looking at it makes you feel uneasy."
|
||||
icon_state = "his_grace"
|
||||
item_state = "artistic_toolbox"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
origin_tech = "combat=4;engineering=4;syndicate=2"
|
||||
|
||||
@@ -336,6 +336,8 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "carpplushie"
|
||||
item_state = "carp_plushie"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
force = 15
|
||||
attack_verb = list("bitten", "eaten", "fin slapped")
|
||||
hitsound = 'sound/weapons/bite.ogg'
|
||||
@@ -403,3 +405,14 @@
|
||||
attack_verb = list("poked", "impaled", "pierced", "jabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/nullrod/egyptian
|
||||
name = "egyptian staff"
|
||||
desc = "A tutorial in mummification is carved into the staff. You could probably follow the steps yourself if you had some bandages."
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
icon_state = "pharoah_sceptre"
|
||||
item_state = "pharoah_sceptre"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashes", "smacks", "whacks")
|
||||
|
||||
@@ -1,187 +1,188 @@
|
||||
/obj/machinery/implantchair
|
||||
name = "mindshield implanter"
|
||||
desc = "Used to implant occupants with mindshield implants."
|
||||
icon = 'icons/obj/machines/implantchair.dmi'
|
||||
icon_state = "implantchair"
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
anchored = TRUE
|
||||
|
||||
var/ready = TRUE
|
||||
var/replenishing = FALSE
|
||||
|
||||
var/ready_implants = 5
|
||||
var/max_implants = 5
|
||||
var/injection_cooldown = 600
|
||||
var/replenish_cooldown = 6000
|
||||
var/implant_type = /obj/item/implant/mindshield
|
||||
var/auto_inject = FALSE
|
||||
var/auto_replenish = TRUE
|
||||
var/special = FALSE
|
||||
var/special_name = "special function"
|
||||
|
||||
/obj/machinery/implantchair/Initialize()
|
||||
. = ..()
|
||||
open_machine()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "implantchair", name, 375, 280, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_data()
|
||||
var/list/data = list()
|
||||
data["occupied"] = occupant ? 1 : 0
|
||||
data["open"] = state_open
|
||||
|
||||
data["occupant"] = list()
|
||||
if(occupant)
|
||||
var/mob/living/mob_occupant = occupant
|
||||
data["occupant"]["name"] = mob_occupant.name
|
||||
data["occupant"]["stat"] = mob_occupant.stat
|
||||
|
||||
data["special_name"] = special ? special_name : null
|
||||
data["ready_implants"] = ready_implants
|
||||
data["ready"] = ready
|
||||
data["replenishing"] = replenishing
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/implantchair/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("door")
|
||||
if(state_open)
|
||||
close_machine()
|
||||
else
|
||||
open_machine()
|
||||
. = TRUE
|
||||
if("implant")
|
||||
implant(occupant,usr)
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/implantchair/proc/implant(mob/living/M,mob/user)
|
||||
if (!istype(M))
|
||||
return
|
||||
if(!ready_implants || !ready)
|
||||
return
|
||||
if(implant_action(M,user))
|
||||
ready_implants--
|
||||
if(!replenishing && auto_replenish)
|
||||
replenishing = TRUE
|
||||
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
|
||||
if(injection_cooldown > 0)
|
||||
ready = FALSE
|
||||
addtimer(CALLBACK(src,"set_ready"),injection_cooldown)
|
||||
else
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/proc/implant_action(mob/living/M)
|
||||
var/obj/item/implant/I = new implant_type
|
||||
if(I.implant(M))
|
||||
visible_message("<span class='warning'>[M] has been implanted by the [name].</span>")
|
||||
return 1
|
||||
|
||||
/obj/machinery/implantchair/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
if(state_open)
|
||||
icon_state += "_open"
|
||||
if(occupant)
|
||||
icon_state += "_occupied"
|
||||
if(ready)
|
||||
add_overlay("ready")
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/implantchair/proc/replenish()
|
||||
if(ready_implants < max_implants)
|
||||
ready_implants++
|
||||
if(ready_implants < max_implants)
|
||||
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
|
||||
else
|
||||
replenishing = FALSE
|
||||
|
||||
/obj/machinery/implantchair/proc/set_ready()
|
||||
ready = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/container_resist(mob/living/user)
|
||||
if(state_open)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about about a minute.)</span>")
|
||||
audible_message("<span class='italics'>You hear a metallic creaking from [src]!</span>",hearing_distance = 2)
|
||||
|
||||
if(do_after(user, 600, target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open)
|
||||
return
|
||||
visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>")
|
||||
to_chat(user, "<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/implantchair/relaymove(mob/user)
|
||||
container_resist(user)
|
||||
|
||||
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
|
||||
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
|
||||
return
|
||||
close_machine(target)
|
||||
|
||||
/obj/machinery/implantchair/close_machine(mob/living/user)
|
||||
if((isnull(user) || istype(user)) && state_open)
|
||||
..(user)
|
||||
if(auto_inject && ready && ready_implants > 0)
|
||||
implant(user,null)
|
||||
|
||||
/obj/machinery/implantchair/genepurge
|
||||
name = "Genetic purifier"
|
||||
desc = "Used to purge human genome of foreign influences"
|
||||
special = TRUE
|
||||
special_name = "Purge genome"
|
||||
injection_cooldown = 0
|
||||
replenish_cooldown = 300
|
||||
|
||||
/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user)
|
||||
if(!istype(H))
|
||||
return 0
|
||||
H.set_species(/datum/species/human, 1)//lizards go home
|
||||
purrbation_remove(H)//remove cats
|
||||
H.dna.remove_all_mutations()//hulks out
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/implantchair/brainwash
|
||||
name = "Neural Imprinter"
|
||||
desc = "Used to <s>indoctrinate</s> rehabilitate hardened recidivists."
|
||||
special_name = "Imprint"
|
||||
injection_cooldown = 3000
|
||||
auto_inject = FALSE
|
||||
auto_replenish = FALSE
|
||||
special = TRUE
|
||||
var/objective = "Obey the law. Praise Nanotrasen."
|
||||
var/custom = FALSE
|
||||
|
||||
/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user)
|
||||
if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway.
|
||||
return 0
|
||||
if(custom)
|
||||
if(!user || !user.Adjacent(src))
|
||||
return 0
|
||||
objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120)
|
||||
message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
|
||||
log_game("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
|
||||
var/datum/objective/custom_objective = new/datum/objective(objective)
|
||||
custom_objective.owner = C.mind
|
||||
C.mind.objectives += custom_objective
|
||||
C.mind.announce_objectives()
|
||||
message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
log_game("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
return 1
|
||||
|
||||
/obj/machinery/implantchair
|
||||
name = "mindshield implanter"
|
||||
desc = "Used to implant occupants with mindshield implants."
|
||||
icon = 'icons/obj/machines/implantchair.dmi'
|
||||
icon_state = "implantchair"
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
anchored = TRUE
|
||||
|
||||
var/ready = TRUE
|
||||
var/replenishing = FALSE
|
||||
|
||||
var/ready_implants = 5
|
||||
var/max_implants = 5
|
||||
var/injection_cooldown = 600
|
||||
var/replenish_cooldown = 6000
|
||||
var/implant_type = /obj/item/implant/mindshield
|
||||
var/auto_inject = FALSE
|
||||
var/auto_replenish = TRUE
|
||||
var/special = FALSE
|
||||
var/special_name = "special function"
|
||||
var/message_cooldown
|
||||
var/breakout_time = 1
|
||||
|
||||
/obj/machinery/implantchair/Initialize()
|
||||
. = ..()
|
||||
open_machine()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "implantchair", name, 375, 280, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_data()
|
||||
var/list/data = list()
|
||||
data["occupied"] = occupant ? 1 : 0
|
||||
data["open"] = state_open
|
||||
|
||||
data["occupant"] = list()
|
||||
if(occupant)
|
||||
var/mob/living/mob_occupant = occupant
|
||||
data["occupant"]["name"] = mob_occupant.name
|
||||
data["occupant"]["stat"] = mob_occupant.stat
|
||||
|
||||
data["special_name"] = special ? special_name : null
|
||||
data["ready_implants"] = ready_implants
|
||||
data["ready"] = ready
|
||||
data["replenishing"] = replenishing
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/implantchair/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("door")
|
||||
if(state_open)
|
||||
close_machine()
|
||||
else
|
||||
open_machine()
|
||||
. = TRUE
|
||||
if("implant")
|
||||
implant(occupant,usr)
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/implantchair/proc/implant(mob/living/M,mob/user)
|
||||
if (!istype(M))
|
||||
return
|
||||
if(!ready_implants || !ready)
|
||||
return
|
||||
if(implant_action(M,user))
|
||||
ready_implants--
|
||||
if(!replenishing && auto_replenish)
|
||||
replenishing = TRUE
|
||||
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
|
||||
if(injection_cooldown > 0)
|
||||
ready = FALSE
|
||||
addtimer(CALLBACK(src,"set_ready"),injection_cooldown)
|
||||
else
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/proc/implant_action(mob/living/M)
|
||||
var/obj/item/implant/I = new implant_type
|
||||
if(I.implant(M))
|
||||
visible_message("<span class='warning'>[M] has been implanted by the [name].</span>")
|
||||
return 1
|
||||
|
||||
/obj/machinery/implantchair/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
if(state_open)
|
||||
icon_state += "_open"
|
||||
if(occupant)
|
||||
icon_state += "_occupied"
|
||||
if(ready)
|
||||
add_overlay("ready")
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/implantchair/proc/replenish()
|
||||
if(ready_implants < max_implants)
|
||||
ready_implants++
|
||||
if(ready_implants < max_implants)
|
||||
addtimer(CALLBACK(src,"replenish"),replenish_cooldown)
|
||||
else
|
||||
replenishing = FALSE
|
||||
|
||||
/obj/machinery/implantchair/proc/set_ready()
|
||||
ready = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/container_resist(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
|
||||
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)</span>", \
|
||||
"<span class='italics'>You hear a metallic creaking from [src].</span>")
|
||||
if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/implantchair/relaymove(mob/user)
|
||||
if(message_cooldown <= world.time)
|
||||
message_cooldown = world.time + 50
|
||||
to_chat(user, "<span class='warning'>[src]'s door won't budge!</span>")
|
||||
|
||||
/obj/machinery/implantchair/MouseDrop_T(mob/target, mob/user)
|
||||
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !isliving(target) || !user.IsAdvancedToolUser())
|
||||
return
|
||||
close_machine(target)
|
||||
|
||||
/obj/machinery/implantchair/close_machine(mob/living/user)
|
||||
if((isnull(user) || istype(user)) && state_open)
|
||||
..(user)
|
||||
if(auto_inject && ready && ready_implants > 0)
|
||||
implant(user,null)
|
||||
|
||||
/obj/machinery/implantchair/genepurge
|
||||
name = "Genetic purifier"
|
||||
desc = "Used to purge human genome of foreign influences"
|
||||
special = TRUE
|
||||
special_name = "Purge genome"
|
||||
injection_cooldown = 0
|
||||
replenish_cooldown = 300
|
||||
|
||||
/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user)
|
||||
if(!istype(H))
|
||||
return 0
|
||||
H.set_species(/datum/species/human, 1)//lizards go home
|
||||
purrbation_remove(H)//remove cats
|
||||
H.dna.remove_all_mutations()//hulks out
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/implantchair/brainwash
|
||||
name = "Neural Imprinter"
|
||||
desc = "Used to <s>indoctrinate</s> rehabilitate hardened recidivists."
|
||||
special_name = "Imprint"
|
||||
injection_cooldown = 3000
|
||||
auto_inject = FALSE
|
||||
auto_replenish = FALSE
|
||||
special = TRUE
|
||||
var/objective = "Obey the law. Praise Nanotrasen."
|
||||
var/custom = FALSE
|
||||
|
||||
/obj/machinery/implantchair/brainwash/implant_action(mob/living/C,mob/user)
|
||||
if(!istype(C) || !C.mind) // I don't know how this makes any sense for silicons but laws trump objectives anyway.
|
||||
return 0
|
||||
if(custom)
|
||||
if(!user || !user.Adjacent(src))
|
||||
return 0
|
||||
objective = stripped_input(usr,"What order do you want to imprint on [C]?","Enter the order","",120)
|
||||
message_admins("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
|
||||
log_game("[key_name_admin(user)] set brainwash machine objective to '[objective]'.")
|
||||
var/datum/objective/custom_objective = new/datum/objective(objective)
|
||||
custom_objective.owner = C.mind
|
||||
C.mind.objectives += custom_objective
|
||||
C.mind.announce_objectives()
|
||||
message_admins("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
log_game("[key_name_admin(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
return 1
|
||||
|
||||
+170
-168
@@ -1,168 +1,170 @@
|
||||
/* Kitchen tools
|
||||
* Contains:
|
||||
* Fork
|
||||
* Kitchen knives
|
||||
* Ritual Knife
|
||||
* Butcher's cleaver
|
||||
* Combat Knife
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
origin_tech = "materials=1"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
|
||||
/obj/item/kitchen/fork
|
||||
name = "fork"
|
||||
desc = "Pointy."
|
||||
icon_state = "fork"
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=80)
|
||||
flags_1 = CONDUCT_1
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
var/datum/reagent/forkload //used to eat omelette
|
||||
|
||||
/obj/item/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(forkload)
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] eats a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
else
|
||||
M.visible_message("<span class='notice'>[user] feeds [M] a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
icon_state = "fork"
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/kitchen/knife
|
||||
name = "kitchen knife"
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
flags_1 = CONDUCT_1
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
materials = list(MAT_METAL=12000)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
var/bayonet = FALSE //Can this be attached to a gun?
|
||||
|
||||
/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/kitchen/knife/suicide_act(mob/user)
|
||||
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [src.name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/kitchen/knife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
item_state = "knife"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/kitchen/knife/butcher
|
||||
name = "butcher's cleaver"
|
||||
icon_state = "butch"
|
||||
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown by-products."
|
||||
flags_1 = CONDUCT_1
|
||||
force = 15
|
||||
throwforce = 10
|
||||
materials = list(MAT_METAL=18000)
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/kitchen/knife/combat
|
||||
name = "combat knife"
|
||||
icon_state = "buckknife"
|
||||
item_state = "knife"
|
||||
desc = "A military combat utility survival knife."
|
||||
force = 20
|
||||
throwforce = 20
|
||||
origin_tech = "materials=3;combat=4"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
|
||||
bayonet = TRUE
|
||||
|
||||
/obj/item/kitchen/knife/combat/survival
|
||||
name = "survival knife"
|
||||
icon_state = "survivalknife"
|
||||
item_state = "knife"
|
||||
desc = "A hunting grade survival knife."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
bayonet = TRUE
|
||||
|
||||
/obj/item/kitchen/knife/combat/bone
|
||||
name = "bone dagger"
|
||||
item_state = "bone_dagger"
|
||||
icon_state = "bone_dagger"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
desc = "A sharpened bone. The bare mimimum in survival."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
materials = list()
|
||||
|
||||
/obj/item/kitchen/knife/combat/cyborg
|
||||
name = "cyborg knife"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable."
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/kitchen/knife/carrotshiv
|
||||
name = "carrot shiv"
|
||||
icon_state = "carrotshiv"
|
||||
item_state = "carrotshiv"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
desc = "Unlike other carrots, you should probably keep this far away from your eyes."
|
||||
force = 8
|
||||
throwforce = 12//fuck git
|
||||
materials = list()
|
||||
origin_tech = "biotech=3;combat=2"
|
||||
attack_verb = list("shanked", "shivved")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
force = 8
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/* Trays moved to /obj/item/storage/bag */
|
||||
/* Kitchen tools
|
||||
* Contains:
|
||||
* Fork
|
||||
* Kitchen knives
|
||||
* Ritual Knife
|
||||
* Butcher's cleaver
|
||||
* Combat Knife
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
origin_tech = "materials=1"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
|
||||
/obj/item/kitchen/fork
|
||||
name = "fork"
|
||||
desc = "Pointy."
|
||||
icon_state = "fork"
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=80)
|
||||
flags_1 = CONDUCT_1
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
var/datum/reagent/forkload //used to eat omelette
|
||||
|
||||
/obj/item/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(forkload)
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] eats a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
else
|
||||
M.visible_message("<span class='notice'>[user] feeds [M] a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
icon_state = "fork"
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/kitchen/knife
|
||||
name = "kitchen knife"
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
flags_1 = CONDUCT_1
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
materials = list(MAT_METAL=12000)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
var/bayonet = FALSE //Can this be attached to a gun?
|
||||
|
||||
/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/kitchen/knife/suicide_act(mob/user)
|
||||
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [src.name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/kitchen/knife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
item_state = "knife"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/kitchen/knife/butcher
|
||||
name = "butcher's cleaver"
|
||||
icon_state = "butch"
|
||||
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown by-products."
|
||||
flags_1 = CONDUCT_1
|
||||
force = 15
|
||||
throwforce = 10
|
||||
materials = list(MAT_METAL=18000)
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/kitchen/knife/combat
|
||||
name = "combat knife"
|
||||
icon_state = "buckknife"
|
||||
item_state = "knife"
|
||||
desc = "A military combat utility survival knife."
|
||||
force = 20
|
||||
throwforce = 20
|
||||
origin_tech = "materials=3;combat=4"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
|
||||
bayonet = TRUE
|
||||
|
||||
/obj/item/kitchen/knife/combat/survival
|
||||
name = "survival knife"
|
||||
icon_state = "survivalknife"
|
||||
item_state = "knife"
|
||||
desc = "A hunting grade survival knife."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
bayonet = TRUE
|
||||
|
||||
/obj/item/kitchen/knife/combat/bone
|
||||
name = "bone dagger"
|
||||
item_state = "bone_dagger"
|
||||
icon_state = "bone_dagger"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
desc = "A sharpened bone. The bare mimimum in survival."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
materials = list()
|
||||
|
||||
/obj/item/kitchen/knife/combat/cyborg
|
||||
name = "cyborg knife"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable."
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/kitchen/knife/carrotshiv
|
||||
name = "carrot shiv"
|
||||
icon_state = "carrotshiv"
|
||||
item_state = "carrotshiv"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
desc = "Unlike other carrots, you should probably keep this far away from your eyes."
|
||||
force = 8
|
||||
throwforce = 12//fuck git
|
||||
materials = list()
|
||||
origin_tech = "biotech=3;combat=2"
|
||||
attack_verb = list("shanked", "shivved")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
force = 8
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/* Trays moved to /obj/item/storage/bag */
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "arm_blade"
|
||||
item_state = "arm_blade"
|
||||
lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi'
|
||||
origin_tech = "combat=5;biotech=5"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 20
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
//Pinpointers are used to track atoms from a distance as long as they're on the same z-level. The captain and nuke ops have ones that track the nuclear authentication disk.
|
||||
/obj/item/pinpointer
|
||||
name = "pinpointer"
|
||||
desc = "A handheld tracking device that locks onto certain signals."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "pinpointer"
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
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 = 500, MAT_GLASS = 250)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/active = FALSE
|
||||
var/atom/movable/target //The thing we're searching for
|
||||
var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
|
||||
var/alert = FALSE // TRUE to display things more seriously
|
||||
|
||||
/obj/item/pinpointer/Initialize()
|
||||
. = ..()
|
||||
GLOB.pinpointer_list += src
|
||||
|
||||
/obj/item/pinpointer/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
GLOB.pinpointer_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/pinpointer/attack_self(mob/living/user)
|
||||
active = !active
|
||||
user.visible_message("<span class='notice'>[user] [active ? "" : "de"]activates their pinpointer.</span>", "<span class='notice'>You [active ? "" : "de"]activate your pinpointer.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
if(active)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
else
|
||||
target = null
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/pinpointer/process()
|
||||
if(!active)
|
||||
return PROCESS_KILL
|
||||
scan_for_target()
|
||||
update_icon()
|
||||
|
||||
/obj/item/pinpointer/proc/scan_for_target()
|
||||
return
|
||||
|
||||
/obj/item/pinpointer/update_icon()
|
||||
cut_overlays()
|
||||
if(!active)
|
||||
return
|
||||
if(!target)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
var/turf/here = get_turf(src)
|
||||
var/turf/there = get_turf(target)
|
||||
if(here.z != there.z)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
return
|
||||
if(get_dist_euclidian(here,there) <= minimum_range)
|
||||
add_overlay("pinon[alert ? "alert" : ""]direct")
|
||||
else
|
||||
setDir(get_dir(here, there))
|
||||
switch(get_dist(here, there))
|
||||
if(1 to 8)
|
||||
add_overlay("pinon[alert ? "alert" : "close"]")
|
||||
if(9 to 16)
|
||||
add_overlay("pinon[alert ? "alert" : "medium"]")
|
||||
if(16 to INFINITY)
|
||||
add_overlay("pinon[alert ? "alert" : "far"]")
|
||||
|
||||
/obj/item/pinpointer/crew // A replacement for the old crew monitoring consoles
|
||||
name = "crew pinpointer"
|
||||
desc = "A handheld tracking device that points to crew suit sensors."
|
||||
icon_state = "pinpointer_crew"
|
||||
|
||||
/obj/item/pinpointer/crew/proc/trackable(mob/living/carbon/human/H)
|
||||
var/turf/here = get_turf(src)
|
||||
if((H.z == 0 || H.z == here.z) && istype(H.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
|
||||
// Suit sensors must be on maximum.
|
||||
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS)
|
||||
return FALSE
|
||||
|
||||
var/turf/there = get_turf(H)
|
||||
return (H.z != 0 || (there && there.z == H.z))
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/pinpointer/crew/attack_self(mob/living/user)
|
||||
if(active)
|
||||
active = FALSE
|
||||
user.visible_message("<span class='notice'>[user] deactivates their pinpointer.</span>", "<span class='notice'>You deactivate your pinpointer.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
target = null //Restarting the pinpointer forces a target reset
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
var/list/name_counts = list()
|
||||
var/list/names = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(!trackable(H))
|
||||
continue
|
||||
|
||||
var/crewmember_name = "Unknown"
|
||||
if(H.wear_id)
|
||||
var/obj/item/card/id/I = H.wear_id.GetID()
|
||||
crewmember_name = I.registered_name
|
||||
|
||||
while(crewmember_name in name_counts)
|
||||
name_counts[crewmember_name]++
|
||||
crewmember_name = text("[] ([])", crewmember_name, name_counts[crewmember_name])
|
||||
names[crewmember_name] = H
|
||||
name_counts[crewmember_name] = 1
|
||||
|
||||
if(!names.len)
|
||||
user.visible_message("<span class='notice'>[user]'s pinpointer fails to detect a signal.</span>", "<span class='notice'>Your pinpointer fails to detect a signal.</span>")
|
||||
return
|
||||
|
||||
var/A = input(user, "Person to track", "Pinpoint") in names
|
||||
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
|
||||
return
|
||||
|
||||
target = names[A]
|
||||
active = TRUE
|
||||
user.visible_message("<span class='notice'>[user] activates their pinpointer.</span>", "<span class='notice'>You activate your pinpointer.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/pinpointer/crew/scan_for_target()
|
||||
if(target)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(!trackable(H))
|
||||
target = null
|
||||
if(!target) //target can be set to null from above code, or elsewhere
|
||||
active = FALSE
|
||||
|
||||
/obj/item/pinpointer/process()
|
||||
if(!active)
|
||||
return PROCESS_KILL
|
||||
scan_for_target()
|
||||
update_icon()
|
||||
|
||||
@@ -1,27 +1,201 @@
|
||||
/obj/item/banner
|
||||
name = "banner"
|
||||
desc = "A banner with Nanotrasen's logo on it."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "banner"
|
||||
item_state = "banner"
|
||||
force = 8
|
||||
attack_verb = list("forcefully inspired", "violently encouraged", "relentlessly galvanized")
|
||||
lefthand_file = 'icons/mob/inhands/equipment/banners_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/banners_righthand.dmi'
|
||||
desc = "A banner with Nanotrasen's logo on it."
|
||||
var/moralecooldown = 0
|
||||
var/moralewait = 600
|
||||
var/inspiration_available = TRUE //If this banner can be used to inspire crew
|
||||
var/morale_time = 0
|
||||
var/morale_cooldown = 600 //How many deciseconds between uses
|
||||
var/list/job_loyalties //Mobs with any of these assigned roles will be inspired
|
||||
var/list/role_loyalties //Mobs with any of these special roles will be inspired
|
||||
var/warcry
|
||||
|
||||
/obj/item/banner/examine(mob/user)
|
||||
..()
|
||||
if(inspiration_available)
|
||||
to_chat(user, "<span class='notice'>Activate it in your hand to inspire nearby allies of this banner's allegiance!</span>")
|
||||
|
||||
/obj/item/banner/attack_self(mob/living/carbon/human/user)
|
||||
if(moralecooldown + moralewait > world.time)
|
||||
if(!inspiration_available)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You increase the morale of your fellows!</span>")
|
||||
moralecooldown = world.time
|
||||
if(morale_time > world.time)
|
||||
to_chat(user, "<span class='warning'>You aren't feeling inspired enough to flourish [src] again yet.</span>")
|
||||
return
|
||||
user.visible_message("<span class='big notice'>[user] flourishes [src]!</span>", \
|
||||
"<span class='notice'>You raise [src] skywards, inspiring your allies!</span>")
|
||||
playsound(src, "rustle", 100, FALSE)
|
||||
if(warcry)
|
||||
user.say("[warcry]")
|
||||
var/old_transform = user.transform
|
||||
user.transform *= 1.2
|
||||
animate(user, transform = old_transform, time = 10)
|
||||
morale_time = world.time + morale_cooldown
|
||||
|
||||
for(var/mob/living/carbon/human/H in range(4,get_turf(src)))
|
||||
to_chat(H, "<span class='notice'>Your morale is increased by [user]'s banner!</span>")
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStun(-40)
|
||||
H.AdjustKnockdown(-40)
|
||||
H.AdjustUnconscious(-40)
|
||||
var/list/inspired = list()
|
||||
var/has_job_loyalties = LAZYLEN(job_loyalties)
|
||||
var/has_role_loyalties = LAZYLEN(role_loyalties)
|
||||
inspired += user //The user is always inspired, regardless of loyalties
|
||||
for(var/mob/living/carbon/human/H in range(4, get_turf(src)))
|
||||
if(H.stat == DEAD || H == user)
|
||||
continue
|
||||
if(H.mind && (has_job_loyalties || has_role_loyalties))
|
||||
if(has_job_loyalties && H.mind.assigned_role in job_loyalties)
|
||||
inspired += H
|
||||
else if(has_role_loyalties && H.mind.special_role in role_loyalties)
|
||||
inspired += H
|
||||
else if(check_inspiration(H))
|
||||
inspired += H
|
||||
|
||||
for(var/V in inspired)
|
||||
var/mob/living/carbon/human/H = V
|
||||
if(H != user)
|
||||
to_chat(H, "<span class='notice'>Your confidence surges as [user] flourishes [user.p_their()] [name]!</span>")
|
||||
inspiration(H)
|
||||
special_inspiration(H)
|
||||
|
||||
/obj/item/banner/proc/check_inspiration(mob/living/carbon/human/H) //Banner-specific conditions for being eligible
|
||||
return
|
||||
|
||||
/obj/item/banner/proc/inspiration(mob/living/carbon/human/H)
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStun(-40)
|
||||
H.AdjustKnockdown(-40)
|
||||
H.AdjustUnconscious(-40)
|
||||
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
|
||||
|
||||
/obj/item/banner/proc/special_inspiration(mob/living/carbon/human/H) //Any banner-specific inspiration effects go here
|
||||
return
|
||||
|
||||
/obj/item/banner/security
|
||||
name = "securistan banner"
|
||||
desc = "The banner of Securistan, ruling the station with an iron fist."
|
||||
icon_state = "banner_security"
|
||||
job_loyalties = list("Security Officer", "Warden", "Detective", "Head of Security")
|
||||
warcry = "EVERYONE DOWN ON THE GROUND!!"
|
||||
|
||||
/obj/item/banner/security/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/datum/crafting_recipe/security_banner
|
||||
name = "Securistan Banner"
|
||||
result = /obj/item/banner/security/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/security = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/medical
|
||||
name = "meditopia banner"
|
||||
desc = "The banner of Meditopia, generous benefactors that cure wounds and shelter the weak."
|
||||
icon_state = "banner_medical"
|
||||
job_loyalties = list("Medical Doctor", "Chemist", "Geneticist", "Virologist", "Chief Medical Officer")
|
||||
warcry = "No wounds cannot be healed!"
|
||||
|
||||
/obj/item/banner/medical/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/medical/check_inspiration(mob/living/carbon/human/H)
|
||||
return H.stat //Meditopia is moved to help those in need
|
||||
|
||||
/datum/crafting_recipe/medical_banner
|
||||
name = "Meditopia Banner"
|
||||
result = /obj/item/banner/medical/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/medical = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/medical/special_inspiration(mob/living/carbon/human/H)
|
||||
H.adjustToxLoss(-15)
|
||||
H.setOxyLoss(0)
|
||||
H.reagents.add_reagent("inaprovaline", 5)
|
||||
|
||||
/obj/item/banner/science
|
||||
name = "sciencia banner"
|
||||
desc = "The banner of Sciencia, bold and daring thaumaturges and researchers that take the path less traveled."
|
||||
icon_state = "banner_science"
|
||||
job_loyalties = list("Scientist", "Roboticist", "Research Director")
|
||||
warcry = "For Cuban Pete!"
|
||||
|
||||
/obj/item/banner/science/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/science/check_inspiration(mob/living/carbon/human/H)
|
||||
return H.on_fire //Sciencia is pleased by dedication to the art of Toxins
|
||||
|
||||
/datum/crafting_recipe/science_banner
|
||||
name = "Sciencia Banner"
|
||||
result = /obj/item/banner/science/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/scientist = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/cargo
|
||||
name = "cargonia banner"
|
||||
desc = "The banner of the eternal Cargonia, with the mystical power of conjuring any object into existence."
|
||||
icon_state = "banner_cargo"
|
||||
job_loyalties = list("Cargo Technician", "Shaft Miner", "Quartermaster")
|
||||
warcry = "Hail Cargonia!"
|
||||
|
||||
/obj/item/banner/cargo/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/datum/crafting_recipe/cargo_banner
|
||||
name = "Cargonia Banner"
|
||||
result = /obj/item/banner/cargo/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/cargotech = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/engineering
|
||||
name = "engitopia banner"
|
||||
desc = "The banner of Engitopia, wielders of limitless power."
|
||||
icon_state = "banner_engineering"
|
||||
job_loyalties = list("Station Engineer", "Atmospheric Technician", "Chief Engineer")
|
||||
warcry = "All hail lord Singuloth!!"
|
||||
|
||||
/obj/item/banner/engineering/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/engineering/special_inspiration(mob/living/carbon/human/H)
|
||||
H.radiation = 0
|
||||
|
||||
/datum/crafting_recipe/engineering_banner
|
||||
name = "Engitopia Banner"
|
||||
result = /obj/item/banner/engineering/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/engineer = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/command
|
||||
name = "command banner"
|
||||
desc = "The banner of Command, a staunch and ancient line of bueraucratic kings and queens."
|
||||
//No icon state here since the default one is the NT banner
|
||||
job_loyalties = list("Captain", "Head of Personnel", "Chief Engineer", "Head of Security", "Research Director", "Chief Medical Officer")
|
||||
warcry = "Hail Nanotrasen!"
|
||||
|
||||
/obj/item/banner/command/mundane
|
||||
inspiration_available = FALSE
|
||||
|
||||
/obj/item/banner/command/check_inspiration(mob/living/carbon/human/H)
|
||||
return H.isloyal() //Command is stalwart but rewards their allies.
|
||||
|
||||
/datum/crafting_recipe/command_banner
|
||||
name = "Command Banner"
|
||||
result = /obj/item/banner/command/mundane
|
||||
time = 40
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/captainparade = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/obj/item/banner/red
|
||||
name = "red banner"
|
||||
|
||||
@@ -278,7 +278,6 @@
|
||||
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH"
|
||||
icon_state = "megaphone"
|
||||
var/cooldown = 0
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/device/harmalarm/emag_act(mob/user)
|
||||
emagged = !emagged
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/M, mob/user)
|
||||
|
||||
if(M.stat == 2)
|
||||
if(M.stat == DEAD)
|
||||
var/t_him = "it"
|
||||
if(M.gender == MALE)
|
||||
t_him = "him"
|
||||
|
||||
@@ -32,6 +32,13 @@ GLOBAL_LIST_INIT(human_recipes, list( \
|
||||
singular_name = "corgi hide piece"
|
||||
icon_state = "sheet-corgi"
|
||||
|
||||
/obj/item/stack/sheet/animalhide/gondola
|
||||
name = "gondola hide"
|
||||
desc = "The extremely valuable by-product of gondola hunting."
|
||||
singular_name = "gondola hide piece"
|
||||
icon_state = "sheet-gondola"
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(corgi_recipes, list ( \
|
||||
new/datum/stack_recipe("corgi costume", /obj/item/clothing/suit/hooded/ian_costume, 3), \
|
||||
))
|
||||
|
||||
@@ -21,6 +21,10 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("swivel chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/left, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/right, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
null, \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
@@ -421,4 +425,4 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
/obj/item/stack/sheet/paperframes/twenty
|
||||
amount = 20
|
||||
/obj/item/stack/sheet/paperframes/fifty
|
||||
amount = 50
|
||||
amount = 50
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
diff a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm (rejected hunks)
|
||||
@@ -732,7 +732,6 @@
|
||||
/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 = "donk_kit"
|
||||
- icon_state = null
|
||||
|
||||
/obj/item/storage/box/ingredients/Initialize()
|
||||
..()
|
||||
@@ -1,215 +1,217 @@
|
||||
/* First aid storage
|
||||
* Contains:
|
||||
* First Aid Kits
|
||||
* Pill Bottles
|
||||
* Dice Pack (in a pill bottle)
|
||||
*/
|
||||
|
||||
/*
|
||||
* First Aid Kits
|
||||
*/
|
||||
/obj/item/storage/firstaid
|
||||
name = "first-aid kit"
|
||||
desc = "It's an emergency medical kit for those serious boo-boos."
|
||||
icon_state = "firstaid"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/empty = 0
|
||||
|
||||
/obj/item/storage/firstaid/regular
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
|
||||
/obj/item/storage/firstaid/regular/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/ancient
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
|
||||
|
||||
/obj/item/storage/firstaid/ancient/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
|
||||
/obj/item/storage/firstaid/fire
|
||||
name = "burn treatment kit"
|
||||
desc = "A specialized medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
|
||||
icon_state = "ointment"
|
||||
item_state = "firstaid-ointment"
|
||||
|
||||
/obj/item/storage/firstaid/fire/Initialize(mapload)
|
||||
..()
|
||||
icon_state = pick("ointment","firefirstaid")
|
||||
|
||||
/obj/item/storage/firstaid/fire/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/toxin
|
||||
name = "toxin treatment kit"
|
||||
desc = "Used to treat toxic blood content and radiation poisoning."
|
||||
icon_state = "antitoxin"
|
||||
item_state = "firstaid-toxin"
|
||||
|
||||
/obj/item/storage/firstaid/toxin/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
|
||||
|
||||
/obj/item/storage/firstaid/toxin/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/syringe/charcoal(src)
|
||||
for(var/i in 1 to 2)
|
||||
new /obj/item/storage/pill_bottle/charcoal(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/o2
|
||||
name = "oxygen deprivation treatment kit"
|
||||
desc = "A box full of oxygen goodies."
|
||||
icon_state = "o2"
|
||||
item_state = "firstaid-o2"
|
||||
|
||||
/obj/item/storage/firstaid/o2/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/brute
|
||||
name = "brute trauma treatment kit"
|
||||
desc = "A first aid kit for when you get toolboxed."
|
||||
icon_state = "brute"
|
||||
item_state = "firstaid-brute"
|
||||
|
||||
/obj/item/storage/firstaid/brute/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/tactical
|
||||
name = "combat medical kit"
|
||||
desc = "I hope you've got insurance."
|
||||
icon_state = "bezerk"
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/storage/firstaid/tactical/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/defibrillator/compact/combat/loaded(src)
|
||||
new /obj/item/reagent_containers/hypospray/combat(src)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/syringe/lethal/choral(src)
|
||||
new /obj/item/clothing/glasses/hud/health/night(src)
|
||||
|
||||
|
||||
/*
|
||||
* Pill Bottles
|
||||
*/
|
||||
/obj/item/storage/pill_bottle
|
||||
name = "pill bottle"
|
||||
desc = "It's an airtight container for storing medication."
|
||||
icon_state = "pill_canister"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
item_state = "contsolid"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_hold = list(/obj/item/reagent_containers/pill, /obj/item/dice)
|
||||
allow_quick_gather = 1
|
||||
use_to_pickup = 1
|
||||
|
||||
/obj/item/storage/pill_bottle/MouseDrop(obj/over_object) //Quick pillbottle fix. -Agouri
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen) || !Adjacent(M))
|
||||
return ..()
|
||||
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
|
||||
add_fingerprint(usr)
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if(usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
|
||||
/obj/item/storage/pill_bottle/charcoal
|
||||
name = "bottle of charcoal pills"
|
||||
desc = "Contains pills used to counter toxins."
|
||||
|
||||
/obj/item/storage/pill_bottle/charcoal/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/charcoal(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/epinephrine
|
||||
name = "bottle of epinephrine pills"
|
||||
desc = "Contains pills used to stabilize patients."
|
||||
|
||||
/obj/item/storage/pill_bottle/epinephrine/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/epinephrine(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mutadone
|
||||
name = "bottle of mutadone pills"
|
||||
desc = "Contains pills used to treat genetic abnormalities."
|
||||
|
||||
/obj/item/storage/pill_bottle/mutadone/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/mutadone(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mannitol
|
||||
name = "bottle of mannitol pills"
|
||||
desc = "Contains pills used to treat brain damage."
|
||||
|
||||
/obj/item/storage/pill_bottle/mannitol/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/mannitol(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/stimulant
|
||||
name = "bottle of stimulant pills"
|
||||
desc = "Guaranteed to give you that extra burst of energy during a long shift!"
|
||||
|
||||
/obj/item/storage/pill_bottle/stimulant/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/stimulant(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mining
|
||||
name = "bottle of patches"
|
||||
desc = "Contains patches used to treat brute and burn damage."
|
||||
|
||||
/obj/item/storage/pill_bottle/mining/PopulateContents()
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
/* First aid storage
|
||||
* Contains:
|
||||
* First Aid Kits
|
||||
* Pill Bottles
|
||||
* Dice Pack (in a pill bottle)
|
||||
*/
|
||||
|
||||
/*
|
||||
* First Aid Kits
|
||||
*/
|
||||
/obj/item/storage/firstaid
|
||||
name = "first-aid kit"
|
||||
desc = "It's an emergency medical kit for those serious boo-boos."
|
||||
icon_state = "firstaid"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/empty = 0
|
||||
|
||||
/obj/item/storage/firstaid/regular
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
|
||||
/obj/item/storage/firstaid/regular/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/ancient
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
|
||||
|
||||
/obj/item/storage/firstaid/ancient/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
|
||||
/obj/item/storage/firstaid/fire
|
||||
name = "burn treatment kit"
|
||||
desc = "A specialized medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
|
||||
icon_state = "ointment"
|
||||
item_state = "firstaid-ointment"
|
||||
|
||||
/obj/item/storage/firstaid/fire/Initialize(mapload)
|
||||
..()
|
||||
icon_state = pick("ointment","firefirstaid")
|
||||
|
||||
/obj/item/storage/firstaid/fire/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/toxin
|
||||
name = "toxin treatment kit"
|
||||
desc = "Used to treat toxic blood content and radiation poisoning."
|
||||
icon_state = "antitoxin"
|
||||
item_state = "firstaid-toxin"
|
||||
|
||||
/obj/item/storage/firstaid/toxin/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
|
||||
|
||||
/obj/item/storage/firstaid/toxin/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/syringe/charcoal(src)
|
||||
for(var/i in 1 to 2)
|
||||
new /obj/item/storage/pill_bottle/charcoal(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/o2
|
||||
name = "oxygen deprivation treatment kit"
|
||||
desc = "A box full of oxygen goodies."
|
||||
icon_state = "o2"
|
||||
item_state = "firstaid-o2"
|
||||
|
||||
/obj/item/storage/firstaid/o2/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/brute
|
||||
name = "brute trauma treatment kit"
|
||||
desc = "A first aid kit for when you get toolboxed."
|
||||
icon_state = "brute"
|
||||
item_state = "firstaid-brute"
|
||||
|
||||
/obj/item/storage/firstaid/brute/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/tactical
|
||||
name = "combat medical kit"
|
||||
desc = "I hope you've got insurance."
|
||||
icon_state = "bezerk"
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/storage/firstaid/tactical/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/defibrillator/compact/combat/loaded(src)
|
||||
new /obj/item/reagent_containers/hypospray/combat(src)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/syringe/lethal/choral(src)
|
||||
new /obj/item/clothing/glasses/hud/health/night(src)
|
||||
|
||||
|
||||
/*
|
||||
* Pill Bottles
|
||||
*/
|
||||
/obj/item/storage/pill_bottle
|
||||
name = "pill bottle"
|
||||
desc = "It's an airtight container for storing medication."
|
||||
icon_state = "pill_canister"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
item_state = "contsolid"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_hold = list(/obj/item/reagent_containers/pill, /obj/item/dice)
|
||||
allow_quick_gather = 1
|
||||
use_to_pickup = 1
|
||||
|
||||
/obj/item/storage/pill_bottle/MouseDrop(obj/over_object) //Quick pillbottle fix. -Agouri
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen) || !Adjacent(M))
|
||||
return ..()
|
||||
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
|
||||
add_fingerprint(usr)
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if(usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
|
||||
/obj/item/storage/pill_bottle/charcoal
|
||||
name = "bottle of charcoal pills"
|
||||
desc = "Contains pills used to counter toxins."
|
||||
|
||||
/obj/item/storage/pill_bottle/charcoal/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/charcoal(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/epinephrine
|
||||
name = "bottle of epinephrine pills"
|
||||
desc = "Contains pills used to stabilize patients."
|
||||
|
||||
/obj/item/storage/pill_bottle/epinephrine/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/epinephrine(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mutadone
|
||||
name = "bottle of mutadone pills"
|
||||
desc = "Contains pills used to treat genetic abnormalities."
|
||||
|
||||
/obj/item/storage/pill_bottle/mutadone/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/mutadone(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mannitol
|
||||
name = "bottle of mannitol pills"
|
||||
desc = "Contains pills used to treat brain damage."
|
||||
|
||||
/obj/item/storage/pill_bottle/mannitol/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/mannitol(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/stimulant
|
||||
name = "bottle of stimulant pills"
|
||||
desc = "Guaranteed to give you that extra burst of energy during a long shift!"
|
||||
|
||||
/obj/item/storage/pill_bottle/stimulant/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/stimulant(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/mining
|
||||
name = "bottle of patches"
|
||||
desc = "Contains patches used to treat brute and burn damage."
|
||||
|
||||
/obj/item/storage/pill_bottle/mining/PopulateContents()
|
||||
new /obj/item/reagent_containers/pill/patch/silver_sulf(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/pill/patch/styptic(src)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(quickdraw)
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src]. Alt-click [src] to remove it.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src].")
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src].</span>")
|
||||
|
||||
/obj/item/storage/internal/pocket/big
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
@@ -89,7 +89,7 @@ Frequency:
|
||||
continue
|
||||
else
|
||||
var/mob/M = W.loc
|
||||
if (M.stat == 2)
|
||||
if (M.stat == DEAD)
|
||||
if (M.timeofdeath + 6000 < world.time)
|
||||
continue
|
||||
|
||||
|
||||
+790
-790
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "waterballoon-e"
|
||||
item_state = "balloon-empty"
|
||||
|
||||
|
||||
/obj/item/toy/balloon/New()
|
||||
create_reagents(10)
|
||||
@@ -278,6 +279,8 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "foamblade"
|
||||
item_state = "arm_blade"
|
||||
lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi'
|
||||
attack_verb = list("pricked", "absorbed", "gored")
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = FLAMMABLE
|
||||
@@ -288,6 +291,8 @@
|
||||
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'
|
||||
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
|
||||
var/active = FALSE
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
attack_verb = list("robusted")
|
||||
@@ -547,6 +552,8 @@
|
||||
desc = "A tool to help you write fictional devils!"
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "demonomicon"
|
||||
lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/books_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
recharge_time = 60
|
||||
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 13
|
||||
var/force_on = 21
|
||||
var/force_on = 24
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
throwforce = 13
|
||||
throw_speed = 2
|
||||
|
||||
@@ -1,81 +1,87 @@
|
||||
/obj/item/vending_refill
|
||||
name = "resupply canister"
|
||||
var/machine_name = "Generic"
|
||||
|
||||
icon = 'icons/obj/vending_restock.dmi'
|
||||
icon_state = "refill_snack"
|
||||
item_state = "restock_unit"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 7
|
||||
throwforce = 10
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 30)
|
||||
var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products
|
||||
var/init_charges = list(0, 0, 0)
|
||||
|
||||
|
||||
/obj/item/vending_refill/New(amt = -1)
|
||||
..()
|
||||
name = "\improper [machine_name] restocking unit"
|
||||
if(isnum(amt) && amt > -1)
|
||||
charges[1] = amt
|
||||
|
||||
/obj/item/vending_refill/examine(mob/user)
|
||||
..()
|
||||
if(charges[1] > 0)
|
||||
to_chat(user, "It can restock [charges[1]+charges[2]+charges[3]] item(s).")
|
||||
else
|
||||
to_chat(user, "It's empty!")
|
||||
|
||||
//NOTE I decided to go for about 1/3 of a machine's capacity
|
||||
|
||||
/obj/item/vending_refill/boozeomat
|
||||
machine_name = "Booze-O-Mat"
|
||||
icon_state = "refill_booze"
|
||||
charges = list(54, 4, 0)//of 159 standard, 12 contraband
|
||||
init_charges = list(54, 4, 0)
|
||||
|
||||
/obj/item/vending_refill/coffee
|
||||
machine_name = "Solar's Best Hot Drinks"
|
||||
icon_state = "refill_joe"
|
||||
charges = list(25, 4, 0)//of 75 standard, 12 contraband
|
||||
init_charges = list(25, 4, 0)
|
||||
|
||||
/obj/item/vending_refill/snack
|
||||
machine_name = "Getmore Chocolate Corp"
|
||||
charges = list(12, 2, 0)//of 36 standard, 6 contraband
|
||||
init_charges = list(12, 2, 0)
|
||||
|
||||
/obj/item/vending_refill/cola
|
||||
machine_name = "Robust Softdrinks"
|
||||
icon_state = "refill_cola"
|
||||
charges = list(30, 4, 1)//of 90 standard, 12 contraband, 1 premium
|
||||
init_charges = list(30, 4, 1)
|
||||
|
||||
/obj/item/vending_refill/cigarette
|
||||
machine_name = "ShadyCigs Deluxe"
|
||||
icon_state = "refill_smoke"
|
||||
charges = list(12, 3, 2)// of 36 standard, 9 contraband, 6 premium
|
||||
init_charges = list(12, 3, 2)
|
||||
|
||||
/obj/item/vending_refill/autodrobe
|
||||
machine_name = "AutoDrobe"
|
||||
icon_state = "refill_costume"
|
||||
charges = list(32, 2, 3)// of 96 standard, 6 contraband, 9 premium
|
||||
init_charges = list(32, 2, 3)
|
||||
|
||||
/obj/item/vending_refill/clothing
|
||||
machine_name = "ClothesMate"
|
||||
icon_state = "refill_clothes"
|
||||
charges = list(37, 4, 4)// of 111 standard, 12 contraband, 10 premium(?)
|
||||
init_charges = list(37, 4, 4)
|
||||
|
||||
/obj/item/vending_refill/medical
|
||||
machine_name = "NanoMed"
|
||||
icon_state = "refill_medical"
|
||||
charges = list(26, 5, 3)// of 76 standard, 13 contraband, 8 premium
|
||||
init_charges = list(26, 5, 3)
|
||||
/obj/item/vending_refill
|
||||
name = "resupply canister"
|
||||
var/machine_name = "Generic"
|
||||
|
||||
icon = 'icons/obj/vending_restock.dmi'
|
||||
icon_state = "refill_snack"
|
||||
item_state = "restock_unit"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 7
|
||||
throwforce = 10
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 30)
|
||||
var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products
|
||||
var/init_charges = list(0, 0, 0)
|
||||
|
||||
|
||||
/obj/item/vending_refill/New(amt = -1)
|
||||
..()
|
||||
name = "\improper [machine_name] restocking unit"
|
||||
if(isnum(amt) && amt > -1)
|
||||
charges[1] = amt
|
||||
|
||||
/obj/item/vending_refill/examine(mob/user)
|
||||
..()
|
||||
if(charges[1] > 0)
|
||||
to_chat(user, "It can restock [charges[1]+charges[2]+charges[3]] item(s).")
|
||||
else
|
||||
to_chat(user, "It's empty!")
|
||||
|
||||
//NOTE I decided to go for about 1/3 of a machine's capacity
|
||||
|
||||
/obj/item/vending_refill/boozeomat
|
||||
machine_name = "Booze-O-Mat"
|
||||
icon_state = "refill_booze"
|
||||
charges = list(54, 4, 0)//of 159 standard, 12 contraband
|
||||
init_charges = list(54, 4, 0)
|
||||
|
||||
/obj/item/vending_refill/coffee
|
||||
machine_name = "Solar's Best Hot Drinks"
|
||||
icon_state = "refill_joe"
|
||||
charges = list(25, 4, 0)//of 75 standard, 12 contraband
|
||||
init_charges = list(25, 4, 0)
|
||||
|
||||
/obj/item/vending_refill/snack
|
||||
machine_name = "Getmore Chocolate Corp"
|
||||
charges = list(12, 2, 0)//of 36 standard, 6 contraband
|
||||
init_charges = list(12, 2, 0)
|
||||
|
||||
/obj/item/vending_refill/cola
|
||||
machine_name = "Robust Softdrinks"
|
||||
icon_state = "refill_cola"
|
||||
charges = list(30, 4, 1)//of 90 standard, 12 contraband, 1 premium
|
||||
init_charges = list(30, 4, 1)
|
||||
|
||||
/obj/item/vending_refill/cigarette
|
||||
machine_name = "ShadyCigs Deluxe"
|
||||
icon_state = "refill_smoke"
|
||||
charges = list(12, 3, 2)// of 36 standard, 9 contraband, 6 premium
|
||||
init_charges = list(12, 3, 2)
|
||||
|
||||
/obj/item/vending_refill/autodrobe
|
||||
machine_name = "AutoDrobe"
|
||||
icon_state = "refill_costume"
|
||||
charges = list(32, 2, 3)// of 96 standard, 6 contraband, 9 premium
|
||||
init_charges = list(32, 2, 3)
|
||||
|
||||
/obj/item/vending_refill/clothing
|
||||
machine_name = "ClothesMate"
|
||||
icon_state = "refill_clothes"
|
||||
charges = list(37, 4, 4)// of 111 standard, 12 contraband, 10 premium(?)
|
||||
init_charges = list(37, 4, 4)
|
||||
|
||||
/obj/item/vending_refill/medical
|
||||
machine_name = "NanoMed"
|
||||
icon_state = "refill_medical"
|
||||
charges = list(26, 5, 3)// of 76 standard, 13 contraband, 8 premium
|
||||
init_charges = list(26, 5, 3)
|
||||
|
||||
/obj/item/vending_refill/donksoft
|
||||
machine_name = "Donksoft Toy Vendor"
|
||||
icon_state = "refill_donksoft"
|
||||
charges = list(32,28,0)// of 90 standard, 75 contraband, 0 premium
|
||||
init_charges = list(32,28,0)
|
||||
|
||||
+586
-586
File diff suppressed because it is too large
Load Diff
@@ -169,6 +169,7 @@
|
||||
return
|
||||
|
||||
/obj/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(!anchored || current_size >= STAGE_FIVE)
|
||||
step_towards(src,S)
|
||||
|
||||
@@ -198,7 +199,7 @@
|
||||
|
||||
/obj/vv_get_dropdown()
|
||||
. = ..()
|
||||
.["Delete all of type"] = "?_src_=vars;delall=\ref[src]"
|
||||
.["Delete all of type"] = "?_src_=vars;[HrefToken()];delall=\ref[src]"
|
||||
|
||||
/obj/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
/obj/structure/alien/weeds/Initialize()
|
||||
pixel_x = -4
|
||||
pixel_y = -4 //so the sprites line up right in the map editor
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!blacklisted_turfs)
|
||||
blacklisted_turfs = typecacheof(list(
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
/obj/structure/alien/weeds/node/Initialize()
|
||||
icon = 'icons/obj/smooth_structures/alien/weednode.dmi'
|
||||
..()
|
||||
. = ..()
|
||||
set_light(lon_range)
|
||||
var/obj/structure/alien/weeds/W = locate(/obj/structure/alien/weeds) in loc
|
||||
if(W && W != src)
|
||||
@@ -223,7 +223,7 @@
|
||||
var/obj/item/clothing/mask/facehugger/child
|
||||
|
||||
/obj/structure/alien/egg/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
if(status == GROWING || status == GROWN)
|
||||
child = new(src)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/structure/chair/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!anchored) //why would you put these on the shuttle?
|
||||
addtimer(CALLBACK(src, .proc/RemoveFromLatejoin), 0)
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/obj/structure/chair/sofa
|
||||
name = "old ratty sofa"
|
||||
icon_state = "sofamiddle"
|
||||
icon = 'icons/obj/sofa.dmi'
|
||||
buildstackamount = 1
|
||||
|
||||
/obj/structure/chair/sofa/left
|
||||
icon_state = "sofaend_left"
|
||||
/obj/structure/chair/sofa/right
|
||||
icon_state = "sofaend_right"
|
||||
/obj/structure/chair/sofa/corner
|
||||
icon_state = "sofacorner"
|
||||
@@ -16,7 +16,7 @@
|
||||
integrity_failure = 50
|
||||
armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 60)
|
||||
var/breakout_time = 2
|
||||
var/lastbang
|
||||
var/message_cooldown
|
||||
var/can_weld_shut = TRUE
|
||||
var/horizontal = FALSE
|
||||
var/allow_objects = FALSE
|
||||
@@ -300,14 +300,12 @@
|
||||
/obj/structure/closet/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc) || !isliving(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
if(!open())
|
||||
if(L.last_special <= world.time)
|
||||
container_resist(L)
|
||||
if(world.time > lastbang+5)
|
||||
lastbang = world.time
|
||||
for(var/mob/M in get_hearers_in_view(src, null))
|
||||
M.show_message("<FONT size=[max(0, 5 - get_dist(src, M))]>BANG, bang!</FONT>", 2)
|
||||
if(locked)
|
||||
if(message_cooldown <= world.time)
|
||||
message_cooldown = world.time + 50
|
||||
to_chat(user, "<span class='warning'>[src]'s door won't budge!</span>")
|
||||
return
|
||||
container_resist()
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user)
|
||||
..()
|
||||
@@ -367,9 +365,10 @@
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [src] and start pushing the door open.</span>")
|
||||
visible_message("<span class='warning'>[src] begins to shake violently!</span>")
|
||||
if(do_after(user,(breakout_time * 60 * 10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
user.visible_message("<span class='warning'>[src] begins to shake violently!</span>", \
|
||||
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)</span>", \
|
||||
"<span class='italics'>You hear banging from [src].</span>")
|
||||
if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
|
||||
return
|
||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||
@@ -388,7 +387,7 @@
|
||||
|
||||
/obj/structure/closet/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
if(!user.canUseTopic(src, be_close=TRUE) || !isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(opened || !secure)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
new /obj/item/storage/belt/security/full(src)
|
||||
new /obj/item/gun/energy/e_gun/hos(src)
|
||||
new /obj/item/device/flashlight/seclite(src)
|
||||
new /obj/item/pinpointer(src)
|
||||
new /obj/item/pinpointer/nuke(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/warden
|
||||
name = "\proper warden's locker"
|
||||
@@ -108,6 +108,7 @@
|
||||
new /obj/item/clothing/gloves/krav_maga/sec(src)
|
||||
new /obj/item/door_remote/head_of_security(src)
|
||||
new /obj/item/gun/ballistic/shotgun/automatic/combat/compact(src)
|
||||
new /obj/item/pinpointer/crew(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "security officer's locker"
|
||||
@@ -183,6 +184,8 @@
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/clothing/suit/armor/vest/det_suit(src)
|
||||
new /obj/item/storage/belt/holster/full(src)
|
||||
new /obj/item/pinpointer/crew(src)
|
||||
new /obj/item/device/mass_spectrometer(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/injection
|
||||
name = "lethal injections"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
|
||||
var/obj/structure/ladder/down = null //the ladder below this one
|
||||
var/obj/structure/ladder/up = null //the ladder above this one
|
||||
var/auto_connect = FALSE
|
||||
|
||||
/obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission
|
||||
name = "sturdy ladder"
|
||||
@@ -19,12 +20,18 @@
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/ladder/Destroy()
|
||||
if(up && up.down == src)
|
||||
up.down = null
|
||||
up.update_icon()
|
||||
if(down && down.up == src)
|
||||
down.up = null
|
||||
down.update_icon()
|
||||
GLOB.ladders -= src
|
||||
. = ..()
|
||||
|
||||
/obj/structure/ladder/LateInitialize()
|
||||
for(var/obj/structure/ladder/L in GLOB.ladders)
|
||||
if(L.id == id)
|
||||
if(L.id == id || (auto_connect && L.auto_connect && L.x == x && L.y == y))
|
||||
if(L.height == (height - 1))
|
||||
down = L
|
||||
continue
|
||||
@@ -50,31 +57,33 @@
|
||||
else //wtf make your ladders properly assholes
|
||||
icon_state = "ladder00"
|
||||
|
||||
/obj/structure/ladder/proc/go_up(mob/user,is_ghost)
|
||||
/obj/structure/ladder/proc/travel(going_up, mob/user, is_ghost, obj/structure/ladder/ladder)
|
||||
if(!is_ghost)
|
||||
show_fluff_message(1,user)
|
||||
up.add_fingerprint(user)
|
||||
user.loc = get_turf(up)
|
||||
show_fluff_message(going_up,user)
|
||||
ladder.add_fingerprint(user)
|
||||
|
||||
var/atom/movable/AM
|
||||
if(user.pulling)
|
||||
AM = user.pulling
|
||||
user.pulling.forceMove(get_turf(ladder))
|
||||
user.forceMove(get_turf(ladder))
|
||||
if(AM)
|
||||
user.start_pulling(AM)
|
||||
|
||||
/obj/structure/ladder/proc/go_down(mob/user,is_ghost)
|
||||
if(!is_ghost)
|
||||
show_fluff_message(0,user)
|
||||
down.add_fingerprint(user)
|
||||
user.loc = get_turf(down)
|
||||
|
||||
/obj/structure/ladder/proc/use(mob/user,is_ghost=0)
|
||||
if(up && down)
|
||||
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
|
||||
if("Up")
|
||||
go_up(user,is_ghost)
|
||||
travel(TRUE, user, is_ghost, up)
|
||||
if("Down")
|
||||
go_down(user,is_ghost)
|
||||
travel(FALSE, user, is_ghost, down)
|
||||
if("Cancel")
|
||||
return
|
||||
else if(up)
|
||||
go_up(user,is_ghost)
|
||||
travel(TRUE, user, is_ghost, up)
|
||||
else if(down)
|
||||
go_down(user,is_ghost)
|
||||
travel(FALSE, user,is_ghost, down)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] doesn't seem to lead anywhere!</span>")
|
||||
|
||||
@@ -108,3 +117,14 @@
|
||||
. = ..()
|
||||
else
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
/obj/structure/ladder/unbreakable/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/structure/ladder/auto_connect //They will connect to ladders with the same X and Y without needing to share an ID
|
||||
auto_connect = TRUE
|
||||
|
||||
|
||||
/obj/structure/ladder/singularity_pull()
|
||||
visible_message("<span class='danger'>[src] is torn to pieces by the gravitational pull!</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/lattice/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(current_size >= STAGE_FOUR)
|
||||
deconstruct()
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
var/obj/structure/tray/connected = null
|
||||
var/locked = FALSE
|
||||
var/opendir = SOUTH
|
||||
var/message_cooldown
|
||||
var/breakout_time = 1
|
||||
|
||||
/obj/structure/bodycontainer/Destroy()
|
||||
open()
|
||||
@@ -41,6 +43,11 @@
|
||||
/obj/structure/bodycontainer/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
if(locked)
|
||||
if(message_cooldown <= world.time)
|
||||
message_cooldown = world.time + 50
|
||||
to_chat(user, "<span class='warning'>[src]'s door won't budge!</span>")
|
||||
return
|
||||
open()
|
||||
|
||||
/obj/structure/bodycontainer/attack_paw(mob/user)
|
||||
@@ -84,11 +91,20 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bodycontainer/container_resist(mob/living/user)
|
||||
open()
|
||||
|
||||
/obj/structure/bodycontainer/relay_container_resist(mob/living/user, obj/O)
|
||||
to_chat(user, "<span class='notice'>You slam yourself into the side of [O].</span>")
|
||||
container_resist(user)
|
||||
if(!locked)
|
||||
open()
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user.visible_message(null, \
|
||||
"<span class='notice'>You lean on the back of [src] and start pushing the tray open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)</span>", \
|
||||
"<span class='italics'>You hear a metallic creaking from [src].</span>")
|
||||
if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src )
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open()
|
||||
|
||||
/obj/structure/bodycontainer/proc/open()
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
@@ -1,202 +1,202 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
SAFES
|
||||
FLOOR SAFES
|
||||
*/
|
||||
|
||||
//SAFES
|
||||
/obj/structure/safe
|
||||
name = "safe"
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "safe"
|
||||
/*
|
||||
CONTAINS:
|
||||
SAFES
|
||||
FLOOR SAFES
|
||||
*/
|
||||
|
||||
//SAFES
|
||||
/obj/structure/safe
|
||||
name = "safe"
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "safe"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/open = FALSE //is the safe open?
|
||||
var/tumbler_1_pos //the tumbler position- from 0 to 72
|
||||
var/tumbler_1_open //the tumbler position to open at- 0 to 72
|
||||
var/tumbler_2_pos
|
||||
var/tumbler_2_open
|
||||
var/dial = 0 //where is the dial pointing?
|
||||
var/space = 0 //the combined w_class of everything in the safe
|
||||
var/maxspace = 24 //the maximum combined w_class of stuff in the safe
|
||||
|
||||
|
||||
/obj/structure/safe/New()
|
||||
..()
|
||||
tumbler_1_pos = rand(0, 71)
|
||||
tumbler_1_open = rand(0, 71)
|
||||
|
||||
tumbler_2_pos = rand(0, 71)
|
||||
tumbler_2_open = rand(0, 71)
|
||||
|
||||
|
||||
/obj/structure/safe/Initialize(mapload)
|
||||
..()
|
||||
|
||||
if(!mapload)
|
||||
return
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.loc = src
|
||||
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
|
||||
if(user && canhear)
|
||||
if(tumbler_1_pos == tumbler_1_open)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tonk", "krunk", "plunk")] from [src].</span>")
|
||||
if(tumbler_2_pos == tumbler_2_open)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
|
||||
if(user) visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/safe/proc/decrement(num)
|
||||
num -= 1
|
||||
if(num < 0)
|
||||
num = 71
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/proc/increment(num)
|
||||
num += 1
|
||||
if(num > 71)
|
||||
num = 0
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
if(open)
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<center>"
|
||||
dat += "<a href='?src=\ref[src];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='?src=\ref[src];decrement=1'>-</a> [dial * 5] <a href='?src=\ref[src];increment=1'>+</a>"
|
||||
if(open)
|
||||
dat += "<table>"
|
||||
for(var/i = contents.len, i>=1, i--)
|
||||
var/obj/item/P = contents[i]
|
||||
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
|
||||
dat += "</table></center>"
|
||||
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=safe;size=350x300")
|
||||
|
||||
|
||||
/obj/structure/safe/Topic(href, href_list)
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
var/mob/living/carbon/human/user = usr
|
||||
|
||||
var/canhear = 0
|
||||
if(user.is_holding_item_of_type(/obj/item/clothing/neck/stethoscope))
|
||||
canhear = 1
|
||||
|
||||
if(href_list["open"])
|
||||
if(check_unlocked())
|
||||
to_chat(user, "<span class='notice'>You [open ? "close" : "open"] [src].</span>")
|
||||
open = !open
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't [open ? "close" : "open"] [src], the lock is engaged!</span>")
|
||||
return
|
||||
|
||||
if(href_list["decrement"])
|
||||
dial = decrement(dial)
|
||||
if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71)
|
||||
tumbler_1_pos = decrement(tumbler_1_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35)
|
||||
tumbler_2_pos = decrement(tumbler_2_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["increment"])
|
||||
dial = increment(dial)
|
||||
if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71)
|
||||
tumbler_1_pos = increment(tumbler_1_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35)
|
||||
tumbler_2_pos = increment(tumbler_2_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["retrieve"])
|
||||
user << browse("", "window=safe") // Close the menu
|
||||
|
||||
var/obj/item/P = locate(href_list["retrieve"]) in src
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
space -= P.w_class
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
. = 1 //no afterattack
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in [src].</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/clothing/neck/stethoscope))
|
||||
to_chat(user, "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/safe/handle_atom_del(atom/A)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/structure/safe/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity, target)
|
||||
return
|
||||
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
icon_state = "floorsafe"
|
||||
var/tumbler_1_pos //the tumbler position- from 0 to 72
|
||||
var/tumbler_1_open //the tumbler position to open at- 0 to 72
|
||||
var/tumbler_2_pos
|
||||
var/tumbler_2_open
|
||||
var/dial = 0 //where is the dial pointing?
|
||||
var/space = 0 //the combined w_class of everything in the safe
|
||||
var/maxspace = 24 //the maximum combined w_class of stuff in the safe
|
||||
|
||||
|
||||
/obj/structure/safe/New()
|
||||
..()
|
||||
tumbler_1_pos = rand(0, 71)
|
||||
tumbler_1_open = rand(0, 71)
|
||||
|
||||
tumbler_2_pos = rand(0, 71)
|
||||
tumbler_2_open = rand(0, 71)
|
||||
|
||||
|
||||
/obj/structure/safe/Initialize(mapload)
|
||||
..()
|
||||
|
||||
if(!mapload)
|
||||
return
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.loc = src
|
||||
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
|
||||
if(user && canhear)
|
||||
if(tumbler_1_pos == tumbler_1_open)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tonk", "krunk", "plunk")] from [src].</span>")
|
||||
if(tumbler_2_pos == tumbler_2_open)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
|
||||
if(user) visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/safe/proc/decrement(num)
|
||||
num -= 1
|
||||
if(num < 0)
|
||||
num = 71
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/proc/increment(num)
|
||||
num += 1
|
||||
if(num > 71)
|
||||
num = 0
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
if(open)
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<center>"
|
||||
dat += "<a href='?src=\ref[src];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='?src=\ref[src];decrement=1'>-</a> [dial * 5] <a href='?src=\ref[src];increment=1'>+</a>"
|
||||
if(open)
|
||||
dat += "<table>"
|
||||
for(var/i = contents.len, i>=1, i--)
|
||||
var/obj/item/P = contents[i]
|
||||
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
|
||||
dat += "</table></center>"
|
||||
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=safe;size=350x300")
|
||||
|
||||
|
||||
/obj/structure/safe/Topic(href, href_list)
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
var/mob/living/carbon/human/user = usr
|
||||
|
||||
var/canhear = 0
|
||||
if(user.is_holding_item_of_type(/obj/item/clothing/neck/stethoscope))
|
||||
canhear = 1
|
||||
|
||||
if(href_list["open"])
|
||||
if(check_unlocked())
|
||||
to_chat(user, "<span class='notice'>You [open ? "close" : "open"] [src].</span>")
|
||||
open = !open
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't [open ? "close" : "open"] [src], the lock is engaged!</span>")
|
||||
return
|
||||
|
||||
if(href_list["decrement"])
|
||||
dial = decrement(dial)
|
||||
if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71)
|
||||
tumbler_1_pos = decrement(tumbler_1_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35)
|
||||
tumbler_2_pos = decrement(tumbler_2_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["increment"])
|
||||
dial = increment(dial)
|
||||
if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71)
|
||||
tumbler_1_pos = increment(tumbler_1_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35)
|
||||
tumbler_2_pos = increment(tumbler_2_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["retrieve"])
|
||||
user << browse("", "window=safe") // Close the menu
|
||||
|
||||
var/obj/item/P = locate(href_list["retrieve"]) in src
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
space -= P.w_class
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
. = 1 //no afterattack
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in [src].</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/clothing/neck/stethoscope))
|
||||
to_chat(user, "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/safe/handle_atom_del(atom/A)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/structure/safe/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity, target)
|
||||
return
|
||||
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
icon_state = "floorsafe"
|
||||
density = FALSE
|
||||
level = 1 //underfloor
|
||||
layer = LOW_OBJ_LAYER
|
||||
|
||||
|
||||
/obj/structure/safe/floor/Initialize(mapload)
|
||||
..()
|
||||
if(mapload)
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
|
||||
/obj/structure/safe/floor/hide(var/intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
level = 1 //underfloor
|
||||
layer = LOW_OBJ_LAYER
|
||||
|
||||
|
||||
/obj/structure/safe/floor/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload)
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
|
||||
/obj/structure/safe/floor/hide(var/intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
|
||||
@@ -155,12 +155,9 @@
|
||||
|
||||
/obj/structure/statue/plasma/bullet_act(obj/item/projectile/Proj)
|
||||
var/burn = FALSE
|
||||
if(istype(Proj, /obj/item/projectile/beam))
|
||||
if(!(Proj.nodamage) && Proj.damage_type == BURN)
|
||||
PlasmaBurn(2500)
|
||||
burn = TRUE
|
||||
else if(istype(Proj, /obj/item/projectile/ion))
|
||||
PlasmaBurn(500)
|
||||
burn = TRUE
|
||||
if(burn)
|
||||
var/turf/T = get_turf(src)
|
||||
if(Proj.firer)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/transit_tube/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(current_size >= STAGE_FIVE)
|
||||
deconstruct(FALSE)
|
||||
|
||||
|
||||
@@ -62,10 +62,14 @@
|
||||
AM.ex_act(severity, target)
|
||||
|
||||
/obj/structure/transit_tube_pod/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(current_size >= STAGE_FIVE)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/transit_tube_pod/container_resist(mob/living/user)
|
||||
if(!user.incapacitated())
|
||||
empty_pod()
|
||||
return
|
||||
if(!moving)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
|
||||
@@ -535,6 +535,7 @@
|
||||
name = "puddle"
|
||||
desc = "A puddle used for washing one's hands and face."
|
||||
icon_state = "puddle"
|
||||
resistance_flags = UNACIDABLE
|
||||
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M)
|
||||
icon_state = "puddle-splash"
|
||||
@@ -546,6 +547,10 @@
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/deconstruct(disassembled = TRUE)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
//Shower Curtains//
|
||||
//Defines used are pre-existing in layers.dm//
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/window/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(current_size >= STAGE_FIVE)
|
||||
deconstruct(FALSE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user