Merge pull request #7964 from Baystation12/dev-freeze

Dev-Freezer -> Master v0.1.17 Botswan Punchout
This commit is contained in:
Zuhayr
2015-02-02 02:14:08 +10:30
1191 changed files with 44223 additions and 39318 deletions
+4
View File
@@ -2,5 +2,9 @@
# needs additional setup, see tools/mapmerge/install.txt
*.dmm merge=merge-dmm
# dmi icon merger hook
# needs additional setup, see tools/dmitool/merging.txt
*.dmi merge=merge-dmi
# force changelog merging to use union
html/changelog.html merge=union
+94 -27
View File
@@ -28,6 +28,7 @@
#include "code\__HELPERS\sanitize_values.dm"
#include "code\__HELPERS\text.dm"
#include "code\__HELPERS\time.dm"
#include "code\__HELPERS\turfs.dm"
#include "code\__HELPERS\type2type.dm"
#include "code\__HELPERS\unsorted.dm"
#include "code\_onclick\adjacent.dm"
@@ -164,6 +165,21 @@
#include "code\datums\spells\trigger.dm"
#include "code\datums\spells\turf_teleport.dm"
#include "code\datums\spells\wizard.dm"
#include "code\datums\wires\airlock.dm"
#include "code\datums\wires\alarm.dm"
#include "code\datums\wires\apc.dm"
#include "code\datums\wires\autolathe.dm"
#include "code\datums\wires\camera.dm"
#include "code\datums\wires\explosive.dm"
#include "code\datums\wires\mulebot.dm"
#include "code\datums\wires\particle_accelerator.dm"
#include "code\datums\wires\radio.dm"
#include "code\datums\wires\robot.dm"
#include "code\datums\wires\smartfridge.dm"
#include "code\datums\wires\smes.dm"
#include "code\datums\wires\suit_storage_unit.dm"
#include "code\datums\wires\vending.dm"
#include "code\datums\wires\wires.dm"
#include "code\defines\obj.dm"
#include "code\defines\obj\weapon.dm"
#include "code\defines\procs\admin.dm"
@@ -225,8 +241,6 @@
#include "code\game\gamemodes\events\clang.dm"
#include "code\game\gamemodes\events\dust.dm"
#include "code\game\gamemodes\events\miniblob.dm"
#include "code\game\gamemodes\events\ninja_abilities.dm"
#include "code\game\gamemodes\events\ninja_equipment.dm"
#include "code\game\gamemodes\events\power_failure.dm"
#include "code\game\gamemodes\events\space_ninja.dm"
#include "code\game\gamemodes\events\spacevines.dm"
@@ -307,6 +321,7 @@
#include "code\game\machinery\holosign.dm"
#include "code\game\machinery\igniter.dm"
#include "code\game\machinery\iv_drip.dm"
#include "code\game\machinery\jukebox.dm"
#include "code\game\machinery\lightswitch.dm"
#include "code\game\machinery\machinery.dm"
#include "code\game\machinery\magnet.dm"
@@ -315,6 +330,7 @@
#include "code\game\machinery\newscaster.dm"
#include "code\game\machinery\OpTable.dm"
#include "code\game\machinery\overview.dm"
#include "code\game\machinery\portable_tag_turret.dm"
#include "code\game\machinery\portable_turret.dm"
#include "code\game\machinery\recharger.dm"
#include "code\game\machinery\rechargestation.dm"
@@ -324,10 +340,12 @@
#include "code\game\machinery\Sleeper.dm"
#include "code\game\machinery\spaceheater.dm"
#include "code\game\machinery\status_display.dm"
#include "code\game\machinery\status_display_ai.dm"
#include "code\game\machinery\suit_storage_unit.dm"
#include "code\game\machinery\supply_display.dm"
#include "code\game\machinery\syndicatebeacon.dm"
#include "code\game\machinery\teleporter.dm"
#include "code\game\machinery\turret_control.dm"
#include "code\game\machinery\turrets.dm"
#include "code\game\machinery\vending.dm"
#include "code\game\machinery\washing_machine.dm"
@@ -350,7 +368,6 @@
#include "code\game\machinery\camera\motion.dm"
#include "code\game\machinery\camera\presets.dm"
#include "code\game\machinery\camera\tracking.dm"
#include "code\game\machinery\camera\wires.dm"
#include "code\game\machinery\computer\ai_core.dm"
#include "code\game\machinery\computer\aifixer.dm"
#include "code\game\machinery\computer\arcade.dm"
@@ -371,24 +388,26 @@
#include "code\game\machinery\computer\pod.dm"
#include "code\game\machinery\computer\prisoner.dm"
#include "code\game\machinery\computer\prisonshuttle.dm"
#include "code\game\machinery\computer\RCON_Console.dm"
#include "code\game\machinery\computer\robot.dm"
#include "code\game\machinery\computer\security.dm"
#include "code\game\machinery\computer\shuttle.dm"
#include "code\game\machinery\computer\skills.dm"
#include "code\game\machinery\computer\specops_shuttle.dm"
#include "code\game\machinery\computer\station_alert.dm"
#include "code\game\machinery\computer\supply.dm"
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
#include "code\game\machinery\doors\airlock.dm"
#include "code\game\machinery\doors\airlock_control.dm"
#include "code\game\machinery\doors\airlock_electronics.dm"
#include "code\game\machinery\doors\alarmlock.dm"
#include "code\game\machinery\doors\blast_door.dm"
#include "code\game\machinery\doors\brigdoors.dm"
#include "code\game\machinery\doors\checkForMultipleDoors.dm"
#include "code\game\machinery\doors\door.dm"
#include "code\game\machinery\doors\firedoor.dm"
#include "code\game\machinery\doors\firedoor_assembly.dm"
#include "code\game\machinery\doors\multi_tile.dm"
#include "code\game\machinery\doors\poddoor.dm"
#include "code\game\machinery\doors\shutters.dm"
#include "code\game\machinery\doors\unpowered.dm"
#include "code\game\machinery\doors\windowdoor.dm"
#include "code\game\machinery\embedded_controller\airlock_controllers.dm"
@@ -432,9 +451,9 @@
#include "code\game\mecha\equipment\tools\medical_tools.dm"
#include "code\game\mecha\equipment\tools\tools.dm"
#include "code\game\mecha\equipment\weapons\weapons.dm"
#include "code\game\mecha\hoverpod\hoverpod.dm"
#include "code\game\mecha\medical\medical.dm"
#include "code\game\mecha\medical\odysseus.dm"
#include "code\game\mecha\working\hoverpod.dm"
#include "code\game\mecha\working\ripley.dm"
#include "code\game\mecha\working\working.dm"
#include "code\game\objects\empulse.dm"
@@ -444,7 +463,6 @@
#include "code\game\objects\objs.dm"
#include "code\game\objects\structures.dm"
#include "code\game\objects\weapons.dm"
#include "code\game\objects\closets\walllocker.dm"
#include "code\game\objects\effects\aliens.dm"
#include "code\game\objects\effects\bump_teleporter.dm"
#include "code\game\objects\effects\chemsmoke.dm"
@@ -560,11 +578,29 @@
#include "code\game\objects\items\weapons\surgery_tools.dm"
#include "code\game\objects\items\weapons\swords_axes_etc.dm"
#include "code\game\objects\items\weapons\table_rack_parts.dm"
#include "code\game\objects\items\weapons\tape.dm"
#include "code\game\objects\items\weapons\teleportation.dm"
#include "code\game\objects\items\weapons\tools.dm"
#include "code\game\objects\items\weapons\twohanded.dm"
#include "code\game\objects\items\weapons\weaponry.dm"
#include "code\game\objects\items\weapons\wires.dm"
#include "code\game\objects\items\weapons\circuitboards\broken.dm"
#include "code\game\objects\items\weapons\circuitboards\circuitboard.dm"
#include "code\game\objects\items\weapons\circuitboards\mecha.dm"
#include "code\game\objects\items\weapons\circuitboards\other.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\air_management.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\camera_monitor.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\computer.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\research.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\supply.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\research.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\shieldgen.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\telecomms.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\unary_atmos.dm"
#include "code\game\objects\items\weapons\grenades\chem_grenade.dm"
#include "code\game\objects\items\weapons\grenades\emgrenade.dm"
#include "code\game\objects\items\weapons\grenades\flashbang.dm"
@@ -646,6 +682,7 @@
#include "code\game\objects\structures\crates_lockers\closets\malfunction.dm"
#include "code\game\objects\structures\crates_lockers\closets\syndicate.dm"
#include "code\game\objects\structures\crates_lockers\closets\utility_closets.dm"
#include "code\game\objects\structures\crates_lockers\closets\walllocker.dm"
#include "code\game\objects\structures\crates_lockers\closets\wardrobe.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\bar.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\cargo.dm"
@@ -677,7 +714,6 @@
#include "code\game\turfs\unsimulated\beach.dm"
#include "code\game\turfs\unsimulated\floor.dm"
#include "code\game\turfs\unsimulated\walls.dm"
#include "code\game\verbs\atom_verbs.dm"
#include "code\game\verbs\ooc.dm"
#include "code\game\verbs\suicide.dm"
#include "code\game\verbs\who.dm"
@@ -760,12 +796,12 @@
#include "code\modules\client\preferences_spawnpoints.dm"
#include "code\modules\client\preferences_toggles.dm"
#include "code\modules\clothing\clothing.dm"
#include "code\modules\clothing\ears\skrell.dm"
#include "code\modules\clothing\glasses\glasses.dm"
#include "code\modules\clothing\glasses\hud.dm"
#include "code\modules\clothing\gloves\boxing.dm"
#include "code\modules\clothing\gloves\color.dm"
#include "code\modules\clothing\gloves\miscellaneous.dm"
#include "code\modules\clothing\gloves\ninja.dm"
#include "code\modules\clothing\head\collectable.dm"
#include "code\modules\clothing\head\hardhat.dm"
#include "code\modules\clothing\head\helmet.dm"
@@ -777,19 +813,38 @@
#include "code\modules\clothing\masks\breath.dm"
#include "code\modules\clothing\masks\gasmask.dm"
#include "code\modules\clothing\masks\miscellaneous.dm"
#include "code\modules\clothing\masks\voice.dm"
#include "code\modules\clothing\shoes\colour.dm"
#include "code\modules\clothing\shoes\magboots.dm"
#include "code\modules\clothing\shoes\miscellaneous.dm"
#include "code\modules\clothing\spacesuits\alien.dm"
#include "code\modules\clothing\spacesuits\breaches.dm"
#include "code\modules\clothing\spacesuits\captain.dm"
#include "code\modules\clothing\spacesuits\ert.dm"
#include "code\modules\clothing\spacesuits\miscellaneous.dm"
#include "code\modules\clothing\spacesuits\ninja.dm"
#include "code\modules\clothing\spacesuits\rig.dm"
#include "code\modules\clothing\spacesuits\spacesuits.dm"
#include "code\modules\clothing\spacesuits\syndi.dm"
#include "code\modules\clothing\spacesuits\void.dm"
#include "code\modules\clothing\spacesuits\rig\rig.dm"
#include "code\modules\clothing\spacesuits\rig\rig_attackby.dm"
#include "code\modules\clothing\spacesuits\rig\rig_pieces.dm"
#include "code\modules\clothing\spacesuits\rig\rig_verbs.dm"
#include "code\modules\clothing\spacesuits\rig\rig_wiring.dm"
#include "code\modules\clothing\spacesuits\rig\modules\combat.dm"
#include "code\modules\clothing\spacesuits\rig\modules\computer.dm"
#include "code\modules\clothing\spacesuits\rig\modules\modules.dm"
#include "code\modules\clothing\spacesuits\rig\modules\ninja.dm"
#include "code\modules\clothing\spacesuits\rig\modules\rig_weapons.dm"
#include "code\modules\clothing\spacesuits\rig\modules\utility.dm"
#include "code\modules\clothing\spacesuits\rig\modules\vision.dm"
#include "code\modules\clothing\spacesuits\rig\suits\alien.dm"
#include "code\modules\clothing\spacesuits\rig\suits\combat.dm"
#include "code\modules\clothing\spacesuits\rig\suits\ert.dm"
#include "code\modules\clothing\spacesuits\rig\suits\light.dm"
#include "code\modules\clothing\spacesuits\rig\suits\merc.dm"
#include "code\modules\clothing\spacesuits\rig\suits\station.dm"
#include "code\modules\clothing\spacesuits\void\merc.dm"
#include "code\modules\clothing\spacesuits\void\station.dm"
#include "code\modules\clothing\spacesuits\void\void.dm"
#include "code\modules\clothing\spacesuits\void\wizard.dm"
#include "code\modules\clothing\suits\alien.dm"
#include "code\modules\clothing\suits\armor.dm"
#include "code\modules\clothing\suits\bio.dm"
@@ -837,6 +892,7 @@
#include "code\modules\events\disease_outbreak.dm"
#include "code\modules\events\electrical_storm.dm"
#include "code\modules\events\event.dm"
#include "code\modules\events\event_container.dm"
#include "code\modules\events\event_dynamic.dm"
#include "code\modules\events\event_manager.dm"
#include "code\modules\events\grid_check.dm"
@@ -963,13 +1019,13 @@
#include "code\modules\mob\living\carbon\brain\login.dm"
#include "code\modules\mob\living\carbon\brain\MMI.dm"
#include "code\modules\mob\living\carbon\brain\posibrain.dm"
#include "code\modules\mob\living\carbon\brain\robot.dm"
#include "code\modules\mob\living\carbon\brain\say.dm"
#include "code\modules\mob\living\carbon\human\death.dm"
#include "code\modules\mob\living\carbon\human\emote.dm"
#include "code\modules\mob\living\carbon\human\examine.dm"
#include "code\modules\mob\living\carbon\human\human.dm"
#include "code\modules\mob\living\carbon\human\human_attackhand.dm"
#include "code\modules\mob\living\carbon\human\human_attackpaw.dm"
#include "code\modules\mob\living\carbon\human\human_damage.dm"
#include "code\modules\mob\living\carbon\human\human_defense.dm"
#include "code\modules\mob\living\carbon\human\human_defines.dm"
@@ -981,14 +1037,22 @@
#include "code\modules\mob\living\carbon\human\login.dm"
#include "code\modules\mob\living\carbon\human\logout.dm"
#include "code\modules\mob\living\carbon\human\say.dm"
#include "code\modules\mob\living\carbon\human\species.dm"
#include "code\modules\mob\living\carbon\human\unarmed_attack.dm"
#include "code\modules\mob\living\carbon\human\update_icons.dm"
#include "code\modules\mob\living\carbon\human\whisper.dm"
#include "code\modules\mob\living\carbon\human\alien\alien.dm"
#include "code\modules\mob\living\carbon\human\alien\alien_embryo.dm"
#include "code\modules\mob\living\carbon\human\alien\alien_facehugger.dm"
#include "code\modules\mob\living\carbon\human\alien\alien_powers.dm"
#include "code\modules\mob\living\carbon\human\alien\alien_species.dm"
#include "code\modules\mob\living\carbon\human\species\species.dm"
#include "code\modules\mob\living\carbon\human\species\species_attack.dm"
#include "code\modules\mob\living\carbon\human\species\species_hud.dm"
#include "code\modules\mob\living\carbon\human\species\outsider\shadow.dm"
#include "code\modules\mob\living\carbon\human\species\outsider\vox.dm"
#include "code\modules\mob\living\carbon\human\species\station\golem.dm"
#include "code\modules\mob\living\carbon\human\species\station\slime.dm"
#include "code\modules\mob\living\carbon\human\species\station\station.dm"
#include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_embryo.dm"
#include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_facehugger.dm"
#include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_powers.dm"
#include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_species.dm"
#include "code\modules\mob\living\carbon\human\species\xenomorphs\xenomorphs.dm"
#include "code\modules\mob\living\carbon\metroid\death.dm"
#include "code\modules\mob\living\carbon\metroid\emote.dm"
#include "code\modules\mob\living\carbon\metroid\examine.dm"
@@ -1010,6 +1074,7 @@
#include "code\modules\mob\living\carbon\monkey\update_icons.dm"
#include "code\modules\mob\living\silicon\alarm.dm"
#include "code\modules\mob\living\silicon\death.dm"
#include "code\modules\mob\living\silicon\laws.dm"
#include "code\modules\mob\living\silicon\login.dm"
#include "code\modules\mob\living\silicon\say.dm"
#include "code\modules\mob\living\silicon\silicon.dm"
@@ -1052,7 +1117,6 @@
#include "code\modules\mob\living\silicon\robot\robot_items.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\wires.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_console.dm"
@@ -1120,6 +1184,7 @@
#include "code\modules\organs\wound.dm"
#include "code\modules\paperwork\carbonpaper.dm"
#include "code\modules\paperwork\clipboard.dm"
#include "code\modules\paperwork\faxmachine.dm"
#include "code\modules\paperwork\filingcabinet.dm"
#include "code\modules\paperwork\folders.dm"
#include "code\modules\paperwork\handlabeler.dm"
@@ -1136,7 +1201,6 @@
#include "code\modules\power\breaker_box.dm"
#include "code\modules\power\cable.dm"
#include "code\modules\power\cable_heavyduty.dm"
#include "code\modules\power\cable_logic.dm"
#include "code\modules\power\cell.dm"
#include "code\modules\power\engine.dm"
#include "code\modules\power\fractal_reactor.dm"
@@ -1146,9 +1210,7 @@
#include "code\modules\power\lighting.dm"
#include "code\modules\power\port_gen.dm"
#include "code\modules\power\power.dm"
#include "code\modules\power\power_monitor.dm"
#include "code\modules\power\powernet.dm"
#include "code\modules\power\profiling.dm"
#include "code\modules\power\smes.dm"
#include "code\modules\power\smes_construction.dm"
#include "code\modules\power\solar.dm"
@@ -1158,6 +1220,8 @@
#include "code\modules\power\antimatter\containment_jar.dm"
#include "code\modules\power\antimatter\control.dm"
#include "code\modules\power\antimatter\shielding.dm"
#include "code\modules\power\sensors\powernet_sensor.dm"
#include "code\modules\power\sensors\sensor_monitoring.dm"
#include "code\modules\power\singularity\collector.dm"
#include "code\modules\power\singularity\containment_field.dm"
#include "code\modules\power\singularity\emitter.dm"
@@ -1333,7 +1397,6 @@
#include "code\modules\scripting\Scanner\Tokens.dm"
#include "code\modules\security levels\keycard authentication.dm"
#include "code\modules\security levels\security levels.dm"
#include "code\modules\shieldgen\circuits_and_designs.dm"
#include "code\modules\shieldgen\emergency_shield.dm"
#include "code\modules\shieldgen\energy_field.dm"
#include "code\modules\shieldgen\sheldwallgen.dm"
@@ -1460,7 +1523,6 @@
#include "code\WorkInProgress\computer3\computers\robot.dm"
#include "code\WorkInProgress\computer3\computers\security.dm"
#include "code\WorkInProgress\computer3\computers\welcome.dm"
#include "code\WorkInProgress\kilakk\fax.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm"
#include "code\WorkInProgress\Ported\policetape.dm"
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
@@ -1485,5 +1547,10 @@
#include "code\ZAS\Zone.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "maps\tgstation2.dmm"
#include "maps\exodus-1.dmm"
#include "maps\exodus-2.dmm"
#include "maps\exodus-3.dmm"
#include "maps\exodus-4.dmm"
#include "maps\exodus-5.dmm"
#include "maps\exodus-6.dmm"
// END_INCLUDE
+4
View File
@@ -14,6 +14,10 @@
#define PIPE_COLOR_YELLOW "#ffcc00"
#define PIPE_COLOR_PURPLE "#5c1ec0"
#define CONNECT_TYPE_REGULAR 1
#define CONNECT_TYPE_SUPPLY 2
#define CONNECT_TYPE_SCRUBBER 4
var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE)
/proc/pipe_color_lookup(var/color)
+11 -18
View File
@@ -9,6 +9,7 @@
/obj/machinery/atmospherics/var/last_flow_rate = 0
/obj/machinery/atmospherics/var/last_power_draw = 0
/obj/machinery/portable_atmospherics/var/last_flow_rate = 0
@@ -390,21 +391,13 @@
return specific_power
//This proc handles power usages.
//Calling update_use_power() or use_power() too often will result in lag since updating area power can be costly.
//This proc implements an approximation scheme that will cause area power updates to be triggered less often.
//By having atmos machinery use this proc it is easy to change the power usage approximation for all atmos machines
/obj/machinery/proc/handle_power_draw(var/usage_amount)
//This code errs on the side of using more power. Using this will mean that sometimes atmos machines use more power than they need, but won't get power for free.
if (usage_amount > idle_power_usage)
update_use_power(2)
else
if (use_power >= 2)
use_power = 1 //Don't update here. We will use more power than we are supposed to, but trigger less area power updates.
else
update_use_power(1)
switch (use_power)
if (0) return 0
if (1) return idle_power_usage
if (2 to INFINITY) return max(idle_power_usage, usage_amount)
//Calculates the APPROXIMATE amount of moles that would need to be transferred to change the pressure of sink by pressure_delta
//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.
/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
var/air_temperature = (sink.temperature > 0)? sink.temperature : source.temperature
var/output_volume = (sink.volume * sink.group_multiplier) + sink_volume_mod
//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)
+5 -24
View File
@@ -15,11 +15,11 @@ Pipelines + Other Objects -> Pipe network
active_power_usage = 0
power_channel = ENVIRON
var/nodealert = 0
var/power_rating //the maximum amount of power the machine can use to do work, affects how powerful the machine is, in Watts
layer = 2.4 //under wires with their 2.44
var/connect_types[] = list(1) //1=regular, 2=supply, 3=scrubber
var/connected_to = 1 //same as above, currently not used for anything
var/connect_types = CONNECT_TYPE_REGULAR
var/icon_connect_type = "" //"-supply" or "-scrubbers"
var/initialize_directions = 0
@@ -63,29 +63,10 @@ Pipelines + Other Objects -> Pipe network
return 0
obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/atmos1, obj/machinery/atmospherics/atmos2)
var/i
var/list1[] = atmos1.connect_types
var/list2[] = atmos2.connect_types
for(i=1,i<=list1.len,i++)
var/j
for(j=1,j<=list2.len,j++)
if(list1[i] == list2[j])
var/n = list1[i]
return n
return 0
obj/machinery/atmospherics/proc/check_connect_types_construction(obj/machinery/atmospherics/atmos1, obj/item/pipe/pipe2)
var/i
var/list1[] = atmos1.connect_types
var/list2[] = pipe2.connect_types
for(i=1,i<=list1.len,i++)
var/j
for(j=1,j<=list2.len,j++)
if(list1[i] == list2[j])
var/n = list1[i]
return n
return 0
return (atmos1.connect_types & atmos2.connect_types)
/obj/machinery/atmospherics/proc/check_connect_types_construction(obj/machinery/atmospherics/atmos1, obj/item/pipe/pipe2)
return (atmos1.connect_types & pipe2.connect_types)
/obj/machinery/atmospherics/proc/check_icon_cache(var/safety = 0)
if(!istype(icon_manager))
@@ -67,19 +67,13 @@ obj/machinery/atmospherics/binary
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
break
@@ -111,7 +111,7 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
@@ -123,5 +123,5 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)
src.set_dir(turn(src.dir, -90))
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
@@ -22,14 +22,12 @@
level = 1
use_power = 1
use_power = 0
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 7500 //This also doubles as a measure of how powerful the pump is, in Watts. 7500 W ~ 10 HP
var/last_power_draw = 0
power_rating = 7500 //7500 W ~ 10 HP
connect_types = list(1,2,3) //connects to regular, supply and scrubbers pipes
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER //connects to regular, supply and scrubbers pipes
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
var/external_pressure_bound = EXTERNAL_PRESSURE_BOUND
@@ -77,7 +75,7 @@
if(!powered())
vent_icon += "off"
else
vent_icon += "[on ? "[pump_direction ? "out" : "in"]" : "off"]"
vent_icon += "[use_power ? "[pump_direction ? "out" : "in"]" : "off"]"
overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
@@ -106,10 +104,10 @@
/obj/machinery/atmospherics/binary/dp_vent_pump/process()
..()
if(stat & (NOPOWER|BROKEN) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_power_draw = 0
last_flow_rate = 0
last_power_draw = 0
last_flow_rate = 0
if(stat & (NOPOWER|BROKEN) || !use_power)
return 0
var/datum/gas_mixture/environment = loc.return_air()
@@ -122,35 +120,25 @@
if(pressure_delta > 0.5)
if(pump_direction) //internal -> external
if (node1 && (environment.temperature || air1.temperature))
var/output_volume = environment.volume * environment.group_multiplier
var/air_temperature = environment.temperature? environment.temperature : air1.temperature
var/transfer_moles = pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
power_draw = pump_gas(src, air1, environment, transfer_moles, active_power_usage)
var/transfer_moles = calculate_transfer_moles(air1, environment)
power_draw = pump_gas(src, air1, environment, transfer_moles, power_rating)
if(power_draw >= 0 && network1)
network1.update = 1
else //external -> internal
if (node2 && (environment.temperature || air2.temperature))
var/output_volume = air2.volume + (network2? network2.volume : 0)
var/air_temperature = air2.temperature? air2.temperature : environment.temperature
var/transfer_moles = pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
var/transfer_moles = calculate_transfer_moles(environment, air2, (network2)? network2.volume : 0)
//limit flow rate from turfs
transfer_moles = min(transfer_moles, environment.total_moles*air2.volume/environment.volume) //group_multiplier gets divided out here
power_draw = pump_gas(src, environment, air2, transfer_moles, active_power_usage)
power_draw = pump_gas(src, environment, air2, transfer_moles, power_rating)
if(power_draw >= 0 && network2)
network2.update = 1
if (power_draw < 0)
last_power_draw = 0
last_flow_rate = 0
//update_use_power(0)
use_power = 0 //don't force update - easier on CPU
else
last_power_draw = handle_power_draw(power_draw)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
return 1
@@ -191,7 +179,7 @@
signal.data = list(
"tag" = id,
"device" = "ADVP",
"power" = on,
"power" = use_power,
"direction" = pump_direction?("release"):("siphon"),
"checks" = pressure_checks,
"input" = input_pressure_min,
@@ -208,12 +196,10 @@
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/binary/dp_vent_pump/examine()
set src in oview(1)
..()
/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user)
if(..(user, 1))
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
if (get_dist(usr, src) <= 1)
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/unary/vent_pump/power_change()
var/old_stat = stat
@@ -225,10 +211,10 @@
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
return 0
if(signal.data["power"])
on = text2num(signal.data["power"])
use_power = text2num(signal.data["power"])
if(signal.data["power_toggle"])
on = !on
use_power = !use_power
if(signal.data["direction"])
pump_direction = text2num(signal.data["direction"])
@@ -14,7 +14,7 @@
use_power = 0
var/on = 0 //doesn't actually use power. this is just whether the valve is open or not
var/unlocked = 0 //If 0, then the valve is locked closed, otherwise it is open(-able, it's a one-way valve so it closes if gas would flow backwards).
var/target_pressure = ONE_ATMOSPHERE
var/max_pressure_setting = 15000 //kPa
var/set_flow_rate = ATMOS_DEFAULT_VOLUME_PUMP * 2.5
@@ -32,7 +32,7 @@
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP * 2.5
/obj/machinery/atmospherics/binary/passive_gate/update_icon()
icon_state = (on && flowing)? "on" : "off"
icon_state = (unlocked && flowing)? "on" : "off"
/obj/machinery/atmospherics/binary/passive_gate/update_underlays()
if(..())
@@ -48,8 +48,10 @@
/obj/machinery/atmospherics/binary/passive_gate/process()
..()
if(!on)
last_flow_rate = 0
last_flow_rate = 0
if(!unlocked)
return 0
var/output_starting_pressure = air2.return_pressure()
@@ -73,30 +75,22 @@
//Figure out how much gas to transfer to meet the target pressure.
switch (regulate_mode)
if (REGULATE_INPUT)
var/air_temperature = (air1.temperature > 0)? air1.temperature : air2.temperature
var/input_volume = air1.volume + (network1? network1.volume : 0)
transfer_moles = min(transfer_moles, pressure_delta*input_volume/(air_temperature * R_IDEAL_GAS_EQUATION))
transfer_moles = min(transfer_moles, calculate_transfer_moles(air2, air1, pressure_delta, (network1)? network1.volume : 0))
if (REGULATE_OUTPUT)
var/air_temperature = (air2.temperature > 0)? air2.temperature : air1.temperature
var/output_volume = air2.volume + (network2? network2.volume : 0)
transfer_moles = min(transfer_moles, pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION))
transfer_moles = min(transfer_moles, calculate_transfer_moles(air1, air2, pressure_delta, (network2)? network2.volume : 0))
//pump_gas() will return a negative number if no flow occurred
returnval = pump_gas(src, air1, air2, transfer_moles, available_power=0) //available_power=0 means we only move gas if it would flow naturally
if (returnval < 0)
flowing = 0
last_flow_rate = 0
else
if (returnval >= 0)
if(network1)
network1.update = 1
if(network2)
network2.update = 1
if (!last_flow_rate)
flowing = 0
if (last_flow_rate)
flowing = 1
update_icon()
@@ -120,7 +114,7 @@
signal.data = list(
"tag" = id,
"device" = "AGP",
"power" = on,
"power" = unlocked,
"target_output" = target_pressure,
"regulate_mode" = regulate_mode,
"set_flow_rate" = set_flow_rate,
@@ -141,10 +135,10 @@
return 0
if("power" in signal.data)
on = text2num(signal.data["power"])
unlocked = text2num(signal.data["power"])
if("power_toggle" in signal.data)
on = !on
unlocked = !unlocked
if("set_target_pressure" in signal.data)
target_pressure = between(
@@ -188,7 +182,7 @@
var/data[0]
data = list(
"on" = on,
"on" = unlocked,
"pressure_set" = round(target_pressure*100), //Nano UI can't handle rounded non-integers, apparently.
"max_pressure" = max_pressure_setting,
"input_pressure" = round(air1.return_pressure()*100),
@@ -213,7 +207,7 @@
if(..()) return
if(href_list["toggle_valve"])
on = !on
unlocked = !unlocked
if(href_list["regulate_mode"])
switch(href_list["regulate_mode"])
@@ -247,7 +241,7 @@
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (on)
if (unlocked)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
var/datum/gas_mixture/int_air = return_air()
@@ -129,7 +129,7 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)
src.set_dir(turn(src.dir, -90))
verb/rotate_anticlockwise()
@@ -140,7 +140,7 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
//Goddamn copypaste from binary base class because atmospherics machinery API is not damn flexible
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
@@ -276,7 +276,7 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)
src.set_dir(turn(src.dir, -90))
verb/rotate_anticlock()
set category = "Object"
@@ -286,4 +286,4 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
@@ -20,18 +20,16 @@ Thus, the two variables affect pump operation are set in New():
name = "gas pump"
desc = "A pump"
var/on = 0
var/target_pressure = ONE_ATMOSPHERE
//var/max_volume_transfer = 10000
use_power = 1
use_power = 0
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 7500 //This also doubles as a measure of how powerful the pump is, in Watts. 7500 W ~ 10 HP
power_rating = 7500 //7500 W ~ 10 HP
var/last_power_draw = 0 //for UI
var/max_pressure_setting = 15000 //kPa
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
@@ -43,14 +41,14 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/binary/pump/on
icon_state = "map_on"
on = 1
use_power = 1
/obj/machinery/atmospherics/binary/pump/update_icon()
if(!powered())
icon_state = "off"
else
icon_state = "[on ? "on" : "off"]"
icon_state = "[use_power ? "on" : "off"]"
/obj/machinery/atmospherics/binary/pump/update_underlays()
if(..())
@@ -65,10 +63,10 @@ Thus, the two variables affect pump operation are set in New():
update_underlays()
/obj/machinery/atmospherics/binary/pump/process()
if((stat & (NOPOWER|BROKEN)) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_power_draw = 0
last_flow_rate = 0
last_power_draw = 0
last_flow_rate = 0
if((stat & (NOPOWER|BROKEN)) || !use_power)
return
var/power_draw = -1
@@ -76,22 +74,13 @@ Thus, the two variables affect pump operation are set in New():
if(pressure_delta > 0.01 && air1.temperature > 0)
//Figure out how much gas to transfer to meet the target pressure.
var/air_temperature = (air2.temperature > 0)? air2.temperature : air1.temperature
var/output_volume = air2.volume + (network2? network2.volume : 0)
//get the number of moles that would have to be transfered to bring sink to the target pressure
var/transfer_moles = pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
power_draw = pump_gas(src, air1, air2, transfer_moles, active_power_usage)
if (power_draw < 0)
//update_use_power(0)
use_power = 0 //don't force update - easier on CPU
last_power_draw = 0
last_flow_rate = 0
else
last_power_draw = handle_power_draw(power_draw)
var/transfer_moles = calculate_transfer_moles(air1, air2, pressure_delta, (network2)? network2.volume : 0)
power_draw = pump_gas(src, air1, air2, transfer_moles, power_rating)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
if(network1)
network1.update = 1
@@ -119,7 +108,7 @@ Thus, the two variables affect pump operation are set in New():
signal.data = list(
"tag" = id,
"device" = "AGP",
"power" = on,
"power" = use_power,
"target_output" = target_pressure,
"sigtype" = "status"
)
@@ -134,14 +123,14 @@ Thus, the two variables affect pump operation are set in New():
// this is the data which will be sent to the ui
var/data[0]
data = list(
"on" = on,
"on" = use_power,
"pressure_set" = round(target_pressure*100), //Nano UI can't handle rounded non-integers, apparently.
"max_pressure" = max_pressure_setting,
"last_flow_rate" = round(last_flow_rate*10),
"last_power_draw" = round(last_power_draw),
"max_power_draw" = active_power_usage,
"max_power_draw" = power_rating,
)
// update the ui if it exists, returns null if no ui is passed/found
@@ -152,7 +141,7 @@ Thus, the two variables affect pump operation are set in New():
ui = new(user, src, ui_key, "gas_pump.tmpl", name, 470, 290)
ui.set_initial_data(data) // when the ui is first opened this is the data it will use
ui.open() // open the new ui window
ui.set_auto_update(1) // auto update every Master Controller tick
ui.set_auto_update(1) // auto update every Master Controller tick
/obj/machinery/atmospherics/binary/pump/initialize()
..()
@@ -165,12 +154,12 @@ Thus, the two variables affect pump operation are set in New():
if(signal.data["power"])
if(text2num(signal.data["power"]))
on = 1
use_power = 1
else
on = 0
use_power = 0
if("power_toggle" in signal.data)
on = !on
use_power = !use_power
if(signal.data["set_output_pressure"])
target_pressure = between(
@@ -190,7 +179,7 @@ Thus, the two variables affect pump operation are set in New():
return
/obj/machinery/atmospherics/binary/pump/attack_hand(user as mob)
if(..())
if(..())
return
src.add_fingerprint(usr)
if(!src.allowed(user))
@@ -201,11 +190,11 @@ Thus, the two variables affect pump operation are set in New():
return
/obj/machinery/atmospherics/binary/pump/Topic(href,href_list)
if(..()) return
if(..()) return
if(href_list["power"])
on = !on
use_power = !use_power
switch(href_list["set_press"])
if ("min")
target_pressure = 0
@@ -214,10 +203,10 @@ Thus, the two variables affect pump operation are set in New():
if ("set")
var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = between(0, new_pressure, max_pressure_setting)
usr.set_machine(src)
src.add_fingerprint(usr)
src.update_icon()
/obj/machinery/atmospherics/binary/pump/power_change()
@@ -229,7 +218,7 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
if (!(stat & NOPOWER) && use_power)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
var/datum/gas_mixture/int_air = return_air()
@@ -246,4 +235,4 @@ Thus, the two variables affect pump operation are set in New():
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
del(src)
@@ -6,14 +6,14 @@
name = "high power gas pump"
desc = "A pump. Has double the power rating of the standard gas pump."
active_power_usage = 15000 //This also doubles as a measure of how powerful the pump is, in Watts. 15000 W ~ 20 HP
power_rating = 15000 //15000 W ~ 20 HP
/obj/machinery/atmospherics/binary/pump/high_power/on
on = 1
use_power = 1
icon_state = "map_on"
/obj/machinery/atmospherics/binary/pump/high_power/update_icon()
if(!powered())
icon_state = "off"
else
icon_state = "[on ? "on" : "off"]"
icon_state = "[use_power ? "on" : "off"]"
@@ -11,7 +11,7 @@
use_power = 1
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 7500 //This also doubles as a measure of how powerful the filter is, in Watts. 7500 W ~ 10 HP
power_rating = 7500 //7500 W ~ 10 HP
var/max_flow_rate = 200
var/set_flow_rate = 200
@@ -69,14 +69,11 @@
var/power_draw = -1
if (transfer_moles > MINUMUM_MOLES_TO_FILTER)
power_draw = filter_gas_multi(src, filtering_outputs, input_air, output_air, transfer_moles, active_power_usage)
power_draw = filter_gas_multi(src, filtering_outputs, input_air, output_air, transfer_moles, power_rating)
if (power_draw < 0)
//update_use_power(0)
use_power = 0 //don't force update - easier on CPU
last_flow_rate = 0
else
handle_power_draw(power_draw)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
if(input.network)
input.network.update = 1
@@ -106,7 +103,7 @@
/obj/machinery/atmospherics/omni/filter/proc/build_uidata()
var/list/data = new()
data["power"] = on
data["power"] = use_power
data["config"] = configuring
var/portData[0]
@@ -162,16 +159,16 @@
switch(href_list["command"])
if("power")
if(!configuring)
on = !on
use_power = !use_power
else
on = 0
use_power = 0
if("configure")
configuring = !configuring
if(configuring)
on = 0
use_power = 0
//only allows config changes when in configuring mode ~otherwise you'll get weird pressure stuff going on
if(configuring && !on)
if(configuring && !use_power)
switch(href_list["command"])
if("set_flow_rate")
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
@@ -7,7 +7,7 @@
use_power = 1
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 3700 //This also doubles as a measure of how powerful the mixer is, in Watts. 3700 W ~ 5 HP
power_rating = 3700 //3700 W ~ 5 HP
var/list/inputs = new()
var/datum/omni_port/output
@@ -49,8 +49,6 @@
for(var/datum/omni_port/P in ports)
P.air.volume = ATMOS_DEFAULT_VOLUME_MIXER
rebuild_mixing_inputs()
/obj/machinery/atmospherics/omni/mixer/Del()
inputs.Cut()
output = null
@@ -77,6 +75,8 @@
if(output)
output.air.volume = ATMOS_DEFAULT_VOLUME_MIXER * 0.75 * inputs.len
output.concentration = 1
rebuild_mixing_inputs()
/obj/machinery/atmospherics/omni/mixer/proc/mapper_set()
return (tag_north_con || tag_south_con || tag_east_con || tag_west_con)
@@ -108,14 +108,11 @@
var/power_draw = -1
if (transfer_moles > MINUMUM_MOLES_TO_FILTER)
power_draw = mix_gas(src, mixing_inputs, output, transfer_moles, active_power_usage)
power_draw = mix_gas(src, mixing_inputs, output.air, transfer_moles, power_rating)
if (power_draw < 0)
//update_use_power(0)
use_power = 0 //don't force update - easier on CPU
last_flow_rate = 0
else
handle_power_draw(power_draw)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
for(var/datum/omni_port/P in inputs)
if(P.concentration && P.network)
@@ -144,7 +141,7 @@
/obj/machinery/atmospherics/omni/mixer/proc/build_uidata()
var/list/data = new()
data["power"] = on
data["power"] = use_power
data["config"] = configuring
var/portData[0]
@@ -180,16 +177,16 @@
switch(href_list["command"])
if("power")
if(!configuring)
on = !on
use_power = !use_power
else
on = 0
use_power = 0
if("configure")
configuring = !configuring
if(configuring)
on = 0
use_power = 0
//only allows config changes when in configuring mode ~otherwise you'll get weird pressure stuff going on
if(configuring && !on)
if(configuring && !use_power)
switch(href_list["command"])
if("set_flow_rate")
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
@@ -9,7 +9,6 @@
initialize_directions = 0
level = 1
var/on = 0
var/configuring = 0
//var/target_pressure = ONE_ATMOSPHERE //a base type as abstract as this should NOT be making these kinds of assumptions
@@ -53,7 +52,7 @@
else if(error_check())
overlays = overlays_error
else
overlays = on ? (overlays_on) : (overlays_off)
overlays = use_power ? (overlays_on) : (overlays_off)
underlays = underlays_current
@@ -63,12 +62,13 @@
return
/obj/machinery/atmospherics/omni/process()
if(error_check())
on = 0
last_power_draw = 0
last_flow_rate = 0
if((stat & (NOPOWER|BROKEN)) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_flow_rate = 0
if(error_check())
use_power = 0
if((stat & (NOPOWER|BROKEN)) || !use_power)
return 0
return 1
@@ -248,10 +248,7 @@
continue
for(var/obj/machinery/atmospherics/target in get_step(src, P.dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
P.node = target
break
@@ -81,10 +81,7 @@
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node = target
break
@@ -5,10 +5,10 @@
level = 1
name = "Gas filter"
use_power = 1
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 7500 //This also doubles as a measure of how powerful the filter is, in Watts. 7500 W ~ 10 HP
power_rating = 7500 //This also doubles as a measure of how powerful the filter is, in Watts. 7500 W ~ 10 HP
var/temp = null // -- TLE
@@ -49,11 +49,11 @@
filtered_out = list("carbon_dioxide")
if(4)//removing N2O
filtered_out = list("sleeping_agent")
air1.volume = ATMOS_DEFAULT_VOLUME_FILTER
air2.volume = ATMOS_DEFAULT_VOLUME_FILTER
air3.volume = ATMOS_DEFAULT_VOLUME_FILTER
if(radio_controller)
initialize()
@@ -66,10 +66,10 @@
if(!powered())
icon_state += "off"
else if(node2 && node3 && node1)
icon_state += on ? "on" : "off"
icon_state += use_power ? "on" : "off"
else
icon_state += "off"
on = 0
use_power = 0
/obj/machinery/atmospherics/trinary/filter/update_underlays()
if(..())
@@ -98,18 +98,20 @@
/obj/machinery/atmospherics/trinary/filter/process()
..()
if((stat & (NOPOWER|BROKEN)) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_flow_rate = 0
return
last_power_draw = 0
last_flow_rate = 0
if((stat & (NOPOWER|BROKEN)) || !use_power)
return
//Figure out the amount of moles to transfer
var/transfer_moles = (set_flow_rate/air1.volume)*air1.total_moles
var/power_draw = -1
if (transfer_moles > MINUMUM_MOLES_TO_FILTER)
power_draw = filter_gas(src, filtered_out, air1, air2, air3, transfer_moles, active_power_usage)
power_draw = filter_gas(src, filtered_out, air1, air2, air3, transfer_moles, power_rating)
if(network2)
network2.update = 1
@@ -119,13 +121,10 @@
if(network1)
network1.update = 1
if (power_draw < 0)
//update_use_power(0)
use_power = 0 //don't force update - easier on CPU
last_flow_rate = 0
else
handle_power_draw(power_draw)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
return 1
/obj/machinery/atmospherics/trinary/filter/initialize()
@@ -179,7 +178,7 @@
current_filter_type = "ERROR - Report this bug to the admin, please!"
dat += {"
<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
<b>Power: </b><a href='?src=\ref[src];power=1'>[use_power?"On":"Off"]</a><br>
<b>Filtering: </b>[current_filter_type]<br><HR>
<h4>Set Filter Type:</h4>
<A href='?src=\ref[src];filterset=0'>Phoron</A><BR>
@@ -193,16 +192,7 @@
[src.set_flow_rate]L/s | <a href='?src=\ref[src];set_flow_rate=1'>Change</a><BR>
<B>Flow rate: </B>[round(last_flow_rate, 0.1)]L/s
"}
/*
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD>[dat]","window=atmo_filter")
onclose(user, "atmo_filter")
return
if (src.temp)
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];temp=1'>Clear Screen</A>", src.temp, src)
//else
// src.on != src.on
*/
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_filter")
onclose(user, "atmo_filter")
return
@@ -214,7 +204,7 @@
src.add_fingerprint(usr)
if(href_list["filterset"])
filter_type = text2num(href_list["filterset"])
filtered_out.Cut() //no need to create new lists unnecessarily
switch(filter_type)
if(0) //removing hydrocarbons
@@ -228,14 +218,14 @@
filtered_out += "carbon_dioxide"
if(4)//removing N2O
filtered_out += "sleeping_agent"
if (href_list["temp"])
src.temp = null
if(href_list["set_flow_rate"])
var/new_flow_rate = input(usr,"Enter new flow rate (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate) as num
src.set_flow_rate = max(0, min(air1.volume, new_flow_rate))
if(href_list["power"])
on=!on
use_power=!use_power
src.update_icon()
src.updateUsrDialog()
/*
@@ -8,11 +8,11 @@
use_power = 1
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 3700 //This also doubles as a measure of how powerful the mixer is, in Watts. 3700 W ~ 5 HP
power_rating = 3700 //This also doubles as a measure of how powerful the mixer is, in Watts. 3700 W ~ 5 HP
var/set_flow_rate = ATMOS_DEFAULT_VOLUME_MIXER
var/list/mixing_inputs
//for mapping
var/node1_concentration = 0.5
var/node2_concentration = 0.5
@@ -30,10 +30,10 @@
if(!powered())
icon_state += "off"
else if(node2 && node3 && node1)
icon_state += on ? "on" : "off"
icon_state += use_power ? "on" : "off"
else
icon_state += "off"
on = 0
use_power = 0
/obj/machinery/atmospherics/trinary/mixer/update_underlays()
if(..())
@@ -68,26 +68,26 @@
air1.volume = ATMOS_DEFAULT_VOLUME_MIXER
air2.volume = ATMOS_DEFAULT_VOLUME_MIXER
air3.volume = ATMOS_DEFAULT_VOLUME_MIXER * 1.5
if (!mixing_inputs)
mixing_inputs = list(src.air1 = node1_concentration, src.air2 = node2_concentration)
/obj/machinery/atmospherics/trinary/mixer/process()
..()
//For some reason this doesn't work even in initialize(), so it goes here.
if (!mixing_inputs)
mixing_inputs = list(src.air1 = node1_concentration, src.air2 = node2_concentration)
if((stat & (NOPOWER|BROKEN)) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_flow_rate = 0
last_power_draw = 0
last_flow_rate = 0
if((stat & (NOPOWER|BROKEN)) || !use_power)
return
//Figure out the amount of moles to transfer
var/transfer_moles = (set_flow_rate*mixing_inputs[air1]/air1.volume)*air1.total_moles + (set_flow_rate*mixing_inputs[air1]/air2.volume)*air2.total_moles
var/power_draw = -1
if (transfer_moles > MINUMUM_MOLES_TO_FILTER)
power_draw = mix_gas(src, mixing_inputs, air3, transfer_moles, active_power_usage)
power_draw = mix_gas(src, mixing_inputs, air3, transfer_moles, power_rating)
if(network1 && mixing_inputs[air1])
network1.update = 1
@@ -97,13 +97,10 @@
if(network3)
network3.update = 1
if (power_draw < 0)
//update_use_power(0)
use_power = 0 //don't force update - easier on CPU
last_flow_rate = 0
else
handle_power_draw(power_draw)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
return 1
/obj/machinery/atmospherics/trinary/mixer/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
@@ -133,7 +130,7 @@
user << "\red Access denied."
return
usr.set_machine(src)
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[use_power?"On":"Off"]</a><br>
<b>Set Flow Rate Limit: </b>
[set_flow_rate]L/s | <a href='?src=\ref[src];set_press=1'>Change</a>
<br>
@@ -161,7 +158,7 @@
/obj/machinery/atmospherics/trinary/mixer/Topic(href,href_list)
if(..()) return
if(href_list["power"])
on = !on
use_power = !use_power
if(href_list["set_press"])
var/max_flow_rate = min(air1.volume, air2.volume)
var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",src.set_flow_rate) as num
@@ -1,9 +1,7 @@
obj/machinery/atmospherics/trinary
dir = SOUTH
initialize_directions = SOUTH|NORTH|WEST
use_power = 1
var/on = 0
use_power = 0
var/datum/gas_mixture/air1
var/datum/gas_mixture/air2
@@ -82,27 +80,18 @@ obj/machinery/atmospherics/trinary
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node3 = target
break
+3 -15
View File
@@ -172,9 +172,6 @@
/obj/machinery/atmospherics/tvalve/attack_ai(mob/user as mob)
return
/obj/machinery/atmospherics/tvalve/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/atmospherics/tvalve/attack_hand(mob/user as mob)
src.add_fingerprint(usr)
update_icon(1)
@@ -202,26 +199,17 @@
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node3_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node3 = target
break
+14 -26
View File
@@ -13,12 +13,10 @@
var/heatsink_temperature = T20C //the constant temperature resevoir into which the freezer pumps heat. Probably the hull of the station or something.
var/internal_volume = 600 //L
var/on = 0
use_power = 0
idle_power_usage = 5 //5 Watts for thermostat related circuitry
active_power_usage //50 kW. The power rating of the freezer
var/max_power_usage = 20000 //power rating when the usage is turned up to 100
var/max_power_rating = 20000 //power rating when the usage is turned up to 100
var/power_setting = 100
var/set_temperature = T20C //thermostat
@@ -37,7 +35,7 @@
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
active_power_usage = max_power_usage * (power_setting/100)
power_rating = max_power_rating * (power_setting/100)
/obj/machinery/atmospherics/unary/freezer/initialize()
if(node) return
@@ -54,7 +52,7 @@
/obj/machinery/atmospherics/unary/freezer/update_icon()
if(src.node)
if(src.on && cooling)
if(src.use_power && cooling)
icon_state = "freezer_1"
else
icon_state = "freezer"
@@ -65,16 +63,13 @@
/obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/attack_paw(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
var/data[0]
data["on"] = on ? 1 : 0
data["on"] = use_power ? 1 : 0
data["gasPressure"] = round(air_contents.return_pressure())
data["gasTemperature"] = round(air_contents.temperature)
data["minGasTemperature"] = 0
@@ -104,9 +99,8 @@
/obj/machinery/atmospherics/unary/freezer/Topic(href, href_list)
if (href_list["toggleStatus"])
src.on = !src.on
src.use_power = !src.use_power
update_icon()
update_use_power(on)
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
@@ -122,31 +116,30 @@
/obj/machinery/atmospherics/unary/freezer/process()
..()
if(stat & (NOPOWER|BROKEN) || !on)
if(stat & (NOPOWER|BROKEN) || !use_power)
cooling = 0
update_use_power(0)
update_icon()
return
if (network && air_contents.temperature > set_temperature)
cooling = 1
update_use_power(2)
var/heat_transfer = max( -air_contents.get_thermal_energy_change(set_temperature - 5), 0 )
//Assume the heat is being pumped into the hull which is fixed at heatsink_temperature
//not /really/ proper thermodynamics but whatever
var/cop = FREEZER_PERF_MULT * air_contents.temperature/heatsink_temperature //heatpump coefficient of performance from thermodynamics -> power used = heat_transfer/cop
heat_transfer = min(heat_transfer, cop * active_power_usage) //limit heat transfer by available power
heat_transfer = min(heat_transfer, cop * power_rating) //limit heat transfer by available power
var/removed = -air_contents.add_thermal_energy(-heat_transfer) //remove the heat
if (debug)
visible_message("[src]: Removing [removed] W.")
use_power(power_rating)
network.update = 1
else
cooling = 0
update_use_power(1)
update_icon()
@@ -174,19 +167,14 @@
bin_rating /= bin_count
manip_rating /= manip_count
active_power_usage = initial(active_power_usage)*cap_rating //more powerful
power_rating = initial(power_rating)*cap_rating //more powerful
heatsink_temperature = initial(heatsink_temperature)/((manip_rating+bin_rating)/2) //more efficient
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200*bin_rating
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/freezer/proc/set_power_level(var/new_power_setting)
power_setting = new_power_setting
var/old_power_usage = active_power_usage
active_power_usage = max_power_usage * (power_setting/100)
if (use_power >= 2 && old_power_usage != active_power_usage)
force_power_update()
power_rating = max_power_rating * (power_setting/100)
//dismantling code. copied from autolathe
/obj/machinery/atmospherics/unary/freezer/attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -201,7 +189,7 @@
..()
/obj/machinery/atmospherics/unary/freezer/examine()
..()
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
..(user)
if (opened)
usr << "The maintenance hatch is open."
user << "The maintenance hatch is open."
@@ -1,4 +1,5 @@
//TODO: Put this under a common parent type with freezers to cut down on the copypasta
#define HEATER_PERF_MULT 2.5
/obj/machinery/atmospherics/unary/heater
name = "gas heating system"
@@ -13,12 +14,10 @@
var/max_temperature = T20C + 680
var/internal_volume = 600 //L
var/on = 0
use_power = 0
idle_power_usage = 5 //5 Watts for thermostat related circuitry
active_power_usage //50 kW. The power rating of the heater
var/max_power_usage = 20000 //power rating when the usage is turned up to 100
var/max_power_rating = 20000 //power rating when the usage is turned up to 100
var/power_setting = 100
var/heating = 0 //mainly for icon updates
@@ -34,8 +33,8 @@
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
active_power_usage = max_power_usage * (power_setting/100)
power_rating = max_power_rating * (power_setting/100)
/obj/machinery/atmospherics/unary/heater/initialize()
if(node) return
@@ -52,7 +51,7 @@
/obj/machinery/atmospherics/unary/heater/update_icon()
if(src.node)
if(src.on && src.heating)
if(src.use_power && src.heating)
icon_state = "heater_1"
else
icon_state = "heater"
@@ -64,37 +63,32 @@
/obj/machinery/atmospherics/unary/heater/process()
..()
if(stat & (NOPOWER|BROKEN) || !on)
if(stat & (NOPOWER|BROKEN) || !use_power)
heating = 0
update_use_power(0)
update_icon()
return
if (network && air_contents.total_moles && air_contents.temperature < set_temperature)
update_use_power(2)
air_contents.add_thermal_energy(active_power_usage)
air_contents.add_thermal_energy(power_rating * HEATER_PERF_MULT)
use_power(power_rating)
heating = 1
network.update = 1
else
heating = 0
update_use_power(1)
update_icon()
/obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/heater/attack_paw(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
var/data[0]
data["on"] = on ? 1 : 0
data["on"] = use_power ? 1 : 0
data["gasPressure"] = round(air_contents.return_pressure())
data["gasTemperature"] = round(air_contents.temperature)
data["minGasTemperature"] = 0
@@ -122,8 +116,7 @@
/obj/machinery/atmospherics/unary/heater/Topic(href, href_list)
if (href_list["toggleStatus"])
src.on = !src.on
update_use_power(on)
src.use_power = !src.use_power
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
@@ -156,19 +149,14 @@
cap_rating /= cap_count
bin_rating /= bin_count
max_power_usage = initial(max_power_usage)*cap_rating
max_power_rating = initial(max_power_rating)*cap_rating
max_temperature = max(initial(max_temperature) - T20C, 0)*((bin_rating*2 + cap_rating)/3) + T20C
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200*bin_rating
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting)
power_setting = new_power_setting
var/old_power_usage = active_power_usage
active_power_usage = max_power_usage * (power_setting/100)
if (use_power >= 2 && old_power_usage != active_power_usage)
force_power_update()
power_rating = max_power_rating * (power_setting/100)
//dismantling code. copied from autolathe
/obj/machinery/atmospherics/unary/heater/attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -183,7 +171,7 @@
..()
/obj/machinery/atmospherics/unary/heater/examine()
..()
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
..(user)
if (opened)
usr << "The maintenance hatch is open."
user << "The maintenance hatch is open."
@@ -5,17 +5,15 @@
/obj/machinery/atmospherics/unary/outlet_injector
icon = 'icons/atmos/injector.dmi'
icon_state = "map_injector"
use_power = 1
layer = 3
name = "air injector"
desc = "Passively injects air into its surroundings. Has a valve attached to it that can control flow rate."
use_power = 1
use_power = 0
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 15000 //This also doubles as a measure of how powerful the pump is, in Watts. 15000 W ~ 20 HP
power_rating = 15000 //15000 W ~ 20 HP
var/on = 0
var/injecting = 0
var/volume_rate = 50 //flow rate limit
@@ -34,7 +32,7 @@
if(!powered())
icon_state = "off"
else
icon_state = "[on ? "on" : "off"]"
icon_state = "[use_power ? "on" : "off"]"
/obj/machinery/atmospherics/unary/outlet_injector/update_underlays()
if(..())
@@ -52,11 +50,11 @@
/obj/machinery/atmospherics/unary/outlet_injector/process()
..()
injecting = 0
if((stat & (NOPOWER|BROKEN)) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_flow_rate = 0
last_power_draw = 0
last_flow_rate = 0
if((stat & (NOPOWER|BROKEN)) || !use_power)
return
var/power_draw = -1
@@ -64,14 +62,11 @@
if(environment && air_contents.temperature > 0)
var/transfer_moles = (volume_rate/air_contents.volume)*air_contents.total_moles //apply flow rate limit
power_draw = pump_gas(src, air_contents, environment, transfer_moles, active_power_usage)
power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating)
if (power_draw < 0)
//update_use_power(0)
use_power = 0 //don't force update - easier on CPU
last_flow_rate = 0
else
handle_power_draw(power_draw)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
if(network)
network.update = 1
@@ -79,7 +74,7 @@
return 1
/obj/machinery/atmospherics/unary/outlet_injector/proc/inject()
if(on || injecting || (stat & NOPOWER))
if(injecting || (stat & NOPOWER))
return 0
var/datum/gas_mixture/environment = loc.return_air()
@@ -89,7 +84,7 @@
injecting = 1
if(air_contents.temperature > 0)
var/power_used = pump_gas(src, air_contents, environment, air_contents.total_moles, active_power_usage)
var/power_used = pump_gas(src, air_contents, environment, air_contents.total_moles, power_rating)
use_power(power_used)
if(network)
@@ -114,7 +109,7 @@
signal.data = list(
"tag" = id,
"device" = "AO",
"power" = on,
"power" = use_power,
"volume_rate" = volume_rate,
"sigtype" = "status"
)
@@ -133,12 +128,10 @@
return 0
if(signal.data["power"])
on = text2num(signal.data["power"])
update_use_power(on)
use_power = text2num(signal.data["power"])
if(signal.data["power_toggle"])
on = !on
update_use_power(on)
use_power = !use_power
if(signal.data["inject"])
spawn inject()
@@ -46,10 +46,7 @@
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node = target
break
+30 -46
View File
@@ -15,22 +15,19 @@
name = "Air Vent"
desc = "Has a valve and pump attached to it"
use_power = 1
use_power = 0
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 7500 //This also doubles as a measure of how powerful the pump is, in Watts. 7500 W ~ 10 HP
power_rating = 7500 //7500 W ~ 10 HP
connect_types = list(1,2) //connects to regular and supply pipes
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY //connects to regular and supply pipes
var/area/initial_loc
level = 1
var/area_uid
var/id_tag = null
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
var/last_power_draw = 0
var/external_pressure_bound = EXTERNAL_PRESSURE_BOUND
var/internal_pressure_bound = INTERNAL_PRESSURE_BOUND
@@ -53,14 +50,14 @@
var/radio_filter_in
/obj/machinery/atmospherics/unary/vent_pump/on
on = 1
use_power = 1
icon_state = "map_vent_out"
/obj/machinery/atmospherics/unary/vent_pump/siphon
pump_direction = 0
/obj/machinery/atmospherics/unary/vent_pump/siphon/on
on = 1
use_power = 1
icon_state = "map_vent_in"
/obj/machinery/atmospherics/unary/vent_pump/New()
@@ -82,7 +79,7 @@
/obj/machinery/atmospherics/unary/vent_pump/high_volume
name = "Large Air Vent"
power_channel = EQUIP
active_power_usage = 15000 //15 kW ~ 20 HP
power_rating = 15000 //15 kW ~ 20 HP
/obj/machinery/atmospherics/unary/vent_pump/high_volume/New()
..()
@@ -91,7 +88,7 @@
/obj/machinery/atmospherics/unary/vent_pump/engine
name = "Engine Core Vent"
power_channel = ENVIRON
active_power_usage = 15000 //15 kW ~ 20 HP
power_rating = 15000 //15 kW ~ 20 HP
/obj/machinery/atmospherics/unary/vent_pump/engine/New()
..()
@@ -101,7 +98,7 @@
if(!check_icon_cache())
return
if (!node)
on = 0
use_power = 0
overlays.Cut()
@@ -119,7 +116,7 @@
else if(!powered())
vent_icon += "off"
else
vent_icon += "[on ? "[pump_direction ? "out" : "in"]" : "off"]"
vent_icon += "[use_power ? "[pump_direction ? "out" : "in"]" : "off"]"
overlays += icon_manager.get_atmos_icon("device", , , vent_icon)
@@ -144,7 +141,7 @@
/obj/machinery/atmospherics/unary/vent_pump/proc/can_pump()
if(stat & (NOPOWER|BROKEN))
return 0
if(!on)
if(!use_power)
return 0
if(welded)
return 0
@@ -153,12 +150,12 @@
/obj/machinery/atmospherics/unary/vent_pump/process()
..()
last_power_draw = 0
last_flow_rate = 0
if (!node)
on = 0
use_power = 0
if(!can_pump())
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_power_draw = 0
last_flow_rate = 0
return 0
var/datum/gas_mixture/environment = loc.return_air()
@@ -171,29 +168,18 @@
if((environment.temperature || air_contents.temperature) && pressure_delta > 0.5)
if(pump_direction) //internal -> external
var/output_volume = environment.volume * environment.group_multiplier
var/air_temperature = environment.temperature? environment.temperature : air_contents.temperature
var/transfer_moles = pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
//src.visible_message("DEBUG >>> [src]: output_volume = [output_volume]L; air_temperature = [air_temperature]K; transfer_moles = [transfer_moles] mol")
power_draw = pump_gas(src, air_contents, environment, transfer_moles, active_power_usage)
var/transfer_moles = calculate_transfer_moles(air_contents, environment)
power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating)
else //external -> internal
var/output_volume = air_contents.volume + (network? network.volume : 0)
var/air_temperature = air_contents.temperature? air_contents.temperature : environment.temperature
var/transfer_moles = pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
var/transfer_moles = calculate_transfer_moles(environment, air_contents, (network)? network.volume : 0)
//limit flow rate from turfs
transfer_moles = min(transfer_moles, environment.total_moles*air_contents.volume/environment.volume) //group_multiplier gets divided out here
power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating)
power_draw = pump_gas(src, environment, air_contents, transfer_moles, active_power_usage)
if (power_draw < 0)
last_power_draw = 0
last_flow_rate = 0
//update_use_power(0)
use_power = 0 //don't force update - easier on CPU
else
last_power_draw = handle_power_draw(power_draw)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
if(network)
network.update = 1
@@ -236,7 +222,7 @@
"area" = src.area_uid,
"tag" = src.id_tag,
"device" = "AVP",
"power" = on,
"power" = use_power,
"direction" = pump_direction?("release"):("siphon"),
"checks" = pressure_checks,
"internal" = internal_pressure_bound,
@@ -283,10 +269,10 @@
pump_direction = 1
if(signal.data["power"] != null)
on = text2num(signal.data["power"])
use_power = text2num(signal.data["power"])
if(signal.data["power_toggle"] != null)
on = !on
use_power = !use_power
if(signal.data["checks"] != null)
if (signal.data["checks"] == "default")
@@ -375,15 +361,13 @@
else
..()
/obj/machinery/atmospherics/unary/vent_pump/examine()
set src in oview(1)
..()
if (get_dist(usr, src) <= 1)
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
if(..(user, 1))
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
usr << "You are too far away to read the gauge."
user << "You are too far away to read the gauge."
if(welded)
usr << "It seems welded shut."
user << "It seems welded shut."
/obj/machinery/atmospherics/unary/vent_pump/power_change()
var/old_stat = stat
@@ -394,7 +378,7 @@
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
if (!(stat & NOPOWER) && use_power)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
var/turf/T = src.loc
@@ -1,15 +1,14 @@
/obj/machinery/atmospherics/unary/vent_scrubber
icon = 'icons/atmos/vent_scrubber.dmi'
icon_state = "map_scrubber"
icon_state = "map_scrubber_off"
name = "Air Scrubber"
desc = "Has a valve and pump attached to it"
use_power = 1
use_power = 0
idle_power_usage = 150 //internal circuitry, friction losses and stuff
active_power_usage = 7500 //This also doubles as a measure of how powerful the pump is, in Watts. 7500 W ~ 10 HP
var/last_power_draw = 0
power_rating = 7500 //7500 W ~ 10 HP
connect_types = list(1,3) //connects to regular and scrubber pipes
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SCRUBBER //connects to regular and scrubber pipes
level = 1
@@ -18,7 +17,6 @@
var/frequency = 1439
var/datum/radio_frequency/radio_connection
var/on = 0
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
var/list/scrubbing_gas = list("carbon_dioxide")
@@ -29,7 +27,8 @@
var/radio_filter_in
/obj/machinery/atmospherics/unary/vent_scrubber/on
on = 1
use_power = 1
icon_state = "map_scrubber_on"
/obj/machinery/atmospherics/unary/vent_scrubber/New()
..()
@@ -62,7 +61,7 @@
if(!powered())
scrubber_icon += "off"
else
scrubber_icon += "[on ? "[scrubbing ? "on" : "in"]" : "off"]"
scrubber_icon += "[use_power ? "[scrubbing ? "on" : "in"]" : "off"]"
overlays += icon_manager.get_atmos_icon("device", , , scrubber_icon)
@@ -97,7 +96,7 @@
"tag" = id_tag,
"device" = "AScr",
"timestamp" = world.time,
"power" = on,
"power" = use_power,
"scrubbing" = scrubbing,
"panic" = panic,
"filter_co2" = ("carbon_dioxide" in scrubbing_gas),
@@ -123,13 +122,14 @@
/obj/machinery/atmospherics/unary/vent_scrubber/process()
..()
last_power_draw = 0
last_flow_rate = 0
if (!node)
on = 0
use_power = 0
//broadcast_status()
if(!on || (stat & (NOPOWER|BROKEN)))
update_use_power(0) //we got here because a player turned a pump off - definitely want to update.
last_flow_rate = 0
last_power_draw = 0
if(!use_power || (stat & (NOPOWER|BROKEN)))
return 0
var/datum/gas_mixture/environment = loc.return_air()
@@ -139,20 +139,16 @@
//limit flow rate from turfs
var/transfer_moles = min(environment.total_moles, environment.total_moles*MAX_SCRUBBER_FLOWRATE/environment.volume) //group_multiplier gets divided out here
power_draw = scrub_gas(src, scrubbing_gas, environment, air_contents, transfer_moles, active_power_usage)
power_draw = scrub_gas(src, scrubbing_gas, environment, air_contents, transfer_moles, power_rating)
else //Just siphon all air
//limit flow rate from turfs
var/transfer_moles = min(environment.total_moles, environment.total_moles*MAX_SIPHON_FLOWRATE/environment.volume) //group_multiplier gets divided out here
power_draw = pump_gas(src, environment, air_contents, transfer_moles, active_power_usage)
power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating)
if (power_draw < 0)
//update_use_power(0)
use_power = 0 //don't force update. Sure, we will continue to use power even though we're not pumping anything, but it is easier on the CPU
last_power_draw = 0
last_flow_rate = 0
else
last_power_draw = handle_power_draw(power_draw)
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
if(network)
network.update = 1
@@ -170,21 +166,21 @@
return 0
if(signal.data["power"] != null)
on = text2num(signal.data["power"])
use_power = text2num(signal.data["power"])
if(signal.data["power_toggle"] != null)
on = !on
use_power = !use_power
if(signal.data["panic_siphon"]) //must be before if("scrubbing" thing
panic = text2num(signal.data["panic_siphon"] != null)
if(panic)
on = 1
use_power = 1
scrubbing = 0
else
scrubbing = 1
if(signal.data["toggle_panic_siphon"] != null)
panic = !panic
if(panic)
on = 1
use_power = 1
scrubbing = 0
else
scrubbing = 1
@@ -237,7 +233,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
if (!(stat & NOPOWER) && use_power)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
var/turf/T = src.loc
@@ -260,13 +256,11 @@
new /obj/item/pipe(loc, make_from=src)
del(src)
/obj/machinery/atmospherics/unary/vent_scrubber/examine()
set src in oview(1)
..()
if (get_dist(usr, src) <= 1)
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
if(..(user, 1))
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
usr << "You are too far away to read the gauge."
user << "You are too far away to read the gauge."
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
if(initial_loc)
+9 -14
View File
@@ -123,16 +123,13 @@
/obj/machinery/atmospherics/valve/proc/normalize_dir()
if(dir==3)
dir = 1
set_dir(1)
else if(dir==12)
dir = 4
set_dir(4)
/obj/machinery/atmospherics/valve/attack_ai(mob/user as mob)
return
/obj/machinery/atmospherics/valve/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/atmospherics/valve/attack_hand(mob/user as mob)
src.add_fingerprint(usr)
update_icon(1)
@@ -163,18 +160,12 @@
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
break
@@ -319,4 +310,8 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
del(src)
/obj/machinery/atmospherics/valve/examine(mob/user)
..()
user << "It is [open ? "open" : "closed"]."
+9 -3
View File
@@ -205,9 +205,15 @@ datum/pipeline
var/gas_density = air.total_moles/air.volume
thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*T20C) ), 1)
//if the h/e pipes radiate less than the AVERAGE_SOLAR_RADIATION, then they will heat up, otherwise they will cool down. It turns out the critical temperature is -26 C
var/heat_gain = surface*(AVERAGE_SOLAR_RADIATION - STEFAN_BOLTZMANN_CONSTANT*thermal_conductivity*(air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4)
// We only get heat from the star on the exposed surface area.
// If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase.
var/heat_gain = AVERAGE_SOLAR_RADIATION * RADIATOR_EXPOSED_SURFACE_AREA * thermal_conductivity
// Previously, the temperature would enter equilibrium at 26C or 294K.
// Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on.
// It currently should stabilise at 85K or -183C.
heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4
air.add_thermal_energy(heat_gain)
if(network)
network.update = 1
network.update = 1
+6 -6
View File
@@ -37,7 +37,7 @@ obj/machinery/atmospherics/mains_pipe
layer = 2.4 //under wires with their 2.5
force = 20
var/volume = 0
var/alert_pressure = 80*ONE_ATMOSPHERE
@@ -137,9 +137,9 @@ obj/machinery/atmospherics/mains_pipe/simple
proc/normalize_dir()
if(dir==3)
dir = 1
set_dir(1)
else if(dir==12)
dir = 4
set_dir(4)
update_icon()
if(nodes[1] && nodes[2])
@@ -148,7 +148,7 @@ obj/machinery/atmospherics/mains_pipe/simple
//var/node1_direction = get_dir(src, node1)
//var/node2_direction = get_dir(src, node2)
//dir = node1_direction|node2_direction
//set_dir(node1_direction|node2_direction)
else
if(!nodes[1]&&!nodes[2])
@@ -597,9 +597,9 @@ obj/machinery/atmospherics/mains_pipe/valve
proc/normalize_dir()
if(dir==3)
dir = 1
set_dir(1)
else if(dir==12)
dir = 4
set_dir(4)
proc/open()
if(open) return 0
+37 -70
View File
@@ -12,6 +12,9 @@
var/alert_pressure = 80*ONE_ATMOSPHERE
//minimum pressure before check_pressure(...) should be called
/obj/machinery/atmospherics/pipe/drain_power()
return -1
/obj/machinery/atmospherics/pipe/New()
..()
//so pipes under walls are hidden
@@ -216,9 +219,9 @@
/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir()
if(dir==3)
dir = 1
set_dir(1)
else if(dir==12)
dir = 4
set_dir(4)
/obj/machinery/atmospherics/pipe/simple/Del()
if(node1)
@@ -277,18 +280,12 @@
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
break
@@ -324,7 +321,7 @@
name = "Scrubbers pipe"
desc = "A one meter section of scrubbers pipe"
icon_state = "intact-scrubbers"
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -333,7 +330,7 @@
name = "Air supply pipe"
desc = "A one meter section of supply pipe"
icon_state = "intact-supply"
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -359,7 +356,7 @@
name = "Scrubbers pipe"
desc = "A one meter section of scrubbers pipe"
icon_state = "intact-scrubbers"
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -368,7 +365,7 @@
name = "Air supply pipe"
desc = "A one meter section of supply pipe"
icon_state = "intact-supply"
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -532,10 +529,7 @@
if(direction&connect_directions)
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
connect_directions &= ~direction
break
@@ -547,10 +541,7 @@
if(direction&connect_directions)
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
connect_directions &= ~direction
break
@@ -562,10 +553,7 @@
if(direction&connect_directions)
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node3 = target
connect_directions &= ~direction
break
@@ -589,7 +577,7 @@
name="Scrubbers pipe manifold"
desc = "A manifold composed of scrubbers pipes"
icon_state = "map-scrubbers"
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -598,7 +586,7 @@
name="Air supply pipe manifold"
desc = "A manifold composed of supply pipes"
icon_state = "map-supply"
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -624,7 +612,7 @@
name="Scrubbers pipe manifold"
desc = "A manifold composed of scrubbers pipes"
icon_state = "map-scrubbers"
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -633,7 +621,7 @@
name="Air supply pipe manifold"
desc = "A manifold composed of supply pipes"
icon_state = "map-supply"
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -796,37 +784,25 @@
for(var/obj/machinery/atmospherics/target in get_step(src,1))
if(target.initialize_directions & 2)
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,2))
if(target.initialize_directions & 1)
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,4))
if(target.initialize_directions & 8)
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node3 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,8))
if(target.initialize_directions & 4)
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node4 = target
break
@@ -847,7 +823,7 @@
name="4-way scrubbers pipe manifold"
desc = "A manifold composed of scrubbers pipes"
icon_state = "map_4way-scrubbers"
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -856,7 +832,7 @@
name="4-way air supply pipe manifold"
desc = "A manifold composed of supply pipes"
icon_state = "map_4way-supply"
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -882,7 +858,7 @@
name="4-way scrubbers pipe manifold"
desc = "A manifold composed of scrubbers pipes"
icon_state = "map_4way-scrubbers"
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -891,7 +867,7 @@
name="4-way air supply pipe manifold"
desc = "A manifold composed of supply pipes"
icon_state = "map_4way-supply"
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -974,10 +950,7 @@
/obj/machinery/atmospherics/pipe/cap/initialize()
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node = target
break
@@ -993,7 +966,7 @@
name = "scrubbers pipe endcap"
desc = "An endcap for scrubbers pipes"
icon_state = "cap-scrubbers"
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -1002,7 +975,7 @@
name = "supply pipe endcap"
desc = "An endcap for supply pipes"
icon_state = "cap-supply"
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -1016,7 +989,7 @@
name = "scrubbers pipe endcap"
desc = "An endcap for scrubbers pipes"
icon_state = "cap-f-scrubbers"
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -1025,7 +998,7 @@
name = "supply pipe endcap"
desc = "An endcap for supply pipes"
icon_state = "cap-f-supply"
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -1084,10 +1057,7 @@
for(var/obj/machinery/atmospherics/target in get_step(src,connect_direction))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
@@ -1259,7 +1229,7 @@
if(node1)
icon_state = "intact"
dir = get_dir(src, node1)
set_dir(get_dir(src, node1))
else
icon_state = "exposed"
@@ -1269,10 +1239,7 @@
for(var/obj/machinery/atmospherics/target in get_step(src,connect_direction))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
@@ -1291,7 +1258,7 @@
/obj/machinery/atmospherics/pipe/vent/hide(var/i) //to make the little pipe section invisible, the icon changes.
if(node1)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
dir = get_dir(src, node1)
set_dir(get_dir(src, node1))
else
icon_state = "exposed"
@@ -1299,7 +1266,7 @@
/obj/machinery/atmospherics/pipe/simple/visible/universal
name="Universal pipe adapter"
desc = "An adapter for regular, supply and scrubbers pipes"
connect_types = list(1,2,3)
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER
icon_state = "map_universal"
/obj/machinery/atmospherics/pipe/simple/visible/universal/update_icon(var/safety = 0)
@@ -1334,7 +1301,7 @@
/obj/machinery/atmospherics/pipe/simple/hidden/universal
name="Universal pipe adapter"
desc = "An adapter for regular, supply and scrubbers pipes"
connect_types = list(1,2,3)
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER
icon_state = "map_universal"
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0)
+1 -1
View File
@@ -167,7 +167,7 @@
/obj/effect/hotspot/New()
..()
dir = pick(cardinal)
set_dir(pick(cardinal))
return
/*
+10 -22
View File
@@ -84,9 +84,9 @@ obj/machinery/atmospherics/pipe/zpipe/proc/burst()
obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
if(dir==3)
dir = 1
set_dir(1)
else if(dir==12)
dir = 4
set_dir(4)
obj/machinery/atmospherics/pipe/zpipe/Del()
if(node1)
@@ -134,10 +134,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/initialize()
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
@@ -148,10 +145,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/initialize()
if(above)
for(var/obj/machinery/atmospherics/target in above)
if(target.initialize_directions && istype(target, /obj/machinery/atmospherics/pipe/zpipe/down))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
break
@@ -181,10 +175,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/initialize()
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node1 = target
break
@@ -195,10 +186,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/initialize()
if(below)
for(var/obj/machinery/atmospherics/target in below)
if(target.initialize_directions && istype(target, /obj/machinery/atmospherics/pipe/zpipe/up))
var/c = check_connect_types(target,src)
if (c)
target.connected_to = c
src.connected_to = c
if (check_connect_types(target,src))
node2 = target
break
@@ -214,7 +202,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/scrubbers
icon_state = "up-scrubbers"
name = "upwards scrubbers pipe"
desc = "A scrubbers pipe segment to connect upwards."
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -223,7 +211,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/supply
icon_state = "up-supply"
name = "upwards supply pipe"
desc = "A supply pipe segment to connect upwards."
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
@@ -232,7 +220,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/scrubbers
icon_state = "down-scrubbers"
name = "downwards scrubbers pipe"
desc = "A scrubbers pipe segment to connect downwards."
connect_types = list(3)
connect_types = CONNECT_TYPE_SCRUBBER
layer = 2.38
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
@@ -241,7 +229,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/supply
icon_state = "down-supply"
name = "downwards supply pipe"
desc = "A supply pipe segment to connect downwards."
connect_types = list(2)
connect_types = CONNECT_TYPE_SUPPLY
layer = 2.39
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
+2 -5
View File
@@ -55,9 +55,6 @@
del target
return ..()
attack_paw(var/mob/M)
return attack_hand(M)
attackby(obj/item/C as obj, mob/user as mob)
(..)
@@ -259,8 +256,8 @@
initialise_stair_connection(S, src, inv_dir)
proc/initialise_stair_connection(var/obj/multiz/stairs/top, var/obj/multiz/stairs/bottom, var/dir)
top.dir = dir
bottom.dir = dir
top.set_dir(dir)
bottom.set_dir(dir)
top.connected = bottom
bottom.connected = top
top.icon_state = "ramptop"
@@ -68,7 +68,7 @@
harm_intent_damage = 8
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "slashes"
attacktext = "slashed"
attack_sound = 'sound/weapons/bite.ogg'
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
@@ -126,7 +126,7 @@
harm_intent_damage = 2
melee_damage_lower = 3
melee_damage_upper = 10
attacktext = "bites"
attacktext = "bitten"
attack_sound = 'sound/weapons/bite.ogg'
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
@@ -368,7 +368,7 @@
var/predir = M.dir
step(M, throw_dir)
M.dir = predir
M.set_dir(predir)
//gives turf a different description, to try and trick players
/obj/effect/step_trigger/trap/fake
@@ -62,7 +62,7 @@
continue moving
var/turf/X = new T.type(B)
X.dir = old_dir1
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
@@ -61,7 +61,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
idle_power_usage = 50
active_power_usage = 500 //multiplied by field strength
var/cached_power_avail = 0
directwired = 1
anchored = 0
var/state = 0
@@ -120,7 +119,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
state = 2
user << "You weld the [src] to the floor."
connect_to_network()
src.directwired = 1
else
user << "\red You need more welding fuel to complete this task."
if(2)
@@ -134,7 +132,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
state = 1
user << "You cut the [src] free from the floor."
disconnect_from_network()
src.directwired = 0
else
user << "\red You need more welding fuel to complete this task."
return
@@ -6,7 +6,7 @@
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "port2"
w_class = 4
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
/obj/item/rust_fuel_assembly_port_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
@@ -39,7 +39,7 @@
// offset 24 pixels in direction of dir
// this allows the APC to be embedded in a wall, yet still inside an area
if (building)
dir = ndir
set_dir(ndir)
else
has_electronics = 3
opened = 0
@@ -6,7 +6,7 @@
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
icon_state = "fuel_compressor0"
w_class = 4
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
/obj/item/rust_fuel_compressor_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
@@ -39,7 +39,7 @@
// offset 24 pixels in direction of dir
// this allows the APC to be embedded in a wall, yet still inside an area
if (building)
dir = ndir
set_dir(ndir)
else
has_electronics = 3
opened = 0
@@ -19,7 +19,6 @@
use_power = 1
idle_power_usage = 10
active_power_usage = 500
directwired = 0
var/remote_access_enabled = 1
var/cached_power_avail = 0
var/emergency_insert_ready = 0
@@ -295,7 +294,7 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
/obj/machinery/power/rust_fuel_injector/verb/rotate_anticlock()
set category = "Object"
@@ -305,4 +304,4 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)
src.set_dir(turn(src.dir, -90))
@@ -95,7 +95,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
A.dir = src.dir
A.set_dir(src.dir)
if(src.dir == 1)//Up
A.yo = 20
A.xo = 0
@@ -125,7 +125,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()*/
A.dir = src.dir
A.set_dir(src.dir)
if(src.dir == 1)//Up
A.yo = 20
A.xo = 0
@@ -26,7 +26,7 @@
if(!dir)
RadiateParticleRand(energy, ionizing)
var/obj/effect/accelerated_particle/particle = new
particle.dir = dir
particle.set_dir(dir)
particle.ionizing = ionizing
if(energy)
particle.energy = energy
@@ -22,7 +22,7 @@
if(!first)
src.first = new /obj/beam/e_beam(src.loc)
src.first.master = src
src.first.dir = src.dir
src.first.set_dir(src.dir)
src.first.power = src.power
src.first.freq = src.freq
src.first.phase = src.phase
@@ -61,7 +61,7 @@
if(!next)
if(get_step(src.loc,src.dir))
var/obj/beam/e_beam/e = new /obj/beam/e_beam(src.loc)
e.dir = src.dir
e.set_dir(src.dir)
src.next = e
e.master = src.master
e.power = src.power
@@ -34,7 +34,7 @@
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
return 1
/obj/machinery/zero_point_emitter/New()
@@ -98,7 +98,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
A.dir = src.dir
A.set_dir(src.dir)
switch(dir)
if(NORTH)
A.yo = 20
@@ -13,7 +13,7 @@
/obj/item/projectile/missile/process(var/turf/newtarget)
target = newtarget
dir = get_dir(src.loc, target)
set_dir(get_dir(src.loc, target))
walk_towards(src, target, MISSILE_SPEED)
/obj/item/projectile/missile/Bump(atom/A)
@@ -164,7 +164,7 @@
/obj/machinery/meteor_battery/proc/target()
while(src && enabled && !stat)
src.dir = get_dir(src, cur_target)
src.set_dir(get_dir(src, cur_target))
shootAt(cur_target)
sleep(shot_delay)
return
@@ -56,7 +56,7 @@
continue
turfs += thisturf
var/turf/target_turf = pick(turfs)
src.dir = get_dir(src, target_turf)
src.set_dir(get_dir(src, target_turf))
src.loc = target_turf
hibernate = 1
@@ -193,7 +193,7 @@
if(!next_turf.CanPass(src, next_turf))
break
src.loc = next_turf
src.dir = get_dir(src, target_mob)
src.set_dir(get_dir(src, target_mob))
next_turf = get_step(src, get_dir(next_turf,target_mob))
num_turfs--
@@ -233,7 +233,7 @@
if(!next_turf.CanPass(src, next_turf))
break
src.loc = next_turf
src.dir = get_dir(src, target_mob)
src.set_dir(get_dir(src, target_mob))
next_turf = get_step(src, get_dir(next_turf,target_turf))
num_turfs--
else if(G)
+4 -7
View File
@@ -16,12 +16,12 @@
else
return temp_access
/obj/item/weapon/card/id/guest/examine()
..()
/obj/item/weapon/card/id/guest/examine(mob/user)
..(user)
if (world.time < expiration_time)
usr << "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>"
user << "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>"
else
usr << "<span class='warning'>It expired at [worldtime2text(expiration_time)].</span>"
user << "<span class='warning'>It expired at [worldtime2text(expiration_time)].</span>"
/obj/item/weapon/card/id/guest/read()
if (world.time > expiration_time)
@@ -71,9 +71,6 @@
/obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/guestpass/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/guestpass/attack_hand(var/mob/user as mob)
if(..())
return
@@ -1,7 +1,7 @@
//Engine control and monitoring console
/obj/machinery/computer/engines
name = "engines control console"
name = "engine control console"
icon_state = "id"
var/state = "status"
var/list/engines = list()
@@ -89,7 +89,7 @@
anchored = 1
New(var/turf/nloc, var/ndir, var/temp)
dir = ndir
set_dir(ndir)
..(nloc)
if(nloc)
+12 -12
View File
@@ -46,7 +46,7 @@
using = new /obj/screen( src )
using.name = "act_intent"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
@@ -105,7 +105,7 @@
using = new /obj/screen( src )
using.name = "mov_intent"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
@@ -123,7 +123,7 @@
using = new /obj/screen( src )
using.name = "r_hand"
using.dir = WEST
using.set_dir(WEST)
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
@@ -135,7 +135,7 @@
using = new /obj/screen( src )
using.name = "l_hand"
using.dir = EAST
using.set_dir(EAST)
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
@@ -147,7 +147,7 @@
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
@@ -156,7 +156,7 @@
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
@@ -165,7 +165,7 @@
using = new /obj/screen( src )
using.name = "mask"
using.dir = NORTH
using.set_dir(NORTH)
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_monkey_mask
@@ -174,7 +174,7 @@
using = new /obj/screen( src )
using.name = "back"
using.dir = NORTHEAST
using.set_dir(NORTHEAST)
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_back
@@ -291,19 +291,19 @@
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
mymob.gun_setting_icon.set_dir(2)
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
mymob.item_use_icon.set_dir(1)
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_move_icon.set_dir(1)
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
mymob.gun_run_icon.set_dir(1)
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
+4 -290
View File
@@ -34,9 +34,6 @@
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
return interact(user)
/obj/machinery/computer/atmoscontrol/attack_paw(var/mob/user as mob)
return interact(user)
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
if(..())
return
@@ -82,7 +79,7 @@
var/dat = "<h3>[current.name]</h3><hr>"
dat += current.return_status()
if(current.remote_control || overridden)
dat += "<hr>[return_controls()]"
dat += "<hr>[current.return_controls(src)]"
return dat
//a bunch of this is copied from atmos alarms
@@ -93,289 +90,6 @@
current = null
if(href_list["alarm"])
current = locate(href_list["alarm"])
if(href_list["command"])
var/device_id = href_list["id_tag"]
switch(href_list["command"])
if(
"power",
"adjust_external_pressure",
"checks",
"co2_scrub",
"tox_scrub",
"n2o_scrub",
"panic_siphon",
"scrubbing"
)
current.send_signal(device_id, list (href_list["command"] = text2num(href_list["val"])))
spawn(3)
src.updateUsrDialog()
//if("adjust_threshold") //was a good idea but required very wide window
if("set_threshold")
var/env = href_list["env"]
var/threshold = text2num(href_list["var"])
var/list/selected = current.TLV[env]
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as num|null
if (isnull(newval) || ..() || (current.locked && issilicon(usr)))
return
if (newval<0)
selected[threshold] = -1.0
else if (env=="temperature" && newval>5000)
selected[threshold] = 5000
else if (env=="pressure" && newval>50*ONE_ATMOSPHERE)
selected[threshold] = 50*ONE_ATMOSPHERE
else if (env!="temperature" && env!="pressure" && newval>200)
selected[threshold] = 200
else
newval = round(newval,0.01)
selected[threshold] = newval
if(threshold == 1)
if(selected[1] > selected[2])
selected[2] = selected[1]
if(selected[1] > selected[3])
selected[3] = selected[1]
if(selected[1] > selected[4])
selected[4] = selected[1]
if(threshold == 2)
if(selected[1] > selected[2])
selected[1] = selected[2]
if(selected[2] > selected[3])
selected[3] = selected[2]
if(selected[2] > selected[4])
selected[4] = selected[2]
if(threshold == 3)
if(selected[1] > selected[3])
selected[1] = selected[3]
if(selected[2] > selected[3])
selected[2] = selected[3]
if(selected[3] > selected[4])
selected[4] = selected[3]
if(threshold == 4)
if(selected[1] > selected[4])
selected[1] = selected[4]
if(selected[2] > selected[4])
selected[2] = selected[4]
if(selected[3] > selected[4])
selected[3] = selected[4]
//Sets the temperature the built-in heater/cooler tries to maintain.
if(env == "temperature")
if(current.target_temperature < selected[2])
current.target_temperature = selected[2]
if(current.target_temperature > selected[3])
current.target_temperature = selected[3]
spawn(1)
updateUsrDialog()
return
if(href_list["screen"])
current.screen = text2num(href_list["screen"])
spawn(1)
src.updateUsrDialog()
return
//commenting this out because it causes compile errors
//I tried fixing it but wasn't sucessful.
//if(href_list["atmos_unlock"])
// switch(href_list["atmos_unlock"])
// if("0")
// current.alarm_area.air_doors_close()
// if("1")
// current.alarm_area.air_doors_open()
if(href_list["atmos_alarm"])
if (current.alarm_area.atmosalert(2))
current.apply_danger_level(2)
spawn(1)
src.updateUsrDialog()
current.update_icon()
return
if(href_list["atmos_reset"])
if (current.alarm_area.atmosalert(0))
current.apply_danger_level(0)
spawn(1)
src.updateUsrDialog()
current.update_icon()
return
if(href_list["mode"])
current.mode = text2num(href_list["mode"])
current.apply_mode()
spawn(5)
src.updateUsrDialog()
return
updateUsrDialog()
//copypasta from alarm code, changed to work with this without derping hard
//---START COPYPASTA----
/obj/machinery/computer/atmoscontrol/proc/return_controls()
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
switch(current.screen)
if (AALARM_SCREEN_MAIN)
if(current.alarm_area.atmosalm)
output += {"<a href='?src=\ref[src];alarm=\ref[current];atmos_reset=1'>Reset - Atmospheric Alarm</a><hr>"}
else
output += {"<a href='?src=\ref[src];alarm=\ref[current];atmos_alarm=1'>Activate - Atmospheric Alarm</a><hr>"}
output += {"
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MODE]'>Set environmental mode</a><br>
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_SENSORS]'>Sensor Control</a><br>
<HR>
"}
if (current.mode==AALARM_MODE_PANIC)
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[src];alarm=\ref[current];mode=[AALARM_MODE_SCRUBBING]'>turn syphoning off</A>"
else
output += "<A href='?src=\ref[src];alarm=\ref[current];mode=[AALARM_MODE_PANIC]'><font color='red'><B>ACTIVATE PANIC SYPHON IN AREA</B></font></A>"
output += "<br><br>Atmospheric Lockdown: <a href='?src=\ref[src];alarm=\ref[current];atmos_unlock=[current.alarm_area.air_doors_activated]'>[current.alarm_area.air_doors_activated ? "<b>ENABLED</b>" : "Disabled"]</a>"
if (AALARM_SCREEN_VENT)
var/sensor_data = ""
if(current.alarm_area.air_vent_names.len)
for(var/id_tag in current.alarm_area.air_vent_names)
var/long_name = current.alarm_area.air_vent_names[id_tag]
var/list/data = current.alarm_area.air_vent_info[id_tag]
var/state = ""
if(!data)
state = "<font color='red'> can not be found!</font>"
data = list("external" = 0) //for "0" instead of empty string
else if (data["timestamp"]+AALARM_REPORT_TIMEOUT < world.time)
state = "<font color='red'> not responding!</font>"
sensor_data += {"
<B>[long_name]</B>[state]<BR>
<B>Operating:</B>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A>
<BR>
<B>Pressure checks:</B>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=checks;val=[data["checks"]^1]' [(data["checks"]&1)?"style='font-weight:bold;'":""]>external</A>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=checks;val=[data["checks"]^2]' [(data["checks"]&2)?"style='font-weight:bold;'":""]>internal</A>
<BR>
<B>External pressure bound:</B>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=-1000'>-</A>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=-100'>-</A>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=-10'>-</A>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=-1'>-</A>
[data["external"]]
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=+1'>+</A>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
<BR>
"}
if (data["direction"] == "siphon")
sensor_data += {"
<B>Direction:</B>
siphoning
<BR>
"}
sensor_data += {"<HR>"}
else
sensor_data = "No vents connected.<BR>"
output = {"<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
if (AALARM_SCREEN_SCRUB)
var/sensor_data = ""
if(current.alarm_area.air_scrub_names.len)
for(var/id_tag in current.alarm_area.air_scrub_names)
var/long_name = current.alarm_area.air_scrub_names[id_tag]
var/list/data = current.alarm_area.air_scrub_info[id_tag]
var/state = ""
if(!data)
state = "<font color='red'> can not be found!</font>"
data = list("external" = 0) //for "0" instead of empty string
else if (data["timestamp"]+AALARM_REPORT_TIMEOUT < world.time)
state = "<font color='red'> not responding!</font>"
sensor_data += {"
<B>[long_name]</B>[state]<BR>
<B>Operating:</B>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A><BR>
<B>Type:</B>
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=scrubbing;val=[!data["scrubbing"]]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>
"}
if(data["scrubbing"])
sensor_data += {"
<B>Filtering:</B>
Carbon Dioxide
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=co2_scrub;val=[!data["filter_co2"]]'>[data["filter_co2"]?"on":"off"]</A>;
Toxins
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=tox_scrub;val=[!data["filter_phoron"]]'>[data["filter_phoron"]?"on":"off"]</A>;
Nitrous Oxide
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=n2o_scrub;val=[!data["filter_n2o"]]'>[data["filter_n2o"]?"on":"off"]</A>
<BR>
"}
sensor_data += {"
<B>Panic syphon:</B> [data["panic"]?"<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>":""]
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=panic_siphon;val=[!data["panic"]]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate</font></A><BR>
<HR>
"}
else
sensor_data = "No scrubbers connected.<BR>"
output = {"<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
if (AALARM_SCREEN_MODE)
output += {"
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
<b>Air machinery mode for the area:</b><ul>"}
var/list/modes = list(AALARM_MODE_SCRUBBING = "Filtering - Scrubs out contaminants",\
AALARM_MODE_REPLACEMENT = "<font color='blue'>Replace Air - Siphons out air while replacing</font>",\
AALARM_MODE_PANIC = "<font color='red'>Panic - Siphons air out of the room</font>",\
AALARM_MODE_CYCLE = "<font color='red'>Cycle - Siphons air before replacing</font>",\
AALARM_MODE_FILL = "<font color='green'>Fill - Shuts off scrubbers and opens vents</font>",\
AALARM_MODE_OFF = "<font color='blue'>Off - Shuts off vents and scrubbers</font>",)
for (var/m=1,m<=modes.len,m++)
if (current.mode==m)
output += {"<li><A href='?src=\ref[src];alarm=\ref[current];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"}
else
output += {"<li><A href='?src=\ref[src];alarm=\ref[current];mode=[m]'>[modes[m]]</A></li>"}
output += "</ul>"
if (AALARM_SCREEN_SENSORS)
output += {"
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
<b>Alarm thresholds:</b><br>
Partial pressure for gases
<style>/* some CSS woodoo here. Does not work perfect in ie6 but who cares? */
table td { border-left: 1px solid black; border-top: 1px solid black;}
table tr:first-child th { border-left: 1px solid black;}
table th:first-child { border-top: 1px solid black; font-weight: normal;}
table tr:first-child th:first-child { border: none;}
.dl0 { color: green; }
.dl1 { color: orange; }
.dl2 { color: red; font-weght: bold;}
</style>
<table cellspacing=0>
<TR><th></th><th class=dl2>min2</th><th class=dl1>min1</th><th class=dl1>max1</th><th class=dl2>max2</th></TR>
"}
var/list/gases = list(
"oxygen" = "O<sub>2</sub>",
"carbon dioxide" = "CO<sub>2</sub>",
"phoron" = "Toxin",
"other" = "Other",
)
var/list/tlv
for (var/g in gases)
output += "<TR><th>[gases[g]]</th>"
tlv = current.TLV[g]
for (var/i = 1, i <= 4, i++)
output += "<td><A href='?src=\ref[src];alarm=\ref[current];command=set_threshold;env=[g];var=[i]'>[tlv[i] >= 0?tlv[i]:"OFF"]</A></td>"
output += "</TR>"
tlv = current.TLV["pressure"]
output += "<TR><th>Pressure</th>"
for (var/i = 1, i <= 4, i++)
output += "<td><A href='?src=\ref[src];alarm=\ref[current];command=set_threshold;env=pressure;var=[i]'>[tlv[i]>= 0?tlv[i]:"OFF"]</A></td>"
output += "</TR>"
tlv = current.TLV["temperature"]
output += "<TR><th>Temperature</th>"
for (var/i = 1, i <= 4, i++)
output += "<td><A href='?src=\ref[src];alarm=\ref[current];command=set_threshold;env=temperature;var=[i]'>[tlv[i]>= 0?tlv[i]:"OFF"]</A></td>"
output += "</TR>"
output += "</table>"
return output
//---END COPYPASTA----
else if(current)
current.Topic(href, href_list, 1, 1)
interact(usr)
+1 -1
View File
@@ -317,7 +317,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/temp = null //Temporary storage area for a message offering the option to destroy the radio
var/selfdestruct = 0 //Set to 1 while the radio is self destructing itself.
var/obj/item/device/radio/origradio = null
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0
item_state = "radio"
+1 -3
View File
@@ -3,7 +3,6 @@
name = "tape roll"
icon = 'icons/policetape.dmi'
icon_state = "rollstart"
flags = FPRINT
w_class = 2.0
var/turf/start
var/turf/end
@@ -135,8 +134,7 @@
else
breaktape(null, user)
/obj/item/tape/attack_paw(mob/user as mob)
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
@@ -5,7 +5,7 @@
item_state = "ba_suit"
color = "hosblueclothes"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = ONESIZEFITSALL
/obj/item/clothing/under/rank/advisor
name = "correctional advisor's jumpsuit"
@@ -14,7 +14,7 @@
item_state = "ba_suit"
color = "wardenblueclothes"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = ONESIZEFITSALL
/obj/item/clothing/under/rank/supervisor
name = "crew supervisor's jumpsuit"
@@ -23,7 +23,7 @@
item_state = "ba_suit"
color = "officerblueclothes"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = ONESIZEFITSALL
/obj/item/clothing/shoes/boots
name = "boots"
@@ -9,7 +9,6 @@
icon_off = "capsecureoff"
New()
sleep(2)
if(prob(50))
new /obj/item/weapon/storage/backpack/captain(src)
else
@@ -40,7 +39,6 @@
icon_off = "hopsecureoff"
New()
sleep(2)
new /obj/item/clothing/under/rank/head_of_personnel(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/head/helmet(src)
@@ -66,7 +64,6 @@
icon_off = "hossecureoff"
New()
sleep(2)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
@@ -93,7 +90,6 @@
New()
sleep(2)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/under/rank/advisor(src)
new /obj/item/device/radio/headset/headset_sec(src)
@@ -118,7 +114,6 @@
icon_off = "secoff"
New()
sleep(2)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/belt/security(src)
@@ -141,7 +136,6 @@
icon_off = "cabinetdetective_broken"
New()
sleep(2)
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/suit/armor/det_suit(src)
new /obj/item/clothing/suit/det_suit(src)
@@ -173,7 +167,6 @@
New()
sleep(2)
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
return
@@ -197,7 +190,6 @@
req_access = list(access_court)
New()
sleep(2)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/weapon/paper/Court (src)
new /obj/item/weapon/paper/Court (src)
@@ -5,13 +5,11 @@
name = "officers beret"
desc = "A black beret adorned with the shield—a silver kite shield with an engraved sword—of the NanoTrasen security forces, announcing to the world that the wearer is a defender of NanoTrasen."
icon_state = "centcomofficerberet"
flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/centcom/captain
name = "captains beret"
desc = "A white beret adorned with the shield—a cobalt kite shield with an engraved sword—of the NanoTrasen security forces, worn only by those captaining a vessel of the NanoTrasen Navy."
icon_state = "centcomcaptain"
flags = FPRINT | TABLEPASS
/obj/item/clothing/shoes/centcom
name = "dress shoes"
@@ -3,7 +3,6 @@
/obj/item/weapon/stamperaser
name = "eraser"
desc = "It looks like some kind of eraser."
flags = FPRINT | TABLEPASS
icon = 'icons/obj/items.dmi'
icon_state = "zippo"
item_state = "zippo"
@@ -15,7 +14,6 @@
desc = "It blinks and has an antenna on it. Weird."
icon_state = "t-ray0"
var/on = 0
flags = FPRINT|TABLEPASS
w_class = 1
var/list/obj/item/device/radio/Old = list()
var/list/obj/item/device/radio/Curr = list()
+7 -10
View File
@@ -63,16 +63,13 @@
user.visible_message("\blue [user] gathers up[could_fill ? " " : " most of "]the pile of items and puts it into [src].")
update_icon()
examine()
set src in view()
..()
if(src in usr)
usr << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."
if(seal_torn && !contents.len)
usr << "The seal on the bag is broken."
else
usr << "The seal on the bag is[seal_torn ? ", however, not intact" : " intact"]."
return
examine(mob/user)
..(user)
user << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."
if(seal_torn && !contents.len)
user << "The seal on the bag is broken."
else
user << "The seal on the bag is[seal_torn ? ", however, not intact" : " intact"]."
update_icon()
if(contents.len)
@@ -252,7 +252,6 @@ Alien plants should do something if theres a lot of poison
item_state = "wardendnavyclothes"
item_color = "wardendnavyclothes"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/navysecurity
name = "security officer's jumpsuit"
@@ -261,7 +260,6 @@ Alien plants should do something if theres a lot of poison
item_state = "officerdnavyclothes"
item_color = "officerdnavyclothes"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/navyhead_of_security
desc = "It's a jumpsuit worn by those few with the dedication to achieve the position of \"Head of Security\". It has additional armor to protect the wearer."
@@ -270,7 +268,6 @@ Alien plants should do something if theres a lot of poison
item_state = "hosdnavyclothes"
item_color = "hosdnavyclothes"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS
/obj/item/clothing/suit/armor/hosnavycoat
name = "armored coat"
@@ -283,26 +280,22 @@ Alien plants should do something if theres a lot of poison
name = "security beret"
desc = "A beret with the security insignia emblazoned on it. For officers that are more inclined towards style than safety."
icon_state = "officerberet"
flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/navywarden
name = "warden's beret"
desc = "A beret with a two-colored security insignia emblazoned on it. For wardens that are more inclined towards style than safety."
icon_state = "wardenberet"
flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/navyhos
name = "security head's beret"
desc = "A stylish beret bearing a golden insignia that proudly displays the security coat of arms. A commander's must-have."
icon_state = "hosberet"
flags = FPRINT | TABLEPASS
/obj/item/clothing/suit/armor/navysecvest
name = "armored coat"
desc = "An armored coat that protects against some damage."
icon_state = "officerdnavyjacket"
item_state = "armor"
flags = FPRINT | TABLEPASS
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/navywardenvest
@@ -310,7 +303,6 @@ Alien plants should do something if theres a lot of poison
desc = "An armoured jacket with silver rank pips and livery."
icon_state = "wardendnavyjacket"
item_state = "armor"
flags = FPRINT | TABLEPASS
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
//hostile entities or npcs
+5 -5
View File
@@ -63,15 +63,15 @@
if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
if (movement_target.loc.x < src.x)
dir = WEST
set_dir(WEST)
else if (movement_target.loc.x > src.x)
dir = EAST
set_dir(EAST)
else if (movement_target.loc.y < src.y)
dir = SOUTH
set_dir(SOUTH)
else if (movement_target.loc.y > src.y)
dir = NORTH
set_dir(NORTH)
else
dir = SOUTH
set_dir(SOUTH)
if(isturf(movement_target.loc))
movement_target.attack_animal(src)
@@ -25,7 +25,7 @@
del(src)
return
dir = get_dir(T, loc)
set_dir(get_dir(T, loc))
/obj/machinery/constructable_frame/wallmount_frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.crit_fail)
@@ -109,7 +109,7 @@
if(component_check)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
new_machine.dir = dir
new_machine.set_dir(dir)
if(istype(circuit, /obj/item/weapon/circuitboard/status_display))
new_machine.pixel_x = pixel_x * 1.33
new_machine.pixel_y = pixel_y * 1.33
@@ -46,8 +46,7 @@
user << "\blue The pack is already full!"
return
/obj/item/weapon/weldpack/examine()
set src in usr
usr << text("\icon[] [] units of fuel left!", src, src.reagents.total_volume)
..()
/obj/item/weapon/weldpack/examine(mob/user)
..(user)
user << text("\icon[] [] units of fuel left!", src, src.reagents.total_volume)
return
+1 -1
View File
@@ -7,7 +7,7 @@
desc = "Extracts information on wounds."
icon = 'icons/obj/autopsy_scanner.dmi'
icon_state = ""
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
var/list/datum/autopsy_data_scanner/wdata = list()
+11 -11
View File
@@ -48,15 +48,15 @@
Click()
switch(dir)
if(NORTH)
dir = EAST
set_dir(EAST)
if(EAST)
dir = SOUTH
set_dir(SOUTH)
if(SOUTH)
dir = WEST
set_dir(WEST)
if(WEST)
dir = NORTHWEST
set_dir(NORTHWEST)
if(NORTHWEST)
dir = NORTH
set_dir(NORTH)
return 1
/obj/effect/bmode/buildhelp
@@ -219,19 +219,19 @@
switch(holder.builddir.dir)
if(NORTH)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = NORTH
WIN.set_dir(NORTH)
if(SOUTH)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = SOUTH
WIN.set_dir(SOUTH)
if(EAST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = EAST
WIN.set_dir(EAST)
if(WEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = WEST
WIN.set_dir(WEST)
if(NORTHWEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = NORTHWEST
WIN.set_dir(NORTHWEST)
if(2)
if(pa.Find("left"))
if(ispath(holder.buildmode.objholder,/turf))
@@ -239,7 +239,7 @@
T.ChangeTurf(holder.buildmode.objholder)
else
var/obj/A = new holder.buildmode.objholder (get_turf(object))
A.dir = holder.builddir.dir
A.set_dir(holder.builddir.dir)
else if(pa.Find("right"))
if(isobj(object)) del(object)
+34 -11
View File
@@ -50,20 +50,25 @@
var/mob/living/silicon/ai/occupant = null
var/busy = 0
// Ninja gloves check
attack_hand(mob/user as mob)
if(ishuman(user) && istype(user:gloves, /obj/item/clothing/gloves/space_ninja) && user:gloves:candrain && !user:gloves:draining)
if(user:wear_suit:s_control)
user:wear_suit.transfer_ai("AIFIXER","NINJASUIT",src,user)
else
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
return
..()
attackby(obj/I as obj,mob/user as mob)
if(computer && !computer.stat)
if(istype(I, /obj/item/device/aicard))
I:transfer_ai("AIFIXER","AICARD",src,user)
var/obj/item/device/aicard/card = I
var/mob/living/silicon/ai/comp_ai = locate() in src
var/mob/living/silicon/ai/card_ai = locate() in card
if(istype(comp_ai))
if(busy)
user << "\red <b>ERROR</b>: \black Reconstruction in progress."
return
card.grab_ai(comp_ai, user)
if(!(locate(/mob/living/silicon/ai) in src)) occupant = null
else if(istype(card_ai))
load_ai(card_ai,card,user)
occupant = locate(/mob/living/silicon/ai) in src
if(computer.program)
computer.program.update_icon()
computer.update_icon()
@@ -71,6 +76,24 @@
..()
return
/obj/item/part/computer/ai_holder/proc/load_ai(var/mob/living/silicon/ai/transfer, var/obj/item/device/aicard/card, var/mob/user)
if(!transfer)
return
// Transfer over the AI.
transfer << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
user << "\blue <b>Transfer successful</b>: \black [transfer.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
transfer.loc = src
transfer.cancel_camera()
transfer.control_disabled = 1
occupant = transfer
if(card)
card.clear()
/*
ID computer cardslot - reading and writing slots
*/
@@ -131,8 +131,6 @@
for(var/typekey in spawn_files)
hdd.addfile(new typekey,1)
if(program)
program.execute(os)
update_icon()
@@ -8,9 +8,6 @@
desc = "Recieves alerts over the radio."
active_state = "alert:2"
refresh = 1
var/list/priority_alarms = list()
var/list/minor_alarms = list()
execute(var/datum/file/program/source)
..(source)
@@ -20,14 +17,6 @@
computer.radio.set_frequency(1437,RADIO_ATMOSIA)
Reset()
..()
// Never save your work
priority_alarms.Cut()
minor_alarms.Cut()
// This will be called as long as the program is running on the parent computer
// and the computer has the radio peripheral
receive_signal(datum/signal/signal)
@@ -37,12 +26,12 @@
var/severity = signal.data["alert"]
if(!zone || !severity) return
minor_alarms -= zone
priority_alarms -= zone
minor_air_alarms -= zone
priority_air_alarms -= zone
if(severity=="severe")
priority_alarms += zone
priority_air_alarms += zone
else if (severity=="minor")
minor_alarms += zone
minor_air_alarms += zone
update_icon()
return
@@ -59,9 +48,9 @@
update_icon()
..()
if(priority_alarms.len > 0)
if(priority_air_alarms.len > 0)
overlay.icon_state = "alert:2"
else if(minor_alarms.len > 0)
else if(minor_air_alarms.len > 0)
overlay.icon_state = "alert:1"
else
overlay.icon_state = "alert:0"
@@ -74,14 +63,14 @@
var/priority_text = "<h2>Priority Alerts:</h2>"
var/minor_text = "<h2>Minor Alerts:</h2>"
if(priority_alarms.len)
for(var/zone in priority_alarms)
if(priority_air_alarms.len)
for(var/zone in priority_air_alarms)
priority_text += "<FONT color='red'><B>[format_text(zone)]</B></FONT> [topic_link(src,"priority_clear=[ckey(zone)]","X")]<BR>"
else
priority_text += "No priority alerts detected.<BR>"
if(minor_alarms.len)
for(var/zone in minor_alarms)
if(minor_air_alarms.len)
for(var/zone in minor_air_alarms)
minor_text += "<B>[format_text(zone)]</B> [topic_link(src,"minor_clear=[ckey(zone)]","X")]<BR>"
else
minor_text += "No minor alerts detected.<BR>"
@@ -95,16 +84,16 @@
if("priority_clear" in href_list)
var/removing_zone = href_list["priority_clear"]
for(var/zone in priority_alarms)
for(var/zone in priority_air_alarms)
if(ckey(zone) == removing_zone)
usr << "\green Priority Alert for area [zone] cleared."
priority_alarms -= zone
priority_air_alarms -= zone
if("minor_clear" in href_list)
var/removing_zone = href_list["minor_clear"]
for(var/zone in minor_alarms)
for(var/zone in minor_air_alarms)
if(ckey(zone) == removing_zone)
usr << "\green Minor Alert for area [zone] cleared."
minor_alarms -= zone
minor_air_alarms -= zone
computer.updateUsrDialog()
@@ -141,14 +141,14 @@
if (!computer || computer.z > 6)
return null
cameranet.process_sort()
var/list/L = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
var/list/temp = C.network & key.networks
if(temp.len)
L.Add(C)
camera_sort(L)
return L
verify_machine(var/obj/machinery/camera/C,var/datum/file/camnet_key/key = null)
if(!istype(C) || !C.can_use())
@@ -214,7 +214,7 @@
return
Syndicate_announce(input, usr)
usr << "Message transmitted."
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
log_say("[key_name(usr)] has made an illegal announcement: [input]")
centcomm_message_cooldown = 1
spawn(600)//10 minute cooldown
centcomm_message_cooldown = 0
@@ -35,10 +35,7 @@
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
if(H.wear_id)
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
else
log += "<tr><td width='40%'>Unknown</td>"
log += "<tr><td width='40%'>[H.get_authentification_name()] ([H.get_assignment()])</td>"
switch(C.sensor_mode)
if(1)
@@ -43,7 +43,7 @@
if(!T.implanted) continue
var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in
if(M.z == 1 && !istype(M.loc, /turf/space))
if(M.z in config.station_levels && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc
if(T.malfunction)
@@ -163,8 +163,10 @@
R.ResetSecurityCodes()
else
message_admins("\blue [key_name_admin(usr)] detonated [R.name]!")
log_game("\blue [key_name_admin(usr)] detonated [R.name]!")
message_admins("<span class='notice'>[key_name_admin(usr)] detonated [key_name(R.name)]!</span>")
log_game("<span class='notice'>[key_name_admin(usr)] detonated [key_name(R.name)]!</span>")
if(R.connected_ai)
R.connected_ai << "<br><br><span class='alert'>ALERT - Cyborg kill-switch activated: [R.name]</span><br>"
R.self_destruct()
else
usr << "\red Access Denied."
@@ -176,16 +178,14 @@
var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
if(choice == "Confirm")
if(R && istype(R))
message_admins("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
message_admins("<span class='notice'>[key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!</span>")
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [key_name(R.name)]!")
R.canmove = !R.canmove
if (R.lockcharge)
// R.cell.charge = R.lockcharge
R.lockcharge = !R.lockcharge
R << "Your lockdown has been lifted!"
else
R.lockcharge = !R.lockcharge
// R.cell.charge = 0
R << "You have been locked down!"
else
@@ -189,17 +189,10 @@
target.unique_enzymes = md5(target.real_name)
updateappearance(scanner.occupant,target.uni_identity)
domutcheck(scanner.occupant, scanner, 1)
if(ishuman(scanner.occupant))
target.mutantrace = buffer.mutantrace
scanner.occupant:update_mutantrace()
if("se")
if(buffer.struc_enzymes)
target.struc_enzymes = buffer.struc_enzymes
domutcheck(scanner.occupant, scanner, 1)
if(ishuman(scanner.occupant))
target.mutantrace = buffer.mutantrace
scanner.occupant:update_mutantrace()
if("ui")
if(buffer.uni_identity)
target.uni_identity = buffer.uni_identity
-1
View File
@@ -140,7 +140,6 @@
/datum/file/data/genome/SE
name = "Structural Enzymes"
var/mutantrace = null
/datum/file/data/genome/UE
name = "Unique Enzymes"
+7 -2
View File
@@ -138,6 +138,9 @@
usr << "You can't reach it."
return
close_laptop(usr)
proc/close_laptop(mob/user = null)
if(istype(loc,/obj/item/device/laptop))
testing("Close closed computer")
return
@@ -146,7 +149,8 @@
return
if(stat&BROKEN)
usr << "\The [src] is broken! You can't quite get it closed."
if(user)
user << "\The [src] is broken! You can't quite get it closed."
return
if(!portable)
@@ -157,7 +161,8 @@
portable.loc = loc
loc = portable
stat |= MAINT
usr << "You close \the [src]."
if(user)
user << "You close \the [src]."
auto_use_power()
if(stat&MAINT)
+4 -3
View File
@@ -174,8 +174,9 @@
vendmode = 1
if("cancel")
relap.loc = src.loc
relap = null
if(relap)
relap.loc = src.loc
relap = null
vendmode = 0
src.updateUsrDialog()
@@ -263,7 +264,7 @@
choose_progs(C)
vend()
popup.close()
newlap.close_computer()
newlap.close_laptop()
newlap = null
cardreader = 0
floppy = 0
-216
View File
@@ -1,216 +0,0 @@
var/list/obj/machinery/faxmachine/allfaxes = list()
var/list/alldepartments = list("Central Command")
/obj/machinery/faxmachine
name = "fax machine"
icon = 'icons/obj/library.dmi'
icon_state = "fax"
req_one_access = list(access_lawyer, access_heads, access_armory) //Warden needs to be able to Fax solgov too.
anchored = 1
density = 1
use_power = 1
idle_power_usage = 30
active_power_usage = 200
power_channel = EQUIP
var/obj/item/weapon/card/id/scan = null // identification
var/authenticated = 0
var/obj/item/weapon/paper/tofax = null // what we're sending
var/sendcooldown = 0 // to avoid spamming fax messages
var/department = "Unknown" // our department
var/dpt = "Central Command" // the department we're sending to
/obj/machinery/faxmachine/New()
..()
allfaxes += src
if( !("[department]" in alldepartments) )
alldepartments += department
alldepartments += "Sol Government"
/obj/machinery/faxmachine/process()
return 0
/obj/machinery/faxmachine/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/faxmachine/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/faxmachine/attack_hand(mob/user as mob)
user.set_machine(src)
var/dat = "Fax Machine<BR>"
var/scan_name
if(scan)
scan_name = scan.name
else
scan_name = "--------"
dat += "Confirm Identity: <a href='byond://?src=\ref[src];scan=1'>[scan_name]</a><br>"
if(authenticated)
dat += "<a href='byond://?src=\ref[src];logout=1'>{Log Out}</a>"
else
dat += "<a href='byond://?src=\ref[src];auth=1'>{Log In}</a>"
dat += "<hr>"
if(authenticated)
dat += "<b>Logged in to:</b> Central Command Quantum Entanglement Network<br><br>"
if(tofax)
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><br><br>"
if(sendcooldown)
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
else
dat += "<a href='byond://?src=\ref[src];send=1'>Send</a><br>"
dat += "<b>Currently sending:</b> [tofax.name]<br>"
dat += "<b>Sending to:</b> <a href='byond://?src=\ref[src];dept=1'>[dpt]</a><br>"
else
if(sendcooldown)
dat += "Please insert paper to send via secure connection.<br><br>"
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
else
dat += "Please insert paper to send via secure connection.<br><br>"
else
dat += "Proper authentication is required to use this device.<br><br>"
if(tofax)
dat += "<a href ='byond://?src=\ref[src];remove=1'>Remove Paper</a><br>"
user << browse(dat, "window=copier")
onclose(user, "copier")
return
/obj/machinery/faxmachine/Topic(href, href_list)
if(href_list["send"])
if(tofax)
if(dpt == "Central Command")
Centcomm_fax(src, tofax.info, tofax.name, usr)
sendcooldown = 1800
else if(dpt == "Sol Government")
Solgov_fax(src, tofax.info, tofax.name, usr)
sendcooldown = 1800
else
SendFax(tofax.info, tofax.name, usr, dpt)
sendcooldown = 600
usr << "Message transmitted successfully."
spawn(sendcooldown) // cooldown time
sendcooldown = 0
if(href_list["remove"])
if(tofax)
if(!ishuman(usr))
usr << "<span class='warning'>You can't do it.</span>"
else
tofax.loc = usr.loc
usr.put_in_hands(tofax)
usr << "<span class='notice'>You take the paper out of \the [src].</span>"
tofax = null
if(href_list["scan"])
if (scan)
if(ishuman(usr))
scan.loc = usr.loc
if(!usr.get_active_hand())
usr.put_in_hands(scan)
scan = null
else
scan.loc = src.loc
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
scan = I
authenticated = 0
if(href_list["dept"])
var/lastdpt = dpt
dpt = input(usr, "Which department?", "Choose a department", "") as null|anything in alldepartments
if(!dpt) dpt = lastdpt
if(href_list["auth"])
if ( (!( authenticated ) && (scan)) )
if (check_access(scan))
authenticated = 1
if(href_list["logout"])
authenticated = 0
updateUsrDialog()
/obj/machinery/faxmachine/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/paper))
if(!tofax)
user.drop_item()
tofax = O
O.loc = src
user << "<span class='notice'>You insert the paper into \the [src].</span>"
flick("faxsend", src)
updateUsrDialog()
else
user << "<span class='notice'>There is already something in \the [src].</span>"
else if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = O
if(!scan)
usr.drop_item()
idcard.loc = src
scan = idcard
else if(istype(O, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
return
/proc/Centcomm_fax(var/originfax, var/sent, var/sentname, var/mob/Sender)
var/msg = "\blue <b><font color='#006100'>CENTCOMM FAX: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;CentcommFaxReply=\ref[Sender];originfax=\ref[originfax]'>RPLY</a>)</b>: Receiving '[sentname]' via secure connection ... <a href='?_src_=holder;CentcommFaxView=\ref[sent]'>view message</a>"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
/proc/Solgov_fax(var/originfax, var/sent, var/sentname, var/mob/Sender)
var/msg = "\blue <b><font color='#1F66A0'>SOL GOVERNMENT FAX: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;SolGovFaxReply=\ref[Sender];originfax=\ref[originfax]'>RPLY</a>)</b>: Receiving '[sentname]' via secure connection ... <a href='?_src_=holder;CentcommFaxView=\ref[sent]'>view message</a>"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
proc/SendFax(var/sent, var/sentname, var/mob/Sender, var/dpt)
for(var/obj/machinery/faxmachine/F in allfaxes)
if( F.department == dpt )
if(! (F.stat & (BROKEN|NOPOWER) ) )
flick("faxreceive", F)
// give the sprite some time to flick
spawn(20)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc )
P.name = "[sentname]"
P.info = "[sent]"
P.update_icon()
playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)
+2 -10
View File
@@ -143,13 +143,5 @@ proc/announce_newscaster_news(datum/news_announcement/news)
sendto.is_admin_channel = 1
news_network.network_channels += sendto
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author ? news.author : sendto.author
newMsg.is_admin_message = !news.can_be_redacted
newMsg.body = news.message
newMsg.message_type = news.message_type
sendto.messages += newMsg
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert(news.channel_name)
var/author = news.author ? news.author : sendto.author
news_network.SubmitArticle(news.message, author, news.channel_name, null, !news.can_be_redacted, news.message_type)
+46 -33
View File
@@ -62,6 +62,7 @@ Class Procs:
/connection_edge/var/list/connecting_turfs = list()
/connection_edge/var/direct = 0
/connection_edge/var/sleeping = 1
/connection_edge/var/coefficient = 0
@@ -88,6 +89,8 @@ Class Procs:
/connection_edge/proc/tick()
/connection_edge/proc/recheck()
/connection_edge/proc/flow(list/movable, differential, repelled)
for(var/i = 1; i <= movable.len; i++)
var/atom/movable/M = movable[i]
@@ -147,35 +150,38 @@ Class Procs:
if(A.invalid || B.invalid)
erase()
return
//world << "[id]: Tick [air_master.current_cycle]: \..."
if(direct)
if(air_master.equivalent_pressure(A, B))
//world << "merged."
erase()
air_master.merge(A, B)
//world << "zones merged."
return
//air_master.equalize(A, B)
A.air.share_ratio(B.air, coefficient)
air_master.mark_zone_update(A)
air_master.mark_zone_update(B)
//world << "equalized."
var/equiv = A.air.share_ratio(B.air, coefficient)
var/differential = A.air.return_pressure() - B.air.return_pressure()
if(abs(differential) < vsc.airflow_lightest_pressure) return
if(abs(differential) >= vsc.airflow_lightest_pressure)
var/list/attracted
var/list/repelled
if(differential > 0)
attracted = A.movables()
repelled = B.movables()
else
attracted = B.movables()
repelled = A.movables()
var/list/attracted
var/list/repelled
if(differential > 0)
attracted = A.movables()
repelled = B.movables()
else
attracted = B.movables()
repelled = A.movables()
flow(attracted, abs(differential), 0)
flow(repelled, abs(differential), 1)
flow(attracted, abs(differential), 0)
flow(repelled, abs(differential), 1)
if(equiv)
if(direct)
erase()
air_master.merge(A, B)
return
else
A.air.equalize(B.air)
air_master.mark_edge_sleeping(src)
air_master.mark_zone_update(A)
air_master.mark_zone_update(B)
/connection_edge/zone/recheck()
if(!A.air.compare(B.air))
air_master.mark_edge_active(src)
//Helper proc to get connections for a zone.
/connection_edge/zone/proc/get_connected_zone(zone/from)
@@ -214,20 +220,27 @@ Class Procs:
if(A.invalid)
erase()
return
//world << "[id]: Tick [air_master.current_cycle]: To [B]!"
//A.air.mimic(B, coefficient)
A.air.share_space(air, dbg_out)
air_master.mark_zone_update(A)
var/equiv = A.air.share_space(air)
var/differential = A.air.return_pressure() - air.return_pressure()
if(abs(differential) < vsc.airflow_lightest_pressure) return
if(abs(differential) >= vsc.airflow_lightest_pressure)
var/list/attracted = A.movables()
flow(attracted, abs(differential), differential < 0)
var/list/attracted = A.movables()
flow(attracted, abs(differential), differential < 0)
if(equiv)
A.air.copy_from(air)
air_master.mark_edge_sleeping(src)
air_master.mark_zone_update(A)
/connection_edge/unsimulated/recheck()
if(!A.air.compare(air))
air_master.mark_edge_active(src)
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
//This implements a simplistic version of the Stefan-Boltzmann law.
var/energy_delta = ((A.temperature - B.temperature) ** 4) * 5.6704e-8 * connecting_tiles * 2.5
var/energy_delta = ((A.temperature - B.temperature) ** 4) * STEFAN_BOLTZMANN_CONSTANT * connecting_tiles * 2.5
var/maximum_energy_delta = max(0, min(A.temperature * A.heat_capacity() * A.group_multiplier, B.temperature * B.heat_capacity() * B.group_multiplier))
if(maximum_energy_delta > abs(energy_delta))
if(energy_delta < 0)
@@ -235,4 +248,4 @@ proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
energy_delta = maximum_energy_delta
A.temperature -= energy_delta / (A.heat_capacity() * A.group_multiplier)
B.temperature += energy_delta / (B.heat_capacity() * B.group_multiplier)
B.temperature += energy_delta / (B.heat_capacity() * B.group_multiplier)
+31 -6
View File
@@ -75,6 +75,7 @@ Class Procs:
/datum/controller/air_system/var/list/zones_to_update = list()
/datum/controller/air_system/var/list/active_fire_zones = list()
/datum/controller/air_system/var/list/active_hotspots = list()
/datum/controller/air_system/var/list/active_edges = list()
/datum/controller/air_system/var/active_zones = 0
@@ -97,7 +98,7 @@ Class Procs:
set background = 1
#endif
world << "\red \b Processing Geometry..."
world << "<span class='danger'>Processing Geometry...</span>"
sleep(-1)
var/start_time = world.timeofday
@@ -108,10 +109,15 @@ Class Procs:
simulated_turf_count++
S.update_air_properties()
world << {"<font color='red'><b>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</b>
world << {"<span class='danger'>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</b></span>
<span class='info'>
Total Simulated Turfs: [simulated_turf_count]
Total Zones: [zones.len]
Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count]</font>"}
Total Edges: [edges.len]
Total Active Edges: [active_edges.len ? "<span class='danger'>[active_edges.len]</span>" : "None"]
Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count]</font>
</span>"}
// spawn Start()
@@ -169,7 +175,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
if(.)
tick_progress = "processing edges"
for(var/connection_edge/edge in edges)
for(var/connection_edge/edge in active_edges)
edge.tick()
//Process fire zones.
@@ -299,6 +305,22 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
zones_to_update.Add(Z)
Z.needs_update = 1
/datum/controller/air_system/proc/mark_edge_sleeping(connection_edge/E)
#ifdef ZASDBG
ASSERT(istype(E)
#endif
if(E.sleeping) return
active_edges.Remove(E)
E.sleeping = 1
/datum/controller/air_system/proc/mark_edge_active(connection_edge/E)
#ifdef ZASDBG
ASSERT(istype(E)
#endif
if(!E.sleeping) return
active_edges.Add(E)
E.sleeping = 0
/datum/controller/air_system/proc/equivalent_pressure(zone/A, zone/B)
return A.air.compare(B.air)
@@ -309,12 +331,14 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
if(edge.contains_zone(B)) return edge
var/connection_edge/edge = new/connection_edge/zone(A,B)
edges.Add(edge)
edge.recheck()
return edge
else
for(var/connection_edge/unsimulated/edge in A.edges)
if(has_same_air(edge.B,B)) return edge
var/connection_edge/edge = new/connection_edge/unsimulated(A,B)
edges.Add(edge)
edge.recheck()
return edge
/datum/controller/air_system/proc/has_same_air(turf/A, turf/B)
@@ -325,5 +349,6 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
if(A.temperature != B.temperature) return 0
return 1
/datum/controller/air_system/proc/remove_edge(connection/c)
edges.Remove(c)
/datum/controller/air_system/proc/remove_edge(connection_edge/E)
edges.Remove(E)
if(!E.sleeping) active_edges.Remove(E)
+1 -1
View File
@@ -161,7 +161,7 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if(!istype(loc, /turf))
del src
dir = pick(cardinal)
set_dir(pick(cardinal))
SetLuminosity(3)
firelevel = fl
air_master.active_hotspots.Add(src)
+4
View File
@@ -138,6 +138,10 @@ Class Procs:
graphic_add.len = 0
graphic_remove.len = 0
for(var/connection_edge/E in edges)
if(E.sleeping)
E.recheck()
/zone/proc/dbg_data(mob/M)
M << name
for(var/g in air.gas)
+58 -22
View File
@@ -17,7 +17,8 @@
//List of active tile overlays for this gas_mixture. Updated by check_tile_graphic()
var/list/graphic = list()
//Takes a gas string, and the amount of moles to adjust by. Calls update_values() if update isn't 0.
//Takes a gas string and the amount of moles to adjust by. Calls update_values() if update isn't 0.
/datum/gas_mixture/proc/adjust_gas(gasid, moles, update = 1)
if(moles == 0)
return
@@ -30,6 +31,7 @@
if(update)
update_values()
//Same as adjust_gas(), but takes a temperature which is mixed in with the gas.
/datum/gas_mixture/proc/adjust_gas_temp(gasid, moles, temp, update = 1)
if(moles == 0)
@@ -50,7 +52,8 @@
if(update)
update_values()
//Variadic version of adjust_gas(). Takes any number of gas and mole pairs, and applies them.
//Variadic version of adjust_gas(). Takes any number of gas and mole pairs and applies them.
/datum/gas_mixture/proc/adjust_multi()
ASSERT(!(args.len % 2))
@@ -59,7 +62,8 @@
update_values()
//Variadic version of adjust_gas_temp(). Takes any number of gas, mole, and temperature tuples, and applies them.
//Variadic version of adjust_gas_temp(). Takes any number of gas, mole and temperature associations and applies them.
/datum/gas_mixture/proc/adjust_multi_temp()
ASSERT(!(args.len % 3))
@@ -68,8 +72,10 @@
update_values()
//Merges all the gas from another mixture into this one. Respects group_multipliers and adjusts temperature correctly.
/datum/gas_mixture/proc/merge(datum/gas_mixture/giver)
//Does not modify giver in any way.
/datum/gas_mixture/proc/merge(const/datum/gas_mixture/giver)
if(!giver)
return
@@ -89,6 +95,24 @@
update_values()
/datum/gas_mixture/proc/equalize(datum/gas_mixture/sharer)
for(var/g in sharer.gas)
var/comb = gas[g] + sharer.gas[g]
comb /= volume + sharer.volume
gas[g] = comb * volume
sharer.gas[g] = comb * sharer.volume
var/our_heatcap = heat_capacity()
var/share_heatcap = sharer.heat_capacity()
if(our_heatcap + share_heatcap)
temperature = ((temperature * our_heatcap) + (sharer.temperature * share_heatcap)) / (our_heatcap + share_heatcap)
sharer.temperature = temperature
return 1
//Returns the heat capacity of the gas mix based on the specific heat of the gases.
/datum/gas_mixture/proc/heat_capacity()
. = 0
@@ -96,11 +120,12 @@
. += gas_data.specific_heat[g] * gas[g]
. *= group_multiplier
//Adds or removes thermal energy. Returns the actual thermal energy change, as in the case of removing energy we can't go below TCMB.
/datum/gas_mixture/proc/add_thermal_energy(var/thermal_energy)
if (total_moles == 0)
return 0
var/heat_capacity = heat_capacity()
if (thermal_energy < 0)
if (temperature < TCMB)
@@ -114,43 +139,47 @@
/datum/gas_mixture/proc/get_thermal_energy_change(var/new_temperature)
return heat_capacity()*(max(new_temperature, 0) - temperature)
//Technically vacuum doesn't have a specific entropy. Just use a really big number (infinity would be ideal) here so that it's easy to add gas to vacuum and hard to take gas out.
#define SPECIFIC_ENTROPY_VACUUM 150000
//Returns the ideal gas specific entropy of the whole mix. This is the entropy per mole of /mixed/ gas.
/datum/gas_mixture/proc/specific_entropy()
if (!gas.len || total_moles == 0)
return SPECIFIC_ENTROPY_VACUUM
. = 0
for(var/g in gas)
. += gas[g] * specific_entropy_gas(g)
. /= total_moles
/*
It's arguable whether this should even be called entropy anymore. It's more "based on" entropy than actually entropy now.
Returns the ideal gas specific entropy of a specific gas in the mix. This is the entropy due to that gas per mole of /that/ gas in the mixture, not the entropy due to that gas per mole of gas mixture.
For the purposes of SS13, the specific entropy is just a number that tells you how hard it is to move gas. You can replace this with whatever you want.
Just remember that returning a SMALL number == adding gas to this gas mix is HARD, taking gas away is EASY, and that returning a LARGE number means the opposite (so a vacuum should approach infinity).
So returning a constant/(partial pressure) would probably do what most players expect. Although the version I have implemented below is a bit more nuanced than simply 1/P in that it scales in a way
So returning a constant/(partial pressure) would probably do what most players expect. Although the version I have implemented below is a bit more nuanced than simply 1/P in that it scales in a way
which is bit more realistic (natural log), and returns a fairly accurate entropy around room temperatures and pressures.
*/
/datum/gas_mixture/proc/specific_entropy_gas(var/gasid)
if (!(gasid in gas) || gas[gasid] == 0)
return SPECIFIC_ENTROPY_VACUUM //that gas isn't here
//group_multiplier gets divided out in volume/gas[gasid] - also, V/(m*T) = R/(partial pressure)
var/molar_mass = gas_data.molar_mass[gasid]
var/specific_heat = gas_data.specific_heat[gasid]
return R_IDEAL_GAS_EQUATION * ( log( (IDEAL_GAS_ENTROPY_CONSTANT*volume/(gas[gasid] * temperature)) * (molar_mass*specific_heat*temperature)**(2/3) + 1 ) + 15 )
//alternative, simpler equation
//var/partial_pressure = gas[gasid] * R_IDEAL_GAS_EQUATION * temperature / volume
//return R_IDEAL_GAS_EQUATION * ( log (1 + IDEAL_GAS_ENTROPY_CONSTANT/partial_pressure) + 20 )
//Updates the total_moles count and trims any empty gases.
/datum/gas_mixture/proc/update_values()
total_moles = 0
@@ -160,12 +189,14 @@
else
total_moles += gas[g]
//Returns the pressure of the gas mix. Only accurate if there have been no gas modifications since update_values() has been called.
/datum/gas_mixture/proc/return_pressure()
if(volume)
return total_moles * R_IDEAL_GAS_EQUATION * temperature / volume
return 0
//Removes moles from the gas mixture and returns a gas_mixture containing the removed air.
/datum/gas_mixture/proc/remove(amount)
amount = min(amount, total_moles * group_multiplier) //Can not take more air than the gas mixture has!
@@ -184,6 +215,7 @@
return removed
//Removes a ratio of gas from the mixture and returns a gas_mixture containing the removed air.
/datum/gas_mixture/proc/remove_ratio(ratio, out_group_multiplier = 1)
if(ratio <= 0)
@@ -205,6 +237,7 @@
return removed
//Removes moles from the gas mixture, limited by a given flag. Returns a gax_mixture containing the removed air.
/datum/gas_mixture/proc/remove_by_flag(flag, amount)
if(!flag || amount <= 0)
@@ -228,8 +261,9 @@
return removed
//Copies gas and temperature from another gas_mixture.
/datum/gas_mixture/proc/copy_from(datum/gas_mixture/sample)
/datum/gas_mixture/proc/copy_from(const/datum/gas_mixture/sample)
gas = sample.gas.Copy()
temperature = sample.temperature
@@ -237,8 +271,9 @@
return 1
//Checks if we are within acceptable range of another gas_mixture to suspend processing or merge.
/datum/gas_mixture/proc/compare(datum/gas_mixture/sample)
/datum/gas_mixture/proc/compare(const/datum/gas_mixture/sample)
if(!sample) return 0
var/list/marked = list()
@@ -264,9 +299,11 @@
return 1
/datum/gas_mixture/proc/react(atom/dump_location)
zburn(null)
//Rechecks the gas_mixture and adjusts the graphic list if needed.
//Two lists can be passed by reference if you need know specifically which graphics were added and removed.
/datum/gas_mixture/proc/check_tile_graphic(list/graphic_add = null, list/graphic_remove = null)
@@ -293,6 +330,7 @@
graphic -= graphic_remove
. = 1
//Simpler version of merge(), adjusts gas amounts directly and doesn't account for temperature or group_multiplier.
/datum/gas_mixture/proc/add(datum/gas_mixture/right_side)
for(var/g in right_side.gas)
@@ -301,6 +339,7 @@
update_values()
return 1
//Simpler version of remove(), adjusts gas amounts directly and doesn't account for group_multiplier.
/datum/gas_mixture/proc/subtract(datum/gas_mixture/right_side)
for(var/g in right_side.gas)
@@ -309,6 +348,7 @@
update_values()
return 1
//Multiply all gas amounts by a factor.
/datum/gas_mixture/proc/multiply(factor)
for(var/g in gas)
@@ -317,6 +357,7 @@
update_values()
return 1
//Divide all gas amounts by a factor.
/datum/gas_mixture/proc/divide(factor)
for(var/g in gas)
@@ -325,6 +366,7 @@
update_values()
return 1
//Shares gas with another gas_mixture based on the amount of connecting tiles and a fixed lookup table.
/datum/gas_mixture/proc/share_ratio(datum/gas_mixture/other, connecting_tiles, share_size = null, one_way = 0)
var/static/list/sharing_lookup_table = list(0.30, 0.40, 0.48, 0.54, 0.60, 0.66)
@@ -369,19 +411,13 @@
update_values()
other.update_values()
if(compare(other)) return 1
else return 0
return compare(other)
//A wrapper around share_ratio for spacing gas at the same rate as if it were going into a large airless room.
/datum/gas_mixture/proc/share_space(datum/gas_mixture/unsim_air)
if(!unsim_air)
return 0
return share_ratio(unsim_air, unsim_air.group_multiplier, max(1, max(group_multiplier + 3, 1) + unsim_air.group_multiplier), one_way = 1)
var/old_pressure = return_pressure()
share_ratio(unsim_air, unsim_air.group_multiplier, max(1, max(group_multiplier + 3, 1) + unsim_air.group_multiplier), one_way = 1)
return abs(old_pressure - return_pressure())
//Equalizes a list of gas mixtures. Used for pipe networks.
/proc/equalize_gases(datum/gas_mixture/list/gases)
+15
View File
@@ -45,8 +45,20 @@
return heard
/proc/isStationLevel(var/level)
return level in config.station_levels
/proc/isNotStationLevel(var/level)
return !isStationLevel()
/proc/isPlayerLevel(var/level)
return level in config.player_levels
/proc/isAdminLevel(var/level)
return level in config.admin_levels
/proc/isNotAdminLevel(var/level)
return !isAdminLevel(level)
//Magic constants obtained by using linear regression on right-angled triangles of sides 0<x<1, 0<y<1
//They should approximate pythagoras theorem well enough for our needs.
@@ -477,3 +489,6 @@ datum/projectile_data
rstats[i] = environment.vars[stats[i]]
temps[direction] = rstats
return temps
/proc/MinutesToTicks(var/minutes as num)
return minutes * 60 * 10
+20 -7
View File
@@ -22,11 +22,15 @@ var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
//Languages/species/whitelist.
var/global/list/all_species[0]
var/global/list/all_languages[0]
var/global/list/language_keys[0] //table of say codes for all languages
var/global/list/whitelisted_species = list("Human")
var/global/list/language_keys[0] // Table of say codes for all languages
var/global/list/whitelisted_species = list("Human") // Species that require a whitelist check.
var/global/list/playable_species = list("Human") // A list of ALL playable species, whitelisted, latejoin or otherwise.
// Posters
var/global/list/datum/poster/poster_designs = typesof(/datum/poster) - /datum/poster
var/global/list/poster_designs = list()
// Uplinks
var/list/obj/item/device/uplink/world_uplinks = list()
//Preferences stuff
//Hairstyles
@@ -100,12 +104,13 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
for(var/T in paths)
var/datum/language/L = new T
all_languages[L.name] = L
for (var/language_name in all_languages)
var/datum/language/L = all_languages[language_name]
language_keys[":[lowertext(L.key)]"] = L
language_keys[".[lowertext(L.key)]"] = L
language_keys["#[lowertext(L.key)]"] = L
if(!(L.flags & NONGLOBAL))
language_keys[":[lowertext(L.key)]"] = L
language_keys[".[lowertext(L.key)]"] = L
language_keys["#[lowertext(L.key)]"] = L
var/rkey = 0
paths = typesof(/datum/species)-/datum/species
@@ -115,9 +120,17 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
S.race_key = rkey //Used in mob icon caching.
all_species[S.name] = S
if(!(S.flags & IS_RESTRICTED))
playable_species += S.name
if(S.flags & IS_WHITELISTED)
whitelisted_species += S.name
//Posters
paths = typesof(/datum/poster) - /datum/poster
for(var/T in paths)
var/datum/poster/P = new T
poster_designs += P
return 1
/* // Uncomment to debug chemical reaction list.
+58 -1
View File
@@ -400,6 +400,60 @@ proc/listclearnulls(list/list)
//world.log << " output: [out.len]"
return reverselist(out)
/proc/dd_sortedObjectList(var/list/L, var/cache=list())
if(L.len < 2)
return L
var/middle = L.len / 2 + 1 // Copy is first,second-1
return dd_mergeObjectList(dd_sortedObjectList(L.Copy(0,middle), cache), dd_sortedObjectList(L.Copy(middle), cache), cache) //second parameter null = to end of list
/proc/dd_mergeObjectList(var/list/L, var/list/R, var/list/cache)
var/Li=1
var/Ri=1
var/list/result = new()
while(Li <= L.len && Ri <= R.len)
var/LLi = L[Li]
var/RRi = R[Ri]
var/LLiV = cache[LLi]
var/RRiV = cache[RRi]
if(!LLiV)
LLiV = LLi:dd_SortValue()
cache[LLi] = LLiV
if(!RRiV)
RRiV = RRi:dd_SortValue()
cache[RRi] = RRiV
if(LLiV < RRiV)
result += L[Li++]
else
result += R[Ri++]
if(Li <= L.len)
return (result + L.Copy(Li, 0))
return (result + R.Copy(Ri, 0))
// Insert an object into a sorted list, preserving sortedness
/proc/dd_insertObjectList(var/list/L, var/O)
var/min = 1
var/max = L.len
var/Oval = O:dd_SortValue()
while(1)
var/mid = min+round((max-min)/2)
if(mid == max)
L.Insert(mid, O)
return
var/Lmid = L[mid]
var/midval = Lmid:dd_SortValue()
if(Oval == midval)
L.Insert(mid, O)
return
else if(Oval < midval)
max = mid
else
min = mid+1
/*
proc/dd_sortedObjectList(list/incoming)
/*
Use binary search to order by dd_SortValue().
@@ -456,7 +510,7 @@ proc/dd_sortedObjectList(list/incoming)
sorted_list += current_sort_object
sorted_list += list_bottom
return sorted_list
*/
proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
// Returns a new list with the text values sorted.
@@ -527,3 +581,6 @@ datum/proc/dd_SortValue()
/obj/machinery/dd_SortValue()
return "[sanitize(name)]"
/obj/machinery/camera/dd_SortValue()
return "[c_tag]"
+7 -1
View File
@@ -1,3 +1,5 @@
#define RAND_F(L, H) (rand()*(H-L) + L)
// Credits to Nickr5 for the useful procs I've taken from his library resource.
var/const/E = 2.71828183
@@ -116,4 +118,8 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
/proc/Wrap(val, min, max)
var/d = max - min
var/t = Floor((val - min) / d)
return val - (t * d)
return val - (t * d)
proc/RaiseToPower(num, power)
if(!power) return 1
return (power-- > 1 ? num * RaiseToPower(num, power) : num)
+30 -2
View File
@@ -38,8 +38,18 @@ proc/random_facial_hair_style(gender, species = "Human")
return f_style
proc/random_name(gender, species = "Human")
if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
else return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
var/datum/species/current_species
if(species)
current_species = all_species[species]
if(!current_species || current_species.name == "Human")
if(gender==FEMALE)
return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
else
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
else
return current_species.get_random_name(gender)
proc/random_skin_tone()
switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino"))
@@ -97,3 +107,21 @@ proc/RoundHealth(health)
else
return "health-100"
return "0"
/*
Proc for attack log creation, because really why not
1 argument is the actor
2 argument is the target of action
3 is the description of action(like punched, throwed, or any other verb)
4 should it make adminlog note or not
5 is the tool with which the action was made(usually item) 5 and 6 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order
6 is additional information, anything that needs to be added
*/
/proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var/addition=null)
if(user && ismob(user))
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(target && ismob(target))
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(admin)
log_attack("<font color='red'>[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
+44 -12
View File
@@ -42,15 +42,15 @@
index = findtext(t, char)
return t
/proc/readd_quotes(var/t)
var/list/repl_chars = list("&#34;" = "\"")
for(var/char in repl_chars)
var/index = findtext(t, char)
while(index)
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+5)
index = findtext(t, char)
return t
/proc/readd_quotes(var/t)
var/list/repl_chars = list("&#34;" = "\"")
for(var/char in repl_chars)
var/index = findtext(t, char)
while(index)
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+5)
index = findtext(t, char)
return t
//Runs byond's sanitization proc along-side sanitize_simple
/proc/sanitize(var/t,var/list/repl_chars = null)
return html_encode(sanitize_simple(t,repl_chars))
@@ -79,10 +79,14 @@
else non_whitespace = 1
if(non_whitespace) return text //only accepts the text if it has some non-spaces
// Used to get a sanitized input.
// Used to get a properly sanitized input, of max_length
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
var/name = input(user, message, title, default)
return strip_html_simple(name, max_length)
return strip_html_properly(name, max_length)
// Used to get a trimmed, properly sanitized input, of max_length
/proc/trim_strip_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
return trim(stripped_input(user, message, title, default, max_length))
//Filters out undesirable characters from names
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
@@ -322,4 +326,32 @@ proc/TextPreview(var/string,var/len=40)
else
return string
else
return "[copytext(string, 1, 37)]..."
return "[copytext(string, 1, 37)]..."
//This proc strips html properly, but it's not lazy like the other procs.
//This means that it doesn't just remove < and > and call it a day.
//Also limit the size of the input, if specified.
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
var/opentag = 1 //These store the position of < and > respectively.
var/closetag = 1
while(1)
opentag = findtext(input, "<")
closetag = findtext(input, ">")
if(!closetag || !opentag)
break
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
if(max_length)
input = copytext(input,1,max_length)
return sanitize(input)
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
return trim(strip_html_properly(input, max_length))
//For generating neat chat tag-images
//The icon var could be local in the proc, but it's a waste of resources
// to always create it and then throw it out.
/var/icon/text_tag_icons = new('./icons/chattags.dmi')
/proc/create_text_tag(var/tagname, var/tagdesc = tagname, var/client/C = null)
if(C && (C.prefs.toggles & CHAT_NOICONS))
return tagdesc
return "<IMG src='\ref[text_tag_icons.icon]' class='text_tag' iconstate='[tagname]'" + (tagdesc ? " alt='[tagdesc]'" : "") + ">"
+13
View File
@@ -0,0 +1,13 @@
// Returns the atom sitting on the turf.
// For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
/proc/get_atom_on_turf(var/atom/movable/M)
var/atom/mloc = M
while(mloc && mloc.loc && !istype(mloc.loc, /turf/))
mloc = mloc.loc
return mloc
/proc/iswall(turf/T)
return (istype(T, /turf/simulated/wall) || istype(T, /turf/unsimulated/wall) || istype(T, /turf/simulated/shuttle/wall))
/proc/isfloor(turf/T)
return (istype(T, /turf/simulated/floor) || istype(T, /turf/unsimulated/floor) || istype(T, /turf/simulated/shuttle/floor))
+6
View File
@@ -194,6 +194,12 @@ proc/tg_list2text(list/list, glue=",")
. += copytext(text, last_found, found)
last_found = found + delim_len
while(found)
/proc/text2numlist(text, delimiter="\n")
var/list/num_list = list()
for(var/x in text2list(text, delimiter))
num_list += text2num(x)
return num_list
//Case Sensitive!
/proc/text2listEx(text, delimiter="\n")
+3 -3
View File
@@ -623,7 +623,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
//The variables should be apparent enough.
var/atom/movable/overlay/animation = new(location)
if(direction)
animation.dir = direction
animation.set_dir(direction)
animation.icon = a_icon
animation.layer = target:layer+1
if(a_icon_state)
@@ -854,7 +854,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
var/old_icon1 = T.icon
var/turf/X = B.ChangeTurf(T.type)
X.dir = old_dir1
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
@@ -1027,7 +1027,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
continue moving
var/turf/X = new T.type(B)
X.dir = old_dir1
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
+11 -11
View File
@@ -106,9 +106,9 @@
/obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors!
if(density)
Topic("aiEnable=7", list("aiEnable"="7"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="7"), 1) // 1 meaning no window (consistency!)
else
Topic("aiDisable=7", list("aiDisable"="7"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="7"), 1)
return
/atom/proc/AICtrlClick()
@@ -116,15 +116,15 @@
/obj/machinery/door/airlock/AICtrlClick() // Bolts doors
if(locked)
Topic("aiEnable=4", list("aiEnable"="4"), 1)// 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="4"), 1)// 1 meaning no window (consistency!)
else
Topic("aiDisable=4", list("aiDisable"="4"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="4"), 1)
/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
Topic("breaker=1", list("breaker"="1"), 0) // 0 meaning no window (consistency! wait...)
Topic(src, list("src"= "\ref[src]", "breaker"="1"), 1) // 1 meaning no window (consistency!)
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
Topic("toggleOn", list("toggleOn" = 1), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "operation"="toggleon"), 1) // 1 meaning no window (consistency!)
/atom/proc/AIAltClick(var/atom/A)
AltClick(A)
@@ -132,23 +132,23 @@
/obj/machinery/door/airlock/AIAltClick() // Electrifies doors.
if(!secondsElectrified)
// permanent shock
Topic("aiEnable=6", list("aiEnable"="6"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="6"), 1) // 1 meaning no window (consistency!)
else
// disable/6 is not in Topic; disable/5 disables both temporary and permanent shock
Topic("aiDisable=5", list("aiDisable"="5"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="5"), 1)
return
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
Topic("toggleLethal", list("toggleLethal" = 1), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "operation"="togglelethal"), 1) // 1 meaning no window (consistency!)
/atom/proc/AIMiddleClick()
return
/obj/machinery/door/airlock/AIMiddleClick() // Toggles door bolt lights.
if(!src.lights)
Topic("aiEnable=10", list("aiEnable"="10"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="10"), 1) // 1 meaning no window (consistency!)
else
Topic("aiDisable=10", list("aiDisable"="10"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="10"), 1)
return
//
+35 -18
View File
@@ -147,11 +147,13 @@
return
/mob/proc/changeNext_move(num)
next_move = world.time + num
// Default behavior: ignore double clicks, consider them normal clicks instead
/mob/proc/DblClickOn(var/atom/A, var/params)
ClickOn(A,params)
/*
Translates into attack_hand, etc.
@@ -165,6 +167,21 @@
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
return
/mob/living/UnarmedAttack(var/atom/A, var/proximity_flag)
if(!ticker)
src << "You cannot attack people before the game has started."
return 0
if (istype(get_area(src), /area/start))
src << "No attacking people at spawn, you jackass."
return 0
if(stat)
return 0
return 1
/*
Ranged unarmed attack:
@@ -205,9 +222,22 @@
*/
/mob/proc/MiddleClickOn(var/atom/A)
return
/mob/living/carbon/MiddleClickOn(var/atom/A)
swap_hand()
/mob/living/carbon/human/MiddleClickOn(var/atom/A)
if(back)
var/obj/item/weapon/rig/rig = back
if(istype(rig) && rig.selected_module)
if(world.time <= next_move) return
next_move = world.time + 8
rig.selected_module.engage(A)
return
swap_hand()
// In case of use break glass
/*
/atom/proc/MiddleClick(var/mob/M as mob)
@@ -224,8 +254,7 @@
return
/atom/proc/ShiftClick(var/mob/user)
if(user.client && user.client.eye == user)
examine()
user.face_atom(src)
user.examinate(src)
return
/*
@@ -301,17 +330,7 @@
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
// Snowflake for space vines.
var/is_buckled = 0
if(buckled)
if(istype(buckled))
if(!buckled.movable)
is_buckled = 1
else
is_buckled = 0
if( stat || is_buckled || !A || !x || !y || !A.x || !A.y ) return
if(!A || !x || !y || !A.x || !A.y) return
var/dx = A.x - x
var/dy = A.y - y
if(!dx && !dy) return
@@ -323,7 +342,5 @@
else
if(dx > 0) direction = EAST
else direction = WEST
usr.dir = direction
if(buckled && buckled.movable)
buckled.dir = direction
buckled.handle_rotation()
if(direction != dir)
facedir(direction)
+5 -4
View File
@@ -39,10 +39,11 @@
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
#define ui_borg_store "9:16,1:5" //borgs
#define ui_inv1 "7,1:5" //borgs
#define ui_inv2 "8,1:5" //borgs
#define ui_inv3 "9,1:5" //borgs
#define ui_borg_store "10,1:5" //borgs
#define ui_borg_inventory "6,1:5"//borgs
#define ui_monkey_mask "5:14,1:5" //monkey
#define ui_monkey_back "6:14,1:5" //monkey
+1 -1
View File
@@ -7,7 +7,7 @@
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_acti
+96 -56
View File
@@ -3,6 +3,15 @@
Uses the same visual objects for all players.
*/
var/datum/global_hud/global_hud = new()
var/list/global_huds = list(
global_hud.druggy,
global_hud.blurry,
global_hud.vimpaired,
global_hud.darkMask,
global_hud.nvg,
global_hud.thermal,
global_hud.meson,
global_hud.science)
/datum/hud/var/obj/screen/grab_intent
/datum/hud/var/obj/screen/hurt_intent
@@ -17,6 +26,17 @@ var/datum/global_hud/global_hud = new()
var/obj/screen/nvg
var/obj/screen/thermal
var/obj/screen/meson
var/obj/screen/science
/datum/global_hud/proc/setup_overlay(var/icon_state)
var/obj/screen/screen = new /obj/screen()
screen.screen_loc = "1,1"
screen.icon = 'icons/obj/hud_full.dmi'
screen.icon_state = icon_state
screen.layer = 17
screen.mouse_opacity = 0
return screen
/datum/global_hud/New()
//420erryday psychedellic colours screen overlay for when you are high
@@ -33,26 +53,10 @@ var/datum/global_hud/global_hud = new()
blurry.layer = 17
blurry.mouse_opacity = 0
nvg = new /obj/screen()
nvg.screen_loc = "1,1"
nvg.icon = 'icons/obj/hud_full.dmi'
nvg.icon_state = "nvg_hud"
nvg.layer = 17
nvg.mouse_opacity = 0
thermal = new /obj/screen()
thermal.screen_loc = "1,1"
thermal.icon = 'icons/obj/hud_full.dmi'
thermal.icon_state = "thermal_hud"
thermal.layer = 17
thermal.mouse_opacity = 0
meson = new /obj/screen()
meson.screen_loc = "1,1"
meson.icon = 'icons/obj/hud_full.dmi'
meson.icon_state = "meson_hud"
meson.layer = 17
meson.mouse_opacity = 0
nvg = setup_overlay("nvg_hud")
thermal = setup_overlay("thermal_hud")
meson = setup_overlay("meson_hud")
science = setup_overlay("science_hud")
var/obj/screen/O
var/i
@@ -131,37 +135,57 @@ var/datum/global_hud/global_hud = new()
var/list/obj/screen/item_action/item_action_list = list() //Used for the item action ui buttons.
datum/hud/New(mob/owner)
mymob = owner
instantiate()
..()
/datum/hud/proc/hidden_inventory_update()
if(!mymob) return
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
if(inventory_shown && hud_shown)
if(H.shoes) H.shoes.screen_loc = ui_shoes
if(H.gloves) H.gloves.screen_loc = ui_gloves
if(H.l_ear) H.l_ear.screen_loc = ui_l_ear
if(H.r_ear) H.r_ear.screen_loc = ui_r_ear
if(H.glasses) H.glasses.screen_loc = ui_glasses
if(H.w_uniform) H.w_uniform.screen_loc = ui_iclothing
if(H.wear_suit) H.wear_suit.screen_loc = ui_oclothing
if(H.wear_mask) H.wear_mask.screen_loc = ui_mask
if(H.head) H.head.screen_loc = ui_head
else
if(H.shoes) H.shoes.screen_loc = null
if(H.gloves) H.gloves.screen_loc = null
if(H.l_ear) H.l_ear.screen_loc = null
if(H.r_ear) H.r_ear.screen_loc = null
if(H.glasses) H.glasses.screen_loc = null
if(H.w_uniform) H.w_uniform.screen_loc = null
if(H.wear_suit) H.wear_suit.screen_loc = null
if(H.wear_mask) H.wear_mask.screen_loc = null
if(H.head) H.head.screen_loc = null
for(var/gear_slot in H.species.hud.gear)
var/list/hud_data = H.species.hud.gear[gear_slot]
if(inventory_shown && hud_shown)
switch(hud_data["slot"])
if(slot_head)
if(H.head) H.head.screen_loc = hud_data["loc"]
if(slot_shoes)
if(H.shoes) H.shoes.screen_loc = hud_data["loc"]
if(slot_l_ear)
if(H.l_ear) H.l_ear.screen_loc = hud_data["loc"]
if(slot_r_ear)
if(H.r_ear) H.r_ear.screen_loc = hud_data["loc"]
if(slot_gloves)
if(H.gloves) H.gloves.screen_loc = hud_data["loc"]
if(slot_glasses)
if(H.glasses) H.glasses.screen_loc = hud_data["loc"]
if(slot_w_uniform)
if(H.w_uniform) H.w_uniform.screen_loc = hud_data["loc"]
if(slot_wear_suit)
if(H.wear_suit) H.wear_suit.screen_loc = hud_data["loc"]
if(slot_wear_mask)
if(H.wear_mask) H.wear_mask.screen_loc = hud_data["loc"]
else
switch(hud_data["slot"])
if(slot_head)
if(H.head) H.head.screen_loc = null
if(slot_shoes)
if(H.shoes) H.shoes.screen_loc = null
if(slot_l_ear)
if(H.l_ear) H.l_ear.screen_loc = null
if(slot_r_ear)
if(H.r_ear) H.r_ear.screen_loc = null
if(slot_gloves)
if(H.gloves) H.gloves.screen_loc = null
if(slot_glasses)
if(H.glasses) H.glasses.screen_loc = null
if(slot_w_uniform)
if(H.w_uniform) H.w_uniform.screen_loc = null
if(slot_wear_suit)
if(H.wear_suit) H.wear_suit.screen_loc = null
if(slot_wear_mask)
if(H.wear_mask) H.wear_mask.screen_loc = null
/datum/hud/proc/persistant_inventory_update()
@@ -170,20 +194,36 @@ datum/hud/New(mob/owner)
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
if(hud_shown)
if(H.s_store) H.s_store.screen_loc = ui_sstore1
if(H.wear_id) H.wear_id.screen_loc = ui_id
if(H.belt) H.belt.screen_loc = ui_belt
if(H.back) H.back.screen_loc = ui_back
if(H.l_store) H.l_store.screen_loc = ui_storage1
if(H.r_store) H.r_store.screen_loc = ui_storage2
else
if(H.s_store) H.s_store.screen_loc = null
if(H.wear_id) H.wear_id.screen_loc = null
if(H.belt) H.belt.screen_loc = null
if(H.back) H.back.screen_loc = null
if(H.l_store) H.l_store.screen_loc = null
if(H.r_store) H.r_store.screen_loc = null
for(var/gear_slot in H.species.hud.gear)
var/list/hud_data = H.species.hud.gear[gear_slot]
if(hud_shown)
switch(hud_data["slot"])
if(slot_s_store)
if(H.s_store) H.s_store.screen_loc = hud_data["loc"]
if(slot_wear_id)
if(H.wear_id) H.wear_id.screen_loc = hud_data["loc"]
if(slot_belt)
if(H.belt) H.belt.screen_loc = hud_data["loc"]
if(slot_back)
if(H.back) H.back.screen_loc = hud_data["loc"]
if(slot_l_store)
if(H.l_store) H.l_store.screen_loc = hud_data["loc"]
if(slot_r_store)
if(H.r_store) H.r_store.screen_loc = hud_data["loc"]
else
switch(hud_data["slot"])
if(slot_s_store)
if(H.s_store) H.s_store.screen_loc = null
if(slot_wear_id)
if(H.wear_id) H.wear_id.screen_loc = null
if(slot_belt)
if(H.belt) H.belt.screen_loc = null
if(slot_back)
if(H.back) H.back.screen_loc = null
if(slot_l_store)
if(H.l_store) H.l_store.screen_loc = null
if(slot_r_store)
if(H.r_store) H.r_store.screen_loc = null
/datum/hud/proc/instantiate()
+8 -8
View File
@@ -34,7 +34,7 @@
inv_box.icon_state = slot_data["state"]
if(slot_data["dir"])
inv_box.dir = slot_data["dir"]
inv_box.set_dir(slot_data["dir"])
if(slot_data["toggle"])
src.other += inv_box
@@ -58,7 +58,7 @@
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = "intent_"+mymob.a_intent
using.screen_loc = ui_acti
@@ -125,7 +125,7 @@
if(hud_data.has_m_intent)
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
@@ -160,7 +160,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.set_dir(WEST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
@@ -176,7 +176,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.set_dir(EAST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
@@ -191,7 +191,7 @@
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
@@ -202,7 +202,7 @@
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
@@ -358,7 +358,7 @@
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
mymob.gun_setting_icon.set_dir(2)
mymob.client.screen = null
+12 -12
View File
@@ -8,7 +8,7 @@
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
@@ -67,7 +67,7 @@
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
@@ -85,7 +85,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.set_dir(WEST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
@@ -98,7 +98,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.set_dir(EAST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
@@ -111,7 +111,7 @@
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
@@ -120,7 +120,7 @@
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
@@ -129,7 +129,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "mask"
inv_box.dir = NORTH
inv_box.set_dir(NORTH)
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_monkey_mask
@@ -139,7 +139,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "back"
inv_box.dir = NORTHEAST
inv_box.set_dir(NORTHEAST)
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_back
@@ -224,19 +224,19 @@
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
mymob.gun_setting_icon.set_dir(2)
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
mymob.item_use_icon.set_dir(1)
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_move_icon.set_dir(1)
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
mymob.gun_run_icon.set_dir(1)
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
+94 -11
View File
@@ -1,3 +1,6 @@
var/obj/screen/robot_inventory
/datum/hud/proc/robot_hud()
src.adding = list()
@@ -5,11 +8,10 @@
var/obj/screen/using
//Radio
using = new /obj/screen()
using.name = "radio"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "radio"
using.screen_loc = ui_movi
@@ -20,7 +22,7 @@
using = new /obj/screen()
using.name = "module1"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv1"
using.screen_loc = ui_inv1
@@ -30,7 +32,7 @@
using = new /obj/screen()
using.name = "module2"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv2"
using.screen_loc = ui_inv2
@@ -40,7 +42,7 @@
using = new /obj/screen()
using.name = "module3"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv3"
using.screen_loc = ui_inv3
@@ -53,7 +55,7 @@
//Intent
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
@@ -98,6 +100,13 @@
mymob.throw_icon.name = "store"
mymob.throw_icon.screen_loc = ui_borg_store
//Inventory
robot_inventory = new /obj/screen()
robot_inventory.name = "inventory"
robot_inventory.icon = 'icons/mob/screen1_robot.dmi'
robot_inventory.icon_state = "inventory"
robot_inventory.screen_loc = ui_borg_inventory
//Temp
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon_state = "temp0"
@@ -146,25 +155,99 @@
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
mymob.gun_setting_icon.set_dir(2)
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
mymob.item_use_icon.set_dir(1)
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_move_icon.set_dir(1)
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
mymob.gun_run_icon.set_dir(1)
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon, robot_inventory) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
return
/datum/hud/proc/toggle_show_robot_modules()
if(!isrobot(mymob))
return
var/mob/living/silicon/robot/r = mymob
r.shown_robot_modules = !r.shown_robot_modules
update_robot_modules_display()
/datum/hud/proc/update_robot_modules_display()
if(!isrobot(mymob))
return
var/mob/living/silicon/robot/r = mymob
if(r.shown_robot_modules)
//Modules display is shown
//r.client.screen += robot_inventory //"store" icon
if(!r.module)
usr << "<span class='danger'>No module selected</span>"
return
if(!r.module.modules)
usr << "<span class='danger'>Selected module has no modules to select</span>"
return
if(!r.robot_modules_background)
return
var/display_rows = round((r.module.modules.len) / 8) +1 //+1 because round() returns floor of number
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
r.client.screen += r.robot_modules_background
var/x = -4 //Start at CENTER-4,SOUTH+1
var/y = 1
//Unfortunately adding the emag module to the list of modules has to be here. This is because a borg can
//be emagged before they actually select a module. - or some situation can cause them to get a new module
// - or some situation might cause them to get de-emagged or something.
if(r.emagged)
if(!(r.module.emag in r.module.modules))
r.module.modules.Add(r.module.emag)
else
if(r.module.emag in r.module.modules)
r.module.modules.Remove(r.module.emag)
for(var/atom/movable/A in r.module.modules)
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
//Module is not currently active
r.client.screen += A
if(x < 0)
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
else
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
A.layer = 20
x++
if(x == 4)
x = -4
y++
else
//Modules display is hidden
//r.client.screen -= robot_inventory //"store" icon
for(var/atom/A in r.module.modules)
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
//Module is not currently active
r.client.screen -= A
r.shown_robot_modules = 0
r.client.screen -= r.robot_modules_background

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