Merge remote-tracking branch 'upstream/dev' into subsystems

Conflicts:
	code/game/machinery/camera/camera.dm
	code/modules/mob/mob.dm
This commit is contained in:
PsiOmega
2015-02-17 08:36:12 +01:00
297 changed files with 11567 additions and 9431 deletions

1
.gitignore vendored
View File

@@ -4,4 +4,5 @@
*.rsc
*.dmb
*.lk
*.backup
data/

View File

@@ -384,7 +384,6 @@
#include "code\game\machinery\computer\computer.dm"
#include "code\game\machinery\computer\crew.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\medical.dm"
#include "code\game\machinery\computer\message.dm"
@@ -554,6 +553,7 @@
#include "code\game\objects\items\devices\pipe_painter.dm"
#include "code\game\objects\items\devices\powersink.dm"
#include "code\game\objects\items\devices\scanners.dm"
#include "code\game\objects\items\devices\spy_bug.dm"
#include "code\game\objects\items\devices\suit_cooling.dm"
#include "code\game\objects\items\devices\taperecorder.dm"
#include "code\game\objects\items\devices\traitordevices.dm"
@@ -634,9 +634,11 @@
#include "code\game\objects\items\weapons\circuitboards\computer\research.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\supply.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\research.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\shieldgen.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\telecomms.dm"
@@ -706,6 +708,7 @@
#include "code\game\objects\structures\tank_dispenser.dm"
#include "code\game\objects\structures\target_stake.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\windoor_assembly.dm"
#include "code\game\objects\structures\window.dm"
@@ -791,6 +794,7 @@
#include "code\modules\admin\verbs\debug.dm"
#include "code\modules\admin\verbs\diagnostics.dm"
#include "code\modules\admin\verbs\getlogs.dm"
#include "code\modules\admin\verbs\icarus.dm"
#include "code\modules\admin\verbs\mapping.dm"
#include "code\modules\admin\verbs\massmodvar.dm"
#include "code\modules\admin\verbs\modifyvariables.dm"
@@ -880,7 +884,6 @@
#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\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\vision.dm"
#include "code\modules\clothing\spacesuits\rig\suits\alien.dm"
@@ -907,7 +910,10 @@
#include "code\modules\clothing\under\miscellaneous.dm"
#include "code\modules\clothing\under\shorts.dm"
#include "code\modules\clothing\under\syndicate.dm"
#include "code\modules\clothing\under\ties.dm"
#include "code\modules\clothing\under\accessories\accessory.dm"
#include "code\modules\clothing\under\accessories\armband.dm"
#include "code\modules\clothing\under\accessories\holster.dm"
#include "code\modules\clothing\under\accessories\storage.dm"
#include "code\modules\clothing\under\jobs\civilian.dm"
#include "code\modules\clothing\under\jobs\engineering.dm"
#include "code\modules\clothing\under\jobs\medsci.dm"
@@ -1109,6 +1115,7 @@
#include "code\modules\mob\living\carbon\metroid\emote.dm"
#include "code\modules\mob\living\carbon\metroid\examine.dm"
#include "code\modules\mob\living\carbon\metroid\hud.dm"
#include "code\modules\mob\living\carbon\metroid\items.dm"
#include "code\modules\mob\living\carbon\metroid\life.dm"
#include "code\modules\mob\living\carbon\metroid\login.dm"
#include "code\modules\mob\living\carbon\metroid\metroid.dm"
@@ -1137,6 +1144,7 @@
#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\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\freelook\cameranet.dm"
#include "code\modules\mob\living\silicon\ai\freelook\chunk.dm"
@@ -1154,6 +1162,7 @@
#include "code\modules\mob\living\silicon\pai\recruit.dm"
#include "code\modules\mob\living\silicon\pai\say.dm"
#include "code\modules\mob\living\silicon\pai\software.dm"
#include "code\modules\mob\living\silicon\pai\software_modules.dm"
#include "code\modules\mob\living\silicon\robot\analyzer.dm"
#include "code\modules\mob\living\silicon\robot\component.dm"
#include "code\modules\mob\living\silicon\robot\death.dm"
@@ -1225,7 +1234,11 @@
#include "code\modules\nano\nanoexternal.dm"
#include "code\modules\nano\nanomanager.dm"
#include "code\modules\nano\nanomapgen.dm"
#include "code\modules\nano\nanoprocs.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\organ.dm"
#include "code\modules\organs\organ_alien.dm"
@@ -1320,6 +1333,7 @@
#include "code\modules\projectiles\ammunition\bullets.dm"
#include "code\modules\projectiles\guns\alien.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\energy\laser.dm"
#include "code\modules\projectiles\guns\energy\nuclear.dm"
@@ -1327,14 +1341,17 @@
#include "code\modules\projectiles\guns\energy\special.dm"
#include "code\modules\projectiles\guns\energy\stun.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\crossbow.dm"
#include "code\modules\projectiles\guns\projectile\launcher.dm"
#include "code\modules\projectiles\guns\projectile\dartgun.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\rocket.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\beams.dm"
#include "code\modules\projectiles\projectile\bullets.dm"
@@ -1351,11 +1368,8 @@
#include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm"
#include "code\modules\reagents\Chemistry-Reagents.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_dispenser.dm"
#include "code\modules\reagents\syringe_gun.dm"
#include "code\modules\reagents\reagent_containers\blood_pack.dm"
#include "code\modules\reagents\reagent_containers\borghydro.dm"
#include "code\modules\reagents\reagent_containers\dropper.dm"

View File

@@ -1,37 +1,50 @@
//node1, air1, network1 correspond to input
//node2, air2, network2 correspond to output
#define ADIABATIC_EXPONENT 0.667 //Actually adiabatic exponent - 1.
/obj/machinery/atmospherics/binary/circulator
name = "circulator/heat exchanger"
desc = "A gas circulator pump and heat exchanger."
name = "circulator"
desc = "A gas circulator turbine and heat exchanger."
icon = 'icons/obj/pipes.dmi'
icon_state = "circ-off"
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/last_heat_capacity = 0
var/last_temperature = 0
var/last_pressure_delta = 0
var/last_worldtime_transfer = 0
var/last_stored_energy_transferred = 0
var/volume_capacity_used = 0
var/stored_energy = 0
density = 1
/obj/machinery/atmospherics/binary/circulator/New()
..()
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
air1.volume = 400
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
var/datum/gas_mixture/removed
if(anchored && !(stat&BROKEN) )
if(anchored && !(stat&BROKEN) && network1)
var/input_starting_pressure = air1.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)
if(air1.temperature > 0 && last_pressure_delta > 0)
//only circulate air if there is a pressure difference (plus 5kPa kinetic, 10kPa static friction)
if(air1.temperature > 0 && last_pressure_delta > 5)
//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
removed = air1.remove(recent_moles_transferred)
@@ -40,7 +53,6 @@
last_temperature = removed.temperature
//Update the gas networks.
if(network1)
network1.update = 1
last_worldtime_transfer = world.time
@@ -50,6 +62,11 @@
update_icon()
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()
..()
@@ -72,8 +89,11 @@
/obj/machinery/atmospherics/binary/circulator/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', 75, 1)
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(dir & (NORTH|SOUTH))

View File

@@ -7,52 +7,47 @@
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "freezer_0"
density = 1
anchored = 1.0
var/heatsink_temperature = T20C //the constant temperature resevoir into which the freezer pumps heat. Probably the hull of the station or something.
var/internal_volume = 600 //L
anchored = 1
use_power = 0
idle_power_usage = 5 //5 Watts for thermostat related circuitry
idle_power_usage = 5 // 5 Watts for thermostat related circuitry
var/max_power_rating = 20000 //power rating when the usage is turned up to 100
var/heatsink_temperature = T20C // The constant temperature reservoir into which the freezer pumps heat. Probably the hull of the station or something.
var/internal_volume = 600 // L
var/max_power_rating = 20000 // Power rating when the usage is turned up to 100
var/power_setting = 100
var/set_temperature = T20C //thermostat
var/set_temperature = T20C // Thermostat
var/cooling = 0
var/opened = 0 //for deconstruction
/obj/machinery/atmospherics/unary/freezer/New()
..()
air_contents.volume = internal_volume
initialize_directions = dir
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/unary_atmos/cooler(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
power_rating = max_power_rating * (power_setting/100)
component_parts += new /obj/item/stack/cable_coil(src, 2)
RefreshParts()
/obj/machinery/atmospherics/unary/freezer/initialize()
if(node) return
if(node)
return
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
for(var/obj/machinery/atmospherics/target in get_step(src, node_connect))
if(target.initialize_directions & get_dir(target, src))
node = target
break
update_icon()
/obj/machinery/atmospherics/unary/freezer/update_icon()
if(src.node)
if(src.use_power && cooling)
if(node)
if(use_power && cooling)
icon_state = "freezer_1"
else
icon_state = "freezer"
@@ -61,10 +56,10 @@
return
/obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob)
src.ui_interact(user)
ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob)
src.ui_interact(user)
ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
@@ -78,15 +73,15 @@
data["powerSetting"] = power_setting
var/temp_class = "good"
if (air_contents.temperature > (T0C - 20))
if(air_contents.temperature > (T0C - 20))
temp_class = "bad"
else if (air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
else if(air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
temp_class = "average"
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 440, 300)
@@ -98,30 +93,31 @@
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/freezer/Topic(href, href_list)
if (href_list["toggleStatus"])
src.use_power = !src.use_power
if(href_list["toggleStatus"])
use_power = !use_power
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.set_temperature = min(src.set_temperature+amount, 1000)
set_temperature = min(set_temperature + amount, 1000)
else
src.set_temperature = max(src.set_temperature+amount, 0)
set_temperature = max(set_temperature + amount, 0)
if(href_list["setPower"]) //setting power to 0 is redundant anyways
var/new_setting = between(0, text2num(href_list["setPower"]), 100)
set_power_level(new_setting)
src.add_fingerprint(usr)
add_fingerprint(usr)
return 1
/obj/machinery/atmospherics/unary/freezer/process()
..()
if(stat & (NOPOWER|BROKEN) || !use_power)
cooling = 0
update_icon()
return
if (network && air_contents.temperature > set_temperature)
if(network && air_contents.temperature > set_temperature)
cooling = 1
var/heat_transfer = max( -air_contents.get_thermal_energy_change(set_temperature - 5), 0 )
@@ -132,7 +128,7 @@
heat_transfer = min(heat_transfer, cop * power_rating) //limit heat transfer by available power
var/removed = -air_contents.add_thermal_energy(-heat_transfer) //remove the heat
if (debug)
if(debug)
visible_message("[src]: Removing [removed] W.")
use_power(power_rating)
@@ -147,49 +143,37 @@
/obj/machinery/atmospherics/unary/freezer/RefreshParts()
..()
var/cap_rating = 0
var/cap_count = 0
var/manip_rating = 0
var/manip_count = 0
var/bin_rating = 0
var/bin_count = 0
for(var/obj/item/weapon/stock_parts/P in component_parts)
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
cap_rating += P.rating
cap_count++
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
manip_rating += P.rating
manip_count++
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
bin_rating += P.rating
bin_count++
cap_rating /= cap_count
bin_rating /= bin_count
manip_rating /= manip_count
power_rating = initial(power_rating)*cap_rating //more powerful
heatsink_temperature = initial(heatsink_temperature)/((manip_rating+bin_rating)/2) //more efficient
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200*bin_rating
power_rating = initial(power_rating) * cap_rating / 2 //more powerful
heatsink_temperature = initial(heatsink_temperature) / ((manip_rating + bin_rating) / 2) //more efficient
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/freezer/proc/set_power_level(var/new_power_setting)
power_setting = new_power_setting
power_rating = max_power_rating * (power_setting/100)
//dismantling code. copied from autolathe
/obj/machinery/atmospherics/unary/freezer/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/screwdriver))
opened = !opened
user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
if(default_deconstruction_screwdriver(user, O))
return
if (opened && istype(O, /obj/item/weapon/crowbar))
dismantle()
if(default_deconstruction_crowbar(user, O))
return
if(default_part_replacement(user, O))
return
..()
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
..(user)
if (opened)
if(panel_open)
user << "The maintenance hatch is open."

View File

@@ -7,25 +7,21 @@
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "heater_0"
density = 1
anchored = 1.0
var/set_temperature = T20C //thermostat
var/max_temperature = T20C + 680
var/internal_volume = 600 //L
anchored = 1
use_power = 0
idle_power_usage = 5 //5 Watts for thermostat related circuitry
var/max_temperature = T20C + 680
var/internal_volume = 600 //L
var/max_power_rating = 20000 //power rating when the usage is turned up to 100
var/power_setting = 100
var/set_temperature = T20C //thermostat
var/heating = 0 //mainly for icon updates
var/opened = 0 //for deconstruction
/obj/machinery/atmospherics/unary/heater/New()
..()
air_contents.volume = internal_volume
initialize_directions = dir
component_parts = list()
@@ -33,16 +29,18 @@
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/stack/cable_coil(src, 5)
power_rating = max_power_rating * (power_setting/100)
RefreshParts()
/obj/machinery/atmospherics/unary/heater/initialize()
if(node) return
if(node)
return
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
for(var/obj/machinery/atmospherics/target in get_step(src, node_connect))
if(target.initialize_directions & get_dir(target, src))
node = target
break
@@ -50,8 +48,8 @@
/obj/machinery/atmospherics/unary/heater/update_icon()
if(src.node)
if(src.use_power && src.heating)
if(node)
if(use_power && heating)
icon_state = "heater_1"
else
icon_state = "heater"
@@ -68,7 +66,7 @@
update_icon()
return
if (network && air_contents.total_moles && air_contents.temperature < set_temperature)
if(network && air_contents.total_moles && air_contents.temperature < set_temperature)
air_contents.add_thermal_energy(power_rating * HEATER_PERF_MULT)
use_power(power_rating)
@@ -80,10 +78,10 @@
update_icon()
/obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob)
src.ui_interact(user)
ui_interact(user)
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
src.ui_interact(user)
ui_interact(user)
/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
@@ -97,13 +95,13 @@
data["powerSetting"] = power_setting
var/temp_class = "normal"
if (air_contents.temperature > (T20C+40))
if(air_contents.temperature > (T20C+40))
temp_class = "bad"
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 440, 300)
@@ -115,63 +113,54 @@
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/heater/Topic(href, href_list)
if (href_list["toggleStatus"])
src.use_power = !src.use_power
if(href_list["toggleStatus"])
use_power = !use_power
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.set_temperature = min(src.set_temperature+amount, max_temperature)
set_temperature = min(set_temperature + amount, max_temperature)
else
src.set_temperature = max(src.set_temperature+amount, 0)
set_temperature = max(set_temperature + amount, 0)
if(href_list["setPower"]) //setting power to 0 is redundant anyways
var/new_setting = between(0, text2num(href_list["setPower"]), 100)
set_power_level(new_setting)
src.add_fingerprint(usr)
add_fingerprint(usr)
return 1
//upgrading parts
/obj/machinery/atmospherics/unary/heater/RefreshParts()
..()
var/cap_rating = 0
var/cap_count = 0
var/bin_rating = 0
var/bin_count = 0
for(var/obj/item/weapon/stock_parts/P in component_parts)
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
cap_rating += P.rating
cap_count++
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
bin_rating += P.rating
bin_count++
cap_rating /= cap_count
bin_rating /= bin_count
max_power_rating = initial(max_power_rating)*cap_rating
max_temperature = max(initial(max_temperature) - T20C, 0)*((bin_rating*2 + cap_rating)/3) + T20C
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200*bin_rating
max_power_rating = initial(max_power_rating) * cap_rating / 2
max_temperature = max(initial(max_temperature) - T20C, 0) * ((bin_rating * 4 + cap_rating) / 5) + T20C
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting)
power_setting = new_power_setting
power_rating = max_power_rating * (power_setting/100)
//dismantling code. copied from autolathe
/obj/machinery/atmospherics/unary/heater/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/screwdriver))
opened = !opened
user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
if(default_deconstruction_screwdriver(user, O))
return
if (opened && istype(O, /obj/item/weapon/crowbar))
dismantle()
if(default_deconstruction_crowbar(user, O))
return
if(default_part_replacement(user, O))
return
..()
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
..(user)
if (opened)
if(panel_open)
user << "The maintenance hatch is open."

View File

@@ -89,7 +89,7 @@
/obj/machinery/atmospherics/unary/vent_pump/engine
name = "Engine Core Vent"
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()
..()

View File

@@ -9,6 +9,13 @@
src:Topic(href, href_list)
return null
/proc/is_on_same_plane_or_station(var/z1, var/z2)
if(z1 == z2)
return 1
if((z1 in config.station_levels) && (z2 in config.station_levels))
return 1
return 0
/proc/get_area(O)
var/turf/loc = get_turf(O)
if(!loc)
@@ -43,7 +50,7 @@
return level in config.station_levels
/proc/isNotStationLevel(var/level)
return !isStationLevel()
return !isStationLevel(level)
/proc/isPlayerLevel(var/level)
return level in config.player_levels

View File

@@ -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/skin_styles_female_list = list() //unused
//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_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Black Sports","White Sports","None")
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" = "f1", "White" = "f2", "Yellow" = "f3", "Blue" = "f4", "Black" = "f5", "Thong" = "f6", "Black Sports" = "f7","White Sports" = "f8","None")
//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
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")

View File

@@ -375,6 +375,12 @@ proc/listclearnulls(list/list)
i++
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)
var/i = 0
for(var/T in L)

View File

@@ -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.
//Also limit the size of the input, if specified.
/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/closetag = 1
while(1)
opentag = findtext(input, "<")
closetag = findtext(input, ">")
if(!closetag || !opentag)
break
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
if(max_length)
input = copytext(input,1,max_length)
return sanitize(input)

View File

@@ -241,6 +241,8 @@ datum/hud/New(mob/owner)
brain_hud(ui_style)
else if(isalien(mymob))
larva_hud()
else if(isslime(mymob))
slime_hud()
else if(isAI(mymob))
ai_hud()
else if(isrobot(mymob))

View File

@@ -433,9 +433,6 @@
f_style = "Shaved"
if(dna.species == "Human") //no more xenos losing ears/tentacles
h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
undershirt = undershirt_t.Find("None")
if(gender == MALE)
underwear = underwear_m.Find("None")
else
underwear = underwear_f.Find("None")
undershirt = null
underwear = null
regenerate_icons()

View File

@@ -226,7 +226,7 @@
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.set_dir(2)
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)
if (mymob.client.target_can_click)
mymob.item_use_icon.set_dir(1)

View File

@@ -33,3 +33,71 @@
mymob.client.screen = null
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
/datum/hud/proc/slime_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
src.adding = list()
var/obj/screen/using
using = new /obj/screen()
using.name = "act_intent"
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = "intent_"+mymob.a_intent
using.screen_loc = ui_zonesel
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_zonesel
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_zonesel
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_zonesel
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_zonesel
using.layer = 21
src.adding += using
hurt_intent = using
mymob.client.screen = null
mymob.client.screen += src.adding
return

View File

@@ -157,7 +157,7 @@ var/obj/screen/robot_inventory
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.set_dir(2)
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)
if (mymob.client.target_can_click)
mymob.item_use_icon.set_dir(1)

View File

@@ -120,37 +120,42 @@
// Eating
if(Victim)
if (Victim == A)
Feedstop()
return
// Basic attack.
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
// Handle mob shocks.
var/mob/living/M = A
if(istype(M) && powerlevel > 0 && !istype(A,/mob/living/carbon/slime))
if (istype(M))
switch(src.a_intent)
if ("help") // We just poke the other
M.visible_message("<span class='notice'>[src] gently pokes [M]!</span>", "<span class='notice'>[src] gently pokes you!</span>")
if ("disarm") // We stun the target, with the intention to feed
var/stunprob = 1
var/power = max(0, min(10, (powerlevel + rand(0, 3))))
if (powerlevel > 0 && !istype(A, /mob/living/carbon/slime))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5))
if(H.species.flags & IS_SYNTHETIC)
return
stunprob *= H.species.siemens_coefficient
var/power = max(0,min(10,(powerlevel+rand(0,3))))
var/stunprob = 10
switch(power*10)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
switch(power * 10)
if(0) stunprob *= 10
if(1 to 2) stunprob *= 20
if(3 to 4) stunprob *= 30
if(5 to 6) stunprob *= 40
if(7 to 8) stunprob *= 60
if(9) stunprob *= 70
if(10) stunprob *= 95
if(prob(stunprob))
powerlevel = max(0,powerlevel-3)
src.visible_message("\red <B>The [name] has shocked [M]!</B>")
powerlevel = max(0, powerlevel-3)
M.visible_message("<span class='danger'>[src] has shocked [M]!</span>", "<span class='danger'>[src] has shocked you!</span>")
M.Weaken(power)
M.Stun(power)
if (M.stuttering < power) M.stuttering = power
M.stuttering = max(M.stuttering, power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, M)
@@ -158,7 +163,18 @@
if(prob(stunprob) && powerlevel >= 8)
M.adjustFireLoss(powerlevel * rand(6,10))
else if(prob(40))
M.visible_message("<span class='danger'>[src] has pounced at [M]!</span>", "<span class='danger'>[src] has pounced at you!</span>")
M.Weaken(power)
else
M.visible_message("<span class='danger'>[src] has tried to pounce at [M]!</span>", "<span class='danger'>[src] has tried to pounce at you!</span>")
M.updatehealth()
if ("grab") // We feed
Wrap(M)
if ("hurt") // Attacking
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
else
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped") // Basic attack.
/*
New Players:
Have no reason to click on anything at all.

View File

@@ -294,6 +294,7 @@ datum/controller/game_controller/proc/process_machines_process()
last_thing_processed = Machine.type
if(Machine.process() != PROCESS_KILL)
if(Machine)
Machine.power_change()
if(Machine.use_power)
Machine.auto_use_power()
continue

View File

@@ -731,9 +731,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/shield/riot,
/obj/item/weapon/shield/riot,
/obj/item/weapon/shield/riot,
/obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/handcuffs,
/obj/item/weapon/handcuffs,
/obj/item/weapon/handcuffs,
@@ -742,13 +739,26 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/head/helmet/riot,
/obj/item/clothing/suit/armor/riot,
/obj/item/clothing/head/helmet/riot,
/obj/item/clothing/suit/armor/riot)
/obj/item/clothing/suit/armor/riot,
/obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/storage/box/beanbags,
/obj/item/weapon/storage/box/handcuffs)
cost = 60
containertype = /obj/structure/closet/crate/secure
containername = "Riot gear crate"
access = access_armory
group = "Security"
/datum/supply_packs/energyweapons
name = "Energy weapons crate"
contains = list(/obj/item/weapon/gun/energy/laser,
/obj/item/weapon/gun/energy/laser,
/obj/item/weapon/gun/energy/gun)
cost = 50
containertype = /obj/structure/closet/crate/secure
containername = "energy weapons crate"
access = access_armory
group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -775,13 +785,14 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
group = "Security"
/datum/supply_packs/shotgunammo
name = "Shotgun shells"
name = "Ballistic ammunition crate"
contains = list(/obj/item/weapon/storage/box/shotgunammo,
/obj/item/weapon/storage/box/shotgunammo,
/obj/item/weapon/storage/box/shotgunammo)
/obj/item/weapon/storage/box/shotgunshells,
/obj/item/weapon/storage/box/shotgunshells)
cost = 60
containertype = /obj/structure/closet/crate/secure
containername = "Shotgun shells"
containername = "ballistic ammunition crate"
access = access_armory
group = "Security"
@@ -887,10 +898,9 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/glass/paint/green,
/obj/item/weapon/reagent_containers/glass/paint/blue,
/obj/item/weapon/reagent_containers/glass/paint/yellow,
/obj/item/weapon/reagent_containers/glass/paint/violet,
/obj/item/weapon/reagent_containers/glass/paint/purple,
/obj/item/weapon/reagent_containers/glass/paint/black,
/obj/item/weapon/reagent_containers/glass/paint/white,
/obj/item/weapon/reagent_containers/glass/paint/remover,
/obj/item/weapon/contraband/poster,
/obj/item/weapon/wrapping_paper,
/obj/item/weapon/wrapping_paper,
@@ -1384,10 +1394,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/randomised/webbing
name = "Webbing crate"
num_contained = 1
contains = list(/obj/item/clothing/tie/holster,
/obj/item/clothing/tie/storage/brown_vest,
/obj/item/clothing/tie/storage/webbing,
/obj/item/clothing/tie/storage)
contains = list(/obj/item/clothing/accessory/holster,
/obj/item/clothing/accessory/storage/brown_vest,
/obj/item/clothing/accessory/storage/webbing,
/obj/item/clothing/accessory/storage)
cost = 15
containertype = /obj/structure/closet/crate
containername = "Webbing crate"

View File

@@ -34,14 +34,17 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
/datum/wires/airlock/GetInteractWindow()
var/obj/machinery/door/airlock/A = holder
var/haspower = A.arePowerSystemsOn() //If there's no power, then no lights will be on.
. += ..()
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
(A.lights ? "The door bolt lights are on." : "The door bolt lights are off!"),
((A.hasPower()) ? "The test light is on." : "The test light is off!"),
((A.aiControlDisabled==0 && !A.emagged) ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
(A.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
(A.normalspeed==0 ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
(A.aiDisabledIdScanner==0 ? "The IDScan light is on." : "The IDScan light is off."))
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]",
(A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
((A.lights && haspower) ? "The door bolt lights are on." : "The door bolt lights are off!"),
((haspower) ? "The test light is on." : "The test light is off!"),
((A.aiControlDisabled==0 && !A.emagged && haspower)? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
((A.safe==0 && haspower)? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
((A.normalspeed==0 && haspower)? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
((A.aiDisabledIdScanner==0 && haspower)? "The IDScan light is on." : "The IDScan light is off."))
/datum/wires/airlock/UpdateCut(var/index, var/mended)
@@ -127,7 +130,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
switch(index)
if(AIRLOCK_WIRE_IDSCAN)
//Sending a pulse through flashes the red light on the door (if the door has power).
if(A.hasPower() && A.density)
if(A.arePowerSystemsOn() && A.density)
A.do_animate("deny")
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
@@ -139,7 +142,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
A.locked = 1
A.audible_message("You hear a click from the bottom of the door.", null, 1)
else
if(A.hasPower()) //only can raise bolts if power's on
if(A.arePowerSystemsOn()) //only can raise bolts if power's on
A.locked = 0
A.audible_message("You hear a click from the bottom of the door.", null, 1)
A.update_icon()

View File

@@ -11,7 +11,7 @@ var/const/AALARM_WIRE_AALARM = 16
/datum/wires/alarm/CanUse(var/mob/living/L)
var/obj/machinery/alarm/A = holder
if(A.wiresexposed)
if(A.wiresexposed && A.buildstage == 2)
return 1
return 0

View File

@@ -1,3 +1,5 @@
#define CAT_HIDDEN 2 // Also in code/game/machinery/vending.dm
/datum/wires/vending
holder_type = /obj/machinery/vending
wire_count = 4
@@ -17,17 +19,12 @@ var/const/VENDING_WIRE_IDSCAN = 8
return 1
return 0
/datum/wires/vending/Interact(var/mob/living/user)
if(CanUse(user))
var/obj/machinery/vending/V = holder
V.attack_hand(user)
/datum/wires/vending/GetInteractWindow()
var/obj/machinery/vending/V = holder
. += ..()
. += "<BR>The orange light is [V.seconds_electrified ? "off" : "on"].<BR>"
. += "The red light is [V.shoot_inventory ? "off" : "blinking"].<BR>"
. += "The green light is [V.extended_inventory ? "on" : "off"].<BR>"
. += "The green light is [(V.categories & CAT_HIDDEN) ? "on" : "off"].<BR>"
. += "The [V.scan_id ? "purple" : "yellow"] light is on.<BR>"
/datum/wires/vending/UpdatePulsed(var/index)
@@ -36,7 +33,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
if(VENDING_WIRE_THROW)
V.shoot_inventory = !V.shoot_inventory
if(VENDING_WIRE_CONTRABAND)
V.extended_inventory = !V.extended_inventory
V.categories ^= CAT_HIDDEN
if(VENDING_WIRE_ELECTRIFY)
V.seconds_electrified = 30
if(VENDING_WIRE_IDSCAN)
@@ -48,7 +45,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
if(VENDING_WIRE_THROW)
V.shoot_inventory = !mended
if(VENDING_WIRE_CONTRABAND)
V.extended_inventory = 0
V.categories &= ~CAT_HIDDEN
if(VENDING_WIRE_ELECTRIFY)
if(mended)
V.seconds_electrified = 0

View File

@@ -67,7 +67,7 @@
icon_state = "bike_horn"
item_state = "bike_horn"
throwforce = 3
w_class = 1.0
w_class = 2
throw_speed = 3
throw_range = 15
attack_verb = list("HONKED")
@@ -84,7 +84,6 @@
throw_speed = 4
throw_range = 5
/obj/item/weapon/cane
name = "cane"
desc = "A cane used by a true gentlemen. Or a clown."
@@ -98,6 +97,46 @@
matter = list("metal" = 50)
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
/obj/item/weapon/cane/concealed
var/concealed_blade
/obj/item/weapon/cane/concealed/New()
..()
concealed_blade = new/obj/item/weapon/butterfly/switchblade(src)
/obj/item/weapon/cane/concealed/attack_self(mob/user)
if(concealed_blade)
user.visible_message("<span class='warning'>[user] has unsheathed \a [concealed_blade] from \his [src]!</span>", "You unsheathe \the [concealed_blade] from \the [src].")
// Calling drop/put in hands to properly call item drop/pickup procs
playsound(user.loc, 'sound/weapons/flipblade.ogg', 50, 1)
user.drop_from_inventory(src)
user.put_in_hands(concealed_blade)
user.put_in_hands(src)
concealed_blade = null
update_icon()
else
..()
/obj/item/weapon/cane/concealed/attackby(var/obj/item/weapon/butterfly/W, var/mob/user)
if(!src.concealed_blade && istype(W))
user.visible_message("<span class='warning'>[user] has sheathed \a [W] into \his [src]!</span>", "You sheathe \the [W] into \the [src].")
user.drop_from_inventory(W)
W.loc = src
src.concealed_blade = W
update_icon()
else
..()
/obj/item/weapon/cane/concealed/update_icon()
if(concealed_blade)
name = initial(name)
icon_state = initial(icon_state)
item_state = initial(icon_state)
else
name = "cane shaft"
icon_state = "nullrod"
item_state = "foldcane"
/obj/item/weapon/disk
name = "disk"
icon = 'icons/obj/items.dmi'
@@ -395,6 +434,22 @@
///////////////////////////////////////Stock Parts /////////////////////////////////
/obj/item/weapon/storage/part_replacer
name = "rapid part exchange device"
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
icon_state = "RPED"
item_state = "RPED"
w_class = 5
can_hold = list("/obj/item/weapon/stock_parts")
storage_slots = 50
use_to_pickup = 1
allow_quick_gather = 1
allow_quick_empty = 1
collection_mode = 1
display_contents_with_number = 1
max_w_class = 3
max_combined_w_class = 100
/obj/item/weapon/stock_parts
name = "stock part"
desc = "What?"

View File

@@ -36,7 +36,7 @@
var/tmp/message_title = new_title ? new_title : title
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(message, message_title)

View File

@@ -409,6 +409,7 @@ its easier to just keep the beam vertical.
/atom/proc/clean_blood()
src.color = initial(src.color) //paint
src.germ_level = 0
if(istype(blood_DNA, /list))
del(blood_DNA)

View File

@@ -679,11 +679,16 @@ var/list/datum/dna/hivemind_bank = list()
//////////
/mob/proc/sting_can_reach(mob/M as mob, sting_range = 1)
if(M.loc == src.loc) return 1 //target and source are in the same thing
if(!isturf(src.loc) || !isturf(M.loc)) return 0 //One is inside, the other is outside something.
if(AStar(src.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, sting_range)) //If a path exists, good!
return 1
if(M.loc == src.loc)
return 1 //target and source are in the same thing
if(!isturf(src.loc) || !isturf(M.loc))
src << "<span class='warning'>We cannot reach \the [M] with a sting!</span>"
return 0 //One is inside, the other is outside something.
// Maximum queued turfs set to 25; I don't *think* anything raises sting_range above 2, but if it does the 25 may need raising
if(!AStar(src.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, max_nodes=25, max_node_depth=sting_range)) //If we can't find a path, fail
src << "<span class='warning'>We cannot find a path to sting \the [M] by!</span>"
return 0
return 1
//Handles the general sting code to reduce on copypasta (seeming as somebody decided to make SO MANY dumb abilities)
/mob/proc/changeling_sting(var/required_chems=0, var/verb_path)

View File

@@ -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."
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/weapon/gun/energy/crossbow:5:Energy Crossbow;
/obj/item/weapon/melee/energy/sword:4:Energy Sword;

View File

@@ -33,47 +33,58 @@
var/uplink_uses = 10
var/list/datum/uplink_item/uplink_items = list(
"Highly Visible and Dangerous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/gun/projectile, 6, "Revolver", "RE"),
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "Ammo-9mm", "R9"),
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, "Ammo-357", "RA"),
new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
new/datum/uplink_item(/obj/item/weapon/melee/energy/sword, 4, "Energy Sword", "ES"),
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/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM")
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")
),
"Stealthy and Inconspicuous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/pen/paralysis, 3, "Paralysis Pen", "PP"),
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC")
new/datum/uplink_item(/obj/item/weapon/cane/concealed, 2, "Concealed Cane Sword", "CC"),
new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC"),
new/datum/uplink_item(/obj/item/weapon/pen/paralysis, 3, "Paralysis Pen", "PP"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH")
),
"Stealth and Camouflage Items" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/chameleon, 3, "Chameleon Kit", "CB"),
new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Shoes", "SH"),
new/datum/uplink_item(/obj/item/weapon/card/id/syndicate, 2, "Agent ID card", "AC"),
new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Shoes", "SH"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/spy, 2, "Bug Kit", "SK"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/chameleon, 3, "Chameleon Kit", "CB"),
new/datum/uplink_item(/obj/item/device/chameleon, 4, "Chameleon-Projector", "CP"),
new/datum/uplink_item(/obj/item/clothing/mask/gas/voice, 4, "Voice Changer", "VC"),
new/datum/uplink_item(/obj/item/device/chameleon, 4, "Chameleon-Projector", "CP")
new/datum/uplink_item(/obj/item/weapon/disk/file/cameras/syndicate, 6, "Camera Network Access - Floppy", "SF")
),
"Devices and Tools" = list(
new/datum/uplink_item(/obj/item/weapon/card/emag, 3, "Cryptographic Sequencer", "EC"),
new/datum/uplink_item(/obj/item/weapon/storage/toolbox/syndicate, 1, "Fully Loaded Toolbox", "ST"),
new/datum/uplink_item(/obj/item/weapon/plastique, 2, "C-4 (Destroys walls)", "C4"),
new/datum/uplink_item(/obj/item/device/encryptionkey/binary, 3, "Binary Translator Key", "BT"),
new/datum/uplink_item(/obj/item/weapon/card/emag, 3, "Cryptographic Sequencer", "EC"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/clerical, 3, "Morphic Clerical Kit", "CK"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/space, 3, "Space Suit", "SS"),
new/datum/uplink_item(/obj/item/clothing/glasses/thermal/syndi, 3, "Thermal Imaging Glasses", "TM"),
new/datum/uplink_item(/obj/item/device/encryptionkey/binary, 3, "Binary Translator Key", "BT"),
new/datum/uplink_item(/obj/item/weapon/aiModule/syndicate, 7, "Hacked AI Upload Module", "AI"),
new/datum/uplink_item(/obj/item/weapon/plastique, 2, "C-4 (Destroys walls)", "C4"),
new/datum/uplink_item(/obj/item/device/powersink, 5, "Powersink (DANGER!)", "PS",),
new/datum/uplink_item(/obj/item/device/radio/beacon/syndicate, 7, "Singularity Beacon (DANGER!)", "SB"),
new/datum/uplink_item(/obj/item/weapon/circuitboard/teleporter, 20, "Teleporter Circuit Board", "TP")
),
"Implants" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_freedom, 3, "Freedom Implant", "FI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_uplink, 10, "Uplink Implant (Contains 5 Telecrystals)", "UI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_compress, 4, "Compressed Matter Implant", "CI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_explosive, 6, "Explosive Implant (DANGER!)", "EI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_compress, 4, "Compressed Matter Implant", "CI")
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_uplink, 10, "Uplink Implant (Contains 5 Telecrystals)", "UI")
),
"Health Aids" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/donkpockets, 1, "Box of Donk-Pockets", "DP"),
new/datum/uplink_item(/obj/item/weapon/storage/firstaid/combat, 5, "Combat medical kit", "CM")
),
"(Pointless) Badassery" = list(
new/datum/uplink_item(/obj/item/toy/syndicateballoon, 10, "For showing that You Are The BOSS (Useless Balloon)", "BS")
new/datum/uplink_item(/obj/item/toy/syndicateballoon, 10, "For showing that You Are The BOSS (Useless Balloon)", "BS"),
new/datum/uplink_item(/obj/item/toy/nanotrasenballoon, 10, "For showing that you love NT SOO much (Useless Balloon)", "NT")
)
)

View File

@@ -85,6 +85,9 @@
density = 1
anchored = 1.0
var/hits = 1
var/detonation_chance = 15
var/power = 4
var/power_step = 1
var/dest
pass_flags = PASSTABLE
@@ -92,6 +95,7 @@
name = "small meteor"
icon_state = "smallf"
pass_flags = PASSTABLE | PASSGRILLE
power = 2
/obj/effect/meteor/Bump(atom/A)
spawn(0)
@@ -105,8 +109,8 @@
//Changing emitter and generator ex_act would result in them being bomb and C4 proof.
if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator) && \
prob(15))
explosion(src.loc, 4, 5, 6, 7, 0)
prob(detonation_chance))
explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
del(src)
return
@@ -120,6 +124,7 @@
/obj/effect/meteor/big
name = "big meteor"
hits = 5
power = 1
ex_act(severity)
return
@@ -143,8 +148,8 @@
explosion(src.loc, 0, 1, 2, 3, 0)
if (--src.hits <= 0)
if(prob(15) && !istype(A, /obj/structure/grille))
explosion(src.loc, 1, 2, 3, 4, 0)
if(prob(detonation_chance) && !istype(A, /obj/structure/grille))
explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
del(src)
return

View File

@@ -26,7 +26,7 @@
if("revolver")
new /obj/item/weapon/gun/projectile(get_turf(H))
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")
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
if("nuclear")
@@ -49,7 +49,7 @@
if("combatshotgun")
new /obj/item/weapon/gun/projectile/shotgun/pump/combat(get_turf(H))
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")
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
if("uzi")

View File

@@ -24,7 +24,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
if(H.age>49)
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
U.accessories += new /obj/item/clothing/accessory/medal/gold/captain(U)
H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)

View File

@@ -196,3 +196,44 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
/datum/job/Paramedic
title = "Paramedic"
flag = PARAMEDIC
department_flag = MEDSCI
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist)
minimal_access = list(access_medical, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks)
alt_titles = list("Emergency Medical Technician")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if (H.mind.role_alt_title)
switch(H.mind.role_alt_title)
if("Emergency Medical Technician")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/fluff/short(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
if("Paramedic")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1

View File

@@ -25,6 +25,7 @@ var/const/VIROLOGIST =(1<<6)
var/const/PSYCHIATRIST =(1<<7)
var/const/ROBOTICIST =(1<<8)
var/const/XENOBIOLOGIST =(1<<9)
var/const/PARAMEDIC =(1<<10)
var/const/CIVILIAN =(1<<2)

View File

@@ -921,8 +921,13 @@ table tr:first-child th:first-child { border: none;}
update_icon()
return
if (wiresexposed && ((istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters))))
return attack_hand(user)
if (wiresexposed && istype(W, /obj/item/weapon/wirecutters))
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
buildstage = 1
update_icon()
return
if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
if(stat & (NOPOWER|BROKEN))

View File

@@ -224,6 +224,9 @@ update_flag
return
/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
if(Proj.damage)
src.health -= round(Proj.damage / 2)
healthcheck()

View File

@@ -13,14 +13,30 @@
var/list/storage_capacity = list("metal" = 0, "glass" = 0)
var/show_category = "All"
var/panel_open = 0
var/hacked = 0
var/disabled = 0
var/shocked = 0
var/busy = 0
var/mat_efficiency = 1
var/build_time = 50
var/datum/wires/autolathe/wires = null
/obj/machinery/autolathe/New()
..()
wires = new(src)
//Create parts for lathe.
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
/obj/machinery/autolathe/proc/update_recipe_list()
if(!machine_recipes)
machine_recipes = autolathe_recipes
@@ -33,8 +49,8 @@
user << "<span class='danger'>\The [src] is disabled!</span>"
return
if (shocked)
shock(user,50)
if(shocked)
shock(user, 50)
var/dat = "<center><h1>Autolathe Control Panel</h1><hr/>"
@@ -65,16 +81,16 @@
else
//Make sure it's buildable and list requires resources.
for(var/material in R.resources)
var/sheets = round(stored_material[material]/R.resources[material])
var/sheets = round(stored_material[material]/round(R.resources[material]*mat_efficiency))
if(isnull(max_sheets) || max_sheets > sheets)
max_sheets = sheets
if(!isnull(stored_material[material]) && stored_material[material] < R.resources[material])
if(!isnull(stored_material[material]) && stored_material[material] < round(R.resources[material]*mat_efficiency))
can_make = 0
if(!comma)
comma = 1
else
material_string += ", "
material_string += "[R.resources[material]] [material]"
material_string += "[round(R.resources[material] * mat_efficiency)] [material]"
material_string += ".<br></td>"
//Build list of multipliers for sheets.
if(R.is_stack)
@@ -99,31 +115,27 @@
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return
if (busy)
if(busy)
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
return
if(istype(O, /obj/item/weapon/screwdriver))
panel_open = !panel_open
icon_state = (panel_open ? "autolathe_t": "autolathe")
user << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]."
if(default_deconstruction_screwdriver(user, O))
updateUsrDialog()
return
if(default_deconstruction_crowbar(user, O))
return
if(default_part_replacement(user, O))
return
if (panel_open)
if(stat)
return
if(panel_open)
//Don't eat multitools or wirecutters used on an open lathe.
if(istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
attack_hand(user)
return
//Dismantle the frame.
if(istype(O, /obj/item/weapon/crowbar))
dismantle()
return
if(O.loc != user && !(istype(O,/obj/item/stack)))
return 0
@@ -170,11 +182,11 @@
else
user << "You fill \the [src] with \the [eating]."
flick("autolathe_o",src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
flick("autolathe_o", src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
if(istype(eating,/obj/item/stack))
var/obj/item/stack/stack = eating
stack.use(max(1,round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
stack.use(max(1, round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
else
user.drop_item(O)
del(O)
@@ -227,18 +239,18 @@
//Check if we still have the materials.
for(var/material in making.resources)
if(!isnull(stored_material[material]))
if(stored_material[material] < (making.resources[material]*multiplier))
if(stored_material[material] < round(making.resources[material] * mat_efficiency) * multiplier)
return
//Consume materials.
for(var/material in making.resources)
if(!isnull(stored_material[material]))
stored_material[material] = max(0,stored_material[material]-(making.resources[material]*multiplier))
stored_material[material] = max(0, stored_material[material] - round(making.resources[material] * mat_efficiency) * multiplier)
//Fancy autolathe animation.
flick("autolathe_n",src)
flick("autolathe_n", src)
sleep(50)
sleep(build_time)
busy = 0
@@ -247,39 +259,31 @@
//Create the desired item.
var/obj/item/I = new making.path(get_step(loc, get_dir(src,usr)))
if(multiplier>1 && istype(I,/obj/item/stack))
if(multiplier > 1 && istype(I, /obj/item/stack))
var/obj/item/stack/S = I
S.amount = multiplier
updateUsrDialog()
/obj/machinery/autolathe/New()
..()
wires = new(src)
//Create parts for lathe.
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
/obj/machinery/autolathe/update_icon()
icon_state = (panel_open ? "autolathe_t" : "autolathe")
//Updates overall lathe storage size.
/obj/machinery/autolathe/RefreshParts()
..()
var/tot_rating = 0
var/mb_rating = 0
var/man_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
mb_rating += MB.rating
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
man_rating += M.rating
storage_capacity["metal"] = tot_rating * 25000
storage_capacity["glass"] = tot_rating * 12500
storage_capacity["metal"] = mb_rating * 25000
storage_capacity["glass"] = mb_rating * 12500
build_time = 50 / man_rating
mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3
/obj/machinery/autolathe/dismantle()
..()
var/list/sheets = list("metal" = /obj/item/stack/sheet/metal, "glass" = /obj/item/stack/sheet/glass)
for(var/mat in stored_material)
@@ -288,3 +292,4 @@
if(stored_material[mat] > S.perunit)
S.amount = round(stored_material[mat] / S.perunit)
S.loc = loc
..()

View File

@@ -15,7 +15,7 @@
if(I.matter && !recipe.resources) //This can be overidden in the datums.
recipe.resources = list()
for(var/material in I.matter)
recipe.resources[material] = round(I.matter[material]*1.25) // More expensive to produce than they are to recycle.
recipe.resources[material] = I.matter[material]*1.25 // More expensive to produce than they are to recycle.
del(I)
/datum/autolathe/recipe
@@ -201,8 +201,13 @@
path = /obj/item/weapon/reagent_containers/syringe
category = "Medical"
/datum/autolathe/recipe/syringegun_ammo
name = "syringe"
path = /obj/item/weapon/syringe_cartridge
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun_blanks
name = "ammunition (shotgun, blanks)"
name = "ammunition (shotgun, blank)"
path = /obj/item/ammo_casing/shotgun/blank
category = "Arms and Ammunition"
@@ -211,9 +216,19 @@
path = /obj/item/ammo_casing/shotgun/beanbag
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun_flash
name = "ammunition (shotgun, flash)"
path = /obj/item/ammo_casing/shotgun/flash
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_rubber
name = "ammunition (rubber)"
path = /obj/item/ammo_magazine/c45r
name = "ammunition (.45, rubber)"
path = /obj/item/ammo_magazine/c45m/rubber
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_flash
name = "ammunition (.45, flash)"
path = /obj/item/ammo_magazine/c45m/flash
category = "Arms and Ammunition"
/datum/autolathe/recipe/consolescreen
@@ -284,15 +299,39 @@
hidden = 1
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/shotgun
name = "ammunition (shell, shotgun)"
name = "ammunition (slug, shotgun)"
path = /obj/item/ammo_casing/shotgun
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun_dart
name = "ammunition (dart, shotgun)"
path = /obj/item/ammo_casing/shotgun/dart
/datum/autolathe/recipe/shotgun_pellet
name = "ammunition (shell, shotgun)"
path = /obj/item/ammo_casing/shotgun/pellet
hidden = 1
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"

View File

@@ -81,6 +81,8 @@
..()
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
health -= Proj.damage
..()
healthcheck()

View File

@@ -34,10 +34,10 @@
var/obj/item/weapon/gun/energy/taser/G = new /obj/item/weapon/gun/energy/taser(Tsec)
G.power_supply.charge = 0
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
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
if (prob(50))
new /obj/item/robot_parts/l_leg(Tsec)
@@ -137,11 +137,11 @@
if(7)
switch(lasercolor)
if("b")
if( !istype(W, /obj/item/weapon/gun/energy/laser/bluetag) )
if( !istype(W, /obj/item/weapon/gun/energy/lasertag/blue) )
return
name = "bluetag ED-209 assembly"
if("r")
if( !istype(W, /obj/item/weapon/gun/energy/laser/redtag) )
if( !istype(W, /obj/item/weapon/gun/energy/lasertag/red) )
return
name = "redtag ED-209 assembly"
if("")

View File

@@ -455,7 +455,7 @@
return
/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)
..()

View File

@@ -702,10 +702,10 @@ Auto Patrol: []"},
switch(lasercolor)
if("b")
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")
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)))
threat += 4

View File

@@ -1,8 +1,8 @@
/obj/machinery/driver_button
name = "mass driver button"
/obj/machinery/button
name = "button"
icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
desc = "A remote control switch for a mass driver."
desc = "A remote control switch for something."
var/id = null
var/active = 0
anchored = 1.0
@@ -10,38 +10,10 @@
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/ignition_switch
name = "ignition switch"
icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
desc = "A remote control switch for a mounted igniter."
var/id = null
var/active = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/button/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/flasher_button
name = "flasher button"
desc = "A remote control switch for a mounted flasher."
icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
var/id = null
var/active = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/crema_switch
desc = "Burn baby burn!"
name = "crematorium igniter"
icon = 'icons/obj/power.dmi'
icon_state = "crema_switch"
anchored = 1.0
req_access = list(access_crematorium)
var/on = 0
var/area/area = null
var/otherarea = null
var/id = 1
/obj/machinery/button/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/device/detective_scanner))
return
return src.attack_hand(user)

View File

@@ -13,7 +13,6 @@
var/c_tag_order = 999
var/status = 1
anchored = 1.0
var/panel_open = 0 // 0 = Closed / 1 = Open
var/invuln = null
var/bugged = 0
var/obj/item/weapon/camera_assembly/assembly = null

View File

@@ -3,18 +3,41 @@
//Potential replacement for genetics revives or something I dunno (?)
//Find a dead mob with a brain and client.
/proc/find_dead_player(var/find_key)
if(isnull(find_key))
return
var/mob/selected = null
for(var/mob/living/M in player_list)
//Dead people only thanks!
if((M.stat != 2) || (!M.client))
continue
//They need a brain!
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.has_organ["brain"] && !H.has_brain())
continue
if(M.ckey == find_key)
selected = M
break
return selected
#define CLONE_BIOMASS 150
/obj/machinery/clonepod
anchored = 1
name = "cloning pod"
desc = "An electronically-lockable pod for growing organic tissue."
density = 1
anchored = 1
icon = 'icons/obj/cloning.dmi'
icon_state = "pod_0"
req_access = list(access_genetics) //For premature unlocking.
var/mob/living/occupant
var/heal_level = 90 //The clone is released once its health reaches this level.
var/heal_level = 20 //The clone is released once its health reaches this level.
var/heal_rate = 1
var/notoxin = 0
var/locked = 0
var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine.
var/mess = 0 //Need to clean out it if it's full of exploded clone.
@@ -22,6 +45,366 @@
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
var/biomass = CLONE_BIOMASS * 3
/obj/machinery/clonepod/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/cable_coil(src, 2)
RefreshParts()
/obj/machinery/clonepod/attack_ai(mob/user as mob)
add_hiddenprint(user)
return attack_hand(user)
/obj/machinery/clonepod/attack_hand(mob/user as mob)
if((isnull(occupant)) || (stat & NOPOWER))
return
if((!isnull(occupant)) && (occupant.stat != 2))
var/completion = (100 * ((occupant.health + 50) / (heal_level + 100))) // Clones start at -150 health
user << "Current clone cycle is [round(completion)]% complete."
return
//Clonepod
//Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R)
if(mess || attempting)
return 0
var/datum/mind/clonemind = locate(R.mind)
if(!istype(clonemind, /datum/mind)) //not a mind
return 0
if(clonemind.current && clonemind.current.stat != DEAD) //mind is associated with a non-dead body
return 0
if(clonemind.active) //somebody is using that mind
if(ckey(clonemind.key) != R.ckey)
return 0
else
for(var/mob/dead/observer/G in player_list)
if(G.ckey == R.ckey)
if(G.can_reenter_corpse)
break
else
return 0
attempting = 1 //One at a time!!
locked = 1
eject_wait = 1
spawn(30)
eject_wait = 0
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
occupant = H
if(!R.dna.real_name) //to prevent null names
R.dna.real_name = "clone ([rand(0,999)])"
H.real_name = R.dna.real_name
icon_state = "pod_1"
//Get the clone body ready
H.adjustCloneLoss(150) // New damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
H.adjustBrainLoss(80) // Even if healed to full health, it will have some brain damage
H.Paralyse(4)
//Here let's calculate their health so the pod doesn't immediately eject them!!!
H.updatehealth()
clonemind.transfer_to(H)
H.ckey = R.ckey
H << "<span class='notice'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><i>So this is what cloning feels like?</i></span>"
// -- Mode/mind specific stuff goes here
callHook("clone", list(H))
switch(ticker.mode.name)
if("revolution")
if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
ticker.mode.update_all_rev_icons() //So the icon actually appears
if("mercenary")
if(H.mind in ticker.mode.syndicates)
ticker.mode.update_all_synd_icons()
if("cult")
if(H.mind in ticker.mode.cult)
ticker.mode.add_cultist(occupant.mind)
ticker.mode.update_all_cult_icons() //So the icon actually appears
// -- End mode specific stuff
if(!R.dna)
H.dna = new /datum/dna()
H.dna.real_name = H.real_name
else
H.dna = R.dna
H.UpdateAppearance()
if(heal_level < 60)
randmutb(H) //Sometimes the clones come out wrong.
H.dna.UpdateSE()
H.dna.UpdateUI()
H.set_cloned_appearance()
for(var/datum/language/L in R.languages)
H.add_language(L.name)
H.flavor_texts = R.flavor.Copy()
H.suiciding = 0
attempting = 0
return 1
//Grow clones to maturity then kick them out. FREELOADERS
/obj/machinery/clonepod/process()
if(stat & NOPOWER) //Autoeject if power is lost
if(occupant)
locked = 0
go_out()
return
if((occupant) && (occupant.loc == src))
if((occupant.stat == DEAD) || (occupant.suiciding) || !occupant.key) //Autoeject corpses and suiciding dudes.
locked = 0
go_out()
connected_message("Clone Rejected: Deceased.")
return
else if(occupant.health < heal_level && occupant.getCloneLoss() > 0)
occupant.Paralyse(4)
//Slowly get that clone healed and finished.
occupant.adjustCloneLoss(-2 * heal_rate)
//Premature clones may have brain damage.
occupant.adjustBrainLoss(-1 * heal_rate)
//So clones don't die of oxyloss in a running pod.
if(occupant.reagents.get_reagent_amount("inaprovaline") < 30)
occupant.reagents.add_reagent("inaprovaline", 60)
//So clones will remain asleep for long enough to get them into cryo (Bay RP edit)
if(occupant.reagents.get_reagent_amount("stoxin") < 10)
occupant.reagents.add_reagent("stoxin", 5)
if(occupant.reagents.get_reagent_amount("chloralhydrate") < 1)
occupant.reagents.add_reagent("chloralhydrate", 1)
//Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
occupant.adjustOxyLoss(-4)
if(notoxin)
occupant.adjustToxLoss(-2) // If sufficiently upgraded - remove toxin damage from chloral
use_power(7500) //This might need tweaking.
return
else if((occupant.health >= heal_level) && (!eject_wait))
connected_message("Cloning Process Complete.")
locked = 0
go_out()
return
else if((!occupant) || (occupant.loc != src))
occupant = null
if(locked)
locked = 0
if(!mess)
icon_state = "pod_0"
//use_power(200)
return
return
//Let's unlock this early I guess. Might be too early, needs tweaking.
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isnull(occupant))
if(default_deconstruction_screwdriver(user, W))
return
if(default_deconstruction_crowbar(user, W))
return
if(default_part_replacement(user, W))
return
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(!check_access(W))
user << "<span class='warning'>Access Denied.</span>"
return
if((!locked) || (isnull(occupant)))
return
if((occupant.health < -20) && (occupant.stat != 2))
user << "<span class='warning'>Access Refused.</span>"
return
else
locked = 0
user << "System unlocked."
else if(istype(W, /obj/item/weapon/card/emag))
if(isnull(occupant))
return
user << "You force an emergency ejection."
locked = 0
go_out()
return
else if(istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
user << "<span class='notice'>\The [src] processes \the [W].</span>"
biomass += 50
user.drop_item()
del(W)
return
else if(istype(W, /obj/item/weapon/wrench))
if(locked && (anchored || occupant))
user << "<span class='warning'>Can not do that while [src] is in use.</span>"
else
if(anchored)
anchored = 0
connected.pod1 = null
connected = null
else
anchored = 1
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
if(anchored)
user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.")
else
user.visible_message("[user] unsecures [src] from the floor.", "You unsecure [src] from the floor.")
else
..()
//Put messages in the connected computer's temp var for display.
/obj/machinery/clonepod/proc/connected_message(var/message)
if((isnull(connected)) || (!istype(connected, /obj/machinery/computer/cloning)))
return 0
if(!message)
return 0
connected.temp = message
connected.updateUsrDialog()
return 1
/obj/machinery/clonepod/RefreshParts()
..()
var/rating = 0
for(var/obj/item/weapon/stock_parts/P in component_parts)
if(istype(P, /obj/item/weapon/stock_parts/scanning_module) || istype(P, /obj/item/weapon/stock_parts/manipulator))
rating += P.rating
heal_level = rating * 10 - 20
heal_rate = round(rating / 4)
if(rating >= 8)
notoxin = 1
else
notoxin = 0
/obj/machinery/clonepod/verb/eject()
set name = "Eject Cloner"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
go_out()
add_fingerprint(usr)
return
/obj/machinery/clonepod/proc/go_out()
if(locked)
return
if(mess) //Clean that mess and dump those gibs!
mess = 0
gibs(loc)
icon_state = "pod_0"
/*
for(var/obj/O in src)
O.loc = loc
*/
return
if(!(occupant))
return
/*
for(var/obj/O in src)
O.loc = loc
*/
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = loc
icon_state = "pod_0"
eject_wait = 0 //If it's still set somehow.
domutcheck(occupant) //Waiting until they're out before possible monkeyizing.
// occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
occupant = null
biomass -= CLONE_BIOMASS
return
/obj/machinery/clonepod/proc/malfunction()
if(occupant)
connected_message("Critical Error!")
mess = 1
icon_state = "pod_g"
occupant.ghostize()
spawn(5)
del(occupant)
return
/obj/machinery/clonepod/relaymove(mob/user as mob)
if(user.stat)
return
go_out()
return
/obj/machinery/clonepod/emp_act(severity)
if(prob(100/severity))
malfunction()
..()
/obj/machinery/clonepod/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = loc
ex_act(severity)
del(src)
return
if(2.0)
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = loc
ex_act(severity)
del(src)
return
if(3.0)
if(prob(25))
for(var/atom/movable/A as mob|obj in src)
A.loc = loc
ex_act(severity)
del(src)
return
else
return
//Health Tracker Implant
/obj/item/weapon/implant/health
name = "health implant"
var/healthstring = ""
/obj/item/weapon/implant/health/proc/sensehealth()
if(!implanted)
return "ERROR"
else
if(isliving(implanted))
var/mob/living/L = implanted
healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]"
if(!healthstring)
healthstring = "ERROR"
return healthstring
//Disk stuff.
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
//TO-DO: Make the genetics machine accept them.
/obj/item/weapon/disk/data
@@ -30,7 +413,7 @@
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
item_state = "card-id"
w_class = 2.0
var/datum/dna2/record/buf=null
var/datum/dna2/record/buf = null
var/read_only = 0 //Well,it's still a floppy disk
/obj/item/weapon/disk/data/proc/initializeDisk()
@@ -65,363 +448,18 @@
buf.dna.SE=new_SE
buf.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
//Find a dead mob with a brain and client.
/proc/find_dead_player(var/find_key)
if (isnull(find_key))
return
var/mob/selected = null
for(var/mob/living/M in player_list)
//Dead people only thanks!
if ((M.stat != 2) || (!M.client))
continue
//They need a brain!
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.has_organ["brain"] && !H.has_brain())
continue
if (M.ckey == find_key)
selected = M
break
return selected
//Disk stuff.
/obj/item/weapon/disk/data/New()
..()
var/diskcolor = pick(0,1,2)
src.icon_state = "datadisk[diskcolor]"
icon_state = "datadisk[diskcolor]"
/obj/item/weapon/disk/data/attack_self(mob/user as mob)
src.read_only = !src.read_only
user << "You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"]."
read_only = !read_only
user << "You flip the write-protect tab to [read_only ? "protected" : "unprotected"]."
/obj/item/weapon/disk/data/examine(mob/user)
..(user)
user << text("The write-protect tab is set to [src.read_only ? "protected" : "unprotected"].")
return
//Health Tracker Implant
/obj/item/weapon/implant/health
name = "health implant"
var/healthstring = ""
/obj/item/weapon/implant/health/proc/sensehealth()
if (!src.implanted)
return "ERROR"
else
if(isliving(src.implanted))
var/mob/living/L = src.implanted
src.healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]"
if (!src.healthstring)
src.healthstring = "ERROR"
return src.healthstring
/obj/machinery/clonepod/attack_ai(mob/user as mob)
src.add_hiddenprint(user)
return attack_hand(user)
/obj/machinery/clonepod/attack_hand(mob/user as mob)
if ((isnull(src.occupant)) || (stat & NOPOWER))
return
if ((!isnull(src.occupant)) && (src.occupant.stat != 2))
var/completion = (100 * ((src.occupant.health + 100) / (src.heal_level + 100)))
user << "Current clone cycle is [round(completion)]% complete."
return
//Clonepod
//Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R)
if(mess || attempting)
return 0
var/datum/mind/clonemind = locate(R.mind)
if(!istype(clonemind,/datum/mind)) //not a mind
return 0
if( clonemind.current && clonemind.current.stat != DEAD ) //mind is associated with a non-dead body
return 0
if(clonemind.active) //somebody is using that mind
if( ckey(clonemind.key)!=R.ckey )
return 0
else
for(var/mob/dead/observer/G in player_list)
if(G.ckey == R.ckey)
if(G.can_reenter_corpse)
break
else
return 0
src.heal_level = rand(10,40) //Randomizes what health the clone is when ejected
src.attempting = 1 //One at a time!!
src.locked = 1
src.eject_wait = 1
spawn(30)
src.eject_wait = 0
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
occupant = H
if(!R.dna.real_name) //to prevent null names
R.dna.real_name = "clone ([rand(0,999)])"
H.real_name = R.dna.real_name
src.icon_state = "pod_1"
//Get the clone body ready
H.adjustCloneLoss(150) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
H.adjustBrainLoss(src.heal_level + 50 + rand(10, 30)) // The rand(10, 30) will come out as extra brain damage
H.Paralyse(4)
//Here let's calculate their health so the pod doesn't immediately eject them!!!
H.updatehealth()
clonemind.transfer_to(H)
H.ckey = R.ckey
H << "<span class='notice'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><i>So this is what cloning feels like?</i></span>"
// -- Mode/mind specific stuff goes here
callHook("clone", list(H))
switch(ticker.mode.name)
if("revolution")
if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
ticker.mode.update_all_rev_icons() //So the icon actually appears
if("mercenary")
if(H.mind in ticker.mode.syndicates)
ticker.mode.update_all_synd_icons()
if("cult")
if (H.mind in ticker.mode.cult)
ticker.mode.add_cultist(src.occupant.mind)
ticker.mode.update_all_cult_icons() //So the icon actually appears
// -- End mode specific stuff
if(!R.dna)
H.dna = new /datum/dna()
H.dna.real_name = H.real_name
else
H.dna=R.dna
H.UpdateAppearance()
randmutb(H) //Sometimes the clones come out wrong.
H.dna.UpdateSE()
H.dna.UpdateUI()
H.set_cloned_appearance()
for(var/datum/language/L in R.languages)
H.add_language(L.name)
H.flavor_texts = R.flavor.Copy()
H.suiciding = 0
src.attempting = 0
return 1
//Grow clones to maturity then kick them out. FREELOADERS
/obj/machinery/clonepod/process()
if(stat & NOPOWER) //Autoeject if power is lost
if (src.occupant)
src.locked = 0
src.go_out()
return
if((src.occupant) && (src.occupant.loc == src))
if((src.occupant.stat == DEAD) || (src.occupant.suiciding) || !occupant.key) //Autoeject corpses and suiciding dudes.
src.locked = 0
src.go_out()
src.connected_message("Clone Rejected: Deceased.")
return
else if(src.occupant.health < src.heal_level)
src.occupant.Paralyse(4)
//Slowly get that clone healed and finished.
src.occupant.adjustCloneLoss(-2)
//Premature clones may have brain damage.
src.occupant.adjustBrainLoss(-1)
//So clones don't die of oxyloss in a running pod.
if (src.occupant.reagents.get_reagent_amount("inaprovaline") < 30)
src.occupant.reagents.add_reagent("inaprovaline", 60)
//So clones will remain asleep for long enough to get them into cryo (Bay RP edit)
if (src.occupant.reagents.get_reagent_amount("stoxin") < 10)
src.occupant.reagents.add_reagent("stoxin", 5)
if (src.occupant.reagents.get_reagent_amount("chloralhydrate") < 1)
src.occupant.reagents.add_reagent("chloralhydrate", 1)
//Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
src.occupant.adjustOxyLoss(-4)
use_power(7500) //This might need tweaking.
return
else if((src.occupant.health >= src.heal_level) && (!src.eject_wait))
src.connected_message("Cloning Process Complete.")
src.locked = 0
src.go_out()
return
else if ((!src.occupant) || (src.occupant.loc != src))
src.occupant = null
if (src.locked)
src.locked = 0
if (!src.mess)
icon_state = "pod_0"
//use_power(200)
return
return
//Let's unlock this early I guess. Might be too early, needs tweaking.
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (!src.check_access(W))
user << "\red Access Denied."
return
if ((!src.locked) || (isnull(src.occupant)))
return
if ((src.occupant.health < -20) && (src.occupant.stat != 2))
user << "\red Access Refused."
return
else
src.locked = 0
user << "System unlocked."
else if (istype(W, /obj/item/weapon/card/emag))
if (isnull(src.occupant))
return
user << "You force an emergency ejection."
src.locked = 0
src.go_out()
return
else if (istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
user << "\blue \The [src] processes \the [W]."
biomass += 50
user.drop_item()
del(W)
return
else if (istype(W, /obj/item/weapon/wrench))
if(src.locked && (src.anchored || src.occupant))
user << "\red Can not do that while [src] is in use."
else
if(src.anchored)
src.anchored = 0
connected.pod1 = null
connected = null
else
src.anchored = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
if(anchored)
user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.")
else
user.visible_message("[user] unsecures [src] from the floor.", "You unsecure [src] from the floor.")
else
..()
//Put messages in the connected computer's temp var for display.
/obj/machinery/clonepod/proc/connected_message(var/message)
if ((isnull(src.connected)) || (!istype(src.connected, /obj/machinery/computer/cloning)))
return 0
if (!message)
return 0
src.connected.temp = message
src.connected.updateUsrDialog()
return 1
/obj/machinery/clonepod/verb/eject()
set name = "Eject Cloner"
set category = "Object"
set src in oview(1)
if (usr.stat != 0)
return
src.go_out()
add_fingerprint(usr)
return
/obj/machinery/clonepod/proc/go_out()
if (src.locked)
return
if (src.mess) //Clean that mess and dump those gibs!
src.mess = 0
gibs(src.loc)
src.icon_state = "pod_0"
/*
for(var/obj/O in src)
O.loc = src.loc
*/
return
if (!(src.occupant))
return
/*
for(var/obj/O in src)
O.loc = src.loc
*/
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
src.icon_state = "pod_0"
src.eject_wait = 0 //If it's still set somehow.
domutcheck(src.occupant) //Waiting until they're out before possible monkeyizing.
// src.occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
src.occupant = null
src.biomass -= CLONE_BIOMASS
return
/obj/machinery/clonepod/proc/malfunction()
if(src.occupant)
src.connected_message("Critical Error!")
src.mess = 1
src.icon_state = "pod_g"
src.occupant.ghostize()
spawn(5)
del(src.occupant)
return
/obj/machinery/clonepod/relaymove(mob/user as mob)
if (user.stat)
return
src.go_out()
return
/obj/machinery/clonepod/emp_act(severity)
if(prob(100/severity)) malfunction()
..()
/obj/machinery/clonepod/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
else
user << text("The write-protect tab is set to [read_only ? "protected" : "unprotected"].")
return
/*

View File

@@ -5,19 +5,18 @@
// Allows remote operation of electrical systems on station (SMESs and Breaker Boxes)
/obj/machinery/computer/rcon
name = "\improper RCON remote control console"
name = "\improper RCON console"
desc = "Console used to remotely control machinery on the station."
icon = 'icons/obj/computer.dmi'
icon_state = "ai-fixer"
circuit = /obj/item/weapon/circuitboard/rcon_console
req_one_access = list(access_engine)
var/current_tag = null
var/list/known_SMESs = null
var/list/known_breakers = null
// Allows you to hide specific parts of the UI
var/hide_SMES = 0
var/hide_SMES_details = 0
var/hide_breakers = 0
var/obj/nano_module/rcon/rcon
/obj/machinery/computer/rcon/New()
..()
rcon = new(src)
// Proc: attack_hand()
// Parameters: 1 (user - Person which clicked this computer)
@@ -29,105 +28,5 @@
// Proc: ui_interact()
// Parameters: 4 (standard NanoUI parameters)
// 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)
FindDevices() // Update our devices list
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"] = smeslist
// 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 Control 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)
/obj/machinery/computer/rcon/ui_interact(mob/user, ui_key = "rcon", var/datum/nanoui/ui = null, var/force_open = 1)
rcon.ui_interact(user, ui_key, ui, force_open)

View File

@@ -110,7 +110,7 @@
if(message_cooldown)
usr << "Please allow at least one minute to pass between announcements"
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)))
return
crew_announcement.Announce(input)

View File

@@ -6,11 +6,10 @@
idle_power_usage = 250
active_power_usage = 500
circuit = "/obj/item/weapon/circuitboard/crew"
var/list/tracked = list( )
var/obj/nano_module/crew_monitor/crew_monitor
/obj/machinery/computer/crew/New()
tracked = list()
crew_monitor = new(src)
..()
@@ -25,6 +24,8 @@
return
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()
@@ -38,90 +39,5 @@
icon_state = initial(icon_state)
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)
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
crew_monitor.ui_interact(user)

View File

@@ -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

View File

@@ -123,6 +123,12 @@
desc = "Monitors the prison."
networks = list("Prison")
/datum/file/camnet_key/syndicate
name = "Camera Network Key"
title = "%!#BUFFER OVERFLOW"
desc = "Connects to security cameras."
networks = list("SS13")
hidden_file = 1
/*
@@ -174,7 +180,7 @@
/datum/file/program/security
name = "camera monitor"
desc = "Connets to the Nanotrasen Camera Network"
desc = "Connects to the Nanotrasen Camera Network"
image = 'icons/ntos/camera.png'
active_state = "camera-static"
@@ -268,15 +274,19 @@
reset_current()
usr.reset_view(null)
key = input(usr,"Select a camera network key:", "Key Select", null) as null|anything in computer.list_files(/datum/file/camnet_key)
camera_list = null
update_icon()
computer.update_icon()
select_key(key)
if(key)
interact()
else
usr << "The screen turns to static."
return
/datum/file/program/security/proc/select_key(var/selected_key)
key = selected_key
camera_list = null
update_icon()
computer.update_icon()
/datum/file/program/security/proc/set_current(var/obj/machinery/camera/C)
if(current == C)
return
@@ -300,3 +310,35 @@
// Atlantis: Required for camnetkeys to work.
/datum/file/program/security/hidden
hidden_file = 1
/*
Camera monitoring program
Works much as the parent program, except:
* It requires a camera to be found using the proximity network card.
* It begins with all cam-access.
*/
/datum/file/program/security/syndicate
name = "camer# moni!%r"
desc = "Cons the Nanotrash Camera Network"
var/special_key = new/datum/file/camnet_key/syndicate
var/camera_conn = null
interact()
if(!interactable())
return
if(!computer.net)
computer.Crash(MISSING_PERIPHERAL)
return
camera_conn = computer.net.connect_to(/obj/machinery/camera,camera_conn)
if(!camera_conn)
computer.Crash(NETWORK_FAILURE)
return
// On interact, override camera key selection
select_key(special_key)
..()

View File

@@ -115,7 +115,7 @@
if(message_cooldown)
usr << "Please allow at least one minute to pass between announcements"
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())
return
crew_announcement.Announce(input)

View File

@@ -169,6 +169,9 @@
if(typekey == null)
typekey = /obj/machinery
var/list/machines = list()
for(var/obj/O in T)
if(istype(O,typekey))
machines += O
for(var/d in cardinal)
var/turf/T2 = get_step(T,d)
for(var/obj/O in T2)

View File

@@ -28,6 +28,13 @@
icon_state = "datadisk_arcade"
spawn_files = list(/datum/file/program/security)
/obj/item/weapon/disk/file/cameras/syndicate
name = "Camera Viewer"
desc = "A program install disk. A crude skull has been drawn on it and there is a list of items:\nFloppy Drive\nCamera Card\nNetwork Card: Adjacent\nPosition laptop nearby camera, enjoy."
icon = 'icons/obj/stock_parts.dmi'
icon_state = "datadisk_arcade"
spawn_files = list(/datum/file/program/security/syndicate)
/obj/item/weapon/disk/file/card
name = "ID Card Modifier"
desc = "A program install disk."

View File

@@ -148,30 +148,20 @@
else
icon_state = "doorctrl0"
/obj/machinery/driver_button/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/button/driver
name = "mass driver button"
desc = "A remote control switch for a mass driver."
/obj/machinery/driver_button/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/device/detective_scanner))
/obj/machinery/button/driver/attack_hand(mob/user as mob)
if(..())
return
return src.attack_hand(user)
/obj/machinery/driver_button/attack_hand(mob/user as mob)
src.add_fingerprint(usr)
if(stat & (NOPOWER|BROKEN))
return
if(active)
return
add_fingerprint(user)
use_power(5)
active = 1
icon_state = "launcheract"
for(var/obj/machinery/door/blast/M in world)
for(var/obj/machinery/door/blast/M in machines)
if (M.id == src.id)
spawn( 0 )
M.open()
@@ -179,13 +169,13 @@
sleep(20)
for(var/obj/machinery/mass_driver/M in world)
for(var/obj/machinery/mass_driver/M in machines)
if(M.id == src.id)
M.drive()
sleep(50)
for(var/obj/machinery/door/blast/M in world)
for(var/obj/machinery/door/blast/M in machines)
if (M.id == src.id)
spawn( 0 )
M.close()

View File

@@ -94,6 +94,10 @@
secured_wires = 1
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
name = "Freezer Airlock"
icon = 'icons/obj/doors/Doorfreezer.dmi'
@@ -330,7 +334,7 @@ About the new airlock wires panel:
return ((src.aiControlDisabled==1) && (!hackProof) && (!src.isAllPowerLoss()));
/obj/machinery/door/airlock/proc/arePowerSystemsOn()
if (stat & NOPOWER)
if (stat & (NOPOWER|BROKEN))
return 0
return (src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0)
@@ -451,7 +455,7 @@ About the new airlock wires panel:
if(density)
flick("door_spark", src)
if("deny")
if(density && !(stat & (BROKEN|NOPOWER)))
if(density && src.arePowerSystemsOn())
flick("door_deny", src)
return
@@ -900,12 +904,7 @@ About the new airlock wires panel:
var/obj/item/weapon/pai_cable/cable = C
cable.plugin(src, user)
else if(!repairing && istype(C, /obj/item/weapon/crowbar))
var/beingcrowbarred = null
if(istype(C, /obj/item/weapon/crowbar) )
beingcrowbarred = 1 //derp, Agouri
else
beingcrowbarred = 0
if( beingcrowbarred && src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) )
if(src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
if(do_after(user,40))
@@ -936,7 +935,7 @@ About the new airlock wires panel:
del(src)
return
else if(arePowerSystemsOn() && !(stat & BROKEN))
else if(arePowerSystemsOn())
user << "\blue The airlock's motors resist your efforts to force it."
else if(locked)
user << "\blue The airlock's bolts prevent it from being forced."
@@ -946,22 +945,22 @@ About the new airlock wires panel:
else
spawn(0) close(1)
else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && (!arePowerSystemsOn() || (stat & BROKEN)))
else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && !arePowerSystemsOn())
if(locked)
user << "\blue The airlock's bolts prevent it from being forced."
else if( !welded && !operating )
if(density)
var/obj/item/weapon/twohanded/fireaxe/F = C
if(F:wielded)
if(F.wielded)
spawn(0) open(1)
else
user << "\red You need to be wielding the Fire axe to do that."
user << "\red You need to be wielding \the [C] to do that."
else
var/obj/item/weapon/twohanded/fireaxe/F = C
if(F:wielded)
if(F.wielded)
spawn(0) close(1)
else
user << "\red You need to be wielding the Fire axe to do that."
user << "\red You need to be wielding \the [C] to do that."
else
..()
@@ -1007,7 +1006,9 @@ About the new airlock wires panel:
if(operating || welded || locked)
return
if(!forced)
if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) )
//despite the name, this wire is for general door control.
//Bolts are already covered by the check for locked, above
if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
return
if(safe)
for(var/turf/turf in locs)
@@ -1131,9 +1132,6 @@ About the new airlock wires panel:
..()
update_icon()
/obj/machinery/door/airlock/proc/hasPower()
return ((src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0) && !(stat & (NOPOWER|BROKEN)))
/obj/machinery/door/airlock/proc/prison_open()
src.unlock()
src.open()

View File

@@ -8,11 +8,6 @@ obj/machinery/door/airlock
var/datum/radio_frequency/radio_connection
var/cur_command = null //the command the door is currently attempting to complete
obj/machinery/door/airlock/proc/can_radio()
if(!arePowerSystemsOn())
return 0
return 1
obj/machinery/door/airlock/process()
..()
if (arePowerSystemsOn())
@@ -21,8 +16,6 @@ obj/machinery/door/airlock/process()
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
if (!arePowerSystemsOn()) return //no power
if (!can_radio()) return //no radio
if(!signal || signal.encryption) return
if(id_tag != signal.data["tag"] || !signal.data["command"]) return

View File

@@ -119,17 +119,13 @@
user.show_message(text("\red [src] is now secured."))
src.overlays += "[base_state]-s"
/obj/machinery/flasher_button/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/button/flasher
name = "flasher button"
desc = "A remote control switch for a mounted flasher."
/obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user as mob)
return src.attack_hand(user)
/obj/machinery/button/flasher/attack_hand(mob/user as mob)
/obj/machinery/flasher_button/attack_hand(mob/user as mob)
if(stat & (NOPOWER|BROKEN))
return
if(active)
if(..())
return
use_power(5)

View File

@@ -24,10 +24,12 @@ Possible to do for anyone motivated enough:
* Holopad
*/
// HOLOPAD MODE
// 0 = RANGE BASED
// 1 = AREA BASED
var/const/HOLOPAD_MODE = 0
#define HOLOPAD_PASSIVE_POWER_USAGE 1
#define HOLOGRAM_POWER_USAGE 2
#define RANGE_BASED 4
#define AREA_BASED 6
var/const/HOLOPAD_MODE = RANGE_BASED
/obj/machinery/hologram/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.
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/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
@@ -62,27 +64,28 @@ var/const/HOLOPAD_MODE = 0
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.
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)
else if(master==user)//If there is a hologram, remove it. But only if the user is the master. Otherwise do nothing.
clear_holo()
else//If there is a hologram, remove it.
clear_holo(user)
return
/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(!hologram)//If there is not already a hologram.
if(!(stat & NOPOWER) && user.eyeobj.loc == src.loc)//If the projector has power and client eye is on it
if (user.holo)
user << "<span class='danger'>ERROR:</span> Image feed in progress."
return
create_holo(user)//Create one.
src.visible_message("A holographic image of [user] flicks to life right before your eyes!")
else
user << "\red ERROR: \black Image feed in progress."
else
user << "\red ERROR: \black Unable to project hologram."
user << "<span class='danger'>ERROR:</span> Unable to project hologram."
return
/*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.*/
/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)
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)
@@ -96,10 +99,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
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)
if(M && hologram && master)
if(M)
for(var/mob/living/silicon/ai/master in masters)
//var/name_used = M.GetVoice()
var/rendered = "<i><span class='game say'>Holopad received, <span class='message'>[text]</span></span></i>"
//The lack of name_used is needed, because message already contains a name. This is needed for simple mobs to emote properly.
@@ -107,39 +110,41 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
return
/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.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.anchored = 1//So space wind cannot drag it.
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
hologram.SetLuminosity(2) //hologram lighting
hologram.color = color //painted holopad gives coloured holograms
masters[A] = hologram
SetLuminosity(2) //pad lighting
icon_state = "holopad1"
A.holo = src
master = A//AI is the master.
use_power = 2//Active power usage.
use_power += HOLOGRAM_POWER_USAGE
return 1
/obj/machinery/hologram/holopad/proc/clear_holo()
// hologram.SetLuminosity(0)//Clear lighting. //handled by the lighting controller when its ower is deleted
del(hologram)//Get rid of hologram.
if(master.holo == src)
master.holo = null
master = null//Null the master, since no-one is using it now.
/obj/machinery/hologram/holopad/proc/clear_holo(mob/living/silicon/ai/user)
if(user.holo == src)
user.holo = null
del(masters[user])//Get rid of user's hologram //qdel
masters -= user //Discard AI from the list of those who use holopad
use_power = max(HOLOPAD_PASSIVE_POWER_USAGE, use_power - HOLOGRAM_POWER_USAGE)//Reduce power usage
if (!masters.len)//If no users left
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
icon_state = "holopad0"
use_power = 1//Passive power usage.
use_power = HOLOPAD_PASSIVE_POWER_USAGE
return 1
/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(!(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
else if (HOLOPAD_MODE == 1)
else if (HOLOPAD_MODE == AREA_BASED)
var/area/holo_area = get_area(src)
var/area/eye_area = get_area(master.eyeobj)
@@ -147,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)
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
/obj/machinery/hologram/holopad/proc/move_hologram()
if(hologram)
step_to(hologram, master.eyeobj) // So it turns.
hologram.loc = get_turf(master.eyeobj)
/obj/machinery/hologram/holopad/proc/move_hologram(mob/living/silicon/ai/user)
if(masters[user])
step_to(masters[user], user.eyeobj) // So it turns.
var/obj/effect/overlay/H = masters[user]
H.loc = get_turf(user.eyeobj)
masters[user] = H
return 1
/*
@@ -166,7 +172,6 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
use_power = 1
idle_power_usage = 5
active_power_usage = 100
var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
//Destruction procs.
/obj/machinery/hologram/ex_act(severity)
@@ -189,9 +194,9 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
del(src)
return
/obj/machinery/hologram/Del()
if(hologram)
src:clear_holo()
/obj/machinery/hologram/holopad/Del()
for (var/mob/living/silicon/ai/master in masters)
clear_holo(master)
..()
/*
@@ -223,3 +228,9 @@ Holographic project of everything else.
desc = "It makes a hologram appear...with magnets or something..."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "hologram0"
#undef RANGE_BASED
#undef AREA_BASED
#undef HOLOPAD_PASSIVE_POWER_USAGE
#undef HOLOGRAM_POWER_USAGE

View File

@@ -32,42 +32,23 @@
on_icon = "surgery"
////////////////////SWITCH///////////////////////////////////////
/obj/machinery/holosign_switch
/obj/machinery/button/holosign
name = "holosign switch"
icon = 'icons/obj/power.dmi'
icon_state = "light1"
desc = "A remote control switch for holosign."
var/id = null
var/active = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
icon = 'icons/obj/power.dmi'
icon_state = "crema_switch"
/obj/machinery/holosign_switch/attack_ai(mob/user as mob)
return src.attack_hand(user)
/
/obj/machinery/holosign_switch/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/device/detective_scanner))
return
return src.attack_hand(user)
/obj/machinery/holosign_switch/attack_hand(mob/user as mob)
src.add_fingerprint(usr)
if(stat & (NOPOWER|BROKEN))
/obj/machinery/button/holosign/attack_hand(mob/user as mob)
if(..())
return
add_fingerprint(user)
use_power(5)
active = !active
if(active)
icon_state = "light1"
else
icon_state = "light0"
icon_state = "light[active]"
for(var/obj/machinery/holosign/M in world)
for(var/obj/machinery/holosign/M in machines)
if (M.id == src.id)
spawn( 0 )
M.toggle()

View File

@@ -115,17 +115,13 @@
ignite()
..(severity)
/obj/machinery/ignition_switch/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/button/ignition
name = "ignition switch"
desc = "A remote control switch for a mounted igniter."
/obj/machinery/ignition_switch/attackby(obj/item/weapon/W, mob/user as mob)
return src.attack_hand(user)
/obj/machinery/button/ignition/attack_hand(mob/user as mob)
/obj/machinery/ignition_switch/attack_hand(mob/user as mob)
if(stat & (NOPOWER|BROKEN))
return
if(active)
if(..())
return
use_power(5)

View File

@@ -70,7 +70,7 @@ datum/track/New(var/title_name, var/audio)
return
if(stat & (NOPOWER|BROKEN))
usr << "\the [src] doesn't appear to function."
usr << "\The [src] doesn't appear to function."
return
if(href_list["change_track"])
@@ -109,7 +109,7 @@ datum/track/New(var/title_name, var/audio)
/obj/machinery/media/jukebox/interact(mob/user)
if(stat & (NOPOWER|BROKEN))
usr << "\the [src] doesn't appear to function."
usr << "\The [src] doesn't appear to function."
return
ui_interact(user)

View File

@@ -19,7 +19,6 @@
var/seconds_electrified = 0;
var/shoot_inventory = 0
var/locked = 0
var/panel_open = 0 //Hacking a smartfridge
var/scan_id = 1
var/is_secure = 0
var/datum/wires/smartfridge/wires = null

View File

@@ -15,7 +15,7 @@
/obj/machinery/light_switch/New()
..()
spawn(5)
src.area = src.loc.loc
src.area = get_area(src)
if(otherarea)
src.area = locate(text2path("/area/[otherarea]"))
@@ -32,10 +32,7 @@
if(stat & NOPOWER)
icon_state = "light-p"
else
if(on)
icon_state = "light1"
else
icon_state = "light0"
icon_state = "light[on]"
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))

View File

@@ -28,6 +28,9 @@ Class Variables:
component_parts (list)
A list of component parts of machine used by frame based machines.
panel_open (num)
Whether the panel is open
uid (num)
Unique id of machine across all machines.
@@ -43,9 +46,6 @@ Class Variables:
MAINT:8 -- machine is currently under going maintenance.
EMPED:16 -- temporary broken by EMP pulse
manual (num)
Currently unused.
Class Procs:
New() 'game/machinery/machine.dm'
@@ -104,13 +104,12 @@ Class Procs:
//2 = run auto, use active
var/idle_power_usage = 0
var/active_power_usage = 0
var/power_channel = EQUIP
//EQUIP,ENVIRON or LIGHT
var/list/component_parts = list() //list of all the parts used to build it, if made from certain kinds of frames.
var/power_channel = EQUIP //EQUIP, ENVIRON or LIGHT
var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
var/uid
var/manual = 0
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/panel_open = 0
var/global/gl_uid = 1
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
/obj/machinery/New(l, d=0)
..(l)
@@ -267,6 +266,54 @@ Class Procs:
else
return 0
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
if(!istype(C))
return 0
if(!panel_open)
return 0
. = dismantle()
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S)
if(!istype(S))
return 0
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
user << "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>"
update_icon()
return 1
/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
if(!istype(R))
return 0
if(!component_parts)
return 0
if(panel_open)
var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
var/P
for(var/obj/item/weapon/stock_parts/A in component_parts)
for(var/D in CB.req_components)
var/T = text2path(D)
if(ispath(A.type, T))
P = T
break
for(var/obj/item/weapon/stock_parts/B in R.contents)
if(istype(B, P) && istype(A, P))
if(B.rating > A.rating)
R.remove_from_storage(B, src)
R.handle_item_insertion(A, 1)
component_parts -= A
component_parts += B
B.loc = null
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
break
update_icon()
RefreshParts()
else
user << "<span class='notice'>Following parts detected in the machine:</span>"
for(var/var/obj/item/C in component_parts)
user << "<span class='notice'> [C.name]</span>"
return 1
/obj/machinery/proc/dismantle()
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)

View File

@@ -5,13 +5,13 @@
/obj/machinery/porta_turret/tag
// Reasonable defaults, in case someone manually spawns us
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/blue
lasercolor = "b"
installation = /obj/item/weapon/gun/energy/laser/bluetag
installation = /obj/item/weapon/gun/energy/lasertag/blue
/obj/machinery/porta_turret/tag/New()
..()
@@ -19,8 +19,8 @@
/obj/machinery/porta_turret/tag/weapon_setup(var/obj/item/weapon/gun/energy/E)
switch(E.type)
if(/obj/item/weapon/gun/energy/laser/bluetag)
eprojectile = /obj/item/weapon/gun/energy/laser/bluetag
if(/obj/item/weapon/gun/energy/lasertag/blue)
eprojectile = /obj/item/weapon/gun/energy/lasertag/blue
lasercolor = "b"
req_access = list(access_maint_tunnels, access_theatre)
check_arrest = 0
@@ -30,8 +30,8 @@
check_anomalies = 0
shot_delay = 30
if(/obj/item/weapon/gun/energy/laser/redtag)
eprojectile = /obj/item/weapon/gun/energy/laser/redtag
if(/obj/item/weapon/gun/energy/lasertag/red)
eprojectile = /obj/item/weapon/gun/energy/lasertag/red
lasercolor = "r"
req_access = list(access_maint_tunnels, access_theatre)
check_arrest = 0
@@ -86,13 +86,13 @@
..()
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
del(Proj) // qdel
sleep(100)
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
del(Proj) // qdel
sleep(100)
@@ -110,10 +110,10 @@
switch(lasercolor)
if("b")
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")
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

View File

@@ -733,7 +733,7 @@
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>"
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
else
target_type = /obj/machinery/porta_turret

View File

@@ -3,60 +3,66 @@
icon = 'icons/obj/objects.dmi'
icon_state = "borgcharger0"
density = 1
anchored = 1.0
anchored = 1
use_power = 1
idle_power_usage = 50
active_power_usage = 50
var/mob/occupant = null
var/max_internal_charge = 15000 // Two charged borgs in a row with default cell
var/current_internal_charge = 15000 // Starts charged, to prevent power surges on round start
var/charging_cap_active = 25000 // Active Cap - When cyborg is inside
var/charging_cap_passive = 2500 // Passive Cap - Recharging internal capacitor when no cyborg is inside
var/obj/item/weapon/cell/cell = null
//var/max_internal_charge = 15000 // Two charged borgs in a row with default cell
//var/current_internal_charge = 15000 // Starts charged, to prevent power surges on round start
var/charging_cap_active = 1000 // Active Cap - When cyborg is inside
var/charging_cap_passive = 250 // Passive Cap - Recharging internal capacitor when no cyborg is inside
var/icon_update_tick = 0 // Used to update icon only once every 10 ticks
var/charge_rate = 250 // How much charge is restored per tick
var/weld_rate = 0 // How much brute damage is repaired per tick
var/wire_rate = 0 // How much burn damage is repaired per tick
New()
/obj/machinery/recharge_station/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/recharge_station(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/cell/high(src)
component_parts += new /obj/item/stack/cable_coil(src, 5)
build_icon()
update_icon()
process()
RefreshParts()
/obj/machinery/recharge_station/process()
if(stat & (BROKEN))
return
if((stat & (NOPOWER)) && !current_internal_charge) // No Power.
if((stat & (NOPOWER)) && (!cell || cell.percent() <= 0)) // No Power.
return
var/chargemode = 0
if(src.occupant)
if(occupant)
process_occupant()
chargemode = 1
// Power Stuff
if(!cell) // Shouldn't be possible, but sanity check
return
if(stat & NOPOWER)
current_internal_charge = max(0, (current_internal_charge - (50 * CELLRATE))) // Internal Circuitry, 50W load. No power - Runs from internal cell
cell.use(50 * CELLRATE) // Internal Circuitry, 50W load. No power - Runs from internal cell
return // No external power = No charging
if(max_internal_charge < current_internal_charge)
current_internal_charge = max_internal_charge// Safety check if varedit adminbus or something screws up
// Calculating amount of power to draw
var/charge_diff = max_internal_charge - current_internal_charge // OK we have charge differences
charge_diff = charge_diff / CELLRATE // Deconvert from Charge to Joules
if(chargemode) // Decide if use passive or active power
charge_diff = between(0, charge_diff, charging_cap_active) // Trim the values to limits
else // We should have load for this tick in Watts
charge_diff = between(0, charge_diff, charging_cap_passive)
var/charge_diff = (chargemode ? charging_cap_active : charging_cap_passive) + 50 // 50W for circuitry
charge_diff += 50 // 50W for circuitry
charge_diff = cell.give(charge_diff)
if(idle_power_usage != charge_diff) // Force update, but only when our power usage changed this tick.
idle_power_usage = charge_diff
update_use_power(1,1)
current_internal_charge = min((current_internal_charge + ((charge_diff - 50) * CELLRATE)), max_internal_charge)
update_use_power(1, 1)
if(icon_update_tick >= 10)
update_icon()
@@ -67,32 +73,64 @@
return 1
allow_drop()
/obj/machinery/recharge_station/allow_drop()
return 0
examine(mob/user)
/obj/machinery/recharge_station/examine(mob/user)
..(user)
user << "The charge meter reads: [round(chargepercentage())]%"
proc/chargepercentage()
return ((current_internal_charge / max_internal_charge) * 100)
/obj/machinery/recharge_station/proc/chargepercentage()
if(!cell)
return 0
return cell.percent()
relaymove(mob/user as mob)
/obj/machinery/recharge_station/relaymove(mob/user as mob)
if(user.stat)
return
src.go_out()
go_out()
return
emp_act(severity)
/obj/machinery/recharge_station/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(occupant)
occupant.emp_act(severity)
go_out()
if(cell)
cell.emp_act(severity)
..(severity)
update_icon()
/obj/machinery/recharge_station/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(!occupant)
if(default_deconstruction_screwdriver(user, O))
return
if(default_deconstruction_crowbar(user, O))
return
if(default_part_replacement(user, O))
return
..()
/obj/machinery/recharge_station/RefreshParts()
..()
var/man_rating = 0
var/cap_rating = 0
for(var/obj/item/weapon/stock_parts/P in component_parts)
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
cap_rating += P.rating
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
man_rating += P.rating
cell = locate(/obj/item/weapon/cell) in component_parts
charge_rate = 125 * cap_rating
charging_cap_passive = charge_rate
weld_rate = max(0, man_rating - 3)
wire_rate = max(0, man_rating - 5)
/obj/machinery/recharge_station/update_icon()
..()
overlays.Cut()
switch(round(chargepercentage()))
@@ -109,70 +147,72 @@
if(99 to 110)
overlays += image('icons/obj/objects.dmi', "statn_c100")
proc
build_icon()
/obj/machinery/recharge_station/proc/build_icon()
if(NOPOWER|BROKEN)
if(src.occupant)
if(occupant)
icon_state = "borgcharger1"
else
icon_state = "borgcharger0"
else
icon_state = "borgcharger0"
process_occupant()
if(src.occupant)
if (istype(occupant, /mob/living/silicon/robot))
/obj/machinery/recharge_station/proc/process_occupant()
if(occupant)
if(istype(occupant, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = occupant
if(R.module)
R.module.respawn_consumable(R)
if(!R.cell)
return
if(!R.cell.fully_charged())
var/diff = min(R.cell.maxcharge - R.cell.charge, 250) // Capped at 250 charge / tick
diff = min(diff, current_internal_charge) // No over-discharging
var/diff = min(R.cell.maxcharge - R.cell.charge, charge_rate) // Capped at charge_rate charge / tick
if (cell.use(diff))
R.cell.give(diff)
current_internal_charge -= diff
if(weld_rate && R.getBruteLoss())
R.adjustBruteLoss(-1)
if(wire_rate && R.getFireLoss())
R.adjustFireLoss(-1)
else
update_use_power(1)
go_out()
if(!( src.occupant ))
/obj/machinery/recharge_station/proc/go_out()
if(!(occupant))
return
//for(var/obj/O in src)
// O.loc = src.loc
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
src.occupant = null
// O.loc = loc
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = loc
occupant = null
build_icon()
update_use_power(1)
return
verb
move_eject()
/obj/machinery/recharge_station/verb/move_eject()
set category = "Object"
set src in oview(1)
if (usr.stat != 0)
if(usr.stat != 0)
return
src.go_out()
go_out()
add_fingerprint(usr)
return
move_inside()
/obj/machinery/recharge_station/verb/move_inside()
set category = "Object"
set src in oview(1)
if (usr.stat == 2)
if(usr.stat == 2)
//Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
return
if (!(istype(usr, /mob/living/silicon/)))
usr << "\blue <B>Only non-organics may enter the recharger!</B>"
if(!(istype(usr, /mob/living/silicon/)))
usr << "<span class='notice'>Only non-organics may enter the recharger!</span>"
return
if (src.occupant)
usr << "\blue <B>The cell is already occupied!</B>"
if(occupant)
usr << "<span class='notice'>The cell is already occupied!</span>"
return
if (!usr:cell)
usr<<"\blue Without a powercell, you can't be recharged."
if(!usr:cell)
usr << "<span class='notice'>Without a powercell, you can't be recharged.</span>"
//Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
return
usr.stop_pulling()
@@ -180,10 +220,10 @@
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
src.occupant = usr
occupant = usr
/*for(var/obj/O in src)
O.loc = src.loc*/
src.add_fingerprint(usr)
O.loc = loc*/
add_fingerprint(usr)
build_icon()
update_use_power(1)
return

View File

@@ -7,7 +7,6 @@
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
var/obj/item/weapon/cell/cell
var/on = 0
var/open = 0
var/set_temperature = T0C + 50 //K
var/heating_power = 40000
@@ -20,14 +19,14 @@
/obj/machinery/space_heater/update_icon()
overlays.Cut()
icon_state = "sheater[on]"
if(open)
if(panel_open)
overlays += "sheater-open"
/obj/machinery/space_heater/examine(mob/user)
..(user)
user << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
if(open)
user << "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]."
if(panel_open)
user << "The power cell is [cell ? "installed" : "missing"]."
else
user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
@@ -43,7 +42,7 @@
/obj/machinery/space_heater/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/cell))
if(open)
if(panel_open)
if(cell)
user << "There is already a power cell inside."
return
@@ -61,10 +60,10 @@
user << "The hatch must be open to insert a power cell."
return
else if(istype(I, /obj/item/weapon/screwdriver))
open = !open
user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].")
panel_open = !panel_open
user.visible_message("\blue [user] [panel_open ? "opens" : "closes"] the hatch on the [src].", "\blue You [panel_open ? "open" : "close"] the hatch on the [src].")
update_icon()
if(!open && user.machine == src)
if(!panel_open && user.machine == src)
user << browse(null, "window=spaceheater")
user.unset_machine()
else
@@ -77,7 +76,7 @@
/obj/machinery/space_heater/interact(mob/user as mob)
if(open)
if(panel_open)
var/dat
dat = "Power cell: "
@@ -120,7 +119,7 @@
set_temperature = dd_range(T0C, T0C + 90, set_temperature + value)
if("cellremove")
if(open && cell && !usr.get_active_hand())
if(panel_open && cell && !usr.get_active_hand())
usr.visible_message("\blue [usr] removes \the [cell] from \the [src].", "\blue You remove \the [cell] from \the [src].")
cell.updateicon()
usr.put_in_hands(cell)
@@ -129,7 +128,7 @@
if("cellinstall")
if(open && !cell)
if(panel_open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()

View File

@@ -589,7 +589,6 @@
var/radiation_level = 2 // 1 is removing germs, 2 is removing blood, 3 is removing phoron.
var/model_text = "" // Some flavour text for the topic box.
var/locked = 1 // If locked, nothing can be taken from or added to the cycler.
var/panel_open = 0 // Hacking!
var/can_repair // If set, the cycler can repair voidsuits.
var/electrified = 0

View File

@@ -89,7 +89,7 @@
return
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
if(Proj.damage_type == HALLOSS)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
take_damage(Proj.damage)
..()
@@ -299,7 +299,7 @@
popping = 0
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
if(Proj.damage_type == HALLOSS)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
src.health -= Proj.damage
..()

View File

@@ -1,17 +1,38 @@
#define CAT_NORMAL 0
#define CAT_HIDDEN 1
#define CAT_COIN 2
#define CAT_NORMAL 1
#define CAT_HIDDEN 2 // also used in corresponding wires/vending.dm
#define CAT_COIN 4
/**
* Datum used to hold information about a product in a vending machine
*/
/datum/data/vending_product
var/product_name = "generic"
var/product_name = "generic" // Display name for the product
var/product_path = null
var/amount = 0
var/price = 0
var/display_color = "blue"
var/category = CAT_NORMAL
var/amount = 0 // Amount held in the vending machine
var/price = 0 // Price to buy one
var/display_color = null // Display color for vending machine listing
var/category = CAT_NORMAL // CAT_HIDDEN for contraband, CAT_COIN for premium
/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
if(!name)
var/atom/tmp = new path
src.product_name = initial(tmp.name)
del(tmp)
else
src.product_name = name
src.amount = amount
src.price = price
src.display_color = color
src.category = category
/**
* A vending machine
*/
/obj/machinery/vending
name = "Vendomat"
desc = "A generic vending machine."
@@ -21,69 +42,107 @@
anchored = 1
density = 1
var/icon_vend //Icon_state when vending
var/icon_deny //Icon_state when denying access
// Power
use_power = 1
idle_power_usage = 10
var/vend_power_usage = 150 //actuators and stuff
// Vending-related
var/active = 1 //No sales pitches if off!
var/vend_ready = 1 //Are we ready to vend?? Is it time??
var/vend_delay = 10 //How long does it take to vend?
var/datum/data/vending_product/currently_vending = null // A /datum/data/vending_product instance of what we're paying for right now.
var/categories = CAT_NORMAL // Bitmask of cats we're currently showing
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_error = 0 // Set to 1 if status_message is an error
// To be filled out at compile time
/*
Variables used to initialize the product list
These are used for initialization only, and so are optional if
product_records is specified
*/
var/list/products = list() // For each, use the following pattern:
var/list/contraband = list() // list(/type/path = amount,/type/path2 = amount2)
var/list/premium = list() // No specified amount = only one in stock
var/list/prices = list() // Prices for each item, list(/type/path = price), items not in the list don't have a price.
var/product_slogans = "" //String of slogans separated by semicolons, optional
var/product_ads = "" //String of small ad messages in the vending screen - random chance
// List of vending_product items available.
var/list/product_records = list()
var/list/hidden_records = list()
var/list/coin_records = list()
// Variables used to initialize advertising
var/product_slogans = "" //String of slogans spoken out loud, separated by semicolons
var/product_ads = "" //String of small ad messages in the vending screen
var/list/ads_list = list()
// Stuff relating vocalizations
var/list/slogan_list = list()
var/list/small_ads = list() // small ad messages in the vending screen - random chance of popping up whenever you open it
var/shut_up = 1 //Stop spouting those godawful pitches!
var/vend_reply //Thank you for shopping!
var/last_reply = 0
var/last_slogan = 0 //When did we last pitch?
var/slogan_delay = 6000 //How long until we can pitch again?
var/icon_vend //Icon_state when vending!
var/icon_deny //Icon_state when vending!
//var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
// Things that can go wrong
emagged = 0 //Ignores if somebody doesn't have card access to that machine.
var/seconds_electrified = 0 //Shock customers like an airlock.
var/shoot_inventory = 0 //Fire items at customers! We're broken!
var/shut_up = 1 //Stop spouting those godawful pitches!
var/extended_inventory = 0 //can we access the hidden inventory?
var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
var/scan_id = 1
var/obj/item/weapon/coin/coin
var/datum/wires/vending/wires = null
var/check_accounts = 0 // 1 = requires PIN and checks accounts. 0 = You slide an ID, it vends, SPACE COMMUNISM!
var/obj/item/weapon/spacecash/ewallet/ewallet
/obj/machinery/vending/New()
..()
wires = new(src)
spawn(4)
src.slogan_list = text2list(src.product_slogans, ";")
if(src.product_slogans)
src.slogan_list += text2list(src.product_slogans, ";")
// So not all machines speak at the exact same time.
// The first time this machine says something will be at slogantime + this random value,
// so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated.
src.last_slogan = world.time + rand(0, slogan_delay)
src.build_inventory(products)
//Add hidden inventory
src.build_inventory(contraband, 1)
src.build_inventory(premium, 0, 1)
if(src.product_ads)
src.ads_list += text2list(src.product_ads, ";")
src.build_inventory()
power_change()
return
return
/**
* Build src.produdct_records from the products lists
*
* src.products, src.contraband, src.premium, and src.prices allow specifying
* products that the vending machine is to carry without manually populating
* src.product_records.
*/
/obj/machinery/vending/proc/build_inventory()
var/list/all_products = list(
list(src.products, CAT_NORMAL),
list(src.contraband, CAT_HIDDEN),
list(src.premium, CAT_COIN))
for(var/current_list in all_products)
var/category = current_list[2]
for(var/entry in current_list[1])
var/datum/data/vending_product/product = new/datum/data/vending_product(entry)
product.price = (entry in src.prices) ? src.prices[entry] : 0
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
product.category = category
src.product_records.Add(product)
/obj/machinery/vending/Del()
del(wires) // qdel
wires = null
@@ -119,37 +178,30 @@
return
/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0)
for(var/typepath in productlist)
var/amount = productlist[typepath]
var/price = prices[typepath]
if(isnull(amount)) amount = 1
var/datum/data/vending_product/R = new /datum/data/vending_product()
R.product_path = typepath
R.amount = amount
R.price = price
R.display_color = pick("red","blue","green")
if(hidden)
R.category=CAT_HIDDEN
hidden_records += R
else if(req_coin)
R.category=CAT_COIN
coin_records += R
else
R.category=CAT_NORMAL
product_records += R
var/atom/temp = typepath
R.product_name = initial(temp.name)
// world << "Added: [R.product_name]] - [R.amount] - [R.product_path]"
return
/obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (currently_vending && vendor_account && !vendor_account.suspended)
var/paid = 0
var/handled = 0
if(istype(W, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = W
paid = pay_with_card(C)
handled = 1
else if (istype(W, /obj/item/weapon/spacecash/ewallet))
var/obj/item/weapon/spacecash/ewallet/C = W
paid = pay_with_ewallet(C)
handled = 1
else if (istype(W, /obj/item/weapon/spacecash))
var/obj/item/weapon/spacecash/C = W
paid = pay_with_cash(C, user)
handled = 1
if(paid)
src.vend(currently_vending, usr)
return
else if(handled)
nanomanager.update_uis(src)
return // don't smack that machine with your 2 thalers
if (istype(W, /obj/item/weapon/card/emag))
src.emagged = 1
user << "You short out the product lock on [src]"
@@ -160,7 +212,8 @@
src.overlays.Cut()
if(src.panel_open)
src.overlays += image(src.icon, "[initial(icon_state)]-panel")
src.updateUsrDialog()
nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
return
else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters))
if(src.panel_open)
@@ -170,19 +223,11 @@
user.drop_item()
W.loc = src
coin = W
categories |= CAT_COIN
user << "\blue You insert the [W] into the [src]"
nanomanager.update_uis(src)
return
else if(istype(W, /obj/item/weapon/card) && currently_vending)
var/obj/item/weapon/card/I = W
scan_card(I)
else if (istype(W, /obj/item/weapon/spacecash/ewallet))
user.drop_item()
W.loc = src
ewallet = W
user << "\blue You insert the [W] into the [src]"
else if(istype(W, /obj/item/weapon/wrench))
if(do_after(user, 20))
if(!src) return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -205,162 +250,205 @@
else
..()
/obj/machinery/vending/proc/scan_card(var/obj/item/weapon/card/I)
if(!currently_vending) return
if (istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = I
/**
* Receive payment with cashmoney.
*
* usr is the mob who gets the change.
*/
/obj/machinery/vending/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, mob/user)
if(currently_vending.price > cashmoney.worth)
// This is not a status display message, since it's something the character
// themselves is meant to see BEFORE putting the money in
usr << "\icon[cashmoney] <span class='warning'>That is not enough money.</span>"
return 0
if(istype(cashmoney, /obj/item/weapon/spacecash/bundle))
// Bundles can just have money subtracted, and will work
visible_message("<span class='info'>[usr] inserts some cash into [src].</span>")
var/obj/item/weapon/spacecash/bundle/cashmoney_bundle = cashmoney
cashmoney_bundle.worth -= currently_vending.price
if(cashmoney_bundle.worth <= 0)
usr.drop_from_inventory(cashmoney_bundle)
del(cashmoney_bundle)
else
cashmoney_bundle.update_icon()
else
// Bills (banknotes) cannot really have worth different than face value,
// so we have to eat the bill and spit out change in a bundle
// This is really dirty, but there's no superclass for all bills, so we
// just assume that all spacecash that's not something else is a bill
visible_message("<span class='info'>[usr] inserts a bill into [src].</span>")
var/left = cashmoney.worth - currently_vending.price
usr.drop_from_inventory(cashmoney)
del(cashmoney)
if(left)
spawn_money(left, src.loc, user)
// Vending machines have no idea who paid with cash
credit_purchase("(cash)")
return 1
/**
* Scan a chargecard and deduct payment from it.
*
* Takes payment for whatever is the currently_vending item. Returns 1 if
* successful, 0 if failed.
*/
/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
var/datum/money_account/CH = get_account(C.associated_account_number)
if (CH) // Only proceed if card contains proper account number.
if(!CH.suspended)
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
if(vendor_account)
if(currently_vending.price > wallet.worth)
src.status_message = "Insufficient funds on chargecard."
src.status_error = 1
return 0
else
wallet.worth -= currently_vending.price
credit_purchase("[wallet.owner_name] (chargecard)")
return 1
/**
* Scan a card and attempt to transfer payment from associated account.
*
* Takes payment for whatever is the currently_vending item. Returns 1 if
* successful, 0 if failed
*/
/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I)
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
var/datum/money_account/customer_account = get_account(I.associated_account_number)
if (!customer_account)
src.status_message = "Error: Unable to access account. Please contact technical support if problem persists."
src.status_error = 1
return 0
if(customer_account.suspended)
src.status_message = "Unable to access account: account suspended."
src.status_error = 1
return 0
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
transfer_and_vend(D)
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else
//Just Vend it.
transfer_and_vend(CH)
else
usr << "\icon[src]<span class='warning'>Connected account has been suspended.</span>"
else
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
/obj/machinery/vending/proc/transfer_and_vend(var/datum/money_account/acc)
if(acc)
var/transaction_amount = currently_vending.price
if(transaction_amount <= acc.money)
if(!customer_account)
src.status_message = "Unable to access account: incorrect credentials."
src.status_error = 1
return 0
//transfer the money
acc.money -= transaction_amount
vendor_account.money += transaction_amount
if(currently_vending.price > customer_account.money)
src.status_message = "Insufficient funds in account."
src.status_error = 1
return 0
else
// Okay to move the money at this point
//create entries in the two account transaction logs
// debit money from the purchaser's account
customer_account.money -= currently_vending.price
// create entry in the purchaser's account log
var/datum/transaction/T = new()
T.target_name = "[vendor_account.owner_name] (via [src.name])"
T.purpose = "Purchase of [currently_vending.product_name]"
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
if(currently_vending.price > 0)
T.amount = "([currently_vending.price])"
else
T.amount = "[transaction_amount]"
T.amount = "[currently_vending.price]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
acc.transaction_log.Add(T)
//
T = new()
T.target_name = acc.owner_name
customer_account.transaction_log.Add(T)
// Give the vendor the money. We use the account owner name, which means
// that purchases made with stolen/borrowed card will look like the card
// owner made them
credit_purchase(customer_account.owner_name)
return 1
/**
* Add money for current purchase to the vendor account.
*
* Called after the money has already been taken from the customer.
*/
/obj/machinery/vending/proc/credit_purchase(var/target as text)
vendor_account.money += currently_vending.price
var/datum/transaction/T = new()
T.target_name = target
T.purpose = "Purchase of [currently_vending.product_name]"
T.amount = "[transaction_amount]"
T.amount = "[currently_vending.price]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
vendor_account.transaction_log.Add(T)
// Vend the item
src.vend(src.currently_vending, usr)
currently_vending = null
else
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
else
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"
/obj/machinery/vending/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/vending/proc/GetProductIndex(var/datum/data/vending_product/P)
var/list/plist
switch(P.category)
if(CAT_NORMAL)
plist=product_records
if(CAT_HIDDEN)
plist=hidden_records
if(CAT_COIN)
plist=coin_records
else
warning("UNKNOWN CATEGORY [P.category] IN TYPE [P.product_path] INSIDE [type]!")
return plist.Find(P)
/obj/machinery/vending/proc/GetProductByID(var/pid, var/category)
switch(category)
if(CAT_NORMAL)
return product_records[pid]
if(CAT_HIDDEN)
return hidden_records[pid]
if(CAT_COIN)
return coin_records[pid]
else
warning("UNKNOWN PRODUCT: PID: [pid], CAT: [category] INSIDE [type]!")
return null
/obj/machinery/vending/attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.set_machine(src)
if(src.seconds_electrified != 0)
if(src.shock(user, 100))
return
var/vendorname = (src.name) //import the machine's name
wires.Interact(user)
ui_interact(user)
if(src.currently_vending)
var/dat = "<TT><center><b>[vendorname]</b></center><hr /><br>" //display the name, and added a horizontal rule
dat += "<b>You have selected [currently_vending.product_name].<br>Please swipe your ID to pay for the article.</b><br>"
dat += "<a href='byond://?src=\ref[src];cancel_buying=1'>Cancel</a>"
user << browse(dat, "window=vending")
onclose(user, "")
return
/**
* Display the NanoUI window for the vending machine.
*
* See NanoUI documentation for details.
*/
/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
user.set_machine(src)
var/dat = "<TT><center><b>[vendorname]</b></center><hr /><br>" //display the name, and added a horizontal rule
dat += "<b>Select an item: </b><br><br>" //the rest is just general spacing and bolding
if (premium.len > 0)
dat += "<b>Coin slot:</b> [coin ? coin : "No coin inserted"] (<a href='byond://?src=\ref[src];remove_coin=1'>Remove</A>)<br>"
if (ewallet)
dat += "<b>Charge card's credits:</b> [ewallet ? ewallet.worth : "No charge card inserted"] (<a href='byond://?src=\ref[src];remove_ewallet=1'>Remove</A>)<br><br>"
if (src.product_records.len == 0)
dat += "<font color = 'red'>No product loaded!</font>"
var/list/data = list()
if(currently_vending)
data["mode"] = 1
data["product"] = currently_vending.product_name
data["price"] = currently_vending.price
data["message_err"] = 0
data["message"] = src.status_message
data["message_err"] = src.status_error
else
var/list/display_records = list()
display_records += src.product_records
data["mode"] = 0
var/list/listed_products = list()
for(var/key = 1 to src.product_records.len)
var/datum/data/vending_product/I = src.product_records[key]
if(!(I.category & src.categories))
continue
listed_products.Add(list(list(
"key" = key,
"name" = I.product_name,
"price" = I.price,
"color" = I.display_color,
"amount" = I.amount)))
data["products"] = listed_products
if(src.extended_inventory)
display_records += src.hidden_records
if(src.coin)
display_records += src.coin_records
data["coin"] = src.coin.name
for (var/datum/data/vending_product/R in display_records)
dat += "<FONT color = '[R.display_color]'><B>[R.product_name]</B>:"
dat += " <b>[R.amount]</b> </font>"
if(R.price)
dat += " <b>(Price: [R.price])</b>"
if (R.amount > 0)
var/idx=GetProductIndex(R)
dat += " <a href='byond://?src=\ref[src];vend=[idx];cat=[R.category]'>(Vend)</A>"
if(src.panel_open)
data["panel"] = 1
data["speaker"] = src.shut_up ? 0 : 1
else
dat += " <font color = 'red'>SOLD OUT</font>"
dat += "<br>"
data["panel"] = 0
dat += "</TT>"
if(panel_open)
dat += wires()
if(product_slogans != "")
dat += "The speaker switch is [shut_up ? "off" : "on"]. <a href='?src=\ref[src];togglevoice=[1]'>Toggle</a>"
user << browse(dat, "window=vending")
onclose(user, "")
return
// returns the wire panel text
/obj/machinery/vending/proc/wires()
return wires.GetInteractWindow()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
ui.set_initial_data(data)
ui.open()
/obj/machinery/vending/Topic(href, href_list)
if(stat & (BROKEN|NOPOWER))
@@ -378,19 +466,9 @@
usr.put_in_hands(coin)
usr << "\blue You remove the [coin] from the [src]"
coin = null
if(href_list["remove_ewallet"] && !istype(usr,/mob/living/silicon))
if (!ewallet)
usr << "There is no charge card in this machine."
return
ewallet.loc = src.loc
if(!usr.get_active_hand())
usr.put_in_hands(ewallet)
usr << "\blue You remove the [ewallet] from the [src]"
ewallet = null
categories &= ~CAT_COIN
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if ((href_list["vend"]) && (src.vend_ready) && (!currently_vending))
if(istype(usr,/mob/living/silicon))
@@ -408,43 +486,32 @@
flick(icon_deny,src)
return
var/idx=text2num(href_list["vend"])
var/cat=text2num(href_list["cat"])
var/key = text2num(href_list["vend"])
var/datum/data/vending_product/R = product_records[key]
var/datum/data/vending_product/R = GetProductByID(idx,cat)
if (!R || !istype(R) || !R.product_path || R.amount <= 0)
// This should not happen unless the request from NanoUI was bad
if(!(R.category & src.categories))
return
if(R.price == null)
if(R.price <= 0)
src.vend(R, usr)
else
if (ewallet)
if (R.price <= ewallet.worth)
ewallet.worth -= R.price
src.vend(R, usr)
else
usr << "\red The ewallet doesn't have enough money to pay for that."
src.currently_vending = R
src.updateUsrDialog()
if(!vendor_account || vendor_account.suspended)
src.status_message = "This machine is currently unable to process payments due to problems with the associated account."
src.status_error = 1
else
src.currently_vending = R
src.updateUsrDialog()
return
src.status_message = "Please swipe a card or insert cash to pay for the item."
src.status_error = 0
else if (href_list["cancel_buying"])
else if (href_list["cancelpurchase"])
src.currently_vending = null
src.updateUsrDialog()
return
else if ((href_list["togglevoice"]) && (src.panel_open))
src.shut_up = !src.shut_up
src.add_fingerprint(usr)
src.updateUsrDialog()
else
usr << browse(null, "window=vending")
return
return
nanomanager.update_uis(src)
/obj/machinery/vending/proc/vend(datum/data/vending_product/R, mob/user)
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
@@ -452,8 +519,11 @@
flick(src.icon_deny,src)
return
src.vend_ready = 0 //One thing at a time!!
src.status_message = "Vending..."
src.status_error = 0
nanomanager.update_uis(src)
if (R in coin_records)
if (R.category & CAT_COIN)
if(!coin)
user << "\blue You need to insert a coin to get this item."
return
@@ -463,8 +533,10 @@
else
user << "\blue You weren't able to pull the coin out fast enough, the machine ate it, string and all."
del(coin)
categories &= ~CAT_COIN
else
del(coin)
categories &= ~CAT_COIN
R.amount--
@@ -478,17 +550,18 @@
flick(src.icon_vend,src)
spawn(src.vend_delay)
new R.product_path(get_turf(src))
src.status_message = ""
src.status_error = 0
src.vend_ready = 1
return
src.updateUsrDialog()
currently_vending = null
nanomanager.update_uis(src)
/obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user)
if(src.panel_open)
user << "\blue You stock the [src] with \a [R.product_name]"
R.amount++
src.updateUsrDialog()
nanomanager.update_uis(src)
/obj/machinery/vending/process()
if(stat & (BROKEN|NOPOWER))
@@ -795,34 +868,31 @@
/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)
/obj/machinery/vending/hydroseeds/build_inventory(var/list/productlist,hidden=0,req_coin=0)
/**
* Populate hydroseeds product_records
*
* This needs to be customized to fetch the actual names of the seeds, otherwise
* the machine would simply list "packet of seeds" times 20
*/
/obj/machinery/vending/hydroseeds/build_inventory()
var/list/all_products = list(
list(src.products, CAT_NORMAL),
list(src.contraband, CAT_HIDDEN),
list(src.premium, CAT_COIN))
for(var/typepath in productlist)
var/amount = productlist[typepath]
var/price = prices[typepath]
if(isnull(amount)) amount = 1
for(var/current_list in all_products)
var/category = current_list[2]
var/datum/data/vending_product/R = new /datum/data/vending_product()
for(var/entry in current_list[1])
var/obj/item/seeds/S = new entry(src)
var/name = S.name
var/datum/data/vending_product/product = new/datum/data/vending_product(entry, name)
R.product_path = typepath
R.amount = amount
R.price = price
R.display_color = pick("red","blue","green")
product.price = (entry in src.prices) ? src.prices[entry] : 0
product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
product.category = category
if(hidden)
R.category=CAT_HIDDEN
hidden_records += R
else if(req_coin)
R.category=CAT_COIN
coin_records += R
else
R.category=CAT_NORMAL
product_records += R
var/obj/item/seeds/S = new typepath(src)
R.product_name = S.name
del(S)
return
src.product_records.Add(product)
/obj/machinery/vending/magivend
name = "MagiVend"

View File

@@ -151,6 +151,7 @@
smoke_ready = 1
return
//TODO replace this with zoom code that doesn't increase peripherial vision
/obj/mecha/combat/marauder/verb/zoom()
set category = "Exosuit Interface"
set name = "Zoom"

View File

@@ -585,7 +585,7 @@
chassis.visible_message("The [chassis.name] armor deflects the projectile")
chassis.log_append_to_last("Armor saved.")
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))
Proj.on_hit(chassis)
set_ready_state(0)
@@ -1083,6 +1083,7 @@
/obj/item/mecha_parts/mecha_equipment/tool/passenger/destroy()
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
AM << "<span class='danger'>You tumble out of the destroyed [src.name]!"
return ..()
/obj/item/mecha_parts/mecha_equipment/tool/passenger/Exit(atom/movable/O)

View File

@@ -199,7 +199,7 @@
name = "\improper LBX AC 10 \"Scattershot\""
icon_state = "mecha_scatter"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/midbullet
projectile = /obj/item/projectile/bullet/pistol/medium
fire_sound = 'sound/weapons/Gunshot.ogg'
fire_volume = 80
projectiles = 40
@@ -211,7 +211,7 @@
name = "\improper Ultra AC 2"
icon_state = "mecha_uac2"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/weakbullet
projectile = /obj/item/projectile/bullet/pistol/medium
fire_sound = 'sound/weapons/Gunshot.ogg'
projectiles = 300
projectiles_per_shot = 3

View File

@@ -487,7 +487,7 @@
/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
..()
return
@@ -506,9 +506,26 @@
var/ignore_threshold
if(istype(Proj, /obj/item/projectile/beam/pulse))
ignore_threshold = 1
src.take_damage(Proj.damage,Proj.flag)
src.take_damage(Proj.damage, Proj.check_armour)
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)
//AP projectiles have a chance to cause additional damage
if(Proj.penetrating)
var/distance = get_dist(Proj.starting, get_turf(loc))
var/hit_occupant = 1 //only allow the occupant to be hit once
for(var/i in 1 to min(Proj.penetrating, round(Proj.damage/15)))
if(src.occupant && hit_occupant && prob(20))
Proj.attack_mob(src.occupant, distance)
hit_occupant = 0
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)
Proj.penetrating--
if(prob(15))
break //give a chance to exit early
Proj.on_hit(src)
return

View File

@@ -233,6 +233,21 @@ steam.start() -- spawns the effect
return 0
return 1
/////////////////////////////////////////////
// Illumination
/////////////////////////////////////////////
/obj/effect/effect/smoke/illumination
name = "illumination"
opacity = 0
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
time_to_live=lifetime
..()
SetLuminosity(brightness)
/////////////////////////////////////////////
// Bad smoke
/////////////////////////////////////////////

View File

@@ -141,9 +141,9 @@
if(isliving(src.loc))
return
user.next_move = max(user.next_move+2,world.time + 2)
src.pickup(user)
add_fingerprint(user)
user.put_in_active_hand(src)
if(src.loc == user)
src.pickup(user)
return
@@ -411,9 +411,9 @@
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
var/obj/item/clothing/under/uniform = H.w_uniform
if(uniform.hastie)
if(uniform.accessories.len && !uniform.can_attach_accessory(src))
if (!disable_warning)
H << "<span class='warning'>You already have [uniform.hastie] attached to your [uniform].</span>"
H << "<span class='warning'>You already have an accessory of this type attached to your [uniform].</span>"
return 0
if( !(slot_flags & SLOT_TIE) )
return 0
@@ -637,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/living/carbon/human/life.dm if you die, you will be zoomed out.
*/
/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
//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 = 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
@@ -685,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]"].")
/*
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
usr.client.view = world.view
if(!usr.hud_used.hud_shown)

View File

@@ -281,6 +281,8 @@
src.overlays.Cut()
src.overlays += "pai-off"
/obj/item/device/paicard
var/current_emotion = 1
/obj/item/device/paicard/proc/setEmotion(var/emotion)
if(pai)
src.overlays.Cut()
@@ -294,6 +296,7 @@
if(7) src.overlays += "pai-sad"
if(8) src.overlays += "pai-angry"
if(9) src.overlays += "pai-what"
current_emotion = emotion
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)

View File

@@ -115,13 +115,10 @@
listening = !listening && !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL))
/obj/item/device/radio/Topic(href, href_list)
//..()
if (usr.stat || !on)
return
if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
if(..() || !on)
usr << browse(null, "window=radio")
return
usr.set_machine(src)
if (href_list["track"])
var/mob/target = locate(href_list["track"])
@@ -152,17 +149,7 @@
else
channels[chan_name] |= FREQ_LISTENING
if (!( master ))
if (istype(loc, /mob))
interact(loc)
else
updateDialog()
else
if (istype(master.loc, /mob))
interact(master.loc)
else
updateDialog()
add_fingerprint(usr)
interact(usr)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
var/datum/radio_frequency/connection = null

View File

@@ -0,0 +1,154 @@
/obj/item/device/spy_bug
name = "bug"
desc = "" // Nothing to see here
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0"
item_state = "nothing"
layer = TURF_LAYER+0.2
flags = CONDUCT
force = 5.0
w_class = 1.0
throwforce = 5.0
throw_range = 15
throw_speed = 3
origin_tech = "programming=1;engineering=1;syndicate=3"
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/camera
/obj/item/device/spy_bug/New()
..()
radio = new(src)
camera = new(src)
/obj/item/device/spy_bug/examine(mob/user)
. = ..(user, 0)
if(.)
user << "It's a tiny camera, microphone, and transmission device in a happy union."
user << "Needs to be both configured and brought in contact with monitor device to be fully functional."
/obj/item/device/spy_bug/attack_self(mob/user)
radio.attack_self(user)
/obj/item/device/spy_bug/attackby(obj/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/spy_monitor))
var/obj/item/device/spy_monitor/SM = W
SM.pair(src, user)
else
..()
/obj/item/device/spy_bug/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
radio.hear_talk(M, msg, speaking)
/obj/item/device/spy_monitor
name = "\improper PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
icon = 'icons/obj/pda.dmi'
icon_state = "pda"
item_state = "electronic"
w_class = 2.0
origin_tech = "programming=1;engineering=1;syndicate=3"
var/operating = 0
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/selected_camera
var/list/obj/machinery/camera/spy/cameras = new()
/obj/item/device/spy_monitor/New()
radio = new(src)
/obj/item/device/spy_monitor/examine(mob/user)
. = ..(user, 1)
if(.)
user << "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made."
/obj/item/device/spy_monitor/attack_self(mob/user)
if(operating)
return
radio.attack_self(user)
view_cameras(user)
/obj/item/device/spy_monitor/attackby(obj/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/spy_bug))
pair(W, user)
else
return ..()
/obj/item/device/spy_monitor/proc/pair(var/obj/item/device/spy_bug/SB, var/mob/living/user)
if(SB.camera in cameras)
user << "<span class='notice'>\The [SB] has been unpaired from \the [src].</span>"
cameras -= SB.camera
else
user << "<span class='notice'>\The [SB] has been paired with \the [src].</span>"
cameras += SB.camera
/obj/item/device/spy_monitor/proc/view_cameras(mob/user)
if(!can_use_cam(user))
return
selected_camera = cameras[1]
view_camera(user)
operating = 1
while(selected_camera && Adjacent(user))
selected_camera = input("Select camera bug to view.") as null|anything in cameras
selected_camera = null
operating = 0
/obj/item/device/spy_monitor/proc/view_camera(mob/user)
spawn(0)
while(selected_camera && Adjacent(user))
var/turf/T = get_turf(selected_camera)
if(!T || !is_on_same_plane_or_station(T.z, user.z) || !selected_camera.can_use())
user.unset_machine()
user.reset_view(null)
user << "<span class='notice'>[selected_camera] unavailable.</span>"
sleep(90)
else
user.set_machine(selected_camera)
user.reset_view(selected_camera)
sleep(10)
user.unset_machine()
user.reset_view(null)
/obj/item/device/spy_monitor/proc/can_use_cam(mob/user)
if(operating)
return
if(!cameras.len)
user << "<span class='warning'>No paired cameras detected!</span>"
user << "<span class='warning'>Bring a bug in contact with this device to pair the camera.</span>"
return
return 1
/obj/item/device/spy_monitor/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
return radio.hear_talk(M, msg, speaking)
/obj/machinery/camera/spy
// These cheap toys are accessible from the mercenary camera console as well
network = list("NUKE")
/obj/machinery/camera/spy/New()
..()
name = "DV-136ZB #[rand(1000,9999)]"
c_tag = name
cameranet.removeCamera(src) // Sorry, no AI spying.
/obj/machinery/camera/spy/check_eye(var/mob/user as mob)
return 1
/obj/item/device/radio/spy
listening = 0
frequency = 1473
broadcasting = 0
canhear_range = 1
name = "spy device"
icon_state = "syn_cypherkey"

View File

@@ -121,7 +121,7 @@
usr << "There's no mounting point for the module!"
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)
T = locate() in R.module.contents
if(!T)

View File

@@ -99,6 +99,18 @@
item_state = "syndballoon"
w_class = 4.0
/obj/item/toy/nanotrasenballoon
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.\""
throwforce = 0
throw_speed = 4
throw_range = 20
force = 0
icon = 'icons/obj/weapons.dmi'
icon_state = "ntballoon"
item_state = "ntballoon"
w_class = 4.0
/*
* Fake telebeacon
*/
@@ -128,7 +140,7 @@
icon_state = "revolver"
item_state = "gun"
flags = CONDUCT
slot_flags = SLOT_BELT
slot_flags = SLOT_BELT|SLOT_HOLSTER
w_class = 3.0
matter = list("glass" = 10,"metal" = 10)
@@ -380,6 +392,10 @@
viewers(user) << "\red <b>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b>"
return (BRUTELOSS|OXYLOSS)
New()
name = "[colourName] crayon"
..()
/*
* Snap pops
*/

View File

@@ -81,7 +81,7 @@
/obj/item/device/taperecorder,
/obj/item/device/hailer,
/obj/item/device/megaphone,
/obj/item/clothing/tie/holobadge,
/obj/item/clothing/accessory/holobadge,
/obj/structure/closet/crate/secure,
/obj/structure/closet/secure_closet,
/obj/machinery/librarycomp,

View File

@@ -0,0 +1,13 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/biogenerator
name = T_BOARD("biogenerator")
build_path = "/obj/machinery/biogenerator"
board_type = "machine"
origin_tech = "programming=2"
frame_desc = "Requires 1 Manipulator, and 1 Matter Bin."
req_components = list(
"/obj/item/weapon/stock_parts/matter_bin" = 1,
"/obj/item/weapon/stock_parts/manipulator" = 1)

View File

@@ -0,0 +1,15 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/recharge_station
name = T_BOARD("cyborg recharging station")
build_path = "/obj/machinery/recharge_station"
board_type = "machine"
origin_tech = "programming=3;engineering=3"
frame_desc = "Requires 2 Manipulator, 2 Capacitor, 1 Cell, and 5 pieces of cable."
req_components = list(
"/obj/item/stack/cable_coil" = 5,
"/obj/item/weapon/stock_parts/capacitor" = 2,
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/weapon/cell" = 1)

View File

@@ -38,7 +38,7 @@
/obj/item/weapon/plastique/afterattack(atom/movable/target, mob/user, flag)
if (!flag)
return
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/tie/storage/) || istype(target, /obj/item/clothing/under))
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/accessory/storage/) || istype(target, /obj/item/clothing/under))
return
user << "Planting explosives..."

View File

@@ -104,7 +104,7 @@
/obj/item/device/paicard,
/obj/item/device/violin,
/obj/item/weapon/storage/belt/utility/full,
/obj/item/clothing/tie/horrible)
/obj/item/clothing/accessory/horrible)
if(!ispath(gift_type,/obj/item)) return

View File

@@ -21,7 +21,8 @@
B.health -= damage
B.update_icon()
new/obj/effect/effect/smoke/flashbang(src.loc)
new/obj/effect/effect/sparks(src.loc)
new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
del(src)
return
@@ -100,16 +101,6 @@
M << "\red Your ears start to ring!"
M.update_icons()
/obj/effect/effect/smoke/flashbang
name = "illumination"
time_to_live = 10
opacity = 0
icon_state = "sparks"
/obj/effect/effect/smoke/flashbang/New()
..()
SetLuminosity(15)
/obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
name = "clusterbang"

View File

@@ -75,10 +75,10 @@
/obj/item/weapon/book/manual/supermatter_engine
name = "Supermatter Engine User's Guide"
name = "Supermatter Engine Operating Manual"
icon_state = "bookSupermatter"
author = "Waleed Asad"
title = "Supermatter Engine User's Guide"
author = "Nanotrasen Central Engineering Division"
title = "Supermatter Engine Operating Manual"
/obj/item/weapon/book/manual/supermatter_engine/New()
..()
@@ -94,95 +94,56 @@
</style>
</head>
<body>
<h1>OPERATING MANUAL FOR MK 1 PROTOTYPE THERMOELECTRIC SUPERMATTER ENGINE 'TOMBOLA'</h1>
<br>
Engineering notes on the single-stage supermatter engine,</br>
-Waleed Asad</br></br>
Station,</br>
Exodus</br></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>
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>
<h2>Heat-Primary Mode</h2>
<i>Notes on starting the basic function mode</i>
<h2>OPERATING PRINCIPLES</h2>
<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>
<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>
<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>
<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>
<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>
<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>
<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><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><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>
<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>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>
</ol>
<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>
<br>
<h2>OPERATION AND MAINTENANCE</h2>
<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><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><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><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>
<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>
<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>
</ol></br>
<h2>Notes on Supermatter Reaction Function and Drawbacks</h2>
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>
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>
<ul>
<li>Radiation (which is converted into power by the collectors)</li></br>
<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
<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>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>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>
</ol>
<br>
<h2>EMERGENCY COOLING PROCEDURE</h2>
<ol>
<li>Open Emergency Cooling Valve 1 and Emergency Cooling Valve 2.</li>
<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>
</ol>
<br>
<h2>EJECTION PROCEDURE</h2>
<ol>
<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>
<li>In event of ejection failure, <i>pending</i></li>
</ol>
</body>
</html>"}

View File

@@ -1,4 +1,5 @@
//NEVER USE THIS IT SUX -PETETHEGOAT
//THE GOAT WAS RIGHT - RKF
var/global/list/cached_icons = list()
@@ -11,10 +12,10 @@ var/global/list/cached_icons = list()
matter = list("metal" = 200)
w_class = 3.0
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10,20,30,50,70)
possible_transfer_amounts = list(10,20,30,60)
volume = 60
flags = OPENCONTAINER
var/paint_type = ""
var/paint_type = "red"
afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
@@ -28,24 +29,19 @@ var/global/list/cached_icons = list()
return ..()
New()
if(paint_type == "remover")
name = "paint remover bucket"
else if(paint_type && lentext(paint_type) > 0)
if(paint_type && lentext(paint_type) > 0)
name = paint_type + " " + name
..()
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_type == "white") //why don't white crayons exist
reagents.add_reagent("aluminum", volume/5)
else if (paint_type == "black")
reagents.add_reagent("carbon", volume/5)
else
reagents.add_reagent("crayon_dust_[paint_type]", volume/5)
reagents.handle_reactions()
on_reagent_change() //Until we have a generic "paint", this will give new colours to all paints in the can
var/mixedcolor = mix_color_from_reagents(reagents.reagent_list)
for(var/datum/reagent/paint/P in reagents.reagent_list)
P.color = mixedcolor
red
icon_state = "paint_red"
paint_type = "red"
@@ -62,110 +58,15 @@ var/global/list/cached_icons = list()
icon_state = "paint_blue"
paint_type = "blue"
violet
purple
icon_state = "paint_violet"
paint_type = "purple"
black
icon_state = "paint_black"
paint_type = "gray"
paint_type = "black"
white
icon_state = "paint_white"
paint_type = "white"
remover
paint_type = "remover"
/*
/obj/item/weapon/paint
gender= PLURAL
name = "paint"
desc = "Used to recolor floors and walls. Can not be removed by the janitor."
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
color = "FFFFFF"
item_state = "paintcan"
w_class = 3.0
/obj/item/weapon/paint/afterattack(turf/target, mob/user as mob, proximity)
if(!proximity) return
if(!istype(target) || istype(target, /turf/space))
return
var/ind = "[initial(target.icon)][color]"
if(!cached_icons[ind])
var/icon/overlay = new/icon(initial(target.icon))
overlay.Blend("#[color]",ICON_MULTIPLY)
overlay.SetIntensity(1.4)
target.icon = overlay
cached_icons[ind] = target.icon
else
target.icon = cached_icons[ind]
return
/obj/item/weapon/paint/paint_remover
gender = PLURAL
name = "paint remover"
icon_state = "paint_neutral"
afterattack(turf/target, mob/user as mob)
if(istype(target) && target.icon != initial(target.icon))
target.icon = initial(target.icon)
return
*/
/*
datum/reagent/paint
name = "Paint"
id = "paint_"
reagent_state = 2
color = "#808080"
description = "This paint will only adhere to floor tiles."
red
name = "Red Paint"
id = "paint_red"
color = "#FE191A"
green
name = "Green Paint"
color = "#18A31A"
id = "paint_green"
blue
name = "Blue Paint"
color = "#247CFF"
id = "paint_blue"
yellow
name = "Yellow Paint"
color = "#FDFE7D"
id = "paint_yellow"
violet
name = "Violet Paint"
color = "#CC0099"
id = "paint_violet"
black
name = "Black Paint"
color = "#333333"
id = "paint_black"
white
name = "White Paint"
color = "#F0F8FF"
id = "paint_white"
datum/reagent/paint_remover
name = "Paint Remover"
id = "paint_remover"
description = "Paint remover is used to remove floor paint from floor tiles."
reagent_state = 2
color = "#808080"
reaction_turf(var/turf/T, var/volume)
if(istype(T) && T.icon != initial(T.icon))
T.icon = initial(T.icon)
return
*/

View File

@@ -86,7 +86,7 @@
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
H.updatehealth()
if(!(H.species & NO_PAIN))
if(!(H.species && (H.species.flags & NO_PAIN)))
H.Weaken(3)
..()

View File

@@ -36,7 +36,7 @@
max_w_class = 2
storage_slots = 21
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()
if(contents.len == 0)
@@ -63,7 +63,7 @@
max_w_class = 2
storage_slots = 21
can_hold = list() // any
cant_hold = list("/obj/item/weapon/disk/nuclear")
cant_hold = list(/obj/item/weapon/disk/nuclear)
// -----------------------------
// Mining Satchel
@@ -79,7 +79,7 @@
storage_slots = 50
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = 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_w_class = 3
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_w_class = 3
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)

View File

@@ -13,19 +13,19 @@
icon_state = "utilitybelt"
item_state = "utility"
can_hold = list(
//"/obj/item/weapon/combitool",
"/obj/item/weapon/crowbar",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/weldingtool",
"/obj/item/weapon/wirecutters",
"/obj/item/weapon/wrench",
"/obj/item/device/multitool",
"/obj/item/device/flashlight",
"/obj/item/stack/cable_coil",
"/obj/item/device/t_scanner",
"/obj/item/device/analyzer",
"/obj/item/taperoll/engineering",
"/obj/item/device/robotanalyzer")
///obj/item/weapon/combitool,
/obj/item/weapon/crowbar,
/obj/item/weapon/screwdriver,
/obj/item/weapon/weldingtool,
/obj/item/weapon/wirecutters,
/obj/item/weapon/wrench,
/obj/item/device/multitool,
/obj/item/device/flashlight,
/obj/item/stack/cable_coil,
/obj/item/device/t_scanner,
/obj/item/device/analyzer,
/obj/item/taperoll/engineering,
/obj/item/device/robotanalyzer)
/obj/item/weapon/storage/belt/utility/full/New()
@@ -55,24 +55,30 @@
icon_state = "medicalbelt"
item_state = "medical"
can_hold = list(
"/obj/item/device/healthanalyzer",
"/obj/item/weapon/dnainjector",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/reagent_containers/glass/beaker",
"/obj/item/weapon/reagent_containers/glass/bottle",
"/obj/item/weapon/reagent_containers/pill",
"/obj/item/weapon/reagent_containers/syringe",
"/obj/item/weapon/reagent_containers/glass/dispenser",
"/obj/item/weapon/flame/lighter/zippo",
"/obj/item/weapon/storage/fancy/cigarettes",
"/obj/item/weapon/storage/pill_bottle",
"/obj/item/stack/medical",
"/obj/item/device/flashlight/pen",
"/obj/item/clothing/mask/surgical",
"/obj/item/clothing/gloves/latex",
"/obj/item/weapon/reagent_containers/hypospray"
/obj/item/device/healthanalyzer,
/obj/item/weapon/dnainjector,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/reagent_containers/glass/beaker,
/obj/item/weapon/reagent_containers/glass/bottle,
/obj/item/weapon/reagent_containers/pill,
/obj/item/weapon/reagent_containers/syringe,
/obj/item/weapon/flame/lighter/zippo,
/obj/item/weapon/storage/fancy/cigarettes,
/obj/item/weapon/storage/pill_bottle,
/obj/item/stack/medical,
/obj/item/device/flashlight/pen,
/obj/item/clothing/mask/surgical,
/obj/item/clothing/gloves/latex,
/obj/item/weapon/reagent_containers/hypospray
)
/obj/item/weapon/storage/belt/medical/emt
name = "EMT utility belt"
desc = "A sturdy black webbing belt with attached pouches."
icon = 'icons/obj/custom_items.dmi'
icon_state = "emsbelt"
item_state = "emsbelt"
/obj/item/weapon/storage/belt/security
name = "security belt"
@@ -83,25 +89,24 @@
max_w_class = 3
max_combined_w_class = 21
can_hold = list(
"/obj/item/weapon/grenade",
"/obj/item/weapon/reagent_containers/spray/pepper",
"/obj/item/weapon/handcuffs",
"/obj/item/device/flash",
"/obj/item/clothing/glasses",
"/obj/item/ammo_casing/shotgun",
"/obj/item/ammo_magazine",
"/obj/item/weapon/reagent_containers/food/snacks/donut/normal",
"/obj/item/weapon/reagent_containers/food/snacks/donut/jelly",
"/obj/item/weapon/melee/baton",
"/obj/item/weapon/gun/energy/taser",
"/obj/item/weapon/flame/lighter/zippo",
"/obj/item/weapon/cigpacket",
"/obj/item/clothing/glasses/hud/security",
"/obj/item/device/flashlight",
"/obj/item/device/pda",
"/obj/item/device/radio/headset",
"/obj/item/weapon/melee",
"/obj/item/taperoll/police"
/obj/item/weapon/grenade,
/obj/item/weapon/reagent_containers/spray/pepper,
/obj/item/weapon/handcuffs,
/obj/item/device/flash,
/obj/item/clothing/glasses,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_magazine,
/obj/item/weapon/reagent_containers/food/snacks/donut/normal,
/obj/item/weapon/reagent_containers/food/snacks/donut/jelly,
/obj/item/weapon/melee/baton,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/flame/lighter/zippo,
/obj/item/clothing/glasses/hud/security,
/obj/item/device/flashlight,
/obj/item/device/pda,
/obj/item/device/radio/headset,
/obj/item/weapon/melee,
/obj/item/taperoll/police
)
/obj/item/weapon/storage/belt/soulstone
@@ -111,7 +116,7 @@
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
"/obj/item/device/soulstone"
/obj/item/device/soulstone
)
/obj/item/weapon/storage/belt/soulstone/full/New()

View File

@@ -79,7 +79,6 @@
/obj/item/weapon/storage/box/syringes
name = "box of syringes"
desc = "A box full of syringes."
desc = "A biohazard alert warning is printed on the box"
icon_state = "syringe"
New()
@@ -92,6 +91,22 @@
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
name = "box of beakers"
icon_state = "beaker"
@@ -149,7 +164,7 @@
new /obj/item/ammo_casing/shotgun/beanbag(src)
/obj/item/weapon/storage/box/shotgunammo
name = "box of shotgun shells"
name = "box of shotgun slugs"
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()
@@ -162,6 +177,62 @@
new /obj/item/ammo_casing/shotgun(src)
new /obj/item/ammo_casing/shotgun(src)
/obj/item/weapon/storage/box/shotgunshells
name = "box of shotgun 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/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)
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
name = "box of flashbangs (WARNING)"
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
@@ -310,13 +381,27 @@
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
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>"
icon_state = "donk_kit"
New()
..()
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
/obj/item/weapon/storage/box/monkeycubes
name = "monkey cube box"
desc = "Drymate brand monkey cubes. Just add water!"
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
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()
..()
if(src.type == /obj/item/weapon/storage/box/monkeycubes)
@@ -430,7 +515,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "spbox"
storage_slots = 8
can_hold = list("/obj/item/toy/snappop")
can_hold = list(/obj/item/toy/snappop)
New()
..()
for(var/i=1; i <= storage_slots; i++)
@@ -445,7 +530,7 @@
storage_slots = 10
w_class = 1
slot_flags = SLOT_BELT
can_hold = list("/obj/item/weapon/flame/match")
can_hold = list(/obj/item/weapon/flame/match)
New()
..()
@@ -478,7 +563,7 @@
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
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
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try

View File

@@ -48,7 +48,7 @@
name = "egg box"
storage_slots = 12
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()
..()
@@ -91,7 +91,7 @@
storage_slots = 6
icon_type = "crayon"
can_hold = list(
"/obj/item/toy/crayon"
/obj/item/toy/crayon
)
/obj/item/weapon/storage/fancy/crayons/New()
@@ -134,7 +134,7 @@
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 6
can_hold = list("/obj/item/clothing/mask/cigarette")
can_hold = list(/obj/item/clothing/mask/smokable/cigarette)
icon_type = "cigarette"
/obj/item/weapon/storage/fancy/cigarettes/New()
@@ -190,7 +190,7 @@
throwforce = 2
slot_flags = SLOT_BELT
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"
/obj/item/weapon/storage/fancy/cigar/New()
@@ -239,7 +239,7 @@
icon_type = "vial"
name = "vial storage box"
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()
@@ -255,7 +255,7 @@
icon_state = "vialbox0"
item_state = "syringe_kit"
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.
storage_slots = 6
req_access = list(access_virology)

View File

@@ -109,6 +109,25 @@
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/splint(src)
return
/obj/item/weapon/storage/firstaid/combat
name = "combat medical kit"
desc = "Contains advanced medical treatments."
icon_state = "bezerk"
item_state = "firstaid-advanced"
/obj/item/weapon/storage/firstaid/combat/New()
..()
if (empty) return
new /obj/item/weapon/storage/pill_bottle/bicaridine(src)
new /obj/item/weapon/storage/pill_bottle/dermaline(src)
new /obj/item/weapon/storage/pill_bottle/dexalin_plus(src)
new /obj/item/weapon/storage/pill_bottle/dylovene(src)
new /obj/item/weapon/storage/pill_bottle/tramadol(src)
new /obj/item/weapon/storage/pill_bottle/spaceacillin(src)
new /obj/item/stack/medical/splint(src)
return
/*
* Pill Bottles
*/
@@ -119,26 +138,12 @@
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
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
use_to_pickup = 1
storage_slots = 14
use_sound = null
/obj/item/weapon/storage/pill_bottle/kelotane
name = "bottle of kelotane pills"
desc = "Contains pills used to treat burns."
New()
..()
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
/obj/item/weapon/storage/pill_bottle/antitox
name = "bottle of Dylovene pills"
desc = "Contains pills used to counter toxins."
@@ -153,6 +158,62 @@
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
/obj/item/weapon/storage/pill_bottle/bicaridine
name = "bottle of Bicaridine pills"
desc = "Contains pills used to stabilize the severely injured."
/obj/item/weapon/storage/pill_bottle/bicaridine/New()
..()
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
/obj/item/weapon/storage/pill_bottle/dexalin_plus
name = "bottle of Dexalin Plus pills"
desc = "Contains pills used to treat extreme cases of oxygen deprivation."
/obj/item/weapon/storage/pill_bottle/dexalin_plus/New()
..()
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
/obj/item/weapon/storage/pill_bottle/dermaline
name = "bottle of Dermaline pills"
desc = "Contains pills used to treat burn wounds."
/obj/item/weapon/storage/pill_bottle/dermaline/New()
..()
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
new /obj/item/weapon/reagent_containers/pill/dermaline(src)
/obj/item/weapon/storage/pill_bottle/dylovene
name = "bottle of Dylovene pills"
desc = "Contains pills used to treat toxic substances in the blood."
/obj/item/weapon/storage/pill_bottle/dylovene/New()
..()
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
new /obj/item/weapon/reagent_containers/pill/dylovene(src)
/obj/item/weapon/storage/pill_bottle/inaprovaline
name = "bottle of Inaprovaline pills"
desc = "Contains pills used to stabilize patients."
@@ -167,8 +228,36 @@
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
/obj/item/weapon/storage/pill_bottle/kelotane
name = "bottle of kelotane pills"
desc = "Contains pills used to treat burns."
New()
..()
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
/obj/item/weapon/storage/pill_bottle/spaceacillin
name = "bottle of Spaceacillin pills"
desc = "A theta-lactam antibiotic. Effective against many diseases likely to be encountered in space."
/obj/item/weapon/storage/pill_bottle/spaceacillin/New()
..()
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
/obj/item/weapon/storage/pill_bottle/tramadol
name = "bottle of Tramadol Pills"
name = "bottle of Tramadol pills"
desc = "Contains pills used to relieve pain."
New()

View File

@@ -17,7 +17,7 @@
name = "donut box"
storage_slots = 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
/obj/item/weapon/storage/donut_box/New()

View File

@@ -220,7 +220,7 @@
max_w_class = 8
anchored = 1.0
density = 0
cant_hold = list("/obj/item/weapon/storage/secure/briefcase")
cant_hold = list(/obj/item/weapon/storage/secure/briefcase)
New()
..()

View File

@@ -209,21 +209,14 @@
usr << "<span class='notice'>[src] is full, make some space.</span>"
return 0 //Storage item is full
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, text2path(A) ))
ok = 1
break
if(!ok)
if(can_hold.len && !is_type_in_list(W, can_hold))
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(istype(W, text2path(A) ))
if(cant_hold.len && is_type_in_list(W, cant_hold))
if(!stop_messages)
usr << "<span class='notice'>[src] cannot hold [W].</span>"
return 0

View File

@@ -26,7 +26,7 @@
return
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/weapon/card/emag(src)
new /obj/item/weapon/plastique(src)
@@ -149,3 +149,71 @@
..()
new /obj/item/weapon/stamp/chameleon(src)
new /obj/item/weapon/pen/chameleon(src)
new /obj/item/device/destTagger(src)
new /obj/item/weapon/packageWrap(src)
new /obj/item/weapon/hand_labeler(src)
/obj/item/weapon/storage/box/syndie_kit/spy
name = "spy kit"
desc = "For when you want to conduct voyeurism from afar."
/obj/item/weapon/storage/box/syndie_kit/spy/New()
..()
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_monitor(src)
/obj/item/weapon/storage/box/syndie_kit/g9mm
name = "\improper Smooth operator"
desc = "9mm with silencer kit."
/obj/item/weapon/storage/box/syndie_kit/g9mm/New()
..()
new /obj/item/weapon/gun/projectile/pistol(src)
new /obj/item/weapon/silencer(src)
/obj/item/weapon/storage/box/syndie_kit/cigarette
name = "\improper Tricky smokes"
desc = "Comes with the following brands of cigarettes, in this order: 2xFlash, 2xSmoke, 1xMindBreaker, 1xTricordrazine. Avoid mixing them up."
/obj/item/weapon/storage/box/syndie_kit/cigarette/New()
..()
var/obj/item/weapon/storage/fancy/cigarettes/pack
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
fill_cigarre_package(pack, list("aluminum" = 5, "potassium" = 5, "sulfur" = 5))
pack.desc += " 'F' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
fill_cigarre_package(pack, list("aluminum" = 5, "potassium" = 5, "sulfur" = 5))
pack.desc += " 'F' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
fill_cigarre_package(pack, list("potassium" = 5, "sugar" = 5, "phosphorus" = 5))
pack.desc += " 'S' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
fill_cigarre_package(pack, list("potassium" = 5, "sugar" = 5, "phosphorus" = 5))
pack.desc += " 'S' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
// Dylovene. Going with 1.5 rather than 1.6666666...
fill_cigarre_package(pack, list("potassium" = 1.5, "nitrogen" = 1.5, "silicon" = 1.5))
// Mindbreaker
fill_cigarre_package(pack, list("silicon" = 4.5, "hydrogen" = 4.5))
pack.desc += " 'MB' has been scribbled on it."
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
pack.reagents.add_reagent("tricordrazine", 15 * pack.storage_slots)
pack.desc += " 'T' has been scribbled on it."
new /obj/item/weapon/flame/lighter/zippo(src)
/proc/fill_cigarre_package(var/obj/item/weapon/storage/fancy/cigarettes/C, var/list/reagents)
for(var/reagent in reagents)
C.reagents.add_reagent(reagent, reagents[reagent] * C.storage_slots)

View File

@@ -5,25 +5,25 @@
icon_state = "wallet"
w_class = 2
can_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",
"/obj/item/device/flashlight/pen",
"/obj/item/seeds",
"/obj/item/stack/medical",
"/obj/item/toy/crayon",
"/obj/item/weapon/coin",
"/obj/item/weapon/dice",
"/obj/item/weapon/disk",
"/obj/item/weapon/implanter",
"/obj/item/weapon/flame/lighter",
"/obj/item/weapon/flame/match",
"/obj/item/weapon/paper",
"/obj/item/weapon/pen",
"/obj/item/weapon/photo",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/stamp")
/obj/item/weapon/spacecash,
/obj/item/weapon/card,
/obj/item/clothing/mask/smokable/cigarette/,
/obj/item/device/flashlight/pen,
/obj/item/seeds,
/obj/item/stack/medical,
/obj/item/toy/crayon,
/obj/item/weapon/coin,
/obj/item/weapon/dice,
/obj/item/weapon/disk,
/obj/item/weapon/implanter,
/obj/item/weapon/flame/lighter,
/obj/item/weapon/flame/match,
/obj/item/weapon/paper,
/obj/item/weapon/pen,
/obj/item/weapon/photo,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/screwdriver,
/obj/item/weapon/stamp)
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null

View File

@@ -20,7 +20,8 @@
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
return 1
if(usr.can_interact_with_interface(src, checkrange) != STATUS_INTERACTIVE)
if(usr.can_interact_with_interface(nano_host(), checkrange) != STATUS_INTERACTIVE)
return 1
add_fingerprint(usr)
return 0

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