Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/game/objects/effects/chem/chemsmoke.dm
	code/modules/customitems/item_defines.dm
	code/modules/projectiles/guns/launcher/syringe_gun.dm
	code/modules/reagents/Chemistry-Holder.dm
	code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
	code/modules/reagents/reagent_containers/food/drinks.dm
	code/modules/reagents/reagent_containers/pill.dm
	maps/exodus-1.dmm
This commit is contained in:
Kelenius
2015-05-15 11:28:05 +03:00
468 changed files with 7273 additions and 9076 deletions

1
.gitignore vendored
View File

@@ -6,3 +6,4 @@
*.lk *.lk
*.backup *.backup
data/ data/
cfg/

View File

@@ -86,15 +86,12 @@
#include "code\ATMOSPHERICS\components\unary\unary_base.dm" #include "code\ATMOSPHERICS\components\unary\unary_base.dm"
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm" #include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm" #include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
#include "code\controllers\_DynamicAreaLighting_TG.dm"
#include "code\controllers\autotransfer.dm" #include "code\controllers\autotransfer.dm"
#include "code\controllers\communications.dm" #include "code\controllers\communications.dm"
#include "code\controllers\configuration.dm" #include "code\controllers\configuration.dm"
#include "code\controllers\emergency_shuttle_controller.dm" #include "code\controllers\emergency_shuttle_controller.dm"
#include "code\controllers\failsafe.dm"
#include "code\controllers\hooks-defs.dm" #include "code\controllers\hooks-defs.dm"
#include "code\controllers\hooks.dm" #include "code\controllers\hooks.dm"
#include "code\controllers\lighting_controller.dm"
#include "code\controllers\master_controller.dm" #include "code\controllers\master_controller.dm"
#include "code\controllers\shuttle_controller.dm" #include "code\controllers\shuttle_controller.dm"
#include "code\controllers\subsystems.dm" #include "code\controllers\subsystems.dm"
@@ -107,13 +104,11 @@
#include "code\controllers\Processes\event.dm" #include "code\controllers\Processes\event.dm"
#include "code\controllers\Processes\garbage.dm" #include "code\controllers\Processes\garbage.dm"
#include "code\controllers\Processes\inactivity.dm" #include "code\controllers\Processes\inactivity.dm"
#include "code\controllers\Processes\lighting.dm"
#include "code\controllers\Processes\machinery.dm" #include "code\controllers\Processes\machinery.dm"
#include "code\controllers\Processes\mob.dm" #include "code\controllers\Processes\mob.dm"
#include "code\controllers\Processes\nanoui.dm" #include "code\controllers\Processes\nanoui.dm"
#include "code\controllers\Processes\obj.dm" #include "code\controllers\Processes\obj.dm"
#include "code\controllers\Processes\pipenet.dm" #include "code\controllers\Processes\pipenet.dm"
#include "code\controllers\Processes\powernet.dm"
#include "code\controllers\Processes\Shuttle.dm" #include "code\controllers\Processes\Shuttle.dm"
#include "code\controllers\Processes\sun.dm" #include "code\controllers\Processes\sun.dm"
#include "code\controllers\Processes\supply.dm" #include "code\controllers\Processes\supply.dm"
@@ -215,7 +210,6 @@
#include "code\game\response_team.dm" #include "code\game\response_team.dm"
#include "code\game\shuttle_engines.dm" #include "code\game\shuttle_engines.dm"
#include "code\game\skincmd.dm" #include "code\game\skincmd.dm"
#include "code\game\smoothwall.dm"
#include "code\game\sound.dm" #include "code\game\sound.dm"
#include "code\game\supplyshuttle.dm" #include "code\game\supplyshuttle.dm"
#include "code\game\antagonist\antagonist.dm" #include "code\game\antagonist\antagonist.dm"
@@ -373,6 +367,7 @@
#include "code\game\machinery\turret_control.dm" #include "code\game\machinery\turret_control.dm"
#include "code\game\machinery\turrets.dm" #include "code\game\machinery\turrets.dm"
#include "code\game\machinery\vending.dm" #include "code\game\machinery\vending.dm"
#include "code\game\machinery\wall_frames.dm"
#include "code\game\machinery\washing_machine.dm" #include "code\game\machinery\washing_machine.dm"
#include "code\game\machinery\wishgranter.dm" #include "code\game\machinery\wishgranter.dm"
#include "code\game\machinery\atmoalter\area_atmos_computer.dm" #include "code\game\machinery\atmoalter\area_atmos_computer.dm"
@@ -554,6 +549,7 @@
#include "code\game\objects\items\crayons.dm" #include "code\game\objects\items\crayons.dm"
#include "code\game\objects\items\glassjar.dm" #include "code\game\objects\items\glassjar.dm"
#include "code\game\objects\items\latexballoon.dm" #include "code\game\objects\items\latexballoon.dm"
#include "code\game\objects\items\paintkit.dm"
#include "code\game\objects\items\shooting_range.dm" #include "code\game\objects\items\shooting_range.dm"
#include "code\game\objects\items\toys.dm" #include "code\game\objects\items\toys.dm"
#include "code\game\objects\items\trash.dm" #include "code\game\objects\items\trash.dm"
@@ -708,7 +704,6 @@
#include "code\game\objects\structures\door_assembly.dm" #include "code\game\objects\structures\door_assembly.dm"
#include "code\game\objects\structures\electricchair.dm" #include "code\game\objects\structures\electricchair.dm"
#include "code\game\objects\structures\extinguisher.dm" #include "code\game\objects\structures\extinguisher.dm"
#include "code\game\objects\structures\false_walls.dm"
#include "code\game\objects\structures\flora.dm" #include "code\game\objects\structures\flora.dm"
#include "code\game\objects\structures\girders.dm" #include "code\game\objects\structures\girders.dm"
#include "code\game\objects\structures\grille.dm" #include "code\game\objects\structures\grille.dm"
@@ -772,10 +767,10 @@
#include "code\game\turfs\unsimulated.dm" #include "code\game\turfs\unsimulated.dm"
#include "code\game\turfs\simulated\floor.dm" #include "code\game\turfs\simulated\floor.dm"
#include "code\game\turfs\simulated\floor_types.dm" #include "code\game\turfs\simulated\floor_types.dm"
#include "code\game\turfs\simulated\wall_attacks.dm"
#include "code\game\turfs\simulated\wall_icon.dm"
#include "code\game\turfs\simulated\wall_types.dm"
#include "code\game\turfs\simulated\walls.dm" #include "code\game\turfs\simulated\walls.dm"
#include "code\game\turfs\simulated\walls_mineral.dm"
#include "code\game\turfs\simulated\walls_misc.dm"
#include "code\game\turfs\simulated\walls_reinforced.dm"
#include "code\game\turfs\space\space.dm" #include "code\game\turfs\space\space.dm"
#include "code\game\turfs\space\transit.dm" #include "code\game\turfs\space\transit.dm"
#include "code\game\turfs\unsimulated\beach.dm" #include "code\game\turfs\unsimulated\beach.dm"
@@ -818,6 +813,7 @@
#include "code\modules\admin\verbs\deadsay.dm" #include "code\modules\admin\verbs\deadsay.dm"
#include "code\modules\admin\verbs\debug.dm" #include "code\modules\admin\verbs\debug.dm"
#include "code\modules\admin\verbs\diagnostics.dm" #include "code\modules\admin\verbs\diagnostics.dm"
#include "code\modules\admin\verbs\dice.dm"
#include "code\modules\admin\verbs\getlogs.dm" #include "code\modules\admin\verbs\getlogs.dm"
#include "code\modules\admin\verbs\icarus.dm" #include "code\modules\admin\verbs\icarus.dm"
#include "code\modules\admin\verbs\mapping.dm" #include "code\modules\admin\verbs\mapping.dm"
@@ -933,13 +929,14 @@
#include "code\modules\clothing\under\syndicate.dm" #include "code\modules\clothing\under\syndicate.dm"
#include "code\modules\clothing\under\accessories\accessory.dm" #include "code\modules\clothing\under\accessories\accessory.dm"
#include "code\modules\clothing\under\accessories\armband.dm" #include "code\modules\clothing\under\accessories\armband.dm"
#include "code\modules\clothing\under\accessories\badges.dm"
#include "code\modules\clothing\under\accessories\holster.dm" #include "code\modules\clothing\under\accessories\holster.dm"
#include "code\modules\clothing\under\accessories\lockets.dm"
#include "code\modules\clothing\under\accessories\storage.dm" #include "code\modules\clothing\under\accessories\storage.dm"
#include "code\modules\clothing\under\jobs\civilian.dm" #include "code\modules\clothing\under\jobs\civilian.dm"
#include "code\modules\clothing\under\jobs\engineering.dm" #include "code\modules\clothing\under\jobs\engineering.dm"
#include "code\modules\clothing\under\jobs\medsci.dm" #include "code\modules\clothing\under\jobs\medsci.dm"
#include "code\modules\clothing\under\jobs\security.dm" #include "code\modules\clothing\under\jobs\security.dm"
#include "code\modules\customitems\item_defines.dm"
#include "code\modules\customitems\item_spawning.dm" #include "code\modules\customitems\item_spawning.dm"
#include "code\modules\detectivework\evidence.dm" #include "code\modules\detectivework\evidence.dm"
#include "code\modules\detectivework\footprints_and_rag.dm" #include "code\modules\detectivework\footprints_and_rag.dm"
@@ -992,6 +989,7 @@
#include "code\modules\examine\descriptions\engineering.dm" #include "code\modules\examine\descriptions\engineering.dm"
#include "code\modules\examine\descriptions\medical.dm" #include "code\modules\examine\descriptions\medical.dm"
#include "code\modules\examine\descriptions\mobs.dm" #include "code\modules\examine\descriptions\mobs.dm"
#include "code\modules\examine\descriptions\paperwork.dm"
#include "code\modules\examine\descriptions\stacks.dm" #include "code\modules\examine\descriptions\stacks.dm"
#include "code\modules\examine\descriptions\structures.dm" #include "code\modules\examine\descriptions\structures.dm"
#include "code\modules\examine\descriptions\turfs.dm" #include "code\modules\examine\descriptions\turfs.dm"
@@ -1031,11 +1029,20 @@
#include "code\modules\library\lib_items.dm" #include "code\modules\library\lib_items.dm"
#include "code\modules\library\lib_machines.dm" #include "code\modules\library\lib_machines.dm"
#include "code\modules\library\lib_readme.dm" #include "code\modules\library\lib_readme.dm"
#include "code\modules\lighting\_lighting_defs.dm"
#include "code\modules\lighting\light_source.dm"
#include "code\modules\lighting\lighting_atom.dm"
#include "code\modules\lighting\lighting_overlay.dm"
#include "code\modules\lighting\lighting_process.dm"
#include "code\modules\lighting\lighting_system.dm"
#include "code\modules\lighting\lighting_turf.dm"
#include "code\modules\lighting\~lighting_undefs.dm"
#include "code\modules\liquid\splash_simulation.dm" #include "code\modules\liquid\splash_simulation.dm"
#include "code\modules\maps\dmm_suite.dm" #include "code\modules\maps\dmm_suite.dm"
#include "code\modules\maps\reader.dm" #include "code\modules\maps\reader.dm"
#include "code\modules\maps\swapmaps.dm" #include "code\modules\maps\swapmaps.dm"
#include "code\modules\maps\writer.dm" #include "code\modules\maps\writer.dm"
#include "code\modules\materials\materials.dm"
#include "code\modules\mining\abandonedcrates.dm" #include "code\modules\mining\abandonedcrates.dm"
#include "code\modules\mining\alloys.dm" #include "code\modules\mining\alloys.dm"
#include "code\modules\mining\coins.dm" #include "code\modules\mining\coins.dm"
@@ -1045,7 +1052,7 @@
#include "code\modules\mining\machine_unloading.dm" #include "code\modules\mining\machine_unloading.dm"
#include "code\modules\mining\mine_items.dm" #include "code\modules\mining\mine_items.dm"
#include "code\modules\mining\mine_turfs.dm" #include "code\modules\mining\mine_turfs.dm"
#include "code\modules\mining\minerals.dm" #include "code\modules\mining\mineral_effect.dm"
#include "code\modules\mining\mint.dm" #include "code\modules\mining\mint.dm"
#include "code\modules\mining\money_bag.dm" #include "code\modules\mining\money_bag.dm"
#include "code\modules\mining\ore.dm" #include "code\modules\mining\ore.dm"

View File

@@ -427,10 +427,19 @@
//If set, sink_volume_mod adjusts the effective output volume used in the calculation. This is useful when the output gas_mixture is //If set, sink_volume_mod adjusts the effective output volume used in the calculation. This is useful when the output gas_mixture is
//part of a pipenetwork, and so it's volume isn't representative of the actual volume since the gas will be shared across the pipenetwork when it processes. //part of a pipenetwork, and so it's volume isn't representative of the actual volume since the gas will be shared across the pipenetwork when it processes.
/proc/calculate_transfer_moles(datum/gas_mixture/source, datum/gas_mixture/sink, var/pressure_delta, var/sink_volume_mod=0) /proc/calculate_transfer_moles(datum/gas_mixture/source, datum/gas_mixture/sink, var/pressure_delta, var/sink_volume_mod=0)
//Make the approximation that the sink temperature is unchanged after transferring gas if(source.temperature == 0 || source.total_moles == 0) return 0
var/air_temperature = (sink.temperature > 0)? sink.temperature : source.temperature
var/output_volume = (sink.volume * sink.group_multiplier) + sink_volume_mod
var/output_volume = (sink.volume * sink.group_multiplier) + sink_volume_mod
var/source_total_moles = source.total_moles * source.group_multiplier
var/air_temperature = source.temperature
if(sink.total_moles > 0 && sink.temperature > 0)
//estimate the final temperature of the sink after transfer
var/estimate_moles = pressure_delta*output_volume/(sink.temperature * R_IDEAL_GAS_EQUATION)
var/sink_heat_capacity = sink.heat_capacity()
var/transfer_heat_capacity = source.heat_capacity()*estimate_moles/source_total_moles
air_temperature = (sink.temperature*sink_heat_capacity + source.temperature*transfer_heat_capacity) / (sink_heat_capacity + transfer_heat_capacity)
//get the number of moles that would have to be transfered to bring sink to the target pressure //get the number of moles that would have to be transfered to bring sink to the target pressure
return pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION) return pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)

View File

@@ -61,19 +61,31 @@
use_power = 1 use_power = 1
icon_state = "map_vent_in" icon_state = "map_vent_in"
/obj/machinery/atmospherics/unary/vent_pump/siphon/on/atmos
use_power = 1
icon_state = "map_vent_in"
external_pressure_bound = 0
external_pressure_bound_default = 0
internal_pressure_bound = 2000
internal_pressure_bound_default = 2000
pressure_checks = 2
pressure_checks_default = 2
/obj/machinery/atmospherics/unary/vent_pump/New() /obj/machinery/atmospherics/unary/vent_pump/New()
..() ..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP
icon = null icon = null
initial_loc = get_area(loc) initial_loc = get_area(loc)
if (initial_loc.master)
initial_loc = initial_loc.master
area_uid = initial_loc.uid area_uid = initial_loc.uid
if (!id_tag) if (!id_tag)
assign_uid() assign_uid()
id_tag = num2text(uid) id_tag = num2text(uid)
/obj/machinery/atmospherics/unary/vent_pump/Destroy()
unregister_radio(src, frequency)
..()
/obj/machinery/atmospherics/unary/vent_pump/high_volume /obj/machinery/atmospherics/unary/vent_pump/high_volume
name = "Large Air Vent" name = "Large Air Vent"
power_channel = EQUIP power_channel = EQUIP
@@ -211,14 +223,6 @@
return pressure_delta return pressure_delta
//Radio remote control
/obj/machinery/atmospherics/unary/vent_pump/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency,radio_filter_in)
/obj/machinery/atmospherics/unary/vent_pump/proc/broadcast_status() /obj/machinery/atmospherics/unary/vent_pump/proc/broadcast_status()
if(!radio_connection) if(!radio_connection)
return 0 return 0
@@ -260,7 +264,7 @@
radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null radio_filter_in = frequency==1439?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null radio_filter_out = frequency==1439?(RADIO_TO_AIRALARM):null
if(frequency) if(frequency)
set_frequency(frequency) radio_connection = register_radio(src, frequency, frequency, radio_filter_in)
src.broadcast_status() src.broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/receive_signal(datum/signal/signal) /obj/machinery/atmospherics/unary/vent_pump/receive_signal(datum/signal/signal)

View File

@@ -36,13 +36,16 @@
icon = null icon = null
initial_loc = get_area(loc) initial_loc = get_area(loc)
if (initial_loc.master)
initial_loc = initial_loc.master
area_uid = initial_loc.uid area_uid = initial_loc.uid
if (!id_tag) if (!id_tag)
assign_uid() assign_uid()
id_tag = num2text(uid) id_tag = num2text(uid)
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
unregister_radio(src, frequency)
..()
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0) /obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0)
if(!check_icon_cache()) if(!check_icon_cache())
return return

View File

@@ -91,11 +91,11 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
anchored = 1 anchored = 1
mouse_opacity = 0 mouse_opacity = 0
//luminosity = 3 blend_mode = BLEND_ADD
icon = 'icons/effects/fire.dmi' icon = 'icons/effects/fire.dmi'
icon_state = "1" icon_state = "1"
l_color = "#ED9200" light_color = "#ED9200"
layer = TURF_LAYER layer = TURF_LAYER
var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel() var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
@@ -114,13 +114,13 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
if(firelevel > 6) if(firelevel > 6)
icon_state = "3" icon_state = "3"
SetLuminosity(7) set_light(7, 3)
else if(firelevel > 2.5) else if(firelevel > 2.5)
icon_state = "2" icon_state = "2"
SetLuminosity(5) set_light(5, 2)
else else
icon_state = "1" icon_state = "1"
SetLuminosity(3) set_light(3, 1)
//im not sure how to implement a version that works for every creature so for now monkeys are firesafe //im not sure how to implement a version that works for every creature so for now monkeys are firesafe
for(var/mob/living/L in loc) for(var/mob/living/L in loc)
@@ -158,6 +158,9 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
else else
enemy_tile.adjacent_fire_act(loc, air_contents, air_contents.temperature, air_contents.volume) enemy_tile.adjacent_fire_act(loc, air_contents, air_contents.temperature, air_contents.volume)
animate(src, color = heat2color(air_contents.temperature), 5)
set_light(l_color = color)
/obj/fire/New(newLoc,fl) /obj/fire/New(newLoc,fl)
..() ..()
@@ -165,7 +168,11 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
qdel(src) qdel(src)
set_dir(pick(cardinal)) set_dir(pick(cardinal))
SetLuminosity(3)
var/datum/gas_mixture/air_contents = loc.return_air()
color = heat2color(air_contents.temperature)
set_light(3, 1, color)
firelevel = fl firelevel = fl
air_master.active_hotspots.Add(src) air_master.active_hotspots.Add(src)
@@ -178,7 +185,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
/obj/fire/proc/RemoveFire() /obj/fire/proc/RemoveFire()
if (istype(loc, /turf)) if (istype(loc, /turf))
SetLuminosity(0) set_light(0)
loc = null loc = null
air_master.active_hotspots.Remove(src) air_master.active_hotspots.Remove(src)

View File

@@ -16,22 +16,32 @@
return 1 return 1
return 0 return 0
/proc/max_default_z_level()
var/max_z = 0
for(var/z in config.station_levels)
max_z = max(z, max_z)
for(var/z in config.admin_levels)
max_z = max(z, max_z)
for(var/z in config.player_levels)
max_z = max(z, max_z)
return max_z
/proc/get_area(O) /proc/get_area(O)
var/turf/loc = get_turf(O) var/turf/loc = get_turf(O)
if(loc) if(loc)
var/area/res = loc.loc var/area/res = loc.loc
.= res.master .= res
/proc/get_area_name(N) //get area by its name /proc/get_area_name(N) //get area by its name
for(var/area/A in world) for(var/area/A in world)
if(A.name == N) if(A.name == N)
return A return A
return 0 return 0
/proc/get_area_master(const/O) /proc/get_area_master(const/O)
var/area/A = get_area(O) var/area/A = get_area(O)
if (isarea(A)) if (isarea(A))
return A.master return A
/proc/in_range(source, user) /proc/in_range(source, user)
if(get_dist(source, user) <= 1) if(get_dist(source, user) <= 1)
@@ -66,18 +76,6 @@
/proc/isNotAdminLevel(var/level) /proc/isNotAdminLevel(var/level)
return !isAdminLevel(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.
#define k1 0.934
#define k2 0.427
/proc/cheap_hypotenuse(Ax,Ay,Bx,By) // T is just the second atom to check distance to center with
var/dx = abs(Ax - Bx) //sides of right-angled triangle
var/dy = abs(Ay - By)
if(dx>=dy) return (k1*dx) + (k2*dy) //No sqrt or powers :)
else return (k2*dx) + (k1*dy)
#undef k1
#undef k2
/proc/circlerange(center=usr,radius=3) /proc/circlerange(center=usr,radius=3)
var/turf/centerturf = get_turf(center) var/turf/centerturf = get_turf(center)

View File

@@ -182,11 +182,9 @@ proc/listclearnulls(list/list)
//Return a list with no duplicate entries //Return a list with no duplicate entries
/proc/uniquelist(var/list/L) /proc/uniquelist(var/list/L)
var/list/K = list() . = list()
for(var/item in L) for(var/i in L)
if(!(item in K)) . |= i
K += item
return K
//Mergesort: divides up the list into halves to begin the sort //Mergesort: divides up the list into halves to begin the sort
/proc/sortKey(var/list/client/L, var/order = 1) /proc/sortKey(var/list/client/L, var/order = 1)

View File

@@ -125,3 +125,10 @@ Proc for attack log creation, because really why not
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>") 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) 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>") 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>")
//checks whether this item is a module of the robot it is located in.
/proc/is_robot_module(var/obj/item/thing)
if (!thing || !istype(thing.loc, /mob/living/silicon/robot))
return 0
var/mob/living/silicon/robot/R = thing.loc
return (thing in R.module.modules)

View File

@@ -341,6 +341,7 @@ datum/hud/New(mob/owner)
if(src.hud_used.item_action_list) if(src.hud_used.item_action_list)
src.client.screen -= src.hud_used.item_action_list src.client.screen -= src.hud_used.item_action_list
src.client.screen -= src.internals src.client.screen -= src.internals
src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
else else
hud_used.hud_shown = 1 hud_used.hud_shown = 1
if(src.hud_used.adding) if(src.hud_used.adding)

View File

@@ -25,13 +25,31 @@
if(!istype(M) || (can_operate(M) && do_surgery(M,user,src))) return 0 if(!istype(M) || (can_operate(M) && do_surgery(M,user,src))) return 0
// Knifing
if(edge)
for(var/obj/item/weapon/grab/G in M.grabbed_by)
if(G.assailant == user && G.state >= GRAB_NECK && world.time >= (G.last_action + 20))
//TODO: better alternative for applying damage multiple times? Nice knifing sound?
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge)
M.adjustOxyLoss(60) // Brain lacks oxygen immediately, pass out
flick(G.hud.icon_state, G.hud)
G.last_action = world.time
user.visible_message("<span class='danger'>[user] slit [M]'s throat open with \the [name]!</span>")
user.attack_log += "\[[time_stamp()]\]<font color='red'> Knifed [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Got knifed by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[key_name(user)] knifed [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
return
///////////////////////// /////////////////////////
user.lastattacked = M user.lastattacked = M
M.lastattacker = user M.lastattacker = user
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>" if(!no_attack_log)
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>" user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" ) M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
///////////////////////// /////////////////////////
var/power = force var/power = force

View File

@@ -78,7 +78,7 @@ var/list/delayed_garbage = list()
destroyed["\ref[A]"] = world.time destroyed["\ref[A]"] = world.time
/datum/controller/process/garbage_collector/getStatName() /datum/controller/process/garbage_collector/getStatName()
return ..()+"([garbage_collector.dels]/[garbage_collector.hard_dels])" return ..()+"([garbage_collector.destroyed.len]/[garbage_collector.dels]/[garbage_collector.hard_dels])"
// Should be treated as a replacement for the 'del' keyword. // Should be treated as a replacement for the 'del' keyword.
// Datums passed to this will be given a chance to clean up references to allow the GC to collect them. // Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
@@ -94,8 +94,9 @@ var/list/delayed_garbage = list()
if(!istype(A)) if(!istype(A))
//warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.") //warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
del(A) del(A)
garbage_collector.dels++ if(garbage_collector)
garbage_collector.hard_dels++ garbage_collector.dels++
garbage_collector.hard_dels++
else if(isnull(A.gcDestroyed)) else if(isnull(A.gcDestroyed))
// Let our friend know they're about to get collected // Let our friend know they're about to get collected
. = !A.Destroy() . = !A.Destroy()
@@ -120,7 +121,7 @@ var/list/delayed_garbage = list()
/icon/finalize_qdel() /icon/finalize_qdel()
del(src) del(src)
/imagine/finalize_qdel() /image/finalize_qdel()
del(src) del(src)
/mob/finalize_qdel() /mob/finalize_qdel()

View File

@@ -6,18 +6,16 @@
/datum/controller/process/machinery/doWork() /datum/controller/process/machinery/doWork()
internal_sort() internal_sort()
internal_process() internal_process_machinery()
internal_process_power()
internal_process_power_drain()
/datum/controller/process/machinery/proc/internal_sort() /datum/controller/process/machinery/proc/internal_sort()
if(machinery_sort_required) if(machinery_sort_required)
machinery_sort_required = 0 machinery_sort_required = 0
machines = dd_sortedObjectList(machines) machines = dd_sortedObjectList(machines)
/datum/controller/process/machinery/proc/internal_process() /datum/controller/process/machinery/proc/internal_process_machinery()
//#ifdef PROFILE_MACHINES
//machine_profiling.len = 0
//#endif
for(var/obj/machinery/M in machines) for(var/obj/machinery/M in machines)
if(M && !M.gcDestroyed) if(M && !M.gcDestroyed)
#ifdef PROFILE_MACHINES #ifdef PROFILE_MACHINES
@@ -43,6 +41,22 @@
scheck() scheck()
/datum/controller/process/machinery/proc/internal_process_power()
for(var/datum/powernet/powerNetwork in powernets)
if(istype(powerNetwork) && !powerNetwork.disposed)
powerNetwork.reset()
scheck()
continue
powernets.Remove(powerNetwork)
/datum/controller/process/machinery/proc/internal_process_power_drain()
// Currently only used by powersinks. These items get priority processed before machinery
for(var/obj/item/I in processing_power_items)
if(!I.pwr_drain()) // 0 = Process Kill, remove from processing list.
processing_power_items.Remove(I)
scheck()
/datum/controller/process/machinery/getStatName() /datum/controller/process/machinery/getStatName()
return ..()+"([machines.len])" return ..()+"([machines.len])"

View File

@@ -1,15 +0,0 @@
/datum/controller/process/powernet/setup()
name = "powernet"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/powernet/doWork()
for(var/datum/powernet/powerNetwork in powernets)
if(istype(powerNetwork) && !powerNetwork.disposed)
powerNetwork.reset()
scheck()
continue
powernets.Remove(powerNetwork)
/datum/controller/process/powernet/getStatName()
return ..()+"([powernets.len])"

View File

@@ -1,450 +0,0 @@
/*
Modified DynamicAreaLighting for TGstation - Coded by Carnwennan
This is TG's 'new' lighting system. It's basically a heavily modified combination of Forum_Account's and
ShadowDarke's respective lighting libraries. Credits, where due, to them.
Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
by using the var/tag variable and moving turfs into the contents list of the correct sub-area. This method is
much less costly than using overlays or objects.
Unlike sd_DAL however it uses a queueing system. Everytime we call a change to opacity or luminosity
(through SetOpacity() or SetLuminosity()) we are simply updating variables and scheduling certain lights/turfs for an
update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
turning it back on with lighting_controller.processing = 1.
Unlike our old system there are hardcoded maximum luminositys (different for certain atoms).
This is to cap the cost of creating lighting effects.
(without this, an atom with luminosity of 20 would have to update 41^2 turfs!) :s
Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
have larger memory requirements than our previous system but it's easily worth the hassle for the greater control we
gain. It also reduces cost of removing lighting effects by a lot!
Known Issues/TODO:
Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
No directional lighting support. (prototype looked ugly)
*/
#define LIGHTING_CIRCULAR 1 //comment this out to use old square lighting effects.
#define LIGHTING_LAYER 10 //Drawing layer for lighting overlays
#define LIGHTING_ICON 'icons/effects/ss13_dark_alpha6.dmi' //Icon used for lighting shading effects
datum/light_source
var/atom/owner
var/changed = 1
var/list/effect = list()
var/__x = 0 //x coordinate at last update
var/__y = 0 //y coordinate at last update
var/__z = 0 //z coordinate at last update
var/_l_color //do not use directly, only used as reference for updating
var/col_r
var/col_g
var/col_b
New(atom/A)
if(!istype(A))
CRASH("The first argument to the light object's constructor must be the atom that is the light source. Expected atom, received '[A]' instead.")
..()
owner = A
readrgb(owner.l_color)
__x = owner.x
__y = owner.y
__z = owner.z
// the lighting object maintains a list of all light sources
lighting_controller.lights += src
//Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one
proc/check()
if(!owner)
remove_effect()
return 1 //causes it to be removed from our list of lights. The garbage collector will then destroy it.
// check to see if we've moved since last update
if(owner.x != __x || owner.y != __y || owner.z != __z)
__x = owner.x
__y = owner.y
__z = owner.z
changed = 1
if (owner.l_color != _l_color)
readrgb(owner.l_color)
changed = 1
if(changed)
changed = 0
remove_effect()
return add_effect()
return 0
proc/remove_effect()
// before we apply the effect we remove the light's current effect.
for(var/turf/T in effect) // negate the effect of this light source
T.update_lumcount(-effect[T], col_r, col_g, col_b, 1)
effect.Cut() // clear the effect list
proc/add_effect()
// only do this if the light is turned on and is on the map
if(owner.loc && owner.luminosity > 0)
readrgb(owner.l_color)
effect = list()
for(var/turf/T in view(owner.get_light_range(),get_turf(owner)))
var/delta_lumen = lum(T)
if(delta_lumen > 0)
effect[T] = delta_lumen
T.update_lumcount(delta_lumen, col_r, col_g, col_b, 0)
return 0
else
owner.light = null
return 1 //cause the light to be removed from the lights list and garbage collected once it's no
//longer referenced by the queue
proc/lum(turf/A)
if (owner.trueLuminosity < 1)
return 0
var/dist
if(!A)
dist = 0
else
#ifdef LIGHTING_CIRCULAR
dist = cheap_hypotenuse(A.x, A.y, __x, __y)
#else
dist = max(abs(A.x - __x), abs(A.y - __y))
#endif
if (owner.trueLuminosity > 100) // This will never happen... right?
return sqrt(owner.trueLuminosity) - dist
else
return sqrtTable[owner.trueLuminosity] - dist
proc/readrgb(col)
_l_color = col
if(col)
col_r = GetRedPart(col)
col_g = GetGreenPart(col)
col_b = GetBluePart(col)
else
col_r = null
atom
var/datum/light_source/light
var/trueLuminosity = 0 // Typically 'luminosity' squared. The builtin luminosity must remain linear.
// We may read it, but NEVER set it directly.
var/l_color
//Turfs with opacity when they are constructed will trigger nearby lights to update
//Turfs and atoms with luminosity when they are constructed will create a light_source automatically
turf/New()
..()
if(luminosity)
if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
trueLuminosity = luminosity * luminosity
light = new(src)
//Movable atoms with opacity when they are constructed will trigger nearby lights to update
//Movable atoms with luminosity when they are constructed will create a light_source automatically
atom/movable/New()
..()
if(opacity)
if(isturf(loc))
if(loc:lighting_lumcount > 1)
UpdateAffectingLights()
if(luminosity)
if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
trueLuminosity = luminosity * luminosity
light = new(src)
//Sets our luminosity.
//If we have no light it will create one.
//If we are setting luminosity to 0 the light will be cleaned up by the controller and garbage collected once all its
//queues are complete.
//if we have a light already it is merely updated, rather than making a new one.
atom/proc/SetLuminosity(new_luminosity, trueLum = FALSE)
if(new_luminosity < 0)
new_luminosity = 0
if(!trueLum)
new_luminosity *= new_luminosity
if(light)
if(trueLuminosity != new_luminosity) //non-luminous lights are removed from the lights list in add_effect()
light.changed = 1
else
if(new_luminosity)
light = new(src)
trueLuminosity = new_luminosity
if (trueLuminosity < 1)
luminosity = 0
else if (trueLuminosity <= 100)
luminosity = sqrtTable[trueLuminosity]
else
luminosity = sqrt(trueLuminosity)
atom/proc/AddLuminosity(delta_luminosity)
if(delta_luminosity > 0)
SetLuminosity(trueLuminosity + delta_luminosity*delta_luminosity, TRUE)
else if(delta_luminosity < 0)
SetLuminosity(trueLuminosity - delta_luminosity*delta_luminosity, TRUE)
area/SetLuminosity(new_luminosity) //we don't want dynamic lighting for areas
luminosity = !!new_luminosity
trueLuminosity = luminosity
//change our opacity (defaults to toggle), and then update all lights that affect us.
atom/proc/SetOpacity(new_opacity)
if(new_opacity == null)
new_opacity = !opacity //default = toggle opacity
else if(opacity == new_opacity)
return 0 //opacity hasn't changed! don't bother doing anything
opacity = new_opacity //update opacity, the below procs now call light updates.
return 1
turf/SetOpacity(new_opacity)
if(..()==1) //only bother if opacity changed
if(lighting_lumcount) //only bother with an update if our turf is currently affected by a light
UpdateAffectingLights()
/atom/movable/SetOpacity(new_opacity)
if(..()==1) //only bother if opacity changed
if(isturf(loc)) //only bother with an update if we're on a turf
var/turf/T = loc
if(T.lighting_lumcount) //only bother with an update if our turf is currently affected by a light
UpdateAffectingLights()
turf
var/lighting_lumcount = 0
var/lighting_changed = 0
var/color_lighting_lumcount = 0
var/lumcount_r = 0
var/lumcount_g = 0
var/lumcount_b = 0
var/light_col_sources = 0
turf/space
lighting_lumcount = 4 //starlight
turf/proc/update_lumcount(amount, col_r, col_g, col_b, removing = 0)
lighting_lumcount += amount
if(!isnull(col_r)) //col_r is the "key" var, if it's null so will the rest
if(removing)
light_col_sources--
lumcount_r -= col_r
lumcount_g -= col_g
lumcount_b -= col_b
else
light_col_sources++
lumcount_r += col_r
lumcount_g += col_g
lumcount_b += col_b
if(light_col_sources)
var/r_avg = max(0, min(255, round(lumcount_r / light_col_sources, 16) + 15))
var/g_avg = max(0, min(255, round(lumcount_g / light_col_sources, 16) + 15))
var/b_avg = max(0, min(255, round(lumcount_b / light_col_sources, 16) + 15))
l_color = rgb(r_avg, g_avg, b_avg)
else
l_color = null
color_lighting_lumcount = max(color_lighting_lumcount + amount, 0) // Minimum of 0.
if(!lighting_changed)
lighting_controller.changed_turfs += src
lighting_changed = 1
turf/proc/lighting_tag(const/level)
var/area/A = loc
return A.tagbase + "sd_L[level]"
turf/proc/build_lighting_area(const/tag, const/level, const/color_light)
var/area/Area = loc
var/area/A = new Area.type() // create area if it wasn't found
// replicate vars
for(var/V in Area.vars)
switch(V)
if ("contents","lighting_overlay", "color_overlay", "overlays")
continue
else
if(issaved(Area.vars[V])) A.vars[V] = Area.vars[V]
A.tag = tag
A.lighting_subarea = 1
A.lighting_space = 0 // in case it was copied from a space subarea
if (l_color != A.l_color)
A.l_color = l_color
//color_light = min(max(round(color_lighting_lumcount, 1), 0), lighting_controller.lighting_states)
//world << "[color_light] [color_lighting_lumcount]"
A.SetLightLevel(level, color_light)
Area.related += A
return A
turf/proc/shift_to_subarea()
lighting_changed = 0
var/area/Area = loc
if(!istype(Area) || !Area.lighting_use_dynamic) return
var/level = min(max(round(lighting_lumcount,1),0),lighting_controller.lighting_states)
var/new_tag = lighting_tag(level)
// pomf - If we have a lighting color that is not null, apply the new tag to seperate the areas.
if (l_color)
// pomf - We append the (rounded!) color lighting lumcount so we can have colored lights.
new_tag += "[l_color][min(max(round(color_lighting_lumcount,1),0),lighting_controller.lighting_states)]"
if(Area.tag!=new_tag) //skip if already in this area
var/area/A = locate(new_tag) // find an appropriate area
var/color_light = min(max(round(color_lighting_lumcount,1),0),lighting_controller.lighting_states)
if (!A)
A = build_lighting_area(new_tag, level, color_light)
else if (l_color != A.l_color)
A.l_color = l_color
//color_light = min(max(round(color_lighting_lumcount, 1), 0), lighting_controller.lighting_states)
A.SetLightLevel(level, color_light)
A.contents += src // move the turf into the area
universe.OnTurfTick(src)
// Dedicated lighting sublevel for space turfs
// helps us depower things in space, remove space fire alarms,
// and evens out space lighting
turf/space/lighting_tag(var/level)
var/area/A = loc
return A.tagbase + "sd_L_space"
turf/space/build_lighting_area(var/tag,var/level)
var/area/A = ..(tag,4)
A.lighting_space = 1
A.SetLightLevel(4)
A.icon_state = null
return A
area
var/lighting_use_dynamic = 1 //Turn this flag off to prevent sd_DynamicAreaLighting from affecting this area
var/image/lighting_overlay //tracks the darkness image of the area for easy removal
var/lighting_subarea = 0 //tracks whether we're a lighting sub-area
var/lighting_space = 0 // true for space-only lighting subareas
var/tagbase
var/image/color_overlay //Tracks the color image.
proc/SetLightLevel(light, color_light = 0)
if(!src) return
if(light <= 0)
light = 0
luminosity = 0
else
if(light > lighting_controller.lighting_states)
light = lighting_controller.lighting_states
luminosity = 1
if(lighting_overlay)
overlays -= lighting_overlay
lighting_overlay.icon_state = "[light]"
else
lighting_overlay = image(LIGHTING_ICON,,num2text(light),LIGHTING_LAYER)
if (color_overlay)
overlays.Remove(color_overlay)
color_overlay.icon_state = "5"
else
if (l_color)
color_overlay = image('icons/effects/effects.dmi', ,"5", 10.1)
//color_overlay = image('icons/effects/effects.dmi', ,"white", 10.1)
if (istype(color_overlay))
color_overlay.color = l_color
switch (color_light)
if (6)
color_overlay.icon_state = "5"
//color_overlay.alpha = 180
if (5)
color_overlay.icon_state = "4"
//color_overlay.alpha = 150
if (4)
color_overlay.icon_state = "3"
//color_overlay.alpha = 120
if (3)
color_overlay.icon_state = "2"
//color_overlay.alpha = 90
if (2)
color_overlay.icon_state = "1"
//color_overlay.alpha = 60
if (1)
color_overlay.icon_state = "1"
color_overlay.alpha = 200
//color_overlay.alpha = 30
if (-INFINITY to 0)
//world << "Zero or below, [color_light]."
color_overlay.alpha = 0
else
//world << "Setting the alpha to max... color_light [color_light]."
color_overlay.alpha = 180
color_overlay.blend_mode = BLEND_ADD
if (color_overlay.color)
overlays.Add(color_overlay)
if (isnull(color_overlay))
overlays.Add(lighting_overlay)
else if (light < 6)
overlays.Add(lighting_overlay)
proc/SetDynamicLighting()
src.lighting_use_dynamic = 1
for(var/turf/T in src.contents)
T.update_lumcount(0)
proc/InitializeLighting() //TODO: could probably improve this bit ~Carn
tagbase = "[type]"
if(!tag) tag = tagbase
if(!lighting_use_dynamic)
if(!lighting_subarea) // see if this is a lighting subarea already
//show the dark overlay so areas, not yet in a lighting subarea, won't be bright as day and look silly.
SetLightLevel(4)
//#undef LIGHTING_LAYER
#undef LIGHTING_CIRCULAR
//#undef LIGHTING_ICON
#define LIGHTING_MAX_LUMINOSITY_STATIC 8 //Maximum luminosity to reduce lag.
#define LIGHTING_MAX_LUMINOSITY_MOBILE 5 //Moving objects have a lower max luminosity since these update more often. (lag reduction)
#define LIGHTING_MAX_LUMINOSITY_TURF 1 //turfs have a severely shortened range to protect from inevitable floor-lighttile spam.
//set the changed status of all lights which could have possibly lit this atom.
//We don't need to worry about lights which lit us but moved away, since they will have change status set already
//This proc can cause lots of lights to be updated. :(
atom/proc/UpdateAffectingLights()
for(var/atom/A in oview(LIGHTING_MAX_LUMINOSITY_STATIC-1,src))
if(A.light)
A.light.changed = 1 //force it to update at next process()
//caps luminosity effects max-range based on what type the light's owner is.
atom/proc/get_light_range()
return min(luminosity, LIGHTING_MAX_LUMINOSITY_STATIC)
atom/movable/get_light_range()
return min(luminosity, LIGHTING_MAX_LUMINOSITY_MOBILE)
obj/machinery/light/get_light_range()
return min(luminosity, LIGHTING_MAX_LUMINOSITY_STATIC)
turf/get_light_range()
return min(luminosity, LIGHTING_MAX_LUMINOSITY_TURF)
#undef LIGHTING_MAX_LUMINOSITY_STATIC
#undef LIGHTING_MAX_LUMINOSITY_MOBILE
#undef LIGHTING_MAX_LUMINOSITY_TURF

View File

@@ -72,7 +72,7 @@ Radio:
1355 - Medical 1355 - Medical
1357 - Engineering 1357 - Engineering
1359 - Security 1359 - Security
1341 - death squad 1341 - deathsquad
1443 - Confession Intercom 1443 - Confession Intercom
1347 - Cargo techs 1347 - Cargo techs
1349 - Service people 1349 - Service people

View File

@@ -25,7 +25,6 @@ var/datum/controller/failsafe/Failsafe
set background = 1 set background = 1
while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop
if(!master_controller) new /datum/controller/game_controller() //replace the missing master_controller! This should never happen. if(!master_controller) new /datum/controller/game_controller() //replace the missing master_controller! This should never happen.
if(!lighting_controller) new /datum/controller/lighting() //replace the missing lighting_controller
if(processing) if(processing)
if(lighting_controller.processing) if(lighting_controller.processing)

View File

@@ -1,130 +0,0 @@
var/datum/controller/lighting/lighting_controller = new ()
datum/controller/lighting
var/processing = 0
var/processing_interval = 5 //setting this too low will probably kill the server. Don't be silly with it!
var/process_cost = 0
var/iteration = 0
var/lighting_states = 7
var/list/lights = list()
var/lights_workload_max = 0
// var/list/changed_lights() //TODO: possibly implement this to reduce on overheads?
var/list/changed_turfs = list()
var/changed_turfs_workload_max = 0
datum/controller/lighting/New()
lighting_states = max( 0, length(icon_states(LIGHTING_ICON))-1 )
if(lighting_controller != src)
if(istype(lighting_controller,/datum/controller/lighting))
Recover() //if we are replacing an existing lighting_controller (due to a crash) we attempt to preserve as much as we can
qdel(lighting_controller)
lighting_controller = src
//Workhorse of lighting. It cycles through each light to see which ones need their effects updating. It updates their
//effects and then processes every turf in the queue, moving the turfs to the corresponing lighting sub-area.
//All queue lists prune themselves, which will cause lights with no luminosity to be garbage collected (cheaper and safer
//than deleting them). Processing interval should be roughly half a second for best results.
//By using queues we are ensuring we don't perform more updates than are necessary
datum/controller/lighting/proc/process()
processing = 1
spawn(0)
set background = 1
while(1)
if(processing)
iteration++
var/started = world.timeofday
lights_workload_max = max(lights_workload_max,lights.len)
for(var/i=1, i<=lights.len, i++)
var/datum/light_source/L = lights[i]
if(L && !L.check())
continue
lights.Cut(i,i+1)
i--
sleep(-1)
changed_turfs_workload_max = max(changed_turfs_workload_max,changed_turfs.len)
for(var/i=1, i<=changed_turfs.len, i++)
var/turf/T = changed_turfs[i]
if(T && T.lighting_changed)
T.shift_to_subarea()
changed_turfs.Cut() // reset the changed list
process_cost = (world.timeofday - started)
sleep(processing_interval)
//same as above except it attempts to shift ALL turfs in the world regardless of lighting_changed status
//Does not loop. Should be run prior to process() being called for the first time.
//Note: if we get additional z-levels at runtime (e.g. if the gateway thin ever gets finished) we can initialize specific
//z-levels with the z_level argument
datum/controller/lighting/proc/initializeLighting(var/z_level)
processing = 0
spawn(-1)
set background = 1
for(var/i=1, i<=lights.len, i++)
var/datum/light_source/L = lights[i]
if(L.check())
lights.Cut(i,i+1)
i--
var/z_start = 1
var/z_finish = world.maxz
if(z_level)
z_level = round(z_level,1)
if(z_level > 0 && z_level <= world.maxz)
z_start = z_level
z_finish = z_level
for(var/k=z_start,k<=z_finish,k++)
for(var/i=1,i<=world.maxx,i++)
for(var/j=1,j<=world.maxy,j++)
var/turf/T = locate(i,j,k)
if(T) T.shift_to_subarea()
changed_turfs.Cut() // reset the changed list
//Used to strip valid information from an existing controller and transfer it to a replacement
//It works by using spawn(-1) to transfer the data, if there is a runtime the data does not get transfered but the loop
//does not crash
datum/controller/lighting/proc/Recover()
if(!istype(lighting_controller.changed_turfs,/list))
lighting_controller.changed_turfs = list()
if(!istype(lighting_controller.lights,/list))
lighting_controller.lights = list()
for(var/i=1, i<=lighting_controller.lights.len, i++)
var/datum/light_source/L = lighting_controller.lights[i]
if(istype(L))
spawn(-1) //so we don't crash the loop (inefficient)
L.check()
lights += L //If we didn't runtime then this will get transferred over
for(var/i=1, i<=lighting_controller.changed_turfs.len, i++)
var/turf/T = lighting_controller.changed_turfs[i]
if(istype(T) && T.lighting_changed)
spawn(-1)
T.shift_to_subarea()
var/msg = "## DEBUG: [time2text(world.timeofday)] lighting_controller restarted. Reports:\n"
for(var/varname in lighting_controller.vars)
switch(varname)
if("tag","bestF","type","parent_type","vars") continue
else
var/varval1 = lighting_controller.vars[varname]
var/varval2 = vars[varname]
if(istype(varval1,/list))
varval1 = "/list([length(varval1)])"
varval2 = "/list([length(varval2)])"
msg += "\t [varname] = [varval1] -> [varval2]\n"
world.log << msg
#undef LIGHTING_ICON

View File

@@ -30,7 +30,7 @@
var/tz = input("Z? (default 1)") as text|null var/tz = input("Z? (default 1)") as text|null
new map_datum(seed,tx,ty,tz) new map_datum(seed,tx,ty,tz)
/client/proc/restart_controller(controller in list("Master","Failsafe","Lighting","Supply")) /client/proc/restart_controller(controller in list("Supply"))
set category = "Debug" set category = "Debug"
set name = "Restart Controller" set name = "Restart Controller"
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)" set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
@@ -39,13 +39,6 @@
usr = null usr = null
src = null src = null
switch(controller) switch(controller)
if("Failsafe")
new /datum/controller/failsafe()
feedback_add_details("admin_verb","RFailsafe")
if("Lighting")
new /datum/controller/lighting()
lighting_controller.process()
feedback_add_details("admin_verb","RLighting")
if("Supply") if("Supply")
supply_controller.process() supply_controller.process()
feedback_add_details("admin_verb","RSupply") feedback_add_details("admin_verb","RSupply")
@@ -62,7 +55,7 @@
usr.client.debug_variables(antag) usr.client.debug_variables(antag)
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.") message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Ticker Process","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano")) /client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano"))
set category = "Debug" set category = "Debug"
set name = "Debug Controller" set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)" set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -72,18 +65,12 @@
if("Master") if("Master")
debug_variables(master_controller) debug_variables(master_controller)
feedback_add_details("admin_verb","DMC") feedback_add_details("admin_verb","DMC")
if("Failsafe")
debug_variables(Failsafe)
feedback_add_details("admin_verb","DFailsafe")
if("Ticker") if("Ticker")
debug_variables(ticker) debug_variables(ticker)
feedback_add_details("admin_verb","DTicker") feedback_add_details("admin_verb","DTicker")
if("Ticker Process") if("Ticker Process")
debug_variables(tickerProcess) debug_variables(tickerProcess)
feedback_add_details("admin_verb","DTickerProcess") feedback_add_details("admin_verb","DTickerProcess")
if("Lighting")
debug_variables(lighting_controller)
feedback_add_details("admin_verb","DLighting")
if("Air") if("Air")
debug_variables(air_master) debug_variables(air_master)
feedback_add_details("admin_verb","DAir") feedback_add_details("admin_verb","DAir")

View File

@@ -140,160 +140,9 @@
proc/get_id_photo(var/mob/living/carbon/human/H) proc/get_id_photo(var/mob/living/carbon/human/H)
var/icon/preview_icon = null H.regenerate_icons()
var/icon/preview_icon = icon(H.icon)
var/g = "m" for(var/image/I in H.overlays_standing)
if (H.gender == FEMALE) if(I && I.icon)
g = "f" preview_icon.Blend(icon(I.icon, I.icon_state), ICON_OVERLAY)
var/icon/icobase = H.species.icobase
preview_icon = new /icon(icobase, "torso_[g]")
var/icon/temp
temp = new /icon(icobase, "groin_[g]")
preview_icon.Blend(temp, ICON_OVERLAY)
temp = new /icon(icobase, "head_[g]")
preview_icon.Blend(temp, ICON_OVERLAY)
for(var/obj/item/organ/external/E in H.organs)
preview_icon.Blend(E.get_icon(), ICON_OVERLAY)
//Tail
if(H.species.tail)
temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[H.species.tail]_s")
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin tone
if(H.species.flags & HAS_SKIN_TONE)
if (H.s_tone >= 0)
preview_icon.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
else
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
// Skin color
if(H.species.flags & HAS_SKIN_TONE)
if(!H.species || H.species.flags & HAS_SKIN_COLOR)
preview_icon.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s")
if (H.species.flags & HAS_EYE_COLOR)
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style]
if(hair_style)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
hair_s.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD)
eyes_s.Blend(hair_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style]
if(facial_hair_style)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
facial_s.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
var/icon/clothes_s = null
switch(H.mind.assigned_role)
if("Head of Personnel")
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Bartender")
clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Gardener")
clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Chef")
clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Janitor")
clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Librarian")
clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Quartermaster")
clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Cargo Technician")
clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Shaft Miner")
clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Lawyer")
clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Chaplain")
clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Research Director")
clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if("Scientist")
clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if("Chemist")
clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
if("Chief Medical Officer")
clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
if("Medical Doctor")
clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if("Geneticist")
clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
if("Virologist")
clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
if("Captain")
clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Head of Security")
clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Warden")
clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Detective")
clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
if("Security Officer")
clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Chief Engineer")
clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Station Engineer")
clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Atmospheric Technician")
clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Roboticist")
clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
else
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
qdel(eyes_s)
qdel(clothes_s)
return preview_icon return preview_icon

View File

@@ -14,179 +14,177 @@
var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation) var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation)
New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) /datum/teleport/New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
..() ..()
if(!initTeleport(arglist(args))) if(!initTeleport(arglist(args)))
return 0
return 1
proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
if(!setTeleatom(ateleatom))
return 0
if(!setDestination(adestination))
return 0
if(!setPrecision(aprecision))
return 0
setEffects(aeffectin,aeffectout)
setForceTeleport(afteleport)
setSounds(asoundin,asoundout)
return 1
//must succeed
proc/setPrecision(aprecision)
if(isnum(aprecision))
precision = aprecision
return 1
return 0 return 0
return 1
//must succeed /datum/teleport/proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
proc/setDestination(atom/adestination) if(!setTeleatom(ateleatom))
if(istype(adestination))
destination = adestination
return 1
return 0 return 0
if(!setDestination(adestination))
//must succeed in most cases
proc/setTeleatom(atom/movable/ateleatom)
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
qdel(ateleatom)
return 0
if(istype(ateleatom))
teleatom = ateleatom
return 1
return 0 return 0
if(!setPrecision(aprecision))
return 0
setEffects(aeffectin,aeffectout)
setForceTeleport(afteleport)
setSounds(asoundin,asoundout)
return 1
//custom effects must be properly set up first for instant-type teleports //must succeed
//optional /datum/teleport/proc/setPrecision(aprecision)
proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null) if(isnum(aprecision))
effectin = istype(aeffectin) ? aeffectin : null precision = aprecision
effectout = istype(aeffectout) ? aeffectout : null
return 1 return 1
return 0
//optional //must succeed
proc/setForceTeleport(afteleport) /datum/teleport/proc/setDestination(atom/adestination)
if(istype(adestination))
destination = adestination
return 1
return 0
//must succeed in most cases
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
qdel(ateleatom)
return 0
if(istype(ateleatom))
teleatom = ateleatom
return 1
return 0
//custom effects must be properly set up first for instant-type teleports
//optional
/datum/teleport/proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
effectin = istype(aeffectin) ? aeffectin : null
effectout = istype(aeffectout) ? aeffectout : null
return 1
//optional
/datum/teleport/proc/setForceTeleport(afteleport)
force_teleport = afteleport force_teleport = afteleport
return 1 return 1
//optional //optional
proc/setSounds(asoundin=null,asoundout=null) /datum/teleport/proc/setSounds(asoundin=null,asoundout=null)
soundin = isfile(asoundin) ? asoundin : null soundin = isfile(asoundin) ? asoundin : null
soundout = isfile(asoundout) ? asoundout : null soundout = isfile(asoundout) ? asoundout : null
return 1 return 1
//placeholder //placeholder
proc/teleportChecks() /datum/teleport/proc/teleportChecks()
return 1 return 1
proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound) /datum/teleport/proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
if(location) if(location)
if(effect) if(effect)
spawn(-1) spawn(-1)
src = null src = null
effect.attach(location) effect.attach(location)
effect.start() effect.start()
if(sound) if(sound)
spawn(-1) spawn(-1)
src = null src = null
playsound(location,sound,60,1) playsound(location,sound,60,1)
return return
//do the monkey dance //do the monkey dance
proc/doTeleport() /datum/teleport/proc/doTeleport()
var/turf/destturf var/turf/destturf
var/turf/curturf = get_turf(teleatom) var/turf/curturf = get_turf(teleatom)
var/area/destarea = get_area(destination) var/area/destarea = get_area(destination)
if(precision) if(precision)
var/list/posturfs = circlerangeturfs(destination,precision) var/list/posturfs = circlerangeturfs(destination,precision)
destturf = safepick(posturfs) destturf = safepick(posturfs)
else else
destturf = get_turf(destination) destturf = get_turf(destination)
if(!destturf || !curturf) if(!destturf || !curturf)
return 0
playSpecials(curturf,effectin,soundin)
var/obj/structure/bed/chair/C = null
if(isliving(teleatom))
var/mob/living/L = teleatom
if(L.buckled)
C = L.buckled
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
else
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
if(C)
C.forceMove(destturf)
destarea.Entered(teleatom)
return 1
proc/teleport()
if(teleportChecks())
return doTeleport()
return 0 return 0
playSpecials(curturf,effectin,soundin)
var/obj/structure/bed/chair/C = null
if(isliving(teleatom))
var/mob/living/L = teleatom
if(L.buckled)
C = L.buckled
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
else
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
if(C)
C.forceMove(destturf)
destarea.Entered(teleatom)
return 1
/datum/teleport/proc/teleport()
if(teleportChecks())
return doTeleport()
return 0
/datum/teleport/instant //teleports when datum is created /datum/teleport/instant //teleports when datum is created
New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null) /datum/teleport/instant/New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
if(..()) if(..())
teleport() teleport()
return return
/datum/teleport/instant/science /datum/teleport/instant/science/setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
if(!aeffectin || !aeffectout)
setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout) var/datum/effect/effect/system/spark_spread/aeffect = new
if(!aeffectin || !aeffectout) aeffect.set_up(5, 1, teleatom)
var/datum/effect/effect/system/spark_spread/aeffect = new effectin = effectin || aeffect
aeffect.set_up(5, 1, teleatom) effectout = effectout || aeffect
effectin = effectin || aeffect
effectout = effectout || aeffect
return 1
else
return ..()
setPrecision(aprecision)
..()
if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
if(bagholding.len)
precision = max(rand(1,100)*bagholding.len,100)
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM << "\red The Bluespace interface on your Bag of Holding interferes with the teleport!"
return 1 return 1
else
return ..()
teleportChecks() /datum/teleport/instant/science/setPrecision(aprecision)
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite ..()
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>") if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
if(bagholding.len)
precision = max(rand(1,100)*bagholding.len,100)
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM << "<span class='danger>The Bluespace interface on your [teleatom] interferes with the teleport!</span>"
return 1
/datum/teleport/instant/science/teleportChecks()
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM.visible_message("<span class='danger'>\The [MM] bounces off of the portal!</span>","<span class='warning'>Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.</span>")
else
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
return 0
if(destination.z in config.admin_levels) //centcomm z-level
if(istype(teleatom, /obj/mecha))
var/obj/mecha/MM = teleatom
MM.occupant << "<span class='danger'>\The [MM] would not survive the jump to a location so far away!</span>"
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
return 0 return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM.visible_message("\red <B>The [MM] bounces off of the portal!</B>","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
else
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
return 0
if(destination.z == 2) //centcomm z-level if(destination.z > max_default_z_level()) //Away mission z-levels
if(istype(teleatom, /obj/mecha)) return 0
var/obj/mecha/MM = teleatom return 1
MM.occupant << "\red <B>The mech would not survive the jump to a location so far away!</B>"
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
teleatom.visible_message("\red <B>The Bag of Holding bounces off of the portal!</B>")
return 0
if(destination.z > 7) //Away mission z-levels
return 0
return 1

View File

@@ -259,7 +259,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
name = "Corgi Crate" name = "Corgi Crate"
contains = list() contains = list()
cost = 50 cost = 50
containertype = /obj/structure/largecrate/lisa containertype = /obj/structure/largecrate/animal/corgi
containername = "Corgi Crate" containername = "Corgi Crate"
group = "Hydroponics" group = "Hydroponics"
@@ -289,7 +289,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/cow /datum/supply_packs/cow
name = "Cow crate" name = "Cow crate"
cost = 30 cost = 30
containertype = /obj/structure/largecrate/cow containertype = /obj/structure/largecrate/animal/cow
containername = "Cow crate" containername = "Cow crate"
access = access_hydroponics access = access_hydroponics
group = "Hydroponics" group = "Hydroponics"
@@ -297,7 +297,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/goat /datum/supply_packs/goat
name = "Goat crate" name = "Goat crate"
cost = 25 cost = 25
containertype = /obj/structure/largecrate/goat containertype = /obj/structure/largecrate/animal/goat
containername = "Goat crate" containername = "Goat crate"
access = access_hydroponics access = access_hydroponics
group = "Hydroponics" group = "Hydroponics"
@@ -305,19 +305,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/chicken /datum/supply_packs/chicken
name = "Chicken crate" name = "Chicken crate"
cost = 20 cost = 20
containertype = /obj/structure/largecrate/chick containertype = /obj/structure/largecrate/animal/chick
containername = "Chicken crate" containername = "Chicken crate"
access = access_hydroponics access = access_hydroponics
group = "Hydroponics" group = "Hydroponics"
/datum/supply_packs/lisa
name = "Corgi crate"
contains = list()
cost = 50
containertype = /obj/structure/largecrate/lisa
containername = "Corgi crate"
group = "Hydroponics"
/datum/supply_packs/seeds /datum/supply_packs/seeds
name = "Seeds crate" name = "Seeds crate"
contains = list(/obj/item/seeds/chiliseed, contains = list(/obj/item/seeds/chiliseed,
@@ -345,11 +337,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/weedcontrol /datum/supply_packs/weedcontrol
name = "Weed control crate" name = "Weed control crate"
contains = list(/obj/item/weapon/scythe, contains = list(/obj/item/weapon/hatchet,
/obj/item/weapon/hatchet,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas, /obj/item/clothing/mask/gas,
/obj/item/weapon/grenade/chem_grenade/antiweed, /obj/item/weapon/grenade/chem_grenade/antiweed,
/obj/item/weapon/grenade/chem_grenade/antiweed) /obj/item/weapon/grenade/chem_grenade/antiweed)
cost = 20 cost = 25
containertype = /obj/structure/closet/crate/secure/hydrosec containertype = /obj/structure/closet/crate/secure/hydrosec
containername = "Weed control crate" containername = "Weed control crate"
access = access_hydroponics access = access_hydroponics
@@ -1519,7 +1517,32 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/stock_parts/subspace/crystal, /obj/item/weapon/stock_parts/subspace/crystal,
/obj/item/weapon/storage/toolbox/electrical) /obj/item/weapon/storage/toolbox/electrical)
/datum/supply_packs/randomised/exosuit_mod
num_contained = 1
contains = list(
/obj/item/device/kit/paint/ripley,
/obj/item/device/kit/paint/ripley/death,
/obj/item/device/kit/paint/ripley/flames_red,
/obj/item/device/kit/paint/ripley/flames_blue
)
name = "Random APLU modkit"
cost = 200
containertype = /obj/structure/closet/crate
containername = "heavy crate"
group = "Miscellaneous"
/datum/supply_packs/randomised/exosuit_mod/durand
contains = list(
/obj/item/device/kit/paint/durand,
/obj/item/device/kit/paint/durand/seraph,
/obj/item/device/kit/paint/durand/phazon
)
name = "Random Durand exosuit modkit"
/datum/supply_packs/randomised/exosuit_mod/gygax
contains = list(
/obj/item/device/kit/paint/gygax,
/obj/item/device/kit/paint/gygax/darkgygax,
/obj/item/device/kit/paint/gygax/recitence
)
name = "Random Gygax exosuit modkit"

View File

@@ -80,7 +80,8 @@
for(var/datum/data/record/t in data_core.general) for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"] var/name = t.fields["name"]
var/rank = t.fields["rank"] var/rank = t.fields["rank"]
var/real_rank = t.fields["real_rank"] var/real_rank = make_list_rank(t.fields["real_rank"])
if(OOC) if(OOC)
var/active = 0 var/active = 0
for(var/mob/M in player_list) for(var/mob/M in player_list)
@@ -165,6 +166,15 @@
return dat return dat
/var/list/acting_rank_prefixes = list("acting", "temporary", "interim")
/proc/make_list_rank(rank)
for(var/prefix in acting_rank_prefixes)
if(findtext(rank, "[prefix] ", 1, 2+length(prefix)))
return copytext(rank, 2+length(prefix))
return rank
/* /*
We can't just insert in HTML into the nanoUI so we need the raw data to play with. We can't just insert in HTML into the nanoUI so we need the raw data to play with.
Instead of creating this list over and over when someone leaves their PDA open to the page Instead of creating this list over and over when someone leaves their PDA open to the page
@@ -189,7 +199,8 @@ var/global/ManifestJSON
for(var/datum/data/record/t in data_core.general) for(var/datum/data/record/t in data_core.general)
var/name = sanitize(t.fields["name"]) var/name = sanitize(t.fields["name"])
var/rank = sanitize(t.fields["rank"]) var/rank = sanitize(t.fields["rank"])
var/real_rank = t.fields["real_rank"] var/real_rank = make_list_rank(t.fields["real_rank"])
var/isactive = t.fields["p_stat"] var/isactive = t.fields["p_stat"]
var/department = 0 var/department = 0
var/depthead = 0 // Department Heads will be placed at the top of their lists. var/depthead = 0 // Department Heads will be placed at the top of their lists.

View File

@@ -83,7 +83,7 @@
force = 5.0 force = 5.0
throwforce = 7.0 throwforce = 7.0
w_class = 2.0 w_class = 2.0
matter = list("metal" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50)
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
/obj/item/weapon/cane/concealed /obj/item/weapon/cane/concealed
@@ -271,7 +271,7 @@
w_class = 2.0 w_class = 2.0
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
matter = list("metal" = 100) matter = list(DEFAULT_WALL_MATERIAL = 100)
origin_tech = "magnets=1" origin_tech = "magnets=1"
/obj/item/weapon/staff /obj/item/weapon/staff
@@ -321,7 +321,7 @@
var/amount = 1.0 var/amount = 1.0
var/laying = 0.0 var/laying = 0.0
var/old_lay = null var/old_lay = null
matter = list("metal" = 40) matter = list(DEFAULT_WALL_MATERIAL = 40)
attack_verb = list("whipped", "lashed", "disciplined", "tickled") attack_verb = list("whipped", "lashed", "disciplined", "tickled")
suicide_act(mob/user) suicide_act(mob/user)
@@ -345,7 +345,7 @@
name = "power control module" name = "power control module"
icon_state = "power_mod" icon_state = "power_mod"
desc = "Heavy-duty switching circuits for power control." desc = "Heavy-duty switching circuits for power control."
matter = list("metal" = 50, "glass" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/module/power_control/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) /obj/item/weapon/module/power_control/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (istype(W, /obj/item/device/multitool)) if (istype(W, /obj/item/device/multitool))
@@ -467,35 +467,35 @@
desc = "A basic capacitor used in the construction of a variety of devices." desc = "A basic capacitor used in the construction of a variety of devices."
icon_state = "capacitor" icon_state = "capacitor"
origin_tech = "powerstorage=1" origin_tech = "powerstorage=1"
matter = list("metal" = 50,"glass" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module /obj/item/weapon/stock_parts/scanning_module
name = "scanning module" name = "scanning module"
desc = "A compact, high resolution scanning module used in the construction of certain devices." desc = "A compact, high resolution scanning module used in the construction of certain devices."
icon_state = "scan_module" icon_state = "scan_module"
origin_tech = "magnets=1" origin_tech = "magnets=1"
matter = list("metal" = 50,"glass" = 20) matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator /obj/item/weapon/stock_parts/manipulator
name = "micro-manipulator" name = "micro-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices." desc = "A tiny little manipulator used in the construction of certain devices."
icon_state = "micro_mani" icon_state = "micro_mani"
origin_tech = "materials=1;programming=1" origin_tech = "materials=1;programming=1"
matter = list("metal" = 30) matter = list(DEFAULT_WALL_MATERIAL = 30)
/obj/item/weapon/stock_parts/micro_laser /obj/item/weapon/stock_parts/micro_laser
name = "micro-laser" name = "micro-laser"
desc = "A tiny laser used in certain devices." desc = "A tiny laser used in certain devices."
icon_state = "micro_laser" icon_state = "micro_laser"
origin_tech = "magnets=1" origin_tech = "magnets=1"
matter = list("metal" = 10,"glass" = 20) matter = list(DEFAULT_WALL_MATERIAL = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin /obj/item/weapon/stock_parts/matter_bin
name = "matter bin" name = "matter bin"
desc = "A container for hold compressed matter awaiting re-construction." desc = "A container for hold compressed matter awaiting re-construction."
icon_state = "matter_bin" icon_state = "matter_bin"
origin_tech = "materials=1" origin_tech = "materials=1"
matter = list("metal" = 80) matter = list(DEFAULT_WALL_MATERIAL = 80)
//Rank 2 //Rank 2
@@ -504,7 +504,7 @@
desc = "An advanced capacitor used in the construction of a variety of devices." desc = "An advanced capacitor used in the construction of a variety of devices."
origin_tech = "powerstorage=3" origin_tech = "powerstorage=3"
rating = 2 rating = 2
matter = list("metal" = 50,"glass" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module/adv /obj/item/weapon/stock_parts/scanning_module/adv
name = "advanced scanning module" name = "advanced scanning module"
@@ -512,7 +512,7 @@
icon_state = "scan_module" icon_state = "scan_module"
origin_tech = "magnets=3" origin_tech = "magnets=3"
rating = 2 rating = 2
matter = list("metal" = 50,"glass" = 20) matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator/nano /obj/item/weapon/stock_parts/manipulator/nano
name = "nano-manipulator" name = "nano-manipulator"
@@ -520,7 +520,7 @@
icon_state = "nano_mani" icon_state = "nano_mani"
origin_tech = "materials=3,programming=2" origin_tech = "materials=3,programming=2"
rating = 2 rating = 2
matter = list("metal" = 30) matter = list(DEFAULT_WALL_MATERIAL = 30)
/obj/item/weapon/stock_parts/micro_laser/high /obj/item/weapon/stock_parts/micro_laser/high
name = "high-power micro-laser" name = "high-power micro-laser"
@@ -528,7 +528,7 @@
icon_state = "high_micro_laser" icon_state = "high_micro_laser"
origin_tech = "magnets=3" origin_tech = "magnets=3"
rating = 2 rating = 2
matter = list("metal" = 10,"glass" = 20) matter = list(DEFAULT_WALL_MATERIAL = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin/adv /obj/item/weapon/stock_parts/matter_bin/adv
name = "advanced matter bin" name = "advanced matter bin"
@@ -536,7 +536,7 @@
icon_state = "advanced_matter_bin" icon_state = "advanced_matter_bin"
origin_tech = "materials=3" origin_tech = "materials=3"
rating = 2 rating = 2
matter = list("metal" = 80) matter = list(DEFAULT_WALL_MATERIAL = 80)
//Rating 3 //Rating 3
@@ -545,14 +545,14 @@
desc = "A super-high capacity capacitor used in the construction of a variety of devices." desc = "A super-high capacity capacitor used in the construction of a variety of devices."
origin_tech = "powerstorage=5;materials=4" origin_tech = "powerstorage=5;materials=4"
rating = 3 rating = 3
matter = list("metal" = 50,"glass" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module/phasic /obj/item/weapon/stock_parts/scanning_module/phasic
name = "phasic scanning module" name = "phasic scanning module"
desc = "A compact, high resolution phasic scanning module used in the construction of certain devices." desc = "A compact, high resolution phasic scanning module used in the construction of certain devices."
origin_tech = "magnets=5" origin_tech = "magnets=5"
rating = 3 rating = 3
matter = list("metal" = 50,"glass" = 20) matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator/pico /obj/item/weapon/stock_parts/manipulator/pico
name = "pico-manipulator" name = "pico-manipulator"
@@ -560,7 +560,7 @@
icon_state = "pico_mani" icon_state = "pico_mani"
origin_tech = "materials=5,programming=2" origin_tech = "materials=5,programming=2"
rating = 3 rating = 3
matter = list("metal" = 30) matter = list(DEFAULT_WALL_MATERIAL = 30)
/obj/item/weapon/stock_parts/micro_laser/ultra /obj/item/weapon/stock_parts/micro_laser/ultra
name = "ultra-high-power micro-laser" name = "ultra-high-power micro-laser"
@@ -568,7 +568,7 @@
desc = "A tiny laser used in certain devices." desc = "A tiny laser used in certain devices."
origin_tech = "magnets=5" origin_tech = "magnets=5"
rating = 3 rating = 3
matter = list("metal" = 10,"glass" = 20) matter = list(DEFAULT_WALL_MATERIAL = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin/super /obj/item/weapon/stock_parts/matter_bin/super
name = "super matter bin" name = "super matter bin"
@@ -576,7 +576,7 @@
icon_state = "super_matter_bin" icon_state = "super_matter_bin"
origin_tech = "materials=5" origin_tech = "materials=5"
rating = 3 rating = 3
matter = list("metal" = 80) matter = list(DEFAULT_WALL_MATERIAL = 80)
// Subspace stock parts // Subspace stock parts
@@ -585,35 +585,35 @@
icon_state = "subspace_ansible" icon_state = "subspace_ansible"
desc = "A compact module capable of sensing extradimensional activity." desc = "A compact module capable of sensing extradimensional activity."
origin_tech = "programming=3;magnets=5;materials=4;bluespace=2" origin_tech = "programming=3;magnets=5;materials=4;bluespace=2"
matter = list("metal" = 30,"glass" = 10) matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/filter /obj/item/weapon/stock_parts/subspace/filter
name = "hyperwave filter" name = "hyperwave filter"
icon_state = "hyperwave_filter" icon_state = "hyperwave_filter"
desc = "A tiny device capable of filtering and converting super-intense radiowaves." desc = "A tiny device capable of filtering and converting super-intense radiowaves."
origin_tech = "programming=4;magnets=2" origin_tech = "programming=4;magnets=2"
matter = list("metal" = 30,"glass" = 10) matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/amplifier /obj/item/weapon/stock_parts/subspace/amplifier
name = "subspace amplifier" name = "subspace amplifier"
icon_state = "subspace_amplifier" icon_state = "subspace_amplifier"
desc = "A compact micro-machine capable of amplifying weak subspace transmissions." desc = "A compact micro-machine capable of amplifying weak subspace transmissions."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2" origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
matter = list("metal" = 30,"glass" = 10) matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/treatment /obj/item/weapon/stock_parts/subspace/treatment
name = "subspace treatment disk" name = "subspace treatment disk"
icon_state = "treatment_disk" icon_state = "treatment_disk"
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves." desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
origin_tech = "programming=3;magnets=2;materials=5;bluespace=2" origin_tech = "programming=3;magnets=2;materials=5;bluespace=2"
matter = list("metal" = 30,"glass" = 10) matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/analyzer /obj/item/weapon/stock_parts/subspace/analyzer
name = "subspace wavelength analyzer" name = "subspace wavelength analyzer"
icon_state = "wavelength_analyzer" icon_state = "wavelength_analyzer"
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths." desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2" origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
matter = list("metal" = 30,"glass" = 10) matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/crystal /obj/item/weapon/stock_parts/subspace/crystal
name = "ansible crystal" name = "ansible crystal"
@@ -627,7 +627,7 @@
icon_state = "subspace_transmitter" icon_state = "subspace_transmitter"
desc = "A large piece of equipment used to open a window into the subspace dimension." desc = "A large piece of equipment used to open a window into the subspace dimension."
origin_tech = "magnets=5;materials=5;bluespace=3" origin_tech = "magnets=5;materials=5;bluespace=3"
matter = list("metal" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50)
/obj/item/weapon/ectoplasm /obj/item/weapon/ectoplasm
name = "ectoplasm" name = "ectoplasm"

View File

@@ -3,6 +3,16 @@
#define TELECOMMS_RECEPTION_RECEIVER 2 #define TELECOMMS_RECEPTION_RECEIVER 2
#define TELECOMMS_RECEPTION_BOTH 3 #define TELECOMMS_RECEPTION_BOTH 3
/proc/register_radio(source, old_frequency, new_frequency, radio_filter)
if(old_frequency)
radio_controller.remove_object(source, old_frequency)
if(new_frequency)
return radio_controller.add_object(source, new_frequency, radio_filter)
/proc/unregister_radio(source, frequency)
if(radio_controller)
radio_controller.remove_object(source, frequency)
/proc/get_frequency_name(var/display_freq) /proc/get_frequency_name(var/display_freq)
var/freq_text var/freq_text

View File

@@ -1,34 +1,20 @@
proc/sql_poll_players() proc/sql_poll_population()
if(!sqllogging) if(!sqllogging)
return return
var/admincount = admins.len
var/playercount = 0 var/playercount = 0
for(var/mob/M in player_list) for(var/mob/M in player_list)
if(M.client) if(M.client)
playercount += 1 playercount += 1
establish_db_connection() establish_db_connection()
if(!dbcon.IsConnected()) if(!dbcon.IsConnected())
log_game("SQL ERROR during player polling. Failed to connect.") log_game("SQL ERROR during population polling. Failed to connect.")
else else
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO population (playercount, time) VALUES ([playercount], '[sqltime]')") var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO `tgstation`.`population` (`playercount`, `admincount`, `time`) VALUES ([playercount], [admincount], '[sqltime]')")
if(!query.Execute()) if(!query.Execute())
var/err = query.ErrorMsg() var/err = query.ErrorMsg()
log_game("SQL ERROR during player polling. Error : \[[err]\]\n") log_game("SQL ERROR during population polling. Error : \[[err]\]\n")
proc/sql_poll_admins()
if(!sqllogging)
return
var/admincount = admins.len
establish_db_connection()
if(!dbcon.IsConnected())
log_game("SQL ERROR during admin polling. Failed to connect.")
else
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO population (admincount, time) VALUES ([admincount], '[sqltime]')")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during admin polling. Error : \[[err]\]\n")
proc/sql_report_round_start() proc/sql_report_round_start()
// TODO // TODO
@@ -111,10 +97,8 @@ proc/statistic_cycle()
if(!sqllogging) if(!sqllogging)
return return
while(1) while(1)
sql_poll_players() sql_poll_population()
sleep(600) sleep(600)
sql_poll_admins()
sleep(6000) // Poll every ten minutes
//This proc is used for feedback. It is executed at round end. //This proc is used for feedback. It is executed at round end.
proc/sql_commit_feedback() proc/sql_commit_feedback()
@@ -157,4 +141,4 @@ proc/sql_commit_feedback()
var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_feedback (id, roundid, time, variable, value) VALUES (null, [newroundid], Now(), '[variable]', '[value]')") var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_feedback (id, roundid, time, variable, value) VALUES (null, [newroundid], Now(), '[variable]', '[value]')")
if(!query.Execute()) if(!query.Execute())
var/err = query.ErrorMsg() var/err = query.ErrorMsg()
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n") log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")

View File

@@ -32,13 +32,9 @@ var/datum/antagonist/ert/ert
player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves) player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves)
player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses) player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses)
var/obj/item/weapon/card/id/W = new(src) var/obj/item/weapon/card/id/centcom/ERT/W = new(src)
W.assignment = "Emergency Response Team"
W.registered_name = player.real_name W.registered_name = player.real_name
W.name = "[player.real_name]'s ID Card ([W.assignment])" W.name = "[player.real_name]'s ID Card ([W.assignment])"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += get_all_centcom_access()
player.equip_to_slot_or_del(W, slot_wear_id) player.equip_to_slot_or_del(W, slot_wear_id)
return 1 return 1

View File

@@ -26,8 +26,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon = 'icons/turf/areas.dmi' icon = 'icons/turf/areas.dmi'
icon_state = "unknown" icon_state = "unknown"
layer = 10 layer = 10
luminosity = 1
mouse_opacity = 0 mouse_opacity = 0
invisibility = INVISIBILITY_LIGHTING
var/lightswitch = 1 var/lightswitch = 1
var/eject = null var/eject = null
@@ -48,9 +48,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/has_gravity = 1 var/has_gravity = 1
var/list/apc = list() var/list/apc = list()
var/no_air = null var/no_air = null
var/area/master // master area used for power calcluations
// (original area before splitting due to sd_DAL)
var/list/related // the other areas of the same type as this
// var/list/lights // list of all lights on this area // var/list/lights // list of all lights on this area
var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area 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/air_doors_activated = 0
@@ -102,7 +99,6 @@ var/list/ghostteleportlocs = list()
icon_state = "space" icon_state = "space"
requires_power = 1 requires_power = 1
always_unpowered = 1 always_unpowered = 1
lighting_use_dynamic = 1
power_light = 0 power_light = 0
power_equip = 0 power_equip = 0
power_environ = 0 power_environ = 0
@@ -145,10 +141,8 @@ area/space/atmosalert()
//place to another. Look at escape shuttle for example. //place to another. Look at escape shuttle for example.
//All shuttles should now be under shuttle since we have smooth-wall code. //All shuttles should now be under shuttle since we have smooth-wall code.
/area/shuttle //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS. /area/shuttle
requires_power = 0 requires_power = 0
luminosity = 1
lighting_use_dynamic = 0
/area/shuttle/arrival /area/shuttle/arrival
name = "\improper Arrival Shuttle" name = "\improper Arrival Shuttle"
@@ -249,15 +243,11 @@ area/space/atmosalert()
icon_state = "shuttle" icon_state = "shuttle"
name = "\improper Alien Shuttle Base" name = "\improper Alien Shuttle Base"
requires_power = 1 requires_power = 1
luminosity = 0
lighting_use_dynamic = 1
/area/shuttle/alien/mine /area/shuttle/alien/mine
icon_state = "shuttle" icon_state = "shuttle"
name = "\improper Alien Shuttle Mine" name = "\improper Alien Shuttle Mine"
requires_power = 1 requires_power = 1
luminosity = 0
lighting_use_dynamic = 1
/area/shuttle/prison/ /area/shuttle/prison/
name = "\improper Prison Shuttle" name = "\improper Prison Shuttle"
@@ -343,7 +333,6 @@ area/space/atmosalert()
name = "start area" name = "start area"
icon_state = "start" icon_state = "start"
requires_power = 0 requires_power = 0
luminosity = 1
lighting_use_dynamic = 0 lighting_use_dynamic = 0
has_gravity = 1 has_gravity = 1
@@ -361,6 +350,7 @@ area/space/atmosalert()
icon_state = "centcom" icon_state = "centcom"
requires_power = 0 requires_power = 0
unlimited_power = 1 unlimited_power = 1
lighting_use_dynamic = 0
/area/centcom/control /area/centcom/control
name = "\improper Centcom Control" name = "\improper Centcom Control"
@@ -399,6 +389,7 @@ area/space/atmosalert()
icon_state = "syndie-ship" icon_state = "syndie-ship"
requires_power = 0 requires_power = 0
unlimited_power = 1 unlimited_power = 1
lighting_use_dynamic = 0
/area/syndicate_mothership/control /area/syndicate_mothership/control
name = "\improper Mercenary Control Room" name = "\improper Mercenary Control Room"
@@ -1009,7 +1000,6 @@ area/space/atmosalert()
/area/holodeck /area/holodeck
name = "\improper Holodeck" name = "\improper Holodeck"
icon_state = "Holodeck" icon_state = "Holodeck"
luminosity = 1
lighting_use_dynamic = 0 lighting_use_dynamic = 0
/area/holodeck/alphadeck /area/holodeck/alphadeck
@@ -1139,7 +1129,6 @@ area/space/atmosalert()
/area/solar /area/solar
requires_power = 1 requires_power = 1
always_unpowered = 1 always_unpowered = 1
luminosity = 1
lighting_use_dynamic = 0 lighting_use_dynamic = 0
auxport auxport

View File

@@ -10,44 +10,38 @@
/area/New() /area/New()
icon_state = "" icon_state = ""
layer = 10 layer = 10
master = src //moved outside the spawn(1) to avoid runtimes in lighting.dm when it references loc.loc.master ~Carn
uid = ++global_uid uid = ++global_uid
related = list(src)
all_areas += src all_areas += src
if(requires_power) if(!requires_power)
luminosity = 0
else
power_light = 0 //rastaf0 power_light = 0 //rastaf0
power_equip = 0 //rastaf0 power_equip = 0 //rastaf0
power_environ = 0 //rastaf0 power_environ = 0 //rastaf0
luminosity = 1
lighting_use_dynamic = 0
..() ..()
// spawn(15) // spawn(15)
power_change() // all machines set to current power level, also updates lighting icon power_change() // all machines set to current power level, also updates lighting icon
InitializeLighting()
/area/proc/get_contents()
return contents
/area/proc/get_cameras() /area/proc/get_cameras()
var/list/cameras = list() var/list/cameras = list()
for (var/area/RA in related) for (var/obj/machinery/camera/C in src)
for (var/obj/machinery/camera/C in RA) cameras += C
cameras += C
return cameras return cameras
/area/proc/atmosalert(danger_level, var/alarm_source) /area/proc/atmosalert(danger_level, var/alarm_source)
if (danger_level == 0) if (danger_level == 0)
atmosphere_alarm.clearAlarm(master, alarm_source) atmosphere_alarm.clearAlarm(src, alarm_source)
else else
atmosphere_alarm.triggerAlarm(master, alarm_source, severity = danger_level) atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level)
//Check all the alarms before lowering atmosalm. Raising is perfectly fine. //Check all the alarms before lowering atmosalm. Raising is perfectly fine.
for (var/area/RA in related) for (var/obj/machinery/alarm/AA in src)
for (var/obj/machinery/alarm/AA in RA) if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.report_danger_level)
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.report_danger_level) danger_level = max(danger_level, AA.danger_level)
danger_level = max(danger_level, AA.danger_level)
if(danger_level != atmosalm) if(danger_level != atmosalm)
if (danger_level < 1 && atmosalm >= 1) if (danger_level < 1 && atmosalm >= 1)
@@ -57,17 +51,16 @@
air_doors_close() air_doors_close()
atmosalm = danger_level atmosalm = danger_level
for(var/area/RA in related) for (var/obj/machinery/alarm/AA in src)
for (var/obj/machinery/alarm/AA in RA) AA.update_icon()
AA.update_icon()
return 1 return 1
return 0 return 0
/area/proc/air_doors_close() /area/proc/air_doors_close()
if(!src.master.air_doors_activated) if(!air_doors_activated)
src.master.air_doors_activated = 1 air_doors_activated = 1
for(var/obj/machinery/door/firedoor/E in src.master.all_doors) for(var/obj/machinery/door/firedoor/E in all_doors)
if(!E.blocked) if(!E.blocked)
if(E.operating) if(E.operating)
E.nextstate = CLOSED E.nextstate = CLOSED
@@ -76,9 +69,9 @@
E.close() E.close()
/area/proc/air_doors_open() /area/proc/air_doors_open()
if(src.master.air_doors_activated) if(air_doors_activated)
src.master.air_doors_activated = 0 air_doors_activated = 0
for(var/obj/machinery/door/firedoor/E in src.master.all_doors) for(var/obj/machinery/door/firedoor/E in all_doors)
if(!E.blocked) if(!E.blocked)
if(E.operating) if(E.operating)
E.nextstate = OPEN E.nextstate = OPEN
@@ -89,11 +82,8 @@
/area/proc/fire_alert() /area/proc/fire_alert()
if(!fire) if(!fire)
master.fire = 1 //used for firedoor checks fire = 1 //used for firedoor checks
master.updateicon() updateicon()
for(var/area/A in related)
A.fire = 1
A.updateicon()
mouse_opacity = 0 mouse_opacity = 0
for(var/obj/machinery/door/firedoor/D in all_doors) for(var/obj/machinery/door/firedoor/D in all_doors)
if(!D.blocked) if(!D.blocked)
@@ -105,11 +95,8 @@
/area/proc/fire_reset() /area/proc/fire_reset()
if (fire) if (fire)
master.fire = 0 //used for firedoor checks fire = 0 //used for firedoor checks
master.updateicon() updateicon()
for(var/area/A in related)
A.fire = 0
A.updateicon()
mouse_opacity = 0 mouse_opacity = 0
for(var/obj/machinery/door/firedoor/D in all_doors) for(var/obj/machinery/door/firedoor/D in all_doors)
if(!D.blocked) if(!D.blocked)
@@ -153,7 +140,7 @@
return return
/area/proc/updateicon() /area/proc/updateicon()
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) && (!requires_power||power_environ) && !istype(src, /area/space))//If it doesn't require power, can still activate this proc.
if(fire && !eject && !party) if(fire && !eject && !party)
icon_state = "blue" icon_state = "blue"
/*else if(atmosalm && !fire && !eject && !party) /*else if(atmosalm && !fire && !eject && !party)
@@ -177,56 +164,53 @@
/area/proc/powered(var/chan) // return true if the area has power to given channel /area/proc/powered(var/chan) // return true if the area has power to given channel
if(!master.requires_power) if(!requires_power)
return 1 return 1
if(master.always_unpowered) if(always_unpowered)
return 0 return 0
if(src.lighting_space)
return 0 // Nope sorry
switch(chan) switch(chan)
if(EQUIP) if(EQUIP)
return master.power_equip return power_equip
if(LIGHT) if(LIGHT)
return master.power_light return power_light
if(ENVIRON) if(ENVIRON)
return master.power_environ return power_environ
return 0 return 0
// called when power status changes // called when power status changes
/area/proc/power_change() /area/proc/power_change()
for(var/area/RA in related) for(var/obj/machinery/M in src) // for each machine in the area
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)
if (fire || eject || party) updateicon()
RA.updateicon()
/area/proc/usage(var/chan) /area/proc/usage(var/chan)
var/used = 0 var/used = 0
switch(chan) switch(chan)
if(LIGHT) if(LIGHT)
used += master.used_light used += used_light
if(EQUIP) if(EQUIP)
used += master.used_equip used += used_equip
if(ENVIRON) if(ENVIRON)
used += master.used_environ used += used_environ
if(TOTAL) if(TOTAL)
used += master.used_light + master.used_equip + master.used_environ used += used_light + used_equip + used_environ
return used return used
/area/proc/clear_usage() /area/proc/clear_usage()
master.used_equip = 0 used_equip = 0
master.used_light = 0 used_light = 0
master.used_environ = 0 used_environ = 0
/area/proc/use_power(var/amount, var/chan) /area/proc/use_power(var/amount, var/chan)
switch(chan) switch(chan)
if(EQUIP) if(EQUIP)
master.used_equip += amount used_equip += amount
if(LIGHT) if(LIGHT)
master.used_light += amount used_light += amount
if(ENVIRON) if(ENVIRON)
master.used_environ += amount used_environ += amount
var/list/mob/living/forced_ambiance_list = new var/list/mob/living/forced_ambiance_list = new
@@ -274,27 +258,23 @@ var/list/mob/living/forced_ambiance_list = new
L.client.played = world.time L.client.played = world.time
/area/proc/gravitychange(var/gravitystate = 0, var/area/A) /area/proc/gravitychange(var/gravitystate = 0, var/area/A)
A.has_gravity = gravitystate A.has_gravity = gravitystate
for(var/area/SubA in A.related) if(gravitystate)
SubA.has_gravity = gravitystate for(var/mob/living/carbon/human/M in A)
thunk(M)
if(gravitystate) for(var/mob/M1 in A)
for(var/mob/living/carbon/human/M in SubA) M1.make_floating(0)
thunk(M) else
for(var/mob/M1 in SubA) for(var/mob/M in A)
M1.make_floating(0) if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/))
else var/mob/living/carbon/human/H = src
for(var/mob/M in SubA) if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) //magboots + dense_object = no floaty effect
if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/)) H.make_floating(0)
var/mob/living/carbon/human/H = src
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) //magboots + dense_object = no floaty effect
H.make_floating(0)
else
H.make_floating(1)
else else
M.make_floating(1) H.make_floating(1)
else
M.make_floating(1)
/area/proc/thunk(mob) /area/proc/thunk(mob)
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing. if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.

View File

@@ -11,6 +11,7 @@
var/pass_flags = 0 var/pass_flags = 0
var/throwpass = 0 var/throwpass = 0
var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom. var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom.
var/simulated = 1 //filter for actions - used by lighting overlays
///Chemistry. ///Chemistry.
var/datum/reagents/reagents = null var/datum/reagents/reagents = null
@@ -25,7 +26,7 @@
/atom/Destroy() /atom/Destroy()
. = ..() . = ..()
density = 0 density = 0
SetOpacity(0) set_opacity(0)
if(reagents) if(reagents)
qdel(reagents) qdel(reagents)

View File

@@ -30,15 +30,10 @@
..() ..()
/atom/movable/Destroy() /atom/movable/Destroy()
if(opacity) . = ..()
if(isturf(loc))
if(loc:lighting_lumcount > 1)
UpdateAffectingLights()
loc = null loc = null
..()
/atom/movable/proc/initialize() /atom/movable/proc/initialize()
return return
@@ -215,4 +210,4 @@
/atom/movable/overlay/attack_hand(a, b, c) /atom/movable/overlay/attack_hand(a, b, c)
if (src.master) if (src.master)
return src.master.attack_hand(a, b, c) return src.master.attack_hand(a, b, c)
return return

View File

@@ -3,7 +3,7 @@
name = "blob" name = "blob"
icon = 'icons/mob/blob.dmi' icon = 'icons/mob/blob.dmi'
icon_state = "blob" icon_state = "blob"
luminosity = 3 light_range = 3
desc = "Some blob creature thingy" desc = "Some blob creature thingy"
density = 1 density = 1
opacity = 0 opacity = 0

View File

@@ -22,8 +22,8 @@
desc = "A floating crystal that hums with an unearthly energy" desc = "A floating crystal that hums with an unearthly energy"
icon_state = "pylon" icon_state = "pylon"
var/isbroken = 0 var/isbroken = 0
luminosity = 5 light_range = 5
l_color = "#3e0000" light_color = "#3e0000"
var/obj/item/wepon = null var/obj/item/wepon = null
/obj/structure/cult/pylon/attack_hand(mob/M as mob) /obj/structure/cult/pylon/attack_hand(mob/M as mob)
@@ -47,7 +47,7 @@
isbroken = 1 isbroken = 1
density = 0 density = 0
icon_state = "pylon-broken" icon_state = "pylon-broken"
SetLuminosity(0) set_light(0)
else else
user << "You hit the pylon!" user << "You hit the pylon!"
playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1) playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1)
@@ -66,13 +66,12 @@
isbroken = 0 isbroken = 0
density = 1 density = 1
icon_state = "pylon" icon_state = "pylon"
SetLuminosity(5) set_light(5)
/obj/structure/cult/tome /obj/structure/cult/tome
name = "Desk" name = "Desk"
desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl" desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl"
icon_state = "tomealtar" icon_state = "tomealtar"
// luminosity = 5
//sprites for this no longer exist -Pete //sprites for this no longer exist -Pete
//(they were stolen from another game anyway) //(they were stolen from another game anyway)
@@ -105,8 +104,8 @@
return return
/obj/effect/gateway/active /obj/effect/gateway/active
luminosity=5 light_range=5
l_color="#ff0000" light_color="#ff0000"
spawnable=list( spawnable=list(
/mob/living/simple_animal/hostile/scarybat, /mob/living/simple_animal/hostile/scarybat,
/mob/living/simple_animal/hostile/creature, /mob/living/simple_animal/hostile/creature,
@@ -114,8 +113,8 @@
) )
/obj/effect/gateway/active/cult /obj/effect/gateway/active/cult
luminosity=5 light_range=5
l_color="#ff0000" light_color="#ff0000"
spawnable=list( spawnable=list(
/mob/living/simple_animal/hostile/scarybat/cult, /mob/living/simple_animal/hostile/scarybat/cult,
/mob/living/simple_animal/hostile/creature/cult, /mob/living/simple_animal/hostile/creature/cult,

View File

@@ -43,7 +43,7 @@
narsimage = image('icons/obj/narsie.dmi',src.loc,"narsie",9,1) narsimage = image('icons/obj/narsie.dmi',src.loc,"narsie",9,1)
narsimage.mouse_opacity = 0 narsimage.mouse_opacity = 0
if(!narglow) //Create narglow if(!narglow) //Create narglow
narglow = image('icons/obj/narsie.dmi',narsimage.loc,"glow-narsie",LIGHTING_LAYER+2,1) narglow = image('icons/obj/narsie.dmi',narsimage.loc,"glow-narsie",12,1)
narglow.mouse_opacity = 0 narglow.mouse_opacity = 0
//Else if no dir is given, simply send them the image of narsie //Else if no dir is given, simply send them the image of narsie
var/new_x = 32 * (N.x - src.x) + N.pixel_x var/new_x = 32 * (N.x - src.x) + N.pixel_x

View File

@@ -54,9 +54,8 @@ In short:
runedec += 9000 //basically removing the rune cap runedec += 9000 //basically removing the rune cap
/datum/universal_state/hell/proc/AreaSet() /datum/universal_state/hell/proc/AreaSet()
for(var/area/ca in world) for(var/area/A in world)
var/area/A = ca.master if(A.name=="Space")
if(!istype(A,/area) || A.name=="Space")
continue continue
// Reset all alarms. // Reset all alarms.
@@ -74,9 +73,8 @@ In short:
spess.overlays += I spess.overlays += I
/datum/universal_state/hell/proc/AmbientSet() /datum/universal_state/hell/proc/AmbientSet()
for(var/turf/T in world) for(var/atom/movable/lighting_overlay/L in world)
if(istype(T, /turf/space)) continue L.update_lumcount(1, 0, 0)
T.update_lumcount(1, 255, 0, 0, 0)
/datum/universal_state/hell/proc/MiscSet() /datum/universal_state/hell/proc/MiscSet()
for(var/turf/simulated/floor/T in world) for(var/turf/simulated/floor/T in world)

View File

@@ -127,6 +127,7 @@ var/list/sacrificed = list()
if(target.getFireLoss() < 100) if(target.getFireLoss() < 100)
target.hallucination = min(target.hallucination, 500) target.hallucination = min(target.hallucination, 500)
return 0 return 0
target.take_overall_damage(0, rand(5, 20)) // You dirty resister cannot handle the damage to your mind. Easily. - even cultists who accept right away should experience some effects target.take_overall_damage(0, rand(5, 20)) // You dirty resister cannot handle the damage to your mind. Easily. - even cultists who accept right away should experience some effects
// Resist messages go! // Resist messages go!
if(initial_message) //don't do this stuff right away, only if they resist or hesitate. if(initial_message) //don't do this stuff right away, only if they resist or hesitate.
@@ -417,6 +418,7 @@ var/list/sacrificed = list()
var/mob/dead/observer/ghost var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in this_rune.loc) for(var/mob/dead/observer/O in this_rune.loc)
if(!O.client) continue if(!O.client) continue
if(!O.MayRespawn()) continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
ghost = O ghost = O
break break

View File

@@ -8,7 +8,7 @@
//luminosity = 5 //luminosity = 5
//l_color="#0066FF" //l_color="#0066FF"
layer = LIGHTING_LAYER+1 layer = 11
var/spawned=0 // DIR mask var/spawned=0 // DIR mask
var/next_check=0 var/next_check=0

View File

@@ -10,7 +10,7 @@
announce=0 announce=0
narnar=0 narnar=0
layer=LIGHTING_LAYER+2 // ITS SO BRIGHT layer=12 // ITS SO BRIGHT
consume_range = 6 consume_range = 6
@@ -65,7 +65,7 @@
/mob/proc/see_rift(var/obj/singularity/narsie/large/exit/R) /mob/proc/see_rift(var/obj/singularity/narsie/large/exit/R)
if((R.z == src.z) && (get_dist(R,src) <= (R.consume_range+10)) && !(R in view(src))) if((R.z == src.z) && (get_dist(R,src) <= (R.consume_range+10)) && !(R in view(src)))
if(!riftimage) if(!riftimage)
riftimage = image('icons/obj/rift.dmi',src.loc,"rift",LIGHTING_LAYER+2,1) riftimage = image('icons/obj/rift.dmi',src.loc,"rift",12,1)
riftimage.mouse_opacity = 0 riftimage.mouse_opacity = 0
var/new_x = 32 * (R.x - src.x) + R.pixel_x var/new_x = 32 * (R.x - src.x) + R.pixel_x

View File

@@ -83,11 +83,10 @@ AUTOMATED ALERT: Link to [command_name()] lost."}
return return
/datum/universal_state/supermatter_cascade/proc/AreaSet() /datum/universal_state/supermatter_cascade/proc/AreaSet()
for(var/area/ca in world) for(var/area/A in world)
var/area/A=ca.master
if(A.z in config.admin_levels) if(A.z in config.admin_levels)
continue continue
if(!istype(A,/area) || istype(A,/area/space)) if(istype(A,/area/space))
continue continue
// Reset all alarms. // Reset all alarms.
@@ -111,10 +110,9 @@ AUTOMATED ALERT: Link to [command_name()] lost."}
spess.overlays += "end01" spess.overlays += "end01"
/datum/universal_state/supermatter_cascade/proc/AmbientSet() /datum/universal_state/supermatter_cascade/proc/AmbientSet()
for(var/turf/T in world) for(var/atom/movable/lighting_overlay/L in world)
if(istype(T, /turf/space)) continue if(!(L.z in config.admin_levels))
if(!(T.z in config.admin_levels)) L.update_lumcount(0.5, 1, 0)
T.update_lumcount(1, 160, 255, 0, 0)
/datum/universal_state/supermatter_cascade/proc/MiscSet() /datum/universal_state/supermatter_cascade/proc/MiscSet()
for (var/obj/machinery/firealarm/alm in world) for (var/obj/machinery/firealarm/alm in world)

View File

@@ -292,7 +292,7 @@ var/global/datum/controller/gameticker/ticker
if(player.mind.assigned_role != "MODE") if(player.mind.assigned_role != "MODE")
job_master.EquipRank(player, player.mind.assigned_role, 0) job_master.EquipRank(player, player.mind.assigned_role, 0)
UpdateFactionList(player) UpdateFactionList(player)
EquipCustomItems(player) equip_custom_items(player)
if(captainless) if(captainless)
for(var/mob/M in player_list) for(var/mob/M in player_list)
if(!istype(M,/mob/new_player)) if(!istype(M,/mob/new_player))
@@ -418,7 +418,7 @@ var/global/datum/controller/gameticker/ticker
robo.laws.show_laws(world) robo.laws.show_laws(world)
if(dronecount) if(dronecount)
world << "<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round." world << "<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round.</b>"
mode.declare_completion()//To declare normal completion. mode.declare_completion()//To declare normal completion.

View File

@@ -8,7 +8,7 @@
item_state = "electronic" item_state = "electronic"
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
matter = list("metal" = 500) matter = list(DEFAULT_WALL_MATERIAL = 500)
var/obj/item/weapon/disk/nuclear/the_disk = null var/obj/item/weapon/disk/nuclear/the_disk = null
var/active = 0 var/active = 0

View File

@@ -798,7 +798,7 @@ datum/objective/heist/salvage
choose_target() choose_target()
switch(rand(1,8)) switch(rand(1,8))
if(1) if(1)
target = "metal" target = DEFAULT_WALL_MATERIAL
target_amount = 300 target_amount = 300
if(2) if(2)
target = "glass" target = "glass"

View File

@@ -16,10 +16,6 @@
if(!H) return 0 if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(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/shoes/black(H), slot_shoes)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1 return 1
/datum/job/assistant/get_access() /datum/job/assistant/get_access()

View File

@@ -33,7 +33,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses) H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
if(H.backbag == 1) if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
@@ -84,12 +84,11 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) 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(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) 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/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
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/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
if(H.backbag == 1) if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
return 1 return 1

View File

@@ -23,21 +23,6 @@
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/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/clothing/under/rank/bartender(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
if(H.backbag == 1)
var/obj/item/weapon/storage/box/survival/Barpack = new /obj/item/weapon/storage/box/survival(H)
H.equip_to_slot_or_del(Barpack, slot_r_hand)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
return 1 return 1
@@ -65,10 +50,6 @@
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/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/pda/chef(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/chef(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1 return 1
@@ -98,11 +79,9 @@
H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt)
switch(H.backbag) switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/hydroponics(H), slot_back) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/hydroponics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(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/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1 return 1
@@ -131,10 +110,6 @@
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) // H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses) H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1 return 1
@@ -160,10 +135,6 @@
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/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) // H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1 return 1
@@ -194,11 +165,9 @@
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/shoes/black(H), slot_shoes)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) // H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1) if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
else else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
return 1 return 1
@@ -223,7 +192,6 @@
equip(var/mob/living/carbon/human/H) equip(var/mob/living/carbon/human/H)
if(!H) return 0 if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(H), slot_back) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/clown(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/clown(H), slot_belt)
@@ -231,7 +199,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/rainbow(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/fancy/crayons(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/storage/fancy/crayons(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/waterflower(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/toy/waterflower(H), slot_in_backpack)
H.mutations.Add(CLUMSY) H.mutations.Add(CLUMSY)
@@ -264,12 +232,10 @@
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
if(H.backbag == 1) if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
else else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
H.verbs += /client/proc/mimespeak H.verbs += /client/proc/mimespeak
H.verbs += /client/proc/mimewall H.verbs += /client/proc/mimewall
@@ -300,10 +266,6 @@
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/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/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1 return 1
@@ -330,10 +292,6 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/librarian(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/librarian(H), slot_belt)
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/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1 return 1
@@ -366,10 +324,6 @@
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/clothing/glasses/sunglasses/big(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.implant_loyalty(H) H.implant_loyalty(H)

View File

@@ -22,10 +22,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
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/shoes/black(H), slot_shoes)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
spawn(0) spawn(0)
var/religion_name = "Christianity" var/religion_name = "Christianity"
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN) var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)

View File

@@ -35,10 +35,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat/white(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat/white(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1 return 1
@@ -71,10 +67,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/t_scanner(H), slot_r_store) H.equip_to_slot_or_del(new /obj/item/device/t_scanner(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1 return 1
@@ -104,8 +96,4 @@
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/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/atmos(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/device/pda/atmos(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1 return 1

View File

@@ -30,10 +30,6 @@
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/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1 return 1
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
@@ -93,10 +89,6 @@
else else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1 return 1
@@ -126,11 +118,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
switch(H.backbag) switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(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/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(H), slot_wear_suit)
return 1 return 1
@@ -157,11 +147,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
switch(H.backbag) switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(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/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1 return 1
@@ -197,10 +185,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
@@ -230,7 +214,7 @@
if (H.mind.role_alt_title) if (H.mind.role_alt_title)
switch(H.mind.role_alt_title) switch(H.mind.role_alt_title)
if("Emergency Medical Technician") if("Emergency Medical Technician")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/fluff/short(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
if("Paramedic") if("Paramedic")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
@@ -239,8 +223,4 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1 return 1

View File

@@ -29,11 +29,9 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
switch(H.backbag) switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(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/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
return 1 return 1
@@ -62,11 +60,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
switch(H.backbag) switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(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/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1 return 1
@@ -95,11 +91,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
switch(H.backbag) switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(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/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1 return 1
@@ -128,9 +122,5 @@
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/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_belt) H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
return 1 return 1

View File

@@ -36,10 +36,8 @@
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses) H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
if(H.backbag == 1) if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store)
else else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
H.implant_loyalty(H) H.implant_loyalty(H)
return 1 return 1
@@ -75,10 +73,8 @@
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk // H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1) if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1 return 1
@@ -113,11 +109,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(H), slot_l_store)
if(H.backbag == 1)//Why cant some of these things spawn in his office? if(H.backbag == 1)//Why cant some of these things spawn in his office?
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_r_store) H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_r_store)
else else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician") if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician")
@@ -155,9 +149,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1) if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1 return 1

View File

@@ -394,6 +394,8 @@ var/global/datum/controller/occupations/job_master
//Equip job items. //Equip job items.
job.equip(H) job.equip(H)
job.apply_fingerprints(H) job.apply_fingerprints(H)
H.species.equip_survival_gear(H)
//If some custom items could not be equipped before, try again now. //If some custom items could not be equipped before, try again now.
for(var/thing in custom_equip_leftovers) for(var/thing in custom_equip_leftovers)
var/datum/gear/G = gear_datums[thing] var/datum/gear/G = gear_datums[thing]
@@ -499,20 +501,6 @@ var/global/datum/controller/occupations/job_master
else else
H << "\red Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug." H << "\red Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug."
//TODO: Generalize this by-species
if(H.species)
if(H.species.name == "Tajara" || H.species.name == "Unathi")
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
else if(H.species.name == "Vox")
H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
if(!H.r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_r_hand)
H.internal = H.r_hand
else if (!H.l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_l_hand)
H.internal = H.l_hand
H.internals.icon_state = "internal1"
if(istype(H)) //give humans wheelchairs, if they need them. if(istype(H)) //give humans wheelchairs, if they need them.
var/obj/item/organ/external/l_foot = H.get_organ("l_foot") var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
var/obj/item/organ/external/r_foot = H.get_organ("r_foot") var/obj/item/organ/external/r_foot = H.get_organ("r_foot")

View File

@@ -99,8 +99,10 @@
target_temperature = 90 target_temperature = 90
/obj/machinery/alarm/Destroy() /obj/machinery/alarm/Destroy()
if(radio_controller) unregister_radio(src, frequency)
radio_controller.remove_object(src, frequency) if(wires)
qdel(wires)
wires = null
..() ..()
/obj/machinery/alarm/New(var/loc, var/dir, var/building = 0) /obj/machinery/alarm/New(var/loc, var/dir, var/building = 0)
@@ -124,8 +126,6 @@
/obj/machinery/alarm/proc/first_run() /obj/machinery/alarm/proc/first_run()
alarm_area = get_area(src) alarm_area = get_area(src)
if (alarm_area.master)
alarm_area = alarm_area.master
area_uid = alarm_area.uid area_uid = alarm_area.uid
if (name == "alarm") if (name == "alarm")
name = "[alarm_area.name] Air Alarm" name = "[alarm_area.name] Air Alarm"
@@ -286,11 +286,10 @@
/obj/machinery/alarm/proc/elect_master() /obj/machinery/alarm/proc/elect_master()
for (var/area/A in alarm_area.related) for (var/obj/machinery/alarm/AA in alarm_area)
for (var/obj/machinery/alarm/AA in A) if (!(AA.stat & (NOPOWER|BROKEN)))
if (!(AA.stat & (NOPOWER|BROKEN))) alarm_area.master_air_alarm = AA
alarm_area.master_air_alarm = AA return 1
return 1
return 0 return 0
/obj/machinery/alarm/proc/get_danger_level(var/current_value, var/list/danger_levels) /obj/machinery/alarm/proc/get_danger_level(var/current_value, var/list/danger_levels)
@@ -397,9 +396,8 @@
/obj/machinery/alarm/proc/apply_mode() /obj/machinery/alarm/proc/apply_mode()
//propagate mode to other air alarms in the area //propagate mode to other air alarms in the area
//TODO: make it so that players can choose between applying the new mode to the room they are in (related area) vs the entire alarm area //TODO: make it so that players can choose between applying the new mode to the room they are in (related area) vs the entire alarm area
for (var/area/RA in alarm_area.related) for (var/obj/machinery/alarm/AA in alarm_area)
for (var/obj/machinery/alarm/AA in RA) AA.mode = mode
AA.mode = mode
switch(mode) switch(mode)
if(AALARM_MODE_SCRUBBING) if(AALARM_MODE_SCRUBBING)
@@ -622,7 +620,7 @@
if(buildstage != 2) if(buildstage != 2)
return STATUS_CLOSE return STATUS_CLOSE
if(aidisabled && user.isAI()) if(aidisabled && user.isMobAI())
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>" user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
return STATUS_CLOSE return STATUS_CLOSE
@@ -840,8 +838,7 @@
else if(istype(W, /obj/item/weapon/wrench)) else if(istype(W, /obj/item/weapon/wrench))
user << "You remove the fire alarm assembly from the wall!" user << "You remove the fire alarm assembly from the wall!"
var/obj/item/alarm_frame/frame = new /obj/item/alarm_frame() new /obj/item/frame/air_alarm(get_turf(user))
frame.loc = user.loc
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
qdel(src) qdel(src)
@@ -868,51 +865,7 @@ Just a object used in constructing air alarms
icon_state = "door_electronics" icon_state = "door_electronics"
desc = "Looks like a circuit. Probably is." desc = "Looks like a circuit. Probably is."
w_class = 2.0 w_class = 2.0
matter = list("metal" = 50, "glass" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/*
AIR ALARM ITEM
Handheld air alarm frame, for placing on walls
Code shamelessly copied from apc_frame
*/
/obj/item/alarm_frame
name = "air alarm frame"
desc = "Used for building Air Alarms"
icon = 'icons/obj/monitors.dmi'
icon_state = "alarm_bitem"
flags = CONDUCT
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
qdel(src)
return
..()
/obj/item/alarm_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(on_wall,usr)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Air Alarm cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Air Alarm cannot be placed in this area."
return
if(gotwallitem(loc, ndir))
usr << "\red There's already an item on this wall!"
return
new /obj/machinery/alarm(loc, ndir, 1)
qdel(src)
/* /*
FIRE ALARM FIRE ALARM
@@ -1023,8 +976,7 @@ FIRE ALARM
else if(istype(W, /obj/item/weapon/wrench)) else if(istype(W, /obj/item/weapon/wrench))
user << "You remove the fire alarm assembly from the wall!" user << "You remove the fire alarm assembly from the wall!"
var/obj/item/firealarm_frame/frame = new /obj/item/firealarm_frame() new /obj/item/frame/fire_alarm(get_turf(user))
frame.loc = user.loc
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
qdel(src) qdel(src)
return return
@@ -1070,7 +1022,6 @@ FIRE ALARM
var/d2 var/d2
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon)) if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon))
A = A.loc A = A.loc
A = A.master
if (A.fire) if (A.fire)
d1 = text("<A href='?src=\ref[];reset=1'>Reset - Lockdown</A>", src) d1 = text("<A href='?src=\ref[];reset=1'>Reset - Lockdown</A>", src)
@@ -1137,9 +1088,8 @@ FIRE ALARM
if (!( src.working )) if (!( src.working ))
return return
var/area/area = get_area(src) var/area/area = get_area(src)
for(var/area/A in area.related) for(var/obj/machinery/firealarm/FA in area)
for(var/obj/machinery/firealarm/FA in A) fire_alarm.clearAlarm(loc, FA)
fire_alarm.clearAlarm(loc, FA)
update_icon() update_icon()
return return
@@ -1147,9 +1097,8 @@ FIRE ALARM
if (!( src.working)) if (!( src.working))
return return
var/area/area = get_area(src) var/area/area = get_area(src)
for(var/area/A in area.related) for(var/obj/machinery/firealarm/FA in area)
for(var/obj/machinery/firealarm/FA in A) fire_alarm.triggerAlarm(loc, FA, duration)
fire_alarm.triggerAlarm(loc, FA, duration)
update_icon() update_icon()
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0) //playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
return return
@@ -1190,53 +1139,7 @@ Just a object used in constructing fire alarms
icon_state = "door_electronics" icon_state = "door_electronics"
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\"" desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
w_class = 2.0 w_class = 2.0
matter = list("metal" = 50, "glass" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/*
FIRE ALARM ITEM
Handheld fire alarm frame, for placing on walls
Code shamelessly copied from apc_frame
*/
/obj/item/firealarm_frame
name = "fire alarm frame"
desc = "Used for building Fire Alarms"
icon = 'icons/obj/monitors.dmi'
icon_state = "fire_bitem"
flags = CONDUCT
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
qdel(src)
return
..()
/obj/item/firealarm_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(on_wall,usr)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Fire Alarm cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Fire Alarm cannot be placed in this area."
return
if(gotwallitem(loc, ndir))
usr << "\red There's already an item on this wall!"
return
new /obj/machinery/firealarm(loc, ndir, 1)
qdel(src)
/obj/machinery/partyalarm /obj/machinery/partyalarm
name = "\improper PARTY BUTTON" name = "\improper PARTY BUTTON"
@@ -1260,8 +1163,6 @@ Code shamelessly copied from apc_frame
user.machine = src user.machine = src
var/area/A = get_area(src) var/area/A = get_area(src)
ASSERT(isarea(A)) ASSERT(isarea(A))
if(A.master)
A = A.master
var/d1 var/d1
var/d2 var/d2
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
@@ -1300,8 +1201,6 @@ Code shamelessly copied from apc_frame
return return
var/area/A = get_area(src) var/area/A = get_area(src)
ASSERT(isarea(A)) ASSERT(isarea(A))
if(A.master)
A = A.master
A.partyreset() A.partyreset()
return return
@@ -1310,8 +1209,6 @@ Code shamelessly copied from apc_frame
return return
var/area/A = get_area(src) var/area/A = get_area(src)
ASSERT(isarea(A)) ASSERT(isarea(A))
if(A.master)
A = A.master
A.partyalert() A.partyalert()
return return

View File

@@ -2,6 +2,7 @@
name = "Area Air Control" name = "Area Air Control"
desc = "A computer used to control the stationary scrubbers and pumps in the area." desc = "A computer used to control the stationary scrubbers and pumps in the area."
icon_state = "area_atmos" icon_state = "area_atmos"
light_color = "#e6ffff"
circuit = "/obj/item/weapon/circuitboard/area_atmos" circuit = "/obj/item/weapon/circuitboard/area_atmos"
var/list/connectedscrubbers = new() var/list/connectedscrubbers = new()
@@ -147,14 +148,10 @@
var/turf/T_src = get_turf(src) var/turf/T_src = get_turf(src)
if(!T_src.loc) return 0 if(!T_src.loc) return 0
var/area/A_src = T_src.loc var/area/A_src = T_src.loc
if (A_src.master)
A_src = A_src.master
var/turf/T_scrub = get_turf(scrubber) var/turf/T_scrub = get_turf(scrubber)
if(!T_scrub.loc) return 0 if(!T_scrub.loc) return 0
var/area/A_scrub = T_scrub.loc var/area/A_scrub = T_scrub.loc
if (A_scrub.master)
A_scrub = A_scrub.master
if(A_scrub != A_src) if(A_scrub != A_src)
return 0 return 0
@@ -169,13 +166,11 @@
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!T.loc) return if(!T.loc) return
var/area/A = T.loc var/area/A = T.loc
if (A.master)
A = A.master
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in world ) for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in world )
var/turf/T2 = get_turf(scrubber) var/turf/T2 = get_turf(scrubber)
if(T2 && T2.loc) if(T2 && T2.loc)
var/area/A2 = T2.loc var/area/A2 = T2.loc
if(istype(A2) && A2.master && A2.master == A ) if(istype(A2) && A2 == A)
connectedscrubbers += scrubber connectedscrubbers += scrubber
found = 1 found = 1
@@ -183,4 +178,4 @@
if(!found) if(!found)
status = "ERROR: No scrubber found!" status = "ERROR: No scrubber found!"
src.updateUsrDialog() src.updateUsrDialog()

View File

@@ -22,7 +22,7 @@
/obj/machinery/portable_atmospherics/powered/pump/New() /obj/machinery/portable_atmospherics/powered/pump/New()
..() ..()
cell = new/obj/item/weapon/cell(src) cell = new/obj/item/weapon/cell/apc(src)
var/list/air_mix = StandardAirMix() var/list/air_mix = StandardAirMix()
src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"]) src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"])
@@ -78,7 +78,7 @@
output_volume = environment.volume * environment.group_multiplier output_volume = environment.volume * environment.group_multiplier
air_temperature = environment.temperature? environment.temperature : air_contents.temperature air_temperature = environment.temperature? environment.temperature : air_contents.temperature
else else
pressure_delta = target_pressure - air_contents.return_pressure() pressure_delta = environment.return_pressure() - target_pressure
output_volume = air_contents.volume * air_contents.group_multiplier output_volume = air_contents.volume * air_contents.group_multiplier
air_temperature = air_contents.temperature? air_contents.temperature : environment.temperature air_temperature = air_contents.temperature? air_contents.temperature : environment.temperature

View File

@@ -20,7 +20,7 @@
/obj/machinery/portable_atmospherics/powered/scrubber/New() /obj/machinery/portable_atmospherics/powered/scrubber/New()
..() ..()
cell = new/obj/item/weapon/cell(src) cell = new/obj/item/weapon/cell/apc(src)
/obj/machinery/portable_atmospherics/powered/scrubber/emp_act(severity) /obj/machinery/portable_atmospherics/powered/scrubber/emp_act(severity)
if(stat & (BROKEN|NOPOWER)) if(stat & (BROKEN|NOPOWER))

View File

@@ -9,8 +9,8 @@
active_power_usage = 2000 active_power_usage = 2000
var/list/machine_recipes var/list/machine_recipes
var/list/stored_material = list("metal" = 0, "glass" = 0) var/list/stored_material = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
var/list/storage_capacity = list("metal" = 0, "glass" = 0) var/list/storage_capacity = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
var/show_category = "All" var/show_category = "All"
var/hacked = 0 var/hacked = 0
@@ -279,18 +279,20 @@
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
man_rating += M.rating man_rating += M.rating
storage_capacity["metal"] = mb_rating * 25000 storage_capacity[DEFAULT_WALL_MATERIAL] = mb_rating * 25000
storage_capacity["glass"] = mb_rating * 12500 storage_capacity["glass"] = mb_rating * 12500
build_time = 50 / man_rating build_time = 50 / man_rating
mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3 mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3
/obj/machinery/autolathe/dismantle() /obj/machinery/autolathe/dismantle()
var/list/sheets = list("metal" = /obj/item/stack/sheet/metal, "glass" = /obj/item/stack/sheet/glass)
for(var/mat in stored_material) for(var/mat in stored_material)
var/T = sheets[mat] var/material/M = name_to_material[mat]
var/obj/item/stack/sheet/S = new T if(!istype(M))
continue
var/obj/item/stack/sheet/S = new M.stack_type(get_turf(src))
if(stored_material[mat] > S.perunit) if(stored_material[mat] > S.perunit)
S.amount = round(stored_material[mat] / S.perunit) S.amount = round(stored_material[mat] / S.perunit)
S.loc = loc else
qdel(S)
..() ..()

View File

@@ -3,7 +3,7 @@
/obj/machinery/bot /obj/machinery/bot
icon = 'icons/obj/aibots.dmi' icon = 'icons/obj/aibots.dmi'
layer = MOB_LAYER layer = MOB_LAYER
luminosity = 3 light_range = 3
use_power = 0 use_power = 0
var/obj/item/weapon/card/id/botcard // the ID card that the bot "holds" var/obj/item/weapon/card/id/botcard // the ID card that the bot "holds"
var/on = 1 var/on = 1
@@ -18,12 +18,12 @@
/obj/machinery/bot/proc/turn_on() /obj/machinery/bot/proc/turn_on()
if(stat) return 0 if(stat) return 0
on = 1 on = 1
SetLuminosity(initial(luminosity)) set_light(initial(light_range))
return 1 return 1
/obj/machinery/bot/proc/turn_off() /obj/machinery/bot/proc/turn_off()
on = 0 on = 0
SetLuminosity(0) set_light(0)
/obj/machinery/bot/proc/explode() /obj/machinery/bot/proc/explode()
qdel(src) qdel(src)

View File

@@ -65,7 +65,7 @@
if(!isEmpProof()) if(!isEmpProof())
if(prob(100/severity)) if(prob(100/severity))
stat |= EMPED stat |= EMPED
SetLuminosity(0) set_light(0)
kick_viewers() kick_viewers()
triggerCameraAlarm(30 / severity) triggerCameraAlarm(30 / severity)
update_icon() update_icon()

View File

@@ -6,7 +6,7 @@
w_class = 2 w_class = 2
anchored = 0 anchored = 0
matter = list("metal" = 700,"glass" = 300) matter = list(DEFAULT_WALL_MATERIAL = 700,"glass" = 300)
// Motion, EMP-Proof, X-Ray // Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/osmium, /obj/item/weapon/stock_parts/scanning_module) var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/osmium, /obj/item/weapon/stock_parts/scanning_module)

View File

@@ -102,6 +102,12 @@ var/global/list/engineering_networks = list(
..() ..()
upgradeMotion() upgradeMotion()
/obj/machinery/camera/motion/engineering_outpost
network = list(NETWORK_ENGINEERING_OUTPOST)
/obj/machinery/camera/motion/security
network = list(NETWORK_SECURITY)
// ALL UPGRADES // ALL UPGRADES

View File

@@ -174,17 +174,9 @@
//So clones don't die of oxyloss in a running pod. //So clones don't die of oxyloss in a running pod.
if(occupant.reagents.get_reagent_amount("inaprovaline") < 30) if(occupant.reagents.get_reagent_amount("inaprovaline") < 30)
occupant.reagents.add_reagent("inaprovaline", 60) occupant.reagents.add_reagent("inaprovaline", 60)
occupant.Sleeping(30)
//So clones will remain asleep for long enough to get them into cryo (Bay RP edit)
if(occupant.reagents.get_reagent_amount("stoxin") < 10)
occupant.reagents.add_reagent("stoxin", 5)
if(occupant.reagents.get_reagent_amount("chloralhydrate") < 1)
occupant.reagents.add_reagent("chloralhydrate", 1)
//Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!! //Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
occupant.adjustOxyLoss(-4) occupant.adjustOxyLoss(-4)
if(notoxin)
occupant.adjustToxLoss(-2) // If sufficiently upgraded - remove toxin damage from chloral
use_power(7500) //This might need tweaking. use_power(7500) //This might need tweaking.
return return

View File

@@ -5,6 +5,7 @@
density = 1 density = 1
anchored = 1.0 anchored = 1.0
icon_state = "operating" icon_state = "operating"
light_color = "#315ab4"
circuit = "/obj/item/weapon/circuitboard/operating" circuit = "/obj/item/weapon/circuitboard/operating"
var/mob/living/carbon/human/victim = null var/mob/living/carbon/human/victim = null
var/obj/machinery/optable/table = null var/obj/machinery/optable/table = null

View File

@@ -9,6 +9,7 @@
desc = "Console used to remotely control machinery on the station." desc = "Console used to remotely control machinery on the station."
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "ai-fixer" icon_state = "ai-fixer"
light_color = "#a97faa"
circuit = /obj/item/weapon/circuitboard/rcon_console circuit = /obj/item/weapon/circuitboard/rcon_console
req_one_access = list(access_engine) req_one_access = list(access_engine)
var/current_tag = null var/current_tag = null

View File

@@ -2,6 +2,7 @@
name = "\improper AI system integrity restorer" name = "\improper AI system integrity restorer"
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "ai-fixer" icon_state = "ai-fixer"
light_color = "#a97faa"
circuit = /obj/item/weapon/circuitboard/aifixer circuit = /obj/item/weapon/circuitboard/aifixer
req_one_access = list(access_robotics, access_heads) req_one_access = list(access_robotics, access_heads)
var/mob/living/silicon/ai/occupant = null var/mob/living/silicon/ai/occupant = null

View File

@@ -9,6 +9,7 @@ var/global/list/minor_air_alarms = list()
desc = "Used to access the station's atmospheric sensors." desc = "Used to access the station's atmospheric sensors."
circuit = "/obj/item/weapon/circuitboard/atmos_alert" circuit = "/obj/item/weapon/circuitboard/atmos_alert"
icon_state = "alert:0" icon_state = "alert:0"
light_color = "#e6ffff"
/obj/machinery/computer/atmos_alert/New() /obj/machinery/computer/atmos_alert/New()
..() ..()

View File

@@ -6,6 +6,7 @@
name = "\improper Central Atmospherics Computer" name = "\improper Central Atmospherics Computer"
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "computer_generic" icon_state = "computer_generic"
light_color = "#00b000"
density = 1 density = 1
anchored = 1.0 anchored = 1.0
circuit = "/obj/item/weapon/circuitboard/atmoscontrol" circuit = "/obj/item/weapon/circuitboard/atmoscontrol"

View File

@@ -1,19 +1,20 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/var/camera_cache_id = 1
/proc/invalidateCameraCache() /proc/invalidateCameraCache()
for(var/obj/machinery/computer/security/s in world) camera_cache_id = (++camera_cache_id % 999999)
s.camera_cache = null
for(var/datum/alarm/A in world)
A.cameras = null
/obj/machinery/computer/security /obj/machinery/computer/security
name = "security camera monitor" name = "security camera monitor"
desc = "Used to access the various cameras on the station." desc = "Used to access the various cameras on the station."
icon_state = "cameras" icon_state = "cameras"
light_color = "#a91515"
var/obj/machinery/camera/current = null var/obj/machinery/camera/current = null
var/last_pic = 1.0 var/last_pic = 1.0
var/list/network var/list/network
var/mapping = 0//For the overview file, interesting bit of code. var/mapping = 0//For the overview file, interesting bit of code.
var/cache_id = 0
circuit = /obj/item/weapon/circuitboard/security circuit = /obj/item/weapon/circuitboard/security
var/camera_cache = null var/camera_cache = null
@@ -42,7 +43,8 @@
data["current"] = null data["current"] = null
if(isnull(camera_cache)) if(camera_cache_id != cache_id)
cache_id = camera_cache_id
cameranet.process_sort() cameranet.process_sort()
var/cameras[0] var/cameras[0]
@@ -53,18 +55,11 @@
var/cam = C.nano_structure() var/cam = C.nano_structure()
cameras[++cameras.len] = cam cameras[++cameras.len] = cam
if(C == current) camera_cache=list2json(cameras)
data["current"] = cam
var/list/camera_list = list("cameras" = cameras) if(current)
camera_cache=list2json(camera_list) data["current"] = current.nano_structure()
else data["cameras"] = list("__json_cache" = camera_cache)
if(current)
data["current"] = current.nano_structure()
if(ui)
ui.load_cached_data(camera_cache)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui) if (!ui)
@@ -74,8 +69,7 @@
ui.add_template("mapContent", "sec_camera_map_content.tmpl") ui.add_template("mapContent", "sec_camera_map_content.tmpl")
// adding a template with the key "mapHeader" replaces the map header content // adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "sec_camera_map_header.tmpl") ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
ui.load_cached_data(camera_cache)
ui.set_initial_data(data) ui.set_initial_data(data)
ui.open() ui.open()
ui.set_auto_update(1) ui.set_auto_update(1)
@@ -220,6 +214,8 @@
desc = "Damn, why do they never have anything interesting on these things?" desc = "Damn, why do they never have anything interesting on these things?"
icon = 'icons/obj/status_display.dmi' icon = 'icons/obj/status_display.dmi'
icon_state = "entertainment" icon_state = "entertainment"
light_color = "#FFEEDB"
light_range_on = 2
circuit = null circuit = null
/obj/machinery/computer/security/wooden_tv /obj/machinery/computer/security/wooden_tv
@@ -227,7 +223,8 @@
desc = "An old TV hooked into the stations camera network." desc = "An old TV hooked into the stations camera network."
icon_state = "security_det" icon_state = "security_det"
circuit = null circuit = null
light_color = "#3848B3"
light_power_on = 0.5
/obj/machinery/computer/security/mining /obj/machinery/computer/security/mining
name = "outpost camera monitor" name = "outpost camera monitor"
@@ -235,12 +232,14 @@
icon_state = "miningcameras" icon_state = "miningcameras"
network = list("MINE") network = list("MINE")
circuit = /obj/item/weapon/circuitboard/security/mining circuit = /obj/item/weapon/circuitboard/security/mining
light_color = "#F9BBFC"
/obj/machinery/computer/security/engineering /obj/machinery/computer/security/engineering
name = "engineering camera monitor" name = "engineering camera monitor"
desc = "Used to monitor fires and breaches." desc = "Used to monitor fires and breaches."
icon_state = "engineeringcameras" icon_state = "engineeringcameras"
circuit = /obj/item/weapon/circuitboard/security/engineering circuit = /obj/item/weapon/circuitboard/security/engineering
light_color = "#FAC54B"
/obj/machinery/computer/security/engineering/New() /obj/machinery/computer/security/engineering/New()
if(!network) if(!network)

View File

@@ -4,6 +4,7 @@
name = "\improper ID card modification console" name = "\improper ID card modification console"
desc = "Terminal for programming NanoTrasen employee ID cards to access parts of the station." desc = "Terminal for programming NanoTrasen employee ID cards to access parts of the station."
icon_state = "id" icon_state = "id"
light_color = "#0099ff"
req_access = list(access_change_ids) req_access = list(access_change_ids)
circuit = "/obj/item/weapon/circuitboard/card" circuit = "/obj/item/weapon/circuitboard/card"
var/obj/item/weapon/card/id/scan = null var/obj/item/weapon/card/id/scan = null

View File

@@ -2,6 +2,7 @@
name = "cloning control console" name = "cloning control console"
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "dna" icon_state = "dna"
light_color = "#315ab4"
circuit = "/obj/item/weapon/circuitboard/cloning" circuit = "/obj/item/weapon/circuitboard/cloning"
req_access = list(access_heads) //Only used for record deletion right now. req_access = list(access_heads) //Only used for record deletion right now.
var/obj/machinery/dna_scannernew/scanner = null //Linked scanner. For scanning. var/obj/machinery/dna_scannernew/scanner = null //Linked scanner. For scanning.
@@ -14,20 +15,18 @@
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything. var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
var/loading = 0 // Nice loading text var/loading = 0 // Nice loading text
/obj/machinery/computer/cloning/New() /obj/machinery/computer/cloning/initialize()
..()
updatemodules()
/obj/machinery/computer/cloning/Destroy()
releasecloner()
..() ..()
spawn(5)
updatemodules()
return
return
/obj/machinery/computer/cloning/proc/updatemodules() /obj/machinery/computer/cloning/proc/updatemodules()
src.scanner = findscanner() src.scanner = findscanner()
releasecloner()
findcloner() findcloner()
var/num = 1
for (var/obj/machinery/clonepod/pod in pods)
pod.connected = src
pod.name = "[initial(pod.name)] #[num++]"
/obj/machinery/computer/cloning/proc/findscanner() /obj/machinery/computer/cloning/proc/findscanner()
var/obj/machinery/dna_scannernew/scannerf = null var/obj/machinery/dna_scannernew/scannerf = null
@@ -40,18 +39,26 @@
//Then look for a free one in the area //Then look for a free one in the area
if(!scannerf) if(!scannerf)
for(var/obj/machinery/dna_scannernew/S in get_area(src)) var/area/A = get_area(src)
for(var/obj/machinery/dna_scannernew/S in A.get_contents())
return S return S
return return
/obj/machinery/computer/cloning/proc/findcloner() /obj/machinery/computer/cloning/proc/releasecloner()
for(var/obj/machinery/clonepod/P in pods)
P.connected = null
P.name = initial(P.name)
pods.Cut() pods.Cut()
for(var/obj/machinery/clonepod/P in get_area(src))
/obj/machinery/computer/cloning/proc/findcloner()
var/num = 1
var/area/A = get_area(src)
for(var/obj/machinery/clonepod/P in A.get_contents())
if(!P.connected) if(!P.connected)
pods += P pods += P
P.connected = src
return P.name = "[initial(P.name)] #[num++]"
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob) /obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES

View File

@@ -5,6 +5,7 @@
name = "command and communications console" name = "command and communications console"
desc = "Used to command and control the station. Can relay long-range communications." desc = "Used to command and control the station. Can relay long-range communications."
icon_state = "comm" icon_state = "comm"
light_color = "#0099ff"
req_access = list(access_heads) req_access = list(access_heads)
circuit = "/obj/item/weapon/circuitboard/communications" circuit = "/obj/item/weapon/circuitboard/communications"
var/prints_intercept = 1 var/prints_intercept = 1

View File

@@ -9,6 +9,9 @@
var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled. var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled.
var/processing = 0 var/processing = 0
var/light_range_on = 3
var/light_power_on = 1
/obj/machinery/computer/initialize() /obj/machinery/computer/initialize()
power_change() power_change()
@@ -21,7 +24,7 @@
for(var/x in verbs) for(var/x in verbs)
verbs -= x verbs -= x
set_broken() set_broken()
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread() var/datum/effect/effect/system/smoke_spread/smoke = PoolOrNew(/datum/effect/effect/system/smoke_spread)
smoke.set_up(5, 0, src) smoke.set_up(5, 0, src)
smoke.start() smoke.start()
return return
@@ -54,6 +57,9 @@
return return
/obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj) /obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
if(prob(Proj.damage)) if(prob(Proj.damage))
set_broken() set_broken()
..() ..()
@@ -83,6 +89,10 @@
/obj/machinery/computer/power_change() /obj/machinery/computer/power_change()
..() ..()
update_icon() update_icon()
if(stat & NOPOWER)
set_light(0)
else
set_light(light_range_on, light_power_on)
/obj/machinery/computer/proc/set_broken() /obj/machinery/computer/proc/set_broken()

View File

@@ -2,6 +2,7 @@
name = "crew monitoring computer" name = "crew monitoring computer"
desc = "Used to monitor active health sensors built into most of the crew's uniforms." desc = "Used to monitor active health sensors built into most of the crew's uniforms."
icon_state = "crew" icon_state = "crew"
light_color = "#315ab4"
use_power = 1 use_power = 1
idle_power_usage = 250 idle_power_usage = 250
active_power_usage = 500 active_power_usage = 500

View File

@@ -5,6 +5,7 @@
name = "guest pass" name = "guest pass"
desc = "Allows temporary access to station areas." desc = "Allows temporary access to station areas."
icon_state = "guest" icon_state = "guest"
light_color = "#0099ff"
var/temp_access = list() //to prevent agent cards stealing access as permanent var/temp_access = list() //to prevent agent cards stealing access as permanent
var/expiration_time = 0 var/expiration_time = 0
@@ -186,4 +187,4 @@
else else
usr << "\red Cannot issue pass without issuing ID." usr << "\red Cannot issue pass without issuing ID."
updateUsrDialog() updateUsrDialog()
return return

View File

@@ -4,6 +4,7 @@
name = "medical records console" name = "medical records console"
desc = "Used to view, edit and maintain medical records." desc = "Used to view, edit and maintain medical records."
icon_state = "medcomp" icon_state = "medcomp"
light_color = "#315ab4"
req_one_access = list(access_medical, access_forensics_lockers) req_one_access = list(access_medical, access_forensics_lockers)
circuit = "/obj/item/weapon/circuitboard/med_data" circuit = "/obj/item/weapon/circuitboard/med_data"
var/obj/item/weapon/card/id/scan = null var/obj/item/weapon/card/id/scan = null

View File

@@ -4,6 +4,7 @@
name = "messaging monitor console" name = "messaging monitor console"
desc = "Used to access and maintain data on messaging servers. Allows you to view PDA and request console messages." desc = "Used to access and maintain data on messaging servers. Allows you to view PDA and request console messages."
icon_state = "comm_logs" icon_state = "comm_logs"
light_color = "#00b000"
var/hack_icon = "comm_logsc" var/hack_icon = "comm_logsc"
var/normal_icon = "comm_logs" var/normal_icon = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/message_monitor" circuit = "/obj/item/weapon/circuitboard/message_monitor"

View File

@@ -4,6 +4,7 @@
name = "pod launch control console" name = "pod launch control console"
desc = "A control console for launching pods. Some people prefer firing Mechas." desc = "A control console for launching pods. Some people prefer firing Mechas."
icon_state = "computer_generic" icon_state = "computer_generic"
light_color = "#00b000"
circuit = /obj/item/weapon/circuitboard/pod circuit = /obj/item/weapon/circuitboard/pod
var/id = 1.0 var/id = 1.0
var/obj/machinery/mass_driver/connected = null var/obj/machinery/mass_driver/connected = null

View File

@@ -4,6 +4,7 @@
name = "prisoner management console" name = "prisoner management console"
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "explosive" icon_state = "explosive"
light_color = "#a91515"
req_access = list(access_armory) req_access = list(access_armory)
circuit = "/obj/item/weapon/circuitboard/prisoner" circuit = "/obj/item/weapon/circuitboard/prisoner"
var/id = 0.0 var/id = 0.0

View File

@@ -14,6 +14,7 @@ var/prison_shuttle_timeleft = 0
name = "prison shuttle control console" name = "prison shuttle control console"
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "shuttle" icon_state = "shuttle"
light_color = "#00ffff"
req_access = list(access_security) req_access = list(access_security)
circuit = "/obj/item/weapon/circuitboard/prison_shuttle" circuit = "/obj/item/weapon/circuitboard/prison_shuttle"
var/temp = null var/temp = null
@@ -233,4 +234,4 @@ var/prison_shuttle_timeleft = 0
pest.gib() pest.gib()
start_location.move_contents_to(end_location) start_location.move_contents_to(end_location)
return return

View File

@@ -5,6 +5,7 @@
desc = "Used to remotely lockdown or detonate linked cyborgs." desc = "Used to remotely lockdown or detonate linked cyborgs."
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "robot" icon_state = "robot"
light_color = "#a97faa"
req_access = list(access_robotics) req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/robotics" circuit = "/obj/item/weapon/circuitboard/robotics"

View File

@@ -4,6 +4,7 @@
name = "security records console" name = "security records console"
desc = "Used to view, edit and maintain security records" desc = "Used to view, edit and maintain security records"
icon_state = "security" icon_state = "security"
light_color = "#a91515"
req_one_access = list(access_security, access_forensics_lockers) req_one_access = list(access_security, access_forensics_lockers)
circuit = "/obj/item/weapon/circuitboard/secure_data" circuit = "/obj/item/weapon/circuitboard/secure_data"
var/obj/item/weapon/card/id/scan = null var/obj/item/weapon/card/id/scan = null

View File

@@ -2,6 +2,7 @@
name = "Shuttle" name = "Shuttle"
desc = "For shuttle control." desc = "For shuttle control."
icon_state = "shuttle" icon_state = "shuttle"
light_color = "#00ffff"
var/auth_need = 3.0 var/auth_need = 3.0
var/list/authorized = list( ) var/list/authorized = list( )

View File

@@ -4,6 +4,7 @@
name = "employment records console" name = "employment records console"
desc = "Used to view, edit and maintain employment records." desc = "Used to view, edit and maintain employment records."
icon_state = "medlaptop" icon_state = "medlaptop"
light_color = "#00b000"
req_one_access = list(access_heads) req_one_access = list(access_heads)
circuit = "/obj/item/weapon/circuitboard/skills" circuit = "/obj/item/weapon/circuitboard/skills"
var/obj/item/weapon/card/id/scan = null var/obj/item/weapon/card/id/scan = null
@@ -411,4 +412,4 @@ What a mess.*/
qdel(R) qdel(R)
continue continue
..(severity) ..(severity)

View File

@@ -15,6 +15,7 @@ var/specops_shuttle_timeleft = 0
name = "special operations shuttle control console" name = "special operations shuttle control console"
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "shuttle" icon_state = "shuttle"
light_color = "#00ffff"
req_access = list(access_cent_specops) req_access = list(access_cent_specops)
// req_access = list(ACCESS_CENT_SPECOPS) // req_access = list(ACCESS_CENT_SPECOPS)
var/temp = null var/temp = null

View File

@@ -3,13 +3,18 @@
name = "Station Alert Console" name = "Station Alert Console"
desc = "Used to access the station's automated alert system." desc = "Used to access the station's automated alert system."
icon_state = "alert:0" icon_state = "alert:0"
circuit = "/obj/item/weapon/circuitboard/stationalert" light_color = "#e6ffff"
circuit = /obj/item/weapon/circuitboard/stationalert_engineering
var/obj/nano_module/alarm_monitor/alarm_monitor var/obj/nano_module/alarm_monitor/alarm_monitor
var/monitor_type = /obj/nano_module/alarm_monitor/engineering var/monitor_type = /obj/nano_module/alarm_monitor/engineering
/obj/machinery/computer/station_alert/security /obj/machinery/computer/station_alert/security
name = "Security Alert Console"
monitor_type = /obj/nano_module/alarm_monitor/security monitor_type = /obj/nano_module/alarm_monitor/security
circuit = /obj/item/weapon/circuitboard/stationalert_security
/obj/machinery/computer/station_alert/all
monitor_type = /obj/nano_module/alarm_monitor/all
circuit = /obj/item/weapon/circuitboard/stationalert_all
/obj/machinery/computer/station_alert/New() /obj/machinery/computer/station_alert/New()
..() ..()
@@ -18,6 +23,7 @@
/obj/machinery/computer/station_alert/Destroy() /obj/machinery/computer/station_alert/Destroy()
alarm_monitor.unregister(src) alarm_monitor.unregister(src)
qdel(alarm_monitor)
..() ..()
/obj/machinery/computer/station_alert/attack_ai(mob/user) /obj/machinery/computer/station_alert/attack_ai(mob/user)

View File

@@ -2,6 +2,7 @@
name = "supply control console" name = "supply control console"
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "supply" icon_state = "supply"
light_color = "#b88b2e"
req_access = list(access_cargo) req_access = list(access_cargo)
circuit = "/obj/item/weapon/circuitboard/supplycomp" circuit = "/obj/item/weapon/circuitboard/supplycomp"
var/temp = null var/temp = null

View File

@@ -14,6 +14,7 @@ var/syndicate_elite_shuttle_timeleft = 0
name = "elite syndicate squad shuttle control console" name = "elite syndicate squad shuttle control console"
icon = 'icons/obj/computer.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle" icon_state = "syndishuttle"
light_color = "#00ffff"
req_access = list(access_cent_specops) req_access = list(access_cent_specops)
var/temp = null var/temp = null
var/hacked = 0 var/hacked = 0
@@ -256,4 +257,4 @@ var/syndicate_elite_shuttle_timeleft = 0
add_fingerprint(usr) add_fingerprint(usr)
updateUsrDialog() updateUsrDialog()
return return

View File

@@ -15,7 +15,6 @@
var/list/req_components = null var/list/req_components = null
var/powernet = null var/powernet = null
var/list/records = null var/list/records = null
var/frame_desc = null
var/datum/file/program/OS = new/datum/file/program/ntos var/datum/file/program/OS = new/datum/file/program/ntos

View File

@@ -278,8 +278,8 @@
chan = power_channel chan = power_channel
var/area/A = get_area(loc) var/area/A = get_area(loc)
if(istype(A) && A.master && A.master.powered(chan)) if(istype(A) && A.powered(chan))
A.master.use_power(amount, chan) A.use_power(amount, chan)
else if(battery && battery.charge > 0) else if(battery && battery.charge > 0)
battery.use(amount) battery.use(amount)

View File

@@ -143,10 +143,9 @@
if(typekey == null) if(typekey == null)
typekey = /obj/machinery typekey = /obj/machinery
var/list/machines = list() var/list/machines = list()
for(var/area/area in A.related) for(var/obj/O in A.contents)
for(var/obj/O in area.contents) if(istype(O,typekey))
if(istype(O,typekey)) machines |= O
machines |= O
return machines return machines
verify_machine(var/obj/previous) verify_machine(var/obj/previous)
if(!previous) return 0 if(!previous) return 0

View File

@@ -18,15 +18,11 @@
proc/update_desc() proc/update_desc()
var/D var/D
if(req_components) if(req_components)
D = "Requires " var/list/component_list = new
var/first = 1
for(var/I in req_components) for(var/I in req_components)
if(req_components[I] > 0) if(req_components[I] > 0)
D += "[first?"":", "][num2text(req_components[I])] [req_component_names[I]]" component_list += "[num2text(req_components[I])] [req_component_names[I]]"
first = 0 D = "Requires [english_list(component_list)]."
if(first) // nothing needs to be added, then
D += "nothing"
D += "."
desc = D desc = D
/obj/machinery/constructable_frame/machine_frame /obj/machinery/constructable_frame/machine_frame
@@ -74,10 +70,7 @@
var/cp = text2path(A) var/cp = text2path(A)
var/obj/ct = new cp() // have to quickly instantiate it get name var/obj/ct = new cp() // have to quickly instantiate it get name
req_component_names[A] = ct.name req_component_names[A] = ct.name
if(circuit.frame_desc) update_desc()
desc = circuit.frame_desc
else
update_desc()
user << desc user << desc
else else
user << "\red This frame does not accept circuit boards of this type!" user << "\red This frame does not accept circuit boards of this type!"

View File

@@ -272,11 +272,7 @@
for(var/turf/simulated/floor/target_tile in range(2,loc)) for(var/turf/simulated/floor/target_tile in range(2,loc))
target_tile.assume_gas("phoron", 35, 400+T0C) target_tile.assume_gas("phoron", 35, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400) spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/phoron/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve for(var/turf/simulated/wall/W in range(3,src))
var/turf/T = get_turf(F)
T.ChangeTurf(/turf/simulated/wall/mineral/phoron/)
qdel (F)
for(var/turf/simulated/wall/mineral/phoron/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/phoron/D in range(3,src)) for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
D.ignite(temperature/4) D.ignite(temperature/4)
@@ -613,7 +609,7 @@ About the new airlock wires panel:
if (src.isElectrified()) if (src.isElectrified())
if (istype(mover, /obj/item)) if (istype(mover, /obj/item))
var/obj/item/i = mover var/obj/item/i = mover
if (i.matter && ("metal" in i.matter) && i.matter["metal"] > 0) if (i.matter && (DEFAULT_WALL_MATERIAL in i.matter) && i.matter[DEFAULT_WALL_MATERIAL] > 0)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src) s.set_up(5, 1, src)
s.start() s.start()
@@ -1019,12 +1015,18 @@ About the new airlock wires panel:
else else
wires = new/datum/wires/airlock(src) wires = new/datum/wires/airlock(src)
/obj/machinery/door/airlock/initialize()
if(src.closeOtherId != null) if(src.closeOtherId != null)
spawn (5) for (var/obj/machinery/door/airlock/A in world)
for (var/obj/machinery/door/airlock/A in world) if(A.closeOtherId == src.closeOtherId && A != src)
if(A.closeOtherId == src.closeOtherId && A != src) src.closeOther = A
src.closeOther = A break
break
/obj/machinery/door/airlock/Destroy()
if(wires)
qdel(wires)
wires = null
..()
// Most doors will never be deconstructed over the course of a round, // Most doors will never be deconstructed over the course of a round,
// so as an optimization defer the creation of electronics until // so as an optimization defer the creation of electronics until

View File

@@ -6,7 +6,7 @@
icon_state = "door_electronics" icon_state = "door_electronics"
w_class = 2.0 //It should be tiny! -Agouri w_class = 2.0 //It should be tiny! -Agouri
matter = list("metal" = 50,"glass" = 50) matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 50)
req_access = list(access_engine) req_access = list(access_engine)

View File

@@ -34,8 +34,6 @@
var/alert = signal.data["alert"] var/alert = signal.data["alert"]
var/area/our_area = get_area(src) var/area/our_area = get_area(src)
if (our_area.master)
our_area = our_area.master
if(alarm_area == our_area.name) if(alarm_area == our_area.name)
switch(alert) switch(alert)
@@ -44,4 +42,4 @@
close() close()
if("minor", "clear") if("minor", "clear")
autoclose = 0 autoclose = 0
open() open()

View File

@@ -23,8 +23,8 @@
var/id = 1.0 var/id = 1.0
dir = 1 dir = 1
explosion_resistance = 25 explosion_resistance = 25
//Most blast doors are infrequently toggled and sometimes used with regular doors anyways, //Most blast doors are infrequently toggled and sometimes used with regular doors anyways,
//turning this off prevents awkward zone geometry in places like medbay lobby, for example. //turning this off prevents awkward zone geometry in places like medbay lobby, for example.
block_air_zones = 0 block_air_zones = 0
@@ -56,7 +56,7 @@
src.density = 0 src.density = 0
update_nearby_tiles() update_nearby_tiles()
src.update_icon() src.update_icon()
src.SetOpacity(0) src.set_opacity(0)
sleep(15) sleep(15)
src.layer = open_layer src.layer = open_layer
src.operating = 0 src.operating = 0
@@ -71,7 +71,7 @@
src.density = 1 src.density = 1
update_nearby_tiles() update_nearby_tiles()
src.update_icon() src.update_icon()
src.SetOpacity(initial(opacity)) src.set_opacity(initial(opacity))
sleep(15) sleep(15)
src.operating = 0 src.operating = 0

View File

@@ -35,11 +35,11 @@
..() ..()
spawn(20) spawn(20)
for(var/obj/machinery/door/window/brigdoor/M in world) for(var/obj/machinery/door/window/brigdoor/M in machines)
if (M.id == src.id) if (M.id == src.id)
targets += M targets += M
for(var/obj/machinery/flasher/F in world) for(var/obj/machinery/flasher/F in machines)
if(F.id == src.id) if(F.id == src.id)
targets += F targets += F
@@ -345,4 +345,4 @@
#undef FONT_SIZE #undef FONT_SIZE
#undef FONT_COLOR #undef FONT_COLOR
#undef FONT_STYLE #undef FONT_STYLE
#undef CHARS_PER_LINE #undef CHARS_PER_LINE

View File

@@ -394,14 +394,14 @@
do_animate("opening") do_animate("opening")
icon_state = "door0" icon_state = "door0"
src.SetOpacity(0) set_opacity(0)
sleep(3) sleep(3)
src.density = 0 src.density = 0
sleep(7) sleep(7)
src.layer = open_layer src.layer = open_layer
explosion_resistance = 0 explosion_resistance = 0
update_icon() update_icon()
SetOpacity(0) set_opacity(0)
update_nearby_tiles() update_nearby_tiles()
operating = 0 operating = 0
@@ -427,7 +427,7 @@
sleep(7) sleep(7)
update_icon() update_icon()
if(visible && !glass) if(visible && !glass)
SetOpacity(1) //caaaaarn! set_opacity(1) //caaaaarn!
operating = 0 operating = 0
update_nearby_tiles() update_nearby_tiles()

View File

@@ -7,7 +7,7 @@
min_force = 4 min_force = 4
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 150 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file maxhealth = 150 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
health health = 150
visible = 0.0 visible = 0.0
use_power = 0 use_power = 0
flags = ON_BORDER flags = ON_BORDER
@@ -249,13 +249,14 @@
/obj/machinery/door/window/brigdoor /obj/machinery/door/window/brigdoor
name = "Secure Door" name = "secure door"
icon = 'icons/obj/doors/windoor.dmi' icon = 'icons/obj/doors/windoor.dmi'
icon_state = "leftsecure" icon_state = "leftsecure"
base_state = "leftsecure" base_state = "leftsecure"
req_access = list(access_security) req_access = list(access_security)
var/id = null var/id = null
health = 300.0 //Stronger doors for prison (regular window door health is 200) maxhealth = 300
health = 300.0 //Stronger doors for prison (regular window door health is 150)
/obj/machinery/door/window/northleft /obj/machinery/door/window/northleft

View File

@@ -26,7 +26,7 @@
else else
on = 0 on = 0
updateicon() updateicon()
SetLuminosity(0) set_light(0)
src.visible_message("<span class='warning'>[src] shuts down due to lack of power!</span>") src.visible_message("<span class='warning'>[src] shuts down due to lack of power!</span>")
return return
@@ -50,7 +50,7 @@
if(on) if(on)
on = 0 on = 0
user << "\blue You turn off the light" user << "\blue You turn off the light"
SetLuminosity(0) set_light(0)
else else
if(!cell) if(!cell)
return return
@@ -58,7 +58,7 @@
return return
on = 1 on = 1
user << "\blue You turn on the light" user << "\blue You turn on the light"
SetLuminosity(brightness_on) set_light(brightness_on)
updateicon() updateicon()

View File

@@ -37,7 +37,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
icon_state = "holopad0" icon_state = "holopad0"
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them. layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
var/power_per_hologram = 500 //per usage per hologram var/power_per_hologram = 500 //per usage per hologram
idle_power_usage = 5 idle_power_usage = 5
use_power = 1 use_power = 1
@@ -120,10 +120,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them. hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
hologram.anchored = 1//So space wind cannot drag it. hologram.anchored = 1//So space wind cannot drag it.
hologram.name = "[A.name] (Hologram)"//If someone decides to right click. hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
hologram.SetLuminosity(2) //hologram lighting hologram.set_light(2) //hologram lighting
hologram.color = color //painted holopad gives coloured holograms hologram.color = color //painted holopad gives coloured holograms
masters[A] = hologram masters[A] = hologram
SetLuminosity(2) //pad lighting set_light(2) //pad lighting
icon_state = "holopad1" icon_state = "holopad1"
A.holo = src A.holo = src
return 1 return 1
@@ -134,7 +134,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
qdel(masters[user])//Get rid of user's hologram qdel(masters[user])//Get rid of user's hologram
masters -= user //Discard AI from the list of those who use holopad masters -= user //Discard AI from the list of those who use holopad
if (!masters.len)//If no users left if (!masters.len)//If no users left
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted) set_light(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
icon_state = "holopad0" icon_state = "holopad0"
return 1 return 1
@@ -144,16 +144,15 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
if((stat & NOPOWER) || !active_ai) if((stat & NOPOWER) || !active_ai)
clear_holo(master) clear_holo(master)
continue continue
if((HOLOPAD_MODE == RANGE_BASED && (get_dist(master.eyeobj, src) > holo_range))) if((HOLOPAD_MODE == RANGE_BASED && (get_dist(master.eyeobj, src) > holo_range)))
clear_holo(master) clear_holo(master)
continue continue
if(HOLOPAD_MODE == AREA_BASED) if(HOLOPAD_MODE == AREA_BASED)
var/area/holo_area = get_area(src) var/area/holo_area = get_area(src)
var/area/eye_area = get_area(master.eyeobj) var/area/eye_area = get_area(master.eyeobj)
if(eye_area != holo_area)
if(!(eye_area in holo_area.master.related))
clear_holo(master) clear_holo(master)
continue continue

View File

@@ -188,11 +188,10 @@ datum/track/New(var/title_name, var/audio)
/obj/machinery/media/jukebox/proc/StopPlaying() /obj/machinery/media/jukebox/proc/StopPlaying()
var/area/main_area = get_area(src) var/area/main_area = get_area(src)
// Always kill the current sound // Always kill the current sound
for(var/area/related_area in main_area.related) for(var/mob/living/M in mobs_in_area(main_area))
for(var/mob/living/M in mobs_in_area(related_area)) M << sound(null, channel = 1)
M << sound(null, channel = 1)
related_area.forced_ambience = null main_area.forced_ambience = null
playing = 0 playing = 0
update_use_power(1) update_use_power(1)
update_icon() update_icon()
@@ -204,12 +203,10 @@ datum/track/New(var/title_name, var/audio)
return return
var/area/main_area = get_area(src) var/area/main_area = get_area(src)
for(var/area/related_area in main_area.related) main_area.forced_ambience = list(current_track.sound)
related_area.forced_ambience = list(current_track.sound) for(var/mob/living/M in mobs_in_area(main_area))
if(M.mind)
for(var/mob/living/M in mobs_in_area(related_area)) main_area.play_ambience(M)
if(M.mind)
related_area.play_ambience(M)
playing = 1 playing = 1
update_use_power(2) update_use_power(2)

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