Manual Merge

This commit is contained in:
Hubblenaut
2014-11-19 14:42:48 +01:00
602 changed files with 12514 additions and 11907 deletions
+15 -5
View File
@@ -164,6 +164,15 @@
#include "code\datums\spells\trigger.dm"
#include "code\datums\spells\turf_teleport.dm"
#include "code\datums\spells\wizard.dm"
#include "code\datums\wires\airlock.dm"
#include "code\datums\wires\alarm.dm"
#include "code\datums\wires\apc.dm"
#include "code\datums\wires\camera.dm"
#include "code\datums\wires\robot.dm"
#include "code\datums\wires\smartfridge.dm"
#include "code\datums\wires\suit_storage_unit.dm"
#include "code\datums\wires\vending.dm"
#include "code\datums\wires\wires.dm"
#include "code\defines\obj.dm"
#include "code\defines\obj\weapon.dm"
#include "code\defines\procs\admin.dm"
@@ -307,6 +316,7 @@
#include "code\game\machinery\holosign.dm"
#include "code\game\machinery\igniter.dm"
#include "code\game\machinery\iv_drip.dm"
#include "code\game\machinery\jukebox.dm"
#include "code\game\machinery\lightswitch.dm"
#include "code\game\machinery\machinery.dm"
#include "code\game\machinery\magnet.dm"
@@ -315,6 +325,7 @@
#include "code\game\machinery\newscaster.dm"
#include "code\game\machinery\OpTable.dm"
#include "code\game\machinery\overview.dm"
#include "code\game\machinery\portable_tag_turret.dm"
#include "code\game\machinery\portable_turret.dm"
#include "code\game\machinery\recharger.dm"
#include "code\game\machinery\rechargestation.dm"
@@ -329,6 +340,7 @@
#include "code\game\machinery\supply_display.dm"
#include "code\game\machinery\syndicatebeacon.dm"
#include "code\game\machinery\teleporter.dm"
#include "code\game\machinery\turret_control.dm"
#include "code\game\machinery\turrets.dm"
#include "code\game\machinery\vending.dm"
#include "code\game\machinery\washing_machine.dm"
@@ -351,7 +363,6 @@
#include "code\game\machinery\camera\motion.dm"
#include "code\game\machinery\camera\presets.dm"
#include "code\game\machinery\camera\tracking.dm"
#include "code\game\machinery\camera\wires.dm"
#include "code\game\machinery\computer\ai_core.dm"
#include "code\game\machinery\computer\aifixer.dm"
#include "code\game\machinery\computer\arcade.dm"
@@ -387,6 +398,7 @@
#include "code\game\machinery\doors\checkForMultipleDoors.dm"
#include "code\game\machinery\doors\door.dm"
#include "code\game\machinery\doors\firedoor.dm"
#include "code\game\machinery\doors\firedoor_assembly.dm"
#include "code\game\machinery\doors\multi_tile.dm"
#include "code\game\machinery\doors\poddoor.dm"
#include "code\game\machinery\doors\shutters.dm"
@@ -678,7 +690,6 @@
#include "code\game\turfs\unsimulated\beach.dm"
#include "code\game\turfs\unsimulated\floor.dm"
#include "code\game\turfs\unsimulated\walls.dm"
#include "code\game\verbs\atom_verbs.dm"
#include "code\game\verbs\ooc.dm"
#include "code\game\verbs\suicide.dm"
#include "code\game\verbs\who.dm"
@@ -838,6 +849,7 @@
#include "code\modules\events\disease_outbreak.dm"
#include "code\modules\events\electrical_storm.dm"
#include "code\modules\events\event.dm"
#include "code\modules\events\event_container.dm"
#include "code\modules\events\event_dynamic.dm"
#include "code\modules\events\event_manager.dm"
#include "code\modules\events\grid_check.dm"
@@ -970,7 +982,6 @@
#include "code\modules\mob\living\carbon\human\examine.dm"
#include "code\modules\mob\living\carbon\human\human.dm"
#include "code\modules\mob\living\carbon\human\human_attackhand.dm"
#include "code\modules\mob\living\carbon\human\human_attackpaw.dm"
#include "code\modules\mob\living\carbon\human\human_damage.dm"
#include "code\modules\mob\living\carbon\human\human_defense.dm"
#include "code\modules\mob\living\carbon\human\human_defines.dm"
@@ -1011,6 +1022,7 @@
#include "code\modules\mob\living\carbon\monkey\update_icons.dm"
#include "code\modules\mob\living\silicon\alarm.dm"
#include "code\modules\mob\living\silicon\death.dm"
#include "code\modules\mob\living\silicon\laws.dm"
#include "code\modules\mob\living\silicon\login.dm"
#include "code\modules\mob\living\silicon\say.dm"
#include "code\modules\mob\living\silicon\silicon.dm"
@@ -1053,7 +1065,6 @@
#include "code\modules\mob\living\silicon\robot\robot_items.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\wires.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_console.dm"
@@ -1137,7 +1148,6 @@
#include "code\modules\power\breaker_box.dm"
#include "code\modules\power\cable.dm"
#include "code\modules\power\cable_heavyduty.dm"
#include "code\modules\power\cable_logic.dm"
#include "code\modules\power\cell.dm"
#include "code\modules\power\engine.dm"
#include "code\modules\power\fractal_reactor.dm"
+1 -1
View File
@@ -3,4 +3,4 @@
MAP_ICON_TYPE: 0
AUTO_FILE_DIR: OFF
*/
// END_INTERNALS
// END_INTERNALS
+7 -2
View File
@@ -67,8 +67,8 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
return omni_icons[state]
if("underlay")
return underlays[state + dir + color]
//if("underlay_intact")
// return underlays_intact[state + dir + color]
// if("underlay_intact")
// return underlays_intact[state + dir + color]
// if("underlay_exposed")
// return underlays_exposed[state + dir + color]
// if("underlay_down")
@@ -194,6 +194,11 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
I.color = pipe_colors[pipe_color]
underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I
/*
Leaving the old icon manager code commented out for now, as we may want to rewrite the new code to cleanly
separate the newpipe icon caching (speshul supply and scrubber lines) from the rest of the pipe code.
*/
/*
/datum/pipe_icon_manager/proc/gen_underlay_icons()
if(!underlays_intact)
@@ -200,12 +200,9 @@
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/binary/dp_vent_pump/examine()
set src in oview(1)
..()
if (get_dist(usr, src) <= 1)
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user)
if(..(user, 1))
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/unary/vent_pump/power_change()
var/old_stat = stat
@@ -190,9 +190,11 @@
if(!istype(T))
return
if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
//pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
else
pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
//pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
return list("on_icon" = ic_on, "off_icon" = ic_off, "pipe_icon" = pipe_state)
-3
View File
@@ -172,9 +172,6 @@
/obj/machinery/atmospherics/tvalve/attack_ai(mob/user as mob)
return
/obj/machinery/atmospherics/tvalve/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/atmospherics/tvalve/attack_hand(mob/user as mob)
src.add_fingerprint(usr)
update_icon(1)
@@ -65,9 +65,6 @@
/obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/attack_paw(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob)
src.ui_interact(user)
@@ -201,7 +198,7 @@
..()
/obj/machinery/atmospherics/unary/freezer/examine()
..()
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
..(user)
if (opened)
usr << "The maintenance hatch is open."
user << "The maintenance hatch is open."
@@ -1,4 +1,5 @@
//TODO: Put this under a common parent type with freezers to cut down on the copypasta
#define HEATER_PERF_MULT 2.5
/obj/machinery/atmospherics/unary/heater
name = "gas heating system"
@@ -17,7 +18,7 @@
use_power = 0
idle_power_usage = 5 //5 Watts for thermostat related circuitry
active_power_usage //50 kW. The power rating of the heater
var/max_power_usage = 20000 //power rating when the usage is turned up to 100
var/power_setting = 100
@@ -34,7 +35,7 @@
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
active_power_usage = max_power_usage * (power_setting/100)
/obj/machinery/atmospherics/unary/heater/initialize()
@@ -72,7 +73,7 @@
if (network && air_contents.total_moles && air_contents.temperature < set_temperature)
update_use_power(2)
air_contents.add_thermal_energy(active_power_usage)
air_contents.add_thermal_energy(active_power_usage * HEATER_PERF_MULT)
heating = 1
network.update = 1
@@ -85,9 +86,6 @@
/obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/heater/attack_paw(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
src.ui_interact(user)
@@ -163,10 +161,10 @@
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting)
power_setting = new_power_setting
var/old_power_usage = active_power_usage
active_power_usage = max_power_usage * (power_setting/100)
if (use_power >= 2 && old_power_usage != active_power_usage)
force_power_update()
@@ -183,7 +181,7 @@
..()
/obj/machinery/atmospherics/unary/heater/examine()
..()
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
..(user)
if (opened)
usr << "The maintenance hatch is open."
user << "The maintenance hatch is open."
@@ -375,15 +375,13 @@
else
..()
/obj/machinery/atmospherics/unary/vent_pump/examine()
set src in oview(1)
..()
if (get_dist(usr, src) <= 1)
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
if(..(user, 1))
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
usr << "You are too far away to read the gauge."
user << "You are too far away to read the gauge."
if(welded)
usr << "It seems welded shut."
user << "It seems welded shut."
/obj/machinery/atmospherics/unary/vent_pump/power_change()
var/old_stat = stat
@@ -1,6 +1,6 @@
/obj/machinery/atmospherics/unary/vent_scrubber
icon = 'icons/atmos/vent_scrubber.dmi'
icon_state = "map_scrubber"
icon_state = "map_scrubber_off"
name = "Air Scrubber"
desc = "Has a valve and pump attached to it"
@@ -30,6 +30,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/on
on = 1
icon_state = "map_scrubber_on"
/obj/machinery/atmospherics/unary/vent_scrubber/New()
..()
@@ -260,13 +261,11 @@
new /obj/item/pipe(loc, make_from=src)
del(src)
/obj/machinery/atmospherics/unary/vent_scrubber/examine()
set src in oview(1)
..()
if (get_dist(usr, src) <= 1)
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
if(..(user, 1))
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
usr << "You are too far away to read the gauge."
user << "You are too far away to read the gauge."
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
if(initial_loc)
-3
View File
@@ -130,9 +130,6 @@
/obj/machinery/atmospherics/valve/attack_ai(mob/user as mob)
return
/obj/machinery/atmospherics/valve/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/atmospherics/valve/attack_hand(mob/user as mob)
src.add_fingerprint(usr)
update_icon(1)
+22 -20
View File
@@ -6,7 +6,7 @@
var/volume = 0
force = 20
//layer = 2.4 //under wires with their 2.44
layer = 2.4 //under wires with their 2.44
use_power = 0
var/alert_pressure = 80*ONE_ATMOSPHERE
@@ -256,9 +256,9 @@
del(meter)
del(src)
else if(node1 && node2)
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "intact" + icon_connect_type)
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")
else
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "exposed[node1?1:0][node2?1:0]" + icon_connect_type)
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]")
/obj/machinery/atmospherics/pipe/simple/update_underlays()
return
@@ -911,29 +911,21 @@
/obj/machinery/atmospherics/pipe/cap
name = "pipe endcap"
desc = "An endcap for pipes"
icon = 'icons/obj/pipes.dmi'
icon_state = "cap"
icon = 'icons/atmos/pipes.dmi'
icon_state = ""
level = 2
layer = 2.4 //under wires with their 2.44
volume = 35
dir = SOUTH
initialize_directions = NORTH
initialize_directions = SOUTH
var/obj/machinery/atmospherics/node
/obj/machinery/atmospherics/pipe/cap/New()
..()
switch(dir)
if(SOUTH)
initialize_directions = NORTH
if(NORTH)
initialize_directions = SOUTH
if(WEST)
initialize_directions = EAST
if(EAST)
initialize_directions = WEST
initialize_directions = dir
/obj/machinery/atmospherics/pipe/cap/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
@@ -964,11 +956,20 @@
..()
/obj/machinery/atmospherics/pipe/cap/update_icon()
overlays = new()
/obj/machinery/atmospherics/pipe/cap/change_color(var/new_color)
..()
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
if(node)
node.update_underlays()
icon_state = "cap[invisibility ? "-f" : ""]"
return
/obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0)
if(!check_icon_cache())
return
alpha = 255
overlays.Cut()
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap")
/obj/machinery/atmospherics/pipe/cap/initialize()
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
@@ -1008,7 +1009,8 @@
/obj/machinery/atmospherics/pipe/cap/hidden
level = 1
icon_state = "cap-f"
icon_state = "cap"
alpha = 128
/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers
name = "scrubbers pipe endcap"
-3
View File
@@ -55,9 +55,6 @@
del target
return ..()
attack_paw(var/mob/M)
return attack_hand(M)
attackby(obj/item/C as obj, mob/user as mob)
(..)
@@ -68,7 +68,7 @@
harm_intent_damage = 8
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "slashes"
attacktext = "slashed"
attack_sound = 'sound/weapons/bite.ogg'
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
@@ -126,7 +126,7 @@
harm_intent_damage = 2
melee_damage_lower = 3
melee_damage_upper = 10
attacktext = "bites"
attacktext = "bitten"
attack_sound = 'sound/weapons/bite.ogg'
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
@@ -61,7 +61,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
idle_power_usage = 50
active_power_usage = 500 //multiplied by field strength
var/cached_power_avail = 0
directwired = 1
anchored = 0
var/state = 0
@@ -120,7 +119,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
state = 2
user << "You weld the [src] to the floor."
connect_to_network()
src.directwired = 1
else
user << "\red You need more welding fuel to complete this task."
if(2)
@@ -134,7 +132,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
state = 1
user << "You cut the [src] free from the floor."
disconnect_from_network()
src.directwired = 0
else
user << "\red You need more welding fuel to complete this task."
return
@@ -19,7 +19,6 @@
use_power = 1
idle_power_usage = 10
active_power_usage = 500
directwired = 0
var/remote_access_enabled = 1
var/cached_power_avail = 0
var/emergency_insert_ready = 0
+4 -7
View File
@@ -16,12 +16,12 @@
else
return temp_access
/obj/item/weapon/card/id/guest/examine()
..()
/obj/item/weapon/card/id/guest/examine(mob/user)
..(user)
if (world.time < expiration_time)
usr << "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>"
user << "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>"
else
usr << "<span class='warning'>It expired at [worldtime2text(expiration_time)].</span>"
user << "<span class='warning'>It expired at [worldtime2text(expiration_time)].</span>"
/obj/item/weapon/card/id/guest/read()
if (world.time > expiration_time)
@@ -71,9 +71,6 @@
/obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/guestpass/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/guestpass/attack_hand(var/mob/user as mob)
if(..())
return
@@ -34,9 +34,6 @@
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
return interact(user)
/obj/machinery/computer/atmoscontrol/attack_paw(var/mob/user as mob)
return interact(user)
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
if(..())
return
+1 -2
View File
@@ -135,8 +135,7 @@
else
breaktape(null, user)
/obj/item/tape/attack_paw(mob/user as mob)
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
@@ -9,7 +9,6 @@
icon_off = "capsecureoff"
New()
sleep(2)
if(prob(50))
new /obj/item/weapon/storage/backpack/captain(src)
else
@@ -40,7 +39,6 @@
icon_off = "hopsecureoff"
New()
sleep(2)
new /obj/item/clothing/under/rank/head_of_personnel(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/head/helmet(src)
@@ -66,7 +64,6 @@
icon_off = "hossecureoff"
New()
sleep(2)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
@@ -93,7 +90,6 @@
New()
sleep(2)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/under/rank/advisor(src)
new /obj/item/device/radio/headset/headset_sec(src)
@@ -118,7 +114,6 @@
icon_off = "secoff"
New()
sleep(2)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/belt/security(src)
@@ -141,7 +136,6 @@
icon_off = "cabinetdetective_broken"
New()
sleep(2)
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/suit/armor/det_suit(src)
new /obj/item/clothing/suit/det_suit(src)
@@ -173,7 +167,6 @@
New()
sleep(2)
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
return
@@ -197,7 +190,6 @@
req_access = list(access_court)
New()
sleep(2)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/weapon/paper/Court (src)
new /obj/item/weapon/paper/Court (src)
+7 -10
View File
@@ -63,16 +63,13 @@
user.visible_message("\blue [user] gathers up[could_fill ? " " : " most of "]the pile of items and puts it into [src].")
update_icon()
examine()
set src in view()
..()
if(src in usr)
usr << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."
if(seal_torn && !contents.len)
usr << "The seal on the bag is broken."
else
usr << "The seal on the bag is[seal_torn ? ", however, not intact" : " intact"]."
return
examine(mob/user)
..(user)
user << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."
if(seal_torn && !contents.len)
user << "The seal on the bag is broken."
else
user << "The seal on the bag is[seal_torn ? ", however, not intact" : " intact"]."
update_icon()
if(contents.len)
@@ -46,8 +46,7 @@
user << "\blue The pack is already full!"
return
/obj/item/weapon/weldpack/examine()
set src in usr
usr << text("\icon[] [] units of fuel left!", src, src.reagents.total_volume)
..()
/obj/item/weapon/weldpack/examine(mob/user)
..(user)
user << text("\icon[] [] units of fuel left!", src, src.reagents.total_volume)
return
@@ -131,8 +131,6 @@
for(var/typekey in spawn_files)
hdd.addfile(new typekey,1)
if(program)
program.execute(os)
update_icon()
@@ -35,10 +35,7 @@
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
if(H.wear_id)
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
else
log += "<tr><td width='40%'>Unknown</td>"
log += "<tr><td width='40%'>[H.get_id_name()]</td>"
switch(C.sensor_mode)
if(1)
@@ -43,7 +43,7 @@
if(!T.implanted) continue
var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in
if(M.z == 1 && !istype(M.loc, /turf/space))
if(M.z in config.station_levels && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc
if(T.malfunction)
@@ -163,8 +163,10 @@
R.ResetSecurityCodes()
else
message_admins("\blue [key_name_admin(usr)] detonated [R.name]!")
log_game("\blue [key_name_admin(usr)] detonated [R.name]!")
message_admins("<span class='notice'>[key_name_admin(usr)] detonated [key_name(R.name)]!</span>")
log_game("<span class='notice'>[key_name_admin(usr)] detonated [key_name(R.name)]!</span>")
if(R.connected_ai)
R.connected_ai << "<br><br><span class='alert'>ALERT - Cyborg kill-switch activated: [R.name]</span><br>"
R.self_destruct()
else
usr << "\red Access Denied."
@@ -176,16 +178,14 @@
var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
if(choice == "Confirm")
if(R && istype(R))
message_admins("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
message_admins("<span class='notice'>[key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!</span>")
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [key_name(R.name)]!")
R.canmove = !R.canmove
if (R.lockcharge)
// R.cell.charge = R.lockcharge
R.lockcharge = !R.lockcharge
R << "Your lockdown has been lifted!"
else
R.lockcharge = !R.lockcharge
// R.cell.charge = 0
R << "You have been locked down!"
else
+7 -2
View File
@@ -138,6 +138,9 @@
usr << "You can't reach it."
return
close_laptop(usr)
proc/close_laptop(mob/user = null)
if(istype(loc,/obj/item/device/laptop))
testing("Close closed computer")
return
@@ -146,7 +149,8 @@
return
if(stat&BROKEN)
usr << "\The [src] is broken! You can't quite get it closed."
if(user)
user << "\The [src] is broken! You can't quite get it closed."
return
if(!portable)
@@ -157,7 +161,8 @@
portable.loc = loc
loc = portable
stat |= MAINT
usr << "You close \the [src]."
if(user)
user << "You close \the [src]."
auto_use_power()
if(stat&MAINT)
+1 -1
View File
@@ -263,7 +263,7 @@
choose_progs(C)
vend()
popup.close()
newlap.close_computer()
newlap.close_laptop()
newlap = null
cardreader = 0
floppy = 0
-3
View File
@@ -38,9 +38,6 @@ var/list/alldepartments = list("Central Command")
/obj/machinery/faxmachine/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/faxmachine/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/faxmachine/attack_hand(mob/user as mob)
user.set_machine(src)
+2 -10
View File
@@ -143,13 +143,5 @@ proc/announce_newscaster_news(datum/news_announcement/news)
sendto.is_admin_channel = 1
news_network.network_channels += sendto
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author ? news.author : sendto.author
newMsg.is_admin_message = !news.can_be_redacted
newMsg.body = news.message
newMsg.message_type = news.message_type
sendto.messages += newMsg
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert(news.channel_name)
var/author = news.author ? news.author : sendto.author
news_network.SubmitArticle(news.message, author, news.channel_name, null, !news.can_be_redacted, news.message_type)
+15
View File
@@ -45,8 +45,20 @@
return heard
/proc/isStationLevel(var/level)
return level in config.station_levels
/proc/isNotStationLevel(var/level)
return !isStationLevel()
/proc/isPlayerLevel(var/level)
return level in config.player_levels
/proc/isAdminLevel(var/level)
return level in config.admin_levels
/proc/isNotAdminLevel(var/level)
return !isAdminLevel(level)
//Magic constants obtained by using linear regression on right-angled triangles of sides 0<x<1, 0<y<1
//They should approximate pythagoras theorem well enough for our needs.
@@ -477,3 +489,6 @@ datum/projectile_data
rstats[i] = environment.vars[stats[i]]
temps[direction] = rstats
return temps
/proc/MinutesToTicks(var/minutes as num)
return minutes * 60 * 10
+4 -1
View File
@@ -28,6 +28,9 @@ var/global/list/whitelisted_species = list("Human")
// Posters
var/global/list/datum/poster/poster_designs = typesof(/datum/poster) - /datum/poster
// Uplinks
var/list/obj/item/device/uplink/world_uplinks = list()
//Preferences stuff
//Hairstyles
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
@@ -100,7 +103,7 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
for(var/T in paths)
var/datum/language/L = new T
all_languages[L.name] = L
for (var/language_name in all_languages)
var/datum/language/L = all_languages[language_name]
language_keys[":[lowertext(L.key)]"] = L
+55 -1
View File
@@ -400,6 +400,60 @@ proc/listclearnulls(list/list)
//world.log << " output: [out.len]"
return reverselist(out)
/proc/dd_sortedObjectList(var/list/L, var/cache=list())
if(L.len < 2)
return L
var/middle = L.len / 2 + 1 // Copy is first,second-1
return dd_mergeObjectList(dd_sortedObjectList(L.Copy(0,middle), cache), dd_sortedObjectList(L.Copy(middle), cache), cache) //second parameter null = to end of list
/proc/dd_mergeObjectList(var/list/L, var/list/R, var/list/cache)
var/Li=1
var/Ri=1
var/list/result = new()
while(Li <= L.len && Ri <= R.len)
var/LLi = L[Li]
var/RRi = R[Ri]
var/LLiV = cache[LLi]
var/RRiV = cache[RRi]
if(!LLiV)
LLiV = LLi:dd_SortValue()
cache[LLi] = LLiV
if(!RRiV)
RRiV = RRi:dd_SortValue()
cache[RRi] = RRiV
if(LLiV < RRiV)
result += L[Li++]
else
result += R[Ri++]
if(Li <= L.len)
return (result + L.Copy(Li, 0))
return (result + R.Copy(Ri, 0))
// Insert an object into a sorted list, preserving sortedness
/proc/dd_insertObjectList(var/list/L, var/O)
var/min = 1
var/max = L.len
var/Oval = O:dd_SortValue()
while(1)
var/mid = min+round((max-min)/2)
if(mid == max)
L.Insert(mid, O)
return
var/Lmid = L[mid]
var/midval = Lmid:dd_SortValue()
if(Oval == midval)
L.Insert(mid, O)
return
else if(Oval < midval)
max = mid
else
min = mid+1
/*
proc/dd_sortedObjectList(list/incoming)
/*
Use binary search to order by dd_SortValue().
@@ -456,7 +510,7 @@ proc/dd_sortedObjectList(list/incoming)
sorted_list += current_sort_object
sorted_list += list_bottom
return sorted_list
*/
proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
// Returns a new list with the text values sorted.
+5 -1
View File
@@ -116,4 +116,8 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
/proc/Wrap(val, min, max)
var/d = max - min
var/t = Floor((val - min) / d)
return val - (t * d)
return val - (t * d)
proc/RaiseToPower(num, power)
if(!power) return 1
return (power-- > 1 ? num * RaiseToPower(num, power) : num)
+18
View File
@@ -97,3 +97,21 @@ proc/RoundHealth(health)
else
return "health-100"
return "0"
/*
Proc for attack log creation, because really why not
1 argument is the actor
2 argument is the target of action
3 is the description of action(like punched, throwed, or any other verb)
4 should it make adminlog note or not
5 is the tool with which the action was made(usually item) 5 and 6 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order
6 is additional information, anything that needs to be added
*/
/proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var/addition=null)
if(user && ismob(user))
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(target && ismob(target))
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(admin)
log_attack("<font color='red'>[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
+6
View File
@@ -192,6 +192,12 @@ proc/tg_list2text(list/list, glue=",")
. += copytext(text, last_found, found)
last_found = found + delim_len
while(found)
/proc/text2numlist(text, delimiter="\n")
var/list/num_list = list()
for(var/x in text2list(text, delimiter))
num_list += text2num(x)
return num_list
//Case Sensitive!
/proc/text2listEx(text, delimiter="\n")
+5 -2
View File
@@ -228,9 +228,12 @@ Turf and target are seperate in case you want to teleport some distance from a t
if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
return 0
var/i, ch, len = length(key)
var/i = 7, ch, len = length(key)
for (i = 7, i <= len, ++i)
if(copytext(key, 7, 8) == "W") //webclient
i++
for (, i <= len, ++i)
ch = text2ascii(key, i)
if (ch < 48 || ch > 57)
return 0
+11 -11
View File
@@ -106,9 +106,9 @@
/obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors!
if(density)
Topic("aiEnable=7", list("aiEnable"="7"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="7"), 1) // 1 meaning no window (consistency!)
else
Topic("aiDisable=7", list("aiDisable"="7"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="7"), 1)
return
/atom/proc/AICtrlClick()
@@ -116,15 +116,15 @@
/obj/machinery/door/airlock/AICtrlClick() // Bolts doors
if(locked)
Topic("aiEnable=4", list("aiEnable"="4"), 1)// 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="4"), 1)// 1 meaning no window (consistency!)
else
Topic("aiDisable=4", list("aiDisable"="4"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="4"), 1)
/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
Topic("breaker=1", list("breaker"="1"), 0) // 0 meaning no window (consistency! wait...)
Topic(src, list("src"= "\ref[src]", "breaker"="1"), 1) // 1 meaning no window (consistency!)
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
Topic("toggleOn", list("toggleOn" = 1), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "toggleOn"="1", 1)) // 1 meaning no window (consistency!)
/atom/proc/AIAltClick(var/atom/A)
AltClick(A)
@@ -132,23 +132,23 @@
/obj/machinery/door/airlock/AIAltClick() // Electrifies doors.
if(!secondsElectrified)
// permanent shock
Topic("aiEnable=6", list("aiEnable"="6"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="6"), 1) // 1 meaning no window (consistency!)
else
// disable/6 is not in Topic; disable/5 disables both temporary and permanent shock
Topic("aiDisable=5", list("aiDisable"="5"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="5"), 1)
return
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
Topic("toggleLethal", list("toggleLethal" = 1), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "toggleLethal"="1", 1)) // 1 meaning no window (consistency!)
/atom/proc/AIMiddleClick()
return
/obj/machinery/door/airlock/AIMiddleClick() // Toggles door bolt lights.
if(!src.lights)
Topic("aiEnable=10", list("aiEnable"="10"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="10"), 1) // 1 meaning no window (consistency!)
else
Topic("aiDisable=10", list("aiDisable"="10"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="10"), 1)
return
//
+21 -7
View File
@@ -147,11 +147,13 @@
return
/mob/proc/changeNext_move(num)
next_move = world.time + num
// Default behavior: ignore double clicks, consider them normal clicks instead
/mob/proc/DblClickOn(var/atom/A, var/params)
ClickOn(A,params)
/*
Translates into attack_hand, etc.
@@ -165,6 +167,21 @@
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
return
/mob/living/UnarmedAttack(var/atom/A, var/proximity_flag)
if(!ticker)
src << "You cannot attack people before the game has started."
return 0
if (istype(get_area(src), /area/start))
src << "No attacking people at spawn, you jackass."
return 0
if(stat)
return 0
return 1
/*
Ranged unarmed attack:
@@ -224,8 +241,7 @@
return
/atom/proc/ShiftClick(var/mob/user)
if(user.client && user.client.eye == user)
examine()
user.face_atom(src)
user.examinate(src)
return
/*
@@ -301,7 +317,6 @@
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
// Snowflake for space vines.
var/is_buckled = 0
if(buckled)
@@ -310,8 +325,7 @@
is_buckled = 1
else
is_buckled = 0
if( stat || is_buckled || !A || !x || !y || !A.x || !A.y ) return
if( is_buckled || !A || !x || !y || !A.x || !A.y || (stat && !isobserver(src))) return
var/dx = A.x - x
var/dy = A.y - y
if(!dx && !dy) return
@@ -323,7 +337,7 @@
else
if(dx > 0) direction = EAST
else direction = WEST
usr.dir = direction
dir = direction
if(buckled && buckled.movable)
buckled.dir = direction
buckled.handle_rotation()
+1 -1
View File
@@ -41,7 +41,7 @@
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
/atom/proc/attack_ghost(mob/dead/observer/user as mob)
if(user.client && user.client.inquisitive_ghost)
examine()
user.examinate(src)
return
// ---------------------------------------
+88 -18
View File
@@ -1,3 +1,7 @@
// Generic damage proc (slimes and monkeys).
/atom/proc/attack_generic(mob/user as mob)
return 0
/*
Humans:
Adds an exception for gloves, to allow special glove types like the ninja ones.
@@ -5,15 +9,19 @@
Otherwise pretty standard.
*/
/mob/living/carbon/human/UnarmedAttack(var/atom/A, var/proximity)
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
if(!..())
return
// Special glove functions:
// If the gloves do anything, have them return 1 to stop
// normal attack_hand() here.
if(proximity && istype(G) && G.Touch(A,1))
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
if(istype(G) && G.Touch(A,1))
return
A.attack_hand(src)
/atom/proc/attack_hand(mob/user as mob)
return
@@ -41,23 +49,20 @@
return
A.attack_tk(src)
/*
Animals & All Unspecified
*/
/mob/living/UnarmedAttack(var/atom/A)
A.attack_animal(src)
/atom/proc/attack_animal(mob/user as mob)
return
/mob/living/RestrainedClickOn(var/atom/A)
return
/*
Monkeys
*/
/mob/living/carbon/monkey/UnarmedAttack(var/atom/A)
A.attack_paw(src)
/atom/proc/attack_paw(mob/user as mob)
return
/mob/living/carbon/monkey/UnarmedAttack(var/atom/A, var/proximity)
if(!..())
return
A.attack_hand(src)
/*
Monkey RestrainedClickOn() was apparently the
@@ -88,26 +93,91 @@
/*
Aliens
Defaults to same as monkey in most places
*/
/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
return
/mob/living/carbon/alien/UnarmedAttack(var/atom/A, var/proximity)
if(!..())
return 0
A.attack_generic(src,rand(5,6),"bitten")
/*
Slimes
Nothing happening here
*/
/mob/living/carbon/slime/UnarmedAttack(var/atom/A)
A.attack_slime(src)
/atom/proc/attack_slime(mob/user as mob)
return
/mob/living/carbon/slime/RestrainedClickOn(var/atom/A)
return
/mob/living/carbon/slime/UnarmedAttack(var/atom/A, var/proximity)
if(!..())
return
// Eating
if(Victim)
return
// Basic attack.
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
// Handle mob shocks.
var/mob/living/M = A
if(istype(M) && powerlevel > 0 && !istype(A,/mob/living/carbon/slime))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC || H.species.insulated)
return
var/power = max(0,min(10,(powerlevel+rand(0,3))))
var/stunprob = 10
switch(power*10)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
powerlevel = max(0,powerlevel-3)
src.visible_message("\red <B>The [name] has shocked [M]!</B>")
M.Weaken(power)
M.Stun(power)
if (M.stuttering < power) M.stuttering = power
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, M)
s.start()
if(prob(stunprob) && powerlevel >= 8)
M.adjustFireLoss(powerlevel * rand(6,10))
M.updatehealth()
/*
New Players:
Have no reason to click on anything at all.
*/
/mob/new_player/ClickOn()
return
/*
Animals
*/
/mob/living/simple_animal/UnarmedAttack(var/atom/A, var/proximity)
if(!..())
return
if(melee_damage_upper == 0 && istype(A,/mob/living))
custom_emote(1,"[friendly] [src]!")
return
var/damage = rand(melee_damage_lower, melee_damage_upper)
if(A.attack_generic(src,damage,attacktext,wall_smash) && loc && attack_sound)
playsound(loc, attack_sound, 50, 1, 1)
+38 -2
View File
@@ -75,6 +75,7 @@ Radio:
1341 - death squad
1443 - Confession Intercom
1347 - Cargo techs
1349 - Service people
Devices:
1451 - tracking implant
@@ -109,6 +110,7 @@ var/const/ENG_FREQ = 1357
var/const/SCI_FREQ = 1351
var/const/MED_FREQ = 1355
var/const/SUP_FREQ = 1347
var/const/SRV_FREQ = 1349
var/list/radiochannels = list(
"Common" = PUB_FREQ,
@@ -120,7 +122,9 @@ var/list/radiochannels = list(
"Response Team" = ERT_FREQ,
"Special Ops" = DTH_FREQ,
"Mercenary" = SYND_FREQ,
"Supply" = SUP_FREQ
"Supply" = SUP_FREQ,
"Service" = SRV_FREQ,
"AI Private" = AI_FREQ
)
// central command channels, i.e deathsquid & response teams
@@ -130,11 +134,43 @@ var/list/CENT_FREQS = list(ERT_FREQ, DTH_FREQ)
var/list/ANTAG_FREQS = list(SYND_FREQ)
//depenging helpers
var/list/DEPT_FREQS = list(SCI_FREQ, MED_FREQ, ENG_FREQ, SEC_FREQ, SUP_FREQ, ERT_FREQ, SYND_FREQ, DTH_FREQ)
var/list/DEPT_FREQS = list(SCI_FREQ, MED_FREQ, ENG_FREQ, SEC_FREQ, SUP_FREQ, SRV_FREQ, ERT_FREQ, SYND_FREQ, DTH_FREQ)
#define TRANSMISSION_WIRE 0
#define TRANSMISSION_RADIO 1
/proc/frequency_span_class(var/frequency)
// Antags!
if (frequency in ANTAG_FREQS)
return "syndradio"
// centcomm channels (deathsquid and ert)
else if(frequency in CENT_FREQS)
return "centradio"
// command channel
else if(frequency == COMM_FREQ)
return "comradio"
// AI private channel
else if(frequency == AI_FREQ)
return "airadio"
// department radio formatting (poorly optimized, ugh)
else if(frequency == SEC_FREQ)
return "secradio"
else if (frequency == ENG_FREQ)
return "engradio"
else if(frequency == SCI_FREQ)
return "sciradio"
else if(frequency == MED_FREQ)
return "medradio"
else if(frequency == SUP_FREQ) // cargo
return "supradio"
else if(frequency == SRV_FREQ) // service
return "srvradio"
// If all else fails and it's a dept_freq, color me purple!
else if(frequency in DEPT_FREQS)
return "deptradio"
return "radio"
/* filters */
//When devices register with the radio controller, they might register under a certain filter.
//Other devices can then choose to send signals to only those devices that belong to a particular filter.
+59 -2
View File
@@ -69,7 +69,7 @@
var/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds...
var/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active.
var/character_slots = 10 // The number of available character slots
var/max_maint_drones = 5 //This many drones can spawn,
@@ -151,6 +151,24 @@
var/use_lib_nudge = 0 //Use the C library nudge instead of the python nudge.
var/use_overmap = 0
var/list/station_levels = list(1) // Defines which Z-levels the station exists on.
var/list/admin_levels= list(2) // Defines which Z-levels which are for admin functionality, for example including such areas as Central Command and the Syndicate Shuttle
var/list/contact_levels = list(1, 5) // Defines which Z-levels which, for example, a Code Red announcement may affect
var/list/player_levels = list(1, 3, 4, 5, 6) // Defines all Z-levels a character can typically reach
// Event settings
var/expected_round_length = 3 * 60 * 60 * 10 // 3 hours
// If the first delay has a custom start time
// No custom time, no custom time, between 80 to 100 minutes respectively.
var/list/event_first_run = list(EVENT_LEVEL_MUNDANE = null, EVENT_LEVEL_MODERATE = null, EVENT_LEVEL_MAJOR = list("lower" = 48000, "upper" = 60000))
// The lowest delay until next event
// 10, 30, 50 minutes respectively
var/list/event_delay_lower = list(EVENT_LEVEL_MUNDANE = 6000, EVENT_LEVEL_MODERATE = 18000, EVENT_LEVEL_MAJOR = 30000)
// The upper delay until next event
// 15, 45, 70 minutes respectively
var/list/event_delay_upper = list(EVENT_LEVEL_MUNDANE = 9000, EVENT_LEVEL_MODERATE = 27000, EVENT_LEVEL_MAJOR = 42000)
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
for (var/T in L)
@@ -495,7 +513,7 @@
if("req_cult_ghostwriter")
config.cult_ghostwriter_req_cultists = text2num(value)
if("character_slots")
config.character_slots = text2num(value)
@@ -511,6 +529,45 @@
if("use_overmap")
config.use_overmap = 1
if("station_levels")
config.station_levels = text2numlist(value, ";")
if("admin_levels")
config.admin_levels = text2numlist(value, ";")
if("contact_levels")
config.contact_levels = text2numlist(value, ";")
if("player_levels")
config.player_levels = text2numlist(value, ";")
if("expected_round_length")
config.expected_round_length = MinutesToTicks(text2num(value))
if("event_custom_start_mundane")
var/values = text2numlist(value, ";")
config.event_first_run[EVENT_LEVEL_MUNDANE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
if("event_custom_start_moderate")
var/values = text2numlist(value, ";")
config.event_first_run[EVENT_LEVEL_MODERATE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
if("event_custom_start_major")
var/values = text2numlist(value, ";")
config.event_first_run[EVENT_LEVEL_MAJOR] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2]))
if("event_delay_lower")
var/values = text2numlist(value, ";")
config.event_delay_lower[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1])
config.event_delay_lower[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2])
config.event_delay_lower[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3])
if("event_delay_upper")
var/values = text2numlist(value, ";")
config.event_delay_upper[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1])
config.event_delay_upper[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2])
config.event_delay_upper[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3])
else
log_misc("Unknown setting in configuration: '[name]'")
+8 -18
View File
@@ -121,6 +121,9 @@ datum/controller/game_controller/proc/setup_objects()
//Set up spawn points.
populate_spawn_points()
// Sort the machinery list so it doesn't cause a lagspike at roundstart
process_machines_sort()
world << "\red \b Initializations complete."
sleep(-1)
@@ -351,18 +354,13 @@ datum/controller/game_controller/proc/process_pipenets()
continue
pipe_networks.Cut(i,i+1)
datum/controller/game_controller/proc/process_powernets()
/datum/controller/game_controller/proc/process_powernets()
last_thing_processed = /datum/powernet
var/i = 1
while(i<=powernets.len)
var/datum/powernet/Powernet = powernets[i]
if(Powernet)
Powernet.process()
i++
continue
powernets.Cut(i,i+1)
for(var/datum/powernet/Powernet in powernets)
Powernet.reset()
datum/controller/game_controller/proc/process_nano()
last_thing_processed = /datum/nanoui
var/i = 1
while(i<=nanomanager.processing_uis.len)
var/datum/nanoui/ui = nanomanager.processing_uis[i]
@@ -374,15 +372,7 @@ datum/controller/game_controller/proc/process_nano()
datum/controller/game_controller/proc/process_events()
last_thing_processed = /datum/event
var/i = 1
while(i<=events.len)
var/datum/event/Event = events[i]
if(Event)
Event.process()
i++
continue
events.Cut(i,i+1)
checkEvent()
event_manager.process()
datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
var/msg = "## DEBUG: [time2text(world.timeofday)] MC restarted. Reports:\n"
+5 -2
View File
@@ -48,7 +48,7 @@
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
return
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data"))
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event"))
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -102,6 +102,9 @@
feedback_add_details("admin_verb","DAutovoter")
if("Gas Data")
debug_variables(gas_data)
feedback_add_details("admin_verv","DGasdata")
feedback_add_details("admin_verb","DGasdata")
if("Event")
debug_variables(event_manager)
feedback_add_details("admin_verb", "DEvent")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
return
+4 -4
View File
@@ -48,11 +48,11 @@ datum/controller/vote
voting.Cut()
proc/autotransfer()
initiate_vote("crew_transfer","the server")
initiate_vote("crew_transfer","the server", 1)
log_debug("The server has called a crew transfer vote")
proc/autogamemode()
initiate_vote("gamemode","the server")
initiate_vote("gamemode","the server", 1)
log_debug("The server has called a gamemode vote")
proc/reset()
@@ -197,9 +197,9 @@ datum/controller/vote
return vote
return 0
proc/initiate_vote(var/vote_type, var/initiator_key)
proc/initiate_vote(var/vote_type, var/initiator_key, var/automatic = 0)
if(!mode)
if(started_time != null && !check_rights(R_ADMIN))
if(started_time != null && !(check_rights(R_ADMIN) || automatic))
var/next_allowed_time = (started_time + config.vote_delay)
if(next_allowed_time > world.time)
return 0
+12 -3
View File
@@ -451,6 +451,15 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Wooden planks crate"
group = "Engineering"
/datum/supply_packs/plastic50
name = "50 plastic sheets"
contains = list(/obj/item/stack/sheet/mineral/plastic)
amount = 50
cost = 10
containertype = /obj/structure/closet/crate
containername = "Plastic sheets crate"
group = "Engineering"
/datum/supply_packs/smescoil
name = "Superconducting Magnetic Coil"
contains = list(/obj/item/weapon/smes_coil)
@@ -619,7 +628,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/hoverpod
name = "Hoverpod Shipment"
contains = list()
cost = 75
cost = 80
containertype = /obj/structure/largecrate/hoverpod
containername = "Hoverpod Crate"
group = "Operations"
@@ -971,7 +980,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/under/rank/mailman,
/obj/item/clothing/under/dress/dress_saloon,
/obj/item/clothing/suit/suspenders,
/obj/item/clothing/suit/storage/labcoat/mad,
/obj/item/clothing/suit/storage/toggle/labcoat/mad,
/obj/item/clothing/suit/bio_suit/plaguedoctorsuit,
/obj/item/clothing/under/schoolgirl,
/obj/item/clothing/under/owl,
@@ -994,7 +1003,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/formal_wear
contains = list(/obj/item/clothing/head/bowler,
/obj/item/clothing/head/that,
/obj/item/clothing/suit/storage/lawyer/bluejacket,
/obj/item/clothing/suit/storage/toggle/lawyer/bluejacket,
/obj/item/clothing/suit/storage/lawyer/purpjacket,
/obj/item/clothing/under/suit_jacket,
/obj/item/clothing/under/suit_jacket/female,
+195
View File
@@ -0,0 +1,195 @@
// Wires for airlocks
/datum/wires/airlock/secure
random = 1
wire_count = 14
/datum/wires/airlock
holder_type = /obj/machinery/door/airlock
wire_count = 12
window_y = 570
var/const/AIRLOCK_WIRE_IDSCAN = 1
var/const/AIRLOCK_WIRE_MAIN_POWER1 = 2
var/const/AIRLOCK_WIRE_MAIN_POWER2 = 4
var/const/AIRLOCK_WIRE_DOOR_BOLTS = 8
var/const/AIRLOCK_WIRE_BACKUP_POWER1 = 16
var/const/AIRLOCK_WIRE_BACKUP_POWER2 = 32
var/const/AIRLOCK_WIRE_OPEN_DOOR = 64
var/const/AIRLOCK_WIRE_AI_CONTROL = 128
var/const/AIRLOCK_WIRE_ELECTRIFY = 256
var/const/AIRLOCK_WIRE_SAFETY = 512
var/const/AIRLOCK_WIRE_SPEED = 1024
var/const/AIRLOCK_WIRE_LIGHT = 2048
/datum/wires/airlock/CanUse(var/mob/living/L)
var/obj/machinery/door/airlock/A = holder
if(!istype(L, /mob/living/silicon))
if(A.isElectrified())
if(A.shock(L, 100))
return 0
if(A.p_open)
return 1
return 0
/datum/wires/airlock/GetInteractWindow()
var/obj/machinery/door/airlock/A = holder
. += ..()
. += 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."))
/datum/wires/airlock/UpdateCut(var/index, var/mended)
var/obj/machinery/door/airlock/A = holder
switch(index)
if(AIRLOCK_WIRE_IDSCAN)
A.aiDisabledIdScanner = !mended
if(AIRLOCK_WIRE_MAIN_POWER1, AIRLOCK_WIRE_MAIN_POWER2)
if(!mended)
//Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be crowbarred open, but bolts-raising will not work. Cutting these wires may electocute the user.
A.loseMainPower()
A.shock(usr, 50)
else
if((!IsIndexCut(AIRLOCK_WIRE_MAIN_POWER1)) && (!IsIndexCut(AIRLOCK_WIRE_MAIN_POWER2)))
A.regainMainPower()
A.shock(usr, 50)
if(AIRLOCK_WIRE_BACKUP_POWER1, AIRLOCK_WIRE_BACKUP_POWER2)
if(!mended)
//Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
A.loseBackupPower()
A.shock(usr, 50)
else
if((!IsIndexCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!IsIndexCut(AIRLOCK_WIRE_BACKUP_POWER2)))
A.regainBackupPower()
A.shock(usr, 50)
if(AIRLOCK_WIRE_DOOR_BOLTS)
if(!mended)
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
if(A.locked!=1)
A.locked = 1
A.update_icon()
if(AIRLOCK_WIRE_AI_CONTROL)
if(!mended)
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
if(A.aiControlDisabled == 0)
A.aiControlDisabled = 1
else if(A.aiControlDisabled == -1)
A.aiControlDisabled = 2
else
if(A.aiControlDisabled == 1)
A.aiControlDisabled = 0
else if(A.aiControlDisabled == 2)
A.aiControlDisabled = -1
if(AIRLOCK_WIRE_ELECTRIFY)
if(!mended)
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
if(A.secondsElectrified != -1)
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]")
A.secondsElectrified = -1
else
if(A.secondsElectrified == -1)
A.secondsElectrified = 0
return // Don't update the dialog.
if (AIRLOCK_WIRE_SAFETY)
A.safe = mended
if(AIRLOCK_WIRE_SPEED)
A.autoclose = mended
if(mended)
if(!A.density)
A.close()
if(AIRLOCK_WIRE_LIGHT)
A.lights = mended
A.update_icon()
/datum/wires/airlock/UpdatePulsed(var/index)
var/obj/machinery/door/airlock/A = holder
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)
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).
A.loseMainPower()
if(AIRLOCK_WIRE_DOOR_BOLTS)
//one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not),
//raises them if they are down (only if power's on)
if(!A.locked)
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
A.locked = 0
A.audible_message("You hear a click from the bottom of the door.", null, 1)
A.update_icon()
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
A.loseBackupPower()
if(AIRLOCK_WIRE_AI_CONTROL)
if(A.aiControlDisabled == 0)
A.aiControlDisabled = 1
else if(A.aiControlDisabled == -1)
A.aiControlDisabled = 2
spawn(10)
if(A)
if(A.aiControlDisabled == 1)
A.aiControlDisabled = 0
else if(A.aiControlDisabled == 2)
A.aiControlDisabled = -1
if(AIRLOCK_WIRE_ELECTRIFY)
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
if(A.secondsElectrified==0)
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]")
A.secondsElectrified = 30
spawn(10)
if(A)
//TODO: Move this into process() and make pulsing reset secondsElectrified to 30
while (A.secondsElectrified>0)
A.secondsElectrified-=1
if(A.secondsElectrified<0)
A.secondsElectrified = 0
sleep(10)
return
if(AIRLOCK_WIRE_OPEN_DOOR)
//tries to open the door without ID
//will succeed only if the ID wire is cut or the door requires no access and it's not emagged
if(A.emagged) return
if(!A.requiresID() || A.check_access(null))
if(A.density) A.open()
else A.close()
if(AIRLOCK_WIRE_SAFETY)
A.safe = !A.safe
if(!A.density)
A.close()
if(AIRLOCK_WIRE_SPEED)
A.normalspeed = !A.normalspeed
if(AIRLOCK_WIRE_LIGHT)
A.lights = !A.lights
A.update_icon()
+93
View File
@@ -0,0 +1,93 @@
/datum/wires/alarm
holder_type = /obj/machinery/alarm
wire_count = 5
var/const/AALARM_WIRE_IDSCAN = 1
var/const/AALARM_WIRE_POWER = 2
var/const/AALARM_WIRE_SYPHON = 4
var/const/AALARM_WIRE_AI_CONTROL = 8
var/const/AALARM_WIRE_AALARM = 16
/datum/wires/alarm/CanUse(var/mob/living/L)
var/obj/machinery/alarm/A = holder
if(A.wiresexposed)
return 1
return 0
/datum/wires/alarm/GetInteractWindow()
var/obj/machinery/alarm/A = holder
. += ..()
. += text("<br>\n[(A.locked ? "The Air Alarm is locked." : "The Air Alarm is unlocked.")]<br>\n[((A.shorted || (A.stat & (NOPOWER|BROKEN))) ? "The Air Alarm is offline." : "The Air Alarm is working properly!")]<br>\n[(A.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
/datum/wires/alarm/UpdateCut(var/index, var/mended)
var/obj/machinery/alarm/A = holder
switch(index)
if(AALARM_WIRE_IDSCAN)
if(!mended)
A.locked = 1
//world << "Idscan wire cut"
if(AALARM_WIRE_POWER)
A.shock(usr, 50)
A.shorted = !mended
A.update_icon()
//world << "Power wire cut"
if (AALARM_WIRE_AI_CONTROL)
if (A.aidisabled == !mended)
A.aidisabled = mended
//world << "AI Control Wire Cut"
if(AALARM_WIRE_SYPHON)
if(!mended)
A.mode = 3 // AALARM_MODE_PANIC
A.apply_mode()
//world << "Syphon Wire Cut"
if(AALARM_WIRE_AALARM)
if (A.alarm_area.atmosalert(2))
A.post_alert(2)
A.update_icon()
/datum/wires/alarm/UpdatePulsed(var/index)
var/obj/machinery/alarm/A = holder
switch(index)
if(AALARM_WIRE_IDSCAN)
A.locked = !A.locked
// world << "Idscan wire pulsed"
if (AALARM_WIRE_POWER)
// world << "Power wire pulsed"
if(A.shorted == 0)
A.shorted = 1
A.update_icon()
spawn(12000)
if(A.shorted == 1)
A.shorted = 0
A.update_icon()
if (AALARM_WIRE_AI_CONTROL)
// world << "AI Control wire pulsed"
if (A.aidisabled == 0)
A.aidisabled = 1
A.updateDialog()
spawn(100)
if (A.aidisabled == 1)
A.aidisabled = 0
if(AALARM_WIRE_SYPHON)
// world << "Syphon wire pulsed"
if(A.mode == 1) // AALARM_MODE_SCRUB
A.mode = 3 // AALARM_MODE_PANIC
else
A.mode = 1 // AALARM_MODE_SCRUB
A.apply_mode()
if(AALARM_WIRE_AALARM)
// world << "Aalarm wire pulsed"
if (A.alarm_area.atmosalert(0))
A.post_alert(0)
A.update_icon()
+72
View File
@@ -0,0 +1,72 @@
/datum/wires/apc
holder_type = /obj/machinery/power/apc
wire_count = 4
#define APC_WIRE_IDSCAN 1
#define APC_WIRE_MAIN_POWER1 2
#define APC_WIRE_MAIN_POWER2 4
#define APC_WIRE_AI_CONTROL 8
/datum/wires/apc/GetInteractWindow()
var/obj/machinery/power/apc/A = holder
. += ..()
. += text("<br>\n[(A.locked ? "The APC is locked." : "The APC is unlocked.")]<br>\n[(A.shorted ? "The APCs power has been shorted." : "The APC is working properly!")]<br>\n[(A.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
/datum/wires/apc/CanUse(var/mob/living/L)
var/obj/machinery/power/apc/A = holder
if(A.wiresexposed)
return 1
return 0
/datum/wires/apc/UpdatePulsed(var/index)
var/obj/machinery/power/apc/A = holder
switch(index)
if(APC_WIRE_IDSCAN)
A.locked = 0
spawn(300)
if(A)
A.locked = 1
if (APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2)
if(A.shorted == 0)
A.shorted = 1
spawn(1200)
if(A && !IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2))
A.shorted = 0
if (APC_WIRE_AI_CONTROL)
if (A.aidisabled == 0)
A.aidisabled = 1
spawn(10)
if(A && !IsIndexCut(APC_WIRE_AI_CONTROL))
A.aidisabled = 0
/datum/wires/apc/UpdateCut(var/index, var/mended)
var/obj/machinery/power/apc/A = holder
switch(index)
if(APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2)
if(!mended)
A.shock(usr, 50)
A.shorted = 1
else if(!IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2))
A.shorted = 0
A.shock(usr, 50)
if(APC_WIRE_AI_CONTROL)
if(!mended)
if (A.aidisabled == 0)
A.aidisabled = 1
else
if (A.aidisabled == 1)
A.aidisabled = 0
+74
View File
@@ -0,0 +1,74 @@
// Wires for cameras.
/datum/wires/camera
random = 1
holder_type = /obj/machinery/camera
wire_count = 6
/datum/wires/camera/GetInteractWindow()
. = ..()
var/obj/machinery/camera/C = holder
. += "<br>\n[(C.view_range == initial(C.view_range) ? "The focus light is on." : "The focus light is off.")]"
. += "<br>\n[(C.can_use() ? "The power link light is on." : "The power link light is off.")]"
. += "<br>\n[(C.light_disabled ? "The camera light is off." : "The camera light is on.")]"
. += "<br>\n[(C.alarm_on ? "The alarm light is on." : "The alarm light is off.")]"
return .
/datum/wires/camera/CanUse(var/mob/living/L)
var/obj/machinery/camera/C = holder
return C.panel_open
var/const/CAMERA_WIRE_FOCUS = 1
var/const/CAMERA_WIRE_POWER = 2
var/const/CAMERA_WIRE_LIGHT = 4
var/const/CAMERA_WIRE_ALARM = 8
var/const/CAMERA_WIRE_NOTHING1 = 16
var/const/CAMERA_WIRE_NOTHING2 = 32
/datum/wires/camera/UpdateCut(var/index, var/mended)
var/obj/machinery/camera/C = holder
switch(index)
if(CAMERA_WIRE_FOCUS)
var/range = (mended ? initial(C.view_range) : C.short_range)
C.setViewRange(range)
if(CAMERA_WIRE_POWER)
if(C.status && !mended || !C.status && mended)
C.deactivate(usr, 1)
if(CAMERA_WIRE_LIGHT)
C.light_disabled = !mended
if(CAMERA_WIRE_ALARM)
if(!mended)
C.triggerCameraAlarm()
else
C.cancelCameraAlarm()
return
/datum/wires/camera/UpdatePulsed(var/index)
var/obj/machinery/camera/C = holder
if(IsIndexCut(index))
return
switch(index)
if(CAMERA_WIRE_FOCUS)
var/new_range = (C.view_range == initial(C.view_range) ? C.short_range : initial(C.view_range))
C.setViewRange(new_range)
if(CAMERA_WIRE_POWER)
C.deactivate(null) // Deactivate the camera
if(CAMERA_WIRE_LIGHT)
C.light_disabled = !C.light_disabled
if(CAMERA_WIRE_ALARM)
C.visible_message("\icon[C] *beep*", "\icon[C] *beep*")
return
/datum/wires/camera/proc/CanDeconstruct()
if(IsIndexCut(CAMERA_WIRE_POWER) && IsIndexCut(CAMERA_WIRE_FOCUS) && IsIndexCut(CAMERA_WIRE_LIGHT) && IsIndexCut(CAMERA_WIRE_NOTHING1) && IsIndexCut(CAMERA_WIRE_NOTHING2))
return 1
else
return 0
+103
View File
@@ -0,0 +1,103 @@
/datum/wires/robot
random = 1
holder_type = /mob/living/silicon/robot
wire_count = 5
var/const/BORG_WIRE_LAWCHECK = 1
var/const/BORG_WIRE_MAIN_POWER = 2 // The power wires do nothing whyyyyyyyyyyyyy
var/const/BORG_WIRE_LOCKED_DOWN = 4
var/const/BORG_WIRE_AI_CONTROL = 8
var/const/BORG_WIRE_CAMERA = 16
/datum/wires/robot/GetInteractWindow()
. = ..()
var/mob/living/silicon/robot/R = holder
. += text("<br>\n[(R.lawupdate ? "The LawSync light is on." : "The LawSync light is off.")]")
. += text("<br>\n[(R.connected_ai ? "The AI link light is on." : "The AI link light is off.")]")
. += text("<br>\n[((!isnull(R.camera) && R.camera.status == 1) ? "The Camera light is on." : "The Camera light is off.")]")
. += text("<br>\n[(R.lockcharge ? "The lockdown light is on." : "The lockdown light is off.")]")
return .
/datum/wires/robot/UpdateCut(var/index, var/mended)
var/mob/living/silicon/robot/R = holder
switch(index)
if(BORG_WIRE_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI
if(!mended)
if (R.lawupdate == 1)
R << "LawSync protocol engaged."
R.show_laws()
else
if (R.lawupdate == 0 && !R.emagged)
R.lawupdate = 1
if (BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control
if(!mended)
if (R.connected_ai)
R.connected_ai = null
if (BORG_WIRE_CAMERA)
if(!isnull(R.camera) && !R.scrambledcodes)
R.camera.status = mended
R.camera.deactivate(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
if(BORG_WIRE_LAWCHECK) //Forces a law update if the borg is set to receive them. Since an update would happen when the borg checks its laws anyway, not much use, but eh
if (R.lawupdate)
R.lawsync()
if(BORG_WIRE_LOCKED_DOWN)
R.SetLockdown(!mended)
/datum/wires/robot/UpdatePulsed(var/index)
var/mob/living/silicon/robot/R = holder
switch(index)
if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
if(!R.emagged)
var/new_ai = select_active_ai(R)
if(new_ai && (new_ai != R.connected_ai))
R.connected_ai = new_ai
R.notify_ai(1)
var/numberer = 1 // Send images the Cyborg has taken to the AI's album upon sync.
for(var/datum/picture/z in R.aiCamera.aipictures)
if(R.connected_ai.aiCamera.aipictures.len == 0)
var/datum/picture/p = new/datum/picture()
p = z
p.fields["name"] = "Uploaded Image [numberer] (synced from [R.name])"
R.connected_ai.aiCamera.aipictures += p
numberer++
continue
for(var/datum/picture/t in R.connected_ai.aiCamera.aipictures) //Hopefully to prevent someone spamming images to silicons, by spamming this wire
if((z.fields["pixel_y"] != t.fields["pixel_y"]) && (z.fields["pixel_x"] != t.fields["pixel_x"])) //~2.26 out of 1000 chance this will stop something it shouldn't
var/datum/picture/p = new/datum/picture()
p = z
p.fields["name"] = "Uploaded Image [numberer] (synced from [R.name])"
R.connected_ai.aiCamera.aipictures += p
else
continue
numberer++
if(R.aiCamera.aipictures.len > 0)
R << "<span class='notice'>Locally saved images synced with AI. Images were retained in local database in case of loss of connection with the AI.</span>"
if (BORG_WIRE_CAMERA)
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
R.camera.deactivate(usr, 0) // Kick anyone watching the Cyborg's camera, doesn't display you disconnecting the camera.
R.visible_message("[R]'s camera lense focuses loudly.")
R << "Your camera lense focuses loudly."
if(BORG_WIRE_LOCKED_DOWN)
R.SetLockdown(!R.lockcharge) // Toggle
/datum/wires/robot/CanUse(var/mob/living/L)
var/mob/living/silicon/robot/R = holder
if(R.wiresexposed)
return 1
return 0
/datum/wires/robot/proc/IsCameraCut()
return wires_status & BORG_WIRE_CAMERA
/datum/wires/robot/proc/LockedCut()
return wires_status & BORG_WIRE_LOCKED_DOWN
+51
View File
@@ -0,0 +1,51 @@
/datum/wires/smartfridge
holder_type = /obj/machinery/smartfridge
wire_count = 3
/datum/wires/smartfridge/secure
random = 1
wire_count = 4
var/const/SMARTFRIDGE_WIRE_ELECTRIFY = 1
var/const/SMARTFRIDGE_WIRE_THROW = 2
var/const/SMARTFRIDGE_WIRE_IDSCAN = 4
/datum/wires/smartfridge/CanUse(var/mob/living/L)
var/obj/machinery/smartfridge/S = holder
if(!istype(L, /mob/living/silicon))
if(S.seconds_electrified)
if(S.shock(L, 100))
return 0
if(S.panel_open)
return 1
return 0
/datum/wires/smartfridge/GetInteractWindow()
var/obj/machinery/smartfridge/S = holder
. += ..()
. += "<BR>The orange light is [S.seconds_electrified ? "off" : "on"].<BR>"
. += "The red light is [S.shoot_inventory ? "off" : "blinking"].<BR>"
. += "A [S.scan_id ? "purple" : "yellow"] light is on.<BR>"
/datum/wires/smartfridge/UpdatePulsed(var/index)
var/obj/machinery/smartfridge/S = holder
switch(index)
if(SMARTFRIDGE_WIRE_THROW)
S.shoot_inventory = !S.shoot_inventory
if(SMARTFRIDGE_WIRE_ELECTRIFY)
S.seconds_electrified = 30
if(SMARTFRIDGE_WIRE_IDSCAN)
S.scan_id = !S.scan_id
/datum/wires/smartfridge/UpdateCut(var/index, var/mended)
var/obj/machinery/smartfridge/S = holder
switch(index)
if(SMARTFRIDGE_WIRE_THROW)
S.shoot_inventory = !mended
if(SMARTFRIDGE_WIRE_ELECTRIFY)
if(mended)
S.seconds_electrified = 0
else
S.seconds_electrified = -1
if(SMARTFRIDGE_WIRE_IDSCAN)
S.scan_id = 1
+47
View File
@@ -0,0 +1,47 @@
/datum/wires/suit_storage_unit
holder_type = /obj/machinery/suit_cycler
wire_count = 3
var/const/SUIT_STORAGE_WIRE_ELECTRIFY = 1
var/const/SUIT_STORAGE_WIRE_SAFETY = 2
var/const/SUIT_STORAGE_WIRE_LOCKED = 4
/datum/wires/suit_storage_unit/CanUse(var/mob/living/L)
var/obj/machinery/suit_cycler/S = holder
if(!istype(L, /mob/living/silicon))
if(S.electrified)
if(S.shock(L, 100))
return 0
if(S.panel_open)
return 1
return 0
/datum/wires/suit_storage_unit/GetInteractWindow()
var/obj/machinery/suit_cycler/S = holder
. += ..()
. += "<BR>The orange light is [S.electrified ? "off" : "on"].<BR>"
. += "The red light is [S.safeties ? "off" : "blinking"].<BR>"
. += "The yellow light is [S.locked ? "on" : "off"].<BR>"
/datum/wires/suit_storage_unit/UpdatePulsed(var/index)
var/obj/machinery/suit_cycler/S = holder
switch(index)
if(SUIT_STORAGE_WIRE_SAFETY)
S.safeties = !S.safeties
if(SUIT_STORAGE_WIRE_ELECTRIFY)
S.electrified = 30
if(SUIT_STORAGE_WIRE_LOCKED)
S.locked = !S.locked
/datum/wires/suit_storage_unit/UpdateCut(var/index, var/mended)
var/obj/machinery/suit_cycler/S = holder
switch(index)
if(SUIT_STORAGE_WIRE_SAFETY)
S.safeties = mended
if(SUIT_STORAGE_WIRE_LOCKED)
S.locked = mended
if(SUIT_STORAGE_WIRE_ELECTRIFY)
if(mended)
S.electrified = 0
else
S.electrified = -1
+58
View File
@@ -0,0 +1,58 @@
/datum/wires/vending
holder_type = /obj/machinery/vending
wire_count = 4
var/const/VENDING_WIRE_THROW = 1
var/const/VENDING_WIRE_CONTRABAND = 2
var/const/VENDING_WIRE_ELECTRIFY = 4
var/const/VENDING_WIRE_IDSCAN = 8
/datum/wires/vending/CanUse(var/mob/living/L)
var/obj/machinery/vending/V = holder
if(!istype(L, /mob/living/silicon))
if(V.seconds_electrified)
if(V.shock(L, 100))
return 0
if(V.panel_open)
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 [V.scan_id ? "purple" : "yellow"] light is on.<BR>"
/datum/wires/vending/UpdatePulsed(var/index)
var/obj/machinery/vending/V = holder
switch(index)
if(VENDING_WIRE_THROW)
V.shoot_inventory = !V.shoot_inventory
if(VENDING_WIRE_CONTRABAND)
V.extended_inventory = !V.extended_inventory
if(VENDING_WIRE_ELECTRIFY)
V.seconds_electrified = 30
if(VENDING_WIRE_IDSCAN)
V.scan_id = !V.scan_id
/datum/wires/vending/UpdateCut(var/index, var/mended)
var/obj/machinery/vending/V = holder
switch(index)
if(VENDING_WIRE_THROW)
V.shoot_inventory = !mended
if(VENDING_WIRE_CONTRABAND)
V.extended_inventory = 0
if(VENDING_WIRE_ELECTRIFY)
if(mended)
V.seconds_electrified = 0
else
V.seconds_electrified = -1
if(VENDING_WIRE_IDSCAN)
V.scan_id = 1
+293
View File
@@ -0,0 +1,293 @@
// Wire datums. Created by Giacomand.
// Was created to replace a horrible case of copy and pasted code with no care for maintability.
// Goodbye Door wires, Cyborg wires, Vending Machine wires, Autolathe wires
// Protolathe wires, APC wires and Camera wires!
#define MAX_FLAG 65535
var/list/same_wires = list()
// 14 colours, if you're adding more than 14 wires then add more colours here
var/list/wireColours = list("red", "blue", "green", "white", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink", "black", "yellow")
/datum/wires
var/random = 0 // Will the wires be different for every single instance.
var/atom/holder = null // The holder
var/holder_type = null // The holder type; used to make sure that the holder is the correct type.
var/wire_count = 0 // Max is 16
var/wires_status = 0 // BITFLAG OF WIRES
var/list/wires = list()
var/list/signallers = list()
var/table_options = " align='center'"
var/row_options1 = " width='80px'"
var/row_options2 = " width='260px'"
var/window_x = 370
var/window_y = 470
/datum/wires/New(var/atom/holder)
..()
src.holder = holder
if(!istype(holder, holder_type))
CRASH("Our holder is null/the wrong type!")
return
// Generate new wires
if(random)
GenerateWires()
// Get the same wires
else
// We don't have any wires to copy yet, generate some and then copy it.
if(!same_wires[holder_type])
GenerateWires()
same_wires[holder_type] = src.wires.Copy()
else
var/list/wires = same_wires[holder_type]
src.wires = wires // Reference the wires list.
/datum/wires/proc/GenerateWires()
var/list/colours_to_pick = wireColours.Copy() // Get a copy, not a reference.
var/list/indexes_to_pick = list()
//Generate our indexes
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
indexes_to_pick += i
colours_to_pick.len = wire_count // Downsize it to our specifications.
while(colours_to_pick.len && indexes_to_pick.len)
// Pick and remove a colour
var/colour = pick_n_take(colours_to_pick)
// Pick and remove an index
var/index = pick_n_take(indexes_to_pick)
src.wires[colour] = index
//wires = shuffle(wires)
/datum/wires/proc/Interact(var/mob/living/user)
var/html = null
if(holder && CanUse(user))
html = GetInteractWindow()
if(html)
user.set_machine(holder)
else
user.unset_machine()
// No content means no window.
user << browse(null, "window=wires")
return
var/datum/browser/popup = new(user, "wires", holder.name, window_x, window_y)
popup.set_content(html)
popup.set_title_image(user.browse_rsc_icon(holder.icon, holder.icon_state))
popup.open()
/datum/wires/proc/GetInteractWindow()
var/html = "<div class='block'>"
html += "<h3>Exposed Wires</h3>"
html += "<table[table_options]>"
for(var/colour in wires)
html += "<tr>"
html += "<td[row_options1]><font color='[colour]'>[capitalize(colour)]</font></td>"
html += "<td[row_options2]>"
html += "<A href='?src=\ref[src];action=1;cut=[colour]'>[IsColourCut(colour) ? "Mend" : "Cut"]</A>"
html += " <A href='?src=\ref[src];action=1;pulse=[colour]'>Pulse</A>"
html += " <A href='?src=\ref[src];action=1;attach=[colour]'>[IsAttached(colour) ? "Detach" : "Attach"] Signaller</A></td></tr>"
html += "</table>"
html += "</div>"
return html
/datum/wires/Topic(href, href_list)
..()
if(in_range(holder, usr) && isliving(usr))
var/mob/living/L = usr
if(CanUse(L) && href_list["action"])
var/obj/item/I = L.get_active_hand()
holder.add_hiddenprint(L)
if(href_list["cut"]) // Toggles the cut/mend status
if(istype(I, /obj/item/weapon/wirecutters))
var/colour = href_list["cut"]
CutWireColour(colour)
else
L << "<span class='error'>You need wirecutters!</span>"
else if(href_list["pulse"])
if(istype(I, /obj/item/device/multitool))
var/colour = href_list["pulse"]
PulseColour(colour)
else
L << "<span class='error'>You need a multitool!</span>"
else if(href_list["attach"])
var/colour = href_list["attach"]
// Detach
if(IsAttached(colour))
var/obj/item/O = Detach(colour)
if(O)
L.put_in_hands(O)
// Attach
else
if(istype(I, /obj/item/device/assembly/signaler))
L.drop_item()
Attach(colour, I)
else
L << "<span class='error'>You need a remote signaller!</span>"
// Update Window
Interact(usr)
if(href_list["close"])
usr << browse(null, "window=wires")
usr.unset_machine(holder)
//
// Overridable Procs
//
// Called when wires cut/mended.
/datum/wires/proc/UpdateCut(var/index, var/mended)
return
// Called when wire pulsed. Add code here.
/datum/wires/proc/UpdatePulsed(var/index)
return
/datum/wires/proc/CanUse(var/mob/living/L)
return 1
// Example of use:
/*
var/const/BOLTED= 1
var/const/SHOCKED = 2
var/const/SAFETY = 4
var/const/POWER = 8
/datum/wires/door/UpdateCut(var/index, var/mended)
var/obj/machinery/door/airlock/A = holder
switch(index)
if(BOLTED)
if(!mended)
A.bolt()
if(SHOCKED)
A.shock()
if(SAFETY )
A.safety()
*/
//
// Helper Procs
//
/datum/wires/proc/PulseColour(var/colour)
PulseIndex(GetIndex(colour))
/datum/wires/proc/PulseIndex(var/index)
if(IsIndexCut(index))
return
UpdatePulsed(index)
/datum/wires/proc/GetIndex(var/colour)
if(wires[colour])
var/index = wires[colour]
return index
else
CRASH("[colour] is not a key in wires.")
//
// Is Index/Colour Cut procs
//
/datum/wires/proc/IsColourCut(var/colour)
var/index = GetIndex(colour)
return IsIndexCut(index)
/datum/wires/proc/IsIndexCut(var/index)
return (index & wires_status)
//
// Signaller Procs
//
/datum/wires/proc/IsAttached(var/colour)
if(signallers[colour])
return 1
return 0
/datum/wires/proc/GetAttached(var/colour)
if(signallers[colour])
return signallers[colour]
return null
/datum/wires/proc/Attach(var/colour, var/obj/item/device/assembly/signaler/S)
if(colour && S)
if(!IsAttached(colour))
signallers[colour] = S
S.loc = holder
S.connected = src
return S
/datum/wires/proc/Detach(var/colour)
if(colour)
var/obj/item/device/assembly/signaler/S = GetAttached(colour)
if(S)
signallers -= colour
S.connected = null
S.loc = holder.loc
return S
/datum/wires/proc/Pulse(var/obj/item/device/assembly/signaler/S)
for(var/colour in signallers)
if(S == signallers[colour])
PulseColour(colour)
break
//
// Cut Wire Colour/Index procs
//
/datum/wires/proc/CutWireColour(var/colour)
var/index = GetIndex(colour)
CutWireIndex(index)
/datum/wires/proc/CutWireIndex(var/index)
if(IsIndexCut(index))
wires_status &= ~index
UpdateCut(index, 1)
else
wires_status |= index
UpdateCut(index, 0)
/datum/wires/proc/RandomCut()
var/r = rand(1, wires.len)
CutWireIndex(r)
/datum/wires/proc/CutAll()
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
CutWireIndex(i)
/datum/wires/proc/IsAllCut()
if(wires_status == (1 << wire_count) - 1)
return 1
return 0
//
//Shuffle and Mend
//
/datum/wires/proc/Shuffle()
wires_status = 0
GenerateWires()
+4
View File
@@ -1,3 +1,7 @@
proc/log_and_message_admins(var/message as text)
log_admin("[usr]([usr.ckey]) " + message)
message_admins("[usr]([usr.ckey]) " + message)
proc/admin_log_and_message_admins(var/message as text)
log_admin("[key_name(usr)] " + message)
message_admins("[key_name_admin(usr)] " + message, 1)
+1 -1
View File
@@ -7,7 +7,7 @@
var/log = 0
var/sound
var/newscast = 0
var/channel_name = "Public Station Announcements"
var/channel_name = "Station Announcements"
var/announcement_type = "Announcement"
/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0)
+63
View File
@@ -1,3 +1,8 @@
#define TELECOMMS_RECEPTION_NONE 0
#define TELECOMMS_RECEPTION_SENDER 1
#define TELECOMMS_RECEPTION_RECEIVER 2
#define TELECOMMS_RECEPTION_BOTH 3
/proc/get_frequency_name(var/display_freq)
var/freq_text
@@ -16,3 +21,61 @@
return freq_text
/datum/reception
var/obj/machinery/message_server/message_server = null
var/telecomms_reception = TELECOMMS_RECEPTION_NONE
var/message = ""
/datum/receptions
var/obj/machinery/message_server/message_server = null
var/sender_reception = TELECOMMS_RECEPTION_NONE
var/list/receiver_reception = new
/proc/get_message_server()
if(message_servers)
for (var/obj/machinery/message_server/MS in message_servers)
if(MS.active)
return MS
return null
/proc/check_signal(var/datum/signal/signal)
return signal && signal.data["done"]
/proc/get_sender_reception(var/atom/sender, var/datum/signal/signal)
return check_signal(signal) ? TELECOMMS_RECEPTION_SENDER : TELECOMMS_RECEPTION_NONE
/proc/get_receiver_reception(var/receiver, var/datum/signal/signal)
if(receiver && check_signal(signal))
var/turf/pos = get_turf(receiver)
if(pos.z in signal.data["level"])
return TELECOMMS_RECEPTION_RECEIVER
return TELECOMMS_RECEPTION_NONE
/proc/get_reception(var/atom/sender, var/receiver, var/message = "", var/do_sleep = 1)
var/datum/reception/reception = new
// check if telecomms I/O route 1459 is stable
reception.message_server = get_message_server()
var/datum/signal/signal = sender.telecomms_process(do_sleep) // Be aware that this proc calls sleep, to simulate transmition delays
reception.telecomms_reception |= get_sender_reception(sender, signal)
reception.telecomms_reception |= get_receiver_reception(receiver, signal)
reception.message = signal && signal.data["compression"] > 0 ? Gibberish(message, signal.data["compression"] + 50) : message
return reception
/proc/get_receptions(var/atom/sender, var/list/atom/receivers, var/do_sleep = 1)
var/datum/receptions/receptions = new
receptions.message_server = get_message_server()
var/datum/signal/signal
if(sender)
signal = sender.telecomms_process(do_sleep)
receptions.sender_reception = get_sender_reception(sender, signal)
for(var/atom/receiver in receivers)
if(!signal)
signal = receiver.telecomms_process()
receptions.receiver_reception[receiver] = get_receiver_reception(receiver, signal)
return receptions
+6 -1
View File
@@ -37,4 +37,9 @@
R.fields["ma_crim_d"] = "No major crime convictions."
R.fields["notes"] = "No notes."
data_core.security += R
return R
return R
/proc/find_record(field, value, list/L)
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
return R
+47 -21
View File
@@ -56,6 +56,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
var/air_doors_activated = 0
var/list/ambience = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
var/sound/forced_ambience = null
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
@@ -66,7 +67,7 @@ var/list/teleportlocs = list()
if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue
if(teleportlocs.Find(AR.name)) continue
var/turf/picked = pick(get_area_turfs(AR.type))
if (picked.z == 1)
if (picked.z in config.station_levels)
teleportlocs += AR.name
teleportlocs[AR.name] = AR
@@ -83,7 +84,7 @@ var/list/ghostteleportlocs = list()
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
var/turf/picked = pick(get_area_turfs(AR.type))
if (picked.z == 1 || picked.z == 3 || picked.z == 4 || picked.z == 5)
if (picked.z in config.player_levels)
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
@@ -717,6 +718,10 @@ var/list/ghostteleportlocs = list()
name = "\improper Incinerator"
icon_state = "disposal"
/area/maintenance/library
name = "Library Maintenance"
icon_state = "maint_library"
/area/maintenance/locker
name = "Locker Room Maintenance"
icon_state = "maint_locker"
@@ -726,11 +731,11 @@ var/list/ghostteleportlocs = list()
icon_state = "maint_medbay"
/area/maintenance/research_port
name = "Port Research Maintenance"
name = "Research Maintenance - Port"
icon_state = "maint_research_port"
/area/maintenance/research_starboard
name = "Starboard Research Maintenance"
name = "Research Maintenance - Starboard"
icon_state = "maint_research_starboard"
/area/maintenance/research_shuttle
@@ -738,11 +743,11 @@ var/list/ghostteleportlocs = list()
icon_state = "maint_research_shuttle"
/area/maintenance/security_port
name = "Port Security Maintenance"
name = "Security Maintenance - Port"
icon_state = "maint_security_port"
/area/maintenance/security_starboard
name = "Starboard Security Maintenance"
name = "Security Maintenance - Starboard"
icon_state = "maint_security_starboard"
/area/maintenance/storage
@@ -814,9 +819,21 @@ var/list/ghostteleportlocs = list()
name = "\improper Construction Area"
icon_state = "construction"
/area/hallway/secondary/entry
name = "\improper Arrival Shuttle Hallway"
icon_state = "entry"
/area/hallway/secondary/entry/fore
name = "\improper Arrival Shuttle Hallway - Fore"
icon_state = "entry_1"
/area/hallway/secondary/entry/port
name = "\improper Arrival Shuttle Hallway - Port"
icon_state = "entry_2"
/area/hallway/secondary/entry/starboard
name = "\improper Arrival Shuttle Hallway - Starboard"
icon_state = "entry_3"
/area/hallway/secondary/entry/aft
name = "\improper Arrival Shuttle Hallway - Aft"
icon_state = "entry_4"
//Command
@@ -884,20 +901,20 @@ var/list/ghostteleportlocs = list()
name = "\improper Dormitories"
icon_state = "Sleep"
/area/crew_quarters/sleep/engi
name = "\improper Engineering Dormitories"
icon_state = "Sleep"
/area/crew_quarters/sleep/engi_wash
name = "\improper Engineering Washroom"
icon_state = "toilet"
/area/crew_quarters/sleep/sec
name = "\improper Security Dormitories"
/area/crew_quarters/sleep/bedrooms/one
name = "\improper Dormitory Bedroom One"
icon_state = "Sleep"
/area/crew_quarters/sleep/bedrooms
name = "\improper Dormitory Bedroom"
/area/crew_quarters/sleep/bedrooms/two
name = "\improper Dormitory Bedroom Two"
icon_state = "Sleep"
/area/crew_quarters/sleep/bedrooms/three
name = "\improper Dormitory Bedroom Three"
icon_state = "Sleep"
/area/crew_quarters/sleep/cryo
@@ -1080,6 +1097,10 @@ var/list/ghostteleportlocs = list()
name = "\improper Engineering Foyer"
icon_state = "engine"
engineering_supply
name = "Engineering Supply"
icon_state = "engine_supply"
break_room
name = "\improper Engineering Break Room"
icon_state = "engine"
@@ -1171,7 +1192,7 @@ var/list/ghostteleportlocs = list()
/area/assembly/robotics
name = "\improper Robotics Lab"
icon_state = "ass_line"
icon_state = "robotics"
/area/assembly/assembly_line //Derelict Assembly Line
name = "\improper Assembly Line"
@@ -1201,21 +1222,26 @@ var/list/ghostteleportlocs = list()
//MedBay
/area/medical/medbay
name = "\improper Medbay"
name = "\improper Medbay Hallway - Port"
icon_state = "medbay"
music = 'sound/ambience/signal.ogg'
//Medbay is a large area, these additional areas help level out APC load.
/area/medical/medbay2
name = "\improper Medbay"
name = "\improper Medbay Hallway - Starboard"
icon_state = "medbay2"
music = 'sound/ambience/signal.ogg'
/area/medical/medbay3
name = "\improper Medbay"
name = "\improper Medbay Hallway - Fore"
icon_state = "medbay3"
music = 'sound/ambience/signal.ogg'
/area/medical/medbay4
name = "\improper Medbay Hallway - Aft"
icon_state = "medbay4"
music = 'sound/ambience/signal.ogg'
/area/medical/biostorage
name = "\improper Secondary Storage"
icon_state = "medbay2"
+21 -14
View File
@@ -65,7 +65,7 @@
//Check all the alarms before lowering atmosalm. Raising is perfectly fine.
for (var/area/RA in related)
for (var/obj/machinery/alarm/AA in RA)
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.report_danger_level)
danger_level = max(danger_level, AA.danger_level)
if(danger_level != atmosalm)
@@ -206,7 +206,7 @@
return
/area/proc/updateicon()
if ((fire || eject || party) && ((!requires_power)?(!requires_power):power_environ))//If it doesn't require power, can still activate this proc.
if ((fire || eject || party) && (!requires_power||power_environ) && !lighting_space)//If it doesn't require power, can still activate this proc.
if(fire && !eject && !party)
icon_state = "blue"
/*else if(atmosalm && !fire && !eject && !party)
@@ -234,6 +234,8 @@
return 1
if(master.always_unpowered)
return 0
if(src.lighting_space)
return 0 // Nope sorry
switch(chan)
if(EQUIP)
return master.power_equip
@@ -245,12 +247,10 @@
return 0
// called when power status changes
/area/proc/power_change()
master.powerupdate = 2
for(var/area/RA in related)
for(var/obj/machinery/M in RA) // for each machine in the area
M.power_change() // reverify power status (to update icons etc.)
M.power_change() // reverify power status (to update icons etc.)
if (fire || eject || party)
RA.updateicon()
@@ -265,7 +265,6 @@
used += master.used_environ
if(TOTAL)
used += master.used_light + master.used_equip + master.used_environ
return used
/area/proc/clear_usage()
@@ -274,7 +273,6 @@
master.used_environ = 0
/area/proc/use_power(var/amount, var/chan)
switch(chan)
if(EQUIP)
master.used_equip += amount
@@ -284,10 +282,9 @@
master.used_environ += amount
/area/Entered(A)
var/musVolume = 25
var/sound = 'sound/ambience/ambigen1.ogg'
var/list/mob/living/forced_ambiance_list = new
/area/Entered(A)
if(!istype(A,/mob/living)) return
var/mob/living/L = A
@@ -302,18 +299,28 @@
L.make_floating(0)
L.lastarea = newarea
play_ambience(L)
/area/proc/play_ambience(var/mob/living/L)
// Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
if(!(L && L.client && (L.client.prefs.toggles & SOUND_AMBIENCE))) return
// If we previously were in an area with force-played ambiance, stop it.
if(L in forced_ambiance_list)
L << sound(null, channel = 1)
forced_ambiance_list -= L
if(!L.client.ambience_playing)
L.client.ambience_playing = 1
L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
if(src.ambience.len && prob(35))
sound = pick(ambience)
if(world.time > L.client.played + 600)
if(forced_ambience)
forced_ambiance_list += L
L << forced_ambience
else if(src.ambience.len && prob(35))
if((world.time >= L.client.played + 600))
var/musVolume = 25
var/sound = pick(ambience)
L << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
L.client.played = world.time
+28 -17
View File
@@ -187,18 +187,22 @@ its easier to just keep the beam vertical.
//All atoms
/atom/verb/examine()
set name = "Examine"
set category = "IC"
set src in view(usr.client) //If it can be seen, it can be examined.
/atom/proc/examine(mob/user, var/distance = -1)
//This reformat names to get a/an properly working on item descriptions when they are bloody
var/f_name = "\a [src]."
if(src.blood_DNA && !istype(src, /obj/effect/decal))
if(gender == PLURAL)
f_name = "some "
else
f_name = "a "
f_name += "<span class='danger'>blood-stained</span> [name]!"
if (!( usr ))
return
usr << "That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn
usr << desc
// *****RM
//usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]"
return
user << "\icon[src] That's [f_name]"
if(desc)
user << desc
return distance == -1 || (get_dist(src, user) <= distance)
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
// see code/modules/mob/mob_movement.dm for more.
@@ -244,7 +248,7 @@ its easier to just keep the beam vertical.
src.fingerprintslast = M.key
return
/atom/proc/add_fingerprint(mob/living/M as mob)
/atom/proc/add_fingerprint(mob/living/M as mob, ignoregloves = 0)
if(isnull(M)) return
if(isAI(M)) return
if(isnull(M.key)) return
@@ -280,11 +284,12 @@ its easier to just keep the beam vertical.
H.gloves.add_fingerprint(M)
//Deal with gloves the pass finger/palm prints.
if(H.gloves != src)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
if(!ignoregloves)
if(H.gloves != src)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
//More adminstuffz
if(fingerprintslast != H.key)
@@ -423,3 +428,9 @@ its easier to just keep the beam vertical.
/atom/proc/checkpass(passflag)
return pass_flags&passflag
/atom/proc/isinspace()
if(istype(get_turf(src), /turf/space))
return 1
else
return 0
-5
View File
@@ -193,11 +193,6 @@
return src.master.attackby(a, b)
return
/atom/movable/overlay/attack_paw(a, b, c)
if (src.master)
return src.master.attack_paw(a, b, c)
return
/atom/movable/overlay/attack_hand(a, b, c)
if (src.master)
return src.master.attack_hand(a, b, c)
+3 -5
View File
@@ -324,8 +324,6 @@
return
return
*/
/obj/machinery/computer/scan_consolenew/attack_paw(user as mob)
ui_interact(user)
/obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
src.add_hiddenprint(user)
@@ -424,15 +422,15 @@
if (connected.beaker.reagents && connected.beaker.reagents.reagent_list.len)
for(var/datum/reagent/R in connected.beaker.reagents.reagent_list)
data["beakerVolume"] += R.volume
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
+1 -1
View File
@@ -82,7 +82,7 @@ var/list/blob_nodes = list()
sleep(-1)
if(!blobs.len) break
var/obj/effect/blob/B = pick(blobs)
if(B.z != 1)
if(isNotStationLevel(B.z))
continue
B.Life()
+3 -3
View File
@@ -7,12 +7,12 @@
return 1
for(var/obj/effect/blob/B in blob_cores)
if(B && B.z != 1) continue
if(B && isNotStationLevel(B.z)) continue
return 0
var/nodes = 0
for(var/obj/effect/blob/B in blob_nodes)
if(B && B.z != 1) continue
if(B && isNotStationLevel(B.z)) continue
nodes++
if(nodes > 4)//Perhapse make a new core with a low prob
return 0
@@ -62,7 +62,7 @@
if (istype(T, /turf/space))
numSpace += 1
else if(istype(T, /turf))
if (M.z!=1)
if (isNotStationLevel(M.z))
numOffStation += 1
else
numAlive += 1
+3 -3
View File
@@ -21,7 +21,7 @@
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in machines)
if(bomb && bomb.r_code)
if(bomb.z == 1)
if(bomb.z in station_levels)
nukecode = bomb.r_code
interceptname = "Directive 7-12"
intercepttext += "<FONT size = 3><B>NanoTrasen Update</B>: Biohazard Alert.</FONT><HR>"
@@ -62,7 +62,7 @@
proc/count()
for(var/turf/T in world)
if(T.z != 1)
if(isNotStationLevel(T.z)
continue
if(istype(T,/turf/simulated/floor))
@@ -84,7 +84,7 @@
src.r_wall += 1
for(var/obj/O in world)
if(O.z != 1)
if(isNotStationLevel(O.z))
continue
if(istype(O, /obj/structure/window))
+1 -1
View File
@@ -34,7 +34,7 @@
maxHealth = 20
melee_damage_lower = 4
melee_damage_upper = 8
attacktext = "hits"
attacktext = "hit"
attack_sound = 'sound/weapons/genhit1.ogg'
var/obj/effect/blob/factory/factory = null
faction = "blob"
+16 -3
View File
@@ -82,6 +82,17 @@
return 1
/datum/game_mode/calamity/post_setup()
event_manager.report_at_round_end = 1
// Reduce the interval between moderate/major events
var/datum/event_container/EModerate = event_manager.event_containers[EVENT_LEVEL_MODERATE]
var/datum/event_container/EMajor = event_manager.event_containers[EVENT_LEVEL_MAJOR]
EModerate.delay_modifier = 0.5
EMajor.delay_modifier = 0.75
// Add the cortical borer event
var/list/moderate_event_list = EModerate.available_events
var/event = new /datum/event_meta(EVENT_LEVEL_MODERATE, "Borer Infestation", /datum/event/borer_infestation, 400, one_shot = 1)
moderate_event_list.Add(event)
if(chosen_atypes)
for(var/atype in chosen_atypes)
@@ -245,9 +256,9 @@
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
var/nuke_code = "[rand(10000, 99999)]"
var/leader_selected = 0
var/spawnpos = 1
var/datum/mind/leader = null
for(var/datum/mind/player in candidates)
syndicates |= player
@@ -264,9 +275,9 @@
greet_syndicate(player)
equip_syndicate(player.current)
if(!leader_selected)
if(!leader)
prepare_syndicate_leader(player, nuke_code)
leader_selected = 1
leader = player
spawnpos++
update_synd_icons_added(player)
@@ -275,6 +286,8 @@
if(uplinkdevice)
var/obj/item/device/radio/uplink/U = new(uplinkdevice.loc)
if(leader)
U.hidden_uplink.uplink_owner = leader
U.hidden_uplink.uses = 40
if(nuke_spawn && synd_spawn.len > 0)
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
+11 -27
View File
@@ -20,7 +20,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
runewords-=cultwords[word]
/obj/effect/rune
desc = ""
desc = "A strange collection of symbols drawn in blood."
anchored = 1
icon = 'icons/obj/rune.dmi'
icon_state = "1"
@@ -68,26 +68,10 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
for(var/mob/living/silicon/ai/AI in player_list)
AI.client.images += blood
examine()
set src in view(2)
if(!iscultist(usr))
usr << "A strange collection of symbols drawn in blood."
return
/* Explosions... really?
if(desc && !usr.stat)
usr << "It reads: <i>[desc]</i>."
sleep(30)
explosion(src.loc, 0, 2, 5, 5)
if(src)
del(src)
*/
if(!desc)
usr << "A spell circle drawn in blood. It reads: <i>[word1] [word2] [word3]</i>."
else
usr << "Explosive Runes inscription in blood. It reads: <i>[desc]</i>."
return
examine(mob/user)
..()
if(iscultist(user))
user << "This spell circle reads: <i>[word1] [word2] [word3]</i>."
attackby(I as obj, user as mob)
@@ -346,7 +330,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
msg_admin_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(istype(M,/mob/dead))
M.invisibility = 0
var/mob/dead/D = M
D.manifest()
user.visible_message( \
"\red [user] drags the ghost to our plan of reality!", \
"\red You drag the ghost to our plan of reality!" \
@@ -510,12 +495,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
user << "You copy the translation notes from your tome."
examine()
set src in usr
if(!iscultist(usr))
usr << "An old, dusty tome with frayed edges and a sinister looking cover."
examine(mob/user)
if(!iscultist(user))
user << "An old, dusty tome with frayed edges and a sinister looking cover."
else
usr << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
user << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
/obj/item/weapon/book/tome/imbued //admin tome, spawns working runes without waiting
w_class = 2.0
+1 -1
View File
@@ -12,7 +12,7 @@ var/list/sacrificed = list()
for(var/obj/effect/rune/R in world)
if(R == src)
continue
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != 2)
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && isPlayerLevel(R.z))
index++
allrunesloc.len = index
allrunesloc[index] = R.loc
-7
View File
@@ -3,13 +3,6 @@
var/imbue = null
var/uses = 0
examine()
set src in view(2)
..()
return
attack_self(mob/living/user as mob)
if(iscultist(user))
var/delete = 1
+10 -10
View File
@@ -57,7 +57,7 @@
var/list/turfs = new
var/turf/picked
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
if(T.z in station_levels)
turfs += T
for(var/turf/simulated/floor/T in turfs)
if(prob(20))
@@ -151,7 +151,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
if(isNotStationLevel(T.z))
continue
for(var/datum/disease/D in H.viruses)
foundAlready = 1
@@ -185,7 +185,7 @@
//world << sound('sound/AI/aliens.ogg')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in config.station_levels)
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
@@ -211,7 +211,7 @@
/* // Haha, this is way too laggy. I'll keep the prison break though.
for(var/obj/machinery/light/L in world)
if(L.z != 1) continue
if(isNotStationLevel(L.z)) continue
L.flicker(50)
sleep(100)
@@ -220,7 +220,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
if(isNotStationLevel(T.z))
continue
if(istype(H,/mob/living/carbon/human))
H.apply_effect((rand(15,75)),IRRADIATE,0)
@@ -237,7 +237,7 @@
var/turf/T = get_turf(M)
if(!T)
continue
if(T.z != 1)
if(isNotStationLevel(T.z))
continue
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
@@ -444,21 +444,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
if(APC.z in station_levels)
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
if(SMES.z in station_levels)
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
if(D.z in station_levels)
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
@@ -467,7 +467,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
if(D.z in station_levels)
firedoornum++;
spawn(0)
D.ion_act()
+1
View File
@@ -29,6 +29,7 @@
if(/obj/item/weapon/twohanded/fireaxe) del src
if(/obj/item/weapon/hatchet) del src
if(/obj/item/weapon/melee/energy) del src
if(/obj/item/weapon/pickaxe/plasmacutter) del src
//less effective weapons
if(/obj/item/weapon/wirecutters)
+2 -2
View File
@@ -78,8 +78,8 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
walk_towards(immrod, end,1)
sleep(1)
while (immrod)
if (immrod.z != 1)
immrod.z = 1
if (isNotStationLevel(immrod.z))
immrod.z = pick(config.station_levels)
if(immrod.loc == end)
del(immrod)
sleep(10)
+1 -1
View File
@@ -83,7 +83,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
var/goal = locate(endx, endy, 1)
src.x = startx
src.y = starty
src.z = 1
src.z = pick(config.station_levels)
spawn(0)
walk_towards(src, goal, 1)
return
@@ -1,6 +1,6 @@
/proc/Christmas_Game_Start()
for(var/obj/structure/flora/tree/pine/xmas in world)
if(xmas.z != 1) continue
if(isNotStationLevel(xmas.z)) continue
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/weapon/a_gift(T)
@@ -171,7 +171,7 @@ var/global/Holiday = null
*/
/* var/list/obj/containers = list()
for(var/obj/item/weapon/storage/S in world)
if(S.z != 1) continue
if(isNotStationLevel(S.z)) continue
containers += S
message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/
+1 -1
View File
@@ -21,7 +21,7 @@
sleep(-1)
if(!blob_cores.len) break
var/obj/effect/blob/B = pick(blob_cores)
if(B.z != 1)
if(isNotStationLevel(B.z))
continue
B.Life()
spawn(30)
+11 -17
View File
@@ -530,12 +530,12 @@ ________________________________________________________________________________
display_spideros()
return
P.tnote += "<i><b>&larr; From [!s_control?(A):"an unknown source"]:</b></i><br>[t]<br>"
if (!P.silent)
if (!P.message_silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
O.show_message(text("\icon[P] *[P.ttone]*"))
P.overlays.Cut()
P.overlays += image('icons/obj/pda.dmi', "pda-r")
P.new_message = 1
P.update_icon()
if("Inject")
if( (href_list["tag"]=="radium"? (reagents.get_reagent_amount("radium"))<=(a_boost*a_transfer) : !reagents.get_reagent_amount(href_list["tag"])) )//Special case for radium. If there are only a_boost*a_transfer radium units left.
@@ -911,9 +911,8 @@ ________________________________________________________________________________
U.drop_item()
return 0
/obj/item/clothing/suit/space/space_ninja/examine()
set src in view()
..()
/obj/item/clothing/suit/space/space_ninja/examine(mob/user)
..(user)
if(s_initialized)
var/mob/living/carbon/human/U = affecting
if(s_control)
@@ -1168,9 +1167,8 @@ ________________________________________________________________________________
U << "You <b>[candrain?"disable":"enable"]</b> special interaction."
candrain=!candrain
/obj/item/clothing/gloves/space_ninja/examine()
set src in view()
..()
/obj/item/clothing/gloves/space_ninja/examine(mob/user)
..(user)
if(!canremove)
var/mob/living/carbon/human/U = loc
U << "The energy drain mechanism is: <B>[candrain?"active":"inactive"]</B>."
@@ -1306,12 +1304,11 @@ ________________________________________________________________________________
var/mob/U = loc
U << "Switching mode to <B>[ninja_vision.mode]</B>."
/obj/item/clothing/mask/gas/voice/space_ninja/examine()
set src in view()
..()
/obj/item/clothing/mask/gas/voice/space_ninja/examine(mob/user)
..(user)
usr << "<B>[ninja_vision.mode]</B> is active."//Leaving usr here since it may be on the floor or on a person.
usr << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
user << "<B>[ninja_vision.mode]</B> is active."
user << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
/*
===================================================================================
@@ -1476,9 +1473,6 @@ It is possible to destroy the net by the occupant or someone else.
healthcheck()
return
attack_paw()
return attack_hand()
attackby(obj/item/weapon/W as obj, mob/user as mob)
var/aforce = W.force
health = max(0, health - aforce)
+6 -6
View File
@@ -7,7 +7,7 @@
for(var/obj/machinery/power/smes/S in world)
var/area/current_area = get_area(S)
if(current_area.type in skipped_areas || S.z != 1)
if(current_area.type in skipped_areas || !(S.z in config.station_levels))
continue
S.last_charge = S.charge
S.last_output = S.output
@@ -20,7 +20,7 @@
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
if(C.cell && C.z in config.station_levels)
C.cell.charge = 0
/proc/power_restore(var/announce = 1)
@@ -29,11 +29,11 @@
if(announce)
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
if(C.cell && C.z in config.station_levels)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in world)
var/area/current_area = get_area(S)
if(current_area.type in skipped_areas || S.z != 1)
if(current_area.type in skipped_areas || isNotStationLevel(S.z))
continue
S.charge = S.last_charge
S.output = S.last_output
@@ -46,10 +46,10 @@
if(announce)
command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
if(isNotStationLevel(S.z))
continue
S.charge = S.capacity
S.output = 200000
S.output = S.output_level_max // Most new SMESs on map are of buildable type, and may actually have higher output limit than 200kW. Use max output of that SMES instead.
S.online = 1
S.updateicon()
S.power_change()
+1 -1
View File
@@ -2,7 +2,7 @@
spawn()
var/list/pick_turfs = list()
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
if(T.z in config.station_levels)
pick_turfs += T
if(pick_turfs.len)
+14 -2
View File
@@ -213,7 +213,7 @@
/datum/game_mode/proc/send_intercept()
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested status information:</FONT><HR>"
intercepttext += "<B> In case you have misplaced your copy, attached is a list of personnel whom reliable sources&trade; suspect may be affiliated with criminal organisations or hostile foreign entities:</B><br>"
intercepttext += "<B> In case you have misplaced your copy, attached is a list of personnel whom reliable sources&trade; suspect may be affiliated with subversive elements:</B><br>"
var/list/suspects = list()
@@ -514,7 +514,7 @@ proc/get_nt_opposed()
obj_count++
/datum/game_mode/proc/printplayer(var/datum/mind/ply)
var/role = "\improper[ply.assigned_role]"
var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
var/text = "<br><b>[ply.name]</b>(<b>[ply.key]</b>) as \a <b>[role]</b> ("
if(ply.current)
if(ply.current.stat == DEAD)
@@ -527,4 +527,16 @@ proc/get_nt_opposed()
text += "body destroyed"
text += ")"
var/TC_uses = 0
var/uplink_true = 0
var/purchases = ""
for(var/obj/item/device/uplink/H in world_uplinks)
if(H && H.uplink_owner && H.uplink_owner == ply)
TC_uses += H.used_TC
uplink_true = 1
for(var/log in H.purchase_log)
purchases += "<BIG>[log]</BIG>"
if(uplink_true)
text += " (used [TC_uses] TC) [purchases]"
return text
+8 -5
View File
@@ -201,7 +201,7 @@ var/global/datum/controller/gameticker/ticker
switch(M.z)
if(0) //inside a crate or something
var/turf/T = get_turf(M)
if(T && T.z==1) //we don't use M.death(0) because it calls a for(/mob) loop and
if(T && T.z in config.station_levels) //we don't use M.death(0) because it calls a for(/mob) loop and
M.health = 0
M.stat = DEAD
if(1) //on a z-level 1 turf.
@@ -261,7 +261,7 @@ var/global/datum/controller/gameticker/ticker
world << sound('sound/effects/explosionfar.ogg')
cinematic.icon_state = "summary_selfdes"
for(var/mob/living/M in living_mob_list)
if(M.loc.z == 1)
if(M.loc.z in config.station_levels)
M.death()//No mercy
//If its actually the end of the round, wait for it to end.
//Otherwise if its a verb it will continue on afterwards.
@@ -274,7 +274,7 @@ var/global/datum/controller/gameticker/ticker
proc/create_characters()
for(var/mob/new_player/player in player_list)
if(player.ready && player.mind)
if(player && player.ready && player.mind)
if(player.mind.assigned_role=="AI")
player.close_spawn_windows()
player.AIize()
@@ -382,11 +382,11 @@ var/global/datum/controller/gameticker/ticker
if(Player.stat != DEAD)
var/turf/playerTurf = get_turf(Player)
if(emergency_shuttle.departed && emergency_shuttle.evac)
if(playerTurf.z != 2)
if(isNotAdminLevel(playerTurf.z))
Player << "<font color='blue'><b>You managed to survive, but were marooned on [station_name()] as [Player.real_name]...</b></font>"
else
Player << "<font color='green'><b>You managed to survive the events on [station_name()] as [Player.real_name].</b></font>"
else if(playerTurf.z == 2)
else if(isAdminLevel(playerTurf.z))
Player << "<font color='green'><b>You successfully underwent crew transfer after events on [station_name()] as [Player.real_name].</b></font>"
else if(issilicon(Player))
Player << "<font color='green'><b>You remain operational after the events on [station_name()] as [Player.real_name].</b></font>"
@@ -441,6 +441,9 @@ var/global/datum/controller/gameticker/ticker
if (findtext("[handler]","auto_declare_completion_"))
call(mode, handler)()
//Ask the event manager to print round end information
event_manager.RoundEnd()
//Print a list of antagonists to the server log
var/list/total_antagonists = list()
//Look into all mobs in world, dead or alive
@@ -99,7 +99,7 @@
return
..()
/obj/machinery/emergency_authentication_device/examine()
usr << {"
/obj/machinery/emergency_authentication_device/examine(mob/user)
user << {"
This is a specialized communications device that is able to instantly send a message to <b>NanoTrasen High Command</b> via quantum entanglement with a sister device at CentCom.
The EAD's status is [get_status()]."}
+4 -4
View File
@@ -25,14 +25,14 @@
icon_state = "pinoff"
usr << "\blue You switch \the [src] off."
/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine()
/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine(mob/user)
switch(mode)
if (1)
usr << "Is is calibrated for the Captain's Authentication Key."
user << "Is is calibrated for the Captain's Authentication Key."
if (2)
usr << "It is calibrated for the Emergency Secondary Authentication Key."
user << "It is calibrated for the Emergency Secondary Authentication Key."
else
usr << "It is switched off."
user << "It is switched off."
/datum/supply_packs/key_pinpointer
name = "Authentication Key Pinpointer crate"
+1 -1
View File
@@ -103,7 +103,7 @@ datum/game_mode/mutiny
if (!pda)
return 0
if (!pda.silent)
if (!pda.message_silent)
playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, pda.loc))
O.show_message(text("\icon[pda] *[pda.ttone]*"))
+1 -1
View File
@@ -1404,7 +1404,7 @@ datum
var/turf/T = get_turf(target.current)
if(target.current.stat == 2)
return 1
else if((T) && (T.z != 1))//If they leave the station they count as dead for this
else if((T) && (isNotStationLevel(T.z)))//If they leave the station they count as dead for this
return 2
else
return 0
+6 -15
View File
@@ -126,7 +126,7 @@ var/global/list/turf/synd_spawn = list()
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
var/nuke_code = "[rand(10000, 99999)]"
var/leader_selected = 0
var/datum/mind/leader = null
var/spawnpos = 1
for(var/datum/mind/synd_mind in syndicates)
@@ -142,9 +142,9 @@ var/global/list/turf/synd_spawn = list()
greet_syndicate(synd_mind)
equip_syndicate(synd_mind.current)
if(!leader_selected)
if(!leader)
prepare_syndicate_leader(synd_mind, nuke_code)
leader_selected = 1
leader = synd_mind
spawnpos++
update_synd_icons_added(synd_mind)
@@ -153,6 +153,8 @@ var/global/list/turf/synd_spawn = list()
if(uplinkdevice)
var/obj/item/device/radio/uplink/U = new(uplinkdevice.loc)
if(leader)
U.hidden_uplink.uplink_owner = leader
U.hidden_uplink.uses = 40
if(nuke_spawn && synd_spawn.len > 0)
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
@@ -333,18 +335,7 @@ var/global/list/turf/synd_spawn = list()
var/text = "<FONT size = 2><B>The mercenaries were:</B></FONT>"
for(var/datum/mind/syndicate in syndicates)
text += "<br>[syndicate.key] was [syndicate.name] ("
if(syndicate.current)
if(syndicate.current.stat == DEAD)
text += "died"
else
text += "survived"
if(syndicate.current.real_name != syndicate.name)
text += " as [syndicate.current.real_name]"
else
text += "body destroyed"
text += ")"
text += printplayer(syndicate)
world << text
return 1
+1 -4
View File
@@ -165,9 +165,6 @@ var/bomb_set
return
..()
/obj/machinery/nuclearbomb/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
if (src.extended)
if (!ishuman(user))
@@ -396,7 +393,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
var/off_station = 0
var/turf/bomb_location = get_turf(src)
if( bomb_location && (bomb_location.z == 1) )
if(bomb_location && (bomb_location.z in config.station_levels))
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
off_station = 1
else
+3 -3
View File
@@ -42,11 +42,11 @@
icon_state = "pinonfar"
spawn(5) .()
examine()
..()
examine(mob/user)
..(user)
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb.timing)
usr << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
user << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
/obj/item/weapon/pinpointer/advpinpointer
+2 -2
View File
@@ -88,7 +88,7 @@ datum/objective/mutiny
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey)
return 1
var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this
if(T && isNotStationLevel(T.z)) //If they leave the station they count as dead for this
return 2
return 0
return 1
@@ -123,7 +123,7 @@ datum/objective/mutiny/rp
if(target in ticker.mode:head_revolutionaries)
return 1
var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this
if(T && isNotStationLevel(T.z)) //If they leave the station they count as dead for this
rval = 2
return 0
return rval
@@ -134,7 +134,7 @@
/datum/game_mode/anti_revolution/proc/check_crew_victory()
for(var/datum/mind/head_mind in heads)
var/turf/T = get_turf(head_mind.current)
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == 1) && !head_mind.is_brigged(600))
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z in station_levels) && !head_mind.is_brigged(600))
if(ishuman(head_mind.current))
return 0
return 1
+4 -4
View File
@@ -337,7 +337,7 @@
/datum/game_mode/revolution/proc/check_heads_victory()
for(var/datum/mind/rev_mind in head_revolutionaries)
var/turf/T = get_turf(rev_mind.current)
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && T && (T.z == 1))
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && T && (T.z in config.station_levels))
if(ishuman(rev_mind.current))
return 0
return 1
@@ -367,7 +367,7 @@
if(headrev.current)
if(headrev.current.stat == DEAD)
text += "died"
else if(headrev.current.z != 1)
else if(isNotStationLevel(headrev.current.z))
text += "fled the station"
else
text += "survived the revolution"
@@ -390,7 +390,7 @@
if(rev.current)
if(rev.current.stat == DEAD)
text += "died"
else if(rev.current.z != 1)
else if(isNotStationLevel(rev.current.z))
text += "fled the station"
else
text += "survived the revolution"
@@ -415,7 +415,7 @@
if(head.current)
if(head.current.stat == DEAD)
text += "died"
else if(head.current.z != 1)
else if(isNotStationLevel(head.current.z))
text += "fled the station"
else
text += "survived the revolution"
@@ -123,7 +123,7 @@
// probably wanna export this stuff into a separate function for use by both
// revs and heads
//assume that only carbon mobs can become rev heads for now
if(!rev_mind.current:handcuffed && T && T.z == 1)
if(!rev_mind.current:handcuffed && T && T.z in config.station_levels)
return 0
return 1
+2
View File
@@ -273,6 +273,7 @@
freq = freqlist[rand(1, freqlist.len)]
var/obj/item/device/uplink/hidden/T = new(R)
T.uplink_owner = traitor_mob.mind
target_radio.hidden_uplink = T
target_radio.traitor_frequency = freq
traitor_mob << "A portable object teleportation relay has been installed in your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features."
@@ -282,6 +283,7 @@
var/pda_pass = "[rand(100,999)] [pick("Alpha","Bravo","Delta","Omega")]"
var/obj/item/device/uplink/hidden/T = new(R)
T.uplink_owner = traitor_mob.mind
R.hidden_uplink = T
var/obj/item/device/pda/P = R
P.lock_code = pda_pass
+11 -67
View File
@@ -417,76 +417,20 @@
/proc/get_all_centcom_jobs()
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
//gets the actual job rank (ignoring alt titles)
//this is used solely for sechuds
/obj/proc/GetJobRealName()
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
return
var/rank
var/assignment
if(istype(src, /obj/item/device/pda))
if(src:id)
rank = src:id:rank
assignment = src:id:assignment
else if(istype(src, /obj/item/weapon/card/id))
rank = src:rank
assignment = src:assignment
if( rank in joblist )
return rank
if( assignment in joblist )
return assignment
return "Unknown"
//gets the alt title, failing that the actual job rank
//this is unused
/obj/proc/sdsdsd() //GetJobDisplayName
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
return
var/assignment
if(istype(src, /obj/item/device/pda))
if(src:id)
assignment = src:id:assignment
else if(istype(src, /obj/item/weapon/card/id))
assignment = src:assignment
if(assignment)
return assignment
return "Unknown"
proc/GetIdCard(var/mob/living/carbon/human/H)
if(H.wear_id)
var/id = H.wear_id.GetID()
if(id)
return id
if(H.get_active_hand())
var/obj/item/I = H.get_active_hand()
return I.GetID()
proc/FindNameFromID(var/mob/living/carbon/human/H)
ASSERT(istype(H))
var/obj/item/weapon/card/id/C = H.get_active_hand()
if( istype(C) || istype(C, /obj/item/device/pda) )
var/obj/item/weapon/card/id/ID = C
if( istype(C, /obj/item/device/pda) )
var/obj/item/device/pda/pda = C
ID = pda.id
if(!istype(ID))
ID = null
if(ID)
return ID.registered_name
C = H.wear_id
if( istype(C) || istype(C, /obj/item/device/pda) )
var/obj/item/weapon/card/id/ID = C
if( istype(C, /obj/item/device/pda) )
var/obj/item/device/pda/pda = C
ID = pda.id
if(!istype(ID))
ID = null
if(ID)
return ID.registered_name
var/obj/item/weapon/card/id/C = GetIdCard(H)
if(C)
return C.registered_name
proc/get_all_job_icons() //For all existing HUD icons
return joblist + list("Prisoner")
+3 -1
View File
@@ -34,7 +34,9 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
captain_announcement.Announce("All hands, captain [H.real_name] on deck!")
var/sound/announce_sound = (ticker.current_state <= GAME_STATE_SETTING_UP)? null : sound('sound/misc/boatswain.ogg', volume=20)
captain_announcement.Announce("All hands, Captain [H.real_name] on deck!", new_sound=announce_sound)
H.implant_loyalty(src)
+5 -1
View File
@@ -18,6 +18,7 @@
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
@@ -56,6 +57,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
@@ -85,6 +87,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/botanic_leather(H), slot_gloves)
@@ -286,6 +289,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt)
@@ -348,7 +352,7 @@
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/internalaffairs(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/internalaffairs(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/internalaffairs(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/big(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt)

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