Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into outpost-power

This commit is contained in:
Atlantiscze
2015-02-17 16:05:47 +01:00
194 changed files with 5292 additions and 4509 deletions
+8 -7
View File
@@ -1,7 +1,8 @@
#ignore misc BYOND files
*.log
*.int
*.rsc
*.dmb
*.lk
data/
#ignore misc BYOND files
*.log
*.int
*.rsc
*.dmb
*.lk
*.backup
data/
+15 -9
View File
@@ -383,7 +383,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"
@@ -553,6 +552,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"
@@ -707,6 +707,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"
@@ -875,7 +876,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"
@@ -1136,6 +1136,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"
@@ -1225,7 +1226,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 +1325,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 +1333,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 +1360,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"
@@ -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)]."
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,8 +53,7 @@
last_temperature = removed.temperature
//Update the gas networks.
if(network1)
network1.update = 1
network1.update = 1
last_worldtime_transfer = world.time
else
@@ -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))
@@ -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()
..()
@@ -183,11 +183,11 @@
//JESUS FUCK. THERE ARE LITERALLY 250 OF YOU MOTHERFUCKERS ON ZLEVEL ONE AND YOU DO THIS SHIT EVERY TICK WHEN VERY OFTEN THERE IS NO REASON TO
if(pump_direction && pressure_checks == PRESSURE_CHECK_EXTERNAL && controller_iteration > 10) //99% of all vents
//Fucking hibernate because you ain't doing shit.
//Fucking hibernate because you ain't doing shit.
hibernate = 1
spawn(rand(100,200)) //hibernate for 10 or 20 seconds randomly
hibernate = 0
hibernate = 0
if (power_draw >= 0)
last_power_draw = power_draw
+8 -1
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
+3 -3
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")
+6
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)
+13 -2
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)
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
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
if(max_length)
input = copytext(input,1,max_length)
return sanitize(input)
+2 -5
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()
+1 -1
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)
+1 -1
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)
+1
View File
@@ -288,6 +288,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
+12 -9
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()
+1 -1
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
+5 -8
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
+41 -2
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'
+1 -1
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)
@@ -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
return 0
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)
+1 -1
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;
+26 -15
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")
)
)
+2 -2
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")
+8 -3
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))
@@ -1309,7 +1314,7 @@ FIRE ALARM
/obj/machinery/firealarm/proc/delayed_reset()
var/area/A = get_area(src)
if (!A) return
src = null
spawn(600)
A.firereset()
+33 -4
View File
@@ -201,6 +201,11 @@
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, blank)"
path = /obj/item/ammo_casing/shotgun/blank
@@ -217,13 +222,13 @@
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 (flash)"
path = /obj/item/ammo_magazine/c45f
name = "ammunition (.45, flash)"
path = /obj/item/ammo_magazine/c45m/flash
category = "Arms and Ammunition"
/datum/autolathe/recipe/consolescreen
@@ -294,6 +299,24 @@
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 (slug, shotgun)"
path = /obj/item/ammo_casing/shotgun
@@ -306,6 +329,12 @@
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"
/datum/autolathe/recipe/rcd
name = "rapid construction device"
path = /obj/item/weapon/rcd
+4 -4
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("")
+1 -1
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)
..()
+2 -2
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
+8 -110
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,106 +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"] = sortByKey(smeslist, "RCON_tag")
// BREAKER DATA (simplified view)
var/list/breakerlist[0]
for(var/obj/machinery/power/breakerbox/BR in known_breakers)
breakerlist.Add(list(list(
"RCON_tag" = BR.RCon_tag,
"enabled" = BR.on
)))
data["breaker_info"] = breakerlist
data["hide_smes"] = hide_SMES
data["hide_smes_details"] = hide_SMES_details
data["hide_breakers"] = hide_breakers
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "rcon.tmpl", "RCON 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)
@@ -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)
+5 -89
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)
-109
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
@@ -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)
..()
@@ -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)
@@ -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)
@@ -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."
+16 -18
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()
@@ -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
+68 -58
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,52 +64,53 @@ 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.
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."
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 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(!master.say_understands(M, speaking))//The AI will be able to understand most mobs talking through the holopad.
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)
else
text = stars(text)
var/name_used = M.GetVoice()
//This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
var/rendered
if(speaking)
text = speaking.scramble(text)
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [speaking.format_message(text, verb)]</span></i>"
else
text = stars(text)
var/name_used = M.GetVoice()
//This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
var/rendered
if(speaking)
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [speaking.format_message(text, verb)]</span></i>"
else
rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span></i>"
master.show_message(rendered, 2)
return
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)
/obj/machinery/hologram/holopad/see_emote(mob/living/M, text)
if(M && hologram && master)
//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.
master.show_message(rendered, 2)
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.
master.show_message(rendered, 2)
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.
@@ -115,32 +118,33 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
hologram.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.
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
icon_state = "holopad0"
use_power = 1//Passive power usage.
/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 = 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)
@@ -148,14 +152,15 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
if(eye_area in holo_area.master.related)
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
/*
@@ -167,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)
@@ -190,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)
..()
/*
@@ -224,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
+2 -2
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)
+10 -10
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
+1 -1
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
+356 -285
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,68 +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.
// To be filled out at compile time
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
/*
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/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)
// 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
@@ -118,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]"
@@ -159,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)
@@ -169,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)
@@ -204,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
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)
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>"
/**
* 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
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"
/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)
//transfer the money
acc.money -= transaction_amount
vendor_account.money += transaction_amount
//create entries in the two account transaction logs
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])"
else
T.amount = "[transaction_amount]"
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
T.purpose = "Purchase of [currently_vending.product_name]"
T.amount = "[transaction_amount]"
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>"
cashmoney_bundle.update_icon()
else
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"
// 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>")
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
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
src.status_message = "Unable to access account: incorrect credentials."
src.status_error = 1
return 0
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
// 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(currently_vending.price > 0)
T.amount = "([currently_vending.price])"
else
T.amount = "[currently_vending.price]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
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 = "[currently_vending.price]"
T.source_terminal = src.name
T.date = current_date_string
T.time = worldtime2text()
vendor_account.transaction_log.Add(T)
/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
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>"
/**
* 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/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()
if(src.extended_inventory)
display_records += src.hidden_records
if(src.coin)
display_records += src.coin_records
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>"
else
dat += " <font color = 'red'>SOLD OUT</font>"
dat += "<br>"
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()
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.coin)
data["coin"] = src.coin.name
if(src.panel_open)
data["panel"] = 1
data["speaker"] = src.shut_up ? 0 : 1
else
data["panel"] = 0
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))
@@ -377,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))
@@ -407,43 +486,32 @@
flick(icon_deny,src)
return
var/idx=text2num(href_list["vend"])
var/cat=text2num(href_list["cat"])
var/datum/data/vending_product/R = GetProductByID(idx,cat)
if (!R || !istype(R) || !R.product_path || R.amount <= 0)
var/key = text2num(href_list["vend"])
var/datum/data/vending_product/R = product_records[key]
// 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()
src.currently_vending = R
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
@@ -451,8 +519,11 @@
flick(src.icon_deny,src)
return
src.vend_ready = 0 //One thing at a time!!
if (R in coin_records)
src.status_message = "Vending..."
src.status_error = 0
nanomanager.update_uis(src)
if (R.category & CAT_COIN)
if(!coin)
user << "\blue You need to insert a coin to get this item."
return
@@ -462,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--
@@ -477,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))
@@ -545,7 +619,7 @@
new dump_path(src.loc)
R.amount--
break
stat |= BROKEN
src.icon_state = "[initial(icon_state)]-broken"
return
@@ -793,35 +867,32 @@
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/mtearseed = 2,
/obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,)
premium = list(/obj/item/toy/waterflower = 1)
/**
* 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))
/obj/machinery/vending/hydroseeds/build_inventory(var/list/productlist,hidden=0,req_coin=0)
for(var/current_list in all_products)
var/category = current_list[2]
for(var/typepath in productlist)
var/amount = productlist[typepath]
var/price = prices[typepath]
if(isnull(amount)) amount = 1
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)
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/obj/item/seeds/S = new typepath(src)
R.product_name = S.name
del(S)
return
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/magivend
name = "MagiVend"
+1
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"
+1 -1
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)
+5 -5
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,10 +506,10 @@
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))
@@ -520,9 +520,9 @@
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
+4 -12
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
@@ -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)
+1 -1
View File
@@ -2,7 +2,7 @@
name = "flash"
desc = "Used for blinding and being an asshole."
icon_state = "flash"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
item_state = "flash"
throwforce = 5
w_class = 2.0
throw_speed = 4
+3 -16
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
+154
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"
@@ -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)
+13 -1
View File
@@ -98,6 +98,18 @@
icon_state = "syndballoon"
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)
@@ -21,6 +21,7 @@
B.health -= damage
B.update_icon()
new/obj/effect/effect/sparks(src.loc)
new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
del(src)
return
+49 -88
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>"}
+1 -1
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)
..()
@@ -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)
+55 -50
View File
@@ -7,25 +7,32 @@
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined")
/obj/item/weapon/storage/update_icon()
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_belt()
/obj/item/weapon/storage/belt/utility
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
desc = "Can hold various tools."
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,22 +62,21 @@
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
@@ -85,30 +91,29 @@
name = "security belt"
desc = "Can hold security gear like handcuffs and flashes."
icon_state = "securitybelt"
item_state = "security"//Could likely use a better one.
item_state = "security"
storage_slots = 7
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
@@ -118,7 +123,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()
@@ -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"
@@ -176,6 +191,48 @@
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>"
@@ -323,6 +380,20 @@
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
/obj/item/weapon/storage/box/sinpockets
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"
@@ -330,7 +401,7 @@
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)
@@ -444,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++)
@@ -459,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()
..()
@@ -492,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
@@ -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)
@@ -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()
+41 -41
View File
@@ -1,41 +1,41 @@
/obj/item/weapon/storage/pill_bottle/dice
name = "pack of dice"
desc = "It's a small container with dice inside."
New()
..()
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d20( src )
/*
* Donut Box
*/
/obj/item/weapon/storage/donut_box
icon = 'icons/obj/food.dmi'
icon_state = "donutbox"
name = "donut box"
storage_slots = 6
var/startswith = 6
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut")
foldable = /obj/item/stack/sheet/cardboard
/obj/item/weapon/storage/donut_box/New()
..()
for(var/i=1; i <= startswith; i++)
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
update_icon()
return
/obj/item/weapon/storage/donut_box/update_icon()
overlays.Cut()
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
var/image/img = image('icons/obj/food.dmi', D.overlay_state)
img.pixel_x = i * 3
overlays += img
i++
/obj/item/weapon/storage/donut_box/empty
icon_state = "donutbox0"
startswith = 0
/obj/item/weapon/storage/pill_bottle/dice
name = "pack of dice"
desc = "It's a small container with dice inside."
New()
..()
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d20( src )
/*
* Donut Box
*/
/obj/item/weapon/storage/donut_box
icon = 'icons/obj/food.dmi'
icon_state = "donutbox"
name = "donut box"
storage_slots = 6
var/startswith = 6
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
foldable = /obj/item/stack/sheet/cardboard
/obj/item/weapon/storage/donut_box/New()
..()
for(var/i=1; i <= startswith; i++)
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
update_icon()
return
/obj/item/weapon/storage/donut_box/update_icon()
overlays.Cut()
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
var/image/img = image('icons/obj/food.dmi', D.overlay_state)
img.pixel_x = i * 3
overlays += img
i++
/obj/item/weapon/storage/donut_box/empty
icon_state = "donutbox0"
startswith = 0
@@ -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()
..()
@@ -209,24 +209,17 @@
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(!stop_messages)
if (istype(W, /obj/item/weapon/hand_labeler))
return 0
usr << "<span class='notice'>[src] cannot hold [W].</span>"
return 0
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(!stop_messages)
usr << "<span class='notice'>[src] cannot hold [W].</span>"
return 0
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
if (W.w_class > max_w_class)
if(!stop_messages)
@@ -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)
@@ -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
+2 -1
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
@@ -54,8 +54,8 @@
/obj/structure/closet/lasertag/red/New()
..()
new /obj/item/weapon/gun/energy/laser/redtag(src)
new /obj/item/weapon/gun/energy/laser/redtag(src)
new /obj/item/weapon/gun/energy/lasertag/red(src)
new /obj/item/weapon/gun/energy/lasertag/red(src)
new /obj/item/clothing/suit/redtag(src)
new /obj/item/clothing/suit/redtag(src)
@@ -68,7 +68,7 @@
/obj/structure/closet/lasertag/blue/New()
..()
new /obj/item/weapon/gun/energy/laser/bluetag(src)
new /obj/item/weapon/gun/energy/laser/bluetag(src)
new /obj/item/weapon/gun/energy/lasertag/blue(src)
new /obj/item/weapon/gun/energy/lasertag/blue(src)
new /obj/item/clothing/suit/bluetag(src)
new /obj/item/clothing/suit/bluetag(src)
@@ -54,6 +54,7 @@
new /obj/item/weapon/storage/box/ids(src)
new /obj/item/weapon/storage/box/ids( src )
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/projectile/colt/flash(src)
new /obj/item/device/flash(src)
return
@@ -258,10 +259,10 @@
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/detective_scanner(src)
new /obj/item/clothing/suit/armor/det_suit(src)
new /obj/item/ammo_magazine/c45r(src)
new /obj/item/ammo_magazine/c45r(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/taperoll/police(src)
new /obj/item/weapon/gun/projectile/detective/semiauto(src)
new /obj/item/weapon/gun/projectile/colt/detective(src)
new /obj/item/clothing/accessory/holster/armpit(src)
return
@@ -253,6 +253,7 @@
icon_state = "inf_box"
item_state = "syringe_kit"
max_combined_w_class = 21
can_hold = list(/obj/item/inflatable)
New()
..()
@@ -0,0 +1,34 @@
/obj/structure/undies_wardrobe
name = "underwear wardrobe"
desc = "Holds item of clothing you shouldn't be showing off in the hallways."
icon = 'icons/obj/closet.dmi'
icon_state = "cabinet_closed"
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
src.add_fingerprint(user)
var/mob/living/carbon/human/H = user
if(!ishuman(user) || (H.species && !(H.species.flags & HAS_UNDERWEAR)))
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
return 0
var/utype = alert("Which section do you want to pick from?",,"Male underwear", "Female underwear", "Undershirts")
var/list/selection
switch(utype)
if("Male underwear")
selection = underwear_m
if("Female underwear")
selection = underwear_f
if("Undershirts")
selection = undershirt_t
var/pick = input("Select the style") as null|anything in selection
if(pick)
if(get_dist(src,user) > 1)
return
if(utype == "Undershirts")
H.undershirt = undershirt_t[pick]
else
H.underwear = selection[pick]
H.update_body(1)
return 1
+1 -1
View File
@@ -104,7 +104,7 @@
return
..()
take_damage(Proj.damage * 4)
take_damage(Proj.damage)
return
+10 -3
View File
@@ -1148,15 +1148,22 @@ var/global/floorIsLava = 0
switch(detail)
if(0)
return "<b>[key_name(C, link, name, highlight_special)]</b>"
if(1)
if(1) //Private Messages
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>)</b>"
if(2)
if(2) //Admins
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>)</b>"
if(3)
if(3) //Devs
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>)(<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>)</b>"
if(4) //Mentors
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>)</b>"
/proc/ishost(whom)
if(!whom)
+5 -1
View File
@@ -87,7 +87,11 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
var/ai_cl
if(ai_found)
ai_cl = " (<A HREF='?_src_=holder;adminchecklaws=\ref[mob]'>CL</A>)"
var/mentor_msg = "\blue <b><font color=red>Request for Help: </font>[get_options_bar(mob, 0, 0, 1, 0)][ai_cl]:</b> [msg]"
//Options bar: mob, details ( admin = 2, dev = 3, mentor = 4, character name (0 = just ckey, 1 = ckey and character name), link? (0 no don't make it a link, 1 do so),
// highlight special roles (0 = everyone has same looking name, 1 = antags / special roles get a golden name)
var/mentor_msg = "\blue <b><font color=red>Request for Help: </font>[get_options_bar(mob, 4, 1, 1, 0)][ai_cl]:</b> [msg]"
msg = "\blue <b><font color=red>Request for Help:: </font>[get_options_bar(mob, 2, 1, 1)][ai_cl]:</b> [msg]"
var/admin_number_afk = 0
+3 -3
View File
@@ -595,7 +595,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/cloaking_device(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/ammo_magazine/a357(M), slot_l_store)
if ("tournament chef") //Steven Seagal FTW
@@ -710,7 +710,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/i=3, i>0, i--)
sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000
sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/mateba
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/revolver/mateba
sec_briefcase.contents += new /obj/item/ammo_magazine/a357
sec_briefcase.contents += new /obj/item/weapon/plastique
M.equip_to_slot_or_del(sec_briefcase, slot_l_hand)
@@ -892,7 +892,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/mateba(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
+1 -1
View File
@@ -153,7 +153,7 @@ var/global/sent_strike_team = 0
equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/weapon/grenade/flashbang(src), slot_r_store)
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store)
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/mateba(src), slot_belt)
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(src), slot_belt)
equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(src), slot_r_hand)
+2 -2
View File
@@ -37,7 +37,7 @@ var/global/vox_tick = 1
equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(src), slot_belt)
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
equip_to_slot_or_del(new /obj/item/weapon/card/emag(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/weapon/gun/dartgun/vox/raider(src), slot_r_hand)
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/dartgun/vox/raider(src), slot_r_hand)
equip_to_slot_or_del(new /obj/item/device/multitool(src), slot_l_hand)
if(4) // Vox medic!
@@ -46,7 +46,7 @@ var/global/vox_tick = 1
equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(src), slot_belt) // Who needs actual surgical tools?
equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
equip_to_slot_or_del(new /obj/item/weapon/circular_saw(src), slot_l_store)
equip_to_slot_or_del(new /obj/item/weapon/gun/dartgun/vox/medical, slot_r_hand)
equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/dartgun/vox/medical, slot_r_hand)
equip_to_slot_or_del(new /obj/item/clothing/mask/breath(src), slot_wear_mask)
equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(src), slot_back)
+17 -20
View File
@@ -54,8 +54,8 @@ datum/preferences
var/age = 30 //age of character
var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2).
var/b_type = "A+" //blood type (not-chooseable)
var/underwear = 1 //underwear type
var/undershirt = 1 //undershirt type
var/underwear //underwear type
var/undershirt //undershirt type
var/backbag = 2 //backpack type
var/h_style = "Bald" //Hair type
var/r_hair = 0 //Hair color
@@ -373,12 +373,11 @@ datum/preferences
else
dat += "<br><br>"
if(gender == MALE)
dat += "Underwear: <a href ='?_src_=prefs;preference=underwear;task=input'><b>[underwear_m[underwear]]</b></a><br>"
else
dat += "Underwear: <a href ='?_src_=prefs;preference=underwear;task=input'><b>[underwear_f[underwear]]</b></a><br>"
var/list/undies = gender == MALE ? underwear_m : underwear_f
dat += "Undershirt: <a href='?_src_=prefs;preference=undershirt;task=input'><b>[undershirt_t[undershirt]]</b></a><br>"
dat += "Underwear: <a href ='?_src_=prefs;preference=underwear;task=input'><b>[get_key_by_value(undies,underwear)]</b></a><br>"
dat += "Undershirt: <a href='?_src_=prefs;preference=undershirt;task=input'><b>[get_key_by_value(undershirt_t,undershirt)]</b></a><br>"
dat += "Backpack Type:<br><a href ='?_src_=prefs;preference=bag;task=input'><b>[backbaglist[backbag]]</b></a><br>"
@@ -1178,10 +1177,12 @@ datum/preferences
if("f_style")
f_style = random_facial_hair_style(gender, species)
if("underwear")
underwear = rand(1,underwear_m.len)
var/r = pick(underwear_m)
underwear = underwear_m[r]
ShowChoices(user)
if("undershirt")
undershirt = rand(1,undershirt_t.len)
var/r = pick(undershirt_t)
undershirt = undershirt_t[r]
ShowChoices(user)
if("eyes")
r_eyes = rand(0,255)
@@ -1299,7 +1300,7 @@ datum/preferences
if("hair")
if(species == "Human" || species == "Unathi" || species == "Tajara" || species == "Skrell")
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as color|null
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null
if(new_hair)
r_hair = hex2num(copytext(new_hair, 2, 4))
g_hair = hex2num(copytext(new_hair, 4, 6))
@@ -1319,7 +1320,7 @@ datum/preferences
h_style = new_h_style
if("facial")
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference") as color|null
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference", rgb(r_facial, g_facial, b_facial)) as color|null
if(new_facial)
r_facial = hex2num(copytext(new_facial, 2, 4))
g_facial = hex2num(copytext(new_facial, 4, 6))
@@ -1351,7 +1352,7 @@ datum/preferences
var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_options
if(new_underwear)
underwear = underwear_options.Find(new_underwear)
underwear = underwear_options[new_underwear]
ShowChoices(user)
if("undershirt")
@@ -1360,11 +1361,11 @@ datum/preferences
var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_options
if (new_undershirt)
undershirt = undershirt_options.Find(new_undershirt)
undershirt = undershirt_options[new_undershirt]
ShowChoices(user)
if("eyes")
var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null
var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference", rgb(r_eyes, g_eyes, b_eyes)) as color|null
if(new_eyes)
r_eyes = hex2num(copytext(new_eyes, 2, 4))
g_eyes = hex2num(copytext(new_eyes, 4, 6))
@@ -1379,7 +1380,7 @@ datum/preferences
if("skin")
if(species == "Unathi" || species == "Tajara" || species == "Skrell")
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference") as color|null
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null
if(new_skin)
r_skin = hex2num(copytext(new_skin, 2, 4))
g_skin = hex2num(copytext(new_skin, 4, 6))
@@ -1705,12 +1706,8 @@ datum/preferences
else if(status == "mechanical")
I.mechanize()
if(underwear > underwear_m.len || underwear < 1)
underwear = 0 //I'm sure this is 100% unnecessary, but I'm paranoid... sue me. //HAH NOW NO MORE MAGIC CLONING UNDIES
character.underwear = underwear
if(undershirt > undershirt_t.len || undershirt < 1)
undershirt = 0
character.undershirt = undershirt
if(backbag > 4 || backbag < 1)
@@ -1745,4 +1742,4 @@ datum/preferences
user << browse(dat, "window=saves;size=300x390")
/datum/preferences/proc/close_load_dialog(mob/user)
user << browse(null, "window=saves")
user << browse(null, "window=saves")
@@ -191,6 +191,11 @@
if(isnull(species) || !(species in playable_species))
species = "Human"
if(isnum(underwear))
var/list/undies = gender == MALE ? underwear_m : underwear_f
underwear = undies[undies[underwear]]
if(isnum(undershirt))
undershirt = undershirt_t[undershirt_t[undershirt]]
if(isnull(language)) language = "None"
if(isnull(spawnpoint)) spawnpoint = "Arrivals Shuttle"
@@ -1,51 +0,0 @@
//Weapon types intended to be used with rig modules
/obj/item/weapon/gun/energy/lasercannon/mounted/load_into_chamber()
if(in_chamber)
return 1
var/obj/item/rig_module/module = loc
if(!istype(module))
return 0
if(module.holder && module.holder.wearer)
var/mob/living/carbon/human/H = module.holder.wearer
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
suit.cell.use(250)
in_chamber = new /obj/item/projectile/beam/heavylaser(src)
return 1
return 0
/obj/item/weapon/gun/energy/gun/mounted/load_into_chamber()
if(in_chamber)
return 1
var/obj/item/rig_module/module = loc
if(!istype(module))
return 0
if(module.holder && module.holder.wearer)
var/mob/living/carbon/human/H = module.holder.wearer
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
suit.cell.use(250)
var/prog_path = projectile_type
in_chamber = new prog_path(src)
return 1
return 0
/obj/item/weapon/gun/energy/taser/mounted/load_into_chamber()
if(in_chamber)
return 1
var/obj/item/rig_module/module = loc
if(!istype(module))
return 0
if(module.holder && module.holder.wearer)
var/mob/living/carbon/human/H = module.holder.wearer
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
suit.cell.use(250)
var/prog_path = projectile_type
in_chamber = new prog_path(src)
return 1
return 0
@@ -197,8 +197,8 @@
target_mob = H
if(target_mob != H)
H << "<span class='danger'>You inject [target_mob] with [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name].</span>"
target_mob << "<span class='danger'>You feel a rushing in your veins as [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.</span>"
H << "<span class='danger'>You inject [target_mob] with [chems_to_use] unit\s of [charge.display_name].</span>"
target_mob << "<span class='danger'>You feel a rushing in your veins as [chems_to_use] unit\s of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.</span>"
target_mob.reagents.add_reagent(charge.display_name, chems_to_use)
charge.charges -= chems_to_use
+23 -30
View File
@@ -196,38 +196,31 @@
slowdown = 1
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 20, bio = 0, rad = 0)
siemens_coefficient = 0.7
var/obj/item/clothing/accessory/holster/holster
/obj/item/clothing/suit/armor/tactical/New()
..()
holster = new(src)
/obj/item/clothing/suit/armor/tactical/verb/holster()
set name = "Holster"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
/obj/item/clothing/suit/armor/tactical/attackby(obj/item/W as obj, mob/user as mob)
..()
holster.attackby(W, user)
if(!holstered)
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
usr << "\blue You need your gun equiped to holster it."
return
var/obj/item/weapon/gun/W = usr.get_active_hand()
if (!W.isHandgun())
usr << "\red This gun won't fit in \the belt!"
return
holstered = usr.get_active_hand()
usr.drop_item()
holstered.loc = src
usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [holstered].")
else
if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj))
usr << "\red You need an empty hand to draw the gun!"
else
if(usr.a_intent == "hurt")
usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \
"\red You draw \the [holstered], ready to shoot!")
else
usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \
"\blue You draw \the [holstered], pointing it at the ground.")
usr.put_in_hands(holstered)
holstered = null
/obj/item/clothing/suit/armor/tactical/verb/holster()
set name = "Holster"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(!holster.holstered)
var/obj/item/W = usr.get_active_hand()
if(!istype(W, /obj/item))
usr << "<span class='warning'>You need your gun equiped to holster it.</span>"
return
holster.holster(W, usr)
else
holster.unholster(usr)
//Non-hardsuit ERT armor.
/obj/item/clothing/suit/armor/vest/ert
+2 -2
View File
@@ -15,7 +15,7 @@
item_state = "bluetag"
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO
allowed = list (/obj/item/weapon/gun/energy/laser/bluetag)
allowed = list (/obj/item/weapon/gun/energy/lasertag/blue)
siemens_coefficient = 3.0
/obj/item/clothing/suit/redtag
@@ -25,7 +25,7 @@
item_state = "redtag"
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO
allowed = list (/obj/item/weapon/gun/energy/laser/redtag)
allowed = list (/obj/item/weapon/gun/energy/lasertag/red)
siemens_coefficient = 3.0
/*
@@ -4,45 +4,40 @@
icon_state = "holster"
item_color = "holster"
slot = "utility"
var/obj/item/weapon/gun/holstered = null
//subtypes can override this to specify what can be holstered
/obj/item/clothing/accessory/holster/proc/can_holster(obj/item/weapon/gun/W)
return W.isHandgun()
var/obj/item/holstered = null
/obj/item/clothing/accessory/holster/proc/holster(obj/item/I, mob/user as mob)
if(holstered)
user << "<span class='warning'>There is already a [holstered] holstered here!</span>"
user << "<span class='warning'>There is already \a [holstered] holstered here!</span>"
return
if (!istype(I, /obj/item/weapon/gun))
user << "<span class='warning'>Only guns can be holstered!</span>"
if (!(I.slot_flags & SLOT_HOLSTER))
user << "<span class='warning'>[I] won't fit in [src]!</span>"
return
var/obj/item/weapon/gun/W = I
if (!can_holster(W))
user << "<span class='warning'>This [W] won't fit in the [src]!</span>"
return
holstered = W
holstered = I
user.drop_from_inventory(holstered)
holstered.loc = src
holstered.add_fingerprint(user)
user.visible_message("<span class='notice'>[user] holsters the [holstered].</span>", "<span class='notice'>You holster the [holstered].</span>")
user.visible_message("<span class='notice'>[user] holsters \the [holstered].</span>", "<span class='notice'>You holster \the [holstered].</span>")
/obj/item/clothing/accessory/holster/proc/unholster(mob/user as mob)
if(!holstered)
return
if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
user << "<span class='warning'>You need an empty hand to draw the [holstered]!</span>"
user << "<span class='warning'>You need an empty hand to draw \the [holstered]!</span>"
else
if(user.a_intent == "hurt")
usr.visible_message("\red [user] draws the [holstered], ready to shoot!</span>", \
"<span class='warning'>You draw the [holstered], ready to shoot!</span>")
usr.visible_message(
"\red [user] draws \the [holstered], ready to shoot!</span>",
"<span class='warning'>You draw \the [holstered], ready to shoot!</span>"
)
else
user.visible_message("<span class='notice'>[user] draws the [holstered], pointing it at the ground.</span>", \
"<span class='notice'>You draw the [holstered], pointing it at the ground.</span>")
user.visible_message(
"<span class='notice'>[user] draws \the [holstered], pointing it at the ground.</span>",
"<span class='notice'>You draw \the [holstered], pointing it at the ground.</span>"
)
user.put_in_hands(holstered)
holstered.add_fingerprint(user)
holstered = null
@@ -86,6 +81,7 @@
if(!istype(usr, /mob/living)) return
if(usr.stat) return
//can't we just use src here?
var/obj/item/clothing/accessory/holster/H = null
if (istype(src, /obj/item/clothing/accessory/holster))
H = src
@@ -98,10 +94,10 @@
usr << "<span class='warning'>Something is very wrong.</span>"
if(!H.holstered)
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
var/obj/item/W = usr.get_active_hand()
if(!istype(W, /obj/item))
usr << "<span class='warning'>You need your gun equiped to holster it.</span>"
return
var/obj/item/weapon/gun/W = usr.get_active_hand()
H.holster(W, usr)
else
H.unholster(usr)
+4 -5
View File
@@ -1340,22 +1340,21 @@
desc = "A stun baton used for incapacitating targets; there seems to be a bunch of tally marks set into the handle."
///// Deckard .44 - Callum Leamas - Roaper
/obj/item/weapon/gun/projectile/detective/fluff/callum_leamas
/obj/item/weapon/gun/projectile/revolver/detective/fluff/callum_leamas
name = "Deckard .44"
desc = "A custom built revolver, based off the semi-popular Detective Special model."
icon = 'icons/obj/custom_items.dmi'
icon_state = "leamas-empty"
ammo_type = /obj/item/ammo_magazine/c38/rubber
/obj/item/weapon/gun/projectile/detective/fluff/callum_leamas/update_icon()
/obj/item/weapon/gun/projectile/revolver/detective/fluff/callum_leamas/update_icon()
..()
if(loaded.len)
icon_state = "leamas-loaded"
else
icon_state = "leamas-empty"
/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob)
/obj/item/weapon/gun/projectile/revolver/detective/fluff/callum_leamas/load_ammo(var/obj/item/A, mob/user)
if(istype(A, /obj/item/ammo_magazine))
flick("leamas-reloading",src)
..()
+1 -5
View File
@@ -180,11 +180,7 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
being_cooked.warm = 1
being_cooked.reagents.add_reagent("tricordrazine", 5)
being_cooked.bitesize = 6
being_cooked.name = "Warm " + being_cooked.name
being_cooked.cooltime()
being_cooked.heat()
make_food(var/obj/container as obj)
var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked = ..(container)
warm_up(being_cooked)
+1 -1
View File
@@ -112,7 +112,7 @@
else if(grown_seed.heat_tolerance < 10)
dat += "<br>It is very sensitive to temperature shifts."
dat += "<br>It thrives in a light level of [grown_seed.ideal_light] lumen[grown_seed.ideal_light == 1 ? "" : "s"]."
dat += "<br>It thrives in a light level of [grown_seed.ideal_light] lumen\s."
if(grown_seed.light_tolerance > 10)
dat += "<br>It is well adapted to a range of light levels."
+1 -1
View File
@@ -256,7 +256,7 @@ proc/populate_seed_list()
if(prob(90))
requires_nutrients = 1
nutrient_consumption = rand(100)*0.1
nutrient_consumption = rand(25)/100
else
requires_nutrients = 0
+1 -1
View File
@@ -23,7 +23,7 @@
"exotic matter" = 0
)
for(var/turf/T in oview(3,get_turf(user)))
for(var/turf/T in range(3,get_turf(user)))
if(!T.has_resources)
continue
+1 -1
View File
@@ -107,7 +107,7 @@
return
else
if(language)
message = language.scramble(language)
message = language.scramble(message)
else
message = stars(message)
+22 -1
View File
@@ -1,3 +1,5 @@
#define SCRAMBLE_CACHE_LEN 20
/*
Datum based languages. Easily editable and modular.
*/
@@ -35,11 +37,21 @@
return "[trim(full_name)]"
/datum/language
var/list/scramble_cache = list()
/datum/language/proc/scramble(var/input)
if(!syllables || !syllables.len)
return stars(input)
// If the input is cached already, move it to the end of the cache and return it
if(input in scramble_cache)
var/n = scramble_cache[input]
scramble_cache -= input
scramble_cache[input] = n
return n
var/input_size = length(input)
var/scrambled_text = ""
var/capitalize = 1
@@ -64,6 +76,13 @@
var/input_ending = copytext(input, input_size)
if(input_ending in list("!","?","."))
scrambled_text += input_ending
// Add it to cache, cutting old entries if the list is too long
scramble_cache[input] = scrambled_text
if(scramble_cache.len > SCRAMBLE_CACHE_LEN)
scramble_cache.Cut(1, scramble_cache.len-SCRAMBLE_CACHE_LEN-1)
return scrambled_text
/datum/language/proc/format_message(message, verb)
@@ -496,4 +515,6 @@
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")
#undef SCRAMBLE_CACHE_LEN
@@ -1220,10 +1220,11 @@
/mob/living/carbon/human/can_inject(var/mob/user, var/error_msg, var/target_zone)
. = 1
if(!user)
target_zone = pick("chest","chest","chest","left leg","right leg","left arm", "right arm", "head")
else if(!target_zone)
target_zone = user.zone_sel.selecting
if(!target_zone)
if(!user)
target_zone = pick("chest","chest","chest","left leg","right leg","left arm", "right arm", "head")
else
target_zone = user.zone_sel.selecting
switch(target_zone)
if("head")
@@ -304,10 +304,7 @@ emp_act
throw_mode_off()
return
var/dtype = BRUTE
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
var/dtype = O.damtype
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
var/zone
@@ -318,11 +315,11 @@ emp_act
zone = ran_zone("chest",75) //Hits a random part of the body, geared towards the chest
//check if we hit
var/miss_chance = 15
if (O.throw_source)
var/distance = get_dist(O.throw_source, loc)
zone = get_zone_with_miss_chance(zone, src, min(15*(distance-2), 0))
else
zone = get_zone_with_miss_chance(zone, src, 15)
miss_chance = max(15*(distance-2), 0)
zone = get_zone_with_miss_chance(zone, src, miss_chance)
if(!zone)
visible_message("\blue \The [O] misses [src] narrowly!")
@@ -370,17 +367,21 @@ emp_act
affecting.embed(I)
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= THROWNOBJ_KNOCKBACK_SPEED)
var/obj/item/weapon/W = O
var/momentum = speed/THROWNOBJ_KNOCKBACK_DIVISOR
var/mass = 1.5
if(istype(O, /obj/item))
var/obj/item/I = O
mass = I.w_class/THROWNOBJ_KNOCKBACK_DIVISOR
var/momentum = speed*mass
if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED)
var/dir = get_dir(O.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
if(!O || !src) return
if(!W || !src) return
if(W.loc == src && W.sharp) //Projectile is embedded and suitable for pinning.
if(O.loc == src && O.sharp) //Projectile is embedded and suitable for pinning.
var/turf/T = near_wall(dir,2)
if(T)
@@ -389,6 +390,13 @@ emp_act
src.anchored = 1
src.pinned += O
/mob/living/carbon/human/embed(var/obj/O, var/def_zone=null)
if(!def_zone) ..()
var/datum/organ/external/affecting = get_organ(def_zone)
if(affecting)
affecting.embed(O)
/mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2)
if (gloves)
@@ -1,3 +1,16 @@
/*
Add fingerprints to items when we put them in our hands.
This saves us from having to call add_fingerprint() any time something is put in a human's hands programmatically.
*/
/mob/living/carbon/human/put_in_l_hand(var/obj/item/W)
. = ..()
if(.) W.add_fingerprint(src)
/mob/living/carbon/human/put_in_r_hand(var/obj/item/W)
. = ..()
if(.) W.add_fingerprint(src)
/mob/living/carbon/human/verb/quick_equip()
set name = "quick-equip"
set hidden = 1
+1 -4
View File
@@ -326,7 +326,6 @@
if(istype(O)) O.add_autopsy_data("Radiation Poisoning", damage)
proc/breathe()
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
if(species && (species.flags & NO_BREATHE || species.flags & IS_SYNTHETIC)) return
@@ -439,17 +438,15 @@
return
if(!breath || (breath.total_moles == 0) || suiciding)
failed_last_breath = 1
if(suiciding)
adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster
failed_last_breath = 1
oxygen_alert = max(oxygen_alert, 1)
return 0
if(health > config.health_threshold_crit)
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
failed_last_breath = 1
else
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
failed_last_breath = 1
oxygen_alert = max(oxygen_alert, 1)
@@ -376,12 +376,11 @@ proc/get_damage_icon_part(damage_state, body_part)
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
//Underwear
if(underwear >0 && underwear < 12 && species.flags & HAS_UNDERWEAR)
if(!fat && !skeleton)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
if(underwear && species.flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', underwear), ICON_OVERLAY)
if(undershirt>0 && undershirt < 5 && species.flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "undershirt[undershirt]_s"), ICON_OVERLAY)
if(undershirt && species.flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', undershirt), ICON_OVERLAY)
if(update_icons)
update_icons()
@@ -724,13 +723,22 @@ proc/get_damage_icon_part(damage_state, body_part)
belt.screen_loc = ui_belt //TODO
var/t_state = belt.item_state
if(!t_state) t_state = belt.icon_state
var/image/standing = image("icon_state" = "[t_state]")
if(belt.icon_override)
overlays_standing[BELT_LAYER] = image("icon" = belt.icon_override, "icon_state" = "[t_state]")
standing.icon = belt.icon_override
else if(belt.sprite_sheets && belt.sprite_sheets[species.name])
overlays_standing[BELT_LAYER] = image("icon" = belt.sprite_sheets[species.name], "icon_state" = "[t_state]")
standing.icon = belt.sprite_sheets[species.name]
else
overlays_standing[BELT_LAYER] = image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[t_state]")
standing.icon = 'icons/mob/belt.dmi'
if(belt.contents.len && istype(belt, /obj/item/weapon/storage/belt))
for(var/obj/item/i in belt.contents)
var/i_state = i.item_state
if(!i_state) i_state = i.icon_state
standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]")
overlays_standing[BELT_LAYER] = standing
else
overlays_standing[BELT_LAYER] = null
if(update_icons) update_icons()
+2 -1
View File
@@ -434,7 +434,8 @@
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
if(t)
M.start_pulling(t)
else
if (pulling)
if (istype(pulling, /obj/structure/window))
+19 -15
View File
@@ -63,10 +63,10 @@
return
//Armor
var/absorb = run_armor_check(def_zone, P.flag)
var/absorb = run_armor_check(def_zone, P.check_armour)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.check_armour)))
proj_sharp = 0
proj_edge = 0
@@ -103,16 +103,13 @@
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve
if(istype(AM,/obj/))
var/obj/O = AM
var/dtype = BRUTE
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
var/dtype = O.damtype
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
var/miss_chance = 15
if (O.throw_source)
var/distance = get_dist(O.throw_source, loc)
miss_chance = min(15*(distance-2), 0)
miss_chance = max(15*(distance-2), 0)
if (prob(miss_chance))
visible_message("\blue \The [O] misses [src] narrowly!")
@@ -136,20 +133,23 @@
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= THROWNOBJ_KNOCKBACK_SPEED)
var/obj/item/weapon/W = O
var/momentum = speed/THROWNOBJ_KNOCKBACK_DIVISOR
var/mass = 1.5
if(istype(O, /obj/item))
var/obj/item/I = O
mass = I.w_class/THROWNOBJ_KNOCKBACK_DIVISOR
var/momentum = speed*mass
if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED)
var/dir = get_dir(O.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
if(!W || !src) return
if(!O || !src) return
if(W.sharp) //Projectile is suitable for pinning.
if(O.sharp) //Projectile is suitable for pinning.
//Handles embedding for non-humans and simple_animals.
O.loc = src
src.embedded += O
embed(O)
var/turf/T = near_wall(dir,2)
@@ -158,7 +158,11 @@
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
src.anchored = 1
src.pinned += O
src.verbs += /mob/proc/yank_out_object
/mob/living/proc/embed(var/obj/O, var/def_zone=null)
O.loc = src
src.embedded += O
src.verbs += /mob/proc/yank_out_object
//This is called when the mob is thrown into a dense turf
/mob/living/proc/turf_collision(var/turf/T, var/speed)
+7 -2
View File
@@ -23,7 +23,10 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/proc/sensor_mode,
/mob/living/silicon/ai/proc/show_laws_verb,
/mob/living/silicon/ai/proc/toggle_acceleration,
/mob/living/silicon/ai/proc/toggle_camera_light
/mob/living/silicon/ai/proc/toggle_camera_light,
/mob/living/silicon/ai/proc/nano_rcon,
/mob/living/silicon/ai/proc/nano_crew_monitor,
/mob/living/silicon/ai/proc/nano_power_monitor
)
//Not sure why this is necessary...
@@ -163,6 +166,8 @@ var/list/ai_verbs_default = list(
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
init_subsystems()
ai_list += src
..()
return
@@ -367,7 +372,7 @@ var/list/ai_verbs_default = list(
if(message_cooldown)
src << "Please allow one minute to pass between announcements."
return
var/input = stripped_input(usr, "Please write a message to announce to the station crew.", "A.I. Announcement")
var/input = input(usr, "Please write a message to announce to the station crew.", "A.I. Announcement")
if(!input)
return
@@ -49,7 +49,7 @@
ai.client.eye = src
//Holopad
if(ai.holo)
ai.holo.move_hologram()
ai.holo.move_hologram(ai)
/mob/aiEye/proc/getLoc()
@@ -0,0 +1,27 @@
var/obj/nano_module/crew_monitor/crew_monitor
var/obj/nano_module/rcon/rcon
var/obj/nano_module/power_monitor/power_monitor
/mob/living/silicon/ai/proc/init_subsystems()
crew_monitor = new(src)
rcon = new(src)
power_monitor = new(src)
/mob/living/silicon/ai/proc/nano_crew_monitor()
set category = "AI Subystems"
set name = "Crew Monitor"
crew_monitor.ui_interact(usr)
/mob/living/silicon/ai/proc/nano_power_monitor()
set category = "AI Subystems"
set name = "Power Monitor"
power_monitor.ui_interact(usr)
/mob/living/silicon/ai/proc/nano_rcon()
set category = "AI Subystems"
set name = "RCON"
rcon.ui_interact(usr)
@@ -223,9 +223,9 @@
src.modules += new /obj/item/borg/sight/hud/sec(src)
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
src.modules += new /obj/item/weapon/melee/baton/robot(src)
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
src.modules += new /obj/item/weapon/gun/energy/taser/mounted/cyborg(src)
src.modules += new /obj/item/taperoll/police(src)
src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src)
return
/obj/item/weapon/robot_module/security/respawn_consumable(var/mob/living/silicon/robot/R)
@@ -236,7 +236,7 @@
F.icon_state = "flash"
else if(F.times_used)
F.times_used--
var/obj/item/weapon/gun/energy/taser/cyborg/T = locate() in src.modules
var/obj/item/weapon/gun/energy/taser/mounted/cyborg/T = locate() in src.modules
if(T.power_supply.charge < T.power_supply.maxcharge)
T.power_supply.give(T.charge_cost)
T.update_icon()
@@ -383,11 +383,11 @@
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/thermal(src)
src.modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
src.modules += new /obj/item/weapon/gun/energy/laser/mounted(src)
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
src.modules += new /obj/item/borg/combat/shield(src)
src.modules += new /obj/item/borg/combat/mobility(src)
src.emag = new /obj/item/weapon/gun/energy/lasercannon/cyborg(src)
src.emag = new /obj/item/weapon/gun/energy/lasercannon/mounted(src)
return
/obj/item/weapon/robot_module/drone
@@ -108,7 +108,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)

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