mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-16 21:22:40 +00:00
Merge remote-tracking branch 'upstream/dev' into runtime
This commit is contained in:
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,7 +1,8 @@
|
|||||||
#ignore misc BYOND files
|
#ignore misc BYOND files
|
||||||
*.log
|
*.log
|
||||||
*.int
|
*.int
|
||||||
*.rsc
|
*.rsc
|
||||||
*.dmb
|
*.dmb
|
||||||
*.lk
|
*.lk
|
||||||
data/
|
*.backup
|
||||||
|
data/
|
||||||
|
|||||||
@@ -382,7 +382,6 @@
|
|||||||
#include "code\game\machinery\computer\computer.dm"
|
#include "code\game\machinery\computer\computer.dm"
|
||||||
#include "code\game\machinery\computer\crew.dm"
|
#include "code\game\machinery\computer\crew.dm"
|
||||||
#include "code\game\machinery\computer\guestpass.dm"
|
#include "code\game\machinery\computer\guestpass.dm"
|
||||||
#include "code\game\machinery\computer\hologram.dm"
|
|
||||||
#include "code\game\machinery\computer\law.dm"
|
#include "code\game\machinery\computer\law.dm"
|
||||||
#include "code\game\machinery\computer\medical.dm"
|
#include "code\game\machinery\computer\medical.dm"
|
||||||
#include "code\game\machinery\computer\message.dm"
|
#include "code\game\machinery\computer\message.dm"
|
||||||
@@ -573,6 +572,7 @@
|
|||||||
#include "code\game\objects\items\robot\robot_items.dm"
|
#include "code\game\objects\items\robot\robot_items.dm"
|
||||||
#include "code\game\objects\items\robot\robot_parts.dm"
|
#include "code\game\objects\items\robot\robot_parts.dm"
|
||||||
#include "code\game\objects\items\robot\robot_upgrades.dm"
|
#include "code\game\objects\items\robot\robot_upgrades.dm"
|
||||||
|
#include "code\game\objects\items\stacks\matter_synth.dm"
|
||||||
#include "code\game\objects\items\stacks\medical.dm"
|
#include "code\game\objects\items\stacks\medical.dm"
|
||||||
#include "code\game\objects\items\stacks\nanopaste.dm"
|
#include "code\game\objects\items\stacks\nanopaste.dm"
|
||||||
#include "code\game\objects\items\stacks\rods.dm"
|
#include "code\game\objects\items\stacks\rods.dm"
|
||||||
@@ -707,6 +707,7 @@
|
|||||||
#include "code\game\objects\structures\tank_dispenser.dm"
|
#include "code\game\objects\structures\tank_dispenser.dm"
|
||||||
#include "code\game\objects\structures\target_stake.dm"
|
#include "code\game\objects\structures\target_stake.dm"
|
||||||
#include "code\game\objects\structures\transit_tubes.dm"
|
#include "code\game\objects\structures\transit_tubes.dm"
|
||||||
|
#include "code\game\objects\structures\under_wardrobe.dm"
|
||||||
#include "code\game\objects\structures\watercloset.dm"
|
#include "code\game\objects\structures\watercloset.dm"
|
||||||
#include "code\game\objects\structures\windoor_assembly.dm"
|
#include "code\game\objects\structures\windoor_assembly.dm"
|
||||||
#include "code\game\objects\structures\window.dm"
|
#include "code\game\objects\structures\window.dm"
|
||||||
@@ -875,7 +876,6 @@
|
|||||||
#include "code\modules\clothing\spacesuits\rig\modules\computer.dm"
|
#include "code\modules\clothing\spacesuits\rig\modules\computer.dm"
|
||||||
#include "code\modules\clothing\spacesuits\rig\modules\modules.dm"
|
#include "code\modules\clothing\spacesuits\rig\modules\modules.dm"
|
||||||
#include "code\modules\clothing\spacesuits\rig\modules\ninja.dm"
|
#include "code\modules\clothing\spacesuits\rig\modules\ninja.dm"
|
||||||
#include "code\modules\clothing\spacesuits\rig\modules\rig_weapons.dm"
|
|
||||||
#include "code\modules\clothing\spacesuits\rig\modules\utility.dm"
|
#include "code\modules\clothing\spacesuits\rig\modules\utility.dm"
|
||||||
#include "code\modules\clothing\spacesuits\rig\modules\vision.dm"
|
#include "code\modules\clothing\spacesuits\rig\modules\vision.dm"
|
||||||
#include "code\modules\clothing\spacesuits\rig\suits\alien.dm"
|
#include "code\modules\clothing\spacesuits\rig\suits\alien.dm"
|
||||||
@@ -957,6 +957,13 @@
|
|||||||
#include "code\modules\events\spontaneous_appendicitis.dm"
|
#include "code\modules\events\spontaneous_appendicitis.dm"
|
||||||
#include "code\modules\events\viral_infection.dm"
|
#include "code\modules\events\viral_infection.dm"
|
||||||
#include "code\modules\events\wallrot.dm"
|
#include "code\modules\events\wallrot.dm"
|
||||||
|
#include "code\modules\examine\examine.dm"
|
||||||
|
#include "code\modules\examine\descriptions\atmospherics.dm"
|
||||||
|
#include "code\modules\examine\descriptions\engineering.dm"
|
||||||
|
#include "code\modules\examine\descriptions\mobs.dm"
|
||||||
|
#include "code\modules\examine\descriptions\stacks.dm"
|
||||||
|
#include "code\modules\examine\descriptions\structures.dm"
|
||||||
|
#include "code\modules\examine\descriptions\turfs.dm"
|
||||||
#include "code\modules\ext_scripts\irc.dm"
|
#include "code\modules\ext_scripts\irc.dm"
|
||||||
#include "code\modules\ext_scripts\python.dm"
|
#include "code\modules\ext_scripts\python.dm"
|
||||||
#include "code\modules\flufftext\Dreaming.dm"
|
#include "code\modules\flufftext\Dreaming.dm"
|
||||||
@@ -1137,6 +1144,7 @@
|
|||||||
#include "code\modules\mob\living\silicon\ai\life.dm"
|
#include "code\modules\mob\living\silicon\ai\life.dm"
|
||||||
#include "code\modules\mob\living\silicon\ai\login.dm"
|
#include "code\modules\mob\living\silicon\ai\login.dm"
|
||||||
#include "code\modules\mob\living\silicon\ai\logout.dm"
|
#include "code\modules\mob\living\silicon\ai\logout.dm"
|
||||||
|
#include "code\modules\mob\living\silicon\ai\nano.dm"
|
||||||
#include "code\modules\mob\living\silicon\ai\say.dm"
|
#include "code\modules\mob\living\silicon\ai\say.dm"
|
||||||
#include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm"
|
#include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm"
|
||||||
#include "code\modules\mob\living\silicon\ai\freelook\chunk.dm"
|
#include "code\modules\mob\living\silicon\ai\freelook\chunk.dm"
|
||||||
@@ -1224,9 +1232,13 @@
|
|||||||
#include "code\modules\nano\JSON Reader.dm"
|
#include "code\modules\nano\JSON Reader.dm"
|
||||||
#include "code\modules\nano\JSON Writer.dm"
|
#include "code\modules\nano\JSON Writer.dm"
|
||||||
#include "code\modules\nano\nanoexternal.dm"
|
#include "code\modules\nano\nanoexternal.dm"
|
||||||
|
#include "code\modules\nano\nanointeraction.dm"
|
||||||
#include "code\modules\nano\nanomanager.dm"
|
#include "code\modules\nano\nanomanager.dm"
|
||||||
#include "code\modules\nano\nanomapgen.dm"
|
#include "code\modules\nano\nanomapgen.dm"
|
||||||
#include "code\modules\nano\nanoui.dm"
|
#include "code\modules\nano\nanoui.dm"
|
||||||
|
#include "code\modules\nano\modules\crew_monitor.dm"
|
||||||
|
#include "code\modules\nano\modules\power_monitor.dm"
|
||||||
|
#include "code\modules\nano\modules\rcon.dm"
|
||||||
#include "code\modules\organs\blood.dm"
|
#include "code\modules\organs\blood.dm"
|
||||||
#include "code\modules\organs\organ.dm"
|
#include "code\modules\organs\organ.dm"
|
||||||
#include "code\modules\organs\organ_alien.dm"
|
#include "code\modules\organs\organ_alien.dm"
|
||||||
@@ -1321,6 +1333,7 @@
|
|||||||
#include "code\modules\projectiles\ammunition\bullets.dm"
|
#include "code\modules\projectiles\ammunition\bullets.dm"
|
||||||
#include "code\modules\projectiles\guns\alien.dm"
|
#include "code\modules\projectiles\guns\alien.dm"
|
||||||
#include "code\modules\projectiles\guns\energy.dm"
|
#include "code\modules\projectiles\guns\energy.dm"
|
||||||
|
#include "code\modules\projectiles\guns\launcher.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile.dm"
|
#include "code\modules\projectiles\guns\projectile.dm"
|
||||||
#include "code\modules\projectiles\guns\energy\laser.dm"
|
#include "code\modules\projectiles\guns\energy\laser.dm"
|
||||||
#include "code\modules\projectiles\guns\energy\nuclear.dm"
|
#include "code\modules\projectiles\guns\energy\nuclear.dm"
|
||||||
@@ -1328,14 +1341,17 @@
|
|||||||
#include "code\modules\projectiles\guns\energy\special.dm"
|
#include "code\modules\projectiles\guns\energy\special.dm"
|
||||||
#include "code\modules\projectiles\guns\energy\stun.dm"
|
#include "code\modules\projectiles\guns\energy\stun.dm"
|
||||||
#include "code\modules\projectiles\guns\energy\temperature.dm"
|
#include "code\modules\projectiles\guns\energy\temperature.dm"
|
||||||
|
#include "code\modules\projectiles\guns\launcher\crossbow.dm"
|
||||||
|
#include "code\modules\projectiles\guns\launcher\grenade_launcher.dm"
|
||||||
|
#include "code\modules\projectiles\guns\launcher\pneumatic.dm"
|
||||||
|
#include "code\modules\projectiles\guns\launcher\rocket.dm"
|
||||||
|
#include "code\modules\projectiles\guns\launcher\syringe_gun.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\crossbow.dm"
|
#include "code\modules\projectiles\guns\projectile\dartgun.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\launcher.dm"
|
|
||||||
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\pneumatic.dm"
|
|
||||||
#include "code\modules\projectiles\guns\projectile\revolver.dm"
|
#include "code\modules\projectiles\guns\projectile\revolver.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile\rocket.dm"
|
|
||||||
#include "code\modules\projectiles\guns\projectile\shotgun.dm"
|
#include "code\modules\projectiles\guns\projectile\shotgun.dm"
|
||||||
|
#include "code\modules\projectiles\guns\projectile\sniper.dm"
|
||||||
#include "code\modules\projectiles\projectile\animate.dm"
|
#include "code\modules\projectiles\projectile\animate.dm"
|
||||||
#include "code\modules\projectiles\projectile\beams.dm"
|
#include "code\modules\projectiles\projectile\beams.dm"
|
||||||
#include "code\modules\projectiles\projectile\bullets.dm"
|
#include "code\modules\projectiles\projectile\bullets.dm"
|
||||||
@@ -1352,11 +1368,8 @@
|
|||||||
#include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm"
|
#include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm"
|
||||||
#include "code\modules\reagents\Chemistry-Reagents.dm"
|
#include "code\modules\reagents\Chemistry-Reagents.dm"
|
||||||
#include "code\modules\reagents\Chemistry-Recipes.dm"
|
#include "code\modules\reagents\Chemistry-Recipes.dm"
|
||||||
#include "code\modules\reagents\dartgun.dm"
|
|
||||||
#include "code\modules\reagents\grenade_launcher.dm"
|
|
||||||
#include "code\modules\reagents\reagent_containers.dm"
|
#include "code\modules\reagents\reagent_containers.dm"
|
||||||
#include "code\modules\reagents\reagent_dispenser.dm"
|
#include "code\modules\reagents\reagent_dispenser.dm"
|
||||||
#include "code\modules\reagents\syringe_gun.dm"
|
|
||||||
#include "code\modules\reagents\reagent_containers\blood_pack.dm"
|
#include "code\modules\reagents\reagent_containers\blood_pack.dm"
|
||||||
#include "code\modules\reagents\reagent_containers\borghydro.dm"
|
#include "code\modules\reagents\reagent_containers\borghydro.dm"
|
||||||
#include "code\modules\reagents\reagent_containers\dropper.dm"
|
#include "code\modules\reagents\reagent_containers\dropper.dm"
|
||||||
|
|||||||
@@ -1,37 +1,50 @@
|
|||||||
//node1, air1, network1 correspond to input
|
//node1, air1, network1 correspond to input
|
||||||
//node2, air2, network2 correspond to output
|
//node2, air2, network2 correspond to output
|
||||||
|
|
||||||
|
#define ADIABATIC_EXPONENT 0.667 //Actually adiabatic exponent - 1.
|
||||||
|
|
||||||
/obj/machinery/atmospherics/binary/circulator
|
/obj/machinery/atmospherics/binary/circulator
|
||||||
name = "circulator/heat exchanger"
|
name = "circulator"
|
||||||
desc = "A gas circulator pump and heat exchanger."
|
desc = "A gas circulator turbine and heat exchanger."
|
||||||
icon = 'icons/obj/pipes.dmi'
|
icon = 'icons/obj/pipes.dmi'
|
||||||
icon_state = "circ-off"
|
icon_state = "circ-off"
|
||||||
anchored = 0
|
anchored = 0
|
||||||
|
|
||||||
|
var/kinetic_efficiency = 0.04 //combined kinetic and kinetic-to-electric efficiency
|
||||||
|
var/volume_ratio = 0.2
|
||||||
|
|
||||||
var/recent_moles_transferred = 0
|
var/recent_moles_transferred = 0
|
||||||
var/last_heat_capacity = 0
|
var/last_heat_capacity = 0
|
||||||
var/last_temperature = 0
|
var/last_temperature = 0
|
||||||
var/last_pressure_delta = 0
|
var/last_pressure_delta = 0
|
||||||
var/last_worldtime_transfer = 0
|
var/last_worldtime_transfer = 0
|
||||||
|
var/last_stored_energy_transferred = 0
|
||||||
|
var/volume_capacity_used = 0
|
||||||
|
var/stored_energy = 0
|
||||||
|
|
||||||
density = 1
|
density = 1
|
||||||
|
|
||||||
/obj/machinery/atmospherics/binary/circulator/New()
|
/obj/machinery/atmospherics/binary/circulator/New()
|
||||||
..()
|
..()
|
||||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||||
|
air1.volume = 400
|
||||||
|
|
||||||
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
|
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
|
||||||
var/datum/gas_mixture/removed
|
var/datum/gas_mixture/removed
|
||||||
if(anchored && !(stat&BROKEN) )
|
if(anchored && !(stat&BROKEN) && network1)
|
||||||
var/input_starting_pressure = air1.return_pressure()
|
var/input_starting_pressure = air1.return_pressure()
|
||||||
var/output_starting_pressure = air2.return_pressure()
|
var/output_starting_pressure = air2.return_pressure()
|
||||||
last_pressure_delta = max(input_starting_pressure - output_starting_pressure + 10, 0)
|
last_pressure_delta = max(input_starting_pressure - output_starting_pressure - 5, 0)
|
||||||
|
|
||||||
//only circulate air if there is a pressure difference (plus 10 kPa to represent friction in the machine)
|
//only circulate air if there is a pressure difference (plus 5kPa kinetic, 10kPa static friction)
|
||||||
if(air1.temperature > 0 && last_pressure_delta > 0)
|
if(air1.temperature > 0 && last_pressure_delta > 5)
|
||||||
|
|
||||||
//Calculate necessary moles to transfer using PV = nRT
|
//Calculate necessary moles to transfer using PV = nRT
|
||||||
recent_moles_transferred = last_pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
recent_moles_transferred = (last_pressure_delta*network1.volume/(air1.temperature * R_IDEAL_GAS_EQUATION))/3 //uses the volume of the whole network, not just itself
|
||||||
|
volume_capacity_used = min( (last_pressure_delta*network1.volume/3)/(input_starting_pressure*air1.volume) , 1) //how much of the gas in the input air volume is consumed
|
||||||
|
|
||||||
|
//Calculate energy generated from kinetic turbine
|
||||||
|
stored_energy += 1/ADIABATIC_EXPONENT * min(last_pressure_delta * network1.volume , input_starting_pressure*air1.volume) * (1 - volume_ratio**ADIABATIC_EXPONENT) * kinetic_efficiency
|
||||||
|
|
||||||
//Actually transfer the gas
|
//Actually transfer the gas
|
||||||
removed = air1.remove(recent_moles_transferred)
|
removed = air1.remove(recent_moles_transferred)
|
||||||
@@ -40,8 +53,7 @@
|
|||||||
last_temperature = removed.temperature
|
last_temperature = removed.temperature
|
||||||
|
|
||||||
//Update the gas networks.
|
//Update the gas networks.
|
||||||
if(network1)
|
network1.update = 1
|
||||||
network1.update = 1
|
|
||||||
|
|
||||||
last_worldtime_transfer = world.time
|
last_worldtime_transfer = world.time
|
||||||
else
|
else
|
||||||
@@ -50,6 +62,11 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return removed
|
return removed
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/binary/circulator/proc/return_stored_energy()
|
||||||
|
last_stored_energy_transferred = stored_energy
|
||||||
|
stored_energy = 0
|
||||||
|
return last_stored_energy_transferred
|
||||||
|
|
||||||
/obj/machinery/atmospherics/binary/circulator/process()
|
/obj/machinery/atmospherics/binary/circulator/process()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -72,8 +89,11 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W, /obj/item/weapon/wrench))
|
if(istype(W, /obj/item/weapon/wrench))
|
||||||
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||||
anchored = !anchored
|
anchored = !anchored
|
||||||
user << "\blue You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor."
|
user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \
|
||||||
|
"You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.", \
|
||||||
|
"You hear a ratchet")
|
||||||
|
|
||||||
if(anchored)
|
if(anchored)
|
||||||
if(dir & (NORTH|SOUTH))
|
if(dir & (NORTH|SOUTH))
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
/obj/machinery/atmospherics/unary/vent_pump/engine
|
/obj/machinery/atmospherics/unary/vent_pump/engine
|
||||||
name = "Engine Core Vent"
|
name = "Engine Core Vent"
|
||||||
power_channel = ENVIRON
|
power_channel = ENVIRON
|
||||||
power_rating = 15000 //15 kW ~ 20 HP
|
power_rating = 30000 //15 kW ~ 20 HP
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/engine/New()
|
/obj/machinery/atmospherics/unary/vent_pump/engine/New()
|
||||||
..()
|
..()
|
||||||
@@ -183,11 +183,11 @@
|
|||||||
//JESUS FUCK. THERE ARE LITERALLY 250 OF YOU MOTHERFUCKERS ON ZLEVEL ONE AND YOU DO THIS SHIT EVERY TICK WHEN VERY OFTEN THERE IS NO REASON TO
|
//JESUS FUCK. THERE ARE LITERALLY 250 OF YOU MOTHERFUCKERS ON ZLEVEL ONE AND YOU DO THIS SHIT EVERY TICK WHEN VERY OFTEN THERE IS NO REASON TO
|
||||||
|
|
||||||
if(pump_direction && pressure_checks == PRESSURE_CHECK_EXTERNAL && controller_iteration > 10) //99% of all vents
|
if(pump_direction && pressure_checks == PRESSURE_CHECK_EXTERNAL && controller_iteration > 10) //99% of all vents
|
||||||
//Fucking hibernate because you ain't doing shit.
|
//Fucking hibernate because you ain't doing shit.
|
||||||
hibernate = 1
|
hibernate = 1
|
||||||
spawn(rand(100,200)) //hibernate for 10 or 20 seconds randomly
|
spawn(rand(100,200)) //hibernate for 10 or 20 seconds randomly
|
||||||
hibernate = 0
|
hibernate = 0
|
||||||
|
|
||||||
|
|
||||||
if (power_draw >= 0)
|
if (power_draw >= 0)
|
||||||
last_power_draw = power_draw
|
last_power_draw = power_draw
|
||||||
@@ -383,6 +383,7 @@
|
|||||||
user << "You are too far away to read the gauge."
|
user << "You are too far away to read the gauge."
|
||||||
if(welded)
|
if(welded)
|
||||||
user << "It seems welded shut."
|
user << "It seems welded shut."
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/power_change()
|
/obj/machinery/atmospherics/unary/vent_pump/power_change()
|
||||||
var/old_stat = stat
|
var/old_stat = stat
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
use_power = !use_power
|
use_power = !use_power
|
||||||
|
|
||||||
if(signal.data["panic_siphon"]) //must be before if("scrubbing" thing
|
if(signal.data["panic_siphon"]) //must be before if("scrubbing" thing
|
||||||
panic = text2num(signal.data["panic_siphon"] != null)
|
panic = text2num(signal.data["panic_siphon"])
|
||||||
if(panic)
|
if(panic)
|
||||||
use_power = 1
|
use_power = 1
|
||||||
scrubbing = 0
|
scrubbing = 0
|
||||||
@@ -189,8 +189,12 @@
|
|||||||
|
|
||||||
if(signal.data["scrubbing"] != null)
|
if(signal.data["scrubbing"] != null)
|
||||||
scrubbing = text2num(signal.data["scrubbing"])
|
scrubbing = text2num(signal.data["scrubbing"])
|
||||||
|
if(scrubbing)
|
||||||
|
panic = 0
|
||||||
if(signal.data["toggle_scrubbing"])
|
if(signal.data["toggle_scrubbing"])
|
||||||
scrubbing = !scrubbing
|
scrubbing = !scrubbing
|
||||||
|
if(scrubbing)
|
||||||
|
panic = 0
|
||||||
|
|
||||||
var/list/toggle = list()
|
var/list/toggle = list()
|
||||||
|
|
||||||
@@ -273,6 +277,7 @@
|
|||||||
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
||||||
else
|
else
|
||||||
user << "You are too far away to read the gauge."
|
user << "You are too far away to read the gauge."
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
|
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
|
||||||
if(initial_loc)
|
if(initial_loc)
|
||||||
|
|||||||
@@ -42,10 +42,10 @@ var/global/list/facial_hair_styles_male_list = list()
|
|||||||
var/global/list/facial_hair_styles_female_list = list()
|
var/global/list/facial_hair_styles_female_list = list()
|
||||||
var/global/list/skin_styles_female_list = list() //unused
|
var/global/list/skin_styles_female_list = list() //unused
|
||||||
//Underwear
|
//Underwear
|
||||||
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
|
var/global/list/underwear_m = list("White" = "m1", "Grey" = "m2", "Green" = "m3", "Blue" = "m4", "Black" = "m5", "Mankini" = "m6", "None") //Curse whoever made male/female underwear diffrent colours
|
||||||
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Black Sports","White Sports","None")
|
var/global/list/underwear_f = list("Red" = "f1", "White" = "f2", "Yellow" = "f3", "Blue" = "f4", "Black" = "f5", "Thong" = "f6", "Black Sports" = "f7","White Sports" = "f8","None")
|
||||||
//undershirt
|
//undershirt
|
||||||
var/global/list/undershirt_t = list("Black Tank top", "White Tank top", "Black shirt", "White shirt", "None")
|
var/global/list/undershirt_t = list("Black Tank top" = "u1", "White Tank top" = "u2", "Black shirt" = "u3", "White shirt" = "u4", "None")
|
||||||
//Backpacks
|
//Backpacks
|
||||||
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
|
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
|
||||||
|
|
||||||
|
|||||||
@@ -375,6 +375,12 @@ proc/listclearnulls(list/list)
|
|||||||
i++
|
i++
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
// Returns the key based on the index
|
||||||
|
/proc/get_key_by_value(var/list/L, var/value)
|
||||||
|
for(var/key in L)
|
||||||
|
if(L[key] == value)
|
||||||
|
return key
|
||||||
|
|
||||||
/proc/count_by_type(var/list/L, type)
|
/proc/count_by_type(var/list/L, type)
|
||||||
var/i = 0
|
var/i = 0
|
||||||
for(var/T in L)
|
for(var/T in L)
|
||||||
|
|||||||
@@ -329,14 +329,25 @@ proc/TextPreview(var/string,var/len=40)
|
|||||||
//This means that it doesn't just remove < and > and call it a day.
|
//This means that it doesn't just remove < and > and call it a day.
|
||||||
//Also limit the size of the input, if specified.
|
//Also limit the size of the input, if specified.
|
||||||
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
|
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
|
||||||
|
if(!input)
|
||||||
|
return
|
||||||
var/opentag = 1 //These store the position of < and > respectively.
|
var/opentag = 1 //These store the position of < and > respectively.
|
||||||
var/closetag = 1
|
var/closetag = 1
|
||||||
while(1)
|
while(1)
|
||||||
opentag = findtext(input, "<")
|
opentag = findtext(input, "<")
|
||||||
closetag = findtext(input, ">")
|
closetag = findtext(input, ">")
|
||||||
if(!closetag || !opentag)
|
if(closetag && opentag)
|
||||||
|
if(closetag < opentag)
|
||||||
|
input = copytext(input, (closetag + 1))
|
||||||
|
else
|
||||||
|
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
||||||
|
else if(closetag || opentag)
|
||||||
|
if(opentag)
|
||||||
|
input = copytext(input, 1, opentag)
|
||||||
|
else
|
||||||
|
input = copytext(input, (closetag + 1))
|
||||||
|
else
|
||||||
break
|
break
|
||||||
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
|
||||||
if(max_length)
|
if(max_length)
|
||||||
input = copytext(input,1,max_length)
|
input = copytext(input,1,max_length)
|
||||||
return sanitize(input)
|
return sanitize(input)
|
||||||
|
|||||||
@@ -1305,7 +1305,7 @@ proc/is_hot(obj/item/W as obj)
|
|||||||
/proc/can_operate(mob/living/carbon/M)
|
/proc/can_operate(mob/living/carbon/M)
|
||||||
return (M.lying && \
|
return (M.lying && \
|
||||||
locate(/obj/machinery/optable, M.loc) || \
|
locate(/obj/machinery/optable, M.loc) || \
|
||||||
(locate(/obj/structure/stool/bed/roller, M.loc) && prob(75)) || \
|
(locate(/obj/structure/bed/roller, M.loc) && prob(75)) || \
|
||||||
(locate(/obj/structure/table/, M.loc) && prob(66)))
|
(locate(/obj/structure/table/, M.loc) && prob(66)))
|
||||||
|
|
||||||
/proc/reverse_direction(var/dir)
|
/proc/reverse_direction(var/dir)
|
||||||
|
|||||||
@@ -433,9 +433,6 @@
|
|||||||
f_style = "Shaved"
|
f_style = "Shaved"
|
||||||
if(dna.species == "Human") //no more xenos losing ears/tentacles
|
if(dna.species == "Human") //no more xenos losing ears/tentacles
|
||||||
h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
|
h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
|
||||||
undershirt = undershirt_t.Find("None")
|
undershirt = null
|
||||||
if(gender == MALE)
|
underwear = null
|
||||||
underwear = underwear_m.Find("None")
|
|
||||||
else
|
|
||||||
underwear = underwear_f.Find("None")
|
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
||||||
mymob.gun_setting_icon.set_dir(2)
|
mymob.gun_setting_icon.set_dir(2)
|
||||||
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
||||||
if (G.target)
|
if (G.aim_targets)
|
||||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||||
if (mymob.client.target_can_click)
|
if (mymob.client.target_can_click)
|
||||||
mymob.item_use_icon.set_dir(1)
|
mymob.item_use_icon.set_dir(1)
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ var/obj/screen/robot_inventory
|
|||||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
||||||
mymob.gun_setting_icon.set_dir(2)
|
mymob.gun_setting_icon.set_dir(2)
|
||||||
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
|
||||||
if (G.target)
|
if (G.aim_targets)
|
||||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||||
if (mymob.client.target_can_click)
|
if (mymob.client.target_can_click)
|
||||||
mymob.item_use_icon.set_dir(1)
|
mymob.item_use_icon.set_dir(1)
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
playSpecials(curturf,effectin,soundin)
|
playSpecials(curturf,effectin,soundin)
|
||||||
|
|
||||||
var/obj/structure/stool/bed/chair/C = null
|
var/obj/structure/bed/chair/C = null
|
||||||
if(isliving(teleatom))
|
if(isliving(teleatom))
|
||||||
var/mob/living/L = teleatom
|
var/mob/living/L = teleatom
|
||||||
if(L.buckled)
|
if(L.buckled)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
spawn(0)
|
spawn(0)
|
||||||
|
|
||||||
if(target.buckled)
|
if(target.buckled)
|
||||||
var/obj/structure/stool/bed/buckled_to = target.buckled.
|
var/obj/structure/bed/buckled_to = target.buckled.
|
||||||
buckled_to.unbuckle_mob()
|
buckled_to.unbuckle_mob()
|
||||||
|
|
||||||
var/mobloc = get_turf(target.loc)
|
var/mobloc = get_turf(target.loc)
|
||||||
|
|||||||
@@ -155,21 +155,31 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/obj/item/weapon/storage/toolbox/emergency,
|
/obj/item/weapon/storage/toolbox/emergency,
|
||||||
/obj/item/clothing/suit/storage/hazardvest,
|
/obj/item/clothing/suit/storage/hazardvest,
|
||||||
/obj/item/clothing/suit/storage/hazardvest,
|
/obj/item/clothing/suit/storage/hazardvest,
|
||||||
/obj/item/weapon/tank/emergency_oxygen,
|
/obj/item/clothing/suit/storage/vest,
|
||||||
/obj/item/weapon/tank/emergency_oxygen,
|
/obj/item/clothing/suit/storage/vest,
|
||||||
/obj/item/weapon/tank/emergency_oxygen,
|
/obj/item/weapon/tank/emergency_oxygen/engi,
|
||||||
/obj/item/weapon/tank/emergency_oxygen,
|
/obj/item/weapon/tank/emergency_oxygen/engi,
|
||||||
/obj/item/weapon/tank/emergency_oxygen,
|
/obj/item/weapon/tank/emergency_oxygen/engi,
|
||||||
|
/obj/item/weapon/tank/emergency_oxygen/engi,
|
||||||
|
/obj/item/clothing/suit/space/emergency,
|
||||||
|
/obj/item/clothing/suit/space/emergency,
|
||||||
|
/obj/item/clothing/suit/space/emergency,
|
||||||
|
/obj/item/clothing/suit/space/emergency,
|
||||||
|
/obj/item/clothing/head/helmet/space/emergency,
|
||||||
|
/obj/item/clothing/head/helmet/space/emergency,
|
||||||
|
/obj/item/clothing/head/helmet/space/emergency,
|
||||||
|
/obj/item/clothing/head/helmet/space/emergency,
|
||||||
/obj/item/clothing/mask/gas,
|
/obj/item/clothing/mask/gas,
|
||||||
/obj/item/clothing/mask/gas,
|
/obj/item/clothing/mask/gas,
|
||||||
/obj/item/clothing/mask/gas,
|
/obj/item/clothing/mask/gas,
|
||||||
/obj/item/clothing/mask/gas,
|
/obj/item/clothing/mask/gas,
|
||||||
/obj/item/clothing/mask/gas)
|
/obj/item/clothing/mask/gas)
|
||||||
cost = 35
|
cost = 45
|
||||||
containertype = /obj/structure/closet/crate/internals
|
containertype = /obj/structure/closet/crate/internals
|
||||||
containername = "Emergency crate"
|
containername = "Emergency crate"
|
||||||
group = "Atmospherics"
|
group = "Atmospherics"
|
||||||
|
|
||||||
|
|
||||||
/datum/supply_packs/inflatable
|
/datum/supply_packs/inflatable
|
||||||
name = "Inflatable barriers"
|
name = "Inflatable barriers"
|
||||||
contains = list(/obj/item/weapon/storage/briefcase/inflatable,
|
contains = list(/obj/item/weapon/storage/briefcase/inflatable,
|
||||||
@@ -689,6 +699,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/obj/item/weapon/gun/energy/laser,
|
/obj/item/weapon/gun/energy/laser,
|
||||||
/obj/item/weapon/gun/energy/taser,
|
/obj/item/weapon/gun/energy/taser,
|
||||||
/obj/item/weapon/gun/energy/taser,
|
/obj/item/weapon/gun/energy/taser,
|
||||||
|
/obj/item/weapon/gun/projectile/sec,
|
||||||
|
/obj/item/weapon/gun/projectile/sec,
|
||||||
/obj/item/weapon/storage/box/flashbangs,
|
/obj/item/weapon/storage/box/flashbangs,
|
||||||
/obj/item/weapon/storage/box/flashbangs)
|
/obj/item/weapon/storage/box/flashbangs)
|
||||||
cost = 30
|
cost = 30
|
||||||
@@ -697,6 +709,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
access = access_security
|
access = access_security
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
|
|
||||||
/datum/supply_packs/eweapons
|
/datum/supply_packs/eweapons
|
||||||
name = "Experimental weapons crate"
|
name = "Experimental weapons crate"
|
||||||
contains = list(/obj/item/weapon/gun/energy/xray,
|
contains = list(/obj/item/weapon/gun/energy/xray,
|
||||||
@@ -711,18 +724,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
access = access_heads
|
access = access_heads
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
/datum/supply_packs/armor
|
/datum/supply_packs/randomised/armor
|
||||||
|
num_contained = 5
|
||||||
|
contains = list(/obj/item/clothing/suit/storage/vest,
|
||||||
|
/obj/item/clothing/suit/storage/vest/officer,
|
||||||
|
/obj/item/clothing/suit/storage/vest/warden,
|
||||||
|
/obj/item/clothing/suit/storage/vest/hos,
|
||||||
|
/obj/item/clothing/suit/storage/vest/pcrc,
|
||||||
|
/obj/item/clothing/suit/storage/vest/detective,
|
||||||
|
/obj/item/clothing/suit/storage/vest/heavy,
|
||||||
|
/obj/item/clothing/suit/storage/vest/heavy/officer,
|
||||||
|
/obj/item/clothing/suit/storage/vest/heavy/warden,
|
||||||
|
/obj/item/clothing/suit/storage/vest/heavy/hos,
|
||||||
|
/obj/item/clothing/suit/storage/vest/heavy/pcrc)
|
||||||
|
|
||||||
name = "Armor crate"
|
name = "Armor crate"
|
||||||
contains = list(/obj/item/clothing/head/helmet,
|
cost = 40
|
||||||
/obj/item/clothing/head/helmet,
|
|
||||||
/obj/item/clothing/suit/armor/vest,
|
|
||||||
/obj/item/clothing/suit/armor/vest)
|
|
||||||
cost = 15
|
|
||||||
containertype = /obj/structure/closet/crate/secure
|
containertype = /obj/structure/closet/crate/secure
|
||||||
containername = "Armor crate"
|
containername = "Armor crate"
|
||||||
access = access_security
|
access = access_security
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
|
|
||||||
/datum/supply_packs/riot
|
/datum/supply_packs/riot
|
||||||
name = "Riot gear crate"
|
name = "Riot gear crate"
|
||||||
contains = list(/obj/item/weapon/melee/baton,
|
contains = list(/obj/item/weapon/melee/baton,
|
||||||
@@ -760,15 +783,16 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
access = access_armory
|
access = access_armory
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
/datum/supply_packs/ballistic
|
/datum/supply_packs/shotgun
|
||||||
name = "Ballistic gear crate"
|
name = "Shotgun crate"
|
||||||
contains = list(/obj/item/clothing/suit/armor/bulletproof,
|
contains = list(/obj/item/clothing/suit/armor/bulletproof,
|
||||||
/obj/item/clothing/suit/armor/bulletproof,
|
/obj/item/clothing/suit/armor/bulletproof,
|
||||||
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
|
/obj/item/weapon/storage/box/shotgunammo,
|
||||||
|
/obj/item/weapon/gun/projectile/shotgun/pump,
|
||||||
/obj/item/weapon/gun/projectile/shotgun/pump/combat)
|
/obj/item/weapon/gun/projectile/shotgun/pump/combat)
|
||||||
cost = 50
|
cost = 50
|
||||||
containertype = /obj/structure/closet/crate/secure
|
containertype = /obj/structure/closet/crate/secure
|
||||||
containername = "Ballistic gear crate"
|
containername = "Shotgun crate"
|
||||||
access = access_armory
|
access = access_armory
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
@@ -778,7 +802,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/obj/item/clothing/suit/armor/laserproof,
|
/obj/item/clothing/suit/armor/laserproof,
|
||||||
/obj/item/weapon/gun/energy/sniperrifle,
|
/obj/item/weapon/gun/energy/sniperrifle,
|
||||||
/obj/item/weapon/gun/energy/sniperrifle)
|
/obj/item/weapon/gun/energy/sniperrifle)
|
||||||
cost = 50
|
cost = 90
|
||||||
containertype = /obj/structure/closet/crate/secure
|
containertype = /obj/structure/closet/crate/secure
|
||||||
containername = "Energy marksman crate"
|
containername = "Energy marksman crate"
|
||||||
access = access_armory
|
access = access_armory
|
||||||
@@ -796,6 +820,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
access = access_armory
|
access = access_armory
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
|
/datum/supply_packs/ionweapons
|
||||||
|
name = "Electromagnetic weapons crate"
|
||||||
|
contains = list(/obj/item/weapon/gun/energy/ionrifle,
|
||||||
|
/obj/item/weapon/gun/energy/ionrifle,
|
||||||
|
/obj/item/weapon/storage/box/emps)
|
||||||
|
cost = 50
|
||||||
|
containertype = /obj/structure/closet/crate/secure
|
||||||
|
containername = "electromagnetic weapons crate"
|
||||||
|
access = access_armory
|
||||||
|
group = "Security"
|
||||||
|
|
||||||
|
/datum/supply_packs/randomised/automatic
|
||||||
|
name = "Automatic weapon crate"
|
||||||
|
num_contained = 2
|
||||||
|
contains = list(/obj/item/weapon/gun/projectile/automatic/wt550,
|
||||||
|
/obj/item/weapon/gun/projectile/automatic/z8)
|
||||||
|
cost = 90
|
||||||
|
containertype = /obj/structure/closet/crate/secure
|
||||||
|
containername = "Automatic weapon crate"
|
||||||
|
access = access_armory
|
||||||
|
group = "Security"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
/datum/supply_packs/loyalty
|
/datum/supply_packs/loyalty
|
||||||
name = "Loyalty implant crate"
|
name = "Loyalty implant crate"
|
||||||
@@ -1249,14 +1295,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
|
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
|
||||||
/obj/item/weapon/storage/belt/security/tactical,
|
/obj/item/weapon/storage/belt/security/tactical,
|
||||||
/obj/item/clothing/shoes/jackboots,
|
/obj/item/clothing/shoes/jackboots,
|
||||||
/obj/item/clothing/gloves/black,
|
|
||||||
/obj/item/clothing/under/tactical,
|
|
||||||
/obj/item/clothing/suit/armor/tactical,
|
|
||||||
/obj/item/clothing/head/helmet/tactical,
|
|
||||||
/obj/item/clothing/mask/balaclava/tactical,
|
|
||||||
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
|
|
||||||
/obj/item/weapon/storage/belt/security/tactical,
|
|
||||||
/obj/item/clothing/shoes/jackboots,
|
|
||||||
/obj/item/clothing/gloves/black)
|
/obj/item/clothing/gloves/black)
|
||||||
|
|
||||||
/datum/supply_packs/carpet
|
/datum/supply_packs/carpet
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
icon_state = "bike_horn"
|
icon_state = "bike_horn"
|
||||||
item_state = "bike_horn"
|
item_state = "bike_horn"
|
||||||
throwforce = 3
|
throwforce = 3
|
||||||
w_class = 1.0
|
w_class = 2
|
||||||
throw_speed = 3
|
throw_speed = 3
|
||||||
throw_range = 15
|
throw_range = 15
|
||||||
attack_verb = list("HONKED")
|
attack_verb = list("HONKED")
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
var/tmp/message_title = new_title ? new_title : title
|
var/tmp/message_title = new_title ? new_title : title
|
||||||
var/tmp/message_sound = new_sound ? sound(new_sound) : sound
|
var/tmp/message_sound = new_sound ? sound(new_sound) : sound
|
||||||
|
|
||||||
message = html_encode(message)
|
message = trim_strip_html_properly(message)
|
||||||
message_title = html_encode(message_title)
|
message_title = html_encode(message_title)
|
||||||
|
|
||||||
Message(message, message_title)
|
Message(message, message_title)
|
||||||
|
|||||||
@@ -202,9 +202,6 @@ its easier to just keep the beam vertical.
|
|||||||
|
|
||||||
user << "\icon[src] That's [f_name] [suffix]"
|
user << "\icon[src] That's [f_name] [suffix]"
|
||||||
|
|
||||||
if(desc)
|
|
||||||
user << desc
|
|
||||||
|
|
||||||
return distance == -1 || (get_dist(src, user) <= distance)
|
return distance == -1 || (get_dist(src, user) <= distance)
|
||||||
|
|
||||||
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
|
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
operative_notes = "We'd like to remind our operatives to keep it professional. You are not here to have a good time, you are here to accomplish your objectives. These vile communists must be stopped at all costs. You may collaborate with any friends of the Syndicate coalition, but keep an eye on any of those Tiger punks if they do show up. You are completely free to accomplish your objectives any way you see fit."
|
operative_notes = "We'd like to remind our operatives to keep it professional. You are not here to have a good time, you are here to accomplish your objectives. These vile communists must be stopped at all costs. You may collaborate with any friends of the Syndicate coalition, but keep an eye on any of those Tiger punks if they do show up. You are completely free to accomplish your objectives any way you see fit."
|
||||||
|
|
||||||
uplink_contents = {"Highly Visible and Dangerous Weapons;
|
uplink_contents = {"Highly Visible and Dangerous Weapons;
|
||||||
/obj/item/weapon/gun/projectile:6:Revolver;
|
/obj/item/weapon/gun/projectile/revolver:6:Revolver;
|
||||||
/obj/item/ammo_magazine/a357:2:Ammo-357;
|
/obj/item/ammo_magazine/a357:2:Ammo-357;
|
||||||
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
|
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
|
||||||
/obj/item/weapon/melee/energy/sword:4:Energy Sword;
|
/obj/item/weapon/melee/energy/sword:4:Energy Sword;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
|
new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
|
||||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/g9mm, 5, "Silenced 9mm", "S9"),
|
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/g9mm, 5, "Silenced 9mm", "S9"),
|
||||||
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
|
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
|
||||||
new/datum/uplink_item(/obj/item/weapon/gun/projectile, 6, "Revolver", "RE"),
|
new/datum/uplink_item(/obj/item/weapon/gun/projectile/revolver, 6, "Revolver", "RE"),
|
||||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU")
|
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU")
|
||||||
),
|
),
|
||||||
"Stealthy and Inconspicuous Weapons" = list(
|
"Stealthy and Inconspicuous Weapons" = list(
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ var/global/datum/controller/gameticker/ticker
|
|||||||
cinematic.mouse_opacity = 0
|
cinematic.mouse_opacity = 0
|
||||||
cinematic.screen_loc = "1,0"
|
cinematic.screen_loc = "1,0"
|
||||||
|
|
||||||
var/obj/structure/stool/bed/temp_buckle = new(src)
|
var/obj/structure/bed/temp_buckle = new(src)
|
||||||
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
|
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
|
||||||
if(station_missed)
|
if(station_missed)
|
||||||
for(var/mob/living/M in living_mob_list)
|
for(var/mob/living/M in living_mob_list)
|
||||||
|
|||||||
@@ -27,18 +27,15 @@
|
|||||||
ninja.special_role = "Ninja"
|
ninja.special_role = "Ninja"
|
||||||
ninja.original = ninja.current
|
ninja.original = ninja.current
|
||||||
|
|
||||||
/*if(ninjastart.len == 0)
|
if(ninjastart.len == 0)
|
||||||
ninja.current << "<B>\red A proper starting location for you could not be found, please report this bug!</B>"
|
for(var/obj/effect/landmark/L in landmarks_list)
|
||||||
ninja.current << "<B>\red Attempting to place at a carpspawn.</B>"*/
|
if(L.name == "carpspawn")
|
||||||
|
ninjastart.Add(L)
|
||||||
|
|
||||||
//Until such a time as people want to place ninja spawn points, carpspawn will do fine.
|
|
||||||
for(var/obj/effect/landmark/L in landmarks_list)
|
|
||||||
if(L.name == "carpspawn")
|
|
||||||
ninjastart.Add(L)
|
|
||||||
if(ninjastart.len == 0 && latejoin.len > 0)
|
if(ninjastart.len == 0 && latejoin.len > 0)
|
||||||
ninja.current << "<B>\red No spawneable locations could be found. Defaulting to latejoin.</B>"
|
ninja.current << "<B>\red No spawneable locations could be found. Defaulting to latejoin.</B>"
|
||||||
return 1
|
return 1
|
||||||
else if (ninjastart.len == 0)
|
else
|
||||||
ninja.current << "<B>\red No spawneable locations could be found. Aborting.</B>"
|
ninja.current << "<B>\red No spawneable locations could be found. Aborting.</B>"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
if("revolver")
|
if("revolver")
|
||||||
new /obj/item/weapon/gun/projectile(get_turf(H))
|
new /obj/item/weapon/gun/projectile(get_turf(H))
|
||||||
if("detective")
|
if("detective")
|
||||||
new /obj/item/weapon/gun/projectile/detective(get_turf(H))
|
new /obj/item/weapon/gun/projectile/revolver/detective(get_turf(H))
|
||||||
if("smg")
|
if("smg")
|
||||||
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
|
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
|
||||||
if("nuclear")
|
if("nuclear")
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
if("combatshotgun")
|
if("combatshotgun")
|
||||||
new /obj/item/weapon/gun/projectile/shotgun/pump/combat(get_turf(H))
|
new /obj/item/weapon/gun/projectile/shotgun/pump/combat(get_turf(H))
|
||||||
if("mateba")
|
if("mateba")
|
||||||
new /obj/item/weapon/gun/projectile/mateba(get_turf(H))
|
new /obj/item/weapon/gun/projectile/revolver/mateba(get_turf(H))
|
||||||
if("smg")
|
if("smg")
|
||||||
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
|
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
|
||||||
if("uzi")
|
if("uzi")
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ var/global/datum/controller/occupations/job_master
|
|||||||
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
|
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
|
||||||
H.loc = S.loc
|
H.loc = S.loc
|
||||||
// Moving wheelchair if they have one
|
// Moving wheelchair if they have one
|
||||||
if(H.buckled && istype(H.buckled, /obj/structure/stool/bed/chair/wheelchair))
|
if(H.buckled && istype(H.buckled, /obj/structure/bed/chair/wheelchair))
|
||||||
H.buckled.loc = H.loc
|
H.buckled.loc = H.loc
|
||||||
H.buckled.set_dir(H.dir)
|
H.buckled.set_dir(H.dir)
|
||||||
|
|
||||||
@@ -516,7 +516,7 @@ var/global/datum/controller/occupations/job_master
|
|||||||
var/datum/organ/external/l_foot = H.get_organ("l_foot")
|
var/datum/organ/external/l_foot = H.get_organ("l_foot")
|
||||||
var/datum/organ/external/r_foot = H.get_organ("r_foot")
|
var/datum/organ/external/r_foot = H.get_organ("r_foot")
|
||||||
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
|
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
|
||||||
var/obj/structure/stool/bed/chair/wheelchair/W = new /obj/structure/stool/bed/chair/wheelchair(H.loc)
|
var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc)
|
||||||
H.buckled = W
|
H.buckled = W
|
||||||
H.update_canmove()
|
H.update_canmove()
|
||||||
W.set_dir(H.dir)
|
W.set_dir(H.dir)
|
||||||
|
|||||||
@@ -195,7 +195,6 @@
|
|||||||
if(RCON_YES)
|
if(RCON_YES)
|
||||||
remote_control = 1
|
remote_control = 1
|
||||||
|
|
||||||
updateDialog()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/alarm/proc/handle_heating_cooling(var/datum/gas_mixture/environment)
|
/obj/machinery/alarm/proc/handle_heating_cooling(var/datum/gas_mixture/environment)
|
||||||
@@ -468,7 +467,7 @@
|
|||||||
frequency.post_signal(src, alert_signal)
|
frequency.post_signal(src, alert_signal)
|
||||||
|
|
||||||
/obj/machinery/alarm/attack_ai(mob/user)
|
/obj/machinery/alarm/attack_ai(mob/user)
|
||||||
return interact(user)
|
ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/alarm/attack_hand(mob/user)
|
/obj/machinery/alarm/attack_hand(mob/user)
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -477,315 +476,179 @@
|
|||||||
return interact(user)
|
return interact(user)
|
||||||
|
|
||||||
/obj/machinery/alarm/interact(mob/user)
|
/obj/machinery/alarm/interact(mob/user)
|
||||||
user.set_machine(src)
|
ui_interact(user)
|
||||||
|
wires.Interact(user)
|
||||||
|
|
||||||
if(buildstage!=2)
|
/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/custom_state = null)
|
||||||
return
|
var/data[0]
|
||||||
|
var/remote_connection = 0
|
||||||
|
var/remote_access = 0
|
||||||
|
if(custom_state)
|
||||||
|
var/list/state = custom_state.href_list(user)
|
||||||
|
remote_connection = state["remote_connection"] // Remote connection means we're non-adjacent/connecting from another computer
|
||||||
|
remote_access = state["remote_access"] // Remote access means we also have the privilege to alter the air alarm.
|
||||||
|
|
||||||
if((get_dist(src, user) > 1 ))
|
data["locked"] = locked && !user.isSilicon()
|
||||||
if (!istype(user, /mob/living/silicon))
|
data["remote_connection"] = remote_connection
|
||||||
user.machine = null
|
data["remote_access"] = remote_access
|
||||||
user << browse(null, "window=air_alarm")
|
data["rcon"] = rcon_setting
|
||||||
user << browse(null, "window=AAlarmwires")
|
data["screen"] = screen
|
||||||
return
|
|
||||||
|
|
||||||
|
populate_status(data)
|
||||||
|
|
||||||
else if (istype(user, /mob/living/silicon) && aidisabled)
|
if(!(locked && !remote_connection) || remote_access || user.isSilicon())
|
||||||
user << "AI control for this Air Alarm interface has been disabled."
|
populate_controls(data)
|
||||||
user << browse(null, "window=air_alarm")
|
|
||||||
return
|
|
||||||
|
|
||||||
if(wiresexposed && (!istype(user, /mob/living/silicon/ai)))
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||||
wires.Interact(user)
|
if(!ui)
|
||||||
|
ui = new(user, src, ui_key, "air_alarm.tmpl", src.name, 625, 625, master_ui = master_ui, custom_state = custom_state)
|
||||||
|
ui.set_initial_data(data)
|
||||||
|
ui.open()
|
||||||
|
ui.set_auto_update(1)
|
||||||
|
|
||||||
if(!shorted)
|
/obj/machinery/alarm/proc/populate_status(var/data)
|
||||||
user << browse(return_text(user),"window=air_alarm")
|
|
||||||
onclose(user, "air_alarm")
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/alarm/proc/return_text(mob/user)
|
|
||||||
if(!(istype(user, /mob/living/silicon)) && locked)
|
|
||||||
return "<html><head><title>\The [src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
|
|
||||||
else
|
|
||||||
return "<html><head><title>\The [src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr>[return_controls()]</body></html>"
|
|
||||||
|
|
||||||
/obj/machinery/alarm/proc/return_status()
|
|
||||||
var/turf/location = get_turf(src)
|
var/turf/location = get_turf(src)
|
||||||
var/datum/gas_mixture/environment = location.return_air()
|
var/datum/gas_mixture/environment = location.return_air()
|
||||||
var/total = environment.total_moles
|
var/total = environment.total_moles
|
||||||
var/output = "<b>Air Status:</b><br>"
|
|
||||||
|
|
||||||
if(total == 0)
|
var/list/environment_data = new
|
||||||
output += "<font color='red'><b>Warning: Cannot obtain air sample for analysis.</b></font>"
|
data["has_environment"] = total
|
||||||
return output
|
if(total)
|
||||||
|
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
|
||||||
|
|
||||||
output += {"
|
var/list/current_settings = TLV["pressure"]
|
||||||
<style>
|
var/pressure = environment.return_pressure()
|
||||||
.dl0 { color: green; }
|
var/pressure_danger = get_danger_level(pressure, current_settings)
|
||||||
.dl1 { color: orange; }
|
environment_data[++environment_data.len] = list("name" = "Pressure", "value" = pressure, "unit" = "kPa", "danger_level" = pressure_danger)
|
||||||
.dl2 { color: red; font-weght: bold;}
|
data["total_danger"] = pressure_danger
|
||||||
</style>
|
|
||||||
"}
|
|
||||||
|
|
||||||
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
|
current_settings = TLV["oxygen"]
|
||||||
|
var/oxygen_danger = get_danger_level(environment.gas["oxygen"]*partial_pressure, current_settings)
|
||||||
|
environment_data[++environment_data.len] = list("name" = "Oxygen", "value" = environment.gas["oxygen"] / total * 100, "unit" = "%", "danger_level" = oxygen_danger)
|
||||||
|
data["total_danger"] = max(oxygen_danger, data["total_danger"])
|
||||||
|
|
||||||
var/list/current_settings = TLV["pressure"]
|
current_settings = TLV["carbon dioxide"]
|
||||||
var/environment_pressure = environment.return_pressure()
|
var/carbon_dioxide_danger = get_danger_level(environment.gas["carbon dioxide"]*partial_pressure, current_settings)
|
||||||
var/pressure_dangerlevel = get_danger_level(environment_pressure, current_settings)
|
environment_data[++environment_data.len] = list("name" = "Carbon dioxide", "value" = environment.gas["carbon dioxide"] / total * 100, "unit" = "%", "danger_level" = carbon_dioxide_danger)
|
||||||
|
data["total_danger"] = max(carbon_dioxide_danger, data["total_danger"])
|
||||||
|
|
||||||
current_settings = TLV["oxygen"]
|
current_settings = TLV["phoron"]
|
||||||
var/oxygen_dangerlevel = get_danger_level(environment.gas["oxygen"]*partial_pressure, current_settings)
|
var/phoron_danger = get_danger_level(environment.gas["phoron"]*partial_pressure, current_settings)
|
||||||
var/oxygen_percent = round(environment.gas["oxygen"] / total * 100, 2)
|
environment_data[++environment_data.len] = list("name" = "Toxins", "value" = environment.gas["phoron"] / total * 100, "unit" = "%", "danger_level" = phoron_danger)
|
||||||
|
data["total_danger"] = max(phoron_danger, data["total_danger"])
|
||||||
|
|
||||||
current_settings = TLV["carbon dioxide"]
|
current_settings = TLV["temperature"]
|
||||||
var/co2_dangerlevel = get_danger_level(environment.gas["carbon_dioxide"]*partial_pressure, current_settings)
|
var/temperature_danger = get_danger_level(environment.temperature, current_settings)
|
||||||
var/co2_percent = round(environment.gas["carbon_dioxide"] / total * 100, 2)
|
environment_data[++environment_data.len] = list("name" = "Temperature", "value" = environment.temperature, "unit" = "K ([round(environment.temperature - T0C, 0.1)]C)", "danger_level" = temperature_danger)
|
||||||
|
data["total_danger"] = max(temperature_danger, data["total_danger"])
|
||||||
|
|
||||||
current_settings = TLV["phoron"]
|
data["environment"] = environment_data
|
||||||
var/phoron_dangerlevel = get_danger_level(environment.gas["phoron"]*partial_pressure, current_settings)
|
data["atmos_alarm"] = alarm_area.atmosalm
|
||||||
var/phoron_percent = round(environment.gas["phoron"] / total * 100, 2)
|
data["fire_alarm"] = alarm_area.fire != null
|
||||||
|
data["target_temperature"] = "[target_temperature - T0C]C"
|
||||||
//current_settings = TLV["other"]
|
|
||||||
//var/other_moles = 0.0
|
|
||||||
//for(var/datum/gas/G in environment.trace_gases)
|
|
||||||
// other_moles+=G.moles
|
|
||||||
//var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, current_settings)
|
|
||||||
|
|
||||||
current_settings = TLV["temperature"]
|
|
||||||
var/temperature_dangerlevel = get_danger_level(environment.temperature, current_settings)
|
|
||||||
|
|
||||||
output += {"
|
|
||||||
Pressure: <span class='dl[pressure_dangerlevel]'>[environment_pressure]</span>kPa<br>
|
|
||||||
Oxygen: <span class='dl[oxygen_dangerlevel]'>[oxygen_percent]</span>%<br>
|
|
||||||
Carbon dioxide: <span class='dl[co2_dangerlevel]'>[co2_percent]</span>%<br>
|
|
||||||
Toxins: <span class='dl[phoron_dangerlevel]'>[phoron_percent]</span>%<br>
|
|
||||||
"}
|
|
||||||
//if (other_dangerlevel==2)
|
|
||||||
// output += "Notice: <span class='dl2'>High Concentration of Unknown Particles Detected</span><br>"
|
|
||||||
//else if (other_dangerlevel==1)
|
|
||||||
// output += "Notice: <span class='dl1'>Low Concentration of Unknown Particles Detected</span><br>"
|
|
||||||
|
|
||||||
output += "Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]</span>K ([round(environment.temperature - T0C, 0.1)]C)<br>"
|
|
||||||
|
|
||||||
//'Local Status' should report the LOCAL status, damnit.
|
|
||||||
output += "Local Status: "
|
|
||||||
switch(max(pressure_dangerlevel,oxygen_dangerlevel,co2_dangerlevel,phoron_dangerlevel,other_dangerlevel,temperature_dangerlevel))
|
|
||||||
if(2)
|
|
||||||
output += "<span class='dl2'>DANGER: Internals Required</span><br>"
|
|
||||||
if(1)
|
|
||||||
output += "<span class='dl1'>Caution</span><br>"
|
|
||||||
if(0)
|
|
||||||
output += "<span class='dl0'>Optimal</span><br>"
|
|
||||||
|
|
||||||
output += "Area Status: "
|
|
||||||
if(alarm_area.atmosalm)
|
|
||||||
output += "<span class='dl1'>Atmos alert in area</span>"
|
|
||||||
else if (alarm_area.fire)
|
|
||||||
output += "<span class='dl1'>Fire alarm in area</span>"
|
|
||||||
else
|
|
||||||
output += "No alerts"
|
|
||||||
|
|
||||||
return output
|
|
||||||
|
|
||||||
/obj/machinery/alarm/proc/rcon_text()
|
|
||||||
var/dat = "<table width=\"100%\"><td align=\"center\"><b>Remote Control:</b><br>"
|
|
||||||
if(rcon_setting == RCON_NO)
|
|
||||||
dat += "<b>Off</b>"
|
|
||||||
else
|
|
||||||
dat += "<a href='?src=\ref[src];rcon=[RCON_NO]'>Off</a>"
|
|
||||||
dat += " | "
|
|
||||||
if(rcon_setting == RCON_AUTO)
|
|
||||||
dat += "<b>Auto</b>"
|
|
||||||
else
|
|
||||||
dat += "<a href='?src=\ref[src];rcon=[RCON_AUTO]'>Auto</a>"
|
|
||||||
dat += " | "
|
|
||||||
if(rcon_setting == RCON_YES)
|
|
||||||
dat += "<b>On</b>"
|
|
||||||
else
|
|
||||||
dat += "<a href='?src=\ref[src];rcon=[RCON_YES]'>On</a></td>"
|
|
||||||
|
|
||||||
//Hackish, I know. I didn't feel like bothering to rework all of this.
|
|
||||||
dat += "<td align=\"center\"><b>Thermostat:</b><br><a href='?src=\ref[src];temperature=1'>[target_temperature - T0C]C</a></td></table>"
|
|
||||||
|
|
||||||
return dat
|
|
||||||
|
|
||||||
/obj/machinery/alarm/proc/return_controls(var/source = src)
|
|
||||||
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
|
|
||||||
|
|
||||||
|
/obj/machinery/alarm/proc/populate_controls(var/list/data)
|
||||||
switch(screen)
|
switch(screen)
|
||||||
if (AALARM_SCREEN_MAIN)
|
if(AALARM_SCREEN_MAIN)
|
||||||
if(alarm_area.atmosalm)
|
data["mode"] = mode
|
||||||
output += "<a href='?src=\ref[source];atmos_reset=1'>Reset - Area Atmospheric Alarm</a><hr>"
|
if(AALARM_SCREEN_VENT)
|
||||||
else
|
var/vents[0]
|
||||||
output += "<a href='?src=\ref[source];atmos_alarm=1'>Activate - Area Atmospheric Alarm</a><hr>"
|
for(var/id_tag in alarm_area.air_vent_names)
|
||||||
|
var/long_name = alarm_area.air_vent_names[id_tag]
|
||||||
|
var/list/info = alarm_area.air_vent_info[id_tag]
|
||||||
|
if(!info)
|
||||||
|
continue
|
||||||
|
vents[++vents.len] = list(
|
||||||
|
"id_tag" = id_tag,
|
||||||
|
"long_name" = sanitize(long_name),
|
||||||
|
"power" = info["power"],
|
||||||
|
"checks" = info["checks"],
|
||||||
|
"direction" = info["direction"],
|
||||||
|
"external" = info["external"]
|
||||||
|
)
|
||||||
|
data["vents"] = vents
|
||||||
|
if(AALARM_SCREEN_SCRUB)
|
||||||
|
var/scrubbers[0]
|
||||||
|
for(var/id_tag in alarm_area.air_scrub_names)
|
||||||
|
var/long_name = alarm_area.air_scrub_names[id_tag]
|
||||||
|
var/list/info = alarm_area.air_scrub_info[id_tag]
|
||||||
|
if(!info)
|
||||||
|
continue
|
||||||
|
scrubbers[++scrubbers.len] = list(
|
||||||
|
"id_tag" = id_tag,
|
||||||
|
"long_name" = sanitize(long_name),
|
||||||
|
"power" = info["power"],
|
||||||
|
"scrubbing" = info["scrubbing"],
|
||||||
|
"panic" = info["panic"],
|
||||||
|
"filters" = list()
|
||||||
|
)
|
||||||
|
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Oxygen", "command" = "o2_scrub", "val" = info["filter_o2"]))
|
||||||
|
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Nitrogen", "command" = "n2_scrub", "val" = info["filter_n2"]))
|
||||||
|
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Carbon Dioxide", "command" = "co2_scrub","val" = info["filter_co2"]))
|
||||||
|
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Toxin" , "command" = "tox_scrub","val" = info["filter_phoron"]))
|
||||||
|
scrubbers[scrubbers.len]["filters"] += list(list("name" = "Nitrous Oxide", "command" = "n2o_scrub","val" = info["filter_n2o"]))
|
||||||
|
data["scrubbers"] = scrubbers
|
||||||
|
if(AALARM_SCREEN_MODE)
|
||||||
|
var/modes[0]
|
||||||
|
modes[++modes.len] = list("name" = "Filtering - Scrubs out contaminants", "mode" = AALARM_MODE_SCRUBBING, "selected" = mode == AALARM_MODE_SCRUBBING, "danger" = 0)
|
||||||
|
modes[++modes.len] = list("name" = "Replace Air - Siphons out air while replacing", "mode" = AALARM_MODE_REPLACEMENT, "selected" = mode == AALARM_MODE_REPLACEMENT, "danger" = 0)
|
||||||
|
modes[++modes.len] = list("name" = "Panic - Siphons air out of the room", "mode" = AALARM_MODE_PANIC, "selected" = mode == AALARM_MODE_PANIC, "danger" = 1)
|
||||||
|
modes[++modes.len] = list("name" = "Cycle - Siphons air before replacing", "mode" = AALARM_MODE_CYCLE, "selected" = mode == AALARM_MODE_CYCLE, "danger" = 1)
|
||||||
|
modes[++modes.len] = list("name" = "Fill - Shuts off scrubbers and opens vents", "mode" = AALARM_MODE_FILL, "selected" = mode == AALARM_MODE_FILL, "danger" = 0)
|
||||||
|
modes[++modes.len] = list("name" = "Off - Shuts off vents and scrubbers", "mode" = AALARM_MODE_OFF, "selected" = mode == AALARM_MODE_OFF, "danger" = 0)
|
||||||
|
data["modes"] = modes
|
||||||
|
data["mode"] = mode
|
||||||
|
if(AALARM_SCREEN_SENSORS)
|
||||||
|
var/list/selected
|
||||||
|
var/thresholds[0]
|
||||||
|
|
||||||
output += {"
|
var/list/gas_names = list(
|
||||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
|
|
||||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
|
|
||||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_MODE]'>Set environmentals mode</a><br>
|
|
||||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_SENSORS]'>Sensor Settings</a><br>
|
|
||||||
<HR>
|
|
||||||
"}
|
|
||||||
if (mode==AALARM_MODE_PANIC)
|
|
||||||
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[source];mode=[AALARM_MODE_SCRUBBING]'>Turn syphoning off</A>"
|
|
||||||
else
|
|
||||||
output += "<A href='?src=\ref[source];mode=[AALARM_MODE_PANIC]'><font color='red'>ACTIVATE PANIC SYPHON IN AREA</font></A>"
|
|
||||||
|
|
||||||
|
|
||||||
if (AALARM_SCREEN_VENT)
|
|
||||||
var/sensor_data = ""
|
|
||||||
if(alarm_area.air_vent_names.len)
|
|
||||||
for(var/id_tag in alarm_area.air_vent_names)
|
|
||||||
var/long_name = alarm_area.air_vent_names[id_tag]
|
|
||||||
var/list/data = alarm_area.air_vent_info[id_tag]
|
|
||||||
if(!data)
|
|
||||||
continue;
|
|
||||||
var/state = ""
|
|
||||||
|
|
||||||
sensor_data += {"
|
|
||||||
<B>[long_name]</B>[state]<BR>
|
|
||||||
<B>Operating:</B>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A>
|
|
||||||
<BR>
|
|
||||||
<B>Pressure checks:</B>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=checks;val=[data["checks"]^1]' [(data["checks"]&1)?"style='font-weight:bold;'":""]>external</A>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=checks;val=[data["checks"]^2]' [(data["checks"]&2)?"style='font-weight:bold;'":""]>internal</A>
|
|
||||||
<BR>
|
|
||||||
<B>External pressure bound:</B>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-1000'>-</A>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-100'>-</A>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-10'>-</A>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-1'>-</A>
|
|
||||||
[data["external"]]
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+1'>+</A>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=set_external_pressure;val=[ONE_ATMOSPHERE]'> (reset) </A>
|
|
||||||
<BR>
|
|
||||||
"}
|
|
||||||
if (data["direction"] == "siphon")
|
|
||||||
sensor_data += {"
|
|
||||||
<B>Direction:</B>
|
|
||||||
siphoning
|
|
||||||
<BR>
|
|
||||||
"}
|
|
||||||
sensor_data += {"<HR>"}
|
|
||||||
else
|
|
||||||
sensor_data = "No vents connected.<BR>"
|
|
||||||
output = {"<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
|
||||||
if (AALARM_SCREEN_SCRUB)
|
|
||||||
var/sensor_data = ""
|
|
||||||
if(alarm_area.air_scrub_names.len)
|
|
||||||
for(var/id_tag in alarm_area.air_scrub_names)
|
|
||||||
var/long_name = alarm_area.air_scrub_names[id_tag]
|
|
||||||
var/list/data = alarm_area.air_scrub_info[id_tag]
|
|
||||||
if(!data)
|
|
||||||
continue;
|
|
||||||
var/state = ""
|
|
||||||
|
|
||||||
sensor_data += {"
|
|
||||||
<B>[long_name]</B>[state]<BR>
|
|
||||||
<B>Operating:</B>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A><BR>
|
|
||||||
<B>Type:</B>
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=scrubbing;val=[!data["scrubbing"]]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>
|
|
||||||
"}
|
|
||||||
|
|
||||||
if(data["scrubbing"])
|
|
||||||
sensor_data += {"
|
|
||||||
<B>Filtering:</B>
|
|
||||||
Oxygen
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=o2_scrub;val=[!data["filter_o2"]]'>[data["filter_o2"]?"on":"off"]</A>;
|
|
||||||
Nitrogen
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=n2_scrub;val=[!data["filter_n2"]]'>[data["filter_n2"]?"on":"off"]</A>;
|
|
||||||
Carbon Dioxide
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=co2_scrub;val=[!data["filter_co2"]]'>[data["filter_co2"]?"on":"off"]</A>;
|
|
||||||
Toxins
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=tox_scrub;val=[!data["filter_phoron"]]'>[data["filter_phoron"]?"on":"off"]</A>;
|
|
||||||
Nitrous Oxide
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=n2o_scrub;val=[!data["filter_n2o"]]'>[data["filter_n2o"]?"on":"off"]</A>
|
|
||||||
<BR>
|
|
||||||
"}
|
|
||||||
sensor_data += {"
|
|
||||||
<B>Panic syphon:</B> [data["panic"]?"<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>":""]
|
|
||||||
<A href='?src=\ref[source];id_tag=[id_tag];command=panic_siphon;val=[!data["panic"]]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate</font></A><BR>
|
|
||||||
<HR>
|
|
||||||
"}
|
|
||||||
else
|
|
||||||
sensor_data = "No scrubbers connected.<BR>"
|
|
||||||
output = {"<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
|
||||||
|
|
||||||
if (AALARM_SCREEN_MODE)
|
|
||||||
output += "<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br><b>Air machinery mode for the area:</b><ul>"
|
|
||||||
var/list/modes = list(AALARM_MODE_SCRUBBING = "Filtering - Scrubs out contaminants",\
|
|
||||||
AALARM_MODE_REPLACEMENT = "<font color='blue'>Replace Air - Siphons out air while replacing</font>",\
|
|
||||||
AALARM_MODE_PANIC = "<font color='red'>Panic - Siphons air out of the room</font>",\
|
|
||||||
AALARM_MODE_CYCLE = "<font color='red'>Cycle - Siphons air before replacing</font>",\
|
|
||||||
AALARM_MODE_FILL = "<font color='green'>Fill - Shuts off scrubbers and opens vents</font>",\
|
|
||||||
AALARM_MODE_OFF = "<font color='blue'>Off - Shuts off vents and scrubbers</font>",)
|
|
||||||
for (var/m=1,m<=modes.len,m++)
|
|
||||||
if (mode==m)
|
|
||||||
output += "<li><A href='?src=\ref[source];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"
|
|
||||||
else
|
|
||||||
output += "<li><A href='?src=\ref[source];mode=[m]'>[modes[m]]</A></li>"
|
|
||||||
output += "</ul>"
|
|
||||||
|
|
||||||
if (AALARM_SCREEN_SENSORS)
|
|
||||||
output += {"
|
|
||||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
|
|
||||||
<b>Alarm thresholds:</b><br>
|
|
||||||
Partial pressure for gases
|
|
||||||
<style>/* some CSS woodoo here. Does not work perfect in ie6 but who cares? */
|
|
||||||
table td { border-left: 1px solid black; border-top: 1px solid black;}
|
|
||||||
table tr:first-child th { border-left: 1px solid black;}
|
|
||||||
table th:first-child { border-top: 1px solid black; font-weight: normal;}
|
|
||||||
table tr:first-child th:first-child { border: none;}
|
|
||||||
.dl0 { color: green; }
|
|
||||||
.dl1 { color: orange; }
|
|
||||||
.dl2 { color: red; font-weght: bold;}
|
|
||||||
</style>
|
|
||||||
<table cellspacing=0>
|
|
||||||
<TR><th></th><th class=dl2>min2</th><th class=dl1>min1</th><th class=dl1>max1</th><th class=dl2>max2</th></TR>
|
|
||||||
"}
|
|
||||||
var/list/gases = list(
|
|
||||||
"oxygen" = "O<sub>2</sub>",
|
"oxygen" = "O<sub>2</sub>",
|
||||||
"carbon dioxide" = "CO<sub>2</sub>",
|
"carbon dioxide" = "CO<sub>2</sub>",
|
||||||
"phoron" = "Toxin",
|
"phoron" = "Toxin",
|
||||||
"other" = "Other",)
|
"other" = "Other")
|
||||||
|
for (var/g in gas_names)
|
||||||
var/list/selected
|
thresholds[++thresholds.len] = list("name" = gas_names[g], "settings" = list())
|
||||||
for (var/g in gases)
|
|
||||||
output += "<TR><th>[gases[g]]</th>"
|
|
||||||
selected = TLV[g]
|
selected = TLV[g]
|
||||||
for(var/i = 1, i <= 4, i++)
|
for(var/i = 1, i <= 4, i++)
|
||||||
output += "<td><A href='?src=\ref[source];command=set_threshold;env=[g];var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
thresholds[thresholds.len]["settings"] += list(list("env" = g, "val" = i, "selected" = selected[i]))
|
||||||
output += "</TR>"
|
|
||||||
|
|
||||||
selected = TLV["pressure"]
|
selected = TLV["pressure"]
|
||||||
output += " <TR><th>Pressure</th>"
|
thresholds[++thresholds.len] = list("name" = "Pressure", "settings" = list())
|
||||||
for(var/i = 1, i <= 4, i++)
|
for(var/i = 1, i <= 4, i++)
|
||||||
output += "<td><A href='?src=\ref[source];command=set_threshold;env=pressure;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = i, "selected" = selected[i]))
|
||||||
output += "</TR>"
|
|
||||||
|
|
||||||
selected = TLV["temperature"]
|
selected = TLV["temperature"]
|
||||||
output += "<TR><th>Temperature</th>"
|
thresholds[++thresholds.len] = list("name" = "Temperature", "settings" = list())
|
||||||
for(var/i = 1, i <= 4, i++)
|
for(var/i = 1, i <= 4, i++)
|
||||||
output += "<td><A href='?src=\ref[source];command=set_threshold;env=temperature;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = i, "selected" = selected[i]))
|
||||||
output += "</TR></table>"
|
|
||||||
|
|
||||||
return output
|
|
||||||
|
|
||||||
/obj/machinery/alarm/Topic(href, href_list, var/nowindow = 0, var/remote = 0)
|
data["thresholds"] = thresholds
|
||||||
if(..(href, href_list, nowindow, !remote) || !( Adjacent(usr) || nowindow || istype(usr, /mob/living/silicon)) ) // dont forget calling super in machine Topics -walter0o
|
|
||||||
usr.machine = null
|
|
||||||
usr << browse(null, "window=air_alarm")
|
|
||||||
usr << browse(null, "window=AAlarmwires")
|
|
||||||
return
|
|
||||||
|
|
||||||
add_fingerprint(usr)
|
/obj/machinery/alarm/CanUseTopic(var/mob/user, href_list, var/datum/topic_state/custom_state)
|
||||||
usr.set_machine(src)
|
if(buildstage != 2)
|
||||||
|
return STATUS_CLOSE
|
||||||
|
|
||||||
|
if(aidisabled && user.isAI())
|
||||||
|
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
|
||||||
|
return STATUS_CLOSE
|
||||||
|
|
||||||
|
. = shorted ? STATUS_DISABLED : STATUS_INTERACTIVE
|
||||||
|
|
||||||
|
if(. == STATUS_INTERACTIVE)
|
||||||
|
var/extra_href = custom_state.href_list(usr)
|
||||||
|
// Prevent remote users from altering RCON settings unless they already have access (I realize the risks)
|
||||||
|
if(href_list["rcon"] && extra_href["remote_connection"] && !extra_href["remote_access"])
|
||||||
|
. = STATUS_UPDATE
|
||||||
|
|
||||||
|
//TODO: Move the rest of if(!locked || extra_href["remote_access"] || usr.isAI()) and hrefs here
|
||||||
|
|
||||||
|
return min(..(), .)
|
||||||
|
|
||||||
|
/obj/machinery/alarm/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state)
|
||||||
|
if(..(href, href_list, nowindow, custom_state))
|
||||||
|
return 1
|
||||||
|
|
||||||
// hrefs that can always be called -walter0o
|
// hrefs that can always be called -walter0o
|
||||||
if(href_list["rcon"])
|
if(href_list["rcon"])
|
||||||
@@ -798,28 +661,38 @@ table tr:first-child th:first-child { border: none;}
|
|||||||
rcon_setting = RCON_AUTO
|
rcon_setting = RCON_AUTO
|
||||||
if(RCON_YES)
|
if(RCON_YES)
|
||||||
rcon_setting = RCON_YES
|
rcon_setting = RCON_YES
|
||||||
else
|
return 1
|
||||||
return
|
|
||||||
|
|
||||||
if(href_list["temperature"])
|
if(href_list["temperature"])
|
||||||
var/list/selected = TLV["temperature"]
|
var/list/selected = TLV["temperature"]
|
||||||
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
|
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
|
||||||
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
|
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
|
||||||
var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [min_temperature]C and [max_temperature]C)", "Thermostat Controls") as num|null
|
var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C) as num|null
|
||||||
if(!input_temperature || input_temperature > max_temperature || input_temperature < min_temperature)
|
if(isnum(input_temperature))
|
||||||
usr << "Temperature must be between [min_temperature]C and [max_temperature]C"
|
if(input_temperature > max_temperature || input_temperature < min_temperature)
|
||||||
else
|
usr << "Temperature must be between [min_temperature]C and [max_temperature]C"
|
||||||
target_temperature = input_temperature + T0C
|
else
|
||||||
|
target_temperature = input_temperature + T0C
|
||||||
|
return 1
|
||||||
|
|
||||||
// hrefs that need the AA unlocked -walter0o
|
// hrefs that need the AA unlocked -walter0o
|
||||||
if(!locked || remote || istype(usr, /mob/living/silicon))
|
var/extra_href = custom_state.href_list(usr)
|
||||||
|
if(!(locked && !extra_href["remote_connection"]) || extra_href["remote_access"] || usr.isSilicon())
|
||||||
if(href_list["command"])
|
if(href_list["command"])
|
||||||
var/device_id = href_list["id_tag"]
|
var/device_id = href_list["id_tag"]
|
||||||
switch(href_list["command"])
|
switch(href_list["command"])
|
||||||
|
if("set_external_pressure")
|
||||||
|
var/input_pressure = input("What pressure you like the system to mantain?", "Pressure Controls") as num|null
|
||||||
|
if(isnum(input_pressure))
|
||||||
|
send_signal(device_id, list(href_list["command"] = input_pressure))
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if("reset_external_pressure")
|
||||||
|
send_signal(device_id, list(href_list["command"] = ONE_ATMOSPHERE))
|
||||||
|
return 1
|
||||||
|
|
||||||
if( "power",
|
if( "power",
|
||||||
"adjust_external_pressure",
|
"adjust_external_pressure",
|
||||||
"set_external_pressure",
|
|
||||||
"checks",
|
"checks",
|
||||||
"o2_scrub",
|
"o2_scrub",
|
||||||
"n2_scrub",
|
"n2_scrub",
|
||||||
@@ -830,6 +703,7 @@ table tr:first-child th:first-child { border: none;}
|
|||||||
"scrubbing")
|
"scrubbing")
|
||||||
|
|
||||||
send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) )
|
send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) )
|
||||||
|
return 1
|
||||||
|
|
||||||
if("set_threshold")
|
if("set_threshold")
|
||||||
var/env = href_list["env"]
|
var/env = href_list["env"]
|
||||||
@@ -838,7 +712,7 @@ table tr:first-child th:first-child { border: none;}
|
|||||||
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
|
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
|
||||||
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num
|
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num
|
||||||
if (isnull(newval))
|
if (isnull(newval))
|
||||||
return
|
return 1
|
||||||
if (newval<0)
|
if (newval<0)
|
||||||
selected[threshold] = -1.0
|
selected[threshold] = -1.0
|
||||||
else if (env=="temperature" && newval>5000)
|
else if (env=="temperature" && newval>5000)
|
||||||
@@ -880,9 +754,11 @@ table tr:first-child th:first-child { border: none;}
|
|||||||
selected[3] = selected[4]
|
selected[3] = selected[4]
|
||||||
|
|
||||||
apply_mode()
|
apply_mode()
|
||||||
|
return 1
|
||||||
|
|
||||||
if(href_list["screen"])
|
if(href_list["screen"])
|
||||||
screen = text2num(href_list["screen"])
|
screen = text2num(href_list["screen"])
|
||||||
|
return 1
|
||||||
|
|
||||||
if(href_list["atmos_unlock"])
|
if(href_list["atmos_unlock"])
|
||||||
switch(href_list["atmos_unlock"])
|
switch(href_list["atmos_unlock"])
|
||||||
@@ -890,24 +766,24 @@ table tr:first-child th:first-child { border: none;}
|
|||||||
alarm_area.air_doors_close()
|
alarm_area.air_doors_close()
|
||||||
if("1")
|
if("1")
|
||||||
alarm_area.air_doors_open()
|
alarm_area.air_doors_open()
|
||||||
|
return 1
|
||||||
|
|
||||||
if(href_list["atmos_alarm"])
|
if(href_list["atmos_alarm"])
|
||||||
if (alarm_area.atmosalert(2))
|
if (alarm_area.atmosalert(2))
|
||||||
apply_danger_level(2)
|
apply_danger_level(2)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
return 1
|
||||||
|
|
||||||
if(href_list["atmos_reset"])
|
if(href_list["atmos_reset"])
|
||||||
if (alarm_area.atmosalert(0))
|
if (alarm_area.atmosalert(0))
|
||||||
apply_danger_level(0)
|
apply_danger_level(0)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
return 1
|
||||||
|
|
||||||
if(href_list["mode"])
|
if(href_list["mode"])
|
||||||
mode = text2num(href_list["mode"])
|
mode = text2num(href_list["mode"])
|
||||||
apply_mode()
|
apply_mode()
|
||||||
|
return 1
|
||||||
if(!nowindow)
|
|
||||||
updateUsrDialog()
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
@@ -937,7 +813,6 @@ table tr:first-child th:first-child { border: none;}
|
|||||||
if(allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN))
|
if(allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN))
|
||||||
locked = !locked
|
locked = !locked
|
||||||
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
|
user << "\blue You [ locked ? "lock" : "unlock"] the Air Alarm interface."
|
||||||
updateUsrDialog()
|
|
||||||
else
|
else
|
||||||
user << "\red Access denied."
|
user << "\red Access denied."
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -201,6 +201,11 @@
|
|||||||
path = /obj/item/weapon/reagent_containers/syringe
|
path = /obj/item/weapon/reagent_containers/syringe
|
||||||
category = "Medical"
|
category = "Medical"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/syringegun_ammo
|
||||||
|
name = "syringe"
|
||||||
|
path = /obj/item/weapon/syringe_cartridge
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/shotgun_blanks
|
/datum/autolathe/recipe/shotgun_blanks
|
||||||
name = "ammunition (shotgun, blank)"
|
name = "ammunition (shotgun, blank)"
|
||||||
path = /obj/item/ammo_casing/shotgun/blank
|
path = /obj/item/ammo_casing/shotgun/blank
|
||||||
@@ -217,13 +222,18 @@
|
|||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/magazine_rubber
|
/datum/autolathe/recipe/magazine_rubber
|
||||||
name = "ammunition (rubber)"
|
name = "ammunition (.45, rubber)"
|
||||||
path = /obj/item/ammo_magazine/c45r
|
path = /obj/item/ammo_magazine/c45m/rubber
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/magazine_flash
|
/datum/autolathe/recipe/magazine_flash
|
||||||
name = "ammunition (flash)"
|
name = "ammunition (.45, flash)"
|
||||||
path = /obj/item/ammo_magazine/c45f
|
path = /obj/item/ammo_magazine/c45m/flash
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/magazine_smg_rubber
|
||||||
|
name = "ammunition (9mm rubber top mounted)"
|
||||||
|
path = /obj/item/ammo_magazine/mc9mmt/rubber
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/consolescreen
|
/datum/autolathe/recipe/consolescreen
|
||||||
@@ -294,6 +304,36 @@
|
|||||||
hidden = 1
|
hidden = 1
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/magazine_stetchkin
|
||||||
|
name = "ammunition (9mm)"
|
||||||
|
path = /obj/item/ammo_magazine/mc9mm
|
||||||
|
hidden = 1
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/magazine_stetchkin_flash
|
||||||
|
name = "ammunition (9mm, flash)"
|
||||||
|
path = /obj/item/ammo_magazine/mc9mm/flash
|
||||||
|
hidden = 1
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/magazine_c20r
|
||||||
|
name = "ammunition (12mm)"
|
||||||
|
path = /obj/item/ammo_magazine/a12mm
|
||||||
|
hidden = 1
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/magazine_smg
|
||||||
|
name = "ammunition (9mm top mounted)"
|
||||||
|
path = /obj/item/ammo_magazine/mc9mmt
|
||||||
|
hidden = 1
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/magazine_carbine
|
||||||
|
name = "ammunition (5.56)"
|
||||||
|
path = /obj/item/ammo_magazine/a556
|
||||||
|
hidden = 1
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/shotgun
|
/datum/autolathe/recipe/shotgun
|
||||||
name = "ammunition (slug, shotgun)"
|
name = "ammunition (slug, shotgun)"
|
||||||
path = /obj/item/ammo_casing/shotgun
|
path = /obj/item/ammo_casing/shotgun
|
||||||
@@ -306,6 +346,12 @@
|
|||||||
hidden = 1
|
hidden = 1
|
||||||
category = "Arms and Ammunition"
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
|
/datum/autolathe/recipe/stunshell
|
||||||
|
name = "ammunition (stun cartridge, shotgun)"
|
||||||
|
path = /obj/item/ammo_casing/shotgun/stunshell
|
||||||
|
hidden = 1
|
||||||
|
category = "Arms and Ammunition"
|
||||||
|
|
||||||
/datum/autolathe/recipe/rcd
|
/datum/autolathe/recipe/rcd
|
||||||
name = "rapid construction device"
|
name = "rapid construction device"
|
||||||
path = /obj/item/weapon/rcd
|
path = /obj/item/weapon/rcd
|
||||||
|
|||||||
@@ -34,10 +34,10 @@
|
|||||||
var/obj/item/weapon/gun/energy/taser/G = new /obj/item/weapon/gun/energy/taser(Tsec)
|
var/obj/item/weapon/gun/energy/taser/G = new /obj/item/weapon/gun/energy/taser(Tsec)
|
||||||
G.power_supply.charge = 0
|
G.power_supply.charge = 0
|
||||||
else if(lasercolor == "b")
|
else if(lasercolor == "b")
|
||||||
var/obj/item/weapon/gun/energy/laser/bluetag/G = new /obj/item/weapon/gun/energy/laser/bluetag(Tsec)
|
var/obj/item/weapon/gun/energy/lasertag/blue/G = new (Tsec)
|
||||||
G.power_supply.charge = 0
|
G.power_supply.charge = 0
|
||||||
else if(lasercolor == "r")
|
else if(lasercolor == "r")
|
||||||
var/obj/item/weapon/gun/energy/laser/redtag/G = new /obj/item/weapon/gun/energy/laser/redtag(Tsec)
|
var/obj/item/weapon/gun/energy/lasertag/red/G = new (Tsec)
|
||||||
G.power_supply.charge = 0
|
G.power_supply.charge = 0
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
new /obj/item/robot_parts/l_leg(Tsec)
|
new /obj/item/robot_parts/l_leg(Tsec)
|
||||||
@@ -137,11 +137,11 @@
|
|||||||
if(7)
|
if(7)
|
||||||
switch(lasercolor)
|
switch(lasercolor)
|
||||||
if("b")
|
if("b")
|
||||||
if( !istype(W, /obj/item/weapon/gun/energy/laser/bluetag) )
|
if( !istype(W, /obj/item/weapon/gun/energy/lasertag/blue) )
|
||||||
return
|
return
|
||||||
name = "bluetag ED-209 assembly"
|
name = "bluetag ED-209 assembly"
|
||||||
if("r")
|
if("r")
|
||||||
if( !istype(W, /obj/item/weapon/gun/energy/laser/redtag) )
|
if( !istype(W, /obj/item/weapon/gun/energy/lasertag/red) )
|
||||||
return
|
return
|
||||||
name = "redtag ED-209 assembly"
|
name = "redtag ED-209 assembly"
|
||||||
if("")
|
if("")
|
||||||
|
|||||||
@@ -455,7 +455,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/bot/medbot/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/bot/medbot/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(Proj.flag == "taser")
|
if(Proj.taser_effect)
|
||||||
src.stunned = min(stunned+10,20)
|
src.stunned = min(stunned+10,20)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -702,10 +702,10 @@ Auto Patrol: []"},
|
|||||||
switch(lasercolor)
|
switch(lasercolor)
|
||||||
if("b")
|
if("b")
|
||||||
target_suit = /obj/item/clothing/suit/redtag
|
target_suit = /obj/item/clothing/suit/redtag
|
||||||
target_weapon = /obj/item/weapon/gun/energy/laser/redtag
|
target_weapon = /obj/item/weapon/gun/energy/lasertag/red
|
||||||
if("r")
|
if("r")
|
||||||
target_suit = /obj/item/clothing/suit/bluetag
|
target_suit = /obj/item/clothing/suit/bluetag
|
||||||
target_weapon = /obj/item/weapon/gun/energy/laser/bluetag
|
target_weapon = /obj/item/weapon/gun/energy/lasertag/blue
|
||||||
|
|
||||||
if((istype(perp.r_hand, target_weapon)) || (istype(perp.l_hand, target_weapon)))
|
if((istype(perp.r_hand, target_weapon)) || (istype(perp.l_hand, target_weapon)))
|
||||||
threat += 4
|
threat += 4
|
||||||
|
|||||||
@@ -12,12 +12,11 @@
|
|||||||
circuit = /obj/item/weapon/circuitboard/rcon_console
|
circuit = /obj/item/weapon/circuitboard/rcon_console
|
||||||
req_one_access = list(access_engine)
|
req_one_access = list(access_engine)
|
||||||
var/current_tag = null
|
var/current_tag = null
|
||||||
var/list/known_SMESs = null
|
var/obj/nano_module/rcon/rcon
|
||||||
var/list/known_breakers = null
|
|
||||||
// Allows you to hide specific parts of the UI
|
/obj/machinery/computer/rcon/New()
|
||||||
var/hide_SMES = 0
|
..()
|
||||||
var/hide_SMES_details = 0
|
rcon = new(src)
|
||||||
var/hide_breakers = 0
|
|
||||||
|
|
||||||
// Proc: attack_hand()
|
// Proc: attack_hand()
|
||||||
// Parameters: 1 (user - Person which clicked this computer)
|
// Parameters: 1 (user - Person which clicked this computer)
|
||||||
@@ -29,106 +28,5 @@
|
|||||||
// Proc: ui_interact()
|
// Proc: ui_interact()
|
||||||
// Parameters: 4 (standard NanoUI parameters)
|
// Parameters: 4 (standard NanoUI parameters)
|
||||||
// Description: Uses dark magic (NanoUI) to render this machine's UI
|
// Description: Uses dark magic (NanoUI) to render this machine's UI
|
||||||
/obj/machinery/computer/rcon/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
/obj/machinery/computer/rcon/ui_interact(mob/user, ui_key = "rcon", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||||
FindDevices() // Update our devices list
|
rcon.ui_interact(user, ui_key, ui, force_open)
|
||||||
var/data[0]
|
|
||||||
|
|
||||||
// SMES DATA (simplified view)
|
|
||||||
var/list/smeslist[0]
|
|
||||||
for(var/obj/machinery/power/smes/buildable/SMES in known_SMESs)
|
|
||||||
smeslist.Add(list(list(
|
|
||||||
"charge" = round(SMES.Percentage()),
|
|
||||||
"input_set" = SMES.input_attempt,
|
|
||||||
"input_val" = round(SMES.input_level),
|
|
||||||
"output_set" = SMES.output_attempt,
|
|
||||||
"output_val" = round(SMES.output_level),
|
|
||||||
"output_load" = round(SMES.output_used),
|
|
||||||
"RCON_tag" = SMES.RCon_tag
|
|
||||||
)))
|
|
||||||
|
|
||||||
data["smes_info"] = sortByKey(smeslist, "RCON_tag")
|
|
||||||
|
|
||||||
// BREAKER DATA (simplified view)
|
|
||||||
var/list/breakerlist[0]
|
|
||||||
for(var/obj/machinery/power/breakerbox/BR in known_breakers)
|
|
||||||
breakerlist.Add(list(list(
|
|
||||||
"RCON_tag" = BR.RCon_tag,
|
|
||||||
"enabled" = BR.on
|
|
||||||
)))
|
|
||||||
data["breaker_info"] = breakerlist
|
|
||||||
data["hide_smes"] = hide_SMES
|
|
||||||
data["hide_smes_details"] = hide_SMES_details
|
|
||||||
data["hide_breakers"] = hide_breakers
|
|
||||||
|
|
||||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
|
||||||
if (!ui)
|
|
||||||
ui = new(user, src, ui_key, "rcon.tmpl", "RCON Console", 600, 400)
|
|
||||||
ui.set_initial_data(data)
|
|
||||||
ui.open()
|
|
||||||
ui.set_auto_update(1)
|
|
||||||
|
|
||||||
// Proc: Topic()
|
|
||||||
// Parameters: 2 (href, href_list - allows us to process UI clicks)
|
|
||||||
// Description: Allows us to process UI clicks, which are relayed in form of hrefs.
|
|
||||||
/obj/machinery/computer/rcon/Topic(href, href_list)
|
|
||||||
if(href_list["smes_in_toggle"])
|
|
||||||
var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_in_toggle"])
|
|
||||||
if(SMES)
|
|
||||||
SMES.toggle_input()
|
|
||||||
if(href_list["smes_out_toggle"])
|
|
||||||
var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_out_toggle"])
|
|
||||||
if(SMES)
|
|
||||||
SMES.toggle_output()
|
|
||||||
if(href_list["smes_in_set"])
|
|
||||||
var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_in_set"])
|
|
||||||
if(SMES)
|
|
||||||
var/inputset = input(usr, "Enter new input level (0-[SMES.input_level_max])", "SMES Input Power Control") as num
|
|
||||||
SMES.set_input(inputset)
|
|
||||||
if(href_list["smes_out_set"])
|
|
||||||
var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_out_set"])
|
|
||||||
if(SMES)
|
|
||||||
var/outputset = input(usr, "Enter new output level (0-[SMES.output_level_max])", "SMES Input Power Control") as num
|
|
||||||
SMES.set_output(outputset)
|
|
||||||
|
|
||||||
if(href_list["toggle_breaker"])
|
|
||||||
var/obj/machinery/power/breakerbox/toggle = null
|
|
||||||
for(var/obj/machinery/power/breakerbox/breaker in known_breakers)
|
|
||||||
if(breaker.RCon_tag == href_list["toggle_breaker"])
|
|
||||||
toggle = breaker
|
|
||||||
if(toggle)
|
|
||||||
if(toggle.update_locked)
|
|
||||||
usr << "The breaker box was recently toggled. Please wait before toggling it again."
|
|
||||||
else
|
|
||||||
toggle.auto_toggle()
|
|
||||||
if(href_list["hide_smes"])
|
|
||||||
hide_SMES = !hide_SMES
|
|
||||||
if(href_list["hide_smes_details"])
|
|
||||||
hide_SMES_details = !hide_SMES_details
|
|
||||||
if(href_list["hide_breakers"])
|
|
||||||
hide_breakers = !hide_breakers
|
|
||||||
|
|
||||||
|
|
||||||
// Proc: GetSMESByTag()
|
|
||||||
// Parameters: 1 (tag - RCON tag of SMES we want to look up)
|
|
||||||
// Description: Looks up and returns SMES which has matching RCON tag
|
|
||||||
/obj/machinery/computer/rcon/proc/GetSMESByTag(var/tag)
|
|
||||||
if(!tag)
|
|
||||||
return
|
|
||||||
|
|
||||||
for(var/obj/machinery/power/smes/buildable/S in known_SMESs)
|
|
||||||
if(S.RCon_tag == tag)
|
|
||||||
return S
|
|
||||||
|
|
||||||
// Proc: FindDevices()
|
|
||||||
// Parameters: None
|
|
||||||
// Description: Refreshes local list of known devices.
|
|
||||||
/obj/machinery/computer/rcon/proc/FindDevices()
|
|
||||||
known_SMESs = new /list()
|
|
||||||
for(var/obj/machinery/power/smes/buildable/SMES in machines)
|
|
||||||
if(SMES.RCon_tag && (SMES.RCon_tag != "NO_TAG") && SMES.RCon)
|
|
||||||
known_SMESs.Add(SMES)
|
|
||||||
|
|
||||||
known_breakers = new /list()
|
|
||||||
for(var/obj/machinery/power/breakerbox/breaker in machines)
|
|
||||||
if(breaker.RCon_tag != "NO_TAG")
|
|
||||||
known_breakers.Add(breaker)
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/obj/machinery/computer/arcade
|
/obj/machinery/computer/arcade
|
||||||
name = "arcade machine"
|
name = "arcade machine"
|
||||||
desc = "Does not support Pin ball."
|
desc = "Does not support pinball."
|
||||||
icon = 'icons/obj/computer.dmi'
|
icon = 'icons/obj/computer.dmi'
|
||||||
icon_state = "arcade"
|
icon_state = "arcade"
|
||||||
circuit = "/obj/item/weapon/circuitboard/arcade"
|
circuit = "/obj/item/weapon/circuitboard/arcade"
|
||||||
@@ -32,7 +32,10 @@
|
|||||||
/obj/item/toy/prize/mauler = 1,
|
/obj/item/toy/prize/mauler = 1,
|
||||||
/obj/item/toy/prize/odysseus = 1,
|
/obj/item/toy/prize/odysseus = 1,
|
||||||
/obj/item/toy/prize/phazon = 1,
|
/obj/item/toy/prize/phazon = 1,
|
||||||
/obj/item/toy/waterflower = 1
|
/obj/item/toy/waterflower = 1,
|
||||||
|
/obj/item/toy/figure = 1,
|
||||||
|
/obj/random/plushie = 1,
|
||||||
|
/obj/item/toy/cultsword = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/machinery/computer/arcade
|
/obj/machinery/computer/arcade
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
density = 1
|
density = 1
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
|
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
|
||||||
var/obj/machinery/alarm/current
|
|
||||||
var/overridden = 0 //not set yet, can't think of a good way to do it
|
var/overridden = 0 //not set yet, can't think of a good way to do it
|
||||||
req_access = list(access_ce)
|
req_access = list(access_ce)
|
||||||
var/list/monitored_alarm_ids = null
|
var/list/monitored_alarm_ids = null
|
||||||
var/list/monitored_alarms = null
|
var/list/monitored_alarms = null
|
||||||
|
var/ui_ref
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/laptop
|
/obj/machinery/computer/atmoscontrol/laptop
|
||||||
name = "Atmospherics Laptop"
|
name = "Atmospherics Laptop"
|
||||||
@@ -32,36 +32,29 @@
|
|||||||
monitored_alarms = dd_sortedObjectList(monitored_alarms)
|
monitored_alarms = dd_sortedObjectList(monitored_alarms)
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
|
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
|
||||||
return interact(user)
|
return ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
|
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
return interact(user)
|
return ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/interact(mob/user)
|
/obj/machinery/computer/atmoscontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||||
user.set_machine(src)
|
var/data[0]
|
||||||
if(allowed(user))
|
var/alarms[0]
|
||||||
overridden = 1
|
|
||||||
else if(!emagged)
|
// TODO: Move these to a cache, similar to cameras
|
||||||
overridden = 0
|
for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : machines))
|
||||||
var/dat = "<a href='?src=\ref[src]&reset=1'>Main Menu</a><hr>"
|
alarms[++alarms.len] = list("name" = sanitize(alarm.name), "ref"= "\ref[alarm]", "danger" = max(alarm.danger_level, alarm.alarm_area.atmosalm))
|
||||||
if(monitored_alarms && monitored_alarms.len == 1)
|
data["alarms"] = alarms
|
||||||
current = monitored_alarms[1]
|
|
||||||
if(current)
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||||
dat += specific()
|
if(!ui)
|
||||||
else
|
ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 625, 625)
|
||||||
for(var/obj/machinery/alarm/alarm in monitored_alarms ? monitored_alarms : machines)
|
ui.set_initial_data(data)
|
||||||
dat += "<a href='?src=\ref[src]&alarm=\ref[alarm]'>"
|
ui.open()
|
||||||
switch(max(alarm.danger_level, alarm.alarm_area.atmosalm))
|
ui.set_auto_update(1)
|
||||||
if (0)
|
ui_ref = ui
|
||||||
dat += "<font color=green>"
|
|
||||||
if (1)
|
|
||||||
dat += "<font color=blue>"
|
|
||||||
if (2)
|
|
||||||
dat += "<font color=red>"
|
|
||||||
dat += "[sanitize(alarm.name)]</font></a><br/>"
|
|
||||||
user << browse(dat, "window=atmoscontrol")
|
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
/obj/machinery/computer/atmoscontrol/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||||
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
||||||
@@ -73,23 +66,33 @@
|
|||||||
return
|
return
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/computer/atmoscontrol/proc/specific()
|
|
||||||
if(!current)
|
|
||||||
return ""
|
|
||||||
var/dat = "<h3>[current.name]</h3><hr>"
|
|
||||||
dat += current.return_status()
|
|
||||||
if(current.remote_control || overridden)
|
|
||||||
dat += "<hr>[current.return_controls(src)]"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
//a bunch of this is copied from atmos alarms
|
//a bunch of this is copied from atmos alarms
|
||||||
/obj/machinery/computer/atmoscontrol/Topic(href, href_list)
|
/obj/machinery/computer/atmoscontrol/Topic(href, href_list)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return 1
|
||||||
if(href_list["reset"])
|
|
||||||
current = null
|
|
||||||
if(href_list["alarm"])
|
if(href_list["alarm"])
|
||||||
current = locate(href_list["alarm"])
|
if(ui_ref)
|
||||||
else if(current)
|
var/obj/machinery/alarm/alarm = locate(href_list["alarm"]) in (monitored_alarms ? monitored_alarms : machines)
|
||||||
current.Topic(href, href_list, 1, 1)
|
if(alarm)
|
||||||
interact(usr)
|
var/datum/topic_state/TS = generate_state(alarm)
|
||||||
|
alarm.ui_interact(usr, master_ui = ui_ref, custom_state = TS)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/machinery/computer/atmoscontrol/proc/generate_state(var/alarm)
|
||||||
|
var/datum/topic_state/air_alarm/state = new()
|
||||||
|
state.atmos_control = src
|
||||||
|
state.air_alarm = alarm
|
||||||
|
return state
|
||||||
|
|
||||||
|
/datum/topic_state/air_alarm
|
||||||
|
flags = NANO_IGNORE_DISTANCE
|
||||||
|
var/obj/machinery/computer/atmoscontrol/atmos_control = null
|
||||||
|
var/obj/machinery/alarm/air_alarm = null
|
||||||
|
|
||||||
|
/datum/topic_state/air_alarm/href_list(var/mob/user)
|
||||||
|
var/list/extra_href = list()
|
||||||
|
extra_href["remote_connection"] = 1
|
||||||
|
extra_href["remote_access"] = user && (atmos_control.allowed(user) || atmos_control.emagged || air_alarm.rcon_setting == RCON_YES || (air_alarm.alarm_area.atmosalm && air_alarm.rcon_setting == RCON_AUTO))
|
||||||
|
|
||||||
|
return extra_href
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
if(message_cooldown)
|
if(message_cooldown)
|
||||||
usr << "Please allow at least one minute to pass between announcements"
|
usr << "Please allow at least one minute to pass between announcements"
|
||||||
return
|
return
|
||||||
var/input = stripped_input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
||||||
if(!input || !(usr in view(1,src)))
|
if(!input || !(usr in view(1,src)))
|
||||||
return
|
return
|
||||||
crew_announcement.Announce(input)
|
crew_announcement.Announce(input)
|
||||||
|
|||||||
@@ -6,11 +6,10 @@
|
|||||||
idle_power_usage = 250
|
idle_power_usage = 250
|
||||||
active_power_usage = 500
|
active_power_usage = 500
|
||||||
circuit = "/obj/item/weapon/circuitboard/crew"
|
circuit = "/obj/item/weapon/circuitboard/crew"
|
||||||
var/list/tracked = list( )
|
var/obj/nano_module/crew_monitor/crew_monitor
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/crew/New()
|
/obj/machinery/computer/crew/New()
|
||||||
tracked = list()
|
crew_monitor = new(src)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
@@ -25,6 +24,8 @@
|
|||||||
return
|
return
|
||||||
ui_interact(user)
|
ui_interact(user)
|
||||||
|
|
||||||
|
/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||||
|
crew_monitor.ui_interact(user, ui_key, ui, force_open)
|
||||||
|
|
||||||
/obj/machinery/computer/crew/update_icon()
|
/obj/machinery/computer/crew/update_icon()
|
||||||
|
|
||||||
@@ -38,90 +39,5 @@
|
|||||||
icon_state = initial(icon_state)
|
icon_state = initial(icon_state)
|
||||||
stat &= ~NOPOWER
|
stat &= ~NOPOWER
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/crew/Topic(href, href_list)
|
|
||||||
if(..()) return
|
|
||||||
if (src.z > 6)
|
|
||||||
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
|
||||||
return 0
|
|
||||||
if( href_list["close"] )
|
|
||||||
var/mob/user = usr
|
|
||||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
|
||||||
usr.unset_machine()
|
|
||||||
ui.close()
|
|
||||||
return 0
|
|
||||||
if(href_list["update"])
|
|
||||||
src.updateDialog()
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/machinery/computer/crew/interact(mob/user)
|
/obj/machinery/computer/crew/interact(mob/user)
|
||||||
ui_interact(user)
|
crew_monitor.ui_interact(user)
|
||||||
|
|
||||||
/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
|
||||||
if(stat & (BROKEN|NOPOWER))
|
|
||||||
return
|
|
||||||
user.set_machine(src)
|
|
||||||
src.scan()
|
|
||||||
|
|
||||||
var/data[0]
|
|
||||||
var/list/crewmembers = list()
|
|
||||||
|
|
||||||
for(var/obj/item/clothing/under/C in src.tracked)
|
|
||||||
|
|
||||||
|
|
||||||
var/turf/pos = get_turf(C)
|
|
||||||
|
|
||||||
if((C) && (C.has_sensor) && (pos) && (pos.z == src.z) && C.sensor_mode)
|
|
||||||
if(istype(C.loc, /mob/living/carbon/human))
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = C.loc
|
|
||||||
if(H.w_uniform != C)
|
|
||||||
continue
|
|
||||||
|
|
||||||
var/list/crewmemberData = list()
|
|
||||||
|
|
||||||
crewmemberData["sensor_type"] = C.sensor_mode
|
|
||||||
crewmemberData["dead"] = H.stat > 1
|
|
||||||
crewmemberData["oxy"] = round(H.getOxyLoss(), 1)
|
|
||||||
crewmemberData["tox"] = round(H.getToxLoss(), 1)
|
|
||||||
crewmemberData["fire"] = round(H.getFireLoss(), 1)
|
|
||||||
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
|
|
||||||
|
|
||||||
crewmemberData["name"] = H.get_authentification_name(if_no_id="Unknown")
|
|
||||||
crewmemberData["rank"] = H.get_authentification_rank(if_no_id="Unknown", if_no_job="No Job")
|
|
||||||
crewmemberData["assignment"] = H.get_assignment(if_no_id="Unknown", if_no_job="No Job")
|
|
||||||
|
|
||||||
var/area/A = get_area(H)
|
|
||||||
crewmemberData["area"] = sanitize(A.name)
|
|
||||||
crewmemberData["x"] = pos.x
|
|
||||||
crewmemberData["y"] = pos.y
|
|
||||||
|
|
||||||
crewmembers[++crewmembers.len] = crewmemberData
|
|
||||||
|
|
||||||
crewmembers = sortByKey(crewmembers, "name")
|
|
||||||
|
|
||||||
data["crewmembers"] = crewmembers
|
|
||||||
|
|
||||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
|
||||||
if(!ui)
|
|
||||||
ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800)
|
|
||||||
|
|
||||||
// adding a template with the key "mapContent" enables the map ui functionality
|
|
||||||
ui.add_template("mapContent", "crew_monitor_map_content.tmpl")
|
|
||||||
// adding a template with the key "mapHeader" replaces the map header content
|
|
||||||
ui.add_template("mapHeader", "crew_monitor_map_header.tmpl")
|
|
||||||
|
|
||||||
ui.set_initial_data(data)
|
|
||||||
ui.open()
|
|
||||||
|
|
||||||
// should make the UI auto-update; doesn't seem to?
|
|
||||||
ui.set_auto_update(1)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/crew/proc/scan()
|
|
||||||
for(var/mob/living/carbon/human/H in mob_list)
|
|
||||||
if(istype(H.w_uniform, /obj/item/clothing/under))
|
|
||||||
var/obj/item/clothing/under/C = H.w_uniform
|
|
||||||
if (C.has_sensor)
|
|
||||||
tracked |= C
|
|
||||||
return 1
|
|
||||||
|
|||||||
@@ -1,109 +0,0 @@
|
|||||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
|
||||||
|
|
||||||
/obj/machinery/computer/hologram_comp
|
|
||||||
name = "hologram computer"
|
|
||||||
desc = "Rumoured to control holograms."
|
|
||||||
icon = 'icons/obj/stationobjs.dmi'
|
|
||||||
icon_state = "holo_console0"
|
|
||||||
var/obj/machinery/hologram/projector/projector = null
|
|
||||||
var/temp = null
|
|
||||||
var/lumens = 0.0
|
|
||||||
var/h_r = 245.0
|
|
||||||
var/h_g = 245.0
|
|
||||||
var/h_b = 245.0
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/hologram_comp/New()
|
|
||||||
..()
|
|
||||||
spawn( 10 )
|
|
||||||
src.projector = locate(/obj/machinery/hologram/projector, get_step(src.loc, NORTH))
|
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/hologram_comp/DblClick()
|
|
||||||
if (!in_range(src, usr))
|
|
||||||
return 0
|
|
||||||
src.show_console(usr)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/hologram_comp/proc/render()
|
|
||||||
var/icon/I = new /icon('icons/mob/human.dmi', "body_m_s")
|
|
||||||
|
|
||||||
if (src.lumens >= 0)
|
|
||||||
I.Blend(rgb(src.lumens, src.lumens, src.lumens), ICON_ADD)
|
|
||||||
else
|
|
||||||
I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), ICON_SUBTRACT)
|
|
||||||
|
|
||||||
I.Blend(new /icon('icons/mob/human.dmi', "mouth_m_s"), ICON_OVERLAY)
|
|
||||||
I.Blend(new /icon('icons/mob/human.dmi', "underwear1_m_s"), ICON_OVERLAY)
|
|
||||||
|
|
||||||
var/icon/U = new /icon('icons/mob/human_face.dmi', "hair_a_s")
|
|
||||||
U.Blend(rgb(src.h_r, src.h_g, src.h_b), ICON_ADD)
|
|
||||||
|
|
||||||
I.Blend(U, ICON_OVERLAY)
|
|
||||||
|
|
||||||
src.projector.hologram.icon = I
|
|
||||||
|
|
||||||
/obj/machinery/computer/hologram_comp/proc/show_console(var/mob/user as mob)
|
|
||||||
var/dat
|
|
||||||
user.set_machine(src)
|
|
||||||
if (src.temp)
|
|
||||||
dat = text("[]<BR><BR><A href='?src=\ref[];temp=1'>Clear</A>", src.temp, src)
|
|
||||||
else
|
|
||||||
dat = text("<B>Hologram Status:</B><HR>\nPower: <A href='?src=\ref[];power=1'>[]</A><HR>\n<B>Hologram Control:</B><BR>\nColor Luminosity: []/220 <A href='?src=\ref[];reset=1'>\[Reset\]</A><BR>\nLighten: <A href='?src=\ref[];light=1'>1</A> <A href='?src=\ref[];light=10'>10</A><BR>\nDarken: <A href='?src=\ref[];light=-1'>1</A> <A href='?src=\ref[];light=-10'>10</A><BR>\n<BR>\nHair Color: ([],[],[]) <A href='?src=\ref[];h_reset=1'>\[Reset\]</A><BR>\nRed (0-255): <A href='?src=\ref[];h_r=-300'>\[0\]</A> <A href='?src=\ref[];h_r=-10'>-10</A> <A href='?src=\ref[];h_r=-1'>-1</A> [] <A href='?src=\ref[];h_r=1'>1</A> <A href='?src=\ref[];h_r=10'>10</A> <A href='?src=\ref[];h_r=300'>\[255\]</A><BR>\nGreen (0-255): <A href='?src=\ref[];h_g=-300'>\[0\]</A> <A href='?src=\ref[];h_g=-10'>-10</A> <A href='?src=\ref[];h_g=-1'>-1</A> [] <A href='?src=\ref[];h_g=1'>1</A> <A href='?src=\ref[];h_g=10'>10</A> <A href='?src=\ref[];h_g=300'>\[255\]</A><BR>\nBlue (0-255): <A href='?src=\ref[];h_b=-300'>\[0\]</A> <A href='?src=\ref[];h_b=-10'>-10</A> <A href='?src=\ref[];h_b=-1'>-1</A> [] <A href='?src=\ref[];h_b=1'>1</A> <A href='?src=\ref[];h_b=10'>10</A> <A href='?src=\ref[];h_b=300'>\[255\]</A><BR>", src, (src.projector.hologram ? "On" : "Off"), -src.lumens + 35, src, src, src, src, src, src.h_r, src.h_g, src.h_b, src, src, src, src, src.h_r, src, src, src, src, src, src, src.h_g, src, src, src, src, src, src, src.h_b, src, src, src)
|
|
||||||
user << browse(dat, "window=hologram_console")
|
|
||||||
onclose(user, "hologram_console")
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/computer/hologram_comp/Topic(href, href_list)
|
|
||||||
if(..())
|
|
||||||
return
|
|
||||||
if (in_range(src, usr))
|
|
||||||
flick("holo_console1", src)
|
|
||||||
if (href_list["power"])
|
|
||||||
if (src.projector.hologram)
|
|
||||||
src.projector.icon_state = "hologram0"
|
|
||||||
//src.projector.hologram = null
|
|
||||||
del(src.projector.hologram)
|
|
||||||
else
|
|
||||||
src.projector.hologram = new(src.projector.loc)
|
|
||||||
src.projector.hologram.icon = 'icons/mob/human.dmi'
|
|
||||||
src.projector.hologram.icon_state = "body_m_s"
|
|
||||||
src.projector.icon_state = "hologram1"
|
|
||||||
src.render()
|
|
||||||
else
|
|
||||||
if (href_list["h_r"])
|
|
||||||
if (src.projector.hologram)
|
|
||||||
src.h_r += text2num(href_list["h_r"])
|
|
||||||
src.h_r = min(max(src.h_r, 0), 255)
|
|
||||||
render()
|
|
||||||
else
|
|
||||||
if (href_list["h_g"])
|
|
||||||
if (src.projector.hologram)
|
|
||||||
src.h_g += text2num(href_list["h_g"])
|
|
||||||
src.h_g = min(max(src.h_g, 0), 255)
|
|
||||||
render()
|
|
||||||
else
|
|
||||||
if (href_list["h_b"])
|
|
||||||
if (src.projector.hologram)
|
|
||||||
src.h_b += text2num(href_list["h_b"])
|
|
||||||
src.h_b = min(max(src.h_b, 0), 255)
|
|
||||||
render()
|
|
||||||
else
|
|
||||||
if (href_list["light"])
|
|
||||||
if (src.projector.hologram)
|
|
||||||
src.lumens += text2num(href_list["light"])
|
|
||||||
src.lumens = min(max(src.lumens, -185.0), 35)
|
|
||||||
render()
|
|
||||||
else
|
|
||||||
if (href_list["reset"])
|
|
||||||
if (src.projector.hologram)
|
|
||||||
src.lumens = 0
|
|
||||||
render()
|
|
||||||
else
|
|
||||||
if (href_list["temp"])
|
|
||||||
src.temp = null
|
|
||||||
for(var/mob/M in viewers(1, src))
|
|
||||||
if ((M.client && M.machine == src))
|
|
||||||
src.show_console(M)
|
|
||||||
return
|
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
if(message_cooldown)
|
if(message_cooldown)
|
||||||
usr << "Please allow at least one minute to pass between announcements"
|
usr << "Please allow at least one minute to pass between announcements"
|
||||||
return
|
return
|
||||||
var/input = stripped_input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
||||||
if(!input || !interactable())
|
if(!input || !interactable())
|
||||||
return
|
return
|
||||||
crew_announcement.Announce(input)
|
crew_announcement.Announce(input)
|
||||||
|
|||||||
@@ -94,6 +94,10 @@
|
|||||||
secured_wires = 1
|
secured_wires = 1
|
||||||
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites.
|
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites.
|
||||||
|
|
||||||
|
/obj/machinery/door/airlock/vault/bolted
|
||||||
|
icon_state = "door_locked"
|
||||||
|
locked = 1
|
||||||
|
|
||||||
/obj/machinery/door/airlock/freezer
|
/obj/machinery/door/airlock/freezer
|
||||||
name = "Freezer Airlock"
|
name = "Freezer Airlock"
|
||||||
icon = 'icons/obj/doors/Doorfreezer.dmi'
|
icon = 'icons/obj/doors/Doorfreezer.dmi'
|
||||||
@@ -1002,7 +1006,7 @@ About the new airlock wires panel:
|
|||||||
if(operating || welded || locked)
|
if(operating || welded || locked)
|
||||||
return
|
return
|
||||||
if(!forced)
|
if(!forced)
|
||||||
//despite the name, this wire is for general door control.
|
//despite the name, this wire is for general door control.
|
||||||
//Bolts are already covered by the check for locked, above
|
//Bolts are already covered by the check for locked, above
|
||||||
if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
|
if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -23,6 +23,10 @@
|
|||||||
var/id = 1.0
|
var/id = 1.0
|
||||||
dir = 1
|
dir = 1
|
||||||
explosion_resistance = 25
|
explosion_resistance = 25
|
||||||
|
|
||||||
|
//Most blast doors are infrequently toggled and sometimes used with regular doors anyways,
|
||||||
|
//turning this off prevents awkward zone geometry in places like medbay lobby, for example.
|
||||||
|
block_air_zones = 0
|
||||||
|
|
||||||
// Proc: Bumped()
|
// Proc: Bumped()
|
||||||
// Parameters: 1 (AM - Atom that tried to walk through this object)
|
// Parameters: 1 (AM - Atom that tried to walk through this object)
|
||||||
@@ -150,6 +154,13 @@
|
|||||||
if(stat & BROKEN)
|
if(stat & BROKEN)
|
||||||
stat &= ~BROKEN
|
stat &= ~BROKEN
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/door/blast/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||||
|
if(air_group) return 1
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// SUBTYPE: Regular
|
// SUBTYPE: Regular
|
||||||
// Your classical blast door, found almost everywhere.
|
// Your classical blast door, found almost everywhere.
|
||||||
obj/machinery/door/blast/regular
|
obj/machinery/door/blast/regular
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
|
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
|
||||||
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
|
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
|
||||||
var/obj/item/stack/sheet/metal/repairing
|
var/obj/item/stack/sheet/metal/repairing
|
||||||
|
var/block_air_zones = 1 //If set, air zones cannot merge across the door even when it is opened.
|
||||||
|
|
||||||
//Multi-tile doors
|
//Multi-tile doors
|
||||||
dir = EAST
|
dir = EAST
|
||||||
@@ -102,8 +103,8 @@
|
|||||||
else
|
else
|
||||||
flick("door_deny", src)
|
flick("door_deny", src)
|
||||||
return
|
return
|
||||||
if(istype(AM, /obj/structure/stool/bed/chair/wheelchair))
|
if(istype(AM, /obj/structure/bed/chair/wheelchair))
|
||||||
var/obj/structure/stool/bed/chair/wheelchair/wheel = AM
|
var/obj/structure/bed/chair/wheelchair/wheel = AM
|
||||||
if(density)
|
if(density)
|
||||||
if(wheel.pulling && (src.allowed(wheel.pulling)))
|
if(wheel.pulling && (src.allowed(wheel.pulling)))
|
||||||
open()
|
open()
|
||||||
@@ -114,7 +115,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||||
if(air_group) return 0
|
if(air_group) return !block_air_zones
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
return !opacity
|
return !opacity
|
||||||
return !density
|
return !density
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
open_layer = DOOR_OPEN_LAYER - 0.01 // Just below doors when open
|
open_layer = DOOR_OPEN_LAYER - 0.01 // Just below doors when open
|
||||||
closed_layer = DOOR_CLOSED_LAYER + 0.01 // Just above doors when closed
|
closed_layer = DOOR_CLOSED_LAYER + 0.01 // Just above doors when closed
|
||||||
|
|
||||||
|
//These are frequenly used with windows, so make sure zones can pass.
|
||||||
|
//Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it.
|
||||||
|
block_air_zones = 0
|
||||||
|
|
||||||
var/blocked = 0
|
var/blocked = 0
|
||||||
var/lockdown = 0 // When the door has detected a problem, it locks.
|
var/lockdown = 0 // When the door has detected a problem, it locks.
|
||||||
var/pdiff_alert = 0
|
var/pdiff_alert = 0
|
||||||
@@ -381,9 +385,9 @@
|
|||||||
overlays += "welded_open"
|
overlays += "welded_open"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//These are playing merry hell on ZAS. Sorry fellas :(
|
||||||
|
|
||||||
/obj/machinery/door/firedoor/border_only
|
/obj/machinery/door/firedoor/border_only
|
||||||
//These are playing merry hell on ZAS. Sorry fellas :(
|
|
||||||
/*
|
/*
|
||||||
icon = 'icons/obj/doors/edge_Doorfire.dmi'
|
icon = 'icons/obj/doors/edge_Doorfire.dmi'
|
||||||
glass = 1 //There is a glass window so you can see through the door
|
glass = 1 //There is a glass window so you can see through the door
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
program.process()
|
program.process()
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
src.updateDialog()
|
|
||||||
|
|
||||||
/obj/machinery/embedded_controller/attack_ai(mob/user as mob)
|
/obj/machinery/embedded_controller/attack_ai(mob/user as mob)
|
||||||
src.ui_interact(user)
|
src.ui_interact(user)
|
||||||
|
|||||||
@@ -24,10 +24,12 @@ Possible to do for anyone motivated enough:
|
|||||||
* Holopad
|
* Holopad
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// HOLOPAD MODE
|
#define HOLOPAD_PASSIVE_POWER_USAGE 1
|
||||||
// 0 = RANGE BASED
|
#define HOLOGRAM_POWER_USAGE 2
|
||||||
// 1 = AREA BASED
|
#define RANGE_BASED 4
|
||||||
var/const/HOLOPAD_MODE = 0
|
#define AREA_BASED 6
|
||||||
|
|
||||||
|
var/const/HOLOPAD_MODE = RANGE_BASED
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad
|
/obj/machinery/hologram/holopad
|
||||||
name = "\improper AI holopad"
|
name = "\improper AI holopad"
|
||||||
@@ -36,7 +38,7 @@ var/const/HOLOPAD_MODE = 0
|
|||||||
|
|
||||||
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
|
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
|
||||||
|
|
||||||
var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
|
var/list/mob/living/silicon/ai/masters = new() //List of AIs that use the holopad
|
||||||
var/last_request = 0 //to prevent request spam. ~Carn
|
var/last_request = 0 //to prevent request spam. ~Carn
|
||||||
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
|
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
|
||||||
|
|
||||||
@@ -62,52 +64,53 @@ var/const/HOLOPAD_MODE = 0
|
|||||||
This may change in the future but for now will suffice.*/
|
This may change in the future but for now will suffice.*/
|
||||||
if(user.eyeobj.loc != src.loc)//Set client eye on the object if it's not already.
|
if(user.eyeobj.loc != src.loc)//Set client eye on the object if it's not already.
|
||||||
user.eyeobj.setLoc(get_turf(src))
|
user.eyeobj.setLoc(get_turf(src))
|
||||||
else if(!hologram)//If there is no hologram, possibly make one.
|
else if(!masters[user])//If there is no hologram, possibly make one.
|
||||||
activate_holo(user)
|
activate_holo(user)
|
||||||
else if(master==user)//If there is a hologram, remove it. But only if the user is the master. Otherwise do nothing.
|
else//If there is a hologram, remove it.
|
||||||
clear_holo()
|
clear_holo(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user)
|
/obj/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user)
|
||||||
if(!(stat & NOPOWER) && user.eyeobj.loc == src.loc)//If the projector has power and client eye is on it.
|
if(!(stat & NOPOWER) && user.eyeobj.loc == src.loc)//If the projector has power and client eye is on it
|
||||||
if(!hologram)//If there is not already a hologram.
|
if (user.holo)
|
||||||
create_holo(user)//Create one.
|
user << "<span class='danger'>ERROR:</span> Image feed in progress."
|
||||||
src.visible_message("A holographic image of [user] flicks to life right before your eyes!")
|
return
|
||||||
else
|
create_holo(user)//Create one.
|
||||||
user << "\red ERROR: \black Image feed in progress."
|
src.visible_message("A holographic image of [user] flicks to life right before your eyes!")
|
||||||
else
|
else
|
||||||
user << "\red ERROR: \black Unable to project hologram."
|
user << "<span class='danger'>ERROR:</span> Unable to project hologram."
|
||||||
return
|
return
|
||||||
|
|
||||||
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
|
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
|
||||||
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||||
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb, datum/language/speaking)
|
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb, datum/language/speaking)
|
||||||
if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something.
|
if(M)
|
||||||
if(!master.say_understands(M, speaking))//The AI will be able to understand most mobs talking through the holopad.
|
for(var/mob/living/silicon/ai/master in masters)
|
||||||
|
if(!master.say_understands(M, speaking))//The AI will be able to understand most mobs talking through the holopad.
|
||||||
|
if(speaking)
|
||||||
|
text = speaking.scramble(text)
|
||||||
|
else
|
||||||
|
text = stars(text)
|
||||||
|
var/name_used = M.GetVoice()
|
||||||
|
//This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
|
||||||
|
var/rendered
|
||||||
if(speaking)
|
if(speaking)
|
||||||
text = speaking.scramble(text)
|
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [speaking.format_message(text, verb)]</span></i>"
|
||||||
else
|
else
|
||||||
text = stars(text)
|
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span></i>"
|
||||||
var/name_used = M.GetVoice()
|
master.show_message(rendered, 2)
|
||||||
//This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
|
|
||||||
var/rendered
|
|
||||||
if(speaking)
|
|
||||||
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [speaking.format_message(text, verb)]</span></i>"
|
|
||||||
else
|
|
||||||
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span></i>"
|
|
||||||
master.show_message(rendered, 2)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad/see_emote(mob/living/M, text)
|
/obj/machinery/hologram/holopad/see_emote(mob/living/M, text)
|
||||||
if(M && hologram && master)
|
if(M)
|
||||||
//var/name_used = M.GetVoice()
|
for(var/mob/living/silicon/ai/master in masters)
|
||||||
var/rendered = "<i><span class='game say'>Holopad received, <span class='message'>[text]</span></span></i>"
|
//var/name_used = M.GetVoice()
|
||||||
//The lack of name_used is needed, because message already contains a name. This is needed for simple mobs to emote properly.
|
var/rendered = "<i><span class='game say'>Holopad received, <span class='message'>[text]</span></span></i>"
|
||||||
master.show_message(rendered, 2)
|
//The lack of name_used is needed, because message already contains a name. This is needed for simple mobs to emote properly.
|
||||||
|
master.show_message(rendered, 2)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad/proc/create_holo(mob/living/silicon/ai/A, turf/T = loc)
|
/obj/machinery/hologram/holopad/proc/create_holo(mob/living/silicon/ai/A, turf/T = loc)
|
||||||
hologram = new(T)//Spawn a blank effect at the location.
|
var/obj/effect/overlay/hologram = new(T)//Spawn a blank effect at the location.
|
||||||
hologram.icon = A.holo_icon
|
hologram.icon = A.holo_icon
|
||||||
hologram.mouse_opacity = 0//So you can't click on it.
|
hologram.mouse_opacity = 0//So you can't click on it.
|
||||||
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||||
@@ -115,32 +118,33 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
|
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
|
||||||
hologram.SetLuminosity(2) //hologram lighting
|
hologram.SetLuminosity(2) //hologram lighting
|
||||||
hologram.color = color //painted holopad gives coloured holograms
|
hologram.color = color //painted holopad gives coloured holograms
|
||||||
|
masters[A] = hologram
|
||||||
SetLuminosity(2) //pad lighting
|
SetLuminosity(2) //pad lighting
|
||||||
icon_state = "holopad1"
|
icon_state = "holopad1"
|
||||||
A.holo = src
|
A.holo = src
|
||||||
master = A//AI is the master.
|
use_power += HOLOGRAM_POWER_USAGE
|
||||||
use_power = 2//Active power usage.
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad/proc/clear_holo()
|
/obj/machinery/hologram/holopad/proc/clear_holo(mob/living/silicon/ai/user)
|
||||||
// hologram.SetLuminosity(0)//Clear lighting. //handled by the lighting controller when its ower is deleted
|
if(user.holo == src)
|
||||||
del(hologram)//Get rid of hologram.
|
user.holo = null
|
||||||
if(master.holo == src)
|
del(masters[user])//Get rid of user's hologram //qdel
|
||||||
master.holo = null
|
masters -= user //Discard AI from the list of those who use holopad
|
||||||
master = null//Null the master, since no-one is using it now.
|
use_power = max(HOLOPAD_PASSIVE_POWER_USAGE, use_power - HOLOGRAM_POWER_USAGE)//Reduce power usage
|
||||||
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
|
if (!masters.len)//If no users left
|
||||||
icon_state = "holopad0"
|
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
|
||||||
use_power = 1//Passive power usage.
|
icon_state = "holopad0"
|
||||||
|
use_power = HOLOPAD_PASSIVE_POWER_USAGE
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad/process()
|
/obj/machinery/hologram/holopad/process()
|
||||||
if(hologram)//If there is a hologram.
|
for (var/mob/living/silicon/ai/master in masters)
|
||||||
if(master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
|
if(master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
|
||||||
if(!(stat & NOPOWER))//If the machine has power.
|
if(!(stat & NOPOWER))//If the machine has power.
|
||||||
if((HOLOPAD_MODE == 0 && (get_dist(master.eyeobj, src) <= holo_range)))
|
if((HOLOPAD_MODE == RANGE_BASED && (get_dist(master.eyeobj, src) <= holo_range)))
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
else if (HOLOPAD_MODE == 1)
|
else if (HOLOPAD_MODE == AREA_BASED)
|
||||||
|
|
||||||
var/area/holo_area = get_area(src)
|
var/area/holo_area = get_area(src)
|
||||||
var/area/eye_area = get_area(master.eyeobj)
|
var/area/eye_area = get_area(master.eyeobj)
|
||||||
@@ -148,14 +152,15 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
if(eye_area in holo_area.master.related)
|
if(eye_area in holo_area.master.related)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
clear_holo()//If not, we want to get rid of the hologram.
|
clear_holo(master)//If not, we want to get rid of the hologram.
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad/proc/move_hologram()
|
/obj/machinery/hologram/holopad/proc/move_hologram(mob/living/silicon/ai/user)
|
||||||
if(hologram)
|
if(masters[user])
|
||||||
step_to(hologram, master.eyeobj) // So it turns.
|
step_to(masters[user], user.eyeobj) // So it turns.
|
||||||
hologram.loc = get_turf(master.eyeobj)
|
var/obj/effect/overlay/H = masters[user]
|
||||||
|
H.loc = get_turf(user.eyeobj)
|
||||||
|
masters[user] = H
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -167,7 +172,6 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 5
|
idle_power_usage = 5
|
||||||
active_power_usage = 100
|
active_power_usage = 100
|
||||||
var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
|
|
||||||
|
|
||||||
//Destruction procs.
|
//Destruction procs.
|
||||||
/obj/machinery/hologram/ex_act(severity)
|
/obj/machinery/hologram/ex_act(severity)
|
||||||
@@ -190,9 +194,9 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/hologram/Del()
|
/obj/machinery/hologram/holopad/Del()
|
||||||
if(hologram)
|
for (var/mob/living/silicon/ai/master in masters)
|
||||||
src:clear_holo()
|
clear_holo(master)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -224,3 +228,9 @@ Holographic project of everything else.
|
|||||||
desc = "It makes a hologram appear...with magnets or something..."
|
desc = "It makes a hologram appear...with magnets or something..."
|
||||||
icon = 'icons/obj/stationobjs.dmi'
|
icon = 'icons/obj/stationobjs.dmi'
|
||||||
icon_state = "hologram0"
|
icon_state = "hologram0"
|
||||||
|
|
||||||
|
|
||||||
|
#undef RANGE_BASED
|
||||||
|
#undef AREA_BASED
|
||||||
|
#undef HOLOPAD_PASSIVE_POWER_USAGE
|
||||||
|
#undef HOLOGRAM_POWER_USAGE
|
||||||
|
|||||||
@@ -182,13 +182,18 @@ Class Procs:
|
|||||||
/obj/machinery/proc/inoperable(var/additional_flags = 0)
|
/obj/machinery/proc/inoperable(var/additional_flags = 0)
|
||||||
return (stat & (NOPOWER|BROKEN|additional_flags))
|
return (stat & (NOPOWER|BROKEN|additional_flags))
|
||||||
|
|
||||||
|
/obj/machinery/CanUseTopic(var/mob/user, var/be_close)
|
||||||
|
if(!interact_offline && (stat & (NOPOWER|BROKEN)))
|
||||||
|
return STATUS_CLOSE
|
||||||
|
|
||||||
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
|
return ..()
|
||||||
if(..())
|
|
||||||
return 1
|
/obj/machinery/CouldUseTopic(var/mob/user)
|
||||||
if(!interact_offline && stat & (NOPOWER|BROKEN))
|
..()
|
||||||
return 1
|
user.set_machine(src)
|
||||||
return 0
|
|
||||||
|
/obj/machinery/CouldNotUseTopic(var/mob/user)
|
||||||
|
usr.unset_machine()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
/obj/machinery/porta_turret/tag
|
/obj/machinery/porta_turret/tag
|
||||||
// Reasonable defaults, in case someone manually spawns us
|
// Reasonable defaults, in case someone manually spawns us
|
||||||
var/lasercolor = "r" //Something to do with lasertag turrets, blame Sieve for not adding a comment.
|
var/lasercolor = "r" //Something to do with lasertag turrets, blame Sieve for not adding a comment.
|
||||||
installation = /obj/item/weapon/gun/energy/laser/redtag
|
installation = /obj/item/weapon/gun/energy/lasertag/red
|
||||||
|
|
||||||
/obj/machinery/porta_turret/tag/red
|
/obj/machinery/porta_turret/tag/red
|
||||||
|
|
||||||
/obj/machinery/porta_turret/tag/blue
|
/obj/machinery/porta_turret/tag/blue
|
||||||
lasercolor = "b"
|
lasercolor = "b"
|
||||||
installation = /obj/item/weapon/gun/energy/laser/bluetag
|
installation = /obj/item/weapon/gun/energy/lasertag/blue
|
||||||
|
|
||||||
/obj/machinery/porta_turret/tag/New()
|
/obj/machinery/porta_turret/tag/New()
|
||||||
..()
|
..()
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
/obj/machinery/porta_turret/tag/weapon_setup(var/obj/item/weapon/gun/energy/E)
|
/obj/machinery/porta_turret/tag/weapon_setup(var/obj/item/weapon/gun/energy/E)
|
||||||
switch(E.type)
|
switch(E.type)
|
||||||
if(/obj/item/weapon/gun/energy/laser/bluetag)
|
if(/obj/item/weapon/gun/energy/lasertag/blue)
|
||||||
eprojectile = /obj/item/weapon/gun/energy/laser/bluetag
|
eprojectile = /obj/item/weapon/gun/energy/lasertag/blue
|
||||||
lasercolor = "b"
|
lasercolor = "b"
|
||||||
req_access = list(access_maint_tunnels, access_theatre)
|
req_access = list(access_maint_tunnels, access_theatre)
|
||||||
check_arrest = 0
|
check_arrest = 0
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
check_anomalies = 0
|
check_anomalies = 0
|
||||||
shot_delay = 30
|
shot_delay = 30
|
||||||
|
|
||||||
if(/obj/item/weapon/gun/energy/laser/redtag)
|
if(/obj/item/weapon/gun/energy/lasertag/red)
|
||||||
eprojectile = /obj/item/weapon/gun/energy/laser/redtag
|
eprojectile = /obj/item/weapon/gun/energy/lasertag/red
|
||||||
lasercolor = "r"
|
lasercolor = "r"
|
||||||
req_access = list(access_maint_tunnels, access_theatre)
|
req_access = list(access_maint_tunnels, access_theatre)
|
||||||
check_arrest = 0
|
check_arrest = 0
|
||||||
@@ -86,13 +86,13 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
if(lasercolor == "b" && disabled == 0)
|
if(lasercolor == "b" && disabled == 0)
|
||||||
if(istype(Proj, /obj/item/weapon/gun/energy/laser/redtag))
|
if(istype(Proj, /obj/item/weapon/gun/energy/lasertag/red))
|
||||||
disabled = 1
|
disabled = 1
|
||||||
del(Proj) // qdel
|
del(Proj) // qdel
|
||||||
sleep(100)
|
sleep(100)
|
||||||
disabled = 0
|
disabled = 0
|
||||||
if(lasercolor == "r" && disabled == 0)
|
if(lasercolor == "r" && disabled == 0)
|
||||||
if(istype(Proj, /obj/item/weapon/gun/energy/laser/bluetag))
|
if(istype(Proj, /obj/item/weapon/gun/energy/lasertag/blue))
|
||||||
disabled = 1
|
disabled = 1
|
||||||
del(Proj) // qdel
|
del(Proj) // qdel
|
||||||
sleep(100)
|
sleep(100)
|
||||||
@@ -110,10 +110,10 @@
|
|||||||
switch(lasercolor)
|
switch(lasercolor)
|
||||||
if("b")
|
if("b")
|
||||||
target_suit = /obj/item/clothing/suit/redtag
|
target_suit = /obj/item/clothing/suit/redtag
|
||||||
target_weapon = /obj/item/weapon/gun/energy/laser/redtag
|
target_weapon = /obj/item/weapon/gun/energy/lasertag/red
|
||||||
if("r")
|
if("r")
|
||||||
target_suit = /obj/item/clothing/suit/bluetag
|
target_suit = /obj/item/clothing/suit/bluetag
|
||||||
target_weapon = /obj/item/weapon/gun/energy/laser/bluetag
|
target_weapon = /obj/item/weapon/gun/energy/lasertag/blue
|
||||||
|
|
||||||
|
|
||||||
if(target_suit)//Lasertag turrets target the opposing team, how great is that? -Sieve
|
if(target_suit)//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||||
|
|||||||
@@ -297,7 +297,7 @@
|
|||||||
|
|
||||||
else if((istype(I, /obj/item/weapon/wrench)))
|
else if((istype(I, /obj/item/weapon/wrench)))
|
||||||
if(on || raised)
|
if(on || raised)
|
||||||
user << "<span class='warning'You cannot unsecure an active turret!</span>"
|
user << "<span class='warning'>You cannot unsecure an active turret!</span>"
|
||||||
return
|
return
|
||||||
if(wrenching)
|
if(wrenching)
|
||||||
user << "<span class='warning'>Someone is already [anchored ? "un" : ""]securing the turret!</span>"
|
user << "<span class='warning'>Someone is already [anchored ? "un" : ""]securing the turret!</span>"
|
||||||
@@ -733,7 +733,7 @@
|
|||||||
gun_charge = E.power_supply.charge //the gun's charge is stored in gun_charge
|
gun_charge = E.power_supply.charge //the gun's charge is stored in gun_charge
|
||||||
user << "<span class='notice'>You add [I] to the turret.</span>"
|
user << "<span class='notice'>You add [I] to the turret.</span>"
|
||||||
|
|
||||||
if(istype(installation, /obj/item/weapon/gun/energy/laser/bluetag) || istype(installation, /obj/item/weapon/gun/energy/laser/redtag))
|
if(istype(installation, /obj/item/weapon/gun/energy/lasertag/blue) || istype(installation, /obj/item/weapon/gun/energy/lasertag/red))
|
||||||
target_type = /obj/machinery/porta_turret/tag
|
target_type = /obj/machinery/porta_turret/tag
|
||||||
else
|
else
|
||||||
target_type = /obj/machinery/porta_turret
|
target_type = /obj/machinery/porta_turret
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
if(istype(occupant, /mob/living/silicon/robot))
|
if(istype(occupant, /mob/living/silicon/robot))
|
||||||
var/mob/living/silicon/robot/R = occupant
|
var/mob/living/silicon/robot/R = occupant
|
||||||
if(R.module)
|
if(R.module)
|
||||||
R.module.respawn_consumable(R)
|
R.module.respawn_consumable(R, charge_rate / 250)
|
||||||
if(!R.cell)
|
if(!R.cell)
|
||||||
return
|
return
|
||||||
if(!R.cell.fully_charged())
|
if(!R.cell.fully_charged())
|
||||||
|
|||||||
@@ -15,16 +15,16 @@
|
|||||||
|
|
||||||
/datum/data/vending_product/New(var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL)
|
/datum/data/vending_product/New(var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
src.product_path = path
|
src.product_path = path
|
||||||
|
|
||||||
if(!name)
|
if(!name)
|
||||||
var/atom/tmp = new path
|
var/atom/tmp = new path
|
||||||
src.product_name = initial(tmp.name)
|
src.product_name = initial(tmp.name)
|
||||||
del(tmp)
|
del(tmp)
|
||||||
else
|
else
|
||||||
src.product_name = name
|
src.product_name = name
|
||||||
|
|
||||||
src.amount = amount
|
src.amount = amount
|
||||||
src.price = price
|
src.price = price
|
||||||
src.display_color = color
|
src.display_color = color
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
var/datum/data/vending_product/currently_vending = null // What we're requesting payment for right now
|
var/datum/data/vending_product/currently_vending = null // What we're requesting payment for right now
|
||||||
var/status_message = "" // Status screen messages like "insufficient funds", displayed in NanoUI
|
var/status_message = "" // Status screen messages like "insufficient funds", displayed in NanoUI
|
||||||
var/status_error = 0 // Set to 1 if status_message is an error
|
var/status_error = 0 // Set to 1 if status_message is an error
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Variables used to initialize the product list
|
Variables used to initialize the product list
|
||||||
These are used for initialization only, and so are optional if
|
These are used for initialization only, and so are optional if
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
product.price = (entry in src.prices) ? src.prices[entry] : 0
|
product.price = (entry in src.prices) ? src.prices[entry] : 0
|
||||||
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
|
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
|
||||||
product.category = category
|
product.category = category
|
||||||
|
|
||||||
src.product_records.Add(product)
|
src.product_records.Add(product)
|
||||||
|
|
||||||
/obj/machinery/vending/Del()
|
/obj/machinery/vending/Del()
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
src.overlays.Cut()
|
src.overlays.Cut()
|
||||||
if(src.panel_open)
|
if(src.panel_open)
|
||||||
src.overlays += image(src.icon, "[initial(icon_state)]-panel")
|
src.overlays += image(src.icon, "[initial(icon_state)]-panel")
|
||||||
|
|
||||||
nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
|
||||||
return
|
return
|
||||||
else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters))
|
else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters))
|
||||||
@@ -257,8 +257,8 @@
|
|||||||
*/
|
*/
|
||||||
/obj/machinery/vending/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, mob/user)
|
/obj/machinery/vending/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, mob/user)
|
||||||
if(currently_vending.price > cashmoney.worth)
|
if(currently_vending.price > cashmoney.worth)
|
||||||
|
|
||||||
// This is not a status display message, since it's something the character
|
// This is not a status display message, since it's something the character
|
||||||
// themselves is meant to see BEFORE putting the money in
|
// themselves is meant to see BEFORE putting the money in
|
||||||
usr << "\icon[cashmoney] <span class='warning'>That is not enough money.</span>"
|
usr << "\icon[cashmoney] <span class='warning'>That is not enough money.</span>"
|
||||||
return 0
|
return 0
|
||||||
@@ -294,9 +294,9 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan a chargecard and deduct payment from it.
|
* Scan a chargecard and deduct payment from it.
|
||||||
*
|
*
|
||||||
* Takes payment for whatever is the currently_vending item. Returns 1 if
|
* Takes payment for whatever is the currently_vending item. Returns 1 if
|
||||||
* successful, 0 if failed.
|
* successful, 0 if failed.
|
||||||
*/
|
*/
|
||||||
/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
|
/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
/**
|
/**
|
||||||
* Scan a card and attempt to transfer payment from associated account.
|
* Scan a card and attempt to transfer payment from associated account.
|
||||||
*
|
*
|
||||||
* Takes payment for whatever is the currently_vending item. Returns 1 if
|
* Takes payment for whatever is the currently_vending item. Returns 1 if
|
||||||
* successful, 0 if failed
|
* successful, 0 if failed
|
||||||
*/
|
*/
|
||||||
/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I)
|
/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I)
|
||||||
@@ -371,9 +371,9 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add money for current purchase to the vendor account.
|
* Add money for current purchase to the vendor account.
|
||||||
*
|
*
|
||||||
* Called after the money has already been taken from the customer.
|
* Called after the money has already been taken from the customer.
|
||||||
*/
|
*/
|
||||||
/obj/machinery/vending/proc/credit_purchase(var/target as text)
|
/obj/machinery/vending/proc/credit_purchase(var/target as text)
|
||||||
vendor_account.money += currently_vending.price
|
vendor_account.money += currently_vending.price
|
||||||
|
|
||||||
@@ -403,11 +403,11 @@
|
|||||||
/**
|
/**
|
||||||
* Display the NanoUI window for the vending machine.
|
* Display the NanoUI window for the vending machine.
|
||||||
*
|
*
|
||||||
* See NanoUI documentation for details.
|
* See NanoUI documentation for details.
|
||||||
*/
|
*/
|
||||||
/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
|
|
||||||
var/list/data = list()
|
var/list/data = list()
|
||||||
if(currently_vending)
|
if(currently_vending)
|
||||||
data["mode"] = 1
|
data["mode"] = 1
|
||||||
@@ -422,28 +422,28 @@
|
|||||||
|
|
||||||
for(var/key = 1 to src.product_records.len)
|
for(var/key = 1 to src.product_records.len)
|
||||||
var/datum/data/vending_product/I = src.product_records[key]
|
var/datum/data/vending_product/I = src.product_records[key]
|
||||||
|
|
||||||
if(!(I.category & src.categories))
|
if(!(I.category & src.categories))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
listed_products.Add(list(list(
|
listed_products.Add(list(list(
|
||||||
"key" = key,
|
"key" = key,
|
||||||
"name" = I.product_name,
|
"name" = I.product_name,
|
||||||
"price" = I.price,
|
"price" = I.price,
|
||||||
"color" = I.display_color,
|
"color" = I.display_color,
|
||||||
"amount" = I.amount)))
|
"amount" = I.amount)))
|
||||||
|
|
||||||
data["products"] = listed_products
|
data["products"] = listed_products
|
||||||
|
|
||||||
if(src.coin)
|
if(src.coin)
|
||||||
data["coin"] = src.coin.name
|
data["coin"] = src.coin.name
|
||||||
|
|
||||||
if(src.panel_open)
|
if(src.panel_open)
|
||||||
data["panel"] = 1
|
data["panel"] = 1
|
||||||
data["speaker"] = src.shut_up ? 0 : 1
|
data["speaker"] = src.shut_up ? 0 : 1
|
||||||
else
|
else
|
||||||
data["panel"] = 0
|
data["panel"] = 0
|
||||||
|
|
||||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||||
if (!ui)
|
if (!ui)
|
||||||
ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
|
ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
|
||||||
@@ -488,11 +488,11 @@
|
|||||||
|
|
||||||
var/key = text2num(href_list["vend"])
|
var/key = text2num(href_list["vend"])
|
||||||
var/datum/data/vending_product/R = product_records[key]
|
var/datum/data/vending_product/R = product_records[key]
|
||||||
|
|
||||||
// This should not happen unless the request from NanoUI was bad
|
// This should not happen unless the request from NanoUI was bad
|
||||||
if(!(R.category & src.categories))
|
if(!(R.category & src.categories))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(R.price <= 0)
|
if(R.price <= 0)
|
||||||
src.vend(R, usr)
|
src.vend(R, usr)
|
||||||
else
|
else
|
||||||
@@ -522,7 +522,7 @@
|
|||||||
src.status_message = "Vending..."
|
src.status_message = "Vending..."
|
||||||
src.status_error = 0
|
src.status_error = 0
|
||||||
nanomanager.update_uis(src)
|
nanomanager.update_uis(src)
|
||||||
|
|
||||||
if (R.category & CAT_COIN)
|
if (R.category & CAT_COIN)
|
||||||
if(!coin)
|
if(!coin)
|
||||||
user << "\blue You need to insert a coin to get this item."
|
user << "\blue You need to insert a coin to get this item."
|
||||||
@@ -619,7 +619,7 @@
|
|||||||
new dump_path(src.loc)
|
new dump_path(src.loc)
|
||||||
R.amount--
|
R.amount--
|
||||||
break
|
break
|
||||||
|
|
||||||
stat |= BROKEN
|
stat |= BROKEN
|
||||||
src.icon_state = "[initial(icon_state)]-broken"
|
src.icon_state = "[initial(icon_state)]-broken"
|
||||||
return
|
return
|
||||||
@@ -732,8 +732,8 @@
|
|||||||
icon_state = "snack"
|
icon_state = "snack"
|
||||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 6,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 6,/obj/item/weapon/reagent_containers/food/snacks/chips =6,
|
products = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 6,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 6,/obj/item/weapon/reagent_containers/food/snacks/chips =6,
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 6,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 6,
|
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 6,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 6,
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6)
|
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6, /obj/item/weapon/reagent_containers/food/snacks/tastybread = 6)
|
||||||
contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6)
|
contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6, /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks = 3)
|
||||||
prices = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 1,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 5,/obj/item/weapon/reagent_containers/food/snacks/chips = 1,
|
prices = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 1,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 5,/obj/item/weapon/reagent_containers/food/snacks/chips = 1,
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 2,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 1,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 1,
|
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 2,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 1,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 1,
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 1)
|
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 1)
|
||||||
@@ -750,7 +750,7 @@
|
|||||||
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 10,
|
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 10,
|
||||||
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/space_up = 10,
|
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle = 10,/obj/item/weapon/reagent_containers/food/drinks/cans/space_up = 10,
|
||||||
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice = 10)
|
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice = 10)
|
||||||
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko = 5)
|
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko = 5, /obj/item/weapon/reagent_containers/food/snacks/liquidfood = 6)
|
||||||
prices = list(/obj/item/weapon/reagent_containers/food/drinks/cans/cola = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind = 1,
|
prices = list(/obj/item/weapon/reagent_containers/food/drinks/cans/cola = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind = 1,
|
||||||
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 1,
|
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb = 1,/obj/item/weapon/reagent_containers/food/drinks/cans/starkist = 1,
|
||||||
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle = 2,/obj/item/weapon/reagent_containers/food/drinks/cans/space_up = 1,
|
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle = 2,/obj/item/weapon/reagent_containers/food/drinks/cans/space_up = 1,
|
||||||
@@ -867,7 +867,7 @@
|
|||||||
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/mtearseed = 2,
|
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/mtearseed = 2,
|
||||||
/obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,)
|
/obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,)
|
||||||
premium = list(/obj/item/toy/waterflower = 1)
|
premium = list(/obj/item/toy/waterflower = 1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Populate hydroseeds product_records
|
* Populate hydroseeds product_records
|
||||||
*
|
*
|
||||||
@@ -891,7 +891,7 @@
|
|||||||
product.price = (entry in src.prices) ? src.prices[entry] : 0
|
product.price = (entry in src.prices) ? src.prices[entry] : 0
|
||||||
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
|
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
|
||||||
product.category = category
|
product.category = category
|
||||||
|
|
||||||
src.product_records.Add(product)
|
src.product_records.Add(product)
|
||||||
|
|
||||||
/obj/machinery/vending/magivend
|
/obj/machinery/vending/magivend
|
||||||
|
|||||||
@@ -151,6 +151,7 @@
|
|||||||
smoke_ready = 1
|
smoke_ready = 1
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//TODO replace this with zoom code that doesn't increase peripherial vision
|
||||||
/obj/mecha/combat/marauder/verb/zoom()
|
/obj/mecha/combat/marauder/verb/zoom()
|
||||||
set category = "Exosuit Interface"
|
set category = "Exosuit Interface"
|
||||||
set name = "Zoom"
|
set name = "Zoom"
|
||||||
|
|||||||
@@ -15,36 +15,39 @@
|
|||||||
action(atom/target)
|
action(atom/target)
|
||||||
if(!action_checks(target)) return
|
if(!action_checks(target)) return
|
||||||
if(!cargo_holder) return
|
if(!cargo_holder) return
|
||||||
if(istype(target, /obj/structure/stool)) return
|
|
||||||
for(var/M in target.contents)
|
//loading
|
||||||
if(istype(M, /mob/living))
|
|
||||||
return
|
|
||||||
|
|
||||||
if(istype(target,/obj))
|
if(istype(target,/obj))
|
||||||
var/obj/O = target
|
var/obj/O = target
|
||||||
if(!O.anchored)
|
if(O.buckled_mob)
|
||||||
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
|
return
|
||||||
occupant_message("You lift [target] and start to load it into cargo compartment.")
|
if(locate(/mob/living) in O)
|
||||||
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
|
return
|
||||||
set_ready_state(0)
|
if(O.anchored)
|
||||||
chassis.use_power(energy_drain)
|
|
||||||
O.anchored = 1
|
|
||||||
var/T = chassis.loc
|
|
||||||
if(do_after_cooldown(target))
|
|
||||||
if(T == chassis.loc && src == chassis.selected)
|
|
||||||
cargo_holder.cargo += O
|
|
||||||
O.loc = chassis
|
|
||||||
O.anchored = 0
|
|
||||||
occupant_message("<font color='blue'>[target] succesfully loaded.</font>")
|
|
||||||
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
|
||||||
else
|
|
||||||
occupant_message("<font color='red'>You must hold still while handling objects.</font>")
|
|
||||||
O.anchored = initial(O.anchored)
|
|
||||||
else
|
|
||||||
occupant_message("<font color='red'>Not enough room in cargo compartment.</font>")
|
|
||||||
else
|
|
||||||
occupant_message("<font color='red'>[target] is firmly secured.</font>")
|
occupant_message("<font color='red'>[target] is firmly secured.</font>")
|
||||||
|
return
|
||||||
|
if(cargo_holder.cargo.len >= cargo_holder.cargo_capacity)
|
||||||
|
occupant_message("<font color='red'>Not enough room in cargo compartment.</font>")
|
||||||
|
return
|
||||||
|
|
||||||
|
occupant_message("You lift [target] and start to load it into cargo compartment.")
|
||||||
|
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
|
||||||
|
set_ready_state(0)
|
||||||
|
chassis.use_power(energy_drain)
|
||||||
|
O.anchored = 1
|
||||||
|
var/T = chassis.loc
|
||||||
|
if(do_after_cooldown(target))
|
||||||
|
if(T == chassis.loc && src == chassis.selected)
|
||||||
|
cargo_holder.cargo += O
|
||||||
|
O.loc = chassis
|
||||||
|
O.anchored = 0
|
||||||
|
occupant_message("<font color='blue'>[target] succesfully loaded.</font>")
|
||||||
|
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||||
|
else
|
||||||
|
occupant_message("<font color='red'>You must hold still while handling objects.</font>")
|
||||||
|
O.anchored = initial(O.anchored)
|
||||||
|
|
||||||
|
//attacking
|
||||||
else if(istype(target,/mob/living))
|
else if(istype(target,/mob/living))
|
||||||
var/mob/living/M = target
|
var/mob/living/M = target
|
||||||
if(M.stat>1) return
|
if(M.stat>1) return
|
||||||
@@ -585,7 +588,7 @@
|
|||||||
chassis.visible_message("The [chassis.name] armor deflects the projectile")
|
chassis.visible_message("The [chassis.name] armor deflects the projectile")
|
||||||
chassis.log_append_to_last("Armor saved.")
|
chassis.log_append_to_last("Armor saved.")
|
||||||
else
|
else
|
||||||
chassis.take_damage(round(Proj.damage*src.damage_coeff),Proj.flag)
|
chassis.take_damage(round(Proj.damage*src.damage_coeff),Proj.check_armour)
|
||||||
chassis.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
chassis.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||||
Proj.on_hit(chassis)
|
Proj.on_hit(chassis)
|
||||||
set_ready_state(0)
|
set_ready_state(0)
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
|
|
||||||
throw_impact(atom/hit_atom)
|
throw_impact(atom/hit_atom)
|
||||||
if(primed)
|
if(primed)
|
||||||
explosion(hit_atom, 0, 0, 2, 4)
|
explosion(hit_atom, 0, 1, 2, 4)
|
||||||
del(src)
|
del(src)
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -250,6 +250,9 @@
|
|||||||
target = safepick(view(3,target))
|
target = safepick(view(3,target))
|
||||||
if(!target)
|
if(!target)
|
||||||
return
|
return
|
||||||
|
if(istype(target, /obj/machinery))
|
||||||
|
if (src.interface_action(target))
|
||||||
|
return
|
||||||
if(!target.Adjacent(src))
|
if(!target.Adjacent(src))
|
||||||
if(selected && selected.is_ranged())
|
if(selected && selected.is_ranged())
|
||||||
selected.action(target)
|
selected.action(target)
|
||||||
@@ -259,6 +262,29 @@
|
|||||||
src.melee_action(target)
|
src.melee_action(target)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/mecha/proc/interface_action(obj/machinery/target)
|
||||||
|
if(istype(target, /obj/machinery/access_button))
|
||||||
|
src.occupant_message("<span class='notice'>Interfacing with [target].</span>")
|
||||||
|
src.log_message("Interfaced with [target].")
|
||||||
|
target.attack_hand(src.occupant)
|
||||||
|
return 1
|
||||||
|
if(istype(target, /obj/machinery/embedded_controller))
|
||||||
|
target.ui_interact(src.occupant)
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/obj/mecha/contents_nano_distance(var/src_object, var/mob/living/user)
|
||||||
|
. = user.shared_living_nano_distance(src_object) //allow them to interact with anything they can interact with normally.
|
||||||
|
if(. != STATUS_INTERACTIVE)
|
||||||
|
//Allow interaction with the mecha or anything that is part of the mecha
|
||||||
|
if(src_object == src || (src_object in src))
|
||||||
|
return STATUS_INTERACTIVE
|
||||||
|
if(src.Adjacent(src_object))
|
||||||
|
src.occupant_message("<span class='notice'>Interfacing with [src_object]...</span>")
|
||||||
|
src.log_message("Interfaced with [src_object].")
|
||||||
|
return STATUS_INTERACTIVE
|
||||||
|
if(src_object in view(2, src))
|
||||||
|
return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever.
|
||||||
|
|
||||||
/obj/mecha/proc/melee_action(atom/target)
|
/obj/mecha/proc/melee_action(atom/target)
|
||||||
return
|
return
|
||||||
@@ -487,7 +513,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/mecha/bullet_act(var/obj/item/projectile/Proj) //wrapper
|
/obj/mecha/bullet_act(var/obj/item/projectile/Proj) //wrapper
|
||||||
src.log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).",1)
|
src.log_message("Hit by projectile. Type: [Proj.name]([Proj.check_armour]).",1)
|
||||||
call((proc_res["dynbulletdamage"]||src), "dynbulletdamage")(Proj) //calls equipment
|
call((proc_res["dynbulletdamage"]||src), "dynbulletdamage")(Proj) //calls equipment
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
@@ -506,10 +532,10 @@
|
|||||||
var/ignore_threshold
|
var/ignore_threshold
|
||||||
if(istype(Proj, /obj/item/projectile/beam/pulse))
|
if(istype(Proj, /obj/item/projectile/beam/pulse))
|
||||||
ignore_threshold = 1
|
ignore_threshold = 1
|
||||||
src.take_damage(Proj.damage, Proj.flag)
|
src.take_damage(Proj.damage, Proj.check_armour)
|
||||||
if(prob(25)) spark_system.start()
|
if(prob(25)) spark_system.start()
|
||||||
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold)
|
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold)
|
||||||
|
|
||||||
//AP projectiles have a chance to cause additional damage
|
//AP projectiles have a chance to cause additional damage
|
||||||
if(Proj.penetrating)
|
if(Proj.penetrating)
|
||||||
var/distance = get_dist(Proj.starting, get_turf(loc))
|
var/distance = get_dist(Proj.starting, get_turf(loc))
|
||||||
@@ -520,9 +546,9 @@
|
|||||||
hit_occupant = 0
|
hit_occupant = 0
|
||||||
else
|
else
|
||||||
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT), 1)
|
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT), 1)
|
||||||
|
|
||||||
Proj.penetrating--
|
Proj.penetrating--
|
||||||
|
|
||||||
if(prob(15))
|
if(prob(15))
|
||||||
break //give a chance to exit early
|
break //give a chance to exit early
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ var/global/list/image/splatter_cache=list()
|
|||||||
if(!perp.feet_blood_DNA)
|
if(!perp.feet_blood_DNA)
|
||||||
perp.feet_blood_DNA = list()
|
perp.feet_blood_DNA = list()
|
||||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||||
else if (perp.buckled && istype(perp.buckled, /obj/structure/stool/bed/chair/wheelchair))
|
else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair))
|
||||||
var/obj/structure/stool/bed/chair/wheelchair/W = perp.buckled
|
var/obj/structure/bed/chair/wheelchair/W = perp.buckled
|
||||||
W.bloodiness = 4
|
W.bloodiness = 4
|
||||||
|
|
||||||
perp.update_inv_shoes(1)
|
perp.update_inv_shoes(1)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
unacidable = 1
|
unacidable = 1
|
||||||
|
|
||||||
/obj/effect/landmark/New()
|
/obj/effect/landmark/New()
|
||||||
|
|
||||||
..()
|
..()
|
||||||
tag = text("landmark*[]", name)
|
tag = text("landmark*[]", name)
|
||||||
invisibility = 101
|
invisibility = 101
|
||||||
@@ -113,6 +112,13 @@
|
|||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/obj/effect/landmark/start/ninja
|
||||||
|
name = "ninja"
|
||||||
|
|
||||||
|
/obj/effect/landmark/start/ninja/New()
|
||||||
|
..()
|
||||||
|
ninjastart += loc
|
||||||
|
|
||||||
//Costume spawner landmarks
|
//Costume spawner landmarks
|
||||||
|
|
||||||
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
|
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
|
||||||
|
|||||||
@@ -141,7 +141,6 @@
|
|||||||
if(isliving(src.loc))
|
if(isliving(src.loc))
|
||||||
return
|
return
|
||||||
user.next_move = max(user.next_move+2,world.time + 2)
|
user.next_move = max(user.next_move+2,world.time + 2)
|
||||||
add_fingerprint(user)
|
|
||||||
user.put_in_active_hand(src)
|
user.put_in_active_hand(src)
|
||||||
if(src.loc == user)
|
if(src.loc == user)
|
||||||
src.pickup(user)
|
src.pickup(user)
|
||||||
@@ -638,8 +637,8 @@ For zooming with scope or binoculars. This is called from
|
|||||||
modules/mob/mob_movement.dm if you move you will be zoomed out
|
modules/mob/mob_movement.dm if you move you will be zoomed out
|
||||||
modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||||
*/
|
*/
|
||||||
|
//Looking through a scope or binoculars should /not/ improve your periphereal vision. Still, increase viewsize a tiny bit so that sniping isn't as restricted to NSEW
|
||||||
/obj/item/proc/zoom(var/tileoffset = 11,var/viewsize = 12) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
|
/obj/item/proc/zoom(var/tileoffset = 14,var/viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
|
||||||
|
|
||||||
var/devicename
|
var/devicename
|
||||||
|
|
||||||
@@ -686,14 +685,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
|||||||
|
|
||||||
usr.visible_message("[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].")
|
usr.visible_message("[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].")
|
||||||
|
|
||||||
/*
|
|
||||||
if(istype(usr,/mob/living/carbon/human/))
|
|
||||||
var/mob/living/carbon/human/H = usr
|
|
||||||
usr.visible_message("[usr] holds [devicename] up to [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] eyes.")
|
|
||||||
else
|
|
||||||
usr.visible_message("[usr] holds [devicename] up to its eyes.")
|
|
||||||
*/
|
|
||||||
|
|
||||||
else
|
else
|
||||||
usr.client.view = world.view
|
usr.client.view = world.view
|
||||||
if(!usr.hud_used.hud_shown)
|
if(!usr.hud_used.hud_shown)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
name = "flash"
|
name = "flash"
|
||||||
desc = "Used for blinding and being an asshole."
|
desc = "Used for blinding and being an asshole."
|
||||||
icon_state = "flash"
|
icon_state = "flash"
|
||||||
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
|
item_state = "flash"
|
||||||
throwforce = 5
|
throwforce = 5
|
||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
throw_speed = 4
|
throw_speed = 4
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
var/uses = 0
|
var/uses = 0
|
||||||
var/emagged = 0
|
var/emagged = 0
|
||||||
var/failmsg = ""
|
var/failmsg = ""
|
||||||
var/charge = 1
|
var/charge = 0
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/New()
|
/obj/item/device/lightreplacer/New()
|
||||||
uses = max_uses / 2
|
uses = max_uses / 2
|
||||||
@@ -122,11 +122,11 @@
|
|||||||
/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1)
|
/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1)
|
||||||
uses = min(max(uses + amount, 0), max_uses)
|
uses = min(max(uses + amount, 0), max_uses)
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/Charge(var/mob/user)
|
/obj/item/device/lightreplacer/proc/Charge(var/mob/user, var/amount = 1)
|
||||||
charge += 1
|
charge += amount
|
||||||
if(charge > 7)
|
if(charge > 6)
|
||||||
AddUses(1)
|
AddUses(1)
|
||||||
charge = 1
|
charge = 0
|
||||||
|
|
||||||
/obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
|
/obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,21 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
|||||||
var/cost = 0
|
var/cost = 0
|
||||||
var/path = null
|
var/path = null
|
||||||
var/reference = ""
|
var/reference = ""
|
||||||
|
var/description = ""
|
||||||
|
|
||||||
datum/uplink_item/New(var/itemPath, var/itemCost as num, var/itemName as text, var/itemReference as text)
|
datum/uplink_item/New(var/itemPath, var/itemCost as num, var/itemName as text, var/itemReference as text, var/itemDescription)
|
||||||
cost = itemCost
|
cost = itemCost
|
||||||
path = itemPath
|
path = itemPath
|
||||||
name = itemName
|
name = itemName
|
||||||
reference = itemReference
|
description = itemDescription
|
||||||
|
|
||||||
|
|
||||||
|
datum/uplink_item/proc/description()
|
||||||
|
if(!description)
|
||||||
|
// Fallback description
|
||||||
|
var/obj/temp = src.path
|
||||||
|
description = replacetext(initial(temp.desc), "\n", "<br>")
|
||||||
|
return description
|
||||||
|
|
||||||
datum/nano_item_lists
|
datum/nano_item_lists
|
||||||
var/list/items_nano
|
var/list/items_nano
|
||||||
@@ -41,16 +50,17 @@ datum/nano_item_lists
|
|||||||
uses = ticker.mode.uplink_uses
|
uses = ticker.mode.uplink_uses
|
||||||
ItemsCategory = ticker.mode.uplink_items
|
ItemsCategory = ticker.mode.uplink_items
|
||||||
|
|
||||||
var/datum/nano_item_lists/IL = generate_item_lists()
|
|
||||||
nanoui_items = IL.items_nano
|
|
||||||
ItemsReference = IL.items_reference
|
|
||||||
|
|
||||||
world_uplinks += src
|
world_uplinks += src
|
||||||
|
|
||||||
/obj/item/device/uplink/Del()
|
/obj/item/device/uplink/Del()
|
||||||
world_uplinks -= src
|
world_uplinks -= src
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
/obj/item/device/uplink/proc/generate_items()
|
||||||
|
var/datum/nano_item_lists/IL = generate_item_lists()
|
||||||
|
nanoui_items = IL.items_nano
|
||||||
|
ItemsReference = IL.items_reference
|
||||||
|
|
||||||
// BS12 no longer use this menu but there are forks that do, hency why we keep it
|
// BS12 no longer use this menu but there are forks that do, hency why we keep it
|
||||||
/obj/item/device/uplink/proc/generate_menu()
|
/obj/item/device/uplink/proc/generate_menu()
|
||||||
var/dat = "<B>[src.welcome]</B><BR>"
|
var/dat = "<B>[src.welcome]</B><BR>"
|
||||||
@@ -87,7 +97,7 @@ datum/nano_item_lists
|
|||||||
for(var/category in ItemsCategory)
|
for(var/category in ItemsCategory)
|
||||||
nano[++nano.len] = list("Category" = category, "items" = list())
|
nano[++nano.len] = list("Category" = category, "items" = list())
|
||||||
for(var/datum/uplink_item/I in ItemsCategory[category])
|
for(var/datum/uplink_item/I in ItemsCategory[category])
|
||||||
nano[nano.len]["items"] += list(list("Name" = I.name, "Cost" = I.cost, "obj_path" = I.reference))
|
nano[nano.len]["items"] += list(list("Name" = I.name, "Description" = I.description(),"Cost" = I.cost, "obj_path" = I.reference))
|
||||||
reference[I.reference] = I
|
reference[I.reference] = I
|
||||||
|
|
||||||
var/datum/nano_item_lists/result = new
|
var/datum/nano_item_lists/result = new
|
||||||
@@ -189,6 +199,8 @@ datum/nano_item_lists
|
|||||||
data["welcome"] = welcome
|
data["welcome"] = welcome
|
||||||
data["crystals"] = uses
|
data["crystals"] = uses
|
||||||
data["menu"] = nanoui_menu
|
data["menu"] = nanoui_menu
|
||||||
|
if(!nanoui_items)
|
||||||
|
generate_items()
|
||||||
data["nano_items"] = nanoui_items
|
data["nano_items"] = nanoui_items
|
||||||
data += nanoui_data
|
data += nanoui_data
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
usr << "There's no mounting point for the module!"
|
usr << "There's no mounting point for the module!"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in R.module
|
var/obj/item/weapon/gun/energy/taser/mounted/cyborg/T = locate() in R.module
|
||||||
if(!T)
|
if(!T)
|
||||||
T = locate() in R.module.contents
|
T = locate() in R.module.contents
|
||||||
if(!T)
|
if(!T)
|
||||||
|
|||||||
50
code/game/objects/items/stacks/matter_synth.dm
Normal file
50
code/game/objects/items/stacks/matter_synth.dm
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
/datum/matter_synth
|
||||||
|
var/name = "Generic Synthesizer"
|
||||||
|
var/max_energy = 60000
|
||||||
|
var/recharge_rate = 2000
|
||||||
|
var/energy
|
||||||
|
|
||||||
|
/datum/matter_synth/New(var/store = 0)
|
||||||
|
if(store)
|
||||||
|
max_energy = store
|
||||||
|
energy = max_energy
|
||||||
|
return
|
||||||
|
|
||||||
|
/datum/matter_synth/proc/get_charge()
|
||||||
|
return energy
|
||||||
|
|
||||||
|
/datum/matter_synth/proc/use_charge(var/amount)
|
||||||
|
if (energy >= amount)
|
||||||
|
energy -= amount
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/datum/matter_synth/proc/add_charge(var/amount)
|
||||||
|
energy = min(energy + amount, max_energy)
|
||||||
|
|
||||||
|
/datum/matter_synth/proc/emp_act(var/severity)
|
||||||
|
use_charge(max_energy * 0.1 / severity)
|
||||||
|
|
||||||
|
/datum/matter_synth/medicine
|
||||||
|
name = "Medicine Synthesizer"
|
||||||
|
|
||||||
|
/datum/matter_synth/metal
|
||||||
|
name = "Metal Synthesizer"
|
||||||
|
|
||||||
|
/datum/matter_synth/plasteel
|
||||||
|
name = "Plasteel Synthesizer"
|
||||||
|
max_energy = 10000
|
||||||
|
|
||||||
|
/datum/matter_synth/glass
|
||||||
|
name = "Glass Synthesizer"
|
||||||
|
|
||||||
|
/datum/matter_synth/wood
|
||||||
|
name = "Wood Synthesizer"
|
||||||
|
|
||||||
|
/datum/matter_synth/plastic
|
||||||
|
name = "Plastic Synthesizer"
|
||||||
|
|
||||||
|
/datum/matter_synth/wire
|
||||||
|
name = "Wire Synthesizer"
|
||||||
|
max_energy = 50
|
||||||
|
recharge_rate = 2
|
||||||
@@ -13,12 +13,21 @@
|
|||||||
max_amount = 60
|
max_amount = 60
|
||||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||||
|
|
||||||
|
/obj/item/stack/rods/cyborg
|
||||||
|
name = "metal rod synthesizer"
|
||||||
|
desc = "A device that makes metal rods."
|
||||||
|
gender = NEUTER
|
||||||
|
matter = null
|
||||||
|
uses_charge = 1
|
||||||
|
charge_costs = list(500)
|
||||||
|
stacktype = /obj/item/stack/rods
|
||||||
|
|
||||||
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
if (istype(W, /obj/item/weapon/weldingtool))
|
if (istype(W, /obj/item/weapon/weldingtool))
|
||||||
var/obj/item/weapon/weldingtool/WT = W
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
|
||||||
if(amount < 2)
|
if(get_amount() < 2)
|
||||||
user << "\red You need at least two rods to do this."
|
user << "\red You need at least two rods to do this."
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -54,7 +63,7 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
else if(!in_use)
|
else if(!in_use)
|
||||||
if(amount < 2)
|
if(get_amount() < 2)
|
||||||
user << "\blue You need at least two rods to do this."
|
user << "\blue You need at least two rods to do this."
|
||||||
return
|
return
|
||||||
usr << "\blue Assembling grille..."
|
usr << "\blue Assembling grille..."
|
||||||
|
|||||||
@@ -22,12 +22,13 @@
|
|||||||
var/list/construction_options = list("One Direction", "Full Window")
|
var/list/construction_options = list("One Direction", "Full Window")
|
||||||
|
|
||||||
/obj/item/stack/sheet/glass/cyborg
|
/obj/item/stack/sheet/glass/cyborg
|
||||||
name = "glass"
|
name = "glass synthesizer"
|
||||||
desc = "HOLY SHEET! That is a lot of glass."
|
desc = "A device that makes glass."
|
||||||
singular_name = "glass sheet"
|
gender = NEUTER
|
||||||
icon_state = "sheet-glass"
|
singular_name = "glass"
|
||||||
matter = null
|
matter = null
|
||||||
created_window = /obj/structure/window/basic
|
uses_charge = 1
|
||||||
|
charge_costs = list(1000)
|
||||||
stacktype = /obj/item/stack/sheet/glass
|
stacktype = /obj/item/stack/sheet/glass
|
||||||
|
|
||||||
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
|
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
if(!user.IsAdvancedToolUser())
|
if(!user.IsAdvancedToolUser())
|
||||||
return 0
|
return 0
|
||||||
var/title = "Sheet-[name]"
|
var/title = "Sheet-[name]"
|
||||||
title += " ([src.amount] sheet\s left)"
|
title += " ([src.get_amount()] sheet\s left)"
|
||||||
switch(input(title, "What would you like to construct?") as null|anything in construction_options)
|
switch(input(title, "What would you like to construct?") as null|anything in construction_options)
|
||||||
if("One Direction")
|
if("One Direction")
|
||||||
if(!src) return 1
|
if(!src) return 1
|
||||||
@@ -102,7 +103,7 @@
|
|||||||
if("Full Window")
|
if("Full Window")
|
||||||
if(!src) return 1
|
if(!src) return 1
|
||||||
if(src.loc != user) return 1
|
if(src.loc != user) return 1
|
||||||
if(src.amount < 4)
|
if(src.get_amount() < 4)
|
||||||
user << "\red You need more glass to do that."
|
user << "\red You need more glass to do that."
|
||||||
return 1
|
return 1
|
||||||
if(locate(/obj/structure/window) in user.loc)
|
if(locate(/obj/structure/window) in user.loc)
|
||||||
@@ -124,7 +125,7 @@
|
|||||||
user << "\red There is already a windoor in that location."
|
user << "\red There is already a windoor in that location."
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if(src.amount < 5)
|
if(src.get_amount() < 5)
|
||||||
user << "\red You need more glass to do that."
|
user << "\red You need more glass to do that."
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -151,10 +152,15 @@
|
|||||||
construction_options = list("One Direction", "Full Window", "Windoor")
|
construction_options = list("One Direction", "Full Window", "Windoor")
|
||||||
|
|
||||||
/obj/item/stack/sheet/glass/reinforced/cyborg
|
/obj/item/stack/sheet/glass/reinforced/cyborg
|
||||||
name = "reinforced glass"
|
name = "reinforced glass synthesizer"
|
||||||
desc = "Glass which has been reinforced with metal rods."
|
desc = "A device that makes reinforced glass."
|
||||||
|
gender = NEUTER
|
||||||
|
matter = null
|
||||||
|
uses_charge = 2
|
||||||
|
charge_costs = list(1000)
|
||||||
singular_name = "reinforced glass sheet"
|
singular_name = "reinforced glass sheet"
|
||||||
icon_state = "sheet-rglass"
|
icon_state = "sheet-rglass"
|
||||||
|
charge_costs = list(500, 1000)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Phoron Glass sheets
|
* Phoron Glass sheets
|
||||||
|
|||||||
@@ -137,9 +137,10 @@ obj/item/stack/sheet/mineral/iron/New()
|
|||||||
recipes = plastic_recipes
|
recipes = plastic_recipes
|
||||||
|
|
||||||
/obj/item/stack/sheet/mineral/plastic/cyborg
|
/obj/item/stack/sheet/mineral/plastic/cyborg
|
||||||
name = "plastic sheets"
|
name = "plastic sheets synthesizer"
|
||||||
icon_state = "sheet-plastic"
|
gender = NEUTER
|
||||||
perunit = 2000
|
uses_charge = 1
|
||||||
|
charge_costs = list(1000)
|
||||||
stacktype = /obj/item/stack/sheet/mineral/plastic
|
stacktype = /obj/item/stack/sheet/mineral/plastic
|
||||||
|
|
||||||
/obj/item/stack/sheet/mineral/gold
|
/obj/item/stack/sheet/mineral/gold
|
||||||
|
|||||||
@@ -11,20 +11,20 @@
|
|||||||
* Metal
|
* Metal
|
||||||
*/
|
*/
|
||||||
var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||||
new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
|
||||||
null, \
|
null, \
|
||||||
new/datum/stack_recipe_list("office chairs",list( \
|
new/datum/stack_recipe_list("office chairs",list( \
|
||||||
new/datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("dark office chair", /obj/structure/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("light office chair", /obj/structure/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
|
||||||
), 5), \
|
), 5), \
|
||||||
new/datum/stack_recipe_list("comfy chairs", list( \
|
new/datum/stack_recipe_list("comfy chairs", list( \
|
||||||
new/datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("beige comfy chair", /obj/structure/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("black comfy chair", /obj/structure/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
|
||||||
), 2), \
|
), 2), \
|
||||||
null, \
|
null, \
|
||||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
|
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
|
||||||
@@ -86,12 +86,12 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
|||||||
origin_tech = "materials=1"
|
origin_tech = "materials=1"
|
||||||
|
|
||||||
/obj/item/stack/sheet/metal/cyborg
|
/obj/item/stack/sheet/metal/cyborg
|
||||||
name = "metal"
|
name = "metal synthesizer"
|
||||||
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
|
desc = "A device that makes metal sheets."
|
||||||
singular_name = "metal sheet"
|
gender = NEUTER
|
||||||
icon_state = "sheet-metal"
|
matter = null
|
||||||
throwforce = 14.0
|
uses_charge = 1
|
||||||
flags = CONDUCT
|
charge_costs = list(1000)
|
||||||
stacktype = /obj/item/stack/sheet/metal
|
stacktype = /obj/item/stack/sheet/metal
|
||||||
|
|
||||||
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
||||||
@@ -121,9 +121,19 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
|||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
origin_tech = "materials=2"
|
origin_tech = "materials=2"
|
||||||
|
|
||||||
|
/obj/item/stack/sheet/plasteel/cyborg
|
||||||
|
name = "plasteel synthesizer"
|
||||||
|
desc = "A device that makes plasteel sheets."
|
||||||
|
gender = NEUTER
|
||||||
|
singular_name = "plasteel sheet"
|
||||||
|
matter = null
|
||||||
|
uses_charge = 1
|
||||||
|
charge_costs = list(1000)
|
||||||
|
stacktype = /obj/item/stack/sheet/plasteel
|
||||||
|
|
||||||
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
|
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
|
||||||
recipes = plasteel_recipes
|
recipes = plasteel_recipes
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wood
|
* Wood
|
||||||
@@ -132,7 +142,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
|||||||
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
|
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
|
||||||
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
|
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
|
||||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
|
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
|
||||||
new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||||
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
|
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
|
||||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||||
@@ -149,10 +159,13 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
|||||||
origin_tech = "materials=1;biotech=1"
|
origin_tech = "materials=1;biotech=1"
|
||||||
|
|
||||||
/obj/item/stack/sheet/wood/cyborg
|
/obj/item/stack/sheet/wood/cyborg
|
||||||
name = "wooden plank"
|
name = "wood synthesizer"
|
||||||
desc = "One can only guess that this is a bunch of wood."
|
desc = "A device that makes wooden planks."
|
||||||
|
gender = NEUTER
|
||||||
singular_name = "wood plank"
|
singular_name = "wood plank"
|
||||||
icon_state = "sheet-wood"
|
icon_state = "sheet-wood"
|
||||||
|
uses_charge = 1
|
||||||
|
charge_costs = list(1000)
|
||||||
stacktype = /obj/item/stack/sheet/wood
|
stacktype = /obj/item/stack/sheet/wood
|
||||||
|
|
||||||
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
|
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
var/amount = 1
|
var/amount = 1
|
||||||
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
|
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
|
||||||
var/stacktype //determines whether different stack types can merge
|
var/stacktype //determines whether different stack types can merge
|
||||||
|
var/uses_charge = 0
|
||||||
|
var/list/charge_costs = null
|
||||||
|
var/list/datum/matter_synth/synths = null
|
||||||
|
|
||||||
/obj/item/stack/New(var/loc, var/amount=null)
|
/obj/item/stack/New(var/loc, var/amount=null)
|
||||||
..()
|
..()
|
||||||
@@ -27,13 +30,18 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/stack/Del()
|
/obj/item/stack/Del()
|
||||||
|
if(uses_charge)
|
||||||
|
return
|
||||||
if (src && usr && usr.machine == src)
|
if (src && usr && usr.machine == src)
|
||||||
usr << browse(null, "window=stack")
|
usr << browse(null, "window=stack")
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/stack/examine(mob/user)
|
/obj/item/stack/examine(mob/user)
|
||||||
if(..(user, 1))
|
if(..(user, 1))
|
||||||
user << "There are [src.amount] [src.singular_name]\s in the stack."
|
if(!uses_charge)
|
||||||
|
user << "There are [src.amount] [src.singular_name]\s in the stack."
|
||||||
|
else
|
||||||
|
user << "There is enough charge for [get_amount()]."
|
||||||
|
|
||||||
/obj/item/stack/attack_self(mob/user as mob)
|
/obj/item/stack/attack_self(mob/user as mob)
|
||||||
list_recipes(user)
|
list_recipes(user)
|
||||||
@@ -41,14 +49,14 @@
|
|||||||
/obj/item/stack/proc/list_recipes(mob/user as mob, recipes_sublist)
|
/obj/item/stack/proc/list_recipes(mob/user as mob, recipes_sublist)
|
||||||
if (!recipes)
|
if (!recipes)
|
||||||
return
|
return
|
||||||
if (!src || amount<=0)
|
if (!src || get_amount() <= 0)
|
||||||
user << browse(null, "window=stack")
|
user << browse(null, "window=stack")
|
||||||
user.set_machine(src) //for correct work of onclose
|
user.set_machine(src) //for correct work of onclose
|
||||||
var/list/recipe_list = recipes
|
var/list/recipe_list = recipes
|
||||||
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
|
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
|
||||||
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
|
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
|
||||||
recipe_list = srl.recipes
|
recipe_list = srl.recipes
|
||||||
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.amount)
|
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.get_amount())
|
||||||
for(var/i=1;i<=recipe_list.len,i++)
|
for(var/i=1;i<=recipe_list.len,i++)
|
||||||
var/E = recipe_list[i]
|
var/E = recipe_list[i]
|
||||||
if (isnull(E))
|
if (isnull(E))
|
||||||
@@ -60,14 +68,14 @@
|
|||||||
|
|
||||||
if (istype(E, /datum/stack_recipe_list))
|
if (istype(E, /datum/stack_recipe_list))
|
||||||
var/datum/stack_recipe_list/srl = E
|
var/datum/stack_recipe_list/srl = E
|
||||||
if (src.amount >= srl.req_amount)
|
if (src.get_amount() >= srl.req_amount)
|
||||||
t1 += "<a href='?src=\ref[src];sublist=[i]'>[srl.title] ([srl.req_amount] [src.singular_name]\s)</a>"
|
t1 += "<a href='?src=\ref[src];sublist=[i]'>[srl.title] ([srl.req_amount] [src.singular_name]\s)</a>"
|
||||||
else
|
else
|
||||||
t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)<br>"
|
t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)<br>"
|
||||||
|
|
||||||
if (istype(E, /datum/stack_recipe))
|
if (istype(E, /datum/stack_recipe))
|
||||||
var/datum/stack_recipe/R = E
|
var/datum/stack_recipe/R = E
|
||||||
var/max_multiplier = round(src.amount / R.req_amount)
|
var/max_multiplier = round(src.get_amount() / R.req_amount)
|
||||||
var/title as text
|
var/title as text
|
||||||
var/can_build = 1
|
var/can_build = 1
|
||||||
can_build = can_build && (max_multiplier>0)
|
can_build = can_build && (max_multiplier>0)
|
||||||
@@ -142,7 +150,7 @@
|
|||||||
list_recipes(usr, text2num(href_list["sublist"]))
|
list_recipes(usr, text2num(href_list["sublist"]))
|
||||||
|
|
||||||
if (href_list["make"])
|
if (href_list["make"])
|
||||||
if (src.amount < 1) del(src) //Never should happen
|
if (src.get_amount() < 1) del(src) //Never should happen
|
||||||
|
|
||||||
var/list/recipes_list = recipes
|
var/list/recipes_list = recipes
|
||||||
if (href_list["sublist"])
|
if (href_list["sublist"])
|
||||||
@@ -165,28 +173,44 @@
|
|||||||
//Return 1 if an immediate subsequent call to use() would succeed.
|
//Return 1 if an immediate subsequent call to use() would succeed.
|
||||||
//Ensures that code dealing with stacks uses the same logic
|
//Ensures that code dealing with stacks uses the same logic
|
||||||
/obj/item/stack/proc/can_use(var/used)
|
/obj/item/stack/proc/can_use(var/used)
|
||||||
if (amount < used)
|
if (get_amount() < used)
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/item/stack/proc/use(var/used)
|
/obj/item/stack/proc/use(var/used)
|
||||||
if (!can_use(used))
|
if (!can_use(used))
|
||||||
return 0
|
return 0
|
||||||
amount -= used
|
if(!uses_charge)
|
||||||
if (amount <= 0)
|
amount -= used
|
||||||
spawn(0) //delete the empty stack once the current context yields
|
if (amount <= 0)
|
||||||
if (amount <= 0) //check again in case someone transferred stuff to us
|
spawn(0) //delete the empty stack once the current context yields
|
||||||
if(usr)
|
if (amount <= 0) //check again in case someone transferred stuff to us
|
||||||
usr.before_take_item(src)
|
if(usr)
|
||||||
del(src)
|
usr.before_take_item(src)
|
||||||
return 1
|
del(src)
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
if(get_amount() < used)
|
||||||
|
return 0
|
||||||
|
for(var/i = 1 to uses_charge)
|
||||||
|
var/datum/matter_synth/S = synths[i]
|
||||||
|
S.use_charge(charge_costs[i] * used) // Doesn't need to be deleted
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
/obj/item/stack/proc/add(var/extra)
|
/obj/item/stack/proc/add(var/extra)
|
||||||
if(amount + extra > max_amount)
|
if(!uses_charge)
|
||||||
|
if(amount + extra > get_max_amount())
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
amount += extra
|
||||||
|
return 1
|
||||||
|
else if(!synths || synths.len < uses_charge)
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
amount += extra
|
for(var/i = 1 to uses_charge)
|
||||||
return 1
|
var/datum/matter_synth/S = synths[i]
|
||||||
|
S.add_charge(charge_costs[i] * extra)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The transfer and split procs work differently than use() and add().
|
The transfer and split procs work differently than use() and add().
|
||||||
@@ -196,16 +220,16 @@
|
|||||||
|
|
||||||
//attempts to transfer amount to S, and returns the amount actually transferred
|
//attempts to transfer amount to S, and returns the amount actually transferred
|
||||||
/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null)
|
/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null)
|
||||||
if (!amount)
|
if (!get_amount())
|
||||||
return 0
|
return 0
|
||||||
if (stacktype != S.stacktype)
|
if (stacktype != S.stacktype)
|
||||||
return 0
|
return 0
|
||||||
if (isnull(tamount))
|
if (isnull(tamount))
|
||||||
tamount = src.amount
|
tamount = src.get_amount()
|
||||||
|
|
||||||
var/transfer = max(min(tamount, src.amount, (S.max_amount - S.amount)), 0)
|
var/transfer = max(min(tamount, src.get_amount(), (S.get_max_amount() - S.get_amount())), 0)
|
||||||
|
|
||||||
var/orig_amount = src.amount
|
var/orig_amount = src.get_amount()
|
||||||
if (transfer && src.use(transfer))
|
if (transfer && src.use(transfer))
|
||||||
S.add(transfer)
|
S.add(transfer)
|
||||||
if (prob(transfer/orig_amount * 100))
|
if (prob(transfer/orig_amount * 100))
|
||||||
@@ -220,6 +244,8 @@
|
|||||||
/obj/item/stack/proc/split(var/tamount)
|
/obj/item/stack/proc/split(var/tamount)
|
||||||
if (!amount)
|
if (!amount)
|
||||||
return null
|
return null
|
||||||
|
if(uses_charge)
|
||||||
|
return null
|
||||||
|
|
||||||
var/transfer = max(min(tamount, src.amount, initial(max_amount)), 0)
|
var/transfer = max(min(tamount, src.amount, initial(max_amount)), 0)
|
||||||
|
|
||||||
@@ -234,8 +260,31 @@
|
|||||||
return null
|
return null
|
||||||
|
|
||||||
/obj/item/stack/proc/get_amount()
|
/obj/item/stack/proc/get_amount()
|
||||||
|
if(uses_charge)
|
||||||
|
if(!synths || synths.len < uses_charge)
|
||||||
|
return 0
|
||||||
|
var/datum/matter_synth/S = synths[1]
|
||||||
|
. = round(S.get_charge() / charge_costs[1])
|
||||||
|
if(uses_charge > 1)
|
||||||
|
for(var/i = 2 to uses_charge)
|
||||||
|
S = synths[i]
|
||||||
|
. = min(., round(S.get_charge() / charge_costs[i]))
|
||||||
|
return
|
||||||
return amount
|
return amount
|
||||||
|
|
||||||
|
/obj/item/stack/proc/get_max_amount()
|
||||||
|
if(uses_charge)
|
||||||
|
if(!synths || synths.len < uses_charge)
|
||||||
|
return 0
|
||||||
|
var/datum/matter_synth/S = synths[1]
|
||||||
|
. = round(S.max_energy / charge_costs[1])
|
||||||
|
if(uses_charge > 1)
|
||||||
|
for(var/i = 2 to uses_charge)
|
||||||
|
S = synths[i]
|
||||||
|
. = min(., round(S.max_energy / charge_costs[i]))
|
||||||
|
return
|
||||||
|
return max_amount
|
||||||
|
|
||||||
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
|
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
|
||||||
for (var/obj/item/stack/item in usr.loc)
|
for (var/obj/item/stack/item in usr.loc)
|
||||||
if (item==src)
|
if (item==src)
|
||||||
|
|||||||
@@ -3,14 +3,12 @@
|
|||||||
singular_name = "floor tile"
|
singular_name = "floor tile"
|
||||||
desc = "Those could work as a pretty decent throwing weapon"
|
desc = "Those could work as a pretty decent throwing weapon"
|
||||||
icon_state = "tile"
|
icon_state = "tile"
|
||||||
w_class = 3.0
|
|
||||||
force = 6.0
|
force = 6.0
|
||||||
matter = list("metal" = 937.5)
|
matter = list("metal" = 937.5)
|
||||||
throwforce = 15.0
|
throwforce = 15.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
max_amount = 60
|
|
||||||
|
|
||||||
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
|
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
|
||||||
..()
|
..()
|
||||||
@@ -18,6 +16,16 @@
|
|||||||
src.pixel_y = rand(1, 14)
|
src.pixel_y = rand(1, 14)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/item/stack/tile/plasteel/cyborg
|
||||||
|
name = "floor tile synthesizer"
|
||||||
|
desc = "A device that makes floor tiles."
|
||||||
|
gender = NEUTER
|
||||||
|
matter = null
|
||||||
|
uses_charge = 1
|
||||||
|
charge_costs = list(250)
|
||||||
|
stacktype = /obj/item/stack/tile/plasteel
|
||||||
|
build_type = /obj/item/stack/tile/plasteel
|
||||||
|
|
||||||
/*
|
/*
|
||||||
/obj/item/stack/tile/plasteel/attack_self(mob/user as mob)
|
/obj/item/stack/tile/plasteel/attack_self(mob/user as mob)
|
||||||
if (usr.stat)
|
if (usr.stat)
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
/* Diffrent misc types of tiles
|
/* Diffrent misc types of tiles
|
||||||
* Contains:
|
* Contains:
|
||||||
|
* Prototype
|
||||||
* Grass
|
* Grass
|
||||||
* Wood
|
* Wood
|
||||||
* Carpet
|
* Carpet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/obj/item/stack/tile
|
||||||
|
name = "tile"
|
||||||
|
singular_name = "tile"
|
||||||
|
desc = "A non-descript floor tile"
|
||||||
|
w_class = 3
|
||||||
|
max_amount = 60
|
||||||
|
var/build_type = null
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Grass
|
* Grass
|
||||||
@@ -13,13 +22,11 @@
|
|||||||
singular_name = "grass floor tile"
|
singular_name = "grass floor tile"
|
||||||
desc = "A patch of grass like they often use on golf courses."
|
desc = "A patch of grass like they often use on golf courses."
|
||||||
icon_state = "tile_grass"
|
icon_state = "tile_grass"
|
||||||
w_class = 3.0
|
|
||||||
force = 1.0
|
force = 1.0
|
||||||
throwforce = 1.0
|
throwforce = 1.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
max_amount = 60
|
|
||||||
origin_tech = "biotech=1"
|
origin_tech = "biotech=1"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -30,13 +37,19 @@
|
|||||||
singular_name = "wood floor tile"
|
singular_name = "wood floor tile"
|
||||||
desc = "An easy to fit wooden floor tile."
|
desc = "An easy to fit wooden floor tile."
|
||||||
icon_state = "tile-wood"
|
icon_state = "tile-wood"
|
||||||
w_class = 3.0
|
|
||||||
force = 1.0
|
force = 1.0
|
||||||
throwforce = 1.0
|
throwforce = 1.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
max_amount = 60
|
|
||||||
|
/obj/item/stack/tile/wood/cyborg
|
||||||
|
name = "wood floor tile synthesizer"
|
||||||
|
desc = "A device that makes wood floor tiles."
|
||||||
|
uses_charge = 1
|
||||||
|
charge_costs = list(250)
|
||||||
|
stacktype = /obj/item/stack/tile/wood
|
||||||
|
build_type = /obj/item/stack/tile/wood
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Carpets
|
* Carpets
|
||||||
@@ -46,10 +59,8 @@
|
|||||||
singular_name = "carpet"
|
singular_name = "carpet"
|
||||||
desc = "A piece of carpet. It is the same size as a normal floor tile!"
|
desc = "A piece of carpet. It is the same size as a normal floor tile!"
|
||||||
icon_state = "tile-carpet"
|
icon_state = "tile-carpet"
|
||||||
w_class = 3.0
|
|
||||||
force = 1.0
|
force = 1.0
|
||||||
throwforce = 1.0
|
throwforce = 1.0
|
||||||
throw_speed = 5
|
throw_speed = 5
|
||||||
throw_range = 20
|
throw_range = 20
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
max_amount = 60
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
* Toy gun
|
* Toy gun
|
||||||
* Toy crossbow
|
* Toy crossbow
|
||||||
* Toy swords
|
* Toy swords
|
||||||
|
* Toy bosun's whistle
|
||||||
* Toy mechs
|
* Toy mechs
|
||||||
* Crayons
|
* Crayons
|
||||||
* Snap pops
|
* Snap pops
|
||||||
@@ -13,6 +14,9 @@
|
|||||||
* Therapy dolls
|
* Therapy dolls
|
||||||
* Toddler doll
|
* Toddler doll
|
||||||
* Inflatable duck
|
* Inflatable duck
|
||||||
|
* Action figures
|
||||||
|
* Plushies
|
||||||
|
* Toy cult sword
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -98,7 +102,7 @@
|
|||||||
icon_state = "syndballoon"
|
icon_state = "syndballoon"
|
||||||
item_state = "syndballoon"
|
item_state = "syndballoon"
|
||||||
w_class = 4.0
|
w_class = 4.0
|
||||||
|
|
||||||
/obj/item/toy/nanotrasenballoon
|
/obj/item/toy/nanotrasenballoon
|
||||||
name = "criminal balloon"
|
name = "criminal balloon"
|
||||||
desc = "Across the balloon the following is printed: \"Man, I love NT soooo much. I use only NanoTrasen products. You have NO idea.\""
|
desc = "Across the balloon the following is printed: \"Man, I love NT soooo much. I use only NanoTrasen products. You have NO idea.\""
|
||||||
@@ -140,7 +144,7 @@
|
|||||||
icon_state = "revolver"
|
icon_state = "revolver"
|
||||||
item_state = "gun"
|
item_state = "gun"
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
|
|
||||||
matter = list("glass" = 10,"metal" = 10)
|
matter = list("glass" = 10,"metal" = 10)
|
||||||
@@ -498,6 +502,22 @@
|
|||||||
if(..(user, 0))
|
if(..(user, 0))
|
||||||
user << text("\icon[] [] units of water left!", src, src.reagents.total_volume)
|
user << text("\icon[] [] units of water left!", src, src.reagents.total_volume)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bosun's whistle
|
||||||
|
*/
|
||||||
|
|
||||||
|
/obj/item/toy/bosunwhistle
|
||||||
|
name = "bosun's whistle"
|
||||||
|
desc = "A genuine Admiral Krush Bosun's Whistle, for the aspiring ship's captain! Suitable for ages 8 and up, do not swallow."
|
||||||
|
icon = 'icons/obj/toy.dmi'
|
||||||
|
icon_state = "bosunwhistle"
|
||||||
|
var/cooldown = 0
|
||||||
|
|
||||||
|
/obj/item/toy/bosunwhistle/attack_self(mob/user as mob)
|
||||||
|
if(cooldown < world.time - 35)
|
||||||
|
user << "<span class='notice'>You blow on [src], creating an ear-splitting noise!</span>"
|
||||||
|
playsound(user, 'sound/misc/boatswain.ogg', 20, 1)
|
||||||
|
cooldown = world.time
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mech prizes
|
* Mech prizes
|
||||||
@@ -542,7 +562,6 @@
|
|||||||
desc = "Mini-Mecha action figure! Collect them all! 4/11."
|
desc = "Mini-Mecha action figure! Collect them all! 4/11."
|
||||||
icon_state = "gygaxtoy"
|
icon_state = "gygaxtoy"
|
||||||
|
|
||||||
|
|
||||||
/obj/item/toy/prize/durand
|
/obj/item/toy/prize/durand
|
||||||
name = "toy durand"
|
name = "toy durand"
|
||||||
desc = "Mini-Mecha action figure! Collect them all! 5/11."
|
desc = "Mini-Mecha action figure! Collect them all! 5/11."
|
||||||
@@ -578,6 +597,206 @@
|
|||||||
desc = "Mini-Mecha action figure! Collect them all! 11/11."
|
desc = "Mini-Mecha action figure! Collect them all! 11/11."
|
||||||
icon_state = "phazonprize"
|
icon_state = "phazonprize"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Action figures
|
||||||
|
*/
|
||||||
|
|
||||||
|
/obj/item/toy/figure
|
||||||
|
name = "Completely Glitched action figure"
|
||||||
|
desc = "A \"Space Life\" brand... wait, what the hell is this thing? It seems to be requesting the sweet release of death."
|
||||||
|
icon_state = "assistant"
|
||||||
|
icon = 'icons/obj/toy.dmi'
|
||||||
|
|
||||||
|
/obj/item/toy/figure/cmo
|
||||||
|
name = "Chief Medical Officer action figure"
|
||||||
|
desc = "A \"Space Life\" brand Chief Medical Officer action figure."
|
||||||
|
icon_state = "cmo"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/assistant
|
||||||
|
name = "Assistant action figure"
|
||||||
|
desc = "A \"Space Life\" brand Assistant action figure."
|
||||||
|
icon_state = "assistant"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/atmos
|
||||||
|
name = "Atmospheric Technician action figure"
|
||||||
|
desc = "A \"Space Life\" brand Atmospheric Technician action figure."
|
||||||
|
icon_state = "atmos"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/bartender
|
||||||
|
name = "Bartender action figure"
|
||||||
|
desc = "A \"Space Life\" brand Bartender action figure."
|
||||||
|
icon_state = "bartender"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/borg
|
||||||
|
name = "Cyborg action figure"
|
||||||
|
desc = "A \"Space Life\" brand Cyborg action figure."
|
||||||
|
icon_state = "borg"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/gardener
|
||||||
|
name = "Gardener action figure"
|
||||||
|
desc = "A \"Space Life\" brand Gardener action figure."
|
||||||
|
icon_state = "botanist"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/captain
|
||||||
|
name = "Captain action figure"
|
||||||
|
desc = "A \"Space Life\" brand Captain action figure."
|
||||||
|
icon_state = "captain"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/cargotech
|
||||||
|
name = "Cargo Technician action figure"
|
||||||
|
desc = "A \"Space Life\" brand Cargo Technician action figure."
|
||||||
|
icon_state = "cargotech"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/ce
|
||||||
|
name = "Chief Engineer action figure"
|
||||||
|
desc = "A \"Space Life\" brand Chief Engineer action figure."
|
||||||
|
icon_state = "ce"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/chaplain
|
||||||
|
name = "Chaplain action figure"
|
||||||
|
desc = "A \"Space Life\" brand Chaplain action figure."
|
||||||
|
icon_state = "chaplain"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/chef
|
||||||
|
name = "Chef action figure"
|
||||||
|
desc = "A \"Space Life\" brand Chef action figure."
|
||||||
|
icon_state = "chef"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/chemist
|
||||||
|
name = "Chemist action figure"
|
||||||
|
desc = "A \"Space Life\" brand Chemist action figure."
|
||||||
|
icon_state = "chemist"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/clown
|
||||||
|
name = "Clown action figure"
|
||||||
|
desc = "A \"Space Life\" brand Clown action figure."
|
||||||
|
icon_state = "clown"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/corgi
|
||||||
|
name = "Corgi action figure"
|
||||||
|
desc = "A \"Space Life\" brand Corgi action figure."
|
||||||
|
icon_state = "ian"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/detective
|
||||||
|
name = "Detective action figure"
|
||||||
|
desc = "A \"Space Life\" brand Detective action figure."
|
||||||
|
icon_state = "detective"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/dsquad
|
||||||
|
name = "Space Commando action figure"
|
||||||
|
desc = "A \"Space Life\" brand Space Commando action figure."
|
||||||
|
icon_state = "dsquad"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/engineer
|
||||||
|
name = "Engineer action figure"
|
||||||
|
desc = "A \"Space Life\" brand Engineer action figure."
|
||||||
|
icon_state = "engineer"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/geneticist
|
||||||
|
name = "Geneticist action figure"
|
||||||
|
desc = "A \"Space Life\" brand Geneticist action figure, which was recently dicontinued."
|
||||||
|
icon_state = "geneticist"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/hop
|
||||||
|
name = "Head of Personel action figure"
|
||||||
|
desc = "A \"Space Life\" brand Head of Personel action figure."
|
||||||
|
icon_state = "hop"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/hos
|
||||||
|
name = "Head of Security action figure"
|
||||||
|
desc = "A \"Space Life\" brand Head of Security action figure."
|
||||||
|
icon_state = "hos"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/qm
|
||||||
|
name = "Quartermaster action figure"
|
||||||
|
desc = "A \"Space Life\" brand Quartermaster action figure."
|
||||||
|
icon_state = "qm"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/janitor
|
||||||
|
name = "Janitor action figure"
|
||||||
|
desc = "A \"Space Life\" brand Janitor action figure."
|
||||||
|
icon_state = "janitor"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/agent
|
||||||
|
name = "Internal Affairs Agent action figure"
|
||||||
|
desc = "A \"Space Life\" brand Internal Affairs Agent action figure."
|
||||||
|
icon_state = "agent"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/librarian
|
||||||
|
name = "Librarian action figure"
|
||||||
|
desc = "A \"Space Life\" brand Librarian action figure."
|
||||||
|
icon_state = "librarian"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/md
|
||||||
|
name = "Medical Doctor action figure"
|
||||||
|
desc = "A \"Space Life\" brand Medical Doctor action figure."
|
||||||
|
icon_state = "md"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/mime
|
||||||
|
name = "Mime action figure"
|
||||||
|
desc = "A \"Space Life\" brand Mime action figure."
|
||||||
|
icon_state = "mime"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/miner
|
||||||
|
name = "Shaft Miner action figure"
|
||||||
|
desc = "A \"Space Life\" brand Shaft Miner action figure."
|
||||||
|
icon_state = "miner"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/ninja
|
||||||
|
name = "Space Ninja action figure"
|
||||||
|
desc = "A \"Space Life\" brand Space Ninja action figure."
|
||||||
|
icon_state = "ninja"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/wizard
|
||||||
|
name = "Wizard action figure"
|
||||||
|
desc = "A \"Space Life\" brand Wizard action figure."
|
||||||
|
icon_state = "wizard"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/rd
|
||||||
|
name = "Research Director action figure"
|
||||||
|
desc = "A \"Space Life\" brand Research Director action figure."
|
||||||
|
icon_state = "rd"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/roboticist
|
||||||
|
name = "Roboticist action figure"
|
||||||
|
desc = "A \"Space Life\" brand Roboticist action figure."
|
||||||
|
icon_state = "roboticist"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/scientist
|
||||||
|
name = "Scientist action figure"
|
||||||
|
desc = "A \"Space Life\" brand Scientist action figure."
|
||||||
|
icon_state = "scientist"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/syndie
|
||||||
|
name = "Doom Operative action figure"
|
||||||
|
desc = "A \"Space Life\" brand Doom Operative action figure."
|
||||||
|
icon_state = "syndie"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/secofficer
|
||||||
|
name = "Security Officer action figure"
|
||||||
|
desc = "A \"Space Life\" brand Security Officer action figure."
|
||||||
|
icon_state = "secofficer"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/warden
|
||||||
|
name = "Warden action figure"
|
||||||
|
desc = "A \"Space Life\" brand Warden action figure."
|
||||||
|
icon_state = "warden"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/psychologist
|
||||||
|
name = "Psychologist action figure"
|
||||||
|
desc = "A \"Space Life\" brand Psychologist action figure."
|
||||||
|
icon_state = "psychologist"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/paramedic
|
||||||
|
name = "Paramedic action figure"
|
||||||
|
desc = "A \"Space Life\" brand Paramedic action figure."
|
||||||
|
icon_state = "paramedic"
|
||||||
|
|
||||||
|
/obj/item/toy/figure/ert
|
||||||
|
name = "Emergency Response Team Commander action figure"
|
||||||
|
desc = "A \"Space Life\" brand Emergency Response Team Commander action figure."
|
||||||
|
icon_state = "ert"
|
||||||
|
|
||||||
/obj/item/toy/katana
|
/obj/item/toy/katana
|
||||||
name = "replica katana"
|
name = "replica katana"
|
||||||
desc = "Woefully underpowered in D20."
|
desc = "Woefully underpowered in D20."
|
||||||
@@ -639,6 +858,106 @@
|
|||||||
item_state = "egg3" // It's the green egg in items_left/righthand
|
item_state = "egg3" // It's the green egg in items_left/righthand
|
||||||
w_class = 1
|
w_class = 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Plushies
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Large plushies.
|
||||||
|
/obj/structure/plushie
|
||||||
|
name = "generic plush"
|
||||||
|
desc = "A very generic plushie. It seems to not want to exist."
|
||||||
|
icon = 'icons/obj/toy.dmi'
|
||||||
|
icon_state = "ianplushie"
|
||||||
|
anchored = 0
|
||||||
|
density = 1
|
||||||
|
var/phrase = "I don't want to exist anymore!"
|
||||||
|
|
||||||
|
/obj/structure/plushie/attack_hand(mob/user)
|
||||||
|
if(user.a_intent == "help")
|
||||||
|
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
|
||||||
|
else if (user.a_intent == "hurt")
|
||||||
|
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
|
||||||
|
else if (user.a_intent == "grab")
|
||||||
|
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
|
||||||
|
else
|
||||||
|
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
|
||||||
|
visible_message("[src] says, \"[phrase]\"")
|
||||||
|
|
||||||
|
/obj/structure/plushie/ian
|
||||||
|
name = "plush corgi"
|
||||||
|
desc = "A plushie of an adorable corgi! Don't you just want to hug it and squeeze it and call it \"Ian\"?"
|
||||||
|
icon_state = "ianplushie"
|
||||||
|
phrase = "Arf!"
|
||||||
|
|
||||||
|
/obj/structure/plushie/drone
|
||||||
|
name = "plush drone"
|
||||||
|
desc = "A plushie of a happy drone! It appears to be smiling, and has a small tag which reads \"N.D.V. Icarus Gift Shop\"."
|
||||||
|
icon_state = "droneplushie"
|
||||||
|
phrase = "Beep boop!"
|
||||||
|
|
||||||
|
/obj/structure/plushie/carp
|
||||||
|
name = "plush carp"
|
||||||
|
desc = "A plushie of an elated carp! Straight from the wilds of the Nyx frontier, now right here in your hands."
|
||||||
|
icon_state = "carpplushie"
|
||||||
|
phrase = "Glorf!"
|
||||||
|
|
||||||
|
/obj/structure/plushie/beepsky
|
||||||
|
name = "plush Officer Sweepsky"
|
||||||
|
desc = "A plushie of a popular industrious cleaning robot! If it could feel emotions, it would love you."
|
||||||
|
icon_state = "beepskyplushie"
|
||||||
|
phrase = "Ping!"
|
||||||
|
|
||||||
|
//Small plushies.
|
||||||
|
/obj/item/toy/plushie
|
||||||
|
name = "generic small plush"
|
||||||
|
desc = "A very generic small plushie. It seems to not want to exist."
|
||||||
|
icon = 'icons/obj/toy.dmi'
|
||||||
|
icon_state = "nymphplushie"
|
||||||
|
|
||||||
|
/obj/item/toy/plushie/attack_self(mob/user as mob)
|
||||||
|
if(user.a_intent == "help")
|
||||||
|
user.visible_message("<span class='notice'><b>[user]</b> hugs [src]!</span>","<span class='notice'>You hug [src]!</span>")
|
||||||
|
else if (user.a_intent == "hurt")
|
||||||
|
user.visible_message("<span class='warning'><b>[user]</b> punches [src]!</span>","<span class='warning'>You punch [src]!</span>")
|
||||||
|
else if (user.a_intent == "grab")
|
||||||
|
user.visible_message("<span class='warning'><b>[user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
|
||||||
|
else
|
||||||
|
user.visible_message("<span class='notice'><b>[user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
|
||||||
|
|
||||||
|
/obj/item/toy/plushie/nymph
|
||||||
|
name = "diona nymph plush"
|
||||||
|
desc = "A plushie of an adorable diona nymph! While its level of self-awareness is still being debated, its level of cuteness is not."
|
||||||
|
icon_state = "nymphplushie"
|
||||||
|
|
||||||
|
/obj/item/toy/plushie/mouse
|
||||||
|
name = "mouse plush"
|
||||||
|
desc = "A plushie of a delightful mouse! What was once considered a vile rodent is now your very best friend."
|
||||||
|
icon_state = "mouseplushie"
|
||||||
|
|
||||||
|
/obj/item/toy/plushie/kitten
|
||||||
|
name = "kitten plush"
|
||||||
|
desc = "A plushie of a cute kitten! Watch as it purrs it's way right into your heart."
|
||||||
|
icon_state = "kittenplushie"
|
||||||
|
|
||||||
|
/obj/item/toy/plushie/lizard
|
||||||
|
name = "lizard plush"
|
||||||
|
desc = "A plushie of a scaly lizard! Very controversial, after being accused as \"racist\" by some Unathi."
|
||||||
|
icon_state = "lizardplushie"
|
||||||
|
|
||||||
|
/obj/item/toy/plushie/spider
|
||||||
|
name = "spider plush"
|
||||||
|
desc = "A plushie of a fuzzy spider! It has eight legs - all the better to hug you with."
|
||||||
|
icon_state = "spiderplushie"
|
||||||
|
|
||||||
|
//Toy cult sword
|
||||||
|
/obj/item/toy/cultsword
|
||||||
|
name = "foam sword"
|
||||||
|
desc = "An arcane weapon (made of foam) wielded by the followers of the hit Saturday morning cartoon \"King Nursee and the Acolytes of Heroism\"."
|
||||||
|
icon = 'icons/obj/weapons.dmi'
|
||||||
|
icon_state = "cultblade"
|
||||||
|
item_state = "cultblade"
|
||||||
|
w_class = 4
|
||||||
|
attack_verb = list("attacked", "slashed", "stabbed", "poked")
|
||||||
|
|
||||||
/* NYET.
|
/* NYET.
|
||||||
/obj/item/weapon/toddler
|
/obj/item/weapon/toddler
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
reagents.reaction(C)
|
reagents.reaction(C)
|
||||||
else // else just remove some of the reagents
|
else // else just remove some of the reagents
|
||||||
reagents.remove_any(REAGENTS_METABOLISM)
|
reagents.remove_any(REAGENTS_METABOLISM)
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
|
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||||
if(!src.lit)
|
if(!src.lit)
|
||||||
@@ -304,6 +303,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
/obj/item/clothing/mask/smokable/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/clothing/mask/smokable/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
user.update_inv_wear_mask(0)
|
||||||
|
user.update_inv_l_hand(0)
|
||||||
|
user.update_inv_r_hand(1)
|
||||||
|
|
||||||
/////////////////
|
/////////////////
|
||||||
//SMOKING PIPES//
|
//SMOKING PIPES//
|
||||||
/////////////////
|
/////////////////
|
||||||
@@ -376,6 +379,23 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
name = "[G.name]-packed [initial(name)]"
|
name = "[G.name]-packed [initial(name)]"
|
||||||
del(G)
|
del(G)
|
||||||
|
|
||||||
|
else if(istype(W, /obj/item/weapon/flame/lighter))
|
||||||
|
var/obj/item/weapon/flame/lighter/L = W
|
||||||
|
if(L.lit)
|
||||||
|
light("<span class='notice'>[user] manages to light their [name] with [W].</span>")
|
||||||
|
|
||||||
|
else if(istype(W, /obj/item/weapon/flame/match))
|
||||||
|
var/obj/item/weapon/flame/match/M = W
|
||||||
|
if(M.lit)
|
||||||
|
light("<span class='notice'>[user] lights their [name] with their [W].</span>")
|
||||||
|
|
||||||
|
else if(istype(W, /obj/item/device/assembly/igniter))
|
||||||
|
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name] with the power of science.</span>")
|
||||||
|
|
||||||
|
user.update_inv_wear_mask(0)
|
||||||
|
user.update_inv_l_hand(0)
|
||||||
|
user.update_inv_r_hand(1)
|
||||||
|
|
||||||
/obj/item/clothing/mask/smokable/pipe/cobpipe
|
/obj/item/clothing/mask/smokable/pipe/cobpipe
|
||||||
name = "corn cob pipe"
|
name = "corn cob pipe"
|
||||||
desc = "A nicotine delivery system popularized by folksy backwoodsmen, kept popular in the modern age and beyond by space hipsters."
|
desc = "A nicotine delivery system popularized by folksy backwoodsmen, kept popular in the modern age and beyond by space hipsters."
|
||||||
|
|||||||
@@ -71,6 +71,7 @@
|
|||||||
name = "purple comb"
|
name = "purple comb"
|
||||||
desc = "A pristine purple comb made from flexible plastic."
|
desc = "A pristine purple comb made from flexible plastic."
|
||||||
w_class = 1.0
|
w_class = 1.0
|
||||||
|
icon = 'icons/obj/items.dmi'
|
||||||
icon_state = "purplecomb"
|
icon_state = "purplecomb"
|
||||||
item_state = "purplecomb"
|
item_state = "purplecomb"
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,8 @@
|
|||||||
|
|
||||||
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
|
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
|
||||||
spawn(0)
|
spawn(0)
|
||||||
var/obj/structure/stool/bed/chair/C = null
|
var/obj/structure/bed/chair/C = null
|
||||||
if(istype(usr.buckled, /obj/structure/stool/bed/chair))
|
if(istype(usr.buckled, /obj/structure/bed/chair))
|
||||||
C = usr.buckled
|
C = usr.buckled
|
||||||
var/obj/B = usr.buckled
|
var/obj/B = usr.buckled
|
||||||
var/movementdirection = turn(direction,180)
|
var/movementdirection = turn(direction,180)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
B.health -= damage
|
B.health -= damage
|
||||||
B.update_icon()
|
B.update_icon()
|
||||||
|
|
||||||
|
new/obj/effect/effect/sparks(src.loc)
|
||||||
new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
|
new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -75,10 +75,10 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/book/manual/supermatter_engine
|
/obj/item/weapon/book/manual/supermatter_engine
|
||||||
name = "Supermatter Engine User's Guide"
|
name = "Supermatter Engine Operating Manual"
|
||||||
icon_state = "bookSupermatter"
|
icon_state = "bookSupermatter"
|
||||||
author = "Waleed Asad"
|
author = "Nanotrasen Central Engineering Division"
|
||||||
title = "Supermatter Engine User's Guide"
|
title = "Supermatter Engine Operating Manual"
|
||||||
|
|
||||||
/obj/item/weapon/book/manual/supermatter_engine/New()
|
/obj/item/weapon/book/manual/supermatter_engine/New()
|
||||||
..()
|
..()
|
||||||
@@ -94,95 +94,56 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<h1>OPERATING MANUAL FOR MK 1 PROTOTYPE THERMOELECTRIC SUPERMATTER ENGINE 'TOMBOLA'</h1>
|
||||||
<br>
|
<br>
|
||||||
Engineering notes on the single-stage supermatter engine,</br>
|
<h2>OPERATING PRINCIPLES</h2>
|
||||||
-Waleed Asad</br></br>
|
<br>
|
||||||
|
<li>The supermatter crystal serves as the fundamental power source of the engine. Upon being charged, it begins to emit large amounts of heat and radiation, as well and oxygen and plasma. As oxygen accelerates the reaction, and plasma carries the risk of fire, these must be filtered out. NOTE: Supermatter radiation will not charge radiation collectors.</li>
|
||||||
Station,</br>
|
<br>
|
||||||
Exodus</br></br>
|
<li>Air in the reactor chamber housing the supermatter is circulated through the reactor loop, which passes through the filters and thermoelectric generators. The thermoelectric generators transfer heat from the reactor loop to the colder radiator loop, thereby generating power. Additional power is generated from internal turbines in the circulators.</li>
|
||||||
|
<br>
|
||||||
A word of caution, do not enter the engine room for any reason without radiation protection and meson scanners on. The status of the engine may be unpredictable even when you believe it is 'off.' This is an important level of personal protection.</br></br>
|
<li>Air in the radiator loop is circulated through the radiator bank, located in space. This rapidly cools the air, preserving the temperature differential needed for power generation.</li>
|
||||||
|
<br>
|
||||||
The engine has two basic modes of functionality. It has been observed that it is capable of both a safe level of operation and a modified, high output mode.</br></br>
|
<li>The MK 1 Prototype Thermoelectric Supermatter Engine is designed to operate at reactor temperatures of 3000K to 4000K and generate up to 1MW of power. Beyond 1MW, the thermoelectric generators will begin to lose power through electrical discharge, reducing efficiency, but additional power generation remains feasible.</li>
|
||||||
|
<br>
|
||||||
<h2>Heat-Primary Mode</h2>
|
<li>The crystal structure of the supermatter will begin to liquefy if its temperature exceeds 5000K. This eventually results in a massive release of light, heat and radiation, disintegration of both the supermatter crystal and most of the surrounding area, and as as-of-yet poorly documented psychological effects on all animals within a 2km. Appropriate action should be taken to stabilize or eject the supermatter before such occurs.</li>
|
||||||
<i>Notes on starting the basic function mode</i>
|
<br>
|
||||||
|
<h2>SUPERMATTER HANDLING</h2>
|
||||||
|
<li>Do not expose supermatter to oxygen.</li>
|
||||||
|
<li>Do not <del>touch supermatter</del> <del>without gloves</del> <del>without exosuit protection</del> allow supermatter to contact any solid object apart from specially-designed supporting pallet.</li>
|
||||||
|
<li>Do not directly view supermatter without meson goggles.</li>
|
||||||
|
<li>While handles on pallet allow moving the supermatter via pulling, pushing should not be attempted.</li>
|
||||||
|
<br>
|
||||||
|
<h2>STARTUP PROCEDURE</h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li><b>Prepare collector arrays</b>: As is standard, begin by wrenching them down, filling six plasma tanks with a plasma canister, and inserting the tank into the collectors one by one. Finally, initialize each collector.</li>
|
<li>Fill reactor loop and radiator loop with two (2) standard canisters of nitrogen gas each.</li>
|
||||||
|
<li>Ensure that pumps and filters are on and operating at maximum power.</li>
|
||||||
<li><b>Prepare gas system</b>: Before introducing any gas into the supermatter engine room, it is important to remember the small, but vital steps to preparing this section. First, set the input gas pump and output gas flow pump to 4500 kPa, or maximum flow. Second, switch the digital switching valve into the 'up' position, so the green light is on north side of the valve, in order to circulate the gas back toward the coolers and collectors.</li>
|
<li>Fire <del>5</del> <del>15</del> <del>2</del> <del>UNKNOWN</del> 8-12 pulses from emitter at supermatter crystal. Reactor blast doors must be open for this procedure.</li>
|
||||||
|
|
||||||
<li><b>Apply N2 gas</b>: Retrieve the two N2 canisters from storage and bring them to the engine room. Attach one of them to the input section of the engine gas system located next to the collectors. Keep it attached until the N2 pressure is low enough to turn the canister light red. Replace it with the second canister to keep N2 pressure at optimal levels.</li>
|
|
||||||
|
|
||||||
<li><b>Open supermatter shielding</b>: This button is located in the engine room, to the left of the engine monitoring room blast doors. At this point, the supermatter chamber is mostly a gas mixture of N2 and is producing no radiation. It is considered 'safe' up until this point. Do not forget radiation shielding and meson scanners.</li>
|
|
||||||
|
|
||||||
<li><b>Begin primary emitter burst series</b>: Begin by firing four shots into the supermatter using the emitter. It is important to move to this step quickly. The onboard SMES units may not have enough power to run the emitters if left alone too long on-station. This engine can produce enough power on its own to run the entire station, ignoring the SMES units completely, and is wired to do so.</li>
|
|
||||||
|
|
||||||
<li><b>Switch SMES units to primary settings</b>: Maximize input and set the devices to automatically charge, additionally turn their outputs on if they are off unless power is to be saved (Which can be useful in case of later failures).</li>
|
|
||||||
|
|
||||||
<li><b>Begin secondary emitter burst series</b>: Before firing the emitter again, check the power in the line with a multimeter (Do not forget electrical gloves). The engine is running at high efficiency when the value exceeds 200,000 power units.</li>
|
|
||||||
|
|
||||||
<li><b>Maintain engine power</b>: When power in the lines get low, add an additional emitter burst series to bring power to normal levels.</li>
|
|
||||||
</ol>
|
</ol>
|
||||||
|
<br>
|
||||||
|
<h2>OPERATION AND MAINTENANCE</h2>
|
||||||
<h2>O2-Reaction Mode</h2>
|
|
||||||
|
|
||||||
The second mode for running the engine uses a gas mixture to produce a reaction within the supermatter. This mode requires the CE's or Atmospheric's help to set up. This is called 'O2-Reaction Mode.'</br></br>
|
|
||||||
|
|
||||||
<b><u>THIS MODE CAN CAUSE A RUNAWAY REACTION, LEADING TO CATASTROPHIC FAILURE IF NOT MAINTAINED. NEVER FORGET ABOUT THE ENGINE IN THIS MODE.</u></b></br></br>
|
|
||||||
|
|
||||||
Additionally, this mode can be used for what is called a '<b>Cold Start</b>.' If the station has no power in the SMES to run the emitters, using this mode will allow enough power output to run them, and quickly reach an acceptable level of power output.</br></br>
|
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li><b>Prepare collector arrays</b>: As is standard, begin by wrenching them down, filling six plasma tanks with a plasma canister, and inserting the tank into the collectors one by one. Finally, initialize each collector.</li>
|
<li>Ensure that radiation protection and meson goggles are worn at all times while working in the engine room.</li>
|
||||||
|
<li>Ensure that reactor and radiator loops are undamaged and unobstructed.</li>
|
||||||
<li><b>Prepare gas system</b>: Before introducing any gas into the supermatter engine room, it is important to remember the small, but vital steps to preparing this section. First, set the input gas pump and output gas flow pump to 4500 kPa, or maximum flow. Second, switch the digital switching valve into the 'up' position, so the green light is on north side of the valve, in order to circulate the gas back toward the coolers and collectors.</li>
|
<li>Ensure that plasma and oxygen gas exhaust from filters is properly contained or disposed. Do not allow exhaust pressure to exceed 4500 kPa.</li>
|
||||||
|
<li>Ensure that engine room Area Power Controller (APC) and engine Superconducting Magnetic Energy Storage unit (SMES) are properly charged.</li>
|
||||||
<li><b>Modify the engine room filters</b>: Unlike the Heat-Primary Mode, it is important to change the filters attached to the gas system to stop filtering O2, and start filtering carbon molecules. O2-Reaction Mode produces far more plasma than Heat-Primary, therefore filtering it off is essential.</li>
|
<li>Ensure that reactor temperature does not exceed 5000K. In event of reactor temperature exceeding 5000K, see EMERGENCY COOLING PROCEDURE.</li>
|
||||||
|
<li>In event of imminent and/or unavoidable delamination, see EJECTION PROCEDURE.</li>
|
||||||
<li><b>Switch SMES units to primary settings</b>: Maximize input and set the devices to automatically charge, additionally turn their outputs on if they are off unless power is to be saved (Which can be useful in case of later failures). If you check the power in the system lines at this point, you will find that it is constantly going up. Indeed, with just the addition of O2 to the supermatter, it will begin outputting power.</li>
|
</ol>
|
||||||
|
<br>
|
||||||
<li><b>Begin primary emitter burst series</b>: Begin by firing four shots into the supermatter using the emitter. Do not over power the supermatter. The reaction is self sustaining and propagating. As long as O2 is in the chamber, it will continue outputting MORE power.</li>
|
<h2>EMERGENCY COOLING PROCEDURE</h2>
|
||||||
|
<ol>
|
||||||
<li><b>Maintain follow up operations</b>: Remember to check the temperature of the core gas and switch to the Heat-Primary function, or vent the core room when problems begin if required.</li>
|
<li>Open Emergency Cooling Valve 1 and Emergency Cooling Valve 2.</li>
|
||||||
</ol></br>
|
<li>When reactor temperature returns to safe operating levels, close Emergency Cooling Valve 1 and Emergency Cooling Valve 2.</li>
|
||||||
|
<li>If reactor temperature does not return to safe operating levels, see EJECTION PROCEDURE.</li>
|
||||||
<h2>Notes on Supermatter Reaction Function and Drawbacks</h2>
|
</ol>
|
||||||
|
<br>
|
||||||
After several hours of observation, an interesting phenomenon was witnessed. The supermatter undergoes a constant, self-sustaining reaction when given an extremely high O2 concentration. Anything about 80% or higher typically will cause this reaction. The supermatter will continue to react whenever this gas mixture is in the same room as the supermatter.</br></br>
|
<h2>EJECTION PROCEDURE</h2>
|
||||||
|
<ol>
|
||||||
To understand why O2-Reaction mode is dangerous, the core principle of the supermatter must be understood. The supermatter emits three things when 'not safe,' that is any time it is giving off power. These things are:</br>
|
<li>Press Engine Ventilatory Control button to open engine core vent to space.</li>
|
||||||
|
<li>Press Emergency Core Eject button to eject supermatter crystal. NOTE: Attempting crystal ejection while engine core vent is closed will result in ejection failure.</li>
|
||||||
<ul>
|
<li>In event of ejection failure, <i>pending</i></li>
|
||||||
<li>Radiation (which is converted into power by the collectors)</li></br>
|
</ol>
|
||||||
<li>Heat (which is removed via the gas exchange system and coolers)</li></br>
|
|
||||||
<li>External gas (in the form of plasma and O2)</li></br>
|
|
||||||
</ul></br>
|
|
||||||
|
|
||||||
When in Heat-Primary mode, far more heat and plasma are produced than radiation. In O2-Reaction mode, very little heat and only moderate amounts of plasma are produced, however HUGE amounts of energy leaving the supermatter is in the form of radiation.</br></br>
|
|
||||||
|
|
||||||
The O2-Reaction engine mode has a single drawback which has been eluded to more than once so far and that is very simple. The engine room will continue to grow hotter as the constant reaction continues. Eventually, there will be what is called a 'critical gas mixture.' This is the point at which the constant adding of plasma to the mixture of air around the supermatter changes the gas concentration to below the tolerance. When this happens, two things occur. First, the supermatter switches to its primary mode of operation wherein huge amounts of heat are produced by the engine rather than low amounts with high power output. Second, an uncontrollable increase in heat within the supermatter chamber will occur. This will lead to a spark-up, igniting the plasma in the supermatter chamber, wildly increasing both pressure and temperature.</br></br>
|
|
||||||
|
|
||||||
While the O2-Reaction mode is dangerous, it does produce heavy amounts of energy. Consider using this mode only in short amounts to fill the SMES, and switch back later in the shift to keep things flowing normally.</br></br>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Notes on Supermatter Containment and Emergency Procedures</h2>
|
|
||||||
|
|
||||||
While a constant vigil on the supermatter is not required, regular checkups are important. Check the temperature of gas leaving the supermatter chamber for unsafe levels and ensure that the plasma in the chamber is at a safe concentration. Of course, also make sure the chamber is not on fire. A fire in the core chamber is very difficult to put out. As any toxin scientist can tell you, even low amounts of plasma can burn at very high temperatures. This burning creates a huge increase in pressure and more importantly, temperature of the crystal itself.</br></br>
|
|
||||||
|
|
||||||
The supermatter is strong, but not invincible. When the supermatter is heated too much, its crystal structure will attempt to liquefy. The change in atomic structure of the supermatter leads to a single reaction, a massive explosion. The computer chip attached to the supermatter core will warn the station when stability is threatened. It will then offer a second warning, when things have become dangerously close to total destruction of the core.</br></br>
|
|
||||||
|
|
||||||
Located both within the CE office and engine room is the engine ventilatory control button. This button allows the core vent controls to be accessed, venting the room to space. Remember however, that this process takes time. If a fire is raging, and the pressure is higher than fathomable, it will take a great deal of time to vent the room. Also located in the CE's office is the emergency core eject button. A new core can be ordered from cargo. It is often not worth the lives of the crew to hold on to it, not to mention the structural damage. However, if by some mistake the supermatter is pushed off or removed from the mass driver it sits on, manual reposition will be required. Which is very dangerous and often leads to death.</br></br>
|
|
||||||
|
|
||||||
The supermatter is extremely dangerous. More dangerous than people give it credit for. It can destroy you in an instant, without hesitation, reducing you to a pile of dust. When working closely with supermatter, it is suggested to get a genetic backup and do not wear any items of value to you. The supermatter core can be pulled if grabbed properly by the base, but <b>pushing is not possible.</b></br></br>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>In Closing</h2>
|
|
||||||
|
|
||||||
Remember that the supermatter is dangerous, and the core is dangerous still. Venting the core room is always an option if you are even remotely worried, utilizing Atmospherics to properly ready the room once more for core function. It is always a good idea to check up regularly on the temperature of gas leaving the chamber, as well as the power in the system lines. Lastly, once again remember, never touch the supermatter with anything. Ever.</br></br>
|
|
||||||
|
|
||||||
-Waleed Asad, Senior Engine Technician
|
|
||||||
</body>
|
</body>
|
||||||
</html>"}
|
</html>"}
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
if(affecting.take_damage(5, 0))
|
if(affecting.take_damage(5, 0))
|
||||||
H.UpdateDamageIcon()
|
H.UpdateDamageIcon()
|
||||||
H.updatehealth()
|
H.updatehealth()
|
||||||
if(!(H.species & NO_PAIN))
|
if(!(H.species && (H.species.flags & NO_PAIN)))
|
||||||
H.Weaken(3)
|
H.Weaken(3)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
max_w_class = 2
|
max_w_class = 2
|
||||||
storage_slots = 21
|
storage_slots = 21
|
||||||
can_hold = list() // any
|
can_hold = list() // any
|
||||||
cant_hold = list("/obj/item/weapon/disk/nuclear")
|
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||||
|
|
||||||
/obj/item/weapon/storage/bag/trash/update_icon()
|
/obj/item/weapon/storage/bag/trash/update_icon()
|
||||||
if(contents.len == 0)
|
if(contents.len == 0)
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
max_w_class = 2
|
max_w_class = 2
|
||||||
storage_slots = 21
|
storage_slots = 21
|
||||||
can_hold = list() // any
|
can_hold = list() // any
|
||||||
cant_hold = list("/obj/item/weapon/disk/nuclear")
|
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// Mining Satchel
|
// Mining Satchel
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
storage_slots = 50
|
storage_slots = 50
|
||||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
|
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
|
||||||
max_w_class = 3
|
max_w_class = 3
|
||||||
can_hold = list("/obj/item/weapon/ore")
|
can_hold = list(/obj/item/weapon/ore)
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
|
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
|
||||||
max_w_class = 3
|
max_w_class = 3
|
||||||
w_class = 2
|
w_class = 2
|
||||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown")
|
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown)
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
@@ -252,4 +252,4 @@
|
|||||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
|
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
|
||||||
max_w_class = 3
|
max_w_class = 3
|
||||||
w_class = 2
|
w_class = 2
|
||||||
can_hold = list("/obj/item/weapon/coin","/obj/item/weapon/spacecash")
|
can_hold = list(/obj/item/weapon/coin,/obj/item/weapon/spacecash)
|
||||||
|
|||||||
@@ -7,25 +7,32 @@
|
|||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
attack_verb = list("whipped", "lashed", "disciplined")
|
attack_verb = list("whipped", "lashed", "disciplined")
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/update_icon()
|
||||||
|
if (ismob(src.loc))
|
||||||
|
var/mob/M = src.loc
|
||||||
|
M.update_inv_belt()
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/storage/belt/utility
|
/obj/item/weapon/storage/belt/utility
|
||||||
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
|
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
|
||||||
desc = "Can hold various tools."
|
desc = "Can hold various tools."
|
||||||
icon_state = "utilitybelt"
|
icon_state = "utilitybelt"
|
||||||
item_state = "utility"
|
item_state = "utility"
|
||||||
can_hold = list(
|
can_hold = list(
|
||||||
//"/obj/item/weapon/combitool",
|
///obj/item/weapon/combitool,
|
||||||
"/obj/item/weapon/crowbar",
|
/obj/item/weapon/crowbar,
|
||||||
"/obj/item/weapon/screwdriver",
|
/obj/item/weapon/screwdriver,
|
||||||
"/obj/item/weapon/weldingtool",
|
/obj/item/weapon/weldingtool,
|
||||||
"/obj/item/weapon/wirecutters",
|
/obj/item/weapon/wirecutters,
|
||||||
"/obj/item/weapon/wrench",
|
/obj/item/weapon/wrench,
|
||||||
"/obj/item/device/multitool",
|
/obj/item/device/multitool,
|
||||||
"/obj/item/device/flashlight",
|
/obj/item/device/flashlight,
|
||||||
"/obj/item/stack/cable_coil",
|
/obj/item/stack/cable_coil,
|
||||||
"/obj/item/device/t_scanner",
|
/obj/item/device/t_scanner,
|
||||||
"/obj/item/device/analyzer",
|
/obj/item/device/analyzer,
|
||||||
"/obj/item/taperoll/engineering",
|
/obj/item/taperoll/engineering,
|
||||||
"/obj/item/device/robotanalyzer")
|
/obj/item/device/robotanalyzer)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/storage/belt/utility/full/New()
|
/obj/item/weapon/storage/belt/utility/full/New()
|
||||||
@@ -55,22 +62,21 @@
|
|||||||
icon_state = "medicalbelt"
|
icon_state = "medicalbelt"
|
||||||
item_state = "medical"
|
item_state = "medical"
|
||||||
can_hold = list(
|
can_hold = list(
|
||||||
"/obj/item/device/healthanalyzer",
|
/obj/item/device/healthanalyzer,
|
||||||
"/obj/item/weapon/dnainjector",
|
/obj/item/weapon/dnainjector,
|
||||||
"/obj/item/weapon/reagent_containers/dropper",
|
/obj/item/weapon/reagent_containers/dropper,
|
||||||
"/obj/item/weapon/reagent_containers/glass/beaker",
|
/obj/item/weapon/reagent_containers/glass/beaker,
|
||||||
"/obj/item/weapon/reagent_containers/glass/bottle",
|
/obj/item/weapon/reagent_containers/glass/bottle,
|
||||||
"/obj/item/weapon/reagent_containers/pill",
|
/obj/item/weapon/reagent_containers/pill,
|
||||||
"/obj/item/weapon/reagent_containers/syringe",
|
/obj/item/weapon/reagent_containers/syringe,
|
||||||
"/obj/item/weapon/reagent_containers/glass/dispenser",
|
/obj/item/weapon/flame/lighter/zippo,
|
||||||
"/obj/item/weapon/flame/lighter/zippo",
|
/obj/item/weapon/storage/fancy/cigarettes,
|
||||||
"/obj/item/weapon/storage/fancy/cigarettes",
|
/obj/item/weapon/storage/pill_bottle,
|
||||||
"/obj/item/weapon/storage/pill_bottle",
|
/obj/item/stack/medical,
|
||||||
"/obj/item/stack/medical",
|
/obj/item/device/flashlight/pen,
|
||||||
"/obj/item/device/flashlight/pen",
|
/obj/item/clothing/mask/surgical,
|
||||||
"/obj/item/clothing/mask/surgical",
|
/obj/item/clothing/gloves/latex,
|
||||||
"/obj/item/clothing/gloves/latex",
|
/obj/item/weapon/reagent_containers/hypospray
|
||||||
"/obj/item/weapon/reagent_containers/hypospray"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/item/weapon/storage/belt/medical/emt
|
/obj/item/weapon/storage/belt/medical/emt
|
||||||
@@ -85,30 +91,29 @@
|
|||||||
name = "security belt"
|
name = "security belt"
|
||||||
desc = "Can hold security gear like handcuffs and flashes."
|
desc = "Can hold security gear like handcuffs and flashes."
|
||||||
icon_state = "securitybelt"
|
icon_state = "securitybelt"
|
||||||
item_state = "security"//Could likely use a better one.
|
item_state = "security"
|
||||||
storage_slots = 7
|
storage_slots = 7
|
||||||
max_w_class = 3
|
max_w_class = 3
|
||||||
max_combined_w_class = 21
|
max_combined_w_class = 21
|
||||||
can_hold = list(
|
can_hold = list(
|
||||||
"/obj/item/weapon/grenade",
|
/obj/item/weapon/grenade,
|
||||||
"/obj/item/weapon/reagent_containers/spray/pepper",
|
/obj/item/weapon/reagent_containers/spray/pepper,
|
||||||
"/obj/item/weapon/handcuffs",
|
/obj/item/weapon/handcuffs,
|
||||||
"/obj/item/device/flash",
|
/obj/item/device/flash,
|
||||||
"/obj/item/clothing/glasses",
|
/obj/item/clothing/glasses,
|
||||||
"/obj/item/ammo_casing/shotgun",
|
/obj/item/ammo_casing/shotgun,
|
||||||
"/obj/item/ammo_magazine",
|
/obj/item/ammo_magazine,
|
||||||
"/obj/item/weapon/reagent_containers/food/snacks/donut/normal",
|
/obj/item/weapon/reagent_containers/food/snacks/donut/normal,
|
||||||
"/obj/item/weapon/reagent_containers/food/snacks/donut/jelly",
|
/obj/item/weapon/reagent_containers/food/snacks/donut/jelly,
|
||||||
"/obj/item/weapon/melee/baton",
|
/obj/item/weapon/melee/baton,
|
||||||
"/obj/item/weapon/gun/energy/taser",
|
/obj/item/weapon/gun/energy/taser,
|
||||||
"/obj/item/weapon/flame/lighter/zippo",
|
/obj/item/weapon/flame/lighter/zippo,
|
||||||
"/obj/item/weapon/cigpacket",
|
/obj/item/clothing/glasses/hud/security,
|
||||||
"/obj/item/clothing/glasses/hud/security",
|
/obj/item/device/flashlight,
|
||||||
"/obj/item/device/flashlight",
|
/obj/item/device/pda,
|
||||||
"/obj/item/device/pda",
|
/obj/item/device/radio/headset,
|
||||||
"/obj/item/device/radio/headset",
|
/obj/item/weapon/melee,
|
||||||
"/obj/item/weapon/melee",
|
/obj/item/taperoll/police
|
||||||
"/obj/item/taperoll/police"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/item/weapon/storage/belt/soulstone
|
/obj/item/weapon/storage/belt/soulstone
|
||||||
@@ -118,7 +123,7 @@
|
|||||||
item_state = "soulstonebelt"
|
item_state = "soulstonebelt"
|
||||||
storage_slots = 6
|
storage_slots = 6
|
||||||
can_hold = list(
|
can_hold = list(
|
||||||
"/obj/item/device/soulstone"
|
/obj/item/device/soulstone
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/item/weapon/storage/belt/soulstone/full/New()
|
/obj/item/weapon/storage/belt/soulstone/full/New()
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
/obj/item/weapon/storage/box/syringes
|
/obj/item/weapon/storage/box/syringes
|
||||||
name = "box of syringes"
|
name = "box of syringes"
|
||||||
desc = "A box full of syringes."
|
desc = "A box full of syringes."
|
||||||
desc = "A biohazard alert warning is printed on the box"
|
|
||||||
icon_state = "syringe"
|
icon_state = "syringe"
|
||||||
|
|
||||||
New()
|
New()
|
||||||
@@ -92,6 +91,22 @@
|
|||||||
new /obj/item/weapon/reagent_containers/syringe( src )
|
new /obj/item/weapon/reagent_containers/syringe( src )
|
||||||
new /obj/item/weapon/reagent_containers/syringe( src )
|
new /obj/item/weapon/reagent_containers/syringe( src )
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/box/syringegun
|
||||||
|
name = "box of syringe gun cartridges"
|
||||||
|
desc = "A box full of compressed gas cartridges."
|
||||||
|
icon_state = "syringe"
|
||||||
|
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
new /obj/item/weapon/syringe_cartridge( src )
|
||||||
|
new /obj/item/weapon/syringe_cartridge( src )
|
||||||
|
new /obj/item/weapon/syringe_cartridge( src )
|
||||||
|
new /obj/item/weapon/syringe_cartridge( src )
|
||||||
|
new /obj/item/weapon/syringe_cartridge( src )
|
||||||
|
new /obj/item/weapon/syringe_cartridge( src )
|
||||||
|
new /obj/item/weapon/syringe_cartridge( src )
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/beakers
|
/obj/item/weapon/storage/box/beakers
|
||||||
name = "box of beakers"
|
name = "box of beakers"
|
||||||
icon_state = "beaker"
|
icon_state = "beaker"
|
||||||
@@ -176,6 +191,48 @@
|
|||||||
new /obj/item/ammo_casing/shotgun/pellet(src)
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
new /obj/item/ammo_casing/shotgun/pellet(src)
|
new /obj/item/ammo_casing/shotgun/pellet(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/box/flashshells
|
||||||
|
name = "box of illumination shells"
|
||||||
|
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||||
|
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
new /obj/item/ammo_casing/shotgun/flash(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/flash(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/flash(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/flash(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/flash(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/flash(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/flash(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/box/stunshells
|
||||||
|
name = "box of stun shells"
|
||||||
|
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||||
|
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||||
|
new /obj/item/ammo_casing/shotgun/stunshell(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/storage/box/heavysniperammo
|
||||||
|
name = "box of 14.5mm AP shells"
|
||||||
|
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||||
|
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
new /obj/item/ammo_casing/a145(src)
|
||||||
|
new /obj/item/ammo_casing/a145(src)
|
||||||
|
new /obj/item/ammo_casing/a145(src)
|
||||||
|
new /obj/item/ammo_casing/a145(src)
|
||||||
|
new /obj/item/ammo_casing/a145(src)
|
||||||
|
new /obj/item/ammo_casing/a145(src)
|
||||||
|
new /obj/item/ammo_casing/a145(src)
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/flashbangs
|
/obj/item/weapon/storage/box/flashbangs
|
||||||
name = "box of flashbangs (WARNING)"
|
name = "box of flashbangs (WARNING)"
|
||||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
|
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
|
||||||
@@ -193,7 +250,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/storage/box/emps
|
/obj/item/weapon/storage/box/emps
|
||||||
name = "box of emp grenades"
|
name = "box of emp grenades"
|
||||||
desc = "A box with 5 emp grenades."
|
desc = "A box containing 5 military grade EMP grenades.<br> WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur."
|
||||||
icon_state = "flashbang"
|
icon_state = "flashbang"
|
||||||
|
|
||||||
New()
|
New()
|
||||||
@@ -323,7 +380,7 @@
|
|||||||
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
|
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
|
||||||
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
|
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
|
||||||
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
|
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/sinpockets
|
/obj/item/weapon/storage/box/sinpockets
|
||||||
name = "box of sin-pockets"
|
name = "box of sin-pockets"
|
||||||
desc = "<B>Instructions:</B> <I>Crush bottom of package to initiate chemical heating. Wait for 20 seconds before consumption. Product will cool if not eaten within seven minutes.</I>"
|
desc = "<B>Instructions:</B> <I>Crush bottom of package to initiate chemical heating. Wait for 20 seconds before consumption. Product will cool if not eaten within seven minutes.</I>"
|
||||||
@@ -344,7 +401,7 @@
|
|||||||
icon = 'icons/obj/food.dmi'
|
icon = 'icons/obj/food.dmi'
|
||||||
icon_state = "monkeycubebox"
|
icon_state = "monkeycubebox"
|
||||||
storage_slots = 7
|
storage_slots = 7
|
||||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube")
|
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube)
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
if(src.type == /obj/item/weapon/storage/box/monkeycubes)
|
if(src.type == /obj/item/weapon/storage/box/monkeycubes)
|
||||||
@@ -458,7 +515,7 @@
|
|||||||
icon = 'icons/obj/toy.dmi'
|
icon = 'icons/obj/toy.dmi'
|
||||||
icon_state = "spbox"
|
icon_state = "spbox"
|
||||||
storage_slots = 8
|
storage_slots = 8
|
||||||
can_hold = list("/obj/item/toy/snappop")
|
can_hold = list(/obj/item/toy/snappop)
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
for(var/i=1; i <= storage_slots; i++)
|
for(var/i=1; i <= storage_slots; i++)
|
||||||
@@ -473,7 +530,7 @@
|
|||||||
storage_slots = 10
|
storage_slots = 10
|
||||||
w_class = 1
|
w_class = 1
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
can_hold = list("/obj/item/weapon/flame/match")
|
can_hold = list(/obj/item/weapon/flame/match)
|
||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
@@ -506,7 +563,7 @@
|
|||||||
item_state = "syringe_kit"
|
item_state = "syringe_kit"
|
||||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||||
storage_slots=21
|
storage_slots=21
|
||||||
can_hold = list("/obj/item/weapon/light/tube", "/obj/item/weapon/light/bulb")
|
can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
|
||||||
max_combined_w_class = 42 //holds 21 items of w_class 2
|
max_combined_w_class = 42 //holds 21 items of w_class 2
|
||||||
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
|
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
name = "egg box"
|
name = "egg box"
|
||||||
storage_slots = 12
|
storage_slots = 12
|
||||||
max_combined_w_class = 24
|
max_combined_w_class = 24
|
||||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg")
|
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
|
||||||
|
|
||||||
/obj/item/weapon/storage/fancy/egg_box/New()
|
/obj/item/weapon/storage/fancy/egg_box/New()
|
||||||
..()
|
..()
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
storage_slots = 6
|
storage_slots = 6
|
||||||
icon_type = "crayon"
|
icon_type = "crayon"
|
||||||
can_hold = list(
|
can_hold = list(
|
||||||
"/obj/item/toy/crayon"
|
/obj/item/toy/crayon
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/item/weapon/storage/fancy/crayons/New()
|
/obj/item/weapon/storage/fancy/crayons/New()
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
throwforce = 2
|
throwforce = 2
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
storage_slots = 6
|
storage_slots = 6
|
||||||
can_hold = list("/obj/item/clothing/mask/cigarette")
|
can_hold = list(/obj/item/clothing/mask/smokable/cigarette)
|
||||||
icon_type = "cigarette"
|
icon_type = "cigarette"
|
||||||
|
|
||||||
/obj/item/weapon/storage/fancy/cigarettes/New()
|
/obj/item/weapon/storage/fancy/cigarettes/New()
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
throwforce = 2
|
throwforce = 2
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
storage_slots = 7
|
storage_slots = 7
|
||||||
can_hold = list("/obj/item/clothing/mask/cigarette/cigar")
|
can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar)
|
||||||
icon_type = "cigar"
|
icon_type = "cigar"
|
||||||
|
|
||||||
/obj/item/weapon/storage/fancy/cigar/New()
|
/obj/item/weapon/storage/fancy/cigar/New()
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
icon_type = "vial"
|
icon_type = "vial"
|
||||||
name = "vial storage box"
|
name = "vial storage box"
|
||||||
storage_slots = 6
|
storage_slots = 6
|
||||||
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
|
can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/storage/fancy/vials/New()
|
/obj/item/weapon/storage/fancy/vials/New()
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
icon_state = "vialbox0"
|
icon_state = "vialbox0"
|
||||||
item_state = "syringe_kit"
|
item_state = "syringe_kit"
|
||||||
max_w_class = 3
|
max_w_class = 3
|
||||||
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
|
can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial)
|
||||||
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
|
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
|
||||||
storage_slots = 6
|
storage_slots = 6
|
||||||
req_access = list(access_virology)
|
req_access = list(access_virology)
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
icon = 'icons/obj/chemical.dmi'
|
icon = 'icons/obj/chemical.dmi'
|
||||||
item_state = "contsolid"
|
item_state = "contsolid"
|
||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
can_hold = list("/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/dice","/obj/item/weapon/paper")
|
can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/dice,/obj/item/weapon/paper)
|
||||||
allow_quick_gather = 1
|
allow_quick_gather = 1
|
||||||
use_to_pickup = 1
|
use_to_pickup = 1
|
||||||
storage_slots = 14
|
storage_slots = 14
|
||||||
|
|||||||
@@ -1,41 +1,41 @@
|
|||||||
/obj/item/weapon/storage/pill_bottle/dice
|
/obj/item/weapon/storage/pill_bottle/dice
|
||||||
name = "pack of dice"
|
name = "pack of dice"
|
||||||
desc = "It's a small container with dice inside."
|
desc = "It's a small container with dice inside."
|
||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/weapon/dice( src )
|
new /obj/item/weapon/dice( src )
|
||||||
new /obj/item/weapon/dice/d20( src )
|
new /obj/item/weapon/dice/d20( src )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Donut Box
|
* Donut Box
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/obj/item/weapon/storage/donut_box
|
/obj/item/weapon/storage/donut_box
|
||||||
icon = 'icons/obj/food.dmi'
|
icon = 'icons/obj/food.dmi'
|
||||||
icon_state = "donutbox"
|
icon_state = "donutbox"
|
||||||
name = "donut box"
|
name = "donut box"
|
||||||
storage_slots = 6
|
storage_slots = 6
|
||||||
var/startswith = 6
|
var/startswith = 6
|
||||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut")
|
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
|
||||||
foldable = /obj/item/stack/sheet/cardboard
|
foldable = /obj/item/stack/sheet/cardboard
|
||||||
|
|
||||||
/obj/item/weapon/storage/donut_box/New()
|
/obj/item/weapon/storage/donut_box/New()
|
||||||
..()
|
..()
|
||||||
for(var/i=1; i <= startswith; i++)
|
for(var/i=1; i <= startswith; i++)
|
||||||
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
|
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/weapon/storage/donut_box/update_icon()
|
/obj/item/weapon/storage/donut_box/update_icon()
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
var/i = 0
|
var/i = 0
|
||||||
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
|
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
|
||||||
var/image/img = image('icons/obj/food.dmi', D.overlay_state)
|
var/image/img = image('icons/obj/food.dmi', D.overlay_state)
|
||||||
img.pixel_x = i * 3
|
img.pixel_x = i * 3
|
||||||
overlays += img
|
overlays += img
|
||||||
i++
|
i++
|
||||||
|
|
||||||
/obj/item/weapon/storage/donut_box/empty
|
/obj/item/weapon/storage/donut_box/empty
|
||||||
icon_state = "donutbox0"
|
icon_state = "donutbox0"
|
||||||
startswith = 0
|
startswith = 0
|
||||||
|
|||||||
@@ -220,7 +220,7 @@
|
|||||||
max_w_class = 8
|
max_w_class = 8
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
density = 0
|
density = 0
|
||||||
cant_hold = list("/obj/item/weapon/storage/secure/briefcase")
|
cant_hold = list(/obj/item/weapon/storage/secure/briefcase)
|
||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -209,24 +209,17 @@
|
|||||||
usr << "<span class='notice'>[src] is full, make some space.</span>"
|
usr << "<span class='notice'>[src] is full, make some space.</span>"
|
||||||
return 0 //Storage item is full
|
return 0 //Storage item is full
|
||||||
|
|
||||||
if(can_hold.len)
|
if(can_hold.len && !is_type_in_list(W, can_hold))
|
||||||
var/ok = 0
|
if(!stop_messages)
|
||||||
for(var/A in can_hold)
|
if (istype(W, /obj/item/weapon/hand_labeler))
|
||||||
if(istype(W, text2path(A) ))
|
return 0
|
||||||
ok = 1
|
usr << "<span class='notice'>[src] cannot hold [W].</span>"
|
||||||
break
|
return 0
|
||||||
if(!ok)
|
|
||||||
if(!stop_messages)
|
|
||||||
if (istype(W, /obj/item/weapon/hand_labeler))
|
|
||||||
return 0
|
|
||||||
usr << "<span class='notice'>[src] cannot hold [W].</span>"
|
|
||||||
return 0
|
|
||||||
|
|
||||||
for(var/A in cant_hold) //Check for specific items which this container can't hold.
|
if(cant_hold.len && is_type_in_list(W, cant_hold))
|
||||||
if(istype(W, text2path(A) ))
|
if(!stop_messages)
|
||||||
if(!stop_messages)
|
usr << "<span class='notice'>[src] cannot hold [W].</span>"
|
||||||
usr << "<span class='notice'>[src] cannot hold [W].</span>"
|
return 0
|
||||||
return 0
|
|
||||||
|
|
||||||
if (W.w_class > max_w_class)
|
if (W.w_class > max_w_class)
|
||||||
if(!stop_messages)
|
if(!stop_messages)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if("guns")
|
if("guns")
|
||||||
new /obj/item/weapon/gun/projectile(src)
|
new /obj/item/weapon/gun/projectile/revolver(src)
|
||||||
new /obj/item/ammo_magazine/a357(src)
|
new /obj/item/ammo_magazine/a357(src)
|
||||||
new /obj/item/weapon/card/emag(src)
|
new /obj/item/weapon/card/emag(src)
|
||||||
new /obj/item/weapon/plastique(src)
|
new /obj/item/weapon/plastique(src)
|
||||||
|
|||||||
@@ -5,25 +5,25 @@
|
|||||||
icon_state = "wallet"
|
icon_state = "wallet"
|
||||||
w_class = 2
|
w_class = 2
|
||||||
can_hold = list(
|
can_hold = list(
|
||||||
"/obj/item/weapon/spacecash",
|
/obj/item/weapon/spacecash,
|
||||||
"/obj/item/weapon/card",
|
/obj/item/weapon/card,
|
||||||
"/obj/item/clothing/mask/cigarette",
|
/obj/item/clothing/mask/smokable/cigarette/,
|
||||||
"/obj/item/device/flashlight/pen",
|
/obj/item/device/flashlight/pen,
|
||||||
"/obj/item/seeds",
|
/obj/item/seeds,
|
||||||
"/obj/item/stack/medical",
|
/obj/item/stack/medical,
|
||||||
"/obj/item/toy/crayon",
|
/obj/item/toy/crayon,
|
||||||
"/obj/item/weapon/coin",
|
/obj/item/weapon/coin,
|
||||||
"/obj/item/weapon/dice",
|
/obj/item/weapon/dice,
|
||||||
"/obj/item/weapon/disk",
|
/obj/item/weapon/disk,
|
||||||
"/obj/item/weapon/implanter",
|
/obj/item/weapon/implanter,
|
||||||
"/obj/item/weapon/flame/lighter",
|
/obj/item/weapon/flame/lighter,
|
||||||
"/obj/item/weapon/flame/match",
|
/obj/item/weapon/flame/match,
|
||||||
"/obj/item/weapon/paper",
|
/obj/item/weapon/paper,
|
||||||
"/obj/item/weapon/pen",
|
/obj/item/weapon/pen,
|
||||||
"/obj/item/weapon/photo",
|
/obj/item/weapon/photo,
|
||||||
"/obj/item/weapon/reagent_containers/dropper",
|
/obj/item/weapon/reagent_containers/dropper,
|
||||||
"/obj/item/weapon/screwdriver",
|
/obj/item/weapon/screwdriver,
|
||||||
"/obj/item/weapon/stamp")
|
/obj/item/weapon/stamp)
|
||||||
slot_flags = SLOT_ID
|
slot_flags = SLOT_ID
|
||||||
|
|
||||||
var/obj/item/weapon/card/id/front_id = null
|
var/obj/item/weapon/card/id/front_id = null
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
|
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
if(!istype(M, /mob/living/carbon/human))
|
if(!istype(M, /mob/living/carbon/human))
|
||||||
|
|||||||
@@ -16,14 +16,30 @@
|
|||||||
var/damtype = "brute"
|
var/damtype = "brute"
|
||||||
var/force = 0
|
var/force = 0
|
||||||
|
|
||||||
/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
|
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state)
|
||||||
// Calling Topic without a corresponding window open causes runtime errors
|
// Calling Topic without a corresponding window open causes runtime errors
|
||||||
if(!nowindow && ..())
|
if(!nowindow && ..())
|
||||||
return 1
|
return 1
|
||||||
if(usr.can_interact_with_interface(src, checkrange) != STATUS_INTERACTIVE)
|
|
||||||
return 1
|
if(!custom_state)
|
||||||
add_fingerprint(usr)
|
custom_state = default_state
|
||||||
return 0
|
|
||||||
|
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
|
||||||
|
// Instead any such checks are made in CanUseTopic()
|
||||||
|
var/obj/host = nano_host()
|
||||||
|
if(host.CanUseTopic(usr, href_list, custom_state) == STATUS_INTERACTIVE)
|
||||||
|
CouldUseTopic(usr)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
CouldNotUseTopic(usr)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/proc/CouldUseTopic(var/mob/user)
|
||||||
|
var/atom/host = nano_host()
|
||||||
|
host.add_fingerprint(user)
|
||||||
|
|
||||||
|
/obj/proc/CouldNotUseTopic(var/mob/user)
|
||||||
|
// Nada
|
||||||
|
|
||||||
/obj/item/proc/is_used_on(obj/O, mob/user)
|
/obj/item/proc/is_used_on(obj/O, mob/user)
|
||||||
|
|
||||||
|
|||||||
@@ -113,3 +113,130 @@
|
|||||||
prob(2);/obj/item/weapon/storage/belt/utility,\
|
prob(2);/obj/item/weapon/storage/belt/utility,\
|
||||||
prob(5);/obj/random/tool,\
|
prob(5);/obj/random/tool,\
|
||||||
prob(2);/obj/item/weapon/tape_roll)
|
prob(2);/obj/item/weapon/tape_roll)
|
||||||
|
|
||||||
|
/obj/random/medical
|
||||||
|
name = "Random Medicine"
|
||||||
|
desc = "This is a random medical item."
|
||||||
|
icon = 'icons/obj/items.dmi'
|
||||||
|
icon_state = "brutepack"
|
||||||
|
spawn_nothing_percentage = 25
|
||||||
|
item_to_spawn()
|
||||||
|
return pick(prob(4);/obj/item/stack/medical/bruise_pack,\
|
||||||
|
prob(4);/obj/item/stack/medical/ointment,\
|
||||||
|
prob(2);/obj/item/stack/medical/advanced/bruise_pack,\
|
||||||
|
prob(2);/obj/item/stack/medical/advanced/ointment,\
|
||||||
|
prob(1);/obj/item/stack/medical/splint,\
|
||||||
|
prob(2);/obj/item/bodybag,\
|
||||||
|
prob(1);/obj/item/bodybag/cryobag,\
|
||||||
|
prob(2);/obj/item/weapon/storage/pill_bottle/kelotane,\
|
||||||
|
prob(2);/obj/item/weapon/storage/pill_bottle/antitox,\
|
||||||
|
prob(2);/obj/item/weapon/storage/pill_bottle/tramadol,\
|
||||||
|
prob(2);/obj/item/weapon/reagent_containers/syringe/antitoxin,\
|
||||||
|
prob(1);/obj/item/weapon/reagent_containers/syringe/antiviral,\
|
||||||
|
prob(2);/obj/item/weapon/reagent_containers/syringe/inaprovaline,\
|
||||||
|
prob(1);/obj/item/stack/nanopaste)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/random/firstaid
|
||||||
|
name = "Random First Aid Kit"
|
||||||
|
desc = "This is a random first aid kit."
|
||||||
|
icon = 'icons/obj/storage.dmi'
|
||||||
|
icon_state = "firstaid"
|
||||||
|
item_to_spawn()
|
||||||
|
return pick(prob(3);/obj/item/weapon/storage/firstaid/regular,\
|
||||||
|
prob(2);/obj/item/weapon/storage/firstaid/toxin,\
|
||||||
|
prob(2);/obj/item/weapon/storage/firstaid/o2,\
|
||||||
|
prob(1);/obj/item/weapon/storage/firstaid/adv,\
|
||||||
|
prob(2);/obj/item/weapon/storage/firstaid/fire)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/random/contraband
|
||||||
|
name = "Random Illegal Item"
|
||||||
|
desc = "Hot Stuff."
|
||||||
|
icon = 'icons/obj/items.dmi'
|
||||||
|
icon_state = "purplecomb"
|
||||||
|
spawn_nothing_percentage = 50
|
||||||
|
item_to_spawn()
|
||||||
|
return pick(prob(3);/obj/item/weapon/storage/pill_bottle/tramadol,\
|
||||||
|
prob(4);/obj/item/weapon/haircomb/fluff/cado_keppel_1,\
|
||||||
|
prob(2);/obj/item/weapon/storage/pill_bottle/happy,\
|
||||||
|
prob(2);/obj/item/weapon/storage/pill_bottle/zoom,\
|
||||||
|
prob(5);/obj/item/weapon/contraband/poster,\
|
||||||
|
prob(2);/obj/item/weapon/butterfly,\
|
||||||
|
prob(3);/obj/item/butterflyblade,\
|
||||||
|
prob(3);/obj/item/butterflyhandle,\
|
||||||
|
prob(3);/obj/item/weapon/wirerod,\
|
||||||
|
prob(1);/obj/item/weapon/butterfly/switchblade,\
|
||||||
|
prob(1);/obj/item/weapon/reagent_containers/syringe/drugs)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/random/armory
|
||||||
|
name = "Random Armory Weapon"
|
||||||
|
desc = "This is a random security weapon."
|
||||||
|
icon = 'icons/obj/gun.dmi'
|
||||||
|
icon_state = "energykill100"
|
||||||
|
item_to_spawn()
|
||||||
|
return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,\
|
||||||
|
prob(2);/obj/item/weapon/gun/energy/ionrifle,\
|
||||||
|
prob(2);/obj/item/weapon/gun/projectile/automatic/wt550,\
|
||||||
|
prob(1);/obj/item/weapon/gun/projectile/automatic/z8,\
|
||||||
|
prob(2);/obj/item/weapon/gun/energy/laser,\
|
||||||
|
prob(1);/obj/item/weapon/gun/energy/gun,\
|
||||||
|
prob(3);/obj/item/weapon/gun/projectile/sec,\
|
||||||
|
prob(2);/obj/item/weapon/gun/projectile/sec/wood,\
|
||||||
|
prob(3);/obj/item/weapon/gun/energy/taser,\
|
||||||
|
prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/random/ammo
|
||||||
|
name = "Random Ammunition"
|
||||||
|
desc = "This is random ammunition."
|
||||||
|
icon = 'icons/obj/ammo.dmi'
|
||||||
|
icon_state = "45-10"
|
||||||
|
item_to_spawn()
|
||||||
|
return pick(prob(3);/obj/item/weapon/storage/box/beanbags,\
|
||||||
|
prob(1);/obj/item/weapon/storage/box/shotgunammo,\
|
||||||
|
prob(2);/obj/item/weapon/storage/box/shotgunshells,\
|
||||||
|
prob(2);/obj/item/weapon/storage/box/stunshells,\
|
||||||
|
prob(1);/obj/item/ammo_magazine/c45m,\
|
||||||
|
prob(2);/obj/item/ammo_magazine/c45m/rubber,\
|
||||||
|
prob(2);/obj/item/ammo_magazine/c45m/flash,\
|
||||||
|
prob(1);/obj/item/ammo_magazine/mc9mmt,\
|
||||||
|
prob(3);/obj/item/ammo_magazine/mc9mmt/rubber,\
|
||||||
|
prob(2);/obj/item/ammo_magazine/a556)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/random/armor
|
||||||
|
name = "Random Armor"
|
||||||
|
desc = "This is a random armor vest."
|
||||||
|
icon = 'icons/obj/clothing/suits.dmi'
|
||||||
|
icon_state = "kvest"
|
||||||
|
item_to_spawn()
|
||||||
|
return pick(prob(4);/obj/item/clothing/suit/storage/vest,\
|
||||||
|
prob(3);/obj/item/clothing/suit/storage/vest/officer,\
|
||||||
|
prob(3);/obj/item/clothing/suit/storage/vest/warden,\
|
||||||
|
prob(3);/obj/item/clothing/suit/storage/vest/hos,\
|
||||||
|
prob(2);/obj/item/clothing/suit/storage/vest/pcrc,\
|
||||||
|
prob(1);/obj/item/clothing/suit/storage/vest/detective,\
|
||||||
|
prob(2);/obj/item/clothing/suit/storage/vest/heavy,\
|
||||||
|
prob(2);/obj/item/clothing/suit/storage/vest/heavy/officer,\
|
||||||
|
prob(2);/obj/item/clothing/suit/storage/vest/heavy/warden,\
|
||||||
|
prob(2);/obj/item/clothing/suit/storage/vest/heavy/hos,\
|
||||||
|
prob(2);/obj/item/clothing/suit/storage/vest/heavy/pcrc)
|
||||||
|
|
||||||
|
/obj/random/plushie
|
||||||
|
name = "random plushie"
|
||||||
|
desc = "This is a random plushie."
|
||||||
|
icon = 'icons/obj/toy.dmi'
|
||||||
|
icon_state = "nymphplushie"
|
||||||
|
item_to_spawn()
|
||||||
|
return pick(/obj/structure/plushie/ian,\
|
||||||
|
/obj/structure/plushie/drone,\
|
||||||
|
/obj/structure/plushie/carp,\
|
||||||
|
/obj/structure/plushie/beepsky,\
|
||||||
|
/obj/item/toy/plushie/nymph,\
|
||||||
|
/obj/item/toy/plushie/mouse,\
|
||||||
|
/obj/item/toy/plushie/kitten,\
|
||||||
|
/obj/item/toy/plushie/lizard)
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@
|
|||||||
|
|
||||||
/obj/structure/closet/lasertag/red/New()
|
/obj/structure/closet/lasertag/red/New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
new /obj/item/weapon/gun/energy/lasertag/red(src)
|
||||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
new /obj/item/weapon/gun/energy/lasertag/red(src)
|
||||||
new /obj/item/clothing/suit/redtag(src)
|
new /obj/item/clothing/suit/redtag(src)
|
||||||
new /obj/item/clothing/suit/redtag(src)
|
new /obj/item/clothing/suit/redtag(src)
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
/obj/structure/closet/lasertag/blue/New()
|
/obj/structure/closet/lasertag/blue/New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
new /obj/item/weapon/gun/energy/lasertag/blue(src)
|
||||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
new /obj/item/weapon/gun/energy/lasertag/blue(src)
|
||||||
new /obj/item/clothing/suit/bluetag(src)
|
new /obj/item/clothing/suit/bluetag(src)
|
||||||
new /obj/item/clothing/suit/bluetag(src)
|
new /obj/item/clothing/suit/bluetag(src)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
new /obj/item/clothing/suit/captunic/capjacket(src)
|
new /obj/item/clothing/suit/captunic/capjacket(src)
|
||||||
new /obj/item/clothing/head/helmet/cap(src)
|
new /obj/item/clothing/head/helmet/cap(src)
|
||||||
new /obj/item/clothing/under/rank/captain(src)
|
new /obj/item/clothing/under/rank/captain(src)
|
||||||
new /obj/item/clothing/suit/armor/vest(src)
|
new /obj/item/clothing/suit/storage/vest(src)
|
||||||
new /obj/item/weapon/cartridge/captain(src)
|
new /obj/item/weapon/cartridge/captain(src)
|
||||||
new /obj/item/clothing/head/helmet/swat(src)
|
new /obj/item/clothing/head/helmet/swat(src)
|
||||||
new /obj/item/clothing/shoes/brown(src)
|
new /obj/item/clothing/shoes/brown(src)
|
||||||
@@ -47,13 +47,14 @@
|
|||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/clothing/glasses/sunglasses(src)
|
new /obj/item/clothing/glasses/sunglasses(src)
|
||||||
new /obj/item/clothing/suit/armor/vest(src)
|
new /obj/item/clothing/suit/storage/vest(src)
|
||||||
new /obj/item/clothing/head/helmet(src)
|
new /obj/item/clothing/head/helmet(src)
|
||||||
new /obj/item/weapon/cartridge/hop(src)
|
new /obj/item/weapon/cartridge/hop(src)
|
||||||
new /obj/item/device/radio/headset/heads/hop(src)
|
new /obj/item/device/radio/headset/heads/hop(src)
|
||||||
new /obj/item/weapon/storage/box/ids(src)
|
new /obj/item/weapon/storage/box/ids(src)
|
||||||
new /obj/item/weapon/storage/box/ids( src )
|
new /obj/item/weapon/storage/box/ids( src )
|
||||||
new /obj/item/weapon/gun/energy/gun(src)
|
new /obj/item/weapon/gun/energy/gun(src)
|
||||||
|
new /obj/item/weapon/gun/projectile/colt/flash(src)
|
||||||
new /obj/item/device/flash(src)
|
new /obj/item/device/flash(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@
|
|||||||
else
|
else
|
||||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||||
new /obj/item/clothing/head/helmet/HoS(src)
|
new /obj/item/clothing/head/helmet/HoS(src)
|
||||||
new /obj/item/clothing/suit/armor/vest(src)
|
new /obj/item/clothing/suit/storage/vest/hos(src)
|
||||||
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
|
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
|
||||||
new /obj/item/clothing/under/rank/head_of_security/corp(src)
|
new /obj/item/clothing/under/rank/head_of_security/corp(src)
|
||||||
new /obj/item/clothing/suit/armor/hos/jensen(src)
|
new /obj/item/clothing/suit/armor/hos/jensen(src)
|
||||||
@@ -143,12 +144,12 @@
|
|||||||
new /obj/item/weapon/storage/backpack/security(src)
|
new /obj/item/weapon/storage/backpack/security(src)
|
||||||
else
|
else
|
||||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
new /obj/item/clothing/suit/storage/vest/warden(src)
|
||||||
new /obj/item/clothing/under/rank/warden(src)
|
new /obj/item/clothing/under/rank/warden(src)
|
||||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||||
new /obj/item/clothing/head/helmet/warden(src)
|
new /obj/item/clothing/head/helmet/warden(src)
|
||||||
// new /obj/item/weapon/cartridge/security(src)
|
new /obj/item/weapon/cartridge/security(src)
|
||||||
new /obj/item/device/radio/headset/headset_sec(src)
|
new /obj/item/device/radio/headset/headset_sec(src)
|
||||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||||
new /obj/item/taperoll/police(src)
|
new /obj/item/taperoll/police(src)
|
||||||
@@ -159,6 +160,7 @@
|
|||||||
new /obj/item/weapon/gun/energy/taser(src)
|
new /obj/item/weapon/gun/energy/taser(src)
|
||||||
new /obj/item/weapon/storage/box/holobadge(src)
|
new /obj/item/weapon/storage/box/holobadge(src)
|
||||||
new /obj/item/clothing/head/beret/sec/warden(src)
|
new /obj/item/clothing/head/beret/sec/warden(src)
|
||||||
|
new /obj/item/weapon/gun/projectile/shotgun/pump(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -179,7 +181,7 @@
|
|||||||
new /obj/item/weapon/storage/backpack/security(src)
|
new /obj/item/weapon/storage/backpack/security(src)
|
||||||
else
|
else
|
||||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
new /obj/item/clothing/suit/storage/vest/officer(src)
|
||||||
new /obj/item/clothing/head/helmet(src)
|
new /obj/item/clothing/head/helmet(src)
|
||||||
// new /obj/item/weapon/cartridge/security(src)
|
// new /obj/item/weapon/cartridge/security(src)
|
||||||
new /obj/item/device/radio/headset/headset_sec(src)
|
new /obj/item/device/radio/headset/headset_sec(src)
|
||||||
@@ -195,6 +197,8 @@
|
|||||||
new /obj/item/clothing/accessory/storage/black_vest(src)
|
new /obj/item/clothing/accessory/storage/black_vest(src)
|
||||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||||
new /obj/item/clothing/under/rank/security/corp(src)
|
new /obj/item/clothing/under/rank/security/corp(src)
|
||||||
|
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||||
|
new /obj/item/weapon/gun/projectile/sec(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -257,11 +261,11 @@
|
|||||||
new /obj/item/weapon/storage/box/evidence(src)
|
new /obj/item/weapon/storage/box/evidence(src)
|
||||||
new /obj/item/device/radio/headset/headset_sec(src)
|
new /obj/item/device/radio/headset/headset_sec(src)
|
||||||
new /obj/item/device/detective_scanner(src)
|
new /obj/item/device/detective_scanner(src)
|
||||||
new /obj/item/clothing/suit/armor/det_suit(src)
|
new /obj/item/clothing/suit/storage/vest/detective(src)
|
||||||
new /obj/item/ammo_magazine/c45r(src)
|
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||||
new /obj/item/ammo_magazine/c45r(src)
|
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||||
new /obj/item/taperoll/police(src)
|
new /obj/item/taperoll/police(src)
|
||||||
new /obj/item/weapon/gun/projectile/detective/semiauto(src)
|
new /obj/item/weapon/gun/projectile/colt/detective(src)
|
||||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -28,11 +28,15 @@
|
|||||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||||
new /obj/item/clothing/mask/breath(src)
|
new /obj/item/clothing/mask/breath(src)
|
||||||
new /obj/item/clothing/mask/breath(src)
|
new /obj/item/clothing/mask/breath(src)
|
||||||
|
new /obj/item/clothing/suit/space/emergency(src)
|
||||||
|
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||||
if ("aid")
|
if ("aid")
|
||||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||||
new /obj/item/weapon/storage/toolbox/emergency(src)
|
new /obj/item/weapon/storage/toolbox/emergency(src)
|
||||||
new /obj/item/clothing/mask/breath(src)
|
new /obj/item/clothing/mask/breath(src)
|
||||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||||
|
new /obj/item/clothing/suit/space/emergency(src)
|
||||||
|
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||||
if ("tank")
|
if ("tank")
|
||||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||||
new /obj/item/clothing/mask/breath(src)
|
new /obj/item/clothing/mask/breath(src)
|
||||||
@@ -43,6 +47,10 @@
|
|||||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||||
new /obj/item/clothing/mask/breath(src)
|
new /obj/item/clothing/mask/breath(src)
|
||||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||||
|
new /obj/item/clothing/suit/space/emergency(src)
|
||||||
|
new /obj/item/clothing/suit/space/emergency(src)
|
||||||
|
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||||
|
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||||
if ("nothing")
|
if ("nothing")
|
||||||
// doot
|
// doot
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
break
|
break
|
||||||
if(O.density || O.anchored || istype(O,/obj/structure/closet))
|
if(O.density || O.anchored || istype(O,/obj/structure/closet))
|
||||||
continue
|
continue
|
||||||
if(istype(O, /obj/structure/stool/bed)) //This is only necessary because of rollerbeds and swivel chairs.
|
if(istype(O, /obj/structure/bed)) //This is only necessary because of rollerbeds and swivel chairs.
|
||||||
var/obj/structure/stool/bed/B = O
|
var/obj/structure/bed/B = O
|
||||||
if(B.buckled_mob)
|
if(B.buckled_mob)
|
||||||
continue
|
continue
|
||||||
O.loc = src
|
O.loc = src
|
||||||
@@ -341,8 +341,10 @@
|
|||||||
|
|
||||||
/obj/structure/closet/crate/freezer/rations/New()
|
/obj/structure/closet/crate/freezer/rations/New()
|
||||||
..()
|
..()
|
||||||
new /obj/item/weapon/storage/box/donkpockets(src)
|
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
|
||||||
new /obj/item/weapon/storage/box/donkpockets(src)
|
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
|
||||||
|
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
|
||||||
|
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
|
||||||
|
|
||||||
/obj/structure/closet/crate/bin
|
/obj/structure/closet/crate/bin
|
||||||
name = "large bin"
|
name = "large bin"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/obj/structure/stool/bed/chair/e_chair
|
/obj/structure/bed/chair/e_chair
|
||||||
name = "electric chair"
|
name = "electric chair"
|
||||||
desc = "Looks absolutely SHOCKING!"
|
desc = "Looks absolutely SHOCKING!"
|
||||||
icon_state = "echair0"
|
icon_state = "echair0"
|
||||||
@@ -6,14 +6,14 @@
|
|||||||
var/obj/item/assembly/shock_kit/part = null
|
var/obj/item/assembly/shock_kit/part = null
|
||||||
var/last_time = 1.0
|
var/last_time = 1.0
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/e_chair/New()
|
/obj/structure/bed/chair/e_chair/New()
|
||||||
..()
|
..()
|
||||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W, /obj/item/weapon/wrench))
|
if(istype(W, /obj/item/weapon/wrench))
|
||||||
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(loc)
|
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
|
||||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
C.set_dir(dir)
|
C.set_dir(dir)
|
||||||
part.loc = loc
|
part.loc = loc
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
return
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/e_chair/verb/toggle()
|
/obj/structure/bed/chair/e_chair/verb/toggle()
|
||||||
set name = "Toggle Electric Chair"
|
set name = "Toggle Electric Chair"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
@@ -37,13 +37,13 @@
|
|||||||
usr << "<span class='notice'>You switch [on ? "on" : "off"] [src].</span>"
|
usr << "<span class='notice'>You switch [on ? "on" : "off"] [src].</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/e_chair/rotate()
|
/obj/structure/bed/chair/e_chair/rotate()
|
||||||
..()
|
..()
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
|
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/e_chair/proc/shock()
|
/obj/structure/bed/chair/e_chair/proc/shock()
|
||||||
if(!on)
|
if(!on)
|
||||||
return
|
return
|
||||||
if(last_time + 50 > world.time)
|
if(last_time + 50 > world.time)
|
||||||
|
|||||||
@@ -253,6 +253,7 @@
|
|||||||
icon_state = "inf_box"
|
icon_state = "inf_box"
|
||||||
item_state = "syringe_kit"
|
item_state = "syringe_kit"
|
||||||
max_combined_w_class = 21
|
max_combined_w_class = 21
|
||||||
|
can_hold = list(/obj/item/inflatable)
|
||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
|
|
||||||
|
|
||||||
//old style retardo-cart
|
//old style retardo-cart
|
||||||
/obj/structure/stool/bed/chair/janicart
|
/obj/structure/bed/chair/janicart
|
||||||
name = "janicart"
|
name = "janicart"
|
||||||
icon = 'icons/obj/vehicles.dmi'
|
icon = 'icons/obj/vehicles.dmi'
|
||||||
icon_state = "pussywagon"
|
icon_state = "pussywagon"
|
||||||
@@ -169,12 +169,12 @@
|
|||||||
var/callme = "pimpin' ride" //how do people refer to it?
|
var/callme = "pimpin' ride" //how do people refer to it?
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/New()
|
/obj/structure/bed/chair/janicart/New()
|
||||||
create_reagents(100)
|
create_reagents(100)
|
||||||
update_layer()
|
update_layer()
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
|
/obj/structure/bed/chair/janicart/examine(mob/user)
|
||||||
if(!..(user, 1))
|
if(!..(user, 1))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
user << "\A [mybag] is hanging on the [callme]."
|
user << "\A [mybag] is hanging on the [callme]."
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||||
if(istype(I, /obj/item/weapon/mop))
|
if(istype(I, /obj/item/weapon/mop))
|
||||||
if(reagents.total_volume > 1)
|
if(reagents.total_volume > 1)
|
||||||
reagents.trans_to(I, 2)
|
reagents.trans_to(I, 2)
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
mybag = I
|
mybag = I
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
|
/obj/structure/bed/chair/janicart/attack_hand(mob/user)
|
||||||
if(mybag)
|
if(mybag)
|
||||||
mybag.loc = get_turf(user)
|
mybag.loc = get_turf(user)
|
||||||
user.put_in_hands(mybag)
|
user.put_in_hands(mybag)
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
|
/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
|
||||||
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
||||||
unbuckle_mob()
|
unbuckle_mob()
|
||||||
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
|
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
|
||||||
@@ -219,26 +219,26 @@
|
|||||||
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
|
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/Move()
|
/obj/structure/bed/chair/janicart/Move()
|
||||||
..()
|
..()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
if(buckled_mob.buckled == src)
|
if(buckled_mob.buckled == src)
|
||||||
buckled_mob.loc = loc
|
buckled_mob.loc = loc
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/post_buckle_mob(mob/living/M)
|
/obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M)
|
||||||
update_mob()
|
update_mob()
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/update_layer()
|
/obj/structure/bed/chair/janicart/update_layer()
|
||||||
if(dir == SOUTH)
|
if(dir == SOUTH)
|
||||||
layer = FLY_LAYER
|
layer = FLY_LAYER
|
||||||
else
|
else
|
||||||
layer = OBJ_LAYER
|
layer = OBJ_LAYER
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/unbuckle_mob()
|
/obj/structure/bed/chair/janicart/unbuckle_mob()
|
||||||
var/mob/living/M = ..()
|
var/mob/living/M = ..()
|
||||||
if(M)
|
if(M)
|
||||||
M.pixel_x = 0
|
M.pixel_x = 0
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
return M
|
return M
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/set_dir()
|
/obj/structure/bed/chair/janicart/set_dir()
|
||||||
..()
|
..()
|
||||||
update_layer()
|
update_layer()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
update_mob()
|
update_mob()
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
|
/obj/structure/bed/chair/janicart/proc/update_mob()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
buckled_mob.set_dir(dir)
|
buckled_mob.set_dir(dir)
|
||||||
switch(dir)
|
switch(dir)
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
buckled_mob.pixel_y = 7
|
buckled_mob.pixel_y = 7
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
|
/obj/structure/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
if(prob(85))
|
if(prob(85))
|
||||||
return buckled_mob.bullet_act(Proj)
|
return buckled_mob.bullet_act(Proj)
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
|
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
|
||||||
#define NEST_RESIST_TIME 1200
|
#define NEST_RESIST_TIME 1200
|
||||||
|
|
||||||
/obj/structure/stool/bed/nest
|
/obj/structure/bed/nest
|
||||||
name = "alien nest"
|
name = "alien nest"
|
||||||
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
|
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
|
||||||
icon = 'icons/mob/alien.dmi'
|
icon = 'icons/mob/alien.dmi'
|
||||||
icon_state = "nest"
|
icon_state = "nest"
|
||||||
var/health = 100
|
var/health = 100
|
||||||
|
|
||||||
/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/user as mob)
|
/obj/structure/bed/nest/user_unbuckle_mob(mob/user as mob)
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
if(buckled_mob.buckled == src)
|
if(buckled_mob.buckled == src)
|
||||||
if(buckled_mob != user)
|
if(buckled_mob != user)
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
|
/obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
|
||||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
var/aforce = W.force
|
var/aforce = W.force
|
||||||
health = max(0, health - aforce)
|
health = max(0, health - aforce)
|
||||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
M.show_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
|
M.show_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|
||||||
/obj/structure/stool/bed/nest/proc/healthcheck()
|
/obj/structure/bed/nest/proc/healthcheck()
|
||||||
if(health <=0)
|
if(health <=0)
|
||||||
density = 0
|
density = 0
|
||||||
del(src)
|
del(src)
|
||||||
|
|||||||
@@ -7,119 +7,63 @@
|
|||||||
/*
|
/*
|
||||||
* Beds
|
* Beds
|
||||||
*/
|
*/
|
||||||
/obj/structure/stool/bed
|
/obj/structure/bed
|
||||||
name = "bed"
|
name = "bed"
|
||||||
desc = "This is used to lie in, sleep in or strap on."
|
desc = "This is used to lie in, sleep in or strap on."
|
||||||
|
icon = 'icons/obj/objects.dmi'
|
||||||
icon_state = "bed"
|
icon_state = "bed"
|
||||||
|
pressure_resistance = 15
|
||||||
|
anchored = 1
|
||||||
can_buckle = 1
|
can_buckle = 1
|
||||||
buckle_lying = 1
|
buckle_lying = 1
|
||||||
//var/mob/living/buckled_mob
|
|
||||||
//var/movable = 0 // For mobility checks
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/psych
|
/obj/structure/bed/ex_act(severity)
|
||||||
|
switch(severity)
|
||||||
|
if(1.0)
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
if(2.0)
|
||||||
|
if (prob(50))
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
if(3.0)
|
||||||
|
if (prob(5))
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/structure/bed/blob_act()
|
||||||
|
if(prob(75))
|
||||||
|
new /obj/item/stack/sheet/metal(src.loc)
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
if(istype(W, /obj/item/weapon/wrench))
|
||||||
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
|
new /obj/item/stack/sheet/metal(src.loc)
|
||||||
|
del(src)
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/structure/bed/psych
|
||||||
name = "psychiatrists couch"
|
name = "psychiatrists couch"
|
||||||
desc = "For prime comfort during psychiatric evaluations."
|
desc = "For prime comfort during psychiatric evaluations."
|
||||||
icon_state = "psychbed"
|
icon_state = "psychbed"
|
||||||
|
|
||||||
/obj/structure/stool/bed/alien
|
/obj/structure/bed/alien
|
||||||
name = "resting contraption"
|
name = "resting contraption"
|
||||||
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
||||||
icon_state = "abed"
|
icon_state = "abed"
|
||||||
|
|
||||||
/*/obj/structure/stool/bed/Del()
|
|
||||||
unbuckle()
|
|
||||||
..()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/attack_hand(mob/user as mob)
|
|
||||||
manual_unbuckle(user)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/MouseDrop(atom/over_object)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
|
|
||||||
if(!istype(M)) return
|
|
||||||
buckle_mob(M, user)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/proc/unbuckle()
|
|
||||||
if(buckled_mob)
|
|
||||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
|
||||||
buckled_mob.buckled = null
|
|
||||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
|
||||||
buckled_mob.update_canmove()
|
|
||||||
|
|
||||||
var/M = buckled_mob
|
|
||||||
buckled_mob = null
|
|
||||||
|
|
||||||
afterbuckle(M)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
|
|
||||||
if(buckled_mob)
|
|
||||||
if(buckled_mob.buckled == src)
|
|
||||||
if(buckled_mob != user)
|
|
||||||
buckled_mob.visible_message(\
|
|
||||||
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
|
|
||||||
"You were unbuckled from [src] by [user.name].",\
|
|
||||||
"You hear metal clanking")
|
|
||||||
else
|
|
||||||
buckled_mob.visible_message(\
|
|
||||||
"\blue [buckled_mob.name] unbuckled \himself!",\
|
|
||||||
"You unbuckle yourself from [src].",\
|
|
||||||
"You hear metal clanking")
|
|
||||||
unbuckle()
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
|
||||||
if (!ticker)
|
|
||||||
user << "You can't buckle anyone in before the game starts."
|
|
||||||
if (!ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
|
|
||||||
return
|
|
||||||
|
|
||||||
if (istype(M, /mob/living/carbon/slime))
|
|
||||||
user << "The [M] is too squishy to buckle in."
|
|
||||||
return
|
|
||||||
|
|
||||||
unbuckle()
|
|
||||||
|
|
||||||
if (M == usr)
|
|
||||||
M.visible_message(\
|
|
||||||
"\blue [M.name] buckles in!",\
|
|
||||||
"You buckle yourself to [src].",\
|
|
||||||
"You hear metal clanking")
|
|
||||||
else
|
|
||||||
M.visible_message(\
|
|
||||||
"\blue [M.name] is buckled in to [src] by [user.name]!",\
|
|
||||||
"You are buckled in to [src] by [user.name].",\
|
|
||||||
"You hear metal clanking")
|
|
||||||
M.buckled = src
|
|
||||||
M.loc = src.loc
|
|
||||||
M.set_dir(src.dir)
|
|
||||||
M.update_canmove()
|
|
||||||
src.buckled_mob = M
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
afterbuckle(M)
|
|
||||||
return*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Roller beds
|
* Roller beds
|
||||||
*/
|
*/
|
||||||
/obj/structure/stool/bed/roller
|
/obj/structure/bed/roller
|
||||||
name = "roller bed"
|
name = "roller bed"
|
||||||
icon = 'icons/obj/rollerbed.dmi'
|
icon = 'icons/obj/rollerbed.dmi'
|
||||||
icon_state = "down"
|
icon_state = "down"
|
||||||
anchored = 0
|
anchored = 0
|
||||||
|
|
||||||
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W,/obj/item/roller_holder))
|
if(istype(W,/obj/item/roller_holder))
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
user_unbuckle_mob(user)
|
user_unbuckle_mob(user)
|
||||||
@@ -139,7 +83,7 @@
|
|||||||
w_class = 4.0 // Can't be put in backpacks. Oh well.
|
w_class = 4.0 // Can't be put in backpacks. Oh well.
|
||||||
|
|
||||||
/obj/item/roller/attack_self(mob/user)
|
/obj/item/roller/attack_self(mob/user)
|
||||||
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
|
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||||
R.add_fingerprint(user)
|
R.add_fingerprint(user)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
@@ -173,13 +117,13 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
user << "\blue You deploy the roller bed."
|
user << "\blue You deploy the roller bed."
|
||||||
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
|
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||||
R.add_fingerprint(user)
|
R.add_fingerprint(user)
|
||||||
del(held)
|
del(held)
|
||||||
held = null
|
held = null
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/roller/Move()
|
/obj/structure/bed/roller/Move()
|
||||||
..()
|
..()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
if(buckled_mob.buckled == src)
|
if(buckled_mob.buckled == src)
|
||||||
@@ -187,7 +131,7 @@
|
|||||||
else
|
else
|
||||||
buckled_mob = null
|
buckled_mob = null
|
||||||
|
|
||||||
/obj/structure/stool/bed/roller/post_buckle_mob(mob/living/M as mob)
|
/obj/structure/bed/roller/post_buckle_mob(mob/living/M as mob)
|
||||||
if(M == buckled_mob)
|
if(M == buckled_mob)
|
||||||
M.pixel_y = 6
|
M.pixel_y = 6
|
||||||
M.old_y = 6
|
M.old_y = 6
|
||||||
@@ -201,7 +145,7 @@
|
|||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
|
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||||
..()
|
..()
|
||||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||||
if(!ishuman(usr)) return
|
if(!ishuman(usr)) return
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
|
/obj/structure/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
|
||||||
name = "chair"
|
name = "chair"
|
||||||
desc = "You sit in this. Either by will or force."
|
desc = "You sit in this. Either by will or force."
|
||||||
icon_state = "chair"
|
icon_state = "chair"
|
||||||
@@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/New()
|
/obj/structure/bed/chair/New()
|
||||||
..()
|
..()
|
||||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||||
update_layer()
|
update_layer()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
if(istype(W, /obj/item/assembly/shock_kit))
|
if(istype(W, /obj/item/assembly/shock_kit))
|
||||||
var/obj/item/assembly/shock_kit/SK = W
|
var/obj/item/assembly/shock_kit/SK = W
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
user << "<span class='notice'>[SK] is not ready to be attached!</span>"
|
user << "<span class='notice'>[SK] is not ready to be attached!</span>"
|
||||||
return
|
return
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
|
var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
|
||||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
E.set_dir(dir)
|
E.set_dir(dir)
|
||||||
E.part = SK
|
E.part = SK
|
||||||
@@ -28,26 +28,26 @@
|
|||||||
SK.master = E
|
SK.master = E
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/attack_tk(mob/user as mob)
|
/obj/structure/bed/chair/attack_tk(mob/user as mob)
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
..()
|
..()
|
||||||
else
|
else
|
||||||
rotate()
|
rotate()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/proc/update_layer()
|
/obj/structure/bed/chair/proc/update_layer()
|
||||||
if(src.dir == NORTH)
|
if(src.dir == NORTH)
|
||||||
src.layer = FLY_LAYER
|
src.layer = FLY_LAYER
|
||||||
else
|
else
|
||||||
src.layer = OBJ_LAYER
|
src.layer = OBJ_LAYER
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/set_dir()
|
/obj/structure/bed/chair/set_dir()
|
||||||
..()
|
..()
|
||||||
update_layer()
|
update_layer()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
buckled_mob.set_dir(dir)
|
buckled_mob.set_dir(dir)
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/verb/rotate()
|
/obj/structure/bed/chair/verb/rotate()
|
||||||
set name = "Rotate Chair"
|
set name = "Rotate Chair"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
@@ -67,17 +67,17 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
// Chair types
|
// Chair types
|
||||||
/obj/structure/stool/bed/chair/wood/normal
|
/obj/structure/bed/chair/wood/normal
|
||||||
icon_state = "wooden_chair"
|
icon_state = "wooden_chair"
|
||||||
name = "wooden chair"
|
name = "wooden chair"
|
||||||
desc = "Old is never too old to not be in fashion."
|
desc = "Old is never too old to not be in fashion."
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wood/wings
|
/obj/structure/bed/chair/wood/wings
|
||||||
icon_state = "wooden_chair_wings"
|
icon_state = "wooden_chair_wings"
|
||||||
name = "wooden chair"
|
name = "wooden chair"
|
||||||
desc = "Old is never too old to not be in fashion."
|
desc = "Old is never too old to not be in fashion."
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W, /obj/item/weapon/wrench))
|
if(istype(W, /obj/item/weapon/wrench))
|
||||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
new /obj/item/stack/sheet/wood(src.loc)
|
new /obj/item/stack/sheet/wood(src.loc)
|
||||||
@@ -85,45 +85,45 @@
|
|||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy
|
/obj/structure/bed/chair/comfy
|
||||||
name = "comfy chair"
|
name = "comfy chair"
|
||||||
desc = "It looks comfy."
|
desc = "It looks comfy."
|
||||||
icon_state = "comfychair"
|
icon_state = "comfychair"
|
||||||
color = rgb(255,255,255)
|
color = rgb(255,255,255)
|
||||||
var/image/armrest = null
|
var/image/armrest = null
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/New()
|
/obj/structure/bed/chair/comfy/New()
|
||||||
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
||||||
armrest.layer = MOB_LAYER + 0.1
|
armrest.layer = MOB_LAYER + 0.1
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/post_buckle_mob()
|
/obj/structure/bed/chair/comfy/post_buckle_mob()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
overlays += armrest
|
overlays += armrest
|
||||||
else
|
else
|
||||||
overlays -= armrest
|
overlays -= armrest
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/brown
|
/obj/structure/bed/chair/comfy/brown
|
||||||
color = rgb(255,113,0)
|
color = rgb(255,113,0)
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/beige
|
/obj/structure/bed/chair/comfy/beige
|
||||||
color = rgb(255,253,195)
|
color = rgb(255,253,195)
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/teal
|
/obj/structure/bed/chair/comfy/teal
|
||||||
color = rgb(0,255,255)
|
color = rgb(0,255,255)
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/office
|
/obj/structure/bed/chair/office
|
||||||
anchored = 0
|
anchored = 0
|
||||||
buckle_movable = 1
|
buckle_movable = 1
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/black
|
/obj/structure/bed/chair/comfy/black
|
||||||
color = rgb(167,164,153)
|
color = rgb(167,164,153)
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/comfy/lime
|
/obj/structure/bed/chair/comfy/lime
|
||||||
color = rgb(255,251,0)
|
color = rgb(255,251,0)
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/office/Move()
|
/obj/structure/bed/chair/office/Move()
|
||||||
..()
|
..()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
var/mob/living/occupant = buckled_mob
|
var/mob/living/occupant = buckled_mob
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
else
|
else
|
||||||
unbuckle_mob()
|
unbuckle_mob()
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/office/Bump(atom/A)
|
/obj/structure/bed/chair/office/Bump(atom/A)
|
||||||
..()
|
..()
|
||||||
if(!buckled_mob) return
|
if(!buckled_mob) return
|
||||||
|
|
||||||
@@ -163,8 +163,8 @@
|
|||||||
victim.apply_damage(10, BRUTE, def_zone, blocked)
|
victim.apply_damage(10, BRUTE, def_zone, blocked)
|
||||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/office/light
|
/obj/structure/bed/chair/office/light
|
||||||
icon_state = "officechair_white"
|
icon_state = "officechair_white"
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/office/dark
|
/obj/structure/bed/chair/office/dark
|
||||||
icon_state = "officechair_dark"
|
icon_state = "officechair_dark"
|
||||||
|
|||||||
@@ -1,81 +1,11 @@
|
|||||||
/obj/structure/stool
|
/obj/item/weapon/stool
|
||||||
name = "stool"
|
name = "stool"
|
||||||
desc = "Apply butt."
|
desc = "Apply butt."
|
||||||
icon = 'icons/obj/objects.dmi'
|
icon = 'icons/obj/objects.dmi'
|
||||||
icon_state = "stool"
|
icon_state = "stool"
|
||||||
anchored = 1.0
|
|
||||||
pressure_resistance = 15
|
|
||||||
|
|
||||||
/obj/structure/stool/ex_act(severity)
|
|
||||||
switch(severity)
|
|
||||||
if(1.0)
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
if(2.0)
|
|
||||||
if (prob(50))
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
if(3.0)
|
|
||||||
if (prob(5))
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/blob_act()
|
|
||||||
if(prob(75))
|
|
||||||
new /obj/item/stack/sheet/metal(src.loc)
|
|
||||||
del(src)
|
|
||||||
|
|
||||||
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
||||||
if(istype(W, /obj/item/weapon/wrench))
|
|
||||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
|
||||||
new /obj/item/stack/sheet/metal(src.loc)
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/stool/MouseDrop(atom/over_object)
|
|
||||||
if(istype(over_object, /mob/living/carbon/human) && type == /obj/structure/stool) //i am sorry for this, but the inheritance mess requires it
|
|
||||||
var/mob/living/carbon/human/H = over_object
|
|
||||||
if (H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
|
|
||||||
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
|
|
||||||
S.origin = src
|
|
||||||
src.loc = S
|
|
||||||
H.put_in_hands(S)
|
|
||||||
H.visible_message("\red [H] grabs [src] from the floor!", "\red You grab [src] from the floor!")
|
|
||||||
return
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/obj/item/weapon/stool
|
|
||||||
name = "stool"
|
|
||||||
desc = "Uh-hoh, bar is heating up."
|
|
||||||
icon = 'icons/obj/objects.dmi'
|
|
||||||
icon_state = "stool"
|
|
||||||
force = 10
|
force = 10
|
||||||
throwforce = 10
|
throwforce = 10
|
||||||
w_class = 5.0
|
w_class = 5
|
||||||
var/obj/structure/stool/origin = null
|
|
||||||
|
|
||||||
/obj/item/weapon/stool/proc/deploy(var/mob/user)
|
|
||||||
|
|
||||||
if(!origin)
|
|
||||||
del src
|
|
||||||
|
|
||||||
origin.loc = get_turf(src)
|
|
||||||
|
|
||||||
if(user)
|
|
||||||
user.u_equip(src)
|
|
||||||
user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.")
|
|
||||||
|
|
||||||
del src
|
|
||||||
|
|
||||||
/obj/item/weapon/stool/dropped(mob/user as mob)
|
|
||||||
..()
|
|
||||||
if(istype(loc,/turf/))
|
|
||||||
deploy(user)
|
|
||||||
|
|
||||||
/obj/item/weapon/stool/attack_self(mob/user as mob)
|
|
||||||
..()
|
|
||||||
deploy(user)
|
|
||||||
|
|
||||||
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
||||||
if (prob(5) && istype(M,/mob/living))
|
if (prob(5) && istype(M,/mob/living))
|
||||||
@@ -89,3 +19,29 @@
|
|||||||
T.apply_damage(20)
|
T.apply_damage(20)
|
||||||
return
|
return
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
/obj/item/weapon/stool/ex_act(severity)
|
||||||
|
switch(severity)
|
||||||
|
if(1.0)
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
if(2.0)
|
||||||
|
if (prob(50))
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
if(3.0)
|
||||||
|
if (prob(5))
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/stool/blob_act()
|
||||||
|
if(prob(75))
|
||||||
|
new /obj/item/stack/sheet/metal(src.loc)
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
if(istype(W, /obj/item/weapon/wrench))
|
||||||
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
|
new /obj/item/stack/sheet/metal(src.loc)
|
||||||
|
del(src)
|
||||||
|
..()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/obj/structure/stool/bed/chair/wheelchair
|
/obj/structure/bed/chair/wheelchair
|
||||||
name = "wheelchair"
|
name = "wheelchair"
|
||||||
desc = "You sit in this. Either by will or force."
|
desc = "You sit in this. Either by will or force."
|
||||||
icon_state = "wheelchair"
|
icon_state = "wheelchair"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
var/bloodiness
|
var/bloodiness
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/set_dir()
|
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||||
..()
|
..()
|
||||||
overlays = null
|
overlays = null
|
||||||
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
buckled_mob.set_dir(dir)
|
buckled_mob.set_dir(dir)
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction)
|
/obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction)
|
||||||
// Redundant check?
|
// Redundant check?
|
||||||
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
||||||
if(user==pulling)
|
if(user==pulling)
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
create_track()
|
create_track()
|
||||||
driving = 0
|
driving = 0
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/Move()
|
/obj/structure/bed/chair/wheelchair/Move()
|
||||||
..()
|
..()
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
var/mob/living/occupant = buckled_mob
|
var/mob/living/occupant = buckled_mob
|
||||||
@@ -102,14 +102,14 @@
|
|||||||
if (occupant && (src.loc != occupant.loc))
|
if (occupant && (src.loc != occupant.loc))
|
||||||
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||||
if (pulling)
|
if (pulling)
|
||||||
MouseDrop(usr)
|
MouseDrop(usr)
|
||||||
else
|
else
|
||||||
user_unbuckle_mob(user)
|
user_unbuckle_mob(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||||
..()
|
..()
|
||||||
if(over_object == usr && in_range(src, usr))
|
if(over_object == usr && in_range(src, usr))
|
||||||
if(!ishuman(usr)) return
|
if(!ishuman(usr)) return
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
pulling = null
|
pulling = null
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/Bump(atom/A)
|
/obj/structure/bed/chair/wheelchair/Bump(atom/A)
|
||||||
..()
|
..()
|
||||||
if(!buckled_mob) return
|
if(!buckled_mob) return
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
else
|
else
|
||||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/proc/create_track()
|
/obj/structure/bed/chair/wheelchair/proc/create_track()
|
||||||
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
|
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
|
||||||
var/newdir = get_dir(get_step(loc, dir), loc)
|
var/newdir = get_dir(get_step(loc, dir), loc)
|
||||||
if(newdir == dir)
|
if(newdir == dir)
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
B.set_dir(newdir)
|
B.set_dir(newdir)
|
||||||
bloodiness--
|
bloodiness--
|
||||||
|
|
||||||
/obj/structure/stool/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
|
/obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
|
||||||
if(M == pulling)
|
if(M == pulling)
|
||||||
pulling = null
|
pulling = null
|
||||||
usr.pulledby = null
|
usr.pulledby = null
|
||||||
|
|||||||
34
code/game/objects/structures/under_wardrobe.dm
Normal file
34
code/game/objects/structures/under_wardrobe.dm
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/obj/structure/undies_wardrobe
|
||||||
|
name = "underwear wardrobe"
|
||||||
|
desc = "Holds item of clothing you shouldn't be showing off in the hallways."
|
||||||
|
icon = 'icons/obj/closet.dmi'
|
||||||
|
icon_state = "cabinet_closed"
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
|
||||||
|
src.add_fingerprint(user)
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
if(!ishuman(user) || (H.species && !(H.species.flags & HAS_UNDERWEAR)))
|
||||||
|
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
|
||||||
|
return 0
|
||||||
|
|
||||||
|
var/utype = alert("Which section do you want to pick from?",,"Male underwear", "Female underwear", "Undershirts")
|
||||||
|
var/list/selection
|
||||||
|
switch(utype)
|
||||||
|
if("Male underwear")
|
||||||
|
selection = underwear_m
|
||||||
|
if("Female underwear")
|
||||||
|
selection = underwear_f
|
||||||
|
if("Undershirts")
|
||||||
|
selection = undershirt_t
|
||||||
|
var/pick = input("Select the style") as null|anything in selection
|
||||||
|
if(pick)
|
||||||
|
if(get_dist(src,user) > 1)
|
||||||
|
return
|
||||||
|
if(utype == "Undershirts")
|
||||||
|
H.undershirt = undershirt_t[pick]
|
||||||
|
else
|
||||||
|
H.underwear = selection[pick]
|
||||||
|
H.update_body(1)
|
||||||
|
|
||||||
|
return 1
|
||||||
@@ -54,8 +54,8 @@ var/list/mechtoys = list(
|
|||||||
if(istype(A) && A.checkpass(PASSGLASS))
|
if(istype(A) && A.checkpass(PASSGLASS))
|
||||||
return prob(60)
|
return prob(60)
|
||||||
|
|
||||||
var/obj/structure/stool/bed/B = A
|
var/obj/structure/bed/B = A
|
||||||
if (istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
if (istype(A, /obj/structure/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if(istype(A, /obj/vehicle)) //no vehicles
|
if(istype(A, /obj/vehicle)) //no vehicles
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user