diff --git a/baystation12.dme b/baystation12.dme
index 669fe0408a..3140c5c97a 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -194,6 +194,7 @@
#include "code\game\asteroid.dm"
#include "code\game\atoms.dm"
#include "code\game\atoms_movable.dm"
+#include "code\game\periodic_news.dm"
#include "code\game\response_team.dm"
#include "code\game\shuttle_engines.dm"
#include "code\game\skincmd.dm"
@@ -372,6 +373,7 @@
#include "code\game\machinery\computer\aifixer.dm"
#include "code\game\machinery\computer\arcade.dm"
#include "code\game\machinery\computer\atmos_alert.dm"
+#include "code\game\machinery\computer\atmos_control.dm"
#include "code\game\machinery\computer\buildandrepair.dm"
#include "code\game\machinery\computer\camera.dm"
#include "code\game\machinery\computer\card.dm"
@@ -379,7 +381,7 @@
#include "code\game\machinery\computer\communications.dm"
#include "code\game\machinery\computer\computer.dm"
#include "code\game\machinery\computer\crew.dm"
-#include "code\game\machinery\computer\HolodeckControl.dm"
+#include "code\game\machinery\computer\guestpass.dm"
#include "code\game\machinery\computer\hologram.dm"
#include "code\game\machinery\computer\law.dm"
#include "code\game\machinery\computer\medical.dm"
@@ -397,6 +399,36 @@
#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\computer3\bios.dm"
+#include "code\game\machinery\computer3\buildandrepair.dm"
+#include "code\game\machinery\computer3\component.dm"
+#include "code\game\machinery\computer3\computer.dm"
+#include "code\game\machinery\computer3\computer3_notes.dm"
+#include "code\game\machinery\computer3\file.dm"
+#include "code\game\machinery\computer3\laptop.dm"
+#include "code\game\machinery\computer3\lapvend.dm"
+#include "code\game\machinery\computer3\networking.dm"
+#include "code\game\machinery\computer3\NTOS.dm"
+#include "code\game\machinery\computer3\program.dm"
+#include "code\game\machinery\computer3\program_disks.dm"
+#include "code\game\machinery\computer3\server.dm"
+#include "code\game\machinery\computer3\storage.dm"
+#include "code\game\machinery\computer3\computers\arcade.dm"
+#include "code\game\machinery\computer3\computers\atmos_alert.dm"
+#include "code\game\machinery\computer3\computers\camera.dm"
+#include "code\game\machinery\computer3\computers\card.dm"
+#include "code\game\machinery\computer3\computers\communications.dm"
+#include "code\game\machinery\computer3\computers\crew.dm"
+#include "code\game\machinery\computer3\computers\customs.dm"
+#include "code\game\machinery\computer3\computers\HolodeckControl.dm"
+#include "code\game\machinery\computer3\computers\law.dm"
+#include "code\game\machinery\computer3\computers\medical.dm"
+#include "code\game\machinery\computer3\computers\Operating.dm"
+#include "code\game\machinery\computer3\computers\power.dm"
+#include "code\game\machinery\computer3\computers\prisoner.dm"
+#include "code\game\machinery\computer3\computers\robot.dm"
+#include "code\game\machinery\computer3\computers\security.dm"
+#include "code\game\machinery\computer3\computers\welcome.dm"
#include "code\game\machinery\doors\airlock.dm"
#include "code\game\machinery\doors\airlock_control.dm"
#include "code\game\machinery\doors\airlock_electronics.dm"
@@ -456,6 +488,7 @@
#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\buckling.dm"
#include "code\game\objects\empulse.dm"
#include "code\game\objects\explosion.dm"
#include "code\game\objects\explosion_recursive.dm"
@@ -467,6 +500,7 @@
#include "code\game\objects\effects\bump_teleporter.dm"
#include "code\game\objects\effects\chemsmoke.dm"
#include "code\game\objects\effects\effect_system.dm"
+#include "code\game\objects\effects\explosion_particles.dm"
#include "code\game\objects\effects\gibs.dm"
#include "code\game\objects\effects\glowshroom.dm"
#include "code\game\objects\effects\landmarks.dm"
@@ -494,6 +528,7 @@
#include "code\game\objects\effects\spawners\gibspawner.dm"
#include "code\game\objects\effects\spawners\vaultspawner.dm"
#include "code\game\objects\items\apc_frame.dm"
+#include "code\game\objects\items\ashtray.dm"
#include "code\game\objects\items\blueprints.dm"
#include "code\game\objects\items\bodybag.dm"
#include "code\game\objects\items\contraband.dm"
@@ -517,6 +552,7 @@
#include "code\game\objects\items\devices\pipe_painter.dm"
#include "code\game\objects\items\devices\powersink.dm"
#include "code\game\objects\items\devices\scanners.dm"
+#include "code\game\objects\items\devices\spy_bug.dm"
#include "code\game\objects\items\devices\suit_cooling.dm"
#include "code\game\objects\items\devices\taperecorder.dm"
#include "code\game\objects\items\devices\traitordevices.dm"
@@ -551,6 +587,7 @@
#include "code\game\objects\items\stacks\tiles\plasteel.dm"
#include "code\game\objects\items\stacks\tiles\tile_types.dm"
#include "code\game\objects\items\weapons\AI_modules.dm"
+#include "code\game\objects\items\weapons\autopsy.dm"
#include "code\game\objects\items\weapons\candle.dm"
#include "code\game\objects\items\weapons\cards_ids.dm"
#include "code\game\objects\items\weapons\cigs_lighters.dm"
@@ -568,6 +605,7 @@
#include "code\game\objects\items\weapons\mop.dm"
#include "code\game\objects\items\weapons\paint.dm"
#include "code\game\objects\items\weapons\paiwire.dm"
+#include "code\game\objects\items\weapons\policetape.dm"
#include "code\game\objects\items\weapons\power_cells.dm"
#include "code\game\objects\items\weapons\RCD.dm"
#include "code\game\objects\items\weapons\RSF.dm"
@@ -583,6 +621,7 @@
#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\weldbackpack.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"
@@ -594,9 +633,11 @@
#include "code\game\objects\items\weapons\circuitboards\computer\research.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\supply.dm"
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
+#include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
+#include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\research.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\shieldgen.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\telecomms.dm"
@@ -743,6 +784,7 @@
#include "code\modules\admin\verbs\adminsay.dm"
#include "code\modules\admin\verbs\atmosdebug.dm"
#include "code\modules\admin\verbs\BrokenInhands.dm"
+#include "code\modules\admin\verbs\buildmode.dm"
#include "code\modules\admin\verbs\check_customitem_activity.dm"
#include "code\modules\admin\verbs\cinematic.dm"
#include "code\modules\admin\verbs\custom_event.dm"
@@ -750,6 +792,7 @@
#include "code\modules\admin\verbs\debug.dm"
#include "code\modules\admin\verbs\diagnostics.dm"
#include "code\modules\admin\verbs\getlogs.dm"
+#include "code\modules\admin\verbs\icarus.dm"
#include "code\modules\admin\verbs\mapping.dm"
#include "code\modules\admin\verbs\massmodvar.dm"
#include "code\modules\admin\verbs\modifyvariables.dm"
@@ -832,6 +875,7 @@
#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"
@@ -858,19 +902,22 @@
#include "code\modules\clothing\under\miscellaneous.dm"
#include "code\modules\clothing\under\shorts.dm"
#include "code\modules\clothing\under\syndicate.dm"
-#include "code\modules\clothing\under\ties.dm"
+#include "code\modules\clothing\under\accessories\accessory.dm"
+#include "code\modules\clothing\under\accessories\armband.dm"
+#include "code\modules\clothing\under\accessories\holster.dm"
+#include "code\modules\clothing\under\accessories\storage.dm"
#include "code\modules\clothing\under\jobs\civilian.dm"
#include "code\modules\clothing\under\jobs\engineering.dm"
#include "code\modules\clothing\under\jobs\medsci.dm"
#include "code\modules\clothing\under\jobs\security.dm"
#include "code\modules\customitems\item_defines.dm"
#include "code\modules\customitems\item_spawning.dm"
-#include "code\modules\destilery\main.dm"
#include "code\modules\detectivework\evidence.dm"
#include "code\modules\detectivework\footprints_and_rag.dm"
#include "code\modules\detectivework\forensics.dm"
#include "code\modules\detectivework\scanner.dm"
#include "code\modules\detectivework\scanning_console.dm"
+#include "code\modules\distillery\main.dm"
#include "code\modules\economy\Accounts.dm"
#include "code\modules\economy\Accounts_DB.dm"
#include "code\modules\economy\ATM.dm"
@@ -918,6 +965,8 @@
#include "code\modules\food\recipes_microwave.dm"
#include "code\modules\games\cards.dm"
#include "code\modules\genetics\side_effects.dm"
+#include "code\modules\holodeck\HolodeckControl.dm"
+#include "code\modules\holodeck\HolodeckObjects.dm"
#include "code\modules\hydroponics\biogenerator.dm"
#include "code\modules\hydroponics\grown_inedible.dm"
#include "code\modules\hydroponics\hydro_tools.dm"
@@ -925,6 +974,7 @@
#include "code\modules\hydroponics\seed_datums.dm"
#include "code\modules\hydroponics\seed_machines.dm"
#include "code\modules\hydroponics\seed_mobs.dm"
+#include "code\modules\hydroponics\seed_storage.dm"
#include "code\modules\hydroponics\seeds.dm"
#include "code\modules\hydroponics\vines.dm"
#include "code\modules\library\lib_items.dm"
@@ -951,7 +1001,6 @@
#include "code\modules\mining\ore.dm"
#include "code\modules\mining\ore_datum.dm"
#include "code\modules\mining\satchel_ore_boxdm.dm"
-#include "code\modules\mining\drilling\distribution.dm"
#include "code\modules\mining\drilling\drill.dm"
#include "code\modules\mining\drilling\scanner.dm"
#include "code\modules\mob\death.dm"
@@ -991,6 +1040,7 @@
#include "code\modules\mob\living\carbon\carbon_powers.dm"
#include "code\modules\mob\living\carbon\give.dm"
#include "code\modules\mob\living\carbon\shock.dm"
+#include "code\modules\mob\living\carbon\viruses.dm"
#include "code\modules\mob\living\carbon\alien\alien.dm"
#include "code\modules\mob\living\carbon\alien\alien_attacks.dm"
#include "code\modules\mob\living\carbon\alien\alien_damage.dm"
@@ -1035,6 +1085,7 @@
#include "code\modules\mob\living\carbon\human\life.dm"
#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\MedicalSideEffects.dm"
#include "code\modules\mob\living\carbon\human\say.dm"
#include "code\modules\mob\living\carbon\human\unarmed_attack.dm"
#include "code\modules\mob\living\carbon\human\update_icons.dm"
@@ -1056,6 +1107,7 @@
#include "code\modules\mob\living\carbon\metroid\emote.dm"
#include "code\modules\mob\living\carbon\metroid\examine.dm"
#include "code\modules\mob\living\carbon\metroid\hud.dm"
+#include "code\modules\mob\living\carbon\metroid\items.dm"
#include "code\modules\mob\living\carbon\metroid\life.dm"
#include "code\modules\mob\living\carbon\metroid\login.dm"
#include "code\modules\mob\living\carbon\metroid\metroid.dm"
@@ -1080,6 +1132,7 @@
#include "code\modules\mob\living\silicon\ai\ai.dm"
#include "code\modules\mob\living\silicon\ai\death.dm"
#include "code\modules\mob\living\silicon\ai\examine.dm"
+#include "code\modules\mob\living\silicon\ai\latejoin.dm"
#include "code\modules\mob\living\silicon\ai\laws.dm"
#include "code\modules\mob\living\silicon\ai\life.dm"
#include "code\modules\mob\living\silicon\ai\login.dm"
@@ -1101,6 +1154,7 @@
#include "code\modules\mob\living\silicon\pai\recruit.dm"
#include "code\modules\mob\living\silicon\pai\say.dm"
#include "code\modules\mob\living\silicon\pai\software.dm"
+#include "code\modules\mob\living\silicon\pai\software_modules.dm"
#include "code\modules\mob\living\silicon\robot\analyzer.dm"
#include "code\modules\mob\living\silicon\robot\component.dm"
#include "code\modules\mob\living\silicon\robot\death.dm"
@@ -1181,6 +1235,14 @@
#include "code\modules\organs\organ_objects.dm"
#include "code\modules\organs\pain.dm"
#include "code\modules\organs\wound.dm"
+#include "code\modules\overmap\_defines.dm"
+#include "code\modules\overmap\sectors.dm"
+#include "code\modules\overmap\ships\ship.dm"
+#include "code\modules\overmap\ships\computers\engine_control.dm"
+#include "code\modules\overmap\ships\computers\helm.dm"
+#include "code\modules\overmap\ships\computers\shuttle.dm"
+#include "code\modules\overmap\ships\engines\engine.dm"
+#include "code\modules\overmap\ships\engines\thermal.dm"
#include "code\modules\paperwork\carbonpaper.dm"
#include "code\modules\paperwork\clipboard.dm"
#include "code\modules\paperwork\faxmachine.dm"
@@ -1219,6 +1281,23 @@
#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\rust\circuits_and_design.dm"
+#include "code\modules\power\rust\core_control.dm"
+#include "code\modules\power\rust\core_field.dm"
+#include "code\modules\power\rust\core_gen.dm"
+#include "code\modules\power\rust\core_monitor.dm"
+#include "code\modules\power\rust\fuel_assembly.dm"
+#include "code\modules\power\rust\fuel_assembly_port.dm"
+#include "code\modules\power\rust\fuel_assembly_port_construction.dm"
+#include "code\modules\power\rust\fuel_compressor.dm"
+#include "code\modules\power\rust\fuel_compressor_construction.dm"
+#include "code\modules\power\rust\fuel_control.dm"
+#include "code\modules\power\rust\fuel_injector.dm"
+#include "code\modules\power\rust\fusion_reactions.dm"
+#include "code\modules\power\rust\gyrotron.dm"
+#include "code\modules\power\rust\gyrotron_controller.dm"
+#include "code\modules\power\rust\radiation.dm"
+#include "code\modules\power\rust\virtual_particle_catcher.dm"
#include "code\modules\power\sensors\powernet_sensor.dm"
#include "code\modules\power\sensors\sensor_monitoring.dm"
#include "code\modules\power\singularity\collector.dm"
@@ -1264,6 +1343,8 @@
#include "code\modules\projectiles\projectile\energy.dm"
#include "code\modules\projectiles\projectile\force.dm"
#include "code\modules\projectiles\projectile\special.dm"
+#include "code\modules\random_map\mining_distribution.dm"
+#include "code\modules\random_map\random_map.dm"
#include "code\modules\reagents\Chemistry-Colours.dm"
#include "code\modules\reagents\Chemistry-Holder.dm"
#include "code\modules\reagents\Chemistry-Machinery.dm"
@@ -1429,6 +1510,7 @@
#include "code\modules\vehicles\cargo_train.dm"
#include "code\modules\vehicles\train.dm"
#include "code\modules\vehicles\vehicle.dm"
+#include "code\modules\virus2\admin.dm"
#include "code\modules\virus2\analyser.dm"
#include "code\modules\virus2\antibodies.dm"
#include "code\modules\virus2\centrifuge.dm"
@@ -1447,86 +1529,6 @@
#include "code\TriDimension\Structures.dm"
#include "code\TriDimension\Structures_presets.dm"
#include "code\TriDimension\Turfs.dm"
-#include "code\WorkInProgress\autopsy.dm"
-#include "code\WorkInProgress\buildmode.dm"
-#include "code\WorkInProgress\explosion_particles.dm"
-#include "code\WorkInProgress\periodic_news.dm"
-#include "code\WorkInProgress\Apples\artifacts.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_plants.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_temple.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_tribe.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_turfs.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Jungle\misc_helpers.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\areas.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\circuits_and_design.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\core_control.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\core_field.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\core_gen.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\core_monitor.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly_port.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly_port_construction.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_compressor_construction.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_control.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_injector.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\fusion_reactions.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron_controller.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm"
-#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
-#include "code\WorkInProgress\Chinsky\ashtray.dm"
-#include "code\WorkInProgress\Chinsky\guestpass.dm"
-#include "code\WorkInProgress\Chinsky\overmap\_defines.dm"
-#include "code\WorkInProgress\Chinsky\overmap\README.dm"
-#include "code\WorkInProgress\Chinsky\overmap\sectors.dm"
-#include "code\WorkInProgress\Chinsky\overmap\ships\ship.dm"
-#include "code\WorkInProgress\Chinsky\overmap\ships\computers\engine_control.dm"
-#include "code\WorkInProgress\Chinsky\overmap\ships\computers\helm.dm"
-#include "code\WorkInProgress\Chinsky\overmap\ships\computers\shuttle.dm"
-#include "code\WorkInProgress\Chinsky\overmap\ships\engines\engine.dm"
-#include "code\WorkInProgress\Chinsky\overmap\ships\engines\thermal.dm"
-#include "code\WorkInProgress\Cib\MedicalSideEffects.dm"
-#include "code\WorkInProgress\computer3\bios.dm"
-#include "code\WorkInProgress\computer3\buildandrepair.dm"
-#include "code\WorkInProgress\computer3\component.dm"
-#include "code\WorkInProgress\computer3\computer.dm"
-#include "code\WorkInProgress\computer3\computer3_notes.dm"
-#include "code\WorkInProgress\computer3\file.dm"
-#include "code\WorkInProgress\computer3\laptop.dm"
-#include "code\WorkInProgress\computer3\lapvend.dm"
-#include "code\WorkInProgress\computer3\networking.dm"
-#include "code\WorkInProgress\computer3\NTOS.dm"
-#include "code\WorkInProgress\computer3\program.dm"
-#include "code\WorkInProgress\computer3\program_disks.dm"
-#include "code\WorkInProgress\computer3\server.dm"
-#include "code\WorkInProgress\computer3\storage.dm"
-#include "code\WorkInProgress\computer3\computers\arcade.dm"
-#include "code\WorkInProgress\computer3\computers\atmos_alert.dm"
-#include "code\WorkInProgress\computer3\computers\camera.dm"
-#include "code\WorkInProgress\computer3\computers\card.dm"
-#include "code\WorkInProgress\computer3\computers\communications.dm"
-#include "code\WorkInProgress\computer3\computers\crew.dm"
-#include "code\WorkInProgress\computer3\computers\customs.dm"
-#include "code\WorkInProgress\computer3\computers\HolodeckControl.dm"
-#include "code\WorkInProgress\computer3\computers\law.dm"
-#include "code\WorkInProgress\computer3\computers\medical.dm"
-#include "code\WorkInProgress\computer3\computers\Operating.dm"
-#include "code\WorkInProgress\computer3\computers\power.dm"
-#include "code\WorkInProgress\computer3\computers\prisoner.dm"
-#include "code\WorkInProgress\computer3\computers\robot.dm"
-#include "code\WorkInProgress\computer3\computers\security.dm"
-#include "code\WorkInProgress\computer3\computers\welcome.dm"
-#include "code\WorkInProgress\Mini\atmos_control.dm"
-#include "code\WorkInProgress\Ported\policetape.dm"
-#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
-#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
-#include "code\WorkInProgress\Wrongnumber\weldbackpack.dm"
#include "code\ZAS\_docs.dm"
#include "code\ZAS\_gas_mixture_xgm.dm"
#include "code\ZAS\_xgm_gas_data.dm"
diff --git a/code/ATMOSPHERICS/_atmospherics_helpers.dm b/code/ATMOSPHERICS/_atmospherics_helpers.dm
index 149ac5f1b1..1f73566fbc 100644
--- a/code/ATMOSPHERICS/_atmospherics_helpers.dm
+++ b/code/ATMOSPHERICS/_atmospherics_helpers.dm
@@ -26,7 +26,7 @@
//transfer_moles - Limits the amount of moles to transfer. The actual amount of gas moved may also be limited by available_power, if given.
//available_power - the maximum amount of power that may be used when moving gas. If null then the transfer is not limited by power.
/proc/pump_gas(var/obj/machinery/M, var/datum/gas_mixture/source, var/datum/gas_mixture/sink, var/transfer_moles = null, var/available_power = null)
- if (source.total_moles < MINUMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
+ if (source.total_moles < MINIMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
return -1
//var/source_moles_initial = source.total_moles
@@ -41,7 +41,7 @@
if (!isnull(available_power) && specific_power > 0)
transfer_moles = min(transfer_moles, available_power / specific_power)
- if (transfer_moles < MINUMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
+ if (transfer_moles < MINIMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
return -1
//Update flow rate meter
@@ -75,7 +75,7 @@
//total_transfer_moles - Limits the amount of moles to scrub. The actual amount of gas scrubbed may also be limited by available_power, if given.
//available_power - the maximum amount of power that may be used when scrubbing gas. If null then the scrubbing is not limited by power.
/proc/scrub_gas(var/obj/machinery/M, var/list/filtering, var/datum/gas_mixture/source, var/datum/gas_mixture/sink, var/total_transfer_moles = null, var/available_power = null)
- if (source.total_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (source.total_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
filtering = filtering & source.gas //only filter gasses that are actually there. DO NOT USE &=
@@ -84,14 +84,14 @@
var/total_filterable_moles = 0 //the total amount of filterable gas
var/list/specific_power_gas = list() //the power required to remove one mole of pure gas, for each gas type
for (var/g in filtering)
- if (source.gas[g] < MINUMUM_MOLES_TO_FILTER)
+ if (source.gas[g] < MINIMUM_MOLES_TO_FILTER)
continue
var/specific_power = calculate_specific_power_gas(g, source, sink)/ATMOS_FILTER_EFFICIENCY
specific_power_gas[g] = specific_power
total_filterable_moles += source.gas[g]
- if (total_filterable_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (total_filterable_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
//now that we know the total amount of filterable gas, we can calculate the amount of power needed to scrub one mole of gas
@@ -110,7 +110,7 @@
if (!isnull(available_power) && total_specific_power > 0)
total_transfer_moles = min(total_transfer_moles, available_power/total_specific_power)
- if (total_transfer_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (total_transfer_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
//Update flow rate var
@@ -146,7 +146,7 @@
//total_transfer_moles - Limits the amount of moles to input. The actual amount of gas filtered may also be limited by available_power, if given.
//available_power - the maximum amount of power that may be used when filtering gas. If null then the filtering is not limited by power.
/proc/filter_gas(var/obj/machinery/M, var/list/filtering, var/datum/gas_mixture/source, var/datum/gas_mixture/sink_filtered, var/datum/gas_mixture/sink_clean, var/total_transfer_moles = null, var/available_power = null)
- if (source.total_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (source.total_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
filtering = filtering & source.gas //only filter gasses that are actually there. DO NOT USE &=
@@ -156,7 +156,7 @@
var/total_unfilterable_moles = 0 //the total amount of non-filterable gas
var/list/specific_power_gas = list() //the power required to remove one mole of pure gas, for each gas type
for (var/g in source.gas)
- if (source.gas[g] < MINUMUM_MOLES_TO_FILTER)
+ if (source.gas[g] < MINIMUM_MOLES_TO_FILTER)
continue
if (g in filtering)
@@ -179,7 +179,7 @@
if (!isnull(available_power) && total_specific_power > 0)
total_transfer_moles = min(total_transfer_moles, available_power/total_specific_power)
- if (total_transfer_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (total_transfer_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
//Update flow rate var
@@ -218,7 +218,7 @@
//I don't like the copypasta, but I decided to keep both versions of gas filtering as filter_gas is slightly faster (doesn't create as many temporary lists, doesn't call update_values() as much)
//filter_gas can be removed and replaced with this proc if need be.
/proc/filter_gas_multi(var/obj/machinery/M, var/list/filtering, var/datum/gas_mixture/source, var/datum/gas_mixture/sink_clean, var/total_transfer_moles = null, var/available_power = null)
- if (source.total_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (source.total_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
filtering = filtering & source.gas //only filter gasses that are actually there. DO NOT USE &=
@@ -228,7 +228,7 @@
var/total_unfilterable_moles = 0 //the total amount of non-filterable gas
var/list/specific_power_gas = list() //the power required to remove one mole of pure gas, for each gas type
for (var/g in source.gas)
- if (source.gas[g] < MINUMUM_MOLES_TO_FILTER)
+ if (source.gas[g] < MINIMUM_MOLES_TO_FILTER)
continue
if (g in filtering)
@@ -252,7 +252,7 @@
if (!isnull(available_power) && total_specific_power > 0)
total_transfer_moles = min(total_transfer_moles, available_power/total_specific_power)
- if (total_transfer_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (total_transfer_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
//Update Flow Rate var
@@ -304,7 +304,7 @@
var/total_input_moles = 0 //for flow rate calculation
var/list/source_specific_power = list()
for (var/datum/gas_mixture/source in mix_sources)
- if (source.total_moles < MINUMUM_MOLES_TO_FILTER)
+ if (source.total_moles < MINIMUM_MOLES_TO_FILTER)
return -1 //either mix at the set ratios or mix no gas at all
var/mix_ratio = mix_sources[source]
@@ -321,7 +321,7 @@
total_input_volume += source.volume
total_input_moles += source.total_moles
- if (total_mixing_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (total_mixing_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
if (isnull(total_transfer_moles))
@@ -333,7 +333,7 @@
if (!isnull(available_power) && total_specific_power > 0)
total_transfer_moles = min(total_transfer_moles, available_power / total_specific_power)
- if (total_transfer_moles < MINUMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
+ if (total_transfer_moles < MINIMUM_MOLES_TO_FILTER) //if we cant transfer enough gas just stop to avoid further processing
return -1
//Update flow rate var
diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index 95f604c036..af9586037f 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -68,7 +68,7 @@
var/transfer_moles = (set_flow_rate/input_air.volume)*input_air.total_moles
var/power_draw = -1
- if (transfer_moles > MINUMUM_MOLES_TO_FILTER)
+ if (transfer_moles > MINIMUM_MOLES_TO_FILTER)
power_draw = filter_gas_multi(src, filtering_outputs, input_air, output_air, transfer_moles, power_rating)
if (power_draw >= 0)
diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
index 4a0b264cc6..bb3376fab4 100644
--- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
@@ -107,7 +107,7 @@
transfer_moles += (set_flow_rate*P.concentration/P.air.volume)*P.air.total_moles
var/power_draw = -1
- if (transfer_moles > MINUMUM_MOLES_TO_FILTER)
+ if (transfer_moles > MINIMUM_MOLES_TO_FILTER)
power_draw = mix_gas(src, mixing_inputs, output.air, transfer_moles, power_rating)
if (power_draw >= 0)
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 3580f52fea..d582eddd36 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -109,7 +109,7 @@
var/transfer_moles = (set_flow_rate/air1.volume)*air1.total_moles
var/power_draw = -1
- if (transfer_moles > MINUMUM_MOLES_TO_FILTER)
+ if (transfer_moles > MINIMUM_MOLES_TO_FILTER)
power_draw = filter_gas(src, filtered_out, air1, air2, air3, transfer_moles, power_rating)
if(network2)
diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
index 0414452eaa..bc5b49157f 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
@@ -85,7 +85,7 @@
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)
+ if (transfer_moles > MINIMUM_MOLES_TO_FILTER)
power_draw = mix_gas(src, mixing_inputs, air3, transfer_moles, power_rating)
if(network1 && mixing_inputs[air1])
diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm
index 766279a630..82d7d41b7b 100644
--- a/code/ATMOSPHERICS/components/unary/cold_sink.dm
+++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm
@@ -7,52 +7,47 @@
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "freezer_0"
density = 1
-
- anchored = 1.0
-
- var/heatsink_temperature = T20C //the constant temperature resevoir into which the freezer pumps heat. Probably the hull of the station or something.
- var/internal_volume = 600 //L
-
+ anchored = 1
use_power = 0
- idle_power_usage = 5 //5 Watts for thermostat related circuitry
+ idle_power_usage = 5 // 5 Watts for thermostat related circuitry
- var/max_power_rating = 20000 //power rating when the usage is turned up to 100
+ var/heatsink_temperature = T20C // The constant temperature reservoir into which the freezer pumps heat. Probably the hull of the station or something.
+ var/internal_volume = 600 // L
+
+ var/max_power_rating = 20000 // Power rating when the usage is turned up to 100
var/power_setting = 100
- var/set_temperature = T20C //thermostat
+ var/set_temperature = T20C // Thermostat
var/cooling = 0
- var/opened = 0 //for deconstruction
/obj/machinery/atmospherics/unary/freezer/New()
..()
- air_contents.volume = internal_volume
initialize_directions = dir
-
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/unary_atmos/cooler(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
-
- power_rating = max_power_rating * (power_setting/100)
+ component_parts += new /obj/item/stack/cable_coil(src, 2)
+ RefreshParts()
/obj/machinery/atmospherics/unary/freezer/initialize()
- if(node) return
+ if(node)
+ return
var/node_connect = dir
- for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
- if(target.initialize_directions & get_dir(target,src))
+ for(var/obj/machinery/atmospherics/target in get_step(src, node_connect))
+ if(target.initialize_directions & get_dir(target, src))
node = target
break
update_icon()
-
/obj/machinery/atmospherics/unary/freezer/update_icon()
- if(src.node)
- if(src.use_power && cooling)
+ if(node)
+ if(use_power && cooling)
icon_state = "freezer_1"
else
icon_state = "freezer"
@@ -61,10 +56,10 @@
return
/obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob)
- src.ui_interact(user)
+ ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob)
- src.ui_interact(user)
+ ui_interact(user)
/obj/machinery/atmospherics/unary/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
@@ -78,15 +73,15 @@
data["powerSetting"] = power_setting
var/temp_class = "good"
- if (air_contents.temperature > (T0C - 20))
+ if(air_contents.temperature > (T0C - 20))
temp_class = "bad"
- else if (air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
+ else if(air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
temp_class = "average"
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
+ if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 440, 300)
@@ -98,30 +93,31 @@
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/freezer/Topic(href, href_list)
- if (href_list["toggleStatus"])
- src.use_power = !src.use_power
+ if(href_list["toggleStatus"])
+ use_power = !use_power
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
- src.set_temperature = min(src.set_temperature+amount, 1000)
+ set_temperature = min(set_temperature + amount, 1000)
else
- src.set_temperature = max(src.set_temperature+amount, 0)
+ set_temperature = max(set_temperature + amount, 0)
if(href_list["setPower"]) //setting power to 0 is redundant anyways
var/new_setting = between(0, text2num(href_list["setPower"]), 100)
set_power_level(new_setting)
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
return 1
/obj/machinery/atmospherics/unary/freezer/process()
..()
+
if(stat & (NOPOWER|BROKEN) || !use_power)
cooling = 0
update_icon()
return
- if (network && air_contents.temperature > set_temperature)
+ if(network && air_contents.temperature > set_temperature)
cooling = 1
var/heat_transfer = max( -air_contents.get_thermal_energy_change(set_temperature - 5), 0 )
@@ -132,7 +128,7 @@
heat_transfer = min(heat_transfer, cop * power_rating) //limit heat transfer by available power
var/removed = -air_contents.add_thermal_energy(-heat_transfer) //remove the heat
- if (debug)
+ if(debug)
visible_message("[src]: Removing [removed] W.")
use_power(power_rating)
@@ -147,49 +143,37 @@
/obj/machinery/atmospherics/unary/freezer/RefreshParts()
..()
var/cap_rating = 0
- var/cap_count = 0
var/manip_rating = 0
- var/manip_count = 0
var/bin_rating = 0
- var/bin_count = 0
for(var/obj/item/weapon/stock_parts/P in component_parts)
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
cap_rating += P.rating
- cap_count++
if(istype(P, /obj/item/weapon/stock_parts/manipulator))
manip_rating += P.rating
- manip_count++
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
bin_rating += P.rating
- bin_count++
- cap_rating /= cap_count
- bin_rating /= bin_count
- manip_rating /= manip_count
- power_rating = initial(power_rating)*cap_rating //more powerful
- heatsink_temperature = initial(heatsink_temperature)/((manip_rating+bin_rating)/2) //more efficient
- air_contents.volume = max(initial(internal_volume) - 200, 0) + 200*bin_rating
+ power_rating = initial(power_rating) * cap_rating / 2 //more powerful
+ heatsink_temperature = initial(heatsink_temperature) / ((manip_rating + bin_rating) / 2) //more efficient
+ air_contents.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/freezer/proc/set_power_level(var/new_power_setting)
power_setting = new_power_setting
power_rating = max_power_rating * (power_setting/100)
-//dismantling code. copied from autolathe
/obj/machinery/atmospherics/unary/freezer/attackby(var/obj/item/O as obj, var/mob/user as mob)
- if(istype(O, /obj/item/weapon/screwdriver))
- opened = !opened
- user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
+ if(default_deconstruction_screwdriver(user, O))
return
-
- if (opened && istype(O, /obj/item/weapon/crowbar))
- dismantle()
+ if(default_deconstruction_crowbar(user, O))
+ return
+ if(default_part_replacement(user, O))
return
..()
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
..(user)
- if (opened)
+ if(panel_open)
user << "The maintenance hatch is open."
diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm
index 891a19cc74..829f06f420 100644
--- a/code/ATMOSPHERICS/components/unary/heat_source.dm
+++ b/code/ATMOSPHERICS/components/unary/heat_source.dm
@@ -7,25 +7,21 @@
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "heater_0"
density = 1
-
- anchored = 1.0
-
- var/set_temperature = T20C //thermostat
- var/max_temperature = T20C + 680
- var/internal_volume = 600 //L
-
+ anchored = 1
use_power = 0
idle_power_usage = 5 //5 Watts for thermostat related circuitry
+ var/max_temperature = T20C + 680
+ var/internal_volume = 600 //L
+
var/max_power_rating = 20000 //power rating when the usage is turned up to 100
var/power_setting = 100
+ var/set_temperature = T20C //thermostat
var/heating = 0 //mainly for icon updates
- var/opened = 0 //for deconstruction
/obj/machinery/atmospherics/unary/heater/New()
..()
- air_contents.volume = internal_volume
initialize_directions = dir
component_parts = list()
@@ -33,16 +29,18 @@
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
+ component_parts += new /obj/item/stack/cable_coil(src, 5)
- power_rating = max_power_rating * (power_setting/100)
+ RefreshParts()
/obj/machinery/atmospherics/unary/heater/initialize()
- if(node) return
+ if(node)
+ return
var/node_connect = dir
- for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
- if(target.initialize_directions & get_dir(target,src))
+ for(var/obj/machinery/atmospherics/target in get_step(src, node_connect))
+ if(target.initialize_directions & get_dir(target, src))
node = target
break
@@ -50,8 +48,8 @@
/obj/machinery/atmospherics/unary/heater/update_icon()
- if(src.node)
- if(src.use_power && src.heating)
+ if(node)
+ if(use_power && heating)
icon_state = "heater_1"
else
icon_state = "heater"
@@ -68,7 +66,7 @@
update_icon()
return
- if (network && air_contents.total_moles && air_contents.temperature < set_temperature)
+ if(network && air_contents.total_moles && air_contents.temperature < set_temperature)
air_contents.add_thermal_energy(power_rating * HEATER_PERF_MULT)
use_power(power_rating)
@@ -80,10 +78,10 @@
update_icon()
/obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob)
- src.ui_interact(user)
+ ui_interact(user)
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
- src.ui_interact(user)
+ ui_interact(user)
/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
@@ -97,13 +95,13 @@
data["powerSetting"] = power_setting
var/temp_class = "normal"
- if (air_contents.temperature > (T20C+40))
+ if(air_contents.temperature > (T20C+40))
temp_class = "bad"
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
+ if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 440, 300)
@@ -115,63 +113,54 @@
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/heater/Topic(href, href_list)
- if (href_list["toggleStatus"])
- src.use_power = !src.use_power
+ if(href_list["toggleStatus"])
+ use_power = !use_power
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
- src.set_temperature = min(src.set_temperature+amount, max_temperature)
+ set_temperature = min(set_temperature + amount, max_temperature)
else
- src.set_temperature = max(src.set_temperature+amount, 0)
+ set_temperature = max(set_temperature + amount, 0)
if(href_list["setPower"]) //setting power to 0 is redundant anyways
var/new_setting = between(0, text2num(href_list["setPower"]), 100)
set_power_level(new_setting)
- src.add_fingerprint(usr)
+ add_fingerprint(usr)
return 1
//upgrading parts
/obj/machinery/atmospherics/unary/heater/RefreshParts()
..()
-
var/cap_rating = 0
- var/cap_count = 0
var/bin_rating = 0
- var/bin_count = 0
+
for(var/obj/item/weapon/stock_parts/P in component_parts)
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
cap_rating += P.rating
- cap_count++
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
bin_rating += P.rating
- bin_count++
- cap_rating /= cap_count
- bin_rating /= bin_count
- max_power_rating = initial(max_power_rating)*cap_rating
- max_temperature = max(initial(max_temperature) - T20C, 0)*((bin_rating*2 + cap_rating)/3) + T20C
- air_contents.volume = max(initial(internal_volume) - 200, 0) + 200*bin_rating
+ max_power_rating = initial(max_power_rating) * cap_rating / 2
+ max_temperature = max(initial(max_temperature) - T20C, 0) * ((bin_rating * 4 + cap_rating) / 5) + T20C
+ air_contents.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting)
power_setting = new_power_setting
power_rating = max_power_rating * (power_setting/100)
-//dismantling code. copied from autolathe
/obj/machinery/atmospherics/unary/heater/attackby(var/obj/item/O as obj, var/mob/user as mob)
- if(istype(O, /obj/item/weapon/screwdriver))
- opened = !opened
- user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
+ if(default_deconstruction_screwdriver(user, O))
return
-
- if (opened && istype(O, /obj/item/weapon/crowbar))
- dismantle()
+ if(default_deconstruction_crowbar(user, O))
+ return
+ if(default_part_replacement(user, O))
return
..()
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
..(user)
- if (opened)
+ if(panel_open)
user << "The maintenance hatch is open."
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 7b74ed8b73..068f7efdb3 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -99,6 +99,8 @@
"power" = use_power,
"scrubbing" = scrubbing,
"panic" = panic,
+ "filter_o2" = ("oxygen" in scrubbing_gas),
+ "filter_n2" = ("nitrogen" in scrubbing_gas),
"filter_co2" = ("carbon_dioxide" in scrubbing_gas),
"filter_phoron" = ("phoron" in scrubbing_gas),
"filter_n2o" = ("sleeping_agent" in scrubbing_gas),
@@ -192,6 +194,16 @@
var/list/toggle = list()
+ if(!isnull(signal.data["o2_scrub"]) && text2num(signal.data["o2_scrub"]) != ("oxygen" in scrubbing_gas))
+ toggle += "oxygen"
+ else if(signal.data["toggle_o2_scrub"])
+ toggle += "oxygen"
+
+ if(!isnull(signal.data["n2_scrub"]) && text2num(signal.data["n2_scrub"]) != ("nitrogen" in scrubbing_gas))
+ toggle += "nitrogen"
+ else if(signal.data["toggle_n2_scrub"])
+ toggle += "nitrogen"
+
if(!isnull(signal.data["co2_scrub"]) && text2num(signal.data["co2_scrub"]) != ("carbon_dioxide" in scrubbing_gas))
toggle += "carbon_dioxide"
else if(signal.data["toggle_co2_scrub"])
diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm
index fd933bf94d..662376e9b4 100644
--- a/code/ATMOSPHERICS/datum_pipeline.dm
+++ b/code/ATMOSPHERICS/datum_pipeline.dm
@@ -203,15 +203,15 @@ datum/pipeline
//surface must be the surface area in m^2
proc/radiate_heat_to_space(surface, thermal_conductivity)
var/gas_density = air.total_moles/air.volume
- thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*T20C) ), 1)
+ thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*GAS_CRITICAL_TEMPERATURE) ), 1) //mult by density ratio
// 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
+ var/heat_gain = AVERAGE_SOLAR_RADIATION * (RADIATOR_EXPOSED_SURFACE_AREA_RATIO * surface) * 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.
+ // It currently should stabilise at 129.6K or -143.6C
heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4
air.add_thermal_energy(heat_gain)
diff --git a/code/ATMOSPHERICS/he_pipes.dm b/code/ATMOSPHERICS/he_pipes.dm
index c22c483e8c..f9dbef84cf 100644
--- a/code/ATMOSPHERICS/he_pipes.dm
+++ b/code/ATMOSPHERICS/he_pipes.dm
@@ -3,18 +3,23 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
icon = 'icons/atmos/heat.dmi'
icon_state = "intact"
pipe_icon = "hepipe"
+ color = "#404040"
level = 2
var/initialize_directions_he
var/surface = 2 //surface area in m^2
+ var/icon_temperature = T20C //stop small changes in temperature causing an icon refresh
minimum_temperature_difference = 20
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
+ buckle_lying = 1
+
// BubbleWrap
New()
..()
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
// BubbleWrap END
+ color = "#404040" //we don't make use of the fancy overlay system for colours, use this to set the default.
initialize()
normalize_dir()
@@ -48,19 +53,53 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
if(!parent)
..()
else
- var/environment_temperature = 0
+ var/datum/gas_mixture/pipe_air = return_air()
if(istype(loc, /turf/simulated/))
+ var/environment_temperature = 0
if(loc:blocks_air)
environment_temperature = loc:temperature
else
var/datum/gas_mixture/environment = loc.return_air()
environment_temperature = environment.temperature
- var/datum/gas_mixture/pipe_air = return_air()
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
parent.temperature_interact(loc, volume, thermal_conductivity)
else if(istype(loc, /turf/space/))
parent.radiate_heat_to_space(surface, 1)
+ if(buckled_mob)
+ var/hc = pipe_air.heat_capacity()
+ var/avg_temp = (pipe_air.temperature * hc + buckled_mob.bodytemperature * 3500) / (hc + 3500)
+ pipe_air.temperature = avg_temp
+ buckled_mob.bodytemperature = avg_temp
+
+ var/heat_limit = 1000
+
+ var/mob/living/carbon/human/H = buckled_mob
+ if(istype(H) && H.species)
+ heat_limit = H.species.heat_level_3
+
+ if(pipe_air.temperature > heat_limit + 1)
+ buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, "chest", used_weapon = "Excessive Heat")
+
+ //fancy radiation glowing
+ if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K
+ if(abs(pipe_air.temperature - icon_temperature) > 10)
+ icon_temperature = pipe_air.temperature
+
+ var/h_r = heat2color_r(icon_temperature)
+ var/h_g = heat2color_g(icon_temperature)
+ var/h_b = heat2color_b(icon_temperature)
+
+ if(icon_temperature < 2000) //scale up overlay until 2000K
+ var/scale = (icon_temperature - 500) / 1500
+ h_r = 64 + (h_r - 64)*scale
+ h_g = 64 + (h_g - 64)*scale
+ h_b = 64 + (h_b - 64)*scale
+
+ animate(src, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING)
+
+
+
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
icon = 'icons/atmos/junction.dmi'
diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm
index 16a0a6bcd5..be63292d83 100644
--- a/code/ATMOSPHERICS/pipes.dm
+++ b/code/ATMOSPHERICS/pipes.dm
@@ -12,6 +12,10 @@
var/alert_pressure = 80*ONE_ATMOSPHERE
//minimum pressure before check_pressure(...) should be called
+ can_buckle = 1
+ buckle_require_restraints = 1
+ buckle_lying = -1
+
/obj/machinery/atmospherics/pipe/drain_power()
return -1
diff --git a/code/WorkInProgress/AI_Visibility/_old_AI_Visibility.dm b/code/WorkInProgress/AI_Visibility/_old_AI_Visibility.dm
deleted file mode 100644
index 9b50c74f68..0000000000
--- a/code/WorkInProgress/AI_Visibility/_old_AI_Visibility.dm
+++ /dev/null
@@ -1,573 +0,0 @@
-//All credit for this goes to Uristqwerty.
-
-//And some to me! -Mini
-
-
-
-//This file is partly designed around being able to uninclude it to go back to the old ai viewing system completely.
-//(And therefore also be portable to another similar codebase simply by transferring the file and including it after the other AI code files.)
-//There are probably a few parts that don't do that at the moment, but I'll fix them at some point.
-
-
-#define MINIMAP_UPDATE_DELAY 1200
-
-/turf
- var/image/obscured
- var/image/dim
-
-/turf/proc/visibilityChanged()
- cameranet.updateVisibility(src)
-
-/turf/New()
- ..()
- cameranet.updateVisibility(src)
-/*
-/turf/Del()
- ..()
- cameranet.updateVisibility(src)
-*/
-/datum/camerachunk
- var/list/obscuredTurfs = list()
- var/list/visibleTurfs = list()
- var/list/dimTurfs = list()
- var/list/obscured = list()
- var/list/dim = list()
- var/list/cameras = list()
- var/list/turfs = list()
- var/list/seenby = list()
- var/visible = 0
- var/changed = 1
- var/updating = 0
-
- var/x
- var/y
- var/z
-
- var/minimap_updating = 0
-
- var/icon/minimap_icon = new('icons/minimap.dmi', "chunk_base")
- var/obj/minimap_obj/minimap_obj = new()
-
-/obj/minimap_obj/Click(location, control, params)
- if(!istype(usr, /mob/dead) && !istype(usr, /mob/living/silicon/ai) && !(usr.client && usr.client.holder && usr.client.holder.level >= 4))
- return
-
- var/list/par = params2list(params)
- var/screen_loc = par["screen-loc"]
-
- if(findtext(screen_loc, "minimap:") != 1)
- return
-
- screen_loc = copytext(screen_loc, length("minimap:") + 1)
-
- var/x_text = copytext(screen_loc, 1, findtext(screen_loc, ","))
- var/y_text = copytext(screen_loc, findtext(screen_loc, ",") + 1)
-
- var/x = (text2num(copytext(x_text, 1, findtext(x_text, ":"))) - 1) * 16
- x += round((text2num(copytext(x_text, findtext(x_text, ":") + 1)) + 1) / 2)
-
- var/y = (text2num(copytext(y_text, 1, findtext(y_text, ":"))) - 1) * 16
- y += round((text2num(copytext(y_text, findtext(y_text, ":") + 1)) + 1) / 2)
-
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/ai = usr
- ai.freelook()
- ai.eyeobj.loc = locate(max(1, x - 1), max(1, y - 1), ai.eyeobj.z)
- cameranet.visibility(ai.eyeobj)
-
- else
- usr.loc = locate(max(1, x - 1), max(1, y - 1), usr.z)
-
-/mob/dead/verb/Open_Minimap()
- set category = "Ghost"
- winshow(src, "minimapwindow", 1)
- client.screen |= cameranet.minimap
-
- if(cameranet.generating_minimap)
- cameranet.minimap_viewers += src
-
-/mob/living/silicon/ai/verb/Open_Minimap()
- set category = "AI Commands"
- winshow(src, "minimapwindow", 1)
- client.screen |= cameranet.minimap
-
- if(cameranet.generating_minimap)
- cameranet.minimap_viewers += src
-
-/client/proc/Open_Minimap()
- set category = "Admin"
- winshow(src, "minimapwindow", 1)
- screen |= cameranet.minimap
-
- if(cameranet.generating_minimap)
- cameranet.minimap_viewers += src.mob
-
-/datum/camerachunk/proc/update_minimap()
- if(changed && !updating)
- update()
-
- minimap_icon.Blend(rgb(255, 0, 0), ICON_MULTIPLY)
-
- var/list/turfs = visibleTurfs | dimTurfs
-
- for(var/turf/turf in turfs)
- var/x = (turf.x & 0xf) * 2
- var/y = (turf.y & 0xf) * 2
-
- if(turf.density)
- minimap_icon.DrawBox(rgb(100, 100, 100), x + 1, y + 1, x + 2, y + 2)
- continue
-
- else if(istype(turf, /turf/space))
- minimap_icon.DrawBox(rgb(0, 0, 0), x + 1, y + 1, x + 2, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(200, 200, 200), x + 1, y + 1, x + 2, y + 2)
-
- for(var/obj/structure/o in turf)
- if(o.density)
- if(istype(o, /obj/structure/window) && (o.dir == NORTH || o.dir == SOUTH || o.dir == EAST || o.dir == WEST))
- if(o.dir == NORTH)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 2, x + 2, y + 2)
- else if(o.dir == SOUTH)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 2, y + 1)
- else if(o.dir == EAST)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 3, y + 1, x + 2, y + 2)
- else if(o.dir == WEST)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 1, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(150, 150, 150), x + 1, y + 1, x + 2, y + 2)
- break
-
- for(var/obj/machinery/door/o in turf)
- if(istype(o, /obj/machinery/door/window))
- if(o.dir == NORTH)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 2, x + 2, y + 2)
- else if(o.dir == SOUTH)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 1)
- else if(o.dir == EAST)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 2, y + 1, x + 2, y + 2)
- else if(o.dir == WEST)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 1, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 2)
- break
-
- minimap_obj.screen_loc = "minimap:[src.x / 16],[src.y / 16]"
- minimap_obj.icon = minimap_icon
-
-/mob/aiEye
- var/list/visibleCameraChunks = list()
- var/mob/ai = null
- density = 0
-
-/datum/camerachunk/proc/add(mob/aiEye/ai)
- ai.visibleCameraChunks += src
- if(ai.ai.client)
- ai.ai.client.images += obscured
- ai.ai.client.images += dim
- visible++
- seenby += ai
- if(changed && !updating)
- update()
- changed = 0
-
-/datum/camerachunk/proc/remove(mob/aiEye/ai)
- ai.visibleCameraChunks -= src
- if(ai.ai.client)
- ai.ai.client.images -= obscured
- ai.ai.client.images -= dim
- seenby -= ai
- if(visible > 0)
- visible--
-
-/datum/camerachunk/proc/visibilityChanged(turf/loc)
- if(!(loc in visibleTurfs))
- return
-
- hasChanged()
-
-/datum/camerachunk/proc/hasChanged()
- if(visible)
- if(!updating)
- updating = 1
- spawn(10)//Batch large changes, such as many doors opening or closing at once
- update()
- updating = 0
- else
- changed = 1
-
- if(!minimap_updating)
- minimap_updating = 1
-
- spawn(MINIMAP_UPDATE_DELAY)
- if(changed && !updating)
- update()
- changed = 0
-
- update_minimap()
- minimap_updating = 0
-
-/datum/camerachunk/proc/update()
-
- var/list/newDimTurfs = list()
- var/list/newVisibleTurfs = list()
-
- for(var/obj/machinery/camera/c in cameras)
- var/lum = c.luminosity
- c.luminosity = 7
-
- newDimTurfs |= turfs & view(7, c)
- newVisibleTurfs |= turfs & view(6, c)
-
- c.luminosity = lum
-
- var/list/dimAdded = newDimTurfs - dimTurfs
- var/list/dimRemoved = dimTurfs - newDimTurfs
- var/list/visAdded = newVisibleTurfs - visibleTurfs
- var/list/visRemoved = visibleTurfs - newVisibleTurfs
-
- visibleTurfs = newVisibleTurfs
- dimTurfs = newDimTurfs
- obscuredTurfs = turfs - dimTurfs
- dimTurfs -= visibleTurfs
-
- for(var/turf/t in dimRemoved)
- if(t.dim)
- dim -= t.dim
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images -= t.dim
-
- if(!(t in visibleTurfs))
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images += t.obscured
-
- for(var/turf/t in dimAdded)
- if(!(t in visibleTurfs))
- if(!t.dim)
- t.dim = image('icons/effects/cameravis.dmi', t, "dim", 15)
- t.mouse_opacity = 0
-
- dim += t.dim
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images += t.dim
-
- if(t.obscured)
- obscured -= t.obscured
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images -= t.obscured
-
- for(var/turf/t in visAdded)
- if(t.obscured)
- obscured -= t.obscured
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images -= t.obscured
-
- for(var/turf/t in visRemoved)
- if(t in obscuredTurfs)
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images += t.obscured
-
-
-/datum/camerachunk/New(loc, x, y, z)
- x &= ~0xf
- y &= ~0xf
-
- src.x = x
- src.y = y
- src.z = z
-
- for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z)))
- if(c.status)
- cameras += c
-
- turfs = block(locate(x, y, z), locate(min(world.maxx, x + 15), min(world.maxy, y + 15), z))
-
- for(var/obj/machinery/camera/c in cameras)
- var/lum = c.luminosity
- c.luminosity = 7
-
- dimTurfs |= turfs & view(7, c)
- visibleTurfs |= turfs & view(6, c)
-
- c.luminosity = lum
-
- obscuredTurfs = turfs - dimTurfs
- dimTurfs -= visibleTurfs
-
- for(var/turf/t in obscuredTurfs)
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
-
- for(var/turf/t in dimTurfs)
- if(!(t in visibleTurfs))
- if(!t.dim)
- t.dim = image('icons/effects/cameravis.dmi', t, "dim", TURF_LAYER)
- t.dim.mouse_opacity = 0
-
- dim += t.dim
-
- cameranet.minimap += minimap_obj
-
-var/datum/cameranet/cameranet = new()
-
-/datum/cameranet
- var/list/cameras = list()
- var/list/chunks = list()
- var/network = "net1"
- var/ready = 0
-
- var/list/minimap = list()
-
- var/generating_minimap = TRUE
- var/list/minimap_viewers = list()
-
-/datum/cameranet/New()
- ..()
-
- spawn(200)
- for(var/x = 0, x <= world.maxx, x += 16)
- for(var/y = 0, y <= world.maxy, y += 16)
- sleep(1)
- var/datum/camerachunk/c = getCameraChunk(x, y, 1)
- c.update_minimap()
-
- for(var/mob/m in minimap_viewers)
- m.client.screen |= c.minimap_obj
-
- generating_minimap = FALSE
- minimap_viewers = list()
-
-/datum/cameranet/proc/chunkGenerated(x, y, z)
- var/key = "[x],[y],[z]"
- return key in chunks
-
-/datum/cameranet/proc/getCameraChunk(x, y, z)
- var/key = "[x],[y],[z]"
-
- if(!(key in chunks))
- chunks[key] = new /datum/camerachunk(null, x, y, z)
-
- return chunks[key]
-
-/datum/cameranet/proc/visibility(mob/aiEye/ai)
- var/x1 = max(0, ai.x - 16) & ~0xf
- var/y1 = max(0, ai.y - 16) & ~0xf
- var/x2 = min(world.maxx, ai.x + 16) & ~0xf
- var/y2 = min(world.maxy, ai.y + 16) & ~0xf
-
- var/list/visibleChunks = list()
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- visibleChunks += getCameraChunk(x, y, ai.z)
-
- var/list/remove = ai.visibleCameraChunks - visibleChunks
- var/list/add = visibleChunks - ai.visibleCameraChunks
-
- for(var/datum/camerachunk/c in remove)
- c.remove(ai)
-
- for(var/datum/camerachunk/c in add)
- c.add(ai)
-
-/datum/cameranet/proc/updateVisibility(turf/loc)
- if(!chunkGenerated(loc.x & ~0xf, loc.y & ~0xf, loc.z))
- return
-
- var/datum/camerachunk/chunk = getCameraChunk(loc.x & ~0xf, loc.y & ~0xf, loc.z)
- chunk.visibilityChanged(loc)
-
-/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
- var/x1 = max(0, c.x - 16) & ~0xf
- var/y1 = max(0, c.y - 16) & ~0xf
- var/x2 = min(world.maxx, c.x + 16) & ~0xf
- var/y2 = min(world.maxy, c.y + 16) & ~0xf
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- if(chunkGenerated(x, y, c.z))
- var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
- if(!(c in chunk.cameras))
- chunk.cameras += c
- chunk.hasChanged()
-
-/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
- var/x1 = max(0, c.x - 16) & ~0xf
- var/y1 = max(0, c.y - 16) & ~0xf
- var/x2 = min(world.maxx, c.x + 16) & ~0xf
- var/y2 = min(world.maxy, c.y + 16) & ~0xf
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- if(chunkGenerated(x, y, c.z))
- var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
- if(!c)
- chunk.hasChanged()
- if(c in chunk.cameras)
- chunk.cameras -= c
- chunk.hasChanged()
-
-/mob/living/silicon/ai/var/mob/aiEye/eyeobj = new()
-
-/mob/living/silicon/ai/New()
- ..()
- eyeobj.ai = src
- spawn(20)
- freelook()
-
-/mob/living/silicon/ai/death(gibbed)
- if(client && client.eye == eyeobj)
- for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
- c.remove(eyeobj)
- client.eye = src
- return ..(gibbed)
-
-/mob/living/silicon/ai/verb/freelook()
- set category = "AI Commands"
- set name = "freelook"
- current = null //cancel camera view first, it causes problems
- cameraFollow = null
-// machine = null
- if(!eyeobj) //if it got deleted somehow (like an admin trying to fix things <.<')
- eyeobj = new()
- eyeobj.ai = src
- client.eye = eyeobj
- eyeobj.loc = loc
- cameranet.visibility(eyeobj)
- cameraFollow = null
-
-/mob/aiEye/Move()
- . = ..()
- if(.)
- cameranet.visibility(src)
-
-/client/AIMove(n, direct, var/mob/living/silicon/ai/user)
- if(eye == user.eyeobj)
- user.eyeobj.loc = get_step(user.eyeobj, direct)
- cameranet.visibility(user.eyeobj)
-
- else
- return ..()
-
-/*
-/client/AIMoveZ(direct, var/mob/living/silicon/ai/user)
- if(eye == user.eyeobj)
- var/dif = 0
- if(direct == UP && user.eyeobj.z > 1)
- dif = -1
- else if(direct == DOWN && user.eyeobj.z < 4)
- dif = 1
- user.eyeobj.loc = locate(user.eyeobj.x, user.eyeobj.y, user.eyeobj.z + dif)
- cameranet.visibility(user.eyeobj)
- else
- return ..()
-*/
-
-/turf/move_camera_by_click()
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/AI = usr
- if(AI.client.eye == AI.eyeobj)
- return
- return ..()
-
-
-/obj/machinery/door/update_nearby_tiles(need_rebuild)
- . = ..(need_rebuild)
- cameranet.updateVisibility(loc)
-
-/obj/machinery/camera/New()
- ..()
- cameranet.addCamera(src)
-
-/obj/machinery/camera/Del()
- cameranet.removeCamera(src)
- ..()
-
-/obj/machinery/camera/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
- . = ..(W, user)
- if(istype(W, /obj/item/weapon/wirecutters))
- if(status)
- cameranet.addCamera(src)
- else
- cameranet.removeCamera(src)
-
-/proc/checkcameravis(atom/A)
- for(var/obj/machinery/camera/C in view(A,7))
- if(!C.status || C.stat == 2)
- continue
- return 1
- return 0
-
-/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
- if (user != src)
- return
-
- if (stat == 2)
- return
-
- var/list/L = list()
- for (var/obj/machinery/camera/C in world)
- L.Add(C)
-
- camera_sort(L)
- L = camera_network_sort(L)
-
- var/list/D = list()
- for (var/obj/machinery/camera/C in L)
- if ( C.network in src.networks )
- D[text("[]: [][]", C.network, C.c_tag, (C.status ? null : " (Deactivated)"))] = C
- D["Cancel"] = "Cancel"
-
- var/t = input(user, "Which camera should you change to?") as null|anything in D
-
- if (!t || t == "Cancel")
- return 0
-
- var/obj/machinery/camera/C = D[t]
-
- eyeobj.loc = C.loc
- cameranet.visibility(eyeobj)
-
- return
-
-/mob/living/silicon/ai/cancel_camera()
- set name = "Cancel Camera View"
- set category = "OOC"
- reset_view(null)
- machine = null
-
-/mob/living/silicon/ai/reset_view(atom/A)
- if (client)
- if(!eyeobj)
- eyeobj = new()
- eyeobj.ai = src
-
- client.eye = eyeobj
- client.perspective = EYE_PERSPECTIVE
-
- if (istype(A, /atom/movable))
- eyeobj.loc = locate(A.x, A.y, A.z)
-
- else
- eyeobj.loc = locate(src.x, src.y, src.z)
-
- cameranet.visibility(eyeobj)
diff --git a/code/WorkInProgress/AI_Visibility/ai.dm b/code/WorkInProgress/AI_Visibility/ai.dm
deleted file mode 100644
index 7dcbf54e67..0000000000
--- a/code/WorkInProgress/AI_Visibility/ai.dm
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/mob/aiEye
- var/list/visibleCameraChunks = list()
- var/mob/ai = null
- density = 0
-
-/mob/living/silicon/ai/var/mob/aiEye/eyeobj = new()
-
-/mob/living/silicon/ai/New()
- ..()
- eyeobj.ai = src
- spawn(20)
- freelook()
-
-/mob/living/silicon/ai/death(gibbed)
- if(client && client.eye == eyeobj)
- for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
- c.remove(eyeobj)
- client.eye = src
- return ..(gibbed)
-
-/mob/living/silicon/ai/verb/freelook()
- set category = "AI Commands"
- set name = "freelook"
- current = null //cancel camera view first, it causes problems
- cameraFollow = null
- if(!eyeobj) //if it got deleted somehow (like an admin trying to fix things <.<')
- eyeobj = new()
- eyeobj.ai = src
- client.eye = eyeobj
- eyeobj.loc = loc
- cameranet.visibility(eyeobj)
-
-/mob/aiEye/Move()
- . = ..()
- if(.)
- cameranet.visibility(src)
-
-/client/AIMove(n, direct, var/mob/living/silicon/ai/user)
- if(eye == user.eyeobj)
- user.eyeobj.loc = get_step(user.eyeobj, direct)
- cameranet.visibility(user.eyeobj)
-
- else
- return ..()
-
-/turf/move_camera_by_click()
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/AI = usr
- if(AI.client.eye == AI.eyeobj)
- return
- return ..()
-
-/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
- if (user != src)
- return
-
- if (stat == 2)
- return
-
- var/list/L = list()
- for (var/obj/machinery/camera/C in world)
- L.Add(C)
-
- camera_sort(L)
- L = camera_network_sort(L)
-
- var/list/D = list()
- for (var/obj/machinery/camera/C in L)
- if ( C.network in src.networks )
- D[text("[]: [][]", C.network, C.c_tag, (C.status ? null : " (Deactivated)"))] = C
- D["Cancel"] = "Cancel"
-
- var/t = input(user, "Which camera should you change to?") as null|anything in D
-
- if (!t || t == "Cancel")
- return 0
-
- var/obj/machinery/camera/C = D[t]
-
- eyeobj.loc = C.loc
- cameranet.visibility(eyeobj)
-
- return
-
-/mob/living/silicon/ai/cancel_camera()
- set name = "Cancel Camera View"
- set category = "OOC"
- reset_view(null)
- machine = null
-
-/mob/living/silicon/ai/reset_view(atom/A)
- if (client)
- if(!eyeobj)
- eyeobj = new()
- eyeobj.ai = src
-
- client.eye = eyeobj
- client.perspective = EYE_PERSPECTIVE
-
- if (istype(A, /atom/movable))
- eyeobj.loc = locate(A.x, A.y, A.z)
-
- else
- eyeobj.loc = locate(src.x, src.y, src.z)
-
- cameranet.visibility(eyeobj)
diff --git a/code/WorkInProgress/AI_Visibility/cameranet.dm b/code/WorkInProgress/AI_Visibility/cameranet.dm
deleted file mode 100644
index 3b46844e6b..0000000000
--- a/code/WorkInProgress/AI_Visibility/cameranet.dm
+++ /dev/null
@@ -1,156 +0,0 @@
-//------------------------------------------------------------
-//
-// The Cameranet
-//
-// The cameranet is a single global instance of a unique
-// datum, which contains logic for managing the individual
-// chunks.
-//
-//------------------------------------------------------------
-
-/datum/cameranet
- var/list/cameras = list()
- var/list/chunks = list()
- var/network = "net1"
- var/ready = 0
-
- var/list/minimap = list()
-
- var/generating_minimap = TRUE
-
-var/datum/cameranet/cameranet = new()
-
-
-
-/datum/cameranet/New()
- ..()
-
- spawn(100)
- init_minimap()
-
-
-/datum/cameranet/proc/init_minimap()
- for(var/x = 0, x <= world.maxx, x += 16)
- for(var/y = 0, y <= world.maxy, y += 16)
- sleep(1)
- getCameraChunk(x, y, 5)
- getCameraChunk(x, y, 1)
-
- generating_minimap = FALSE
-
-
-/datum/cameranet/proc/chunkGenerated(x, y, z)
- var/key = "[x],[y],[z]"
- return key in chunks
-
-
-/datum/cameranet/proc/getCameraChunk(x, y, z)
- var/key = "[x],[y],[z]"
-
- if(!(key in chunks))
- chunks[key] = new /datum/camerachunk(null, x, y, z)
-
- return chunks[key]
-
-
-
-
-// This proc updates what chunks are considered seen
-// by an aiEye. As part of the process, it will force
-// any newly visible chunks with pending unscheduled
-// updates to update, and show the correct obscuring
-// and dimming image sets. If you do not call this
-// after the eye has moved, it may result in the
-// affected AI gaining (partial) xray, seeing through
-// now-closed doors, not seeing through open doors,
-// or other visibility oddities, depending on if/when
-// they last visited any of the chunks in the nearby
-// area.
-
-// It must be called manually, as there is no way to
-// have a proc called automatically every time an
-// object's loc changes.
-
-/datum/cameranet/proc/visibility(mob/aiEye/ai)
- var/x1 = max(0, ai.x - 16) & ~0xf
- var/y1 = max(0, ai.y - 16) & ~0xf
- var/x2 = min(world.maxx, ai.x + 16) & ~0xf
- var/y2 = min(world.maxy, ai.y + 16) & ~0xf
-
- var/list/visibleChunks = list()
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- visibleChunks += getCameraChunk(x, y, ai.z)
-
- var/list/remove = ai.visibleCameraChunks - visibleChunks
- var/list/add = visibleChunks - ai.visibleCameraChunks
-
- for(var/datum/camerachunk/c in remove)
- c.remove(ai)
-
- for(var/datum/camerachunk/c in add)
- c.add(ai)
-
-
-
-
-// This proc should be called if a turf, or the contents
-// of a turf, changes opacity. This includes such things
-// as changing the turf, opening or closing a door, or
-// anything else that would alter line of sight in the
-// general area.
-
-/datum/cameranet/proc/updateVisibility(turf/loc)
- if(!chunkGenerated(loc.x & ~0xf, loc.y & ~0xf, loc.z))
- return
-
- var/datum/camerachunk/chunk = getCameraChunk(loc.x & ~0xf, loc.y & ~0xf, loc.z)
- chunk.visibilityChanged(loc)
-
-
-
-
-// This proc updates all relevant chunks when enabling or
-// creating a camera, allowing freelook and the minimap to
-// respond correctly.
-
-/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
- var/x1 = max(0, c.x - 16) & ~0xf
- var/y1 = max(0, c.y - 16) & ~0xf
- var/x2 = min(world.maxx, c.x + 16) & ~0xf
- var/y2 = min(world.maxy, c.y + 16) & ~0xf
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- if(chunkGenerated(x, y, c.z))
- var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
-
- if(!(c in chunk.cameras))
- chunk.cameras += c
- chunk.hasChanged()
-
-
-
-
-// This proc updates all relevant chunks when disabling or
-// deleting a camera, allowing freelook and the minimap to
-// respond correctly.
-
-/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
- var/x1 = max(0, c.x - 16) & ~0xf
- var/y1 = max(0, c.y - 16) & ~0xf
- var/x2 = min(world.maxx, c.x + 16) & ~0xf
- var/y2 = min(world.maxy, c.y + 16) & ~0xf
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- if(chunkGenerated(x, y, c.z))
- var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
-
- if(!c)
- chunk.hasChanged()
-
- if(c in chunk.cameras)
- chunk.cameras -= c
- chunk.hasChanged()
diff --git a/code/WorkInProgress/AI_Visibility/chunk.dm b/code/WorkInProgress/AI_Visibility/chunk.dm
deleted file mode 100644
index 8a6886a1ad..0000000000
--- a/code/WorkInProgress/AI_Visibility/chunk.dm
+++ /dev/null
@@ -1,224 +0,0 @@
-#define MINIMAP_UPDATE_DELAY 1200
-
-/datum/camerachunk
- var/list/turfs = list()
-
- var/list/obscuredTurfs = list()
- var/list/visibleTurfs = list()
- var/list/dimTurfs = list()
-
- var/list/obscured = list()
- var/list/dim = list()
-
- var/list/cameras = list()
- var/list/seenby = list()
-
- var/changed = 1
- var/updating = 0
- var/minimap_updating = 0
-
- var/x
- var/y
- var/z
-
-
- var/icon/minimap_icon = new('icons/minimap.dmi', "chunk_base")
- var/obj/minimap_obj/minimap_obj = new()
-
-
-
-/datum/camerachunk/New(loc, x, y, z)
- //Round X and Y down to a multiple of 16, if nessecary
- src.x = x & ~0xF
- src.y = y & ~0xF
- src.z = z
-
- rebuild_chunk()
-
-
-
-// Completely re-calculate the whole chunk.
-
-/datum/camerachunk/proc/rebuild_chunk()
- for(var/mob/aiEye/eye in seenby)
- if(!eye.ai)
- seenby -= eye
- continue
-
- if(eye.ai.client)
- eye.ai.client.images -= obscured
- eye.ai.client.images -= dim
-
- var/start = locate(x, y, z)
- var/end = locate(min(x + 15, world.maxx), min(y + 15, world.maxy), z)
-
- turfs = block(start, end)
- dimTurfs = list()
- visibleTurfs = list()
- obscured = list()
- dim = list()
- cameras = list()
-
- for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z)))
- if(c.status)
- cameras += c
-
- for(var/obj/machinery/camera/c in cameras)
- var/lum = c.luminosity
- c.luminosity = 7
-
- dimTurfs |= turfs & view(7, c)
- visibleTurfs |= turfs & view(6, c)
-
- c.luminosity = lum
-
- obscuredTurfs = turfs - dimTurfs
- dimTurfs -= visibleTurfs
-
- for(var/turf/t in obscuredTurfs)
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
-
- for(var/turf/t in dimTurfs)
- if(!t.dim)
- t.dim = image('icons/effects/cameravis.dmi', t, "dim", TURF_LAYER)
- t.dim.mouse_opacity = 0
-
- dim += t.dim
-
- cameranet.minimap |= minimap_obj
-
- for(var/mob/aiEye/eye in seenby)
- if(eye.ai.client)
- eye.ai.client.images |= obscured
- eye.ai.client.images |= dim
-
-
-
-/datum/camerachunk/proc/add(mob/aiEye/eye)
- eye.visibleCameraChunks |= src
-
- if(eye.ai.client)
- eye.ai.client.images |= obscured
- eye.ai.client.images |= dim
-
- seenby |= eye
-
- if(changed && !updating)
- update()
- changed = 0
-
-
-
-/datum/camerachunk/proc/remove(mob/aiEye/eye)
- eye.visibleCameraChunks -= src
-
- if(eye.ai.client)
- eye.ai.client.images -= obscured
- eye.ai.client.images -= dim
-
- seenby -= eye
-
-/datum/camerachunk/proc/visibilityChanged(turf/loc)
- if(!(loc in visibleTurfs))
- return
-
- hasChanged()
-
-/datum/camerachunk/proc/hasChanged()
- if(length(seenby) > 0)
- if(!updating)
- updating = 1
-
- spawn(10)//Batch large changes, such as many doors opening or closing at once
- update()
- updating = 0
-
- else
- changed = 1
-
- if(!minimap_updating)
- minimap_updating = 1
-
- spawn(MINIMAP_UPDATE_DELAY)
- if(changed && !updating)
- update()
- changed = 0
-
- update_minimap()
- minimap_updating = 0
-
-/datum/camerachunk/proc/update()
-
- var/list/newDimTurfs = list()
- var/list/newVisibleTurfs = list()
-
- for(var/obj/machinery/camera/c in cameras)
- var/lum = c.luminosity
- c.luminosity = 7
-
- newDimTurfs |= turfs & view(7, c)
- newVisibleTurfs |= turfs & view(6, c)
-
- c.luminosity = lum
-
- var/list/dimAdded = newDimTurfs - dimTurfs
- var/list/dimRemoved = dimTurfs - newDimTurfs
- var/list/visAdded = newVisibleTurfs - visibleTurfs
- var/list/visRemoved = visibleTurfs - newVisibleTurfs
-
- visibleTurfs = newVisibleTurfs
- dimTurfs = newDimTurfs
- obscuredTurfs = turfs - dimTurfs
- dimTurfs -= visibleTurfs
-
- var/list/images_added = list()
- var/list/images_removed = list()
-
- for(var/turf/t in dimRemoved)
- if(t.dim)
- dim -= t.dim
- images_removed += t.dim
-
- if(!(t in visibleTurfs))
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
- images_added += t.obscured
-
- for(var/turf/t in dimAdded)
- if(!(t in visibleTurfs))
- if(!t.dim)
- t.dim = image('icons/effects/cameravis.dmi', t, "dim", 15)
- t.dim.mouse_opacity = 0
-
- dim += t.dim
- images_added += t.dim
-
- if(t.obscured)
- obscured -= t.obscured
- images_removed += t.obscured
-
- for(var/turf/t in visAdded)
- if(t.obscured)
- obscured -= t.obscured
- images_removed += t.obscured
-
- for(var/turf/t in visRemoved)
- if(t in obscuredTurfs)
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
- images_added += t.obscured
-
- for(var/mob/aiEye/eye in seenby)
- if(eye.ai)
- if(eye.ai.client)
- eye.ai.client.images -= images_removed
- eye.ai.client.images |= images_added
- else
- seenby -= eye
\ No newline at end of file
diff --git a/code/WorkInProgress/AI_Visibility/minimap.dm b/code/WorkInProgress/AI_Visibility/minimap.dm
deleted file mode 100644
index c97b01e0f8..0000000000
--- a/code/WorkInProgress/AI_Visibility/minimap.dm
+++ /dev/null
@@ -1,137 +0,0 @@
-/client/var/minimap_view_z = 1
-
-/obj/minimap_obj
- var/datum/camerachunk/chunk
-
-/obj/minimap_obj/Click(location, control, params)
- if(!istype(usr, /mob/dead) && !istype(usr, /mob/living/silicon/ai) && !(usr.client && usr.client.holder && usr.client.holder.level >= 4))
- return
-
- var/list/par = params2list(params)
- var/screen_loc = par["screen-loc"]
-
- if(findtext(screen_loc, "minimap:") != 1)
- return
-
- screen_loc = copytext(screen_loc, length("minimap:") + 1)
-
- var/x_text = copytext(screen_loc, 1, findtext(screen_loc, ","))
- var/y_text = copytext(screen_loc, findtext(screen_loc, ",") + 1)
-
- var/x = chunk.x
- x += round((text2num(copytext(x_text, findtext(x_text, ":") + 1)) + 1) / 2)
-
- var/y = chunk.y
- y += round((text2num(copytext(y_text, findtext(y_text, ":") + 1)) + 1) / 2)
-
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/ai = usr
- ai.freelook()
- ai.eyeobj.loc = locate(max(1, x - 1), max(1, y - 1), usr.client.minimap_view_z)
- cameranet.visibility(ai.eyeobj)
-
- else
- usr.loc = locate(max(1, x - 1), max(1, y - 1), usr.client.minimap_view_z)
-
-/mob/dead/verb/Open_Minimap()
- set category = "Ghost"
- cameranet.show_minimap(client)
-
-
-/mob/living/silicon/ai/verb/Open_Minimap()
- set category = "AI Commands"
- cameranet.show_minimap(client)
-
-
-/client/proc/Open_Minimap()
- set category = "Admin"
- cameranet.show_minimap(src)
-
-
-/mob/verb/Open_Minimap_Z()
- set hidden = 1
-
- if(!istype(src, /mob/dead) && !istype(src, /mob/living/silicon/ai) && !(client && client.holder && client.holder.level >= 4))
- return
-
- var/level = input("Select a Z level", "Z select", null) as null | anything in cameranet.minimap
-
- if(level != null)
- cameranet.show_minimap(client, level)
-
-
-
-/datum/cameranet/proc/show_minimap(client/client, z_level = "z-1")
- if(!istype(client.mob, /mob/dead) && !istype(client.mob, /mob/living/silicon/ai) && !(client.holder && client.holder.level >= 4))
- return
-
- if(z_level in cameranet.minimap)
- winshow(client, "minimapwindow", 1)
-
- for(var/key in cameranet.minimap)
- client.screen -= cameranet.minimap[key]
-
- client.screen |= cameranet.minimap[z_level]
-
- if(cameranet.generating_minimap)
- spawn(50)
- show_minimap(client, z_level)
-
- client.minimap_view_z = text2num(copytext(z_level, 3))
-
-
-/datum/camerachunk/proc/update_minimap()
- if(changed && !updating)
- update()
-
- minimap_icon.Blend(rgb(255, 0, 0), ICON_MULTIPLY)
-
- var/list/turfs = visibleTurfs | dimTurfs
-
- for(var/turf/turf in turfs)
- var/x = (turf.x & 0xf) * 2
- var/y = (turf.y & 0xf) * 2
-
- if(turf.density)
- minimap_icon.DrawBox(rgb(100, 100, 100), x + 1, y + 1, x + 2, y + 2)
- continue
-
- else if(istype(turf, /turf/space))
- minimap_icon.DrawBox(rgb(0, 0, 0), x + 1, y + 1, x + 2, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(200, 200, 200), x + 1, y + 1, x + 2, y + 2)
-
- for(var/obj/structure/o in turf)
- if(o.density)
- if(istype(o, /obj/structure/window) && (o.dir == NORTH || o.dir == SOUTH || o.dir == EAST || o.dir == WEST))
- if(o.dir == NORTH)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 2, x + 2, y + 2)
- else if(o.dir == SOUTH)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 2, y + 1)
- else if(o.dir == EAST)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 3, y + 1, x + 2, y + 2)
- else if(o.dir == WEST)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 1, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(150, 150, 150), x + 1, y + 1, x + 2, y + 2)
- break
-
- for(var/obj/machinery/door/o in turf)
- if(istype(o, /obj/machinery/door/window))
- if(o.dir == NORTH)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 2, x + 2, y + 2)
- else if(o.dir == SOUTH)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 1)
- else if(o.dir == EAST)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 2, y + 1, x + 2, y + 2)
- else if(o.dir == WEST)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 1, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 2)
- break
-
- minimap_obj.screen_loc = "minimap:[src.x / 16],[src.y / 16]"
- minimap_obj.icon = minimap_icon
diff --git a/code/WorkInProgress/AI_Visibility/util.dm b/code/WorkInProgress/AI_Visibility/util.dm
deleted file mode 100644
index da576cbd40..0000000000
--- a/code/WorkInProgress/AI_Visibility/util.dm
+++ /dev/null
@@ -1,38 +0,0 @@
-
-/turf
- var/image/obscured
- var/image/dim
-
-/turf/proc/visibilityChanged()
- cameranet.updateVisibility(src)
-
-/turf/New()
- ..()
- cameranet.updateVisibility(src)
-
-/obj/machinery/door/update_nearby_tiles(need_rebuild)
- . = ..(need_rebuild)
- cameranet.updateVisibility(loc)
-
-/obj/machinery/camera/New()
- ..()
- cameranet.addCamera(src)
-
-/obj/machinery/camera/Del()
- cameranet.removeCamera(src)
- ..()
-
-/obj/machinery/camera/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
- . = ..(W, user)
- if(istype(W, /obj/item/weapon/wirecutters))
- if(status)
- cameranet.addCamera(src)
- else
- cameranet.removeCamera(src)
-
-/proc/checkcameravis(atom/A)
- for(var/obj/machinery/camera/C in view(A,7))
- if(!C.status || C.stat == 2)
- continue
- return 1
- return 0
diff --git a/code/WorkInProgress/Apples/artifacts.dm b/code/WorkInProgress/Apples/artifacts.dm
deleted file mode 100644
index 242a17074e..0000000000
--- a/code/WorkInProgress/Apples/artifacts.dm
+++ /dev/null
@@ -1,23 +0,0 @@
-/obj/item/changestone
- name = "An uncut ruby"
- desc = "The ruby shines and catches the light, despite being uncut"
- icon = 'icons/obj/artifacts.dmi'
- icon_state = "changerock"
-
-obj/item/changestone/attack_hand(var/mob/user as mob)
- if(istype(user,/mob/living/carbon/human))
- var/mob/living/carbon/human/H = user
- if(!H.gloves)
- if (H.gender == FEMALE)
- H.gender = MALE
- else
- H.gender = FEMALE
- H.dna.ready_dna(H)
- H.update_body()
- ..()
-
-
-
-
-
-
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/falsewall.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/falsewall.dm
deleted file mode 100644
index 1a5d46371a..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/falsewall.dm
+++ /dev/null
@@ -1,59 +0,0 @@
-//simplified copy of /obj/structure/falsewall
-
-/obj/effect/landmark/falsewall_spawner
- name = "falsewall spawner"
-
-/obj/structure/temple_falsewall
- name = "wall"
- anchored = 1
- icon = 'icons/turf/walls.dmi'
- icon_state = "phoron0"
- opacity = 1
- var/closed_wall_dir = 0
- var/opening = 0
- var/mineral = "phoron"
- var/is_metal = 0
-
-/obj/structure/temple_falsewall/New()
- ..()
- spawn(10)
- if(prob(95))
- desc = pick("Something seems slightly off about it.","")
-
- var/junction = 0 //will be used to determine from which side the wall is connected to other walls
-
- for(var/turf/unsimulated/wall/W in orange(src,1))
- if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
- junction |= get_dir(src,W)
-
- closed_wall_dir = junction
- density = 1
- icon_state = "[mineral][closed_wall_dir]"
-
-/obj/structure/temple_falsewall/attack_hand(mob/user as mob)
- if(opening)
- return
-
- if(density)
- opening = 1
- if(is_metal)
- icon_state = "metalfwall_open"
- flick("metalfwall_opening", src)
- else
- icon_state = "[mineral]fwall_open"
- flick("[mineral]fwall_opening", src)
- sleep(15)
- src.density = 0
- SetOpacity(0)
- opening = 0
- else
- opening = 1
- icon_state = "[mineral][closed_wall_dir]"
- if(is_metal)
- flick("metalfwall_closing", src)
- else
- flick("[mineral]fwall_closing", src)
- density = 1
- sleep(15)
- SetOpacity(1)
- opening = 0
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm
deleted file mode 100644
index 421e803ec4..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm
+++ /dev/null
@@ -1,345 +0,0 @@
-//some testin stuff
-
-#define PATH_SPREAD_CHANCE_START 90
-#define PATH_SPREAD_CHANCE_LOSS_UPPER 80
-#define PATH_SPREAD_CHANCE_LOSS_LOWER 50
-
-#define RIVER_SPREAD_CHANCE_START 100
-#define RIVER_SPREAD_CHANCE_LOSS_UPPER 65
-#define RIVER_SPREAD_CHANCE_LOSS_LOWER 50
-
-#define RANDOM_UPPER_X 100
-#define RANDOM_UPPER_Y 100
-
-#define RANDOM_LOWER_X 18
-#define RANDOM_LOWER_Y 18
-
-/area/jungle
- name = "jungle"
- icon = 'code/workinprogress/cael_aislinn/jungle/jungle.dmi'
- icon_state = "area"
- lighting_use_dynamic = 0
- luminosity = 1
-
-//randomly spawns, will create paths around the map
-/obj/effect/landmark/path_waypoint
- name = "path waypoint"
- icon_state = "x2"
- var/connected = 0
-
-/obj/effect/landmark/temple
- name = "temple entrance"
- icon_state = "x2"
- var/obj/structure/ladder/my_ladder
-
- New()
- //pick a random temple to link to
- var/list/waypoints = list()
- for(var/obj/effect/landmark/temple/destination/T in landmarks_list)
- waypoints.Add(T)
- if(!T)
- return
- else continue
- var/obj/effect/landmark/temple/destination/dest_temple = pick(waypoints)
- dest_temple.init()
-
- //connect this landmark to the other
- my_ladder = new /obj/structure/ladder(src.loc)
- my_ladder.id = dest_temple.my_ladder.id
- dest_temple.my_ladder.up = my_ladder
-
- //delete the landmarks now that we're finished
- del(dest_temple)
- del(src)
-
-/obj/effect/landmark/temple/destination/New()
- //nothing
-
-/obj/effect/landmark/temple/destination/proc/init()
- my_ladder = new /obj/structure/ladder(src.loc)
- my_ladder.id = rand(999)
- my_ladder.height = -1
-
- //loop over the walls in the temple and make them a random pre-chosen mineral (null is a stand in for phoron, which the walls already are)
- //treat phoron slightly differently because it's the default wall type
- var/mineral = pick("uranium","sandstone","gold","iron","silver","diamond","clown","phoron")
- //world << "init [mineral]"
- var/area/my_area = get_area(src)
- var/list/temple_turfs = get_area_turfs(my_area.type)
-
- for(var/turf/simulated/floor/T in temple_turfs)
-
- for(var/obj/effect/landmark/falsewall_spawner/F in T.contents)
- var/obj/structure/temple_falsewall/fwall = new(F.loc)
- fwall.mineral = mineral
- if(mineral == "iron")
- fwall.is_metal = 1
- del(F)
-
- for(var/obj/effect/landmark/door_spawner/D in T.contents)
- var/spawn_type
- if(mineral == "iron")
- spawn_type = text2path("/obj/machinery/door/airlock/vault")
- else
- spawn_type = text2path("/obj/machinery/door/airlock/[mineral]")
- new spawn_type(D.loc)
- del(D)
-
- for(var/turf/unsimulated/wall/T in temple_turfs)
- if(mineral != "phoron")
- T.icon_state = replacetext(T.icon_state, "phoron", mineral)
-
- /*for(var/obj/effect/landmark/falsewall_spawner/F in T.contents)
- //world << "falsewall_spawner found in wall"
- var/obj/structure/temple_falsewall/fwall = new(F.loc)
- fwall.mineral = mineral
- del(F)
-
- for(var/obj/effect/landmark/door_spawner/D in T.contents)
- //world << "door_spawner found in wall"
- T = new /turf/unsimulated/floor(T.loc)
- T.icon_state = "dark"
- var/spawn_type = text2path("/obj/machinery/door/airlock/[door_mineral]")
- new spawn_type(T)
- del(D)*/
-
-//a shuttle has crashed somewhere on the map, it should have a power cell to let the adventurers get home
-/area/jungle/crash_ship_source
- icon_state = "crash"
-
-/area/jungle/crash_ship_clean
- icon_state = "crash"
-
-/area/jungle/crash_ship_one
- icon_state = "crash"
-
-/area/jungle/crash_ship_two
- icon_state = "crash"
-
-/area/jungle/crash_ship_three
- icon_state = "crash"
-
-/area/jungle/crash_ship_four
- icon_state = "crash"
-
-//randomly spawns, will create rivers around the map
-//uses the same logic as jungle paths
-/obj/effect/landmark/river_waypoint
- name = "river source waypoint"
- var/connected = 0
-
-/obj/machinery/jungle_controller
- name = "jungle controller"
- desc = "a mysterious and ancient piece of machinery"
- var/list/animal_spawners = list()
-
-
-/obj/machinery/jungle_controller/initialize()
- world << "\red \b Setting up jungle, this may take a bleeding eternity..."
-
- //crash dat shuttle
- var/area/start_location = locate(/area/jungle/crash_ship_source)
- var/area/clean_location = locate(/area/jungle/crash_ship_clean)
- var/list/ship_locations = list(/area/jungle/crash_ship_one, /area/jungle/crash_ship_two, /area/jungle/crash_ship_three, /area/jungle/crash_ship_four)
- var/area/end_location = locate( pick(ship_locations) )
- ship_locations -= end_location.type
-
- start_location.move_contents_to(end_location)
- for(var/area_type in ship_locations)
- var/area/cur_location = locate(area_type)
- clean_location.copy_turfs_to(cur_location)
-
- //drop some random river nodes
- var/list/river_nodes = list()
- var/max = rand(1,3)
- var/num_spawned = 0
- while(num_spawned < max)
- var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
- if(!istype(J))
- continue
- if(!J.bushes_spawn)
- continue
- river_nodes.Add(new /obj/effect/landmark/river_waypoint(J))
- num_spawned++
-
- //make some randomly pathing rivers
- for(var/obj/effect/landmark/river_waypoint/W in landmarks_list)
- if (W.z != src.z || W.connected)
- continue
-
- W.connected = 1
- var/turf/cur_turf = new /turf/unsimulated/jungle/water(get_turf(W))
- var/turf/target_turf = get_turf(pick(river_nodes))
-
- var/detouring = 0
- var/cur_dir = get_dir(cur_turf, target_turf)
- //
- while(cur_turf != target_turf)
- //randomly snake around a bit
- if(detouring)
- if(prob(20))
- detouring = 0
- cur_dir = get_dir(cur_turf, target_turf)
- else if(prob(20))
- detouring = 1
- if(prob(50))
- cur_dir = turn(cur_dir, 45)
- else
- cur_dir = turn(cur_dir, -45)
- else
- cur_dir = get_dir(cur_turf, target_turf)
-
- cur_turf = get_step(cur_turf, cur_dir)
-
- var/skip = 0
- if(!istype(cur_turf, /turf/unsimulated/jungle) || istype(cur_turf, /turf/unsimulated/jungle/rock))
- detouring = 0
- cur_dir = get_dir(cur_turf, target_turf)
- cur_turf = get_step(cur_turf, cur_dir)
- continue
-
- if(!skip)
- var/turf/unsimulated/jungle/water/water_turf = new(cur_turf)
- water_turf.Spread(75, rand(65, 25))
-
- var/list/path_nodes = list()
-
- //place some ladders leading down to pre-generated temples
- max = rand(2,5)
- num_spawned = 0
- while(num_spawned < max)
- var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
- if(!J || !J.bushes_spawn)
- continue
- new /obj/effect/landmark/temple(J)
- path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
- num_spawned++
-
- //put a native tribe somewhere
- num_spawned = 0
- while(num_spawned < 1)
- var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
- if(!J || !J.bushes_spawn)
- continue
- new /obj/effect/jungle_tribe_spawn(J)
- path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
- num_spawned++
-
- //place some random path waypoints to confuse players
- max = rand(1,3)
- num_spawned = 0
- while(num_spawned < max)
- var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
- if(!J || !J.bushes_spawn)
- continue
- path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
- num_spawned++
-
- //get any path nodes placed on the map
- for(var/obj/effect/landmark/path_waypoint/W in landmarks_list)
- if (W.z == src.z)
- path_nodes.Add(W)
-
- //make random, connecting paths
- for(var/obj/effect/landmark/path_waypoint/W in path_nodes)
- if (W.connected)
- continue
-
- W.connected = 1
- var/turf/cur_turf = get_turf(W)
- path_nodes.Remove(W)
- var/turf/target_turf = get_turf(pick(path_nodes))
- path_nodes.Add(W)
- //
- cur_turf = new /turf/unsimulated/jungle/path(cur_turf)
-
- var/detouring = 0
- var/cur_dir = get_dir(cur_turf, target_turf)
- //
- while(cur_turf != target_turf)
- //randomly snake around a bit
- if(detouring)
- if(prob(20) || get_dist(cur_turf, target_turf) < 5)
- detouring = 0
- cur_dir = get_dir(cur_turf, target_turf)
- else if(prob(20) && get_dist(cur_turf, target_turf) > 5)
- detouring = 1
- if(prob(50))
- cur_dir = turn(cur_dir, 45)
- else
- cur_dir = turn(cur_dir, -45)
- else
- cur_dir = get_dir(cur_turf, target_turf)
-
- //move a step forward
- cur_turf = get_step(cur_turf, cur_dir)
-
- //if we're not a jungle turf, get back to what we were doing
- if(!istype(cur_turf, /turf/unsimulated/jungle/))
- cur_dir = get_dir(cur_turf, target_turf)
- cur_turf = get_step(cur_turf, cur_dir)
- continue
-
- var/turf/unsimulated/jungle/J = cur_turf
- if(istype(J, /turf/unsimulated/jungle/impenetrable) || istype(J, /turf/unsimulated/jungle/water/deep))
- cur_dir = get_dir(cur_turf, target_turf)
- cur_turf = get_step(cur_turf, cur_dir)
- continue
-
- if(!istype(J, /turf/unsimulated/jungle/water))
- J = new /turf/unsimulated/jungle/path(cur_turf)
- J.Spread(PATH_SPREAD_CHANCE_START, rand(PATH_SPREAD_CHANCE_LOSS_UPPER, PATH_SPREAD_CHANCE_LOSS_LOWER))
-
- //create monkey spawners
- num_spawned = 0
- max = rand(3,6)
- while(num_spawned < max)
- var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
- if(!J || !J.bushes_spawn)
- continue
- animal_spawners.Add(new /obj/effect/landmark/animal_spawner/monkey(J))
- num_spawned++
-
- //create panther spawners
- num_spawned = 0
- max = rand(6,12)
- while(num_spawned < max)
- var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
- if(!J || !istype(J) || !J.bushes_spawn)
- continue
- animal_spawners.Add(new /obj/effect/landmark/animal_spawner/panther(J))
- num_spawned++
-
- //create snake spawners
- num_spawned = 0
- max = rand(6,12)
- while(num_spawned < max)
- var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
- if(!J || !istype(J) || !J.bushes_spawn)
- continue
- animal_spawners.Add(new /obj/effect/landmark/animal_spawner/snake(J))
- num_spawned++
-
- //create parrot spawners
- num_spawned = 0
- max = rand(3,6)
- while(num_spawned < max)
- var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
- if(!J || !istype(J) || !J.bushes_spawn)
- continue
- animal_spawners.Add(new /obj/effect/landmark/animal_spawner/parrot(J))
- num_spawned++
-
-#undef PATH_SPREAD_CHANCE_START
-#undef PATH_SPREAD_CHANCE_LOSS_UPPER
-#undef PATH_SPREAD_CHANCE_LOSS_LOWER
-
-#undef RIVER_SPREAD_CHANCE_START
-#undef RIVER_SPREAD_CHANCE_LOSS_UPPER
-#undef RIVER_SPREAD_CHANCE_LOSS_LOWER
-
-#undef RANDOM_UPPER_X
-#undef RANDOM_UPPER_Y
-
-#undef RANDOM_LOWER_X
-#undef RANDOM_LOWER_Y
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm
deleted file mode 100644
index 4c95b5be1c..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm
+++ /dev/null
@@ -1,158 +0,0 @@
-
-//spawns one of the specified animal type
-/obj/effect/landmark/animal_spawner
- icon_state = "x3"
- var/spawn_type
- var/mob/living/spawned_animal
- invisibility = 101
-
-/obj/effect/landmark/animal_spawner/New()
- if(!spawn_type)
- var/new_type = pick(typesof(/obj/effect/landmark/animal_spawner) - /obj/effect/landmark/animal_spawner)
- new new_type(get_turf(src))
- del(src)
-
- processing_objects.Add(src)
- spawned_animal = new spawn_type(get_turf(src))
-
-/obj/effect/landmark/animal_spawner/process()
- //if any of our animals are killed, spawn new ones
- if(!spawned_animal || spawned_animal.stat == DEAD)
- spawned_animal = new spawn_type(src)
- //after a random timeout, and in a random position (6-30 seconds)
- spawn(rand(1200,2400))
- spawned_animal.loc = locate(src.x + rand(-12,12), src.y + rand(-12,12), src.z)
-
-/obj/effect/landmark/animal_spawner/Del()
- processing_objects.Remove(src)
-
-/obj/effect/landmark/animal_spawner/panther
- name = "panther spawner"
- spawn_type = /mob/living/simple_animal/hostile/panther
-
-/obj/effect/landmark/animal_spawner/parrot
- name = "parrot spawner"
- spawn_type = /mob/living/simple_animal/parrot
-
-/obj/effect/landmark/animal_spawner/monkey
- name = "monkey spawner"
- spawn_type = /mob/living/carbon/monkey
-
-/obj/effect/landmark/animal_spawner/snake
- name = "snake spawner"
- spawn_type = /mob/living/simple_animal/hostile/snake
-
-
-//*********//
-// Panther //
-//*********//
-
-/mob/living/simple_animal/hostile/panther
- name = "panther"
- desc = "A long sleek, black cat with sharp teeth and claws."
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "panther"
- icon_living = "panther"
- icon_dead = "panther_dead"
- icon_gib = "panther_dead"
- speak_chance = 0
- turns_per_move = 3
- meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
- response_help = "pets the"
- response_disarm = "gently pushes aside the"
- response_harm = "hits the"
- stop_automated_movement_when_pulled = 0
- maxHealth = 50
- health = 50
-
- harm_intent_damage = 8
- melee_damage_lower = 15
- melee_damage_upper = 15
- attacktext = "slashed"
- attack_sound = 'sound/weapons/bite.ogg'
-
- layer = 3.1 //so they can stay hidde under the /obj/structure/bush
- var/stalk_tick_delay = 3
-
-/mob/living/simple_animal/hostile/panther/ListTargets()
- var/list/targets = list()
- for(var/mob/living/carbon/human/H in view(src, 10))
- targets += H
- return targets
-
-/mob/living/simple_animal/hostile/panther/FindTarget()
- . = ..()
- if(.)
- emote("nashes at [.]")
-
-/mob/living/simple_animal/hostile/panther/AttackingTarget()
- . =..()
- var/mob/living/L = .
- if(istype(L))
- if(prob(15))
- L.Weaken(3)
- L.visible_message("\the [src] knocks down \the [L]!")
-
-/mob/living/simple_animal/hostile/panther/AttackTarget()
- ..()
- if(stance == HOSTILE_STANCE_ATTACKING && get_dist(src, target_mob))
- stalk_tick_delay -= 1
- if(stalk_tick_delay <= 0)
- src.loc = get_step_towards(src, target_mob)
- stalk_tick_delay = 3
-
-//*******//
-// Snake //
-//*******//
-
-/mob/living/simple_animal/hostile/snake
- name = "snake"
- desc = "A sinuously coiled, venomous looking reptile."
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "snake"
- icon_living = "snake"
- icon_dead = "snake_dead"
- icon_gib = "snake_dead"
- speak_chance = 0
- turns_per_move = 1
- meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
- response_help = "pets the"
- response_disarm = "gently pushes aside the"
- response_harm = "hits the"
- stop_automated_movement_when_pulled = 0
- maxHealth = 25
- health = 25
-
- harm_intent_damage = 2
- melee_damage_lower = 3
- melee_damage_upper = 10
- attacktext = "bitten"
- attack_sound = 'sound/weapons/bite.ogg'
-
- layer = 3.1 //so they can stay hidde under the /obj/structure/bush
- var/stalk_tick_delay = 3
-
-/mob/living/simple_animal/hostile/snake/ListTargets()
- var/list/targets = list()
- for(var/mob/living/carbon/human/H in view(src, 10))
- targets += H
- return targets
-
-/mob/living/simple_animal/hostile/snake/FindTarget()
- . = ..()
- if(.)
- emote("hisses wickedly")
-
-/mob/living/simple_animal/hostile/snake/AttackingTarget()
- . =..()
- var/mob/living/L = .
- if(istype(L))
- L.apply_damage(rand(3,12), TOX)
-
-/mob/living/simple_animal/hostile/snake/AttackTarget()
- ..()
- if(stance == HOSTILE_STANCE_ATTACKING && get_dist(src, target_mob))
- stalk_tick_delay -= 1
- if(stalk_tick_delay <= 0)
- src.loc = get_step_towards(src, target_mob)
- stalk_tick_delay = 3
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_plants.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_plants.dm
deleted file mode 100644
index 3f1a7c2f4b..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_plants.dm
+++ /dev/null
@@ -1,119 +0,0 @@
-//*********************//
-// Generic undergrowth //
-//*********************//
-
-/obj/structure/bush
- name = "foliage"
- desc = "Pretty thick scrub, it'll take something sharp and a lot of determination to clear away."
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "bush1"
- density = 1
- anchored = 1
- layer = 3.2
- var/indestructable = 0
- var/stump = 0
-
-/obj/structure/bush/New()
- if(prob(20))
- opacity = 1
-
-/obj/structure/bush/Bumped(M as mob)
- if (istype(M, /mob/living/simple_animal))
- var/mob/living/simple_animal/A = M
- A.loc = get_turf(src)
- else if (istype(M, /mob/living/carbon/monkey))
- var/mob/living/carbon/monkey/A = M
- A.loc = get_turf(src)
-
-/obj/structure/bush/attackby(var/obj/I as obj, var/mob/user as mob)
- //hatchets can clear away undergrowth
- if(istype(I, /obj/item/weapon/hatchet) && !stump)
- if(indestructable)
- //this bush marks the edge of the map, you can't destroy it
- user << "\red You flail away at the undergrowth, but it's too thick here."
- else
- user.visible_message("\red [user] begins clearing away [src].","\red You begin clearing away [src].")
- spawn(rand(15,30))
- if(get_dist(user,src) < 2)
- user << "\blue You clear away [src]."
- var/obj/item/stack/sheet/wood/W = new(src.loc)
- W.amount = rand(3,15)
- if(prob(50))
- icon_state = "stump[rand(1,2)]"
- name = "cleared foliage"
- desc = "There used to be dense undergrowth here."
- density = 0
- stump = 1
- pixel_x = rand(-6,6)
- pixel_y = rand(-6,6)
- else
- del(src)
- else
- return ..()
-
-//*******************************//
-// Strange, fruit-bearing plants //
-//*******************************//
-
-var/list/fruit_icon_states = list("badrecipe","kudzupod","reishi","lime","grapes","boiledrorocore","chocolateegg")
-var/list/reagent_effects = list("toxin","anti_toxin","stoxin","space_drugs","mindbreaker","zombiepowder","impedrezene")
-var/jungle_plants_init = 0
-
-/proc/init_jungle_plants()
- jungle_plants_init = 1
- fruit_icon_states = shuffle(fruit_icon_states)
- reagent_effects = shuffle(reagent_effects)
-
-/obj/item/weapon/reagent_containers/food/snacks/grown/jungle_fruit
- name = "jungle fruit"
- desc = "It smells weird and looks off."
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "orange"
- potency = 1
-
-/obj/structure/jungle_plant
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "plant1"
- desc = "Looks like some of that fruit might be edible."
- var/fruits_left = 3
- var/fruit_type = -1
- var/icon/fruit_overlay
- var/plant_strength = 1
- var/fruit_r
- var/fruit_g
- var/fruit_b
-
-
-/obj/structure/jungle_plant/New()
- if(!jungle_plants_init)
- init_jungle_plants()
-
- fruit_type = rand(1,7)
- icon_state = "plant[fruit_type]"
- fruits_left = rand(1,5)
- fruit_overlay = icon('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"fruit[fruits_left]")
- fruit_r = 255 - fruit_type * 36
- fruit_g = rand(1,255)
- fruit_b = fruit_type * 36
- fruit_overlay.Blend(rgb(fruit_r, fruit_g, fruit_b), ICON_ADD)
- overlays += fruit_overlay
- plant_strength = rand(20,200)
-
-/obj/structure/jungle_plant/attack_hand(var/mob/user as mob)
- if(fruits_left > 0)
- fruits_left--
- user << "\blue You pick a fruit off [src]."
-
- var/obj/item/weapon/reagent_containers/food/snacks/grown/jungle_fruit/J = new (src.loc)
- J.potency = plant_strength
- J.icon_state = fruit_icon_states[fruit_type]
- J.reagents.add_reagent(reagent_effects[fruit_type], 1+round((plant_strength / 20), 1))
- J.bitesize = 1+round(J.reagents.total_volume / 2, 1)
- J.attack_hand(user)
-
- overlays -= fruit_overlay
- fruit_overlay = icon('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"fruit[fruits_left]")
- fruit_overlay.Blend(rgb(fruit_r, fruit_g, fruit_b), ICON_ADD)
- overlays += fruit_overlay
- else
- user << "\red There are no fruit left on [src]."
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
deleted file mode 100644
index 7e350dc3a0..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
+++ /dev/null
@@ -1,398 +0,0 @@
-//randomly generated temples, indiana jones style (minus the cultists, probably)
-
-/area/jungle/temple_one
- name = "temple"
- lighting_use_dynamic = 1
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "temple1"
-
-/area/jungle/temple_two
- name = "temple"
- lighting_use_dynamic = 1
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "temple2"
-
-/area/jungle/temple_three
- name = "temple"
- lighting_use_dynamic = 1
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "temple3"
-
-/area/jungle/temple_four
- name = "temple"
- lighting_use_dynamic = 1
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "temple4"
-
-/area/jungle/temple_five
- name = "temple"
- lighting_use_dynamic = 1
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "temple5"
-
-/area/jungle/temple_six
- name = "temple"
- lighting_use_dynamic = 1
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "temple6"
-
-/obj/effect/landmark/door_spawner
- name = "door spawner"
-
-//******//
-// Loot //
-//******//
-
-/obj/effect/landmark/glowshroom_spawn
- icon_state = "x3"
- invisibility = 101
- New()
- if(prob(10))
- new /obj/effect/glowshroom(src.loc)
- del(src)
-
-/obj/effect/landmark/loot_spawn
- name = "loot spawner"
- icon_state = "grabbed1"
- var/low_probability = 0
- New()
-
- switch(pick( \
- low_probability * 1000;"nothing", \
- 200 - low_probability * 175;"treasure", \
- 25 + low_probability * 75;"remains", \
- 25 + low_probability * 75;"plants", \
- 5; "blob", \
- 50 + low_probability * 50;"clothes", \
- "glasses", \
- 100 - low_probability * 50;"weapons", \
- 100 - low_probability * 50;"spacesuit", \
- "health", \
- 25 + low_probability * 75;"snacks", \
- 25;"alien", \
- "lights", \
- 25 - low_probability * 25;"engineering", \
- 25 - low_probability * 25;"coffin", \
- 25;"mimic", \
- 25;"viscerator", \
- ))
- if("treasure")
- var/obj/structure/closet/crate/C = new(src.loc)
- if(prob(33))
- //coins
-
- var/amount = rand(2,6)
- var/list/possible_spawns = list()
- for(var/coin_type in typesof(/obj/item/weapon/coin))
- possible_spawns += coin_type
-
- var/coin_type = pick(possible_spawns)
- for(var/i=0,iA sawblade shoots out of the ground and strikes you!"
- M.apply_damage(rand(5,10), BRUTE, sharp=1, edge=1)
-
- var/atom/myloc = src.loc
- var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"sawblade")
- myloc.overlays += flicker
- spawn(8)
- myloc.overlays -= flicker
- del(flicker)
- //flick("sawblade",src)
- if("poison_dart")
- M << "\red You feel something small and sharp strike you!"
- M.apply_damage(rand(5,10), TOX)
-
- var/atom/myloc = src.loc
- var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"dart[rand(1,3)]")
- myloc.overlays += flicker
- spawn(8)
- myloc.overlays -= flicker
- del(flicker)
- //flick("dart[rand(1,3)]",src)
- if("flame_burst")
- M << "\red A jet of fire comes out of nowhere!"
- M.apply_damage(rand(5,10), BURN)
-
- var/atom/myloc = src.loc
- var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"flameburst")
- myloc.overlays += flicker
- spawn(8)
- myloc.overlays -= flicker
- del flicker
- //flick("flameburst",src)
- if("phoron_gas")
- //spawn a bunch of phoron
- if("n2_gas")
- //spawn a bunch of sleeping gas
- if("thrower")
- //edited version of obj/effect/step_trigger/thrower
- var/throw_dir = pick(1,2,4,8)
- M.visible_message("\red The floor under [M] suddenly tips upward!","\red The floor tips upward under you!")
-
- var/atom/myloc = src.loc
- var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"throw[throw_dir]")
- myloc.overlays += flicker
- var/turf/my_turf = get_turf(loc)
- if(!my_turf.density)
- my_turf.density = 1
- spawn(8)
- my_turf.density = 0
- spawn(8)
- myloc.overlays -= flicker
- del(flicker)
-
- var/dist = rand(1,5)
- var/curtiles = 0
- while(M)
- if(curtiles >= dist)
- break
- if(M.z != src.z)
- break
-
- curtiles++
- sleep(1)
-
- var/predir = M.dir
- step(M, throw_dir)
- M.set_dir(predir)
-
-//gives turf a different description, to try and trick players
-/obj/effect/step_trigger/trap/fake
- icon_state = "faketrap"
- name = "fake trap"
-
- New()
- if(prob(10))
- new /obj/effect/glowshroom(src.loc)
- if(prob(90))
- var/turf/T = get_turf(src)
- T.desc = pick("It looks a little dustier than the surrounding tiles.","It is somewhat ornate.","It looks a little darker than the surrounding tiles.")
- del(src)
-
-//50% chance of being a trap
-/obj/effect/step_trigger/trap/fifty
- icon_state = "trap"
- name = "fifty fifty trap"
- icon_state = "fiftytrap"
-
- New()
- if(prob(50))
- ..()
- else
- if(prob(10))
- new /obj/effect/glowshroom(src.loc)
- del(src)
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_tribe.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_tribe.dm
deleted file mode 100644
index 46ad23cedf..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_tribe.dm
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-/obj/item/projectile/jungle_spear
- damage = 10
- damage_type = TOX
- icon_state = "bullet"
-
-/obj/effect/jungle_tribe_spawn
- name = "campfire"
- desc = "Looks cosy, in an alien sort of way."
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "campfire"
- anchored = 1
- var/list/tribesmen = list()
- var/list/enemy_players = list()
- var/tribe_type = 1
-
-/obj/effect/jungle_tribe_spawn/New()
- processing_objects.Add(src)
- tribe_type = rand(1,5)
-
- var/num_tribesmen = rand(3,6)
- for(var/i=0,i[src] throws a spear at [target_mob]!", 1)
- flick(src, "native[my_type]_act")
-
- var/tturf = get_turf(target_mob)
- Shoot(tturf, src.loc, src)
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_turfs.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_turfs.dm
deleted file mode 100644
index 7daeae006b..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_turfs.dm
+++ /dev/null
@@ -1,178 +0,0 @@
-
-/turf/unsimulated/jungle
- var/bushes_spawn = 1
- var/plants_spawn = 1
- name = "wet grass"
- desc = "Thick, long wet grass"
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "grass1"
- var/icon_spawn_state = "grass1"
- luminosity = 3
-
- New()
- icon_state = icon_spawn_state
-
- if(plants_spawn && prob(40))
- if(prob(90))
- var/image/I
- if(prob(35))
- I = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"plant[rand(1,7)]")
- else
- if(prob(30))
- I = image('icons/obj/flora/ausflora.dmi',"reedbush_[rand(1,4)]")
- else if(prob(33))
- I = image('icons/obj/flora/ausflora.dmi',"leafybush_[rand(1,3)]")
- else if(prob(50))
- I = image('icons/obj/flora/ausflora.dmi',"fernybush_[rand(1,3)]")
- else
- I = image('icons/obj/flora/ausflora.dmi',"stalkybush_[rand(1,3)]")
- I.pixel_x = rand(-6,6)
- I.pixel_y = rand(-6,6)
- overlays += I
- else
- var/obj/structure/jungle_plant/J = new(src)
- J.pixel_x = rand(-6,6)
- J.pixel_y = rand(-6,6)
- if(bushes_spawn && prob(90))
- new /obj/structure/bush(src)
-
-/turf/unsimulated/jungle/clear
- bushes_spawn = 0
- plants_spawn = 0
- icon_state = "grass_clear"
- icon_spawn_state = "grass3"
-
-/turf/unsimulated/jungle/path
- bushes_spawn = 0
- name = "wet grass"
- desc = "thick, long wet grass"
- icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
- icon_state = "grass_path"
- icon_spawn_state = "grass2"
-
- New()
- ..()
- for(var/obj/structure/bush/B in src)
- del B
-
-/turf/unsimulated/jungle/proc/Spread(var/probability, var/prob_loss = 50)
- if(probability <= 0)
- return
-
- //world << "\blue Spread([probability])"
- for(var/turf/unsimulated/jungle/J in orange(1, src))
- if(!J.bushes_spawn)
- continue
-
- var/turf/unsimulated/jungle/P = null
- if(J.type == src.type)
- P = J
- else
- P = new src.type(J)
-
- if(P && prob(probability))
- P.Spread(probability - prob_loss)
-
-/turf/unsimulated/jungle/impenetrable
- bushes_spawn = 0
- icon_state = "grass_impenetrable"
- icon_spawn_state = "grass1"
- New()
- ..()
- var/obj/structure/bush/B = new(src)
- B.indestructable = 1
-
-//copy paste from asteroid mineral turfs
-/turf/unsimulated/jungle/rock
- bushes_spawn = 0
- plants_spawn = 0
- density = 1
- name = "rock wall"
- icon = 'icons/turf/walls.dmi'
- icon_state = "rock"
- icon_spawn_state = "rock"
-
-/turf/unsimulated/jungle/rock/New()
- spawn(1)
- var/turf/T
- if(!istype(get_step(src, NORTH), /turf/unsimulated/jungle/rock) && !istype(get_step(src, NORTH), /turf/unsimulated/wall))
- T = get_step(src, NORTH)
- if (T)
- T.overlays += image('icons/turf/walls.dmi', "rock_side_s")
- if(!istype(get_step(src, SOUTH), /turf/unsimulated/jungle/rock) && !istype(get_step(src, SOUTH), /turf/unsimulated/wall))
- T = get_step(src, SOUTH)
- if (T)
- T.overlays += image('icons/turf/walls.dmi', "rock_side_n", layer=6)
- if(!istype(get_step(src, EAST), /turf/unsimulated/jungle/rock) && !istype(get_step(src, EAST), /turf/unsimulated/wall))
- T = get_step(src, EAST)
- if (T)
- T.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6)
- if(!istype(get_step(src, WEST), /turf/unsimulated/jungle/rock) && !istype(get_step(src, WEST), /turf/unsimulated/wall))
- T = get_step(src, WEST)
- if (T)
- T.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6)
-
-/turf/unsimulated/jungle/water
- bushes_spawn = 0
- name = "murky water"
- desc = "thick, murky water"
- icon = 'icons/misc/beach.dmi'
- icon_state = "water"
- icon_spawn_state = "water"
-
-/turf/unsimulated/jungle/water/New()
- ..()
- for(var/obj/structure/bush/B in src)
- del(B)
-
-/turf/unsimulated/jungle/water/Entered(atom/movable/O)
- ..()
- if(istype(O, /mob/living/))
- var/mob/living/M = O
- //slip in the murky water if we try to run through it
- if(prob(10 + (M.m_intent == "run" ? 40 : 0)))
- M << pick("\blue You slip on something slimy.","\blue You fall over into the murk.")
- M.Stun(2)
- M.Weaken(1)
-
- //piranhas - 25% chance to be an omnipresent risk, although they do practically no damage
- if(prob(25))
- M << "\blue You feel something slithering around your legs."
- if(prob(50))
- spawn(rand(25,50))
- var/turf/T = get_turf(M)
- if(istype(T, /turf/unsimulated/jungle/water))
- M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
- M.apply_damage(rand(0,1), BRUTE, sharp=1)
- if(prob(50))
- spawn(rand(25,50))
- var/turf/T = get_turf(M)
- if(istype(T, /turf/unsimulated/jungle/water))
- M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
- M.apply_damage(rand(0,1), BRUTE, sharp=1)
- if(prob(50))
- spawn(rand(25,50))
- var/turf/T = get_turf(M)
- if(istype(T, /turf/unsimulated/jungle/water))
- M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
- M.apply_damage(rand(0,1), BRUTE, sharp=1)
- if(prob(50))
- spawn(rand(25,50))
- var/turf/T = get_turf(M)
- if(istype(T, /turf/unsimulated/jungle/water))
- M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
- M.apply_damage(rand(0,1), BRUTE, sharp=1)
-
-/turf/unsimulated/jungle/water/deep
- plants_spawn = 0
- density = 1
- icon_state = "water2"
- icon_spawn_state = "water2"
-
-/turf/unsimulated/jungle/temple_wall
- name = "temple wall"
- desc = ""
- density = 1
- icon = 'icons/turf/walls.dmi'
- icon_state = "phoron0"
- var/mineral = "phoron"
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm
deleted file mode 100644
index 7ae07059f7..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm
+++ /dev/null
@@ -1,122 +0,0 @@
-//put this here because i needed specific functionality, and i wanted to avoid the hassle of getting it onto svn
-
-
-/area/proc/copy_turfs_to(var/area/A , var/platingRequired = 0 )
- //Takes: Area. Optional: If it should copy to areas that don't have plating
- //Returns: Nothing.
- //Notes: Attempts to move the contents of one area to another area.
- // Movement based on lower left corner. Tiles that do not fit
- // into the new area will not be moved.
-
- if(!A || !src) return 0
-
- var/list/turfs_src = get_area_turfs(src.type)
- var/list/turfs_trg = get_area_turfs(A.type)
-
- var/src_min_x = 0
- var/src_min_y = 0
- for (var/turf/T in turfs_src)
- if(T.x < src_min_x || !src_min_x) src_min_x = T.x
- if(T.y < src_min_y || !src_min_y) src_min_y = T.y
-
- var/trg_min_x = 0
- var/trg_min_y = 0
- for (var/turf/T in turfs_trg)
- if(T.x < trg_min_x || !trg_min_x) trg_min_x = T.x
- if(T.y < trg_min_y || !trg_min_y) trg_min_y = T.y
-
- var/list/refined_src = new/list()
- for(var/turf/T in turfs_src)
- refined_src += T
- refined_src[T] = new/datum/coords
- var/datum/coords/C = refined_src[T]
- C.x_pos = (T.x - src_min_x)
- C.y_pos = (T.y - src_min_y)
-
- var/list/refined_trg = new/list()
- for(var/turf/T in turfs_trg)
- refined_trg += T
- refined_trg[T] = new/datum/coords
- var/datum/coords/C = refined_trg[T]
- C.x_pos = (T.x - trg_min_x)
- C.y_pos = (T.y - trg_min_y)
-
- var/list/toupdate = new/list()
-
- var/copiedobjs = list()
-
-
- moving:
- for (var/turf/T in refined_src)
- var/datum/coords/C_src = refined_src[T]
- for (var/turf/B in refined_trg)
- var/datum/coords/C_trg = refined_trg[B]
- if(C_src.x_pos == C_trg.x_pos && C_src.y_pos == C_trg.y_pos)
-
- var/old_dir1 = T.dir
- var/old_icon_state1 = T.icon_state
- var/old_icon1 = T.icon
-
- if(platingRequired)
- if(istype(B, /turf/space))
- continue moving
-
- var/turf/X = new T.type(B)
- 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
-
-
- var/list/mobs = new/list()
- var/list/newmobs = new/list()
-
- for(var/mob/M in T)
-
- if(!istype(M,/mob) || istype(M, /mob/aiEye)) continue // If we need to check for more mobs, I'll add a variable
- mobs += M
-
- for(var/mob/M in mobs)
- newmobs += DuplicateObject(M , 1)
-
- for(var/mob/M in newmobs)
- M.loc = X
-
-
-
- for(var/V in T.vars)
- if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
- X.vars[V] = T.vars[V]
-
-// var/area/AR = X.loc
-
-// if(AR.lighting_use_dynamic)
-// X.opacity = !X.opacity
-// X.sd_SetOpacity(!X.opacity) //TODO: rewrite this code so it's not messed by lighting ~Carn
-
- toupdate += X
-
- refined_src -= T
- refined_trg -= B
- continue moving
-
-
-
-
- /*var/list/doors = new/list()
-
- if(toupdate.len)
- for(var/turf/simulated/T1 in toupdate)
- for(var/obj/machinery/door/D2 in T1)
- doors += D2
- if(T1.parent)
- air_master.groups_to_rebuild += T1.parent
- else
- air_master.tiles_to_update += T1
-
- for(var/obj/O in doors)
- O:update_nearby_tiles(1)*/
-
-
-
-
- return copiedobjs
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm
deleted file mode 100644
index 3782e76209..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm
+++ /dev/null
@@ -1,132 +0,0 @@
-//mostly replaced these with emitter code
-//they're functionally identical
-
-/obj/machinery/computer/laser
- name = "Zero-point laser"
- desc = "A super-powerful laser"
- var/visible = 1
- var/state = 1.0
- //var/obj/beam/e_beam/first
- var/power = 500
- icon = 'icons/obj/engine.dmi'
- icon_state = "laser"
- anchored = 1
- var/id
- var/on = 0
- var/freq = 50000
- var/phase = 0
- var/phase_variance = 0
-
-/obj/machinery/computer/laser/process()
- /*if(on)
- if(!first)
- src.first = new /obj/beam/e_beam(src.loc)
- src.first.master = src
- src.first.set_dir(src.dir)
- src.first.power = src.power
- src.first.freq = src.freq
- src.first.phase = src.phase
- src.first.phase_variance = src.phase_variance
- step(first, dir)
- if(first)
- src.first.updatebeam()
- else
- src.first.updatebeam()
- else
- if(first)
- del first*/
-
-/obj/machinery/computer/laser/proc/setpower(var/powera)
- /*src.power = powera
- if(first)
- first.setpower(src.power)*/
-
-/*
-/obj/beam/e_beam
- name = "Laser beam"
- icon = 'icons/obj/projectiles.dmi'
- icon_state = "u_laser"
- var/obj/machinery/engine/laser/master = null
- var/obj/beam/e_beam/next = null
- var/power
- var/freq = 50000
- var/phase = 0
- var/phase_variance = 0
- anchored = 1
-
-/obj/beam/e_beam/New()
- sd_SetLuminosity(1, 1, 4)
-
-/obj/beam/e_beam/proc/updatebeam()
- if(!next)
- if(get_step(src.loc,src.dir))
- var/obj/beam/e_beam/e = new /obj/beam/e_beam(src.loc)
- e.set_dir(src.dir)
- src.next = e
- e.master = src.master
- e.power = src.power
- e.phase = src.phase
- src.phase+=src.phase_variance
- e.freq = src.freq
- e.phase_variance = src.phase_variance
- if(src.loc.density == 0)
- for(var/atom/o in src.loc.contents)
- if(o.density || o == src.master || (ismob(o) && !istype(o, /mob/dead)) )
- o.laser_act(src)
- del src
- return
- else
- src.loc.laser_act(src)
- del e
- return
- step(e,e.dir)
- if(e)
- e.updatebeam()
- else
- next.updatebeam()
-
-/atom/proc/laser_act(var/obj/beam/e_beam/b)
- return
-
-/mob/living/carbon/laser_act(var/obj/beam/e_beam/b)
- for(var/t in organs)
- var/datum/organ/external/affecting = organs["[t]"]
- if (affecting.take_damage(0, b.power/400,0,0))
- UpdateDamageIcon()
- else
- UpdateDamage()
-
-/obj/beam/e_beam/Bump(atom/Obstacle)
- Obstacle.laser_act(src)
- del(src)
- return
-
-
-/obj/beam/e_beam/proc/setpower(var/powera)
- src.power = powera
- if(src.next)
- src.next.setpower(powera)
-
-/obj/beam/e_beam/Bumped()
- src.hit()
- return
-
-/obj/beam/e_beam/HasEntered(atom/movable/AM as mob|obj)
- if (istype(AM, /obj/beam))
- return
- spawn( 0 )
- AM.laser_act(src)
- src.hit()
- return
- return
-
-/obj/beam/e_beam/Del()
- if(next)
- del(next)
- ..()
- return
-
-/obj/beam/e_beam/proc/hit()
- del src
- return
- */
\ No newline at end of file
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm
deleted file mode 100644
index d606337f4c..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm
+++ /dev/null
@@ -1,122 +0,0 @@
-//The laser control computer
-//Used to control the lasers
-/obj/machinery/computer/lasercon
- name = "Laser control computer"
- var/list/lasers = new/list
- icon_state = "atmos"
- var/id
- //var/advanced = 0
-
-/obj/machinery/computer/lasercon
- New()
- spawn(1)
- for(var/obj/machinery/zero_point_emitter/las in world)
- if(las.id == src.id)
- lasers += las
-
- process()
- ..()
- updateDialog()
-
- interact(mob/user)
- if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
- if (!istype(user, /mob/living/silicon))
- user.machine = null
- user << browse(null, "window=laser_control")
- return
- var/t = "Laser status monitor
"
- for(var/obj/machinery/zero_point_emitter/laser in lasers)
- t += "Zero Point Laser
"
- t += "Power level: - - - - [laser.energy]MeV + + + +
"
- t += "Frequency: - - [laser.freq] + +
"
- t += "Output: [laser.active ? "Online Offline" : "Online Offline "]
"
- t += "
"
- t += "Close
"
- user << browse(t, "window=laser_control;size=500x800")
- user.machine = src
-
-/*
-/obj/machinery/computer/lasercon/proc/interact(mob/user)
-
- if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
- if (!istype(user, /mob/living/silicon))
- user.machine = null
- user << browse(null, "window=powcomp")
- return
-
-
- user.machine = src
- var/t = "Laser status monitor
"
-
- var/obj/machinery/engine/laser/laser = src.laser[1]
-
- if(!laser)
- t += "\red No laser found"
- else
-
-
- t += "Power level: - - - - [add_lspace(laser.power,5)] + + + +
"
- if(advanced)
- t += "Frequency: - - [add_lspace(laser.freq,5)] + +
"
-
- t += "Output: [laser.on ? "Online Offline" : "Online Offline "]
"
-
- t += "
Close"
-
- user << browse(t, "window=lascomp;size=420x700")
- onclose(user, "lascomp")
-*/
-
-/obj/machinery/computer/lasercon/Topic(href, href_list)
- ..()
- if( href_list["close"] )
- usr << browse(null, "window=laser_control")
- usr.machine = null
- return
-
- else if( href_list["input"] )
- var/i = text2num(href_list["input"])
- var/d = i
- for(var/obj/machinery/zero_point_emitter/laser in lasers)
- var/new_power = laser.energy + d
- new_power = max(new_power,0.0001) //lowest possible value
- new_power = min(new_power,0.01) //highest possible value
- laser.energy = new_power
- //
- src.updateDialog()
- else if( href_list["online"] )
- var/obj/machinery/zero_point_emitter/laser = href_list["online"]
- laser.active = !laser.active
- src.updateDialog()
- else if( href_list["freq"] )
- var/amt = text2num(href_list["freq"])
- for(var/obj/machinery/zero_point_emitter/laser in lasers)
- var/new_freq = laser.frequency + amt
- new_freq = max(new_freq,1) //lowest possible value
- new_freq = min(new_freq,20000) //highest possible value
- laser.frequency = new_freq
- //
- src.updateDialog()
-
-/*
-/obj/machinery/computer/lasercon/process()
- if(!(stat & (NOPOWER|BROKEN)) )
- use_power(250)
-
- //src.updateDialog()
-*/
-
-/*
-/obj/machinery/computer/lasercon/power_change()
-
- if(stat & BROKEN)
- icon_state = "broken"
- else
- if( powered() )
- icon_state = initial(icon_state)
- stat &= ~NOPOWER
- else
- spawn(rand(0, 15))
- src.icon_state = "c_unpowered"
- stat |= NOPOWER
-*/
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/Shard.dmi b/code/WorkInProgress/Cael_Aislinn/Supermatter/Shard.dmi
deleted file mode 100644
index 3d312aa792..0000000000
Binary files a/code/WorkInProgress/Cael_Aislinn/Supermatter/Shard.dmi and /dev/null differ
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
deleted file mode 100644
index 66ccf181bd..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
+++ /dev/null
@@ -1,236 +0,0 @@
-//new supermatter lasers
-
-/obj/machinery/zero_point_emitter
- name = "Zero-point laser"
- desc = "A super-powerful laser"
- icon = 'icons/obj/engine.dmi'
- icon_state = "laser"
- anchored = 0
- density = 1
- req_access = list(access_research)
-
- use_power = 1
- idle_power_usage = 10
- active_power_usage = 300
-
- var/active = 0
- var/fire_delay = 100
- var/last_shot = 0
- var/shot_number = 0
- var/state = 0
- var/locked = 0
-
- var/energy = 0.0001
- var/frequency = 1
-
- var/freq = 50000
- var/id
-
-/obj/machinery/zero_point_emitter/verb/rotate()
- set name = "Rotate"
- set category = "Object"
- set src in oview(1)
-
- if (src.anchored || usr:stat)
- usr << "It is fastened to the floor!"
- return 0
- src.set_dir(turn(src.dir, 90))
- return 1
-
-/obj/machinery/zero_point_emitter/New()
- ..()
- return
-
-/obj/machinery/zero_point_emitter/update_icon()
- if (active && !(stat & (NOPOWER|BROKEN)))
- icon_state = "laser"//"emitter_+a"
- else
- icon_state = "laser"//"emitter"
-
-/obj/machinery/zero_point_emitter/attack_hand(mob/user as mob)
- src.add_fingerprint(user)
- if(state == 2)
- if(!src.locked)
- if(src.active==1)
- src.active = 0
- user << "You turn off the [src]."
- src.use_power = 1
- else
- src.active = 1
- user << "You turn on the [src]."
- src.shot_number = 0
- src.fire_delay = 100
- src.use_power = 2
- update_icon()
- else
- user << "\red The controls are locked!"
- else
- user << "\red The [src] needs to be firmly secured to the floor first."
- return 1
-
-
-/obj/machinery/zero_point_emitter/emp_act(var/severity)//Emitters are hardened but still might have issues
- use_power(1000)
-/* if((severity == 1)&&prob(1)&&prob(1))
- if(src.active)
- src.active = 0
- src.use_power = 1 */
- return 1
-
-/obj/machinery/zero_point_emitter/process()
- if(stat & (NOPOWER|BROKEN))
- return
- if(src.state != 2)
- src.active = 0
- return
- if(((src.last_shot + src.fire_delay) <= world.time) && (src.active == 1))
- src.last_shot = world.time
- if(src.shot_number < 3)
- src.fire_delay = 2
- src.shot_number ++
- else
- src.fire_delay = rand(20,100)
- src.shot_number = 0
- use_power(1000)
- var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
- playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
- if(prob(35))
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
- A.set_dir(src.dir)
- switch(dir)
- if(NORTH)
- A.yo = 20
- A.xo = 0
- if(EAST)
- A.yo = 0
- A.xo = 20
- if(WEST)
- A.yo = 0
- A.xo = -20
- else // Any other
- A.yo = -20
- A.xo = 0
- A.process() //TODO: Carn: check this out
-
-
-/obj/machinery/zero_point_emitter/attackby(obj/item/W, mob/user)
-
- if(istype(W, /obj/item/weapon/wrench))
- if(active)
- user << "Turn off the [src] first."
- return
- switch(state)
- if(0)
- state = 1
- playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- user.visible_message("[user.name] secures [src.name] to the floor.", \
- "You secure the external reinforcing bolts to the floor.", \
- "You hear a ratchet")
- src.anchored = 1
- if(1)
- state = 0
- playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
- "You undo the external reinforcing bolts.", \
- "You hear a ratchet")
- src.anchored = 0
- if(2)
- user << "\red The [src.name] needs to be unwelded from the floor."
- return
-
- if(istype(W, /obj/item/weapon/weldingtool))
- var/obj/item/weapon/weldingtool/WT = W
- if(active)
- user << "Turn off the [src] first."
- return
- switch(state)
- if(0)
- user << "\red The [src.name] needs to be wrenched to the floor."
- if(1)
- if (WT.remove_fuel(0,user))
- playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
- user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
- "You start to weld the [src] to the floor.", \
- "You hear welding")
- if (do_after(user,20))
- if(!src || !WT.isOn()) return
- state = 2
- user << "You weld the [src] to the floor."
- else
- user << "\red You need more welding fuel to complete this task."
- if(2)
- if (WT.remove_fuel(0,user))
- playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
- user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
- "You start to cut the [src] free from the floor.", \
- "You hear welding")
- if (do_after(user,20))
- if(!src || !WT.isOn()) return
- state = 1
- user << "You cut the [src] free from the floor."
- else
- user << "\red You need more welding fuel to complete this task."
- return
-
- if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
- if(emagged)
- user << "\red The lock seems to be broken"
- return
- if(src.allowed(user))
- if(active)
- src.locked = !src.locked
- user << "The controls are now [src.locked ? "locked." : "unlocked."]"
- else
- src.locked = 0 //just in case it somehow gets locked
- user << "\red The controls can only be locked when the [src] is online"
- else
- user << "\red Access denied."
- return
-
-
- if(istype(W, /obj/item/weapon/card/emag) && !emagged)
- locked = 0
- emagged = 1
- user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
- return
-
- ..()
- return
-
-
-/obj/machinery/zero_point_emitter/power_change()
- ..()
- update_icon()
- return
-
-/obj/machinery/zero_point_emitter/Topic(href, href_list)
- ..()
- if( href_list["input"] )
- var/i = text2num(href_list["input"])
- var/d = i
- var/new_power = energy + d
- new_power = max(new_power,0.0001) //lowest possible value
- new_power = min(new_power,0.01) //highest possible value
- energy = new_power
- //
- for(var/obj/machinery/computer/lasercon/comp in world)
- if(comp.id == src.id)
- comp.updateDialog()
- else if( href_list["online"] )
- active = !active
- //
- for(var/obj/machinery/computer/lasercon/comp in world)
- if(comp.id == src.id)
- comp.updateDialog()
- else if( href_list["freq"] )
- var/amt = text2num(href_list["freq"])
- var/new_freq = frequency + amt
- new_freq = max(new_freq,1) //lowest possible value
- new_freq = min(new_freq,20000) //highest possible value
- frequency = new_freq
- //
- for(var/obj/machinery/computer/lasercon/comp in world)
- if(comp.id == src.id)
- comp.updateDialog()
diff --git a/code/WorkInProgress/Cael_Aislinn/meteor_battery.dm b/code/WorkInProgress/Cael_Aislinn/meteor_battery.dm
deleted file mode 100644
index 9ebc5fa5de..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/meteor_battery.dm
+++ /dev/null
@@ -1,261 +0,0 @@
-#define MISSILE_SPEED 5
-
-//automated turret that shoots missiles at meteors
-
-/obj/item/projectile/missile
- name = "missile"
- icon = 'code/WorkInProgress/Cael_Aislinn/meteor_turret.dmi'
- icon_state = "missile"
- var/turf/target
- var/tracking = 0
- density = 1
- desc = "It's sparking and shaking slightly."
-
-/obj/item/projectile/missile/process(var/turf/newtarget)
- target = newtarget
- set_dir(get_dir(src.loc, target))
- walk_towards(src, target, MISSILE_SPEED)
-
-/obj/item/projectile/missile/Bump(atom/A)
- spawn(0)
- if(istype(A,/obj/effect/meteor))
- del(A)
- explode()
- return
-
-/obj/item/projectile/missile/proc/explode()
- explosion(src.loc, 1, 1, 2, 7, 0)
- playsound(src.loc, "explosion", 50, 1)
- del(src)
-
-/obj/item/projectile/missile/attack_hand(mob/user)
- ..()
- return attackby(null, user)
-
-/obj/item/projectile/missile/attackby(obj/item/weapon/W, mob/user)
- //can't touch this
- ..()
- explode()
-
-/obj/machinery/meteor_battery
- name = "meteor battery"
- icon = 'code/WorkInProgress/Cael_Aislinn/meteor_turret.dmi'
- icon_state = "turret0"
- var/raised = 0
- var/enabled = 1
- anchored = 1
- layer = 3
- invisibility = 2
- density = 1
- var/health = 18
- var/id = ""
- var/obj/machinery/turretcover/cover = null
- var/popping = 0
- var/wasvalid = 0
- var/lastfired = 0
- var/shot_delay = 50
- var/datum/effect/effect/system/spark_spread/spark_system
- use_power = 1
- idle_power_usage = 50
- active_power_usage = 300
- var/atom/movable/cur_target
- var/targeting_active = 0
- var/protect_range = 30
- var/tracking_missiles = 0
- var/list/fired_missiles
-
-/obj/machinery/meteor_battery/New()
- spark_system = new /datum/effect/effect/system/spark_spread
- spark_system.set_up(5, 0, src)
- spark_system.attach(src)
- fired_missiles = new/list()
-// targets = new
- ..()
- return
-
-/obj/machinery/meteor_battery/proc/isPopping()
- return (popping!=0)
-
-/obj/machinery/meteor_battery/power_change()
- if(stat & BROKEN)
- icon_state = "broke"
- else
- if( powered() )
- if (src.enabled)
- icon_state = "turret1"
- else
- icon_state = "turret0"
- stat &= ~NOPOWER
- else
- spawn(rand(0, 15))
- src.icon_state = "turret0"
- stat |= NOPOWER
-
-/obj/machinery/meteor_battery/proc/setState(var/enabled)
- src.enabled = enabled
- src.power_change()
-
-/obj/machinery/meteor_battery/proc/get_new_target()
- var/list/new_targets = new
- var/new_target
- for(var/obj/effect/meteor/M in view(protect_range, get_turf(src)))
- new_targets += M
- if(new_targets.len)
- new_target = pick(new_targets)
- return new_target
-
-/obj/machinery/meteor_battery/process()
- if(stat & (NOPOWER|BROKEN))
- return
- if(src.cover==null)
- src.cover = new /obj/machinery/turretcover(src.loc)
- src.cover.host = src
- if(!enabled)
- if(!isDown() && !isPopping())
- popDown()
- return
-
- //update our missiles
- for(var/obj/item/projectile/missile/M in fired_missiles)
- if(!M)
- fired_missiles.Remove(M)
- continue
- if(tracking_missiles && cur_target)
- //update homing missile target
- M.target = get_turf(cur_target)
- walk_towards(M, M.target, MISSILE_SPEED)
-
- if(get_turf(M) == M.target && M)
- //missile has arrived at destination
- fired_missiles.Remove(M)
- if( istype(get_turf(M), /turf/space) )
- //send the missile shooting off into the distance
- walk(M, get_dir(src,M), MISSILE_SPEED)
- spawn(rand(3,10) * 10)
- if(M)
- M.explode()
- else if(rand(3) == 3)
- //chance to blow up later (between 4 seconds and 2 minutes), or just sit there being ominous
- spawn(rand(4,120) * 10)
- M.explode()
- for(var/mob/P in view(7))
- P.visible_message("\red The missile skids to a halt, vibrating and sparking ominously!")
-
- if(!cur_target)
- cur_target = get_new_target() //get new target
-
- if(cur_target) //if it's found, proceed
- if(!isPopping())
- if(isDown())
- popUp()
- use_power = 2
- else
- spawn()
- if(!targeting_active)
- targeting_active = 1
- target()
- targeting_active = 0
- else if(!isPopping())//else, pop down
- if(!isDown())
- popDown()
- use_power = 1
-
- return
-
-/obj/machinery/meteor_battery/proc/target()
- while(src && enabled && !stat)
- src.set_dir(get_dir(src, cur_target))
- shootAt(cur_target)
- sleep(shot_delay)
- return
-
-/obj/machinery/meteor_battery/proc/shootAt(var/atom/movable/target)
- var/turf/T = get_turf(src)
- var/turf/U = get_turf(target)
- if (!T || !U)
- return
- use_power(500)
- var/obj/item/projectile/missile/A = new(T)
- A.tracking = tracking_missiles
- fired_missiles.Add(A)
- spawn(0)
- A.process(U)
- return
-
-
-/obj/machinery/meteor_battery/proc/isDown()
- return (invisibility!=0)
-
-/obj/machinery/meteor_battery/proc/popUp()
- if ((!isPopping()) || src.popping==-1)
- invisibility = 0
- popping = 1
- if (src.cover!=null)
- flick("popup", src.cover)
- src.cover.icon_state = "openTurretCover"
- spawn(10)
- if (popping==1) popping = 0
-
-/obj/machinery/meteor_battery/proc/popDown()
- if ((!isPopping()) || src.popping==1)
- popping = -1
- if (src.cover!=null)
- flick("popdown", src.cover)
- src.cover.icon_state = "turretCover"
- spawn(10)
- if (popping==-1)
- invisibility = 2
- popping = 0
-
-/obj/machinery/meteor_battery/bullet_act(var/obj/item/projectile/Proj)
- src.health -= Proj.damage
- ..()
- if(prob(45) && Proj.damage > 0) src.spark_system.start()
- if (src.health <= 0)
- src.die()
- return
-
-/obj/machinery/meteor_battery/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
- ..()
- playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
- src.spark_system.start()
- src.health -= W.force * 0.5
- if (src.health <= 0)
- src.die()
- return
-
-/obj/machinery/meteor_battery/emp_act(severity)
- switch(severity)
- if(1)
- enabled = 0
- power_change()
- ..()
-
-/obj/machinery/meteor_battery/ex_act(severity)
- if(severity < 3)
- src.die()
-
-/obj/machinery/meteor_battery/proc/die()
- src.health = 0
- src.density = 0
- src.stat |= BROKEN
- src.icon_state = "broke"
- if (cover!=null)
- del(cover)
- sleep(3)
- flick("explosion", src)
- spawn(13)
- del(src)
-
-/obj/machinery/meteor_battery/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
- if(!(stat & BROKEN))
- playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has slashed at []!", M, src), 1)
- src.health -= 15
- if (src.health <= 0)
- src.die()
- else
- M << "\green That object is useless to you."
- return
diff --git a/code/WorkInProgress/Cael_Aislinn/sculpture.dm b/code/WorkInProgress/Cael_Aislinn/sculpture.dm
deleted file mode 100644
index 808e968f55..0000000000
--- a/code/WorkInProgress/Cael_Aislinn/sculpture.dm
+++ /dev/null
@@ -1,262 +0,0 @@
-
-//sculpture
-//SCP-173, nothing more need be said
-/mob/living/simple_animal/sculpture
- name = "\improper sculpture"
- real_name = "sculpture"
- desc = "It's some kind of human sized, doll-like sculpture, with weird discolourations on some parts of it. It appears to be quite solid. "
- icon = 'code/WorkInProgress/Cael_Aislinn/unknown.dmi'
- icon_state = "sculpture"
- icon_living = "sculpture"
- icon_dead = "sculpture"
- emote_hear = list("makes a faint scraping sound")
- emote_see = list("twitches slightly", "shivers")
- response_help = "touches the"
- response_disarm = "pushes the"
- response_harm = "hits the"
- var/obj/item/weapon/grab/G
- var/observed = 0
- var/allow_escape = 0 //set this to 1 for src to drop it's target next Life() call and try to escape
- var/hibernate = 0
- var/random_escape_chance = 0.5
-
-/mob/living/simple_animal/sculpture/proc/GrabMob(var/mob/living/target)
- if(target && target != src && ishuman(target))
- G = new /obj/item/weapon/grab(target)
- G.assailant = src
- G.layer = 20
- G.affecting = target
- G.synch()
- target.LAssailant = src
-
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
- visible_message("\red [src] has grabbed [target]!")
- target << "\red You feel something suddenly grab you around the neck from behind! Everything goes black..."
-
- G.state = 3
- G.killing = 1
-
- desc = "It's some kind of human sized, doll-like sculpture, with weird discolourations on some parts of it. It appears to be quite solid. [G ? "\red The sculpture is holding [G.affecting] in a vice-like grip." : ""]"
- target.attack_log += text("\[[time_stamp()]\] Has been grabbed by SCP-173, and is being strangled!")
- log_admin("[target] ([target.ckey]) has been grabbed and is being strangled by SCP-173.")
- message_admins("Alert: [target.real_name] has been grabbed and is being strangled by SCP-173. Set var/allow_escape = 1 to allow this player to escape temporarily, or var/hibernate = 1 to disable it entirely.")
-
-/mob/living/simple_animal/sculpture/proc/Escape()
- var/list/turfs = new/list()
- for(var/turf/thisturf in view(50,src))
- if(istype(thisturf, /turf/space))
- continue
- else if(istype(thisturf, /turf/simulated/wall))
- continue
- else if(istype(thisturf, /turf/simulated/mineral))
- continue
- else if(istype(thisturf, /turf/simulated/shuttle/wall))
- continue
- else if(istype(thisturf, /turf/unsimulated/wall))
- continue
- turfs += thisturf
- var/turf/target_turf = pick(turfs)
- src.set_dir(get_dir(src, target_turf))
- src.loc = target_turf
-
- hibernate = 1
- spawn(rand(20,35) * 10)
- hibernate = 0
-
-/mob/living/simple_animal/sculpture/Life()
-
- observed = 0
-
- //update the desc
- if(!G)
- desc = "It's some kind of human sized, doll-like sculpture, with weird discolourations on some parts of it. It appears to be quite solid."
-
- //if we are sent into forced hibernation mode, allow our victim to escape
- if(hibernate && G && G.killing == 1)
- if(G)
- G.affecting << "\red You suddenly feel the grip around your neck being loosened!"
- visible_message("\red [src] suddenly loosens it's grip!")
- G.killing = 0
- G.state = 1
- return
-
- //
- if(allow_escape)
- allow_escape = 0
- if(G)
- G.affecting << "\red You suddenly feel the grip around your neck being loosened!"
- visible_message("\red [src] suddenly loosens it's grip!")
- G.killing = 0
- G.state = 1
- if(!observed)
- Escape()
- observed = 1
-
- //can't do anything in space at all
- if(istype(get_turf(src), /turf/space) || hibernate)
- return
-
- for(var/mob/living/M in view(7, src))
- if(M.stat || M == src)
- continue
- var/xdif = M.x - src.x
- var/ydif = M.y - src.y
- if(abs(xdif) < abs(ydif))
- //mob is either above or below src
- if(ydif < 0 && M.dir == NORTH)
- //mob is below src and looking up
- observed = 1
- break
- else if(ydif > 0 && M.dir == SOUTH)
- //mob is above src and looking down
- observed = 1
- break
- else if(abs(xdif) > abs(ydif))
- //mob is either left or right of src
- if(xdif < 0 && M.dir == EAST)
- //mob is to the left of src and looking right
- observed = 1
- break
- else if(xdif > 0 && M.dir == WEST)
- //mob is to the right of src and looking left
- observed = 1
- break
- else if (xdif == 0 && ydif == 0)
- //mob is on the same tile as src
- observed = 1
- break
-
- //account for darkness
- var/turf/T = get_turf(src)
- var/in_darkness = 0
- if(T.luminosity == 0 && !istype(T, /turf/simulated))
- in_darkness = 1
-
- //see if we're able to do stuff
- if(!observed || in_darkness)
- if(G)
- if(prob(random_escape_chance))
- //chance to allow the stranglee to escape
- allow_escape = 1
- if(G.affecting.stat == 2)
- del G
- else if(!G)
- //see if we're able to strangle anyone
- var/turf/myTurf = get_turf(src)
- for(var/mob/living/M in myTurf)
- GrabMob(M)
- if(G)
- break
-
- //find out what mobs we can see
- var/list/incapacitated = list()
- var/list/conscious = list()
- for(var/mob/living/carbon/M in view(7, src))
- //this may not be quite the right test
- if(M == src)
- continue
- if(M.stat == 1)
- incapacitated.Add(M)
- else if(!M.stat)
- conscious.Add(M)
-
- //pick the nearest valid conscious target
- var/mob/living/carbon/target_mob
- for(var/mob/living/carbon/M in conscious)
- if(!target_mob || get_dist(src, M) < get_dist(src, target_mob))
- target_mob = M
-
- if(!target_mob)
- //get an unconscious mob
- for(var/mob/living/carbon/M in incapacitated)
- if(!target_mob || get_dist(src, M) < get_dist(src, target_mob))
- target_mob = M
- if(target_mob)
- var/turf/target_turf
- if(in_darkness)
- //move to right behind them
- target_turf = get_step(target_mob, src)
- else
- //move to them really really fast and knock them down
- target_turf = get_turf(target_mob)
-
- //rampage along a path to get to them, in the blink of an eye
- var/turf/next_turf = get_step_towards(src, target_mob)
- var/num_turfs = get_dist(src,target_mob)
- while(get_turf(src) != target_turf && num_turfs > 0)
- for(var/obj/structure/window/W in next_turf)
- W.ex_act(2)
- for(var/obj/structure/table/O in next_turf)
- O.ex_act(1)
- for(var/obj/structure/grille/G in next_turf)
- G.ex_act(1)
- if(!next_turf.CanPass(src, next_turf))
- break
- src.loc = next_turf
- src.set_dir(get_dir(src, target_mob))
- next_turf = get_step(src, get_dir(next_turf,target_mob))
- num_turfs--
-
- //if we reached them, knock them down and start strangling them
- if(get_turf(src) == target_turf)
- target_mob.Stun(1)
- target_mob.Paralyse(1)
- GrabMob(target_mob)
-
- //if we're not strangling anyone, take a stroll
- if(!G && prob(10))
- var/list/turfs = new/list()
- for(var/turf/thisturf in view(7,src))
- if(istype(thisturf, /turf/space))
- continue
- else if(istype(thisturf, /turf/simulated/wall))
- continue
- else if(istype(thisturf, /turf/simulated/mineral))
- continue
- else if(istype(thisturf, /turf/simulated/shuttle/wall))
- continue
- else if(istype(thisturf, /turf/unsimulated/wall))
- continue
- turfs += thisturf
- var/turf/target_turf = pick(turfs)
-
- //rampage along a path to get to it, in the blink of an eye
- var/turf/next_turf = get_step_towards(src, target_turf)
- var/num_turfs = get_dist(src,target_turf)
- while(get_turf(src) != target_turf && num_turfs > 0)
- for(var/obj/structure/window/W in next_turf)
- W.ex_act(2)
- for(var/obj/structure/table/O in next_turf)
- O.ex_act(1)
- for(var/obj/structure/grille/G in next_turf)
- G.ex_act(1)
- if(!next_turf.CanPass(src, next_turf))
- break
- src.loc = next_turf
- src.set_dir(get_dir(src, target_mob))
- next_turf = get_step(src, get_dir(next_turf,target_turf))
- num_turfs--
- else if(G)
- //we can't move while observed, so we can't effectively strangle any more
- //our grip is still rock solid, but the victim has a chance to escape
- G.affecting << "\red You suddenly feel the grip around your neck being loosened!"
- visible_message("\red [src] suddenly loosens it's grip!")
- G.state = 1
- G.killing = 0
-
-/mob/living/simple_animal/sculpture/attackby(var/obj/item/O as obj, var/mob/user as mob)
- ..()
-
-/mob/living/simple_animal/sculpture/Topic(href, href_list)
- ..()
-
-/mob/living/simple_animal/sculpture/Bump(atom/movable/AM as mob, yes)
- if(!G)
- GrabMob(AM)
-
-/mob/living/simple_animal/sculpture/Bumped(atom/movable/AM as mob, yes)
- if(!G)
- GrabMob(AM)
-
-/mob/living/simple_animal/sculpture/ex_act(var/severity)
- //nothing
\ No newline at end of file
diff --git a/code/WorkInProgress/Cael_Aislinn/unknown.dmi b/code/WorkInProgress/Cael_Aislinn/unknown.dmi
deleted file mode 100644
index e254c10197..0000000000
Binary files a/code/WorkInProgress/Cael_Aislinn/unknown.dmi and /dev/null differ
diff --git a/code/WorkInProgress/Cib/amorph/amorph.dm b/code/WorkInProgress/Cib/amorph/amorph.dm
deleted file mode 100644
index dd1a678f47..0000000000
--- a/code/WorkInProgress/Cib/amorph/amorph.dm
+++ /dev/null
@@ -1,590 +0,0 @@
-/mob/living/carbon/amorph
- name = "amorph"
- real_name = "amorph"
- voice_name = "amorph"
- icon = 'icons/mob/amorph.dmi'
- icon_state = ""
-
-
- var/species = "Amorph"
- age = 30.0
-
- var/used_skillpoints = 0
- var/skill_specialization = null
- var/list/skills = null
-
- var/obj/item/l_ear = null
-
- // might use this later to recolor armorphs with icon.SwapColor
- var/slime_color = null
-
- var/examine_text = ""
-
-
-/mob/living/carbon/amorph/New()
-
- ..()
-
- // Amorphs don't have a blood vessel, but they can have reagents in their body
- var/datum/reagents/R = new/datum/reagents(1000)
- reagents = R
- R.my_atom = src
-
- // Amorphs have no DNA(they're more like carbon-based machines)
-
- // Amorphs don't have organs
- ..()
-
-/mob/living/carbon/amorph/Bump(atom/movable/AM as mob|obj, yes)
- if ((!( yes ) || now_pushing))
- return
- now_pushing = 1
- if (ismob(AM))
- var/mob/tmob = AM
-
-//BubbleWrap - Should stop you pushing a restrained person out of the way
-
- if(istype(tmob, /mob/living/carbon/human))
-
- for(var/mob/M in range(tmob, 1))
- if( ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
- if ( !(world.time % 5) )
- src << "\red [tmob] is restrained, you cannot push past"
- now_pushing = 0
- return
- if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
- if ( !(world.time % 5) )
- src << "\red [tmob] is restraining [M], you cannot push past"
- now_pushing = 0
- return
-
- //BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
- if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
- var/turf/oldloc = loc
- loc = tmob.loc
- tmob.loc = oldloc
- now_pushing = 0
- for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
- if(Metroid.Victim == tmob)
- Metroid.UpdateFeed()
- return
-
- if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
- if(prob(99))
- now_pushing = 0
- return
- if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
- if(prob(99))
- now_pushing = 0
- return
- if(tmob.nopush)
- now_pushing = 0
- return
-
- tmob.LAssailant = src
-
- now_pushing = 0
- spawn(0)
- ..()
- if (!istype(AM, /atom/movable))
- return
- if (!now_pushing)
- now_pushing = 1
-
- if (!AM.anchored)
- var/t = get_dir(src, AM)
- if (istype(AM, /obj/structure/window))
- if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
- for(var/obj/structure/window/win in get_step(AM,t))
- now_pushing = 0
- return
- step(AM, t)
- now_pushing = 0
- return
- return
-
-/mob/living/carbon/amorph/movement_delay()
- var/tally = 2 // amorphs are a bit slower than humans
- var/mob/M = pulling
-
- if(reagents.has_reagent("hyperzine")) return -1
-
- if(reagents.has_reagent("nuka_cola")) return -1
-
- if(analgesic) return -1
-
- if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
-
- var/health_deficiency = traumatic_shock
- if(health_deficiency >= 40) tally += (health_deficiency / 25)
-
- var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
- if (hungry >= 70) tally += hungry/300
-
- if (bodytemperature < 283.222)
- tally += (283.222 - bodytemperature) / 10 * 1.75
- if (stuttering < 10)
- stuttering = 10
-
- if(shock_stage >= 10) tally += 3
-
- if(tally < 0)
- tally = 0
-
- if(istype(M) && M.lying) //Pulling lying down people is slower
- tally += 3
-
- if(mRun in mutations)
- tally = 0
-
- return tally
-
-/mob/living/carbon/amorph/Stat()
- ..()
- statpanel("Status")
-
- stat(null, "Intent: [a_intent]")
- stat(null, "Move Mode: [m_intent]")
- if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
- if(ticker.mode:malf_mode_declared)
- stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
- if(emergency_shuttle)
- if(emergency_shuttle.online && emergency_shuttle.location < 2)
- var/timeleft = emergency_shuttle.timeleft()
- if (timeleft)
- stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
-
- if (client.statpanel == "Status")
- if (internal)
- if (!internal.air_contents)
- del(internal)
- else
- stat("Internal Atmosphere Info", internal.name)
- stat("Tank Pressure", internal.air_contents.return_pressure())
- stat("Distribution Pressure", internal.distribute_pressure)
- if (mind)
- if (mind.special_role == "Changeling" && changeling)
- stat("Chemical Storage", changeling.chem_charges)
- stat("Genetic Damage Time", changeling.geneticdamage)
-
-/mob/living/carbon/amorph/ex_act(severity)
- flick("flash", flash)
-
- var/shielded = 0
- var/b_loss = null
- var/f_loss = null
- switch (severity)
- if (1.0)
- b_loss += 500
- if (!prob(getarmor(null, "bomb")))
- gib()
- return
- else
- var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
- throw_at(target, 200, 4)
-
- if (2.0)
- if (!shielded)
- b_loss += 60
-
- f_loss += 60
-
- if (!prob(getarmor(null, "bomb")))
- b_loss = b_loss/1.5
- f_loss = f_loss/1.5
-
- if(3.0)
- b_loss += 30
- if (!prob(getarmor(null, "bomb")))
- b_loss = b_loss/2
- if (prob(50) && !shielded)
- Paralyse(10)
-
- src.bruteloss += b_loss
- src.fireloss += f_loss
-
- UpdateDamageIcon()
-
-
-/mob/living/carbon/amorph/blob_act()
- if(stat == 2) return
- show_message("\red The blob attacks you!")
- src.bruteloss += rand(30,40)
- UpdateDamageIcon()
- return
-
-/mob/living/carbon/amorph/u_equip(obj/item/W as obj)
- // These are the only slots an amorph has
- if (W == l_ear)
- l_ear = null
- else if (W == r_hand)
- r_hand = null
-
- update_clothing()
-
-/mob/living/carbon/amorph/db_click(text, t1)
- var/obj/item/W = equipped()
- var/emptyHand = (W == null)
- if ((!emptyHand) && (!istype(W, /obj/item)))
- return
- if (emptyHand)
- usr.next_move = usr.prev_move
- usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
- switch(text)
- if("l_ear")
- if (l_ear)
- if (emptyHand)
- l_ear.DblClick()
- return
- else if(emptyHand)
- return
- if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ) && W.w_class != 1)
- return
- u_equip(W)
- l_ear = W
- W.equipped(src, text)
-
- update_clothing()
-
- return
-
-/mob/living/carbon/amorph/meteorhit(O as obj)
- for(var/mob/M in viewers(src, null))
- if ((M.client && !( M.blinded )))
- M.show_message(text("\red [] has been hit by []", src, O), 1)
- if (health > 0)
- if (istype(O, /obj/effect/immovablerod))
- src.bruteloss += 101
- else
- src.bruteloss += 25
- UpdateDamageIcon()
- updatehealth()
- return
-
-/mob/living/carbon/amorph/Move(a, b, flag)
-
- if (buckled)
- return
-
- if (restrained())
- pulling = null
-
-
- var/t7 = 1
- if (restrained())
- for(var/mob/M in range(src, 1))
- if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
- t7 = null
- if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
- var/turf/T = loc
- . = ..()
-
- if (pulling && pulling.loc)
- if(!( isturf(pulling.loc) ))
- pulling = null
- return
- else
- if(Debug)
- diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
- diary <<"REPORT THIS"
-
- /////
- if(pulling && pulling.anchored)
- pulling = null
- return
-
- if (!restrained())
- var/diag = get_dir(src, pulling)
- if ((diag - 1) & diag)
- else
- diag = null
- if ((get_dist(src, pulling) > 1 || diag))
- if (ismob(pulling))
- var/mob/M = pulling
- var/ok = 1
- if (locate(/obj/item/weapon/grab, M.grabbed_by))
- if (prob(75))
- var/obj/item/weapon/grab/G = pick(M.grabbed_by)
- if (istype(G, /obj/item/weapon/grab))
- for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
- //G = null
- del(G)
- else
- ok = 0
- if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
- ok = 0
- if (ok)
- var/t = M.pulling
- M.pulling = null
-
- //this is the gay blood on floor shit -- Added back -- Skie
- if (M.lying && (prob(M.getBruteLoss() / 6)))
- var/turf/location = M.loc
- if (istype(location, /turf/simulated))
- location.add_blood(M)
- if(ishuman(M))
- var/mob/living/carbon/H = M
- var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
- if(blood_volume > 0)
- H:vessel.remove_reagent("blood",1)
- if(prob(5))
- M.adjustBruteLoss(1)
- visible_message("\red \The [M]'s wounds open more from being dragged!")
- if(M.pull_damage())
- if(prob(25))
- M.adjustBruteLoss(2)
- visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
- var/turf/location = M.loc
- if (istype(location, /turf/simulated))
- location.add_blood(M)
- if(ishuman(M))
- var/mob/living/carbon/H = M
- var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
- if(blood_volume > 0)
- H:vessel.remove_reagent("blood",1)
-
- step(pulling, get_dir(pulling.loc, T))
- M.pulling = t
- else
- if (pulling)
- if (istype(pulling, /obj/structure/window))
- if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
- for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
- pulling = null
- if (pulling)
- step(pulling, get_dir(pulling.loc, T))
- else
- pulling = null
- . = ..()
- if ((s_active && !( s_active in contents ) ))
- s_active.close(src)
-
- for(var/mob/living/carbon/metroid/M in view(1,src))
- M.UpdateFeed(src)
- return
-
-/mob/living/carbon/amorph/proc/misc_clothing_updates()
- // Temporary proc to shove stuff in that was put into update_clothing()
- // for questionable reasons
-
- if (client)
- if (i_select)
- if (intent)
- client.screen += hud_used.intents
-
- var/list/L = dd_text2list(intent, ",")
- L[1] += ":-11"
- i_select.screen_loc = dd_list2text(L,",") //ICONS4
- else
- i_select.screen_loc = null
- if (m_select)
- if (m_int)
- client.screen += hud_used.mov_int
-
- var/list/L = dd_text2list(m_int, ",")
- L[1] += ":-11"
- m_select.screen_loc = dd_list2text(L,",") //ICONS4
- else
- m_select.screen_loc = null
-
- // Probably a lazy way to make sure all items are on the screen exactly once
- if (client)
- client.screen -= contents
- client.screen += contents
-
-/mob/living/carbon/amorph/rebuild_appearance()
- // Lazy method: Just rebuild everything.
- // This can be called when the mob is created, but on other occasions, rebuild_body_overlays(),
- // rebuild_clothing_overlays() etc. should be called individually.
-
- misc_clothing_updates() // silly stuff
-
-/mob/living/carbon/amorph/update_body_appearance()
- // Should be called whenever something about the body appearance itself changes.
-
- misc_clothing_updates() // silly stuff
-
- if(lying)
- icon_state = "lying"
- else
- icon_state = "standing"
-
-/mob/living/carbon/amorph/update_lying()
- // Should be called whenever something about the lying status of the mob might have changed.
-
- if(lying)
- icon_state = "lying"
- else
- icon_state = "standing"
-
-/mob/living/carbon/amorph/hand_p(mob/M as mob)
- // not even sure what this is meant to do
- return
-
-/mob/living/carbon/amorph/restrained()
- if (handcuffed)
- return 0 // handcuffs don't work on amorphs
- return 0
-
-/mob/living/carbon/amorph/var/co2overloadtime = null
-/mob/living/carbon/amorph/var/temperature_resistance = T0C+75
-
-/mob/living/carbon/amorph/show_inv(mob/user as mob)
- // TODO: add a window for extracting stuff from an amorph's mouth
-
-// called when something steps onto an amorph
-// this could be made more general, but for now just handle mulebot
-/mob/living/carbon/amorph/HasEntered(var/atom/movable/AM)
- var/obj/machinery/bot/mulebot/MB = AM
- if(istype(MB))
- MB.RunOver(src)
-
-//gets assignment from ID or ID inside PDA or PDA itself
-//Useful when player do something with computers
-/mob/living/carbon/amorph/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job")
- // TODO: get the ID from the amorph's contents
- return
-
-//gets name from ID or ID inside PDA or PDA itself
-//Useful when player do something with computers
-/mob/living/carbon/amorph/proc/get_authentification_name(var/if_no_id = "Unknown")
- // TODO: get the ID from the amorph's contents
- return
-
-//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
-/mob/living/carbon/amorph/proc/get_visible_name()
- // amorphs can't wear clothes or anything, so always return face_name
- return get_face_name()
-
-//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
-/mob/living/carbon/amorph/proc/get_face_name()
- // there might later be ways for amorphs to change the appearance of their face
- return "[real_name]"
-
-
-//gets ID card object from special clothes slot or null.
-/mob/living/carbon/amorph/proc/get_idcard()
- // TODO: get the ID from the amorph's contents
-
-
-// heal the amorph
-/mob/living/carbon/amorph/heal_overall_damage(var/brute, var/burn)
- bruteloss -= brute
- fireloss -= burn
- bruteloss = max(bruteloss, 0)
- fireloss = max(fireloss, 0)
-
- updatehealth()
- UpdateDamageIcon()
-
-// damage MANY external organs, in random order
-/mob/living/carbon/amorph/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
- bruteloss += brute
- fireloss += burn
-
- updatehealth()
- UpdateDamageIcon()
-
-/mob/living/carbon/amorph/Topic(href, href_list)
- if (href_list["refresh"])
- if((machine)&&(in_range(src, usr)))
- show_inv(machine)
-
- if (href_list["mach_close"])
- var/t1 = text("window=[]", href_list["mach_close"])
- machine = null
- src << browse(null, t1)
-
- if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
- var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
- O.source = usr
- O.target = src
- O.item = usr.equipped()
- O.s_loc = usr.loc
- O.t_loc = loc
- O.place = href_list["item"]
- if(href_list["loc"])
- O.internalloc = href_list["loc"]
- requests += O
- spawn( 0 )
- O.process()
- return
-
- if (href_list["criminal"])
- if(istype(usr, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = usr
- if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
- var/perpname = "wot"
- var/modified = 0
-
- /*if(wear_id)
- if(istype(wear_id,/obj/item/weapon/card/id))
- perpname = wear_id:registered_name
- else if(istype(wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/tempPda = wear_id
- perpname = tempPda.owner
- else*/
- perpname = src.name
-
- for (var/datum/data/record/E in data_core.general)
- if (E.fields["name"] == perpname)
- for (var/datum/data/record/R in data_core.security)
- if (R.fields["id"] == E.fields["id"])
-
- var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
-
- if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
- if(setcriminal != "Cancel")
- R.fields["criminal"] = setcriminal
- modified = 1
-
- spawn()
- H.handle_regular_hud_updates()
-
- if(!modified)
- usr << "\red Unable to locate a data core entry for this person."
- ..()
- return
-
-
-///eyecheck()
-///Returns a number between -1 to 2
-/mob/living/carbon/amorph/eyecheck()
- return 1
-
-
-/mob/living/carbon/amorph/IsAdvancedToolUser()
- return 1//Amorphs can use guns and such
-
-
-/mob/living/carbon/amorph/updatehealth()
- if(src.nodamage)
- src.health = 100
- src.stat = 0
- return
- src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
- return
-
-/mob/living/carbon/amorph/abiotic(var/full_body = 0)
- return 0
-
-/mob/living/carbon/amorph/abiotic2(var/full_body2 = 0)
- return 0
-
-/mob/living/carbon/amorph/getBruteLoss()
- return src.bruteloss
-
-/mob/living/carbon/amorph/adjustBruteLoss(var/amount, var/used_weapon = null)
- src.bruteloss += amount
- if(bruteloss < 0) bruteloss = 0
-
-/mob/living/carbon/amorph/getFireLoss()
- return src.fireloss
-
-/mob/living/carbon/amorph/adjustFireLoss(var/amount,var/used_weapon = null)
- src.fireloss += amount
- if(fireloss < 0) fireloss = 0
-
-/mob/living/carbon/amorph/get_visible_gender()
- return gender
diff --git a/code/WorkInProgress/Cib/amorph/amorph_attack.dm b/code/WorkInProgress/Cib/amorph/amorph_attack.dm
deleted file mode 100644
index 814b977d1a..0000000000
--- a/code/WorkInProgress/Cib/amorph/amorph_attack.dm
+++ /dev/null
@@ -1,246 +0,0 @@
-
-
-/mob/living/carbon/amorph/attack_paw(mob/living/carbon/monkey/M as mob)
- if (!ticker)
- M << "You cannot attack people before the game has started."
- return
-
- ..()
-
- switch(M.a_intent)
-
- if ("help")
- help_shake_act(M)
- else
- if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
- return
- if (health > 0)
- attacked += 10
- playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [M.name] has bit [src]!"), 1)
- adjustBruteLoss(rand(0, 1))
- updatehealth()
- return
-
-/mob/living/carbon/amorph/attack_hand(mob/living/carbon/human/M as mob)
-
- if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
- var/obj/item/clothing/gloves/G = M.gloves
- if(G.cell)
- if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
- if(G.cell.charge >= 2500)
- G.cell.charge -= 2500
- Weaken(5)
- if (stuttering < 5)
- stuttering = 5
- Stun(5)
-
- for(var/mob/O in viewers(src, null))
- if (O.client)
- O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall", 2)
- return
- else
- M << "\red Not enough charge! "
- return
-
- if (M.a_intent == "help")
- help_shake_act(M)
- else
- if (M.a_intent == "hurt")
- var/attack_verb
- switch(M.mutantrace)
- if("lizard")
- attack_verb = "scratch"
- if("plant")
- attack_verb = "slash"
- else
- attack_verb = "punch"
-
- if(M.type == /mob/living/carbon/human/tajaran)
- attack_verb = "slash"
-
- if ((prob(75) && health > 0))
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has [attack_verb]ed [name]!", M), 1)
-
- var/damage = rand(5, 10)
- if(M.type != /mob/living/carbon/human/tajaran)
- playsound(loc, "punch", 25, 1, -1)
- else if(M.type == /mob/living/carbon/human/tajaran)
- damage += 10
- playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
- adjustBruteLoss(damage/10)
- updatehealth()
- else
- if(M.type != /mob/living/carbon/human/tajaran)
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
- else if(M.type == /mob/living/carbon/human/tajaran)
- playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has attempted to [attack_verb] [name]!", M), 1)
- else
- if (M.a_intent == "grab")
- if (M == src)
- return
-
- var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
- G.assailant = M
- if (M.hand)
- M.l_hand = G
- else
- M.r_hand = G
- G.layer = 20
- G.affecting = src
- G.synch()
-
- LAssailant = M
-
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
- for(var/mob/O in viewers(src, null))
- O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
-
- else
- if (!( paralysis ))
- drop_item()
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has disarmed [name]!", M), 1)
- return
-
-
-
-/mob/living/carbon/amorph/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
-
- switch(M.a_intent)
- if ("help")
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
-
- if ("hurt")
- if ((prob(95) && health > 0))
- playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
- var/damage = rand(15, 30)
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has slashed [name]!", M), 1)
- adjustBruteLoss(damage/10)
- updatehealth()
- react_to_attack(M)
- else
- playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has attempted to lunge at [name]!", M), 1)
-
- if ("grab")
- if (M == src)
- return
- var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
- G.assailant = M
- if (M.hand)
- M.l_hand = G
- else
- M.r_hand = G
- G.layer = 20
- G.affecting = src
- G.synch()
-
- LAssailant = M
-
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
- for(var/mob/O in viewers(src, null))
- O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
-
- if ("disarm")
- playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
- var/damage = 5
- if(prob(95))
- Weaken(rand(10,15))
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has tackled down [name]!", M), 1)
- else
- drop_item()
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red [] has disarmed [name]!", M), 1)
- adjustBruteLoss(damage)
- react_to_attack(M)
- updatehealth()
- return
-
-
-
-/mob/living/carbon/amorph/attack_animal(mob/living/simple_animal/M as mob)
- if(M.melee_damage_upper == 0)
- M.emote("[M.friendly] [src]")
- else
- for(var/mob/O in viewers(src, null))
- O.show_message("\red [M] [M.attacktext] [src]!", 1)
- var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
- bruteloss += damage
-
-/mob/living/carbon/amorph/attack_metroid(mob/living/carbon/metroid/M as mob)
- if(M.Victim) return // can't attack while eating!
-
- if (health > -100)
-
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red The [M.name] has [pick("bit","slashed")] []!", src), 1)
-
- var/damage = rand(1, 3)
-
- if(istype(M, /mob/living/carbon/metroid/adult))
- damage = rand(10, 35)
- else
- damage = rand(5, 25)
-
- src.cloneloss += damage
-
- UpdateDamageIcon()
-
-
- if(M.powerlevel > 0)
- var/stunprob = 10
- var/power = M.powerlevel + rand(0,3)
-
- switch(M.powerlevel)
- if(1 to 2) stunprob = 20
- if(3 to 4) stunprob = 30
- if(5 to 6) stunprob = 40
- if(7 to 8) stunprob = 60
- if(9) stunprob = 70
- if(10) stunprob = 95
-
- if(prob(stunprob))
- M.powerlevel -= 3
- if(M.powerlevel < 0)
- M.powerlevel = 0
-
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O.show_message(text("\red The [M.name] has shocked []!", src), 1)
-
- Weaken(power)
- if (stuttering < power)
- stuttering = power
- Stun(power)
-
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
-
- if (prob(stunprob) && M.powerlevel >= 8)
- adjustFireLoss(M.powerlevel * rand(6,10))
-
-
- updatehealth()
-
- return
diff --git a/code/WorkInProgress/Cib/amorph/amorph_damage.dm b/code/WorkInProgress/Cib/amorph/amorph_damage.dm
deleted file mode 100644
index d49d679069..0000000000
--- a/code/WorkInProgress/Cib/amorph/amorph_damage.dm
+++ /dev/null
@@ -1,12 +0,0 @@
-/mob/living/carbon/amorph/proc/HealDamage(zone, brute, burn)
- return heal_overall_damage(brute, burn)
-
-/mob/living/carbon/amorph/UpdateDamageIcon()
- // no damage sprites for amorphs yet
- return
-
-/mob/living/carbon/amorph/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
- if(damagetype == BRUTE)
- take_overall_damage(damage, 0)
- else
- take_overall_damage(0, damage)
\ No newline at end of file
diff --git a/code/WorkInProgress/Cib/amorph/amorph_hud.dm b/code/WorkInProgress/Cib/amorph/amorph_hud.dm
deleted file mode 100644
index 41a3adc9f5..0000000000
--- a/code/WorkInProgress/Cib/amorph/amorph_hud.dm
+++ /dev/null
@@ -1,318 +0,0 @@
-/obj/hud/proc/amorph_hud(var/ui_style='icons/mob/screen1_old.dmi')
-
- src.adding = list( )
- src.other = list( )
- src.intents = list( )
- src.mon_blo = list( )
- src.m_ints = list( )
- src.mov_int = list( )
- src.vimpaired = list( )
- src.darkMask = list( )
- src.intent_small_hud_objects = list( )
-
- src.g_dither = new /obj/screen( src )
- src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
- src.g_dither.name = "Mask"
- src.g_dither.icon = ui_style
- src.g_dither.icon_state = "dither12g"
- src.g_dither.layer = 18
- src.g_dither.mouse_opacity = 0
-
- src.alien_view = new /obj/screen(src)
- src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
- src.alien_view.name = "Alien"
- src.alien_view.icon = ui_style
- src.alien_view.icon_state = "alien"
- src.alien_view.layer = 18
- src.alien_view.mouse_opacity = 0
-
- src.blurry = new /obj/screen( src )
- src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
- src.blurry.name = "Blurry"
- src.blurry.icon = ui_style
- src.blurry.icon_state = "blurry"
- src.blurry.layer = 17
- src.blurry.mouse_opacity = 0
-
- src.druggy = new /obj/screen( src )
- src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
- src.druggy.name = "Druggy"
- src.druggy.icon = ui_style
- src.druggy.icon_state = "druggy"
- src.druggy.layer = 17
- src.druggy.mouse_opacity = 0
-
- var/obj/screen/using
-
- using = new /obj/screen( src )
- using.name = "act_intent"
- using.set_dir(SOUTHWEST)
- using.icon = ui_style
- using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
- using.screen_loc = ui_acti
- using.layer = 20
- src.adding += using
- action_intent = using
-
-//intent small hud objects
- var/icon/ico
-
- ico = new(ui_style, "black")
- ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
- ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
- using = new /obj/screen( src )
- using.name = "help"
- using.icon = ico
- using.screen_loc = ui_acti
- using.layer = 21
- src.adding += using
- help_intent = using
-
- ico = new(ui_style, "black")
- ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
- ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
- using = new /obj/screen( src )
- using.name = "disarm"
- using.icon = ico
- using.screen_loc = ui_acti
- using.layer = 21
- src.adding += using
- disarm_intent = using
-
- ico = new(ui_style, "black")
- ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
- ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
- using = new /obj/screen( src )
- using.name = "grab"
- using.icon = ico
- using.screen_loc = ui_acti
- using.layer = 21
- src.adding += using
- grab_intent = using
-
- ico = new(ui_style, "black")
- ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
- ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
- using = new /obj/screen( src )
- using.name = "harm"
- using.icon = ico
- using.screen_loc = ui_acti
- using.layer = 21
- src.adding += using
- hurt_intent = using
-
-//end intent small hud objects
-
- using = new /obj/screen( src )
- using.name = "mov_intent"
- using.set_dir(SOUTHWEST)
- using.icon = ui_style
- using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
- using.screen_loc = ui_movi
- using.layer = 20
- src.adding += using
- move_intent = using
-
- using = new /obj/screen( src )
- using.name = "drop"
- using.icon = ui_style
- using.icon_state = "act_drop"
- using.screen_loc = ui_dropbutton
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "r_hand"
- 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
- using.icon_state = "hand_active"
- using.screen_loc = ui_rhand
- using.layer = 19
- src.r_hand_hud_object = using
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "l_hand"
- 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
- using.icon_state = "hand_active"
- using.screen_loc = ui_lhand
- using.layer = 19
- src.l_hand_hud_object = using
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "hand"
- using.set_dir(SOUTH)
- using.icon = ui_style
- using.icon_state = "hand1"
- using.screen_loc = ui_swaphand1
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "hand"
- using.set_dir(SOUTH)
- using.icon = ui_style
- using.icon_state = "hand2"
- using.screen_loc = ui_swaphand2
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "mask"
- using.set_dir(NORTH)
- using.icon = ui_style
- using.icon_state = "equip"
- using.screen_loc = ui_monkey_mask
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = "back"
- using.set_dir(NORTHEAST)
- using.icon = ui_style
- using.icon_state = "equip"
- using.screen_loc = ui_back
- using.layer = 19
- src.adding += using
-
- using = new /obj/screen( src )
- using.name = null
- using.icon = ui_style
- using.icon_state = "dither50"
- using.screen_loc = "1,1 to 5,15"
- using.layer = 17
- using.mouse_opacity = 0
- src.vimpaired += using
- using = new /obj/screen( src )
- using.name = null
- using.icon = ui_style
- using.icon_state = "dither50"
- using.screen_loc = "5,1 to 10,5"
- using.layer = 17
- using.mouse_opacity = 0
- src.vimpaired += using
- using = new /obj/screen( src )
- using.name = null
- using.icon = ui_style
- using.icon_state = "dither50"
- using.screen_loc = "6,11 to 10,15"
- using.layer = 17
- using.mouse_opacity = 0
- src.vimpaired += using
- using = new /obj/screen( src )
- using.name = null
- using.icon = ui_style
- using.icon_state = "dither50"
- using.screen_loc = "11,1 to 15,15"
- using.layer = 17
- using.mouse_opacity = 0
- src.vimpaired += using
-
- mymob.throw_icon = new /obj/screen(null)
- mymob.throw_icon.icon = ui_style
- mymob.throw_icon.icon_state = "act_throw_off"
- mymob.throw_icon.name = "throw"
- mymob.throw_icon.screen_loc = ui_throw
-
- mymob.oxygen = new /obj/screen( null )
- mymob.oxygen.icon = ui_style
- mymob.oxygen.icon_state = "oxy0"
- mymob.oxygen.name = "oxygen"
- mymob.oxygen.screen_loc = ui_oxygen
-
- mymob.pressure = new /obj/screen( null )
- mymob.pressure.icon = ui_style
- mymob.pressure.icon_state = "pressure0"
- mymob.pressure.name = "pressure"
- mymob.pressure.screen_loc = ui_pressure
-
- mymob.toxin = new /obj/screen( null )
- mymob.toxin.icon = ui_style
- mymob.toxin.icon_state = "tox0"
- mymob.toxin.name = "toxin"
- mymob.toxin.screen_loc = ui_toxin
-
- mymob.internals = new /obj/screen( null )
- mymob.internals.icon = ui_style
- mymob.internals.icon_state = "internal0"
- mymob.internals.name = "internal"
- mymob.internals.screen_loc = ui_internal
-
- mymob.fire = new /obj/screen( null )
- mymob.fire.icon = ui_style
- mymob.fire.icon_state = "fire0"
- mymob.fire.name = "fire"
- mymob.fire.screen_loc = ui_fire
-
- mymob.bodytemp = new /obj/screen( null )
- mymob.bodytemp.icon = ui_style
- mymob.bodytemp.icon_state = "temp1"
- mymob.bodytemp.name = "body temperature"
- mymob.bodytemp.screen_loc = ui_temp
-
- mymob.healths = new /obj/screen( null )
- mymob.healths.icon = ui_style
- mymob.healths.icon_state = "health0"
- mymob.healths.name = "health"
- mymob.healths.screen_loc = ui_health
-
- mymob.pullin = new /obj/screen( null )
- mymob.pullin.icon = ui_style
- mymob.pullin.icon_state = "pull0"
- mymob.pullin.name = "pull"
- mymob.pullin.screen_loc = ui_pull
-
- mymob.blind = new /obj/screen( null )
- mymob.blind.icon = ui_style
- mymob.blind.icon_state = "blackanimate"
- mymob.blind.name = " "
- mymob.blind.screen_loc = "1,1 to 15,15"
- mymob.blind.layer = 0
- mymob.blind.mouse_opacity = 0
-
- mymob.flash = new /obj/screen( null )
- mymob.flash.icon = ui_style
- mymob.flash.icon_state = "blank"
- mymob.flash.name = "flash"
- mymob.flash.screen_loc = "1,1 to 15,15"
- mymob.flash.layer = 17
-
- mymob.zone_sel = new /obj/screen/zone_sel( null )
- mymob.zone_sel.overlays = null
- mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
-
- //Handle the gun settings buttons
- 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.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.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.set_dir(1)
- mymob.gun_run_icon = new /obj/screen/gun/run(null)
- if (mymob.client.target_can_run)
- mymob.gun_run_icon.set_dir(1)
- src.adding += mymob.gun_run_icon
- src.adding += mymob.gun_move_icon
-
- mymob.client.screen = null
-
- //, mymob.i_select, mymob.m_select
- mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
- mymob.client.screen += src.adding + src.other
-
- //if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
-
- return
diff --git a/code/WorkInProgress/Cib/amorph/life.dm b/code/WorkInProgress/Cib/amorph/life.dm
deleted file mode 100644
index 1d254e5768..0000000000
--- a/code/WorkInProgress/Cib/amorph/life.dm
+++ /dev/null
@@ -1,516 +0,0 @@
-/mob/living/carbon/amorph
- var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
-
- var/oxygen_alert = 0
- var/phoron_alert = 0
- var/fire_alert = 0
-
- var/temperature_alert = 0
-
-
-/mob/living/carbon/amorph/Life()
- set invisibility = 0
- set background = 1
-
- if (src.monkeyizing)
- return
-
- ..()
-
- var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
- if(src.loc)
- environment = loc.return_air()
-
- if (src.stat != 2) //still breathing
-
- //First, resolve location and get a breath
-
- if(air_master.current_cycle%4==2)
- //Only try to take a breath every 4 seconds, unless suffocating
- breathe()
-
- else //Still give containing object the chance to interact
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- location_as_object.handle_internal_lifeform(src, 0)
-
- //Apparently, the person who wrote this code designed it so that
- //blinded get reset each cycle and then get activated later in the
- //code. Very ugly. I dont care. Moving this stuff here so its easy
- //to find it.
- src.blinded = null
-
- //Disease Check
- handle_virus_updates()
-
- //Handle temperature/pressure differences between body and environment
- if(environment) // More error checking -- TLE
- handle_environment(environment)
-
- //Mutations and radiation
- handle_mutations_and_radiation()
-
- //Chemicals in the body
- handle_chemicals_in_body()
-
- //Disabilities
- handle_disabilities()
-
- //Status updates, death etc.
-// UpdateLuminosity()
- handle_regular_status_updates()
-
- if(client)
- handle_regular_hud_updates()
-
- //Being buckled to a chair or bed
- check_if_buckled()
-
- // Yup.
- update_canmove()
-
- clamp_values()
-
- // Grabbing
- for(var/obj/item/weapon/grab/G in src)
- G.process()
-
-/mob/living/carbon/amorph
- proc
-
- clamp_values()
-
- AdjustStunned(0)
- AdjustParalysis(0)
- AdjustWeakened(0)
-
- handle_disabilities()
- if (src.disabilities & 4)
- if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
- src.drop_item()
- spawn( 0 )
- emote("cough")
- return
- if (src.disabilities & 8)
- if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
- Stun(10)
- spawn( 0 )
- emote("twitch")
- return
- if (src.disabilities & 16)
- if (prob(10))
- src.stuttering = max(10, src.stuttering)
-
- update_mind()
- if(!mind && client)
- mind = new
- mind.current = src
- mind.key = key
-
- handle_mutations_and_radiation()
- // amorphs are immune to this stuff
-
- breathe()
- if(src.reagents)
-
- if(src.reagents.has_reagent("lexorin")) return
-
- if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
-
- var/datum/gas_mixture/environment = loc.return_air()
- var/datum/gas_mixture/breath
-
- if(losebreath>0) //Suffocating so do not take a breath
- src.losebreath--
- if (prob(75)) //High chance of gasping for air
- spawn emote("gasp")
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- location_as_object.handle_internal_lifeform(src, 0)
- else
- //First, check for air from internal atmosphere (using an air tank and mask generally)
- breath = get_breath_from_internal(BREATH_VOLUME)
-
- //No breath from internal atmosphere so get breath from location
- if(!breath)
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
- else if(istype(loc, /turf/))
- var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
- breath = loc.remove_air(breath_moles)
-
- // Handle chem smoke effect -- Doohl
- var/block = 0
- if(wear_mask)
- if(istype(wear_mask, /obj/item/clothing/mask/gas))
- block = 1
-
- if(!block)
-
- for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
- if(smoke.reagents.total_volume)
- smoke.reagents.reaction(src, INGEST)
- spawn(5)
- if(smoke)
- smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
- break // If they breathe in the nasty stuff once, no need to continue checking
-
-
- else //Still give containing object the chance to interact
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- location_as_object.handle_internal_lifeform(src, 0)
-
- handle_breath(breath)
-
- if(breath)
- loc.assume_air(breath)
-
-
- get_breath_from_internal(volume_needed)
- if(internal)
- if (!contents.Find(src.internal))
- internal = null
- if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
- internal = null
- if(internal)
- if (src.internals)
- src.internals.icon_state = "internal1"
- return internal.remove_air_volume(volume_needed)
- else
- if (src.internals)
- src.internals.icon_state = "internal0"
- return null
-
- update_canmove()
- if(paralysis || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
- else canmove = 1
-
- handle_breath(datum/gas_mixture/breath)
- if(src.nodamage)
- return
-
- if(!breath || (breath.total_moles == 0))
- adjustOxyLoss(7)
-
- oxygen_alert = max(oxygen_alert, 1)
-
- return 0
-
- var/safe_oxygen_min = 8 // Minimum safe partial pressure of O2, in kPa
- //var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
- var/SA_para_min = 0.5
- var/SA_sleep_min = 5
- var/oxygen_used = 0
- var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
-
- //Partial pressure of the O2 in our breath
- var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
-
- if(O2_pp < safe_oxygen_min) // Too little oxygen
- if(prob(20))
- spawn(0) emote("gasp")
- if (O2_pp == 0)
- O2_pp = 0.01
- var/ratio = safe_oxygen_min/O2_pp
- adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
- oxygen_used = breath.oxygen*ratio/6
- oxygen_alert = max(oxygen_alert, 1)
- else // We're in safe limits
- adjustOxyLoss(-5)
- oxygen_used = breath.oxygen/6
- oxygen_alert = 0
-
- breath.oxygen -= oxygen_used
- breath.carbon_dioxide += oxygen_used
-
- if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
- for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
- var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
- if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
- Paralyse(3) // 3 gives them one second to wake up and run away a bit!
- if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
- src.sleeping = max(src.sleeping+2, 10)
- else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
- if(prob(20))
- spawn(0) emote(pick("giggle", "laugh"))
-
- return 1
-
- handle_environment(datum/gas_mixture/environment)
- if(!environment)
- return
- var/environment_heat_capacity = environment.heat_capacity()
- if(istype(loc, /turf/space))
- environment_heat_capacity = loc:heat_capacity
-
- if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
- var/transfer_coefficient
-
- transfer_coefficient = 1
- if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
- transfer_coefficient *= wear_mask.heat_transfer_coefficient
-
- handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
-
- if(stat==2)
- bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
-
- //Account for massive pressure differences
-
-
- var/pressure = environment.return_pressure()
-
- // if(!wear_suit) Monkies cannot into space.
- // if(!istype(wear_suit, /obj/item/clothing/suit/space))
-
- /*if(pressure < 20)
- if(prob(25))
- src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
- adjustBruteLoss(5)
- */
-
- if(pressure > HAZARD_HIGH_PRESSURE)
-
- adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
-
-
-
- return //TODO: DEFERRED
-
- handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
- if(src.nodamage) return
- var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
- if(exposed_temperature > bodytemperature)
- adjustFireLoss(20.0*discomfort)
-
- else
- adjustFireLoss(5.0*discomfort)
-
- handle_chemicals_in_body()
- // most chemicals will have no effect on amorphs
- //if(reagents) reagents.metabolize(src)
-
- if (src.drowsyness)
- src.drowsyness--
- src.eye_blurry = max(2, src.eye_blurry)
- if (prob(5))
- src.sleeping += 1
- Paralyse(5)
-
- confused = max(0, confused - 1)
- // decrement dizziness counter, clamped to 0
- if(resting)
- dizziness = max(0, dizziness - 5)
- else
- dizziness = max(0, dizziness - 1)
-
- src.updatehealth()
-
- return //TODO: DEFERRED
-
- handle_regular_status_updates()
-
- health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
-
- if(getOxyLoss() > 25) Paralyse(3)
-
- if(src.sleeping)
- Paralyse(5)
- if (prob(1) && health) spawn(0) emote("snore")
-
- if(src.resting)
- Weaken(5)
-
- if(health < config.health_threshold_dead && stat != 2)
- death()
- else if(src.health < config.health_threshold_crit)
- if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
-
- // shuffle around the chemical effects for amorphs a little ;)
- if(!src.reagents.has_reagent("antitoxin") && src.stat != 2) src.adjustOxyLoss(2)
-
- if(src.stat != 2) src.stat = 1
- Paralyse(5)
-
- if (src.stat != 2) //Alive.
-
- if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
- if (src.stunned > 0)
- AdjustStunned(-1)
- src.stat = 0
- if (src.weakened > 0)
- AdjustWeakened(-1)
- src.lying = 1
- src.stat = 0
- if (src.paralysis > 0)
- AdjustParalysis(-1)
- src.blinded = 1
- src.lying = 1
- src.stat = 1
- var/h = src.hand
- src.hand = 0
- drop_item()
- src.hand = 1
- drop_item()
- src.hand = h
-
- else //Not stunned.
- src.lying = 0
- src.stat = 0
-
- else //Dead.
- src.lying = 1
- src.blinded = 1
- src.stat = 2
-
- if (src.stuttering) src.stuttering--
- if (src.slurring) src.slurring--
-
- if (src.eye_blind)
- src.eye_blind--
- src.blinded = 1
-
- if (src.ear_deaf > 0) src.ear_deaf--
- if (src.ear_damage < 25)
- src.ear_damage -= 0.05
- src.ear_damage = max(src.ear_damage, 0)
-
- src.density = !( src.lying )
-
- if (src.disabilities & 128)
- src.blinded = 1
- if (src.disabilities & 32)
- src.ear_deaf = 1
-
- if (src.eye_blurry > 0)
- src.eye_blurry--
- src.eye_blurry = max(0, src.eye_blurry)
-
- if (src.druggy > 0)
- src.druggy--
- src.druggy = max(0, src.druggy)
-
- return 1
-
- handle_regular_hud_updates()
-
- if (src.stat == 2 || (XRAY in mutations))
- src.sight |= SEE_TURFS
- src.sight |= SEE_MOBS
- src.sight |= SEE_OBJS
- src.see_in_dark = 8
- src.see_invisible = 2
- else if (src.stat != 2)
- src.sight &= ~SEE_TURFS
- src.sight &= ~SEE_MOBS
- src.sight &= ~SEE_OBJS
- src.see_in_dark = 2
- src.see_invisible = 0
-
- if (src.sleep)
- src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
- src.sleep.overlays = null
- if(src.sleeping_willingly)
- src.sleep.overlays += icon(src.sleep.icon, "sleep_willing")
- if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
-
- if (src.healths)
- if (src.stat != 2)
- switch(health)
- if(100 to INFINITY)
- src.healths.icon_state = "health0"
- if(80 to 100)
- src.healths.icon_state = "health1"
- if(60 to 80)
- src.healths.icon_state = "health2"
- if(40 to 60)
- src.healths.icon_state = "health3"
- if(20 to 40)
- src.healths.icon_state = "health4"
- if(0 to 20)
- src.healths.icon_state = "health5"
- else
- src.healths.icon_state = "health6"
- else
- src.healths.icon_state = "health7"
-
- if (pressure)
- var/datum/gas_mixture/environment = loc.return_air()
- if(environment)
- switch(environment.return_pressure())
-
- if(HAZARD_HIGH_PRESSURE to INFINITY)
- pressure.icon_state = "pressure2"
- if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
- pressure.icon_state = "pressure1"
- if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
- pressure.icon_state = "pressure0"
- if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
- pressure.icon_state = "pressure-1"
- else
- pressure.icon_state = "pressure-2"
-
- if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
-
-
- if (src.toxin) src.toxin.icon_state = "tox[src.phoron_alert ? 1 : 0]"
- if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
- if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
- //NOTE: the alerts dont reset when youre out of danger. dont blame me,
- //blame the person who coded them. Temporary fix added.
-
- if(bodytemp)
- switch(src.bodytemperature) //310.055 optimal body temp
- if(345 to INFINITY)
- src.bodytemp.icon_state = "temp4"
- if(335 to 345)
- src.bodytemp.icon_state = "temp3"
- if(327 to 335)
- src.bodytemp.icon_state = "temp2"
- if(316 to 327)
- src.bodytemp.icon_state = "temp1"
- if(300 to 316)
- src.bodytemp.icon_state = "temp0"
- if(295 to 300)
- src.bodytemp.icon_state = "temp-1"
- if(280 to 295)
- src.bodytemp.icon_state = "temp-2"
- if(260 to 280)
- src.bodytemp.icon_state = "temp-3"
- else
- src.bodytemp.icon_state = "temp-4"
-
- src.client.screen -= src.hud_used.blurry
- src.client.screen -= src.hud_used.druggy
- src.client.screen -= src.hud_used.vimpaired
-
- if ((src.blind && src.stat != 2))
- if ((src.blinded))
- src.blind.layer = 18
- else
- src.blind.layer = 0
-
- if (src.disabilities & 1)
- src.client.screen += src.hud_used.vimpaired
-
- if (src.eye_blurry)
- src.client.screen += src.hud_used.blurry
-
- if (src.druggy)
- src.client.screen += src.hud_used.druggy
-
- if (src.stat != 2)
- if (src.machine)
- if (!( src.machine.check_eye(src) ))
- src.reset_view(null)
- else
- if(!client.adminobs)
- reset_view(null)
-
- return 1
-
- handle_virus_updates()
- // amorphs can't come down with human diseases
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/Cib/amorph/say.dm b/code/WorkInProgress/Cib/amorph/say.dm
deleted file mode 100644
index a73c9de5d3..0000000000
--- a/code/WorkInProgress/Cib/amorph/say.dm
+++ /dev/null
@@ -1,6 +0,0 @@
-/mob/living/carbon/amorph/emote(var/act,var/m_type=1,var/message = null)
- if(act == "me")
- return custom_emote(m_type, message)
-
-/mob/living/carbon/amorph/say_quote(var/text)
- return "[src.say_message], \"[text]\"";
diff --git a/code/WorkInProgress/Cib/meme.dm b/code/WorkInProgress/Cib/meme.dm
deleted file mode 100644
index cbd536da93..0000000000
--- a/code/WorkInProgress/Cib/meme.dm
+++ /dev/null
@@ -1,600 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
-
-// === MEMETIC ANOMALY ===
-// =======================
-
-/**
-This life form is a form of parasite that can gain a certain level of control
-over its host. Its player will share vision and hearing with the host, and it'll
-be able to influence the host through various commands.
-**/
-
-// The maximum amount of points a meme can gather.
-var/global/const/MAXIMUM_MEME_POINTS = 750
-
-
-// === PARASITE ===
-// ================
-
-// a list of all the parasites in the mob
-mob/living/carbon/var/list/parasites = list()
-
-mob/living/parasite
- var/mob/living/carbon/host // the host that this parasite occupies
-
- Login()
- ..()
-
- // make the client see through the host instead
- client.eye = host
- client.perspective = EYE_PERSPECTIVE
-
-
-mob/living/parasite/proc/enter_host(mob/living/carbon/host)
- // by default, parasites can't share a body with other life forms
- if(host.parasites.len > 0)
- return 0
-
- src.host = host
- src.loc = host
- host.parasites.Add(src)
-
- if(client) client.eye = host
-
- return 1
-
-mob/living/parasite/proc/exit_host()
- src.host.parasites.Remove(src)
- src.host = null
- src.loc = null
-
- return 1
-
-
-// === MEME ===
-// ============
-
-// Memes use points for many actions
-mob/living/parasite/meme/var/meme_points = 100
-mob/living/parasite/meme/var/dormant = 0
-
-// Memes have a list of indoctrinated hosts
-mob/living/parasite/meme/var/list/indoctrinated = list()
-
-mob/living/parasite/meme/Life()
- ..()
-
- if(client)
- if(blinded) client.eye = null
- else client.eye = host
-
- if(!host) return
-
- // recover meme points slowly
- var/gain = 3
- if(dormant) gain = 9 // dormant recovers points faster
-
- meme_points = min(meme_points + gain, MAXIMUM_MEME_POINTS)
-
- // if there are sleep toxins in the host's body, that's bad
- if(host.reagents.has_reagent("stoxin"))
- src << "\red Something in your host's blood makes you lose consciousness.. you fade away.."
- src.death()
- return
- // a host without brain is no good
- if(!host.mind)
- src << "\red Your host has no mind.. you fade away.."
- src.death()
- return
- if(host.stat == 2)
- src << "\red Your host has died.. you fade away.."
- src.death()
- return
-
- if(host.blinded && host.stat != 1) src.blinded = 1
- else src.blinded = 0
-
-
-mob/living/parasite/meme/death()
- // make sure the mob is on the actual map before gibbing
- if(host) src.loc = host.loc
- src.stat = 2
- ..()
- del src
-
-// When a meme speaks, it speaks through its host
-mob/living/parasite/meme/say(message as text)
- if(dormant)
- usr << "\red You're dormant!"
- return
- if(!host)
- usr << "\red You can't speak without host!"
- return
-
- return host.say(message)
-
-// Same as speak, just with whisper
-mob/living/parasite/meme/whisper(message as text)
- if(dormant)
- usr << "\red You're dormant!"
- return
- if(!host)
- usr << "\red You can't speak without host!"
- return
-
- return host.whisper(message)
-
-// Make the host do things
-mob/living/parasite/meme/me_verb(message as text)
- set name = "Me"
-
-
- if(dormant)
- usr << "\red You're dormant!"
- return
-
- if(!host)
- usr << "\red You can't emote without host!"
- return
-
- return host.me_verb(message)
-
-// A meme understands everything their host understands
-mob/living/parasite/meme/say_understands(mob/other)
- if(!host) return 0
-
- return host.say_understands(other)
-
-// Try to use amount points, return 1 if successful
-mob/living/parasite/meme/proc/use_points(amount)
- if(dormant)
- usr << "\red You're dormant!"
- return
- if(src.meme_points < amount)
- src << "* You don't have enough meme points(need [amount])."
- return 0
-
- src.meme_points -= round(amount)
- return 1
-
-// Let the meme choose one of his indoctrinated mobs as target
-mob/living/parasite/meme/proc/select_indoctrinated(var/title, var/message)
- var/list/candidates
-
- // Can only affect other mobs thant he host if not blinded
- if(blinded)
- candidates = list()
- src << "\red You are blinded, so you can not affect mobs other than your host."
- else
- candidates = indoctrinated.Copy()
-
- candidates.Add(src.host)
-
- var/mob/target = null
- if(candidates.len == 1)
- target = candidates[1]
- else
- var/selected
-
- var/list/text_candidates = list()
- var/list/map_text_to_mob = list()
-
- for(var/mob/living/carbon/human/M in candidates)
- text_candidates += M.real_name
- map_text_to_mob[M.real_name] = M
-
- selected = input(message,title) as null|anything in text_candidates
- if(!selected) return null
-
- target = map_text_to_mob[selected]
-
- return target
-
-
-// A meme can make people hear things with the thought ability
-mob/living/parasite/meme/verb/Thought()
- set category = "Meme"
- set name = "Thought(50)"
- set desc = "Implants a thought into the target, making them think they heard someone talk."
-
- if(meme_points < 50)
- // just call use_points() to give the standard failure message
- use_points(50)
- return
-
- var/list/candidates = indoctrinated.Copy()
- if(!(src.host in candidates))
- candidates.Add(src.host)
-
- var/mob/target = select_indoctrinated("Thought", "Select a target which will hear your thought.")
-
- if(!target) return
-
- var/speaker = input("Select the voice in which you would like to make yourself heard.", "Voice") as null|text
- if(!speaker) return
-
- var/message = input("What would you like to say?", "Message") as null
- if(!message) return
-
- // Use the points at the end rather than the beginning, because the user might cancel
- if(!use_points(50)) return
-
- message = say_quote(message)
- var/rendered = "[speaker] [message]"
- target.show_message(rendered)
-
- usr << "You make [target] hear: [rendered]"
-
-// Mutes the host
-mob/living/parasite/meme/verb/Mute()
- set category = "Meme"
- set name = "Mute(250)"
- set desc = "Prevents your host from talking for a while."
-
- if(!src.host) return
- if(!host.speech_allowed)
- usr << "\red Your host already can't speak.."
- return
- if(!use_points(250)) return
-
- spawn
- // backup the host incase we switch hosts after using the verb
- var/mob/host = src.host
-
- host << "\red Your tongue feels numb.. You lose your ability to speak."
- usr << "\red Your host can't speak anymore."
-
- host.speech_allowed = 0
-
- sleep(1200)
-
- host.speech_allowed = 1
- host << "\red Your tongue has feeling again.."
- usr << "\red [host] can speak again."
-
-// Makes the host unable to emote
-mob/living/parasite/meme/verb/Paralyze()
- set category = "Meme"
- set name = "Paralyze(250)"
- set desc = "Prevents your host from using emote for a while."
-
- if(!src.host) return
- if(!host.use_me)
- usr << "\red Your host already can't use body language.."
- return
- if(!use_points(250)) return
-
- spawn
- // backup the host incase we switch hosts after using the verb
- var/mob/host = src.host
-
- host << "\red Your body feels numb.. You lose your ability to use body language."
- usr << "\red Your host can't use body language anymore."
-
- host.use_me = 0
-
- sleep(1200)
-
- host.use_me = 1
- host << "\red Your body has feeling again.."
- usr << "\red [host] can use body language again."
-
-
-
-// Cause great agony with the host, used for conditioning the host
-mob/living/parasite/meme/verb/Agony()
- set category = "Meme"
- set name = "Agony(200)"
- set desc = "Causes significant pain in your host."
-
- if(!src.host) return
- if(!use_points(200)) return
-
- spawn
- // backup the host incase we switch hosts after using the verb
- var/mob/living/carbon/host = src.host
-
- if (host.species && (host.species.flags & NO_PAIN))
- usr << "Nothing seems to happen."
- return
-
- host.paralysis = max(host.paralysis, 2)
-
- host.flash_weak_pain()
- host << "\red You feel excrutiating pain all over your body! It is so bad you can't think or articulate yourself properly.."
-
- usr << "You send a jolt of agonizing pain through [host], they should be unable to concentrate on anything else for half a minute."
-
- host.emote("scream")
-
- for(var/i=0, i<10, i++)
- host.stuttering = 2
- sleep(50)
- if(prob(80)) host.flash_weak_pain()
- if(prob(10)) host.paralysis = max(host.paralysis, 2)
- if(prob(15)) host.emote("twitch")
- else if(prob(15)) host.emote("scream")
- else if(prob(10)) host.emote("collapse")
-
- if(i == 10)
- host << "\red THE PAIN! AGHH, THE PAIN! MAKE IT STOP! ANYTHING TO MAKE IT STOP!"
-
- host << "\red The pain subsides.."
-
-// Cause great joy with the host, used for conditioning the host
-mob/living/parasite/meme/verb/Joy()
- set category = "Meme"
- set name = "Joy(200)"
- set desc = "Causes significant joy in your host."
-
- if(!src.host) return
- if(!use_points(200)) return
-
- spawn
- var/mob/host = src.host
- host.druggy = max(host.druggy, 50)
- host.slurring = max(host.slurring, 10)
-
- usr << "You stimulate [host.name]'s brain, injecting waves of endorphines and dopamine into the tissue. They should now forget all their worries, particularly relating to you, for around a minute."
-
- host << "\red You are feeling wonderful! Your head is numb and drowsy, and you can't help forgetting all the worries in the world."
-
- while(host.druggy > 0)
- sleep(10)
-
- host << "\red You are feeling clear-headed again.."
-
-// Cause the target to hallucinate.
-mob/living/parasite/meme/verb/Hallucinate()
- set category = "Meme"
- set name = "Hallucinate(300)"
- set desc = "Makes your host hallucinate, has a short delay."
-
- var/mob/target = select_indoctrinated("Hallucination", "Who should hallucinate?")
-
- if(!target) return
- if(!use_points(300)) return
-
- target.hallucination += 100
-
- usr << "You make [target] hallucinate."
-
-// Jump to a closeby target through a whisper
-mob/living/parasite/meme/verb/SubtleJump(mob/living/carbon/human/target as mob in world)
- set category = "Meme"
- set name = "Subtle Jump(350)"
- set desc = "Move to a closeby human through a whisper."
-
- if(!istype(target, /mob/living/carbon/human) || !target.mind)
- src << "You can't jump to this creature.."
- return
- if(!(target in view(1, host)+src))
- src << "The target is not close enough."
- return
-
- // Find out whether we can speak
- if (host.silent || (host.disabilities & 64))
- src << "Your host can't speak.."
- return
-
- if(!use_points(350)) return
-
- for(var/mob/M in view(1, host))
- M.show_message("[host] whispers something incoherent.",2) // 2 stands for hearable message
-
- // Find out whether the target can hear
- if(target.disabilities & 32 || target.ear_deaf)
- src << "Your target doesn't seem to hear you.."
- return
-
- if(target.parasites.len > 0)
- src << "Your target already is possessed by something.."
- return
-
- src.exit_host()
- src.enter_host(target)
-
- usr << "You successfully jumped to [target]."
- log_admin("[src.key] has jumped to [target]")
- message_admins("[src.key] has jumped to [target]")
-
-// Jump to a distant target through a shout
-mob/living/parasite/meme/verb/ObviousJump(mob/living/carbon/human/target as mob in world)
- set category = "Meme"
- set name = "Obvious Jump(750)"
- set desc = "Move to any mob in view through a shout."
-
- if(!istype(target, /mob/living/carbon/human) || !target.mind)
- src << "You can't jump to this creature.."
- return
- if(!(target in view(host)))
- src << "The target is not close enough."
- return
-
- // Find out whether we can speak
- if (host.silent || (host.disabilities & 64))
- src << "Your host can't speak.."
- return
-
- if(!use_points(750)) return
-
- for(var/mob/M in view(host)+src)
- M.show_message("[host] screams something incoherent!",2) // 2 stands for hearable message
-
- // Find out whether the target can hear
- if(target.disabilities & 32 || target.ear_deaf)
- src << "Your target doesn't seem to hear you.."
- return
-
- if(target.parasites.len > 0)
- src << "Your target already is possessed by something.."
- return
-
- src.exit_host()
- src.enter_host(target)
-
- usr << "You successfully jumped to [target]."
- log_admin("[src.key] has jumped to [target]")
- message_admins("[src.key] has jumped to [target]")
-
-// Jump to an attuned mob for free
-mob/living/parasite/meme/verb/AttunedJump(mob/living/carbon/human/target as mob in world)
- set category = "Meme"
- set name = "Attuned Jump(0)"
- set desc = "Move to a mob in sight that you have already attuned."
-
- if(!istype(target, /mob/living/carbon/human) || !target.mind)
- src << "You can't jump to this creature.."
- return
- if(!(target in view(host)))
- src << "You need to make eye-contact with the target."
- return
- if(!(target in indoctrinated))
- src << "You need to attune the target first."
- return
-
- src.exit_host()
- src.enter_host(target)
-
- usr << "You successfully jumped to [target]."
-
- log_admin("[src.key] has jumped to [target]")
- message_admins("[src.key] has jumped to [target]")
-
-// ATTUNE a mob, adding it to the indoctrinated list
-mob/living/parasite/meme/verb/Attune()
- set category = "Meme"
- set name = "Attune(400)"
- set desc = "Change the host's brain structure, making it easier for you to manipulate him."
-
- if(host in src.indoctrinated)
- usr << "You have already attuned this host."
- return
-
- if(!host) return
- if(!use_points(400)) return
-
- src.indoctrinated.Add(host)
-
- usr << "You successfully indoctrinated [host]."
- host << "\red Your head feels a bit roomier.."
-
- log_admin("[src.key] has attuned [host]")
- message_admins("[src.key] has attuned [host]")
-
-// Enables the mob to take a lot more damage
-mob/living/parasite/meme/verb/Analgesic()
- set category = "Meme"
- set name = "Analgesic(500)"
- set desc = "Combat drug that the host to move normally, even under life-threatening pain."
-
- if(!host) return
- if(!(host in indoctrinated))
- usr << "\red You need to attune the host first."
- return
- if(!use_points(500)) return
-
- usr << "You inject drugs into [host]."
- host << "\red You feel your body strengthen and your pain subside.."
- host.analgesic = 60
- while(host.analgesic > 0)
- sleep(10)
- host << "\red The dizziness wears off, and you can feel pain again.."
-
-
-mob/proc/clearHUD()
- if(client) client.screen.Cut()
-
-// Take control of the mob
-mob/living/parasite/meme/verb/Possession()
- set category = "Meme"
- set name = "Possession(500)"
- set desc = "Take direct control of the host for a while."
-
- if(!host) return
- if(!(host in indoctrinated))
- usr << "\red You need to attune the host first."
- return
- if(!use_points(500)) return
-
- usr << "You take control of [host]!"
- host << "\red Everything goes black.."
-
- spawn
- var/mob/dummy = new()
- dummy.loc = 0
- dummy.sight = BLIND
-
- var/datum/mind/host_mind = host.mind
- var/datum/mind/meme_mind = src.mind
-
- host_mind.transfer_to(dummy)
- meme_mind.transfer_to(host)
- host_mind.current.clearHUD()
- host.update_clothing()
-
- dummy << "\blue You feel very drowsy.. Your eyelids become heavy..."
-
- log_admin("[meme_mind.key] has taken possession of [host]([host_mind.key])")
- message_admins("[meme_mind.key] has taken possession of [host]([host_mind.key])")
-
- sleep(600)
-
- log_admin("[meme_mind.key] has lost possession of [host]([host_mind.key])")
- message_admins("[meme_mind.key] has lost possession of [host]([host_mind.key])")
-
- meme_mind.transfer_to(src)
- host_mind.transfer_to(host)
- meme_mind.current.clearHUD()
- host.update_clothing()
- src << "\red You lose control.."
-
- del dummy
-
-// Enter dormant mode, increases meme point gain
-mob/living/parasite/meme/verb/Dormant()
- set category = "Meme"
- set name = "Dormant(100)"
- set desc = "Speed up point recharging, will force you to cease all actions until all points are recharged."
-
- if(!host) return
- if(!use_points(100)) return
-
- usr << "You enter dormant mode.. You won't be able to take action until all your points have recharged."
-
- dormant = 1
-
- while(meme_points < MAXIMUM_MEME_POINTS)
- sleep(10)
-
- dormant = 0
-
- usr << "\red You have regained all points and exited dormant mode!"
-
-mob/living/parasite/meme/verb/Show_Points()
- set category = "Meme"
-
- usr << "Meme Points: [src.meme_points]/[MAXIMUM_MEME_POINTS]"
-
-// Stat panel to show meme points, copypasted from alien
-/mob/living/parasite/meme/Stat()
- ..()
-
- statpanel("Status")
- if (client && client.holder)
- stat(null, "([x], [y], [z])")
-
- if (client && client.statpanel == "Status")
- stat(null, "Meme Points: [src.meme_points]")
-
-// Game mode helpers, used for theft objectives
-// --------------------------------------------
-mob/living/parasite/check_contents_for(t)
- if(!host) return 0
-
- return host.check_contents_for(t)
-
-mob/living/parasite/check_contents_for_reagent(t)
- if(!host) return 0
-
- return host.check_contents_for_reagent(t)
diff --git a/code/WorkInProgress/Mini/asay_trap.dm b/code/WorkInProgress/Mini/asay_trap.dm
deleted file mode 100644
index 4cbd9e3c20..0000000000
--- a/code/WorkInProgress/Mini/asay_trap.dm
+++ /dev/null
@@ -1,12 +0,0 @@
-/obj/effect/admin_log_trap
- name = "Herprpr"
- desc = "Stepping on this is good."
- icon = 'icons/mob/screen1.dmi'
- icon_state = "x2"
- anchored = 1.0
- unacidable = 1
- invisibility = 101
-
-/obj/effect/admin_log_trap/HasEntered(AM as mob|obj)
- if(istype(AM,/mob))
- message_admins("[AM] ([AM:ckey]) stepped on an alerted tile in [get_area(src)]. Jump", admin_ref = 1)
diff --git a/code/WorkInProgress/Mini/pipe_heater.dm b/code/WorkInProgress/Mini/pipe_heater.dm
deleted file mode 100644
index 3845758432..0000000000
--- a/code/WorkInProgress/Mini/pipe_heater.dm
+++ /dev/null
@@ -1,84 +0,0 @@
-//copy pastad freezer
-//remove this shit when someonething better is done
-/obj/machinery/atmospherics/unary/heat_reservoir/heater
- name = "Heat Regulator"
- icon = 'icons/obj/Cryogenic2.dmi'
- icon_state = "freezer_0"
- density = 1
-
- anchored = 1.0
-
- current_heat_capacity = 1000
-
- New()
- ..()
- initialize_directions = dir
-
- initialize()
- if(node) return
-
- var/node_connect = dir
-
- for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
- if(target.initialize_directions & get_dir(target,src))
- node = target
- break
-
- update_icon()
-
-
- update_icon()
- if(src.node)
- if(src.on)
- icon_state = "freezer_1"
- else
- icon_state = "freezer"
- else
- icon_state = "freezer_0"
- return
-
- attack_ai(mob/user as mob)
- return src.attack_hand(user)
-
- attack_paw(mob/user as mob)
- return src.attack_hand(user)
-
- attack_hand(mob/user as mob)
- user.machine = src
- var/temp_text = ""
- if(air_contents.temperature > (T0C - 20))
- temp_text = "[air_contents.temperature]"
- else if(air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
- temp_text = "[air_contents.temperature]"
- else
- temp_text = "[air_contents.temperature]"
-
- var/dat = {"Cryo gas cooling system
- Current status: [ on ? "Off On" : "Off On"]
- Current gas temperature: [temp_text]
- Current air pressure: [air_contents.return_pressure()]
- Target gas temperature: - - - [current_temperature] + + +
- "}
-
- user << browse(dat, "window=freezer;size=400x500")
- onclose(user, "freezer")
-
- Topic(href, href_list)
- if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
- usr.machine = src
- if (href_list["start"])
- src.on = !src.on
- update_icon()
- if(href_list["temp"])
- var/amount = text2num(href_list["temp"])
- if(amount > 0)
- src.current_temperature = min(350, src.current_temperature+amount)
- else
- src.current_temperature = max(150, src.current_temperature+amount)
- src.updateUsrDialog()
- src.add_fingerprint(usr)
- return
-
- process()
- ..()
- src.updateUsrDialog()
\ No newline at end of file
diff --git a/code/WorkInProgress/Mloc/Shortcuts.dm b/code/WorkInProgress/Mloc/Shortcuts.dm
deleted file mode 100644
index 361e647cbc..0000000000
--- a/code/WorkInProgress/Mloc/Shortcuts.dm
+++ /dev/null
@@ -1,65 +0,0 @@
-/mob/verb/shortcut_changeintent(var/changeto as num)
- set name = "_changeintent"
- set hidden = 1
- if(istype(usr,/mob/living/carbon))
- if(changeto == 1)
- switch(usr.a_intent)
- if("help")
- usr.a_intent = "disarm"
- usr.hud_used.action_intent.icon_state = "disarm"
- usr.hud_used.hurt_intent.icon_state = "harm_small"
- usr.hud_used.help_intent.icon_state = "help_small"
- usr.hud_used.grab_intent.icon_state = "grab_small"
- usr.hud_used.disarm_intent.icon_state = "disarm_small_active"
- if("disarm")
- usr.a_intent = "hurt"
- usr.hud_used.action_intent.icon_state = "harm"
- usr.hud_used.hurt_intent.icon_state = "harm_small_active"
- usr.hud_used.help_intent.icon_state = "help_small"
- usr.hud_used.grab_intent.icon_state = "grab_small"
- usr.hud_used.disarm_intent.icon_state = "disarm_small"
- if("hurt")
- usr.a_intent = "grab"
- usr.hud_used.action_intent.icon_state = "grab"
- usr.hud_used.hurt_intent.icon_state = "harm_small"
- usr.hud_used.help_intent.icon_state = "help_small"
- usr.hud_used.grab_intent.icon_state = "grab_small_active"
- usr.hud_used.disarm_intent.icon_state = "disarm_small"
- if("grab")
- usr.a_intent = "help"
- usr.hud_used.action_intent.icon_state = "help"
- usr.hud_used.hurt_intent.icon_state = "harm_small"
- usr.hud_used.help_intent.icon_state = "help_small_active"
- usr.hud_used.grab_intent.icon_state = "grab_small"
- usr.hud_used.disarm_intent.icon_state = "disarm_small"
- else if(changeto == -1)
- switch(usr.a_intent)
- if("help")
- usr.a_intent = "grab"
- usr.hud_used.action_intent.icon_state = "grab"
- usr.hud_used.hurt_intent.icon_state = "harm_small"
- usr.hud_used.help_intent.icon_state = "help_small"
- usr.hud_used.grab_intent.icon_state = "grab_small_active"
- usr.hud_used.disarm_intent.icon_state = "disarm_small"
- if("disarm")
- usr.a_intent = "help"
- usr.hud_used.action_intent.icon_state = "help"
- usr.hud_used.hurt_intent.icon_state = "harm_small"
- usr.hud_used.help_intent.icon_state = "help_small_active"
- usr.hud_used.grab_intent.icon_state = "grab_small"
- usr.hud_used.disarm_intent.icon_state = "disarm_small"
- if("hurt")
- usr.a_intent = "disarm"
- usr.hud_used.action_intent.icon_state = "disarm"
- usr.hud_used.hurt_intent.icon_state = "harm_small"
- usr.hud_used.help_intent.icon_state = "help_small"
- usr.hud_used.grab_intent.icon_state = "grab_small"
- usr.hud_used.disarm_intent.icon_state = "disarm_small_active"
- if("grab")
- usr.a_intent = "hurt"
- usr.hud_used.action_intent.icon_state = "harm"
- usr.hud_used.hurt_intent.icon_state = "harm_small_active"
- usr.hud_used.help_intent.icon_state = "help_small"
- usr.hud_used.grab_intent.icon_state = "grab_small"
- usr.hud_used.disarm_intent.icon_state = "disarm_small"
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/Ported/Abi79/uplink_kits.dm b/code/WorkInProgress/Ported/Abi79/uplink_kits.dm
deleted file mode 100644
index b7b053135e..0000000000
--- a/code/WorkInProgress/Ported/Abi79/uplink_kits.dm
+++ /dev/null
@@ -1,53 +0,0 @@
-/obj/item/weapon/storage/syndie_kit
- name = "Box"
- desc = "A sleek, sturdy box"
- icon_state = "box_of_doom"
- item_state = "syringe_kit"
-
-/obj/item/weapon/storage/syndie_kit/imp_freedom
- name = "Freedom Implant (with injector)"
-
-/obj/item/weapon/storage/syndie_kit/imp_freedom/New()
- var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
- O.imp = new /obj/item/weapon/implant/freedom(O)
- O.update()
- ..()
- return
-
-/obj/item/weapon/storage/syndie_kit/imp_compress
- name = "Compressed Matter Implant (with injector)"
-
-/obj/item/weapon/storage/syndie_kit/imp_compress/New()
- new /obj/item/weapon/implanter/compressed(src)
- ..()
- return
-
-/obj/item/weapon/storage/syndie_kit/imp_explosive
- name = "Explosive Implant (with injector)"
-
-/obj/item/weapon/storage/syndie_kit/imp_explosive/New()
- var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
- O.imp = new /obj/item/weapon/implant/explosive(O)
- O.name = "(BIO-HAZARD) BIO-detpack"
- O.update()
- ..()
- return
-
-/obj/item/weapon/storage/syndie_kit/imp_uplink
- name = "Uplink Implant (with injector)"
-
-/obj/item/weapon/storage/syndie_kit/imp_uplink/New()
- var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
- O.imp = new /obj/item/weapon/implant/uplink(O)
- O.update()
- ..()
- return
-
-/obj/item/weapon/storage/syndie_kit/space
- name = "Space Suit and Helmet"
-
-/obj/item/weapon/storage/syndie_kit/space/New()
- new /obj/item/clothing/suit/space/syndicate(src)
- new /obj/item/clothing/head/helmet/space/syndicate(src)
- ..()
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/Ported/Abi79/uplinks.dm b/code/WorkInProgress/Ported/Abi79/uplinks.dm
deleted file mode 100644
index 58d9fa0ace..0000000000
--- a/code/WorkInProgress/Ported/Abi79/uplinks.dm
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
-
-SYNDICATE UPLINKS
-
-TO-DO:
- Once wizard is fixed, make sure the uplinks work correctly for it. wizard.dm is right now uncompiled and with broken code in it.
-
- Clean the code up and comment it. Part of it is right now copy-pasted, with the general Topic() and modifications by Abi79.
-
- I should take a more in-depth look at both the copy-pasted code for the individual uplinks below, and at each gamemode's code
- to see how uplinks are assigned and if there are any bugs with those.
-
-
-A list of items and costs is stored under the datum of every game mode, alongside the number of crystals, and the welcoming message.
-
-*/
-
-/obj/item/device/uplink
- var/welcome // Welcoming menu message
- var/menu_message = "" // The actual menu text
- var/items // List of items
- var/list/ItemList // Parsed list of items
- var/uses // Numbers of crystals
- var/uplink_data // designated uplink items
- // List of items not to shove in their hands.
- var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
-
- New()
- if(!welcome)
- welcome = ticker.mode.uplink_welcome
- if(!uplink_data)
- uplink_data = ticker.mode.uplink_items
-
- items = replacetext(uplink_data, "\n", "") // Getting the text string of items
- ItemList = dd_text2list(src.items, ";") // Parsing the items text string
- uses = ticker.mode.uplink_uses
-
-//Let's build a menu!
- proc/generate_menu()
- src.menu_message = "[src.welcome]
"
- src.menu_message += "Tele-Crystals left: [src.uses]
"
- src.menu_message += "
"
- src.menu_message += "Request item:
"
- src.menu_message += "Each item costs a number of tele-crystals as indicated by the number following their name.
"
-
- var/cost
- var/item
- var/name
- var/path_obj
- var/path_text
- var/category_items = 1 //To prevent stupid :P
-
- for(var/D in ItemList)
- var/list/O = stringsplit(D, ":")
- if(O.len != 3) //If it is not an actual item, make a break in the menu.
- if(O.len == 1) //If there is one item, it's probably a title
- src.menu_message += "[O[1]]
"
- category_items = 0
- else //Else, it's a white space.
- if(category_items < 1) //If there were no itens in the last category...
- src.menu_message += "We apologize, as you could not afford anything from this category.
"
- src.menu_message += "
"
- continue
-
- path_text = O[1]
- cost = text2num(O[2])
-
- if(cost>uses)
- continue
-
- path_obj = text2path(path_text)
- item = new path_obj()
- name = O[3]
- del item
-
- src.menu_message += "[name] ([cost])
"
- category_items++
-
-// src.menu_message += "Random Item (??)
"
- src.menu_message += "
"
- return
-
- Topic(href, href_list)
- if (href_list["buy_item"])
-/* if(href_list["buy_item"] == "random")
- var/list/randomItems = list()
-
- //Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
- //Add only items the player can afford:
- if(uses > 19)
- randomItems.Add("/obj/item/weapon/circuitboard/teleporter") //Teleporter Circuit Board (costs 20, for nuke ops)
-
- if(uses > 9)
- randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon
- randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_uplink") //Uplink Implanter
- randomItems.Add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle
-
- //if(uses > 8) //Nothing... yet.
- //if(uses > 7) //Nothing... yet.
-
- if(uses > 6)
- randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module
- randomItems.Add("/obj/item/device/radio/beacon/syndicate") //Singularity Beacon
-
- if(uses > 5)
- randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver
-
- if(uses > 4)
- randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow
- randomItems.Add("/obj/item/device/powersink") //Powersink
-
- if(uses > 3)
- randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword
- randomItems.Add("/obj/item/clothing/mask/gas/voice") //Voice Changer
- randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector
-
- if(uses > 2)
- randomItems.Add("/obj/item/weapon/storage/emp_kit") //EMP Grenades
- randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen
- randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge
- randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit
- randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card
- randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer
- randomItems.Add("/obj/item/weapon/storage/syndie_kit/space") //Syndicate Space Suit
- randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key
- randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_freedom") //Freedom Implant
- randomItems.Add("/obj/item/clothing/glasses/thermal") //Thermal Imaging Goggles
-
- if(uses > 1)
-/*
- var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo
- var/hasRevolver = 0
- for(var/obj/I in usrItems) //Only add revolver ammo if the user has a gun that can shoot it
- if(istype(I,/obj/item/weapon/gun/projectile))
- hasRevolver = 1
-
- if(hasRevolver) randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
-*/
- randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
- randomItems.Add("/obj/item/clothing/shoes/syndigaloshes") //No-Slip Syndicate Shoes
- randomItems.Add("/obj/item/weapon/plastique") //C4
-
- if(uses > 0)
- randomItems.Add("/obj/item/weapon/soap/syndie") //Syndicate Soap
- randomItems.Add("/obj/item/weapon/storage/toolbox/syndicate") //Syndicate Toolbox
-
- if(!randomItems)
- del(randomItems)
- return 0
- else
- href_list["buy_item"] = pick(randomItems)
-
- switch(href_list["buy_item"]) //Ok, this gets a little messy, sorry.
- if("/obj/item/weapon/circuitboard/teleporter")
- uses -= 20
- if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
- uses -= 10
- if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/syndicate")
- uses -= 7
- if("/obj/item/weapon/gun/projectile")
- uses -= 6
- if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink")
- uses -= 5
- if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon")
- uses -= 4
- if("/obj/item/weapon/storage/emp_kit" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
- "/obj/item/weapon/card/id/syndicate" , "/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
- "/obj/item/weapon/storage/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal")
- uses -= 3
- if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique")
- uses -= 2
- if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
- uses -= 1
-
- del(randomItems)
- return 1
-*/
-
-
- if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
- return 0
-
- if(usr:mind && ticker.mode.traitors[usr:mind])
- var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
- info.spawnlist += href_list["buy_item"]
-
- uses -= text2num(href_list["cost"])
-
- return 1
-
-
-/*
- *PDA uplink
- */
-
-//Syndicate uplink hidden inside a traitor PDA
-//Communicate with traitor through the PDA's note function.
-
-/obj/item/device/uplink/pda
- name = "uplink module"
- desc = "An electronic uplink system of unknown origin."
- icon = 'icons/obj/module.dmi'
- icon_state = "power_mod"
- var/obj/item/device/pda/hostpda = null
-
- var/orignote = null //Restore original notes when locked.
- var/active = 0 //Are we currently active?
- var/lock_code = "" //The unlocking password.
-
- proc
- unlock()
- if ((isnull(src.hostpda)) || (src.active))
- return
-
- src.orignote = src.hostpda.note
- src.active = 1
- src.hostpda.mode = 1 //Switch right to the notes program
-
- src.generate_menu()
- print_to_host(menu_message)
-
- for (var/mob/M in viewers(1, src.hostpda.loc))
- if (M.client && M.machine == src.hostpda)
- src.hostpda.attack_self(M)
-
- return
-
- print_to_host(var/text)
- if (isnull(hostpda))
- return
- hostpda.note = text
-
- for (var/mob/M in viewers(1, hostpda.loc))
- if (M.client && M.machine == hostpda)
- hostpda.attack_self(M)
- return
-
- shutdown_uplink()
- if (isnull(src.hostpda))
- return
- active = 0
- hostpda.note = orignote
- if (hostpda.mode==1)
- hostpda.mode = 0
- hostpda.updateDialog()
- return
-
- attack_self(mob/user as mob)
- src.generate_menu()
- src.hostpda.note = src.menu_message
-
-
- Topic(href, href_list)
- if ((isnull(src.hostpda)) || (!src.active))
- return
-
- if (usr.stat || usr.restrained() || !in_range(src.hostpda, usr))
- return
-
- if(..() == 1) // We can afford the item
- var/path_obj = text2path(href_list["buy_item"])
- var/mob/A = src.hostpda.loc
- var/item = new path_obj(get_turf(src.hostpda))
- if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner))
- if(!A.r_hand)
- item:loc = A
- A.r_hand = item
- item:layer = 20
- else if(!A.l_hand)
- item:loc = A
- A.l_hand = item
- item:layer = 20
- else
- item:loc = get_turf(A)
- usr.update_clothing()
- usr.client.onBought("[item:name]")
- /* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
- del item*/
- //HEADFINDBACK
- src.attack_self(usr)
- src.hostpda.attack_self(usr)
- return
-
-
-/*
- *Portable radio uplink
- */
-
-//A Syndicate uplink disguised as a portable radio
-/obj/item/device/uplink/radio/implanted
- New()
- ..()
- uses = 5
- return
-
- explode()
- var/turf/location = get_turf(src.loc)
- if(location)
- location.hotspot_expose(700,125)
- explosion(location, 0, 0, 2, 4, 1)
-
- var/obj/item/weapon/implant/uplink/U = src.loc
- var/mob/living/A = U.imp_in
- var/datum/organ/external/head = A:organs["head"]
- head.destroyed = 1
- spawn(2)
- head.droplimb()
- del(src.master)
- del(src)
- return
-
-
-/obj/item/device/uplink/radio
- name = "ship bounced radio"
- icon = 'icons/obj/radio.dmi'
- icon_state = "radio"
- 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
- slot_flags = SLOT_BELT
- w_class = 2.0
- item_state = "radio"
- throwforce = 5
- throw_speed = 4
- throw_range = 20
- m_amt = 100
-
- attack_self(mob/user as mob)
- var/dat
-
- if (src.selfdestruct)
- dat = "Self Destructing..."
- else
- if (src.temp)
- dat = "[src.temp]
Clear"
- else
- src.generate_menu()
- dat = src.menu_message
- if (src.origradio) // Checking because sometimes the radio uplink may be spawned by itself, not as a normal unlockable radio
- dat += "Lock
"
- dat += "
"
- dat += "Self-Destruct"
-
- user << browse(dat, "window=radio")
- onclose(user, "radio")
- return
-
- Topic(href, href_list)
- if (usr.stat || usr.restrained())
- return
-
- if (!( istype(usr, /mob/living/carbon/human)))
- return 1
-
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || istype(src.loc,/obj/item/weapon/implant/uplink)))
- usr.machine = src
-
- if(href_list["buy_item"])
- if(..() == 1) // We can afford the item
- var/path_obj = text2path(href_list["buy_item"])
- var/item = new path_obj(get_turf(src.loc))
- var/mob/A = src.loc
- if(istype(src.loc,/obj/item/weapon/implant/uplink))
- var/obj/item/weapon/implant/uplink/U = src.loc
- A = U.imp_in
- if(ismob(A) && !(locate(item) in NotInHand)) //&& !istype(item, /obj/spawner))
- if(!A.r_hand)
- item:loc = A
- A.r_hand = item
- item:layer = 20
- else if(!A.l_hand)
- item:loc = A
- A.l_hand = item
- item:layer = 20
- else
- item:loc = get_turf(A)
- /* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind
- del item*/
- usr.client.onBought("[item:name]")
- src.attack_self(usr)
- return
-
- else if (href_list["lock"] && src.origradio)
- // presto chango, a regular radio again! (reset the freq too...)
- usr.machine = null
- usr << browse(null, "window=radio")
- var/obj/item/device/radio/T = src.origradio
- var/obj/item/device/uplink/radio/R = src
- R.loc = T
- T.loc = usr
- // R.layer = initial(R.layer)
- R.layer = 0
- if (usr.client)
- usr.client.screen -= R
- if (usr.r_hand == R)
- usr.u_equip(R)
- usr.r_hand = T
-
- else
- usr.u_equip(R)
- usr.l_hand = T
- R.loc = T
- T.layer = 20
- T.set_frequency(initial(T.frequency))
- T.attack_self(usr)
- return
-
- else if (href_list["selfdestruct"])
- src.temp = "Self-Destruct"
-
- else if (href_list["selfdestruct2"])
- src.selfdestruct = 1
- spawn (100)
- explode()
- return
-
- else if (href_list["clear_selfdestruct"])
- src.temp = null
-
- attack_self(usr)
-// if (istype(src.loc, /mob))
-// attack_self(src.loc)
-// else
-// for(var/mob/M in viewers(1, src))
-// if (M.client)
-// src.attack_self(M)
- return
-
- proc/explode()
- var/turf/location = get_turf(src.loc)
- if(location)
- location.hotspot_expose(700,125)
- explosion(location, 0, 0, 2, 4, 1)
-
- del(src.master)
- del(src)
- return
-
- proc/shutdown_uplink()
- if (!src.origradio)
- return
- var/list/nearby = viewers(1, src)
- for(var/mob/M in nearby)
- if (M.client && M.machine == src)
- M << browse(null, "window=radio")
- M.machine = null
-
- var/obj/item/device/radio/T = src.origradio
- var/obj/item/device/uplink/radio/R = src
- var/mob/L = src.loc
- R.loc = T
- T.loc = L
- // R.layer = initial(R.layer)
- R.layer = 0
- if (istype(L))
- if (L.client)
- L.client.screen -= R
- if (L.r_hand == R)
- L.u_equip(R)
- L.r_hand = T
- else
- L.u_equip(R)
- L.l_hand = T
- T.layer = 20
- T.set_frequency(initial(T.frequency))
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/Ported/Bureaucracy/copier.dm b/code/WorkInProgress/Ported/Bureaucracy/copier.dm
deleted file mode 100644
index 1374dc5520..0000000000
--- a/code/WorkInProgress/Ported/Bureaucracy/copier.dm
+++ /dev/null
@@ -1,145 +0,0 @@
-// Contains: copy machine
-
-/obj/machinery/copier
- name = "Copy Machine"
- icon = 'icons/obj/bureaucracy.dmi'
- icon_state = "copier_o"
- density = 1
- anchored = 1
- var/num_copies = 1 // number of copies selected, will be maintained between jobs
- var/copying = 0 // are we copying
- var/job_num_copies = 0 // number of copies remaining
- var/obj/item/weapon/template // the paper OR photo being scanned
- var/max_copies = 10 // MAP EDITOR: can set the number of max copies, possibly to 5 or something for public, more for QM, robutist, etc.
-
-/obj/machinery/copier/attackby(obj/item/weapon/O as obj, mob/user as mob)
- if(template)
- return
-
- if (istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo))
- // put it inside
- template = O
- usr.drop_item()
- O.loc = src
- update()
- updateDialog()
-
-/obj/machinery/copier/attack_paw(user as mob)
- return src.attack_hand(user)
-
-/obj/machinery/copier/attack_ai(user as mob)
- return src.attack_hand(user)
-
-/obj/machinery/copier/attack_hand(mob/user as mob)
- // da UI
- var/dat
- if(..())
- return
- user.machine = src
-
- if(src.stat)
- user << "[name] does not seem to be responding to your button mashing."
- return
-
- dat = "Copy MachineXeno Corp. Copying Machine
"
-
- if(copying)
- dat += "[job_num_copies] copies remaining.
"
- dat += "Cancel"
- else
- if(template)
- dat += "Open Lid"
- else
- dat += "No paper to be copied.
"
- dat += "Please place a paper or photograph on top and close the lid."
-
-
- dat += "
Number of Copies: "
- dat += "-"
- dat += "-"
- dat += " [num_copies] "
- dat += "+"
- dat += "+
"
-
- if(template)
- dat += "Copy"
-
- dat += ""
-
- user << browse(dat, "window=copy_machine")
- onclose(user, "copy_machine")
-
-/obj/machinery/copier/proc/update()
- if(template)
- icon_state = "copier"
- else
- icon_state = "copier_o"
-
-/obj/machinery/copier/Topic(href, href_list)
- if(..())
- return
- usr.machine = src
-
- if(href_list["num"])
- num_copies += text2num(href_list["num"])
- if(num_copies < 1)
- num_copies = 1
- else if(num_copies > max_copies)
- num_copies = max_copies
- updateDialog()
- if(href_list["open"])
- if(copying)
- return
- template.loc = src.loc
- template = null
- updateDialog()
- update()
- if(href_list["copy"])
- if(copying)
- return
- job_num_copies = num_copies
- spawn(0)
- do_copy(usr)
-
- if(href_list["cancel"])
- job_num_copies = 0
-
-/obj/machinery/copier/proc/do_copy(mob/user)
- if(!copying && job_num_copies > 0)
- copying = 1
- updateDialog()
- while(job_num_copies > 0)
- if(stat)
- copying = 0
- return
-
- // fx
- flick("copier_s", src)
- playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
-
- // dup the file
- if(istype(template, /obj/item/weapon/paper))
- // make duplicate paper
- var/obj/item/weapon/paper/P = new(src.loc)
- P.name = template.name
- P.info = template:info
- P.stamped = template:stamped
- P.icon_state = template.icon_state
- P.overlays = null
- for(var/overlay in template.overlays)
- P.overlays += overlay
- else if(istype(template, /obj/item/weapon/photo))
- // make duplicate photo
- var/obj/item/weapon/photo/P = new(src.loc)
- P.name = template.name
- P.desc = template.desc
- P.icon = template.icon
- P.img = template:img
-
- sleep(30)
- job_num_copies -= 1
- updateDialog()
- for(var/mob/O in hearers(src))
- O.show_message("[name] beeps happily.", 2)
- copying = 0
- updateDialog()
\ No newline at end of file
diff --git a/code/WorkInProgress/Ported/Bureaucracy/filing.dm b/code/WorkInProgress/Ported/Bureaucracy/filing.dm
deleted file mode 100644
index bf01c6dd27..0000000000
--- a/code/WorkInProgress/Ported/Bureaucracy/filing.dm
+++ /dev/null
@@ -1,23 +0,0 @@
-/obj/structure/filingcabinet
- name = "Filing Cabinet"
- desc = "A large cabinet with drawers."
- icon = 'icons/obj/bureaucracy.dmi'
- icon_state = "filingcabinet"
- density = 1
- anchored = 1
-
-/obj/structure/filingcabinet/attackby(obj/item/weapon/paper/P,mob/M)
- if(istype(P))
- M << "You put \the [P] in the [src]."
- M.drop_item()
- P.loc = src
- else
- M << "You can't put a [P] in the [src]!"
-
-/obj/structure/filingcabinet/attack_hand(mob/user)
- if(src.contents.len <= 0)
- user << "The [src] is empty."
- return
- var/obj/item/weapon/paper/P = input(user,"Choose a sheet to take out.","[src]", "Cancel") as null|obj in src.contents
- if(!isnull(P) && in_range(src,user))
- P.loc = user.loc
\ No newline at end of file
diff --git a/code/WorkInProgress/Ported/Spawners/spawner.dm b/code/WorkInProgress/Ported/Spawners/spawner.dm
deleted file mode 100644
index 90f2f90039..0000000000
--- a/code/WorkInProgress/Ported/Spawners/spawner.dm
+++ /dev/null
@@ -1,208 +0,0 @@
-/obj/spawner
- name = "object spawner"
-
-/obj/spawner/bomb
- name = "bomb"
- icon = 'icons/mob/screen1.dmi'
- icon_state = "x"
- var/btype = 0 //0 = radio, 1= prox, 2=time
- var/explosive = 1 // 0= firebomb
- var/btemp = 500 // bomb temperature (degC)
- var/active = 0
-
-/obj/spawner/bomb/radio
- btype = 0
-
-/obj/spawner/bomb/proximity
- btype = 1
-
-/obj/spawner/bomb/timer
- btype = 2
-
-/obj/spawner/bomb/timer/syndicate
- btemp = 450
-
-/obj/spawner/bomb/suicide
- btype = 3
-
-/obj/spawner/newbomb
- // Remember to delete it if you use it for anything else other than uplinks. See the commented line in its New() - Abi
- // Going in depth: the reason we do not do a Del() in its New()is because then we cannot access its properties.
- // I might be doing this wrong / not knowing of a Byond function. If I'm doing it wrong, let me know please.
- name = "bomb"
- icon = 'icons/mob/screen1.dmi'
- icon_state = "x"
- var/btype = 0 // 0=radio, 1=prox, 2=time
- var/btemp1 = 1500
- var/btemp2 = 1000 // tank temperatures
-
-/obj/spawner/newbomb/timer
- btype = 2
-
-/obj/spawner/newbomb/timer/syndicate
- name = "Low-Yield Bomb"
- btemp1 = 1500
- btemp2 = 1000
-
-/obj/spawner/newbomb/proximity
- btype = 1
-
-/obj/spawner/newbomb/radio
- btype = 0
-
-/obj/spawner/bomb/New()
- ..()
-
- switch (src.btype)
- // radio
- if (0)
- var/obj/item/assembly/r_i_ptank/R = new /obj/item/assembly/r_i_ptank(src.loc)
- var/obj/item/weapon/tank/phoron/p3 = new /obj/item/weapon/tank/phoron(R)
- var/obj/item/device/radio/signaler/p1 = new /obj/item/device/radio/signaler(R)
- var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
- R.part1 = p1
- R.part2 = p2
- R.part3 = p3
- p1.master = R
- p2.master = R
- p3.master = R
- R.status = explosive
- p1.b_stat = 0
- p2.status = 1
- p3.air_contents.temperature = btemp + T0C
-
- // proximity
- if (1)
- var/obj/item/assembly/m_i_ptank/R = new /obj/item/assembly/m_i_ptank(src.loc)
- var/obj/item/weapon/tank/phoron/p3 = new /obj/item/weapon/tank/phoron(R)
- var/obj/item/device/prox_sensor/p1 = new /obj/item/device/prox_sensor(R)
- var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
- R.part1 = p1
- R.part2 = p2
- R.part3 = p3
- p1.master = R
- p2.master = R
- p3.master = R
- R.status = explosive
-
- p3.air_contents.temperature = btemp + T0C
- p2.status = 1
-
- if(src.active)
- R.part1.state = 1
- R.part1.icon_state = text("motion[]", 1)
- R.c_state(1, src)
-
- // timer
- if (2)
- var/obj/item/assembly/t_i_ptank/R = new /obj/item/assembly/t_i_ptank(src.loc)
- var/obj/item/weapon/tank/phoron/p3 = new /obj/item/weapon/tank/phoron(R)
- var/obj/item/device/timer/p1 = new /obj/item/device/timer(R)
- var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
- R.part1 = p1
- R.part2 = p2
- R.part3 = p3
- p1.master = R
- p2.master = R
- p3.master = R
- R.status = explosive
-
- p3.air_contents.temperature = btemp + T0C
- p2.status = 1
- //bombvest
- if(3)
- var/obj/item/clothing/suit/armor/a_i_a_ptank/R = new /obj/item/clothing/suit/armor/a_i_a_ptank(src.loc)
- var/obj/item/weapon/tank/phoron/p4 = new /obj/item/weapon/tank/phoron(R)
- var/obj/item/device/healthanalyzer/p1 = new /obj/item/device/healthanalyzer(R)
- var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
- var/obj/item/clothing/suit/armor/vest/p3 = new /obj/item/clothing/suit/armor/vest(R)
- R.part1 = p1
- R.part2 = p2
- R.part3 = p3
- R.part4 = p4
- p1.master = R
- p2.master = R
- p3.master = R
- p4.master = R
- R.status = explosive
-
- p4.air_contents.temperature = btemp + T0C
- p2.status = 1
-
- del(src)
-
-
-/obj/spawner/newbomb/New()
- ..()
-
- switch (src.btype)
- // radio
- if (0)
-
- var/obj/item/device/transfer_valve/V = new(src.loc)
- var/obj/item/weapon/tank/phoron/PT = new(V)
- var/obj/item/weapon/tank/oxygen/OT = new(V)
-
- var/obj/item/device/radio/signaler/S = new(V)
-
- V.tank_one = PT
- V.tank_two = OT
- V.attached_device = S
-
- S.master = V
- PT.master = V
- OT.master = V
-
- S.b_stat = 0
-
- PT.air_contents.temperature = btemp1 + T0C
- OT.air_contents.temperature = btemp2 + T0C
-
- V.update_icon()
-
- // proximity
- if (1)
-
- var/obj/item/device/transfer_valve/V = new(src.loc)
- var/obj/item/weapon/tank/phoron/PT = new(V)
- var/obj/item/weapon/tank/oxygen/OT = new(V)
-
- var/obj/item/device/prox_sensor/P = new(V)
-
- V.tank_one = PT
- V.tank_two = OT
- V.attached_device = P
-
- P.master = V
- PT.master = V
- OT.master = V
-
-
- PT.air_contents.temperature = btemp1 + T0C
- OT.air_contents.temperature = btemp2 + T0C
-
- V.update_icon()
-
-
- // timer
- if (2)
- var/obj/item/device/transfer_valve/V = new(src.loc)
- var/obj/item/weapon/tank/phoron/PT = new(V)
- var/obj/item/weapon/tank/oxygen/OT = new(V)
-
- var/obj/item/device/timer/T = new(V)
-
- V.tank_one = PT
- V.tank_two = OT
- V.attached_device = T
-
- T.master = V
- PT.master = V
- OT.master = V
- T.time = 30
-
- PT.air_contents.temperature = btemp1 + T0C
- OT.air_contents.temperature = btemp2 + T0C
-
- V.update_icon()
- //del(src)
\ No newline at end of file
diff --git a/code/WorkInProgress/Ported/sql.dm b/code/WorkInProgress/Ported/sql.dm
deleted file mode 100644
index 9e0cad90ad..0000000000
--- a/code/WorkInProgress/Ported/sql.dm
+++ /dev/null
@@ -1,71 +0,0 @@
-//This looks to be the traitor win tracker code.
-client/proc/add_roundsjoined()
- if(!makejson)
- return
- var/DBConnection/dbcon = new()
-
- dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
- if(!dbcon.IsConnected()) return
-
- var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `roundsjoined` (`ckey`) VALUES ('[ckey(src.key)]')")
- if(!cquery.Execute()) message_admins(cquery.ErrorMsg())
-
-client/proc/add_roundssurvived()
- if(!makejson)
- return
- var/DBConnection/dbcon = new()
-
- dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
- if(!dbcon.IsConnected()) return
-
- var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `roundsurvived` (`ckey`) VALUES ('[ckey(src.key)]')")
- if(!cquery.Execute()) message_admins(cquery.ErrorMsg())
-
-client/proc/onDeath()
- if(!makejson)
- return
- roundinfo.deaths++
- if(!ismob(mob))
- return
- var/area = get_area(mob)
- var/attacker
- var/tod = time2text(world.realtime)
- var/health
- var/last
- if(ishuman(mob.lastattacker))
- attacker = mob.lastattacker:name
- else
- attacker = "None"
- health = "Oxy:[mob.oxyloss]Brute:[mob.bruteloss]Burn:[mob.fireloss]Toxins:[mob.toxloss]Brain:[mob.brainloss]"
- if(mob.attack_log.len >= 1)
- last = mob.attack_log[mob.attack_log.len]
- else
- last = "None"
-
- var/DBConnection/dbcon = new()
-
- dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
- if(!dbcon.IsConnected()) return
-
- var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `deathlog` (`ckey`,`location`,`lastattacker`,`ToD`,`health`,`lasthit`) VALUES ('[ckey]',[dbcon.Quote(area)],[dbcon.Quote(attacker)],'[tod]','[health]',[dbcon.Quote(last)])")
- if(!cquery.Execute()) message_admins(cquery.ErrorMsg())
-
-client/proc/onBought(names)
- if(!makejson) return
- if(!names) return
- var/DBConnection/dbcon = new()
-
- dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
- if(!dbcon.IsConnected()) return
-
- var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `traitorbuy` (`type`) VALUES ([dbcon.Quote(names)])")
- if(!cquery.Execute()) message_admins(cquery.ErrorMsg())
-
-datum/roundinfo
- var/core = 0
- var/deaths = 0
- var/revies = 0
- var/starttime = 0
- var/endtime = 0
- var/lenght = 0
- var/mode = 0
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Department Sec/__README.dm b/code/WorkInProgress/Sigyn/Department Sec/__README.dm
deleted file mode 100644
index e6b3f7967f..0000000000
--- a/code/WorkInProgress/Sigyn/Department Sec/__README.dm
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-
-Hey you!
-You only need to untick maps/tgstation.2.0.9.dmm for this if you download the modified map from:
-http://tgstation13.googlecode.com/files/tgstation.2.1.0_deptsec.zip
-
-Everything else can just be ticked on top of the original stuff.
-*/
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm
deleted file mode 100644
index 7f98a7b6ec..0000000000
--- a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm
+++ /dev/null
@@ -1,126 +0,0 @@
-var/list/sec_departments = list("engineering", "supply", "medical", "science")
-
-proc/assign_sec_to_department(var/mob/living/carbon/human/H)
- if(sec_departments.len)
- var/department = pick(sec_departments)
- sec_departments -= department
- var/access = null
- var/destination = null
- switch(department)
- if("supply")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/cargo(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/supply(H), slot_ears)
- access = list(access_mailsorting, access_mining)
- destination = /area/security/checkpoint/supply
- if("engineering")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/engine(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/engi(H), slot_ears)
- access = list(access_construction, access_engine)
- destination = /area/security/checkpoint/engineering
- if("medical")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/med(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/med(H), slot_ears)
- access = list(access_medical)
- destination = /area/security/checkpoint/medical
- if("science")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/science(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/sci(H), slot_ears)
- access = list(access_research)
- destination = /area/security/checkpoint/science
- else
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
-
-
- if(destination)
- var/teleport = 0
- if(!ticker || ticker.current_state <= GAME_STATE_SETTING_UP)
- teleport = 1
- spawn(15)
- if(H)
- if(teleport)
- var/turf/T
- var/safety = 0
- while(safety < 25)
- T = pick(get_area_turfs(destination))
- if(!H.Move(T))
- safety += 1
- continue
- else
- break
- H << "You have been assigned to [department]!"
- if(locate(/obj/item/weapon/card/id, H))
- var/obj/item/weapon/card/id/I = locate(/obj/item/weapon/card/id, H)
- if(I)
- I.access |= access
-
-
-/datum/job/officer
- title = "Security Officer"
- flag = OFFICER
- department_flag = ENGSEC
- faction = "Station"
- total_positions = 5
- spawn_positions = 5
- supervisors = "the head of security, and the head of your assigned department (if applicable)"
- selection_color = "#ffeeee"
-
-
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
- if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
- assign_sec_to_department(H)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/security(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet(H), slot_head)
- H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_s_store)
- H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
- if(H.backbag == 1)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
- H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
- else
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
-
- implant_loyalty(H)
-
- return 1
-
-/obj/item/device/radio/headset/headset_sec/department/New()
- if(radio_controller)
- initialize()
- recalculateChannels()
-
-/obj/item/device/radio/headset/headset_sec/department/engi
- keyslot1 = new /obj/item/device/encryptionkey/headset_sec
- keyslot2 = new /obj/item/device/encryptionkey/headset_eng
-
-/obj/item/device/radio/headset/headset_sec/department/supply
- keyslot1 = new /obj/item/device/encryptionkey/headset_sec
- keyslot2 = new /obj/item/device/encryptionkey/headset_cargo
-
-/obj/item/device/radio/headset/headset_sec/department/med
- keyslot1 = new /obj/item/device/encryptionkey/headset_sec
- keyslot2 = new /obj/item/device/encryptionkey/headset_med
-
-/obj/item/device/radio/headset/headset_sec/department/sci
- keyslot1 = new /obj/item/device/encryptionkey/headset_sec
- keyslot2 = new /obj/item/device/encryptionkey/headset_sci
-
-/obj/item/clothing/under/rank/security/cargo/New()
- var/obj/item/clothing/tie/armband/cargo/A = new /obj/item/clothing/tie/armband/cargo
- hastie = A
-
-/obj/item/clothing/under/rank/security/engine/New()
- var/obj/item/clothing/tie/armband/engine/A = new /obj/item/clothing/tie/armband/engine
- hastie = A
-
-/obj/item/clothing/under/rank/security/science/New()
- var/obj/item/clothing/tie/armband/science/A = new /obj/item/clothing/tie/armband/science
- hastie = A
-
-/obj/item/clothing/under/rank/security/med/New()
- var/obj/item/clothing/tie/armband/medgreen/A = new /obj/item/clothing/tie/armband/medgreen
- hastie = A
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Softcurity/__README.dm b/code/WorkInProgress/Sigyn/Softcurity/__README.dm
deleted file mode 100644
index 75c62c277d..0000000000
--- a/code/WorkInProgress/Sigyn/Softcurity/__README.dm
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
-
-Hey you!
-You'll need to untick code/game/jobs/access.dm for this to all work correctly!
-
-Everything else can just be ticked on top of the original stuff.
-
-You'll also need to download a modified map from http://tgstation13.googlecode.com/files/tgstation.2.0.9_Softcurity.zip.
-Make sure to untick the original map!
-*/
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Softcurity/access.dm b/code/WorkInProgress/Sigyn/Softcurity/access.dm
deleted file mode 100644
index de0179fad4..0000000000
--- a/code/WorkInProgress/Sigyn/Softcurity/access.dm
+++ /dev/null
@@ -1,522 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
-/var/const/access_security = 1 // Security equipment
-/var/const/access_brig = 2 // Brig timers and permabrig
-/var/const/access_armory = 3
-/var/const/access_forensics_lockers= 4
-/var/const/access_medical = 5
-/var/const/access_morgue = 6
-/var/const/access_tox = 7
-/var/const/access_tox_storage = 8
-/var/const/access_genetics = 9
-/var/const/access_engine = 10
-/var/const/access_engine_equip= 11
-/var/const/access_maint_tunnels = 12
-/var/const/access_external_airlocks = 13
-/var/const/access_emergency_storage = 14
-/var/const/access_change_ids = 15
-/var/const/access_ai_upload = 16
-/var/const/access_teleporter = 17
-/var/const/access_eva = 18
-/var/const/access_heads = 19
-/var/const/access_captain = 20
-/var/const/access_all_personal_lockers = 21
-/var/const/access_chapel_office = 22
-/var/const/access_tech_storage = 23
-/var/const/access_atmospherics = 24
-/var/const/access_bar = 25
-/var/const/access_janitor = 26
-/var/const/access_crematorium = 27
-/var/const/access_kitchen = 28
-/var/const/access_robotics = 29
-/var/const/access_rd = 30
-/var/const/access_cargo = 31
-/var/const/access_construction = 32
-/var/const/access_chemistry = 33
-/var/const/access_cargo_bot = 34
-/var/const/access_hydroponics = 35
-/var/const/access_manufacturing = 36
-/var/const/access_library = 37
-/var/const/access_lawyer = 38
-/var/const/access_virology = 39
-/var/const/access_cmo = 40
-/var/const/access_qm = 41
-/var/const/access_court = 42
-/var/const/access_clown = 43
-/var/const/access_mime = 44
-/var/const/access_surgery = 45
-/var/const/access_theatre = 46
-/var/const/access_research = 47
-/var/const/access_mining = 48
-/var/const/access_mining_office = 49 //not in use
-/var/const/access_mailsorting = 50
-/var/const/access_mint = 51
-/var/const/access_mint_vault = 52
-/var/const/access_heads_vault = 53
-/var/const/access_mining_station = 54
-/var/const/access_xenobiology = 55
-/var/const/access_ce = 56
-/var/const/access_hop = 57
-/var/const/access_hos = 58
-/var/const/access_RC_announce = 59 //Request console announcements
-/var/const/access_keycard_auth = 60 //Used for events which require at least two people to confirm them
-/var/const/access_tcomsat = 61 // has access to the entire telecomms satellite / machinery
-/var/const/access_gateway = 62
-/var/const/access_sec_doors = 63 // Security front doors
-
- //BEGIN CENTCOM ACCESS
- /*Should leave plenty of room if we need to add more access levels.
-/var/const/Mostly for admin fun times.*/
-/var/const/access_cent_general = 101//General facilities.
-/var/const/access_cent_thunder = 102//Thunderdome.
-/var/const/access_cent_specops = 103//Special Ops.
-/var/const/access_cent_medical = 104//Medical/Research
-/var/const/access_cent_living = 105//Living quarters.
-/var/const/access_cent_storage = 106//Generic storage areas.
-/var/const/access_cent_teleporter = 107//Teleporter.
-/var/const/access_cent_creed = 108//Creed's office.
-/var/const/access_cent_captain = 109//Captain's office/ID comp/AI.
-
- //The Syndicate
-/var/const/access_syndicate = 150//General Syndicate Access
-
- //MONEY
-/var/const/access_crate_cash = 200
-
-/obj/var/list/req_access = null
-/obj/var/req_access_txt = "0"
-/obj/var/list/req_one_access = null
-/obj/var/req_one_access_txt = "0"
-
-/obj/New()
- ..()
- //NOTE: If a room requires more than one access (IE: Morgue + medbay) set the req_acesss_txt to "5;6" if it requires 5 and 6
- if(src.req_access_txt)
- var/list/req_access_str = text2list(req_access_txt,";")
- if(!req_access)
- req_access = list()
- for(var/x in req_access_str)
- var/n = text2num(x)
- if(n)
- req_access += n
-
- if(src.req_one_access_txt)
- var/list/req_one_access_str = text2list(req_one_access_txt,";")
- if(!req_one_access)
- req_one_access = list()
- for(var/x in req_one_access_str)
- var/n = text2num(x)
- if(n)
- req_one_access += n
-
-
-
-//returns 1 if this mob has sufficient access to use this object
-/obj/proc/allowed(mob/M)
- //check if it doesn't require any access at all
- if(src.check_access(null))
- return 1
- if(istype(M, /mob/living/silicon))
- //AI can do whatever he wants
- return 1
- else if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- //if they are holding or wearing a card that has access, that works
- if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id))
- return 1
- else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid))
- var/mob/living/carbon/george = M
- //they can only hold things :(
- if(george.get_active_hand() && (istype(george.get_active_hand(), /obj/item/weapon/card/id) || istype(george.get_active_hand(), /obj/item/device/pda)) && src.check_access(george.get_active_hand()))
- return 1
- return 0
-
-/obj/item/proc/GetAccess()
- return list()
-
-/obj/item/proc/GetID()
- return null
-
-/obj/proc/check_access(obj/item/weapon/card/id/I)
-
- if (istype(I, /obj/item/device/pda))
- var/obj/item/device/pda/pda = I
- I = pda.id
-
- if(!src.req_access && !src.req_one_access) //no requirements
- return 1
- if(!istype(src.req_access, /list)) //something's very wrong
- return 1
-
- var/list/L = src.req_access
- if(!L.len && (!src.req_one_access || !src.req_one_access.len)) //no requirements
- return 1
- if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
- return 0
- for(var/req in src.req_access)
- if(!(req in I.access)) //doesn't have this access
- return 0
- if(src.req_one_access && src.req_one_access.len)
- for(var/req in src.req_one_access)
- if(req in I.access) //has an access from the single access list
- return 1
- return 0
- return 1
-
-
-/obj/proc/check_access_list(var/list/L)
- if(!src.req_access && !src.req_one_access) return 1
- if(!istype(src.req_access, /list)) return 1
- if(!src.req_access.len && (!src.req_one_access || !src.req_one_access.len)) return 1
- if(!L) return 0
- if(!istype(L, /list)) return 0
- for(var/req in src.req_access)
- if(!(req in L)) //doesn't have this access
- return 0
- if(src.req_one_access && src.req_one_access.len)
- for(var/req in src.req_one_access)
- if(req in L) //has an access from the single access list
- return 1
- return 0
- return 1
-
-
-/proc/get_access(job)
- switch(job)
- if("Geneticist")
- return list(access_medical, access_morgue, access_genetics)
- if("Station Engineer")
- return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
- if("Assistant")
- if(config.assistant_maint)
- return list(access_maint_tunnels)
- else
- return list()
- if("Chaplain")
- return list(access_morgue, access_chapel_office, access_crematorium)
- if("Detective")
- return list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
- if("Medical Doctor")
- return list(access_medical, access_morgue, access_surgery)
- if("Gardener") // -- TLE
- return list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
- if("Librarian") // -- TLE
- return list(access_library)
- if("Lawyer") //Muskets 160910
- return list(access_lawyer, access_court, access_sec_doors)
- if("Captain")
- return get_all_accesses()
- if("Crew Supervisor")
- return list(access_security, access_sec_doors, access_brig, access_court)
- if("Correctional Advisor")
- return list(access_security, access_sec_doors, access_brig, access_armory, access_court)
- if("Scientist")
- return list(access_tox, access_tox_storage, access_research, access_xenobiology)
- if("Safety Administrator")
- return list(access_medical, access_morgue, access_tox, access_tox_storage, access_chemistry, access_genetics, access_court,
- access_teleporter, access_heads, access_tech_storage, access_security, access_sec_doors, access_brig, access_atmospherics,
- access_maint_tunnels, access_bar, access_janitor, access_kitchen, access_robotics, access_armory, access_hydroponics,
- access_theatre, access_research, access_hos, access_RC_announce, access_forensics_lockers, access_keycard_auth, access_gateway)
- if("Head of Personnel")
- return list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
- access_tox, access_tox_storage, access_chemistry, access_medical, access_genetics, access_engine,
- access_emergency_storage, access_change_ids, access_ai_upload, access_eva, access_heads,
- access_all_personal_lockers, access_tech_storage, access_maint_tunnels, access_bar, access_janitor,
- access_crematorium, access_kitchen, access_robotics, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
- access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
- access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
- if("Atmospheric Technician")
- return list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
- if("Bartender")
- return list(access_bar)
- if("Chemist")
- return list(access_medical, access_chemistry)
- if("Janitor")
- return list(access_janitor, access_maint_tunnels)
- if("Clown")
- return list(access_clown, access_theatre)
- if("Mime")
- return list(access_mime, access_theatre)
- if("Chef")
- return list(access_kitchen, access_morgue)
- if("Roboticist")
- return list(access_robotics, access_tech_storage, access_morgue) //As a job that handles so many corpses, it makes sense for them to have morgue access.
- if("Cargo Technician")
- return list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
- if("Shaft Miner")
- return list(access_mining, access_mint, access_mining_station)
- if("Quartermaster")
- return list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
- if("Chief Engineer")
- return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
- access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
- access_heads, access_ai_upload, access_construction, access_robotics,
- access_mint, access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_sec_doors)
- if("Research Director")
- return list(access_rd, access_heads, access_tox, access_genetics,
- access_tox_storage, access_teleporter,
- access_research, access_robotics, access_xenobiology,
- access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_sec_doors)
- if("Virologist")
- return list(access_medical, access_virology)
- if("Chief Medical Officer")
- return list(access_medical, access_morgue, access_genetics, access_heads,
- access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
- access_keycard_auth, access_sec_doors)
- else
- return list()
-
-/proc/get_centcom_access(job)
- switch(job)
- if("VIP Guest")
- return list(access_cent_general)
- if("Custodian")
- return list(access_cent_general, access_cent_living, access_cent_storage)
- if("Thunderdome Overseer")
- return list(access_cent_general, access_cent_thunder)
- if("Intel Officer")
- return list(access_cent_general, access_cent_living)
- if("Medical Officer")
- return list(access_cent_general, access_cent_living, access_cent_medical)
- if("Death Commando")
- return list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)
- if("Research Officer")
- return list(access_cent_general, access_cent_specops, access_cent_medical, access_cent_teleporter, access_cent_storage)
- if("BlackOps Commander")
- return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_living, access_cent_storage, access_cent_creed)
- if("Supreme Commander")
- return get_all_centcom_access()
-
-/proc/get_all_accesses()
- return list(access_security, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_court,
- access_medical, access_genetics, access_morgue, access_rd,
- access_tox, access_tox_storage, access_chemistry, access_engine, access_engine_equip, access_maint_tunnels,
- access_external_airlocks, access_emergency_storage, access_change_ids, access_ai_upload,
- access_teleporter, access_eva, access_heads, access_captain, access_all_personal_lockers,
- access_tech_storage, access_chapel_office, access_atmospherics, access_kitchen,
- access_bar, access_janitor, access_crematorium, access_robotics, access_cargo, access_cargo_bot, access_construction,
- access_hydroponics, access_library, access_manufacturing, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery,
- access_theatre, access_research, access_mining, access_mailsorting, access_mint_vault, access_mint,
- access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
- access_keycard_auth, access_tcomsat, access_gateway)
-
-/proc/get_all_centcom_access()
- return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain)
-
-/proc/get_all_syndicate_access()
- return list(access_syndicate)
-
-/proc/get_region_accesses(var/code)
- switch(code)
- if(0)
- return get_all_accesses()
- if(1) //security
- return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
- if(2) //medbay
- return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
- if(3) //research
- return list(access_research, access_tox, access_tox_storage, access_xenobiology, access_rd)
- if(4) //engineering and maintenance
- return list(access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_construction, access_robotics, access_ce)
- if(5) //command
- return list(access_heads, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_all_personal_lockers, access_heads_vault, access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_hop, access_captain)
- if(6) //station general
- return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer, access_clown, access_mime)
- if(7) //supply
- return list(access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_mining, access_mining_station)
-
-/proc/get_region_accesses_name(var/code)
- switch(code)
- if(0)
- return "All"
- if(1) //security
- return "Security"
- if(2) //medbay
- return "Medbay"
- if(3) //research
- return "Research"
- if(4) //engineering and maintenance
- return "Engineering"
- if(5) //command
- return "Command"
- if(6) //station general
- return "Station General"
- if(7) //supply
- return "Supply"
-
-
-/proc/get_access_desc(A)
- switch(A)
- if(access_cargo)
- return "Cargo Bay"
- if(access_cargo_bot)
- return "Cargo Bot Delivery"
- if(access_security)
- return "Security"
- if(access_brig)
- return "Holding Cells"
- if(access_court)
- return "Courtroom"
- if(access_forensics_lockers)
- return "Detective's Office"
- if(access_medical)
- return "Medical"
- if(access_genetics)
- return "Genetics Lab"
- if(access_morgue)
- return "Morgue"
- if(access_tox)
- return "Research Lab"
- if(access_tox_storage)
- return "Toxins Storage"
- if(access_chemistry)
- return "Chemistry Lab"
- if(access_rd)
- return "RD Private"
- if(access_bar)
- return "Bar"
- if(access_janitor)
- return "Custodial Closet"
- if(access_engine)
- return "Engineering"
- if(access_engine_equip)
- return "APCs"
- if(access_maint_tunnels)
- return "Maintenance"
- if(access_external_airlocks)
- return "External Airlocks"
- if(access_emergency_storage)
- return "Emergency Storage"
- if(access_change_ids)
- return "ID Computer"
- if(access_ai_upload)
- return "AI Upload"
- if(access_teleporter)
- return "Teleporter"
- if(access_eva)
- return "EVA"
- if(access_heads)
- return "Bridge"
- if(access_captain)
- return "Captain Private"
- if(access_all_personal_lockers)
- return "Personal Lockers"
- if(access_chapel_office)
- return "Chapel Office"
- if(access_tech_storage)
- return "Technical Storage"
- if(access_atmospherics)
- return "Atmospherics"
- if(access_crematorium)
- return "Crematorium"
- if(access_armory)
- return "Armory"
- if(access_construction)
- return "Construction Areas"
- if(access_kitchen)
- return "Kitchen"
- if(access_hydroponics)
- return "Hydroponics"
- if(access_library)
- return "Library"
- if(access_lawyer)
- return "Law Office"
- if(access_robotics)
- return "Robotics"
- if(access_virology)
- return "Virology"
- if(access_cmo)
- return "CMO Private"
- if(access_qm)
- return "Quartermaster's Office"
- if(access_clown)
- return "HONK! Access"
- if(access_mime)
- return "Silent Access"
- if(access_surgery)
- return "Surgery"
- if(access_theatre)
- return "Theatre"
- if(access_manufacturing)
- return "Manufacturing"
- if(access_research)
- return "Science"
- if(access_mining)
- return "Mining"
- if(access_mining_office)
- return "Mining Office"
- if(access_mailsorting)
- return "Delivery Office"
- if(access_mint)
- return "Mint"
- if(access_mint_vault)
- return "Mint Vault"
- if(access_heads_vault)
- return "Main Vault"
- if(access_mining_station)
- return "Mining Station EVA"
- if(access_xenobiology)
- return "Xenobiology Lab"
- if(access_hop)
- return "HoP Private"
- if(access_hos)
- return "HoS Private"
- if(access_ce)
- return "CE Private"
- if(access_RC_announce)
- return "RC Announcements"
- if(access_keycard_auth)
- return "Keycode Auth. Device"
- if(access_tcomsat)
- return "Telecommunications"
- if(access_gateway)
- return "Gateway"
- if(access_sec_doors)
- return "Brig"
-
-/proc/get_centcom_access_desc(A)
- switch(A)
- if(access_cent_general)
- return "Code Grey"
- if(access_cent_thunder)
- return "Code Yellow"
- if(access_cent_storage)
- return "Code Orange"
- if(access_cent_living)
- return "Code Green"
- if(access_cent_medical)
- return "Code White"
- if(access_cent_teleporter)
- return "Code Blue"
- if(access_cent_specops)
- return "Code Black"
- if(access_cent_creed)
- return "Code Silver"
- if(access_cent_captain)
- return "Code Gold"
-
-/proc/get_all_jobs()
- return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Chef", "Gardener", "Quartermaster", "Cargo Technician",
- "Shaft Miner", "Clown", "Mime", "Janitor", "Librarian", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer",
- "Atmospheric Technician", "Roboticist", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist",
- "Research Director", "Scientist", "Head of Security", "Warden", "Detective", "Security Officer")
-
-/proc/get_all_centcom_jobs()
- return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
-
-/obj/proc/GetJobName()
- if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
- return
-
- var/jobName
-
- if(istype(src, /obj/item/device/pda))
- if(src:id)
- jobName = src:id:assignment
- if(istype(src, /obj/item/weapon/card/id))
- jobName = src:assignment
-
- if(jobName in get_all_jobs())
- return jobName
- else
- return "Unknown"
diff --git a/code/WorkInProgress/Sigyn/Softcurity/clothing.dm b/code/WorkInProgress/Sigyn/Softcurity/clothing.dm
deleted file mode 100644
index 057c10cb57..0000000000
--- a/code/WorkInProgress/Sigyn/Softcurity/clothing.dm
+++ /dev/null
@@ -1,33 +0,0 @@
-/obj/item/clothing/under/rank/administrator
- name = "safety administrator's jumpsuit"
- desc = "It's a jumpsuit worn by those few with the dedication to achieve the position of \"Safety Administrator\"."
- icon_state = "hosblueclothes"
- 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
-
-/obj/item/clothing/under/rank/advisor
- name = "correctional advisor's jumpsuit"
- desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for more robust protection. It has the words \"Correctional Advisor\" written on the shoulders."
- icon_state = "wardenblueclothes"
- 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
-
-/obj/item/clothing/under/rank/supervisor
- name = "crew supervisor's jumpsuit"
- desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for robust protection."
- icon_state = "officerblueclothes"
- 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
-
-/obj/item/clothing/shoes/boots
- name = "boots"
- desc = "Nanotrasen-issue hard-toe safety boots."
- icon_state = "secshoes"
- item_state = "secshoes"
- color = "hosred"
\ No newline at end of file
diff --git a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm
deleted file mode 100644
index a47e4ea43e..0000000000
--- a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm
+++ /dev/null
@@ -1,150 +0,0 @@
-/datum/job/hos
- title = "Safety Administrator"
- flag = HOS
- department_flag = ENGSEC
- faction = "Station"
- total_positions = 1
- spawn_positions = 1
- supervisors = "the captain"
- selection_color = "#ffdddd"
- idtype = /obj/item/weapon/card/id/silver
- req_admin_notify = 1
-
-
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/administrator(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/taser(H), slot_s_store)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
-
- H.implant_loyalty(src) // Will not do so if config is set to disallow.
-
- return 1
-
-
-
-/datum/job/warden
- title = "Correctional Advisor"
- flag = WARDEN
- department_flag = ENGSEC
- faction = "Station"
- total_positions = 1
- spawn_positions = 1
- supervisors = "the safety administrator"
- selection_color = "#ffeeee"
-
-
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/advisor(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/warden(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
- H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
-
- H.implant_loyalty(src) // // Will not do so if config is set to disallow.
-
- return 1
-
-
-
-/datum/job/detective
- title = "Detective"
- flag = DETECTIVE
- department_flag = ENGSEC
- faction = "Station"
- total_positions = 1
- spawn_positions = 1
- supervisors = "the safety administrator"
- selection_color = "#ffeeee"
-
-
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/detective(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head)
- var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H)
- CIG.light("")
- H.equip_to_slot_or_del(CIG, slot_wear_mask)
- H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/det_suit(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(H), slot_l_store)
-
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
-
- H.implant_loyalty(src) // Will not do so if config is set to disallow.
- return 1
-
-
-
-/datum/job/officer
- title = "Crew Supervisor"
- flag = OFFICER
- department_flag = ENGSEC
- faction = "Station"
- total_positions = 5
- spawn_positions = 5
- supervisors = "the safety administrator"
- selection_color = "#ffeeee"
-
-
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/supervisor(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/security(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_r_store)
- H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
-
- H.implant_loyalty(src) // Will not do so if config is set to disallow.
-
- return 1
-
-/datum/job/hop
- title = "Head of Personnel"
- flag = HOP
- department_flag = CIVILIAN
- faction = "Station"
- total_positions = 1
- spawn_positions = 1
- supervisors = "the captain"
- selection_color = "#ddddff"
- idtype = /obj/item/weapon/card/id/silver
- req_admin_notify = 1
-
-
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
- if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
- if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
- if(H.backbag == 1)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H), slot_r_hand)
- else
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H.back), slot_in_backpack)
- return 1
diff --git a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm
deleted file mode 100644
index 1f65f9f8d2..0000000000
--- a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm
+++ /dev/null
@@ -1,227 +0,0 @@
-/obj/structure/closet/secure_closet/captains
- name = "Captain's Locker"
- req_access = list(access_captain)
- icon_state = "capsecure1"
- icon_closed = "capsecure"
- icon_locked = "capsecure1"
- icon_opened = "capsecureopen"
- icon_broken = "capsecurebroken"
- icon_off = "capsecureoff"
-
- New()
- if(prob(50))
- new /obj/item/weapon/storage/backpack/captain(src)
- else
- new /obj/item/weapon/storage/backpack/satchel_cap(src)
- new /obj/item/clothing/suit/captunic(src)
- new /obj/item/clothing/head/helmet/cap(src)
- new /obj/item/clothing/under/rank/captain(src)
- new /obj/item/clothing/suit/armor/vest(src)
- new /obj/item/weapon/cartridge/captain(src)
- new /obj/item/clothing/head/helmet/swat(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/device/radio/headset/heads/captain(src)
- new /obj/item/weapon/reagent_containers/food/drinks/flask(src)
- new /obj/item/clothing/gloves/captain(src)
- new /obj/item/weapon/gun/energy/gun(src)
- return
-
-
-
-/obj/structure/closet/secure_closet/hop
- name = "Head of Personnel's Locker"
- req_access = list(access_hop)
- icon_state = "hopsecure1"
- icon_closed = "hopsecure"
- icon_locked = "hopsecure1"
- icon_opened = "hopsecureopen"
- icon_broken = "hopsecurebroken"
- icon_off = "hopsecureoff"
-
- New()
- 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)
- new /obj/item/weapon/cartridge/hop(src)
- new /obj/item/device/radio/headset/heads/hop(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/weapon/storage/id_kit(src)
- new /obj/item/weapon/storage/id_kit( src )
- new /obj/item/device/flash(src)
- new /obj/item/clothing/glasses/sunglasses(src)
- return
-
-
-
-/obj/structure/closet/secure_closet/hos
- name = "Safety Administrator's Locker"
- req_access = list(access_hos)
- icon_state = "hossecure1"
- icon_closed = "hossecure"
- icon_locked = "hossecure1"
- icon_opened = "hossecureopen"
- icon_broken = "hossecurebroken"
- icon_off = "hossecureoff"
-
- New()
- 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)
- if (config.use_loyalty_implants) new /obj/item/weapon/storage/lockbox/loyalty(src)
- new /obj/item/weapon/storage/flashbang_kit(src)
- new /obj/item/weapon/storage/belt/security(src)
- new /obj/item/device/flash(src)
- new /obj/item/weapon/melee/baton(src)
- new /obj/item/weapon/gun/energy/taser(src)
- new /obj/item/weapon/reagent_containers/spray/pepper(src)
- return
-
-
-
-/obj/structure/closet/secure_closet/warden
- name = "Correctional Advisor's Locker"
- req_access = list(access_armory)
- icon_state = "wardensecure1"
- icon_closed = "wardensecure"
- icon_locked = "wardensecure1"
- icon_opened = "wardensecureopen"
- icon_broken = "wardensecurebroken"
- icon_off = "wardensecureoff"
-
-
- New()
- 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)
- new /obj/item/clothing/glasses/sunglasses(src)
- new /obj/item/weapon/storage/flashbang_kit(src)
- new /obj/item/weapon/storage/belt/security(src)
- new /obj/item/weapon/reagent_containers/spray/pepper(src)
- new /obj/item/weapon/reagent_containers/spray/pepper(src)
- new /obj/item/weapon/melee/baton(src)
- return
-
-
-
-/obj/structure/closet/secure_closet/security
- name = "Crew Supervisor's Locker"
- req_access = list(access_security)
- icon_state = "sec1"
- icon_closed = "sec"
- icon_locked = "sec1"
- icon_opened = "secopen"
- icon_broken = "secbroken"
- icon_off = "secoff"
-
- New()
- 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)
- new /obj/item/device/flash(src)
- new /obj/item/weapon/reagent_containers/spray/pepper(src)
- new /obj/item/weapon/reagent_containers/spray/pepper(src)
- new /obj/item/clothing/glasses/sunglasses(src)
- return
-
-
-
-/obj/structure/closet/secure_closet/detective
- name = "Detective's Cabinet"
- req_access = list(access_forensics_lockers)
- icon_state = "cabinetdetective_locked"
- icon_closed = "cabinetdetective"
- icon_locked = "cabinetdetective_locked"
- icon_opened = "cabinetdetective_open"
- icon_broken = "cabinetdetective_broken"
- icon_off = "cabinetdetective_broken"
-
- New()
- new /obj/item/clothing/under/det(src)
- new /obj/item/clothing/suit/armor/det_suit(src)
- new /obj/item/clothing/suit/det_suit(src)
- new /obj/item/clothing/gloves/black(src)
- new /obj/item/clothing/head/det_hat(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/device/radio/headset/headset_sec(src)
- new /obj/item/weapon/cartridge/detective(src)
- new /obj/item/weapon/clipboard(src)
- new /obj/item/device/detective_scanner(src)
- new /obj/item/weapon/storage/box/evidence(src)
- return
-
-/obj/structure/closet/secure_closet/detective/update_icon()
- if(broken)
- icon_state = icon_broken
- else
- if(!opened)
- if(locked)
- icon_state = icon_locked
- else
- icon_state = icon_closed
- else
- icon_state = icon_opened
-
-/obj/structure/closet/secure_closet/injection
- name = "Lethal Injections"
- req_access = list(access_hos)
-
-
- New()
- new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
- new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
- return
-
-
-
-/obj/structure/closet/secure_closet/brig
- name = "Brig Locker"
- req_access = list(access_brig)
- anchored = 1
-
- New()
- new /obj/item/clothing/under/color/orange( src )
- new /obj/item/clothing/shoes/orange( src )
- return
-
-
-
-/obj/structure/closet/secure_closet/courtroom
- name = "Courtroom Locker"
- req_access = list(access_court)
-
- New()
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/weapon/paper/Court (src)
- new /obj/item/weapon/paper/Court (src)
- new /obj/item/weapon/paper/Court (src)
- new /obj/item/weapon/pen (src)
- new /obj/item/clothing/suit/judgerobe (src)
- new /obj/item/clothing/head/powdered_wig (src)
- new /obj/item/weapon/storage/briefcase(src)
- return
-
-/obj/structure/closet/secure_closet/wall
- name = "wall locker"
- req_access = list(access_security)
- icon_state = "wall-locker1"
- density = 1
- icon_closed = "wall-locker"
- icon_locked = "wall-locker1"
- icon_opened = "wall-lockeropen"
- icon_broken = "wall-lockerbroken"
- icon_off = "wall-lockeroff"
-
- //too small to put a man in
- large = 0
-
-/obj/structure/closet/secure_closet/wall/update_icon()
- if(broken)
- icon_state = icon_broken
- else
- if(!opened)
- if(locked)
- icon_state = icon_locked
- else
- icon_state = icon_closed
- else
- icon_state = icon_opened
diff --git a/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm b/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm
deleted file mode 100644
index 00a6b83d91..0000000000
--- a/code/WorkInProgress/Sigyn/Softcurity/wardrobe.dm
+++ /dev/null
@@ -1,311 +0,0 @@
-/obj/structure/closet/wardrobe
- name = "wardrobe"
- desc = "It's a storage unit for standard-issue Nanotrasen attire."
- icon_state = "blue"
- icon_closed = "blue"
-
-/obj/structure/closet/wardrobe/New()
- new /obj/item/clothing/under/color/blue(src)
- new /obj/item/clothing/under/color/blue(src)
- new /obj/item/clothing/under/color/blue(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/shoes/brown(src)
- return
-
-
-/obj/structure/closet/wardrobe/red
- name = "security wardrobe"
- icon_state = "red"
- icon_closed = "red"
-
-/obj/structure/closet/wardrobe/red/New()
- new /obj/item/clothing/under/rank/supervisor(src)
- new /obj/item/clothing/under/rank/supervisor(src)
- new /obj/item/clothing/under/rank/supervisor(src)
- new /obj/item/clothing/shoes/boots(src)
- new /obj/item/clothing/shoes/boots(src)
- new /obj/item/clothing/shoes/boots(src)
- new /obj/item/clothing/head/soft/grey(src)
- new /obj/item/clothing/head/soft/grey(src)
- new /obj/item/clothing/head/soft/grey(src)
- return
-
-
-/obj/structure/closet/wardrobe/pink
- name = "pink wardrobe"
- icon_state = "pink"
- icon_closed = "pink"
-
-/obj/structure/closet/wardrobe/pink/New()
- new /obj/item/clothing/under/color/pink(src)
- new /obj/item/clothing/under/color/pink(src)
- new /obj/item/clothing/under/color/pink(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/shoes/brown(src)
- return
-
-/obj/structure/closet/wardrobe/black
- name = "black wardrobe"
- icon_state = "black"
- icon_closed = "black"
-
-/obj/structure/closet/wardrobe/black/New()
- new /obj/item/clothing/under/color/black(src)
- new /obj/item/clothing/under/color/black(src)
- new /obj/item/clothing/under/color/black(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/head/that(src)
- new /obj/item/clothing/head/that(src)
- new /obj/item/clothing/head/that(src)
- return
-
-
-/obj/structure/closet/wardrobe/chaplain_black
- name = "chapel wardrobe"
- desc = "It's a storage unit for Nanotrasen-approved religious attire."
- icon_state = "black"
- icon_closed = "black"
-
-/obj/structure/closet/wardrobe/chaplain_black/New()
- new /obj/item/clothing/under/rank/chaplain(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/suit/nun(src)
- new /obj/item/clothing/head/nun_hood(src)
- new /obj/item/clothing/suit/chaplain_hoodie(src)
- new /obj/item/clothing/head/chaplain_hood(src)
- new /obj/item/clothing/suit/holidaypriest(src)
- new /obj/item/weapon/storage/backpack/cultpack (src)
- new /obj/item/weapon/storage/fancy/candle_box(src)
- new /obj/item/weapon/storage/fancy/candle_box(src)
- return
-
-
-/obj/structure/closet/wardrobe/green
- name = "green wardrobe"
- icon_state = "green"
- icon_closed = "green"
-
-/obj/structure/closet/wardrobe/green/New()
- new /obj/item/clothing/under/color/green(src)
- new /obj/item/clothing/under/color/green(src)
- new /obj/item/clothing/under/color/green(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- return
-
-
-/obj/structure/closet/wardrobe/orange
- name = "prison wardrobe"
- desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
- icon_state = "orange"
- icon_closed = "orange"
-
-/obj/structure/closet/wardrobe/orange/New()
- new /obj/item/clothing/under/color/orange(src)
- new /obj/item/clothing/under/color/orange(src)
- new /obj/item/clothing/under/color/orange(src)
- new /obj/item/clothing/shoes/orange(src)
- new /obj/item/clothing/shoes/orange(src)
- new /obj/item/clothing/shoes/orange(src)
- return
-
-
-/obj/structure/closet/wardrobe/yellow
- name = "yellow wardrobe"
- icon_state = "wardrobe-y"
- icon_closed = "wardrobe-y"
-
-/obj/structure/closet/wardrobe/yellow/New()
- new /obj/item/clothing/under/color/yellow(src)
- new /obj/item/clothing/under/color/yellow(src)
- new /obj/item/clothing/under/color/yellow(src)
- new /obj/item/clothing/shoes/orange(src)
- new /obj/item/clothing/shoes/orange(src)
- new /obj/item/clothing/shoes/orange(src)
- return
-
-
-/obj/structure/closet/wardrobe/atmospherics_yellow
- name = "atmospherics wardrobe"
- icon_state = "yellow"
- icon_closed = "yellow"
-
-/obj/structure/closet/wardrobe/atmospherics_yellow/New()
- new /obj/item/clothing/under/rank/atmospheric_technician(src)
- new /obj/item/clothing/under/rank/atmospheric_technician(src)
- new /obj/item/clothing/under/rank/atmospheric_technician(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- return
-
-
-
-/obj/structure/closet/wardrobe/engineering_yellow
- name = "engineering wardrobe"
- icon_state = "yellow"
- icon_closed = "yellow"
-
-/obj/structure/closet/wardrobe/engineering_yellow/New()
- new /obj/item/clothing/under/rank/engineer(src)
- new /obj/item/clothing/under/rank/engineer(src)
- new /obj/item/clothing/under/rank/engineer(src)
- new /obj/item/clothing/shoes/orange(src)
- new /obj/item/clothing/shoes/orange(src)
- new /obj/item/clothing/shoes/orange(src)
- return
-
-
-/obj/structure/closet/wardrobe/white
- name = "white wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/white/New()
- new /obj/item/clothing/under/color/white(src)
- new /obj/item/clothing/under/color/white(src)
- new /obj/item/clothing/under/color/white(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- return
-
-
-/obj/structure/closet/wardrobe/pjs
- name = "Pajama wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/pjs/New()
- new /obj/item/clothing/under/pj/red(src)
- new /obj/item/clothing/under/pj/red(src)
- new /obj/item/clothing/under/pj/blue(src)
- new /obj/item/clothing/under/pj/blue(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- return
-
-
-/obj/structure/closet/wardrobe/science_white
- name = "science wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/science_white/New()
- new /obj/item/clothing/under/rank/scientist(src)
- new /obj/item/clothing/under/rank/scientist(src)
- new /obj/item/clothing/under/rank/scientist(src)
- new /obj/item/clothing/suit/labcoat(src)
- new /obj/item/clothing/suit/labcoat(src)
- new /obj/item/clothing/suit/labcoat(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- return
-
-
-/obj/structure/closet/wardrobe/robotics_black
- name = "robotics wardrobe"
- icon_state = "black"
- icon_closed = "black"
-
-/obj/structure/closet/wardrobe/robotics_black/New()
- new /obj/item/clothing/under/rank/roboticist(src)
- new /obj/item/clothing/under/rank/roboticist(src)
- new /obj/item/clothing/suit/labcoat(src)
- new /obj/item/clothing/suit/labcoat(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/gloves/black(src)
- new /obj/item/clothing/gloves/black(src)
- return
-
-
-/obj/structure/closet/wardrobe/chemistry_white
- name = "chemistry wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/chemistry_white/New()
- new /obj/item/clothing/under/rank/chemist(src)
- new /obj/item/clothing/under/rank/chemist(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/suit/labcoat/chemist(src)
- new /obj/item/clothing/suit/labcoat/chemist(src)
- return
-
-
-/obj/structure/closet/wardrobe/genetics_white
- name = "genetics wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/genetics_white/New()
- new /obj/item/clothing/under/rank/geneticist(src)
- new /obj/item/clothing/under/rank/geneticist(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/suit/labcoat/genetics(src)
- new /obj/item/clothing/suit/labcoat/genetics(src)
- return
-
-
-/obj/structure/closet/wardrobe/virology_white
- name = "virology wardrobe"
- icon_state = "white"
- icon_closed = "white"
-
-/obj/structure/closet/wardrobe/virology_white/New()
- new /obj/item/clothing/under/rank/virologist(src)
- new /obj/item/clothing/under/rank/virologist(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/suit/labcoat/virologist(src)
- new /obj/item/clothing/suit/labcoat/virologist(src)
- new /obj/item/clothing/mask/surgical(src)
- new /obj/item/clothing/mask/surgical(src)
- return
-
-
-/obj/structure/closet/wardrobe/grey
- name = "grey wardrobe"
- icon_state = "grey"
- icon_closed = "grey"
-
-/obj/structure/closet/wardrobe/grey/New()
- new /obj/item/clothing/under/color/grey(src)
- new /obj/item/clothing/under/color/grey(src)
- new /obj/item/clothing/under/color/grey(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/head/soft/grey(src)
- new /obj/item/clothing/head/soft/grey(src)
- new /obj/item/clothing/head/soft/grey(src)
- return
-
-
-/obj/structure/closet/wardrobe/mixed
- name = "mixed wardrobe"
- icon_state = "mixed"
- icon_closed = "mixed"
-
-/obj/structure/closet/wardrobe/mixed/New()
- new /obj/item/clothing/under/color/white(src)
- new /obj/item/clothing/under/color/blue(src)
- new /obj/item/clothing/under/color/yellow(src)
- new /obj/item/clothing/under/color/green(src)
- new /obj/item/clothing/under/color/orange(src)
- new /obj/item/clothing/under/color/pink(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/shoes/white(src)
- return
diff --git a/code/WorkInProgress/SkyMarshal/Ultralight.dm b/code/WorkInProgress/SkyMarshal/Ultralight.dm
deleted file mode 100644
index f5065223c9..0000000000
--- a/code/WorkInProgress/SkyMarshal/Ultralight.dm
+++ /dev/null
@@ -1,385 +0,0 @@
-//UltraLight system, by Sukasa
-
-
-#define UL_I_FALLOFF_SQUARE 0
-#define UL_I_FALLOFF_ROUND 1
-
-#define UL_I_LIT 0
-#define UL_I_EXTINGUISHED 1
-#define UL_I_ONZERO 2
-#define UL_I_CHANGING 3
-
-#define ul_LightingEnabled 1
-//#define ul_LightingResolution 2
-//Uncomment if you want maybe slightly smoother lighting
-#define ul_Steps 7
-#define ul_FalloffStyle UL_I_FALLOFF_ROUND // Sets the lighting falloff to be either squared or circular.
-#define ul_Layer 10
-#define ul_TopLuminosity 12 //Maximum brightness an object can have.
-
-//#define ul_LightLevelChangedUpdates
-//Uncomment if you have code that you want triggered when the light level on an atom changes.
-
-
-#define ul_Clamp(Value) min(max(Value, 0), ul_Steps)
-#define ul_IsLuminous(A) (A.ul_Red || A.ul_Green || A.ul_Blue)
-#define ul_Luminosity(A) max(A.ul_Red, A.ul_Green, A.ul_Blue)
-
-
-#ifdef ul_LightingResolution
-var/ul_LightingResolutionSqrt = sqrt(ul_LightingResolution)
-#endif
-var/ul_SuppressLightLevelChanges = 0
-
-
-var/list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7)
-
-var/list/ul_IconCache = list()
-
-
-proc/ul_UnblankLocal(var/list/ReApply = view(ul_TopLuminosity, src))
- for(var/atom/Light in ReApply)
- if(ul_IsLuminous(Light))
- Light.ul_Illuminate()
- return
-
-atom/var/ul_Red = 0
-atom/var/ul_Green = 0
-atom/var/ul_Blue = 0
-atom/var/turf/ul_LastIlluminated
-
-atom/var/ul_Extinguished = UL_I_ONZERO
-
-atom/proc/ul_SetLuminosity(var/Red = 0, var/Green = Red, var/Blue = Red)
-
- if(ul_Extinguished == UL_I_CHANGING) //Changing state, just supress any changes, to prevent glitches.
- return
-
- if(ul_Red == min(Red, ul_TopLuminosity) && ul_Green == min(Green, ul_TopLuminosity) && ul_Blue == min(Blue, ul_TopLuminosity))
- return //No point doing all that work if it won't have any effect anyways...
-
- if (ul_Extinguished == UL_I_EXTINGUISHED)
- ul_Red = min(Red,ul_TopLuminosity)
- ul_Green = min(Green,ul_TopLuminosity)
- ul_Blue = min(Blue,ul_TopLuminosity)
-
- return
-
- if (ul_IsLuminous(src))
- ul_Extinguish()
-
- ul_Red = min(Red,ul_TopLuminosity)
- ul_Green = min(Green,ul_TopLuminosity)
- ul_Blue = min(Blue,ul_TopLuminosity)
-
- ul_Extinguished = UL_I_ONZERO
-
- if (ul_IsLuminous(src))
- ul_Illuminate()
-
- return
-
-atom/proc/ul_Illuminate()
- if (ul_Extinguished == UL_I_LIT)
- return
-
- ul_Extinguished = UL_I_CHANGING
-
- luminosity = ul_Luminosity(src)
-
- for(var/turf/Affected in view(luminosity, src))
- var/Falloff = ul_FalloffAmount(Affected)
-
- var/DeltaRed = ul_Red - Falloff
- var/DeltaGreen = ul_Green - Falloff
- var/DeltaBlue = ul_Blue - Falloff
-
- if(DeltaRed > 0 || DeltaGreen > 0 || DeltaBlue > 0)
-
- if(DeltaRed > 0)
- if(!Affected.MaxRed)
- Affected.MaxRed = list()
- Affected.MaxRed += DeltaRed
-
- if(DeltaGreen > 0)
- if(!Affected.MaxGreen)
- Affected.MaxGreen = list()
- Affected.MaxGreen += DeltaGreen
-
- if(DeltaBlue > 0)
- if(!Affected.MaxBlue)
- Affected.MaxBlue = list()
- Affected.MaxBlue += DeltaBlue
-
- Affected.ul_UpdateLight()
-
- #ifdef ul_LightLevelChangedUpdates
- if (ul_SuppressLightLevelChanges == 0)
- Affected.ul_LightLevelChanged()
-
- for(var/atom/AffectedAtom in Affected)
- AffectedAtom.ul_LightLevelChanged()
- #endif
-
- ul_LastIlluminated = get_turf(src)
- ul_Extinguished = UL_I_LIT
-
- return
-
-atom/proc/ul_Extinguish()
-
- if (ul_Extinguished != UL_I_LIT)
- return
-
- ul_Extinguished = UL_I_CHANGING
-
- for(var/turf/Affected in view(ul_Luminosity(src), ul_LastIlluminated))
-
- var/Falloff = ul_LastIlluminated.ul_FalloffAmount(Affected)
-
- var/DeltaRed = ul_Red - Falloff
- var/DeltaGreen = ul_Green - Falloff
- var/DeltaBlue = ul_Blue - Falloff
-
- if(DeltaRed > 0 || DeltaGreen > 0 || DeltaBlue > 0)
-
- if(DeltaRed > 0)
- if(Affected.MaxRed)
- var/removed_light_source = Affected.MaxRed.Find(DeltaRed)
- if(removed_light_source)
- Affected.MaxRed.Cut(removed_light_source, removed_light_source+1)
- if(!Affected.MaxRed.len)
- del Affected.MaxRed
-
- if(DeltaGreen > 0)
- if(Affected.MaxGreen)
- var/removed_light_source = Affected.MaxGreen.Find(DeltaGreen)
- if(removed_light_source)
- Affected.MaxGreen.Cut(removed_light_source, removed_light_source+1)
- if(!Affected.MaxGreen.len)
- del Affected.MaxGreen
-
- if(DeltaBlue > 0)
- if(Affected.MaxBlue)
- var/removed_light_source = Affected.MaxBlue.Find(DeltaBlue)
- if(removed_light_source)
- Affected.MaxBlue.Cut(removed_light_source, removed_light_source+1)
- if(!Affected.MaxBlue.len)
- del Affected.MaxBlue
-
- Affected.ul_UpdateLight()
-
- #ifdef ul_LightLevelChangedUpdates
- if (ul_SuppressLightLevelChanges == 0)
- Affected.ul_LightLevelChanged()
-
- for(var/atom/AffectedAtom in Affected)
- AffectedAtom.ul_LightLevelChanged()
- #endif
-
- ul_Extinguished = UL_I_EXTINGUISHED
- luminosity = 0
- ul_LastIlluminated = null
-
- return
-
-
-/*
- Calculates the correct lighting falloff value (used to calculate what brightness to set the turf to) to use,
- when called on a luminous atom and passed an atom in the turf to be lit.
-
- Supports multiple configurations, BS12 uses the circular falloff setting. This setting uses an array lookup
- to avoid the cost of the square root function.
-*/
-atom/proc/ul_FalloffAmount(var/atom/ref)
- if (ul_FalloffStyle == UL_I_FALLOFF_ROUND)
- var/delta_x = (ref.x - src.x)
- var/delta_y = (ref.y - src.y)
-
- #ifdef ul_LightingResolution
- if (round((delta_x*delta_x + delta_y*delta_y)*ul_LightingResolutionSqrt,1) > ul_FastRoot.len)
- for(var/i = ul_FastRoot.len, i <= round(delta_x*delta_x+delta_y*delta_y*ul_LightingResolutionSqrt,1), i++)
- ul_FastRoot += round(sqrt(i))
- return ul_FastRoot[round((delta_x*delta_x + delta_y*delta_y)*ul_LightingResolutionSqrt, 1) + 1]/ul_LightingResolution
-
- #else
- if ((delta_x*delta_x + delta_y*delta_y) > ul_FastRoot.len)
- for(var/i = ul_FastRoot.len, i <= delta_x*delta_x+delta_y*delta_y, i++)
- ul_FastRoot += round(sqrt(i))
- return ul_FastRoot[delta_x*delta_x + delta_y*delta_y + 1]
-
- #endif
-
- else if (ul_FalloffStyle == UL_I_FALLOFF_SQUARE)
- return get_dist(src, ref)
-
- return 0
-
-atom/proc/ul_SetOpacity(var/NewOpacity)
- if(opacity != NewOpacity)
-
- var/list/Blanked = ul_BlankLocal()
-
- opacity = NewOpacity
-
- ul_UnblankLocal(Blanked)
-
- return
-
-atom/proc/ul_BlankLocal()
- var/list/Blanked = list( )
- var/TurfAdjust = isturf(src) ? 1 : 0
-
- for(var/atom/Affected in view(ul_TopLuminosity, src))
- if(ul_IsLuminous(Affected) && Affected.ul_Extinguished == UL_I_LIT && (ul_FalloffAmount(Affected) <= ul_Luminosity(Affected) + TurfAdjust))
- Affected.ul_Extinguish()
- Blanked += Affected
-
- return Blanked
-
-atom/proc/ul_LightLevelChanged()
- //Designed for client projects to use. Called on items when the turf they are in has its light level changed
- return
-
-atom/New()
- . = ..()
- if(ul_IsLuminous(src))
- spawn(5)
- ul_Illuminate()
-
-atom/Del()
- if(ul_IsLuminous(src))
- ul_Extinguish()
- . = ..()
-
-atom/movable/Move()
- if(ul_IsLuminous(src))
- ul_Extinguish()
- . = ..()
- ul_Illuminate()
- else
- return ..()
-
-
-turf/var/list/MaxRed
-turf/var/list/MaxGreen
-turf/var/list/MaxBlue
-
-turf/proc/ul_GetRed()
- if(MaxRed)
- return ul_Clamp(max(MaxRed))
- return 0
-turf/proc/ul_GetGreen()
- if(MaxGreen)
- return ul_Clamp(max(MaxGreen))
- return 0
-turf/proc/ul_GetBlue()
- if(MaxBlue)
- return ul_Clamp(max(MaxBlue))
- return 0
-
-turf/proc/ul_UpdateLight()
- var/area/CurrentArea = loc
-
- if(!isarea(CurrentArea) || !CurrentArea.ul_Lighting)
- return
-
- var/LightingTag = copytext(CurrentArea.tag, 1, findtext(CurrentArea.tag, ":UL")) + ":UL[ul_GetRed()]_[ul_GetGreen()]_[ul_GetBlue()]"
-
- if(CurrentArea.tag != LightingTag)
- var/area/NewArea = locate(LightingTag)
-
- if(!NewArea)
- NewArea = new CurrentArea.type()
- NewArea.tag = LightingTag
-
- for(var/V in CurrentArea.vars - "contents")
- if(issaved(CurrentArea.vars[V]))
- NewArea.vars[V] = CurrentArea.vars[V]
-
- NewArea.tag = LightingTag
-
- NewArea.ul_Light(ul_GetRed(), ul_GetGreen(), ul_GetBlue())
-
-
- NewArea.contents += src
-
- return
-
-turf/proc/ul_Recalculate()
-
- ul_SuppressLightLevelChanges++
-
- var/list/Lights = ul_BlankLocal()
-
- ul_UnblankLocal(Lights)
-
- ul_SuppressLightLevelChanges--
-
- return
-
-area/var/ul_Overlay = null
-area/var/ul_Lighting = 1
-
-area/var/LightLevelRed = 0
-area/var/LightLevelGreen = 0
-area/var/LightLevelBlue = 0
-area/var/list/LightLevels
-
-area/proc/ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blue = LightLevelBlue)
-
- if(!src || !src.ul_Lighting)
- return
-
- overlays -= ul_Overlay
- if(LightLevels)
- if(Red < LightLevels["Red"])
- Red = LightLevels["Red"]
- if(Green < LightLevels["Green"])
- Green = LightLevels["Green"]
- if(Blue < LightLevels["Blue"])
- Blue = LightLevels["Blue"]
-
- LightLevelRed = Red
- LightLevelGreen = Green
- LightLevelBlue = Blue
-
- luminosity = LightLevelRed || LightLevelGreen || LightLevelBlue
-
- var/ul_CachedOverlay = ul_IconCache["[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]"]
- if(ul_CachedOverlay)
- ul_Overlay = ul_CachedOverlay
- else
- ul_IconCache["[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]"] = image('icons/effects/ULIcons.dmi', , "[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]", ul_Layer)
- ul_Overlay = ul_IconCache["[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]"]
-
- overlays += ul_Overlay
-
- return
-
-area/proc/ul_Prep()
-
- if(!tag)
- tag = "[type]"
- if(ul_Lighting)
- if(!findtext(tag,":UL"))
- ul_Light()
- //world.log << tag
-
- return
-
-#undef UL_I_FALLOFF_SQUARE
-#undef UL_I_FALLOFF_ROUND
-#undef UL_I_LIT
-#undef UL_I_EXTINGUISHED
-#undef UL_I_ONZERO
-#undef ul_LightingEnabled
-#undef ul_LightingResolution
-#undef ul_Steps
-#undef ul_FalloffStyle
-#undef ul_Layer
-#undef ul_TopLuminosity
-#undef ul_Clamp
-#undef ul_LightLevelChangedUpdates
\ No newline at end of file
diff --git a/code/WorkInProgress/SkyMarshal/Ultralight_procs.dm b/code/WorkInProgress/SkyMarshal/Ultralight_procs.dm
deleted file mode 100644
index 81ba9c458c..0000000000
--- a/code/WorkInProgress/SkyMarshal/Ultralight_procs.dm
+++ /dev/null
@@ -1,32 +0,0 @@
-
-// MOVED HERE FROM ULTRALIGHT WHICH IS PROBABLY A BAD THING
-#define UL_I_FALLOFF_SQUARE 0
-#define UL_I_FALLOFF_ROUND 1
-#define ul_FalloffStyle UL_I_FALLOFF_ROUND // Sets the lighting falloff to be either squared or circular.
-var/list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7)
-
-atom/proc/ul_FalloffAmount(var/atom/ref)
- if (ul_FalloffStyle == UL_I_FALLOFF_ROUND)
- var/delta_x = (ref.x - src.x)
- var/delta_y = (ref.y - src.y)
-
- #ifdef ul_LightingResolution
- if (round((delta_x*delta_x + delta_y*delta_y)*ul_LightingResolutionSqrt,1) > ul_FastRoot.len)
- for(var/i = ul_FastRoot.len, i <= round(delta_x*delta_x+delta_y*delta_y*ul_LightingResolutionSqrt,1), i++)
- ul_FastRoot += round(sqrt(i))
- return ul_FastRoot[round((delta_x*delta_x + delta_y*delta_y)*ul_LightingResolutionSqrt, 1) + 1]/ul_LightingResolution
-
- #else
- if ((delta_x*delta_x + delta_y*delta_y) > ul_FastRoot.len)
- for(var/i = ul_FastRoot.len, i <= delta_x*delta_x+delta_y*delta_y, i++)
- ul_FastRoot += round(sqrt(i))
- return ul_FastRoot[delta_x*delta_x + delta_y*delta_y + 1]
-
- #endif
-
- else if (ul_FalloffStyle == UL_I_FALLOFF_SQUARE)
- return get_dist(src, ref)
-
- return 0
\ No newline at end of file
diff --git a/code/WorkInProgress/SkyMarshal/coatrack.dm b/code/WorkInProgress/SkyMarshal/coatrack.dm
deleted file mode 100644
index efc64b1e2f..0000000000
--- a/code/WorkInProgress/SkyMarshal/coatrack.dm
+++ /dev/null
@@ -1,96 +0,0 @@
-/obj/machinery/coatrack/attack_hand(mob/user as mob)
- switch(alert("What do you want from the coat rack?",,"Coat","Hat"))
- if("Coat")
- if(coat)
- if(!user.get_active_hand())
- user.put_in_hand(coat)
- else
- coat.loc = get_turf(user)
- coat = null
- if(!hat)
- icon_state = "coatrack0"
- else
- icon_state = "coatrack1"
- return
- else
- user << "\blue There is no coat to take!"
- return
- if("Hat")
- if(hat)
- if(!user.get_active_hand())
- user.put_in_hand(hat)
- else
- hat.loc = get_turf(user)
- hat = null
- if(!coat)
- icon_state = "coatrack0"
- else
- icon_state = "coatrack2"
- return
- else
- user << "\blue There is no hat to take!"
- return
- user << "Something went wrong."
- return
-
-/obj/machinery/coatrack/attackby(obj/item/weapon/W as obj, mob/user as mob)
- var/obj/item/I = user.equipped()
- if ( istype(I,/obj/item/clothing/head/det_hat) && !hat)
- user.drop_item()
- I.loc = src
- hat = I
- if(!coat)
- icon_state = "coatrack1"
- else
- icon_state = "coatrack3"
- for(var/mob/M in viewers(src, null))
- if(M.client)
- M.show_message(text("\blue [user] puts his hat onto the rack."), 2)
- return
- if ( istype(I,/obj/item/clothing/suit/storage/det_suit) && !coat)
- user.drop_item()
- I.loc = src
- coat = I
- if(!hat)
- icon_state = "coatrack2"
- else
- icon_state = "coatrack3"
- for(var/mob/M in viewers(src, null))
- if(M.client)
- M.show_message(text("\blue [user] puts his coat onto the rack."), 2)
- return
- if ( istype(I,/obj/item/clothing/head/det_hat) && hat)
- user << "There's already a hat on the rack!"
- return ..()
- if ( istype(I,/obj/item/clothing/suit/storage/det_suit) && coat)
- user << "There's already a coat on the rack!"
- return ..()
- user << "The coat rack wants none of what you offer."
- return ..()
-
-
-/obj/machinery/coatrack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
- if ( istype(mover,/obj/item/clothing/head/det_hat) && !hat)
- mover.loc = src
- hat = mover
- if(!coat)
- icon_state = "coatrack1"
- else
- icon_state = "coatrack3"
- for(var/mob/M in viewers(src, null))
- if(M.client)
- M.show_message(text("\blue The hat lands perfectly atop its hanger!"), 2)
- return 0
- if ( istype(mover,/obj/item/clothing/suit/storage/det_suit) && !coat)
- mover.loc = src
- coat = mover
- if(!hat)
- icon_state = "coatrack2"
- else
- icon_state = "coatrack3"
- for(var/mob/M in viewers(src, null))
- if(M.client)
- M.show_message(text("\blue The coat lands perfectly atop its hanger!"), 2)
- return 0
- else
- return 0
\ No newline at end of file
diff --git a/code/WorkInProgress/SkyMarshal/officer_stuff.dm b/code/WorkInProgress/SkyMarshal/officer_stuff.dm
deleted file mode 100644
index 13cca94a8b..0000000000
--- a/code/WorkInProgress/SkyMarshal/officer_stuff.dm
+++ /dev/null
@@ -1,43 +0,0 @@
- // Reference: http://www.teuse.net/personal/harrington/hh_bible.htm
- // http://www.trmn.org/portal/images/uniforms/rmn/rmn_officer_srv_dress_lrg.png
-
-/obj/item/clothing/head/beret/centcom/officer
- 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"
- desc = "They appear impeccably polished."
- icon_state = "laceups"
-
-/obj/item/clothing/under/rank/centcom/representative
- desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Ensign\" and bears \"N.C.V. Fearless CV-286\" on the left shounder."
- name = "\improper NanoTrasen Navy Uniform"
- icon_state = "officer"
- item_state = "g_suit"
- item_color = "officer"
- displays_id = 0
-
-/obj/item/clothing/under/rank/centcom/officer
- desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Lieutenant Commander\" and bears \"N.C.V. Fearless CV-286\" on the left shounder."
- name = "\improper NanoTrasen Officers Uniform"
- icon_state = "officer"
- item_state = "g_suit"
- item_color = "officer"
- displays_id = 0
-
-/obj/item/clothing/under/rank/centcom/captain
- desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Captain\" and bears \"N.C.V. Fearless CV-286\" on the left shounder."
- name = "\improper NanoTrasen Captains Uniform"
- icon_state = "centcom"
- item_state = "dg_suit"
- item_color = "centcom"
- displays_id = 0
\ No newline at end of file
diff --git a/code/WorkInProgress/SkyMarshal/portalathe.dm b/code/WorkInProgress/SkyMarshal/portalathe.dm
deleted file mode 100644
index 1c2ceb15b2..0000000000
--- a/code/WorkInProgress/SkyMarshal/portalathe.dm
+++ /dev/null
@@ -1,21 +0,0 @@
-//May expand later, but right now it just repairs lights.
-/obj/item/device/portalathe
- name = "portable autolathe"
- desc = "A device which can repair broken lights instantly. Must be advanced."
- icon = 'icons/obj/janitor.dmi'
- icon_state = "portalathe"
-
- afterattack(var/atom/target, mob/user as mob)
- if(!target || !user)
- return
- if(!istype(target))
- return
- if(!istype(target, /obj/machinery/light))
- return
- var/obj/machinery/light/L = target
- if(L.status > 1) //Burned or broke
- L.status = 0
- L.on = 1
- L.update()
- user.visible_message("[user] repairs \the [target] on the spot with their [src]!","You repair the lightbulb!","You hear a soft whiiir-pop noise over the sound of flexing glass, followed by the soft hum of an activated [target].")
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/SkyMarshal/traitoritems.dm b/code/WorkInProgress/SkyMarshal/traitoritems.dm
deleted file mode 100644
index b42a36685e..0000000000
--- a/code/WorkInProgress/SkyMarshal/traitoritems.dm
+++ /dev/null
@@ -1,76 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06
-
-/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"
- w_class = 1.0
- m_amt = 80
-/*
-/obj/item/device/jammer
- name = "strange device"
- 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()
- var/time_remaining = 5
-
-/obj/item/device/jammer/New()
- ..()
- time_remaining = rand(10,20) // ~2-4 BYOND seconds of use.
- return
-
-/obj/item/device/jammer/attack_self(mob/user)
-
- if(time_remaining > 0)
- on = !on
- icon_state = "t-ray[on]"
-
- if(on)
- processing_objects.Add(src)
- else
- on = 0
- icon_state = "t-ray0"
- user << "It's fried itself from overuse!"
- if(Old)
- for(var/obj/item/device/radio/T in Old)
- T.scrambleoverride = 0
- Old = null
- Curr = null
-
-
-/obj/item/device/jammer/process()
- if(!on)
- processing_objects.Remove(src)
- return null
-
- Old = Curr
- Curr = list()
-
- for(var/obj/item/device/radio/T in range(3, src.loc) )
-
- T.scrambleoverride = 1
- Curr |= T
- for(var/obj/item/device/radio/V in Old)
- if(V == T)
- Old -= V
- break
-
- for(var/obj/item/device/radio/T in Old)
- T.scrambleoverride = 0
-
- time_remaining--
- if(time_remaining <= 0)
- for(var/mob/O in viewers(src))
- O.show_message("\red You hear a loud pop, like circuits frying.", 1)
- on = 0
- icon_state = "t-ray0"
-
- sleep(2)
- */
diff --git a/code/WorkInProgress/SkyMarshal/wardrobes.dm b/code/WorkInProgress/SkyMarshal/wardrobes.dm
deleted file mode 100755
index ffbf4d6983..0000000000
--- a/code/WorkInProgress/SkyMarshal/wardrobes.dm
+++ /dev/null
@@ -1,611 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06
-
-/obj/item/wardrobe
- name = "\improper Wardrobe"
- desc = "A standard-issue bag for clothing and equipment. Usually comes sealed, stocked with everything you need for a particular job."
- icon = 'icons/obj/clothing/suits.dmi'
- icon_state = "wardrobe_sealed"
- item_state = "wardrobe"
- w_class = 4
- layer = 2.99
- var/descriptor = "various clothing"
- var/seal_torn = 0
-
- attack_self(mob/user)
- if(!contents.len)
- user << "It's empty!"
- else
- user.visible_message("\blue [user] unwraps the clothing from the [src][seal_torn ? "" : ", tearing the seal"].")
- seal_torn = 1
-
- for(var/obj/item/I in src)
- I.loc = get_turf(src)
- update_icon()
- return
-
- attackby(var/obj/item/I as obj, var/mob/user as mob)
- if(istype(I, /obj/item/wardrobe) || istype(I, /obj/item/weapon/evidencebag))
- return
- if(contents.len < 20)
- if(istype(I, /obj/item/weapon/grab))
- return
- user.drop_item()
-
- if(I)
- I.loc = src
-
- update_icon()
- else
- user << "\red There's not enough space to fit that!"
- return
-
- afterattack(atom/A as obj|turf, mob/user as mob)
- if(A in user)
- return
- if(!istype(A.loc,/turf))
- user << "It's got to be on the ground to do that!"
- return
- var/could_fill = 1
- for (var/obj/O in locate(A.x,A.y,A.z))
- if (contents.len < 20)
- if(istype(O,/obj/item/wardrobe))
- continue
- if(O.anchored || O.density || istype(O,/obj/structure))
- continue
- contents += O;
- else
- could_fill = 0
- break
- if(could_fill)
- user << "\blue You pick up all the items."
- else
- user << "\blue You try to pick up all of the items, but run out of space in the bag."
- user.visible_message("\blue [user] gathers up[could_fill ? " " : " most of "]the pile of items and puts it into [src].")
- update_icon()
-
- 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)
- icon_state = "wardrobe"
- else
- icon_state = "wardrobe_empty"
- return
-
- New()
- ..()
- pixel_x = rand(0,4) -2
- pixel_y = rand(0,4) -2
-
-/obj/item/wardrobe/assistant
- name = "\improper Assistant Wardrobe"
- descriptor = "clothing and basic equipment for an assistant"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda(src)
- new /obj/item/device/radio/headset(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/color/grey(src)
-
-/obj/item/wardrobe/chief_engineer
- name = "\improper Chief Engineer Wardrobe"
- descriptor = "clothing and basic equipment for a Chief Engineer"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/industrial/BPK = new /obj/item/weapon/storage/backpack/industrial(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/heads/ce(src)
- new /obj/item/device/multitool(src)
- new /obj/item/device/flash(src)
- new /obj/item/clothing/head/helmet/hardhat/white(src)
- new /obj/item/clothing/head/helmet/welding(src)
- new /obj/item/weapon/storage/belt/utility/full(src)
- new /obj/item/weapon/storage/toolbox/mechanical(src)
- new /obj/item/clothing/suit/storage/hazardvest(src)
- new /obj/item/clothing/gloves/yellow(src)
- new /obj/item/clothing/mask/gas(src)
- new /obj/item/clothing/glasses/meson(src)
- new /obj/item/device/radio/headset/heads/ce(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/under/rank/chief_engineer(src)
-
-/obj/item/wardrobe/engineer
- name = "\improper Station Engineer Wardrobe"
- descriptor = "clothing and basic equipment for a Station Engineer"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/industrial/BPK = new /obj/item/weapon/storage/backpack/industrial(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/engineering(src)
- new /obj/item/device/t_scanner(src)
- new /obj/item/clothing/suit/storage/hazardvest(src)
- new /obj/item/weapon/storage/belt/utility/full(src)
- new /obj/item/weapon/storage/toolbox/mechanical(src)
- new /obj/item/clothing/mask/gas(src)
- new /obj/item/clothing/head/helmet/hardhat(src)
- new /obj/item/clothing/glasses/meson(src)
- new /obj/item/device/radio/headset/headset_eng(src)
- new /obj/item/clothing/shoes/orange(src)
- new /obj/item/clothing/under/rank/engineer(src)
-
-/obj/item/wardrobe/atmos
- name = "\improper Atmospheric Technician Wardrobe"
- descriptor = "clothing and basic equipment for an Atmospheric Technician"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/engineering(src)
- new /obj/item/weapon/storage/toolbox/mechanical(src)
- new /obj/item/device/radio/headset/headset_eng(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/atmospheric_technician(src)
-
-/obj/item/wardrobe/roboticist
- name = "\improper Roboticist Wardrobe"
- descriptor = "clothing and basic equipment for a Roboticist"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/engineering(src)
- new /obj/item/weapon/storage/toolbox/mechanical(src)
- new /obj/item/clothing/suit/storage/labcoat(src)
- new /obj/item/clothing/gloves/black(src)
- new /obj/item/device/radio/headset/headset_rob(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/roboticist(src)
-
-/obj/item/wardrobe/chaplain
- name = "\improper Chaplain Wardrobe"
- descriptor = "clothing and basic equipment for a Chaplain"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/weapon/storage/bible(src)
- new /obj/item/device/pda/chaplain(src)
- new /obj/item/device/radio/headset(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/chaplain(src)
-
-/obj/item/wardrobe/captain
- name = "\improper Captain Wardrobe"
- descriptor = "clothing and basic equipment for a Captain"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/captain(src)
- new /obj/item/weapon/storage/id_kit(src)
- new /obj/item/weapon/reagent_containers/food/drinks/flask(src)
- new /obj/item/weapon/gun/energy/gun(src)
- new /obj/item/clothing/glasses/sunglasses(src)
- new /obj/item/clothing/suit/storage/captunic(src)
- new /obj/item/clothing/suit/armor/vest(src)
- new /obj/item/clothing/head/caphat(src)
- new /obj/item/clothing/gloves/captain(src)
- new /obj/item/clothing/head/helmet/swat(src)
- new /obj/item/device/radio/headset/heads/captain(src)
- new /obj/item/clothing/shoes/jackboots(src)
- new /obj/item/clothing/under/rank/captain(src)
-
-/obj/item/wardrobe/hop
- name = "\improper Head of Personnel Wardrobe"
- descriptor = "clothing and basic equipment for a Head of Personnel"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/weapon/clipboard(src)
- new /obj/item/device/pda/heads/hop(src)
- new /obj/item/weapon/storage/id_kit(src)
- new /obj/item/device/flash(src)
- new /obj/item/clothing/glasses/sunglasses(src)
- new /obj/item/clothing/gloves/blue(src)
- new /obj/item/device/radio/headset/heads/hop(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/under/rank/head_of_personnel(src)
-
-/obj/item/wardrobe/cmo
- name = "\improper Chief Medical Officer Wardrobe"
- descriptor = "clothing and basic equipment for a Chief Medical Officer"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/medic/BPK = new /obj/item/weapon/storage/backpack/medic(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/heads/cmo(src)
- new /obj/item/weapon/storage/firstaid/adv(src)
- new /obj/item/device/flashlight/pen(src)
- new /obj/item/clothing/gloves/latex(src)
- new /obj/item/clothing/suit/bio_suit/cmo(src)
- new /obj/item/clothing/head/bio_hood/cmo(src)
- new /obj/item/clothing/suit/storage/labcoat/cmo(src)
- new /obj/item/clothing/suit/storage/labcoat/cmoalt(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/device/radio/headset/heads/cmo(src)
- new /obj/item/clothing/under/rank/chief_medical_officer(src)
- new /obj/item/device/healthanalyzer(src)
-
-/obj/item/wardrobe/doctor
- name = "\improper Medical Doctor Wardrobe"
- descriptor = "clothing and basic equipment for a Medical Doctor"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/medic/BPK = new /obj/item/weapon/storage/backpack/medic(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/medical(src)
- new /obj/item/weapon/storage/firstaid/adv(src)
- new /obj/item/device/flashlight/pen(src)
- new /obj/item/clothing/suit/storage/labcoat(src)
- new /obj/item/clothing/head/nursehat (src)
- new /obj/item/weapon/storage/belt/medical(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/device/radio/headset/headset_med(src)
- new /obj/item/clothing/under/rank/nursesuit (src)
- new /obj/item/clothing/under/rank/medical(src)
- new /obj/item/device/healthanalyzer(src)
-
-/obj/item/wardrobe/geneticist
- name = "\improper Geneticist Wardrobe"
- descriptor = "clothing and basic equipment for a Geneticist"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/medic/BPK = new /obj/item/weapon/storage/backpack/medic(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/medical(src)
- new /obj/item/device/flashlight/pen(src)
- new /obj/item/clothing/suit/storage/labcoat/genetics(src)
- new /obj/item/device/radio/headset/headset_medsci(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/under/rank/geneticist(src)
-
-/obj/item/wardrobe/virologist
- name = "\improper Virologist Wardrobe"
- descriptor = "clothing and basic equipment for a Virologist"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/medic/BPK = new /obj/item/weapon/storage/backpack/medic(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/flashlight/pen(src)
- new /obj/item/device/pda/medical(src)
- new /obj/item/clothing/mask/surgical(src)
- new /obj/item/clothing/suit/storage/labcoat/virologist(src)
- new /obj/item/device/radio/headset/headset_med(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/under/rank/medical(src)
-
-/obj/item/wardrobe/rd
- name = "\improper Research Director Wardrobe"
- descriptor = "clothing and basic equipment for a Research Director"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/device/pda/heads/rd(src)
- new /obj/item/weapon/clipboard(src)
- new /obj/item/weapon/tank/air(src)
- new /obj/item/clothing/mask/gas(src)
- new /obj/item/device/flash(src)
- new /obj/item/clothing/suit/bio_suit/scientist(src)
- new /obj/item/clothing/head/bio_hood/scientist(src)
- new /obj/item/clothing/suit/storage/labcoat(src)
- new /obj/item/clothing/gloves/latex(src)
- new /obj/item/device/radio/headset/heads/rd(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/under/rank/research_director(src)
-
-/obj/item/wardrobe/scientist
- name = "\improper Scientist Wardrobe"
- descriptor = "clothing and basic equipment for a Scientist"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/science(src)
- new /obj/item/weapon/tank/oxygen(src)
- new /obj/item/clothing/mask/gas(src)
- new /obj/item/clothing/suit/storage/labcoat/science(src)
- new /obj/item/device/radio/headset/headset_sci(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/clothing/under/rank/scientist(src)
-
-/obj/item/wardrobe/chemist
- name = "\improper Chemist Wardrobe"
- descriptor = "clothing and basic equipment for a Chemist"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/medic/BPK = new /obj/item/weapon/storage/backpack/medic(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/radio/headset/headset_medsci(src)
- new /obj/item/clothing/under/rank/chemist(src)
- new /obj/item/clothing/shoes/white(src)
- new /obj/item/device/pda/science(src)
- new /obj/item/clothing/suit/storage/labcoat/chemist(src)
-
-/obj/item/wardrobe/hos
- name = "\improper Head of Security Wardrobe"
- descriptor = "clothing and basic equipment for a Head of Security"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/security/BPK = new /obj/item/weapon/storage/backpack/security(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/weapon/melee/baton(src)
- new /obj/item/weapon/gun/energy/gun(src)
- new /obj/item/device/flash(src)
- new /obj/item/device/pda/heads/hos(src)
- new /obj/item/clothing/suit/storage/armourrigvest(src)
- new /obj/item/clothing/suit/armor/hos(src)
- new /obj/item/clothing/head/helmet/HoS(src)
- new /obj/item/weapon/storage/belt/security(src)
- new /obj/item/clothing/gloves/hos(src)
- new /obj/item/clothing/glasses/sunglasses/sechud(src)
- new /obj/item/device/radio/headset/heads/hos(src)
- new /obj/item/clothing/shoes/jackboots(src)
- new /obj/item/clothing/under/rank/head_of_security(src)
-
-/obj/item/wardrobe/warden
- name = "\improper Warden Wardrobe"
- descriptor = "clothing and basic equipment for a Warden"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/security/BPK = new /obj/item/weapon/storage/backpack/security(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/flash(src)
- new /obj/item/weapon/melee/baton(src)
- new /obj/item/weapon/gun/energy/taser(src)
- new /obj/item/device/pda/security(src)
- new /obj/item/clothing/suit/armor/vest(src)
- new /obj/item/clothing/suit/storage/gearharness(src)
- new /obj/item/clothing/head/helmet/warden(src)
- new /obj/item/clothing/gloves/red(src)
- new /obj/item/weapon/storage/belt/security(src)
- new /obj/item/clothing/glasses/sunglasses/sechud(src)
- new /obj/item/device/radio/headset/headset_sec(src)
- new /obj/item/clothing/shoes/jackboots(src)
- new /obj/item/clothing/under/rank/warden(src)
- new /obj/item/clothing/suit/armor/vest/warden(src)
- new /obj/item/weapon/pepperspray(src)
-
-/obj/item/wardrobe/detective
- name = "\improper Detective Wardrobe"
- descriptor = "clothing and basic equipment for a Detective"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/security/BPK = new /obj/item/weapon/storage/backpack/security(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/fcardholder(src)
- new /obj/item/weapon/clipboard(src)
- new /obj/item/weapon/clipboard/notebook(src)
- new /obj/item/device/detective_scanner(src)
- new /obj/item/taperoll/police(src)
- new /obj/item/weapon/storage/box/evidence(src)
- new /obj/item/device/pda/detective(src)
- new /obj/item/clothing/suit/storage/det_suit/armor(src)
- new /obj/item/clothing/suit/storage/det_suit(src)
- new /obj/item/clothing/gloves/detective(src)
- new /obj/item/clothing/head/det_hat(src)
- new /obj/item/device/radio/headset/headset_sec(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/under/det(src)
- new /obj/item/weapon/camera_film(src)
-
-/obj/item/wardrobe/officer
- name = "\improper Security Officer Wardrobe"
- descriptor = "clothing and basic equipment for a Security Officer"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/security/BPK = new /obj/item/weapon/storage/backpack/security(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/weapon/pepperspray(src)
- new /obj/item/device/flash(src)
- new /obj/item/weapon/melee/baton(src)
- new /obj/item/taperoll/police(src)
- new /obj/item/weapon/flashbang(src)
- new /obj/item/device/pda/security(src)
- new /obj/item/clothing/suit/armor/vest(src)
- new /obj/item/clothing/suit/storage/gearharness(src)
- new /obj/item/clothing/glasses/sunglasses/sechud(src)
- new /obj/item/weapon/storage/belt/security(src)
- new /obj/item/clothing/head/helmet(src)
- new /obj/item/clothing/head/secsoft(src)
- new /obj/item/clothing/gloves/red(src)
- new /obj/item/device/radio/headset/headset_sec(src)
- new /obj/item/clothing/shoes/jackboots(src)
- new /obj/item/clothing/under/rank/security(src)
-
-
-
-/obj/item/wardrobe/bartender
- name = "\improper Bartender Wardrobe"
- descriptor = "clothing and basic equipment for a Bartender"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/ammo_casing/shotgun/beanbag(BPK)
- new /obj/item/ammo_casing/shotgun/beanbag(BPK)
- new /obj/item/ammo_casing/shotgun/beanbag(BPK)
- new /obj/item/ammo_casing/shotgun/beanbag(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/radio/headset(src)
- new /obj/item/clothing/suit/armor/vest(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/bartender(src)
-
-/obj/item/wardrobe/chef
- name = "\improper Chef Wardrobe"
- descriptor = "clothing and basic equipment for a Chef"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/clothing/suit/storage/chef(src)
- new /obj/item/clothing/head/chefhat(src)
- new /obj/item/device/radio/headset(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/chef(src)
-
-/obj/item/wardrobe/hydro
- name = "\improper Botanist Wardrobe"
- descriptor = "clothing and basic equipment for a Botanist"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/analyzer/plant_analyzer(src)
- new /obj/item/clothing/suit/storage/apron(src)
- new /obj/item/clothing/gloves/botanic_leather(src)
- new /obj/item/device/radio/headset(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/hydroponics(src)
-
-/obj/item/wardrobe/qm
- name = "\improper Quartermaster Wardrobe"
- descriptor = "clothing and basic equipment for a Quartermaster"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/weapon/clipboard(src)
- new /obj/item/device/pda/quartermaster(src)
- new /obj/item/clothing/glasses/sunglasses(src)
- new /obj/item/device/radio/headset/heads/qm(src)
- new /obj/item/clothing/shoes/brown(src)
- new /obj/item/clothing/under/rank/cargo(src)
-
-/obj/item/wardrobe/cargo_tech
- name = "\improper Cargo Technician Wardrobe"
- descriptor = "clothing and basic equipment for a Cargo Technician"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/quartermaster(src)
- new /obj/item/device/radio/headset/headset_cargo(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/cargotech(src)
- new /obj/item/clothing/gloves/fingerless/black(src)
-
-/obj/item/wardrobe/mining
- name = "\improper Shaft Miner Wardrobe"
- descriptor = "clothing and basic equipment for a Shaft Miner"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/industrial/BPK = new /obj/item/weapon/storage/backpack/industrial(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/analyzer(src)
- new /obj/item/weapon/satchel(src)
- new /obj/item/device/flashlight/lantern(src)
- new /obj/item/weapon/shovel(src)
- new /obj/item/weapon/pickaxe(src)
- new /obj/item/weapon/crowbar(src)
- new /obj/item/clothing/glasses/meson(src)
- new /obj/item/device/radio/headset/headset_mine(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/miner(src)
- new /obj/item/clothing/gloves/fingerless/black(src)
-
-/obj/item/wardrobe/janitor
- name = "\improper Janitor Wardrobe"
- descriptor = "clothing and basic equipment for a Janitor"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/janitor(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/rank/janitor(src)
- new /obj/item/device/portalathe(src)
-
-/obj/item/wardrobe/librarian
- name = "\improper Librarian Wardrobe"
- descriptor = "clothing and basic equipment for a Librarian"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/weapon/barcodescanner(src)
- new /obj/item/clothing/shoes/black(src)
- new /obj/item/clothing/under/suit_jacket/red(src)
-
-/obj/item/wardrobe/lawyer
- name = "\improper Lawyer Wardrobe"
- descriptor = "clothing and basic equipment for a Lawyer"
-
- New()
- ..()
- var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
- new /obj/item/weapon/storage/box(BPK)
- new /obj/item/weapon/pen(src)
- new /obj/item/device/pda/lawyer(src)
- new /obj/item/device/detective_scanner(src)
- new /obj/item/weapon/storage/briefcase(src)
- new /obj/item/clothing/shoes/brown(src)
- if(prob(50))
- new /obj/item/clothing/under/lawyer/bluesuit(src)
- new /obj/item/clothing/suit/storage/lawyer/bluejacket(src)
- else
- new /obj/item/clothing/under/lawyer/purpsuit(src)
- new /obj/item/clothing/suit/storage/lawyer/purpjacket(src)
-
-
diff --git a/code/WorkInProgress/Susan/susan_desert_turfs.dm b/code/WorkInProgress/Susan/susan_desert_turfs.dm
deleted file mode 100644
index a52f90a4bc..0000000000
--- a/code/WorkInProgress/Susan/susan_desert_turfs.dm
+++ /dev/null
@@ -1,467 +0,0 @@
-//this is everything i'm going to be using in my outpost zeta map, and possibly future maps.
-
-turf/unsimulated/desert
- name = "desert"
- icon = 'code/WorkInProgress/Susan/desert.dmi'
- icon_state = "desert"
- temperature = 393.15
- luminosity = 5
- lighting_lumcount = 8
-
-turf/unsimulated/desert/New()
- icon_state = "desert[rand(0,4)]"
-
-turf/simulated/wall/impassable_rock
- name = "Mountain Wall"
-
- //so that you can see the impassable sections in the map editor
- icon_state = "riveted"
- New()
- icon_state = "rock"
-
-/area/awaymission/labs/researchdivision
- name = "Research"
- icon_state = "away3"
-
-/area/awaymission/labs/militarydivision
- name = "Military"
- icon_state = "away2"
-
-/area/awaymission/labs/gateway
- name = "Gateway"
- icon_state = "away1"
-
-/area/awaymission/labs/command
- name = "Command"
- icon_state = "away"
-
-/area/awaymission/labs/civilian
- name = "Civilian"
- icon_state = "away3"
-
-/area/awaymission/labs/cargo
- name = "Cargo"
- icon_state = "away2"
-
-/area/awaymission/labs/medical
- name = "Medical"
- icon_state = "away1"
-
-/area/awaymission/labs/security
- name = "Security"
- icon_state = "away"
-
-/area/awaymission/labs/solars
- name = "Solars"
- icon_state = "away3"
-
-/area/awaymission/labs/cave
- name = "Caves"
- icon_state = "away2"
-
-//corpses and possibly other decorative items
-
-/obj/effect/landmark/corpse/alien
- mutantrace = "lizard"
-
-/obj/effect/landmark/corpse/alien/cargo
- name = "Cargo Technician"
- corpseuniform = /obj/item/clothing/under/rank/cargo
- corpseradio = /obj/item/device/radio/headset/headset_cargo
- corpseid = 1
- corpseidjob = "Cargo Technician"
- corpseidaccess = "Quartermaster"
-
-/obj/effect/landmark/corpse/alien/laborer
- name = "Laborer"
- corpseuniform = /obj/item/clothing/under/overalls
- corpseradio = /obj/item/device/radio/headset/headset_eng
- corpseback = /obj/item/weapon/storage/backpack/industrial
- corpsebelt = /obj/item/weapon/storage/belt/utility/full
- corpsehelmet = /obj/item/clothing/head/hardhat
- corpseid = 1
- corpseidjob = "Laborer"
- corpseidaccess = "Engineer"
-
-/obj/effect/landmark/corpse/alien/testsubject
- name = "Unfortunate Test Subject"
- corpseuniform = /obj/item/clothing/under/color/white
- corpseid = 0
-
-/obj/effect/landmark/corpse/overseer
- name = "Overseer"
- corpseuniform = /obj/item/clothing/under/rank/navyhead_of_security
- corpsesuit = /obj/item/clothing/suit/armor/hosnavycoat
- corpseradio = /obj/item/device/radio/headset/heads/captain
- corpsegloves = /obj/item/clothing/gloves/black/hos
- corpseshoes = /obj/item/clothing/shoes/swat
- corpsehelmet = /obj/item/clothing/head/beret/navyhos
- corpseglasses = /obj/item/clothing/glasses/eyepatch
- corpseid = 1
- corpseidjob = "Facility Overseer"
- corpseidaccess = "Captain"
-
-/obj/effect/landmark/corpse/officer
- name = "Security Officer"
- corpseuniform = /obj/item/clothing/under/rank/navysecurity
- corpsesuit = /obj/item/clothing/suit/armor/navysecvest
- corpseradio = /obj/item/device/radio/headset/headset_sec
- corpseshoes = /obj/item/clothing/shoes/swat
- corpsehelmet = /obj/item/clothing/head/beret/navysec
- corpseid = 1
- corpseidjob = "Security Officer"
- corpseidaccess = "Security Officer"
-
-/*
- * Weeds
- */
-#define NODERANGE 1
-
-/obj/effect/alien/flesh/weeds
- name = "Fleshy Growth"
- desc = "A pulsating grouping of odd, alien tissues. It's almost like it has a heartbeat..."
- icon = 'code/WorkInProgress/Susan/biocraps.dmi'
- icon_state = "flesh"
-
- anchored = 1
- density = 0
- var/health = 15
- var/obj/effect/alien/weeds/node/linked_node = null
-
-/obj/effect/alien/flesh/weeds/node
- icon_state = "fleshnode"
- icon = 'code/WorkInProgress/Susan/biocraps.dmi'
- name = "Throbbing Pustule"
- desc = "A grotquese, oozing, pimple-like growth. You swear you can see something moving around in the bulb..."
- luminosity = NODERANGE
- var/node_range = NODERANGE
-
-/obj/effect/alien/flesh/weeds/node/New()
- ..(src.loc, src)
-
-
-/obj/effect/alien/flesh/weeds/New(pos, node)
- ..()
- linked_node = node
- if(istype(loc, /turf/space))
- del(src)
- return
- if(icon_state == "flesh")icon_state = pick("flesh", "flesh1", "flesh2")
- spawn(rand(150, 200))
- if(src)
- Life()
- return
-
-/obj/effect/alien/flesh/weeds/proc/Life()
- set background = 1
- var/turf/U = get_turf(src)
-/*
- if (locate(/obj/movable, U))
- U = locate(/obj/movable, U)
- if(U.density == 1)
- del(src)
- return
-
-Alien plants should do something if theres a lot of poison
- if(U.poison> 200000)
- health -= round(U.poison/200000)
- update()
- return
-*/
- if (istype(U, /turf/space))
- del(src)
- return
-
- direction_loop:
- for(var/dirn in cardinal)
- var/turf/T = get_step(src, dirn)
-
- if (!istype(T) || T.density || locate(/obj/effect/alien/flesh/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
- continue
-
- if(!linked_node || get_dist(linked_node, src) > linked_node.node_range)
- return
-
- // if (locate(/obj/movable, T)) // don't propogate into movables
- // continue
-
- for(var/obj/O in T)
- if(O.density)
- continue direction_loop
-
- new /obj/effect/alien/flesh/weeds(T, linked_node)
-
-
-/obj/effect/alien/flesh/weeds/ex_act(severity)
- switch(severity)
- if(1.0)
- del(src)
- if(2.0)
- if (prob(50))
- del(src)
- if(3.0)
- if (prob(5))
- del(src)
- return
-
-/obj/effect/alien/flesh/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
- if(W.attack_verb.len)
- visible_message("\red \The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
- else
- visible_message("\red \The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
-
- var/damage = W.force / 4.0
-
- if(istype(W, /obj/item/weapon/weldingtool))
- var/obj/item/weapon/weldingtool/WT = W
-
- if(WT.remove_fuel(0, user))
- damage = 15
- playsound(loc, 'sound/items/Welder.ogg', 100, 1)
-
- health -= damage
- healthcheck()
-
-/obj/effect/alien/flesh/weeds/proc/healthcheck()
- if(health <= 0)
- del(src)
-
-
-/obj/effect/alien/flesh/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- if(exposed_temperature > 300)
- health -= 5
- healthcheck()
-
-/*/obj/effect/alien/weeds/burn(fi_amount)
- if (fi_amount > 18000)
- spawn( 0 )
- del(src)
- return
- return 0
- return 1
-*/
-
-#undef NODERANGE
-
-//clothing, weapons, and other items that can be worn or used in some way
-
-/obj/item/clothing/under/rank/navywarden
- desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for more robust protection. It has the word \"Warden\" written on the shoulders."
- name = "warden's jumpsuit"
- icon_state = "wardendnavyclothes"
- 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"
- desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for robust protection."
- icon_state = "officerdnavyclothes"
- 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."
- name = "head of security's jumpsuit"
- icon_state = "hosdnavyclothes"
- 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"
- desc = "A coat enchanced with a special alloy for some protection and style."
- icon_state = "hosdnavyjacket"
- item_state = "armor"
- armor = list(melee = 65, bullet = 30, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
-
-/obj/item/clothing/head/beret/navysec
- 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
- name = "Warden's jacket"
- 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
-
-/obj/item/projectile/slimeglob
- icon = 'icons/obj/projectiles.dmi'
- icon_state = "toxin"
- damage = 20
- damage_type = BRUTE
-
-/obj/effect/critter/fleshmonster
- name = "Fleshy Horror"
- desc = "A grotesque, shambling fleshy horror... was this once a... a person?"
- icon = 'icons/mob/mob.dmi'
- icon_state = "horror"
-/*
- health = 120
- max_health = 120
- aggressive = 1
- defensive = 1
- wanderer = 1
- opensdoors = 1
- atkcarbon = 1
- atksilicon = 1
- atkcritter = 1
- atksame = 0
- atkmech = 1
- firevuln = 0.5
- brutevuln = 1
- seekrange = 25
- armor = 15
- melee_damage_lower = 12
- melee_damage_upper = 17
- angertext = "shambles"
- attacktext = "slashes"
- var/ranged = 0
- var/rapid = 0
- proc
- Shoot(var/target, var/start, var/user, var/bullet = 0)
- OpenFire(var/thing)//bluh ill rename this later or somethin
-
-
- Die()
- if (!src.alive) return
- src.alive = 0
- walk_to(src,0)
- src.visible_message("[src] disintegrates into mush!")
- playsound(loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
- var/turf/Ts = get_turf(src)
- new /obj/effect/decal/cleanable/blood(Ts)
- del(src)
-
- seek_target()
- src.anchored = 0
- var/T = null
- for(var/mob/living/C in view(src.seekrange,src))//TODO: mess with this
- if (src.target)
- src.task = "chasing"
- break
- if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100)) continue
- if(istype(C, /mob/living/carbon/) && !src.atkcarbon) continue
- if(istype(C, /mob/living/silicon/) && !src.atksilicon) continue
- if(C.health < 0) continue
- if(istype(C, /mob/living/carbon/) && src.atkcarbon)
- if(C:mind)
- if(C:mind:special_role == "H.I.V.E")
- continue
- src.attack = 1
- if(istype(C, /mob/living/silicon/) && src.atksilicon)
- if(C:mind)
- if(C:mind:special_role == "H.I.V.E")
- continue
- src.attack = 1
- if(src.attack)
- T = C
- break
-
- if(!src.attack)
- for(var/obj/effect/critter/C in view(src.seekrange,src))
- if(istype(C, /obj/effect/critter) && !src.atkcritter) continue
- if(C.health <= 0) continue
- if(istype(C, /obj/effect/critter) && src.atkcritter)
- if((istype(C, /obj/effect/critter/hivebot) && !src.atksame) || (C == src)) continue
- T = C
- break
-
- for(var/obj/mecha/M in view(src.seekrange,src))
- if(istype(M, /obj/mecha) && !src.atkmech) continue
- if(M.health <= 0) continue
- if(istype(M, /obj/mecha) && src.atkmech) src.attack = 1
- if(src.attack)
- T = M
- break
-
- if(src.attack)
- src.target = T
- src.oldtarget_name = T:name
- if(src.ranged)
- OpenFire(T)
- return
- src.task = "chasing"
- return
-
-
- OpenFire(var/thing)
- src.target = thing
- src.oldtarget_name = thing:name
- for(var/mob/O in viewers(src, null))
- O.show_message("\red [src] spits a glob at [src.target]!", 1)
-
- var/tturf = get_turf(target)
- if(rapid)
- spawn(1)
- Shoot(tturf, src.loc, src)
- spawn(4)
- Shoot(tturf, src.loc, src)
- spawn(6)
- Shoot(tturf, src.loc, src)
- else
- Shoot(tturf, src.loc, src)
-
- src.attack = 0
- sleep(12)
- seek_target()
- src.task = "thinking"
- return
-
-
- Shoot(var/target, var/start, var/user, var/bullet = 0)
- if(target == start)
- return
-
- var/obj/item/projectile/slimeglob/A = new /obj/item/projectile/slimeglob(user:loc)
- playsound(user, 'sound/weapons/bite.ogg', 100, 1)
-
- if(!A) return
-
- if (!istype(target, /turf))
- del(A)
- return
- A.current = target
- A.yo = target:y - start:y
- A.xo = target:x - start:x
- spawn( 0 )
- A.process()
- return
-*/
-
-obj/effect/critter/fleshmonster/fleshslime
- name = "Flesh Slime"
- icon = 'code/WorkInProgress/Susan/biocraps.dmi'
- icon_state = "livingflesh"
- desc = "A creature that appears to be made out of living tissue strewn together haphazardly. Some kind of liquid bubbles from its maw."
- //ranged = 1
\ No newline at end of file
diff --git a/code/WorkInProgress/Tastyfish/Eliza.dm b/code/WorkInProgress/Tastyfish/Eliza.dm
deleted file mode 100644
index 6fc0e2e356..0000000000
--- a/code/WorkInProgress/Tastyfish/Eliza.dm
+++ /dev/null
@@ -1,152 +0,0 @@
-// Contains:
-// /datum/text_parser/parser/eliza
-// /datum/text_parser/keyword
-
-/datum/text_parser/parser/eliza
- //var/datum/text_parser/reply/replies[] // R(X) 36
- var/prev_reply = "" // previous reply
- var/username = ""
- var/callsign = ""
- var/yesno_state = ""
- var/yesno_param = ""
-
-/datum/text_parser/parser/eliza/new_session()
- ..()
- for(var/datum/text_parser/keyword/key in keywords)
- key.eliza = src
-
- prev_reply = ""
- username = ""
- yesno_state = ""
- yesno_param = ""
- print("Hi! I'm [callsign], how are you doing? You can talk to me by beginning your statements with \"[callsign],\"")
-
-/datum/text_parser/parser/eliza/process_line()
- ..()
- // pad so we can detect initial and final words correctly
- input_line = " " + src.input_line + " "
- // remove apostrophes
- for(var/i = -1, i != 0, i = findtext(input_line, "'"))
- if(i == -1)
- continue
- input_line = copytext(input_line, 1, i) + copytext(input_line, i + 1, 0)
-
- // did user insult us? (i don't really want cursing in the source code,
- // so keep it the simple original check from the 70's code :p)
- if(findtext(input_line, "shut"))
- // sssh
- return
-
- if(input_line == prev_reply)
- print("Please don't repeat yourself!")
-
- // find a keyword
- var/keyphrase = ""
- var/datum/text_parser/keyword/keyword // the actual keyword
- var/keypos = 0 // pos of keyword so we can grab extra text after it
-
- for(var/i = 1, i <= keywords.len, i++)
- keyword = keywords[i]
- for(var/j = 1, j <= keyword.phrases.len, j++)
- keypos = findtext(input_line, " " + keyword.phrases[j])
- if(keypos != 0)
- // found it!
- keyphrase = keyword.phrases[j]
- break
- if(keyphrase != "")
- break
-
- //world << "keyphrase: " + keyphrase + " " + num2text(keypos)
-
- var/conjugated = ""
- // was it not recognized? then make it nokeyfound
- if(keyphrase == "")
- keyword = keywords[keywords.len] // nokeyfound
- else
- // otherwise, business as usual
-
- // let's conjugate this mess
- conjugated = copytext(input_line, 1 + keypos + lentext(keyphrase))
-
- // go ahead and strip punctuation
- if(lentext(conjugated) > 0 && copytext(conjugated, lentext(conjugated)) == " ")
- conjugated = copytext(conjugated, 1, lentext(conjugated))
- if(lentext(conjugated) > 0)
- var/final_punc = copytext(conjugated, lentext(conjugated))
- if(final_punc == "." || final_punc == "?" || final_punc == "!")
- conjugated = copytext(conjugated, 1, lentext(conjugated))
-
- conjugated += " "
-
- if(keyword.conjugate)
- // now run through conjugation pairs
- for(var/i = 1, i <= lentext(conjugated), i++)
- for(var/x = 1, x <= conjugs.len, x += 2)
- var/cx = conjugs[x]
- var/cxa = conjugs[x + 1]
- if(i + lentext(cx) <= lentext(conjugated) + 1 && cmptext(cx, copytext(conjugated, i, i + lentext(cx))))
- // world << cx
-
- conjugated = copytext(conjugated, 1, i) + cxa + copytext(conjugated, i + lentext(cx))
- i = i + lentext(cx)
- // don't count right padding
- if(copytext(cx, lentext(cx)) == " ")
- i--
- break
- else if(i + lentext(cxa) <= lentext(conjugated) + 1 && cmptext(cxa, copytext(conjugated, i, i + lentext(cxa))))
- // world << cxa
-
- conjugated = copytext(conjugated, 1, i) + cx + copytext(conjugated, i + lentext(cxa))
- i = i + lentext(cxa)
- // don't count right padding
- if(copytext(cxa, lentext(cxa)) == " ")
- i--
- break
-
- conjugated = copytext(conjugated, 1, lentext(conjugated))
-
- //world << "Conj: " + conjugated
-
- // now actually get a reply
- var/reply = keyword.process(conjugated)
- print(reply)
-
- prev_reply = reply
-
-/datum/text_parser/keyword
- var/list/phrases = new()
- var/list/replies = new()
- var/datum/text_parser/parser/eliza/eliza
- var/conjugate = 1
-
- New(p, r)
- phrases = p
- replies = r
-
- proc/process(object)
- eliza.yesno_state = ""
- eliza.yesno_param = ""
- var/reply = pick(replies)
- if(copytext(reply, lentext(reply)) == "*")
- // add object of statement (hopefully not actually mess :p)
- if(object == "")
- object = pick(generic_objects)
- // possibly add name or just ?
- if(eliza.username != "" && rand(3) == 0)
- object += ", " + eliza.username
- return copytext(reply, 1, lentext(reply)) + object + "?"
- else
- // get punct
- var/final_punc = ""
- if(lentext(reply) > 0)
- final_punc = copytext(reply, lentext(reply))
- if(final_punc == "." || final_punc == "?" || final_punc == "!")
- reply = copytext(reply, 1, lentext(reply))
- else
- final_punc = ""
-
- // possibly add name or just ?/./!
- if(eliza.username != "" && rand(2) == 0)
- reply += ", " + eliza.username
-
- return reply + final_punc
diff --git a/code/WorkInProgress/Tastyfish/Eliza_Data.dm b/code/WorkInProgress/Tastyfish/Eliza_Data.dm
deleted file mode 100644
index 1535e99292..0000000000
--- a/code/WorkInProgress/Tastyfish/Eliza_Data.dm
+++ /dev/null
@@ -1,435 +0,0 @@
-// Contains:
-// Implementation-specific data for /datum/text_parser/parser/eliza
-
-/datum/text_parser/keyword
- // if we have a * reply, but no object from the user
- var/list/generic_objects = list(
- " what", " something", "...")
-
- var/list/object_leaders = list(
- " is ", "'s ")
-
-/datum/text_parser/parser/eliza
-
- // conjugation data
- var/list/conjugs = list(
- " are ", " am ", " were ", " was ", " you ", " me ", " you ", " i " , " your ", " my ",
- " ive ", " youve ", " Im ", " youre ")
-
- // keywords / replies
- var/list/keywords = list(
- new/datum/text_parser/keyword/tell( // NT-like
- list("tell"),
- list(
- "Told *")),
- new/datum/text_parser/keyword(
- list("can you"),
- list(
- "Dont you believe that I can*",
- "Perhaps you would like to be able to*",
- "You want me to be able to*")),
- new/datum/text_parser/keyword(
- list("can i"),
- list(
- "Perhaps you don't want to*",
- "Do you want to be able to*")),
- new/datum/text_parser/keyword(
- list("you are", "youre"),
- list(
- "What makes you think I am*",
- "Does it please you to believe that I am*",
- "Perhaps you would like to be*",
- "Do you sometimes wish you were*")),
- new/datum/text_parser/keyword(
- list("i dont"),
- list(
- "Don't you really*",
- "Why don't you*",
- "Do you wish to be able to*",
- "Does that trouble you?")),
- new/datum/text_parser/keyword(
- list("i feel"),
- list(
- "Tell me more about such feelings.",
- "Do you often feel*",
- "Do you enjoy feeling*")),
- new/datum/text_parser/keyword(
- list("why dont you"),
- list(
- "Do you really believe I don't*",
- "Perhaps in good time I will*",
- "Do you want me to*")),
- new/datum/text_parser/keyword(
- list("why cant i"),
- list(
- "Do you think you should be able to*",
- "Why can't you*")),
- new/datum/text_parser/keyword(
- list("are you"),
- list(
- "Why are you interested in whether or not I am*",
- "Would you prefer if I were not*",
- "Perhaps in your fantasies I am*")),
- new/datum/text_parser/keyword(
- list("i cant"),
- list(
- "How do you know I can't*",
- "Have you tried?",
- "Perhaps you can now*")),
- new/datum/text_parser/keyword/setparam/username(
- list("my name", "im called", "am called", "call me"),
- list(
- "Your name is *",
- "You call yourself *",
- "You're called *")),
- new/datum/text_parser/keyword/setparam/callsign(
- list("your name", "call yourself"),
- list(
- "My name is *",
- "I call myself *",
- "I'm called *")),
- new/datum/text_parser/keyword(
- list("i am", "im"),
- list(
- "Did you come to me because you are*",
- "How long have you been*",
- "Do you believe it is normal to be*",
- "Do you enjoy being*")),
- new/datum/text_parser/keyword(
- list("thanks", "thank you"),
- list(
- "You're welcome.",
- "No problem.",
- "Thank you!")),
- new/datum/text_parser/keyword(
- list("you"),
- list(
- "We were discussing you - not me.",
- "Oh, I*",
- "You're not really talking about me, are you?")),
- new/datum/text_parser/keyword(
- list("i want","i like"),
- list(
- "What would it mean if you got*",
- "Why do you want*",
- "Suppose you got*",
- "What if you never got*",
- "I sometimes also want*")),
- new/datum/text_parser/keyword(
- list("what", "how", "who", "where", "when", "why"),
- list(
- "Why do you ask?",
- "Does that question interest you?",
- "What answer would please you the most?",
- "What do you think?",
- "Are such questions on your mind often?",
- "What is it you really want to know?",
- "Have you asked anyone else?",
- "Have you asked such questions before?",
- "What else comes to mind when you ask that?")),
- new/datum/text_parser/keyword/paramlist/pick( // NT-like
- list("pick","choose"),
- list(
- "I choose... *",
- "I prefer *",
- "My favorite is *")),
- new/datum/text_parser/keyword(
- list("name"),
- list(
- "Names don't interest me.",
- "I don't care about names. Go on.")),
- new/datum/text_parser/keyword(
- list("cause"),
- list(
- "Is that a real reason?",
- "Don't any other reasons come to mind?",
- "Does that reason explain anything else?",
- "What other reason might there be?")),
- new/datum/text_parser/keyword(
- list("sorry"),
- list(
- "Please don't apologize.",
- "Apologies are not necessary.",
- "What feelings do you get when you apologize?",
- "Don't be so defensive!")),
- new/datum/text_parser/keyword(
- list("dream"),
- list(
- "What does that dream suggest to you?",
- "Do you dream often?",
- "What persons are in your dreams?",
- "Are you disturbed by your dreams?")),
- new/datum/text_parser/keyword(
- list("hello", "hi", "yo", "hiya"),
- list(
- "How do you do... Please state your name and problem.")),
- new/datum/text_parser/keyword(
- list("go away", "bye"),
- list(
- "Good bye. I hope to have another session with you soon.")),
- new/datum/text_parser/keyword(
- list("maybe", "sometimes", "probably", "mostly", "most of the time"),
- list(
- "You don't seem quite certain.",
- "Why the uncertain tone?",
- "Can't you be more positive?",
- "You aren't sure?",
- "Don't you know?")),
- new/datum/text_parser/keyword/no(
- list("no", "nope", "nah"),
- list(
- "Are you saying that just to be negative?",
- "You are being a bit negative.",
- "Why not?",
- "Are you sure?",
- "Why no?")),
- new/datum/text_parser/keyword(
- list("your"),
- list(
- "Why are you concerned about my*",
- "What about your own*")),
- new/datum/text_parser/keyword(
- list("always"),
- list(
- "Can you think of a specific example?",
- "When?",
- "What are you thinking of?",
- "Really, always?")),
- new/datum/text_parser/keyword(
- list("think"),
- list(
- "Do you really think so?",
- "But you're not sure you*",
- "Do you doubt you*")),
- new/datum/text_parser/keyword(
- list("alike"),
- list(
- "In what way?",
- "What resemblence do you see?",
- "What does the similarity suggest to you?",
- "What other connections do you see?",
- "Count there really be some connection?",
- "How?",
- "You seem quite positive.")),
- new/datum/text_parser/keyword/yes(
- list("yes", "yep", "yeah", "indeed"),
- list(
- "Are you sure?",
- "I see.",
- "I understand.")),
- new/datum/text_parser/keyword(
- list("friend"),
- list(
- "Why do you bring up the topic of friends?",
- "Why do your friends worry you?",
- "Do your friends pick on you?",
- "Are you sure you have any friends?",
- "Do you impose on your friends?",
- "Perhaps your love for friends worries you?")),
- new/datum/text_parser/keyword(
- list("computer", "bot", "ai"),
- list(
- "Do computers worry you?",
- "Are you talking about me in particular?",
- "Are you frightened by machines?",
- "Why do your mention computers?",
- "What do you think computers have to do with your problem?",
- "Don't you think computers can help people?",
- "What is it about machines that worries you?")),
- new/datum/text_parser/keyword(
- list("murder", "death", "kill", "dead", "destroy", "traitor", "synd"),
- list(
- "Well, that's rather morbid.",
- "Do you think that caused a trauma with you?",
- "Have you ever previously spoken to anybody about this?")),
- new/datum/text_parser/keyword(
- list("bomb", "explosive", "toxin", "phoron"),
- list(
- "Do you worry about bombs often?",
- "Do you work in science?",
- "Do you find it odd to worry about bombs on a science research vessel?")),
- new/datum/text_parser/keyword(
- list("work", "job", "head", "staff", "transen"),
- list(
- "Do you like working here?",
- "What are your feelings on working here?")),
- new/datum/text_parser/keyword(
- list("nokeyfound"),
- list(
- "Say, do you have any psychological problems?",
- "What does that suggest to you?",
- "I see.",
- "I'm not sure I understand you fully.",
- "Come elucidate on your thoughts.",
- "Can you elaborate on that?",
- "That is quite interesting.")))
-
-/datum/text_parser/keyword/setparam
- proc/param(object)
-
- // drop leading parts
- for(var/leader in object_leaders)
- var/i = findtext(object, leader)
- if(i)
- object = copytext(object, i + lentext(leader))
- break
-
- // trim spaces
- object = trim(object)
-
- // trim punctuation
- if(lentext(object) > 0)
- var/final_punc = copytext(object, lentext(object))
- if(final_punc == "." || final_punc == "?" || final_punc == "!")
- object = copytext(object, 1, lentext(object))
-
- return object
-
-/datum/text_parser/keyword/paramlist
- proc/param(object)
- // drop leading parts
- for(var/leader in object_leaders)
- var/i = findtext(object, leader)
- if(i)
- object = copytext(object, i + lentext(leader))
- break
-
- // trim spaces
- object = trim(object)
-
- // trim punctuation
- if(lentext(object) > 0)
- var/final_punc = copytext(object, lentext(object))
- if(final_punc == "." || final_punc == "?" || final_punc == "!")
- object = copytext(object, 1, lentext(object))
-
- return dd_text2list(object, ",")
-
-/datum/text_parser/keyword/setparam/username
- process(object)
- object = param(object)
-
- // handle name
- if(eliza.username == "")
- // new name
- var/t = ..(object)
- eliza.yesno_state = "username"
- eliza.yesno_param = object
- return t
- else if(cmptext(eliza.username, object))
- // but wait!
- return "You already told me your name was [eliza.username]."
- else
- eliza.yesno_state = "username"
- eliza.yesno_param = object
- return "But you previously told me your name was [eliza.username]. Are you sure you want to be called [object]?"
-
-/datum/text_parser/keyword/setparam/callsign
- process(object)
- object = param(object)
-
- // handle name
- if(eliza.callsign == "")
- // new name
- var/t = ..(object)
- eliza.yesno_state = "callsign"
- eliza.yesno_param = object
- return t
- else if(cmptext(eliza.callsign, object))
- // but wait!
- return "You already told me that I should answer to [eliza.callsign]."
- else
- eliza.yesno_state = "callsign"
- eliza.yesno_param = object
- return "But you previously told me my name was [eliza.callsign]. Are you sure you want me to be called [object]?"
-
-/datum/text_parser/keyword/paramlist/pick
- process(object)
- var/choice = pick(param(object))
- return ..(choice)
-
-/datum/text_parser/keyword/tell
- conjugate = 0
-
- process(object)
- // get name & message
- var/i = findtext(object, ",")
- var/sl = 1
- if(!i || lentext(object) < i + sl)
- return "Tell who that you what?"
-
- var/name = trim(copytext(object, 1, i))
- object = trim(copytext(object, i + sl))
- if(!lentext(name) || !lentext(object))
- return "Tell who that you what?"
-
- // find PDA
- var/obj/item/device/pda/pda
- for (var/obj/item/device/pda/P in world)
- if (!P.owner)
- continue
- else if (P.toff)
- continue
-
- if(!cmptext(name, P.owner))
- continue
-
- pda = P
-
- if(!pda || pda.toff)
- return "I couldn't find [name]'s PDA."
-
- // send message
- if(!istype(eliza.speaker.loc.loc, /obj/item/device/pda))//Looking if we are in a PDA
- pda.tnote += "← From [eliza.callsign]:
[object]
"
-
- if(prob(15) && eliza.speaker) //Give the AI a chance of intercepting the message
- var/who = eliza.speaker
- if(prob(50))
- who = "[eliza.speaker:master] via [eliza.speaker]"
- for(var/mob/living/silicon/ai/ai in world)
- ai.show_message("Intercepted message from [who]: [object]")
-
- if (!pda.silent)
- playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1)
- for (var/mob/O in hearers(3, pda.loc))
- O.show_message(text("\icon[pda] *[pda.ttone]*"))
-
- pda.overlays = null
- pda.overlays += image('icons/obj/pda.dmi', "pda-r")
- else
- var/list/href_list = list()
- href_list["src"] = "\ref[eliza.speaker.loc.loc]"
- href_list["choice"] = "Message"
- href_list["target"] = "\ref[pda]"
- href_list["pAI_mess"] = "\"[object]\" \[Via pAI Unit\]"
- var/obj/item/device/pda/pda_im_in = eliza.speaker.loc.loc
- pda_im_in.Topic("src=\ref[eliza.speaker.loc.loc];choice=Message;target=\ref[pda];pAI_mess=\"[object] \[Via pAI Unit\]",href_list)
- return "Told [name], [object]."
-
-/datum/text_parser/keyword/yes
- process(object)
- var/reply
- switch(eliza.yesno_state)
- if("username")
- eliza.username = eliza.yesno_param
- reply = pick(
- "[eliza.username] - that's a nice name.",
- "Hello, [eliza.username]!",
- "You sound nice.")
- if("callsign")
- eliza.callsign = eliza.yesno_param
- eliza.set_name(eliza.callsign)
- reply = pick(
- "Oh, alright...",
- "[eliza.callsign]... I like that.",
- "OK!")
- else
- return ..(object)
- eliza.yesno_state = ""
- eliza.yesno_param = ""
- return reply
-
-/datum/text_parser/keyword/no
- process(object)
- return ..(object)
diff --git a/code/WorkInProgress/Tastyfish/Parser.dm b/code/WorkInProgress/Tastyfish/Parser.dm
deleted file mode 100644
index 0db2a261ca..0000000000
--- a/code/WorkInProgress/Tastyfish/Parser.dm
+++ /dev/null
@@ -1,18 +0,0 @@
-// Contains:
-// /datum/text_parser/parser
-
-/datum/text_parser/parser
- var/input_line = ""
- var/mob/speaker
-
-/datum/text_parser/parser/proc/print(line)
- speaker.say(line)
-
-/datum/text_parser/parser/proc/set_name(name)
- speaker.name = name
- speaker.real_name = name
-
-/datum/text_parser/parser/proc/new_session()
- input_line = ""
-
-/datum/text_parser/parser/proc/process_line()
diff --git a/code/WorkInProgress/Tastyfish/livestock.dm b/code/WorkInProgress/Tastyfish/livestock.dm
deleted file mode 100644
index 0befcb4c61..0000000000
--- a/code/WorkInProgress/Tastyfish/livestock.dm
+++ /dev/null
@@ -1,190 +0,0 @@
-// Base Class
-/mob/living/simple_animal/livestock
- desc = "Tasty!"
- icon = 'icons/mob/livestock.dmi'
- emote_see = list("shakes its head", "kicks the ground")
- speak_chance = 1
- turns_per_move = 15
- meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat
- response_help = "pets"
- response_disarm = "gently pushes aside"
- response_harm = "kicks"
- var/max_nutrition = 100 // different animals get hungry faster, basically number of 5-second steps from full to starving (60 == 5 minutes)
- var/nutrition_step // cycle step in nutrition system
- var/obj/movement_target // eating-ing target
-
- New()
- if(!nutrition)
- nutrition = max_nutrition * 0.33 // at 1/3 nutrition
-
- reagents = new()
- reagents.my_atom = src
-
- Life()
- ..()
-
- if(stat != DEAD)
- meat_amount = round(nutrition / 50)
-
- nutrition_step--
- if(nutrition_step <= 0)
- // handle animal digesting
- if(nutrition > 0)
- nutrition--
- else
- health--
- nutrition_step = 50 // only tick this every 5 seconds
-
- // handle animal eating (borrowed from Ian code)
-
- // not hungry if full
- if(nutrition >= max_nutrition)
- return
-
- if((movement_target) && !(isturf(movement_target.loc)))
- movement_target = null
- a_intent = "help"
- turns_per_move = initial(turns_per_move)
- if( !movement_target || !(movement_target.loc in oview(src, 3)) )
- movement_target = null
- a_intent = "help"
- turns_per_move = initial(turns_per_move)
- for(var/obj/item/weapon/reagent_containers/food/snacks/S in oview(src,3))
- if(isturf(S.loc) || ishuman(S.loc))
- movement_target = S
- break
- if(movement_target)
- stop_automated_movement = 1
- step_to(src,movement_target,1)
- sleep(3)
- step_to(src,movement_target,1)
- sleep(3)
- step_to(src,movement_target,1)
-
- if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
- if (movement_target.loc.x < src.x)
- set_dir(WEST)
- else if (movement_target.loc.x > src.x)
- set_dir(EAST)
- else if (movement_target.loc.y < src.y)
- set_dir(SOUTH)
- else if (movement_target.loc.y > src.y)
- set_dir(NORTH)
- else
- set_dir(SOUTH)
-
- if(isturf(movement_target.loc))
- movement_target.attack_animal(src)
- if(istype(movement_target, /obj/item/weapon/reagent_containers/food/snacks))
- var/obj/item/I = movement_target
- I.attack(src, src, "mouth") // eat it, if it's food
-
- if(a_intent == "hurt") // to make raging critter harm, then disarm, then stop
- a_intent = "disarm"
- else if(a_intent == "disarm")
- a_intent = "help"
- movement_target = null
- turns_per_move = initial(turns_per_move)
- else if(ishuman(movement_target.loc))
- if(prob(20))
- emote("stares at the [movement_target] that [movement_target.loc] has with a longing expression.")
-
- proc/rage_at(mob/living/M)
- movement_target = M // pretty simple
- turns_per_move = 1
- emote("becomes enraged")
- a_intent = "hurt"
-
- attackby(var/obj/item/O as obj, var/mob/user as mob)
- if(nutrition < max_nutrition && istype(O,/obj/item/weapon/reagent_containers/food/snacks))
- O.attack_animal(src)
- else
- ..(O, user)
-
-// Cow
-/mob/living/simple_animal/livestock/cow
- name = "\improper Cow"
- icon_state = "cow"
- icon_living = "cow"
- icon_dead = "cow_d"
- meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat/cow
- meat_amount = 10
- max_nutrition = 1000
- speak = list("Moo.","Moooo!","Snort.")
- speak_emote = list("moos")
- emote_hear = list("moos", "snorts")
-
- attackby(var/obj/item/O as obj, var/mob/user as mob)
- if(istype(O,/obj/item/weapon/reagent_containers/glass))
- var/datum/reagents/R = O:reagents
-
- R.add_reagent("milk", 50)
- nutrition -= 50
- usr << "\blue You milk the cow."
- else if(O.force > 0 && O.w_class >= 2)
- rage_at(user)
- else
- ..(O, user)
-
- attack_hand(var/mob/user as mob)
- ..()
- if(user.a_intent == "hurt")
- rage_at(user)
-
-/obj/item/weapon/reagent_containers/food/snacks/sliceable/meat/cow
- name = "Beef"
- desc = "It's what's for dinner!"
-
-// Chicken
-/mob/living/simple_animal/livestock/chicken
- name = "\improper Chicken"
- icon_state = "chick"
- icon_living = "chick"
- icon_dead = "chick_d"
- meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat/chicken
- meat_amount = 3
- max_nutrition = 200
- speak = list("Bock bock!","Cl-cluck.","Click.")
- speak_emote = list("bocks","clucks")
- emote_hear = list("bocks", "clucks", "squawks")
-
-/mob/living/simple_animal/livestock/chicken/Life()
- ..()
-
- // go right before cycle elapses, and if animal isn't starving
- if(stat != DEAD && nutrition_step == 1 && nutrition > max_nutrition / 2)
- // lay an egg with probability of 5% in 5 second time period
- if(prob(33))
- new/obj/item/weapon/reagent_containers/food/snacks/egg(src.loc) // lay an egg
- nutrition -= 25
-
-/obj/item/weapon/reagent_containers/food/snacks/sliceable/meat/chicken
- name = "Chicken"
- desc = "Tasty!"
-
-/obj/structure/closet/critter
- desc = "\improper Critter crate."
- name = "Critter Crate"
- icon = 'icons/obj/storage.dmi'
- icon_state = "critter"
- density = 1
- icon_opened = "critteropen"
- icon_closed = "critter"
-
-/datum/supply_packs/chicken
- name = "\improper Chicken crate"
- contains = list("/mob/living/simple_animal/livestock/chicken",
- "/obj/item/weapon/reagent_containers/food/snacks/grown/corn")
- cost = 10
- containertype = "/obj/structure/closet/critter"
- containername = "Chicken crate"
- //group = "Hydroponics"
-
-/datum/supply_packs/cow
- name = "\improper Cow crate"
- contains = list("/mob/living/simple_animal/livestock/cow",
- "/obj/item/weapon/reagent_containers/food/snacks/grown/corn")
- cost = 50
- containertype = "/obj/structure/closet/critter"
- containername = "Cow crate"
- //group = "Hydroponics"
diff --git a/code/WorkInProgress/Tastyfish/paiLiza.dm b/code/WorkInProgress/Tastyfish/paiLiza.dm
deleted file mode 100644
index 7cd9a03446..0000000000
--- a/code/WorkInProgress/Tastyfish/paiLiza.dm
+++ /dev/null
@@ -1,28 +0,0 @@
-/datum/paiCandidate/chatbot
- name = "NT Standard Chatbot"
- description = "NT Standard Issue pAI Unit 13A"
- role = "Advisor"
- comments = "This is an actual AI."
- ready = 1
-
-/mob/living/silicon/pai/chatbot
- var/datum/text_parser/parser/eliza/P = new()
-
- proc/init()
- P.speaker = src
- P.callsign = input("What do you want to call me?", "Chatbot Name", "NT") as text
- P.set_name(P.callsign)
- P.new_session()
-
- proc/hear_talk(mob/M, text)
- if(stat)
- return
-
- var/prefix = P.callsign + ","
-
- if(lentext(text) <= lentext(prefix))
- return
- var/i = lentext(prefix) + 1
- if(cmptext(copytext(text, 1, i), prefix))
- P.input_line = html_decode(copytext(text, i))
- P.process_line()
diff --git a/code/WorkInProgress/Tastyfish/wallmount_frame.dm b/code/WorkInProgress/Tastyfish/wallmount_frame.dm
deleted file mode 100644
index 28b6101a75..0000000000
--- a/code/WorkInProgress/Tastyfish/wallmount_frame.dm
+++ /dev/null
@@ -1,231 +0,0 @@
-// a frame for generic wall-mounted things, such as fire alarm, status display..
-// combination of apc_frame and machine_frame
-/obj/machinery/constructable_frame/wallmount_frame
- icon = 'icons/obj/stock_parts.dmi'
- icon_state = "wm_0"
- var/wall_offset = 24
- density = 0
-
-/obj/machinery/constructable_frame/wallmount_frame/New()
- spawn(1)
- if (!istype(loc, /turf/simulated/floor))
- usr << "\red [name] cannot be placed on this spot."
- new/obj/item/stack/sheet/metal(get_turf(src), 2)
- del(src)
- return
-
- var/turf/obj_ofs = get_step(locate(2,2,1), dir)
- pixel_x = (obj_ofs.x - 2) * wall_offset
- pixel_y = (obj_ofs.y - 2) * wall_offset
-
- var/turf/T = get_step(usr, dir)
- if(!istype(T, /turf/simulated/wall))
- usr << "\red [name] must be placed on a wall."
- new/obj/item/stack/sheet/metal(get_turf(src), 2)
- del(src)
- return
-
- 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)
- user << "\red This part is faulty, you cannot add this to the machine!"
- return
- switch(state)
- if(1)
- if(istype(P, /obj/item/stack/cable_coil))
- if(P:amount >= 5)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- user << "\blue You start to add cables to the frame."
- if(do_after(user, 20))
- P:amount -= 5
- if(!P:amount) del(P)
- user << "\blue You add cables to the frame."
- state = 2
- icon_state = "wm_1"
- if(istype(P, /obj/item/weapon/wrench))
- playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
- user << "\blue You dismantle the frame"
- new /obj/item/stack/sheet/metal(src.loc, 2)
- del(src)
- if(2)
- if(istype(P, /obj/item/weapon/circuitboard))
- var/obj/item/weapon/circuitboard/B = P
- if(B.board_type == "wallmount")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- user << "\blue You add the circuit board to the frame."
- circuit = P
- user.drop_item()
- P.loc = src
- icon_state = "wm_2"
- state = 3
- components = list()
- req_components = circuit.req_components.Copy()
- for(var/A in circuit.req_components)
- req_components[A] = circuit.req_components[A]
- req_component_names = circuit.req_components.Copy()
- for(var/A in req_components)
- var/cp = text2path(A)
- var/obj/ct = new cp() // have to quickly instantiate it get name
- req_component_names[A] = ct.name
- if(circuit.frame_desc)
- desc = circuit.frame_desc
- else
- update_desc()
- user << desc
- else
- user << "\red This frame does not accept circuit boards of this type!"
- if(istype(P, /obj/item/weapon/wirecutters))
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
- user << "\blue You remove the cables."
- state = 1
- icon_state = "wm_0"
- var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
- A.amount = 5
-
- if(3)
- if(istype(P, /obj/item/weapon/crowbar))
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- state = 2
- circuit.loc = src.loc
- circuit = null
- if(components.len == 0)
- user << "\blue You remove the circuit board."
- else
- user << "\blue You remove the circuit board and other components."
- for(var/obj/item/weapon/W in components)
- W.loc = src.loc
- desc = initial(desc)
- req_components = null
- components = null
- icon_state = "wm_1"
-
- if(istype(P, /obj/item/weapon/screwdriver))
- var/component_check = 1
- for(var/R in req_components)
- if(req_components[R] > 0)
- component_check = 0
- break
- 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.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
- else
- new_machine.pixel_x = pixel_x
- new_machine.pixel_y = pixel_y
- for(var/obj/O in new_machine.component_parts)
- del(O)
- new_machine.component_parts = list()
- for(var/obj/O in src)
- if(circuit.contain_parts) // things like disposal don't want their parts in them
- O.loc = new_machine
- else
- O.loc = null
- new_machine.component_parts += O
- if(circuit.contain_parts)
- circuit.loc = new_machine
- else
- circuit.loc = null
- new_machine.RefreshParts()
- del(src)
-
- if(istype(P, /obj/item/weapon))
- for(var/I in req_components)
- if(istype(P, text2path(I)) && (req_components[I] > 0))
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- if(istype(P, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/CP = P
- if(CP.amount > 1)
- var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
- var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src)
- CC.amount = camt
- CC.update_icon()
- CP.use(camt)
- components += CC
- req_components[I] -= camt
- update_desc()
- break
- user.drop_item()
- P.loc = src
- components += P
- req_components[I]--
- update_desc()
- break
- user << desc
- if(P.loc != src && !istype(P, /obj/item/stack/cable_coil))
- user << "\red You cannot add that component to the machine!"
-
-/obj/item/weapon/circuitboard/firealarm
- name = "Circuit board (Fire Alarm)"
- build_path = "/obj/machinery/firealarm"
- board_type = "wallmount"
- origin_tech = "engineering=2"
- frame_desc = "Requires 1 Scanning Module, 1 Capacitor, and 2 pieces of cable."
- contain_parts = 0
- req_components = list(
- "/obj/item/weapon/stock_parts/scanning_module" = 1,
- "/obj/item/weapon/stock_parts/capacitor" = 1,
- "/obj/item/stack/cable_coil" = 2)
-
-/obj/item/weapon/circuitboard/alarm
- name = "Circuit board (Atmospheric Alarm)"
- build_path = "/obj/machinery/alarm"
- board_type = "wallmount"
- origin_tech = "engineering=2;programming=2"
- frame_desc = "Requires 1 Scanning Module, 1 Console Screen, and 2 pieces of cable."
- contain_parts = 0
- req_components = list(
- "/obj/item/weapon/stock_parts/scanning_module" = 1,
- "/obj/item/weapon/stock_parts/console_screen" = 1,
- "/obj/item/stack/cable_coil" = 2)
-
-/* oh right, not a machine :(
-/obj/item/weapon/circuitboard/intercom
- name = "Circuit board (Intercom)"
- build_path = "/obj/item/device/radio/intercom"
- board_type = "wallmount"
- origin_tech = "engineering=2"
- frame_desc = "Requires 1 Console Screen, and 2 piece of cable."
- contain_parts = 0
- req_components = list(
- "/obj/item/weapon/stock_parts/console_screen" = 1,
- "/obj/item/stack/cable_coil" = 2)
-*/
-
-/* too complex to set up the dept for an RC in a way intuitive for the user
-/obj/item/weapon/circuitboard/requests_console
- name = "Circuit board (Requests Console)"
- build_path = "/obj/machinery/requests_console"
- board_type = "wallmount"
- origin_tech = "engineering=2;programming=2"
- frame_desc = "Requires 1 radio, 1 Console Screen, and 1 piece of cable."
- contain_parts = 0
- req_components = list(
- "/obj/item/device/radio" = 1,
- "/obj/item/weapon/stock_parts/console_screen" = 1
- "/obj/item/stack/cable_coil" = 1)
-*/
-
-/obj/item/weapon/circuitboard/status_display
- name = "Circuit board (Status Display)"
- build_path = "/obj/machinery/status_display"
- board_type = "wallmount"
- origin_tech = "engineering=2,programming=2"
- frame_desc = "Requires 2 Console Screens, and 1 piece of cable."
- contain_parts = 0
- req_components = list(
- "/obj/item/weapon/stock_parts/console_screen" = 2,
- "/obj/item/stack/cable_coil" = 1)
-
-/obj/item/weapon/circuitboard/light_switch
- name = "Circuit board (Light Switch)"
- build_path = "/obj/machinery/light_switch"
- board_type = "wallmount"
- origin_tech = "engineering=2"
- frame_desc = "Requires 2 pieces of cable."
- contain_parts = 0
- req_components = list(
- "/obj/item/stack/cable_coil" = 2)
diff --git a/code/WorkInProgress/animusstation/atm.dm b/code/WorkInProgress/animusstation/atm.dm
deleted file mode 100644
index 1031c599f4..0000000000
--- a/code/WorkInProgress/animusstation/atm.dm
+++ /dev/null
@@ -1,176 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:06
-
-/*
-
-TODO:
-give money an actual use (QM stuff, vending machines)
-send money to people (might be worth attaching money to custom database thing for this, instead of being in the ID)
-log transactions
-
-*/
-
-/obj/machinery/atm
- name = "\improper NanoTrasen Automatic Teller Machine"
- desc = "For all your monetary needs!"
- icon = 'icons/obj/terminals.dmi'
- icon_state = "atm"
- anchored = 1
- use_power = 1
- idle_power_usage = 10
- var/obj/item/weapon/card/id/card
- var/obj/item/weapon/spacecash/cashes = list()
- var/inserted = 0
- var/accepted = 0
- var/pincode = 0
-
- attackby(var/obj/A, var/mob/user)
- if(istype(A,/obj/item/weapon/spacecash))
- cashes += A
- user.drop_item()
- A.loc = src
- inserted += A:worth
- return
- if(istype(A,/obj/item/weapon/coin))
- if(istype(A,/obj/item/weapon/coin/iron))
- cashes += A
- user.drop_item()
- A.loc = src
- inserted += 1
- return
- if(istype(A,/obj/item/weapon/coin/silver))
- cashes += A
- user.drop_item()
- A.loc = src
- inserted += 10
- return
- if(istype(A,/obj/item/weapon/coin/gold))
- cashes += A
- user.drop_item()
- A.loc = src
- inserted += 50
- return
- if(istype(A,/obj/item/weapon/coin/phoron))
- cashes += A
- user.drop_item()
- A.loc = src
- inserted += 2
- return
- if(istype(A,/obj/item/weapon/coin/diamond))
- cashes += A
- user.drop_item()
- A.loc = src
- inserted += 300
- return
- user << "You insert your [A.name] in ATM"
- ..()
-
- attack_hand(var/mob/user)
- if(istype(user, /mob/living/silicon))
- user << "\red Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005."
- return
-
- if(!(stat && NOPOWER) && ishuman(user))
- var/dat
- user.machine = src
- if(!accepted)
- if(scan(user))
- pincode = input(usr,"Enter a pin-code") as num
- if(card.checkaccess(pincode,usr))
- accepted = 1
-// usr << sound('nya.mp3')
- else
- dat = null
- dat += "NanoTrasen Automatic Teller Machine
"
- dat += "For all your monetary needs!
"
- dat += "Welcome, [card.registered_name]. You have [card.money] credits deposited.
"
- dat += "Current inserted item value: [inserted] credits.
"
- dat += "Please, select action
"
- dat += "Withdraw Physical Credits
"
- dat += "Eject Inserted Items
"
- dat += "Convert Inserted Items to Credits
"
- dat += "Lock ATM
"
- user << browse(dat,"window=atm")
- onclose(user,"close")
- proc
- withdraw(var/mob/user)
- if(accepted)
- var/amount = input("How much would you like to withdraw?", "Amount", 0) in list(1,10,20,50,100,200,500,1000, 0)
- if(amount == 0)
- return
- if(card.money >= amount)
- card.money -= amount
- switch(amount)
- if(1)
- new /obj/item/weapon/spacecash(loc)
- if(10)
- new /obj/item/weapon/spacecash/c10(loc)
- if(20)
- new /obj/item/weapon/spacecash/c20(loc)
- if(50)
- new /obj/item/weapon/spacecash/c50(loc)
- if(100)
- new /obj/item/weapon/spacecash/c100(loc)
- if(200)
- new /obj/item/weapon/spacecash/c200(loc)
- if(500)
- new /obj/item/weapon/spacecash/c500(loc)
- if(1000)
- new /obj/item/weapon/spacecash/c1000(loc)
- else
- user << "\red Error: Insufficient funds."
- return
-
- scan(var/mob/user)
- if(istype(user,/mob/living/carbon/human))
- var/mob/living/carbon/human/H = user
- if(H.wear_id)
- if(istype(H.wear_id, /obj/item/weapon/card/id))
- card = H.wear_id
- return 1
- if(istype(H.wear_id,/obj/item/device/pda))
- var/obj/item/device/pda/P = H.wear_id
- if(istype(P.id,/obj/item/weapon/card/id))
- card = P.id
- return 1
- return 0
- return 0
-
- insert()
- if(accepted)
- card.money += inserted
- inserted = 0
-
- Topic(href,href_list)
- if (usr.machine==src && get_dist(src, usr) <= 1 || istype(usr, /mob/living/silicon/ai))
- if(href_list["eca"])
- if(accepted)
- for(var/obj/item/weapon/spacecash/M in cashes)
- M.loc = loc
- inserted = 0
- if(!cashes)
- cashes = null
- if(href_list["with"] && card)
- withdraw(usr)
- if(href_list["ins"] && card)
- if(accepted)
- card.money += inserted
- inserted = 0
- if(cashes)
- cashes = null
- if(href_list["lock"])
- card = null
- accepted = 0
- usr.machine = null
- usr << browse(null,"window=atm")
- src.updateUsrDialog()
- else
- usr.machine = null
- usr << browse(null,"window=atm")
-
-
-/obj/item/weapon/card/id/proc/checkaccess(p,var/mob/user)
- if(p == pin)
- user << "\green Access granted"
- return 1
- user << "\red Access denied"
- return 0
\ No newline at end of file
diff --git a/code/WorkInProgress/carn/Explosion2.dm b/code/WorkInProgress/carn/Explosion2.dm
deleted file mode 100644
index 06b8569002..0000000000
--- a/code/WorkInProgress/carn/Explosion2.dm
+++ /dev/null
@@ -1,117 +0,0 @@
-//TODO: Flash range does nothing currently
-//NOTE: This has not yet been updated with the lighting deferal stuff. ~Carn
-//Needs some work anyway.
-
-proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
- spawn(0)
- var/start = world.timeofday
- epicenter = get_turf(epicenter)
- if(!epicenter) return
-
- if(adminlog)
- message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z] - JMP)")
- log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
-
- playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
- playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
-
- tension_master.explosion()
-
- if(defer_powernet_rebuild != 2)
- defer_powernet_rebuild = 1
-
- if(heavy_impact_range > 1)
- var/datum/effect/system/explosion/E = new/datum/effect/system/explosion()
- E.set_up(epicenter)
- E.start()
-
- var/x = epicenter.x
- var/y = epicenter.y
- var/z = epicenter.z
-
- var/counter = 0
-
- if(devastation_range > 0)
- counter += explosion_turf(x,y,z,1)
- else
- devastation_range = 0
- if(heavy_impact_range > 0)
- counter += explosion_turf(x,y,z,2)
- else
- heavy_impact_range = 0
- if(light_impact_range > 0)
- counter += explosion_turf(x,y,z,3)
- else
- return
-
- //Diamond 'splosions (looks more round than square version)
- for(var/i=0, i[copytext("\ref[powernets[i]]",8,12)]"
-
-
-client/verb/powernet_overlays()
- for(var/obj/structure/cable/C in cable_list)
- C.maptext = "[copytext("\ref[C.powernet]",8,12)]"
- for(var/obj/machinery/power/M in machines)
- M.maptext = "[copytext("\ref[M.powernet]",8,12)]"
-*/
diff --git a/code/WorkInProgress/carn/master_controller_old.dm b/code/WorkInProgress/carn/master_controller_old.dm
deleted file mode 100644
index 80a7659035..0000000000
--- a/code/WorkInProgress/carn/master_controller_old.dm
+++ /dev/null
@@ -1,210 +0,0 @@
-var/global/datum/controller/game_controller/master_controller //Set in world.New()
-var/global/datum/failsafe/Failsafe
-var/global/controller_iteration = 0
-
-
-var/global/last_tick_timeofday = world.timeofday
-var/global/last_tick_duration = 0
-
-datum/controller/game_controller
- var/processing = 0
-
- var/global/air_master_ready = 0
- var/global/sun_ready = 0
- var/global/mobs_ready = 0
- var/global/diseases_ready = 0
- var/global/machines_ready = 0
- var/global/objects_ready = 0
- var/global/networks_ready = 0
- var/global/powernets_ready = 0
- var/global/ticker_ready = 0
-
- //Used for MC 'proc break' debugging
- var/global/obj/last_obj_processed
- var/global/datum/disease/last_disease_processed
- var/global/obj/machinery/last_machine_processed
- var/global/mob/last_mob_processed
-
-
- proc/setup()
- if(master_controller && (master_controller != src))
- del(src)
- return
- //There can be only one master.
-
- if(!air_master)
- air_master = new /datum/controller/air_system()
- air_master.setup()
-
- if(!job_master)
- job_master = new /datum/controller/occupations()
- if(job_master.SetupOccupations())
- world << "\red \b Job setup complete"
- job_master.LoadJobs("config/jobs.txt")
-
- world.tick_lag = config.Ticklag
-
- createRandomZlevel()
-
- setup_objects()
-
- setupgenetics()
-
-
- for(var/i = 0, i < max_secret_rooms, i++)
- make_mining_asteroid_secret()
-
- syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round.
- syndicate_code_response = generate_code_phrase()
-
- emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
-
- if(!ticker)
- ticker = new /datum/controller/gameticker()
-
- setupfactions()
-
- spawn
- ticker.pregame()
-
- proc/setup_objects()
- world << "\red \b Initializing objects"
- sleep(-1)
-
- for(var/obj/object in world)
- object.initialize()
-
- world << "\red \b Initializing pipe networks"
- sleep(-1)
-
- for(var/obj/machinery/atmospherics/machine in world)
- machine.build_network()
-
- world << "\red \b Initializing atmos machinery."
- sleep(-1)
- for(var/obj/machinery/atmospherics/unary/vent_pump/T in world)
- T.broadcast_status()
- for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world)
- T.broadcast_status()
-
- world << "\red \b Initializations complete."
-
-
- proc/process()
- processing = 1
- spawn(0)
- set background = 1
- while(1)
- var/currenttime = world.timeofday
- var/diff = (currenttime - last_tick_timeofday) / 10
- last_tick_timeofday = currenttime
- last_tick_duration = diff
-
- if(processing)
-
- controller_iteration++
-
- var/start_time = world.timeofday
-
- air_master_ready = 0
- sun_ready = 0
- mobs_ready = 0
- diseases_ready = 0
- machines_ready = 0
- objects_ready = 0
- networks_ready = 0
- powernets_ready = 0
- ticker_ready = 0
-
- spawn(0)
- air_master.process()
- air_master_ready = 1
-
- sleep(1)
-
- spawn(0)
- sun.calc_position()
- sun_ready = 1
-
- sleep(-1)
-
- spawn(0)
- for(var/mob/M in world)
- last_mob_processed = M
- M.Life()
- mobs_ready = 1
-
- sleep(-1)
-
- spawn(0)
- for(var/datum/disease/D in active_diseases)
- last_disease_processed = D
- D.process()
- diseases_ready = 1
-
- spawn(0)
- for(var/obj/machinery/machine in machines)
- if(machine)
- last_machine_processed = machine
- machine.process()
- if(machine && machine.use_power)
- machine.auto_use_power()
-
- machines_ready = 1
-
- sleep(1)
-
- spawn(-1)
- for(var/obj/object in processing_objects)
- last_obj_processed = object
- object.process()
- objects_ready = 1
-
- sleep(-1)
-
- spawn(-1)
- for(var/datum/pipe_network/network in pipe_networks)
- network.process()
- networks_ready = 1
-
- spawn(-1)
- for(var/datum/powernet/P in powernets)
- P.reset()
- powernets_ready = 1
-
- sleep(-1)
-
- spawn(-1)
- ticker.process()
- ticker_ready = 1
-
- var/IL_check = 0 //Infinite loop check (To report when the master controller breaks.)
- while(!air_master_ready || !sun_ready || !mobs_ready || !diseases_ready || !machines_ready || !objects_ready || !networks_ready || !powernets_ready || !ticker_ready)
- IL_check++
- if(IL_check > 600)
- var/MC_report = "air_master_ready = [air_master_ready]; sun_ready = [sun_ready]; mobs_ready = [mobs_ready]; diseases_ready = [diseases_ready]; machines_ready = [machines_ready]; objects_ready = [objects_ready]; networks_ready = [networks_ready]; powernets_ready = [powernets_ready]; ticker_ready = [ticker_ready];"
- message_admins("PROC BREAKAGE WARNING: The game's master contorller appears to be stuck in one of it's cycles. It has looped through it's delaying loop [IL_check] times.")
- message_admins("The master controller reports: [MC_report]")
- if(!diseases_ready)
- if(last_disease_processed)
- message_admins("DISEASE PROCESSING stuck on [last_disease_processed]", 0, 1)
- else
- message_admins("DISEASE PROCESSING stuck on unknown")
- if(!machines_ready)
- if(last_machine_processed)
- message_admins("MACHINE PROCESSING stuck on [last_machine_processed]", 0, 1)
- else
- message_admins("MACHINE PROCESSING stuck on unknown")
- if(!objects_ready)
- if(last_obj_processed)
- message_admins("OBJ PROCESSING stuck on [last_obj_processed]", 0, 1)
- else
- message_admins("OBJ PROCESSING stuck on unknown")
- log_admin("PROC BREAKAGE WARNING: infinite_loop_check = [IL_check]; [MC_report];")
- message_admins("Master controller breaking out of delaying loop. Restarting the round is advised if problem persists. DO NOT manually restart the master controller.")
- break;
- sleep(1)
-
- sleep(world.timeofday+12-start_time)
- else
- sleep(10)
\ No newline at end of file
diff --git a/code/WorkInProgress/carn/master_controller_semi-seq.dm b/code/WorkInProgress/carn/master_controller_semi-seq.dm
deleted file mode 100644
index 0f9b4f666d..0000000000
--- a/code/WorkInProgress/carn/master_controller_semi-seq.dm
+++ /dev/null
@@ -1,258 +0,0 @@
-//Nothing spectacular, just a slightly more configurable MC.
-
-var/global/datum/controller/game_controller/master_controller //Set in world.New()
-var/global/datum/failsafe/Failsafe
-var/global/controller_iteration = 0
-
-
-var/global/last_tick_timeofday = world.timeofday
-var/global/last_tick_duration = 0
-
-var/global/obj/machinery/last_obj_processed //Used for MC 'proc break' debugging
-var/global/datum/disease/last_disease_processed //Used for MC 'proc break' debugging
-var/global/obj/machinery/last_machine_processed //Used for MC 'proc break' debugging
-
-datum/controller/game_controller
- var/processing = 0
- var/breather_ticks = 1 //a somewhat crude attempt to iron over the 'bumps' caused by high-cpu use by letting the MC have a breather for this many ticks after every step
- var/minimum_ticks = 10 //The minimum length of time between MC ticks
-
- var/global/air_master_ready = 0
- var/global/tension_master_ready = 0
- var/global/sun_ready = 0
- var/global/mobs_ready = 0
- var/global/diseases_ready = 0
- var/global/machines_ready = 0
- var/global/objects_ready = 0
- var/global/networks_ready = 0
- var/global/powernets_ready = 0
- var/global/ticker_ready = 0
-
-datum/controller/game_controller/New()
- //There can be only one master_controller. Out with the old and in with the new.
- if(master_controller)
- if(master_controller != src)
- del(master_controller)
- master_controller = src
-
- if(!air_master)
- air_master = new /datum/controller/air_system()
- air_master.setup()
-
- if(!job_master)
- job_master = new /datum/controller/occupations()
- if(job_master.SetupOccupations())
- world << "\red \b Job setup complete"
- job_master.LoadJobs("config/jobs.txt")
-
- if(!tension_master) tension_master = new /datum/tension()
- if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
- if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
- if(!ticker) ticker = new /datum/controller/gameticker()
- if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
- if(artifact_spawn) artifact_spawning_turfs = artifact_spawn
-
-datum/controller/game_controller/proc/setup()
- world.tick_lag = config.Ticklag
-
- createRandomZlevel()
- setup_objects()
- setupgenetics()
- setupfactions()
-
- for(var/i = 0, i < max_secret_rooms, i++)
- make_mining_asteroid_secret()
-
- spawn(0)
- if(ticker)
- ticker.pregame()
-
-datum/controller/game_controller/proc/setup_objects()
- world << "\red \b Initializing objects"
- sleep(-1)
- for(var/obj/object in world)
- object.initialize()
-
- world << "\red \b Initializing pipe networks"
- sleep(-1)
- for(var/obj/machinery/atmospherics/machine in world)
- machine.build_network()
-
- world << "\red \b Initializing atmos machinery."
- sleep(-1)
- for(var/obj/machinery/atmospherics/unary/vent_pump/T in world)
- T.broadcast_status()
- for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world)
- T.broadcast_status()
-
- world << "\red \b Initializations complete."
- sleep(-1)
-
-
-datum/controller/game_controller/proc/process()
- set background = 1
- processing = 1
- while(1) //far more efficient than recursively calling ourself
- if(!Failsafe) new /datum/failsafe()
-
- var/currenttime = world.timeofday
- last_tick_duration = (currenttime - last_tick_timeofday) / 10
- last_tick_timeofday = currenttime
-
- if(processing)
- var/start_time = world.timeofday
- controller_iteration++
-
- air_master_ready = 0
- tension_master_ready = 0
- sun_ready = 0
- mobs_ready = 0
- diseases_ready = 0
- machines_ready = 0
- objects_ready = 0
- networks_ready = 0
- powernets_ready = 0
- ticker_ready = 0
-
- spawn(0)
- air_master.process()
- air_master_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- tension_master.process()
- tension_master_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- sun.calc_position()
- sun_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- for(var/mob/living/M in world) //only living mobs have life processes
- M.Life()
- mobs_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- for(var/datum/disease/D in active_diseases)
- last_disease_processed = D
- D.process()
- diseases_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- for(var/obj/machinery/machine in machines)
- if(machine)
- last_machine_processed = machine
- machine.process()
- if(machine && machine.use_power)
- machine.auto_use_power()
- machines_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- for(var/obj/object in processing_objects)
- last_obj_processed = object
- object.process()
- objects_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- for(var/datum/pipe_network/network in pipe_networks)
- network.process()
- networks_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- for(var/datum/powernet/P in powernets)
- P.reset()
- powernets_ready = 1
- sleep(breather_ticks)
-
- spawn(0)
- ticker.process()
- ticker_ready = 1
-
- sleep( minimum_ticks - max(world.timeofday-start_time,0) ) //to prevent long delays happening at midnight
-
- var/IL_check = 0 //Infinite loop check (To report when the master controller breaks.)
- while(!air_master_ready || !tension_master_ready || !sun_ready || !mobs_ready || !diseases_ready || !machines_ready || !objects_ready || !networks_ready || !powernets_ready || !ticker_ready)
- IL_check++
- if(IL_check > 200)
- var/MC_report = "air_master_ready = [air_master_ready]; tension_master_ready = [tension_master_ready]; sun_ready = [sun_ready]; mobs_ready = [mobs_ready]; diseases_ready = [diseases_ready]; machines_ready = [machines_ready]; objects_ready = [objects_ready]; networks_ready = [networks_ready]; powernets_ready = [powernets_ready]; ticker_ready = [ticker_ready];"
- var/MC_admin_report = "PROC BREAKAGE WARNING: The game's master contorller appears to be stuck in one of it's cycles. It has looped through it's delaying loop [IL_check] times.
The master controller reports: [MC_report]
"
- if(!diseases_ready)
- if(last_disease_processed)
- MC_admin_report += "DISEASE PROCESSING stuck on [last_disease_processed]
"
- else
- MC_admin_report += "DISEASE PROCESSING stuck on unknown
"
- if(!machines_ready)
- if(last_machine_processed)
- MC_admin_report += "MACHINE PROCESSING stuck on [last_machine_processed]
"
- else
- MC_admin_report += "MACHINE PROCESSING stuck on unknown
"
- if(!objects_ready)
- if(last_obj_processed)
- MC_admin_report += "OBJ PROCESSING stuck on [last_obj_processed]
"
- else
- MC_admin_report += "OBJ PROCESSING stuck on unknown
"
- MC_admin_report += "Master controller breaking out of delaying loop. Restarting the round is advised if problem persists. DO NOT manually restart the master controller.
"
- message_admins(MC_admin_report)
- log_admin("PROC BREAKAGE WARNING: infinite_loop_check = [IL_check]; [MC_report];")
- break
- sleep(3)
- else
- sleep(10)
-
-
-
-/datum/failsafe // This thing pretty much just keeps poking the master controller
- var/spinning = 1
- var/current_iteration = 0
- var/ticks_per_spin = 200 //poke the MC every 20 seconds
- var/defcon = 0 //alert level. For every poke that fails this is raised by 1. When it reaches 5 the MC is replaced with a new one. (effectively killing any master_controller.process() and starting a new one)
-
-/datum/failsafe/New()
- //There can be only one failsafe. Out with the old in with the new (that way we can restart the Failsafe by spawning a new one)
- if(Failsafe && (Failsafe != src))
- del(Failsafe)
- Failsafe = src
-
- current_iteration = controller_iteration
- spawn(0)
- Failsafe.spin()
-
-
-/datum/failsafe/proc/spin()
- set background = 1
- while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop
- if(master_controller)
- if(spinning && master_controller.processing) //only poke if these overrides aren't in effect
- if(current_iteration == controller_iteration) //master_controller hasn't finished processing in the defined interval
- switch(defcon)
- if(0 to 3)
- defcon++
- if(4)
- defcon = 5
- for(var/client/C)
- if(C.holder)
- C << "Warning. The Master Controller has not fired in the last [4*ticks_per_spin] ticks. Automatic restart in [ticks_per_spin] ticks."
- if(5)
- for(var/client/C)
- if(C.holder)
- C << "Warning. The Master Controller has still not fired within the last [5*ticks_per_spin] ticks. Killing and restarting..."
- spawn(0)
- new /datum/controller/game_controller() //replace the old master_controller (hence killing the old one's process)
- master_controller.process() //Start it rolling again
- defcon = 0
- else
- defcon = 0
- current_iteration = controller_iteration
- else
- defcon = 0
- else
- new /datum/controller/game_controller() //replace the missing master_controller! This should never happen.
- sleep(ticks_per_spin)
-
diff --git a/code/WorkInProgress/computer3/computers/aifixer.dm b/code/WorkInProgress/computer3/computers/aifixer.dm
deleted file mode 100644
index a52e40a0d5..0000000000
--- a/code/WorkInProgress/computer3/computers/aifixer.dm
+++ /dev/null
@@ -1,117 +0,0 @@
-/obj/machinery/computer3/aifixer
- default_prog = /datum/file/program/aifixer
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/ai_holder)
- icon_state = "frame-rnd"
-
-
-/datum/file/program/aifixer
- name = "AI system integrity restorer"
- desc = "Repairs and revives artificial intelligence cores."
- image = 'icons/ntos/airestore.png'
- active_state = "ai-fixer-empty"
- req_access = list(access_captain, access_robotics, access_heads)
-
- update_icon()
- if(!computer || !computer.cradle)
- overlay.icon_state = "ai-fixer-404"
- return // what
-
- if(!computer.cradle.occupant)
- overlay.icon_state = "ai-fixer-empty"
- else
- if (computer.cradle.occupant.health >= 0 && computer.cradle.occupant.stat != 2)
- overlay.icon_state = "ai-fixer-full"
- else
- overlay.icon_state = "ai-fixer-404"
- computer.update_icon()
-
- interact()
- if(!interactable())
- return
-
- if(!computer.cradle)
- computer.Crash(MISSING_PERIPHERAL)
- return
-
- popup.set_content(aifixer_menu())
- popup.open()
- return
-
- proc/aifixer_menu()
- var/dat = ""
- if (computer.cradle.occupant)
- var/laws
- dat += "Stored AI: [computer.cradle.occupant.name]
"
- dat += "System integrity: [(computer.cradle.occupant.health+100)/2]%
"
-
- if (computer.cradle.occupant.laws.zeroth)
- laws += "0: [computer.cradle.occupant.laws.zeroth]
"
-
- var/number = 1
- for (var/index = 1, index <= computer.cradle.occupant.laws.inherent.len, index++)
- var/law = computer.cradle.occupant.laws.inherent[index]
- if (length(law) > 0)
- laws += "[number]: [law]
"
- number++
-
- for (var/index = 1, index <= computer.cradle.occupant.laws.supplied.len, index++)
- var/law = computer.cradle.occupant.laws.supplied[index]
- if (length(law) > 0)
- laws += "[number]: [law]
"
- number++
-
- dat += "Laws:
[laws]
"
-
- if (computer.cradle.occupant.stat == 2)
- dat += "AI non-functional"
- else
- dat += "AI functional"
- if (!computer.cradle.busy)
- dat += "
[topic_link(src,"fix","Begin Reconstruction")]"
- else
- dat += "
Reconstruction in process, please wait.
"
- dat += "
[topic_link(src,"close","Close")]"
- return dat
-
- Topic(var/href, var/list/href_list)
- if(!interactable() || !computer.cradle || ..(href,href_list))
- return
-
- if ("fix" in href_list)
- var/mob/living/silicon/ai/occupant = computer.cradle.occupant
- if(!occupant) return
-
- computer.cradle.busy = 1
- computer.overlays += image('icons/obj/computer.dmi', "ai-fixer-on")
-
- var/i = 0
- while (occupant.health < 100)
- if(!computer || (computer.stat&~MAINT)) // takes some time, keep checking
- break
-
- occupant.adjustOxyLoss(-1)
- occupant.adjustFireLoss(-1)
- occupant.adjustToxLoss(-1)
- occupant.adjustBruteLoss(-1)
- occupant.updatehealth()
- if (occupant.health >= 0 && computer.cradle.occupant.stat == 2)
- occupant.stat = 0
- occupant.lying = 0
- dead_mob_list -= occupant
- living_mob_list += occupant
- update_icon()
-
- i++
- if(i == 5)
- computer.use_power(50) // repairing an AI is nontrivial. laptop battery may not be enough.
- computer.power_change() // if the power runs out, set stat
- i = 0
-
- computer.updateUsrDialog()
-
- sleep(10)
- computer.cradle.busy = 0
- computer.overlays -= image('icons/obj/computer.dmi', "ai-fixer-on")
-
- computer.updateUsrDialog()
- return
diff --git a/code/WorkInProgress/computer3/computers/cloning.dm b/code/WorkInProgress/computer3/computers/cloning.dm
deleted file mode 100644
index 49ed2a04b8..0000000000
--- a/code/WorkInProgress/computer3/computers/cloning.dm
+++ /dev/null
@@ -1,363 +0,0 @@
-/obj/machinery/computer3/cloning
- default_prog = /datum/file/program/cloning
- spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/storage/removable,/obj/item/part/computer/networking/prox)
-
-/datum/file/program/cloning
- name = "cloning console"
- desc = "Connects to cloning machinery through the local network."
- active_state = "dna_old"
-
- req_access = list(access_heads) //Only used for record deletion right now.
-
- var/obj/machinery/dna_scannernew/scanner = null //Linked scanner. For scanning.
- var/obj/machinery/clonepod/pod1 = null //Linked cloning pod.
-
- var/temp = "Inactive"
- var/scantemp_ckey
- var/scantemp = "Ready to Scan"
- var/menu = 1 //Which menu screen to display
- var/list/records = list()
- var/datum/data/record/active_record = null
- var/loading = 0 // Nice loading text
- var/has_disk = 0
-
- proc/updatemodules()
- if(!computer.net) return
-
- if(scanner && pod1)
- if(!computer.net.verify_machine(scanner))
- scanner = null
- if(!computer.net.verify_machine(pod1))
- pod1 = null
-
- if(!scanner || !pod1)
- var/list/nearby = computer.net.get_machines()
- scanner = locate(/obj/machinery/dna_scannernew) in nearby
- pod1 = locate(/obj/machinery/clonepod) in nearby
-
- if (pod1)
- pod1.connected = src // Some variable the pod needs
-
- proc/ScanningMenu()
- if (isnull(scanner))
- return "ERROR: No Scanner detected!
"
-
- var/dat = "Scanner Functions
"
- dat += ""
-
- if (!scanner.occupant)
- dat += "Scanner Unoccupied"
- else if(loading)
- dat += "[scanner.occupant] => Scanning..."
- else
- if (scanner.occupant.ckey != scantemp_ckey)
- scantemp = "Ready to Scan"
- scantemp_ckey = scanner.occupant.ckey
- dat += "[scanner.occupant] => [scantemp]"
-
- dat += "
"
-
- if (scanner.occupant)
- dat += topic_link(src,"scan","Start Scan") + "
"
- if(scanner.locked)
- dat += topic_link(src,"lock","Unlock Scanner")
- else
- dat += topic_link(src,"lock","Lock Scanner")
- else
- dat += fake_link("Start Scan")
-
- // Footer
- dat += "Database Functions
"
- if (records.len > 0)
- dat += topic_link(src,"menu=2","View Records ([records.len])") + "
"
- else
- dat += fake_link("View Records (0)")
-
- if (has_disk)
- dat += topic_link(src,"eject_disk","Eject Disk") + "
"
- return dat
-
- proc/RecordsList()
- var/dat = "Current records
"
- dat += topic_link(src,"menu=1","<< Back") + "
"
- for(var/datum/data/record/R in records)
- dat += "[R.fields["name"]]
Scan ID [R.fields["id"]] " + topic_link(src,"view_rec=\ref[R]","View Record")
- return dat
-
- proc/ShowRecord()
- var/dat = "Selected Record
"
- dat += topic_link(src,"menu=2","<< Back") + "
"
-
- if (!active_record)
- dat += "Record not found."
- else
- dat += "[active_record.fields["name"]]
"
- dat += "Scan ID [active_record.fields["id"]] [topic_link(src,"clone","Clone")]
"
-
- var/obj/item/weapon/implant/health/H = locate(active_record.fields["imp"])
-
- if ((H) && (istype(H)))
- dat += "Health Implant Data:
[H.sensehealth()]
"
- else
- dat += "Unable to locate Health Implant.
"
-
- dat += "Unique Identifier:
[active_record.fields["UI"]]
"
- dat += "Structural Enzymes:
[active_record.fields["SE"]]
"
-
- if (has_disk)
- dat += ""
- dat += "
Inserted Disk
"
- dat += "Contents: "
- if (computer.floppy.inserted.files.len == 0)
- dat += "Empty"
- else
- for(var/datum/file/data/genome/G in computer.floppy.inserted.files)
- dat += topic_link(src,"loadfile=\ref[G]","[G.name]") + "
"
-
- dat += "
Save to Disk:
"
- dat += topic_link(src,"save_disk=ue","Unique Identifier + Unique Enzymes") + "
"
- dat += topic_link(src,"save_disk=ui","Unique Identifier") + "
"
- dat += topic_link(src,"save_disk=se","Structural Enzymes") + "
"
- dat += "
"
-
- dat += "[topic_link(src,"del_rec","Delete Record")]"
- return dat
- proc/ConfirmDelete()
- var/dat = "[temp]
"
- dat += "Confirm Record Deletion
"
-
- dat += "[topic_link(src,"del_rec","Scan card to confirm")]
"
- dat += "[topic_link(src,"menu=3","Cancel")]"
- return dat
-
- interact()
- if(!interactable())
- return
-
- updatemodules()
-
- var/dat = ""
- dat += topic_link(src,"refresh","Refresh")
- dat += "Cloning Pod Status
"
- dat += "[temp]
"
-
- has_disk = (computer.floppy && computer.floppy.inserted)
- if(!active_record && menu > 2)
- menu = 2
-
- switch(menu)
- if(1)
- dat += ScanningMenu()
-
- if(2)
- dat += RecordsList()
-
- if(3)
- dat += ShowRecord()
-
- if(4)
- dat = ConfirmDelete() // not (+=), this is how it used to be, just putting it in a function
-
- if(!popup)
- popup = new(usr, "\ref[computer]", "Cloning System Control")
- popup.set_title_image(usr.browse_rsc_icon(overlay.icon, overlay.icon_state))
-
- popup.set_content(dat)
- popup.open()
- return
-
- Topic(var/href, var/list/href_list)
- if(loading || !interactable())
- return
-
- if (href_list["menu"])
- menu = text2num(href_list["menu"])
- else if (("scan" in href_list) && !isnull(scanner))
- scantemp = ""
-
- loading = 1
- computer.updateUsrDialog()
-
- spawn(20)
- scan_mob(scanner.occupant)
-
- loading = 0
- computer.updateUsrDialog()
-
-
- //No locking an open scanner.
- else if (("lock" in href_list) && !isnull(scanner))
- if ((!scanner.locked) && (scanner.occupant))
- scanner.locked = 1
- else
- scanner.locked = 0
-
- else if ("view_rec" in href_list)
- active_record = locate(href_list["view_rec"])
- if(istype(active_record,/datum/data/record))
- if ( !active_record.fields["ckey"] || active_record.fields["ckey"] == "" )
- del(active_record)
- temp = "Record Corrupt"
- else
- menu = 3
- else
- active_record = null
- temp = "Record missing."
-
- else if ("del_rec" in href_list)
- if ((!active_record) || (menu < 3))
- return
- if (menu == 3) //If we are viewing a record, confirm deletion
- temp = "Delete record?"
- menu = 4
-
- else if (menu == 4)
- var/obj/item/weapon/card/id/C = usr.get_active_hand()
- if (istype(C)||istype(C, /obj/item/device/pda))
- if(check_access(C))
- temp = "[active_record.fields["name"]] => Record deleted."
- records.Remove(active_record)
- del(active_record)
- menu = 2
- else
- temp = "Access Denied."
-
- else if ("eject_disk" in href_list)
- if(computer.floppy)
- computer.floppy.eject_disk()
-
- else if("loadfile" in href_list)
-
- var/datum/file/data/genome/G = locate(href_list["loadfile"]) in computer.floppy.files
- if(!istype(G))
- temp = "Load error."
- computer.updateUsrDialog()
- return
- switch(G.type)
- if(/datum/file/data/genome/UI)
- active_record.fields["UI"] = G.content
- if(/datum/file/data/genome/UE)
- active_record.fields["name"] = G.real_name
- if(/datum/file/data/genome/SE)
- active_record.fields["SE"] = G.content
- if(/datum/file/data/genome/cloning)
- active_record = G:record
- else if("savefile" in href_list)
- if (!active_record || !computer || !computer.floppy)
- temp = "Save error."
- computer.updateUsrDialog()
- return
- var/rval = 0
- switch(href_list["save_disk"])
- if("ui")
- var/datum/file/data/genome/UI/ui = new
- ui.content = active_record.fields["UI"]
- ui.real_name = active_record.fields["name"]
- rval = computer.floppy.addfile(ui)
- if("ue")
- var/datum/file/data/genome/UI/UE/ui = new
- ui.content = active_record.fields["UI"]
- ui.real_name = active_record.fields["name"]
- rval = computer.floppy.addfile(ui)
- if("se")
- var/datum/file/data/genome/SE/se = new
- se.content = active_record.fields["SE"]
- se.real_name = active_record.fields["name"]
- rval = computer.floppy.addfile(se)
- if("clone")
- var/datum/file/data/genome/cloning/c = new
- c.record = active_record
- c.real_name = active_record.fields["name"]
- rval = computer.floppy.addfile(c)
- if(!rval)
- temp = "Disk write error."
-
- else if ("refresh" in href_list)
- computer.updateUsrDialog()
-
- else if ("clone" in href_list)
- //Look for that player! They better be dead!
- if(active_record)
- //Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs.
- if(!pod1)
- temp = "No Clonepod detected."
- else if(pod1.occupant)
- temp = "Clonepod is currently occupied."
- else if(pod1.mess)
- temp = "Clonepod malfunction."
- else if(!config.revival_cloning)
- temp = "Unable to initiate cloning cycle."
- else if(pod1.growclone(active_record.fields["ckey"], active_record.fields["name"], active_record.fields["UI"], active_record.fields["SE"], active_record.fields["mind"], active_record.fields["mrace"]))
- temp = "[active_record.fields["name"]] => Cloning cycle in progress..."
- records.Remove(active_record)
- del(active_record)
- menu = 1
- else
- temp = "[active_record.fields["name"]] => Initialisation failure."
-
- else
- temp = "Data corruption."
-
- computer.add_fingerprint(usr)
- computer.updateUsrDialog()
- return
-
- proc/scan_mob(mob/living/carbon/human/subject as mob)
- if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna))
- scantemp = "Unable to locate valid genetic data."
- return
- if (!getbrain(subject))
- scantemp = "No signs of intelligence detected."
- return
- if (subject.suiciding == 1)
- scantemp = "Subject's brain is not responding to scanning stimuli."
- return
- if ((!subject.ckey) || (!subject.client))
- scantemp = "Mental interface failure."
- return
- if (NOCLONE in subject.mutations)
- scantemp = "Mental interface failure."
- return
- if (!isnull(find_record(subject.ckey)))
- scantemp = "Subject already in database."
- return
-
- subject.dna.check_integrity()
-
- var/datum/data/record/R = new /datum/data/record( )
- if(subject.dna)
- R.fields["mrace"] = subject.dna.mutantrace
- R.fields["UI"] = subject.dna.uni_identity
- R.fields["SE"] = subject.dna.struc_enzymes
- else
- R.fields["mrace"] = null
- R.fields["UI"] = null
- R.fields["SE"] = null
- R.fields["ckey"] = subject.ckey
- R.fields["name"] = subject.real_name
- R.fields["id"] = copytext(md5(subject.real_name), 2, 6)
-
-
-
- //Add an implant if needed
- var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
- if (isnull(imp))
- imp = new /obj/item/weapon/implant/health(subject)
- imp.implanted = subject
- R.fields["imp"] = "\ref[imp]"
- //Update it if needed
- else
- R.fields["imp"] = "\ref[imp]"
-
- if (!isnull(subject.mind)) //Save that mind so traitors can continue traitoring after cloning.
- R.fields["mind"] = "\ref[subject.mind]"
-
- records += R
- scantemp = "Subject successfully scanned."
-
-//Find a specific record by key.
- proc/find_record(var/find_key)
- for(var/datum/data/record/R in records)
- if (R.fields["ckey"] == find_key)
- return R
- return null
diff --git a/code/WorkInProgress/computer3/computers/message.dm b/code/WorkInProgress/computer3/computers/message.dm
deleted file mode 100644
index 3bbb580f5e..0000000000
--- a/code/WorkInProgress/computer3/computers/message.dm
+++ /dev/null
@@ -1,450 +0,0 @@
-/obj/machinery/computer3/message_monitor
- default_prog = /datum/file/program/message_mon
- spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/prox)
-
-
-//BROKEN AS HELL, DON'T USE UNTIL FIXED
-
-/datum/file/program/message_mon
- name = "Message Monitor Console"
- desc = "Used to Monitor the crew's messages, that are sent via PDA. Can also be used to view Request Console messages."
- active_state = "comm_logs"
- var/hack_icon = "comm_logsc"
- var/normal_icon = "comm_logs"
-
- //Server linked to.
- var/obj/machinery/message_server/linkedServer = null
- //Sparks effect - For emag
- //var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread
-
- //Messages - Saves me time if I want to change something.
- var/noserver = "ALERT: No server detected."
- var/incorrectkey = "ALERT: Incorrect decryption key!"
- var/defaultmsg = "Welcome. Please select an option."
- var/rebootmsg = "%$&(£: Critical %$$@ Error // !RestArting! - ?pLeaSe wAit!"
-
- //Computer properties
- var/screen = 0 // 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message
- var/hacking = 0 // Is it being hacked into by the AI/Cyborg
- var/emag = 0 // When it is emagged.
- var/message = "System bootup complete. Please select an option." // The message that shows on the main menu.
- var/auth = 0 // Are they authenticated?
- var/optioncount = 7
-
- // Custom Message Properties
- var/customsender = "System Administrator"
- var/obj/item/device/pda/customrecepient = null
- var/customjob = "Admin"
- var/custommessage = "This is a test, please ignore."
-
-
- procinitialize()
- if(!linkedServer)
- if(message_servers && message_servers.len > 0)
- linkedServer = message_servers[1]
- return
-
-
- update_icon()
- if(emag || hacking)
- overlay.icon_state = hack_icon
- else
- overlay.icon_state = normal_icon
- computer.update_icon()
-
- interact()
- if(!interactable())
- return
- //If the computer is being hacked or is emagged, display the reboot message.
- if(hacking || emag)
- message = rebootmsg
- var/dat = "Message Monitor Console"
- dat += "Message Monitor Console
"
- dat += ""
-
- if(auth)
- dat += ""
- else
- dat += " \[Unauthenticated\] /"
- dat += " Server Power: [src.linkedServer && src.linkedServer.active ? "\[On\]":"\[Off\]"]
"
-
- if(hacking || emag)
- screen = 2
- else if(!auth || !linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
- if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) message = noserver
- screen = 0
-
- switch(screen)
- //Main menu
- if(0)
- // = TAB
- var/i = 0
- dat += " [++i]. Link To A Server"
- if(auth)
- if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
- dat += " ERROR: Server not found!
"
- else
- dat += " [++i]. View Message Logs
"
- dat += " [++i]. View Request Console Logs "
- dat += " [++i]. Clear Message Logs
"
- dat += " [++i]. Clear Request Console Logs
"
- dat += " [++i]. Set Custom Key
"
- dat += " [++i]. Send Admin Message
"
- else
- for(var/n = ++i; n <= optioncount; n++)
- dat += " [n]. ---------------
"
- if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
- //Malf/Traitor AIs can bruteforce into the system to gain the Key.
- dat += "*&@#. Bruteforce Key
"
- else
- dat += "
"
-
- //Bottom message
- if(!auth)
- dat += "
Please authenticate with the server in order to show additional options."
- else
- dat += "
Reg, #514 forbids sending messages to a Head of Staff containing Erotic Rendering Properties."
-
- //Message Logs
- if(1)
- var/index = 0
- //var/recipient = "Unspecified" //name of the person
- //var/sender = "Unspecified" //name of the sender
- //var/message = "Blank" //transferred message
- dat += "Back - Refresh
"
- dat += "| X | Sender | Recipient | Message |
"
- for(var/datum/data_pda_msg/pda in src.linkedServer.pda_msgs)
- index++
- if(index > 3000)
- break
- // Del - Sender - Recepient - Message
- // X - Al Green - Your Mom - WHAT UP!?
- dat += "| X | [pda.sender] | [pda.recipient] | [pda.message] |
"
- dat += "
"
- //Hacking screen.
- if(2)
- if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
- dat += "Brute-forcing for server key.
It will take 20 seconds for every character that the password has."
- dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time."
- else
- //It's the same message as the one above but in binary. Because robots understand binary and humans don't... well I thought it was clever.
- dat += {"01000010011100100111010101110100011001010010110
- 10110011001101111011100100110001101101001011011100110011
- 10010000001100110011011110111001000100000011100110110010
- 10111001001110110011001010111001000100000011010110110010
- 10111100100101110001000000100100101110100001000000111011
- 10110100101101100011011000010000001110100011000010110101
- 10110010100100000001100100011000000100000011100110110010
- 10110001101101111011011100110010001110011001000000110011
- 00110111101110010001000000110010101110110011001010111001
- 00111100100100000011000110110100001100001011100100110000
- 10110001101110100011001010111001000100000011101000110100
- 00110000101110100001000000111010001101000011001010010000
- 00111000001100001011100110111001101110111011011110111001
- 00110010000100000011010000110000101110011001011100010000
- 00100100101101110001000000111010001101000011001010010000
- 00110110101100101011000010110111001110100011010010110110
- 10110010100101100001000000111010001101000011010010111001
- 10010000001100011011011110110111001110011011011110110110
- 00110010100100000011000110110000101101110001000000111001
- 00110010101110110011001010110000101101100001000000111100
- 10110111101110101011100100010000001110100011100100111010
- 10110010100100000011010010110111001110100011001010110111
- 00111010001101001011011110110111001110011001000000110100
- 10110011000100000011110010110111101110101001000000110110
- 00110010101110100001000000111001101101111011011010110010
- 10110111101101110011001010010000001100001011000110110001
- 10110010101110011011100110010000001101001011101000010111
- 00010000001001101011000010110101101100101001000000111001
- 10111010101110010011001010010000001101110011011110010000
- 00110100001110101011011010110000101101110011100110010000
- 00110010101101110011101000110010101110010001000000111010
- 00110100001100101001000000111001001101111011011110110110
- 10010000001100100011101010111001001101001011011100110011
- 10010000001110100011010000110000101110100001000000111010
- 001101001011011010110010100101110"}
-
- //Fake messages
- if(3)
- dat += "Back - Reset
"
-
- dat += {"
- | Sender |
- Sender's Job |
- Recipient |
- Message |
"}
- //Sender - Sender's Job - Recepient - Message
- //Al Green- Your Dad - Your Mom - WHAT UP!?
-
- dat += {"| [customsender] |
- [customjob] |
- [customrecepient ? customrecepient.owner : "NONE"] |
- [custommessage] |
"}
- dat += "
Send"
-
- //Request Console Logs
- if(4)
-
- var/index = 0
- /* data_rc_msg
- X - 5%
- var/rec_dpt = "Unspecified" //name of the person - 15%
- var/send_dpt = "Unspecified" //name of the sender- 15%
- var/message = "Blank" //transferred message - 300px
- var/stamp = "Unstamped" - 15%
- var/id_auth = "Unauthenticated" - 15%
- var/priority = "Normal" - 10%
- */
- dat += "Back - Refresh
"
- dat += {"| X | Sending Dep. | Receiving Dep. |
- Message | Stamp | ID Auth. | Priority. |
"}
- for(var/datum/data_rc_msg/rc in src.linkedServer.rc_msgs)
- index++
- if(index > 3000)
- break
- // Del - Sender - Recepient - Message
- // X - Al Green - Your Mom - WHAT UP!?
- dat += {"| X | [rc.send_dpt] |
- [rc.rec_dpt] | [rc.message] | [rc.stamp] | [rc.id_auth] | [rc.priority] |
"}
- dat += "
"
-
-
- popup.width = 700
- popup.height = 700
- popup.set_content(dat)
- popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
- popup.open()
- return
-
-
- proc/BruteForce(mob/usr as mob)
- if(isnull(linkedServer))
- usr << "Could not complete brute-force: Linked Server Disconnected!"
- else
- var/currentKey = src.linkedServer.decryptkey
- usr << "Brute-force completed! The key is '[currentKey]'."
- src.hacking = 0
- src.active_state = normal_icon
- src.screen = 0 // Return the screen back to normal
-
- proc/UnmagConsole()
- src.active_state = normal_icon
- src.emag = 0
-
- proc/ResetMessage()
- customsender = "System Administrator"
- customrecepient = null
- custommessage = "This is a test, please ignore."
- customjob = "Admin"
-
- Topic(var/href, var/list/href_list)
- if(!interactable() || ..(href,href_list))
- return
-
- if ("auth" in href_list)
- if(auth)
- auth = 0
- screen = 0
- else
- var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
- if(dkey && dkey != "")
- if(src.linkedServer.decryptkey == dkey)
- auth = 1
- else
- message = incorrectkey
-
- //Turn the server on/off.
- if ("active" in href_list)
- if(auth) linkedServer.active = !linkedServer.active
- //Find a server
- if ("find" in href_list)
- if(message_servers && message_servers.len > 1)
- src.linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in message_servers
- message = "NOTICE: Server selected."
- else if(message_servers && message_servers.len > 0)
- linkedServer = message_servers[1]
- message = "NOTICE: Only Single Server Detected - Server selected."
- else
- message = noserver
-
- //View the logs - KEY REQUIRED
- if ("view" in href_list)
- if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.screen = 1
-
- //Clears the logs - KEY REQUIRED
- if ("clear" in href_list)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.linkedServer.pda_msgs = list()
- message = "NOTICE: Logs cleared."
- //Clears the request console logs - KEY REQUIRED
- if ("clearr" in href_list)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.linkedServer.rc_msgs = list()
- message = "NOTICE: Logs cleared."
- //Change the password - KEY REQUIRED
- if ("pass" in href_list)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
- if(dkey && dkey != "")
- if(src.linkedServer.decryptkey == dkey)
- var/newkey = trim(input(usr,"Please enter the new key (3 - 16 characters max):"))
- if(length(newkey) <= 3)
- message = "NOTICE: Decryption key too short!"
- else if(length(newkey) > 16)
- message = "NOTICE: Decryption key too long!"
- else if(newkey && newkey != "")
- src.linkedServer.decryptkey = newkey
- message = "NOTICE: Decryption key set."
- else
- message = incorrectkey
-
- //Hack the Console to get the password
- if ("hack" in href_list)
- if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
- src.hacking = 1
- src.screen = 2
- src.active_state = hack_icon
- //Time it takes to bruteforce is dependant on the password length.
- spawn(100*length(src.linkedServer.decryptkey))
- if(src && src.linkedServer && usr)
- BruteForce(usr)
- //Delete the log.
- if ("delete" in href_list)
- //Are they on the view logs screen?
- if(screen == 1)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else //if(istype(href_list["delete"], /datum/data_pda_msg))
- src.linkedServer.pda_msgs -= locate(href_list["delete"])
- message = "NOTICE: Log Deleted!"
- //Delete the request console log.
- if ("deleter" in href_list)
- //Are they on the view logs screen?
- if(screen == 4)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else //if(istype(href_list["delete"], /datum/data_pda_msg))
- src.linkedServer.rc_msgs -= locate(href_list["deleter"])
- message = "NOTICE: Log Deleted!"
- //Create a custom message
- if ("msg" in href_list)
- if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.screen = 3
- //Fake messaging selection - KEY REQUIRED
- if ("select" in href_list)
- if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- screen = 0
- else
- switch(href_list["select"])
-
- //Reset
- if("Reset")
- ResetMessage()
-
- //Select Your Name
- if("Sender")
- customsender = input(usr, "Please enter the sender's name.") as text|null
-
- //Select Receiver
- if("Recepient")
- //Get out list of viable PDAs
- var/list/obj/item/device/pda/sendPDAs = list()
- for(var/obj/item/device/pda/P in PDAs)
- if(!P.owner || P.toff || P.hidden) continue
- sendPDAs += P
- if(PDAs && PDAs.len > 0)
- customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortAtom(sendPDAs)
- else
- customrecepient = null
-
-
- //Enter custom job
- if("RecJob")
- customjob = input(usr, "Please enter the sender's job.") as text|null
-
- //Enter message
- if("Message")
- custommessage = input(usr, "Please enter your message.") as text|null
- custommessage = copytext(sanitize(custommessage), 1, MAX_MESSAGE_LEN)
-
- //Send message
- if("Send")
-
- if(isnull(customsender) || customsender == "")
- customsender = "UNKNOWN"
-
- if(isnull(customrecepient))
- message = "NOTICE: No recepient selected!"
- return src.attack_hand(usr)
-
- if(isnull(custommessage) || custommessage == "")
- message = "NOTICE: No message entered!"
- return src.attack_hand(usr)
-
- var/obj/item/device/pda/PDARec = null
- for (var/obj/item/device/pda/P in PDAs)
- if (!P.owner || P.toff || P.hidden) continue
- if(P.owner == customsender)
- PDARec = P
- //Sender isn't faking as someone who exists
- if(isnull(PDARec))
- src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
- customrecepient.tnote += "← From [customsender] ([customjob]):
[custommessage]
"
- if (!customrecepient.silent)
- playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
- for (var/mob/O in hearers(3, customrecepient.loc))
- O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*"))
- if( customrecepient.loc && ishuman(customrecepient.loc) )
- var/mob/living/carbon/human/H = customrecepient.loc
- H << "\icon[customrecepient] Message from [customsender] ([customjob]), \"[custommessage]\" (Reply)"
- log_pda("[usr] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]")
- customrecepient.overlays.Cut()
- customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
- //Sender is faking as someone who exists
- else
- src.linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]")
- customrecepient.tnote += "← From [PDARec.owner] ([customjob]):
[custommessage]
"
- if (!customrecepient.silent)
- playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
- for (var/mob/O in hearers(3, customrecepient.loc))
- O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*"))
- if( customrecepient.loc && ishuman(customrecepient.loc) )
- var/mob/living/carbon/human/H = customrecepient.loc
- H << "\icon[customrecepient] Message from [PDARec.owner] ([customjob]), \"[custommessage]\" (Reply)"
- log_pda("[usr] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]")
- customrecepient.overlays.Cut()
- customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
- //Finally..
- ResetMessage()
-
- //Request Console Logs - KEY REQUIRED
- if("viewr" in href_list)
- if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.screen = 4
-
- //usr << href_list["select"]
-
- if ("back" in href_list)
- src.screen = 0
- interact()
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/prisonshuttle.dm b/code/WorkInProgress/computer3/computers/prisonshuttle.dm
deleted file mode 100644
index f6f246e578..0000000000
--- a/code/WorkInProgress/computer3/computers/prisonshuttle.dm
+++ /dev/null
@@ -1,242 +0,0 @@
-//Config stuff
-#define PRISON_MOVETIME 150 //Time to station is milliseconds.
-#define PRISON_STATION_AREATYPE "/area/shuttle/prison/station" //Type of the prison shuttle area for station
-#define PRISON_DOCK_AREATYPE "/area/shuttle/prison/prison" //Type of the prison shuttle area for dock
-
-var/prison_shuttle_moving_to_station = 0
-var/prison_shuttle_moving_to_prison = 0
-var/prison_shuttle_at_station = 0
-var/prison_shuttle_can_send = 1
-var/prison_shuttle_time = 0
-var/prison_shuttle_timeleft = 0
-
-/obj/machinery/computer3/prison_shuttle
- name = "Prison Shuttle Console"
- icon = 'icons/obj/computer.dmi'
- icon_state = "shuttle"
- req_access = list(access_security)
- circuit = "/obj/item/part/board/circuit/prison_shuttle"
- var/temp = null
- var/hacked = 0
- var/allowedtocall = 0
- var/prison_break = 0
-
-
- attackby(I as obj, user as mob)
- return src.attack_hand(user)
-
-
- attack_ai(var/mob/user as mob)
- return src.attack_hand(user)
-
-
- attack_paw(var/mob/user as mob)
- return src.attack_hand(user)
-
-
- attackby(I as obj, user as mob)
- if(istype(I, /obj/item/tool/screwdriver))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- var/obj/item/part/board/circuit/prison_shuttle/M = new /obj/item/part/board/circuit/prison_shuttle( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.anchored = 1
-
- if (src.stat & BROKEN)
- user << "\blue The broken glass falls out."
- new /obj/item/trash/shard( src.loc )
- A.state = 3
- A.icon_state = "3"
- else
- user << "\blue You disconnect the monitor."
- A.state = 4
- A.icon_state = "4"
-
- del(src)
- else if(istype(I,/obj/item/card/emag) && (!hacked))
- hacked = 1
- user << "\blue You disable the lock."
- else
- return src.attack_hand(user)
-
-
- attack_hand(var/mob/user as mob)
- if(!src.allowed(user) && (!hacked))
- user << "\red Access Denied."
- return
- if(prison_break)
- user << "\red Unable to locate shuttle."
- return
- if(..())
- return
- user.set_machine(src)
- post_signal("prison")
- var/dat
- if (src.temp)
- dat = src.temp
- else
- dat += {"Location: [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "Moving to station ([prison_shuttle_timeleft] Secs.)":prison_shuttle_at_station ? "Station":"Dock"]
- [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "\n*Shuttle already called*
\n
":prison_shuttle_at_station ? "\nSend to Dock
\n
":"\nSend to Station
\n
"]
- \nClose"}
-
- //user << browse(dat, "window=computer;size=575x450")
- //onclose(user, "computer")
- var/datum/browser/popup = new(user, "computer", name, 575, 450)
- popup.set_content(dat)
- popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
- popup.open()
- return
-
-
- Topic(href, href_list)
- if(..())
- return
-
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.set_machine(src)
-
- if (href_list["sendtodock"])
- if (!prison_can_move())
- usr << "\red The prison shuttle is unable to leave."
- return
- if(!prison_shuttle_at_station|| prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
- post_signal("prison")
- usr << "\blue The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds."
- src.temp += "Shuttle sent.
OK"
- src.updateUsrDialog()
- prison_shuttle_moving_to_prison = 1
- prison_shuttle_time = world.timeofday + PRISON_MOVETIME
- spawn(0)
- prison_process()
-
- else if (href_list["sendtostation"])
- if (!prison_can_move())
- usr << "\red The prison shuttle is unable to leave."
- return
- if(prison_shuttle_at_station || prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
- post_signal("prison")
- usr << "\blue The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds."
- src.temp += "Shuttle sent.
OK"
- src.updateUsrDialog()
- prison_shuttle_moving_to_station = 1
- prison_shuttle_time = world.timeofday + PRISON_MOVETIME
- spawn(0)
- prison_process()
-
- else if (href_list["mainmenu"])
- src.temp = null
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- return
-
-
- proc/prison_can_move()
- if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return 0
- else return 1
-
-/*
- proc/prison_break()
- switch(prison_break)
- if (0)
- if(!prison_shuttle_at_station || prison_shuttle_moving_to_prison) return
-
- prison_shuttle_moving_to_prison = 1
- prison_shuttle_at_station = prison_shuttle_at_station
-
- if (!prison_shuttle_moving_to_prison || !prison_shuttle_moving_to_station)
- prison_shuttle_time = world.timeofday + PRISON_MOVETIME
- spawn(0)
- prison_process()
- prison_break = 1
- if(1)
- prison_break = 0
-*/
-
- proc/post_signal(var/command)
- var/datum/radio_frequency/frequency = radio_controller.return_frequency(1311)
- if(!frequency) return
- var/datum/signal/status_signal = new
- status_signal.source = src
- status_signal.transmission_method = 1
- status_signal.data["command"] = command
- frequency.post_signal(src, status_signal)
- return
-
-
- proc/prison_process()
- while(prison_shuttle_time - world.timeofday > 0)
- var/ticksleft = prison_shuttle_time - world.timeofday
-
- if(ticksleft > 1e5)
- prison_shuttle_time = world.timeofday + 10 // midnight rollover
-
- prison_shuttle_timeleft = (ticksleft / 10)
- sleep(5)
- prison_shuttle_moving_to_station = 0
- prison_shuttle_moving_to_prison = 0
-
- switch(prison_shuttle_at_station)
-
- if(0)
- prison_shuttle_at_station = 1
- if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
-
- if (!prison_can_move())
- usr << "\red The prison shuttle is unable to leave."
- return
-
- var/area/start_location = locate(/area/shuttle/prison/prison)
- var/area/end_location = locate(/area/shuttle/prison/station)
-
- var/list/dstturfs = list()
- var/throwy = world.maxy
-
- for(var/turf/T in end_location)
- dstturfs += T
- if(T.y < throwy)
- throwy = T.y
- // hey you, get out of the way!
- for(var/turf/T in dstturfs)
- // find the turf to move things to
- var/turf/D = locate(T.x, throwy - 1, 1)
- //var/turf/E = get_step(D, SOUTH)
- for(var/atom/movable/AM as mob|obj in T)
- AM.Move(D)
- if(istype(T, /turf/simulated))
- del(T)
- start_location.move_contents_to(end_location)
-
- if(1)
- prison_shuttle_at_station = 0
- if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
-
- if (!prison_can_move())
- usr << "\red The prison shuttle is unable to leave."
- return
-
- var/area/start_location = locate(/area/shuttle/prison/station)
- var/area/end_location = locate(/area/shuttle/prison/prison)
-
- var/list/dstturfs = list()
- var/throwy = world.maxy
-
- for(var/turf/T in end_location)
- dstturfs += T
- if(T.y < throwy)
- throwy = T.y
-
- // hey you, get out of the way!
- for(var/turf/T in dstturfs)
- // find the turf to move things to
- var/turf/D = locate(T.x, throwy - 1, 1)
- //var/turf/E = get_step(D, SOUTH)
- for(var/atom/movable/AM as mob|obj in T)
- AM.Move(D)
- if(istype(T, /turf/simulated))
- del(T)
- start_location.move_contents_to(end_location)
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/scanconsole.dm b/code/WorkInProgress/computer3/computers/scanconsole.dm
deleted file mode 100644
index 446fb5c8ff..0000000000
--- a/code/WorkInProgress/computer3/computers/scanconsole.dm
+++ /dev/null
@@ -1,1267 +0,0 @@
-/obj/machinery/computer3/scan_consolenew
- default_prog = /datum/file/program/dnascanner
- spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/storage/removable,/obj/item/part/computer/networking/prox)
-
-
-#define MAX_UIBLOCK 13
-#define MAX_SEBLOCK 14
-
-/datum/file/program/dnascanner
- name = "DNA Scanner and Manipulator"
- desc = "The DNA ScaM is sure to change your life forever."
- active_state = "dna"
- var/obj/machinery/dna_scannernew/scanner = null
-
- var/ui_block = 1
- var/se_block = 1
- var/subblock = 1
-
- var/uitarget = 1
- var/uitargethex = "1"
-
- var/radduration = 2
- var/radstrength = 1
-
- var/injectorready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
-
- var/mode = 0
- // These keep track of the patient status
- var/present = 0
- var/viable = 0
-
- var/bufferlabel = ""
- var/datum/dna/buffer = null
- var/obj/item/part/computer/target_drive = null
-
- Reset()
- ..()
- mode = 0
- scanner = null
- ui_block = 1
- se_block = 1
- subblock = 1
- buffer = null
- bufferlabel = ""
-
-
- Topic(var/href, var/list/href_list)
- if(!interactable() || !computer.net || ..(href,href_list))
- return
-
- scanner = computer.net.connect_to(/obj/machinery/dna_scannernew, scanner) // if exists, will be verified
- if(!scanner)
- computer.Crash(NETWORK_FAILURE)
- return
-
- // todo check everything goddamnit
- present = scanner.occupant && scanner.occupant.dna
- viable = present && !(NOCLONE in scanner.occupant.mutations)
-
- // current screen/function
- if("mode" in href_list)
- mode = text2num(href_list["mode"])
- // locks scanner door
- if("lock" in href_list)
- scanner.locked = !scanner.locked
-
- // inject good-juice
- if("rejuv" in href_list)
- rejuv()
-
- // expose to radiation, controlled otherwise
- if("pulse" in href_list)
- pulse(href_list["pulse"]) // ui, se, or nothing/null
-
- if("duration" in href_list)
- var/modifier = text2num(href_list["duration"])
- radduration += modifier
- if("strength" in href_list)
- var/modifier = text2num(href_list["strength"])
- radstrength += modifier
-
- if("uiblock" in href_list)
- ui_block = text2num(href_list["uiblock"])
- if("seblock" in href_list)
- se_block = text2num(href_list["seblock"])
- if("subblock" in href_list)
- subblock = text2num(href_list["subblock"])
- if("uitarget" in href_list)
- uitarget = text2num(href_list["uitarget"])
- uitargethex = num2hex(uitarget)
-
- // save dna to buffer - buffer=se,ui,ue,all,clear
- if("buffer" in href_list)
- if(!viable)
- return
- var/which = href_list["buffer"]
- if(!which || which == "clear")
- buffer = null
- else
- if(!buffer)
- buffer = new
- if( which == "all" )
- buffer.unique_enzymes = scanner.occupant.dna.unique_enzymes
- buffer.struc_enzymes = scanner.occupant.dna.struc_enzymes
- buffer.uni_identity = scanner.occupant.dna.uni_identity
- buffer.real_name = scanner.occupant.dna.real_name
- buffer.mutantrace = scanner.occupant.dna.mutantrace
- if( which == "se" )
- buffer.struc_enzymes = scanner.occupant.dna.struc_enzymes
- buffer.mutantrace = scanner.occupant.dna.mutantrace
- if( which == "ui" )
- buffer.uni_identity = scanner.occupant.dna.uni_identity
- if( which == "ue" )
- buffer.uni_identity = scanner.occupant.dna.uni_identity
- buffer.unique_enzymes = scanner.occupant.dna.unique_enzymes
- buffer.real_name = scanner.occupant.dna.real_name
-
- // save buffer to file -
- if("save" in href_list)
- if(!viable || !buffer)
- return
- var/datum/file/data/genome/G = null
- var/obj/item/part/computer/dest = device
- if(target_drive)
- dest = target_drive
-
- switch(href_list["save"])
- if("se")
- if(buffer.struc_enzymes)
- G = new /datum/file/data/genome/SE()
- G.content = buffer.struc_enzymes
- G:mutantrace = buffer.mutantrace // : not . due to inheritance
- G.real_name = buffer.real_name
- if("ui")
- if(buffer.uni_identity)
- G = new /datum/file/data/genome/UI()
- G.content = buffer.uni_identity
- G.real_name = buffer.real_name
- if("ue")
- if(buffer.uni_identity)
- G = new /datum/file/data/genome/UI/UE()
- G.content = buffer.uni_identity
- G.real_name = buffer.real_name
- if(G && dest)
- var/label = input(usr, "Enter a filename:", "Save file", buffer.real_name) as text
- G.name = G.name + "([label])"
- dest:addfile(G)
-
- // load buffer from file
- if("load" in href_list)
- var/datum/file/data/genome/G = locate(href_list["load"])
- if(G)
- if(!buffer)
- buffer = new
- switch(G.type)
- if(/datum/file/data/genome/SE)
- buffer.struc_enzymes = G.content
- buffer.mutantrace = G:mutantrace
- if(/datum/file/data/genome/UI/UE)
- buffer.uni_identity = G.content
- buffer.real_name = G.real_name
- buffer.unique_enzymes = md5(buffer.real_name)
- if(/datum/file/data/genome/UI)
- buffer.uni_identity = G.content
- if(/datum/file/data/genome/cloning)
- var/datum/dna/record = G:record
- buffer.unique_enzymes = record.unique_enzymes
- buffer.struc_enzymes = record.struc_enzymes
- buffer.uni_identity = record.uni_identity
- buffer.real_name = record.real_name
- buffer.mutantrace = record.mutantrace
-
-
- // inject genetics into occupant
- if("inject" in href_list)
- if(!buffer || !viable)
- return
-
- var/which = href_list["inject"]
- var/datum/dna/target = scanner.occupant.dna
- switch(which)
- if("all",null)
- if(buffer.struc_enzymes)
- target.struc_enzymes = buffer.struc_enzymes
- if(buffer.uni_identity)
- target.uni_identity = buffer.uni_identity
- if(buffer.real_name)
- target.real_name = buffer.real_name
- target.unique_enzymes = md5(target.real_name)
- updateappearance(scanner.occupant,target.uni_identity)
- domutcheck(scanner.occupant, scanner, 1)
- if("se")
- if(buffer.struc_enzymes)
- target.struc_enzymes = buffer.struc_enzymes
- domutcheck(scanner.occupant, scanner, 1)
- if("ui")
- if(buffer.uni_identity)
- target.uni_identity = buffer.uni_identity
- updateappearance(scanner.occupant,target.uni_identity)
- if("ue")
- if(buffer.uni_identity)
- target.uni_identity = buffer.uni_identity
- if(buffer.real_name)
- target.real_name = buffer.real_name
- target.unique_enzymes = md5(target.real_name)
- updateappearance(scanner.occupant,target.uni_identity)
-
- // generate dna injector
- if("generate" in href_list)
- if(!buffer || !injectorready)
- return
- buffer.check_integrity()
- var/which = href_list["generate"]
- var/obj/item/weapon/dnainjector/inj
- switch(which)
- if("se")
- inj = new(computer.loc)
- inj.dnatype = "se"
- inj.dna = buffer.struc_enzymes
- inj.mutantrace = buffer.mutantrace
- inj.name = "Structural Enzymes"
- if("ui")
- inj = new(computer.loc)
- inj.dnatype = "ui"
- inj.dna = buffer.uni_identity
- inj.ue = null
- inj.name = "Unique Identifiers"
- if("ue")
- inj = new(computer.loc)
- inj.dnatype = "ui"
- inj.dna = buffer.uni_identity
- inj.ue = buffer.real_name
- inj.name = "Unique Enzymes + Unique Identifiers"
- if(inj)
- injectorready = 0
- spawn(300)
- injectorready = 1
- var/label = input(usr, "Enter a label", "Label [inj.name] Injector", buffer.real_name) as null|text
- if(label && inj) // it's possible it was deleted before we get here, input suspends execution
- inj.name += " ([label])"
-
- interact()
- return // putting this in there to visually mark the end of topic() while I do other things
-
- proc/menu()
- if(!present && (mode==1 || mode==2)) // require viable occupant
- mode = 0
- switch(mode)
- if(0) // MAIN MENU
- return main_menu()
-
- if(1)
- return ui_menu()
- if(2)
- return se_menu()
-
- if(3)
- return emitter_menu()
-
- if(4)
- return buffer_menu()
-
- // unified header with health data
- // option to show UI,UE,SE as plaintext
- proc/status_display(var/dna_summary = 0)
- var/mob/living/occupant = scanner.occupant
- var/status_html
- if(viable)
- status_html = "Health:
[occupant.health]%
"
- status_html += "Radiation Level:
[occupant.radiation]%
"
- if(ishuman(occupant))
- var/rejuvenators = round(occupant.reagents.get_reagent_amount("inaprovaline") / REJUVENATORS_MAX * 100)
- status_html += "Rejuvenators:
[occupant.reagents.get_reagent_amount("inaprovaline")] units
"
-
- if (dna_summary)
- status_html += "Unique Enzymes :
[uppertext(occupant.dna.unique_enzymes)]
"
- status_html += "Unique Identifier:
[occupant.dna.uni_identity]
"
- status_html += "Structural Enzymes:
[occupant.dna.struc_enzymes]
"
-
- var/occupant_status = "Scanner Unoccupied"
- if(present)
- if(!viable)
- occupant_status = "Invalid DNA structure"
- else
- switch(occupant.stat) // obvious, see what their status is
- if(0)
- occupant_status = "Conscious"
- if(1)
- occupant_status = "Unconscious"
- else
- occupant_status = "DEAD"
-
- occupant_status = "[occupant.name] => [occupant_status]
"
- var/dat = "Scanner Status
[topic_link(src,"","Scan")][occupant_status][status_html]
"
- if(present)
- dat += topic_link(src,"lock",scanner.locked?"Unlock Scanner":"Lock Scanner") + " " + topic_link(src,"rejuv","Inject Rejuvenators")
- else
- dat += "[scanner.locked?"Unlock Scanner":"Lock Scanner"] Inject Rejuvenators"
- return dat
-
- proc/main_menu()
- var/dat = status_display(dna_summary = 1)
- dat += "
Main Menu
"
- if(present)
- dat += topic_link(src,"mode=1","Modify Unique Identifier") + "
" + topic_link(src,"mode=2","Modify Structural Enzymes") + "
"
- else
- dat += "Modify Unique Identifier
Modify Structural Enzymes
"
- dat += topic_link(src,"mode=3","Radiation Emitter Settings") + "
" + topic_link(src,"mode=4","Transfer Buffer")
- return dat
-
-
- proc/block_plus_minus(var/topicstr, var/blockval,var/min,var/max)
- var/left = blockval - 1
- var/right = blockval + 1
- if(left < min)
- left = max
- if(right > max)
- right = min
- return topic_link(src,"[topicstr]=[left]","<-") + " [blockval] " + topic_link(src,"[topicstr]=[right]","->")
-
-
- proc/getblockstring(var/ui = 0)
- var/mainblock = "seblock"
- var/block = se_block
- var/input = scanner.occupant.dna.struc_enzymes
- if(ui)
- mainblock = "uiblock"
- block = ui_block
- input = scanner.occupant.dna.uni_identity
-
- var/string = ""
- var/subpos = 1 // keeps track of the current sub block
- var/blockpos = 1
-
- for(var/i = 1, i <= length(input), i++) // loop through each letter
-
- if(blockpos == block && subpos == subblock) // if the current block/subblock is selected, mark it
- string += fake_link(copytext(input,i,i+1))
- else
- string += topic_link(src,"[mainblock]=[blockpos];subblock=[subpos]",copytext(input,i,i+1))
-
- subpos++
- if(subpos > 3) // add a line break for every block
- string += "
"
- subpos = 1
- blockpos++
-
- string += "
"
- return string
-
- proc/ui_menu()
- if(!viable)
- return "No viable occupant detected."
- var/dat = topic_link(src,"mode=0","<< Main Menu") + "
"
- dat += "Modify Unique Identifier
"
- dat += "Unique Identifier:
[getblockstring(ui=1)]
"
-
- dat += "Selected Block: " + block_plus_minus("uiblock",ui_block,1,MAX_UIBLOCK) + "
"
- dat += "Selected Sub-Block: " + block_plus_minus("subblock",subblock,1,3) + "
"
- dat += "Selected Target: " + block_plus_minus("uitarget",uitarget,0,15) + "
"
- dat += "Modify Block
"
- dat += topic_link(src,"pulse=ui","Irradiate") + "
"
- return dat
-
- proc/se_menu()
- if(!viable)
- return "No viable occupant detected."
- var/dat = topic_link(src,"mode=0","<< Main Menu") + "
"
- dat += "Modify Structural Enzymes
"
- dat += "Structural Enzymes: [getblockstring(ui=0)]
"
- dat += "Selected Block: " + block_plus_minus("seblock",se_block,1,MAX_SEBLOCK) + "
"
- dat += "Selected Sub-Block: " + block_plus_minus("subblock",subblock,1,3) + "
"
- dat += "Modify Block
"
- dat += topic_link(src,"pulse=se","Irradiate") + "
"
- return dat
-
- proc/emitter_menu()
- var/dat = topic_link(src,"mode=0","<< Main Menu") + "
"
- dat += "Radiation Emitter Settings
"
- if (viable)
- dat += topic_link(src,"pulse","Pulse Radiation")
- else
- dat += fake_link("Pulse Radiation")
- dat += "
"
- dat += "Radiation Duration: " + block_plus_minus("duration",radduration,1,20) + "
"
- dat += "Radiation Intensity: " + block_plus_minus("strength",radstrength,1,10) + "
"
- return dat
-
- proc/buffer_menu()
-
- interact()
- if(!interactable())
- return
- popup.add_stylesheet("scannernew", 'html/browser/scannernew.css')
-
- if(!computer.net)
- computer.Crash(MISSING_PERIPHERAL)
- return
-
- scanner = computer.net.connect_to(/obj/machinery/dna_scannernew, scanner) // if exists, will be verified
- if(!scanner)
- computer.Crash(NETWORK_FAILURE)
- return
-
- // todo check everything goddamnit
-
- present = scanner.occupant && scanner.occupant.dna
- viable = present && !(NOCLONE in scanner.occupant.mutations)
-
- popup.set_content(menu())
- popup.open()
-
- proc/pulse(var/target as null|anything in list("ui","se"))
-
- //Makes sure someone is in there (And valid) before trying anything
- //More than anything, this just acts as a sanity check in case the option DOES appear for whatever reason
-
- if(target != "ui" && target != "se")
- target = null
-
- // transforms into the fail condition instead of having it in yet another nested if block
- else if( prob(20 - (radduration / 2)))
- target += "-f"
-
- if(!viable)
- popup.set_content("No viable occupant detected.")
- popup.open()
- else
- popup.set_content("Working ... Please wait ([radduration]) Seconds)")
- popup.open()
-
- var/lock_state = scanner.locked
- scanner.locked = 1//lock it
- sleep(10*radduration)
-
- switch(target)
- if("ui")
- var/ui = scanner.occupant.dna.uni_identity
- var/block = getblock(ui,ui_block,3)
- var/result = ""
- for(var/sb = 1; sb <=3; sb++)
- var/temp = copytext(block,sb,sb+1)
- if(sb == subblock)
- temp = miniscramble("[uitargethex]",radstrength,radduration)
- result += temp
- scanner.occupant.dna.uni_identity = setblock(ui, ui_block, result,3)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += (radstrength+radduration)
- if("ui-f")
- if (prob(20+radstrength))
- randmutb(scanner.occupant)
- domutcheck(scanner.occupant,scanner)
- else
- randmuti(scanner.occupant)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += ((radstrength*2)+radduration)
-
- if("se")
- var/se = scanner.occupant.dna.struc_enzymes
- var/targetblock = se_block
-
- if (!(se_block in list(2,8,10,12)) && prob (20)) // shifts the target slightly
- if (se_block <= 5)
- targetblock++
- else
- targetblock--
- var/block = getblock(scanner.occupant.dna.struc_enzymes,targetblock,3)
-
- var/result = ""
- for(var/sb = 1; sb <=3; sb++)
- var/temp = copytext(block,sb,sb+1)
- if(sb == subblock)
- temp = miniscramble(temp,radstrength,radduration)
- result += temp
-
- scanner.occupant.dna.struc_enzymes = setblock(se, se_block, result,3)
- domutcheck(scanner.occupant,scanner)
- scanner.occupant.radiation += (radstrength+radduration)
- if("se-f")
- if (prob(80-radduration))
- randmutb(scanner.occupant)
- domutcheck(scanner.occupant,scanner)
- else
- randmuti(scanner.occupant)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += ((radstrength*2)+radduration)
-
- if(null)
- if (prob(95))
- if(prob(75))
- randmutb(scanner.occupant)
- else
- randmuti(scanner.occupant)
- else
- if(prob(95))
- randmutg(scanner.occupant)
- else
- randmuti(scanner.occupant)
- scanner.occupant.radiation += ((radstrength*3)+radduration*3)
-
-
- scanner.locked = lock_state
- interact()
-
- proc/rejuv()
- if(!viable)
- popup.set_content("No viable occupant detected.")
- popup.open()
- var/mob/living/carbon/human/H = scanner.occupant
- if(istype(H))
- var/inap = H.reagents.get_reagent_amount("inaprovaline") // oh my *god* this section was ugly before I shortened it
-
- if (inap < (REJUVENATORS_MAX - REJUVENATORS_INJECT))
- H.reagents.add_reagent("inaprovaline", REJUVENATORS_INJECT)
- else
- H.reagents.add_reagent("inaprovaline", max(REJUVENATORS_MAX - inap,0))
-
-/*
-/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
-
- temp_html = null
- var/temp_header_html = null
- var/temp_footer_html = null
-
- scanner_status_html = null // Scanner status is reset each update
- var/mob/living/occupant = scanner.occupant
- var/viable_occupant = (occupant && occupant.dna && !(NOCLONE in occupant.mutations))
- var/mob/living/carbon/human/human_occupant = scanner.occupant
-
- if (href_list["screen"]) // Passing a screen is only a request, we set current_screen here but it can be overridden below if necessary
- current_screen = href_list["screen"]
-
- if (!viable_occupant) // If there is no viable occupant only allow certain screens
- var/allowed_no_occupant_screens = list("mainmenu", "radsetmenu", "buffermenu") //These are the screens which will be allowed if there's no occupant
- if (!(current_screen in allowed_no_occupant_screens))
- href_list = new /list(0) // clear list of options
- current_screen = "mainmenu"
-
-
- if (!current_screen) // If no screen is set default to mainmenu
- current_screen = "mainmenu"
-
-
- if (!scanner) //Is the scanner not connected?
- scanner_status_html = "ERROR: No DNA Scanner connected."
- current_screen = null // blank does not exist in the switch below, so no screen will be outputted
- updateUsrDialog()
- return
-
- usr.set_machine(src)
- if (href_list["locked"])
- if (scanner.occupant)
- scanner.locked = !( scanner.locked )
- ////////////////////////////////////////////////////////
- if (href_list["genpulse"])
- if(!viable_occupant)//Makes sure someone is in there (And valid) before trying anything
- temp_html = text("No viable occupant detected.")//More than anything, this just acts as a sanity check in case the option DOES appear for whatever reason
- //usr << browse(temp_html, "window=scannernew;size=550x650")
- //onclose(usr, "scannernew")
- popup.set_content(temp_html)
- popup.open()
- else
-
- temp_html = text("Working ... Please wait ([] Seconds)", radduration)
- popup.set_content(temp_html)
- popup.open()
- var/lock_state = scanner.locked
- scanner.locked = 1//lock it
- sleep(10*radduration)
- if (!scanner.occupant)
- temp_html = null
- return null
- if (prob(95))
- if(prob(75))
- randmutb(scanner.occupant)
- else
- randmuti(scanner.occupant)
- else
- if(prob(95))
- randmutg(scanner.occupant)
- else
- randmuti(scanner.occupant)
- scanner.occupant.radiation += ((radstrength*3)+radduration*3)
- scanner.locked = lock_state
- temp_html = null
- dopage(src,"screen=radsetmenu")
- if (href_list["radleplus"])
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- if (radduration < 20)
- radduration++
- radduration++
- dopage(src,"screen=radsetmenu")
- if (href_list["radleminus"])
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- if (radduration > 2)
- radduration--
- radduration--
- dopage(src,"screen=radsetmenu")
- if (href_list["radinplus"])
- if (radstrength < 10)
- radstrength++
- dopage(src,"screen=radsetmenu")
- if (href_list["radinminus"])
- if (radstrength > 1)
- radstrength--
- dopage(src,"screen=radsetmenu")
- ////////////////////////////////////////////////////////
- if (href_list["unimenuplus"])
- if (ui_block < 13)
- ui_block++
- else
- ui_block = 1
- dopage(src,"screen=unimenu")
- if (href_list["unimenuminus"])
- if (ui_block > 1)
- ui_block--
- else
- ui_block = 13
- dopage(src,"screen=unimenu")
- if (href_list["unimenusubplus"])
- if (subblock < 3)
- subblock++
- else
- subblock = 1
- dopage(src,"screen=unimenu")
- if (href_list["unimenusubminus"])
- if (subblock > 1)
- subblock--
- else
- subblock = 3
- dopage(src,"screen=unimenu")
- if (href_list["unimenutargetplus"])
- if (unitarget < 15)
- unitarget++
- unitargethex = unitarget
- switch(unitarget)
- if(10)
- unitargethex = "A"
- if(11)
- unitargethex = "B"
- if(12)
- unitargethex = "C"
- if(13)
- unitargethex = "D"
- if(14)
- unitargethex = "E"
- if(15)
- unitargethex = "F"
- else
- unitarget = 0
- unitargethex = 0
- dopage(src,"screen=unimenu")
- if (href_list["unimenutargetminus"])
- if (unitarget > 0)
- unitarget--
- unitargethex = unitarget
- switch(unitarget)
- if(10)
- unitargethex = "A"
- if(11)
- unitargethex = "B"
- if(12)
- unitargethex = "C"
- if(13)
- unitargethex = "D"
- if(14)
- unitargethex = "E"
- else
- unitarget = 15
- unitargethex = "F"
- dopage(src,"screen=unimenu")
- if (href_list["uimenuset"] && href_list["uimenusubset"]) // This chunk of code updates selected block / sub-block based on click
- var/menuset = text2num(href_list["uimenuset"])
- var/menusubset = text2num(href_list["uimenusubset"])
- if ((menuset <= 13) && (menuset >= 1))
- ui_block = menuset
- if ((menusubset <= 3) && (menusubset >= 1))
- subblock = menusubset
- dopage(src, "unimenu")
- if (href_list["unipulse"])
- if(scanner.occupant)
- var/block
- var/newblock
- var/tstructure2
- block = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),subblock,1)
-
- temp_html = text("Working ... Please wait ([] Seconds)", radduration)
- popup.set_content(temp_html)
- popup.open()
- var/lock_state = scanner.locked
- scanner.locked = 1//lock it
- sleep(10*radduration)
- if (!scanner.occupant)
- temp_html = null
- return null
- ///
- if (prob((80 + (radduration / 2))))
- block = miniscrambletarget(num2text(unitarget), radstrength, radduration)
- newblock = null
- if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),2,1) + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),3,1)
- if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),3,1)
- if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),1,1) + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),2,1) + block
- tstructure2 = setblock(scanner.occupant.dna.uni_identity, ui_block, newblock,3)
- scanner.occupant.dna.uni_identity = tstructure2
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += (radstrength+radduration)
- else
- if (prob(20+radstrength))
- randmutb(scanner.occupant)
- domutcheck(scanner.occupant,scanner)
- else
- randmuti(scanner.occupant)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += ((radstrength*2)+radduration)
- scanner.locked = lock_state
- dopage(src,"screen=unimenu")
-
- ////////////////////////////////////////////////////////
- if (href_list["rejuv"])
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- else
- if(human_occupant)
- if (human_occupant.reagents.get_reagent_amount("inaprovaline") < REJUVENATORS_MAX)
- if (human_occupant.reagents.get_reagent_amount("inaprovaline") < (REJUVENATORS_MAX - REJUVENATORS_INJECT))
- human_occupant.reagents.add_reagent("inaprovaline", REJUVENATORS_INJECT)
- else
- human_occupant.reagents.add_reagent("inaprovaline", round(REJUVENATORS_MAX - human_occupant.reagents.get_reagent_amount("inaprovaline")))
- //usr << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", human_occupant.reagents.get_reagent_amount("inaprovaline"))
-
- ////////////////////////////////////////////////////////
- if (href_list["strucmenuplus"])
- if (se_block < 14)
- se_block++
- else
- se_block = 1
- dopage(src,"screen=strucmenu")
- if (href_list["strucmenuminus"])
- if (se_block > 1)
- se_block--
- else
- se_block = 14
- dopage(src,"screen=strucmenu")
- if (href_list["strucmenusubplus"])
- if (subblock < 3)
- subblock++
- else
- subblock = 1
- dopage(src,"screen=strucmenu")
- if (href_list["strucmenusubminus"])
- if (subblock > 1)
- subblock--
- else
- subblock = 3
- dopage(src,"screen=strucmenu")
- if (href_list["semenuset"] && href_list["semenusubset"]) // This chunk of code updates selected block / sub-block based on click (se stands for strutural enzymes)
- var/menuset = text2num(href_list["semenuset"])
- var/menusubset = text2num(href_list["semenusubset"])
- if ((menuset <= 14) && (menuset >= 1))
- se_block = menuset
- if ((menusubset <= 3) && (menusubset >= 1))
- subblock = menusubset
- dopage(src, "strucmenu")
- if (href_list["strucpulse"])
- var/block
- var/newblock
- var/tstructure2
- var/oldblock
- var/lock_state = scanner.locked
- scanner.locked = 1//lock it
- if (viable_occupant)
- block = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),subblock,1)
-
- temp_html = text("Working ... Please wait ([] Seconds)", radduration)
- popup.set_content(temp_html)
- popup.open()
- sleep(10*radduration)
- else
- temp_html = null
- return null
- ///
- if(viable_occupant)
- if (prob((80 + (radduration / 2))))
- if ((se_block != 2 || se_block != 12 || se_block != 8 || se_block || 10) && prob (20))
- oldblock = se_block
- block = miniscramble(block, radstrength, radduration)
- newblock = null
- if (se_block > 1 && se_block < 5)
- se_block++
- else if (se_block > 5 && se_block < 14)
- se_block--
- if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
- if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
- if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + block
- tstructure2 = setblock(scanner.occupant.dna.struc_enzymes, se_block, newblock,3)
- scanner.occupant.dna.struc_enzymes = tstructure2
- domutcheck(scanner.occupant,scanner)
- scanner.occupant.radiation += (radstrength+radduration)
- se_block = oldblock
- else
- //
- block = miniscramble(block, radstrength, radduration)
- newblock = null
- if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
- if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
- if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + block
- tstructure2 = setblock(scanner.occupant.dna.struc_enzymes, se_block, newblock,3)
- scanner.occupant.dna.struc_enzymes = tstructure2
- domutcheck(scanner.occupant,scanner)
- scanner.occupant.radiation += (radstrength+radduration)
- else
- if (prob(80-radduration))
- randmutb(scanner.occupant)
- domutcheck(scanner.occupant,scanner)
- else
- randmuti(scanner.occupant)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += ((radstrength*2)+radduration)
- scanner.locked = lock_state
- ///
- dopage(src,"screen=strucmenu")
-
- ////////////////////////////////////////////////////////
- if (href_list["b1addui"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer1iue = 0
- buffer1 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer1owner = scanner.occupant.name
- else
- buffer1owner = scanner.occupant.real_name
- buffer1label = "Unique Identifier"
- buffer1type = "ui"
- dopage(src,"screen=buffermenu")
- if (href_list["b1adduiue"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer1 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer1owner = scanner.occupant.name
- else
- buffer1owner = scanner.occupant.real_name
- buffer1label = "Unique Identifier & Unique Enzymes"
- buffer1type = "ui"
- buffer1iue = 1
- dopage(src,"screen=buffermenu")
- if (href_list["b2adduiue"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer2 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer2owner = scanner.occupant.name
- else
- buffer2owner = scanner.occupant.real_name
- buffer2label = "Unique Identifier & Unique Enzymes"
- buffer2type = "ui"
- buffer2iue = 1
- dopage(src,"screen=buffermenu")
- if (href_list["b3adduiue"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer3 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer3owner = scanner.occupant.name
- else
- buffer3owner = scanner.occupant.real_name
- buffer3label = "Unique Identifier & Unique Enzymes"
- buffer3type = "ui"
- buffer3iue = 1
- dopage(src,"screen=buffermenu")
- if (href_list["b2addui"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer2iue = 0
- buffer2 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer2owner = scanner.occupant.name
- else
- buffer2owner = scanner.occupant.real_name
- buffer2label = "Unique Identifier"
- buffer2type = "ui"
- dopage(src,"screen=buffermenu")
- if (href_list["b3addui"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer3iue = 0
- buffer3 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer3owner = scanner.occupant.name
- else
- buffer3owner = scanner.occupant.real_name
- buffer3label = "Unique Identifier"
- buffer3type = "ui"
- dopage(src,"screen=buffermenu")
- if (href_list["b1addse"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer1iue = 0
- buffer1 = scanner.occupant.dna.struc_enzymes
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer1owner = scanner.occupant.name
- else
- buffer1owner = scanner.occupant.real_name
- buffer1label = "Structural Enzymes"
- buffer1type = "se"
- dopage(src,"screen=buffermenu")
- if (href_list["b2addse"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer2iue = 0
- buffer2 = scanner.occupant.dna.struc_enzymes
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer2owner = scanner.occupant.name
- else
- buffer2owner = scanner.occupant.real_name
- buffer2label = "Structural Enzymes"
- buffer2type = "se"
- dopage(src,"screen=buffermenu")
- if (href_list["b3addse"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer3iue = 0
- buffer3 = scanner.occupant.dna.struc_enzymes
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer3owner = scanner.occupant.name
- else
- buffer3owner = scanner.occupant.real_name
- buffer3label = "Structural Enzymes"
- buffer3type = "se"
- dopage(src,"screen=buffermenu")
- if (href_list["b1clear"])
- buffer1 = null
- buffer1owner = null
- buffer1label = null
- buffer1iue = null
- dopage(src,"screen=buffermenu")
- if (href_list["b2clear"])
- buffer2 = null
- buffer2owner = null
- buffer2label = null
- buffer2iue = null
- dopage(src,"screen=buffermenu")
- if (href_list["b3clear"])
- buffer3 = null
- buffer3owner = null
- buffer3label = null
- buffer3iue = null
- dopage(src,"screen=buffermenu")
- if (href_list["b1label"])
- buffer1label = sanitize(input("New Label:","Edit Label","Infos here"))
- dopage(src,"screen=buffermenu")
- if (href_list["b2label"])
- buffer2label = sanitize(input("New Label:","Edit Label","Infos here"))
- dopage(src,"screen=buffermenu")
- if (href_list["b3label"])
- buffer3label = sanitize(input("New Label:","Edit Label","Infos here"))
- dopage(src,"screen=buffermenu")
- if (href_list["b1transfer"])
- if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
- return
- if (buffer1type == "ui")
- if (buffer1iue)
- scanner.occupant.real_name = buffer1owner
- scanner.occupant.name = buffer1owner
- scanner.occupant.dna.uni_identity = buffer1
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- else if (buffer1type == "se")
- scanner.occupant.dna.struc_enzymes = buffer1
- domutcheck(scanner.occupant,scanner)
- temp_html = "Transfered."
- scanner.occupant.radiation += rand(20,50)
-
- if (href_list["b2transfer"])
- if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
- return
- if (buffer2type == "ui")
- if (buffer2iue)
- scanner.occupant.real_name = buffer2owner
- scanner.occupant.name = buffer2owner
- scanner.occupant.dna.uni_identity = buffer2
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- else if (buffer2type == "se")
- scanner.occupant.dna.struc_enzymes = buffer2
- domutcheck(scanner.occupant,scanner)
- temp_html = "Transfered."
- scanner.occupant.radiation += rand(20,50)
-
- if (href_list["b3transfer"])
- if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
- return
- if (buffer3type == "ui")
- if (buffer3iue)
- scanner.occupant.real_name = buffer3owner
- scanner.occupant.name = buffer3owner
- scanner.occupant.dna.uni_identity = buffer3
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- else if (buffer3type == "se")
- scanner.occupant.dna.struc_enzymes = buffer3
- domutcheck(scanner.occupant,scanner)
- temp_html = "Transfered."
- scanner.occupant.radiation += rand(20,50)
-
- if (href_list["b1injector"])
- if (injectorready)
- var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
- I.dna = buffer1
- I.dnatype = buffer1type
- I.loc = loc
- I.name += " ([buffer1label])"
- if (buffer1iue) I.ue = buffer1owner //lazy haw haw
- temp_html = "Injector created."
-
- injectorready = 0
- spawn(300)
- injectorready = 1
- else
- temp_html = "Replicator not ready yet."
-
- if (href_list["b2injector"])
- if (injectorready)
- var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
- I.dna = buffer2
- I.dnatype = buffer2type
- I.loc = loc
- I.name += " ([buffer2label])"
- if (buffer2iue) I.ue = buffer2owner //lazy haw haw
- temp_html = "Injector created."
-
- injectorready = 0
- spawn(300)
- injectorready = 1
- else
- temp_html = "Replicator not ready yet."
-
- if (href_list["b3injector"])
- if (injectorready)
- var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
- I.dna = buffer3
- I.dnatype = buffer3type
- I.loc = loc
- I.name += " ([buffer3label])"
- if (buffer3iue) I.ue = buffer3owner //lazy haw haw
- temp_html = "Injector created."
-
- injectorready = 0
- spawn(300)
- injectorready = 1
- else
- temp_html = "Replicator not ready yet."
-
- ////////////////////////////////////////////////////////
- if (href_list["load_disk"])
- var/buffernum = text2num(href_list["load_disk"])
- if ((buffernum > 3) || (buffernum < 1))
- return
- if ((isnull(diskette)) || (!diskette.data) || (diskette.data == ""))
- return
- switch(buffernum)
- if(1)
- buffer1 = diskette.data
- buffer1type = diskette.data_type
- buffer1iue = diskette.ue
- buffer1owner = diskette.owner
- if(2)
- buffer2 = diskette.data
- buffer2type = diskette.data_type
- buffer2iue = diskette.ue
- buffer2owner = diskette.owner
- if(3)
- buffer3 = diskette.data
- buffer3type = diskette.data_type
- buffer3iue = diskette.ue
- buffer3owner = diskette.owner
- temp_html = "Data loaded."
-
- if (href_list["save_disk"])
- var/buffernum = text2num(href_list["save_disk"])
- if ((buffernum > 3) || (buffernum < 1))
- return
- if ((isnull(diskette)) || (diskette.read_only))
- return
- switch(buffernum)
- if(1)
- diskette.data = buffer1
- diskette.data_type = buffer1type
- diskette.ue = buffer1iue
- diskette.owner = buffer1owner
- diskette.name = "data disk - '[buffer1owner]'"
- if(2)
- diskette.data = buffer2
- diskette.data_type = buffer2type
- diskette.ue = buffer2iue
- diskette.owner = buffer2owner
- diskette.name = "data disk - '[buffer2owner]'"
- if(3)
- diskette.data = buffer3
- diskette.data_type = buffer3type
- diskette.ue = buffer3iue
- diskette.owner = buffer3owner
- diskette.name = "data disk - '[buffer3owner]'"
- temp_html = "Data saved."
- if (href_list["eject_disk"])
- if (!diskette)
- return
- diskette.loc = get_turf(src)
- diskette = null
- ////////////////////////////////////////////////////////
-
- temp_html = temp_header_html
- switch(current_screen)
- if ("mainmenu")
- temp_html += "Main Menu
"
- if (viable_occupant) //is there REALLY someone in there who can be modified?
- temp_html += text("Modify Unique Identifier
", src)
- temp_html += text("Modify Structural Enzymes
", src)
- else
- temp_html += "Modify Unique Identifier
"
- temp_html += "Modify Structural Enzymes
"
- temp_html += text("Radiation Emitter Settings
", src)
- temp_html += text("Transfer Buffer
", src)
-
- if ("unimenu")
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- else
- temp_html = "<< Main Menu
"
- temp_html += "Modify Unique Identifier
"
- temp_html += "Unique Identifier:
[getblockstring(scanner.occupant.dna.uni_identity,ui_block,subblock,3, src,1)]
"
- temp_html += "Selected Block:
<- [ui_block] ->"
- temp_html += "Selected Sub-Block:
<- [subblock] ->"
- temp_html += "Selected Target:
<- [unitargethex] ->"
- temp_html += "
Modify Block"
- temp_html += "
Irradiate "
-
- if ("strucmenu")
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- else
- temp_html = "<< Main Menu
"
- temp_html += "Modify Structural Enzymes
"
- temp_html += "Structural Enzymes: [getblockstring(scanner.occupant.dna.struc_enzymes,se_block,subblock,3,src,0)]
"
- temp_html += "Selected Block:
<- [se_block] ->"
- temp_html += "Selected Sub-Block:
<- [subblock] ->"
- temp_html += "
Modify Block"
- temp_html += "
Irradiate "
-
- if ("radsetmenu")
- temp_html = "<< Main Menu
"
- temp_html += "Radiation Emitter Settings
"
- if (viable_occupant)
- temp_html += text("Pulse Radiation", src)
- else
- temp_html += "Pulse Radiation"
- temp_html += "
Radiation Duration: - [radduration] +
"
- temp_html += "Radiation Intensity: - [radstrength] +
"
-
- if ("buffermenu")
- temp_html = "<< Main Menu
"
- temp_html += "Transfer Buffer
"
- temp_html += "Buffer 1:
"
- if (!(buffer1))
- temp_html += "Buffer Empty
"
- else
- temp_html += text("Data: []
", buffer1)
- temp_html += text("By: []
", buffer1owner)
- temp_html += text("Label: []
", buffer1label)
- if (viable_occupant) temp_html += text("Save : UI - UI+UE - SE
", src, src, src)
- if (buffer1) temp_html += text("Transfer to: Occupant - Injector
", src, src)
- //if (buffer1) temp_html += text("Isolate Block
", src)
- if (buffer1) temp_html += "Disk: Save To | Load From
"
- if (buffer1) temp_html += text("Edit Label
", src)
- if (buffer1) temp_html += text("Clear Buffer
", src)
- if (!buffer1) temp_html += "
"
- temp_html += "Buffer 2:
"
- if (!(buffer2))
- temp_html += "Buffer Empty
"
- else
- temp_html += text("Data: []
", buffer2)
- temp_html += text("By: []
", buffer2owner)
- temp_html += text("Label: []
", buffer2label)
- if (viable_occupant) temp_html += text("Save : UI - UI+UE - SE
", src, src, src)
- if (buffer2) temp_html += text("Transfer to: Occupant - Injector
", src, src)
- //if (buffer2) temp_html += text("Isolate Block
", src)
- if (buffer2) temp_html += "Disk: Save To | Load From
"
- if (buffer2) temp_html += text("Edit Label
", src)
- if (buffer2) temp_html += text("Clear Buffer
", src)
- if (!buffer2) temp_html += "
"
- temp_html += "Buffer 3:
"
- if (!(buffer3))
- temp_html += "Buffer Empty
"
- else
- temp_html += text("Data: []
", buffer3)
- temp_html += text("By: []
", buffer3owner)
- temp_html += text("Label: []
", buffer3label)
- if (viable_occupant) temp_html += text("Save : UI - UI+UE - SE
", src, src, src)
- if (buffer3) temp_html += text("Transfer to: Occupant - Injector
", src, src)
- //if (buffer3) temp_html += text("Isolate Block
", src)
- if (buffer3) temp_html += "Disk: Save To | Load From
"
- if (buffer3) temp_html += text("Edit Label
", src)
- if (buffer3) temp_html += text("Clear Buffer
", src)
- if (!buffer3) temp_html += "
"
- temp_html += temp_footer_html
-
- if(viable_occupant && !scanner_status_html && occupant) //is there REALLY someone in there?
- scanner_status_html = "Health:
[occupant.health]%
"
- scanner_status_html += "Radiation Level:
[occupant.radiation]%
"
- if(human_occupant)
- var/rejuvenators = round(human_occupant.reagents.get_reagent_amount("inaprovaline") / REJUVENATORS_MAX * 100)
- scanner_status_html += "Rejuvenators:
[human_occupant.reagents.get_reagent_amount("inaprovaline")] units
"
-
- if (current_screen == "mainmenu")
- scanner_status_html += "Unique Enzymes :
[uppertext(occupant.dna.unique_enzymes)]
"
- scanner_status_html += "Unique Identifier:
[occupant.dna.uni_identity]
"
- scanner_status_html += "Structural Enzymes:
[occupant.dna.struc_enzymes]
"
-
- var/dat = "Scanner Status
"
-
- var/occupant_status = "Scanner Unoccupied"
- if(occupant && occupant.dna) //is there REALLY someone in there?
- if (!istype(occupant,/mob/living/carbon/human))
- sleep(1)
- if(NOCLONE in occupant.mutations)
- occupant_status = "Invalid DNA structure"
- else
- switch(occupant.stat) // obvious, see what their status is
- if(0)
- occupant_status = "Conscious"
- if(1)
- occupant_status = "Unconscious"
- else
- occupant_status = "DEAD"
-
- occupant_status = "[occupant.name] => [occupant_status]
"
-
- dat += "[occupant_status][scanner_status_html]
"
-
- var/scanner_access_text = "Lock Scanner"
- if (scanner.locked)
- scanner_access_text = "Unlock Scanner"
-
- dat += "Scan "
-
- if (occupant && occupant.dna)
- dat += "[scanner_access_text] "
- if (human_occupant)
- dat += "Inject Rejuvenators
"
- else
- dat += "Inject Rejuvenators
"
- else
- dat += "[scanner_access_text] "
- dat += "Inject Rejuvenators
"
-
- if (!isnull(diskette))
- dat += text("Eject Disk
", src)
-
- dat += "
"
-
- if (temp_html)
- dat += temp_html
-
- popup.set_content(dat)
- popup.open()
-*/
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/shuttle.dm b/code/WorkInProgress/computer3/computers/shuttle.dm
deleted file mode 100644
index 5d5fab6528..0000000000
--- a/code/WorkInProgress/computer3/computers/shuttle.dm
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- This may not migrate to C3. It's basically a machine in the guise of a computer;
- there is nothing interactive about it.
-*/
-
-/obj/machinery/computer3/shuttle
- name = "Shuttle"
- desc = "For shuttle control."
- icon_state = "shuttle"
- var/auth_need = 3.0
- var/list/authorized = list( )
-
-
- attackby(var/obj/item/card/W as obj, var/mob/user as mob)
- if(stat & (BROKEN|NOPOWER)) return
- if ((!( istype(W, /obj/item/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) return
- if (istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
- if (istype(W, /obj/item/device/pda))
- var/obj/item/device/pda/pda = W
- W = pda.id
- if (!W:access) //no access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
- return
-
- var/list/cardaccess = W:access
- if(!istype(cardaccess, /list) || !cardaccess.len) //no access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
- return
-
- if(!(access_heads in W:access)) //doesn't have this access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
- return 0
-
- var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
- if(emergency_shuttle.location != 1 && user.get_active_hand() != W)
- return 0
- switch(choice)
- if("Authorize")
- src.authorized -= W:registered_name
- src.authorized += W:registered_name
- if (src.auth_need - src.authorized.len > 0)
- message_admins("[key_name_admin(user)] has authorized early shuttle launch")
- log_game("[user.ckey] has authorized early shuttle launch")
- world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
- else
- message_admins("[key_name_admin(user)] has launched the shuttle")
- log_game("[user.ckey] has launched the shuttle early")
- world << "\blue Alert: Shuttle launch time shortened to 10 seconds!"
- emergency_shuttle.online = 1
- emergency_shuttle.settimeleft(10)
- //src.authorized = null
- del(src.authorized)
- src.authorized = list( )
-
- if("Repeal")
- src.authorized -= W:registered_name
- world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
-
- if("Abort")
- world << "\blue All authorizations to shorting time for shuttle launch have been revoked!"
- src.authorized.len = 0
- src.authorized = list( )
-
- else if (istype(W, /obj/item/card/emag) && !emagged)
- var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
-
- if(!emagged && emergency_shuttle.location == 1 && user.get_active_hand() == W)
- switch(choice)
- if("Launch")
- world << "\blue Alert: Shuttle launch time shortened to 10 seconds!"
- emergency_shuttle.settimeleft( 10 )
- emagged = 1
- if("Cancel")
- return
- return
diff --git a/code/WorkInProgress/computer3/computers/specops_shuttle.dm b/code/WorkInProgress/computer3/computers/specops_shuttle.dm
deleted file mode 100644
index 81c94614cf..0000000000
--- a/code/WorkInProgress/computer3/computers/specops_shuttle.dm
+++ /dev/null
@@ -1,246 +0,0 @@
-//Config stuff
-#define SPECOPS_MOVETIME 600 //Time to station is milliseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves.
-#define SPECOPS_STATION_AREATYPE "/area/shuttle/specops/station" //Type of the spec ops shuttle area for station
-#define SPECOPS_DOCK_AREATYPE "/area/shuttle/specops/centcom" //Type of the spec ops shuttle area for dock
-
-var/specops_shuttle_moving_to_station = 0
-var/specops_shuttle_moving_to_centcom = 0
-var/specops_shuttle_at_station = 0
-var/specops_shuttle_can_send = 1
-var/specops_shuttle_time = 0
-var/specops_shuttle_timeleft = 0
-
-/obj/machinery/computer3/specops_shuttle
- name = "Spec. Ops. Shuttle Console"
- icon = 'icons/obj/computer.dmi'
- icon_state = "shuttle"
- req_access = list(access_cent_specops)
- var/temp = null
- var/hacked = 0
- var/allowedtocall = 0
-
-/proc/specops_process()
- var/area/centcom/control/cent_com = locate()//To find announcer. This area should exist for this proc to work.
- var/area/centcom/specops/special_ops = locate()//Where is the specops area located?
- var/mob/living/silicon/decoy/announcer = locate() in cent_com//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
-
- var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
- var/message = "THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown.
- if(announcer)
- announcer.say(message)
- message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
- announcer.say(message)
-
- while(specops_shuttle_time - world.timeofday > 0)
- var/ticksleft = specops_shuttle_time - world.timeofday
-
- if(ticksleft > 1e5)
- specops_shuttle_time = world.timeofday + 10 // midnight rollover
- specops_shuttle_timeleft = (ticksleft / 10)
-
- //All this does is announce the time before launch.
- if(announcer)
- var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
- if(rounded_time_left in message_tracker)//If that time is in the list for message announce.
- message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN"
- if(rounded_time_left==0)
- message = "ALERT: TAKEOFF"
- announcer.say(message)
- message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
- //Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
-
- sleep(5)
-
- specops_shuttle_moving_to_station = 0
- specops_shuttle_moving_to_centcom = 0
-
- specops_shuttle_at_station = 1
- if (specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
-
- if (!specops_can_move())
- usr << "\red The Special Operations shuttle is unable to leave."
- return
-
- //Begin Marauder launchpad.
- spawn(0)//So it parallel processes it.
- for(var/obj/machinery/door/poddoor/M in special_ops)
- switch(M.id)
- if("ASSAULT0")
- spawn(10)//1 second delay between each.
- M.open()
- if("ASSAULT1")
- spawn(20)
- M.open()
- if("ASSAULT2")
- spawn(30)
- M.open()
- if("ASSAULT3")
- spawn(40)
- M.open()
-
- sleep(10)
-
- var/spawn_marauder[] = new()
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Marauder Entry")
- spawn_marauder.Add(L)
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Marauder Exit")
- var/obj/effect/portal/P = new(L.loc)
- P.invisibility = 101//So it is not seen by anyone.
- P.failchance = 0//So it has no fail chance when teleporting.
- P.target = pick(spawn_marauder)//Where the marauder will arrive.
- spawn_marauder.Remove(P.target)
-
- sleep(10)
-
- for(var/obj/machinery/mass_driver/M in special_ops)
- switch(M.id)
- if("ASSAULT0")
- spawn(10)
- M.drive()
- if("ASSAULT1")
- spawn(20)
- M.drive()
- if("ASSAULT2")
- spawn(30)
- M.drive()
- if("ASSAULT3")
- spawn(40)
- M.drive()
-
- sleep(50)//Doors remain open for 5 seconds.
-
- for(var/obj/machinery/door/poddoor/M in special_ops)
- switch(M.id)//Doors close at the same time.
- if("ASSAULT0")
- spawn(0)
- M.close()
- if("ASSAULT1")
- spawn(0)
- M.close()
- if("ASSAULT2")
- spawn(0)
- M.close()
- if("ASSAULT3")
- spawn(0)
- M.close()
- special_ops.readyreset()//Reset firealarm after the team launched.
- //End Marauder launchpad.
-
- var/area/start_location = locate(/area/shuttle/specops/centcom)
- var/area/end_location = locate(/area/shuttle/specops/station)
-
- var/list/dstturfs = list()
- var/throwy = world.maxy
-
- for(var/turf/T in end_location)
- dstturfs += T
- if(T.y < throwy)
- throwy = T.y
-
- // hey you, get out of the way!
- for(var/turf/T in dstturfs)
- // find the turf to move things to
- var/turf/D = locate(T.x, throwy - 1, 1)
- //var/turf/E = get_step(D, SOUTH)
- for(var/atom/movable/AM as mob|obj in T)
- AM.Move(D)
- if(istype(T, /turf/simulated))
- del(T)
-
- start_location.move_contents_to(end_location)
-
- for(var/turf/T in get_area_turfs(end_location) )
- var/mob/M = locate(/mob) in T
- M << "\red You have arrived to [station_name]. Commence operation!"
-
-/proc/specops_can_move()
- if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0
- else return 1
-
-/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/specops_shuttle/attack_ai(var/mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/specops_shuttle/attack_paw(var/mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
- if(istype(I,/obj/item/card/emag))
- user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
- else
- return attack_hand(user)
-
-/obj/machinery/computer3/specops_shuttle/attack_hand(var/mob/user as mob)
- if(!allowed(user))
- user << "\red Access Denied."
- return
-
- if (sent_strike_team == 0)
- usr << "\red The strike team has not yet deployed."
- return
-
- if(..())
- return
-
- user.set_machine(src)
- var/dat
- if (temp)
- dat = temp
- else
- dat += {"
- Location: [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "Departing for [station_name] in ([specops_shuttle_timeleft] seconds.)":specops_shuttle_at_station ? "Station":"Dock"]
- [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*
\n
":specops_shuttle_at_station ? "\nShuttle Offline
\n
":"\nDepart to [station_name]
\n
"]
- \nClose"}
-
- //user << browse(dat, "window=computer;size=575x450")
- //onclose(user, "computer")
- var/datum/browser/popup = new(user, "computer", "Special Operations Shuttle", 575, 450)
- popup.set_content(dat)
- popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
- popup.open()
- return
-
-/obj/machinery/computer3/specops_shuttle/Topic(href, href_list)
- if(..())
- return
-
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.set_machine(src)
-
- if (href_list["sendtodock"])
- if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
-
- usr << "\blue Central Command will not allow the Special Operations shuttle to return."
- return
-
- else if (href_list["sendtostation"])
- if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
-
- if (!specops_can_move())
- usr << "\red The Special Operations shuttle is unable to leave."
- return
-
- usr << "\blue The Special Operations shuttle will arrive on [station_name] in [(SPECOPS_MOVETIME/10)] seconds."
-
- temp += "Shuttle departing.
OK"
- updateUsrDialog()
-
- var/area/centcom/specops/special_ops = locate()
- if(special_ops)
- special_ops.readyalert()//Trigger alarm for the spec ops area.
- specops_shuttle_moving_to_station = 1
-
- specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME
- spawn(0)
- specops_process()
-
- else if (href_list["mainmenu"])
- temp = null
-
- add_fingerprint(usr)
- updateUsrDialog()
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/station_alert.dm b/code/WorkInProgress/computer3/computers/station_alert.dm
deleted file mode 100644
index 850bfc83c5..0000000000
--- a/code/WorkInProgress/computer3/computers/station_alert.dm
+++ /dev/null
@@ -1,97 +0,0 @@
-/obj/machinery/computer3/station_alert
- default_prog = /datum/file/program/station_alert
- spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/radio)
- icon_state = "frame-eng"
-
-
-/datum/file/program/station_alert
- name = "Station Alert Console"
- desc = "Used to access the station's automated alert system."
- active_state = "alert:0"
- var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
-
- interact(mob/user)
- usr.set_machine(src)
- if(!interactable())
- return
- var/dat = "Current Station Alerts\n"
- dat += "Close
"
- for (var/cat in src.alarms)
- dat += text("[]
\n", cat)
- var/list/L = src.alarms[cat]
- if (L.len)
- for (var/alarm in L)
- var/list/alm = L[alarm]
- var/area/A = alm[1]
- var/list/sources = alm[3]
- dat += ""
- dat += "• "
- dat += "[A.name]"
- if (sources.len > 1)
- dat += text(" - [] sources", sources.len)
- dat += "
\n"
- else
- dat += "-- All Systems Nominal
\n"
- dat += "
\n"
- //user << browse(dat, "window=alerts")
- //onclose(user, "alerts")
- popup.set_content(dat)
- popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
- popup.open()
- return
-
-
- Topic(href, href_list)
- if(..())
- return
- return
-
-
- proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
- var/list/L = src.alarms[class]
- for (var/I in L)
- if (I == A.name)
- var/list/alarm = L[I]
- var/list/sources = alarm[3]
- if (!(alarmsource in sources))
- sources += alarmsource
- return 1
- var/obj/machinery/camera/C = null
- var/list/CL = null
- if (O && istype(O, /list))
- CL = O
- if (CL.len == 1)
- C = CL[1]
- else if (O && istype(O, /obj/machinery/camera))
- C = O
- L[A.name] = list(A, (C) ? C : O, list(alarmsource))
- return 1
-
-
- proc/cancelAlarm(var/class, area/A as area, obj/origin)
- var/list/L = src.alarms[class]
- var/cleared = 0
- for (var/I in L)
- if (I == A.name)
- var/list/alarm = L[I]
- var/list/srcs = alarm[3]
- if (origin in srcs)
- srcs -= origin
- if (srcs.len == 0)
- cleared = 1
- L -= I
- return !cleared
-
-
-
- process()
- var/active_alarms = 0
- for (var/cat in src.alarms)
- var/list/L = src.alarms[cat]
- if(L.len) active_alarms = 1
- if(active_alarms)
- active_state = "alert:2"
- else
- active_state = "alert:0"
- ..()
- return
diff --git a/code/WorkInProgress/computer3/computers/syndicate_shuttle.dm b/code/WorkInProgress/computer3/computers/syndicate_shuttle.dm
deleted file mode 100644
index ccd711788b..0000000000
--- a/code/WorkInProgress/computer3/computers/syndicate_shuttle.dm
+++ /dev/null
@@ -1,103 +0,0 @@
-#define SYNDICATE_SHUTTLE_MOVE_TIME 240
-#define SYNDICATE_SHUTTLE_COOLDOWN 200
-
-/obj/machinery/computer3/syndicate_station
- name = "syndicate shuttle terminal"
- icon = 'icons/obj/computer.dmi'
- icon_state = "syndishuttle"
- req_access = list(access_syndicate)
- var/area/curr_location
- var/moving = 0
- var/lastMove = 0
-
-
-/obj/machinery/computer3/syndicate_station/New()
- curr_location= locate(/area/syndicate_station/start)
-
-
-/obj/machinery/computer3/syndicate_station/proc/syndicate_move_to(area/destination as area)
- if(moving) return
- if(lastMove + SYNDICATE_SHUTTLE_COOLDOWN > world.time) return
- var/area/dest_location = locate(destination)
- if(curr_location == dest_location) return
-
- moving = 1
- lastMove = world.time
-
- if(curr_location.z != dest_location.z)
- var/area/transit_location = locate(/area/syndicate_station/transit)
- curr_location.move_contents_to(transit_location)
- curr_location = transit_location
- sleep(SYNDICATE_SHUTTLE_MOVE_TIME)
-
- curr_location.move_contents_to(dest_location)
- curr_location = dest_location
- moving = 0
- return 1
-
-
-/obj/machinery/computer3/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_station/attack_ai(mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_station/attack_paw(mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_station/attack_hand(mob/user as mob)
- if(!allowed(user))
- user << "\red Access Denied"
- return
-
- user.set_machine(src)
-
- var/dat = {"Location: [curr_location]
- Ready to move[max(lastMove + SYNDICATE_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + SYNDICATE_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]
- Syndicate Space
- North West of SS13 |
- North of SS13 |
- North East of SS13
- South West of SS13 |
- South of SS13 |
- South East of SS13
- North East of the Mining Asteroid
- Close"}
-
- user << browse(dat, "window=computer;size=575x450")
- onclose(user, "computer")
- return
-
-
-/obj/machinery/computer3/syndicate_station/Topic(href, href_list)
- if(!isliving(usr)) return
- var/mob/living/user = usr
-
- if(in_range(src, user) || istype(user, /mob/living/silicon))
- user.set_machine(src)
-
- if(href_list["syndicate"])
- syndicate_move_to(/area/syndicate_station/start)
- else if(href_list["station_nw"])
- syndicate_move_to(/area/syndicate_station/northwest)
- else if(href_list["station_n"])
- syndicate_move_to(/area/syndicate_station/north)
- else if(href_list["station_ne"])
- syndicate_move_to(/area/syndicate_station/northeast)
- else if(href_list["station_sw"])
- syndicate_move_to(/area/syndicate_station/southwest)
- else if(href_list["station_s"])
- syndicate_move_to(/area/syndicate_station/south)
- else if(href_list["station_se"])
- syndicate_move_to(/area/syndicate_station/southeast)
-// else if(href_list["commssat"])
-// syndicate_move_to(/area/syndicate_station/commssat)
- else if(href_list["mining"])
- syndicate_move_to(/area/syndicate_station/mining)
-
- add_fingerprint(usr)
- updateUsrDialog()
- return
-
-/obj/machinery/computer3/syndicate_station/bullet_act(var/obj/item/projectile/Proj)
- visible_message("[Proj] ricochets off [src]!") //let's not let them fuck themselves in the rear
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/syndicate_specops_shuttle.dm b/code/WorkInProgress/computer3/computers/syndicate_specops_shuttle.dm
deleted file mode 100644
index 61dc0ba975..0000000000
--- a/code/WorkInProgress/computer3/computers/syndicate_specops_shuttle.dm
+++ /dev/null
@@ -1,259 +0,0 @@
-//Config stuff
-#define SYNDICATE_ELITE_MOVETIME 600 //Time to station is deciseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves.
-#define SYNDICATE_ELITE_STATION_AREATYPE "/area/shuttle/syndicate_elite/station" //Type of the spec ops shuttle area for station
-#define SYNDICATE_ELITE_DOCK_AREATYPE "/area/shuttle/syndicate_elite/mothership" //Type of the spec ops shuttle area for dock
-
-var/syndicate_elite_shuttle_moving_to_station = 0
-var/syndicate_elite_shuttle_moving_to_mothership = 0
-var/syndicate_elite_shuttle_at_station = 0
-var/syndicate_elite_shuttle_can_send = 1
-var/syndicate_elite_shuttle_time = 0
-var/syndicate_elite_shuttle_timeleft = 0
-
-/obj/machinery/computer3/syndicate_elite_shuttle
- name = "Elite Syndicate Squad Shuttle Console"
- icon = 'icons/obj/computer.dmi'
- icon_state = "syndishuttle"
- req_access = list(access_cent_specops)
- var/temp = null
- var/hacked = 0
- var/allowedtocall = 0
-
-/proc/syndicate_elite_process()
- var/area/syndicate_mothership/control/syndicate_ship = locate()//To find announcer. This area should exist for this proc to work.
- var/area/syndicate_mothership/elite_squad/elite_squad = locate()//Where is the specops area located?
- var/mob/living/silicon/decoy/announcer = locate() in syndicate_ship//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
-
- var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
- var/message = "THE SYNDICATE ELITE SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown.
- if(announcer)
- announcer.say(message)
- // message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
- // announcer.say(message)
-
- while(syndicate_elite_shuttle_time - world.timeofday > 0)
- var/ticksleft = syndicate_elite_shuttle_time - world.timeofday
-
- if(ticksleft > 1e5)
- syndicate_elite_shuttle_time = world.timeofday // midnight rollover
- syndicate_elite_shuttle_timeleft = (ticksleft / 10)
-
- //All this does is announce the time before launch.
- if(announcer)
- var/rounded_time_left = round(syndicate_elite_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
- if(rounded_time_left in message_tracker)//If that time is in the list for message announce.
- message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN"
- if(rounded_time_left==0)
- message = "ALERT: TAKEOFF"
- announcer.say(message)
- message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
- //Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
-
- sleep(5)
-
- syndicate_elite_shuttle_moving_to_station = 0
- syndicate_elite_shuttle_moving_to_mothership = 0
-
- syndicate_elite_shuttle_at_station = 1
- if (syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
-
- if (!syndicate_elite_can_move())
- usr << "\red The Syndicate Elite shuttle is unable to leave."
- return
-
- sleep(600)
-/*
- //Begin Marauder launchpad.
- spawn(0)//So it parallel processes it.
- for(var/obj/machinery/door/poddoor/M in elite_squad)
- switch(M.id)
- if("ASSAULT0")
- spawn(10)//1 second delay between each.
- M.open()
- if("ASSAULT1")
- spawn(20)
- M.open()
- if("ASSAULT2")
- spawn(30)
- M.open()
- if("ASSAULT3")
- spawn(40)
- M.open()
-
- sleep(10)
-
- var/spawn_marauder[] = new()
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Marauder Entry")
- spawn_marauder.Add(L)
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Marauder Exit")
- var/obj/effect/portal/P = new(L.loc)
- P.invisibility = 101//So it is not seen by anyone.
- P.failchance = 0//So it has no fail chance when teleporting.
- P.target = pick(spawn_marauder)//Where the marauder will arrive.
- spawn_marauder.Remove(P.target)
-
- sleep(10)
-
- for(var/obj/machinery/mass_driver/M in elite_squad)
- switch(M.id)
- if("ASSAULT0")
- spawn(10)
- M.drive()
- if("ASSAULT1")
- spawn(20)
- M.drive()
- if("ASSAULT2")
- spawn(30)
- M.drive()
- if("ASSAULT3")
- spawn(40)
- M.drive()
-
- sleep(50)//Doors remain open for 5 seconds.
-
- for(var/obj/machinery/door/poddoor/M in elite_squad)
- switch(M.id)//Doors close at the same time.
- if("ASSAULT0")
- spawn(0)
- M.close()
- if("ASSAULT1")
- spawn(0)
- M.close()
- if("ASSAULT2")
- spawn(0)
- M.close()
- if("ASSAULT3")
- spawn(0)
- M.close()
- */
- elite_squad.readyreset()//Reset firealarm after the team launched.
- //End Marauder launchpad.
-/*
- var/obj/explosionmarker = locate("Syndicate Breach Area")
- if(explosionmarker)
- var/turf/simulated/T = explosionmarker.loc
- if(T)
- explosion(T,4,6,8,10,0)
-
- sleep(40)
-// proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
-
-*/
- var/area/start_location = locate(/area/shuttle/syndicate_elite/mothership)
- var/area/end_location = locate(/area/shuttle/syndicate_elite/station)
-
- var/list/dstturfs = list()
- var/throwy = world.maxy
-
- for(var/turf/T in end_location)
- dstturfs = T
- if(T.y < throwy)
- throwy = T.y
-
- // hey you, get out of the way!
- for(var/turf/T in dstturfs)
- // find the turf to move things to
- var/turf/D = locate(T.x, throwy - 1, 1)
- //var/turf/E = get_step(D, SOUTH)
- for(var/atom/movable/AM as mob|obj in T)
- AM.Move(D)
- if(istype(T, /turf/simulated))
- del(T)
-
- start_location.move_contents_to(end_location)
-
- for(var/turf/T in get_area_turfs(end_location) )
- var/mob/M = locate(/mob) in T
- M << "\red You have arrived to [station_name]. Commence operation!"
-
-/proc/syndicate_elite_can_move()
- if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return 0
- else return 1
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
- if(istype(I,/obj/item/card/emag))
- user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
- else
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attack_hand(var/mob/user as mob)
- if(!allowed(user))
- user << "\red Access Denied."
- return
-
-// if (sent_syndicate_strike_team == 0)
-// usr << "\red The strike team has not yet deployed."
-// return
-
- if(..())
- return
-
- user.set_machine(src)
- var/dat
- if (temp)
- dat = temp
- else
- dat = {"Location: [syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership ? "Departing for [station_name] in ([syndicate_elite_shuttle_timeleft] seconds.)":syndicate_elite_shuttle_at_station ? "Station":"Dock"]
- [syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership ? "\n*The Syndicate Elite shuttle is already leaving.*
\n
":syndicate_elite_shuttle_at_station ? "\nShuttle Offline
\n
":"\nDepart to [station_name]
\n
"]
- \nClose"}
-
- //user << browse(dat, "window=computer;size=575x450")
- //onclose(user, "computer")
- var/datum/browser/popup = new(user, "computer", "Special Operations Shuttle", 575, 450)
- popup.set_content(dat)
- popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
- popup.open()
- return
-
-/obj/machinery/computer3/syndicate_elite_shuttle/Topic(href, href_list)
- if(..())
- return
-
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.set_machine(src)
-
- if (href_list["sendtodock"])
- if(!syndicate_elite_shuttle_at_station|| syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
-
- usr << "\blue The Syndicate will not allow the Elite Squad shuttle to return."
- return
-
- else if (href_list["sendtostation"])
- if(syndicate_elite_shuttle_at_station || syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
-
- if (!specops_can_move())
- usr << "\red The Syndicate Elite shuttle is unable to leave."
- return
-
- usr << "\blue The Syndicate Elite shuttle will arrive on [station_name] in [(SYNDICATE_ELITE_MOVETIME/10)] seconds."
-
- temp = "Shuttle departing.
OK"
- updateUsrDialog()
-
- var/area/syndicate_mothership/elite_squad/elite_squad = locate()
- if(elite_squad)
- elite_squad.readyalert()//Trigger alarm for the spec ops area.
- syndicate_elite_shuttle_moving_to_station = 1
-
- syndicate_elite_shuttle_time = world.timeofday + SYNDICATE_ELITE_MOVETIME
- spawn(0)
- syndicate_elite_process()
-
-
- else if (href_list["mainmenu"])
- temp = null
-
- add_fingerprint(usr)
- updateUsrDialog()
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/test_machines.dm b/code/WorkInProgress/computer3/test_machines.dm
deleted file mode 100644
index 998937e634..0000000000
--- a/code/WorkInProgress/computer3/test_machines.dm
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/obj/machinery/computer3/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell(src)
- ..(L,built)
-
-/obj/machinery/computer3/laptop/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell/super(src)
- ..(L,built)
-
-/obj/machinery/computer3/wall_comp/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell(src)
- ..(L,built)
-
-/obj/machinery/computer3/server/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell(src)
- ..(L,built)
-
-/obj/machinery/computer3/server/rack/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell(src)
- ..(L,built)
-
-/obj/item/weapon/storage/box/testing_disks
- New()
- ..()
- for(var/typekey in typesof(/obj/item/weapon/disk/file) - /obj/item/weapon/disk/file)
- new typekey(src)
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/upload/lawfile.dm b/code/WorkInProgress/computer3/upload/lawfile.dm
deleted file mode 100644
index 7fcbac0066..0000000000
--- a/code/WorkInProgress/computer3/upload/lawfile.dm
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Computer3 law changes:
-
- * Laws are a file type
- * Connecting to the AI requires a network connection
- * Connecting to a borg requires a radio or network.
-
-*/
-
-/datum/file/ai_law
- var/list/hacklaws = null
- var/zerolaw = null
- var/list/corelaws = null
- var/list/auxlaws = null
-
- var/configurable = 0
-
- // override this when you need to be able to alter the parameters of the lawset
- proc/configure()
- return
-
- execute(var/datum/file/program/source)
- if(istype(usr,/mob/living/silicon))
- return
- if(istype(source,/datum/file/program/ntos))
- if(configurable)
- configure()
- return
- if(istype(source,/datum/file/program/upload/ai))
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/upload/programs.dm b/code/WorkInProgress/computer3/upload/programs.dm
deleted file mode 100644
index bcf45159b6..0000000000
--- a/code/WorkInProgress/computer3/upload/programs.dm
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- Note that as with existing ai upload, this is not an interactive program.
- That means that the work is done in execute() rather than interact()
-*/
-
-/datum/file/program/upload/ai
- execute(var/datum/file/program/source)
- if(!interactable() || istype(usr,/mob/living/silicon))
- return 0
- if(!computer.net)
- usr << "An indecipherable set of code flicks across the screen. Nothing else happens."
- return
- var/list/results = computer.net.get_machines
\ No newline at end of file
diff --git a/code/WorkInProgress/kilakk/responseteam.dm b/code/WorkInProgress/kilakk/responseteam.dm
deleted file mode 100644
index 8e0cdbc638..0000000000
--- a/code/WorkInProgress/kilakk/responseteam.dm
+++ /dev/null
@@ -1,254 +0,0 @@
-// emergency response teams
-// work in progress
-
-var/const/members_possible = 5
-var/const/members_required = 1 // We need at least *one* person ;_;
-var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
-// 'sent_response_team' for automagic response teams
-
-/client/proc/response_team()
- set name = "Dispatch Emergency Response Team"
- set category = "Special Verbs"
- set desc = "Send an emergency response team to the station"
-
- if(!holder)
- usr << "\red Only administrators may use this command."
- return
- if(!ticker)
- usr << "\red The game hasn't started yet!"
- return
- if(ticker.current_state == GAME_STATE_PREGAME)
- usr << "\red The round hasn't started yet!"
- return
- if(admin_emergency_team || send_emergency_team)
- usr << "\red Central Command has already dispatched an emergency response team!"
- return
- if(alert("Do you want to dispatch an Emergency Response Team?",,"Yes","No") != "Yes")
- return
- if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red
- switch(alert("The station has not entered code red recently. Do you still want to dispatch a response team?",,"Yes","No"))
- if("No")
- return
-
- var/situation = null
- while(!situation)
- situation = copytext(sanitize(input(src, "Please specify the mission the emergency response team will undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
- if(!situation)
- if(alert("You haven't specified a mission. Exit the setup process?",,"No","Yes")=="Yes")
- return
-
- if(admin_emergency_team || send_emergency_team)
- usr << "\red Looks like somebody beat you to it!"
- return
-
- admin_emergency_team = 1
- message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
- log_admin("[key_name(usr)] used Dispatch Response Team.")
-
- var/member_number = members_possible
- var/leader_selected = 0
-
- // Shamelessly stolen nuke code
- var/nuke_code
- var/temp_code
- for(var/obj/machinery/nuclearbomb/N in machines)
- temp_code = text2num(N.r_code)
- if(temp_code)
- nuke_code = N.r_code
- break
-
-/* var/list/candidates = list() // ghosts who can be picked
- var/list/members = list() // ghosts who have been picked
- for(var/mob/dead/observer/G in player_list)
- if(!G.client.holder && !G.client.is_afk())
- if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
- candidates += G.key
- for(var/i=members_possible,(i>0&&candidates.len), i--)
- var/candidate = input("Choose characters to spawn as response team members. This will go on until there are no more ghosts to pick from or until all slots are full.", "Active Players") as null|anything in candidates */
-
- // I tried doing this differently. Ghosts get a pop-up box similar to pAIs and one-click-antag
- // Biggest diff here is in how the candidates list is updated
- alert(usr, "Active ghosts will be given a chance to choose whether or not they want to be considered for the emergency reponse team. This will take about 30 seconds.") // There's probably a better way to do this, with a fancy count-down timer or something
-
- var/list/candidates = list()
- var/list/members = list()
- var/time_passed = world.time
-
- for(var/mob/dead/observer/G in player_list)
- if(!jobban_isbanned(G, "Syndicate") && !jobban_isbanned(G, "Emergency Response Team") && !jobban_isbanned(G, "Security Officer"))
- spawn(0)
- switch(alert(G, "Do you want to be considered for the Emergency Response Team? Please answer in 30 seconds!",,"Yes","No"))
- if("Yes")
- if((world.time-time_passed)>300)
- return
- candidates += G.key
- if("No")
- return
- else
- return
-
- sleep(300)
-
- if(candidates.len < members_required)
- message_admins("Not enough people signed up for [key_name_admin(usr)]'s response team! Aborting.")
- log_admin("Response Team aborted: Not Enough Signups.")
- admin_emergency_team = 0
- return
-
- for(var/i=members_possible,(i>0&&candidates.len), i--) // The rest of the choosing process is just an input with a list of candidates on it
- var/chosen = input("Time's up! Choose characters to spawn as reponse team members. This will go on until there are no more ghosts to pick from or until all slots are full.", "Considered Players") as null|anything in candidates
- candidates -= chosen
- members += chosen
-
- command_alert("Sensors indicate that [station_name()] has entered Code Red and is in need of assistance. We will prepare and dispatch an emergency response team to deal with the situation.", "NMV Icarus Command")
-
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Response Team")
- leader_selected = member_number == 1?1:0 // The last person selected will be the leader
-
- var/mob/living/carbon/human/new_member = spawn_response_team(L, leader_selected)
-
- new_member.age = !leader_selected ? rand(23,35) : rand(35,45)
-
- if(members.len)
- new_member.key = pick(members)
- members -= new_member.key
-
- if(!new_member.key) // It works ok? sort of
- del(new_member)
- break
-
- spawn(0)
-
- switch(alert(new_member, "You are an Emergency Response Team member! Are you a boy or a girl?",,"Male","Female"))
- if("Male")
- new_member.gender = MALE
- if("Female")
- new_member.gender = FEMALE
-
- var/new_name = input(new_member, "...Erm, what was your name again?", "Choose your name") as text
-
- if(!new_name)
- new_member.real_name = "Agent [pick("Red","Yellow","Orange","Silver","Gold", "Pink", "Purple", "Rainbow")]" // Choose a "random" agent name
- new_member.name = usr.real_name
- new_member.mind.name = usr.real_name
-
- else
- new_member.real_name = new_name
- new_member.name = new_name
- new_member.mind.name = new_name
-
- // -- CHANGE APPEARANCE --
- var/new_tone = input(new_member, "Please select your new skin tone: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as num
-
- if(new_tone)
- new_member.s_tone = max(min(round(text2num(new_tone)), 220), 1)
- new_member.s_tone = -new_member.s_tone + 35
-
- var/new_hair = input(new_member, "Please select your new hair color.","Character Generation") as color
-
- if(new_hair)
- new_member.r_hair = hex2num(copytext(new_hair, 2, 4))
- new_member.g_hair = hex2num(copytext(new_hair, 4, 6))
- new_member.b_hair = hex2num(copytext(new_hair, 6, 8))
-
- var/new_facial = input(new_member, "Please select your new facial hair color.","Character Generation") as color
-
- if(new_facial)
- new_member.r_facial = hex2num(copytext(new_facial, 2, 4))
- new_member.g_facial = hex2num(copytext(new_facial, 4, 6))
- new_member.b_facial = hex2num(copytext(new_facial, 6, 8))
-
- var/new_eyes = input(new_member, "Please select eye color.", "Character Generation") as color
-
- if(new_eyes)
- new_member.r_eyes = hex2num(copytext(new_eyes, 2, 4))
- new_member.g_eyes = hex2num(copytext(new_eyes, 4, 6))
- new_member.b_eyes = hex2num(copytext(new_eyes, 6, 8))
-
- var/new_hstyle = input(new_member, "Please select your new hair style!", "Grooming") as null|anything in hair_styles_list
-
- if(new_hstyle)
- new_member.h_style = new_hstyle
-
- var/new_fstyle = input(new_member, "Please select your new facial hair style!", "Grooming") as null|anything in facial_hair_styles_list
-
- if(new_fstyle)
- new_member.f_style = new_fstyle
-
- // -- END --
-
- new_member.dna.ready_dna(new_member)
- new_member.update_body(1)
- new_member.update_hair(1)
-
- new_member.mind_initialize()
-
- new_member.mind.assigned_role = "Emergency Response Team"
- new_member.mind.special_role = "Emergency Response Team"
- ticker.mode.traitors |= new_member.mind // ERTs will show up at the end of the round on the "traitor" list
-
- // Join message
- new_member << "\blue You are the Emergency Response Team[!leader_selected?"!":" Leader!"] \nAs a response team [!leader_selected?"member":"leader"] you answer directly to [!leader_selected?"your team leader.":"Central Command."] \nYou have been deployed by NanoTrasen Central Command in Tau Ceti to resolve a Code Red alert aboard [station_name()], and have been provided with the following instructions and information regarding your mission: \red [situation]"
- new_member.mind.store_memory("Mission Parameters: \red [situation].")
-
- // Leader join message
- if(leader_selected)
- new_member << "\red The Nuclear Authentication Code is: [nuke_code]. You are instructed not to detonate the nuclear device aboard [station_name()] unless absolutely necessary."
- new_member.mind.store_memory("Nuclear Authentication Code: \red [nuke_code]")
-
- new_member.equip_response_team(leader_selected) // Start equipping them
-
- member_number--
- return 1
-
-// Mob creation
-/client/proc/spawn_response_team(obj/spawn_location, leader_selected = 0)
- var/mob/living/carbon/human/new_member = new(spawn_location.loc)
-
- return new_member
-
-// Equip mob
-/mob/living/carbon/human/proc/equip_response_team(leader_selected = 0)
-
- // Headset
- equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_ears)
-
- // Uniform
- equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)
- equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes)
- equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves)
- equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(src), slot_belt)
-
- // Glasses
- equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(src), slot_glasses)
-
- // Backpack
- equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(src), slot_back)
-
- // Put stuff into their backpacks
- equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(src), slot_in_backpack)
- // equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) // Regular medkit
-
- // Loyalty implants
- implant_loyalty(src)
-
- // ID cards
- var/obj/item/weapon/card/id/E = new(src)
- E.name = "[real_name]'s ID Card (Emergency Response Team)"
- E.icon_state = "centcom"
- E.access = get_all_accesses() // ERTs can go everywhere on the station
- if(leader_selected)
- E.name = "[real_name]'s ID Card (Emergency Response Team Leader)"
- E.access += get_all_centcom_access()
- E.assignment = "Emergency Response Team Leader"
- else
- E.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)
- E.assignment = "Emergency Response Team"
- E.registered_name = real_name
- equip_to_slot_or_del(E, slot_wear_id)
-
- update_icons()
-
- return 1
-
diff --git a/code/WorkInProgress/meteors.dm b/code/WorkInProgress/meteors.dm
deleted file mode 100644
index ce1bafdb44..0000000000
--- a/code/WorkInProgress/meteors.dm
+++ /dev/null
@@ -1,153 +0,0 @@
-#define METEOR_TEMPERATURE
-
-/var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds
-//set to at least 100 unless you want evarr ruining every round
-
-/var/const/meteors_in_wave = 20
-/var/const/meteors_in_small_wave = 10
-
-/proc/meteor_wave(var/number = meteors_in_wave)
- if(!ticker || wavesecret)
- return
-
- var/startx
- var/starty
- var/endx
- var/endy
- var/turf/pickedstart
- var/turf/pickedgoal
- switch(pick(1,2,3,4))
- if(1) //NORTH
- starty = world.maxy-3
- startx = rand(1, world.maxx-1)
- endy = 1
- endx = rand(1, world.maxx-1)
- if(2) //EAST
- starty = rand(1,world.maxy-1)
- startx = world.maxx-3
- endy = rand(1, world.maxy-1)
- endx = 1
- if(3) //SOUTH
- starty = 3
- startx = rand(1, world.maxx-1)
- endy = world.maxy-1
- endx = rand(1, world.maxx-1)
- if(4) //WEST
- starty = rand(1, world.maxy-1)
- startx = 3
- endy = rand(1,world.maxy-1)
- endx = world.maxx-1
- pickedstart = locate(startx, starty, 1)
- pickedgoal = locate(endx, endy, 1)
- wavesecret = 1
- for(var/i = 0 to number)
- spawn(rand(10,100))
- spawn_meteor(pickedstart, pickedgoal)
- spawn(meteor_wave_delay)
- wavesecret = 0
-
-/proc/spawn_meteors(var/turf/pickedstart, var/turf/pickedgoal, var/number = meteors_in_small_wave)
- for(var/i = 0; i < number; i++)
- spawn(0)
- spawn_meteor(pickedstart, pickedgoal)
-
-/proc/spawn_meteor(var/turf/pickedstart, var/turf/pickedgoal)
-
- var/route = rand(1,5)
- var/turf/tempgoal = pickedgoal
- for(var/i, i < route, i++)
- tempgoal = get_step(tempgoal,rand(1,8))
-
- var/obj/effect/meteor/M
- switch(rand(1, 100))
- if(1 to 15)
- M = new /obj/effect/meteor/big(pickedstart)
- if(16 to 75)
- M = new /obj/effect/meteor( pickedstart )
- if(76 to 100)
- M = new /obj/effect/meteor/small( pickedstart )
-
- M.dest = tempgoal
-
- do
- sleep(1)
- walk_towards(M, M.dest, 1)
- while (!istype(M.loc, /turf/space) || pickedstart.loc.name != "Space" ) //FUUUCK, should never happen.
-
- return
-
-/obj/effect/meteor
- name = "meteor"
- icon = 'icons/obj/meteor.dmi'
- icon_state = "flaming"
- density = 1
- anchored = 1.0
- var/hits = 1
- var/dest
- pass_flags = PASSTABLE
-
-/obj/effect/meteor/small
- name = "small meteor"
- icon_state = "smallf"
- pass_flags = PASSTABLE | PASSGRILLE
-
-/obj/effect/meteor/Move()
- var/turf/T = src.loc
- if (istype(T, /turf))
- T.hotspot_expose(METEOR_TEMPERATURE, 1000)
- ..()
- return
-
-/obj/effect/meteor/Bump(atom/A)
- spawn(0)
- for(var/mob/M in range(10, src))
- if(!M.stat && !istype(M, /mob/living/silicon/ai)) //bad idea to shake an ai's view
- shake_camera(M, 3, 1)
- if (A)
- A.meteorhit(src)
- playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 40, 1)
- if (--src.hits <= 0)
- if(prob(15))// && !istype(A, /obj/structure/grille))
- explosion(get_turf(src), 4, 5, 6, 7, 0)
- playsound(get_turf(src), "explosion", 50, 1)
- del(src)
- return
-
-
-/obj/effect/meteor/ex_act(severity)
- spawn(0)
- del(src)
- return
-
-/obj/effect/meteor/big
- name = "big meteor"
- hits = 5
-
- ex_act(severity)
- return
-
- Bump(atom/A)
- spawn(0)
- for(var/mob/M in range(10, src))
- if(!M.stat && !istype(M, /mob/living/silicon/ai)) //bad idea to shake an ai's view
- shake_camera(M, 3, 1)
- if (A)
- if(isobj(A))
- del(A)
- else
- A.meteorhit(src)
- src.hits--
- return
- playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 40, 1)
- if (--src.hits <= 0)
- if(prob(15) && !istype(A, /obj/structure/grille))
- explosion(get_turf(src), 1, 2, 3, 4, 0)
- playsound(get_turf(src), "explosion", 50, 1)
- del(src)
- return
-
-/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if(istype(W, /obj/item/weapon/pickaxe))
- del(src)
- return
- ..()
\ No newline at end of file
diff --git a/code/WorkInProgress/organs/implants.dm b/code/WorkInProgress/organs/implants.dm
deleted file mode 100644
index c8f83bc6a3..0000000000
--- a/code/WorkInProgress/organs/implants.dm
+++ /dev/null
@@ -1,13 +0,0 @@
-/*------
-SPELL IMPLANTS
- + Most diverse effects
- - Limited charges, failure rate
-
-CYBERNETIC IMPLANTS
- + Easiest to make
- - Require power
-
-GRAFTS (includes basic human bodyparts)
- + Permanent effects
- - Horrible side effects
-*/
\ No newline at end of file
diff --git a/code/WorkInProgress/organs/organs.dm b/code/WorkInProgress/organs/organs.dm
deleted file mode 100644
index 22f51bffc6..0000000000
--- a/code/WorkInProgress/organs/organs.dm
+++ /dev/null
@@ -1,700 +0,0 @@
-<<<<<<< HEAD
-/obj/effect/organstructure //used obj for the "contents" var
- name = "organs"
-
- var/species = "mob" //for speaking in unknown languages purposes
-
- var/obj/effect/organ/limb/arms/arms = null
- var/obj/effect/organ/limb/legs/legs = null
- var/obj/effect/organ/torso/torso = null
- var/obj/effect/organ/head/head = null
-
-
- proc/GetSpeciesName()
- var/list/speciesPresent = list()
-
- for(var/obj/effect/organ/organ in src) //only external organs count, since it's judging by the appearance
- if(speciesPresent[organ.species])
- speciesPresent[organ.species]++
- else
- speciesPresent[organ.species] = 1 //not sure, but I think it's not initialised before that, so can't ++
-
- var/list/dominantSpecies = list()
-
- for(var/speciesName in speciesPresent)
- if(!dominantSpecies.len)
- dominantSpecies += speciesName
- else
- if(speciesPresent[dominantSpecies[1]] == speciesPresent[speciesName])
- dominantSpecies += speciesName
- else if(speciesPresent[dominantSpecies[1]] < speciesPresent[speciesName])
- dominantSpecies = list(speciesName)
-
- if(!dominantSpecies.len)
- species = "mob"
- else
- species = pick(dominantSpecies)
-
- return species
-
- proc/RecalculateStructure()
- var/list/organs = GetAllContents()
-
- arms = locate(/obj/effect/organ/limb/arms) in organs
- legs = locate(/obj/effect/organ/limb/legs) in organs
- torso = locate(/obj/effect/organ/torso) in organs
- head = locate(/obj/effect/organ/head) in organs
-
- GetSpeciesName()
-
- return
-
- proc/ProcessOrgans()
- set background = 1
-
- var/list/organs = GetAllContents()
- for(var/obj/effect/organ/organ in organs)
- organ.ProcessOrgan()
-
- return
-
- New()
- ..()
- RecalculateStructure()
-
-/obj/effect/organstructure/human
- name = "human organs"
-
- New()
- new /obj/effect/organ/torso/human(src)
- ..()
-
-/obj/effect/organstructure/alien
- name = "alien organs"
-
- New()
- new /obj/effect/organ/torso/alien(src)
- ..()
-
-/obj/effect/organ
- name = "organ"
-
- //All types
- var/organType = 0 //CYBER and SPELL go here
- var/species = "mob"
- var/obj/effect/organstructure/rootOrganStructure = null
-
- New(location)
- ..()
-
- rootOrganStructure = FindRootStructure()
-
- proc/FindRootStructure()
- if(istype(loc,/obj/effect/organ))
- var/obj/effect/organ/parent = loc
- return parent.FindRootStructure()
- else if(istype(loc,/obj/effect/organstructure))
- return loc
- return null
-
- proc/ProcessOrgan()
- return
-
-/obj/effect/organ/torso
- name = "torso"
- var/maxHealth = 50 //right now, the mob's (only humans for now) health depends only on it. Will be fixed later
-
-/obj/effect/organ/torso/human
- name = "human torso"
- species = "human"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/human(src)
- new /obj/effect/organ/limb/legs/human(src)
- new /obj/effect/organ/head/human(src)
-/obj/effect/organ/torso/alien
- name = "alien torso"
- species = "alien"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/alien(src)
- new /obj/effect/organ/limb/legs/alien(src)
- new /obj/effect/organ/head/alien(src)
-
-
-/obj/effect/organ/limb
- name = "limb"
-
-/obj/effect/organ/limb/arms
- name = "arms"
-
- var/minDamage = 5 //punching damage
- var/maxDamage = 5
-
-/obj/effect/organ/limb/arms/alien
- name = "alien arms"
- species = "alien"
- minDamage = 5
- maxDamage = 15
-
-
-/obj/effect/organ/limb/arms/human
- name = "human arms"
- species = "human"
- minDamage = 1
- maxDamage = 9
-
-/obj/effect/organ/limb/legs
- name = "legs"
-
-/obj/effect/organ/limb/legs/human
- name = "human legs"
- species = "human"
-
-/obj/effect/organ/limb/legs/alien
- name = "alien legs"
- species = "alien"
-
-
-/obj/effect/organ/head
- name = "head"
-
-/obj/effect/organ/head/human
- name = "human head"
- species = "human"
-
-/obj/effect/organ/head/alien
- name = "alien head"
- species = "alien"
-
-/obj/effect/organ/limb/arms/alien
- name = "alien arms"
- species = "alien"
- minDamage = 5
- maxDamage = 15
-
-/obj/effect/organ/limb/legs/alien
- name = "alien legs"
- species = "alien"
-
-/obj/effect/organ/head/alien
- name = "alien head"
- species = "alien"
-
-// ++++STUB ORGAN STRUCTURE. THIS IS THE DEFAULT STRUCTURE. USED TO PREVENT EXCEPTIONS++++
-/obj/effect/organstructure/stub
- name = "stub organs"
-
- New()
- new /obj/effect/organ/torso/stub(src)
- ..()
-
-/obj/effect/organ/torso/stub
- name = "stub torso"
- species = "stub"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/stub(src)
- new /obj/effect/organ/limb/legs/stub(src)
- new /obj/effect/organ/head/stub(src)
-
-/obj/effect/organ/limb/arms/stub
- name = "stub arms"
- species = "stub"
-
-/obj/effect/organ/limb/legs/stub
- name = "stub legs"
- species = "stub"
-
-/obj/effect/organ/head/stub
- name = "stub head"
- species = "stub"
-
-// ++++STUB ORGAN STRUCTURE. END++++
-
-
-// ++++MONKEY++++
-
-/obj/effect/organstructure/monkey
- name = "monkey organs"
-
- New()
- new /obj/effect/organ/torso/monkey(src)
- ..()
-
-/obj/effect/organ/torso/monkey
- name = "monkey torso"
- species = "monkey"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/monkey(src)
- new /obj/effect/organ/limb/legs/monkey(src)
- new /obj/effect/organ/head/monkey(src)
-
-/obj/effect/organ/limb/arms/monkey
- name = "monkey arms"
- species = "monkey"
-
-/obj/effect/organ/limb/legs/monkey
- name = "monkey legs"
- species = "monkey"
-
-/obj/effect/organ/head/monkey
- name = "monkey head"
- species = "monkey"
-
-
-// +++++CYBORG+++++
-/obj/effect/organstructure/cyborg
- name = "cyborg organs"
-
- New()
- new /obj/effect/organ/torso/cyborg(src)
- ..()
-
-/obj/effect/organ/torso/cyborg
- name = "cyborg torso"
- species = "cyborg"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/cyborg(src)
- new /obj/effect/organ/limb/legs/cyborg(src)
- new /obj/effect/organ/head/cyborg(src)
-
-/obj/effect/organ/limb/arms/cyborg
- name = "cyborg arms"
- species = "cyborg"
-
-/obj/effect/organ/limb/legs/cyborg
- name = "cyborg legs"
- species = "cyborg"
-
-/obj/effect/organ/head/cyborg
- name = "cyborg head"
- species = "cyborg"
-
-// +++++AI++++++
-/obj/effect/organstructure/AI
- name = "AI organs"
-
- New()
- new /obj/effect/organ/torso/AI(src)
- ..()
-
-/obj/effect/organ/torso/AI
- name = "AI torso"
- species = "AI"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/AI(src)
- new /obj/effect/organ/limb/legs/AI(src)
- new /obj/effect/organ/head/AI(src)
-
-/obj/effect/organ/limb/arms/AI
- name = "AI arms"
- species = "AI"
-
-/obj/effect/organ/limb/legs/AI
- name = "AI legs"
- species = "AI"
-
-/obj/effect/organ/head/AI
- name = "AI head"
- species = "AI"
-
-/* New organ structure template
-
-
-/obj/effect/organstructure/template
- name = "template organs"
-
- New()
- new /obj/effect/organ/torso/template(src)
- ..()
-
-/obj/effect/organ/torso/template
- name = "template torso"
- species = "template"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/template(src)
- new /obj/effect/organ/limb/legs/template(src)
- new /obj/effect/organ/head/template(src)
-
-/obj/effect/organ/limb/arms/template
- name = "template arms"
- species = "template"
-
-/obj/effect/organ/limb/legs/template
- name = "template legs"
- species = "template"
-
-/obj/effect/organ/head/template
- name = "template head"
- species = "template"
-
-=======
-/obj/effect/organstructure //used obj for the "contents" var
- name = "organs"
-
- var/species = "mob" //for speaking in unknown languages purposes
-
- var/obj/effect/organ/limb/arms/arms = null
- var/obj/effect/organ/limb/legs/legs = null
- var/obj/effect/organ/torso/torso = null
- var/obj/effect/organ/head/head = null
-
-
- proc/GetSpeciesName()
- var/list/speciesPresent = list()
-
- for(var/obj/effect/organ/organ in src) //only external organs count, since it's judging by the appearance
- if(speciesPresent[organ.species])
- speciesPresent[organ.species]++
- else
- speciesPresent[organ.species] = 1 //not sure, but I think it's not initialised before that, so can't ++
-
- var/list/dominantSpecies = list()
-
- for(var/speciesName in speciesPresent)
- if(!dominantSpecies.len)
- dominantSpecies += speciesName
- else
- if(speciesPresent[dominantSpecies[1]] == speciesPresent[speciesName])
- dominantSpecies += speciesName
- else if(speciesPresent[dominantSpecies[1]] < speciesPresent[speciesName])
- dominantSpecies = list(speciesName)
-
- if(!dominantSpecies.len)
- species = "mob"
- else
- species = pick(dominantSpecies)
-
- return species
-
- proc/RecalculateStructure()
- var/list/organs = GetAllContents()
-
- arms = locate(/obj/effect/organ/limb/arms) in organs
- legs = locate(/obj/effect/organ/limb/legs) in organs
- torso = locate(/obj/effect/organ/torso) in organs
- head = locate(/obj/effect/organ/head) in organs
-
- GetSpeciesName()
-
- return
-
- proc/ProcessOrgans()
- set background = 1
-
- var/list/organs = GetAllContents()
- for(var/obj/effect/organ/organ in organs)
- organ.ProcessOrgan()
-
- return
-
- New()
- ..()
- RecalculateStructure()
-
-/obj/effect/organstructure/human
- name = "human organs"
-
- New()
- new /obj/effect/organ/torso/human(src)
- ..()
-
-/obj/effect/organstructure/alien
- name = "alien organs"
-
- New()
- new /obj/effect/organ/torso/alien(src)
- ..()
-
-/obj/effect/organ
- name = "organ"
-
- //All types
- var/organType = 0 //CYBER and SPELL go here
- var/species = "mob"
- var/obj/effect/organstructure/rootOrganStructure = null
-
- New(location)
- ..()
-
- rootOrganStructure = FindRootStructure()
-
- proc/FindRootStructure()
- if(istype(loc,/obj/effect/organ))
- var/obj/effect/organ/parent = loc
- return parent.FindRootStructure()
- else if(istype(loc,/obj/effect/organstructure))
- return loc
- return null
-
- proc/ProcessOrgan()
- return
-
-/obj/effect/organ/torso
- name = "torso"
- var/maxHealth = 50 //right now, the mob's (only humans for now) health depends only on it. Will be fixed later
-
-/obj/effect/organ/torso/human
- name = "human torso"
- species = "human"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/human(src)
- new /obj/effect/organ/limb/legs/human(src)
- new /obj/effect/organ/head/human(src)
-/obj/effect/organ/torso/alien
- name = "alien torso"
- species = "alien"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/alien(src)
- new /obj/effect/organ/limb/legs/alien(src)
- new /obj/effect/organ/head/alien(src)
-
-
-/obj/effect/organ/limb
- name = "limb"
-
-/obj/effect/organ/limb/arms
- name = "arms"
-
- var/minDamage = 5 //punching damage
- var/maxDamage = 5
-
-/obj/effect/organ/limb/arms/alien
- name = "alien arms"
- species = "alien"
- minDamage = 5
- maxDamage = 15
-
-
-/obj/effect/organ/limb/arms/human
- name = "human arms"
- species = "human"
- minDamage = 1
- maxDamage = 9
-
-/obj/effect/organ/limb/legs
- name = "legs"
-
-/obj/effect/organ/limb/legs/human
- name = "human legs"
- species = "human"
-
-/obj/effect/organ/limb/legs/alien
- name = "alien legs"
- species = "alien"
-
-
-/obj/effect/organ/head
- name = "head"
-
-/obj/effect/organ/head/human
- name = "human head"
- species = "human"
-
-/obj/effect/organ/head/alien
- name = "alien head"
- species = "alien"
-
-/obj/effect/organ/limb/arms/alien
- name = "alien arms"
- species = "alien"
- minDamage = 5
- maxDamage = 15
-
-/obj/effect/organ/limb/legs/alien
- name = "alien legs"
- species = "alien"
-
-/obj/effect/organ/head/alien
- name = "alien head"
- species = "alien"
-
-// ++++STUB ORGAN STRUCTURE. THIS IS THE DEFAULT STRUCTURE. USED TO PREVENT EXCEPTIONS++++
-/obj/effect/organstructure/stub
- name = "stub organs"
-
- New()
- new /obj/effect/organ/torso/stub(src)
- ..()
-
-/obj/effect/organ/torso/stub
- name = "stub torso"
- species = "stub"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/stub(src)
- new /obj/effect/organ/limb/legs/stub(src)
- new /obj/effect/organ/head/stub(src)
-
-/obj/effect/organ/limb/arms/stub
- name = "stub arms"
- species = "stub"
-
-/obj/effect/organ/limb/legs/stub
- name = "stub legs"
- species = "stub"
-
-/obj/effect/organ/head/stub
- name = "stub head"
- species = "stub"
-
-// ++++STUB ORGAN STRUCTURE. END++++
-
-
-// ++++MONKEY++++
-
-/obj/effect/organstructure/monkey
- name = "monkey organs"
-
- New()
- new /obj/effect/organ/torso/monkey(src)
- ..()
-
-/obj/effect/organ/torso/monkey
- name = "monkey torso"
- species = "monkey"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/monkey(src)
- new /obj/effect/organ/limb/legs/monkey(src)
- new /obj/effect/organ/head/monkey(src)
-
-/obj/effect/organ/limb/arms/monkey
- name = "monkey arms"
- species = "monkey"
-
-/obj/effect/organ/limb/legs/monkey
- name = "monkey legs"
- species = "monkey"
-
-/obj/effect/organ/head/monkey
- name = "monkey head"
- species = "monkey"
-
-
-// +++++CYBORG+++++
-/obj/effect/organstructure/cyborg
- name = "cyborg organs"
-
- New()
- new /obj/effect/organ/torso/cyborg(src)
- ..()
-
-/obj/effect/organ/torso/cyborg
- name = "cyborg torso"
- species = "cyborg"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/cyborg(src)
- new /obj/effect/organ/limb/legs/cyborg(src)
- new /obj/effect/organ/head/cyborg(src)
-
-/obj/effect/organ/limb/arms/cyborg
- name = "cyborg arms"
- species = "cyborg"
-
-/obj/effect/organ/limb/legs/cyborg
- name = "cyborg legs"
- species = "cyborg"
-
-/obj/effect/organ/head/cyborg
- name = "cyborg head"
- species = "cyborg"
-
-// +++++AI++++++
-/obj/effect/organstructure/AI
- name = "AI organs"
-
- New()
- new /obj/effect/organ/torso/AI(src)
- ..()
-
-/obj/effect/organ/torso/AI
- name = "AI torso"
- species = "AI"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/AI(src)
- new /obj/effect/organ/limb/legs/AI(src)
- new /obj/effect/organ/head/AI(src)
-
-/obj/effect/organ/limb/arms/AI
- name = "AI arms"
- species = "AI"
-
-/obj/effect/organ/limb/legs/AI
- name = "AI legs"
- species = "AI"
-
-/obj/effect/organ/head/AI
- name = "AI head"
- species = "AI"
-
-/* New organ structure template
-
-
-/obj/effect/organstructure/template
- name = "template organs"
-
- New()
- new /obj/effect/organ/torso/template(src)
- ..()
-
-/obj/effect/organ/torso/template
- name = "template torso"
- species = "template"
- maxHealth = 100
-
- New()
- ..()
- new /obj/effect/organ/limb/arms/template(src)
- new /obj/effect/organ/limb/legs/template(src)
- new /obj/effect/organ/head/template(src)
-
-/obj/effect/organ/limb/arms/template
- name = "template arms"
- species = "template"
-
-/obj/effect/organ/limb/legs/template
- name = "template legs"
- species = "template"
-
-/obj/effect/organ/head/template
- name = "template head"
- species = "template"
-
->>>>>>> remotes/git-svn
-*/
\ No newline at end of file
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index 5d63512c14..7b0d3afa98 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -89,7 +89,7 @@ obj/item/check_airflow_movable(n)
if(src:shoes:magpulse)
return
src << "\red You are sucked away by airflow!"
- var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.
+ var/airflow_falloff = 9 - sqrt((x - airflow_dest.x) ** 2 + (y - airflow_dest.y) ** 2)
if(airflow_falloff < 1)
airflow_dest = null
return
@@ -154,7 +154,7 @@ obj/item/check_airflow_movable(n)
return
src << "\red You are pushed away by airflow!"
last_airflow = world.time
- var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.
+ var/airflow_falloff = 9 - sqrt((x - airflow_dest.x) ** 2 + (y - airflow_dest.y) ** 2)
if(airflow_falloff < 1)
airflow_dest = null
return
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 9743988875..0dae7ecc0c 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -9,18 +9,19 @@
src:Topic(href, href_list)
return null
-/proc/get_area(O)
- var/atom/location = O
- var/i
- for(i=1, i<=20, i++)
- if(isarea(location))
- return location
- else if (istype(location))
- location = location.loc
- else
- return null
+/proc/is_on_same_plane_or_station(var/z1, var/z2)
+ if(z1 == z2)
+ return 1
+ if((z1 in config.station_levels) && (z2 in config.station_levels))
+ return 1
return 0
+/proc/get_area(O)
+ var/turf/loc = get_turf(O)
+ if(!loc)
+ return null
+ return loc.loc
+
/proc/get_area_name(N) //get area by its name
for(var/area/A in world)
if(A.name == N)
@@ -49,7 +50,7 @@
return level in config.station_levels
/proc/isNotStationLevel(var/level)
- return !isStationLevel()
+ return !isStationLevel(level)
/proc/isPlayerLevel(var/level)
return level in config.player_levels
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 67e7dd2948..df53342cee 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -43,7 +43,7 @@ var/global/list/facial_hair_styles_female_list = list()
var/global/list/skin_styles_female_list = list() //unused
//Underwear
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
-var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
+var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Black Sports","White Sports","None")
//undershirt
var/global/list/undershirt_t = list("Black Tank top", "White Tank top", "Black shirt", "White shirt", "None")
//Backpacks
@@ -87,12 +87,6 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
surgery_steps += S
sort_surgeries()
- //Medical side effects. List all effects by their names
- paths = typesof(/datum/medical_effect)-/datum/medical_effect
- for(var/T in paths)
- var/datum/medical_effect/M = new T
- side_effects[M.name] = T
-
//List of job. I can't believe this was calculated multiple times per tick!
paths = typesof(/datum/job) -list(/datum/job,/datum/job/ai,/datum/job/cyborg)
for(var/T in paths)
diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm
index 282224d567..56e04a21cc 100644
--- a/code/__HELPERS/lists.dm
+++ b/code/__HELPERS/lists.dm
@@ -343,6 +343,12 @@ proc/listclearnulls(list/list)
return (result + L.Copy(Li, 0))
return (result + R.Copy(Ri, 0))
+// Macros to test for bits in a bitfield. Note, that this is for use with indexes, not bit-masks!
+#define BITTEST(bitfield,index) ((bitfield) & (1 << (index)))
+#define BITSET(bitfield,index) (bitfield) |= (1 << (index))
+#define BITRESET(bitfield,index) (bitfield) &= ~(1 << (index))
+#define BITFLIP(bitfield,index) (bitfield) ^= (1 << (index))
+
//Converts a bitfield to a list of numbers (or words if a wordlist is provided)
/proc/bitfield2list(bitfield = 0, list/wordlist)
var/list/r = list()
@@ -581,3 +587,6 @@ datum/proc/dd_SortValue()
/obj/machinery/dd_SortValue()
return "[sanitize(name)]"
+
+/obj/machinery/camera/dd_SortValue()
+ return "[c_tag]"
diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm
index d9bbc18ece..f148b10ef8 100644
--- a/code/__HELPERS/maths.dm
+++ b/code/__HELPERS/maths.dm
@@ -1,9 +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
-var/const/Sqrt2 = 1.41421356
+// Macro functions.
+#define RAND_F(LOW, HIGH) (rand()*(HIGH-LOW) + LOW)
// List of square roots for the numbers 1-100.
var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
@@ -11,115 +7,127 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10)
-/proc/Atan2(x, y)
- if(!x && !y) return 0
- var/a = arccos(x / sqrt(x*x + y*y))
- return y >= 0 ? a : -a
-
-/proc/Ceiling(x)
- return -round(-x)
-
/proc/Clamp(val, min, max)
return max(min, min(val, max))
-// cotangent
-/proc/Cot(x)
- return 1 / Tan(x)
-
-// cosecant
-/proc/Csc(x)
- return 1 / sin(x)
-
-/proc/Default(a, b)
- return a ? a : b
-
-/proc/Floor(x)
- return round(x)
-
-// Greatest Common Divisor - Euclid's algorithm
-/proc/Gcd(a, b)
- return b ? Gcd(b, a % b) : a
-
-/proc/Inverse(x)
- return 1 / x
-
-/proc/IsAboutEqual(a, b, deviation = 0.1)
- return abs(a - b) <= deviation
-
-/proc/IsEven(x)
- return x % 2 == 0
-
-// Returns true if val is from min to max, inclusive.
-/proc/IsInRange(val, min, max)
- return min <= val && val <= max
-
-/proc/IsInteger(x)
- return Floor(x) == x
-
-/proc/IsOdd(x)
- return !IsEven(x)
-
-/proc/IsMultiple(x, y)
- return x % y == 0
-
-// Least Common Multiple
-/proc/Lcm(a, b)
- return abs(a) / Gcd(a, b) * abs(b)
-
-// Performs a linear interpolation between a and b.
-// Note that amount=0 returns a, amount=1 returns b, and
-// amount=0.5 returns the mean of a and b.
-/proc/Lerp(a, b, amount = 0.5)
- return a + (b - a) * amount
-
-/proc/Mean(...)
- var/values = 0
- var/sum = 0
- for(var/val in args)
- values++
- sum += val
- return sum / values
-
-
-// Returns the nth root of x.
-/proc/Root(n, x)
- return x ** (1 / n)
-
-// secant
-/proc/Sec(x)
- return 1 / cos(x)
-
-// The quadratic formula. Returns a list with the solutions, or an empty list
-// if they are imaginary.
-/proc/SolveQuadratic(a, b, c)
- ASSERT(a)
- . = list()
- var/d = b*b - 4 * a * c
- var/bottom = 2 * a
- if(d < 0) return
- var/root = sqrt(d)
- . += (-b + root) / bottom
- if(!d) return
- . += (-b - root) / bottom
-
-// tangent
-/proc/Tan(x)
- return sin(x) / cos(x)
-
-/proc/ToDegrees(radians)
- // 180 / Pi
- return radians * 57.2957795
-
-/proc/ToRadians(degrees)
- // Pi / 180
- return degrees * 0.0174532925
-
// min is inclusive, max is exclusive
/proc/Wrap(val, min, max)
var/d = max - min
var/t = Floor((val - min) / d)
return val - (t * d)
-proc/RaiseToPower(num, power)
- if(!power) return 1
- return (power-- > 1 ? num * RaiseToPower(num, power) : num)
+/proc/Default(a, b)
+ return a ? a : b
+
+// Trigonometric functions.
+/proc/Tan(x)
+ return sin(x) / cos(x)
+
+/proc/Csc(x)
+ return 1 / sin(x)
+
+/proc/Sec(x)
+ return 1 / cos(x)
+
+/proc/Cot(x)
+ return 1 / Tan(x)
+
+/proc/Atan2(x, y)
+ if(!x && !y) return 0
+ var/a = arccos(x / sqrt(x*x + y*y))
+ return y >= 0 ? a : -a
+
+/proc/Floor(x)
+ return round(x)
+
+/proc/Ceiling(x)
+ return -round(-x)
+
+// Greatest Common Divisor: Euclid's algorithm.
+/proc/Gcd(a, b)
+ while (1)
+ if (!b) return a
+ a %= b
+ if (!a) return b
+ b %= a
+
+// Least Common Multiple. The formula is a consequence of: a*b = LCM*GCD.
+/proc/Lcm(a, b)
+ return abs(a) * abs(b) / Gcd(a, b)
+
+// Useful in the cases when x is a large expression, e.g. x = 3a/2 + b^2 + Function(c)
+/proc/Square(x)
+ return x*x
+
+/proc/Inverse(x)
+ return 1 / x
+
+// Condition checks.
+/proc/IsAboutEqual(a, b, delta = 0.1)
+ return abs(a - b) <= delta
+
+// Returns true if val is from min to max, inclusive.
+/proc/IsInRange(val, min, max)
+ return (val >= min) && (val <= max)
+
+/proc/IsInteger(x)
+ return Floor(x) == x
+
+/proc/IsMultiple(x, y)
+ return x % y == 0
+
+/proc/IsEven(x)
+ return !(x & 0x1)
+
+/proc/IsOdd(x)
+ return (x & 0x1)
+
+// Performs a linear interpolation between a and b.
+// Note: weight=0 returns a, weight=1 returns b, and weight=0.5 returns the mean of a and b.
+/proc/Interpolate(a, b, weight = 0.5)
+ return a + (b - a) * weight // Equivalent to: a*(1 - weight) + b*weight
+
+/proc/Mean(...)
+ var/sum = 0
+ for(var/val in args)
+ sum += val
+ return sum / args.len
+
+// Returns the nth root of x.
+/proc/Root(n, x)
+ return x ** (1 / n)
+
+// The quadratic formula. Returns a list with the solutions, or an empty list
+// if they are imaginary.
+/proc/SolveQuadratic(a, b, c)
+ ASSERT(a)
+
+ . = list()
+ var/discriminant = b*b - 4*a*c
+ var/bottom = 2*a
+
+ // Return if the roots are imaginary.
+ if(discriminant < 0)
+ return
+
+ var/root = sqrt(discriminant)
+ . += (-b + root) / bottom
+
+ // If discriminant == 0, there would be two roots at the same position.
+ if(discriminant != 0)
+ . += (-b - root) / bottom
+
+/proc/ToDegrees(radians)
+ // 180 / Pi ~ 57.2957795
+ return radians * 57.2957795
+
+/proc/ToRadians(degrees)
+ // Pi / 180 ~ 0.0174532925
+ return degrees * 0.0174532925
+
+// Vector algebra.
+/proc/squaredNorm(x, y)
+ return x*x + y*y
+
+/proc/norm(x, y)
+ return sqrt(squaredNorm(x, y))
diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm
index ac400269b5..c14976bb78 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -34,23 +34,20 @@
return t
//Removes a few problematic characters
-/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#","�"="�"))
+/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
+ for(var/char in repl_chars)
+ replacetext(t, char, repl_chars[char])
+ return t
+
+/proc/readd_quotes(var/t)
+ var/list/repl_chars = list(""" = "\"")
for(var/char in repl_chars)
var/index = findtext(t, char)
while(index)
- t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+1)
+ 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(""" = "\"")
- 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))
@@ -83,7 +80,7 @@
/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_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))
@@ -326,7 +323,7 @@ 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.
@@ -342,7 +339,7 @@ proc/TextPreview(var/string,var/len=40)
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
if(max_length)
input = copytext(input,1,max_length)
- return input
+ return sanitize(input)
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
return trim(strip_html_properly(input, max_length))
diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm
index bcd52b9e88..ab949df44b 100644
--- a/code/__HELPERS/time.dm
+++ b/code/__HELPERS/time.dm
@@ -11,20 +11,6 @@ proc/worldtime2text(time = world.time)
proc/time_stamp()
return time2text(world.timeofday, "hh:mm:ss")
-/* Preserving this so future generations can see how fucking retarded some people are
-proc/time_stamp()
- var/hh = text2num(time2text(world.timeofday, "hh")) // Set the hour
- var/mm = text2num(time2text(world.timeofday, "mm")) // Set the minute
- var/ss = text2num(time2text(world.timeofday, "ss")) // Set the second
- var/ph
- var/pm
- var/ps
- if(hh < 10) ph = "0"
- if(mm < 10) pm = "0"
- if(ss < 10) ps = "0"
- return"[ph][hh]:[pm][mm]:[ps][ss]"
-*/
-
/* Returns 1 if it is the selected month and day */
proc/isDay(var/month, var/day)
if(isnum(month) && isnum(day))
diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm
index cfac858e25..478700d5f8 100644
--- a/code/__HELPERS/type2type.dm
+++ b/code/__HELPERS/type2type.dm
@@ -9,333 +9,319 @@
* worldtime2text
*/
-//Returns an integer given a hex input
+// Returns an integer given a hexadecimal number string as input.
/proc/hex2num(hex)
- if (!( istext(hex) ))
+ if (!istext(hex))
return
- var/num = 0
- var/power = 0
- var/i = null
- i = length(hex)
- while(i > 0)
- var/char = copytext(hex, i, i + 1)
+ var/num = 0
+ var/power = 1
+ var/i = length(hex)
+
+ while (i)
+ var/char = text2ascii(hex, i)
switch(char)
- if("0")
- //Apparently, switch works with empty statements, yay! If that doesn't work, blame me, though. -- Urist
- if("9", "8", "7", "6", "5", "4", "3", "2", "1")
- num += text2num(char) * 16 ** power
- if("a", "A")
- num += 16 ** power * 10
- if("b", "B")
- num += 16 ** power * 11
- if("c", "C")
- num += 16 ** power * 12
- if("d", "D")
- num += 16 ** power * 13
- if("e", "E")
- num += 16 ** power * 14
- if("f", "F")
- num += 16 ** power * 15
+ if(48) // 0 -- do nothing
+ if(49 to 57) num += (char - 48) * power // 1-9
+ if(97, 65) num += power * 10 // A
+ if(98, 66) num += power * 11 // B
+ if(99, 67) num += power * 12 // C
+ if(100, 68) num += power * 13 // D
+ if(101, 69) num += power * 14 // E
+ if(102, 70) num += power * 15 // F
else
return
- power++
+ power *= 16
i--
return num
-//Returns the hex value of a number given a value assumed to be a base-ten value
-/proc/num2hex(num, placeholder)
+// Returns the hex value of a number given a value assumed to be a base-ten value
+/proc/num2hex(num, digits)
+ if (digits == null)
+ digits = 2
- if (placeholder == null)
- placeholder = 2
- if (!( isnum(num) ))
+ if (!isnum(num))
return
- if (num == 0)
- var/final = ""
- for(var/i=1 to placeholder) final = "[final]0"
- return final
- var/hex = ""
- var/i = 0
- while(16 ** i < num)
- i++
- var/power = null
- power = i - 1
- while(power >= 0)
- var/val = round(num / 16 ** power)
- num -= val * 16 ** power
- switch(val)
- if(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0)
- hex += text("[]", val)
- if(10.0)
- hex += "A"
- if(11.0)
- hex += "B"
- if(12.0)
- hex += "C"
- if(13.0)
- hex += "D"
- if(14.0)
- hex += "E"
- if(15.0)
- hex += "F"
- else
- power--
- while(length(hex) < placeholder)
- hex = text("0[]", hex)
- return hex
+ // hex is our return value, to which each hex-digit of num is appended to.
+ var/hex = ""
+ var/power = -4
+ var/n = 1
+
+ // Figure out power. (power of 2)
+ while (n < num)
+ power += 4
+ n *= 16
+
+ // Note that we have to start appending to hex with the most-significant digits.
+ while (power >= 0)
+ var/m = (num >> power) & 15
+ hex += ascii2text(m + (m < 10 ? 48 : 87)) // Provided by the IconProcs library.
+ power -= 4
+
+ // Append zeroes to make sure that hex is atleast digits long.
+ var/left = length(hex) - digits
+ while (left-- > 0)
+ hex = text("0[]", hex)
+
+ return hex
// Concatenates a list of strings into a single string. A seperator may optionally be provided.
/proc/list2text(list/ls, sep)
- if(ls.len <= 1) // Early-out code for empty or singleton lists.
+ if (ls.len <= 1) // Early-out code for empty or singleton lists.
return ls.len ? ls[1] : ""
-
+
var/l = ls.len // Made local for sanic speed.
- var/i = 0 // Incremented every time a list index is accessed.
-
- if(sep <> null)
+ var/i = 0 // Incremented every time a list index is accessed.
+
+ if (sep <> null)
// Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc...
- #define S1 sep, ls[++i]
- #define S4 S1, S1, S1, S1
- #define S16 S4, S4, S4, S4
- #define S64 S16, S16, S16, S16
-
+ #define S1 sep, ls[++i]
+ #define S4 S1, S1, S1, S1
+ #define S16 S4, S4, S4, S4
+ #define S64 S16, S16, S16, S16
+
. = "[ls[++i]]" // Make sure the initial element is converted to text.
-
+
// Having the small concatenations come before the large ones boosted speed by an average of at least 5%.
- if(l-1 & 0x01) // 'i' will always be 1 here.
+ if (l-1 & 0x01) // 'i' will always be 1 here.
. = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2.
- if(l-i & 0x02)
+ if (l-i & 0x02)
. = text("[][][][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
- if(l-i & 0x04)
+ if (l-i & 0x04)
. = text("[][][][][][][][][]", ., S4) // And so on....
- if(l-i & 0x08)
+ if (l-i & 0x08)
. = text("[][][][][][][][][][][][][][][][][]", ., S4, S4)
- if(l-i & 0x10)
+ if (l-i & 0x10)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16)
- if(l-i & 0x20)
+ if (l-i & 0x20)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
- if(l-i & 0x40)
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
+ if (l-i & 0x40)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
- while(l > i) // Chomp through the rest of the list, 128 elements at a time.
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
+ while (l > i) // Chomp through the rest of the list, 128 elements at a time.
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
-
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
+
#undef S64
#undef S16
#undef S4
#undef S1
-
else
// Macros expand to long argument lists like so: ls[++i], ls[++i], ls[++i], etc...
- #define S1 ls[++i]
- #define S4 S1, S1, S1, S1
- #define S16 S4, S4, S4, S4
- #define S64 S16, S16, S16, S16
-
+ #define S1 ls[++i]
+ #define S4 S1, S1, S1, S1
+ #define S16 S4, S4, S4, S4
+ #define S64 S16, S16, S16, S16
+
. = "[ls[++i]]" // Make sure the initial element is converted to text.
-
- if(l-1 & 0x01) // 'i' will always be 1 here.
+
+ if (l-1 & 0x01) // 'i' will always be 1 here.
. += S1 // Append 1 element if the remaining elements are not a multiple of 2.
- if(l-i & 0x02)
+ if (l-i & 0x02)
. = text("[][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
- if(l-i & 0x04)
+ if (l-i & 0x04)
. = text("[][][][][]", ., S4) // And so on...
- if(l-i & 0x08)
+ if (l-i & 0x08)
. = text("[][][][][][][][][]", ., S4, S4)
- if(l-i & 0x10)
+ if (l-i & 0x10)
. = text("[][][][][][][][][][][][][][][][][]", ., S16)
- if(l-i & 0x20)
+ if (l-i & 0x20)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
- if(l-i & 0x40)
+ if (l-i & 0x40)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
- while(l > i) // Chomp through the rest of the list, 128 elements at a time.
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
+ while (l > i) // Chomp through the rest of the list, 128 elements at a time.
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
-
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
+
#undef S64
#undef S16
#undef S4
#undef S1
-
-//slower then list2text, but correctly processes associative lists.
+// Slower then list2text, but correctly processes associative lists.
proc/tg_list2text(list/list, glue=",")
- if(!istype(list) || !list.len)
+ if (!istype(list) || !list.len)
return
var/output
for(var/i=1 to list.len)
output += (i!=1? glue : null)+(!isnull(list["[list[i]]"])?"[list["[list[i]]"]]":"[list[i]]")
return output
-
-//Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
+// Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
/proc/text2list(text, delimiter="\n")
var/delim_len = length(delimiter)
- if(delim_len < 1) return list(text)
+ if (delim_len < 1)
+ return list(text)
+
. = list()
var/last_found = 1
var/found
- do
- found = findtext(text, delimiter, last_found, 0)
- . += copytext(text, last_found, found)
- last_found = found + delim_len
- while(found)
+ do
+ found = findtext(text, delimiter, last_found, 0)
+ . += copytext(text, last_found, found)
+ last_found = found + delim_len
+ while (found)
+
+// Case sensitive version of /proc/text2list().
+/proc/text2listEx(text, delimiter="\n")
+ var/delim_len = length(delimiter)
+ if (delim_len < 1)
+ return list(text)
+
+ . = list()
+ var/last_found = 1
+ var/found
+
+ do
+ found = findtextEx(text, delimiter, last_found, 0)
+ . += 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")
- var/delim_len = length(delimiter)
- if(delim_len < 1) return list(text)
- . = list()
- var/last_found = 1
- var/found
- do
- found = findtextEx(text, delimiter, last_found, 0)
- . += copytext(text, last_found, found)
- last_found = found + delim_len
- while(found)
-
-//Splits the text of a file at seperator and returns them in a list.
+// Splits the text of a file at seperator and returns them in a list.
/proc/file2list(filename, seperator="\n")
return text2list(return_file_text(filename),seperator)
-
-//Turns a direction into text
-
+// Turns a direction into text
/proc/num2dir(direction)
- switch(direction)
- if(1.0) return NORTH
- if(2.0) return SOUTH
- if(4.0) return EAST
- if(8.0) return WEST
+ switch (direction)
+ if (1.0) return NORTH
+ if (2.0) return SOUTH
+ if (4.0) return EAST
+ if (8.0) return WEST
else
world.log << "UNKNOWN DIRECTION: [direction]"
-
-
-//Turns a direction into text
+// Turns a direction into text
/proc/dir2text(direction)
- switch(direction)
- if(1.0)
- return "north"
- if(2.0)
- return "south"
- if(4.0)
- return "east"
- if(8.0)
- return "west"
- if(5.0)
- return "northeast"
- if(6.0)
- return "southeast"
- if(9.0)
- return "northwest"
- if(10.0)
- return "southwest"
- else
- return
+ switch (direction)
+ if (1.0) return "north"
+ if (2.0) return "south"
+ if (4.0) return "east"
+ if (8.0) return "west"
+ if (5.0) return "northeast"
+ if (6.0) return "southeast"
+ if (9.0) return "northwest"
+ if (10.0) return "southwest"
-//Turns text into proper directions
+// Turns text into proper directions
/proc/text2dir(direction)
- switch(uppertext(direction))
- if("NORTH")
- return 1
- if("SOUTH")
- return 2
- if("EAST")
- return 4
- if("WEST")
- return 8
- if("NORTHEAST")
- return 5
- if("NORTHWEST")
- return 9
- if("SOUTHEAST")
- return 6
- if("SOUTHWEST")
- return 10
- else
- return
+ switch (uppertext(direction))
+ if ("NORTH") return 1
+ if ("SOUTH") return 2
+ if ("EAST") return 4
+ if ("WEST") return 8
+ if ("NORTHEAST") return 5
+ if ("NORTHWEST") return 9
+ if ("SOUTHEAST") return 6
+ if ("SOUTHWEST") return 10
-//Converts an angle (degrees) into an ss13 direction
+// Converts an angle (degrees) into an ss13 direction
/proc/angle2dir(var/degree)
- degree = ((degree+22.5)%365)
- if(degree < 45) return NORTH
- if(degree < 90) return NORTHEAST
- if(degree < 135) return EAST
- if(degree < 180) return SOUTHEAST
- if(degree < 225) return SOUTH
- if(degree < 270) return SOUTHWEST
- if(degree < 315) return WEST
+ degree = (degree + 22.5) % 365 // 22.5 = 45 / 2
+ if (degree < 45) return NORTH
+ if (degree < 90) return NORTHEAST
+ if (degree < 135) return EAST
+ if (degree < 180) return SOUTHEAST
+ if (degree < 225) return SOUTH
+ if (degree < 270) return SOUTHWEST
+ if (degree < 315) return WEST
return NORTH|WEST
-//returns the north-zero clockwise angle in degrees, given a direction
-
+// Returns the north-zero clockwise angle in degrees, given a direction
/proc/dir2angle(var/D)
- switch(D)
- if(NORTH) return 0
- if(SOUTH) return 180
- if(EAST) return 90
- if(WEST) return 270
- if(NORTHEAST) return 45
- if(SOUTHEAST) return 135
- if(NORTHWEST) return 315
- if(SOUTHWEST) return 225
- else return null
+ switch (D)
+ if (NORTH) return 0
+ if (SOUTH) return 180
+ if (EAST) return 90
+ if (WEST) return 270
+ if (NORTHEAST) return 45
+ if (SOUTHEAST) return 135
+ if (NORTHWEST) return 315
+ if (SOUTHWEST) return 225
-//Returns the angle in english
+// Returns the angle in english
/proc/angle2text(var/degree)
return dir2text(angle2dir(degree))
-//Converts a blend_mode constant to one acceptable to icon.Blend()
+// Converts a blend_mode constant to one acceptable to icon.Blend()
/proc/blendMode2iconMode(blend_mode)
- switch(blend_mode)
- if(BLEND_MULTIPLY) return ICON_MULTIPLY
- if(BLEND_ADD) return ICON_ADD
- if(BLEND_SUBTRACT) return ICON_SUBTRACT
- else return ICON_OVERLAY
+ switch (blend_mode)
+ if (BLEND_MULTIPLY) return ICON_MULTIPLY
+ if (BLEND_ADD) return ICON_ADD
+ if (BLEND_SUBTRACT) return ICON_SUBTRACT
+ else return ICON_OVERLAY
-//Converts a rights bitfield into a string
+// Converts a rights bitfield into a string
/proc/rights2text(rights,seperator="")
- if(rights & R_BUILDMODE) . += "[seperator]+BUILDMODE"
- if(rights & R_ADMIN) . += "[seperator]+ADMIN"
- if(rights & R_BAN) . += "[seperator]+BAN"
- if(rights & R_FUN) . += "[seperator]+FUN"
- if(rights & R_SERVER) . += "[seperator]+SERVER"
- if(rights & R_DEBUG) . += "[seperator]+DEBUG"
- if(rights & R_POSSESS) . += "[seperator]+POSSESS"
- if(rights & R_PERMISSIONS) . += "[seperator]+PERMISSIONS"
- if(rights & R_STEALTH) . += "[seperator]+STEALTH"
- if(rights & R_REJUVINATE) . += "[seperator]+REJUVINATE"
- if(rights & R_VAREDIT) . += "[seperator]+VAREDIT"
- if(rights & R_SOUNDS) . += "[seperator]+SOUND"
- if(rights & R_SPAWN) . += "[seperator]+SPAWN"
- if(rights & R_MOD) . += "[seperator]+MODERATOR"
- if(rights & R_MENTOR) . += "[seperator]+MENTOR"
+ if (rights & R_BUILDMODE) . += "[seperator]+BUILDMODE"
+ if (rights & R_ADMIN) . += "[seperator]+ADMIN"
+ if (rights & R_BAN) . += "[seperator]+BAN"
+ if (rights & R_FUN) . += "[seperator]+FUN"
+ if (rights & R_SERVER) . += "[seperator]+SERVER"
+ if (rights & R_DEBUG) . += "[seperator]+DEBUG"
+ if (rights & R_POSSESS) . += "[seperator]+POSSESS"
+ if (rights & R_PERMISSIONS) . += "[seperator]+PERMISSIONS"
+ if (rights & R_STEALTH) . += "[seperator]+STEALTH"
+ if (rights & R_REJUVINATE) . += "[seperator]+REJUVINATE"
+ if (rights & R_VAREDIT) . += "[seperator]+VAREDIT"
+ if (rights & R_SOUNDS) . += "[seperator]+SOUND"
+ if (rights & R_SPAWN) . += "[seperator]+SPAWN"
+ if (rights & R_MOD) . += "[seperator]+MODERATOR"
+ if (rights & R_MENTOR) . += "[seperator]+MENTOR"
return .
/proc/ui_style2icon(ui_style)
- switch(ui_style)
- if("old") return 'icons/mob/screen1_old.dmi'
- if("Orange") return 'icons/mob/screen1_Orange.dmi'
- if("Midnight") return 'icons/mob/screen1_Midnight.dmi'
- else return 'icons/mob/screen1_White.dmi'
+ switch (ui_style)
+ if ("old") return 'icons/mob/screen1_old.dmi'
+ if ("Orange") return 'icons/mob/screen1_Orange.dmi'
+ if ("Midnight") return 'icons/mob/screen1_Midnight.dmi'
+ else return 'icons/mob/screen1_White.dmi'
+
+// heat2color functions. Adapted from: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
+/proc/heat2color(temp)
+ return rgb(heat2color_r(temp), heat2color_g(temp), heat2color_b(temp))
+
+/proc/heat2color_r(temp)
+ temp /= 100
+ if(temp <= 66)
+ . = 255
+ else
+ . = max(0, min(255, 329.698727446 * (temp - 60) ** -0.1332047592))
+
+/proc/heat2color_g(temp)
+ temp /= 100
+ if(temp <= 66)
+ . = max(0, min(255, 99.4708025861 * log(temp) - 161.1195681661))
+ else
+ . = max(0, min(255, 288.1221695283 * ((temp - 60) ** -0.0755148492)))
+
+/proc/heat2color_b(temp)
+ temp /= 100
+ if(temp >= 66)
+ . = 255
+ else
+ if(temp <= 16)
+ . = 0
+ else
+ . = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index d78f3e7a9d..8969102e00 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1249,7 +1249,7 @@ proc/is_hot(obj/item/W as obj)
return 1000
else
return 0
- if(/obj/item/clothing/mask/cigarette)
+ if(/obj/item/clothing/mask/smokable/cigarette)
if(W:lit)
return 1000
else
@@ -1287,7 +1287,7 @@ proc/is_hot(obj/item/W as obj)
istype(W, /obj/item/weapon/weldingtool) || \
istype(W, /obj/item/weapon/flame/lighter/zippo) || \
istype(W, /obj/item/weapon/flame/match) || \
- istype(W, /obj/item/clothing/mask/cigarette) || \
+ istype(W, /obj/item/clothing/mask/smokable/cigarette) || \
istype(W, /obj/item/weapon/shovel) \
)
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index ab37fa4867..3f00db9ce0 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -241,6 +241,8 @@ datum/hud/New(mob/owner)
brain_hud(ui_style)
else if(isalien(mymob))
larva_hud()
+ else if(isslime(mymob))
+ slime_hud()
else if(isAI(mymob))
ai_hud()
else if(isrobot(mymob))
diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm
index cd19e78d7e..cd5a859715 100644
--- a/code/_onclick/hud/other_mobs.dm
+++ b/code/_onclick/hud/other_mobs.dm
@@ -33,3 +33,71 @@
mymob.client.screen = null
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
+
+/datum/hud/proc/slime_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
+
+ src.adding = list()
+
+ var/obj/screen/using
+
+ using = new /obj/screen()
+ using.name = "act_intent"
+ using.set_dir(SOUTHWEST)
+ using.icon = ui_style
+ using.icon_state = "intent_"+mymob.a_intent
+ using.screen_loc = ui_zonesel
+ using.layer = 20
+ src.adding += using
+ action_intent = using
+
+ //intent small hud objects
+ var/icon/ico
+
+ ico = new(ui_style, "black")
+ ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
+ ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
+ using = new /obj/screen( src )
+ using.name = "help"
+ using.icon = ico
+ using.screen_loc = ui_zonesel
+ using.layer = 21
+ src.adding += using
+ help_intent = using
+
+ ico = new(ui_style, "black")
+ ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
+ ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
+ using = new /obj/screen( src )
+ using.name = "disarm"
+ using.icon = ico
+ using.screen_loc = ui_zonesel
+ using.layer = 21
+ src.adding += using
+ disarm_intent = using
+
+ ico = new(ui_style, "black")
+ ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
+ ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
+ using = new /obj/screen( src )
+ using.name = "grab"
+ using.icon = ico
+ using.screen_loc = ui_zonesel
+ using.layer = 21
+ src.adding += using
+ grab_intent = using
+
+ ico = new(ui_style, "black")
+ ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
+ ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
+ using = new /obj/screen( src )
+ using.name = "harm"
+ using.icon = ico
+ using.screen_loc = ui_zonesel
+ using.layer = 21
+ src.adding += using
+ hurt_intent = using
+
+ mymob.client.screen = null
+ mymob.client.screen += src.adding
+
+ return
\ No newline at end of file
diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm
index 479e097251..496553558d 100644
--- a/code/_onclick/other_mobs.dm
+++ b/code/_onclick/other_mobs.dm
@@ -120,45 +120,61 @@
// Eating
if(Victim)
+ if (Victim == A)
+ Feedstop()
return
- // Basic attack.
- A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
-
- // Handle mob shocks.
var/mob/living/M = A
- if(istype(M) && powerlevel > 0 && !istype(A,/mob/living/carbon/slime))
+ if (istype(M))
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5))
- return
+ switch(src.a_intent)
+ if ("help") // We just poke the other
+ M.visible_message("[src] gently pokes [M]!", "[src] gently pokes you!")
+ if ("disarm") // We stun the target, with the intention to feed
+ var/stunprob = 1
+ var/power = max(0, min(10, (powerlevel + rand(0, 3))))
+ if (powerlevel > 0 && !istype(A, /mob/living/carbon/slime))
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(H.species.flags & IS_SYNTHETIC)
+ return
+ stunprob *= H.species.siemens_coefficient
- var/power = max(0,min(10,(powerlevel+rand(0,3))))
- var/stunprob = 10
- switch(power*10)
- if(1 to 2) stunprob = 20
- if(3 to 4) stunprob = 30
- if(5 to 6) stunprob = 40
- if(7 to 8) stunprob = 60
- if(9) stunprob = 70
- if(10) stunprob = 95
+ switch(power * 10)
+ if(0) stunprob *= 10
+ if(1 to 2) stunprob *= 20
+ if(3 to 4) stunprob *= 30
+ if(5 to 6) stunprob *= 40
+ if(7 to 8) stunprob *= 60
+ if(9) stunprob *= 70
+ if(10) stunprob *= 95
- if(prob(stunprob))
- powerlevel = max(0,powerlevel-3)
- src.visible_message("\red The [name] has shocked [M]!")
- M.Weaken(power)
- M.Stun(power)
- if (M.stuttering < power) M.stuttering = power
+ if(prob(stunprob))
+ powerlevel = max(0, powerlevel-3)
+ M.visible_message("[src] has shocked [M]!", "[src] has shocked you!")
+ M.Weaken(power)
+ M.Stun(power)
+ M.stuttering = max(M.stuttering, power)
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, M)
- s.start()
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(5, 1, M)
+ s.start()
- if(prob(stunprob) && powerlevel >= 8)
- M.adjustFireLoss(powerlevel * rand(6,10))
- M.updatehealth()
+ if(prob(stunprob) && powerlevel >= 8)
+ M.adjustFireLoss(powerlevel * rand(6,10))
+ else if(prob(40))
+ M.visible_message("[src] has pounced at [M]!", "[src] has pounced at you!")
+ M.Weaken(power)
+ else
+ M.visible_message("[src] has tried to pounce at [M]!", "[src] has tried to pounce at you!")
+ M.updatehealth()
+ if ("grab") // We feed
+ Wrap(M)
+ if ("hurt") // Attacking
+ A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
+ else
+ A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped") // Basic attack.
/*
New Players:
Have no reason to click on anything at all.
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 1e972dd46d..97e4c8074b 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -33,8 +33,7 @@ datum/controller/game_controller
var/mob/list/expensive_mobs = list()
var/list/shuttle_list // For debugging and VV
- var/datum/ore_distribution/asteroid_ore_map // For debugging and VV.
-
+ var/datum/random_map/ore/asteroid_ore_map // For debugging and VV.
datum/controller/game_controller/New()
//There can be only one master_controller. Out with the old and in with the new.
@@ -59,6 +58,9 @@ datum/controller/game_controller/New()
datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag
+ //Create the asteroid Z-level.
+ new /datum/random_map(null,13,32,5,217,223)
+
spawn(20)
createRandomZlevel()
@@ -77,9 +79,6 @@ datum/controller/game_controller/proc/setup()
transfer_controller = new
- for(var/i=0, iOPERATIVE|nanotrasen"
- text += "
To shuttle, undress, dress up."
+ text += "OPERATIVE|nanotrasen"
+ text += "
To shuttle, undress, dress up."
var/code
for (var/obj/machinery/nuclearbomb/bombue in machines)
if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
code = bombue.r_code
break
if (code)
- text += " Code is [code]. tell the code."
+ text += " Code is [code]. tell the code."
else
- text += "operative|NANOTRASEN"
- sections["nuclear"] = text
+ text += "operative|NANOTRASEN"
+ sections["mercenary"] = text
/** TRAITOR ***/
text = "traitor"
@@ -362,7 +362,7 @@ datum/mind
assigned_role = new_role
else if (href_list["memory_edit"])
- var/new_memo = copytext(sanitize(input("Write new memory", "Memory", memory) as null|message),1,MAX_MESSAGE_LEN)
+ var/new_memo = sanitize(copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN))
if (isnull(new_memo)) return
memory = new_memo
@@ -382,7 +382,7 @@ datum/mind
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
- var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "prevent", "harm", "brig", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
+ var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "prevent", "harm", "brig", "hijack", "escape", "survive", "steal", "download", "mercenary", "capture", "absorb", "custom")
if (!new_obj_type) return
var/datum/objective/new_objective = null
@@ -436,7 +436,7 @@ datum/mind
new_objective = new /datum/objective/survive
new_objective.owner = src
- if ("nuclear")
+ if ("mercenary")
new_objective = new /datum/objective/nuclear
new_objective.owner = src
@@ -473,7 +473,7 @@ datum/mind
new_objective.target_amount = target_number
if ("custom")
- var/expl = copytext(sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null),1,MAX_MESSAGE_LEN)
+ var/expl = sanitize(copytext(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN))
if (!expl) return
new_objective = new /datum/objective
new_objective.owner = src
@@ -500,7 +500,7 @@ datum/mind
else if(href_list["implant"])
var/mob/living/carbon/human/H = current
- H.hud_updateflag |= (1 << IMPLOYAL_HUD) // updates that players HUD images so secHUD's pick up they are implanted or not.
+ BITSET(H.hud_updateflag, IMPLOYAL_HUD) // updates that players HUD images so secHUD's pick up they are implanted or not.
switch(href_list["implant"])
if("remove")
@@ -540,7 +540,7 @@ datum/mind
else if (href_list["revolution"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["revolution"])
if("clear")
@@ -635,7 +635,7 @@ datum/mind
usr << "\red Reequipping revolutionary goes wrong!"
else if (href_list["cult"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["cult"])
if("clear")
if(src in ticker.mode.cult)
@@ -685,7 +685,7 @@ datum/mind
usr << "\red Spawning amulet failed!"
else if (href_list["wizard"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["wizard"])
if("clear")
@@ -715,7 +715,7 @@ datum/mind
usr << "\blue The objectives for wizard [key] have been generated. You can edit them and anounce manually."
else if (href_list["changeling"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["changeling"])
if("clear")
if(src in ticker.mode.changelings)
@@ -748,12 +748,12 @@ datum/mind
current.UpdateAppearance()
domutcheck(current, null)
- else if (href_list["nuclear"])
+ else if (href_list["mercenary"])
var/mob/living/carbon/human/H = current
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ BITSET(current.hud_updateflag, SPECIALROLE_HUD)
- switch(href_list["nuclear"])
+ switch(href_list["mercenary"])
if("clear")
if(src in ticker.mode.syndicates)
ticker.mode.syndicates -= src
@@ -763,7 +763,7 @@ datum/mind
objectives-=O
current << "\red You have been brainwashed! You are no longer an operative!"
log_admin("[key_name_admin(usr)] has de-merc'd [current].")
- if("nuclear")
+ if("mercenary")
if(!(src in ticker.mode.syndicates))
ticker.mode.syndicates += src
ticker.mode.update_synd_icons_added(src)
@@ -805,7 +805,7 @@ datum/mind
usr << "\red No valid nuke found!"
else if (href_list["traitor"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["traitor"])
if("clear")
if(src in ticker.mode.traitors)
@@ -888,7 +888,7 @@ datum/mind
current.radiation -= 50
else if (href_list["silicon"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["silicon"])
if("unmalf")
if(src in ticker.mode.malf_ai)
diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm
index b2ced9fa0d..f30d55455b 100644
--- a/code/datums/spells/area_teleport.dm
+++ b/code/datums/spells/area_teleport.dm
@@ -47,7 +47,7 @@
return
if(target && target.buckled)
- target.buckled.unbuckle()
+ target.buckled.unbuckle_mob()
var/list/tempL = L
var/attempt = null
diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm
index 1b1646ffa4..b5744dffc4 100644
--- a/code/datums/spells/ethereal_jaunt.dm
+++ b/code/datums/spells/ethereal_jaunt.dm
@@ -20,7 +20,7 @@
if(target.buckled)
var/obj/structure/stool/bed/buckled_to = target.buckled.
- buckled_to.unbuckle()
+ buckled_to.unbuckle_mob()
var/mobloc = get_turf(target.loc)
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
old mode 100755
new mode 100644
index 70c418172d..d96f3364a1
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -731,9 +731,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/shield/riot,
/obj/item/weapon/shield/riot,
/obj/item/weapon/shield/riot,
- /obj/item/weapon/storage/box/flashbangs,
- /obj/item/weapon/storage/box/flashbangs,
- /obj/item/weapon/storage/box/flashbangs,
/obj/item/weapon/handcuffs,
/obj/item/weapon/handcuffs,
/obj/item/weapon/handcuffs,
@@ -742,13 +739,26 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/head/helmet/riot,
/obj/item/clothing/suit/armor/riot,
/obj/item/clothing/head/helmet/riot,
- /obj/item/clothing/suit/armor/riot)
+ /obj/item/clothing/suit/armor/riot,
+ /obj/item/weapon/storage/box/flashbangs,
+ /obj/item/weapon/storage/box/beanbags,
+ /obj/item/weapon/storage/box/handcuffs)
cost = 60
containertype = /obj/structure/closet/crate/secure
containername = "Riot gear crate"
access = access_armory
group = "Security"
+/datum/supply_packs/energyweapons
+ name = "Energy weapons crate"
+ contains = list(/obj/item/weapon/gun/energy/laser,
+ /obj/item/weapon/gun/energy/laser,
+ /obj/item/weapon/gun/energy/gun)
+ cost = 50
+ containertype = /obj/structure/closet/crate/secure
+ containername = "energy weapons crate"
+ access = access_armory
+ group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -775,13 +785,14 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
group = "Security"
/datum/supply_packs/shotgunammo
- name = "Shotgun shells"
+ name = "Ballistic ammunition crate"
contains = list(/obj/item/weapon/storage/box/shotgunammo,
/obj/item/weapon/storage/box/shotgunammo,
- /obj/item/weapon/storage/box/shotgunammo)
+ /obj/item/weapon/storage/box/shotgunshells,
+ /obj/item/weapon/storage/box/shotgunshells)
cost = 60
containertype = /obj/structure/closet/crate/secure
- containername = "Shotgun shells"
+ containername = "ballistic ammunition crate"
access = access_armory
group = "Security"
@@ -887,10 +898,9 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/glass/paint/green,
/obj/item/weapon/reagent_containers/glass/paint/blue,
/obj/item/weapon/reagent_containers/glass/paint/yellow,
- /obj/item/weapon/reagent_containers/glass/paint/violet,
+ /obj/item/weapon/reagent_containers/glass/paint/purple,
/obj/item/weapon/reagent_containers/glass/paint/black,
/obj/item/weapon/reagent_containers/glass/paint/white,
- /obj/item/weapon/reagent_containers/glass/paint/remover,
/obj/item/weapon/contraband/poster,
/obj/item/weapon/wrapping_paper,
/obj/item/weapon/wrapping_paper,
@@ -955,8 +965,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
name = "Sterile equipment crate"
contains = list(/obj/item/clothing/under/rank/medical/green,
/obj/item/clothing/under/rank/medical/green,
+ /obj/item/clothing/head/surgery/green,
+ /obj/item/clothing/head/surgery/green,
/obj/item/weapon/storage/box/masks,
- /obj/item/weapon/storage/box/gloves)
+ /obj/item/weapon/storage/box/gloves,
+ /obj/item/weapon/storage/belt/medical,
+ /obj/item/weapon/storage/belt/medical,
+ /obj/item/weapon/storage/belt/medical)
cost = 15
containertype = "/obj/structure/closet/crate"
containername = "Sterile equipment crate"
@@ -1379,10 +1394,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/randomised/webbing
name = "Webbing crate"
num_contained = 1
- contains = list(/obj/item/clothing/tie/holster,
- /obj/item/clothing/tie/storage/brown_vest,
- /obj/item/clothing/tie/storage/webbing,
- /obj/item/clothing/tie/storage)
+ contains = list(/obj/item/clothing/accessory/holster,
+ /obj/item/clothing/accessory/storage/brown_vest,
+ /obj/item/clothing/accessory/storage/webbing,
+ /obj/item/clothing/accessory/storage)
cost = 15
containertype = /obj/structure/closet/crate
containername = "Webbing crate"
@@ -1417,5 +1432,16 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/under/dress/dress_saloon)
group = "Miscellaneous"
+/datum/supply_packs/painters
+ name = "Station Painting Supplies"
+ cost = 10
+ containername = "station painting supplies crate"
+ containertype = /obj/structure/closet/crate
+ group = "Engineering"
+ contains = list(/obj/item/device/pipe_painter,
+ /obj/item/device/pipe_painter,
+ /obj/item/device/floor_painter,
+ /obj/item/device/floor_painter)
+
diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm
index e6cb473f59..f8b796269f 100644
--- a/code/datums/wires/airlock.dm
+++ b/code/datums/wires/airlock.dm
@@ -34,14 +34,17 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
/datum/wires/airlock/GetInteractWindow()
var/obj/machinery/door/airlock/A = holder
+ var/haspower = A.arePowerSystemsOn() //If there's no power, then no lights will be on.
+
. += ..()
- . += text("
\n[]
\n[]
\n[]
\n[]
\n[]
\n[]
\n[]", (A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
- (A.lights ? "The door bolt lights are on." : "The door bolt lights are off!"),
- ((A.hasPower()) ? "The test light is on." : "The test light is off!"),
- ((A.aiControlDisabled==0 && !A.emagged) ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
- (A.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
- (A.normalspeed==0 ? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
- (A.aiDisabledIdScanner==0 ? "The IDScan light is on." : "The IDScan light is off."))
+ . += text("
\n[]
\n[]
\n[]
\n[]
\n[]
\n[]
\n[]",
+ (A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
+ ((A.lights && haspower) ? "The door bolt lights are on." : "The door bolt lights are off!"),
+ ((haspower) ? "The test light is on." : "The test light is off!"),
+ ((A.aiControlDisabled==0 && !A.emagged && haspower)? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
+ ((A.safe==0 && haspower)? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
+ ((A.normalspeed==0 && haspower)? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
+ ((A.aiDisabledIdScanner==0 && haspower)? "The IDScan light is on." : "The IDScan light is off."))
/datum/wires/airlock/UpdateCut(var/index, var/mended)
@@ -127,7 +130,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
switch(index)
if(AIRLOCK_WIRE_IDSCAN)
//Sending a pulse through flashes the red light on the door (if the door has power).
- if(A.hasPower() && A.density)
+ if(A.arePowerSystemsOn() && A.density)
A.do_animate("deny")
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
@@ -139,7 +142,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
A.locked = 1
A.audible_message("You hear a click from the bottom of the door.", null, 1)
else
- if(A.hasPower()) //only can raise bolts if power's on
+ if(A.arePowerSystemsOn()) //only can raise bolts if power's on
A.locked = 0
A.audible_message("You hear a click from the bottom of the door.", null, 1)
A.update_icon()
diff --git a/code/datums/wires/alarm.dm b/code/datums/wires/alarm.dm
index e8d68d7ffe..6ebc937265 100644
--- a/code/datums/wires/alarm.dm
+++ b/code/datums/wires/alarm.dm
@@ -11,7 +11,7 @@ var/const/AALARM_WIRE_AALARM = 16
/datum/wires/alarm/CanUse(var/mob/living/L)
var/obj/machinery/alarm/A = holder
- if(A.wiresexposed)
+ if(A.wiresexposed && A.buildstage == 2)
return 1
return 0
diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm
index 91a95b47a7..7f9c4ed10a 100644
--- a/code/datums/wires/vending.dm
+++ b/code/datums/wires/vending.dm
@@ -1,3 +1,5 @@
+#define CAT_HIDDEN 2 // Also in code/game/machinery/vending.dm
+
/datum/wires/vending
holder_type = /obj/machinery/vending
wire_count = 4
@@ -17,17 +19,12 @@ var/const/VENDING_WIRE_IDSCAN = 8
return 1
return 0
-/datum/wires/vending/Interact(var/mob/living/user)
- if(CanUse(user))
- var/obj/machinery/vending/V = holder
- V.attack_hand(user)
-
/datum/wires/vending/GetInteractWindow()
var/obj/machinery/vending/V = holder
. += ..()
. += "
The orange light is [V.seconds_electrified ? "off" : "on"].
"
. += "The red light is [V.shoot_inventory ? "off" : "blinking"].
"
- . += "The green light is [V.extended_inventory ? "on" : "off"].
"
+ . += "The green light is [(V.categories & CAT_HIDDEN) ? "on" : "off"].
"
. += "The [V.scan_id ? "purple" : "yellow"] light is on.
"
/datum/wires/vending/UpdatePulsed(var/index)
@@ -36,7 +33,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
if(VENDING_WIRE_THROW)
V.shoot_inventory = !V.shoot_inventory
if(VENDING_WIRE_CONTRABAND)
- V.extended_inventory = !V.extended_inventory
+ V.categories ^= CAT_HIDDEN
if(VENDING_WIRE_ELECTRIFY)
V.seconds_electrified = 30
if(VENDING_WIRE_IDSCAN)
@@ -48,7 +45,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
if(VENDING_WIRE_THROW)
V.shoot_inventory = !mended
if(VENDING_WIRE_CONTRABAND)
- V.extended_inventory = 0
+ V.categories &= ~CAT_HIDDEN
if(VENDING_WIRE_ELECTRIFY)
if(mended)
V.seconds_electrified = 0
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 0c971df260..e105d67a5b 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -173,10 +173,11 @@ using /obj/effect/datacore/proc/manifest_inject( ), or manifest_insert( )
*/
var/global/list/PDA_Manifest = list()
+var/global/ManifestJSON
/obj/effect/datacore/proc/get_manifest_json()
if(PDA_Manifest.len)
- return PDA_Manifest
+ return
var/heads[0]
var/sec[0]
var/eng[0]
@@ -247,7 +248,8 @@ var/global/list/PDA_Manifest = list()
"bot" = bot,\
"misc" = misc\
)
- return PDA_Manifest
+ ManifestJSON = list2json(PDA_Manifest)
+ return
@@ -302,7 +304,7 @@ var/global/list/PDA_Manifest = list()
throwforce = 0.0
throw_speed = 1
throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
user.drop_item()
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 0921cfabd9..4f424e0315 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -3,7 +3,7 @@
desc = "Should anything ever go wrong..."
icon = 'icons/obj/items.dmi'
icon_state = "red_phone"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
force = 3.0
throwforce = 2.0
throw_speed = 1
@@ -22,7 +22,6 @@
anchored = 0.0
var/stored_matter = 0
var/mode = 1
- flags = TABLEPASS
w_class = 3.0
/obj/item/weapon/bananapeel
@@ -85,20 +84,59 @@
throw_speed = 4
throw_range = 5
-
/obj/item/weapon/cane
name = "cane"
desc = "A cane used by a true gentlemen. Or a clown."
icon = 'icons/obj/weapons.dmi'
icon_state = "cane"
item_state = "stick"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 5.0
throwforce = 7.0
w_class = 2.0
matter = list("metal" = 50)
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
+/obj/item/weapon/cane/concealed
+ var/concealed_blade
+
+/obj/item/weapon/cane/concealed/New()
+ ..()
+ concealed_blade = new/obj/item/weapon/butterfly/switchblade(src)
+
+/obj/item/weapon/cane/concealed/attack_self(mob/user)
+ if(concealed_blade)
+ user.visible_message("[user] has unsheathed \a [concealed_blade] from \his [src]!", "You unsheathe \the [concealed_blade] from \the [src].")
+ // Calling drop/put in hands to properly call item drop/pickup procs
+ playsound(user.loc, 'sound/weapons/flipblade.ogg', 50, 1)
+ user.drop_from_inventory(src)
+ user.put_in_hands(concealed_blade)
+ user.put_in_hands(src)
+ concealed_blade = null
+ update_icon()
+ else
+ ..()
+
+/obj/item/weapon/cane/concealed/attackby(var/obj/item/weapon/butterfly/W, var/mob/user)
+ if(!src.concealed_blade && istype(W))
+ user.visible_message("[user] has sheathed \a [W] into \his [src]!", "You sheathe \the [W] into \the [src].")
+ user.drop_from_inventory(W)
+ W.loc = src
+ src.concealed_blade = W
+ update_icon()
+ else
+ ..()
+
+/obj/item/weapon/cane/concealed/update_icon()
+ if(concealed_blade)
+ name = initial(name)
+ icon_state = initial(icon_state)
+ item_state = initial(icon_state)
+ else
+ name = "cane shaft"
+ icon_state = "nullrod"
+ item_state = "foldcane"
+
/obj/item/weapon/disk
name = "disk"
icon = 'icons/obj/items.dmi'
@@ -139,7 +177,7 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "handcuff"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
throwforce = 0
w_class = 3.0
origin_tech = "materials=1"
@@ -198,7 +236,6 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
- flags = FPRINT | TABLEPASS
attack_verb = list("warned", "cautioned", "smashed")
/obj/item/weapon/caution/cone
@@ -217,7 +254,7 @@
var/traitor_frequency = 0.0
var/mob/currentUser = null
var/obj/item/device/radio/origradio = null
- flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
+ flags = CONDUCT | ONBELT
w_class = 2.0
item_state = "radio"
throw_speed = 4
@@ -235,7 +272,7 @@
var/selfdestruct = 0.0
var/traitor_frequency = 0.0
var/obj/item/device/radio/origradio = null
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
item_state = "radio"
throwforce = 5
@@ -255,7 +292,7 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
- flags = FPRINT | TABLEPASS | NOSHIELD
+ flags = NOSHIELD
attack_verb = list("bludgeoned", "whacked", "disciplined")
/obj/item/weapon/staff/broom
@@ -282,7 +319,7 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
- flags = FPRINT | TABLEPASS | NOSHIELD
+ flags = NOSHIELD
/obj/item/weapon/wire
desc = "This is just a simple piece of regular insulated wire."
@@ -304,7 +341,7 @@
icon_state = "std_module"
w_class = 2.0
item_state = "electronic"
- flags = FPRINT|TABLEPASS|CONDUCT
+ flags = CONDUCT
var/mtype = 1 // 1=electronic 2=hardware
/obj/item/weapon/module/card_reader
@@ -385,7 +422,7 @@
w_class = 1
throwforce = 2
var/cigarcount = 6
- flags = ONBELT | TABLEPASS */
+ flags = ONBELT */
/obj/item/weapon/pai_cable
desc = "A flexible coated cable with a universal jack on one end."
@@ -397,6 +434,22 @@
///////////////////////////////////////Stock Parts /////////////////////////////////
+/obj/item/weapon/storage/part_replacer
+ name = "rapid part exchange device"
+ desc = "Special mechanical module made to store, sort, and apply standard machine parts."
+ icon_state = "RPED"
+ item_state = "RPED"
+ w_class = 5
+ can_hold = list("/obj/item/weapon/stock_parts")
+ storage_slots = 50
+ use_to_pickup = 1
+ allow_quick_gather = 1
+ allow_quick_empty = 1
+ collection_mode = 1
+ display_contents_with_number = 1
+ max_w_class = 3
+ max_combined_w_class = 100
+
/obj/item/weapon/stock_parts
name = "stock part"
desc = "What?"
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index c793ecb857..0f19430b31 100755
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -94,6 +94,11 @@ var/list/ghostteleportlocs = list()
return 1
/*-----------------------------------------------------------------------------*/
+
+/////////
+//SPACE//
+/////////
+
/area/space
name = "\improper Space"
icon_state = "space"
@@ -113,8 +118,7 @@ var/list/ghostteleportlocs = list()
/area/space/partyalert()
return
-/area/engine/
- ambience = list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
+
/area/turret_protected/
/area/arrival
@@ -130,9 +134,12 @@ var/list/ghostteleportlocs = list()
-//These are shuttle areas, they must contain two areas in a subgroup if you want to move a shuttle from one
+////////////
+//SHUTTLES//
+////////////
+//shuttle areas must contain at least two areas in a subgroup if you want to move a shuttle from one
//place to another. Look at escape shuttle for example.
-//All shuttles show now be under shuttle since we have smooth-wall code.
+//All shuttles should now be under shuttle since we have smooth-wall code.
/area/shuttle //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
requires_power = 0
@@ -349,6 +356,7 @@ var/list/ghostteleportlocs = list()
name = "\improper Centcom"
icon_state = "centcom"
requires_power = 0
+ unlimited_power = 1
/area/centcom/control
name = "\improper Centcom Control"
@@ -625,12 +633,10 @@ var/list/ghostteleportlocs = list()
/area/prison/cell_block/C
name = "Prison Cell Block C"
icon_state = "brig"
-
-//STATION13
-
-/area/atmos
- name = "Atmospherics"
- icon_state = "atmos"
+
+////////////////////
+//SPACE STATION 13//
+////////////////////
//Maintenance
@@ -996,9 +1002,6 @@ var/list/ghostteleportlocs = list()
-
-
-
/area/holodeck
name = "\improper Holodeck"
icon_state = "Holodeck"
@@ -1025,6 +1028,10 @@ var/list/ghostteleportlocs = list()
/area/holodeck/source_thunderdomecourt
name = "\improper Holodeck - Thunderdome Court"
+/area/holodeck/source_courtroom
+ name = "\improper Holodeck - Courtroom"
+ icon_state = "Holodeck"
+
/area/holodeck/source_beach
name = "\improper Holodeck - Beach"
icon_state = "Holodeck" // Lazy.
@@ -1057,89 +1064,77 @@ var/list/ghostteleportlocs = list()
-
-
-
-
-
-
-
//Engineering
-/area/engine
+/area/engineering/
+ name = "\improper Engineering"
+ icon_state = "engineering"
+ ambience = list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
+
+/area/engineering/atmos
+ name = "\improper Atmospherics"
+ icon_state = "atmos"
- drone_fabrication
- name = "\improper Drone Fabrication"
- icon_state = "engine"
+/area/engineering/atmos/monitoring
+ name = "\improper Atmospherics Monitoring Room"
+ icon_state = "atmos_monitoring"
- engine_smes
- name = "Engineering SMES"
- icon_state = "engine_smes"
-// requires_power = 0//This area only covers the batteries and they deal with their own power
+/area/engineering/atmos/storage
+ name = "\improper Atmospherics Storage"
+ icon_state = "atmos_storage"
+
+/area/engineering/drone_fabrication
+ name = "\improper Drone Fabrication"
+ icon_state = "drone_fab"
- engine_room
- name = "\improper Engine Room"
- icon_state = "engine"
+/area/engineering/engine_smes
+ name = "\improper Engineering SMES"
+ icon_state = "engine_smes"
- engine_airlock
- name = "\improper Engine Room Airlock"
- icon_state = "engine"
+/area/engineering/engine_room
+ name = "\improper Engine Room"
+ icon_state = "engine"
- engine_monitoring
- name = "\improper Engine Monitoring Room"
- icon_state = "engine_monitoring"
+/area/engineering/engine_airlock
+ name = "\improper Engine Room Airlock"
+ icon_state = "engine"
- engine_waste
- name = "\improper Engine Waste Handling"
- icon_state = "engine_waste"
+/area/engineering/engine_monitoring
+ name = "\improper Engine Monitoring Room"
+ icon_state = "engine_monitoring"
- engineering_monitoring
- name = "\improper Engineering Monitoring Room"
- icon_state = "engine_monitoring"
+/area/engineering/engine_waste
+ name = "\improper Engine Waste Handling"
+ icon_state = "engine_waste"
- atmos_monitoring
- name = "\improper Atmospherics Monitoring Room"
- icon_state = "engine_monitoring"
+/area/engineering/engineering_monitoring
+ name = "\improper Engineering Monitoring Room"
+ icon_state = "engine_monitoring"
- engineering
- name = "Engineering"
- icon_state = "engine_smes"
+/area/engineering/foyer
+ name = "\improper Engineering Foyer"
+ icon_state = "engineering_foyer"
- engineering_foyer
- name = "\improper Engineering Foyer"
- icon_state = "engine"
+/area/engineering/storage
+ name = "\improper Engineering Storage"
+ icon_state = "engineering_storage"
- engineering_supply
- name = "Engineering Supply"
- icon_state = "engine_supply"
+/area/engineering/break_room
+ name = "\improper Engineering Break Room"
+ icon_state = "engineering_break"
- break_room
- name = "\improper Engineering Break Room"
- icon_state = "engine"
+/area/engineering/engine_eva
+ name = "\improper Engine EVA"
+ icon_state = "engine_eva"
- hallway
- name = "\improper Engineering Hallway"
- icon_state = "engine_hallway"
+/area/engineering/locker_room
+ name = "\improper Engineering Locker Room"
+ icon_state = "engineering_locker"
+
+/area/engineering/workshop
+ name = "\improper Engineering Workshop"
+ icon_state = "engineering_workshop"
- engine_hallway
- name = "\improper Engine Room Hallway"
- icon_state = "engine_hallway"
-
- engine_eva
- name = "\improper Engine EVA"
- icon_state = "engine_eva"
-
- engine_eva_maintenance
- name = "\improper Engine EVA Maintenance"
- icon_state = "engine_eva"
-
- workshop
- name = "\improper Engineering Workshop"
- icon_state = "engine_storage"
-
- locker_room
- name = "\improper Engineering Locker Room"
- icon_state = "engine_storage"
//Solars
@@ -2123,7 +2118,6 @@ var/list/the_station_areas = list (
/area/shuttle/prison/station,
/area/shuttle/administration/station,
/area/shuttle/specops/station,
- /area/atmos,
/area/maintenance,
/area/hallway,
/area/bridge,
@@ -2133,7 +2127,7 @@ var/list/the_station_areas = list (
/area/library,
/area/chapel,
/area/lawoffice,
- /area/engine,
+ /area/engineering,
/area/solar,
/area/assembly,
/area/teleporter,
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 48408cdf18..609d1a2a6b 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -348,20 +348,19 @@ var/list/mob/living/forced_ambiance_list = new
M.make_floating(1)
/area/proc/thunk(mob)
- if(istype(mob,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to.
- if((istype(mob:shoes, /obj/item/clothing/shoes/magboots) && (mob:shoes.flags & NOSLIP)))
- return
-
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.
return
- if((istype(mob,/mob/living/carbon/human/)) && (mob:m_intent == "run")) // Only clumbsy humans can fall on their asses.
- mob:AdjustStunned(5)
- mob:AdjustWeakened(5)
+ if(istype(mob,/mob/living/carbon/human/))
+ var/mob/living/carbon/human/H = mob
+ if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP))
+ return
- else if (istype(mob,/mob/living/carbon/human/))
- mob:AdjustStunned(2)
- mob:AdjustWeakened(2)
-
- mob << "Gravity!"
+ if(H.m_intent == "run")
+ H.AdjustStunned(2)
+ H.AdjustWeakened(2)
+ else
+ H.AdjustStunned(1)
+ H.AdjustWeakened(1)
+ mob << "The sudden appearance of gravity makes you fall to the floor!"
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index be45d49d97..bd0c9cdb54 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -1,7 +1,7 @@
/atom
layer = 2
var/level = 2
- var/flags = FPRINT
+ var/flags = 0
var/list/fingerprints
var/list/fingerprintshidden
var/fingerprintslast = null
@@ -234,8 +234,6 @@ its easier to just keep the beam vertical.
/atom/proc/add_hiddenprint(mob/living/M as mob)
if(isnull(M)) return
if(isnull(M.key)) return
- if (!( src.flags ) & FPRINT)
- return
if (ishuman(M))
var/mob/living/carbon/human/H = M
if (!istype(H.dna, /datum/dna))
@@ -260,8 +258,6 @@ its easier to just keep the beam vertical.
if(isnull(M)) return
if(isAI(M)) return
if(isnull(M.key)) return
- if (!( src.flags ) & FPRINT)
- return
if (ishuman(M))
//Add the list if it does not exist.
if(!fingerprintshidden)
@@ -386,7 +382,7 @@ its easier to just keep the beam vertical.
//returns 1 if made bloody, returns 0 otherwise
/atom/proc/add_blood(mob/living/carbon/human/M as mob)
- if((flags & NOBLOODY) || !(flags & FPRINT))
+ if(flags & NOBLOODY)
return 0
if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it.
@@ -413,6 +409,7 @@ its easier to just keep the beam vertical.
/atom/proc/clean_blood()
+ src.color = initial(src.color) //paint
src.germ_level = 0
if(istype(blood_DNA, /list))
del(blood_DNA)
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index 322e65202f..53086de252 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -737,7 +737,7 @@
if (bufferOption == "changeLabel")
var/datum/dna2/record/buf = src.buffers[bufferId]
- var/text = sanitize(input(usr, "New Label:", "Edit Label", buf.name) as text|null)
+ var/text = sanitize(copytext(input(usr, "New Label:", "Edit Label", buf.name) as text|null, 1, MAX_NAME_LEN))
buf.name = text
src.buffers[bufferId] = buf
return 1
diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm
index e2c41fcbb4..020f19abc1 100644
--- a/code/game/gamemodes/autotraitor/autotraitor.dm
+++ b/code/game/gamemodes/autotraitor/autotraitor.dm
@@ -134,7 +134,7 @@
newtraitor << "\red No time like the present. \black It's time to take matters into your own hands..."
newtraitor << "You are now a traitor."
newtraitor.mind.special_role = "traitor"
- newtraitor.hud_updateflag |= 1 << SPECIALROLE_HUD
+ BITSET(newtraitor.hud_updateflag, SPECIALROLE_HUD)
newtraitor << "You have been selected this round as an antagonist!"
show_objectives(newtraitor.mind)
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index 5dcc891fa9..8d15141df1 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -679,11 +679,16 @@ var/list/datum/dna/hivemind_bank = list()
//////////
/mob/proc/sting_can_reach(mob/M as mob, sting_range = 1)
- if(M.loc == src.loc) return 1 //target and source are in the same thing
- if(!isturf(src.loc) || !isturf(M.loc)) return 0 //One is inside, the other is outside something.
- if(AStar(src.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, sting_range)) //If a path exists, good!
- return 1
- return 0
+ if(M.loc == src.loc)
+ return 1 //target and source are in the same thing
+ if(!isturf(src.loc) || !isturf(M.loc))
+ src << "We cannot reach \the [M] with a sting!"
+ return 0 //One is inside, the other is outside something.
+ // Maximum queued turfs set to 25; I don't *think* anything raises sting_range above 2, but if it does the 25 may need raising
+ if(!AStar(src.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, max_nodes=25, max_node_depth=sting_range)) //If we can't find a path, fail
+ src << "We cannot find a path to sting \the [M] by!"
+ return 0
+ return 1
//Handles the general sting code to reduce on copypasta (seeming as somebody decided to make SO MANY dumb abilities)
/mob/proc/changeling_sting(var/required_chems=0, var/verb_path)
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index f6aa21e14d..51f77c2cc0 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -3,7 +3,6 @@
desc = "An arcane weapon wielded by the followers of Nar-Sie"
icon_state = "cultblade"
item_state = "cultblade"
- flags = FPRINT | TABLEPASS
w_class = 4
force = 30
throwforce = 10
@@ -34,7 +33,7 @@
icon_state = "culthood"
desc = "A hood worn by the followers of Nar-Sie."
flags_inv = HIDEFACE
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES
+ flags = HEADCOVERSEYES
body_parts_covered = HEAD|EYES
armor = list(melee = 30, bullet = 10, laser = 5,energy = 5, bomb = 0, bio = 0, rad = 0)
cold_protection = HEAD
@@ -55,7 +54,6 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "cultrobes"
item_state = "cultrobes"
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/book/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
@@ -68,7 +66,7 @@
item_state = "magus"
desc = "A helm worn by the followers of Nar-Sie."
flags_inv = HIDEFACE
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
+ flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
body_parts_covered = HEAD|FACE|EYES
armor = list(melee = 30, bullet = 30, laser = 30,energy = 20, bomb = 0, bio = 0, rad = 0)
siemens_coefficient = 0
@@ -78,7 +76,6 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "magusred"
item_state = "magusred"
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/weapon/book/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index a3829207fe..e3ac71b77c 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -169,7 +169,6 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
throw_speed = 1
throw_range = 5
w_class = 2.0
- flags = FPRINT | TABLEPASS
unique = 1
var/notedat = ""
var/tomedat = ""
diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm
index ba1c2be13c..7ca6678902 100644
--- a/code/game/gamemodes/events/holidays/Christmas.dm
+++ b/code/game/gamemodes/events/holidays/Christmas.dm
@@ -58,7 +58,6 @@
icon_state = "xmashat"
desc = "A crappy paper hat that you are REQUIRED to wear."
flags_inv = 0
- flags = FPRINT|TABLEPASS
body_parts_covered = 0
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm
index c9bce4aca9..6136197a66 100644
--- a/code/game/gamemodes/events/space_ninja.dm
+++ b/code/game/gamemodes/events/space_ninja.dm
@@ -116,7 +116,7 @@ var/ninja_confirmed_selection = 0
var/commando_list[] = list()//Commandos.
//We want the ninja to appear only in certain modes.
-// var/acceptable_modes_list[] = list("traitor","revolution","cult","wizard","changeling","traitorchan","nuclear","malfunction","monkey") // Commented out for both testing and ninjas
+// var/acceptable_modes_list[] = list("traitor","revolution","cult","wizard","changeling","traitorchan","mercenary","malfunction","monkey") // Commented out for both testing and ninjas
// if(!(current_mode.config_tag in acceptable_modes_list))
// return
@@ -472,7 +472,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
var/mission
while(!mission)
- mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
+ mission = sanitize(copytext(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
if(!mission)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index e90b65a333..3f0f8cdd64 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -33,47 +33,58 @@
var/uplink_uses = 10
var/list/datum/uplink_item/uplink_items = list(
"Highly Visible and Dangerous Weapons" = list(
- new/datum/uplink_item(/obj/item/weapon/gun/projectile, 6, "Revolver", "RE"),
+ new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "Ammo-9mm", "R9"),
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, "Ammo-357", "RA"),
- new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
+ new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
new/datum/uplink_item(/obj/item/weapon/melee/energy/sword, 4, "Energy Sword", "ES"),
+ new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
+ new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/g9mm, 5, "Silenced 9mm", "S9"),
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
- new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
- new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM")
+ new/datum/uplink_item(/obj/item/weapon/gun/projectile, 6, "Revolver", "RE"),
+ new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU")
),
"Stealthy and Inconspicuous Weapons" = list(
- new/datum/uplink_item(/obj/item/weapon/pen/paralysis, 3, "Paralysis Pen", "PP"),
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
- new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC")
+ new/datum/uplink_item(/obj/item/weapon/cane/concealed, 2, "Concealed Cane Sword", "CC"),
+ new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC"),
+ new/datum/uplink_item(/obj/item/weapon/pen/paralysis, 3, "Paralysis Pen", "PP"),
+ new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH")
),
"Stealth and Camouflage Items" = list(
- new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/chameleon, 3, "Chameleon Kit", "CB"),
- new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Shoes", "SH"),
new/datum/uplink_item(/obj/item/weapon/card/id/syndicate, 2, "Agent ID card", "AC"),
+ new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Shoes", "SH"),
+ new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/spy, 2, "Bug Kit", "SK"),
+ new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/chameleon, 3, "Chameleon Kit", "CB"),
+ new/datum/uplink_item(/obj/item/device/chameleon, 4, "Chameleon-Projector", "CP"),
new/datum/uplink_item(/obj/item/clothing/mask/gas/voice, 4, "Voice Changer", "VC"),
- new/datum/uplink_item(/obj/item/device/chameleon, 4, "Chameleon-Projector", "CP")
+ new/datum/uplink_item(/obj/item/weapon/disk/file/cameras/syndicate, 6, "Camera Network Access - Floppy", "SF")
),
"Devices and Tools" = list(
- new/datum/uplink_item(/obj/item/weapon/card/emag, 3, "Cryptographic Sequencer", "EC"),
new/datum/uplink_item(/obj/item/weapon/storage/toolbox/syndicate, 1, "Fully Loaded Toolbox", "ST"),
+ new/datum/uplink_item(/obj/item/weapon/plastique, 2, "C-4 (Destroys walls)", "C4"),
+ new/datum/uplink_item(/obj/item/device/encryptionkey/binary, 3, "Binary Translator Key", "BT"),
+ new/datum/uplink_item(/obj/item/weapon/card/emag, 3, "Cryptographic Sequencer", "EC"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/clerical, 3, "Morphic Clerical Kit", "CK"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/space, 3, "Space Suit", "SS"),
new/datum/uplink_item(/obj/item/clothing/glasses/thermal/syndi, 3, "Thermal Imaging Glasses", "TM"),
- new/datum/uplink_item(/obj/item/device/encryptionkey/binary, 3, "Binary Translator Key", "BT"),
new/datum/uplink_item(/obj/item/weapon/aiModule/syndicate, 7, "Hacked AI Upload Module", "AI"),
- new/datum/uplink_item(/obj/item/weapon/plastique, 2, "C-4 (Destroys walls)", "C4"),
new/datum/uplink_item(/obj/item/device/powersink, 5, "Powersink (DANGER!)", "PS",),
new/datum/uplink_item(/obj/item/device/radio/beacon/syndicate, 7, "Singularity Beacon (DANGER!)", "SB"),
new/datum/uplink_item(/obj/item/weapon/circuitboard/teleporter, 20, "Teleporter Circuit Board", "TP")
),
"Implants" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_freedom, 3, "Freedom Implant", "FI"),
- new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_uplink, 10, "Uplink Implant (Contains 5 Telecrystals)", "UI"),
+ new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_compress, 4, "Compressed Matter Implant", "CI"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_explosive, 6, "Explosive Implant (DANGER!)", "EI"),
- new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_compress, 4, "Compressed Matter Implant", "CI")
+ new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_uplink, 10, "Uplink Implant (Contains 5 Telecrystals)", "UI")
),
+ "Health Aids" = list(
+ new/datum/uplink_item(/obj/item/weapon/storage/box/donkpockets, 1, "Box of Donk-Pockets", "DP"),
+ new/datum/uplink_item(/obj/item/weapon/storage/firstaid/combat, 5, "Combat medical kit", "CM")
+ ),
"(Pointless) Badassery" = list(
- new/datum/uplink_item(/obj/item/toy/syndicateballoon, 10, "For showing that You Are The BOSS (Useless Balloon)", "BS")
+ new/datum/uplink_item(/obj/item/toy/syndicateballoon, 10, "For showing that You Are The BOSS (Useless Balloon)", "BS"),
+ new/datum/uplink_item(/obj/item/toy/nanotrasenballoon, 10, "For showing that you love NT SOO much (Useless Balloon)", "NT")
)
)
@@ -151,8 +162,6 @@
var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
- var/pltext = "Player list:"
-
for(var/mob/M in player_list)
if(M.client)
clients++
@@ -187,7 +196,6 @@
text += " ([escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]) and [ghosts] ghosts.
"
else
text += "There were no survivors ([ghosts] ghosts)."
- text += "
" + pltext //print player list after the general info
world << text
if(clients > 0)
@@ -553,7 +561,7 @@ proc/get_nt_opposed()
var/list/refined_log = new()
for(var/datum/uplink_item/UI in H.purchase_log)
var/obj/I = new UI.path
- refined_log.Add("[H.purchase_log[UI]]x\icon[I][I.name]")
+ refined_log.Add("[H.purchase_log[UI]]x\icon[I][UI.name]")
del(I)
purchases = english_list(refined_log, nothing_text = "")
if(uplink_true)
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index fce27f393c..1edb533daa 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -85,6 +85,9 @@
density = 1
anchored = 1.0
var/hits = 1
+ var/detonation_chance = 15
+ var/power = 4
+ var/power_step = 1
var/dest
pass_flags = PASSTABLE
@@ -92,6 +95,7 @@
name = "small meteor"
icon_state = "smallf"
pass_flags = PASSTABLE | PASSGRILLE
+ power = 2
/obj/effect/meteor/Bump(atom/A)
spawn(0)
@@ -105,8 +109,8 @@
//Changing emitter and generator ex_act would result in them being bomb and C4 proof.
if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator) && \
- prob(15))
- explosion(src.loc, 4, 5, 6, 7, 0)
+ prob(detonation_chance))
+ explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
del(src)
return
@@ -120,6 +124,7 @@
/obj/effect/meteor/big
name = "big meteor"
hits = 5
+ power = 1
ex_act(severity)
return
@@ -143,8 +148,8 @@
explosion(src.loc, 0, 1, 2, 3, 0)
if (--src.hits <= 0)
- if(prob(15) && !istype(A, /obj/structure/grille))
- explosion(src.loc, 1, 2, 3, 4, 0)
+ if(prob(detonation_chance) && !istype(A, /obj/structure/grille))
+ explosion(loc, power, power + power_step, power + power_step * 2, power + power_step * 3, 0)
del(src)
return
diff --git a/code/game/gamemodes/mutiny/emergency_authentication_device.dm b/code/game/gamemodes/mutiny/emergency_authentication_device.dm
index bedd67e64c..028c4113cc 100644
--- a/code/game/gamemodes/mutiny/emergency_authentication_device.dm
+++ b/code/game/gamemodes/mutiny/emergency_authentication_device.dm
@@ -11,7 +11,6 @@
var/secondary_key
var/activated = 0
- flags = FPRINT
use_power = 0
New(loc, mode)
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index 8fd46fc897..b2e54da0d9 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -11,7 +11,7 @@ var/global/list/turf/synd_spawn = list()
/datum/game_mode/nuclear
name = "mercenary"
- config_tag = "nuclear"
+ config_tag = "mercenary"
required_players = 15
required_players_secret = 25 // 25 players - 5 players to be the nuke ops = 20 players remaining
required_enemies = 1
@@ -175,7 +175,7 @@ var/global/list/turf/synd_spawn = list()
var/obj/item/weapon/paper/P = new
P.info = "The nuclear authorization code is: [nuke_code]"
P.name = "nuclear bomb code"
- if (ticker.mode.config_tag=="nuclear")
+ if (ticker.mode.config_tag=="mercenary")
P.loc = code_spawn.loc
else
var/mob/living/carbon/human/H = synd_mind.current
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index ef78dd4286..e73fbf6880 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -23,7 +23,6 @@ var/bomb_set
var/timing_wire
var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open,
// 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
- flags = FPRINT
use_power = 0
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index 50ae7b9fc1..d26f1a0789 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -2,7 +2,7 @@
name = "pinpointer"
icon = 'icons/obj/device.dmi'
icon_state = "pinoff"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0
item_state = "electronic"
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 452fd347d8..534383867e 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -537,7 +537,7 @@ datum/objective/steal
var/tmp_obj = new custom_target
var/custom_name = tmp_obj:name
del(tmp_obj)
- custom_name = copytext(sanitize(input("Enter target name:", "Objective target", custom_name) as text|null),1,MAX_MESSAGE_LEN)
+ custom_name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_MESSAGE_LEN))
if (!custom_name) return
target_name = custom_name
steal_target = custom_target
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index 051c112bbb..71e9704606 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -205,7 +205,7 @@
if(rev_mind in revolutionaries)
revolutionaries -= rev_mind
rev_mind.special_role = null
- rev_mind.current.hud_updateflag |= 1 << SPECIALROLE_HUD
+ BITSET(rev_mind.current.hud_updateflag, SPECIALROLE_HUD)
if(beingborged)
rev_mind.current << "\red The frame's firmware detects and deletes your neural reprogramming! You remember nothing from the moment you were flashed until now."
diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm
index 2b9cc12e28..5899f04837 100644
--- a/code/game/gamemodes/revolution/rp_revolution.dm
+++ b/code/game/gamemodes/revolution/rp_revolution.dm
@@ -109,7 +109,7 @@
rev_mind.special_role = "Revolutionary"
show_objectives(rev_mind)
update_rev_icons_added(rev_mind)
- H.hud_updateflag |= 1 << SPECIALROLE_HUD
+ BITSET(H.hud_updateflag, SPECIALROLE_HUD)
return 1
/////////////////////////////
diff --git a/code/game/gamemodes/wizard/artifact.dm b/code/game/gamemodes/wizard/artifact.dm
index 0ce1f94d12..15ac80ced4 100644
--- a/code/game/gamemodes/wizard/artifact.dm
+++ b/code/game/gamemodes/wizard/artifact.dm
@@ -6,7 +6,6 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "render"
item_state = "render"
- flags = FPRINT | TABLEPASS
force = 15
throwforce = 10
w_class = 3
diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm
index 12360194d1..678ce72582 100644
--- a/code/game/gamemodes/wizard/soulstone.dm
+++ b/code/game/gamemodes/wizard/soulstone.dm
@@ -5,7 +5,6 @@
item_state = "electronic"
desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power."
w_class = 1.0
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
origin_tech = "bluespace=4;materials=4"
var/imprinted = "empty"
@@ -88,7 +87,6 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "construct"
desc = "A wicked machine used by those skilled in magical arts. It is inactive"
- flags = FPRINT | TABLEPASS
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/device/soulstone))
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index d490e75dc6..716045a721 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -6,7 +6,6 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
- flags = FPRINT | TABLEPASS
var/uses = 5
var/temp = null
var/max_uses = 5
diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm
index b79fe4ba30..ab3806a97c 100644
--- a/code/game/gamemodes/wizard/wizard.dm
+++ b/code/game/gamemodes/wizard/wizard.dm
@@ -120,7 +120,7 @@
var/wizard_name_second = pick(wizard_second)
var/randomname = "[wizard_name_first] [wizard_name_second]"
spawn(0)
- var/newname = copytext(sanitize(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN)
+ var/newname = sanitize(copytext(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text,1,MAX_NAME_LEN))
if (!newname)
newname = randomname
diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm
index 270a4e3867..3211803412 100644
--- a/code/game/jobs/job/assistant.dm
+++ b/code/game/jobs/job/assistant.dm
@@ -9,7 +9,7 @@
selection_color = "#dddddd"
access = list() //See /datum/job/assistant/get_access()
minimal_access = list() //See /datum/job/assistant/get_access()
- alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Security Cadet")
+ alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Security Cadet","Visitor")
/datum/job/assistant/equip(var/mob/living/carbon/human/H)
if(!H) return 0
diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm
index a43056fa96..06513c05f9 100644
--- a/code/game/jobs/job/captain.dm
+++ b/code/game/jobs/job/captain.dm
@@ -24,7 +24,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
if(H.age>49)
- U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
+ U.accessories += new /obj/item/clothing/accessory/medal/gold/captain(U)
H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm
index 34fe340a12..e7ce82b595 100644
--- a/code/game/jobs/job/civilian_chaplain.dm
+++ b/code/game/jobs/job/civilian_chaplain.dm
@@ -27,7 +27,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
spawn(0)
var/religion_name = "Christianity"
- var/new_religion = copytext(sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN)
+ var/new_religion = sanitize(copytext(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name),1,MAX_NAME_LEN))
if (!new_religion)
new_religion = religion_name
@@ -62,7 +62,7 @@
spawn(1)
var/deity_name = "Space Jesus"
- var/new_deity = copytext(sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name)),1,MAX_NAME_LEN)
+ var/new_deity = sanitize(copytext(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name),1,MAX_NAME_LEN))
if ((length(new_deity) == 0) || (new_deity == "Space Jesus") )
new_deity = deity_name
diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm
index 0c44f6f260..c0d9bd44b3 100644
--- a/code/game/jobs/job/job.dm
+++ b/code/game/jobs/job/job.dm
@@ -110,3 +110,6 @@
if(H.r_store)
H.r_store.add_fingerprint(H,1)
return 1
+
+/datum/job/proc/is_position_available()
+ return (current_positions < total_positions) || (total_positions == -1)
diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm
index a63363f779..1370291152 100644
--- a/code/game/jobs/job/medical.dm
+++ b/code/game/jobs/job/medical.dm
@@ -196,3 +196,44 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
+
+
+/datum/job/Paramedic
+ title = "Paramedic"
+ flag = PARAMEDIC
+ department_flag = MEDSCI
+ faction = "Station"
+ total_positions = 2
+ spawn_positions = 2
+ supervisors = "the chief medical officer"
+ selection_color = "#ffeef0"
+ access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist)
+ minimal_access = list(access_medical, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks)
+ alt_titles = list("Emergency Medical Technician")
+
+ equip(var/mob/living/carbon/human/H)
+ if(!H) return 0
+ H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
+ switch(H.backbag)
+ if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
+ if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
+ if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
+ if (H.mind.role_alt_title)
+ switch(H.mind.role_alt_title)
+ if("Emergency Medical Technician")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/fluff/short(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
+ if("Paramedic")
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
+ else
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store)
+ if(H.backbag == 1)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
+ else
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
+ return 1
diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm
index 07ceefb8b3..11d8f70a12 100644
--- a/code/game/jobs/job/silicon.dm
+++ b/code/game/jobs/job/silicon.dm
@@ -3,7 +3,7 @@
flag = AI
department_flag = ENGSEC
faction = "Station"
- total_positions = 0
+ total_positions = 0 // Not used for AI, see is_position_available below and modules/mob/living/silicon/ai/latejoin.dm
spawn_positions = 1
selection_color = "#ccffcc"
supervisors = "your laws"
@@ -14,6 +14,8 @@
if(!H) return 0
return 1
+/datum/job/ai/is_position_available()
+ return (empty_playable_ai_cores.len != 0)
/datum/job/cyborg
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index b3918713e7..f1ae2e3420 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -463,7 +463,9 @@ var/global/datum/controller/occupations/job_master
switch(rank)
if("Cyborg")
return H.Robotize()
- if("AI","Clown") //don't need bag preference stuff!
+ if("AI")
+ return H
+ if("Clown") //don't need bag preference stuff!
else
switch(H.backbag) //BS12 EDIT
if(1)
@@ -538,9 +540,9 @@ var/global/datum/controller/occupations/job_master
G.prescription = 1
// H.update_icons()
- H.hud_updateflag |= (1 << ID_HUD)
- H.hud_updateflag |= (1 << IMPLOYAL_HUD)
- H.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ BITSET(H.hud_updateflag, ID_HUD)
+ BITSET(H.hud_updateflag, IMPLOYAL_HUD)
+ BITSET(H.hud_updateflag, SPECIALROLE_HUD)
return H
@@ -648,4 +650,4 @@ var/global/datum/controller/occupations/job_master
else level4++ //not selected
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-"
- feedback_add_details("job_preferences",tmp_str)
\ No newline at end of file
+ feedback_add_details("job_preferences",tmp_str)
diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm
index a90f3ad716..e1c42254a6 100644
--- a/code/game/jobs/jobs.dm
+++ b/code/game/jobs/jobs.dm
@@ -25,6 +25,7 @@ var/const/VIROLOGIST =(1<<6)
var/const/PSYCHIATRIST =(1<<7)
var/const/ROBOTICIST =(1<<8)
var/const/XENOBIOLOGIST =(1<<9)
+var/const/PARAMEDIC =(1<<10)
var/const/CIVILIAN =(1<<2)
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index 3819c2d9d5..2ffdcc6e2f 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -696,6 +696,10 @@ siphoning
if(data["scrubbing"])
sensor_data += {"
Filtering:
+Oxygen
+[data["filter_o2"]?"on":"off"];
+Nitrogen
+[data["filter_n2"]?"on":"off"];
Carbon Dioxide
[data["filter_co2"]?"on":"off"];
Toxins
@@ -817,6 +821,8 @@ table tr:first-child th:first-child { border: none;}
"adjust_external_pressure",
"set_external_pressure",
"checks",
+ "o2_scrub",
+ "n2_scrub",
"co2_scrub",
"tox_scrub",
"n2o_scrub",
@@ -915,8 +921,13 @@ table tr:first-child th:first-child { border: none;}
update_icon()
return
- if (wiresexposed && ((istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters))))
- return attack_hand(user)
+ if (wiresexposed && istype(W, /obj/item/weapon/wirecutters))
+ user.visible_message("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].")
+ playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
+ new/obj/item/stack/cable_coil(get_turf(src), 5)
+ buildstage = 1
+ update_icon()
+ return
if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
if(stat & (NOPOWER|BROKEN))
@@ -1005,7 +1016,7 @@ Code shamelessly copied from apc_frame
desc = "Used for building Air Alarms"
icon = 'icons/obj/monitors.dmi'
icon_state = "alarm_bitem"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
@@ -1303,7 +1314,7 @@ FIRE ALARM
/obj/machinery/firealarm/proc/delayed_reset()
var/area/A = get_area(src)
if (!A) return
-
+
src = null
spawn(600)
A.firereset()
@@ -1340,7 +1351,7 @@ Code shamelessly copied from apc_frame
desc = "Used for building Fire Alarms"
icon = 'icons/obj/monitors.dmi'
icon_state = "fire_bitem"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 3e91d70f6c..12ad5d1c3b 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -4,7 +4,7 @@
icon_state = "yellow"
density = 1
var/health = 100.0
- flags = FPRINT | CONDUCT
+ flags = CONDUCT
var/valve_open = 0
var/release_pressure = ONE_ATMOSPHERE
@@ -40,6 +40,9 @@
canister_color = "blue"
can_label = 0
+/obj/machinery/portable_atmospherics/canister/oxygen/prechilled
+ name = "Canister: \[O2 (Cryo)\]"
+
/obj/machinery/portable_atmospherics/canister/phoron
name = "Canister \[Phoron\]"
icon_state = "orange"
@@ -221,6 +224,9 @@ update_flag
return
/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
+ return
+
if(Proj.damage)
src.health -= round(Proj.damage / 2)
healthcheck()
@@ -371,6 +377,14 @@ update_flag
src.update_icon()
return 1
+/obj/machinery/portable_atmospherics/canister/oxygen/prechilled/New()
+ ..()
+
+ src.air_contents.adjust_gas("oxygen", MolesForPressure())
+ src.air_contents.temperature = 80
+ src.update_icon()
+ return 1
+
/obj/machinery/portable_atmospherics/canister/sleeping_agent/New()
..()
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 53b95c712c..5361bea23a 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -13,22 +13,44 @@
var/list/storage_capacity = list("metal" = 0, "glass" = 0)
var/show_category = "All"
- var/panel_open = 0
var/hacked = 0
var/disabled = 0
var/shocked = 0
var/busy = 0
+ var/mat_efficiency = 1
+ var/build_time = 50
+
var/datum/wires/autolathe/wires = null
+/obj/machinery/autolathe/New()
+
+ ..()
+ wires = new(src)
+ //Create parts for lathe.
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
+ component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
+ RefreshParts()
+
+/obj/machinery/autolathe/proc/update_recipe_list()
+ if(!machine_recipes)
+ machine_recipes = autolathe_recipes
+
/obj/machinery/autolathe/interact(mob/user as mob)
+ update_recipe_list()
+
if(..() || (disabled && !panel_open))
- user << "\red \The [src] is disabled!"
+ user << "\The [src] is disabled!"
return
- if (shocked)
- shock(user,50)
+ if(shocked)
+ shock(user, 50)
var/dat = "Autolathe Control Panel
"
@@ -59,16 +81,16 @@
else
//Make sure it's buildable and list requires resources.
for(var/material in R.resources)
- var/sheets = round(stored_material[material]/R.resources[material])
+ var/sheets = round(stored_material[material]/round(R.resources[material]*mat_efficiency))
if(isnull(max_sheets) || max_sheets > sheets)
max_sheets = sheets
- if(!isnull(stored_material[material]) && stored_material[material] < R.resources[material])
+ if(!isnull(stored_material[material]) && stored_material[material] < round(R.resources[material]*mat_efficiency))
can_make = 0
if(!comma)
comma = 1
else
material_string += ", "
- material_string += "[R.resources[material]] [material]"
+ material_string += "[round(R.resources[material] * mat_efficiency)] [material]"
material_string += ".
"
//Build list of multipliers for sheets.
if(R.is_stack)
@@ -93,31 +115,27 @@
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
- if (stat)
+ if(busy)
+ user << "\The [src] is busy. Please wait for completion of previous operation."
return
- if (busy)
- user << "\red \The [src] is busy. Please wait for completion of previous operation."
- return
-
- if(istype(O, /obj/item/weapon/screwdriver))
- panel_open = !panel_open
- icon_state = (panel_open ? "autolathe_t": "autolathe")
- user << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]."
+ if(default_deconstruction_screwdriver(user, O))
updateUsrDialog()
return
+ if(default_deconstruction_crowbar(user, O))
+ return
+ if(default_part_replacement(user, O))
+ return
- if (panel_open)
+ if(stat)
+ return
+
+ if(panel_open)
//Don't eat multitools or wirecutters used on an open lathe.
if(istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
attack_hand(user)
return
- //Dismantle the frame.
- if(istype(O, /obj/item/weapon/crowbar))
- dismantle()
- return
-
if(O.loc != user && !(istype(O,/obj/item/stack)))
return 0
@@ -157,18 +175,18 @@
mass_per_sheet += eating.matter[material]
if(!filltype)
- user << "\red \The [src] is full. Please remove material from the autolathe in order to insert more."
+ user << "\The [src] is full. Please remove material from the autolathe in order to insert more."
return
else if(filltype == 1)
user << "You fill \the [src] to capacity with \the [eating]."
else
user << "You fill \the [src] with \the [eating]."
- flick("autolathe_o",src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
+ flick("autolathe_o", src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
if(istype(eating,/obj/item/stack))
var/obj/item/stack/stack = eating
- stack.use(max(1,round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
+ stack.use(max(1, round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
else
user.drop_item(O)
del(O)
@@ -189,7 +207,7 @@
add_fingerprint(usr)
if(busy)
- usr << "\red The autolathe is busy. Please wait for completion of previous operation."
+ usr << "The autolathe is busy. Please wait for completion of previous operation."
return
if(href_list["change_category"])
@@ -221,18 +239,18 @@
//Check if we still have the materials.
for(var/material in making.resources)
if(!isnull(stored_material[material]))
- if(stored_material[material] < (making.resources[material]*multiplier))
+ if(stored_material[material] < round(making.resources[material] * mat_efficiency) * multiplier)
return
//Consume materials.
for(var/material in making.resources)
if(!isnull(stored_material[material]))
- stored_material[material] = max(0,stored_material[material]-(making.resources[material]*multiplier))
+ stored_material[material] = max(0, stored_material[material] - round(making.resources[material] * mat_efficiency) * multiplier)
//Fancy autolathe animation.
- flick("autolathe_n",src)
+ flick("autolathe_n", src)
- sleep(50)
+ sleep(build_time)
busy = 0
@@ -241,44 +259,31 @@
//Create the desired item.
var/obj/item/I = new making.path(get_step(loc, get_dir(src,usr)))
- if(multiplier>1 && istype(I,/obj/item/stack))
+ if(multiplier > 1 && istype(I, /obj/item/stack))
var/obj/item/stack/S = I
S.amount = multiplier
updateUsrDialog()
-
-/obj/machinery/autolathe/New()
-
- ..()
- wires = new(src)
- //Create parts for lathe.
- component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
- component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
- component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
- component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
- component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
- component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
- RefreshParts()
-
-
-/obj/machinery/autolathe/initialize()
- ..()
- machine_recipes = autolathe_recipes
+/obj/machinery/autolathe/update_icon()
+ icon_state = (panel_open ? "autolathe_t" : "autolathe")
//Updates overall lathe storage size.
/obj/machinery/autolathe/RefreshParts()
..()
- var/tot_rating = 0
+ var/mb_rating = 0
+ var/man_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
- tot_rating += MB.rating
+ mb_rating += MB.rating
+ for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
+ man_rating += M.rating
- storage_capacity["metal"] = tot_rating * 25000
- storage_capacity["glass"] = tot_rating * 12500
+ storage_capacity["metal"] = mb_rating * 25000
+ storage_capacity["glass"] = mb_rating * 12500
+ build_time = 50 / man_rating
+ mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3
/obj/machinery/autolathe/dismantle()
- ..()
var/list/sheets = list("metal" = /obj/item/stack/sheet/metal, "glass" = /obj/item/stack/sheet/glass)
for(var/mat in stored_material)
@@ -287,3 +292,4 @@
if(stored_material[mat] > S.perunit)
S.amount = round(stored_material[mat] / S.perunit)
S.loc = loc
+ ..()
diff --git a/code/game/machinery/autolathe_datums.dm b/code/game/machinery/autolathe_datums.dm
index 996daa2d10..f13c3dc634 100644
--- a/code/game/machinery/autolathe_datums.dm
+++ b/code/game/machinery/autolathe_datums.dm
@@ -15,7 +15,7 @@
if(I.matter && !recipe.resources) //This can be overidden in the datums.
recipe.resources = list()
for(var/material in I.matter)
- recipe.resources[material] = round(I.matter[material]*1.25) // More expensive to produce than they are to recycle.
+ recipe.resources[material] = I.matter[material]*1.25 // More expensive to produce than they are to recycle.
del(I)
/datum/autolathe/recipe
@@ -202,7 +202,7 @@
category = "Medical"
/datum/autolathe/recipe/shotgun_blanks
- name = "ammunition (shotgun, blanks)"
+ name = "ammunition (shotgun, blank)"
path = /obj/item/ammo_casing/shotgun/blank
category = "Arms and Ammunition"
@@ -211,11 +211,21 @@
path = /obj/item/ammo_casing/shotgun/beanbag
category = "Arms and Ammunition"
+/datum/autolathe/recipe/shotgun_flash
+ name = "ammunition (shotgun, flash)"
+ path = /obj/item/ammo_casing/shotgun/flash
+ category = "Arms and Ammunition"
+
/datum/autolathe/recipe/magazine_rubber
name = "ammunition (rubber)"
path = /obj/item/ammo_magazine/c45r
category = "Arms and Ammunition"
+/datum/autolathe/recipe/magazine_flash
+ name = "ammunition (flash)"
+ path = /obj/item/ammo_magazine/c45f
+ category = "Arms and Ammunition"
+
/datum/autolathe/recipe/consolescreen
name = "console screen"
path = /obj/item/weapon/stock_parts/console_screen
@@ -285,14 +295,14 @@
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun
- name = "ammunition (shell, shotgun)"
+ name = "ammunition (slug, shotgun)"
path = /obj/item/ammo_casing/shotgun
hidden = 1
category = "Arms and Ammunition"
-/datum/autolathe/recipe/shotgun_dart
- name = "ammunition (dart, shotgun)"
- path = /obj/item/ammo_casing/shotgun/dart
+/datum/autolathe/recipe/shotgun_pellet
+ name = "ammunition (shell, shotgun)"
+ path = /obj/item/ammo_casing/shotgun/pellet
hidden = 1
category = "Arms and Ammunition"
diff --git a/code/game/machinery/bees_items.dm b/code/game/machinery/bees_items.dm
index e02a0a1a23..486b46d33c 100644
--- a/code/game/machinery/bees_items.dm
+++ b/code/game/machinery/bees_items.dm
@@ -65,7 +65,6 @@
name = "bottle of BeezEez"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle17"
- flags = FPRINT | TABLEPASS
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm
index c4007c6994..f87ae33ee0 100644
--- a/code/game/machinery/bots/bots.dm
+++ b/code/game/machinery/bots/bots.dm
@@ -81,6 +81,8 @@
..()
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
+ return
health -= Proj.damage
..()
healthcheck()
diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm
index b913119a57..30f6dfaa8c 100644
--- a/code/game/machinery/bots/cleanbot.dm
+++ b/code/game/machinery/bots/cleanbot.dm
@@ -9,7 +9,6 @@
throw_speed = 2
throw_range = 5
w_class = 3.0
- flags = TABLEPASS
var/created_name = "Cleanbot"
diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm
index 1c0bd0875f..4db416e7a6 100644
--- a/code/game/machinery/bots/farmbot.dm
+++ b/code/game/machinery/bots/farmbot.dm
@@ -583,7 +583,7 @@
else if(istype(W, /obj/item/weapon/pen))
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
- t = copytext(sanitize(t), 1, MAX_NAME_LEN)
+ t = sanitize(copytext(t, 1, MAX_NAME_LEN))
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
diff --git a/code/game/machinery/bots/floorbot.dm b/code/game/machinery/bots/floorbot.dm
index 0164199daa..54c8390234 100644
--- a/code/game/machinery/bots/floorbot.dm
+++ b/code/game/machinery/bots/floorbot.dm
@@ -9,7 +9,6 @@
throw_speed = 2
throw_range = 5
w_class = 3.0
- flags = TABLEPASS
var/created_name = "Floorbot"
/obj/item/weapon/toolbox_tiles_sensor
@@ -22,7 +21,6 @@
throw_speed = 2
throw_range = 5
w_class = 3.0
- flags = TABLEPASS
var/created_name = "Floorbot"
//Floorbot
diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm
index 6d3842f879..65a40289d0 100644
--- a/code/game/machinery/bots/medbot.dm
+++ b/code/game/machinery/bots/medbot.dm
@@ -281,9 +281,6 @@
src.speak(message)
src.visible_message("[src] points at [C.name]!")
src.last_newpatient_speak = world.time
- if(declare_treatment)
- var/area/location = get_area(src)
- broadcast_medical_hud_message("[src.name] is treating [C] in [location]", src)
break
else
continue
@@ -438,6 +435,10 @@
src.patient.reagents.add_reagent(reagent_id,src.injection_amount)
visible_message("\red [src] injects [src.patient] with the syringe!")
+ if(declare_treatment)
+ var/area/location = get_area(src)
+ broadcast_medical_hud_message("[src.name] is treating [C] in [location]", src)
+
src.icon_state = "medibot[src.on]"
src.currently_healing = 0
return
diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm
index e7f766a5b4..ea40628648 100644
--- a/code/game/machinery/bots/mulebot.dm
+++ b/code/game/machinery/bots/mulebot.dm
@@ -134,11 +134,11 @@
unload(0)
switch(severity)
if(2)
- wires &= ~(1 << rand(0,9))
- wires &= ~(1 << rand(0,9))
- wires &= ~(1 << rand(0,9))
+ BITRESET(wires, rand(0,9))
+ BITRESET(wires, rand(0,9))
+ BITRESET(wires, rand(0,9))
if(3)
- wires &= ~(1 << rand(0,9))
+ BITRESET(wires, rand(0,9))
..()
return
@@ -309,7 +309,7 @@
if("setid")
refresh=0
- var/new_id = copytext(sanitize(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null),1,MAX_NAME_LEN)
+ var/new_id = sanitize(copytext(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null,1,MAX_NAME_LEN))
refresh=1
if(new_id)
suffix = new_id
diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm
index 67775ddd7d..ad72835fae 100644
--- a/code/game/machinery/buttons.dm
+++ b/code/game/machinery/buttons.dm
@@ -1,8 +1,8 @@
-/obj/machinery/driver_button
- name = "mass driver button"
+/obj/machinery/button
+ name = "button"
icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
- desc = "A remote control switch for a mass driver."
+ desc = "A remote control switch for something."
var/id = null
var/active = 0
anchored = 1.0
@@ -10,38 +10,10 @@
idle_power_usage = 2
active_power_usage = 4
-/obj/machinery/ignition_switch
- name = "ignition switch"
- icon = 'icons/obj/objects.dmi'
- icon_state = "launcherbtt"
- desc = "A remote control switch for a mounted igniter."
- var/id = null
- var/active = 0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
+/obj/machinery/button/attack_ai(mob/user as mob)
+ return src.attack_hand(user)
-/obj/machinery/flasher_button
- name = "flasher button"
- desc = "A remote control switch for a mounted flasher."
- icon = 'icons/obj/objects.dmi'
- icon_state = "launcherbtt"
- var/id = null
- var/active = 0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
-
-/obj/machinery/crema_switch
- desc = "Burn baby burn!"
- name = "crematorium igniter"
- icon = 'icons/obj/power.dmi'
- icon_state = "crema_switch"
- anchored = 1.0
- req_access = list(access_crematorium)
- var/on = 0
- var/area/area = null
- var/otherarea = null
- var/id = 1
\ No newline at end of file
+/obj/machinery/button/attackby(obj/item/weapon/W, mob/user as mob)
+ if(istype(W, /obj/item/device/detective_scanner))
+ return
+ return src.attack_hand(user)
\ No newline at end of file
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 8fe3387467..3b3104201f 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -13,7 +13,6 @@
var/c_tag_order = 999
var/status = 1
anchored = 1.0
- var/panel_open = 0 // 0 = Closed / 1 = Open
var/invuln = null
var/bugged = 0
var/obj/item/weapon/camera_assembly/assembly = null
@@ -36,6 +35,9 @@
wires = new(src)
assembly = new(src)
assembly.state = 4
+
+ invalidateCameraCache()
+
/* // Use this to look for cameras that have the same c_tag.
for(var/obj/machinery/camera/C in cameranet.cameras)
var/list/tempnetwork = C.network&src.network
@@ -54,24 +56,25 @@
/obj/machinery/camera/Del()
if(!alarm_on)
triggerCameraAlarm()
-
+
cancelCameraAlarm()
..()
/obj/machinery/camera/emp_act(severity)
if(!isEmpProof())
if(prob(100/severity))
+ invalidateCameraCache()
stat |= EMPED
SetLuminosity(0)
kick_viewers()
triggerCameraAlarm()
update_icon()
-
+
spawn(900)
stat &= ~EMPED
cancelCameraAlarm()
update_icon()
-
+ invalidateCameraCache()
..()
/obj/machinery/camera/bullet_act(var/obj/item/projectile/P)
@@ -81,11 +84,11 @@
/obj/machinery/camera/ex_act(severity)
if(src.invuln)
return
-
+
//camera dies if an explosion touches it!
if(severity <= 2 || prob(50))
destroy()
-
+
..() //and give it the regular chance of being deleted outright
@@ -118,7 +121,7 @@
destroy()
/obj/machinery/camera/attackby(obj/W as obj, mob/living/user as mob)
-
+ invalidateCameraCache()
// DECONSTRUCTION
if(isscrewdriver(W))
//user << "You start to [panel_open ? "close" : "open"] the camera's panel."
@@ -170,7 +173,7 @@
if (S.current == src)
O << "[U] holds \a [itemname] up to one of the cameras ..."
O << browse(text("[][]", itemname, info), text("window=[]", itemname))
-
+
else if (istype(W, /obj/item/weapon/camera_bug))
if (!src.can_use())
user << "\blue Camera non-functional"
@@ -181,7 +184,7 @@
else
user << "\blue Camera bugged."
src.bugged = 1
-
+
else if(W.damtype == BRUTE || W.damtype == BURN) //bashing cameras
if (W.force >= src.toughness)
visible_message("[src] has been [pick(W.attack_verb)] with [W] by [user]!")
@@ -190,7 +193,7 @@
if (I.hitsound)
playsound(loc, I.hitsound, 50, 1, -1)
take_damage(W.force)
-
+
else
..()
@@ -199,6 +202,7 @@
//legacy support, if choice is != 1 then just kick viewers without changing status
kick_viewers()
else
+ invalidateCameraCache()
set_status( !src.status )
if (!(src.status))
visible_message("\red [user] has deactivated [src]!")
@@ -216,13 +220,14 @@
if (force >= toughness && (force > toughness*4 || prob(25)))
destroy()
-//Used when someone breaks a camera
+//Used when someone breaks a camera
/obj/machinery/camera/proc/destroy()
+ invalidateCameraCache()
stat |= BROKEN
kick_viewers()
triggerCameraAlarm()
update_icon()
-
+
//sparks
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, loc)
@@ -232,6 +237,7 @@
/obj/machinery/camera/proc/set_status(var/newstatus)
if (status != newstatus)
status = newstatus
+ invalidateCameraCache()
// now disconnect anyone using the camera
//Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they couldn't use it anyway?
@@ -259,7 +265,7 @@
alarm_on = 1
if(!get_area(src))
return
-
+
for(var/mob/living/silicon/S in mob_list)
S.triggerAlarm("Camera", get_area(src), list(src), src)
@@ -268,7 +274,7 @@
alarm_on = 0
if(!get_area(src))
return
-
+
for(var/mob/living/silicon/S in mob_list)
S.cancelAlarm("Camera", get_area(src), src)
@@ -348,7 +354,7 @@
/obj/machinery/camera/interact(mob/living/user as mob)
if(!panel_open || istype(user, /mob/living/silicon/ai))
return
-
+
if(stat & BROKEN)
user << "\The [src] is broken."
return
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index 4e64b9a660..1b3619b5a4 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -1,29 +1,22 @@
+#define TRACKING_POSSIBLE 0
+#define TRACKING_NO_COVERAGE 1
+#define TRACKING_TERMINATE 2
+
/mob/living/silicon/ai/var/max_locations = 10
/mob/living/silicon/ai/var/stored_locations[0]
-/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf)
- if(!T)
- return 1
- if(T.z == 2)
- return 1
- if(T.z > 6)
- return 1
- return 0
+/proc/InvalidPlayerTurf(turf/T as turf)
+ return !(T && T.z in config.player_levels)
/mob/living/silicon/ai/proc/get_camera_list()
-
if(src.stat == 2)
return
- var/list/L = list()
- for (var/obj/machinery/camera/C in cameranet.cameras)
- L.Add(C)
-
- camera_sort(L)
+ cameranet.process_sort()
var/list/T = list()
T["Cancel"] = "Cancel"
- for (var/obj/machinery/camera/C in L)
+ for (var/obj/machinery/camera/C in cameranet.cameras)
var/list/tempnetwork = C.network&src.network
if (tempnetwork.len)
T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
@@ -54,7 +47,7 @@
set name = "Store Camera Location"
set desc = "Stores your current camera location by the given name"
- loc = copytext(sanitize(loc), 1, MAX_MESSAGE_LEN)
+ loc = sanitize(copytext(loc, 1, MAX_MESSAGE_LEN))
if(!loc)
src << "\red Must supply a location name"
return
@@ -68,7 +61,7 @@
return
var/L = src.eyeobj.getLoc()
- if (InvalidTurf(get_turf(L)))
+ if (InvalidPlayerTurf(get_turf(L)))
src << "\red Unable to store this location"
return
@@ -111,38 +104,14 @@
var/list/cameras = list()
/mob/living/silicon/ai/proc/trackable_mobs()
-
if(usr.stat == 2)
return list()
var/datum/trackable/TB = new()
for(var/mob/living/M in mob_list)
- // Easy checks first.
- // Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this.
- if(InvalidTurf(get_turf(M)))
- continue
if(M == usr)
continue
- if(M.invisibility)//cloaked
- continue
- if(M.digitalcamo)
- continue
-
- // Human check
- var/human = 0
- if(istype(M, /mob/living/carbon/human))
- human = 1
- var/mob/living/carbon/human/H = M
- //Cameras can't track people wearing an agent card or a ninja hood.
- if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
- continue
- if(istype(H.head, /obj/item/clothing/head/helmet/space/rig))
- var/obj/item/clothing/head/helmet/space/rig/helmet = H.head
- if(helmet.prevent_track())
- continue
-
- // Now, are they viewable by a camera? (This is last because it's the most intensive check)
- if(!near_camera(M))
+ if(M.tracking_status() != TRACKING_POSSIBLE)
continue
var/name = M.name
@@ -152,7 +121,7 @@
else
TB.names.Add(name)
TB.namecounts[name] = 1
- if(human)
+ if(istype(M, /mob/living/carbon/human))
TB.humans[name] = M
else
TB.others[name] = M
@@ -181,6 +150,7 @@
return
src << "Follow camera mode [forced ? "terminated" : "ended"]."
+ cameraFollow.tracking_cancelled()
cameraFollow = null
/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target as mob)
@@ -189,33 +159,21 @@
U.cameraFollow = target
U << "Now tracking [target.name] on camera."
+ target.tracking_initiated()
spawn (0)
while (U.cameraFollow == target)
if (U.cameraFollow == null)
return
- if (istype(target, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = target
- if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
+
+ switch(target.tracking_status())
+ if(TRACKING_NO_COVERAGE)
+ U << "Target is not near any active cameras."
+ sleep(100)
+ continue
+ if(TRACKING_TERMINATE)
U.ai_cancel_tracking(1)
return
- if(istype(H.head, /obj/item/clothing/head/helmet/space/rig))
- var/obj/item/clothing/head/helmet/space/rig/helmet = H.head
- if(helmet.prevent_track())
- U.ai_cancel_tracking(1)
- return
- if(H.digitalcamo)
- U.ai_cancel_tracking(1)
- return
-
- if(istype(target.loc,/obj/effect/dummy))
- U.ai_cancel_tracking()
- return
-
- if (!trackable(target))
- U << "Target is not near any active cameras."
- sleep(100)
- continue
if(U.eyeobj)
U.eyeobj.setLoc(get_turf(target), 0)
@@ -224,24 +182,6 @@
return
sleep(10)
-/proc/near_camera(var/mob/living/M)
- if (!isturf(M.loc))
- return 0
- if(isrobot(M))
- var/mob/living/silicon/robot/R = M
- if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M))
- return 0
- else if(!cameranet.checkCameraVis(M))
- return 0
- return 1
-
-/proc/trackable(var/mob/living/M)
- var/turf/T = get_turf(M)
- if(T && (T.z in config.station_levels) && hassensorlevel(M, SUIT_SENSOR_TRACKING))
- return 1
-
- return near_camera(M)
-
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
if (!istype(user))
return
@@ -268,3 +208,71 @@
if (sorttext(a.c_tag, b.c_tag) < 0)
L.Swap(j, j + 1)
return L
+
+
+mob/living/proc/near_camera()
+ if (!isturf(loc))
+ return 0
+ else if(!cameranet.checkCameraVis(src))
+ return 0
+ return 1
+
+/mob/living/proc/tracking_status()
+ // Easy checks first.
+ // Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this.
+ if(InvalidPlayerTurf(get_turf(src)))
+ return TRACKING_TERMINATE
+ if(invisibility >= INVISIBILITY_LEVEL_ONE) //cloaked
+ return TRACKING_TERMINATE
+ if(digitalcamo)
+ return TRACKING_TERMINATE
+ if(istype(loc,/obj/effect/dummy))
+ return TRACKING_TERMINATE
+
+ // Now, are they viewable by a camera? (This is last because it's the most intensive check)
+ return near_camera() ? TRACKING_POSSIBLE : TRACKING_NO_COVERAGE
+
+/mob/living/silicon/robot/tracking_status()
+ . = ..()
+ if(. == TRACKING_NO_COVERAGE)
+ return camera && camera.can_use() ? TRACKING_POSSIBLE : TRACKING_NO_COVERAGE
+
+/mob/living/silicon/robot/syndicate/tracking_status()
+ return TRACKING_TERMINATE
+
+/mob/living/carbon/human/tracking_status()
+ //Cameras can't track people wearing an agent card or a ninja hood.
+ if(wear_id && istype(wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
+ return TRACKING_TERMINATE
+ if(istype(head, /obj/item/clothing/head/helmet/space/rig))
+ var/obj/item/clothing/head/helmet/space/rig/helmet = head
+ if(helmet.prevent_track())
+ return TRACKING_TERMINATE
+
+ . = ..()
+ if(. == TRACKING_TERMINATE)
+ return
+
+ if(. == TRACKING_NO_COVERAGE)
+ var/turf/T = get_turf(src)
+ if(T && (T.z in config.station_levels) && hassensorlevel(src, SUIT_SENSOR_TRACKING))
+ return TRACKING_POSSIBLE
+
+mob/living/proc/tracking_initiated()
+
+mob/living/silicon/robot/tracking_initiated()
+ tracking_entities++
+ if(tracking_entities == 1 && has_zeroth_law())
+ src << "Internal camera is currently being accessed."
+
+mob/living/proc/tracking_cancelled()
+
+mob/living/silicon/robot/tracking_initiated()
+ tracking_entities--
+ if(!tracking_entities && has_zeroth_law())
+ src << "Internal camera is no longer being accessed."
+
+
+#undef TRACKING_POSSIBLE
+#undef TRACKING_NO_COVERAGE
+#undef TRACKING_TERMINATE
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 454e6e44fc..343c8ab2db 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -3,18 +3,41 @@
//Potential replacement for genetics revives or something I dunno (?)
+//Find a dead mob with a brain and client.
+/proc/find_dead_player(var/find_key)
+ if(isnull(find_key))
+ return
+
+ var/mob/selected = null
+ for(var/mob/living/M in player_list)
+ //Dead people only thanks!
+ if((M.stat != 2) || (!M.client))
+ continue
+ //They need a brain!
+ if(istype(M, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = M
+ if(H.species.has_organ["brain"] && !H.has_brain())
+ continue
+ if(M.ckey == find_key)
+ selected = M
+ break
+ return selected
+
#define CLONE_BIOMASS 150
/obj/machinery/clonepod
- anchored = 1
name = "cloning pod"
desc = "An electronically-lockable pod for growing organic tissue."
density = 1
+ anchored = 1
icon = 'icons/obj/cloning.dmi'
icon_state = "pod_0"
req_access = list(access_genetics) //For premature unlocking.
+
var/mob/living/occupant
- var/heal_level = 90 //The clone is released once its health reaches this level.
+ var/heal_level = 20 //The clone is released once its health reaches this level.
+ var/heal_rate = 1
+ var/notoxin = 0
var/locked = 0
var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine.
var/mess = 0 //Need to clean out it if it's full of exploded clone.
@@ -22,6 +45,366 @@
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
var/biomass = CLONE_BIOMASS * 3
+/obj/machinery/clonepod/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
+ component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
+ component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
+ component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
+ component_parts += new /obj/item/stack/cable_coil(src, 2)
+
+ RefreshParts()
+
+/obj/machinery/clonepod/attack_ai(mob/user as mob)
+ add_hiddenprint(user)
+ return attack_hand(user)
+
+/obj/machinery/clonepod/attack_hand(mob/user as mob)
+ if((isnull(occupant)) || (stat & NOPOWER))
+ return
+ if((!isnull(occupant)) && (occupant.stat != 2))
+ var/completion = (100 * ((occupant.health + 50) / (heal_level + 100))) // Clones start at -150 health
+ user << "Current clone cycle is [round(completion)]% complete."
+ return
+
+//Clonepod
+
+//Start growing a human clone in the pod!
+/obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R)
+ if(mess || attempting)
+ return 0
+ var/datum/mind/clonemind = locate(R.mind)
+ if(!istype(clonemind, /datum/mind)) //not a mind
+ return 0
+ if(clonemind.current && clonemind.current.stat != DEAD) //mind is associated with a non-dead body
+ return 0
+ if(clonemind.active) //somebody is using that mind
+ if(ckey(clonemind.key) != R.ckey)
+ return 0
+ else
+ for(var/mob/dead/observer/G in player_list)
+ if(G.ckey == R.ckey)
+ if(G.can_reenter_corpse)
+ break
+ else
+ return 0
+
+ attempting = 1 //One at a time!!
+ locked = 1
+
+ eject_wait = 1
+ spawn(30)
+ eject_wait = 0
+
+ var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
+ occupant = H
+
+ if(!R.dna.real_name) //to prevent null names
+ R.dna.real_name = "clone ([rand(0,999)])"
+ H.real_name = R.dna.real_name
+
+ icon_state = "pod_1"
+ //Get the clone body ready
+ H.adjustCloneLoss(150) // New damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
+ H.adjustBrainLoss(80) // Even if healed to full health, it will have some brain damage
+ H.Paralyse(4)
+
+ //Here let's calculate their health so the pod doesn't immediately eject them!!!
+ H.updatehealth()
+
+ clonemind.transfer_to(H)
+ H.ckey = R.ckey
+ H << "Consciousness slowly creeps over you as your body regenerates.
So this is what cloning feels like?"
+
+ // -- Mode/mind specific stuff goes here
+ callHook("clone", list(H))
+
+ switch(ticker.mode.name)
+ if("revolution")
+ if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
+ ticker.mode.update_all_rev_icons() //So the icon actually appears
+ if("mercenary")
+ if(H.mind in ticker.mode.syndicates)
+ ticker.mode.update_all_synd_icons()
+ if("cult")
+ if(H.mind in ticker.mode.cult)
+ ticker.mode.add_cultist(occupant.mind)
+ ticker.mode.update_all_cult_icons() //So the icon actually appears
+
+ // -- End mode specific stuff
+
+ if(!R.dna)
+ H.dna = new /datum/dna()
+ H.dna.real_name = H.real_name
+ else
+ H.dna = R.dna
+ H.UpdateAppearance()
+ if(heal_level < 60)
+ randmutb(H) //Sometimes the clones come out wrong.
+ H.dna.UpdateSE()
+ H.dna.UpdateUI()
+
+ H.set_cloned_appearance()
+
+ for(var/datum/language/L in R.languages)
+ H.add_language(L.name)
+ H.flavor_texts = R.flavor.Copy()
+ H.suiciding = 0
+ attempting = 0
+ return 1
+
+//Grow clones to maturity then kick them out. FREELOADERS
+/obj/machinery/clonepod/process()
+
+ if(stat & NOPOWER) //Autoeject if power is lost
+ if(occupant)
+ locked = 0
+ go_out()
+ return
+
+ if((occupant) && (occupant.loc == src))
+ if((occupant.stat == DEAD) || (occupant.suiciding) || !occupant.key) //Autoeject corpses and suiciding dudes.
+ locked = 0
+ go_out()
+ connected_message("Clone Rejected: Deceased.")
+ return
+
+ else if(occupant.health < heal_level && occupant.getCloneLoss() > 0)
+ occupant.Paralyse(4)
+
+ //Slowly get that clone healed and finished.
+ occupant.adjustCloneLoss(-2 * heal_rate)
+
+ //Premature clones may have brain damage.
+ occupant.adjustBrainLoss(-1 * heal_rate)
+
+ //So clones don't die of oxyloss in a running pod.
+ if(occupant.reagents.get_reagent_amount("inaprovaline") < 30)
+ occupant.reagents.add_reagent("inaprovaline", 60)
+
+ //So clones will remain asleep for long enough to get them into cryo (Bay RP edit)
+ if(occupant.reagents.get_reagent_amount("stoxin") < 10)
+ occupant.reagents.add_reagent("stoxin", 5)
+ if(occupant.reagents.get_reagent_amount("chloralhydrate") < 1)
+ occupant.reagents.add_reagent("chloralhydrate", 1)
+
+ //Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
+ occupant.adjustOxyLoss(-4)
+ if(notoxin)
+ occupant.adjustToxLoss(-2) // If sufficiently upgraded - remove toxin damage from chloral
+
+ use_power(7500) //This might need tweaking.
+ return
+
+ else if((occupant.health >= heal_level) && (!eject_wait))
+ connected_message("Cloning Process Complete.")
+ locked = 0
+ go_out()
+ return
+
+ else if((!occupant) || (occupant.loc != src))
+ occupant = null
+ if(locked)
+ locked = 0
+ if(!mess)
+ icon_state = "pod_0"
+ //use_power(200)
+ return
+
+ return
+
+//Let's unlock this early I guess. Might be too early, needs tweaking.
+/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(isnull(occupant))
+ if(default_deconstruction_screwdriver(user, W))
+ return
+ if(default_deconstruction_crowbar(user, W))
+ return
+ if(default_part_replacement(user, W))
+ return
+ if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
+ if(!check_access(W))
+ user << "Access Denied."
+ return
+ if((!locked) || (isnull(occupant)))
+ return
+ if((occupant.health < -20) && (occupant.stat != 2))
+ user << "Access Refused."
+ return
+ else
+ locked = 0
+ user << "System unlocked."
+ else if(istype(W, /obj/item/weapon/card/emag))
+ if(isnull(occupant))
+ return
+ user << "You force an emergency ejection."
+ locked = 0
+ go_out()
+ return
+ else if(istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
+ user << "\The [src] processes \the [W]."
+ biomass += 50
+ user.drop_item()
+ del(W)
+ return
+ else if(istype(W, /obj/item/weapon/wrench))
+ if(locked && (anchored || occupant))
+ user << "Can not do that while [src] is in use."
+ else
+ if(anchored)
+ anchored = 0
+ connected.pod1 = null
+ connected = null
+ else
+ anchored = 1
+ playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
+ if(anchored)
+ user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.")
+ else
+ user.visible_message("[user] unsecures [src] from the floor.", "You unsecure [src] from the floor.")
+ else
+ ..()
+
+//Put messages in the connected computer's temp var for display.
+/obj/machinery/clonepod/proc/connected_message(var/message)
+ if((isnull(connected)) || (!istype(connected, /obj/machinery/computer/cloning)))
+ return 0
+ if(!message)
+ return 0
+
+ connected.temp = message
+ connected.updateUsrDialog()
+ return 1
+
+/obj/machinery/clonepod/RefreshParts()
+ ..()
+ var/rating = 0
+ for(var/obj/item/weapon/stock_parts/P in component_parts)
+ if(istype(P, /obj/item/weapon/stock_parts/scanning_module) || istype(P, /obj/item/weapon/stock_parts/manipulator))
+ rating += P.rating
+
+ heal_level = rating * 10 - 20
+ heal_rate = round(rating / 4)
+ if(rating >= 8)
+ notoxin = 1
+ else
+ notoxin = 0
+
+/obj/machinery/clonepod/verb/eject()
+ set name = "Eject Cloner"
+ set category = "Object"
+ set src in oview(1)
+
+ if(usr.stat != 0)
+ return
+ go_out()
+ add_fingerprint(usr)
+ return
+
+/obj/machinery/clonepod/proc/go_out()
+ if(locked)
+ return
+
+ if(mess) //Clean that mess and dump those gibs!
+ mess = 0
+ gibs(loc)
+ icon_state = "pod_0"
+
+ /*
+ for(var/obj/O in src)
+ O.loc = loc
+ */
+ return
+
+ if(!(occupant))
+ return
+
+ /*
+ for(var/obj/O in src)
+ O.loc = loc
+ */
+
+ if(occupant.client)
+ occupant.client.eye = occupant.client.mob
+ occupant.client.perspective = MOB_PERSPECTIVE
+ occupant.loc = loc
+ icon_state = "pod_0"
+ eject_wait = 0 //If it's still set somehow.
+ domutcheck(occupant) //Waiting until they're out before possible monkeyizing.
+// occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
+ occupant = null
+
+ biomass -= CLONE_BIOMASS
+
+ return
+
+/obj/machinery/clonepod/proc/malfunction()
+ if(occupant)
+ connected_message("Critical Error!")
+ mess = 1
+ icon_state = "pod_g"
+ occupant.ghostize()
+ spawn(5)
+ del(occupant)
+ return
+
+/obj/machinery/clonepod/relaymove(mob/user as mob)
+ if(user.stat)
+ return
+ go_out()
+ return
+
+/obj/machinery/clonepod/emp_act(severity)
+ if(prob(100/severity))
+ malfunction()
+ ..()
+
+/obj/machinery/clonepod/ex_act(severity)
+ switch(severity)
+ if(1.0)
+ for(var/atom/movable/A as mob|obj in src)
+ A.loc = loc
+ ex_act(severity)
+ del(src)
+ return
+ if(2.0)
+ if(prob(50))
+ for(var/atom/movable/A as mob|obj in src)
+ A.loc = loc
+ ex_act(severity)
+ del(src)
+ return
+ if(3.0)
+ if(prob(25))
+ for(var/atom/movable/A as mob|obj in src)
+ A.loc = loc
+ ex_act(severity)
+ del(src)
+ return
+ else
+ return
+
+//Health Tracker Implant
+
+/obj/item/weapon/implant/health
+ name = "health implant"
+ var/healthstring = ""
+
+/obj/item/weapon/implant/health/proc/sensehealth()
+ if(!implanted)
+ return "ERROR"
+ else
+ if(isliving(implanted))
+ var/mob/living/L = implanted
+ healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]"
+ if(!healthstring)
+ healthstring = "ERROR"
+ return healthstring
+
+//Disk stuff.
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
//TO-DO: Make the genetics machine accept them.
/obj/item/weapon/disk/data
@@ -30,7 +413,7 @@
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
item_state = "card-id"
w_class = 2.0
- var/datum/dna2/record/buf=null
+ var/datum/dna2/record/buf = null
var/read_only = 0 //Well,it's still a floppy disk
/obj/item/weapon/disk/data/proc/initializeDisk()
@@ -65,363 +448,18 @@
buf.dna.SE=new_SE
buf.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
-
-//Find a dead mob with a brain and client.
-/proc/find_dead_player(var/find_key)
- if (isnull(find_key))
- return
-
- var/mob/selected = null
- for(var/mob/living/M in player_list)
- //Dead people only thanks!
- if ((M.stat != 2) || (!M.client))
- continue
- //They need a brain!
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(H.species.has_organ["brain"] && !H.has_brain())
- continue
- if (M.ckey == find_key)
- selected = M
- break
- return selected
-
-//Disk stuff.
/obj/item/weapon/disk/data/New()
..()
var/diskcolor = pick(0,1,2)
- src.icon_state = "datadisk[diskcolor]"
+ icon_state = "datadisk[diskcolor]"
/obj/item/weapon/disk/data/attack_self(mob/user as mob)
- src.read_only = !src.read_only
- user << "You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"]."
+ read_only = !read_only
+ user << "You flip the write-protect tab to [read_only ? "protected" : "unprotected"]."
/obj/item/weapon/disk/data/examine(mob/user)
..(user)
- user << text("The write-protect tab is set to [src.read_only ? "protected" : "unprotected"].")
- return
-
-//Health Tracker Implant
-
-/obj/item/weapon/implant/health
- name = "health implant"
- var/healthstring = ""
-
-/obj/item/weapon/implant/health/proc/sensehealth()
- if (!src.implanted)
- return "ERROR"
- else
- if(isliving(src.implanted))
- var/mob/living/L = src.implanted
- src.healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]"
- if (!src.healthstring)
- src.healthstring = "ERROR"
- return src.healthstring
-
-/obj/machinery/clonepod/attack_ai(mob/user as mob)
- src.add_hiddenprint(user)
- return attack_hand(user)
-
-/obj/machinery/clonepod/attack_hand(mob/user as mob)
- if ((isnull(src.occupant)) || (stat & NOPOWER))
- return
- if ((!isnull(src.occupant)) && (src.occupant.stat != 2))
- var/completion = (100 * ((src.occupant.health + 100) / (src.heal_level + 100)))
- user << "Current clone cycle is [round(completion)]% complete."
- return
-
-//Clonepod
-
-//Start growing a human clone in the pod!
-/obj/machinery/clonepod/proc/growclone(var/datum/dna2/record/R)
- if(mess || attempting)
- return 0
- var/datum/mind/clonemind = locate(R.mind)
- if(!istype(clonemind,/datum/mind)) //not a mind
- return 0
- if( clonemind.current && clonemind.current.stat != DEAD ) //mind is associated with a non-dead body
- return 0
- if(clonemind.active) //somebody is using that mind
- if( ckey(clonemind.key)!=R.ckey )
- return 0
- else
- for(var/mob/dead/observer/G in player_list)
- if(G.ckey == R.ckey)
- if(G.can_reenter_corpse)
- break
- else
- return 0
-
-
- src.heal_level = rand(10,40) //Randomizes what health the clone is when ejected
- src.attempting = 1 //One at a time!!
- src.locked = 1
-
- src.eject_wait = 1
- spawn(30)
- src.eject_wait = 0
-
- var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
- occupant = H
-
- if(!R.dna.real_name) //to prevent null names
- R.dna.real_name = "clone ([rand(0,999)])"
- H.real_name = R.dna.real_name
-
- src.icon_state = "pod_1"
- //Get the clone body ready
- H.adjustCloneLoss(150) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
- H.adjustBrainLoss(src.heal_level + 50 + rand(10, 30)) // The rand(10, 30) will come out as extra brain damage
- H.Paralyse(4)
-
- //Here let's calculate their health so the pod doesn't immediately eject them!!!
- H.updatehealth()
-
- clonemind.transfer_to(H)
- H.ckey = R.ckey
- H << "Consciousness slowly creeps over you as your body regenerates.
So this is what cloning feels like?"
-
- // -- Mode/mind specific stuff goes here
- callHook("clone", list(H))
-
- switch(ticker.mode.name)
- if("revolution")
- if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
- ticker.mode.update_all_rev_icons() //So the icon actually appears
- if("mercenary")
- if(H.mind in ticker.mode.syndicates)
- ticker.mode.update_all_synd_icons()
- if("cult")
- if (H.mind in ticker.mode.cult)
- ticker.mode.add_cultist(src.occupant.mind)
- ticker.mode.update_all_cult_icons() //So the icon actually appears
-
- // -- End mode specific stuff
-
- if(!R.dna)
- H.dna = new /datum/dna()
- H.dna.real_name = H.real_name
- else
- H.dna=R.dna
- H.UpdateAppearance()
- randmutb(H) //Sometimes the clones come out wrong.
- H.dna.UpdateSE()
- H.dna.UpdateUI()
-
- H.set_cloned_appearance()
-
- for(var/datum/language/L in R.languages)
- H.add_language(L.name)
- H.flavor_texts = R.flavor.Copy()
- H.suiciding = 0
- src.attempting = 0
- return 1
-
-//Grow clones to maturity then kick them out. FREELOADERS
-/obj/machinery/clonepod/process()
-
- if(stat & NOPOWER) //Autoeject if power is lost
- if (src.occupant)
- src.locked = 0
- src.go_out()
- return
-
- if((src.occupant) && (src.occupant.loc == src))
- if((src.occupant.stat == DEAD) || (src.occupant.suiciding) || !occupant.key) //Autoeject corpses and suiciding dudes.
- src.locked = 0
- src.go_out()
- src.connected_message("Clone Rejected: Deceased.")
- return
-
- else if(src.occupant.health < src.heal_level)
- src.occupant.Paralyse(4)
-
- //Slowly get that clone healed and finished.
- src.occupant.adjustCloneLoss(-2)
-
- //Premature clones may have brain damage.
- src.occupant.adjustBrainLoss(-1)
-
- //So clones don't die of oxyloss in a running pod.
- if (src.occupant.reagents.get_reagent_amount("inaprovaline") < 30)
- src.occupant.reagents.add_reagent("inaprovaline", 60)
-
- //So clones will remain asleep for long enough to get them into cryo (Bay RP edit)
- if (src.occupant.reagents.get_reagent_amount("stoxin") < 10)
- src.occupant.reagents.add_reagent("stoxin", 5)
- if (src.occupant.reagents.get_reagent_amount("chloralhydrate") < 1)
- src.occupant.reagents.add_reagent("chloralhydrate", 1)
-
- //Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
- src.occupant.adjustOxyLoss(-4)
-
- use_power(7500) //This might need tweaking.
- return
-
- else if((src.occupant.health >= src.heal_level) && (!src.eject_wait))
- src.connected_message("Cloning Process Complete.")
- src.locked = 0
- src.go_out()
- return
-
- else if ((!src.occupant) || (src.occupant.loc != src))
- src.occupant = null
- if (src.locked)
- src.locked = 0
- if (!src.mess)
- icon_state = "pod_0"
- //use_power(200)
- return
-
- return
-
-//Let's unlock this early I guess. Might be too early, needs tweaking.
-/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
- if (!src.check_access(W))
- user << "\red Access Denied."
- return
- if ((!src.locked) || (isnull(src.occupant)))
- return
- if ((src.occupant.health < -20) && (src.occupant.stat != 2))
- user << "\red Access Refused."
- return
- else
- src.locked = 0
- user << "System unlocked."
- else if (istype(W, /obj/item/weapon/card/emag))
- if (isnull(src.occupant))
- return
- user << "You force an emergency ejection."
- src.locked = 0
- src.go_out()
- return
- else if (istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat))
- user << "\blue \The [src] processes \the [W]."
- biomass += 50
- user.drop_item()
- del(W)
- return
- else if (istype(W, /obj/item/weapon/wrench))
- if(src.locked && (src.anchored || src.occupant))
- user << "\red Can not do that while [src] is in use."
- else
- if(src.anchored)
- src.anchored = 0
- connected.pod1 = null
- connected = null
- else
- src.anchored = 1
- playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
- if(anchored)
- user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.")
- else
- user.visible_message("[user] unsecures [src] from the floor.", "You unsecure [src] from the floor.")
- else
- ..()
-
-//Put messages in the connected computer's temp var for display.
-/obj/machinery/clonepod/proc/connected_message(var/message)
- if ((isnull(src.connected)) || (!istype(src.connected, /obj/machinery/computer/cloning)))
- return 0
- if (!message)
- return 0
-
- src.connected.temp = message
- src.connected.updateUsrDialog()
- return 1
-
-/obj/machinery/clonepod/verb/eject()
- set name = "Eject Cloner"
- set category = "Object"
- set src in oview(1)
-
- if (usr.stat != 0)
- return
- src.go_out()
- add_fingerprint(usr)
- return
-
-/obj/machinery/clonepod/proc/go_out()
- if (src.locked)
- return
-
- if (src.mess) //Clean that mess and dump those gibs!
- src.mess = 0
- gibs(src.loc)
- src.icon_state = "pod_0"
-
- /*
- for(var/obj/O in src)
- O.loc = src.loc
- */
- return
-
- if (!(src.occupant))
- return
-
- /*
- for(var/obj/O in src)
- O.loc = src.loc
- */
-
- if (src.occupant.client)
- src.occupant.client.eye = src.occupant.client.mob
- src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.loc = src.loc
- src.icon_state = "pod_0"
- src.eject_wait = 0 //If it's still set somehow.
- domutcheck(src.occupant) //Waiting until they're out before possible monkeyizing.
-// src.occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
- src.occupant = null
-
- src.biomass -= CLONE_BIOMASS
-
- return
-
-/obj/machinery/clonepod/proc/malfunction()
- if(src.occupant)
- src.connected_message("Critical Error!")
- src.mess = 1
- src.icon_state = "pod_g"
- src.occupant.ghostize()
- spawn(5)
- del(src.occupant)
- return
-
-/obj/machinery/clonepod/relaymove(mob/user as mob)
- if (user.stat)
- return
- src.go_out()
- return
-
-/obj/machinery/clonepod/emp_act(severity)
- if(prob(100/severity)) malfunction()
- ..()
-
-/obj/machinery/clonepod/ex_act(severity)
- switch(severity)
- if(1.0)
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- del(src)
- return
- if(3.0)
- if (prob(25))
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- del(src)
- return
- else
+ user << text("The write-protect tab is set to [read_only ? "protected" : "unprotected"].")
return
/*
diff --git a/code/game/machinery/computer/RCON_Console.dm b/code/game/machinery/computer/RCON_Console.dm
index e1ecdb28d2..93b18cf989 100644
--- a/code/game/machinery/computer/RCON_Console.dm
+++ b/code/game/machinery/computer/RCON_Console.dm
@@ -5,7 +5,7 @@
// Allows remote operation of electrical systems on station (SMESs and Breaker Boxes)
/obj/machinery/computer/rcon
- name = "\improper RCON remote control console"
+ name = "\improper RCON console"
desc = "Console used to remotely control machinery on the station."
icon = 'icons/obj/computer.dmi'
icon_state = "ai-fixer"
@@ -45,7 +45,8 @@
"output_load" = round(SMES.output_used),
"RCON_tag" = SMES.RCon_tag
)))
- data["smes_info"] = smeslist
+
+ data["smes_info"] = sortByKey(smeslist, "RCON_tag")
// BREAKER DATA (simplified view)
var/list/breakerlist[0]
@@ -61,7 +62,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
- ui = new(user, src, ui_key, "rcon.tmpl", "RCON Control Console", 600, 400)
+ ui = new(user, src, ui_key, "rcon.tmpl", "RCON Console", 600, 400)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 69c884ec70..7bd8e4b8e8 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -168,9 +168,15 @@
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "\blue You connect the monitor."
- var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain )
- if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created
- A.rename_self("ai", 1)
+ if(!brain)
+ var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes"
+ var/obj/structure/AIcore/deactivated/D = new(loc)
+ if(open_for_latejoin)
+ empty_playable_ai_cores += D
+ else
+ var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain )
+ if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created
+ A.rename_self("ai", 1)
feedback_inc("cyborg_ais_created",1)
del(src)
@@ -207,14 +213,53 @@
if (ai.mind == malfai)
return 1
-/obj/structure/AIcore/deactivated/attackby(var/obj/item/device/aicard/card, var/mob/user)
+/obj/structure/AIcore/deactivated/attackby(var/obj/item/weapon/W, var/mob/user)
- if(istype(card))
+ if(istype(W, /obj/item/device/aicard))
+ var/obj/item/device/aicard/card = W
var/mob/living/silicon/ai/transfer = locate() in card
if(transfer)
load_ai(transfer,card,user)
else
user << "\red ERROR: \black Unable to locate artificial intelligence."
return
+ else if(istype(W, /obj/item/weapon/wrench))
+ if(anchored)
+ user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
+ if(!do_after(user,40))
+ user.visible_message("\blue \The [user] decides not to unbolt \the [src].")
+ return
+ user.visible_message("\blue \The [user] finishes unfastening \the [src]!")
+ anchored = 0
+ return
+ else
+ user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...")
+ if(!do_after(user,40))
+ user.visible_message("\blue \The [user] decides not to bolt \the [src].")
+ return
+ user.visible_message("\blue \The [user] finishes fastening down \the [src]!")
+ anchored = 1
+ return
+ else
+ return ..()
- ..()
+/client/proc/empty_ai_core_toggle_latejoin()
+ set name = "Toggle AI Core Latejoin"
+ set category = "Admin"
+
+ var/list/cores = list()
+ for(var/obj/structure/AIcore/deactivated/D in world)
+ cores["[D] ([D.loc.loc])"] = D
+
+ var/id = input("Which core?", "Toggle AI Core Latejoin", null) as null|anything in cores
+ if(!id) return
+
+ var/obj/structure/AIcore/deactivated/D = cores[id]
+ if(!D) return
+
+ if(D in empty_playable_ai_cores)
+ empty_playable_ai_cores -= D
+ src << "\The [id] is now not available for latejoining AIs."
+ else
+ empty_playable_ai_cores += D
+ src << "\The [id] is now available for latejoining AIs."
diff --git a/code/WorkInProgress/Mini/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
similarity index 100%
rename from code/WorkInProgress/Mini/atmos_control.dm
rename to code/game/machinery/computer/atmos_control.dm
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index 0a7f27d701..2067bd43a0 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -1,5 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
+/proc/invalidateCameraCache()
+ for(var/obj/machinery/computer/security/s in world)
+ s.camera_cache = null
/obj/machinery/computer/security
name = "security camera monitor"
@@ -10,7 +13,7 @@
var/list/network = list("SS13")
var/mapping = 0//For the overview file, interesting bit of code.
circuit = /obj/item/weapon/circuitboard/security
-
+ var/camera_cache = null
attack_ai(var/mob/user as mob)
return attack_hand(user)
@@ -19,7 +22,7 @@
if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here.
return null
if ( !current || !current.can_use() ) //camera doesn't work
- current = null
+ reset_current()
user.reset_view(current)
return 1
@@ -32,29 +35,45 @@
data["current"] = null
- var/list/L = list()
- for (var/obj/machinery/camera/C in cameranet.cameras)
- if(can_access_camera(C))
- L.Add(C)
+ if(isnull(camera_cache))
+ cameranet.process_sort()
- camera_sort(L)
+ var/cameras[0]
+ for(var/obj/machinery/camera/C in cameranet.cameras)
+ if(!can_access_camera(C))
+ continue
- var/cameras[0]
- for(var/obj/machinery/camera/C in L)
- var/cam[0]
- cam["name"] = C.c_tag
- cam["deact"] = !C.can_use()
- cam["camera"] = "\ref[C]"
- cam["x"] = C.x
- cam["y"] = C.y
- cam["z"] = C.z
+ var/cam[0]
+ cam["name"] = sanitize(C.c_tag)
+ cam["deact"] = !C.can_use()
+ cam["camera"] = "\ref[C]"
+ cam["x"] = C.x
+ cam["y"] = C.y
+ cam["z"] = C.z
- cameras[++cameras.len] = cam
+ cameras[++cameras.len] = cam
+
+ if(C == current)
+ data["current"] = cam
+
+ var/list/camera_list = list("cameras" = cameras)
+ camera_cache=list2json(camera_list)
+
+ else
+ if(current)
+ var/cam[0]
+ cam["name"] = current.c_tag
+ cam["deact"] = !current.can_use()
+ cam["camera"] = "\ref[current]"
+ cam["x"] = current.x
+ cam["y"] = current.y
+ cam["z"] = current.z
- if(C == current)
data["current"] = cam
- data["cameras"] = cameras
+
+ if(ui)
+ ui.load_cached_data(camera_cache)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
@@ -65,6 +84,7 @@
// adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
+ ui.load_cached_data(camera_cache)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -81,7 +101,7 @@
else if(href_list["reset"])
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
- current = null
+ reset_current()
usr.check_eye(current)
return 1
else
@@ -107,13 +127,17 @@
//don't need to check if the camera works for AI because the AI jumps to the camera location and doesn't actually look through cameras.
if(isAI(user))
var/mob/living/silicon/ai/A = user
+ // Only allow non-carded AIs to view because the interaction with the eye gets all wonky otherwise.
+ if(!A.is_in_chassis())
+ return 0
+
A.eyeobj.setLoc(get_turf(C))
A.client.eye = A.eyeobj
return 1
if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon)))
return 0
- src.current = C
+ set_current(C)
check_eye(user)
use_power(50)
return 1
@@ -147,6 +171,27 @@
return
if(can_access_camera(jump_to))
switch_to_camera(user,jump_to)
+
+/obj/machinery/computer/security/proc/set_current(var/obj/machinery/camera/C)
+ if(current == C)
+ return
+
+ if(current)
+ reset_current()
+
+ src.current = C
+ if(current)
+ var/mob/living/L = current.loc
+ if(istype(L))
+ L.tracking_initiated()
+
+/obj/machinery/computer/security/proc/reset_current()
+ if(current)
+ var/mob/living/L = current.loc
+ if(istype(L))
+ L.tracking_cancelled()
+ current = null
+
//Camera control: mouse.
/atom/DblClick()
..()
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index fddc863575..be5a73d90f 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -191,7 +191,7 @@
if (is_authenticated() && modify)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
- var/temp_t = copytext(sanitize(input("Enter a custom job assignment.","Assignment")),1,45)
+ var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,45))
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index 5285235fbf..f18d906383 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -175,10 +175,10 @@
post_status(href_list["statdisp"])
if("setmsg1")
- stat_msg1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null), 1, 40)), 40)
+ stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40))), 40)
src.updateDialog()
if("setmsg2")
- stat_msg2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null), 1, 40)), 40)
+ stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40))), 40)
src.updateDialog()
// OMG CENTCOMM LETTERHEAD
@@ -496,12 +496,12 @@
return
emergency_shuttle.call_transfer()
-
+
//delay events in case of an autotransfer
if (isnull(user))
event_manager.delay_events(EVENT_LEVEL_MODERATE, 9000) //15 minutes
- event_manager.delay_events(EVENT_LEVEL_MAJOR, 9000)
-
+ event_manager.delay_events(EVENT_LEVEL_MAJOR, 9000)
+
log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.")
message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1)
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index ff88f89c5a..b639334c01 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -101,6 +101,20 @@
return text
+/obj/machinery/computer/attack_ghost(user as mob)
+ return src.attack_hand(user)
+
+/obj/machinery/computer/attack_hand(user as mob)
+ /* Observers can view computers, but not actually use them via Topic*/
+ if(istype(user, /mob/dead/observer)) return 0
+ return ..()
+
+/obj/machinery/computer/Topic(href, href_list)
+ /* Can't use topic as observer by default */
+ if(istype(usr, /mob/dead/observer)) return 0
+ return ..()
+
+
/obj/machinery/computer/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
diff --git a/code/WorkInProgress/Chinsky/guestpass.dm b/code/game/machinery/computer/guestpass.dm
similarity index 100%
rename from code/WorkInProgress/Chinsky/guestpass.dm
rename to code/game/machinery/computer/guestpass.dm
diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm
index 5c970f9d67..2d73e17da8 100644
--- a/code/game/machinery/computer/law.dm
+++ b/code/game/machinery/computer/law.dm
@@ -50,7 +50,9 @@
else
usr << "[src.current.name] selected for law changes."
return
-
+
+ attack_ghost(user as mob)
+ return 1
/obj/machinery/computer/borgupload
@@ -83,3 +85,6 @@
else
usr << "[src.current.name] selected for law changes."
return
+
+ attack_ghost(user as mob)
+ return 1
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index b8fb87bc31..b67834eb60 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -250,7 +250,7 @@
switch(href_list["field"])
if("fingerprint")
if (istype(src.active1, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
@@ -268,55 +268,55 @@
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
@@ -331,21 +331,21 @@
src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src)
if("b_dna")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["b_dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
- var/t1 = copytext(trim(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
- var/t1 = copytext(trim(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
@@ -450,7 +450,7 @@
if (!( istype(src.active2, /datum/data/record) ))
return
var/a2 = src.active2
- var/t1 = copytext(trim(sanitize(input("Add Comment:", "Med. records", null, null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index 8cdd7f10fe..a30f355d2a 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -430,7 +430,7 @@
//Enter message
if("Message")
custommessage = input(usr, "Please enter your message.") as text|null
- custommessage = copytext(sanitize(custommessage), 1, MAX_MESSAGE_LEN)
+ custommessage = sanitize(copytext(custommessage, 1, MAX_MESSAGE_LEN))
//Send message
if("Send")
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index cdbdfe048f..00e7554727 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -90,7 +90,7 @@
usr << "Unauthorized Access."
else if(href_list["warn"])
- var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
+ var/warning = sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))
if(!warning) return
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if((I)&&(I.imp_in))
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index e14c277981..f3a7f80203 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -384,7 +384,7 @@ What a mess.*/
if (!( istype(active2, /datum/data/record) ))
return
var/a2 = active2
- var/t1 = copytext(trim(sanitize(input("Add Comment:", "Secure. records", null, null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
@@ -432,13 +432,13 @@ What a mess.*/
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
if (!t1 || active1 != a1)
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
if (!t1 || active1 != a1)
return
active1.fields["fingerprint"] = t1
@@ -456,31 +456,31 @@ What a mess.*/
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN)))
if (!t1 || active2 != a2)
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
if (!t1 || active2 != a2)
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN)))
if (!t1 || active2 != a2)
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
if (!t1 || active2 != a2)
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
if (!t1 || active2 != a2)
return
active2.fields["notes"] = t1
@@ -507,7 +507,7 @@ What a mess.*/
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)))
if (!t1 || active1 != a1)
return
active1.fields["species"] = t1
@@ -534,7 +534,7 @@ What a mess.*/
if ("Change Criminal Status")
if (active2)
for(var/mob/living/carbon/human/H in player_list)
- H.hud_updateflag |= 1 << WANTED_HUD
+ BITSET(H.hud_updateflag, WANTED_HUD)
switch(href_list["criminal2"])
if("none")
active2.fields["criminal"] = "None"
@@ -612,4 +612,4 @@ What a mess.*/
/obj/machinery/computer/secure_data/detective_computer
icon = 'icons/obj/computer.dmi'
- icon_state = "messyfiles"
\ No newline at end of file
+ icon_state = "messyfiles"
diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm
index aa573e39aa..8382f87185 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -315,13 +315,13 @@ What a mess.*/
active1.fields["name"] = t1
if("id")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
@@ -350,7 +350,7 @@ What a mess.*/
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1
diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm
index fe109c4771..9f69c7bc1c 100644
--- a/code/game/machinery/computer/supply.dm
+++ b/code/game/machinery/computer/supply.dm
@@ -85,7 +85,7 @@
if(!istype(P)) return
var/timeout = world.time + 600
- var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
+ var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
if(world.time > timeout) return
if(!reason) return
@@ -289,7 +289,7 @@
if(!istype(P)) return
var/timeout = world.time + 600
- var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
+ var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
if(world.time > timeout) return
if(!reason) return
diff --git a/code/WorkInProgress/computer3/NTOS.dm b/code/game/machinery/computer3/NTOS.dm
similarity index 100%
rename from code/WorkInProgress/computer3/NTOS.dm
rename to code/game/machinery/computer3/NTOS.dm
diff --git a/code/WorkInProgress/computer3/bios.dm b/code/game/machinery/computer3/bios.dm
similarity index 100%
rename from code/WorkInProgress/computer3/bios.dm
rename to code/game/machinery/computer3/bios.dm
diff --git a/code/WorkInProgress/computer3/buildandrepair.dm b/code/game/machinery/computer3/buildandrepair.dm
similarity index 100%
rename from code/WorkInProgress/computer3/buildandrepair.dm
rename to code/game/machinery/computer3/buildandrepair.dm
diff --git a/code/WorkInProgress/computer3/component.dm b/code/game/machinery/computer3/component.dm
similarity index 100%
rename from code/WorkInProgress/computer3/component.dm
rename to code/game/machinery/computer3/component.dm
diff --git a/code/WorkInProgress/computer3/computer.dm b/code/game/machinery/computer3/computer.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computer.dm
rename to code/game/machinery/computer3/computer.dm
diff --git a/code/WorkInProgress/computer3/computer3_notes.dm b/code/game/machinery/computer3/computer3_notes.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computer3_notes.dm
rename to code/game/machinery/computer3/computer3_notes.dm
diff --git a/code/WorkInProgress/computer3/computers/HolodeckControl.dm b/code/game/machinery/computer3/computers/HolodeckControl.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/HolodeckControl.dm
rename to code/game/machinery/computer3/computers/HolodeckControl.dm
diff --git a/code/WorkInProgress/computer3/computers/Operating.dm b/code/game/machinery/computer3/computers/Operating.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/Operating.dm
rename to code/game/machinery/computer3/computers/Operating.dm
diff --git a/code/WorkInProgress/computer3/computers/arcade.dm b/code/game/machinery/computer3/computers/arcade.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/arcade.dm
rename to code/game/machinery/computer3/computers/arcade.dm
diff --git a/code/WorkInProgress/computer3/computers/atmos_alert.dm b/code/game/machinery/computer3/computers/atmos_alert.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/atmos_alert.dm
rename to code/game/machinery/computer3/computers/atmos_alert.dm
diff --git a/code/WorkInProgress/computer3/computers/camera.dm b/code/game/machinery/computer3/computers/camera.dm
similarity index 82%
rename from code/WorkInProgress/computer3/computers/camera.dm
rename to code/game/machinery/computer3/computers/camera.dm
index b3a0c7fcfa..17f14e0cbf 100644
--- a/code/WorkInProgress/computer3/computers/camera.dm
+++ b/code/game/machinery/computer3/computers/camera.dm
@@ -123,6 +123,12 @@
desc = "Monitors the prison."
networks = list("Prison")
+/datum/file/camnet_key/syndicate
+ name = "Camera Network Key"
+ title = "%!#BUFFER OVERFLOW"
+ desc = "Connects to security cameras."
+ networks = list("SS13")
+ hidden_file = 1
/*
@@ -141,14 +147,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())
@@ -174,7 +180,7 @@
/datum/file/program/security
name = "camera monitor"
- desc = "Connets to the Nanotrasen Camera Network"
+ desc = "Connects to the Nanotrasen Camera Network"
image = 'icons/ntos/camera.png'
active_state = "camera-static"
@@ -200,7 +206,7 @@
Reset()
..()
- current = null
+ reset_current()
for(var/mob/living/L in viewers(1))
if(!istype(L,/mob/living/silicon/ai) && L.machine == src)
L.reset_view(null)
@@ -259,24 +265,80 @@
if("show" in href_list)
var/obj/machinery/camera/C = locate(href_list["show"])
if(istype(C) && C.status)
- current = C
+ set_current(C)
usr.reset_view(C)
interact()
return
if("keyselect" in href_list)
- current = null
+ reset_current()
usr.reset_view(null)
key = input(usr,"Select a camera network key:", "Key Select", null) as null|anything in computer.list_files(/datum/file/camnet_key)
- camera_list = null
- update_icon()
- computer.update_icon()
+ select_key(key)
if(key)
interact()
else
usr << "The screen turns to static."
return
+/datum/file/program/security/proc/select_key(var/selected_key)
+ key = selected_key
+ camera_list = null
+ update_icon()
+ computer.update_icon()
+
+/datum/file/program/security/proc/set_current(var/obj/machinery/camera/C)
+ if(current == C)
+ return
+
+ if(current)
+ reset_current()
+
+ src.current = C
+ if(current)
+ var/mob/living/L = current.loc
+ if(istype(L))
+ L.tracking_initiated()
+
+/datum/file/program/security/proc/reset_current()
+ if(current)
+ var/mob/living/L = current.loc
+ if(istype(L))
+ L.tracking_cancelled()
+ current = null
+
// Atlantis: Required for camnetkeys to work.
/datum/file/program/security/hidden
hidden_file = 1
+
+/*
+ Camera monitoring program
+
+ Works much as the parent program, except:
+ * It requires a camera to be found using the proximity network card.
+ * It begins with all cam-access.
+*/
+
+/datum/file/program/security/syndicate
+ name = "camer# moni!%r"
+ desc = "Cons the Nanotrash Camera Network"
+ var/special_key = new/datum/file/camnet_key/syndicate
+ var/camera_conn = null
+
+ interact()
+ if(!interactable())
+ return
+
+ if(!computer.net)
+ computer.Crash(MISSING_PERIPHERAL)
+ return
+
+ camera_conn = computer.net.connect_to(/obj/machinery/camera,camera_conn)
+
+ if(!camera_conn)
+ computer.Crash(NETWORK_FAILURE)
+ return
+
+ // On interact, override camera key selection
+ select_key(special_key)
+ ..()
diff --git a/code/WorkInProgress/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm
similarity index 98%
rename from code/WorkInProgress/computer3/computers/card.dm
rename to code/game/machinery/computer3/computers/card.dm
index 5acb7c9de2..963b1f4de7 100644
--- a/code/WorkInProgress/computer3/computers/card.dm
+++ b/code/game/machinery/computer3/computers/card.dm
@@ -304,7 +304,7 @@
if(auth)
var/t1 = href_list["assign"]
if(t1 == "Custom")
- var/temp_t = copytext(sanitize(input("Enter a custom job assignment.","Assignment")),1,MAX_MESSAGE_LEN)
+ var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
if(temp_t)
t1 = temp_t
set_default_access(t1)
diff --git a/code/WorkInProgress/computer3/computers/communications.dm b/code/game/machinery/computer3/computers/communications.dm
similarity index 98%
rename from code/WorkInProgress/computer3/computers/communications.dm
rename to code/game/machinery/computer3/computers/communications.dm
index f39c4c17fd..bb268ba0c0 100644
--- a/code/WorkInProgress/computer3/computers/communications.dm
+++ b/code/game/machinery/computer3/computers/communications.dm
@@ -178,10 +178,10 @@
post_status(href_list["statdisp"])
if("setmsg1" in href_list)
- stat_msg1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null), 1, 40)), 40)
+ stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40)), 40))
computer.updateDialog()
if("setmsg2" in href_list)
- stat_msg2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null), 1, 40)), 40)
+ stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40)), 40))
computer.updateDialog()
// OMG CENTCOMM LETTERHEAD
diff --git a/code/WorkInProgress/computer3/computers/crew.dm b/code/game/machinery/computer3/computers/crew.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/crew.dm
rename to code/game/machinery/computer3/computers/crew.dm
diff --git a/code/WorkInProgress/computer3/computers/customs.dm b/code/game/machinery/computer3/computers/customs.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/customs.dm
rename to code/game/machinery/computer3/computers/customs.dm
diff --git a/code/WorkInProgress/computer3/computers/law.dm b/code/game/machinery/computer3/computers/law.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/law.dm
rename to code/game/machinery/computer3/computers/law.dm
diff --git a/code/WorkInProgress/computer3/computers/medical.dm b/code/game/machinery/computer3/computers/medical.dm
similarity index 94%
rename from code/WorkInProgress/computer3/computers/medical.dm
rename to code/game/machinery/computer3/computers/medical.dm
index f7e6167e1d..fa75c69ac6 100644
--- a/code/WorkInProgress/computer3/computers/medical.dm
+++ b/code/game/machinery/computer3/computers/medical.dm
@@ -263,7 +263,7 @@
switch(href_list["field"])
if("fingerprint")
if (istype(src.active1, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
@@ -281,55 +281,55 @@
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
@@ -344,21 +344,21 @@
src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src)
if("b_dna")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = sanitize(copytext(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text),1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["b_dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
- var/t1 = copytext(trim(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
- var/t1 = copytext(trim(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
@@ -463,7 +463,7 @@
if (!( istype(src.active2, /datum/data/record) ))
return
var/a2 = src.active2
- var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1
diff --git a/code/WorkInProgress/computer3/computers/power.dm b/code/game/machinery/computer3/computers/power.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/power.dm
rename to code/game/machinery/computer3/computers/power.dm
diff --git a/code/WorkInProgress/computer3/computers/prisoner.dm b/code/game/machinery/computer3/computers/prisoner.dm
similarity index 96%
rename from code/WorkInProgress/computer3/computers/prisoner.dm
rename to code/game/machinery/computer3/computers/prisoner.dm
index f1df9b2a59..7b0c97d4ae 100644
--- a/code/WorkInProgress/computer3/computers/prisoner.dm
+++ b/code/game/machinery/computer3/computers/prisoner.dm
@@ -90,7 +90,7 @@
screen = !screen
else if(href_list["warn"])
- var/warning = trim(copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN))
+ var/warning = trim(sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN)))
if(!warning) return
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if( istype(I) && I.imp_in)
diff --git a/code/WorkInProgress/computer3/computers/robot.dm b/code/game/machinery/computer3/computers/robot.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/robot.dm
rename to code/game/machinery/computer3/computers/robot.dm
diff --git a/code/WorkInProgress/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm
similarity index 95%
rename from code/WorkInProgress/computer3/computers/security.dm
rename to code/game/machinery/computer3/computers/security.dm
index 1c409da853..f630b24175 100644
--- a/code/WorkInProgress/computer3/computers/security.dm
+++ b/code/game/machinery/computer3/computers/security.dm
@@ -404,7 +404,7 @@ What a mess.*/
if (!( istype(active2, /datum/data/record) ))
return
var/a2 = active2
- var/t1 = copytext(sanitize(input("Add Comment:", "Secure. records", null, null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
@@ -450,13 +450,13 @@ What a mess.*/
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
@@ -474,31 +474,31 @@ What a mess.*/
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
+ var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["notes"] = t1
@@ -525,7 +525,7 @@ What a mess.*/
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN))
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1
@@ -543,7 +543,7 @@ What a mess.*/
if ("Change Criminal Status")
if (active2)
for(var/mob/living/carbon/human/H in player_list)
- H.hud_updateflag |= 1 << WANTED_HUD
+ BITSET(H.hud_updateflag, WANTED_HUD)
switch(href_list["criminal2"])
if("none")
active2.fields["criminal"] = "None"
@@ -608,4 +608,4 @@ What a mess.*/
/obj/machinery/computer3/secure_data/detective_computer
icon = 'icons/obj/computer.dmi'
- icon_state = "messyfiles"
\ No newline at end of file
+ icon_state = "messyfiles"
diff --git a/code/WorkInProgress/computer3/computers/welcome.dm b/code/game/machinery/computer3/computers/welcome.dm
similarity index 100%
rename from code/WorkInProgress/computer3/computers/welcome.dm
rename to code/game/machinery/computer3/computers/welcome.dm
diff --git a/code/WorkInProgress/computer3/file.dm b/code/game/machinery/computer3/file.dm
similarity index 100%
rename from code/WorkInProgress/computer3/file.dm
rename to code/game/machinery/computer3/file.dm
diff --git a/code/WorkInProgress/computer3/laptop.dm b/code/game/machinery/computer3/laptop.dm
similarity index 100%
rename from code/WorkInProgress/computer3/laptop.dm
rename to code/game/machinery/computer3/laptop.dm
diff --git a/code/WorkInProgress/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm
similarity index 100%
rename from code/WorkInProgress/computer3/lapvend.dm
rename to code/game/machinery/computer3/lapvend.dm
diff --git a/code/WorkInProgress/computer3/networking.dm b/code/game/machinery/computer3/networking.dm
similarity index 98%
rename from code/WorkInProgress/computer3/networking.dm
rename to code/game/machinery/computer3/networking.dm
index 4e39da0406..27d7789008 100644
--- a/code/WorkInProgress/computer3/networking.dm
+++ b/code/game/machinery/computer3/networking.dm
@@ -169,6 +169,9 @@
if(typekey == null)
typekey = /obj/machinery
var/list/machines = list()
+ for(var/obj/O in T)
+ if(istype(O,typekey))
+ machines += O
for(var/d in cardinal)
var/turf/T2 = get_step(T,d)
for(var/obj/O in T2)
diff --git a/code/WorkInProgress/computer3/program.dm b/code/game/machinery/computer3/program.dm
similarity index 100%
rename from code/WorkInProgress/computer3/program.dm
rename to code/game/machinery/computer3/program.dm
diff --git a/code/WorkInProgress/computer3/program_disks.dm b/code/game/machinery/computer3/program_disks.dm
similarity index 78%
rename from code/WorkInProgress/computer3/program_disks.dm
rename to code/game/machinery/computer3/program_disks.dm
index 201fff3939..e9a649499b 100644
--- a/code/WorkInProgress/computer3/program_disks.dm
+++ b/code/game/machinery/computer3/program_disks.dm
@@ -28,6 +28,13 @@
icon_state = "datadisk_arcade"
spawn_files = list(/datum/file/program/security)
+/obj/item/weapon/disk/file/cameras/syndicate
+ name = "Camera Viewer"
+ desc = "A program install disk. A crude skull has been drawn on it and there is a list of items:\nFloppy Drive\nCamera Card\nNetwork Card: Adjacent\nPosition laptop nearby camera, enjoy."
+ icon = 'icons/obj/stock_parts.dmi'
+ icon_state = "datadisk_arcade"
+ spawn_files = list(/datum/file/program/security/syndicate)
+
/obj/item/weapon/disk/file/card
name = "ID Card Modifier"
desc = "A program install disk."
diff --git a/code/WorkInProgress/computer3/server.dm b/code/game/machinery/computer3/server.dm
similarity index 100%
rename from code/WorkInProgress/computer3/server.dm
rename to code/game/machinery/computer3/server.dm
diff --git a/code/WorkInProgress/computer3/storage.dm b/code/game/machinery/computer3/storage.dm
similarity index 100%
rename from code/WorkInProgress/computer3/storage.dm
rename to code/game/machinery/computer3/storage.dm
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 32543822b9..7d10bd9a6f 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -288,6 +288,7 @@
M.client.eye = src
M.stop_pulling()
M.loc = src
+ M.ExtinguishMob()
if(M.health > -100 && (M.health < 0 || M.sleeping))
M << "\blue You feel a cold liquid surround you. Your skin starts to freeze up."
occupant = M
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index 50c16c86cc..51bc9b69e6 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -148,30 +148,20 @@
else
icon_state = "doorctrl0"
-/obj/machinery/driver_button/attack_ai(mob/user as mob)
- return src.attack_hand(user)
+/obj/machinery/button/driver
+ name = "mass driver button"
+ desc = "A remote control switch for a mass driver."
-/obj/machinery/driver_button/attackby(obj/item/weapon/W, mob/user as mob)
-
- if(istype(W, /obj/item/device/detective_scanner))
+/obj/machinery/button/driver/attack_hand(mob/user as mob)
+ if(..())
return
- return src.attack_hand(user)
-
-/obj/machinery/driver_button/attack_hand(mob/user as mob)
-
- src.add_fingerprint(usr)
- if(stat & (NOPOWER|BROKEN))
- return
- if(active)
- return
- add_fingerprint(user)
use_power(5)
active = 1
icon_state = "launcheract"
- for(var/obj/machinery/door/blast/M in world)
+ for(var/obj/machinery/door/blast/M in machines)
if (M.id == src.id)
spawn( 0 )
M.open()
@@ -179,13 +169,13 @@
sleep(20)
- for(var/obj/machinery/mass_driver/M in world)
+ for(var/obj/machinery/mass_driver/M in machines)
if(M.id == src.id)
M.drive()
sleep(50)
- for(var/obj/machinery/door/blast/M in world)
+ for(var/obj/machinery/door/blast/M in machines)
if (M.id == src.id)
spawn( 0 )
M.close()
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 62e89cf03d..fa4f31bc89 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -330,7 +330,7 @@ About the new airlock wires panel:
return ((src.aiControlDisabled==1) && (!hackProof) && (!src.isAllPowerLoss()));
/obj/machinery/door/airlock/proc/arePowerSystemsOn()
- if (stat & NOPOWER)
+ if (stat & (NOPOWER|BROKEN))
return 0
return (src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0)
@@ -451,7 +451,7 @@ About the new airlock wires panel:
if(density)
flick("door_spark", src)
if("deny")
- if(density && !(stat & (BROKEN|NOPOWER)))
+ if(density && src.arePowerSystemsOn())
flick("door_deny", src)
return
@@ -900,12 +900,7 @@ About the new airlock wires panel:
var/obj/item/weapon/pai_cable/cable = C
cable.plugin(src, user)
else if(!repairing && istype(C, /obj/item/weapon/crowbar))
- var/beingcrowbarred = null
- if(istype(C, /obj/item/weapon/crowbar) )
- beingcrowbarred = 1 //derp, Agouri
- else
- beingcrowbarred = 0
- if( beingcrowbarred && src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) )
+ if(src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
if(do_after(user,40))
@@ -936,7 +931,7 @@ About the new airlock wires panel:
del(src)
return
- else if(arePowerSystemsOn() && !(stat & BROKEN))
+ else if(arePowerSystemsOn())
user << "\blue The airlock's motors resist your efforts to force it."
else if(locked)
user << "\blue The airlock's bolts prevent it from being forced."
@@ -946,22 +941,22 @@ About the new airlock wires panel:
else
spawn(0) close(1)
- else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && (!arePowerSystemsOn() || (stat & BROKEN)))
+ else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && !arePowerSystemsOn())
if(locked)
user << "\blue The airlock's bolts prevent it from being forced."
else if( !welded && !operating )
if(density)
var/obj/item/weapon/twohanded/fireaxe/F = C
- if(F:wielded)
+ if(F.wielded)
spawn(0) open(1)
else
- user << "\red You need to be wielding the Fire axe to do that."
+ user << "\red You need to be wielding \the [C] to do that."
else
var/obj/item/weapon/twohanded/fireaxe/F = C
- if(F:wielded)
+ if(F.wielded)
spawn(0) close(1)
else
- user << "\red You need to be wielding the Fire axe to do that."
+ user << "\red You need to be wielding \the [C] to do that."
else
..()
@@ -1007,7 +1002,9 @@ About the new airlock wires panel:
if(operating || welded || locked)
return
if(!forced)
- if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) )
+ //despite the name, this wire is for general door control.
+ //Bolts are already covered by the check for locked, above
+ if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
return
if(safe)
for(var/turf/turf in locs)
@@ -1131,9 +1128,6 @@ About the new airlock wires panel:
..()
update_icon()
-/obj/machinery/door/airlock/proc/hasPower()
- return ((src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0) && !(stat & (NOPOWER|BROKEN)))
-
/obj/machinery/door/airlock/proc/prison_open()
src.unlock()
src.open()
diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm
index 7ad909c8eb..ad9d991036 100644
--- a/code/game/machinery/doors/airlock_control.dm
+++ b/code/game/machinery/doors/airlock_control.dm
@@ -8,11 +8,6 @@ obj/machinery/door/airlock
var/datum/radio_frequency/radio_connection
var/cur_command = null //the command the door is currently attempting to complete
-obj/machinery/door/airlock/proc/can_radio()
- if(!arePowerSystemsOn())
- return 0
- return 1
-
obj/machinery/door/airlock/process()
..()
if (arePowerSystemsOn())
@@ -21,8 +16,6 @@ obj/machinery/door/airlock/process()
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
if (!arePowerSystemsOn()) return //no power
- if (!can_radio()) return //no radio
-
if(!signal || signal.encryption) return
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 209b993788..eefe844e47 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -24,9 +24,35 @@
src.base_state = src.icon_state
return
+/obj/machinery/door/window/proc/shatter(var/display_message = 1)
+ new /obj/item/weapon/shard(src.loc)
+ var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
+ CC.amount = 2
+ var/obj/item/weapon/airlock_electronics/ae
+ if(!electronics)
+ ae = new/obj/item/weapon/airlock_electronics( src.loc )
+ if(!src.req_access)
+ src.check_access()
+ if(src.req_access.len)
+ ae.conf_access = src.req_access
+ else if (src.req_one_access.len)
+ ae.conf_access = src.req_one_access
+ ae.one_access = 1
+ else
+ ae = electronics
+ electronics = null
+ ae.loc = src.loc
+ if(operating == -1)
+ ae.icon_state = "door_electronics_smoked"
+ operating = 0
+ src.density = 0
+ playsound(src, "shatter", 70, 1)
+ if(display_message)
+ visible_message("[src] shatters!")
+ del(src)
+
/obj/machinery/door/window/Del()
density = 0
- playsound(src, "shatter", 70, 1)
update_nearby_tiles()
..()
@@ -120,28 +146,7 @@
/obj/machinery/door/window/take_damage(var/damage)
src.health = max(0, src.health - damage)
if (src.health <= 0)
- new /obj/item/weapon/shard(src.loc)
- var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
- CC.amount = 2
- var/obj/item/weapon/airlock_electronics/ae
- if(!electronics)
- ae = new/obj/item/weapon/airlock_electronics( src.loc )
- if(!src.req_access)
- src.check_access()
- if(src.req_access.len)
- ae.conf_access = src.req_access
- else if (src.req_one_access.len)
- ae.conf_access = src.req_one_access
- ae.one_access = 1
- else
- ae = electronics
- electronics = null
- ae.loc = src.loc
- if(operating == -1)
- ae.icon_state = "door_electronics_smoked"
- operating = 0
- src.density = 0
- del(src)
+ shatter()
return
/obj/machinery/door/window/attack_ai(mob/user as mob)
@@ -215,7 +220,7 @@
ae.icon_state = "door_electronics_smoked"
operating = 0
- del(src)
+ shatter(src)
return
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 632fee8215..2ebefc8625 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -119,17 +119,13 @@
user.show_message(text("\red [src] is now secured."))
src.overlays += "[base_state]-s"
-/obj/machinery/flasher_button/attack_ai(mob/user as mob)
- return src.attack_hand(user)
+/obj/machinery/button/flasher
+ name = "flasher button"
+ desc = "A remote control switch for a mounted flasher."
-/obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user as mob)
- return src.attack_hand(user)
+/obj/machinery/button/flasher/attack_hand(mob/user as mob)
-/obj/machinery/flasher_button/attack_hand(mob/user as mob)
-
- if(stat & (NOPOWER|BROKEN))
- return
- if(active)
+ if(..())
return
use_power(5)
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 68009eec60..2d5b9394d0 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -114,6 +114,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.anchored = 1//So space wind cannot drag it.
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
hologram.SetLuminosity(2) //hologram lighting
+ hologram.color = color //painted holopad gives coloured holograms
SetLuminosity(2) //pad lighting
icon_state = "holopad1"
A.holo = src
diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm
index a4bd1456cf..e341a8fc7f 100644
--- a/code/game/machinery/holosign.dm
+++ b/code/game/machinery/holosign.dm
@@ -32,42 +32,23 @@
on_icon = "surgery"
////////////////////SWITCH///////////////////////////////////////
-/obj/machinery/holosign_switch
+/obj/machinery/button/holosign
name = "holosign switch"
- icon = 'icons/obj/power.dmi'
- icon_state = "light1"
desc = "A remote control switch for holosign."
- var/id = null
- var/active = 0
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 4
+ icon = 'icons/obj/power.dmi'
+ icon_state = "crema_switch"
-/obj/machinery/holosign_switch/attack_ai(mob/user as mob)
- return src.attack_hand(user)
-/
-
-/obj/machinery/holosign_switch/attackby(obj/item/weapon/W, mob/user as mob)
- if(istype(W, /obj/item/device/detective_scanner))
- return
- return src.attack_hand(user)
-
-/obj/machinery/holosign_switch/attack_hand(mob/user as mob)
- src.add_fingerprint(usr)
- if(stat & (NOPOWER|BROKEN))
+/obj/machinery/button/holosign/attack_hand(mob/user as mob)
+ if(..())
return
add_fingerprint(user)
use_power(5)
active = !active
- if(active)
- icon_state = "light1"
- else
- icon_state = "light0"
+ icon_state = "light[active]"
- for(var/obj/machinery/holosign/M in world)
+ for(var/obj/machinery/holosign/M in machines)
if (M.id == src.id)
spawn( 0 )
M.toggle()
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index 500c2cf061..a9be665022 100755
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -115,17 +115,13 @@
ignite()
..(severity)
-/obj/machinery/ignition_switch/attack_ai(mob/user as mob)
- return src.attack_hand(user)
+/obj/machinery/button/ignition
+ name = "ignition switch"
+ desc = "A remote control switch for a mounted igniter."
-/obj/machinery/ignition_switch/attackby(obj/item/weapon/W, mob/user as mob)
- return src.attack_hand(user)
+/obj/machinery/button/ignition/attack_hand(mob/user as mob)
-/obj/machinery/ignition_switch/attack_hand(mob/user as mob)
-
- if(stat & (NOPOWER|BROKEN))
- return
- if(active)
+ if(..())
return
use_power(5)
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index 4301d34495..2a6755015b 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -70,7 +70,7 @@ datum/track/New(var/title_name, var/audio)
return
if(stat & (NOPOWER|BROKEN))
- usr << "\the [src] doesn't appear to function."
+ usr << "\The [src] doesn't appear to function."
return
if(href_list["change_track"])
@@ -109,7 +109,7 @@ datum/track/New(var/title_name, var/audio)
/obj/machinery/media/jukebox/interact(mob/user)
if(stat & (NOPOWER|BROKEN))
- usr << "\the [src] doesn't appear to function."
+ usr << "\The [src] doesn't appear to function."
return
ui_interact(user)
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index 52ca3debd9..7b186bcc9c 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -16,17 +16,14 @@
var/icon_off = "smartfridge-off"
var/icon_panel = "smartfridge-panel"
var/item_quants = list()
- var/ispowered = 1 //starts powered
- var/isbroken = 0
var/seconds_electrified = 0;
var/shoot_inventory = 0
var/locked = 0
- var/panel_open = 0 //Hacking a smartfridge
var/scan_id = 1
var/is_secure = 0
var/datum/wires/smartfridge/wires = null
-/obj/machinery/smartfridge/secure/
+/obj/machinery/smartfridge/secure
is_secure = 1
/obj/machinery/smartfridge/New()
@@ -121,8 +118,39 @@
if(istype(O,/obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks) || istype(O,/obj/item/weapon/reagent_containers/food/condiment))
return 1
+/obj/machinery/smartfridge/drying_rack
+ name = "\improper Drying Rack"
+ desc = "A machine for drying plants."
+
+/obj/machinery/smartfridge/drying_rack/accept_check(var/obj/item/O as obj)
+ if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/))
+ var/obj/item/weapon/reagent_containers/food/snacks/S = O
+ if (S.dried_type)
+ return 1
+ return 0
+
+/obj/machinery/smartfridge/drying_rack/process()
+ ..()
+ if (contents.len)
+ dry()
+
+/obj/machinery/smartfridge/drying_rack/proc/dry()
+ for(var/obj/item/weapon/reagent_containers/food/snacks/S in contents)
+ if(S.dried_type == S.type)
+ S.dry = 1
+ item_quants[S.name]--
+ S.name = "dried [S.name]"
+ S.loc = loc
+ else
+ var/D = S.dried_type
+ new D(loc)
+ item_quants[S.name]--
+ del(S)
+ return
+ return
+
/obj/machinery/smartfridge/process()
- if(!src.ispowered)
+ if(stat & (BROKEN|NOPOWER))
return
if(src.seconds_electrified > 0)
src.seconds_electrified--
@@ -130,16 +158,16 @@
src.throw_item()
/obj/machinery/smartfridge/power_change()
+ var/old_stat = stat
..()
- if( !(stat & NOPOWER) )
- src.ispowered = 1
- if(!isbroken)
- icon_state = icon_on
+ if(old_stat != stat)
+ update_icon()
+
+/obj/machinery/smartfridge/update_icon()
+ if(stat & (BROKEN|NOPOWER))
+ icon_state = icon_off
else
- spawn(rand(0, 15))
- src.ispowered = 0
- if(!isbroken)
- icon_state = icon_off
+ icon_state = icon_on
/*******************
* Item Adding
@@ -148,7 +176,7 @@
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/screwdriver))
panel_open = !panel_open
- user << "You [panel_open ? "open" : "close"] the maintenance panel."
+ user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].")
overlays.Cut()
if(panel_open)
overlays += image(icon, icon_panel)
@@ -160,7 +188,7 @@
attack_hand(user)
return
- if(!src.ispowered)
+ if(stat & NOPOWER)
user << "\The [src] is unpowered and useless."
return
@@ -175,13 +203,12 @@
item_quants[O.name]++
else
item_quants[O.name] = 1
- user.visible_message("[user] has added \the [O] to \the [src].", \
- "You add \the [O] to \the [src].")
+ user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].")
nanomanager.update_uis(src)
- else if(istype(O, /obj/item/weapon/storage/bag/plants))
- var/obj/item/weapon/storage/bag/plants/P = O
+ else if(istype(O, /obj/item/weapon/storage/bag))
+ var/obj/item/weapon/storage/bag/P = O
var/plants_loaded = 0
for(var/obj/G in P.contents)
if(accept_check(G))
@@ -197,9 +224,7 @@
plants_loaded++
if(plants_loaded)
- user.visible_message( \
- "[user] loads \the [src] with \the [P].", \
- "You load \the [src] with \the [P].")
+ user.visible_message("[user] loads \the [src] with \the [P].", "You load \the [src] with \the [P].")
if(P.contents.len > 0)
user << "Some items are refused."
@@ -210,7 +235,7 @@
return 1
/obj/machinery/smartfridge/secure/attackby(var/obj/item/O as obj, var/mob/user as mob)
- if (istype(O, /obj/item/weapon/card/emag))
+ if(istype(O, /obj/item/weapon/card/emag))
emagged = 1
locked = -1
user << "You short out the product lock on [src]."
@@ -222,7 +247,8 @@
return 0
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
- if(!ispowered) return
+ if(stat & (NOPOWER|BROKEN))
+ return
wires.Interact(user)
ui_interact(user)
@@ -244,32 +270,32 @@
for (var/i=1 to length(item_quants))
var/K = item_quants[i]
var/count = item_quants[K]
- if (count > 0)
+ if(count > 0)
items.Add(list(list("display_name" = html_encode(capitalize(K)), "vend" = i, "quantity" = count)))
- if (items.len > 0)
+ if(items.len > 0)
data["contents"] = items
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
- if (!ui)
+ if(!ui)
ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
ui.set_initial_data(data)
ui.open()
/obj/machinery/smartfridge/Topic(href, href_list)
- if (..()) return 0
+ if(..()) return 0
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
src.add_fingerprint(user)
- if (href_list["close"])
+ if(href_list["close"])
user.unset_machine()
ui.close()
return 0
- if (href_list["vend"])
+ if(href_list["vend"])
var/index = text2num(href_list["vend"])
var/amount = text2num(href_list["amount"])
var/K = item_quants[index]
@@ -281,10 +307,10 @@
var/i = amount
for(var/obj/O in contents)
- if (O.name == K)
+ if(O.name == K)
O.loc = loc
i--
- if (i <= 0)
+ if(i <= 0)
return 1
return 1
@@ -319,9 +345,9 @@
*************************/
/obj/machinery/smartfridge/secure/Topic(href, href_list)
- if(!ispowered) return 0
- if (usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
- if (!allowed(usr) && !emagged && locked != -1 && href_list["vend"])
- usr << "\red Access denied."
+ if(stat & (NOPOWER|BROKEN)) return 0
+ if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
+ if(!allowed(usr) && !emagged && locked != -1 && href_list["vend"])
+ usr << "Access denied."
return 0
return ..()
diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index 1c9a9bd21d..dcf66a12b7 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -15,7 +15,7 @@
/obj/machinery/light_switch/New()
..()
spawn(5)
- src.area = src.loc.loc
+ src.area = get_area(src)
if(otherarea)
src.area = locate(text2path("/area/[otherarea]"))
@@ -32,10 +32,7 @@
if(stat & NOPOWER)
icon_state = "light-p"
else
- if(on)
- icon_state = "light1"
- else
- icon_state = "light0"
+ icon_state = "light[on]"
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 4d192c5dd9..819cc05632 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -28,6 +28,9 @@ Class Variables:
component_parts (list)
A list of component parts of machine used by frame based machines.
+ panel_open (num)
+ Whether the panel is open
+
uid (num)
Unique id of machine across all machines.
@@ -43,9 +46,6 @@ Class Variables:
MAINT:8 -- machine is currently under going maintenance.
EMPED:16 -- temporary broken by EMP pulse
- manual (num)
- Currently unused.
-
Class Procs:
New() 'game/machinery/machine.dm'
@@ -104,13 +104,12 @@ Class Procs:
//2 = run auto, use active
var/idle_power_usage = 0
var/active_power_usage = 0
- var/power_channel = EQUIP
- //EQUIP,ENVIRON or LIGHT
- var/list/component_parts = list() //list of all the parts used to build it, if made from certain kinds of frames.
+ var/power_channel = EQUIP //EQUIP, ENVIRON or LIGHT
+ var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
var/uid
- var/manual = 0
- var/interact_offline = 0 // Can the machine be interacted with while de-powered.
+ var/panel_open = 0
var/global/gl_uid = 1
+ var/interact_offline = 0 // Can the machine be interacted with while de-powered.
/obj/machinery/New(l, d=0)
..(l)
@@ -187,63 +186,9 @@ Class Procs:
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
if(..())
return 1
- if(!can_be_used_by(usr, be_close = checkrange))
- return 1
- add_fingerprint(usr)
- return 0
-
-/obj/machinery/proc/can_be_used_by(mob/user, be_close = 1)
if(!interact_offline && stat & (NOPOWER|BROKEN))
- return 0
- if(!user.canUseTopic(src, be_close))
- return 0
- return 1
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-/mob/proc/canUseTopic(atom/movable/M, be_close = 1)
- return
-
-/mob/dead/observer/canUseTopic(atom/movable/M, be_close = 1)
- if(check_rights(R_ADMIN, 0))
- return
-
-/mob/living/canUseTopic(atom/movable/M, be_close = 1, no_dextery = 0)
- if(no_dextery)
- src << "You don't have the dexterity to do this!"
- return 0
- return be_close && !in_range(M, src)
-
-/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 1)
- if(restrained() || lying || stat || stunned || weakened)
- return
- if(be_close && !in_range(M, src))
- if(TK in mutations)
- var/mob/living/carbon/human/H = M
- if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab))
- return 1
- return
- if(!isturf(M.loc) && M.loc != src)
- return
- return 1
-
-/mob/living/silicon/ai/canUseTopic(atom/movable/M)
- if(stat)
- return
- // Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
- // unless it's on the same level as the object it's interacting with.
- if(!(z == M.z || M.z in config.player_levels))
- return
- //stop AIs from leaving windows open and using then after they lose vision
- //apc_override is needed here because AIs use their own APC when powerless
- if(cameranet && !cameranet.checkTurfVis(get_turf(M)) && !apc_override)
- return
- return 1
-
-/mob/living/silicon/robot/canUseTopic(atom/movable/M)
- if(stat || lockcharge || stunned || weakened)
- return
- return 1
+ return 1
+ return 0
////////////////////////////////////////////////////////////////////////////////////////////
@@ -282,7 +227,7 @@ Class Procs:
src.add_fingerprint(user)
- return 0
+ return ..()
/obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames.
return
@@ -292,15 +237,15 @@ Class Procs:
gl_uid++
/obj/machinery/proc/state(var/msg)
- for(var/mob/O in hearers(src, null))
- O.show_message("\icon[src] [msg]", 2)
+ for(var/mob/O in hearers(src, null))
+ O.show_message("\icon[src] [msg]", 2)
/obj/machinery/proc/ping(text=null)
- if (!text)
- text = "\The [src] pings."
+ if (!text)
+ text = "\The [src] pings."
- state(text, "blue")
- playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
+ state(text, "blue")
+ playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
/obj/machinery/proc/shock(mob/user, prb)
if(inoperable())
@@ -321,6 +266,54 @@ Class Procs:
else
return 0
+/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
+ if(!istype(C))
+ return 0
+ if(!panel_open)
+ return 0
+ . = dismantle()
+
+/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S)
+ if(!istype(S))
+ return 0
+ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ panel_open = !panel_open
+ user << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]."
+ update_icon()
+ return 1
+
+/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
+ if(!istype(R))
+ return 0
+ if(!component_parts)
+ return 0
+ if(panel_open)
+ var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
+ var/P
+ for(var/obj/item/weapon/stock_parts/A in component_parts)
+ for(var/D in CB.req_components)
+ var/T = text2path(D)
+ if(ispath(A.type, T))
+ P = T
+ break
+ for(var/obj/item/weapon/stock_parts/B in R.contents)
+ if(istype(B, P) && istype(A, P))
+ if(B.rating > A.rating)
+ R.remove_from_storage(B, src)
+ R.handle_item_insertion(A, 1)
+ component_parts -= A
+ component_parts += B
+ B.loc = null
+ user << "[A.name] replaced with [B.name]."
+ break
+ update_icon()
+ RefreshParts()
+ else
+ user << "Following parts detected in the machine:"
+ for(var/var/obj/item/C in component_parts)
+ user << " [C.name]"
+ return 1
+
/obj/machinery/proc/dismantle()
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index a2dd432d99..8569ede3fd 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -323,7 +323,7 @@
if(speed <= 0)
speed = 1
if("setpath")
- var/newpath = copytext(sanitize(input(usr, "Please define a new path!",,path) as text|null),1,MAX_MESSAGE_LEN)
+ var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN))
if(newpath && newpath != "")
moving = 0 // stop moving
path = newpath
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 16e1cc032d..56fcd1298e 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -194,7 +194,7 @@ Transponder Codes:"}
updateDialog()
else if(href_list["locedit"])
- var/newloc = copytext(sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null),1,MAX_MESSAGE_LEN)
+ var/newloc = sanitize(copytext(input("Enter New Location", "Navigation Beacon", location) as text|null,1,MAX_MESSAGE_LEN))
if(newloc)
location = newloc
updateDialog()
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 5e278bf2f5..5c56690228 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -945,7 +945,7 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
user << "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?"
else
var/s = strip_html( input(user, "Write something", "Newspaper", "") )
- s = copytext(sanitize(s), 1, MAX_MESSAGE_LEN)
+ s = sanitize(copytext(s, 1, MAX_MESSAGE_LEN))
if (!s)
return
if (!in_range(src, usr) && src.loc != usr)
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index baa5b9f975..8241887072 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -48,6 +48,8 @@ Buildable meters
#define PIPE_SCRUBBERS_DOWN 40
#define PIPE_SUPPLY_CAP 41
#define PIPE_SCRUBBERS_CAP 42
+///// Mirrored T-valve ~ because I couldn't be bothered re-sorting all of the defines
+#define PIPE_MTVALVEM 43
/obj/item/pipe
name = "pipe"
@@ -60,7 +62,6 @@ Buildable meters
icon = 'icons/obj/pipe-item.dmi'
icon_state = "simple"
item_state = "buildpipe"
- flags = TABLEPASS|FPRINT
w_class = 3
level = 2
@@ -130,6 +131,8 @@ Buildable meters
src.pipe_type = PIPE_PASSIVE_GATE
else if(istype(make_from, /obj/machinery/atmospherics/unary/heat_exchanger))
src.pipe_type = PIPE_HEAT_EXCHANGE
+ else if(istype(make_from, /obj/machinery/atmospherics/tvalve/mirrored))
+ src.pipe_type = PIPE_MTVALVEM
else if(istype(make_from, /obj/machinery/atmospherics/tvalve))
src.pipe_type = PIPE_MTVALVE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/hidden/supply))
@@ -244,6 +247,7 @@ Buildable meters
"scrubbers pipe down", \
"supply pipe cap", \
"scrubbers pipe cap", \
+ "t-valve m", \
)
name = nlist[pipe_type+1] + " fitting"
var/list/islist = list( \
@@ -293,6 +297,7 @@ Buildable meters
"cap", \
"cap", \
"cap", \
+ "mtvalvem", \
)
icon_state = islist[pipe_type + 1]
@@ -369,9 +374,9 @@ Buildable meters
return dir|flip|cw|acw
if(PIPE_MANIFOLD, PIPE_SUPPLY_MANIFOLD, PIPE_SCRUBBERS_MANIFOLD)
return flip|cw|acw
- if(PIPE_GAS_FILTER, PIPE_GAS_MIXER,PIPE_MTVALVE)
+ if(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_MTVALVE)
return dir|flip|cw
- if(PIPE_GAS_FILTER_M, PIPE_GAS_MIXER_M)
+ if(PIPE_GAS_FILTER_M, PIPE_GAS_MIXER_M, PIPE_MTVALVEM)
return dir|flip|acw
if(PIPE_GAS_MIXER_T)
return dir|cw|acw
@@ -925,6 +930,26 @@ Buildable meters
V.node3.initialize()
V.node3.build_network()
+ if(PIPE_MTVALVEM) //manual t-valve
+ var/obj/machinery/atmospherics/tvalve/mirrored/V = new(src.loc)
+ V.set_dir(dir)
+ V.initialize_directions = pipe_dir
+ if (pipename)
+ V.name = pipename
+ var/turf/T = V.loc
+ V.level = T.intact ? 2 : 1
+ V.initialize()
+ V.build_network()
+ if (V.node1)
+ V.node1.initialize()
+ V.node1.build_network()
+ if (V.node2)
+ V.node2.initialize()
+ V.node2.build_network()
+ if (V.node3)
+ V.node3.initialize()
+ V.node3.build_network()
+
if(PIPE_CAP)
var/obj/machinery/atmospherics/pipe/cap/C = new(src.loc)
C.set_dir(dir)
@@ -1133,7 +1158,6 @@ Buildable meters
icon = 'icons/obj/pipe-item.dmi'
icon_state = "meter"
item_state = "buildpipe"
- flags = TABLEPASS|FPRINT
w_class = 4
/obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
@@ -1168,6 +1192,7 @@ Buildable meters
#undef PIPE_VOLUME_PUMP
#undef PIPE_OUTLET_INJECT
#undef PIPE_MTVALVE
+#undef PIPE_MTVALVEM
#undef PIPE_GAS_FILTER_M
#undef PIPE_GAS_MIXER_T
#undef PIPE_GAS_MIXER_M
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 49f566af57..fb296d2409 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -20,6 +20,7 @@
Pipe Cap
4-Way Manifold
Manual T-Valve
+Manual T-Valve - Mirrored
Upward Pipe
Downward Pipe
Supply pipes:
@@ -48,10 +49,10 @@
Scrubber
Meter
Gas Filter
-Gas Filter-Mirrored
+Gas Filter - Mirrored
Gas Mixer
-Gas Mixer-Mirrored
-Gas Mixer-T
+Gas Mixer - Mirrored
+Gas Mixer - T
Omni Gas Mixer
Omni Gas Filter
Heat exchange:
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 7497edd695..c531e53f96 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -154,7 +154,7 @@
user << "There seems to be a firewall preventing you from accessing this device."
return 0
- if (get_dist(src, user) > 0 && !issilicon(user))
+ if (get_dist(src, user) > 1 && !issilicon(user))
user << "You are too far away."
user.unset_machine()
user << browse(null, "window=turretid")
@@ -821,7 +821,7 @@
if(istype(I, /obj/item/weapon/pen)) //you can rename turrets like bots!
var/t = input(user, "Enter new turret name", name, finish_name) as text
- t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
+ t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
if(!t)
return
if(!in_range(src, usr) && loc != usr)
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index 3049a6f694..e4d29467e0 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -3,187 +3,227 @@
icon = 'icons/obj/objects.dmi'
icon_state = "borgcharger0"
density = 1
- anchored = 1.0
+ anchored = 1
use_power = 1
idle_power_usage = 50
active_power_usage = 50
var/mob/occupant = null
- var/max_internal_charge = 15000 // Two charged borgs in a row with default cell
- var/current_internal_charge = 15000 // Starts charged, to prevent power surges on round start
- var/charging_cap_active = 25000 // Active Cap - When cyborg is inside
- var/charging_cap_passive = 2500 // Passive Cap - Recharging internal capacitor when no cyborg is inside
+ var/obj/item/weapon/cell/cell = null
+ //var/max_internal_charge = 15000 // Two charged borgs in a row with default cell
+ //var/current_internal_charge = 15000 // Starts charged, to prevent power surges on round start
+ var/charging_cap_active = 1000 // Active Cap - When cyborg is inside
+ var/charging_cap_passive = 250 // Passive Cap - Recharging internal capacitor when no cyborg is inside
var/icon_update_tick = 0 // Used to update icon only once every 10 ticks
+ var/charge_rate = 250 // How much charge is restored per tick
+ var/weld_rate = 0 // How much brute damage is repaired per tick
+ var/wire_rate = 0 // How much burn damage is repaired per tick
+/obj/machinery/recharge_station/New()
+ ..()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/recharge_station(src)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
+ component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
+ component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
+ component_parts += new /obj/item/weapon/cell/high(src)
+ component_parts += new /obj/item/stack/cable_coil(src, 5)
- New()
- ..()
- build_icon()
- update_icon()
+ build_icon()
+ update_icon()
- process()
- if(stat & (BROKEN))
- return
+ RefreshParts()
- if((stat & (NOPOWER)) && !current_internal_charge) // No Power.
- return
-
- var/chargemode = 0
- if(src.occupant)
- process_occupant()
- chargemode = 1
- // Power Stuff
-
- if(stat & NOPOWER)
- current_internal_charge = max(0, (current_internal_charge - (50 * CELLRATE))) // Internal Circuitry, 50W load. No power - Runs from internal cell
- return // No external power = No charging
-
-
-
- if(max_internal_charge < current_internal_charge)
- current_internal_charge = max_internal_charge// Safety check if varedit adminbus or something screws up
- // Calculating amount of power to draw
- var/charge_diff = max_internal_charge - current_internal_charge // OK we have charge differences
- charge_diff = charge_diff / CELLRATE // Deconvert from Charge to Joules
- if(chargemode) // Decide if use passive or active power
- charge_diff = between(0, charge_diff, charging_cap_active) // Trim the values to limits
- else // We should have load for this tick in Watts
- charge_diff = between(0, charge_diff, charging_cap_passive)
-
- charge_diff += 50 // 50W for circuitry
-
- if(idle_power_usage != charge_diff) // Force update, but only when our power usage changed this tick.
- idle_power_usage = charge_diff
- update_use_power(1,1)
-
- current_internal_charge = min((current_internal_charge + ((charge_diff - 50) * CELLRATE)), max_internal_charge)
-
- if(icon_update_tick >= 10)
- update_icon()
- icon_update_tick = 0
- else
- icon_update_tick++
-
- return 1
-
-
- allow_drop()
- return 0
-
- examine(mob/user)
- ..(user)
- user << "The charge meter reads: [round(chargepercentage())]%"
-
- proc/chargepercentage()
- return ((current_internal_charge / max_internal_charge) * 100)
-
- relaymove(mob/user as mob)
- if(user.stat)
- return
- src.go_out()
+/obj/machinery/recharge_station/process()
+ if(stat & (BROKEN))
return
- emp_act(severity)
- if(stat & (BROKEN|NOPOWER))
- ..(severity)
- return
- if(occupant)
- occupant.emp_act(severity)
- go_out()
- ..(severity)
-
- update_icon()
- ..()
- overlays.Cut()
- switch(round(chargepercentage()))
- if(1 to 20)
- overlays += image('icons/obj/objects.dmi', "statn_c0")
- if(21 to 40)
- overlays += image('icons/obj/objects.dmi', "statn_c20")
- if(41 to 60)
- overlays += image('icons/obj/objects.dmi', "statn_c40")
- if(61 to 80)
- overlays += image('icons/obj/objects.dmi', "statn_c60")
- if(81 to 98)
- overlays += image('icons/obj/objects.dmi', "statn_c80")
- if(99 to 110)
- overlays += image('icons/obj/objects.dmi', "statn_c100")
-
- proc
- build_icon()
- if(NOPOWER|BROKEN)
- if(src.occupant)
- icon_state = "borgcharger1"
- else
- icon_state = "borgcharger0"
- else
- icon_state = "borgcharger0"
+ if((stat & (NOPOWER)) && (!cell || cell.percent() <= 0)) // No Power.
+ return
+ var/chargemode = 0
+ if(occupant)
process_occupant()
- if(src.occupant)
- if (istype(occupant, /mob/living/silicon/robot))
- var/mob/living/silicon/robot/R = occupant
- if(R.module)
- R.module.respawn_consumable(R)
- if(!R.cell)
- return
- if(!R.cell.fully_charged())
- var/diff = min(R.cell.maxcharge - R.cell.charge, 250) // Capped at 250 charge / tick
- diff = min(diff, current_internal_charge) // No over-discharging
- R.cell.give(diff)
- current_internal_charge -= diff
- else
- update_use_power(1)
+ chargemode = 1
+ // Power Stuff
+
+ if(!cell) // Shouldn't be possible, but sanity check
+ return
+
+ if(stat & NOPOWER)
+ cell.use(50 * CELLRATE) // Internal Circuitry, 50W load. No power - Runs from internal cell
+ return // No external power = No charging
+
+ // Calculating amount of power to draw
+ var/charge_diff = (chargemode ? charging_cap_active : charging_cap_passive) + 50 // 50W for circuitry
+
+ charge_diff = cell.give(charge_diff)
+
+ if(idle_power_usage != charge_diff) // Force update, but only when our power usage changed this tick.
+ idle_power_usage = charge_diff
+ update_use_power(1, 1)
+
+ if(icon_update_tick >= 10)
+ update_icon()
+ icon_update_tick = 0
+ else
+ icon_update_tick++
+
+ return 1
+
+
+/obj/machinery/recharge_station/allow_drop()
+ return 0
+
+/obj/machinery/recharge_station/examine(mob/user)
+ ..(user)
+ user << "The charge meter reads: [round(chargepercentage())]%"
+
+/obj/machinery/recharge_station/proc/chargepercentage()
+ if(!cell)
+ return 0
+ return cell.percent()
+
+/obj/machinery/recharge_station/relaymove(mob/user as mob)
+ if(user.stat)
+ return
+ go_out()
+ return
+
+/obj/machinery/recharge_station/emp_act(severity)
+ if(stat & (BROKEN|NOPOWER))
+ ..(severity)
+ return
+ if(occupant)
+ occupant.emp_act(severity)
go_out()
- if(!( src.occupant ))
- return
- //for(var/obj/O in src)
- // O.loc = src.loc
- if (src.occupant.client)
- src.occupant.client.eye = src.occupant.client.mob
- src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.loc = src.loc
- src.occupant = null
- build_icon()
- update_use_power(1)
+ if(cell)
+ cell.emp_act(severity)
+ ..(severity)
+
+/obj/machinery/recharge_station/attackby(var/obj/item/O as obj, var/mob/user as mob)
+ if(!occupant)
+ if(default_deconstruction_screwdriver(user, O))
+ return
+ if(default_deconstruction_crowbar(user, O))
+ return
+ if(default_part_replacement(user, O))
return
+ ..()
- verb
- move_eject()
- set category = "Object"
- set src in oview(1)
- if (usr.stat != 0)
- return
- src.go_out()
- add_fingerprint(usr)
- return
+/obj/machinery/recharge_station/RefreshParts()
+ ..()
+ var/man_rating = 0
+ var/cap_rating = 0
- move_inside()
- set category = "Object"
- set src in oview(1)
- if (usr.stat == 2)
- //Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
+ for(var/obj/item/weapon/stock_parts/P in component_parts)
+ if(istype(P, /obj/item/weapon/stock_parts/capacitor))
+ cap_rating += P.rating
+ if(istype(P, /obj/item/weapon/stock_parts/manipulator))
+ man_rating += P.rating
+ cell = locate(/obj/item/weapon/cell) in component_parts
+
+ charge_rate = 125 * cap_rating
+ charging_cap_passive = charge_rate
+ weld_rate = max(0, man_rating - 3)
+ wire_rate = max(0, man_rating - 5)
+
+/obj/machinery/recharge_station/update_icon()
+ ..()
+ overlays.Cut()
+ switch(round(chargepercentage()))
+ if(1 to 20)
+ overlays += image('icons/obj/objects.dmi', "statn_c0")
+ if(21 to 40)
+ overlays += image('icons/obj/objects.dmi', "statn_c20")
+ if(41 to 60)
+ overlays += image('icons/obj/objects.dmi', "statn_c40")
+ if(61 to 80)
+ overlays += image('icons/obj/objects.dmi', "statn_c60")
+ if(81 to 98)
+ overlays += image('icons/obj/objects.dmi', "statn_c80")
+ if(99 to 110)
+ overlays += image('icons/obj/objects.dmi', "statn_c100")
+
+
+/obj/machinery/recharge_station/proc/build_icon()
+ if(NOPOWER|BROKEN)
+ if(occupant)
+ icon_state = "borgcharger1"
+ else
+ icon_state = "borgcharger0"
+ else
+ icon_state = "borgcharger0"
+
+/obj/machinery/recharge_station/proc/process_occupant()
+ if(occupant)
+ if(istype(occupant, /mob/living/silicon/robot))
+ var/mob/living/silicon/robot/R = occupant
+ if(R.module)
+ R.module.respawn_consumable(R)
+ if(!R.cell)
return
- if (!(istype(usr, /mob/living/silicon/)))
- usr << "\blue Only non-organics may enter the recharger!"
- return
- if (src.occupant)
- usr << "\blue The cell is already occupied!"
- return
- if (!usr:cell)
- usr<<"\blue Without a powercell, you can't be recharged."
- //Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
- return
- usr.stop_pulling()
- if(usr && usr.client)
- usr.client.perspective = EYE_PERSPECTIVE
- usr.client.eye = src
- usr.loc = src
- src.occupant = usr
- /*for(var/obj/O in src)
- O.loc = src.loc*/
- src.add_fingerprint(usr)
- build_icon()
- update_use_power(1)
- return
\ No newline at end of file
+ if(!R.cell.fully_charged())
+ var/diff = min(R.cell.maxcharge - R.cell.charge, charge_rate) // Capped at charge_rate charge / tick
+ if (cell.use(diff))
+ R.cell.give(diff)
+ if(weld_rate && R.getBruteLoss())
+ R.adjustBruteLoss(-1)
+ if(wire_rate && R.getFireLoss())
+ R.adjustFireLoss(-1)
+ else
+ update_use_power(1)
+
+/obj/machinery/recharge_station/proc/go_out()
+ if(!(occupant))
+ return
+ //for(var/obj/O in src)
+ // O.loc = loc
+ if(occupant.client)
+ occupant.client.eye = occupant.client.mob
+ occupant.client.perspective = MOB_PERSPECTIVE
+ occupant.loc = loc
+ occupant = null
+ build_icon()
+ update_use_power(1)
+ return
+
+/obj/machinery/recharge_station/verb/move_eject()
+ set category = "Object"
+ set src in oview(1)
+ if(usr.stat != 0)
+ return
+ go_out()
+ add_fingerprint(usr)
+ return
+
+/obj/machinery/recharge_station/verb/move_inside()
+ set category = "Object"
+ set src in oview(1)
+ if(usr.stat == 2)
+ //Whoever had it so that a borg with a dead cell can't enter this thing should be shot. --NEO
+ return
+ if(!(istype(usr, /mob/living/silicon/)))
+ usr << "Only non-organics may enter the recharger!"
+ return
+ if(occupant)
+ usr << "The cell is already occupied!"
+ return
+ if(!usr:cell)
+ usr << "Without a powercell, you can't be recharged."
+ //Make sure they actually HAVE a cell, now that they can get in while powerless. --NEO
+ return
+ usr.stop_pulling()
+ if(usr && usr.client)
+ usr.client.perspective = EYE_PERSPECTIVE
+ usr.client.eye = src
+ usr.loc = src
+ occupant = usr
+ /*for(var/obj/O in src)
+ O.loc = loc*/
+ add_fingerprint(usr)
+ build_icon()
+ update_use_power(1)
+ return
\ No newline at end of file
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index bc65e08eb4..c5d389c66e 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -7,12 +7,9 @@
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
var/obj/item/weapon/cell/cell
var/on = 0
- var/open = 0
var/set_temperature = T0C + 50 //K
var/heating_power = 40000
- flags = FPRINT
-
/obj/machinery/space_heater/New()
..()
@@ -22,14 +19,14 @@
/obj/machinery/space_heater/update_icon()
overlays.Cut()
icon_state = "sheater[on]"
- if(open)
+ if(panel_open)
overlays += "sheater-open"
/obj/machinery/space_heater/examine(mob/user)
..(user)
- user << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
- if(open)
+ user << "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]."
+ if(panel_open)
user << "The power cell is [cell ? "installed" : "missing"]."
else
user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
@@ -45,7 +42,7 @@
/obj/machinery/space_heater/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/cell))
- if(open)
+ if(panel_open)
if(cell)
user << "There is already a power cell inside."
return
@@ -63,10 +60,10 @@
user << "The hatch must be open to insert a power cell."
return
else if(istype(I, /obj/item/weapon/screwdriver))
- open = !open
- user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].")
+ panel_open = !panel_open
+ user.visible_message("\blue [user] [panel_open ? "opens" : "closes"] the hatch on the [src].", "\blue You [panel_open ? "open" : "close"] the hatch on the [src].")
update_icon()
- if(!open && user.machine == src)
+ if(!panel_open && user.machine == src)
user << browse(null, "window=spaceheater")
user.unset_machine()
else
@@ -79,7 +76,7 @@
/obj/machinery/space_heater/interact(mob/user as mob)
- if(open)
+ if(panel_open)
var/dat
dat = "Power cell: "
@@ -122,7 +119,7 @@
set_temperature = dd_range(T0C, T0C + 90, set_temperature + value)
if("cellremove")
- if(open && cell && !usr.get_active_hand())
+ if(panel_open && cell && !usr.get_active_hand())
usr.visible_message("\blue [usr] removes \the [cell] from \the [src].", "\blue You remove \the [cell] from \the [src].")
cell.updateicon()
usr.put_in_hands(cell)
@@ -131,7 +128,7 @@
if("cellinstall")
- if(open && !cell)
+ if(panel_open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 4bf1c07abc..f8ae293bba 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -589,7 +589,6 @@
var/radiation_level = 2 // 1 is removing germs, 2 is removing blood, 3 is removing phoron.
var/model_text = "" // Some flavour text for the topic box.
var/locked = 1 // If locked, nothing can be taken from or added to the cycler.
- var/panel_open = 0 // Hacking!
var/can_repair // If set, the cycler can repair voidsuits.
var/electrified = 0
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 23389f507a..f5db4a1ac0 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -9,6 +9,10 @@
var/one_time_use = 0 //Used for one-time-use teleport cards (such as clown planet coordinates.)
//Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
+/* Ghosts can't use this */
+/obj/machinery/computer/teleporter/attack_ghost(user as mob)
+ return 1
+
/obj/machinery/computer/teleporter/New()
src.id = "[rand(1000, 9999)]"
..()
@@ -80,9 +84,11 @@
/obj/machinery/teleport/station/attack_ai()
src.attack_hand()
-/obj/machinery/computer/teleporter/attack_hand()
- if(stat & (NOPOWER|BROKEN))
- return
+/obj/machinery/computer/teleporter/attack_hand(user as mob)
+ if(..()) return
+
+ /* Ghosts can't use this one because it's a direct selection */
+ if(istype(user, /mob/dead/observer)) return
var/list/L = list()
var/list/areaindex = list()
@@ -91,7 +97,7 @@
var/turf/T = get_turf(R)
if (!T)
continue
- if(T.z == 2 || T.z > 7)
+ if(!(T.z in config.player_levels))
continue
var/tmpname = T.loc.name
if(areaindex[tmpname])
@@ -118,8 +124,10 @@
areaindex[tmpname] = 1
L[tmpname] = I
- var/desc = input("Please select a location to lock in.", "Locking Computer") in L
- if(get_dist(src, usr) > 1)
+ var/desc = input("Please select a location to lock in.", "Locking Computer") in L|null
+ if(!desc)
+ return
+ if(get_dist(src, usr) > 1 && !issilicon(usr))
return
src.locked = L[desc]
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index cb76c7921a..8f81c414de 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -89,7 +89,7 @@
return
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
- if(Proj.damage_type == HALLOSS)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
take_damage(Proj.damage)
..()
@@ -299,7 +299,7 @@
popping = 0
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
- if(Proj.damage_type == HALLOSS)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
src.health -= Proj.damage
..()
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 26f1c620c7..f88b7895ae 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -1,17 +1,38 @@
-#define CAT_NORMAL 0
-#define CAT_HIDDEN 1
-#define CAT_COIN 2
+#define CAT_NORMAL 1
+#define CAT_HIDDEN 2 // also used in corresponding wires/vending.dm
+#define CAT_COIN 4
+/**
+ * Datum used to hold information about a product in a vending machine
+ */
/datum/data/vending_product
- var/product_name = "generic"
+ var/product_name = "generic" // Display name for the product
var/product_path = null
- var/amount = 0
- var/price = 0
- var/display_color = "blue"
- var/category = CAT_NORMAL
-
+ var/amount = 0 // Amount held in the vending machine
+ var/price = 0 // Price to buy one
+ var/display_color = null // Display color for vending machine listing
+ var/category = CAT_NORMAL // CAT_HIDDEN for contraband, CAT_COIN for premium
+/datum/data/vending_product/New(var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL)
+ ..()
+
+ src.product_path = path
+
+ if(!name)
+ var/atom/tmp = new path
+ src.product_name = initial(tmp.name)
+ del(tmp)
+ else
+ src.product_name = name
+
+ src.amount = amount
+ src.price = price
+ src.display_color = color
+ src.category = category
+/**
+ * A vending machine
+ */
/obj/machinery/vending
name = "Vendomat"
desc = "A generic vending machine."
@@ -21,69 +42,107 @@
anchored = 1
density = 1
+ var/icon_vend //Icon_state when vending
+ var/icon_deny //Icon_state when denying access
+
+ // Power
use_power = 1
idle_power_usage = 10
var/vend_power_usage = 150 //actuators and stuff
+ // Vending-related
var/active = 1 //No sales pitches if off!
var/vend_ready = 1 //Are we ready to vend?? Is it time??
var/vend_delay = 10 //How long does it take to vend?
- var/datum/data/vending_product/currently_vending = null // A /datum/data/vending_product instance of what we're paying for right now.
-
- // To be filled out at compile time
+ var/categories = CAT_NORMAL // Bitmask of cats we're currently showing
+ var/datum/data/vending_product/currently_vending = null // What we're requesting payment for right now
+ var/status_message = "" // Status screen messages like "insufficient funds", displayed in NanoUI
+ var/status_error = 0 // Set to 1 if status_message is an error
+
+ /*
+ Variables used to initialize the product list
+ These are used for initialization only, and so are optional if
+ product_records is specified
+ */
var/list/products = list() // For each, use the following pattern:
var/list/contraband = list() // list(/type/path = amount,/type/path2 = amount2)
var/list/premium = list() // No specified amount = only one in stock
var/list/prices = list() // Prices for each item, list(/type/path = price), items not in the list don't have a price.
- var/product_slogans = "" //String of slogans separated by semicolons, optional
- var/product_ads = "" //String of small ad messages in the vending screen - random chance
+ // List of vending_product items available.
var/list/product_records = list()
- var/list/hidden_records = list()
- var/list/coin_records = list()
+
+
+ // Variables used to initialize advertising
+ var/product_slogans = "" //String of slogans spoken out loud, separated by semicolons
+ var/product_ads = "" //String of small ad messages in the vending screen
+
+ var/list/ads_list = list()
+
+ // Stuff relating vocalizations
var/list/slogan_list = list()
- var/list/small_ads = list() // small ad messages in the vending screen - random chance of popping up whenever you open it
+ var/shut_up = 1 //Stop spouting those godawful pitches!
var/vend_reply //Thank you for shopping!
var/last_reply = 0
var/last_slogan = 0 //When did we last pitch?
var/slogan_delay = 6000 //How long until we can pitch again?
- var/icon_vend //Icon_state when vending!
- var/icon_deny //Icon_state when vending!
- //var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
+
+ // Things that can go wrong
+ emagged = 0 //Ignores if somebody doesn't have card access to that machine.
var/seconds_electrified = 0 //Shock customers like an airlock.
var/shoot_inventory = 0 //Fire items at customers! We're broken!
- var/shut_up = 1 //Stop spouting those godawful pitches!
- var/extended_inventory = 0 //can we access the hidden inventory?
- var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
+
var/scan_id = 1
var/obj/item/weapon/coin/coin
var/datum/wires/vending/wires = null
- var/check_accounts = 0 // 1 = requires PIN and checks accounts. 0 = You slide an ID, it vends, SPACE COMMUNISM!
- var/obj/item/weapon/spacecash/ewallet/ewallet
-
-
/obj/machinery/vending/New()
..()
wires = new(src)
spawn(4)
- src.slogan_list = text2list(src.product_slogans, ";")
+ if(src.product_slogans)
+ src.slogan_list += text2list(src.product_slogans, ";")
- // So not all machines speak at the exact same time.
- // The first time this machine says something will be at slogantime + this random value,
- // so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated.
- src.last_slogan = world.time + rand(0, slogan_delay)
+ // So not all machines speak at the exact same time.
+ // The first time this machine says something will be at slogantime + this random value,
+ // so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated.
+ src.last_slogan = world.time + rand(0, slogan_delay)
- src.build_inventory(products)
- //Add hidden inventory
- src.build_inventory(contraband, 1)
- src.build_inventory(premium, 0, 1)
+ if(src.product_ads)
+ src.ads_list += text2list(src.product_ads, ";")
+
+ src.build_inventory()
power_change()
return
return
+/**
+ * Build src.produdct_records from the products lists
+ *
+ * src.products, src.contraband, src.premium, and src.prices allow specifying
+ * products that the vending machine is to carry without manually populating
+ * src.product_records.
+ */
+/obj/machinery/vending/proc/build_inventory()
+ var/list/all_products = list(
+ list(src.products, CAT_NORMAL),
+ list(src.contraband, CAT_HIDDEN),
+ list(src.premium, CAT_COIN))
+
+ for(var/current_list in all_products)
+ var/category = current_list[2]
+
+ for(var/entry in current_list[1])
+ var/datum/data/vending_product/product = new/datum/data/vending_product(entry)
+
+ product.price = (entry in src.prices) ? src.prices[entry] : 0
+ product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
+ product.category = category
+
+ src.product_records.Add(product)
+
/obj/machinery/vending/Del()
del(wires) // qdel
wires = null
@@ -119,37 +178,30 @@
return
-/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0)
-
- for(var/typepath in productlist)
- var/amount = productlist[typepath]
- var/price = prices[typepath]
- if(isnull(amount)) amount = 1
-
- var/datum/data/vending_product/R = new /datum/data/vending_product()
-
- R.product_path = typepath
- R.amount = amount
- R.price = price
- R.display_color = pick("red","blue","green")
-
- if(hidden)
- R.category=CAT_HIDDEN
- hidden_records += R
- else if(req_coin)
- R.category=CAT_COIN
- coin_records += R
- else
- R.category=CAT_NORMAL
- product_records += R
-
- var/atom/temp = typepath
- R.product_name = initial(temp.name)
-
-// world << "Added: [R.product_name]] - [R.amount] - [R.product_path]"
- return
-
/obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (currently_vending && vendor_account && !vendor_account.suspended)
+ var/paid = 0
+ var/handled = 0
+ if(istype(W, /obj/item/weapon/card/id))
+ var/obj/item/weapon/card/id/C = W
+ paid = pay_with_card(C)
+ handled = 1
+ else if (istype(W, /obj/item/weapon/spacecash/ewallet))
+ var/obj/item/weapon/spacecash/ewallet/C = W
+ paid = pay_with_ewallet(C)
+ handled = 1
+ else if (istype(W, /obj/item/weapon/spacecash))
+ var/obj/item/weapon/spacecash/C = W
+ paid = pay_with_cash(C, user)
+ handled = 1
+
+ if(paid)
+ src.vend(currently_vending, usr)
+ return
+ else if(handled)
+ nanomanager.update_uis(src)
+ return // don't smack that machine with your 2 thalers
+
if (istype(W, /obj/item/weapon/card/emag))
src.emagged = 1
user << "You short out the product lock on [src]"
@@ -160,7 +212,8 @@
src.overlays.Cut()
if(src.panel_open)
src.overlays += image(src.icon, "[initial(icon_state)]-panel")
- src.updateUsrDialog()
+
+ nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI
return
else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters))
if(src.panel_open)
@@ -170,19 +223,11 @@
user.drop_item()
W.loc = src
coin = W
+ categories |= CAT_COIN
user << "\blue You insert the [W] into the [src]"
+ nanomanager.update_uis(src)
return
- else if(istype(W, /obj/item/weapon/card) && currently_vending)
- var/obj/item/weapon/card/I = W
- scan_card(I)
- else if (istype(W, /obj/item/weapon/spacecash/ewallet))
- user.drop_item()
- W.loc = src
- ewallet = W
- user << "\blue You insert the [W] into the [src]"
-
else if(istype(W, /obj/item/weapon/wrench))
-
if(do_after(user, 20))
if(!src) return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -205,162 +250,205 @@
else
..()
-/obj/machinery/vending/proc/scan_card(var/obj/item/weapon/card/I)
- if(!currently_vending) return
- if (istype(I, /obj/item/weapon/card/id))
- var/obj/item/weapon/card/id/C = I
- visible_message("[usr] swipes a card through [src].")
- var/datum/money_account/CH = get_account(C.associated_account_number)
- if (CH) // Only proceed if card contains proper account number.
- if(!CH.suspended)
- if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
- if(vendor_account)
- var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
- var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
- transfer_and_vend(D)
- else
- usr << "\icon[src]Unable to access account. Check security settings and try again."
- else
- //Just Vend it.
- transfer_and_vend(CH)
- else
- usr << "\icon[src]Connected account has been suspended."
+/**
+ * Receive payment with cashmoney.
+ *
+ * usr is the mob who gets the change.
+ */
+/obj/machinery/vending/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, mob/user)
+ if(currently_vending.price > cashmoney.worth)
+
+ // This is not a status display message, since it's something the character
+ // themselves is meant to see BEFORE putting the money in
+ usr << "\icon[cashmoney] That is not enough money."
+ return 0
+
+ if(istype(cashmoney, /obj/item/weapon/spacecash/bundle))
+ // Bundles can just have money subtracted, and will work
+
+ visible_message("[usr] inserts some cash into [src].")
+ var/obj/item/weapon/spacecash/bundle/cashmoney_bundle = cashmoney
+ cashmoney_bundle.worth -= currently_vending.price
+
+ if(cashmoney_bundle.worth <= 0)
+ usr.drop_from_inventory(cashmoney_bundle)
+ del(cashmoney_bundle)
else
- usr << "\icon[src]Error: Unable to access your account. Please contact technical support if problem persists."
-
-/obj/machinery/vending/proc/transfer_and_vend(var/datum/money_account/acc)
- if(acc)
- var/transaction_amount = currently_vending.price
- if(transaction_amount <= acc.money)
-
- //transfer the money
- acc.money -= transaction_amount
- vendor_account.money += transaction_amount
-
- //create entries in the two account transaction logs
- var/datum/transaction/T = new()
- T.target_name = "[vendor_account.owner_name] (via [src.name])"
- T.purpose = "Purchase of [currently_vending.product_name]"
- if(transaction_amount > 0)
- T.amount = "([transaction_amount])"
- else
- T.amount = "[transaction_amount]"
- T.source_terminal = src.name
- T.date = current_date_string
- T.time = worldtime2text()
- acc.transaction_log.Add(T)
- //
- T = new()
- T.target_name = acc.owner_name
- T.purpose = "Purchase of [currently_vending.product_name]"
- T.amount = "[transaction_amount]"
- T.source_terminal = src.name
- T.date = current_date_string
- T.time = worldtime2text()
- vendor_account.transaction_log.Add(T)
-
- // Vend the item
- src.vend(src.currently_vending, usr)
- currently_vending = null
- else
- usr << "\icon[src]You don't have that much money!"
+ cashmoney_bundle.update_icon()
else
- usr << "\icon[src]Error: Unable to access your account. Please contact technical support if problem persists."
+ // Bills (banknotes) cannot really have worth different than face value,
+ // so we have to eat the bill and spit out change in a bundle
+ // This is really dirty, but there's no superclass for all bills, so we
+ // just assume that all spacecash that's not something else is a bill
+
+ visible_message("[usr] inserts a bill into [src].")
+ var/left = cashmoney.worth - currently_vending.price
+ usr.drop_from_inventory(cashmoney)
+ del(cashmoney)
+
+ if(left)
+ spawn_money(left, src.loc, user)
+
+ // Vending machines have no idea who paid with cash
+ credit_purchase("(cash)")
+ return 1
+
+/**
+ * Scan a chargecard and deduct payment from it.
+ *
+ * Takes payment for whatever is the currently_vending item. Returns 1 if
+ * successful, 0 if failed.
+ */
+/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
+ visible_message("[usr] swipes a card through [src].")
+ if(currently_vending.price > wallet.worth)
+ src.status_message = "Insufficient funds on chargecard."
+ src.status_error = 1
+ return 0
+ else
+ wallet.worth -= currently_vending.price
+ credit_purchase("[wallet.owner_name] (chargecard)")
+ return 1
+
+/**
+ * Scan a card and attempt to transfer payment from associated account.
+ *
+ * Takes payment for whatever is the currently_vending item. Returns 1 if
+ * successful, 0 if failed
+ */
+/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I)
+ visible_message("[usr] swipes a card through [src].")
+ var/datum/money_account/customer_account = get_account(I.associated_account_number)
+ if (!customer_account)
+ src.status_message = "Error: Unable to access account. Please contact technical support if problem persists."
+ src.status_error = 1
+ return 0
+
+ if(customer_account.suspended)
+ src.status_message = "Unable to access account: account suspended."
+ src.status_error = 1
+ return 0
+
+ // Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
+ // empty at high security levels
+ if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
+ var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
+ customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
+
+ if(!customer_account)
+ src.status_message = "Unable to access account: incorrect credentials."
+ src.status_error = 1
+ return 0
+
+ if(currently_vending.price > customer_account.money)
+ src.status_message = "Insufficient funds in account."
+ src.status_error = 1
+ return 0
+ else
+ // Okay to move the money at this point
+
+ // debit money from the purchaser's account
+ customer_account.money -= currently_vending.price
+
+ // create entry in the purchaser's account log
+ var/datum/transaction/T = new()
+ T.target_name = "[vendor_account.owner_name] (via [src.name])"
+ T.purpose = "Purchase of [currently_vending.product_name]"
+ if(currently_vending.price > 0)
+ T.amount = "([currently_vending.price])"
+ else
+ T.amount = "[currently_vending.price]"
+ T.source_terminal = src.name
+ T.date = current_date_string
+ T.time = worldtime2text()
+ customer_account.transaction_log.Add(T)
+
+ // Give the vendor the money. We use the account owner name, which means
+ // that purchases made with stolen/borrowed card will look like the card
+ // owner made them
+ credit_purchase(customer_account.owner_name)
+ return 1
+
+/**
+ * Add money for current purchase to the vendor account.
+ *
+ * Called after the money has already been taken from the customer.
+ */
+/obj/machinery/vending/proc/credit_purchase(var/target as text)
+ vendor_account.money += currently_vending.price
+
+ var/datum/transaction/T = new()
+ T.target_name = target
+ T.purpose = "Purchase of [currently_vending.product_name]"
+ T.amount = "[currently_vending.price]"
+ T.source_terminal = src.name
+ T.date = current_date_string
+ T.time = worldtime2text()
+ vendor_account.transaction_log.Add(T)
/obj/machinery/vending/attack_ai(mob/user as mob)
return attack_hand(user)
-/obj/machinery/vending/proc/GetProductIndex(var/datum/data/vending_product/P)
- var/list/plist
- switch(P.category)
- if(CAT_NORMAL)
- plist=product_records
- if(CAT_HIDDEN)
- plist=hidden_records
- if(CAT_COIN)
- plist=coin_records
- else
- warning("UNKNOWN CATEGORY [P.category] IN TYPE [P.product_path] INSIDE [type]!")
- return plist.Find(P)
-
-/obj/machinery/vending/proc/GetProductByID(var/pid, var/category)
- switch(category)
- if(CAT_NORMAL)
- return product_records[pid]
- if(CAT_HIDDEN)
- return hidden_records[pid]
- if(CAT_COIN)
- return coin_records[pid]
- else
- warning("UNKNOWN PRODUCT: PID: [pid], CAT: [category] INSIDE [type]!")
- return null
-
/obj/machinery/vending/attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
- user.set_machine(src)
if(src.seconds_electrified != 0)
if(src.shock(user, 100))
return
- var/vendorname = (src.name) //import the machine's name
+ wires.Interact(user)
+ ui_interact(user)
- if(src.currently_vending)
- var/dat = "[vendorname]
" //display the name, and added a horizontal rule
- dat += "You have selected [currently_vending.product_name].
Please swipe your ID to pay for the article.
"
- dat += "Cancel"
- user << browse(dat, "window=vending")
- onclose(user, "")
- return
-
- var/dat = "[vendorname]
" //display the name, and added a horizontal rule
- dat += "Select an item:
" //the rest is just general spacing and bolding
-
- if (premium.len > 0)
- dat += "Coin slot: [coin ? coin : "No coin inserted"] (Remove)
"
-
- if (ewallet)
- dat += "Charge card's credits: [ewallet ? ewallet.worth : "No charge card inserted"] (Remove)
"
-
- if (src.product_records.len == 0)
- dat += "No product loaded!"
+/**
+ * Display the NanoUI window for the vending machine.
+ *
+ * See NanoUI documentation for details.
+ */
+/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
+ user.set_machine(src)
+
+ var/list/data = list()
+ if(currently_vending)
+ data["mode"] = 1
+ data["product"] = currently_vending.product_name
+ data["price"] = currently_vending.price
+ data["message_err"] = 0
+ data["message"] = src.status_message
+ data["message_err"] = src.status_error
else
- var/list/display_records = list()
- display_records += src.product_records
+ data["mode"] = 0
+ var/list/listed_products = list()
- if(src.extended_inventory)
- display_records += src.hidden_records
- if(src.coin)
- display_records += src.coin_records
-
- for (var/datum/data/vending_product/R in display_records)
- dat += "[R.product_name]:"
- dat += " [R.amount] "
- if(R.price)
- dat += " (Price: [R.price])"
- if (R.amount > 0)
- var/idx=GetProductIndex(R)
- dat += " (Vend)"
- else
- dat += " SOLD OUT"
- dat += "
"
-
- dat += ""
-
- if(panel_open)
- dat += wires()
-
- if(product_slogans != "")
- dat += "The speaker switch is [shut_up ? "off" : "on"]. Toggle"
-
- user << browse(dat, "window=vending")
- onclose(user, "")
- return
-
-// returns the wire panel text
-/obj/machinery/vending/proc/wires()
- return wires.GetInteractWindow()
+ for(var/key = 1 to src.product_records.len)
+ var/datum/data/vending_product/I = src.product_records[key]
+
+ if(!(I.category & src.categories))
+ continue
+
+ listed_products.Add(list(list(
+ "key" = key,
+ "name" = I.product_name,
+ "price" = I.price,
+ "color" = I.display_color,
+ "amount" = I.amount)))
+
+ data["products"] = listed_products
+
+ if(src.coin)
+ data["coin"] = src.coin.name
+
+ if(src.panel_open)
+ data["panel"] = 1
+ data["speaker"] = src.shut_up ? 0 : 1
+ else
+ data["panel"] = 0
+
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
+ if (!ui)
+ ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600)
+ ui.set_initial_data(data)
+ ui.open()
/obj/machinery/vending/Topic(href, href_list)
if(stat & (BROKEN|NOPOWER))
@@ -378,19 +466,9 @@
usr.put_in_hands(coin)
usr << "\blue You remove the [coin] from the [src]"
coin = null
-
- if(href_list["remove_ewallet"] && !istype(usr,/mob/living/silicon))
- if (!ewallet)
- usr << "There is no charge card in this machine."
- return
- ewallet.loc = src.loc
- if(!usr.get_active_hand())
- usr.put_in_hands(ewallet)
- usr << "\blue You remove the [ewallet] from the [src]"
- ewallet = null
+ categories &= ~CAT_COIN
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
- usr.set_machine(src)
if ((href_list["vend"]) && (src.vend_ready) && (!currently_vending))
if(istype(usr,/mob/living/silicon))
@@ -408,43 +486,32 @@
flick(icon_deny,src)
return
- var/idx=text2num(href_list["vend"])
- var/cat=text2num(href_list["cat"])
-
- var/datum/data/vending_product/R = GetProductByID(idx,cat)
- if (!R || !istype(R) || !R.product_path || R.amount <= 0)
+ var/key = text2num(href_list["vend"])
+ var/datum/data/vending_product/R = product_records[key]
+
+ // This should not happen unless the request from NanoUI was bad
+ if(!(R.category & src.categories))
return
-
- if(R.price == null)
+
+ if(R.price <= 0)
src.vend(R, usr)
else
- if (ewallet)
- if (R.price <= ewallet.worth)
- ewallet.worth -= R.price
- src.vend(R, usr)
- else
- usr << "\red The ewallet doesn't have enough money to pay for that."
- src.currently_vending = R
- src.updateUsrDialog()
+ src.currently_vending = R
+ if(!vendor_account || vendor_account.suspended)
+ src.status_message = "This machine is currently unable to process payments due to problems with the associated account."
+ src.status_error = 1
else
- src.currently_vending = R
- src.updateUsrDialog()
- return
+ src.status_message = "Please swipe a card or insert cash to pay for the item."
+ src.status_error = 0
- else if (href_list["cancel_buying"])
+ else if (href_list["cancelpurchase"])
src.currently_vending = null
- src.updateUsrDialog()
- return
else if ((href_list["togglevoice"]) && (src.panel_open))
src.shut_up = !src.shut_up
src.add_fingerprint(usr)
- src.updateUsrDialog()
- else
- usr << browse(null, "window=vending")
- return
- return
+ nanomanager.update_uis(src)
/obj/machinery/vending/proc/vend(datum/data/vending_product/R, mob/user)
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
@@ -452,8 +519,11 @@
flick(src.icon_deny,src)
return
src.vend_ready = 0 //One thing at a time!!
-
- if (R in coin_records)
+ src.status_message = "Vending..."
+ src.status_error = 0
+ nanomanager.update_uis(src)
+
+ if (R.category & CAT_COIN)
if(!coin)
user << "\blue You need to insert a coin to get this item."
return
@@ -463,8 +533,10 @@
else
user << "\blue You weren't able to pull the coin out fast enough, the machine ate it, string and all."
del(coin)
+ categories &= ~CAT_COIN
else
del(coin)
+ categories &= ~CAT_COIN
R.amount--
@@ -478,17 +550,18 @@
flick(src.icon_vend,src)
spawn(src.vend_delay)
new R.product_path(get_turf(src))
+ src.status_message = ""
+ src.status_error = 0
src.vend_ready = 1
- return
-
- src.updateUsrDialog()
+ currently_vending = null
+ nanomanager.update_uis(src)
/obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user)
if(src.panel_open)
user << "\blue You stock the [src] with \a [R.product_name]"
R.amount++
- src.updateUsrDialog()
+ nanomanager.update_uis(src)
/obj/machinery/vending/process()
if(stat & (BROKEN|NOPOWER))
@@ -546,7 +619,7 @@
new dump_path(src.loc)
R.amount--
break
-
+
stat |= BROKEN
src.icon_state = "[initial(icon_state)]-broken"
return
@@ -794,35 +867,32 @@
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/mtearseed = 2,
/obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,)
premium = list(/obj/item/toy/waterflower = 1)
+
+/**
+ * Populate hydroseeds product_records
+ *
+ * This needs to be customized to fetch the actual names of the seeds, otherwise
+ * the machine would simply list "packet of seeds" times 20
+ */
+/obj/machinery/vending/hydroseeds/build_inventory()
+ var/list/all_products = list(
+ list(src.products, CAT_NORMAL),
+ list(src.contraband, CAT_HIDDEN),
+ list(src.premium, CAT_COIN))
-/obj/machinery/vending/hydroseeds/build_inventory(var/list/productlist,hidden=0,req_coin=0)
+ for(var/current_list in all_products)
+ var/category = current_list[2]
- for(var/typepath in productlist)
- var/amount = productlist[typepath]
- var/price = prices[typepath]
- if(isnull(amount)) amount = 1
+ for(var/entry in current_list[1])
+ var/obj/item/seeds/S = new entry(src)
+ var/name = S.name
+ var/datum/data/vending_product/product = new/datum/data/vending_product(entry, name)
- var/datum/data/vending_product/R = new /datum/data/vending_product()
-
- R.product_path = typepath
- R.amount = amount
- R.price = price
- R.display_color = pick("red","blue","green")
-
- if(hidden)
- R.category=CAT_HIDDEN
- hidden_records += R
- else if(req_coin)
- R.category=CAT_COIN
- coin_records += R
- else
- R.category=CAT_NORMAL
- product_records += R
-
- var/obj/item/seeds/S = new typepath(src)
- R.product_name = S.name
- del(S)
- return
+ product.price = (entry in src.prices) ? src.prices[entry] : 0
+ product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
+ product.category = category
+
+ src.product_records.Add(product)
/obj/machinery/vending/magivend
name = "MagiVend"
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index 77fde8ef7e..ad433d12e2 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -250,7 +250,7 @@
if ( istype(W,/obj/item/clothing/mask/gas ) )
user << "This item does not fit."
return
- if ( istype(W,/obj/item/clothing/mask/cigarette ) )
+ if ( istype(W,/obj/item/clothing/mask/smokable/cigarette ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/head/syndicatefake ) )
diff --git a/code/game/magic/Uristrunes.dm b/code/game/magic/Uristrunes.dm
index 6e0abd177e..cecbefc798 100644
--- a/code/game/magic/Uristrunes.dm
+++ b/code/game/magic/Uristrunes.dm
@@ -68,7 +68,7 @@ var/list/uristrune_cache = list()
var/icon/I = icon('icons/effects/uristrunes.dmi', "blank")
for(var/i = 0, i < 10, i++)
- if(symbol_bits & (1 << i))
+ if(BITTEST(symbol_bits, i))
I.Blend(icon('icons/effects/uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY)
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index e66796fa9c..5b71a34ec6 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -1083,6 +1083,7 @@
/obj/item/mecha_parts/mecha_equipment/tool/passenger/destroy()
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
+ AM << "You tumble out of the destroyed [src.name]!"
return ..()
/obj/item/mecha_parts/mecha_equipment/tool/passenger/Exit(atom/movable/O)
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index bcb907a040..324637cdd3 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -199,7 +199,7 @@
name = "\improper LBX AC 10 \"Scattershot\""
icon_state = "mecha_scatter"
equip_cooldown = 20
- projectile = /obj/item/projectile/bullet/midbullet
+ projectile = /obj/item/projectile/bullet/pistol/medium
fire_sound = 'sound/weapons/Gunshot.ogg'
fire_volume = 80
projectiles = 40
@@ -211,7 +211,7 @@
name = "\improper Ultra AC 2"
icon_state = "mecha_uac2"
equip_cooldown = 10
- projectile = /obj/item/projectile/bullet/weakbullet
+ projectile = /obj/item/projectile/bullet/pistol/medium
fire_sound = 'sound/weapons/Gunshot.ogg'
projectiles = 300
projectiles_per_shot = 3
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 3285218baf..4790550700 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -506,8 +506,25 @@
var/ignore_threshold
if(istype(Proj, /obj/item/projectile/beam/pulse))
ignore_threshold = 1
- src.take_damage(Proj.damage,Proj.flag)
+ src.take_damage(Proj.damage, Proj.flag)
+ if(prob(25)) spark_system.start()
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold)
+
+ //AP projectiles have a chance to cause additional damage
+ if(Proj.penetrating)
+ var/distance = get_dist(Proj.starting, get_turf(loc))
+ var/hit_occupant = 1 //only allow the occupant to be hit once
+ for(var/i in 1 to min(Proj.penetrating, round(Proj.damage/15)))
+ if(src.occupant && hit_occupant && prob(20))
+ Proj.attack_mob(src.occupant, distance)
+ hit_occupant = 0
+ else
+ src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT), 1)
+
+ Proj.penetrating--
+
+ if(prob(15))
+ break //give a chance to exit early
Proj.on_hit(src)
return
diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm
index b9a6ab4e78..c3257bb61b 100644
--- a/code/game/mecha/mecha_parts.dm
+++ b/code/game/mecha/mecha_parts.dm
@@ -9,7 +9,7 @@
icon = 'icons/mecha/mech_construct.dmi'
icon_state = "blank"
w_class = 5
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
origin_tech = "programming=2;materials=2"
var/construction_time = 100
var/list/construction_cost = list("metal"=20000,"glass"=5000)
@@ -20,7 +20,7 @@
icon_state = "backbone"
var/datum/construction/construct
construction_cost = list("metal"=20000)
- flags = FPRINT | CONDUCT
+ flags = CONDUCT
attackby(obj/item/W as obj, mob/user as mob)
if(!construct || !construct.action(W, user))
diff --git a/code/game/mecha/working/hoverpod.dm b/code/game/mecha/working/hoverpod.dm
index 5736e00b4f..1c15bb232d 100644
--- a/code/game/mecha/working/hoverpod.dm
+++ b/code/game/mecha/working/hoverpod.dm
@@ -5,7 +5,7 @@
initial_icon = "engineering_pod"
internal_damage_threshold = 80
step_in = 4
- step_energy_drain = 15
+ step_energy_drain = 10
max_temperature = 20000
health = 150
infra_luminosity = 6
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
new file mode 100644
index 0000000000..f0f5a53aea
--- /dev/null
+++ b/code/game/objects/buckling.dm
@@ -0,0 +1,86 @@
+/obj
+ var/can_buckle = 0
+ var/buckle_movable = 0
+ var/buckle_lying = -1 //bed-like behavior, forces mob.lying = buckle_lying if != -1
+ var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
+ var/mob/living/buckled_mob = null
+
+/obj/attack_hand(mob/living/user)
+ . = ..()
+ if(can_buckle && buckled_mob)
+ user_unbuckle_mob(user)
+
+/obj/MouseDrop_T(mob/living/M, mob/living/user)
+ . = ..()
+ if(can_buckle && istype(M))
+ user_buckle_mob(M, user)
+
+/obj/Del()
+ unbuckle_mob()
+ return ..()
+
+/obj/proc/buckle_mob(mob/living/M)
+ if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || M.pinned.len || (buckle_require_restraints && !M.restrained()))
+ return 0
+
+ M.buckled = src
+ M.set_dir(dir)
+ M.update_canmove()
+ buckled_mob = M
+ post_buckle_mob(M)
+ return 1
+
+/obj/proc/unbuckle_mob()
+ if(buckled_mob && buckled_mob.buckled == src)
+ . = buckled_mob
+ buckled_mob.buckled = null
+ buckled_mob.anchored = initial(buckled_mob.anchored)
+ buckled_mob.update_canmove()
+ buckled_mob = null
+
+ post_buckle_mob(.)
+
+/obj/proc/post_buckle_mob(mob/living/M)
+ return
+
+/obj/proc/user_buckle_mob(mob/living/M, mob/user)
+ if(!ticker)
+ user << "You can't buckle anyone in before the game starts."
+ if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat || istype(user, /mob/living/silicon/pai))
+ return
+
+ if(istype(M, /mob/living/carbon/slime))
+ user << "The [M] is too squishy to buckle in."
+ return
+
+ add_fingerprint(user)
+ unbuckle_mob()
+
+ if(buckle_mob(M))
+ if(M == user)
+ M.visible_message(\
+ "[M.name] buckles themselves to [src].",\
+ "You buckle yourself to [src].",\
+ "You hear metal clanking.")
+ else
+ M.visible_message(\
+ "[M.name] is buckled to [src] by [user.name]!",\
+ "You are buckled to [src] by [user.name]!",\
+ "You hear metal clanking.")
+
+/obj/proc/user_unbuckle_mob(mob/user)
+ var/mob/living/M = unbuckle_mob()
+ world << 3
+ if(M)
+ if(M != user)
+ M.visible_message(\
+ "[M.name] was unbuckled by [user.name]!",\
+ "You were unbuckled from [src] by [user.name].",\
+ "You hear metal clanking.")
+ else
+ M.visible_message(\
+ "[M.name] unbuckled themselves!",\
+ "You unbuckle yourself from [src].",\
+ "You hear metal clanking.")
+ add_fingerprint(user)
+ return M
diff --git a/code/game/objects/effects/chemsmoke.dm b/code/game/objects/effects/chemsmoke.dm
index e62623e2ec..d6d0ac0169 100644
--- a/code/game/objects/effects/chemsmoke.dm
+++ b/code/game/objects/effects/chemsmoke.dm
@@ -165,7 +165,7 @@
continue
var/offset = 0
- var/points = round((radius * 2 * PI) / arcLength)
+ var/points = round((radius * 2 * M_PI) / arcLength)
var/angle = round(ToDegrees(arcLength / radius), 1)
if(!IsInteger(radius))
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index 82d27968db..ea9af2f70f 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -233,6 +233,21 @@ steam.start() -- spawns the effect
return 0
return 1
+/////////////////////////////////////////////
+// Illumination
+/////////////////////////////////////////////
+
+/obj/effect/effect/smoke/illumination
+ name = "illumination"
+ opacity = 0
+ icon = 'icons/effects/effects.dmi'
+ icon_state = "sparks"
+
+/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
+ time_to_live=lifetime
+ ..()
+ SetLuminosity(brightness)
+
/////////////////////////////////////////////
// Bad smoke
/////////////////////////////////////////////
diff --git a/code/WorkInProgress/explosion_particles.dm b/code/game/objects/effects/explosion_particles.dm
similarity index 100%
rename from code/WorkInProgress/explosion_particles.dm
rename to code/game/objects/effects/explosion_particles.dm
diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm
index dbfd0a9e61..b88847c6aa 100644
--- a/code/game/objects/effects/landmarks.dm
+++ b/code/game/objects/effects/landmarks.dm
@@ -144,7 +144,7 @@
/obj/effect/landmark/costume/elpresidente/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
- new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
+ new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/shoes/jackboots(src.loc)
del(src)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index d0c52d7f59..1e3cb7547a 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -10,7 +10,6 @@
var/burning = null
var/hitsound = null
var/w_class = 3.0
- flags = FPRINT | TABLEPASS
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
pass_flags = PASSTABLE
pressure_resistance = 5
@@ -142,9 +141,10 @@
if(isliving(src.loc))
return
user.next_move = max(user.next_move+2,world.time + 2)
- src.pickup(user)
add_fingerprint(user)
user.put_in_active_hand(src)
+ if(src.loc == user)
+ src.pickup(user)
return
@@ -412,9 +412,9 @@
H << "You need a jumpsuit before you can attach this [name]."
return 0
var/obj/item/clothing/under/uniform = H.w_uniform
- if(uniform.hastie)
+ if(uniform.accessories.len && !uniform.can_attach_accessory(src))
if (!disable_warning)
- H << "You already have [uniform.hastie] attached to your [uniform]."
+ H << "You already have an accessory of this type attached to your [uniform]."
return 0
if( !(slot_flags & SLOT_TIE) )
return 0
diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm
index 418209d744..a11b326e45 100644
--- a/code/game/objects/items/apc_frame.dm
+++ b/code/game/objects/items/apc_frame.dm
@@ -5,7 +5,7 @@
desc = "Used for repairing or building APCs"
icon = 'icons/obj/apc_repair.dmi'
icon_state = "apc_frame"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
/obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
diff --git a/code/WorkInProgress/Chinsky/ashtray.dm b/code/game/objects/items/ashtray.dm
similarity index 90%
rename from code/WorkInProgress/Chinsky/ashtray.dm
rename to code/game/objects/items/ashtray.dm
index 1e48c49499..1e2fc4884f 100644
--- a/code/WorkInProgress/Chinsky/ashtray.dm
+++ b/code/game/objects/items/ashtray.dm
@@ -17,15 +17,15 @@
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health < 1)
return
- if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/flame/match))
+ if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/smokable/cigarette) || istype(W, /obj/item/weapon/flame/match))
if (contents.len >= max_butts)
user << "This ashtray is full."
return
user.u_equip(W)
W.loc = src
- if (istype(W,/obj/item/clothing/mask/cigarette))
- var/obj/item/clothing/mask/cigarette/cig = W
+ if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
+ var/obj/item/clothing/mask/smokable/cigarette/cig = W
if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
processing_objects.Remove(cig)
@@ -61,14 +61,14 @@
return
if (contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
- for (var/obj/item/clothing/mask/cigarette/O in contents)
+ for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_empty
return ..()
/obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!")
- for (var/obj/item/clothing/mask/cigarette/O in contents)
+ for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_broken
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index b1b46654bc..5183170aa6 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -39,7 +39,7 @@
close_sound = 'sound/items/zip.ogg'
var/item_path = /obj/item/bodybag
density = 0
- storage_capacity = (mob_size * 2) - 1
+ storage_capacity = (default_mob_size * 2) - 1
var/contains_body = 0
/obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob)
@@ -49,7 +49,7 @@
return
if (!in_range(src, user) && src.loc != user)
return
- t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
+ t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if (t)
src.name = "body bag - "
src.name += t
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index b68e1e61cd..8e1a382a86 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -91,7 +91,8 @@
/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob)
if(M == user)
user << "You take a bite of the crayon and swallow it."
-// user.nutrition += 5
+ user.nutrition += 1
+ user.reagents.add_reagent("crayon_dust",min(5,uses)/3)
if(uses)
uses -= 5
if(uses <= 0)
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index b24bf75ec1..f4f3b843b0 100755
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -10,7 +10,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
icon_state = "pda"
item_state = "electronic"
w_class = 2.0
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_ID | SLOT_BELT
//Main variables
@@ -464,7 +463,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["convo_job"] = sanitize(c["job"])
break
if(mode==41)
- data["manifest"] = data_core.get_manifest_json()
+ data_core.get_manifest_json()
if(mode==3)
@@ -535,12 +534,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
nanoUI = data
// update the ui if it exists, returns null if no ui is passed/found
+ if(ui)
+ ui.load_cached_data(ManifestJSON)
+
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
+
if (!ui)
// the ui does not exist, so we'll create a new() one
- // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
+ // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400)
// when the ui is first opened this is the data it will use
+
+ ui.load_cached_data(ManifestJSON)
+
ui.set_initial_data(data)
// open the new ui window
ui.open()
@@ -720,7 +726,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "The PDA softly beeps."
ui.close()
else
- t = copytext(sanitize(t), 1, 20)
+ t = sanitize(copytext(t, 1, 20))
ttone = t
else
ui.close()
@@ -729,7 +735,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/t = input(U, "Please enter new news tone", name, newstone) as text
if (in_range(src, U) && loc == U)
if (t)
- t = copytext(sanitize(t), 1, 20)
+ t = sanitize(copytext(t, 1, 20))
newstone = t
else
ui.close()
@@ -965,7 +971,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.visible_message("[U] taps on \his PDA's screen.")
U.last_target_click = world.time
var/t = input(U, "Please enter message", P.name, null) as text
- t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
+ t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
if (!t || !istype(P))
return
diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm
index f8bcb9e86b..8c86a37ac0 100644
--- a/code/game/objects/items/devices/PDA/cart.dm
+++ b/code/game/objects/items/devices/PDA/cart.dm
@@ -562,10 +562,10 @@
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
- message1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", message1) as text|null), 1, 40)), 40)
+ message1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", message1) as text|null, 1, 40))), 40)
updateSelfDialog()
if("setmsg2")
- message2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", message2) as text|null), 1, 40)), 40)
+ message2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", message2) as text|null, 1, 40))), 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index fc4f555ed4..75122c7ce0 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -4,7 +4,6 @@
icon_state = "aicard" // aicard-full
item_state = "electronic"
w_class = 2.0
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/flush = null
origin_tech = "programming=4;materials=4"
diff --git a/code/game/objects/items/devices/binoculars.dm b/code/game/objects/items/devices/binoculars.dm
index 0cafa7679c..b6e0ca1aca 100644
--- a/code/game/objects/items/devices/binoculars.dm
+++ b/code/game/objects/items/devices/binoculars.dm
@@ -4,7 +4,7 @@
desc = "A pair of binoculars."
icon_state = "binoculars"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm
index 978cfdb304..1982fbb4f4 100644
--- a/code/game/objects/items/devices/chameleonproj.dm
+++ b/code/game/objects/items/devices/chameleonproj.dm
@@ -1,7 +1,7 @@
/obj/item/device/chameleon
name = "chameleon projector"
icon_state = "shield0"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
item_state = "electronic"
throwforce = 5.0
diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm
index 3168e00feb..faab1ee054 100644
--- a/code/game/objects/items/devices/debugger.dm
+++ b/code/game/objects/items/devices/debugger.dm
@@ -9,7 +9,7 @@
desc = "Used to debug electronic equipment."
icon = 'icons/obj/hacktool.dmi'
icon_state = "hacktool-g"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index 152aa2fa34..6e924ba719 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -7,7 +7,7 @@
w_class = 2.0
throw_speed = 4
throw_range = 10
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
origin_tech = "magnets=2;combat=1"
var/times_used = 0 //Number of times it's been used.
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 35ff3b720a..0f6d0abb10 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -5,7 +5,7 @@
icon_state = "flashlight"
item_state = "flashlight"
w_class = 2
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
matter = list("metal" = 50,"glass" = 20)
@@ -106,7 +106,7 @@
desc = "A pen-sized light, used by medical staff."
icon_state = "penlight"
item_state = ""
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
brightness_on = 2
w_class = 1
@@ -115,7 +115,7 @@
desc = "A miniature lamp, that might be used by small robots."
icon_state = "penlight"
item_state = ""
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
brightness_on = 2
w_class = 1
@@ -128,7 +128,7 @@
item_state = "lamp"
brightness_on = 5
w_class = 4
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
on = 1
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index c6238f2648..7e69ffe17a 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -47,7 +47,7 @@
icon_state = "lightreplacer0"
item_state = "electronic"
- flags = FPRINT | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
origin_tech = "magnets=3;materials=2"
diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm
index db79c6390b..5bf49de055 100644
--- a/code/game/objects/items/devices/megaphone.dm
+++ b/code/game/objects/items/devices/megaphone.dm
@@ -4,7 +4,7 @@
icon_state = "megaphone"
item_state = "radio"
w_class = 2.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
var/spamcheck = 0
var/emagged = 0
@@ -25,7 +25,7 @@
user << "\red \The [src] needs to recharge!"
return
- var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
+ var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
if(!message)
return
message = capitalize(message)
diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm
index 6378f8823f..1765c32ade 100644
--- a/code/game/objects/items/devices/multitool.dm
+++ b/code/game/objects/items/devices/multitool.dm
@@ -8,7 +8,7 @@
name = "multitool"
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
icon_state = "multitool"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index f2df13a2db..d3c667b9aa 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -4,7 +4,6 @@
icon_state = "pai"
item_state = "electronic"
w_class = 2.0
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
origin_tech = "programming=2"
var/obj/item/device/radio/radio
@@ -261,7 +260,7 @@
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
- var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message),1,MAX_MESSAGE_LEN)
+ var/newlaws = sanitize(copytext(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message,1,MAX_MESSAGE_LEN))
if(newlaws)
pai.pai_laws = newlaws
pai << "Your supplemental directives have been updated. Your new directives are:"
@@ -282,6 +281,8 @@
src.overlays.Cut()
src.overlays += "pai-off"
+/obj/item/device/paicard
+ var/current_emotion = 1
/obj/item/device/paicard/proc/setEmotion(var/emotion)
if(pai)
src.overlays.Cut()
@@ -295,6 +296,7 @@
if(7) src.overlays += "pai-sad"
if(8) src.overlays += "pai-angry"
if(9) src.overlays += "pai-what"
+ current_emotion = emotion
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm
index cf92db9a39..8b2469d2dd 100644
--- a/code/game/objects/items/devices/powersink.dm
+++ b/code/game/objects/items/devices/powersink.dm
@@ -6,7 +6,7 @@
icon_state = "powersink0"
item_state = "electronic"
w_class = 4.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
throwforce = 5
throw_speed = 1
throw_range = 2
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index 00666b2e2a..e7f9ec3b9f 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -4,7 +4,7 @@
icon_state = "electropack0"
item_state = "electropack"
frequency = 1449
- flags = FPRINT | CONDUCT | TABLEPASS
+ flags = CONDUCT
slot_flags = SLOT_BACK
w_class = 5.0
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index b28fe2cac1..567dc49bf4 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -5,7 +5,7 @@
anchored = 1
w_class = 4.0
canhear_range = 2
- flags = FPRINT | CONDUCT | TABLEPASS | NOBLOODY
+ flags = CONDUCT | NOBLOODY
var/number = 0
var/anyai = 1
var/mob/living/silicon/ai/ai = list()
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index bb6f0d91f5..93ce1d9eab 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -20,7 +20,7 @@
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/maxf = 1499
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
- flags = FPRINT | CONDUCT | TABLEPASS
+ flags = CONDUCT
slot_flags = SLOT_BELT
throw_speed = 2
throw_range = 9
@@ -115,13 +115,10 @@
listening = !listening && !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL))
/obj/item/device/radio/Topic(href, href_list)
- //..()
- if (usr.stat || !on)
- return
-
- if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
+ if(..() || !on)
usr << browse(null, "window=radio")
return
+
usr.set_machine(src)
if (href_list["track"])
var/mob/target = locate(href_list["track"])
@@ -152,17 +149,7 @@
else
channels[chan_name] |= FREQ_LISTENING
- if (!( master ))
- if (istype(loc, /mob))
- interact(loc)
- else
- updateDialog()
- else
- if (istype(master.loc, /mob))
- interact(master.loc)
- else
- updateDialog()
- add_fingerprint(usr)
+ interact(usr)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
var/datum/radio_frequency/connection = null
@@ -194,7 +181,7 @@
return radio_connection
// Otherwise, if a channel is specified, look for it.
- if(channels)
+ if(channels && channels.len > 0)
if (message_mode == "department") // Department radio shortcut
message_mode = channels[1]
@@ -506,6 +493,7 @@
icon = 'icons/obj/robot_component.dmi' // Cyborgs radio icons should look like the component.
icon_state = "radio"
canhear_range = 3
+ subspace_transmission = 1
/obj/item/device/radio/borg/talk_into()
. = ..()
@@ -594,11 +582,11 @@
if (href_list["mode"])
if(subspace_transmission != 1)
subspace_transmission = 1
- usr << "Subspace Transmission is disabled"
+ usr << "Subspace Transmission is enabled"
else
subspace_transmission = 0
- usr << "Subspace Transmission is enabled"
- if(subspace_transmission == 1)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
+ usr << "Subspace Transmission is disabled"
+ if(subspace_transmission == 0)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
channels = list()
else
recalculateChannels()
@@ -625,10 +613,10 @@
+
+
Toggle Broadcast Mode
- Toggle Loudspeaker
+ Loudspeaker: [shut_up ? "Disengaged" : "Engaged"]
"}
- if(!subspace_transmission)//Don't even bother if subspace isn't turned on
+ if(subspace_transmission)//Don't even bother if subspace isn't turned on
for (var/ch_name in channels)
dat+=text_sec_channel(ch_name, channels[ch_name])
dat+={"[text_wires()]"}
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 5afc8ebc10..922d5418cb 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -13,7 +13,6 @@ REAGENT SCANNER
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
icon_state = "t-ray0"
var/on = 0
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2
item_state = "electronic"
@@ -69,7 +68,7 @@ REAGENT SCANNER
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
icon_state = "health"
item_state = "analyzer"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
w_class = 2.0
@@ -232,7 +231,7 @@ REAGENT SCANNER
icon_state = "atmos"
item_state = "analyzer"
w_class = 2.0
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
@@ -279,7 +278,7 @@ REAGENT SCANNER
icon_state = "spectrometer"
item_state = "analyzer"
w_class = 2.0
- flags = FPRINT | TABLEPASS| CONDUCT | OPENCONTAINER
+ flags = CONDUCT | OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
@@ -353,7 +352,7 @@ REAGENT SCANNER
icon_state = "spectrometer"
item_state = "analyzer"
w_class = 2.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm
new file mode 100644
index 0000000000..70e3628f67
--- /dev/null
+++ b/code/game/objects/items/devices/spy_bug.dm
@@ -0,0 +1,154 @@
+/obj/item/device/spy_bug
+ name = "bug"
+ desc = "" // Nothing to see here
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "eshield0"
+ item_state = "nothing"
+ layer = TURF_LAYER+0.2
+
+ flags = CONDUCT
+ force = 5.0
+ w_class = 1.0
+ throwforce = 5.0
+ throw_range = 15
+ throw_speed = 3
+
+ origin_tech = "programming=1;engineering=1;syndicate=3"
+
+ var/obj/item/device/radio/spy/radio
+ var/obj/machinery/camera/spy/camera
+
+/obj/item/device/spy_bug/New()
+ ..()
+ radio = new(src)
+ camera = new(src)
+
+/obj/item/device/spy_bug/examine(mob/user)
+ . = ..(user, 0)
+ if(.)
+ user << "It's a tiny camera, microphone, and transmission device in a happy union."
+ user << "Needs to be both configured and brought in contact with monitor device to be fully functional."
+
+/obj/item/device/spy_bug/attack_self(mob/user)
+ radio.attack_self(user)
+
+/obj/item/device/spy_bug/attackby(obj/W as obj, mob/living/user as mob)
+ if(istype(W, /obj/item/device/spy_monitor))
+ var/obj/item/device/spy_monitor/SM = W
+ SM.pair(src, user)
+ else
+ ..()
+
+/obj/item/device/spy_bug/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
+ radio.hear_talk(M, msg, speaking)
+
+
+/obj/item/device/spy_monitor
+ name = "\improper PDA"
+ desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
+ icon = 'icons/obj/pda.dmi'
+ icon_state = "pda"
+ item_state = "electronic"
+
+ w_class = 2.0
+
+ origin_tech = "programming=1;engineering=1;syndicate=3"
+
+ var/operating = 0
+ var/obj/item/device/radio/spy/radio
+ var/obj/machinery/camera/spy/selected_camera
+ var/list/obj/machinery/camera/spy/cameras = new()
+
+/obj/item/device/spy_monitor/New()
+ radio = new(src)
+
+/obj/item/device/spy_monitor/examine(mob/user)
+ . = ..(user, 1)
+ if(.)
+ user << "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made."
+
+/obj/item/device/spy_monitor/attack_self(mob/user)
+ if(operating)
+ return
+
+ radio.attack_self(user)
+ view_cameras(user)
+
+/obj/item/device/spy_monitor/attackby(obj/W as obj, mob/living/user as mob)
+ if(istype(W, /obj/item/device/spy_bug))
+ pair(W, user)
+ else
+ return ..()
+
+/obj/item/device/spy_monitor/proc/pair(var/obj/item/device/spy_bug/SB, var/mob/living/user)
+ if(SB.camera in cameras)
+ user << "\The [SB] has been unpaired from \the [src]."
+ cameras -= SB.camera
+ else
+ user << "\The [SB] has been paired with \the [src]."
+ cameras += SB.camera
+
+/obj/item/device/spy_monitor/proc/view_cameras(mob/user)
+ if(!can_use_cam(user))
+ return
+
+ selected_camera = cameras[1]
+ view_camera(user)
+
+ operating = 1
+ while(selected_camera && Adjacent(user))
+ selected_camera = input("Select camera bug to view.") as null|anything in cameras
+ selected_camera = null
+ operating = 0
+
+/obj/item/device/spy_monitor/proc/view_camera(mob/user)
+ spawn(0)
+ while(selected_camera && Adjacent(user))
+ var/turf/T = get_turf(selected_camera)
+ if(!T || !is_on_same_plane_or_station(T.z, user.z) || !selected_camera.can_use())
+ user.unset_machine()
+ user.reset_view(null)
+ user << "[selected_camera] unavailable."
+ sleep(90)
+ else
+ user.set_machine(selected_camera)
+ user.reset_view(selected_camera)
+ sleep(10)
+ user.unset_machine()
+ user.reset_view(null)
+
+/obj/item/device/spy_monitor/proc/can_use_cam(mob/user)
+ if(operating)
+ return
+
+ if(!cameras.len)
+ user << "No paired cameras detected!"
+ user << "Bring a bug in contact with this device to pair the camera."
+ return
+
+ return 1
+
+/obj/item/device/spy_monitor/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
+ return radio.hear_talk(M, msg, speaking)
+
+
+/obj/machinery/camera/spy
+ // These cheap toys are accessible from the mercenary camera console as well
+ network = list("NUKE")
+
+/obj/machinery/camera/spy/New()
+ ..()
+ name = "DV-136ZB #[rand(1000,9999)]"
+ c_tag = name
+ cameranet.removeCamera(src) // Sorry, no AI spying.
+
+/obj/machinery/camera/spy/check_eye(var/mob/user as mob)
+ return 1
+
+/obj/item/device/radio/spy
+ listening = 0
+ frequency = 1473
+ broadcasting = 0
+ canhear_range = 1
+ name = "spy device"
+ icon_state = "syn_cypherkey"
diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm
index f32b5256b5..291053f25d 100644
--- a/code/game/objects/items/devices/suit_cooling.dm
+++ b/code/game/objects/items/devices/suit_cooling.dm
@@ -7,7 +7,7 @@
slot_flags = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage
//copied from tank.dm
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
force = 5.0
throwforce = 10.0
throw_speed = 1
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index f5e43436b9..dc74f0272c 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -15,7 +15,7 @@
var/list/storedinfo = new/list()
var/list/timestamp = new/list()
var/canprint = 1
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
throwforce = 2
throw_speed = 4
throw_range = 20
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 52e5e220f2..3c2aebd871 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -22,7 +22,7 @@ effective or pretty fucking useless.
w_class = 1.0
throw_speed = 4
throw_range = 10
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
item_state = "electronic"
origin_tech = "magnets=3;combat=3;syndicate=3"
diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm
index cd2ff9b5fb..53efa61f96 100644
--- a/code/game/objects/items/devices/uplinks.dm
+++ b/code/game/objects/items/devices/uplinks.dm
@@ -108,6 +108,9 @@ datum/nano_item_lists
return pick(random_items)
/obj/item/device/uplink/Topic(href, href_list)
+ if(..())
+ return 1
+
if(href_list["buy_item"] == "random")
var/datum/uplink_item/UI = chooseRandomItem()
href_list["buy_item"] = UI.reference
@@ -208,10 +211,10 @@ datum/nano_item_lists
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
- return
+ return 1
if (!( istype(usr, /mob/living/carbon/human)))
- return 0
+ return 1
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm
index befba4b133..49df9aa31c 100644
--- a/code/game/objects/items/devices/whistle.dm
+++ b/code/game/objects/items/devices/whistle.dm
@@ -4,7 +4,7 @@
icon_state = "voice0"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
w_class = 1.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
var/spamcheck = 0
var/emagged = 0
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 87a6fdc04c..25461eae37 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -3,7 +3,7 @@
icon = 'icons/obj/robot_parts.dmi'
item_state = "buildpipe"
icon_state = "blank"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
var/construction_time = 100
var/list/construction_cost = list("metal"=20000,"glass"=5000)
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index d2825c82f7..45350a71e9 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -3,7 +3,7 @@
desc = "Some rods. Can be used for building, or something."
singular_name = "metal rod"
icon_state = "rods"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
w_class = 3.0
force = 9.0
throwforce = 15.0
diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm
index c5df032d64..de96eda5f4 100644
--- a/code/game/objects/items/stacks/sheets/light.dm
+++ b/code/game/objects/items/stacks/sheets/light.dm
@@ -8,7 +8,7 @@
throwforce = 5.0
throw_speed = 5
throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
max_amount = 60
/obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob)
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index a5336c0797..6c440dcb3d 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -29,7 +29,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
null, \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
new/datum/stack_recipe("rack parts", /obj/item/weapon/table_parts/rack), \
- new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
+ new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
@@ -82,7 +82,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
icon_state = "sheet-metal"
matter = list("metal" = 3750)
throwforce = 14.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
origin_tech = "materials=1"
/obj/item/stack/sheet/metal/cyborg
@@ -91,7 +91,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
singular_name = "metal sheet"
icon_state = "sheet-metal"
throwforce = 14.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
stacktype = /obj/item/stack/sheet/metal
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
@@ -118,7 +118,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
item_state = "sheet-metal"
matter = list("metal" = 7500)
throwforce = 15.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
origin_tech = "materials=2"
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
@@ -137,7 +137,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("baseball bat", /obj/item/weapon/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
+ new/datum/stack_recipe("baseball bat", /obj/item/weapon/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
// new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
)
@@ -197,7 +197,6 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
desc = "Large sheets of card, like boxes folded flat."
singular_name = "cardboard sheet"
icon_state = "sheet-card"
- flags = FPRINT | TABLEPASS
origin_tech = "materials=1"
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm
index b140b4e6fd..ed0a9d2a31 100644
--- a/code/game/objects/items/stacks/sheets/sheets.dm
+++ b/code/game/objects/items/stacks/sheets/sheets.dm
@@ -1,6 +1,5 @@
/obj/item/stack/sheet
name = "sheet"
- flags = FPRINT | TABLEPASS
w_class = 3.0
force = 5
throwforce = 5
diff --git a/code/game/objects/items/stacks/tiles/light.dm b/code/game/objects/items/stacks/tiles/light.dm
index f346d216a7..3a14ff1e56 100644
--- a/code/game/objects/items/stacks/tiles/light.dm
+++ b/code/game/objects/items/stacks/tiles/light.dm
@@ -8,7 +8,7 @@
throwforce = 5.0
throw_speed = 5
throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
max_amount = 60
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/on = 1
diff --git a/code/game/objects/items/stacks/tiles/plasteel.dm b/code/game/objects/items/stacks/tiles/plasteel.dm
index e238a80323..7816c45f53 100644
--- a/code/game/objects/items/stacks/tiles/plasteel.dm
+++ b/code/game/objects/items/stacks/tiles/plasteel.dm
@@ -9,7 +9,7 @@
throwforce = 15.0
throw_speed = 5
throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
max_amount = 60
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index e0963d08cc..7ad6abdd60 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -18,7 +18,7 @@
throwforce = 1.0
throw_speed = 5
throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
max_amount = 60
origin_tech = "biotech=1"
@@ -35,7 +35,7 @@
throwforce = 1.0
throw_speed = 5
throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
max_amount = 60
/*
@@ -51,5 +51,5 @@
throwforce = 1.0
throw_speed = 5
throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
max_amount = 60
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 837824bf39..8a974df69a 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -98,6 +98,18 @@
icon_state = "syndballoon"
item_state = "syndballoon"
w_class = 4.0
+
+/obj/item/toy/nanotrasenballoon
+ name = "criminal balloon"
+ desc = "Across the balloon the following is printed: \"Man, I love NT soooo much. I use only NanoTrasen products. You have NO idea.\""
+ throwforce = 0
+ throw_speed = 4
+ throw_range = 20
+ force = 0
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "ntballoon"
+ item_state = "ntballoon"
+ w_class = 4.0
/*
* Fake telebeacon
@@ -127,7 +139,7 @@
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_state = "gun"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
w_class = 3.0
@@ -183,7 +195,7 @@
desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty."
icon = 'icons/obj/ammo.dmi'
icon_state = "357-7"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
w_class = 1.0
matter = list("metal" = 10,"glass" = 10)
@@ -205,7 +217,6 @@
icon = 'icons/obj/gun.dmi'
icon_state = "crossbow"
item_state = "crossbow"
- flags = FPRINT | TABLEPASS
w_class = 2.0
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
@@ -299,7 +310,6 @@
desc = "It's nerf or nothing! Ages 8 and up."
icon = 'icons/obj/toy.dmi'
icon_state = "foamdart"
- flags = FPRINT | TABLEPASS
w_class = 1.0
/obj/effect/foam_dart_dummy
@@ -322,7 +332,7 @@
item_state = "sword0"
var/active = 0.0
w_class = 2.0
- flags = FPRINT | TABLEPASS | NOSHIELD
+ flags = NOSHIELD
attack_verb = list("attacked", "struck", "hit")
attack_self(mob/user as mob)
@@ -354,7 +364,7 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "katana"
item_state = "katana"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
force = 5
throwforce = 5
@@ -382,6 +392,10 @@
viewers(user) << "\red [user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide."
return (BRUTELOSS|OXYLOSS)
+ New()
+ name = "[colourName] crayon"
+ ..()
+
/*
* Snap pops
*/
@@ -570,7 +584,7 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "katana"
item_state = "katana"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
force = 5
throwforce = 5
@@ -643,6 +657,5 @@
desc = "No bother to sink or swim when you can just float!"
icon_state = "inflatable"
item_state = "inflatable"
- flags = FPRINT | TABLEPASS
icon = 'icons/obj/clothing/belts.dmi'
slot_flags = SLOT_BELT
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index c8fec27bb8..5f22d21924 100755
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -12,7 +12,7 @@ AI MODULES
icon_state = "std_mod"
item_state = "electronic"
desc = "An AI Module for transmitting encrypted instructions to the AI."
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
@@ -261,7 +261,7 @@ AI MODULES
if(new_lawpos < 15) return
lawpos = min(new_lawpos, 50)
var/newlaw = ""
- var/targName = copytext(sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)),1,MAX_MESSAGE_LEN)
+ var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index 3e5c08539f..37dcbf9f4e 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -7,7 +7,7 @@
opacity = 0
density = 0
anchored = 0.0
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 10.0
throwforce = 10.0
throw_speed = 1
diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm
index f9f32bbeb1..596675a094 100644
--- a/code/game/objects/items/weapons/RSF.dm
+++ b/code/game/objects/items/weapons/RSF.dm
@@ -14,7 +14,6 @@ RSF
anchored = 0.0
var/stored_matter = 30
var/mode = 1
- flags = TABLEPASS
w_class = 3.0
/obj/item/weapon/rsf/examine(mob/user)
@@ -100,7 +99,7 @@ RSF
product = new /obj/item/weapon/storage/pill_bottle/dice()
used_energy = 200
if(6)
- product = new /obj/item/clothing/mask/cigarette()
+ product = new /obj/item/clothing/mask/smokable/cigarette()
used_energy = 10
user << "Dispensing [product ? product : "product"]..."
diff --git a/code/WorkInProgress/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm
similarity index 99%
rename from code/WorkInProgress/autopsy.dm
rename to code/game/objects/items/weapons/autopsy.dm
index 95cfa23494..d78c7d4093 100644
--- a/code/WorkInProgress/autopsy.dm
+++ b/code/game/objects/items/weapons/autopsy.dm
@@ -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()
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 0203bf0846..9f95abdc8c 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -81,7 +81,7 @@
/obj/item/device/taperecorder,
/obj/item/device/hailer,
/obj/item/device/megaphone,
- /obj/item/clothing/tie/holobadge,
+ /obj/item/clothing/accessory/holobadge,
/obj/structure/closet/crate/secure,
/obj/structure/closet/secure_closet,
/obj/machinery/librarycomp,
@@ -90,7 +90,6 @@
/obj/machinery/suspension_gen,
/obj/machinery/shield_capacitor,
/obj/machinery/shield_gen,
- /obj/machinery/zero_point_emitter,
/obj/machinery/clonepod,
/obj/machinery/deployable,
/obj/machinery/door_control,
@@ -231,7 +230,7 @@
return
src.registered_name = t
- var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent")),1,MAX_MESSAGE_LEN)
+ var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"),1,MAX_MESSAGE_LEN))
if(!u)
alert("Invalid assignment.")
src.registered_name = ""
@@ -246,13 +245,13 @@
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
if("Rename")
- var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26)
+ var t = sanitize(copytext(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name),1,26))
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
- var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")),1,MAX_MESSAGE_LEN)
+ var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"),1,MAX_MESSAGE_LEN))
if(!u)
alert("Invalid assignment.")
return
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index 4d09a26bcf..f2bc1c3b88 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -16,6 +16,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame
var/lit = 0
+/proc/isflamesource(A)
+ if(istype(A, /obj/item/weapon/weldingtool))
+ var/obj/item/weapon/weldingtool/WT = A
+ return (WT.isOn())
+ else if(istype(A, /obj/item/weapon/flame))
+ var/obj/item/weapon/flame/F = A
+ return (F.lit)
+ else if(istype(A, /obj/item/device/assembly/igniter))
+ return 1
+ return 0
+
///////////
//MATCHES//
///////////
@@ -31,6 +42,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
attack_verb = list("burnt", "singed")
/obj/item/weapon/flame/match/process()
+ if(isliving(loc))
+ var/mob/living/M = loc
+ M.IgniteMob()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
@@ -58,85 +72,55 @@ CIGARETTE PACKETS ARE IN FANCY.DM
//////////////////
//FINE SMOKABLES//
//////////////////
-/obj/item/clothing/mask/cigarette
- name = "cigarette"
- desc = "A roll of tobacco and nicotine."
- icon_state = "cigoff"
- throw_speed = 0.5
- item_state = "cigoff"
- w_class = 1
+/obj/item/clothing/mask/smokable
+ name = "smokable item"
+ desc = "You're not sure what this is. You should probably ahelp it."
body_parts_covered = 0
- attack_verb = list("burnt", "singed")
var/lit = 0
- var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
- var/icon_off = "cigoff"
- var/type_butt = /obj/item/weapon/cigbutt
- var/lastHolder = null
- var/smoketime = 300
- var/chem_volume = 15
- body_parts_covered = 0
+ var/icon_on
+ var/icon_off
+ var/type_butt = null
+ var/chem_volume = 0
+ var/smoketime = 0
+ var/matchmes = "USER lights NAME with FLAME"
+ var/lightermes = "USER lights NAME with FLAME"
+ var/zippomes = "USER lights NAME with FLAME"
+ var/weldermes = "USER lights NAME with FLAME"
+ var/ignitermes = "USER lights NAME with FLAME"
-/obj/item/clothing/mask/cigarette/New()
+/obj/item/clothing/mask/smokable/New()
..()
flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
-/obj/item/clothing/mask/cigarette/Del()
+/obj/item/clothing/mask/smokable/Del()
..()
del(reagents)
-/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
- ..()
- if(istype(W, /obj/item/weapon/weldingtool))
- var/obj/item/weapon/weldingtool/WT = W
- if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
- light("[user] casually lights the [name] with [W].")
+/obj/item/clothing/mask/smokable/process()
+ var/turf/location = get_turf(src)
+ smoketime--
+ if(smoketime < 1)
+ die()
+ return
+ if(location)
+ location.hotspot_expose(700, 5)
+ if(reagents && reagents.total_volume) // check if it has any reagents at all
+ if(iscarbon(loc))
+ var/mob/living/carbon/C = loc
+ if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob
+ if(istype(C, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = C
+ if(H.species.flags & IS_SYNTHETIC)
+ return
- else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
- var/obj/item/weapon/flame/lighter/zippo/Z = W
- if(Z.lit)
- light("With a flick of their wrist, [user] lights their [name] with their [W].")
-
- else if(istype(W, /obj/item/weapon/flame/lighter))
- var/obj/item/weapon/flame/lighter/L = W
- if(L.lit)
- light("[user] manages to light their [name] with [W].")
-
- else if(istype(W, /obj/item/weapon/flame/match))
- var/obj/item/weapon/flame/match/M = W
- if(M.lit)
- light("[user] lights their [name] with their [W].")
-
- else if(istype(W, /obj/item/weapon/melee/energy/sword))
- var/obj/item/weapon/melee/energy/sword/S = W
- if(S.active)
- light("[user] swings their [W], barely missing their nose. They light their [name] in the process.")
-
- else if(istype(W, /obj/item/device/assembly/igniter))
- light("[user] fiddles with [W], and manages to light their [name].")
-
- //can't think of any other way to update the overlays :<
- user.update_inv_wear_mask(0)
- user.update_inv_l_hand(0)
- user.update_inv_r_hand(1)
+ reagents.trans_to(C, REAGENTS_METABOLISM, 0.2) // Most of it is not inhaled... balance reasons.
+ reagents.reaction(C)
+ else // else just remove some of the reagents
+ reagents.remove_any(REAGENTS_METABOLISM)
return
-
-/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
- ..()
- if(!proximity) return
- if(istype(glass)) //you can dip cigarettes into beakers
- var/transfered = glass.reagents.trans_to(src, chem_volume)
- if(transfered) //if reagents were transfered, show the message
- user << "You dip \the [src] into \the [glass]."
- else //if not, either the beaker was empty, or the cigarette was full
- if(!glass.reagents.total_volume)
- user << "[glass] is empty."
- else
- user << "[src] is full."
-
-
-/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
+/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
src.lit = 1
damtype = "fire"
@@ -156,58 +140,116 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
+ if(ismob(loc))
+ var/mob/living/M = loc
+ M.update_inv_wear_mask(0)
+ M.update_inv_l_hand(0)
+ M.update_inv_r_hand(1)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
processing_objects.Add(src)
+/obj/item/clothing/mask/smokable/proc/die(var/nomessage = 0)
+ var/turf/T = get_turf(src)
+ if (type_butt)
+ var/obj/item/butt = new type_butt(T)
+ transfer_fingerprints_to(butt)
+ if(ismob(loc))
+ var/mob/living/M = loc
+ if (!nomessage)
+ M << "Your [name] goes out."
+ M.u_equip(src) //un-equip it so the overlays can update
+ M.update_inv_wear_mask(0)
+ M.update_inv_l_hand(0)
+ M.update_inv_r_hand(1)
+ processing_objects.Remove(src)
+ del(src)
+ else
+ new /obj/effect/decal/cleanable/ash(T)
+ if(ismob(loc))
+ var/mob/living/M = loc
+ if (!nomessage)
+ M << "Your [name] goes out, and you empty the ash."
+ lit = 0
+ icon_state = icon_off
+ item_state = icon_off
+ M.update_inv_wear_mask(0)
+ M.update_inv_l_hand(0)
+ M.update_inv_r_hand(1)
+ processing_objects.Remove(src)
+
+/obj/item/clothing/mask/smokable/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ ..()
+ if(isflamesource(W))
+ var/text = matchmes
+ if(istype(W, /obj/item/weapon/flame/match))
+ text = matchmes
+ else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
+ text = zippomes
+ else if(istype(W, /obj/item/weapon/flame/lighter))
+ text = lightermes
+ else if(istype(W, /obj/item/weapon/weldingtool))
+ text = weldermes
+ else if(istype(W, /obj/item/device/assembly/igniter))
+ text = ignitermes
+ text = replacetext(text, "USER", "[user]")
+ text = replacetext(text, "NAME", "[name]")
+ text = replacetext(text, "FLAME", "[W.name]")
+ light(text)
-/obj/item/clothing/mask/cigarette/process()
- var/turf/location = get_turf(src)
- smoketime--
- if(smoketime < 1)
- die()
- return
- if(location)
- location.hotspot_expose(700, 5)
- if(reagents && reagents.total_volume) // check if it has any reagents at all
- if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
- if(istype(loc, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = loc
- if(H.species.flags & IS_SYNTHETIC)
- return
- var/mob/living/carbon/C = loc
+/obj/item/clothing/mask/smokable/cigarette
+ name = "cigarette"
+ desc = "A roll of tobacco and nicotine."
+ icon_state = "cigoff"
+ throw_speed = 0.5
+ item_state = "cigoff"
+ w_class = 1
+ attack_verb = list("burnt", "singed")
+ icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
+ icon_off = "cigoff"
+ type_butt = /obj/item/weapon/cigbutt
+ chem_volume = 15
+ smoketime = 300
+ matchmes = "USER lights their NAME with their FLAME."
+ lightermes = "USER manages to light their NAME with FLAME."
+ zippomes = "With a flick of their wrist, USER lights their NAME with their FLAME."
+ weldermes = "USER casually lights the NAME with FLAME."
+ ignitermes = "USER fiddles with FLAME, and manages to light their NAME."
+
+/obj/item/clothing/mask/smokable/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ ..()
+
+ if(istype(W, /obj/item/weapon/melee/energy/sword))
+ var/obj/item/weapon/melee/energy/sword/S = W
+ if(S.active)
+ light("[user] swings their [W], barely missing their nose. They light their [name] in the process.")
- if(prob(15)) // so it's not an instarape in case of acid
- reagents.reaction(C, INGEST)
- reagents.trans_to(C, REAGENTS_METABOLISM)
- else // else just remove some of the reagents
- reagents.remove_any(REAGENTS_METABOLISM)
return
+/obj/item/clothing/mask/smokable/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob, proximity)
+ ..()
+ if(!proximity)
+ return
+ if(istype(glass)) //you can dip cigarettes into beakers
+ var/transfered = glass.reagents.trans_to(src, chem_volume)
+ if(transfered) //if reagents were transfered, show the message
+ user << "You dip \the [src] into \the [glass]."
+ else //if not, either the beaker was empty, or the cigarette was full
+ if(!glass.reagents.total_volume)
+ user << "[glass] is empty."
+ else
+ user << "[src] is full."
-/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
+/obj/item/clothing/mask/smokable/cigarette/attack_self(mob/user as mob)
if(lit == 1)
user.visible_message("[user] calmly drops and treads on the lit [src], putting it out instantly.")
- die()
+ die(1)
return ..()
-
-/obj/item/clothing/mask/cigarette/proc/die()
- var/turf/T = get_turf(src)
- var/obj/item/butt = new type_butt(T)
- transfer_fingerprints_to(butt)
- if(ismob(loc))
- var/mob/living/M = loc
- M << "Your [name] goes out."
- M.u_equip(src) //un-equip it so the overlays can update
- M.update_inv_wear_mask(0)
- processing_objects.Remove(src)
- del(src)
-
////////////
// CIGARS //
////////////
-/obj/item/clothing/mask/cigarette/cigar
+/obj/item/clothing/mask/smokable/cigarette/cigar
name = "premium cigar"
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
icon_state = "cigar2off"
@@ -218,15 +260,20 @@ CIGARETTE PACKETS ARE IN FANCY.DM
item_state = "cigaroff"
smoketime = 1500
chem_volume = 20
+ matchmes = "USER lights their NAME with their FLAME."
+ lightermes = "USER manages to offend their NAME by lighting it with FLAME."
+ zippomes = "With a flick of their wrist, USER lights their NAME with their FLAME."
+ weldermes = "USER insults NAME by lighting it with FLAME."
+ ignitermes = "USER fiddles with FLAME, and manages to light their NAME with the power of science."
-/obj/item/clothing/mask/cigarette/cigar/cohiba
+/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba
name = "\improper Cohiba Robusto cigar"
desc = "There's little more you could want from a cigar."
icon_state = "cigar2off"
icon_on = "cigar2on"
icon_off = "cigar2off"
-/obj/item/clothing/mask/cigarette/cigar/havana
+/obj/item/clothing/mask/smokable/cigarette/cigar/havana
name = "premium Havanian cigar"
desc = "A cigar fit for only the best of the best."
icon_state = "cigar2off"
@@ -254,50 +301,33 @@ CIGARETTE PACKETS ARE IN FANCY.DM
desc = "A manky old cigar butt."
icon_state = "cigarbutt"
-
-/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if(istype(W, /obj/item/weapon/weldingtool))
- var/obj/item/weapon/weldingtool/WT = W
- if(WT.isOn())
- light("[user] insults [name] by lighting it with [W].")
-
- else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
- var/obj/item/weapon/flame/lighter/zippo/Z = W
- if(Z.lit)
- light("With a flick of their wrist, [user] lights their [name] with their [W].")
-
- else if(istype(W, /obj/item/weapon/flame/lighter))
- var/obj/item/weapon/flame/lighter/L = W
- if(L.lit)
- light("[user] manages to offend their [name] by lighting it with [W].")
-
- else if(istype(W, /obj/item/weapon/flame/match))
- var/obj/item/weapon/flame/match/M = W
- if(M.lit)
- light("[user] lights their [name] with their [W].")
-
- else if(istype(W, /obj/item/weapon/melee/energy/sword))
- var/obj/item/weapon/melee/energy/sword/S = W
- if(S.active)
- light("[user] swings their [W], barely missing their nose. They light their [name] in the process.")
-
- else if(istype(W, /obj/item/device/assembly/igniter))
- light("[user] fiddles with [W], and manages to light their [name] with the power of science.")
+/obj/item/clothing/mask/smokable/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ ..()
/////////////////
//SMOKING PIPES//
/////////////////
-/obj/item/clothing/mask/cigarette/pipe
+/obj/item/clothing/mask/smokable/pipe
name = "smoking pipe"
desc = "A pipe, for smoking. Probably made of meershaum or something."
icon_state = "pipeoff"
item_state = "pipeoff"
icon_on = "pipeon" //Note - these are in masks.dmi
icon_off = "pipeoff"
- smoketime = 100
+ smoketime = 0
+ chem_volume = 50
+ matchmes = "USER lights their NAME with their FLAME."
+ lightermes = "USER manages to light their NAME with FLAME."
+ zippomes = "With much care, USER lights their NAME with their FLAME."
+ weldermes = "USER recklessly lights NAME with FLAME."
+ ignitermes = "USER fiddles with FLAME, and manages to light their NAME with the power of science."
-/obj/item/clothing/mask/cigarette/pipe/light(var/flavor_text = "[usr] lights the [name].")
- if(!src.lit)
+/obj/item/clothing/mask/smokable/pipe/New()
+ ..()
+ name = "empty [initial(name)]"
+
+/obj/item/clothing/mask/smokable/pipe/light(var/flavor_text = "[usr] lights the [name].")
+ if(!src.lit && src.smoketime)
src.lit = 1
damtype = "fire"
icon_state = icon_on
@@ -305,72 +335,55 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
processing_objects.Add(src)
-
-/obj/item/clothing/mask/cigarette/pipe/process()
- var/turf/location = get_turf(src)
- smoketime--
- if(smoketime < 1)
- new /obj/effect/decal/cleanable/ash(location)
if(ismob(loc))
var/mob/living/M = loc
- M << "Your [name] goes out, and you empty the ash."
- lit = 0
- icon_state = icon_off
- item_state = icon_off
M.update_inv_wear_mask(0)
- processing_objects.Remove(src)
- return
- if(location)
- location.hotspot_expose(700, 5)
- return
+ M.update_inv_l_hand(0)
+ M.update_inv_r_hand(1)
-/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user as mob) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something.
+/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user as mob)
if(lit == 1)
- user.visible_message("[user] puts out [src].")
+ user.visible_message("[user] puts out [src].", "You put out [src].")
lit = 0
icon_state = icon_off
item_state = icon_off
processing_objects.Remove(src)
+ else if (smoketime)
+ var/turf/location = get_turf(user)
+ user.visible_message("[user] empties out [src].", "You empty out [src].")
+ new /obj/effect/decal/cleanable/ash(location)
+ smoketime = 0
+ reagents.clear_reagents()
+ name = "empty [initial(name)]"
+
+/obj/item/clothing/mask/smokable/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/weapon/melee/energy/sword))
return
- if(smoketime <= 0)
- user << "You refill the pipe with tobacco."
- smoketime = initial(smoketime)
- return
-/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if(istype(W, /obj/item/weapon/weldingtool))
- var/obj/item/weapon/weldingtool/WT = W
- if(WT.isOn())//
- light("[user] recklessly lights [name] with [W].")
+ ..()
- else if(istype(W, /obj/item/weapon/flame/lighter/zippo))
- var/obj/item/weapon/flame/lighter/zippo/Z = W
- if(Z.lit)
- light("With much care, [user] lights their [name] with their [W].")
+ if (istype(W, /obj/item/weapon/reagent_containers/food/snacks))
+ var/obj/item/weapon/reagent_containers/food/snacks/grown/G = W
+ if (!G.dry)
+ user << "[G] must be dried before you stuff it into [src]."
+ return
+ if (smoketime)
+ user << "[src] is already packed."
+ return
+ smoketime = 1000
+ if(G.reagents)
+ G.reagents.trans_to(src, G.reagents.total_volume)
+ name = "[G.name]-packed [initial(name)]"
+ del(G)
- else if(istype(W, /obj/item/weapon/flame/lighter))
- var/obj/item/weapon/flame/lighter/L = W
- if(L.lit)
- light("[user] manages to light their [name] with [W].")
-
- else if(istype(W, /obj/item/weapon/flame/match))
- var/obj/item/weapon/flame/match/M = W
- if(M.lit)
- light("[user] lights their [name] with their [W].")
-
- else if(istype(W, /obj/item/device/assembly/igniter))
- light("[user] fiddles with [W], and manages to light their [name] with the power of science.")
-
-/obj/item/clothing/mask/cigarette/pipe/cobpipe
+/obj/item/clothing/mask/smokable/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen, kept popular in the modern age and beyond by space hipsters."
icon_state = "cobpipeoff"
item_state = "cobpipeoff"
icon_on = "cobpipeon" //Note - these are in masks.dmi
icon_off = "cobpipeoff"
- smoketime = 400
-
-
+ chem_volume = 35
/////////
//ZIPPO//
@@ -385,7 +398,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/icon_off = "lighter-g"
w_class = 1
throwforce = 4
- flags = TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
attack_verb = list("burnt", "singed")
@@ -444,9 +457,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
return
+ M.IgniteMob()
- if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
- var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
+ if(istype(M.wear_mask, /obj/item/clothing/mask/smokable/cigarette) && user.zone_sel.selecting == "mouth" && lit)
+ var/obj/item/clothing/mask/smokable/cigarette/cig = M.wear_mask
if(M == user)
cig.attackby(src, user)
else
diff --git a/code/game/objects/items/weapons/circuitboards/circuitboard.dm b/code/game/objects/items/weapons/circuitboards/circuitboard.dm
index bc44b3d7df..00cc7a6835 100644
--- a/code/game/objects/items/weapons/circuitboards/circuitboard.dm
+++ b/code/game/objects/items/weapons/circuitboards/circuitboard.dm
@@ -13,7 +13,7 @@
density = 0
anchored = 0
w_class = 2.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
force = 5.0
throwforce = 5.0
throw_speed = 3
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm b/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm
new file mode 100644
index 0000000000..c01893b158
--- /dev/null
+++ b/code/game/objects/items/weapons/circuitboards/machinery/biogenerator.dm
@@ -0,0 +1,13 @@
+#ifndef T_BOARD
+#error T_BOARD macro is not defined but we need it!
+#endif
+
+/obj/item/weapon/circuitboard/biogenerator
+ name = T_BOARD("biogenerator")
+ build_path = "/obj/machinery/biogenerator"
+ board_type = "machine"
+ origin_tech = "programming=2"
+ frame_desc = "Requires 1 Manipulator, and 1 Matter Bin."
+ req_components = list(
+ "/obj/item/weapon/stock_parts/matter_bin" = 1,
+ "/obj/item/weapon/stock_parts/manipulator" = 1)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm b/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm
new file mode 100644
index 0000000000..5a0dc01bc1
--- /dev/null
+++ b/code/game/objects/items/weapons/circuitboards/machinery/recharge_station.dm
@@ -0,0 +1,15 @@
+#ifndef T_BOARD
+#error T_BOARD macro is not defined but we need it!
+#endif
+
+/obj/item/weapon/circuitboard/recharge_station
+ name = T_BOARD("cyborg recharging station")
+ build_path = "/obj/machinery/recharge_station"
+ board_type = "machine"
+ origin_tech = "programming=3;engineering=3"
+ frame_desc = "Requires 2 Manipulator, 2 Capacitor, 1 Cell, and 5 pieces of cable."
+ req_components = list(
+ "/obj/item/stack/cable_coil" = 5,
+ "/obj/item/weapon/stock_parts/capacitor" = 2,
+ "/obj/item/weapon/stock_parts/manipulator" = 2,
+ "/obj/item/weapon/cell" = 1)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm
index 5e6d4d9538..6241bd5051 100644
--- a/code/game/objects/items/weapons/cosmetics.dm
+++ b/code/game/objects/items/weapons/cosmetics.dm
@@ -4,7 +4,6 @@
desc = "A generic brand of lipstick."
icon = 'icons/obj/items.dmi'
icon_state = "lipstick"
- flags = FPRINT | TABLEPASS
w_class = 1.0
var/colour = "red"
var/open = 0
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index f5f4208073..030437b446 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -5,7 +5,7 @@
icon = 'icons/obj/assemblies.dmi'
icon_state = "plastic-explosive0"
item_state = "plasticx"
- flags = FPRINT | TABLEPASS | NOBLUDGEON
+ flags = NOBLUDGEON
w_class = 2.0
origin_tech = "syndicate=2"
var/datum/wires/explosive/c4/wires = null
@@ -38,7 +38,7 @@
/obj/item/weapon/plastique/afterattack(atom/movable/target, mob/user, flag)
if (!flag)
return
- if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/tie/storage/) || istype(target, /obj/item/clothing/under))
+ if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/accessory/storage/) || istype(target, /obj/item/clothing/under))
return
user << "Planting explosives..."
diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm
index f6758e53e6..800f47773c 100644
--- a/code/game/objects/items/weapons/extinguisher.dm
+++ b/code/game/objects/items/weapons/extinguisher.dm
@@ -5,7 +5,7 @@
icon_state = "fire_extinguisher0"
item_state = "fire_extinguisher"
hitsound = 'sound/weapons/smash.ogg'
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
throwforce = 10
w_class = 3.0
throw_speed = 2
@@ -13,7 +13,7 @@
force = 10.0
matter = list("metal" = 90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
-
+
var/spray_particles = 6
var/spray_amount = 2 //units of liquid per particle
var/max_water = 120
@@ -27,7 +27,6 @@
icon_state = "miniFE0"
item_state = "miniFE"
hitsound = null //it is much lighter, after all.
- flags = FPRINT | TABLEPASS
throwforce = 2
w_class = 2.0
force = 3.0
@@ -124,7 +123,7 @@
R.my_atom = W
if(!W || !src) return
src.reagents.trans_to(W, spray_amount)
-
+
for(var/b=0, b<5, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
@@ -135,6 +134,9 @@
if(!W.reagents)
break
W.reagents.reaction(atm)
+ if(isliving(atm)) //For extinguishing mobs on fire
+ var/mob/living/M = atm
+ M.ExtinguishMob()
if(W.loc == my_target) break
sleep(2)
W.delete()
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index 3830f105fd..50508594cf 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -4,7 +4,7 @@
icon = 'icons/obj/flamethrower.dmi'
icon_state = "flamethrowerbase"
item_state = "flamethrower_0"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 3.0
throwforce = 10.0
throw_speed = 1
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index e96d036721..8ed63b88aa 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -104,7 +104,7 @@
/obj/item/device/paicard,
/obj/item/device/violin,
/obj/item/weapon/storage/belt/utility/full,
- /obj/item/clothing/tie/horrible)
+ /obj/item/clothing/accessory/horrible)
if(!ispath(gift_type,/obj/item)) return
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index f9120d5491..a332f6fa92 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -21,11 +21,11 @@
B.health -= damage
B.update_icon()
- new/obj/effect/effect/smoke/flashbang(src.loc)
+ new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
del(src)
return
- proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
+ proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
if (locate(/obj/item/weapon/cloaking_device, M)) // Called during the loop that bangs people in lockers/containers and when banging
for(var/obj/item/weapon/cloaking_device/S in M) // people in normal view. Could theroetically be called during other explosions.
S.active = 0 // -- Polymorph
@@ -100,16 +100,6 @@
M << "\red Your ears start to ring!"
M.update_icons()
-/obj/effect/effect/smoke/flashbang
- name = "illumination"
- time_to_live = 10
- opacity = 0
- icon_state = "sparks"
-
-/obj/effect/effect/smoke/flashbang/New()
- ..()
- SetLuminosity(15)
-
/obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
name = "clusterbang"
diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm
index d1fb667e99..f501753807 100644
--- a/code/game/objects/items/weapons/grenades/grenade.dm
+++ b/code/game/objects/items/weapons/grenades/grenade.dm
@@ -7,7 +7,7 @@
item_state = "flashbang"
throw_speed = 4
throw_range = 20
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
var/active = 0
var/det_time = 50
diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm
index d518567a5d..139baacb6f 100644
--- a/code/game/objects/items/weapons/grenades/smokebomb.dm
+++ b/code/game/objects/items/weapons/grenades/smokebomb.dm
@@ -5,7 +5,6 @@
icon_state = "flashbang"
det_time = 20
item_state = "flashbang"
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/datum/effect/effect/system/smoke_spread/bad/smoke
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index a1ea44daa9..246636890d 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -4,7 +4,7 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "handcuff"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 5
w_class = 2.0
diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm
index f3d5703225..0b492c2659 100644
--- a/code/game/objects/items/weapons/hydroponics.dm
+++ b/code/game/objects/items/weapons/hydroponics.dm
@@ -10,7 +10,6 @@
desc = "A small satchel made for organizing seeds."
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 500; //the number of seeds it can carry.
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
var/list/item_quants = list()
diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm
index ae77d373da..00ce8a7950 100644
--- a/code/game/objects/items/weapons/implants/implantcase.dm
+++ b/code/game/objects/items/weapons/implants/implantcase.dm
@@ -26,7 +26,7 @@
return
if((!in_range(src, usr) && src.loc != user))
return
- t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
+ t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if(t)
src.name = text("Glass Case - '[]'", t)
else
diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm
index 19cb00b999..6d6e5ad4cb 100644
--- a/code/game/objects/items/weapons/implants/implanter.dm
+++ b/code/game/objects/items/weapons/implants/implanter.dm
@@ -47,7 +47,7 @@
affected.implants += src.imp
imp.part = affected
- H.hud_updateflag |= 1 << IMPLOYAL_HUD
+ BITSET(H.hud_updateflag, IMPLOYAL_HUD)
src.imp = null
update()
diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm
index d7be368665..d32ae9d8ba 100644
--- a/code/game/objects/items/weapons/implants/implantfreedom.dm
+++ b/code/game/objects/items/weapons/implants/implantfreedom.dm
@@ -23,6 +23,8 @@
if (source.handcuffed)
var/obj/item/weapon/W = source.handcuffed
source.handcuffed = null
+ if(source.buckled && source.buckled.buckle_require_restraints)
+ source.buckled.unbuckle_mob()
source.update_inv_handcuffed()
if (source.client)
source.client.screen -= W
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index 21833cc212..66d8c6d01b 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -22,7 +22,7 @@
throwforce = 5.0
throw_speed = 3
throw_range = 5
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
origin_tech = "materials=1"
attack_verb = list("attacked", "stabbed", "poked")
sharp = 0
@@ -137,7 +137,7 @@
icon = 'icons/obj/kitchen.dmi'
icon_state = "knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
sharp = 1
edge = 1
force = 10.0
@@ -169,7 +169,7 @@
icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
force = 15.0
w_class = 2.0
throwforce = 8.0
@@ -246,7 +246,7 @@
throw_speed = 1
throw_range = 5
w_class = 3.0
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
matter = list("metal" = 3000)
/* // NOPE
var/food_total= 0
diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm
index 0de1036209..1b1d5b04f3 100644
--- a/code/game/objects/items/weapons/melee/energy.dm
+++ b/code/game/objects/items/weapons/melee/energy.dm
@@ -5,7 +5,7 @@
var/active_w_class
sharp = 0
edge = 0
- flags = FPRINT | TABLEPASS | NOBLOODY
+ flags = NOBLOODY
/obj/item/weapon/melee/energy/proc/activate(mob/living/user)
anchored = 1
@@ -73,7 +73,7 @@
throw_speed = 1
throw_range = 5
w_class = 3
- flags = FPRINT | CONDUCT | NOSHIELD | TABLEPASS | NOBLOODY
+ flags = CONDUCT | NOSHIELD | NOBLOODY
origin_tech = "magnets=3;combat=4"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
sharp = 1
@@ -109,7 +109,7 @@
throw_speed = 1
throw_range = 5
w_class = 2
- flags = FPRINT | TABLEPASS | NOSHIELD | NOBLOODY
+ flags = NOSHIELD | NOBLOODY
origin_tech = "magnets=3;syndicate=4"
/obj/item/weapon/melee/energy/sword/dropped(var/mob/user)
@@ -177,7 +177,7 @@
throw_speed = 1
throw_range = 1
w_class = 4.0//So you can't hide it in your pocket or some such.
- flags = FPRINT | TABLEPASS | NOSHIELD | NOBLOODY
+ flags = NOSHIELD | NOBLOODY
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/mob/living/creator
var/datum/effect/effect/system/spark_spread/spark_system
diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm
index 36dbc26537..c5efdae1fb 100644
--- a/code/game/objects/items/weapons/melee/misc.dm
+++ b/code/game/objects/items/weapons/melee/misc.dm
@@ -3,7 +3,7 @@
desc = "A tool used by great men to placate the frothing masses."
icon_state = "chain"
item_state = "chain"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
force = 10
throwforce = 7
diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm
index 017db06a04..fe9945f8f0 100644
--- a/code/game/objects/items/weapons/mop.dm
+++ b/code/game/objects/items/weapons/mop.dm
@@ -8,7 +8,6 @@
throw_speed = 5
throw_range = 10
w_class = 3.0
- flags = FPRINT | TABLEPASS
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
var/mopping = 0
var/mopcount = 0
diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm
index 2c0e1d812d..77f8172f8f 100644
--- a/code/game/objects/items/weapons/paint.dm
+++ b/code/game/objects/items/weapons/paint.dm
@@ -1,4 +1,5 @@
//NEVER USE THIS IT SUX -PETETHEGOAT
+//THE GOAT WAS RIGHT - RKF
var/global/list/cached_icons = list()
@@ -11,10 +12,10 @@ var/global/list/cached_icons = list()
matter = list("metal" = 200)
w_class = 3.0
amount_per_transfer_from_this = 10
- possible_transfer_amounts = list(10,20,30,50,70)
- volume = 70
- flags = FPRINT | OPENCONTAINER
- var/paint_type = ""
+ possible_transfer_amounts = list(10,20,30,60)
+ volume = 60
+ flags = OPENCONTAINER
+ var/paint_type = "red"
afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
@@ -28,22 +29,27 @@ var/global/list/cached_icons = list()
return ..()
New()
- if(paint_type == "remover")
- name = "paint remover bucket"
- else if(paint_type && lentext(paint_type) > 0)
+ if(paint_type && lentext(paint_type) > 0)
name = paint_type + " " + name
..()
- reagents.add_reagent("paint_[paint_type]", volume)
-
- on_reagent_change() //Until we have a generic "paint", this will give new colours to all paints in the can
- var/mixedcolor = mix_color_from_reagents(reagents.reagent_list)
- for(var/datum/reagent/paint/P in reagents.reagent_list)
- P.color = mixedcolor
+ reagents.add_reagent("water", volume*3/5)
+ reagents.add_reagent("plasticide", volume/5)
+ if(paint_type == "white") //why don't white crayons exist
+ reagents.add_reagent("aluminum", volume/5)
+ else if (paint_type == "black")
+ reagents.add_reagent("carbon", volume/5)
+ else
+ reagents.add_reagent("crayon_dust_[paint_type]", volume/5)
+ reagents.handle_reactions()
red
icon_state = "paint_red"
paint_type = "red"
+ yellow
+ icon_state = "paint_yellow"
+ paint_type = "yellow"
+
green
icon_state = "paint_green"
paint_type = "green"
@@ -52,13 +58,9 @@ var/global/list/cached_icons = list()
icon_state = "paint_blue"
paint_type = "blue"
- yellow
- icon_state = "paint_yellow"
- paint_type = "yellow"
-
- violet
+ purple
icon_state = "paint_violet"
- paint_type = "violet"
+ paint_type = "purple"
black
icon_state = "paint_black"
@@ -68,170 +70,3 @@ var/global/list/cached_icons = list()
icon_state = "paint_white"
paint_type = "white"
- remover
- paint_type = "remover"
-/*
-/obj/item/weapon/paint
- gender= PLURAL
- name = "paint"
- desc = "Used to recolor floors and walls. Can not be removed by the janitor."
- icon = 'icons/obj/items.dmi'
- icon_state = "paint_neutral"
- color = "FFFFFF"
- item_state = "paintcan"
- w_class = 3.0
-
-/obj/item/weapon/paint/red
- name = "red paint"
- color = "FF0000"
- icon_state = "paint_red"
-
-/obj/item/weapon/paint/green
- name = "green paint"
- color = "00FF00"
- icon_state = "paint_green"
-
-/obj/item/weapon/paint/blue
- name = "blue paint"
- color = "0000FF"
- icon_state = "paint_blue"
-
-/obj/item/weapon/paint/yellow
- name = "yellow paint"
- color = "FFFF00"
- icon_state = "paint_yellow"
-
-/obj/item/weapon/paint/violet
- name = "violet paint"
- color = "FF00FF"
- icon_state = "paint_violet"
-
-/obj/item/weapon/paint/black
- name = "black paint"
- color = "333333"
- icon_state = "paint_black"
-
-/obj/item/weapon/paint/white
- name = "white paint"
- color = "FFFFFF"
- icon_state = "paint_white"
-
-
-/obj/item/weapon/paint/anycolor
- gender= PLURAL
- name = "any color"
- icon_state = "paint_neutral"
-
- attack_self(mob/user as mob)
- var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white")
- if ((user.get_active_hand() != src || user.stat || user.restrained()))
- return
- switch(t1)
- if("red")
- color = "FF0000"
- if("blue")
- color = "0000FF"
- if("green")
- color = "00FF00"
- if("yellow")
- color = "FFFF00"
- if("violet")
- color = "FF00FF"
- if("white")
- color = "FFFFFF"
- if("black")
- color = "333333"
- icon_state = "paint_[t1]"
- add_fingerprint(user)
- return
-
-
-/obj/item/weapon/paint/afterattack(turf/target, mob/user as mob, proximity)
- if(!proximity) return
- if(!istype(target) || istype(target, /turf/space))
- return
- var/ind = "[initial(target.icon)][color]"
- if(!cached_icons[ind])
- var/icon/overlay = new/icon(initial(target.icon))
- overlay.Blend("#[color]",ICON_MULTIPLY)
- overlay.SetIntensity(1.4)
- target.icon = overlay
- cached_icons[ind] = target.icon
- else
- target.icon = cached_icons[ind]
- return
-
-/obj/item/weapon/paint/paint_remover
- gender = PLURAL
- name = "paint remover"
- icon_state = "paint_neutral"
-
- afterattack(turf/target, mob/user as mob)
- if(istype(target) && target.icon != initial(target.icon))
- target.icon = initial(target.icon)
- return
-*/
-
-datum/reagent/paint
- name = "Paint"
- id = "paint_"
- reagent_state = 2
- color = "#808080"
- description = "This paint will only adhere to floor tiles."
-
- reaction_turf(var/turf/T, var/volume)
- if(!istype(T) || istype(T, /turf/space))
- return
- T.color = color
-
- reaction_obj(var/obj/O, var/volume)
- ..()
- if(istype(O,/obj/item/weapon/light))
- O.color = color
-
- red
- name = "Red Paint"
- id = "paint_red"
- color = "#FE191A"
-
- green
- name = "Green Paint"
- color = "#18A31A"
- id = "paint_green"
-
- blue
- name = "Blue Paint"
- color = "#247CFF"
- id = "paint_blue"
-
- yellow
- name = "Yellow Paint"
- color = "#FDFE7D"
- id = "paint_yellow"
-
- violet
- name = "Violet Paint"
- color = "#CC0099"
- id = "paint_violet"
-
- black
- name = "Black Paint"
- color = "#333333"
- id = "paint_black"
-
- white
- name = "White Paint"
- color = "#F0F8FF"
- id = "paint_white"
-
-datum/reagent/paint_remover
- name = "Paint Remover"
- id = "paint_remover"
- description = "Paint remover is used to remove floor paint from floor tiles."
- reagent_state = 2
- color = "#808080"
-
- reaction_turf(var/turf/T, var/volume)
- if(istype(T) && T.icon != initial(T.icon))
- T.icon = initial(T.icon)
- return
diff --git a/code/WorkInProgress/Ported/policetape.dm b/code/game/objects/items/weapons/policetape.dm
similarity index 99%
rename from code/WorkInProgress/Ported/policetape.dm
rename to code/game/objects/items/weapons/policetape.dm
index 4425a9713b..8791ea1075 100644
--- a/code/WorkInProgress/Ported/policetape.dm
+++ b/code/game/objects/items/weapons/policetape.dm
@@ -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
diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm
index b0b8fbdc04..5cab6b24cb 100644
--- a/code/game/objects/items/weapons/power_cells.dm
+++ b/code/game/objects/items/weapons/power_cells.dm
@@ -5,7 +5,6 @@
icon_state = "cell"
item_state = "cell"
origin_tech = "powerstorage=1"
- flags = FPRINT|TABLEPASS
force = 5.0
throwforce = 5.0
throw_speed = 3
diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm
index e9aa6f3ca6..92ba323a6a 100644
--- a/code/game/objects/items/weapons/scrolls.dm
+++ b/code/game/objects/items/weapons/scrolls.dm
@@ -4,7 +4,6 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
var/uses = 4.0
- flags = FPRINT | TABLEPASS
w_class = 2.0
item_state = "paper"
throw_speed = 4
@@ -70,7 +69,7 @@
return
if(user && user.buckled)
- user.buckled.unbuckle()
+ user.buckled.unbuckle_mob()
var/list/tempL = L
var/attempt = null
diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm
index 2814c6fe4d..65f1abddfb 100644
--- a/code/game/objects/items/weapons/shields.dm
+++ b/code/game/objects/items/weapons/shields.dm
@@ -6,7 +6,7 @@
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
icon = 'icons/obj/weapons.dmi'
icon_state = "riot"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BACK
force = 5.0
throwforce = 5.0
@@ -39,7 +39,7 @@
desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0" // eshield1 for expanded
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 3.0
throwforce = 5.0
throw_speed = 1
@@ -88,7 +88,7 @@
icon = 'icons/obj/device.dmi'
icon_state = "shield0"
var/active = 0.0
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
item_state = "electronic"
throwforce = 10.0
throw_speed = 2
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index 0304aac95e..2b38772b86 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -9,7 +9,6 @@
icon_state = "backpack"
item_state = "backpack"
w_class = 4.0
- flags = FPRINT|TABLEPASS
slot_flags = SLOT_BACK //ERROOOOO
max_w_class = 3
max_combined_w_class = 21
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index b2d54be947..88db6abd3e 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -21,7 +21,6 @@
display_contents_with_number = 0 // UNStABLE AS FuCK, turn on when it stops crashing clients
use_to_pickup = 1
slot_flags = SLOT_BELT
- flags = FPRINT | TABLEPASS
// -----------------------------
// Trash bag
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index 941fdaae3b..e190ac1e02 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -4,7 +4,6 @@
icon = 'icons/obj/clothing/belts.dmi'
icon_state = "utilitybelt"
item_state = "utility"
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined")
@@ -71,9 +70,16 @@
"/obj/item/device/flashlight/pen",
"/obj/item/clothing/mask/surgical",
"/obj/item/clothing/gloves/latex",
- "/obj/item/weapon/reagent_containers/hypospray"
+ "/obj/item/weapon/reagent_containers/hypospray"
)
+/obj/item/weapon/storage/belt/medical/emt
+ name = "EMT utility belt"
+ desc = "A sturdy black webbing belt with attached pouches."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "emsbelt"
+ item_state = "emsbelt"
+
/obj/item/weapon/storage/belt/security
name = "security belt"
diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm
index 0545f85d21..822b986488 100644
--- a/code/game/objects/items/weapons/storage/bible.dm
+++ b/code/game/objects/items/weapons/storage/bible.dm
@@ -5,7 +5,6 @@
throw_speed = 1
throw_range = 5
w_class = 3.0
- flags = FPRINT | TABLEPASS
var/mob/affecting = null
var/deity_name = "Christ"
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index 4b9a7dbe64..c724319160 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -149,7 +149,7 @@
new /obj/item/ammo_casing/shotgun/beanbag(src)
/obj/item/weapon/storage/box/shotgunammo
- name = "box of shotgun shells"
+ name = "box of shotgun slugs"
desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death."
New()
@@ -162,6 +162,20 @@
new /obj/item/ammo_casing/shotgun(src)
new /obj/item/ammo_casing/shotgun(src)
+/obj/item/weapon/storage/box/shotgunshells
+ name = "box of shotgun shells"
+ desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death."
+
+ New()
+ ..()
+ new /obj/item/ammo_casing/shotgun/pellet(src)
+ new /obj/item/ammo_casing/shotgun/pellet(src)
+ new /obj/item/ammo_casing/shotgun/pellet(src)
+ new /obj/item/ammo_casing/shotgun/pellet(src)
+ new /obj/item/ammo_casing/shotgun/pellet(src)
+ new /obj/item/ammo_casing/shotgun/pellet(src)
+ new /obj/item/ammo_casing/shotgun/pellet(src)
+
/obj/item/weapon/storage/box/flashbangs
name = "box of flashbangs (WARNING)"
desc = "WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use."
@@ -309,6 +323,20 @@
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
+
+/obj/item/weapon/storage/box/sinpockets
+ name = "box of sin-pockets"
+ desc = "Instructions: Crush bottom of package to initiate chemical heating. Wait for 20 seconds before consumption. Product will cool if not eaten within seven minutes."
+ icon_state = "donk_kit"
+
+ New()
+ ..()
+ new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
+ new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
+ new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
+ new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
+ new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
+ new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src)
/obj/item/weapon/storage/box/monkeycubes
name = "monkey cube box"
@@ -444,7 +472,6 @@
item_state = "zippo"
storage_slots = 10
w_class = 1
- flags = TABLEPASS
slot_flags = SLOT_BELT
can_hold = list("/obj/item/weapon/flame/match")
diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm
index 126d60e1e4..f6addee005 100644
--- a/code/game/objects/items/weapons/storage/briefcase.dm
+++ b/code/game/objects/items/weapons/storage/briefcase.dm
@@ -3,7 +3,7 @@
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
icon_state = "briefcase"
item_state = "briefcase"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 8.0
throw_speed = 1
throw_range = 4
diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm
index 64d8e89bb7..5566bca666 100644
--- a/code/game/objects/items/weapons/storage/fancy.dm
+++ b/code/game/objects/items/weapons/storage/fancy.dm
@@ -27,7 +27,7 @@
/obj/item/weapon/storage/fancy/examine(mob/user)
if(!..(user, 1))
return
-
+
if(contents.len <= 0)
user << "There are no [src.icon_type]s left in the box."
else if(contents.len == 1)
@@ -69,7 +69,6 @@
item_state = "candlebox5"
storage_slots = 5
throwforce = 2
- flags = TABLEPASS
slot_flags = SLOT_BELT
@@ -133,7 +132,6 @@
item_state = "cigpacket"
w_class = 1
throwforce = 2
- flags = TABLEPASS
slot_flags = SLOT_BELT
storage_slots = 6
can_hold = list("/obj/item/clothing/mask/cigarette")
@@ -143,7 +141,7 @@
..()
flags |= NOREACT
for(var/i = 1 to storage_slots)
- new /obj/item/clothing/mask/cigarette(src)
+ new /obj/item/clothing/mask/smokable/cigarette(src)
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
/obj/item/weapon/storage/fancy/cigarettes/Del()
@@ -156,7 +154,7 @@
return
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
- var/obj/item/clothing/mask/cigarette/C = W
+ var/obj/item/clothing/mask/smokable/cigarette/C = W
if(!istype(C)) return // what
reagents.trans_to(C, (reagents.total_volume/contents.len))
..()
@@ -166,7 +164,7 @@
return
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
- var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
+ var/obj/item/clothing/mask/smokable/cigarette/W = new /obj/item/clothing/mask/smokable/cigarette(user)
reagents.trans_to(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
@@ -190,7 +188,6 @@
icon = 'icons/obj/cigarettes.dmi'
w_class = 1
throwforce = 2
- flags = TABLEPASS
slot_flags = SLOT_BELT
storage_slots = 7
can_hold = list("/obj/item/clothing/mask/cigarette/cigar")
@@ -200,7 +197,7 @@
..()
flags |= NOREACT
for(var/i = 1 to storage_slots)
- new /obj/item/clothing/mask/cigarette/cigar(src)
+ new /obj/item/clothing/mask/smokable/cigarette/cigar(src)
create_reagents(15 * storage_slots)
/obj/item/weapon/storage/fancy/cigar/Del()
@@ -212,7 +209,7 @@
return
/obj/item/weapon/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location)
- var/obj/item/clothing/mask/cigarette/cigar/C = W
+ var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W
if(!istype(C)) return
reagents.trans_to(C, (reagents.total_volume/contents.len))
..()
@@ -222,7 +219,7 @@
return
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
- var/obj/item/clothing/mask/cigarette/cigar/W = new /obj/item/clothing/mask/cigarette/cigar(user)
+ var/obj/item/clothing/mask/smokable/cigarette/cigar/W = new /obj/item/clothing/mask/smokable/cigarette/cigar(user)
reagents.trans_to(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
reagents.maximum_volume = 15 * contents.len
diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm
index 6e2eca01c5..e2d45e0fac 100644
--- a/code/game/objects/items/weapons/storage/firstaid.dm
+++ b/code/game/objects/items/weapons/storage/firstaid.dm
@@ -109,6 +109,25 @@
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/splint(src)
return
+
+/obj/item/weapon/storage/firstaid/combat
+ name = "combat medical kit"
+ desc = "Contains advanced medical treatments."
+ icon_state = "bezerk"
+ item_state = "firstaid-advanced"
+
+/obj/item/weapon/storage/firstaid/combat/New()
+ ..()
+ if (empty) return
+ new /obj/item/weapon/storage/pill_bottle/bicaridine(src)
+ new /obj/item/weapon/storage/pill_bottle/dermaline(src)
+ new /obj/item/weapon/storage/pill_bottle/dexalin_plus(src)
+ new /obj/item/weapon/storage/pill_bottle/dylovene(src)
+ new /obj/item/weapon/storage/pill_bottle/tramadol(src)
+ new /obj/item/weapon/storage/pill_bottle/spaceacillin(src)
+ new /obj/item/stack/medical/splint(src)
+ return
+
/*
* Pill Bottles
*/
@@ -125,20 +144,6 @@
storage_slots = 14
use_sound = null
-/obj/item/weapon/storage/pill_bottle/kelotane
- name = "bottle of kelotane pills"
- desc = "Contains pills used to treat burns."
-
- New()
- ..()
- new /obj/item/weapon/reagent_containers/pill/kelotane( src )
- new /obj/item/weapon/reagent_containers/pill/kelotane( src )
- new /obj/item/weapon/reagent_containers/pill/kelotane( src )
- new /obj/item/weapon/reagent_containers/pill/kelotane( src )
- new /obj/item/weapon/reagent_containers/pill/kelotane( src )
- new /obj/item/weapon/reagent_containers/pill/kelotane( src )
- new /obj/item/weapon/reagent_containers/pill/kelotane( src )
-
/obj/item/weapon/storage/pill_bottle/antitox
name = "bottle of Dylovene pills"
desc = "Contains pills used to counter toxins."
@@ -153,6 +158,62 @@
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
+/obj/item/weapon/storage/pill_bottle/bicaridine
+ name = "bottle of Bicaridine pills"
+ desc = "Contains pills used to stabilize the severely injured."
+
+/obj/item/weapon/storage/pill_bottle/bicaridine/New()
+ ..()
+ new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
+ new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
+ new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
+ new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
+ new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
+ new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
+ new /obj/item/weapon/reagent_containers/pill/bicaridine(src)
+
+/obj/item/weapon/storage/pill_bottle/dexalin_plus
+ name = "bottle of Dexalin Plus pills"
+ desc = "Contains pills used to treat extreme cases of oxygen deprivation."
+
+/obj/item/weapon/storage/pill_bottle/dexalin_plus/New()
+ ..()
+ new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
+ new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
+ new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
+ new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
+ new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
+ new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
+ new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src)
+
+/obj/item/weapon/storage/pill_bottle/dermaline
+ name = "bottle of Dermaline pills"
+ desc = "Contains pills used to treat burn wounds."
+
+/obj/item/weapon/storage/pill_bottle/dermaline/New()
+ ..()
+ new /obj/item/weapon/reagent_containers/pill/dermaline(src)
+ new /obj/item/weapon/reagent_containers/pill/dermaline(src)
+ new /obj/item/weapon/reagent_containers/pill/dermaline(src)
+ new /obj/item/weapon/reagent_containers/pill/dermaline(src)
+ new /obj/item/weapon/reagent_containers/pill/dermaline(src)
+ new /obj/item/weapon/reagent_containers/pill/dermaline(src)
+ new /obj/item/weapon/reagent_containers/pill/dermaline(src)
+
+/obj/item/weapon/storage/pill_bottle/dylovene
+ name = "bottle of Dylovene pills"
+ desc = "Contains pills used to treat toxic substances in the blood."
+
+/obj/item/weapon/storage/pill_bottle/dylovene/New()
+ ..()
+ new /obj/item/weapon/reagent_containers/pill/dylovene(src)
+ new /obj/item/weapon/reagent_containers/pill/dylovene(src)
+ new /obj/item/weapon/reagent_containers/pill/dylovene(src)
+ new /obj/item/weapon/reagent_containers/pill/dylovene(src)
+ new /obj/item/weapon/reagent_containers/pill/dylovene(src)
+ new /obj/item/weapon/reagent_containers/pill/dylovene(src)
+ new /obj/item/weapon/reagent_containers/pill/dylovene(src)
+
/obj/item/weapon/storage/pill_bottle/inaprovaline
name = "bottle of Inaprovaline pills"
desc = "Contains pills used to stabilize patients."
@@ -167,8 +228,36 @@
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
+/obj/item/weapon/storage/pill_bottle/kelotane
+ name = "bottle of kelotane pills"
+ desc = "Contains pills used to treat burns."
+
+ New()
+ ..()
+ new /obj/item/weapon/reagent_containers/pill/kelotane( src )
+ new /obj/item/weapon/reagent_containers/pill/kelotane( src )
+ new /obj/item/weapon/reagent_containers/pill/kelotane( src )
+ new /obj/item/weapon/reagent_containers/pill/kelotane( src )
+ new /obj/item/weapon/reagent_containers/pill/kelotane( src )
+ new /obj/item/weapon/reagent_containers/pill/kelotane( src )
+ new /obj/item/weapon/reagent_containers/pill/kelotane( src )
+
+/obj/item/weapon/storage/pill_bottle/spaceacillin
+ name = "bottle of Spaceacillin pills"
+ desc = "A theta-lactam antibiotic. Effective against many diseases likely to be encountered in space."
+
+/obj/item/weapon/storage/pill_bottle/spaceacillin/New()
+ ..()
+ new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
+ new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
+ new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
+ new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
+ new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
+ new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
+ new /obj/item/weapon/reagent_containers/pill/spaceacillin(src)
+
/obj/item/weapon/storage/pill_bottle/tramadol
- name = "bottle of Tramadol Pills"
+ name = "bottle of Tramadol pills"
desc = "Contains pills used to relieve pain."
New()
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index b3e94bf4d9..74c47cab05 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -145,7 +145,6 @@
icon_state = "secure"
item_state = "sec-case"
desc = "A large briefcase with a digital locking system."
- flags = FPRINT | TABLEPASS
force = 8.0
throw_speed = 1
throw_range = 4
@@ -216,7 +215,6 @@
icon_opened = "safe0"
icon_locking = "safeb"
icon_sparking = "safespark"
- flags = FPRINT | TABLEPASS
force = 8.0
w_class = 8.0
max_w_class = 8
diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm
index b6b11af106..a585b96ce2 100644
--- a/code/game/objects/items/weapons/storage/toolbox.dm
+++ b/code/game/objects/items/weapons/storage/toolbox.dm
@@ -4,7 +4,7 @@
icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_state = "toolbox_red"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 5.0
throwforce = 10.0
throw_speed = 1
diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm
index fc1d2e2b8a..aa66b26f12 100644
--- a/code/game/objects/items/weapons/storage/uplink_kits.dm
+++ b/code/game/objects/items/weapons/storage/uplink_kits.dm
@@ -149,3 +149,71 @@
..()
new /obj/item/weapon/stamp/chameleon(src)
new /obj/item/weapon/pen/chameleon(src)
+ new /obj/item/device/destTagger(src)
+ new /obj/item/weapon/packageWrap(src)
+ new /obj/item/weapon/hand_labeler(src)
+
+/obj/item/weapon/storage/box/syndie_kit/spy
+ name = "spy kit"
+ desc = "For when you want to conduct voyeurism from afar."
+
+/obj/item/weapon/storage/box/syndie_kit/spy/New()
+ ..()
+ new /obj/item/device/spy_bug(src)
+ new /obj/item/device/spy_bug(src)
+ new /obj/item/device/spy_bug(src)
+ new /obj/item/device/spy_bug(src)
+ new /obj/item/device/spy_bug(src)
+ new /obj/item/device/spy_bug(src)
+ new /obj/item/device/spy_monitor(src)
+
+/obj/item/weapon/storage/box/syndie_kit/g9mm
+ name = "\improper Smooth operator"
+ desc = "9mm with silencer kit."
+
+/obj/item/weapon/storage/box/syndie_kit/g9mm/New()
+ ..()
+ new /obj/item/weapon/gun/projectile/pistol(src)
+ new /obj/item/weapon/silencer(src)
+
+/obj/item/weapon/storage/box/syndie_kit/cigarette
+ name = "\improper Tricky smokes"
+ desc = "Comes with the following brands of cigarettes, in this order: 2xFlash, 2xSmoke, 1xMindBreaker, 1xTricordrazine. Avoid mixing them up."
+
+/obj/item/weapon/storage/box/syndie_kit/cigarette/New()
+ ..()
+ var/obj/item/weapon/storage/fancy/cigarettes/pack
+ pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
+ fill_cigarre_package(pack, list("aluminum" = 5, "potassium" = 5, "sulfur" = 5))
+ pack.desc += " 'F' has been scribbled on it."
+
+ pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
+ fill_cigarre_package(pack, list("aluminum" = 5, "potassium" = 5, "sulfur" = 5))
+ pack.desc += " 'F' has been scribbled on it."
+
+ pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
+ fill_cigarre_package(pack, list("potassium" = 5, "sugar" = 5, "phosphorus" = 5))
+ pack.desc += " 'S' has been scribbled on it."
+
+ pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
+ fill_cigarre_package(pack, list("potassium" = 5, "sugar" = 5, "phosphorus" = 5))
+ pack.desc += " 'S' has been scribbled on it."
+
+ pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
+ // Dylovene. Going with 1.5 rather than 1.6666666...
+ fill_cigarre_package(pack, list("potassium" = 1.5, "nitrogen" = 1.5, "silicon" = 1.5))
+ // Mindbreaker
+ fill_cigarre_package(pack, list("silicon" = 4.5, "hydrogen" = 4.5))
+
+ pack.desc += " 'MB' has been scribbled on it."
+
+ pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
+ pack.reagents.add_reagent("tricordrazine", 15 * pack.storage_slots)
+ pack.desc += " 'T' has been scribbled on it."
+
+ new /obj/item/weapon/flame/lighter/zippo(src)
+
+/proc/fill_cigarre_package(var/obj/item/weapon/storage/fancy/cigarettes/C, var/list/reagents)
+ for(var/reagent in reagents)
+ C.reagents.add_reagent(reagent, reagents[reagent] * C.storage_slots)
+
diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm
index d9d7ec0126..383e21ff4f 100644
--- a/code/game/objects/items/weapons/surgery_tools.dm
+++ b/code/game/objects/items/weapons/surgery_tools.dm
@@ -17,7 +17,7 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
matter = list("metal" = 10000, "glass" = 5000)
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -30,7 +30,7 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat"
matter = list("metal" = 5000, "glass" = 2500)
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "pinched")
@@ -44,7 +44,7 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
matter = list("metal" = 5000, "glass" = 2500)
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("burnt")
@@ -59,7 +59,7 @@
icon_state = "drill"
hitsound = 'sound/weapons/circsawhit.ogg'
matter = list("metal" = 15000, "glass" = 10000)
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
force = 15.0
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -78,7 +78,7 @@
desc = "Cut, cut, and once more cut."
icon = 'icons/obj/surgery.dmi'
icon_state = "scalpel"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
force = 10.0
sharp = 1
edge = 1
@@ -134,7 +134,7 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "saw3"
hitsound = 'sound/weapons/circsawhit.ogg'
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
force = 15.0
w_class = 2.0
throwforce = 9.0
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index 34516e875f..e7d46bc68e 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -21,7 +21,6 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "baton"
item_state = "classic_baton"
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 10
@@ -70,7 +69,6 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "telebaton_0"
item_state = "telebaton_0"
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2
force = 3
diff --git a/code/game/objects/items/weapons/table_rack_parts.dm b/code/game/objects/items/weapons/table_rack_parts.dm
index fff0deed5f..2dfc3f4730 100644
--- a/code/game/objects/items/weapons/table_rack_parts.dm
+++ b/code/game/objects/items/weapons/table_rack_parts.dm
@@ -7,7 +7,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "table_parts"
matter = list("metal" = 3750)
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
var/build_type = /obj/structure/table
@@ -50,7 +50,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "reinf_tableparts"
matter = list("metal" = 7500)
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
stack_types = list(/obj/item/stack/sheet/metal, /obj/item/stack/rods)
build_type = /obj/structure/table/reinforced
diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm
index 23a5690e3f..02d50e0d26 100644
--- a/code/game/objects/items/weapons/tanks/tank_types.dm
+++ b/code/game/objects/items/weapons/tanks/tank_types.dm
@@ -85,7 +85,7 @@
name = "phoron tank"
desc = "Contains dangerous phoron. Do not inhale. Warning: extremely flammable."
icon_state = "phoron"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = null //they have no straps!
@@ -114,7 +114,7 @@
name = "emergency oxygen tank"
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
icon_state = "emergency"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0
force = 4.0
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index d7a05a7173..551e4790dc 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -4,7 +4,7 @@
/obj/item/weapon/tank
name = "tank"
icon = 'icons/obj/tank.dmi'
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BACK
w_class = 3
diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm
index 2d82cacaad..477bce6b32 100644
--- a/code/game/objects/items/weapons/tape.dm
+++ b/code/game/objects/items/weapons/tape.dm
@@ -13,7 +13,7 @@
user.put_in_hands(tape)
*/
-/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user as mob)
+/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user)
if(!istype(W, /obj/item/weapon/paper))
return
@@ -30,14 +30,14 @@
w_class = 1
layer = 4
anchored = 1 //it's sticky, no you cant move it
-
+
var/obj/item/weapon/stuck = null
/obj/item/weapon/ducttape/New()
..()
flags |= NOBLUDGEON
-/obj/item/weapon/ducttape/examine(mob/user as mob)
+/obj/item/weapon/ducttape/examine(mob/user)
return stuck.examine(user)
/obj/item/weapon/ducttape/proc/attach(var/obj/item/weapon/W)
@@ -47,7 +47,7 @@
name = W.name + " (taped)"
overlays = W.overlays
-/obj/item/weapon/ducttape/attack_self(mob/user as mob)
+/obj/item/weapon/ducttape/attack_self(mob/user)
if(!stuck)
return
@@ -60,7 +60,7 @@
overlays = null
del(src)
-/obj/item/weapon/ducttape/afterattack(var/A, mob/user as mob, flag, params)
+/obj/item/weapon/ducttape/afterattack(var/A, mob/user, flag, params)
if(!in_range(user, A) || istype(A, /obj/machinery/door) || !stuck)
return
@@ -70,6 +70,9 @@
var/dir_offset = 0
if(target_turf != source_turf)
dir_offset = get_dir(source_turf, target_turf)
+ if(!(dir_offset in cardinal))
+ user << "You cannot reach that from here." // can only place stuck papers in cardinal directions, to
+ return // reduce papers around corners issue.
user.drop_from_inventory(src)
forceMove(source_turf)
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index e04a5f0888..d8c811d2f6 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -16,7 +16,7 @@
var/frequency = 1451
var/broadcasting = null
var/listening = 1.0
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
w_class = 2.0
item_state = "electronic"
throw_speed = 4
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 62793f0b2c..ee56415be7 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -19,7 +19,7 @@
desc = "A wrench with many common uses. Can be usually found in your hand."
icon = 'icons/obj/items.dmi'
icon_state = "wrench"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
force = 5.0
throwforce = 7.0
@@ -37,7 +37,7 @@
desc = "You can be totally screwwy with this."
icon = 'icons/obj/items.dmi'
icon_state = "screwdriver"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
force = 5.0
w_class = 1.0
@@ -96,7 +96,7 @@
desc = "This cuts wires."
icon = 'icons/obj/items.dmi'
icon_state = "cutters"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
force = 6.0
throw_speed = 2
@@ -119,6 +119,8 @@
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
C.handcuffed = null
+ if(C.buckled && C.buckled.buckle_require_restraints)
+ C.buckled.unbuckle_mob()
C.update_inv_handcuffed()
return
else
@@ -131,7 +133,7 @@
name = "welding tool"
icon = 'icons/obj/items.dmi'
icon_state = "welder"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
//Amount of OUCH when it's thrown
@@ -259,6 +261,9 @@
if (src.welding)
remove_fuel(1)
var/turf/location = get_turf(user)
+ if(isliving(O))
+ var/mob/living/L = O
+ L.IgniteMob()
if (istype(location, /turf))
location.hotspot_expose(700, 50, 1)
return
@@ -433,7 +438,7 @@
desc = "Used to remove floors and to pry open doors."
icon = 'icons/obj/items.dmi'
icon_state = "crowbar"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
force = 5.0
throwforce = 7.0
@@ -531,4 +536,4 @@
if(!resolved && tool && target)
tool.afterattack(target,user,1)
if(tool)
- tool.loc = src*/
+ tool.loc = src*/
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index c8e67078b2..2ccd78d361 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -21,6 +21,7 @@
var/force_wielded = 0
var/wieldsound = null
var/unwieldsound = null
+ var/base_icon
/obj/item/weapon/twohanded/proc/unwield()
wielded = 0
@@ -34,6 +35,10 @@
name = "[initial(name)] (Wielded)"
update_icon()
+/obj/item/weapon/twohanded/New()
+ ..()
+ update_icon()
+
/obj/item/weapon/twohanded/mob_can_equip(M as mob, slot)
//Cannot equip wielded items.
if(wielded)
@@ -51,7 +56,8 @@
return unwield()
/obj/item/weapon/twohanded/update_icon()
- return
+ icon_state = "[base_icon][wielded]"
+ item_state = icon_state
/obj/item/weapon/twohanded/pickup(mob/user)
unwield()
@@ -106,11 +112,15 @@
wield()
del(src)
+/obj/item/weapon/twohanded/offhand/update_icon()
+ return
+
/*
* Fireaxe
*/
/obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
+ base_icon = "fireaxe"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 10
@@ -121,10 +131,6 @@
force_wielded = 40
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
-/obj/item/weapon/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons.
- icon_state = "fireaxe[wielded]"
- return
-
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
@@ -146,6 +152,7 @@
*/
/obj/item/weapon/twohanded/dualsaber
icon_state = "dualsaber0"
+ base_icon = "dualsaber"
name = "double-bladed energy sword"
desc = "Handle with care."
force = 3
@@ -156,16 +163,12 @@
force_wielded = 30
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
- flags = FPRINT | TABLEPASS | NOSHIELD
+ flags = NOSHIELD
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
-/obj/item/weapon/twohanded/dualsaber/update_icon()
- icon_state = "dualsaber[wielded]"
- return
-
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
@@ -187,6 +190,7 @@
//spears, bay edition
/obj/item/weapon/twohanded/spear
icon_state = "spearglass0"
+ base_icon = "spearglass"
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
force = 14
@@ -201,6 +205,29 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
-/obj/item/weapon/twohanded/spear/update_icon()
- icon_state = "spearglass[wielded]"
- return
+/obj/item/weapon/twohanded/baseballbat
+ name = "wooden bat"
+ desc = "HOME RUN!"
+ icon_state = "woodbat0"
+ base_icon = "woodbat"
+ item_state = "woodbat"
+ sharp = 0
+ edge = 0
+ w_class = 3
+ force = 15
+ throw_speed = 3
+ throw_range = 7
+ throwforce = 7
+ attack_verb = list("smashed", "beaten", "slammed", "smacked", "striked", "battered", "bonked")
+ hitsound = 'sound/weapons/genhit3.ogg'
+ force_wielded = 23
+
+/obj/item/weapon/twohanded/baseballbat/metal
+ name = "metal bat"
+ desc = "A shiny metal bat."
+ icon_state = "metalbat0"
+ base_icon = "metalbat"
+ item_state = "metalbat"
+ force = 18
+ w_class = 3.0
+ force_wielded = 27
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index a584f3db4b..02f6642037 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -3,7 +3,6 @@
name = "banhammer"
icon = 'icons/obj/items.dmi'
icon_state = "toyhammer"
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
throwforce = 0
w_class = 2.0
@@ -20,7 +19,6 @@
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of paranormal phenomenae."
icon_state = "nullrod"
item_state = "nullrod"
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 15
throw_speed = 1
@@ -77,7 +75,6 @@
desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
icon_state = "sord"
item_state = "sord"
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 2
throwforce = 1
@@ -99,7 +96,7 @@
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
force = 40
throwforce = 10
@@ -124,7 +121,7 @@
desc = "Woefully underpowered in D20"
icon_state = "katana"
item_state = "katana"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
force = 40
throwforce = 10
@@ -156,30 +153,6 @@
w_class = 3
attack_verb = list("jabbed","stabbed","ripped")
-/obj/item/weapon/baseballbat
- name = "wooden bat"
- desc = "HOME RUN!"
- icon_state = "woodbat"
- item_state = "woodbat"
- sharp = 0
- edge = 0
- w_class = 3
- force = 15
- throw_speed = 3
- throw_range = 7
- throwforce = 7
- attack_verb = list("smashed", "beaten", "slammed", "smacked", "striked", "battered", "bonked")
- hitsound = 'sound/weapons/genhit3.ogg'
-
-
-/obj/item/weapon/baseballbat/metal
- name = "metal bat"
- desc = "A shiny metal bat."
- icon_state = "metalbat"
- item_state = "metalbat"
- force = 18
- w_class = 3.0
-
/obj/item/weapon/butterfly
name = "butterfly knife"
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
diff --git a/code/WorkInProgress/Wrongnumber/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm
similarity index 100%
rename from code/WorkInProgress/Wrongnumber/weldbackpack.dm
rename to code/game/objects/items/weapons/weldbackpack.dm
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 167794721b..bbcad347b5 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -16,11 +16,14 @@
var/damtype = "brute"
var/force = 0
-/obj/Topic(href, href_list, var/nowindow = 0)
+/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
// Calling Topic without a corresponding window open causes runtime errors
- if(nowindow)
- return 0
- return ..()
+ if(!nowindow && ..())
+ return 1
+ if(usr.can_interact_with_interface(src, checkrange) != STATUS_INTERACTIVE)
+ return 1
+ add_fingerprint(usr)
+ return 0
/obj/item/proc/is_used_on(obj/O, mob/user)
diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm
index 53f4cc0903..d62d1d1a54 100644
--- a/code/game/objects/random/random.dm
+++ b/code/game/objects/random/random.dm
@@ -25,6 +25,15 @@
return (new build_path(src.loc))
+/obj/random/single
+ name = "randomly spawned object"
+ desc = "This item type is used to randomly spawn a given object at round-start"
+ icon_state = "x3"
+ var/spawn_object = null
+ item_to_spawn()
+ return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
+
+
/obj/random/tool
name = "random tool"
desc = "This is a random tool"
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index d105caae00..a23bb65cf8 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -20,7 +20,7 @@
var/mob/living/carbon/human/H = user
if(H.species.can_shred(user))
attack_generic(user,1,"slices")
- return
+ return ..()
/obj/structure/blob_act()
if(prob(50))
@@ -67,10 +67,10 @@
/obj/structure/MouseDrop_T(mob/target, mob/user)
var/mob/living/H = user
- if(!istype(H) || target != user) // No making other people climb onto tables.
- return
-
- do_climb(target)
+ if(istype(H) && can_climb(H) && target == user)
+ do_climb(target)
+ else
+ return ..()
/obj/structure/proc/can_climb(var/mob/living/user)
if (!can_touch(user) || !climbable)
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 4aaae90a9a..40163e7c78 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -4,7 +4,6 @@
icon = 'icons/obj/closet.dmi'
icon_state = "closed"
density = 1
- flags = FPRINT
var/icon_closed = "closed"
var/icon_opened = "open"
var/opened = 0
@@ -21,7 +20,7 @@
var/store_items = 1
var/store_mobs = 1
- var/const/mob_size = 15
+ var/const/default_mob_size = 15
/obj/structure/closet/initialize()
if(!opened) // if closed, any item at the crate's loc is put in the contents
@@ -121,20 +120,17 @@
/obj/structure/closet/proc/store_mobs(var/stored_units)
var/added_units = 0
- for(var/mob/M in src.loc)
- if(stored_units + added_units + mob_size > storage_capacity)
- break
- if(istype (M, /mob/dead/observer))
- continue
+ for(var/mob/living/M in src.loc)
if(M.buckled || M.pinned.len)
continue
-
+ var/current_mob_size = (M.mob_size ? M.mob_size : default_mob_size)
+ if(stored_units + added_units + current_mob_size > storage_capacity)
+ break
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
-
M.loc = src
- added_units += mob_size
+ added_units += current_mob_size
return added_units
/obj/structure/closet/proc/toggle(mob/user as mob)
@@ -165,6 +161,9 @@
del(src)
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
+ return
+
health -= Proj.damage
..()
if(health <= 0)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
index 803f07616e..d583e77547 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
@@ -16,9 +16,9 @@
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
if (prob(70))
- new /obj/item/clothing/tie/storage/brown_vest(src)
+ new /obj/item/clothing/accessory/storage/brown_vest(src)
else
- new /obj/item/clothing/tie/storage/webbing(src)
+ new /obj/item/clothing/accessory/storage/webbing(src)
new /obj/item/blueprints(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/head/hardhat/white(src)
@@ -109,9 +109,9 @@
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
if (prob(70))
- new /obj/item/clothing/tie/storage/brown_vest(src)
+ new /obj/item/clothing/accessory/storage/brown_vest(src)
else
- new /obj/item/clothing/tie/storage/webbing(src)
+ new /obj/item/clothing/accessory/storage/webbing(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/clothing/suit/storage/hazardvest(src)
@@ -138,9 +138,9 @@
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
if (prob(70))
- new /obj/item/clothing/tie/storage/brown_vest(src)
+ new /obj/item/clothing/accessory/storage/brown_vest(src)
else
- new /obj/item/clothing/tie/storage/webbing(src)
+ new /obj/item/clothing/accessory/storage/webbing(src)
new /obj/item/clothing/suit/fire/firefighter(src)
new /obj/item/device/flashlight(src)
new /obj/item/weapon/extinguisher(src)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index b5b8796b3c..6ee564d76b 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -119,7 +119,7 @@
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
- new /obj/item/clothing/tie/holster/waist(src)
+ new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/head/beret/sec/hos(src)
return
@@ -192,7 +192,7 @@
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer(src)
- new /obj/item/clothing/tie/storage/black_vest(src)
+ new /obj/item/clothing/accessory/storage/black_vest(src)
new /obj/item/clothing/head/soft/sec/corp(src)
new /obj/item/clothing/under/rank/security/corp(src)
return
@@ -202,7 +202,7 @@
New()
..()
- new /obj/item/clothing/tie/armband/cargo(src)
+ new /obj/item/clothing/accessory/armband/cargo(src)
new /obj/item/device/encryptionkey/headset_cargo(src)
return
@@ -210,7 +210,7 @@
New()
..()
- new /obj/item/clothing/tie/armband/engine(src)
+ new /obj/item/clothing/accessory/armband/engine(src)
new /obj/item/device/encryptionkey/headset_eng(src)
return
@@ -218,7 +218,7 @@
New()
..()
- new /obj/item/clothing/tie/armband/science(src)
+ new /obj/item/clothing/accessory/armband/science(src)
new /obj/item/device/encryptionkey/headset_sci(src)
return
@@ -226,7 +226,7 @@
New()
..()
- new /obj/item/clothing/tie/armband/medgreen(src)
+ new /obj/item/clothing/accessory/armband/medgreen(src)
new /obj/item/device/encryptionkey/headset_med(src)
return
@@ -262,7 +262,7 @@
new /obj/item/ammo_magazine/c45r(src)
new /obj/item/taperoll/police(src)
new /obj/item/weapon/gun/projectile/detective/semiauto(src)
- new /obj/item/clothing/tie/holster/armpit(src)
+ new /obj/item/clothing/accessory/holster/armpit(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()
diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm
index e9fdd40966..d2b1f56eb3 100644
--- a/code/game/objects/structures/crates_lockers/largecrate.dm
+++ b/code/game/objects/structures/crates_lockers/largecrate.dm
@@ -4,7 +4,6 @@
icon = 'icons/obj/storage.dmi'
icon_state = "densecrate"
density = 1
- flags = FPRINT
/obj/structure/largecrate/attack_hand(mob/user as mob)
user << "You need a crowbar to pry this open!"
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index db0a5acc91..0512b814b2 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -5,6 +5,7 @@
layer = 2
var/state = 0
var/health = 200
+ var/cover = 50 //how much cover the girder provides against projectiles.
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
if(!damage || !wallbreaker)
@@ -14,19 +15,25 @@
return 1
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
+ //Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
+ if(Proj.original != src && !prob(cover))
+ return -1 //pass through
//Tasers and the like should not damage girders.
- if(Proj.damage_type == HALLOSS || Proj.damage_type == TOX || Proj.damage_type == CLONE)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
- if(istype(Proj, /obj/item/projectile/beam))
- health -= Proj.damage
- ..()
- if(health <= 0)
- new /obj/item/stack/sheet/metal(get_turf(src))
- del(src)
+ var/damage = Proj.damage
+ if(!istype(Proj, /obj/item/projectile/beam))
+ damage *= 0.4 //non beams do reduced damage
+
+ health -= damage
+ ..()
+ if(health <= 0)
+ new /obj/item/stack/sheet/metal(get_turf(src))
+ del(src)
- return
+ return
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench) && state == 0)
@@ -209,11 +216,13 @@
icon_state = "displaced"
anchored = 0
health = 50
+ cover = 25
/obj/structure/girder/reinforced
icon_state = "reinforced"
state = 2
health = 500
+ cover = 80
/obj/structure/cultgirder
icon= 'icons/obj/cult.dmi'
@@ -222,6 +231,7 @@
density = 1
layer = 2
var/health = 250
+ var/cover = 70
/obj/structure/cultgirder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
if(!damage || !wallbreaker)
@@ -258,6 +268,14 @@
dismantle()
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
+ //Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
+ if(Proj.original != src && !prob(cover))
+ return -1 //pass through
+
+ //Tasers and the like should not damage cultgirders.
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
+ return
+
health -= Proj.damage
..()
if(health <= 0)
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 9bb1cec396..76eac1b6b4 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -5,7 +5,7 @@
icon_state = "grille"
density = 1
anchored = 1
- flags = FPRINT | CONDUCT
+ flags = CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9
explosion_resistance = 5
@@ -59,16 +59,33 @@
return !density
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
-
if(!Proj) return
//Tasers and the like should not damage grilles.
- if(Proj.damage_type == HALLOSS)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
- src.health -= Proj.damage*0.2
- healthcheck()
- return 0
+ //Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
+ var/damage = Proj.damage
+ var/passthrough
+ if(damage > 30)
+ passthrough = 1
+ if(prob(20))
+ Proj.damage *= 0.5 //weaken the projectile
+ else
+ //weaker bullets are affected to a greater extent
+ if(prob(20))
+ passthrough = 0
+ else
+ Proj.damage *= 0.5 //weaken the projectile
+ passthrough = 1
+
+ if(passthrough)
+ . = -1
+ damage *= 0.1 //if the bullet passes through then the grille avoids most of the damage
+
+ src.health -= damage*0.2
+ spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(iswirecutter(W))
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index 9c5182382b..5df70a54bb 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -38,6 +38,9 @@
return 0
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
+ return
+
health -= Proj.damage
..()
if(health <= 0)
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index 0b542dd2bb..836b35ca02 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -211,7 +211,7 @@
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
- unbuckle()
+ unbuckle_mob()
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
step(src, direction)
update_mob()
@@ -226,22 +226,9 @@
buckled_mob.loc = loc
-/obj/structure/stool/bed/chair/janicart/buckle_mob(mob/M, mob/user)
- if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon))
- return
-
- unbuckle()
-
- M.visible_message(\
- "[M] climbs onto the [callme]!",\
- "You climb onto the [callme]!")
- M.buckled = src
- M.loc = loc
- M.set_dir(dir)
- M.update_canmove()
- buckled_mob = M
+/obj/structure/stool/bed/chair/janicart/post_buckle_mob(mob/living/M)
update_mob()
- add_fingerprint(user)
+ return ..()
/obj/structure/stool/bed/chair/janicart/update_layer()
@@ -251,11 +238,12 @@
layer = OBJ_LAYER
-/obj/structure/stool/bed/chair/janicart/unbuckle()
- if(buckled_mob)
- buckled_mob.pixel_x = 0
- buckled_mob.pixel_y = 0
- ..()
+/obj/structure/stool/bed/chair/janicart/unbuckle_mob()
+ var/mob/living/M = ..()
+ if(M)
+ M.pixel_x = 0
+ M.pixel_y = 0
+ return M
/obj/structure/stool/bed/chair/janicart/set_dir()
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 58e1a81b97..93868d720d 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -1,7 +1,7 @@
//wip wip wup
/obj/structure/mirror
- name = "\improper SalonPro Nano-Mirror(TM)"
- desc = "The leading technology in hair salon products, utilizing nano-machinery to style your hair just right."
+ name = "mirror"
+ desc = "A SalonPro Nano-Mirror(TM) brand mirror! The leading technology in hair salon products, utilizing nano-machinery to style your hair just right."
icon = 'icons/obj/watercloset.dmi'
icon_state = "mirror"
density = 0
@@ -70,6 +70,9 @@
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
+ return
+
if(prob(Proj.damage * 2))
if(!shattered)
shatter()
diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm
index 06aae9557b..ec568b8408 100644
--- a/code/game/objects/structures/mop_bucket.dm
+++ b/code/game/objects/structures/mop_bucket.dm
@@ -5,7 +5,7 @@
icon_state = "mopbucket"
density = 1
pressure_resistance = 5
- flags = FPRINT | TABLEPASS | OPENCONTAINER
+ flags = OPENCONTAINER
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 0b0c063af2..1a87fcede9 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -92,7 +92,7 @@
return
if ((!in_range(src, usr) && src.loc != user))
return
- t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
+ t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if (t)
src.name = text("Morgue- '[]'", t)
else
@@ -258,7 +258,7 @@
return
if ((!in_range(src, usr) > 1 && src.loc != user))
return
- t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
+ t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if (t)
src.name = text("Crematorium- '[]'", t)
else
@@ -316,7 +316,7 @@
var/mob/living/carbon/C = M
if (!(C.species && (C.species.flags & NO_PAIN)))
C.emote("scream")
-
+
//Logging for this causes runtimes resulting in the cremator locking up. Commenting it out until that's figured out.
//M.attack_log += "\[[time_stamp()]\] Has been cremated by [user]/[user.ckey]" //No point in this when the mob's about to be deleted
//user.attack_log +="\[[time_stamp()]\] Cremated [M]/[M.ckey]"
@@ -379,12 +379,21 @@
//Foreach goto(99)
return
-/obj/machinery/crema_switch/attack_hand(mob/user as mob)
+/obj/machinery/button/crematorium
+ name = "crematorium igniter"
+ desc = "Burn baby burn!"
+ icon = 'icons/obj/power.dmi'
+ icon_state = "crema_switch"
+ req_access = list(access_crematorium)
+ id = 1
+
+/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
+ if(..())
+ return
if(src.allowed(usr))
for (var/obj/structure/crematorium/C in world)
if (C.id == id)
if (!C.cremating)
C.cremate(user)
else
- usr << "\red Access denied."
- return
+ usr << "Access denied."
diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm
index 1f23e10411..a5ad84c20e 100644
--- a/code/game/objects/structures/noticeboard.dm
+++ b/code/game/objects/structures/noticeboard.dm
@@ -3,7 +3,6 @@
desc = "A board for pinning important notices upon."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "nboard00"
- flags = FPRINT
density = 0
anchored = 1
var/notices = 0
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index a219268d04..199635cd0f 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -90,7 +90,7 @@ FLOOR SAFES
var/mob/living/carbon/human/user = usr
var/canhear = 0
- if(istype(user.l_hand, /obj/item/clothing/tie/stethoscope) || istype(user.r_hand, /obj/item/clothing/tie/stethoscope))
+ if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
canhear = 1
if(href_list["open"])
@@ -155,7 +155,7 @@ FLOOR SAFES
user << "[I] won't fit in [src]."
return
else
- if(istype(I, /obj/item/clothing/tie/stethoscope))
+ if(istype(I, /obj/item/clothing/accessory/stethoscope))
user << "Hold [I] in one of your hands while you manipulate the dial."
return
diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
index e67fea3849..451bfd8b3e 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
@@ -8,7 +8,7 @@
icon_state = "nest"
var/health = 100
-/obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob)
+/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
@@ -18,7 +18,7 @@
"You hear squelching...")
buckled_mob.pixel_y = 0
buckled_mob.old_y = 0
- unbuckle()
+ unbuckle_mob()
else
if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME)
return
@@ -32,16 +32,15 @@
buckled_mob.last_special = world.time
buckled_mob.pixel_y = 0
buckled_mob.old_y = 0
- unbuckle()
+ unbuckle_mob()
src.add_fingerprint(user)
return
-/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
-
+/obj/structure/stool/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
return
- unbuckle()
+ unbuckle_mob()
var/mob/living/carbon/xenos = user
var/mob/living/carbon/victim = M
diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index 8902dbc8ec..cd8d78c4c6 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -11,8 +11,10 @@
name = "bed"
desc = "This is used to lie in, sleep in or strap on."
icon_state = "bed"
- var/mob/living/buckled_mob
- var/movable = 0 // For mobility checks
+ can_buckle = 1
+ buckle_lying = 1
+ //var/mob/living/buckled_mob
+ //var/movable = 0 // For mobility checks
/obj/structure/stool/bed/psych
name = "psychiatrists couch"
@@ -24,7 +26,7 @@
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
icon_state = "abed"
-/obj/structure/stool/bed/Del()
+/*/obj/structure/stool/bed/Del()
unbuckle()
..()
return
@@ -80,7 +82,7 @@
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
- if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
+ if (!ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
return
if (istype(M, /mob/living/carbon/slime))
@@ -106,7 +108,7 @@
src.buckled_mob = M
src.add_fingerprint(user)
afterbuckle(M)
- return
+ return*/
/*
* Roller beds
@@ -120,7 +122,7 @@
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/roller_holder))
if(buckled_mob)
- manual_unbuckle()
+ user_unbuckle_mob(user)
else
visible_message("[user] collapses \the [src.name].")
new/obj/item/roller(get_turf(src))
@@ -185,29 +187,19 @@
else
buckled_mob = null
-/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
- if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) )
- return
- M.pixel_y = 6
- M.old_y = 6
- density = 1
- icon_state = "up"
- ..()
- return
+/obj/structure/stool/bed/roller/post_buckle_mob(mob/living/M as mob)
+ if(M == buckled_mob)
+ M.pixel_y = 6
+ M.old_y = 6
+ density = 1
+ icon_state = "up"
+ else
+ buckled_mob.pixel_y = 0
+ buckled_mob.old_y = 0
+ density = 0
+ icon_state = "down"
-/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
- if(buckled_mob)
- if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
- buckled_mob.pixel_y = 0
- buckled_mob.old_y = 0
- buckled_mob.anchored = initial(buckled_mob.anchored)
- buckled_mob.buckled = null
- buckled_mob.update_canmove()
- buckled_mob = null
- density = 0
- icon_state = "down"
- ..()
- return
+ return ..()
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
..()
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
index 16d84f6aad..55f3e36398 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -2,12 +2,10 @@
name = "chair"
desc = "You sit in this. Either by will or force."
icon_state = "chair"
+ buckle_lying = 0 //force people to sit up in chairs when buckled
var/propelled = 0 // Check for fire-extinguisher-driven chairs
-/obj/structure/stool/MouseDrop(atom/over_object)
- return
-
/obj/structure/stool/bed/chair/New()
..()
spawn(3) //sorry. i don't think there's a better way to do this.
@@ -68,11 +66,6 @@
src.set_dir(turn(src.dir, 90))
return
-/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
- if(!istype(M)) return
- buckle_mob(M, user)
- return
-
// Chair types
/obj/structure/stool/bed/chair/wood/normal
icon_state = "wooden_chair"
@@ -105,7 +98,7 @@
return ..()
-/obj/structure/stool/bed/chair/comfy/afterbuckle()
+/obj/structure/stool/bed/chair/comfy/post_buckle_mob()
if(buckled_mob)
overlays += armrest
else
@@ -122,7 +115,7 @@
/obj/structure/stool/bed/chair/office
anchored = 0
- movable = 1
+ buckle_movable = 1
/obj/structure/stool/bed/chair/comfy/black
color = rgb(167,164,153)
@@ -143,15 +136,14 @@
if (O != occupant)
Bump(O)
else
- unbuckle()
+ unbuckle_mob()
/obj/structure/stool/bed/chair/office/Bump(atom/A)
..()
if(!buckled_mob) return
if(propelled)
- var/mob/living/occupant = buckled_mob
- unbuckle()
+ var/mob/living/occupant = unbuckle_mob()
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm
index f412467c65..dce74304ec 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm
@@ -4,7 +4,6 @@
icon = 'icons/obj/objects.dmi'
icon_state = "stool"
anchored = 1.0
- flags = FPRINT
pressure_resistance = 15
/obj/structure/stool/ex_act(severity)
@@ -35,7 +34,7 @@
return
/obj/structure/stool/MouseDrop(atom/over_object)
- if (istype(over_object, /mob/living/carbon/human))
+ if(istype(over_object, /mob/living/carbon/human) && type == /obj/structure/stool) //i am sorry for this, but the inheritance mess requires it
var/mob/living/carbon/human/H = over_object
if (H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
@@ -43,6 +42,8 @@
src.loc = S
H.put_in_hands(S)
H.visible_message("\red [H] grabs [src] from the floor!", "\red You grab [src] from the floor!")
+ return
+ return ..()
/obj/item/weapon/stool
name = "stool"
diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
index 59a819b8b9..d07f1a33cb 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
@@ -3,7 +3,7 @@
desc = "You sit in this. Either by will or force."
icon_state = "wheelchair"
anchored = 0
- movable = 1
+ buckle_movable = 1
var/driving = 0
var/mob/living/pulling = null
@@ -93,7 +93,7 @@
if (O != occupant)
Bump(O)
else
- unbuckle()
+ unbuckle_mob()
if (pulling && (get_dist(src, pulling) > 1))
pulling.pulledby = null
pulling << "\red You lost your grip!"
@@ -102,11 +102,11 @@
if (occupant && (src.loc != occupant.loc))
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
-/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/user as mob)
+/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
if (pulling)
MouseDrop(usr)
else
- manual_unbuckle(user)
+ user_unbuckle_mob(user)
return
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
@@ -138,8 +138,7 @@
if(!buckled_mob) return
if(propelled || (pulling && (pulling.a_intent == "hurt")))
- var/mob/living/occupant = buckled_mob
- unbuckle()
+ var/mob/living/occupant = unbuckle_mob()
if (pulling && (pulling.a_intent == "hurt"))
occupant.throw_at(A, 3, 3, pulling)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 33235ae124..e77f1e602c 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -211,6 +211,11 @@
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
if(!on) return
+ if(isliving(O))
+ var/mob/living/L = O
+ L.ExtinguishMob()
+ L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily
+
if(iscarbon(O))
var/mob/living/carbon/M = O
if(M.r_hand)
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 458c5626bc..f51716d0d1 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -100,11 +100,11 @@
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
//Tasers and the like should not damage windows.
- if(Proj.damage_type == HALLOSS)
+ if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
..()
- take_damage(Proj.damage * 4)
+ take_damage(Proj.damage)
return
@@ -470,3 +470,51 @@
update_icon() //icon_state has to be set manually
return
+
+/obj/structure/window/reinforced/polarized
+ name = "electrochromic window"
+ desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
+ var/id
+
+/obj/structure/window/reinforced/polarized/proc/toggle()
+ if(opacity)
+ animate(src, color="#FFFFFF", time=5)
+ SetOpacity(0)
+ else
+ animate(src, color="#222222", time=5)
+ SetOpacity(1)
+
+
+
+/obj/machinery/button/windowtint
+ name = "window tint control"
+ icon = 'icons/obj/power.dmi'
+ icon_state = "light0"
+ desc = "A remote control switch for polarized windows."
+ var/range = 7
+
+/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
+ if(..())
+ return 1
+
+ toggle_tint()
+
+/obj/machinery/button/windowtint/proc/toggle_tint()
+ use_power(5)
+
+ active = !active
+ update_icon()
+
+ for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
+ if (W.id == src.id || !W.id)
+ spawn(0)
+ W.toggle()
+ return
+
+/obj/machinery/button/windowtint/power_change()
+ ..()
+ if(active && !powered(power_channel))
+ toggle_tint()
+
+/obj/machinery/button/windowtint/update_icon()
+ icon_state = "light[active]"
diff --git a/code/WorkInProgress/periodic_news.dm b/code/game/periodic_news.dm
similarity index 100%
rename from code/WorkInProgress/periodic_news.dm
rename to code/game/periodic_news.dm
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 572ed0ff8d..9b85c90e16 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -6,8 +6,7 @@
var/rotting = 0
var/damage = 0
- var/damage_cap = 100 //Wall will break down to girders if damage reaches this point
- var/armor = 0.5 // Damage is multiplied by this
+ var/damage_cap = 150 //Wall will break down to girders if damage reaches this point
var/damage_overlay
var/global/damage_overlays[8]
@@ -30,7 +29,7 @@
return
//cap the amount of damage, so that things like emitters can't destroy walls in one hit.
- var/damage = min(Proj.damage, 100) * armor
+ var/damage = min(Proj.damage, 100)
take_damage(damage)
return
@@ -39,12 +38,12 @@
..()
if(ismob(AM))
return
-
+
var/tforce = AM:throwforce * (speed/THROWFORCE_SPEED_DIVISOR)
if (tforce < 15)
return
-
- take_damage(tforce * armor)
+
+ take_damage(tforce)
/turf/simulated/wall/Del()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
@@ -475,7 +474,7 @@
else if(istype(W,/obj/item/weapon/rcd)) //I bitterly resent having to write this. ~Z
return
-
+
else if(istype(W, /obj/item/weapon/reagent_containers))
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm
index b08363a715..5eddfc8b71 100644
--- a/code/game/turfs/simulated/walls_reinforced.dm
+++ b/code/game/turfs/simulated/walls_reinforced.dm
@@ -5,9 +5,8 @@
opacity = 1
density = 1
- damage_cap = 500
+ damage_cap = 800
max_temperature = 6000
- armor = 0.1 // Only 10% damage from gunfire, it's made from strong alloys and stuff.
walltype = "rwall"
@@ -294,7 +293,7 @@
else if(istype(W, /obj/item/weapon/reagent_containers))
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
-
+
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
else if(!d_state)
return attack_hand(user)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 1f86703322..dfd2b480d6 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -54,18 +54,6 @@
step(user.pulling, get_dir(user.pulling.loc, src))
return 1
-/turf/bullet_act(var/obj/item/projectile/Proj)
- if(istype(Proj ,/obj/item/projectile/beam/pulse))
- src.ex_act(2)
- ..()
- return 0
-
-/turf/bullet_act(var/obj/item/projectile/Proj)
- if(istype(Proj ,/obj/item/projectile/bullet/gyro))
- explosion(src, -1, 0, 2)
- ..()
- return 0
-
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
if(movement_disabled && usr.ckey != movement_disabled_exception)
usr << "\red Movement is admin-disabled." //This is to identify lag problems
diff --git a/code/game/turfs/unsimulated/floor.dm b/code/game/turfs/unsimulated/floor.dm
index bd6884c5d8..b2e7836334 100644
--- a/code/game/turfs/unsimulated/floor.dm
+++ b/code/game/turfs/unsimulated/floor.dm
@@ -2,3 +2,8 @@
name = "floor"
icon = 'icons/turf/floors.dmi'
icon_state = "Floor3"
+
+/turf/unsimulated/mask
+ name = "mask"
+ icon = 'icons/turf/walls.dmi'
+ icon_state = "rockvault"
diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm
index e1b6428712..b8c124dcd8 100644
--- a/code/game/verbs/ooc.dm
+++ b/code/game/verbs/ooc.dm
@@ -12,7 +12,7 @@
src << "Guests may not use OOC."
return
- msg = trim(copytext(sanitize(msg), 1, MAX_MESSAGE_LEN))
+ msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
if(!msg) return
if(!(prefs.toggles & CHAT_OOC))
@@ -77,7 +77,7 @@
src << "Guests may not use OOC."
return
- msg = trim(copytext(sanitize(msg), 1, MAX_MESSAGE_LEN))
+ msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
if(!msg) return
if(!(prefs.toggles & CHAT_LOOC))
diff --git a/code/global.dm b/code/global.dm
index 19ddbbe289..c5fd821f79 100644
--- a/code/global.dm
+++ b/code/global.dm
@@ -1,204 +1,205 @@
//#define TESTING
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-//items that ask to be called every cycle
+// Items that ask to be called every cycle.
var/global/obj/effect/datacore/data_core = null
-var/global/list/all_areas = list()
-var/global/list/machines = list()
-var/global/list/processing_objects = list()
-var/global/list/active_diseases = list()
-var/global/list/med_hud_users = list() //list of all entities using a medical HUD.
-var/global/list/sec_hud_users = list() //list of all entities using a security HUD.
+var/global/list/all_areas = list()
+var/global/list/machines = list()
+var/global/list/processing_objects = list()
+var/global/list/active_diseases = list()
+var/global/list/med_hud_users = list() // List of all entities using a medical HUD.
+var/global/list/sec_hud_users = list() // List of all entities using a security HUD.
-//Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them.
+// Those networks can only be accessed by pre-existing terminals. AIs and new terminals can't use them.
var/list/restricted_camera_networks = list("thunder","ERT","NUKE")
-var/global/list/global_mutations = list() // list of hidden mutation things
+var/global/list/global_mutations = list() // List of hidden mutation things.
+var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called manually after an event.
-var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
+// The resulting sector map looks like:
+// ___ ___
+// | 1 | 4 |
+// ---+---
+// | 5 | 3 |
+// --- ---
+//
+// 1: SS13.
+// 4: Derelict.
+// 3: AI satellite.
+// 5: Empty space.
var/global/list/global_map = null
- //list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
- //Resulting sector map looks like
- //|_1_|_4_|
- //|_5_|_3_|
- //
- //1 - SS13
- //4 - Derelict
- //3 - AI satellite
- //5 - empty space
- //////////////
+//var/global/list/global_map = list(list(1,5),list(4,3))
-//Noises made when hit while typing.
+// Noises made when hit while typing.
var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF")
-var/list/paper_tag_whitelist = list("center","p","div","span","h1","h2","h3","h4","h5","h6","hr","pre", \
- "big","small","font","i","u","b","s","sub","sup","tt","br","hr","ol","ul","li","caption","col", \
- "table","td","th","tr")
-var/list/paper_blacklist = list("java","onblur","onchange","onclick","ondblclick","onfocus","onkeydown", \
- "onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover", \
- "onmouseup","onreset","onselect","onsubmit","onunload")
+var/list/paper_tag_whitelist = list(
+ "center", "p", "div", "span", "pre", "h1", "h2", "h3", "h4", "h5", "h6", "br", "hr",
+ "big", "small", "font", "i", "u", "b", "s", "sub", "sup", "tt", "ol", "ul", "li",
+ "caption", "col", "table", "td", "th", "tr"
+)
+var/list/paper_blacklist = list(
+ "java", "onblur", "onchange", "onclick", "ondblclick", "onselect", "onfocus",
+ "onsubmit", "onreset", "onload", "onunload", "onkeydown", "onkeyup", "onkeypress",
+ "onmousedown", "onmouseup", "onmousemove", "onmouseout", "onmouseover",
+)
// The way blocks are handled badly needs a rewrite, this is horrible.
// Too much of a project to handle at the moment, TODO for later.
-var/BLINDBLOCK = 0
-var/DEAFBLOCK = 0
-var/HULKBLOCK = 0
-var/TELEBLOCK = 0
-var/FIREBLOCK = 0
-var/XRAYBLOCK = 0
-var/CLUMSYBLOCK = 0
-var/FAKEBLOCK = 0
-var/COUGHBLOCK = 0
-var/GLASSESBLOCK = 0
+var/BLINDBLOCK = 0
+var/DEAFBLOCK = 0
+var/HULKBLOCK = 0
+var/TELEBLOCK = 0
+var/FIREBLOCK = 0
+var/XRAYBLOCK = 0
+var/CLUMSYBLOCK = 0
+var/FAKEBLOCK = 0
+var/COUGHBLOCK = 0
+var/GLASSESBLOCK = 0
var/EPILEPSYBLOCK = 0
-var/TWITCHBLOCK = 0
-var/NERVOUSBLOCK = 0
-var/MONKEYBLOCK = 27
+var/TWITCHBLOCK = 0
+var/NERVOUSBLOCK = 0
+var/MONKEYBLOCK = 27
var/BLOCKADD = 0
-var/DIFFMUT = 0
+var/DIFFMUT = 0
-var/HEADACHEBLOCK = 0
-var/NOBREATHBLOCK = 0
-var/REMOTEVIEWBLOCK = 0
-var/REGENERATEBLOCK = 0
-var/INCREASERUNBLOCK = 0
-var/REMOTETALKBLOCK = 0
-var/MORPHBLOCK = 0
-var/BLENDBLOCK = 0
+var/HEADACHEBLOCK = 0
+var/NOBREATHBLOCK = 0
+var/REMOTEVIEWBLOCK = 0
+var/REGENERATEBLOCK = 0
+var/INCREASERUNBLOCK = 0
+var/REMOTETALKBLOCK = 0
+var/MORPHBLOCK = 0
+var/BLENDBLOCK = 0
var/HALLUCINATIONBLOCK = 0
-var/NOPRINTSBLOCK = 0
+var/NOPRINTSBLOCK = 0
var/SHOCKIMMUNITYBLOCK = 0
-var/SMALLSIZEBLOCK = 0
+var/SMALLSIZEBLOCK = 0
var/skipupdate = 0
- ///////////////
-var/eventchance = 10 //% per 5 mins
-var/event = 0
-var/hadevent = 0
-var/blobevent = 0
- ///////////////
-var/diary = null
-var/href_logfile = null
-var/station_name = "NSS Exodus"
-var/game_version = "Baystation12"
+var/eventchance = 10 // Percent chance per 5 minutes.
+var/event = 0
+var/hadevent = 0
+var/blobevent = 0
+
+var/diary = null
+var/href_logfile = null
+var/station_name = "NSS Exodus"
+var/game_version = "Baystation12"
var/changelog_hash = ""
-var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544)
+var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544)
-var/going = 1.0
-var/master_mode = "extended"//"extended"
-var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
+var/going = 1.0
+var/master_mode = "extended" // "extended"
+var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode.
var/host = null
var/shuttle_frozen = 0
-var/shuttle_left = 0
+var/shuttle_left = 0
+var/shuttlecoming = 0
-var/list/jobMax = list()
-var/list/bombers = list( )
-var/list/admin_log = list ( )
-var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
-var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
-var/list/reg_dna = list( )
-// list/traitobj = list( )
+var/list/jobMax = list()
+var/list/bombers = list()
+var/list/admin_log = list()
+var/list/lastsignalers = list() // Keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
+var/list/lawchanges = list() // Stores who uploaded laws to which silicon-based lifeform, and what the law was.
+var/list/reg_dna = list()
+//var/list/traitobj = list()
-var/mouse_respawn_time = 5 //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
+var/mouse_respawn_time = 5 // Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
-var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
- //It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided
+var/CELLRATE = 0.002 // Multiplier for watts per tick <> cell storage (e.g., 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
+ // It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided
var/CHARGELEVEL = 0.0005 // Cap for how fast cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second)
-var/shuttle_z = 2 //default
-var/airtunnel_start = 68 // default
-var/airtunnel_stop = 68 // default
-var/airtunnel_bottom = 72 // default
-var/list/monkeystart = list()
-var/list/wizardstart = list()
+var/shuttle_z = 2 // Default.
+var/airtunnel_start = 68 // Default.
+var/airtunnel_stop = 68 // Default.
+var/airtunnel_bottom = 72 // Default.
+
+var/list/monkeystart = list()
+var/list/wizardstart = list()
var/list/newplayer_start = list()
//Spawnpoints.
-var/list/latejoin = list()
+var/list/latejoin = list()
var/list/latejoin_gateway = list()
-var/list/latejoin_cryo = list()
-var/list/latejoin_cyborg = list()
+var/list/latejoin_cryo = list()
+var/list/latejoin_cyborg = list()
-var/list/prisonwarp = list() //prisoners go to these
-var/list/holdingfacility = list() //captured people go here
-var/list/xeno_spawn = list()//Aliens spawn at ahahthese.
-// list/mazewarp = list()
-var/list/tdome1 = list()
-var/list/tdome2 = list()
-var/list/tdomeobserve = list()
-var/list/tdomeadmin = list()
-var/list/prisonsecuritywarp = list() //prison security goes to these
-var/list/prisonwarped = list() //list of players already warped
-var/list/blobstart = list()
-var/list/ninjastart = list()
-// list/traitors = list() //traitor list
-var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
-var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
-// reverse_dir[dir] = reverse of dir
-var/list/reverse_dir = list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63)
+var/list/prisonwarp = list() // Prisoners go to these
+var/list/holdingfacility = list() // Captured people go here
+var/list/xeno_spawn = list() // Aliens spawn at at these.
+//var/list/mazewarp = list()
+var/list/tdome1 = list()
+var/list/tdome2 = list()
+var/list/tdomeobserve = list()
+var/list/tdomeadmin = list()
+var/list/prisonsecuritywarp = list() // Prison security goes to these.
+var/list/prisonwarped = list() // List of players already warped.
+var/list/blobstart = list()
+var/list/ninjastart = list()
+//var/list/traitors = list() // Traitor list.
+
+var/list/cardinal = list(NORTH, SOUTH, EAST, WEST)
+var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
+var/list/reverse_dir = list( // reverse_dir[dir] = reverse of dir
+ 2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42,
+ 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21,
+ 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63
+)
var/datum/station_state/start_state = null
-var/datum/configuration/config = null
-var/datum/sun/sun = null
+var/datum/configuration/config = null
+var/datum/sun/sun = null
var/list/combatlog = list()
-var/list/IClog = list()
-var/list/OOClog = list()
-var/list/adminlog = list()
-
+var/list/IClog = list()
+var/list/OOClog = list()
+var/list/adminlog = list()
var/list/powernets = list()
-var/Debug = 0 // global debug switch
+var/Debug = 0 // Global debug switch.
var/Debug2 = 0
-
var/datum/debug/debugobj
var/datum/moduletypes/mods = new()
-var/wavesecret = 0
+var/wavesecret = 0
var/gravity_is_on = 1
-var/shuttlecoming = 0
-
var/join_motd = null
var/forceblob = 0
-// nanomanager, the manager for Nano UIs
-var/datum/nanomanager/nanomanager = new()
+var/datum/nanomanager/nanomanager = new() // NanoManager, the manager for Nano UIs.
+var/datum/event_manager/event_manager = new() // Event Manager, the manager for events.
-// event manager, the manager for events
-var/datum/event_manager/event_manager = new()
-
-//away missions
-var/list/awaydestinations = list() //a list of landmarks that the warpgate can take you to
+var/list/awaydestinations = list() // Away missions. A list of landmarks that the warpgate can take you to.
// MySQL configuration
var/sqladdress = "localhost"
-var/sqlport = "3306"
-var/sqldb = "tgstation"
-var/sqllogin = "root"
-var/sqlpass = ""
+var/sqlport = "3306"
+var/sqldb = "tgstation"
+var/sqllogin = "root"
+var/sqlpass = ""
// Feedback gathering sql connection
-var/sqlfdbkdb = "test"
+var/sqlfdbkdb = "test"
var/sqlfdbklogin = "root"
-var/sqlfdbkpass = ""
-var/sqllogging = 0 // Should we log deaths, population stats, etc?
+var/sqlfdbkpass = ""
+var/sqllogging = 0 // Should we log deaths, population stats, etc.?
-// Forum MySQL configuration (for use with forum account/key authentication)
-// These are all default values that will load should the forumdbconfig.txt
-// file fail to read for whatever reason.
+// Forum MySQL configuration. (for use with forum account/key authentication)
+// These are all default values that will load should the forumdbconfig.txt file fail to read for whatever reason.
var/forumsqladdress = "localhost"
-var/forumsqlport = "3306"
-var/forumsqldb = "tgstation"
-var/forumsqllogin = "root"
-var/forumsqlpass = ""
-var/forum_activated_group = "2"
+var/forumsqlport = "3306"
+var/forumsqldb = "tgstation"
+var/forumsqllogin = "root"
+var/forumsqlpass = ""
+var/forum_activated_group = "2"
var/forum_authenticated_group = "10"
// For FTP requests. (i.e. downloading runtime logs.)
@@ -206,28 +207,52 @@ var/forum_authenticated_group = "10"
var/fileaccess_timer = 0
var/custom_event_msg = null
-//Database connections
-//A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.).
-var/DBConnection/dbcon = new() //Feedback database (New database)
-var/DBConnection/dbcon_old = new() //Tgstation database (Old database) - See the files in the SQL folder for information what goes where.
+// Database connections. A connection is established on world creation.
+// Ideally, the connection dies when the server restarts (After feedback logging.).
+var/DBConnection/dbcon = new() // Feedback database (New database)
+var/DBConnection/dbcon_old = new() // /tg/station database (Old database) -- see the files in the SQL folder for information on what goes where.
// Reference list for disposal sort junctions. Filled up by sorting junction's New()
/var/list/tagger_locations = list()
-//added for Xenoarchaeology, might be useful for other stuff
+// Added for Xenoarchaeology, might be useful for other stuff.
var/global/list/alphabet_uppercase = list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
// Chemistry lists.
-var/list/tachycardics = list("coffee", "inaprovaline", "hyperzine", "nitroglycerin", "thirteenloko", "nicotine") //increase heart rate
-var/list/bradycardics = list("neurotoxin", "cryoxadone", "clonexadone", "space_drugs", "stoxin") //decrease heart rate
-var/list/heartstopper = list("potassium_phorochloride", "zombie_powder") //this stops the heart
-var/list/cheartstopper = list("potassium_chloride") //this stops the heart when overdose is met -- c = conditional
+var/list/tachycardics = list("coffee", "inaprovaline", "hyperzine", "nitroglycerin", "thirteenloko", "nicotine") // Increase heart rate.
+var/list/bradycardics = list("neurotoxin", "cryoxadone", "clonexadone", "space_drugs", "stoxin") // Decrease heart rate.
+var/list/heartstopper = list("potassium_phorochloride", "zombie_powder") // This stops the heart.
+var/list/cheartstopper = list("potassium_chloride") // This stops the heart when overdose is met. -- c = conditional
-//Used by robots and robot preferences.
-var/list/robot_module_types = list("Standard", "Engineering", "Construction", "Surgeon", "Crisis", "Miner", "Janitor", "Service", "Clerical", "Security")
+// Used by robots and robot preferences.
+var/list/robot_module_types = list(
+ "Standard", "Engineering", "Construction", "Surgeon", "Crisis",
+ "Miner", "Janitor", "Service", "Clerical", "Security"
+)
// Some scary sounds.
-var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg','sound/items/Welder.ogg','sound/items/Welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
+var/static/list/scarySounds = list(
+ 'sound/weapons/thudswoosh.ogg',
+ 'sound/weapons/Taser.ogg',
+ 'sound/weapons/armbomb.ogg',
+ 'sound/voice/hiss1.ogg',
+ 'sound/voice/hiss2.ogg',
+ 'sound/voice/hiss3.ogg',
+ 'sound/voice/hiss4.ogg',
+ 'sound/voice/hiss5.ogg',
+ 'sound/voice/hiss6.ogg',
+ 'sound/effects/Glassbr1.ogg',
+ 'sound/effects/Glassbr2.ogg',
+ 'sound/effects/Glassbr3.ogg',
+ 'sound/items/Welder.ogg',
+ 'sound/items/Welder2.ogg',
+ 'sound/machines/airlock.ogg',
+ 'sound/effects/clownstep1.ogg',
+ 'sound/effects/clownstep2.ogg'
+)
// Bomb cap!
var/max_explosion_range = 14
+
+// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it.
+var/global/obj/item/device/radio/intercom/global_announcer = new(null)
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index f090d8665d..9ecbab5b9e 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -949,7 +949,7 @@ var/global/floorIsLava = 0
return 2
return 1
if(M.mind in ticker.mode.syndicates)
- if (ticker.mode.config_tag == "nuclear")
+ if (ticker.mode.config_tag == "mercenary")
return 2
return 1
if(M.mind in ticker.mode.wizards)
@@ -1148,15 +1148,22 @@ var/global/floorIsLava = 0
switch(detail)
if(0)
return "[key_name(C, link, name, highlight_special)]"
- if(1)
+
+ if(1) //Private Messages
return "[key_name(C, link, name, highlight_special)](?)"
- if(2)
+
+ if(2) //Admins
var/ref_mob = "\ref[M]"
return "[key_name(C, link, name, highlight_special)](?) (PP) (VV) (SM) (JMP) (CA)"
- if(3)
+
+ if(3) //Devs
var/ref_mob = "\ref[M]"
return "[key_name(C, link, name, highlight_special)](VV)(JMP)"
+ if(4) //Mentors
+ var/ref_mob = "\ref[M]"
+ return "[key_name(C, link, name, highlight_special)] (?) (PP) (VV) (SM) (JMP)"
+
/proc/ishost(whom)
if(!whom)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index d20105a67e..dbf73d65fd 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -46,7 +46,7 @@ var/list/admin_verbs_admin = list(
/client/proc/cmd_admin_create_centcom_report,
/client/proc/check_words, /*displays cult-words*/
/client/proc/check_ai_laws, /*shows AI and borg laws*/
- /client/proc/rename_ai, /*properly renames the AI*/
+ /client/proc/rename_silicon, /*properly renames silicons*/
/client/proc/check_antagonists,
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
@@ -78,7 +78,8 @@ var/list/admin_verbs_admin = list(
/client/proc/toggle_antagHUD_use,
/client/proc/toggle_antagHUD_restrictions,
/client/proc/allow_character_respawn, /* Allows a ghost to respawn */
- /client/proc/event_manager_panel
+ /client/proc/event_manager_panel,
+ /client/proc/empty_ai_core_toggle_latejoin
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
@@ -107,7 +108,11 @@ var/list/admin_verbs_fun = list(
)
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
- /client/proc/respawn_character
+ /client/proc/respawn_character,
+ /client/proc/FireLaser,
+ /client/proc/FireCannons,
+ /client/proc/ChangeIcarusPosition,
+ /client/proc/virus2_editor
)
var/list/admin_verbs_server = list(
/client/proc/Set_Holiday,
@@ -148,8 +153,8 @@ var/list/admin_verbs_debug = list(
/client/proc/reload_admins,
/client/proc/reload_mentors,
/client/proc/restart_controller,
- /client/proc/remake_distribution_map,
- /client/proc/show_distribution_map,
+ /client/proc/print_random_map,
+ /client/proc/create_random_map,
/client/proc/show_plant_genes,
/client/proc/enable_debug_verbs,
/client/proc/callproc,
@@ -692,15 +697,15 @@ var/list/admin_verbs_mentor = list(
if(holder)
src.holder.output_ai_laws()
-/client/proc/rename_ai(mob/living/silicon/ai/AI in world)
- set name = "Rename AI"
+/client/proc/rename_silicon(mob/living/silicon/S in world)
+ set name = "Rename Silicon"
set category = "Admin"
if(holder)
- var/new_name = trim_strip_input(src, "Enter new AI name. Leave blank or as is to cancel.", "Enter new AI Name", AI.name)
- if(new_name && new_name != AI.name)
- admin_log_and_message_admins("has renamed the AI '[AI.name]' to '[new_name]'")
- AI.SetName(new_name)
+ var/new_name = trim_strip_input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name)
+ if(new_name && new_name != S.real_name)
+ admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
+ S.SetName(new_name)
feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 05ce9f4979..e912458079 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1980,7 +1980,7 @@
if(!ticker)
alert("The game hasn't started yet!")
return
- var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
+ var/objective = sanitize(copytext(input("Enter an objective"),1,MAX_MESSAGE_LEN))
if(!objective)
return
feedback_inc("admin_secrets_fun_used",1)
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 39a5fa778c..bff2372aa9 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -1,18 +1,8 @@
-#define AHELP_ADMIN 1
-#define AHELP_MENTOR 2
-#define AHELP_DEV 3
//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE!
var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","alien","as")
-var/list/adminhelp_categories = list("Mentor - Gameplay/Roleplay question" = AHELP_MENTOR,\
- "Admin - Rule/Gameplay issue" = AHELP_ADMIN,\
- "Dev - Bug report" = AHELP_DEV)
-
-/client/proc/adminhelp_admin(message)
- adminhelp("Admin - Rule/Gameplay issue", message)
-
-/client/verb/adminhelp(selected_type in adminhelp_categories, msg as text)
+/client/verb/adminhelp(msg as text)
set category = "Admin"
set name = "Adminhelp"
@@ -27,18 +17,6 @@ var/list/adminhelp_categories = list("Mentor - Gameplay/Roleplay question" = AHE
adminhelped = 1 //Determines if they get the message to reply by clicking the name.
- /**src.verbs -= /client/verb/adminhelp
-
- spawn(1200)
- src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps
- src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps//Go to hell
- **/
-
- if(!msg || alert("The following message will be sent to staff that administers\n the '[selected_type]' category:\n\n[msg]\n", "Admin Help", "Ok", "Cancel") == "Cancel")
- return
-
- var/selected_upper = uppertext(selected_type)
-
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
@@ -109,62 +87,16 @@ var/list/adminhelp_categories = list("Mentor - Gameplay/Roleplay question" = AHE
var/ai_cl
if(ai_found)
ai_cl = " (CL)"
- var/mentor_msg = "\blue [selected_upper]: [get_options_bar(mob, 0, 0, 1, 0)][ai_cl]: [msg]"
- var/dev_msg = "\blue [selected_upper]: [get_options_bar(mob, 3, 0, 1, 0)][ai_cl]: [msg]"
- msg = "\blue [selected_upper]: [get_options_bar(mob, 2, 1, 1)][ai_cl]: [msg]"
+
+ //Options bar: mob, details ( admin = 2, dev = 3, mentor = 4, character name (0 = just ckey, 1 = ckey and character name), link? (0 no don't make it a link, 1 do so),
+ // highlight special roles (0 = everyone has same looking name, 1 = antags / special roles get a golden name)
+
+ var/mentor_msg = "\blue Request for Help: [get_options_bar(mob, 4, 1, 1, 0)][ai_cl]: [msg]"
+ msg = "\blue Request for Help:: [get_options_bar(mob, 2, 1, 1)][ai_cl]: [msg]"
var/admin_number_afk = 0
- var/list/mentorholders = list()
- var/list/debugholders = list()
- var/list/adminholders = list()
for(var/client/X in admins)
- if(R_MENTOR & X.holder.rights && !(R_ADMIN & X.holder.rights)) // we don't want to count admins twice. This list should be JUST mentors
- mentorholders += X
- if(X.is_afk())
- admin_number_afk++
- if(R_DEBUG & X.holder.rights) // Looking for anyone with +Debug which will be admins, developers, and developer mentors
- debugholders += X
- if(!(R_ADMIN & X.holder.rights))
- if(X.is_afk())
- admin_number_afk++
- if(R_ADMIN | R_MOD & X.holder.rights) // just admins here please
- adminholders += X
- if(X.is_afk())
- admin_number_afk++
-
- switch(adminhelp_categories[selected_type])
- if(AHELP_MENTOR)
- if(mentorholders.len)
- for(var/client/X in mentorholders) // Mentors get a message without buttons and no character name
- if(X.prefs.toggles & SOUND_ADMINHELP)
- X << 'sound/effects/adminhelp.ogg'
- X << mentor_msg
- if(adminholders.len)
- for(var/client/X in adminholders) // Admins get the full monty
- if(X.prefs.toggles & SOUND_ADMINHELP)
- X << 'sound/effects/adminhelp.ogg'
- X << msg
- if(AHELP_ADMIN)
- if(adminholders.len)
- for(var/client/X in adminholders) // Admins of course get everything in their helps
- if(X.prefs.toggles & SOUND_ADMINHELP)
- X << 'sound/effects/adminhelp.ogg'
- X << msg
- if(AHELP_DEV)
- if(debugholders.len)
- for(var/client/X in debugholders)
- if(R_ADMIN | R_MOD & X.holder.rights) // Admins get every button & special highlights in theirs
- if(X.prefs.toggles & SOUND_ADMINHELP)
- X << 'sound/effects/adminhelp.ogg'
- X << msg
- else
- if (R_DEBUG & X.holder.rights) // Just devs or devmentors get non-highlighted names, but they do get JMP and VV for their bug reports.
- if(X.prefs.toggles & SOUND_ADMINHELP)
- X << 'sound/effects/adminhelp.ogg'
- X << dev_msg
-
- /*for(var/client/X in admins)
if((R_ADMIN|R_MOD|R_MENTOR) & X.holder.rights)
if(X.is_afk())
admin_number_afk++
@@ -173,20 +105,17 @@ var/list/adminhelp_categories = list("Mentor - Gameplay/Roleplay question" = AHE
if(X.holder.rights == R_MENTOR)
X << mentor_msg // Mentors won't see coloring of names on people with special_roles (Antags, etc.)
else
- X << msg*/
+ X << msg
//show it to the person adminhelping too
- src << "PM to-Staff ([selected_type]): [original_msg]"
+ src << "PM to-Staff : [original_msg]"
var/admin_number_present = admins.len - admin_number_afk
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
if(admin_number_present <= 0)
- send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(original_msg)] - !![admin_number_afk ? "All admins AFK ([admin_number_afk])" : "No admins online"]!!")
+ send2adminirc("Request for Help from [key_name(src)]: [html_decode(original_msg)] - !![admin_number_afk ? "All admins AFK ([admin_number_afk])" : "No admins online"]!!")
else
- send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(original_msg)]")
+ send2adminirc("Request for Help from [key_name(src)]: [html_decode(original_msg)]")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
-#undef AHELP_ADMIN
-#undef AHELP_MENTOR
-#undef AHELP_DEV
\ No newline at end of file
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index 0b3f82aaa1..1c358c8cf4 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -96,7 +96,7 @@
if(sender)
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
else
- adminhelp_admin(reply) //sender has left, adminhelp instead
+ adminhelp(reply) //sender has left, adminhelp instead
return
src << "" + create_text_tag("pm_out_alt", "PM", src) + " to [get_options_bar(C, holder ? 1 : 0, holder ? 1 : 0, 1)]: [msg]"
C << "" + create_text_tag("pm_in", "", C) + " \[[recieve_pm_type] PM\] [get_options_bar(src, C.holder ? 1 : 0, C.holder ? 1 : 0, 1)]: [msg]"
diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm
index acb194e792..e3aa767ecd 100644
--- a/code/modules/admin/verbs/adminsay.dm
+++ b/code/modules/admin/verbs/adminsay.dm
@@ -4,7 +4,7 @@
set hidden = 1
if(!check_rights(R_ADMIN)) return
- msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
+ msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
if(!msg) return
log_admin("[key_name(src)] : [msg]")
@@ -23,7 +23,7 @@
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR)) return
- msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
+ msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
log_admin("MOD: [key_name(src)] : [msg]")
if (!msg)
diff --git a/code/WorkInProgress/buildmode.dm b/code/modules/admin/verbs/buildmode.dm
similarity index 100%
rename from code/WorkInProgress/buildmode.dm
rename to code/modules/admin/verbs/buildmode.dm
diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm
index 1e03dc1775..bb66843c16 100644
--- a/code/modules/admin/verbs/deadsay.dm
+++ b/code/modules/admin/verbs/deadsay.dm
@@ -25,11 +25,11 @@
if (src.holder.rights & R_MENTOR)
stafftype = "MENTOR"
-
+
if (src.holder.rights & R_ADMIN)
stafftype = "ADMIN"
- msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
+ msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
log_admin("[key_name(src)] : [msg]")
if (!msg)
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 0f088f9897..db7f0ec78b 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -736,8 +736,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_syndicate_commando()
if("nanotrasen representative")
- M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(M), slot_w_uniform)
- M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
+ M.equip_if_possible(new /obj/item/clothing/under/rank/centcom(M), slot_w_uniform)
+ M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
@@ -761,8 +761,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(W, slot_wear_id)
if("nanotrasen officer")
- M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/officer(M), slot_w_uniform)
- M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
+ M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
+ M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
@@ -786,8 +786,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if("nanotrasen captain")
- M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform)
- M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
+ M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_captain(M), slot_w_uniform)
+ M.equip_if_possible(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
@@ -834,7 +834,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask)
+ M.equip_to_slot_or_del(new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(M), slot_r_store)
@@ -983,7 +983,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!M.loc.loc)
continue
- if(istype(M.loc.loc,/area/engine/engine_room))
+ if(istype(M.loc.loc,/area/engineering/engine_room))
if(istype(M,/obj/machinery/power/rad_collector))
var/obj/machinery/power/rad_collector/Rad = M
Rad.anchored = 1
@@ -1022,7 +1022,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
SMES.input_level = 200000
SMES.output_level = 75000
- else if(istype(M.loc.loc,/area/engine/engine_smes)) //Set every SMES to charge and spit out 300,000 power between the 4 of them.
+ else if(istype(M.loc.loc,/area/engineering/engine_smes)) //Set every SMES to charge and spit out 300,000 power between the 4 of them.
if(istype(M,/obj/machinery/power/smes))
var/obj/machinery/power/smes/SMES = M
SMES.input_attempt = 1
diff --git a/code/modules/admin/verbs/icarus.dm b/code/modules/admin/verbs/icarus.dm
new file mode 100644
index 0000000000..cccda899b3
--- /dev/null
+++ b/code/modules/admin/verbs/icarus.dm
@@ -0,0 +1,125 @@
+/client/proc/FireLaser()
+ set name = "Fire the Icarus lasers"
+ set desc = "Fires a laser bolt at your position. You should only do this as a(n) (a)ghost"
+ set category = "Fun"
+
+ if(!src.holder)
+ src << "Only administrators may use this command."
+ return
+
+ Icarus_FireLaser(get_turf(src.mob))
+
+
+/client/proc/FireCannons()
+ set name = "Fire the Icarus cannons"
+ set desc = "Fires an explosive missile at your position. You should only do this as a(n) (a)ghost."
+ set category = "Fun"
+
+ if(!src.holder)
+ src << "Only administrators may use this command."
+ return
+
+ Icarus_FireCannon(get_turf(src.mob))
+
+
+/client/proc/ChangeIcarusPosition()
+ set name = "Adjust Icarus Position"
+ set desc = "Lets you chose the position of the Icarus in regards to the map."
+ set category = "Fun"
+
+ if(!src.holder)
+ src << "Only administrators may use this command."
+ return
+
+ Icarus_SetPosition(src)
+
+var/icarus_position = SOUTH
+
+proc/Icarus_FireLaser(var/turf/target)
+ // Find the world edge to fire from.
+ var/x = icarus_position & EAST ? world.maxx : icarus_position & WEST ? 1 : target.x
+ var/y = icarus_position & NORTH ? world.maxy : icarus_position & SOUTH ? 1 : target.y
+ var/x_off = x != target.x ? abs(target.x - x) : INFINITY
+ var/y_off = y != target.y ? abs(target.y - y) : INFINITY
+ // Get the minimum number of steps using the rise/run shit.
+ var/iterations = round(min(x_off, y_off)) - 14 // We cannot fire straight from the edge since teleport thing.
+
+ // Now we can get the location of the start.
+ x = target.x + (icarus_position & EAST ? iterations : icarus_position & WEST ? -iterations : 0)
+ y = target.y + (icarus_position & NORTH ? iterations : icarus_position & SOUTH ? -iterations : 0)
+
+ var/turf/start = locate(x, y, target.z)
+
+ // should step down as:
+ // 1000, 500, 333, 250, 200, 167, 142, 125, 111, 100, 90
+ var/damage = 1000
+ for(var/i in 2 to 12)
+ var/obj/item/projectile/beam/in_chamber = new (start)
+ in_chamber.original = target
+ in_chamber.starting = start
+ in_chamber.silenced = 1
+ in_chamber.yo = icarus_position & NORTH ? -1 : icarus_position & SOUTH ? 1 : 0
+ in_chamber.xo = icarus_position & EAST ? -1 : icarus_position & WEST ? 1 : 0
+ in_chamber.damage = damage
+ in_chamber.kill_count = 500
+ in_chamber.process()
+ damage -= damage / i
+ sleep(-1)
+
+ // Let everyone know what hit them.
+ var/obj/item/projectile/beam/in_chamber = new (start)
+ in_chamber.original = target
+ in_chamber.starting = start
+ in_chamber.silenced = 0
+ in_chamber.yo = icarus_position & NORTH ? -1 : icarus_position & SOUTH ? 1 : 0
+ in_chamber.xo = icarus_position & EAST ? -1 : icarus_position & WEST ? 1 : 0
+ in_chamber.kill_count = 500
+ in_chamber.damage = 0
+ in_chamber.name = "point defense laser"
+ in_chamber.firer = "Icarus" // Never displayed, but we want this to display the hit message.
+ in_chamber.process()
+
+proc/Icarus_FireCannon(var/turf/target)
+ // Find the world edge to fire from.
+ var/x = icarus_position & EAST ? world.maxx : icarus_position & WEST ? 1 : target.x
+ var/y = icarus_position & NORTH ? world.maxy : icarus_position & SOUTH ? 1 : target.y
+ var/x_off = x != target.x ? abs(target.x - x) : INFINITY
+ var/y_off = y != target.y ? abs(target.y - y) : INFINITY
+ // Get the minimum number of steps using the rise/run shit.
+ var/iterations = round(min(x_off, y_off)) - 14 // We cannot fire straight from the edge since teleport thing.
+
+ // Now we can get the location of the start.
+ x = target.x + (icarus_position & EAST ? iterations : icarus_position & WEST ? -iterations : 0)
+ y = target.y + (icarus_position & NORTH ? iterations : icarus_position & SOUTH ? -iterations : 0)
+
+ var/turf/start = locate(x, y, target.z)
+
+ // Now we find the corresponding turf on the other side of the level.
+ // Yeah, yeah. Overuse of the terinary operator. So sue me.
+ x = icarus_position & EAST ? 1 : icarus_position & WEST ? world.maxx : target.x
+ y = icarus_position & NORTH ? 1 : icarus_position & SOUTH ? world.maxy : target.y
+ x_off = x != target.x ? abs(target.x - x) : INFINITY
+ y_off = y != target.y ? abs(target.y - y) : INFINITY
+ iterations = round(min(x_off, y_off))
+ x = target.x + (icarus_position & EAST ? -iterations : icarus_position & WEST ? iterations : 0)
+ y = target.y + (icarus_position & NORTH ? -iterations : icarus_position & SOUTH ? iterations : 0)
+ target = locate(x, y, target.z)
+
+ // Finally fire the fucker.
+ var/obj/effect/meteor/small/projectile = new (start)
+ projectile.dest = target
+ projectile.name = "main gun projectile" // stealthy
+ projectile.hits = 6
+ projectile.detonation_chance = 99 // it's a missile/cannon round thing!
+
+ // Make sure it travels
+ spawn(0)
+ walk_towards(projectile, projectile.dest, 1)
+
+proc/Icarus_SetPosition(var/user)
+ var/global/list/directions = list("North" = 1, "North East" = 5, "East" = 4, "South East" = 6, "South" = 2, "South West" = 10, "West" = 8, "North West" = 9)
+ var/direction = input(user, "Where should the Icarus fire from?", "Icarus Comms") as null|anything in directions
+ if(!direction)
+ return
+
+ icarus_position = directions[direction]
\ No newline at end of file
diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm
index 48681c93a3..6e79bbbc3f 100644
--- a/code/modules/admin/verbs/pray.dm
+++ b/code/modules/admin/verbs/pray.dm
@@ -6,7 +6,7 @@
usr << "\red Speech is currently admin-disabled."
return
- msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
+ msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
if(!msg) return
if(usr.client)
@@ -29,14 +29,14 @@
//log_admin("HELP: [key_name(src)]: [msg]")
/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage)
- var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
+ var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "\blue CENTCOMM[iamessage ? " IA" : ""]:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
/proc/Syndicate_announce(var/text , var/mob/Sender)
- var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
+ var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "\blue ILLEGAL:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index b107182333..36199c0305 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -19,7 +19,7 @@ var/global/sent_strike_team = 0
var/input = null
while(!input)
- input = copytext(sanitize(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
+ input = sanitize(copytext(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
if(!input)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return
diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm
index 39059ba4f6..6a16f22d1f 100644
--- a/code/modules/admin/verbs/striketeam_syndicate.dm
+++ b/code/modules/admin/verbs/striketeam_syndicate.dm
@@ -24,7 +24,7 @@ var/global/sent_syndicate_strike_team = 0
var/input = null
while(!input)
- input = copytext(sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
+ input = sanitize(copytext(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
if(!input)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return
diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm
index b48651e8b7..ca4717307a 100644
--- a/code/modules/assembly/assembly.dm
+++ b/code/modules/assembly/assembly.dm
@@ -3,7 +3,7 @@
desc = "A small electronic device that should never exist."
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = ""
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
w_class = 2.0
matter = list("metal" = 100)
throwforce = 2
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index cb0a90c454..ed3edf5fc0 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -6,7 +6,7 @@
w_class = 3.0
throw_speed = 2
throw_range = 4
- flags = FPRINT | TABLEPASS| CONDUCT //Copied this from old code, so this may or may not be necessary
+ flags = CONDUCT //Copied this from old code, so this may or may not be necessary
var/status = 0 //0 - not readied //1 - bomb finished with welder
var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device
var/obj/item/weapon/tank/bombtank = null //the second part of the bomb is a phoron tank
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 82f7450981..f3bf44b53b 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -3,7 +3,7 @@
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = "holder"
item_state = "assembly"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
throwforce = 5
w_class = 2.0
throw_speed = 3
diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm
index 3a70e85399..89699b3427 100644
--- a/code/modules/assembly/infrared.dm
+++ b/code/modules/assembly/infrared.dm
@@ -168,7 +168,6 @@
var/visible = 0.0
var/left = null
anchored = 1.0
- flags = TABLEPASS
/obj/effect/beam/i_beam/proc/hit()
diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm
index 880424e66b..4cbef90875 100644
--- a/code/modules/assembly/shock_kit.dm
+++ b/code/modules/assembly/shock_kit.dm
@@ -6,7 +6,7 @@
var/obj/item/device/radio/electropack/part2 = null
var/status = 0
w_class = 5.0
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
/obj/item/assembly/shock_kit/Del()
del(part1)
diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm
index 0be6799a43..11f78326c6 100644
--- a/code/modules/awaymissions/corpse.dm
+++ b/code/modules/awaymissions/corpse.dm
@@ -219,11 +219,11 @@
/obj/effect/landmark/corpse/commander
name = "Commander"
- corpseuniform = /obj/item/clothing/under/rank/centcom_commander
+ corpseuniform = /obj/item/clothing/under/rank/centcom_captain
corpsesuit = /obj/item/clothing/suit/armor/bulletproof
corpseradio = /obj/item/device/radio/headset/heads/captain
corpseglasses = /obj/item/clothing/glasses/eyepatch
- corpsemask = /obj/item/clothing/mask/cigarette/cigar/cohiba
+ corpsemask = /obj/item/clothing/mask/smokable/cigarette/cigar/cohiba
corpsehelmet = /obj/item/clothing/head/centhat
corpsegloves = /obj/item/clothing/gloves/swat
corpseshoes = /obj/item/clothing/shoes/swat
diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm
index c83571650f..d788a41cc9 100644
--- a/code/modules/client/preferences_gear.dm
+++ b/code/modules/client/preferences_gear.dm
@@ -288,6 +288,12 @@ var/global/list/gear_datums = list()
slot = slot_w_uniform
cost = 3
+/datum/gear/blackjumpskirt
+ display_name = "jumpskirt, black"
+ path = /obj/item/clothing/under/blackjumpskirt
+ slot = slot_w_uniform
+ cost = 2
+
/datum/gear/skirt_blue
display_name = "plaid skirt, blue"
path = /obj/item/clothing/under/dress/plaid_blue
@@ -369,88 +375,88 @@ var/global/list/gear_datums = list()
/datum/gear/armband_cargo
display_name = "armband, cargo"
- path = /obj/item/clothing/tie/armband/cargo
+ path = /obj/item/clothing/accessory/armband/cargo
slot = slot_tie
cost = 1
/datum/gear/armband_emt
display_name = "armband, EMT"
- path = /obj/item/clothing/tie/armband/medgreen
+ path = /obj/item/clothing/accessory/armband/medgreen
slot = slot_tie
cost = 2
/datum/gear/armband_engineering
display_name = "armband, engineering"
- path = /obj/item/clothing/tie/armband/engine
+ path = /obj/item/clothing/accessory/armband/engine
slot = slot_tie
cost = 1
/datum/gear/armband_hydroponics
display_name = "armband, hydroponics"
- path = /obj/item/clothing/tie/armband/hydro
+ path = /obj/item/clothing/accessory/armband/hydro
slot = slot_tie
cost = 1
/datum/gear/armband_medical
display_name = "armband, medical"
- path = /obj/item/clothing/tie/armband/med
+ path = /obj/item/clothing/accessory/armband/med
slot = slot_tie
cost = 1
/datum/gear/armband
display_name = "armband, red"
- path = /obj/item/clothing/tie/armband
+ path = /obj/item/clothing/accessory/armband
slot = slot_tie
cost = 1
/datum/gear/armband_science
display_name = "armband, science"
- path = /obj/item/clothing/tie/armband/science
+ path = /obj/item/clothing/accessory/armband/science
slot = slot_tie
cost = 1
/datum/gear/armpit
display_name = "shoulder holster"
- path = /obj/item/clothing/tie/holster/armpit
+ path = /obj/item/clothing/accessory/holster/armpit
slot = slot_tie
cost = 2
allowed_roles = list("Captain", "Head of Personnel", "Security Officer", "Warden", "Head of Security")
/datum/gear/tie_blue
display_name = "tie, blue"
- path = /obj/item/clothing/tie/blue
+ path = /obj/item/clothing/accessory/blue
slot = slot_tie
cost = 1
/datum/gear/tie_red
display_name = "tie, red"
- path = /obj/item/clothing/tie/red
+ path = /obj/item/clothing/accessory/red
slot = slot_tie
cost = 1
/datum/gear/tie_horrible
display_name = "tie, socially disgraceful"
- path = /obj/item/clothing/tie/horrible
+ path = /obj/item/clothing/accessory/horrible
slot = slot_tie
cost = 1
/datum/gear/brown_vest
display_name = "webbing, engineering"
- path = /obj/item/clothing/tie/storage/brown_vest
+ path = /obj/item/clothing/accessory/storage/brown_vest
slot = slot_tie
cost = 2
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer")
/datum/gear/black_vest
display_name = "webbing, security"
- path = /obj/item/clothing/tie/storage/black_vest
+ path = /obj/item/clothing/accessory/storage/black_vest
slot = slot_tie
cost = 2
allowed_roles = list("Security Officer","Head of Security","Warden")
/datum/gear/webbing
display_name = "webbing, simple"
- path = /obj/item/clothing/tie/storage/webbing
+ path = /obj/item/clothing/accessory/storage/webbing
slot = slot_tie
cost = 2
@@ -464,7 +470,7 @@ var/global/list/gear_datums = list()
/datum/gear/bomber
display_name = "bomber jacket"
- path = /obj/item/clothing/suit/storage/bomber
+ path = /obj/item/clothing/suit/storage/toggle/bomber
cost = 4
slot = slot_wear_suit
@@ -492,12 +498,22 @@ var/global/list/gear_datums = list()
cost = 3
slot = slot_wear_suit
+/datum/gear/blue_lawyer_jacket
+ display_name = "suit jacket, blue"
+ path = /obj/item/clothing/suit/storage/toggle/lawyer/bluejacket
+ cost = 3
+ slot = slot_wear_suit
+
/datum/gear/hoodie
display_name = "hoodie, grey"
- path = /obj/item/clothing/suit/hoodie
+ path = /obj/item/clothing/suit/storage/toggle/hoodie
cost = 2
slot = slot_wear_suit
+/datum/gear/hoodie/black
+ display_name = "hoodie, black"
+ path = /obj/item/clothing/suit/storage/toggle/hoodie/black
+
/datum/gear/unathi_mantle
display_name = "hide mantle (Unathi)"
path = /obj/item/clothing/suit/unathi/mantle
@@ -657,7 +673,7 @@ var/global/list/gear_datums = list()
/datum/gear/dress_shoes
display_name = "shoes, dress"
- path = /obj/item/clothing/shoes/centcom
+ path = /obj/item/clothing/shoes/laceup
cost = 1
slot = slot_shoes
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 83a0e1864d..da569c6b61 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -44,6 +44,9 @@
return 1
/obj/item/clothing/proc/refit_for_species(var/target_species)
+ if(!species_restricted)
+ return //this item doesn't use the species_restricted system
+
//Set species_restricted list
switch(target_species)
if("Human", "Skrell") //humanoid bodytypes
@@ -63,6 +66,9 @@
icon = initial(icon)
/obj/item/clothing/head/helmet/refit_for_species(var/target_species)
+ if(!species_restricted)
+ return //this item doesn't use the species_restricted system
+
//Set species_restricted list
switch(target_species)
if("Skrell")
@@ -225,7 +231,7 @@ BLIND // can't see anything
user.visible_message("\red [user] cuts the fingertips off of the [src].","\red You cut the fingertips off of the [src].")
clipped = 1
- name = "mangled [name]"
+ name = "modified [name]"
desc = "[desc]
They have had the fingertips cut off of them."
if("exclude" in species_restricted)
species_restricted -= "Unathi"
@@ -365,7 +371,6 @@ BLIND // can't see anything
icon = 'icons/obj/clothing/suits.dmi'
name = "suit"
var/fire_resist = T0C+100
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
allowed = list(/obj/item/weapon/tank/emergency_oxygen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
@@ -386,7 +391,6 @@ BLIND // can't see anything
name = "under"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
permeability_coefficient = 0.90
- flags = FPRINT | TABLEPASS
slot_flags = SLOT_ICLOTHING
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
w_class = 3
@@ -397,7 +401,7 @@ BLIND // can't see anything
2 = Report detailed damages
3 = Report location
*/
- var/obj/item/clothing/tie/hastie = null
+ var/list/accessories = list()
var/displays_id = 1
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
@@ -406,28 +410,44 @@ BLIND // can't see anything
var/mob/M = src.loc
M.update_inv_w_uniform()
+/obj/item/clothing/under/proc/can_attach_accessory(obj/item/clothing/accessory/A)
+ if(istype(A))
+ .=1
+ else
+ return 0
+ if(accessories.len && (A.slot in list("utility","armband")))
+ for(var/obj/item/clothing/accessory/AC in accessories)
+ if (AC.slot == A.slot)
+ return 0
+
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
- if(hastie)
- hastie.attackby(I, user)
- return
+ if(istype(I, /obj/item/clothing/accessory))
+ var/obj/item/clothing/accessory/A = I
+ if(can_attach_accessory(A))
+ user.drop_item()
+ accessories += A
+ A.on_attached(src, user)
- if(!hastie && istype(I, /obj/item/clothing/tie))
- user.drop_item()
- hastie = I
- hastie.on_attached(src, user)
+ if(istype(loc, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = loc
+ H.update_inv_w_uniform()
- if(istype(loc, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = loc
- H.update_inv_w_uniform()
+ return
+ else
+ user << "You cannot attach more accessories of this type to [src]."
+ if(accessories.len)
+ for(var/obj/item/clothing/accessory/A in accessories)
+ A.attackby(I, user)
return
..()
/obj/item/clothing/under/attack_hand(mob/user as mob)
//only forward to the attached accessory if the clothing is equipped (not in a storage)
- if(hastie && src.loc == user)
- hastie.attack_hand(user)
+ if(accessories.len && src.loc == user)
+ for(var/obj/item/clothing/accessory/A in accessories)
+ A.attack_hand(user)
return
if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself
@@ -464,8 +484,9 @@ BLIND // can't see anything
user << "Its vital tracker appears to be enabled."
if(3)
user << "Its vital tracker and tracking beacon appear to be enabled."
- if(hastie)
- user << "\A [hastie] is clipped to it."
+ if(accessories.len)
+ for(var/obj/item/clothing/accessory/A in accessories)
+ user << "\A [A] is attached to it."
/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
var/mob/M = usr
@@ -531,17 +552,17 @@ BLIND // can't see anything
else
body_parts_covered = initial(body_parts_covered)
item_color = initial(item_color)
-
+
update_clothing_icon()
else
usr << "You cannot roll down the uniform!"
-/obj/item/clothing/under/proc/remove_accessory(mob/user as mob)
- if(!hastie)
+/obj/item/clothing/under/proc/remove_accessory(mob/user, obj/item/clothing/accessory/A)
+ if(!(A in accessories))
return
- hastie.on_removed(user)
- hastie = null
+ A.on_removed(user)
+ accessories -= A
update_clothing_icon()
/obj/item/clothing/under/verb/removetie()
@@ -550,14 +571,20 @@ BLIND // can't see anything
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
-
- src.remove_accessory(usr)
+ if(!accessories.len) return
+ var/obj/item/clothing/accessory/A
+ if(accessories.len > 1)
+ A = input("Select an accessory to remove from [src]") as null|anything in accessories
+ else
+ A = accessories[1]
+ src.remove_accessory(usr,A)
/obj/item/clothing/under/rank/New()
sensor_mode = pick(0,1,2,3)
..()
/obj/item/clothing/under/emp_act(severity)
- if (hastie)
- hastie.emp_act(severity)
+ if(accessories.len)
+ for(var/obj/item/clothing/accessory/A in accessories)
+ A.emp_act(severity)
..()
\ No newline at end of file
diff --git a/code/modules/clothing/gloves/stungloves.dm b/code/modules/clothing/gloves/stungloves.dm
deleted file mode 100644
index 976b16e7e6..0000000000
--- a/code/modules/clothing/gloves/stungloves.dm
+++ /dev/null
@@ -1,87 +0,0 @@
-/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
- if(istype(src, /obj/item/clothing/gloves/boxing)) //quick fix for stunglove overlay not working nicely with boxing gloves.
- user << "That won't work." //i'm not putting my lips on that!
- ..()
- return
-
- //add wires
- if(istype(W, /obj/item/stack/cable_coil))
- var/obj/item/stack/cable_coil/C = W
- if (clipped)
- user << "The [src] are too badly mangled for wiring."
- return
-
- if(wired)
- user << "The [src] are already wired."
- return
-
- if(C.get_amount() < 2)
- user << "There is not enough wire to cover the [src]."
- return
-
- C.use(2)
- wired = 1
- siemens_coefficient = 3.0
- user << "You wrap some wires around the [src]."
- update_icon()
- return
-
- //add cell
- else if(istype(W, /obj/item/weapon/cell))
- if(!wired)
- user << "The [src] need to be wired first."
- else if(!cell)
- user.drop_item()
- W.loc = src
- cell = W
- user << "You attach the [cell] to the [src]."
- update_icon()
- else
- user << "A [cell] is already attached to the [src]."
- return
-
- else if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel))
-
- //stunglove stuff
- if(cell)
- cell.updateicon()
- user << "You cut the [cell] away from the [src]."
- cell.loc = get_turf(src.loc)
- cell = null
- update_icon()
- return
- if(wired) //wires disappear into the void because fuck that shit
- wired = 0
- siemens_coefficient = initial(siemens_coefficient)
- user << "You cut the wires away from the [src]."
- update_icon()
- return
-
- //clipping fingertips
- if(!clipped)
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
- user.visible_message("\red [user] cuts the fingertips off of the [src].","\red You cut the fingertips off of the [src].")
-
- clipped = 1
- name = "mangled [name]"
- desc = "[desc]
They have had the fingertips cut off of them."
- if("exclude" in species_restricted)
- species_restricted -= "Unathi"
- species_restricted -= "Tajara"
- return
- else
- user << "The [src] have already been clipped!"
- update_icon()
- return
-
- return
-
- ..()
-
-/obj/item/clothing/gloves/update_icon()
- ..()
- overlays.Cut()
- if(wired)
- overlays += "gloves_wire"
- if(cell)
- overlays += "gloves_cell"
diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm
index 3fc78b871a..436f714053 100644
--- a/code/modules/clothing/head/hardhat.dm
+++ b/code/modules/clothing/head/hardhat.dm
@@ -2,7 +2,6 @@
name = "hard hat"
desc = "A piece of headgear used in dangerous working conditions to protect the head. Comes with a built-in flashlight."
icon_state = "hardhat0_yellow"
- flags = FPRINT | TABLEPASS
item_state = "hardhat0_yellow"
brightness_on = 4 //luminosity when on
light_overlay = "hardhat_light"
@@ -21,7 +20,7 @@
item_state = "hardhat0_red"
item_color = "red"
name = "firefighter helmet"
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
+ flags = STOPPRESSUREDAMAGE
heat_protection = HEAD
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
@@ -29,11 +28,11 @@
icon_state = "hardhat0_white"
item_state = "hardhat0_white"
item_color = "white"
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
+ flags = STOPPRESSUREDAMAGE
heat_protection = HEAD
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
/obj/item/clothing/head/hardhat/dblue
icon_state = "hardhat0_dblue"
item_state = "hardhat0_dblue"
- item_color = "dblue"
\ No newline at end of file
+ item_color = "dblue"
diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm
index 1556b01ddc..eec6c828d8 100644
--- a/code/modules/clothing/head/helmet.dm
+++ b/code/modules/clothing/head/helmet.dm
@@ -2,7 +2,7 @@
name = "helmet"
desc = "Standard Security gear. Protects the head from impacts."
icon_state = "helmet"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | THICKMATERIAL
+ flags = HEADCOVERSEYES | THICKMATERIAL
item_state = "helmet"
armor = list(melee = 50, bullet = 15, laser = 50,energy = 10, bomb = 25, bio = 0, rad = 0)
flags_inv = HIDEEARS|HIDEEYES
@@ -39,7 +39,7 @@
desc = "It's a helmet specifically designed to protect against close range attacks."
icon_state = "riot"
item_state = "helmet"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES
+ flags = HEADCOVERSEYES
armor = list(melee = 82, bullet = 15, laser = 5,energy = 5, bomb = 5, bio = 2, rad = 0)
flags_inv = HIDEEARS
siemens_coefficient = 0.7
@@ -48,7 +48,7 @@
name = "\improper SWAT helmet"
desc = "They're often used by highly trained Swat Members."
icon_state = "swat"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES
+ flags = HEADCOVERSEYES
item_state = "swat"
armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0)
flags_inv = HIDEEARS|HIDEEYES
@@ -60,7 +60,7 @@
name = "\improper Thunderdome helmet"
desc = "'Let the battle commence!'"
icon_state = "thunderdome"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES
+ flags = HEADCOVERSEYES
item_state = "thunderdome"
armor = list(melee = 80, bullet = 60, laser = 50,energy = 10, bomb = 25, bio = 10, rad = 0)
cold_protection = HEAD
@@ -71,7 +71,7 @@
name = "gladiator helmet"
desc = "Ave, Imperator, morituri te salutant."
icon_state = "gladiator"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
+ flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
item_state = "gladiator"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
siemens_coefficient = 1
@@ -81,7 +81,7 @@
desc = "An armored helmet capable of being fitted with a multitude of attachments."
icon_state = "swathelm"
item_state = "helmet"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES
+ flags = HEADCOVERSEYES
sprite_sheets = list(
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
@@ -95,7 +95,7 @@
name = "Augment Array"
desc = "A helmet with optical and cranial augments coupled to it."
icon_state = "v62"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES
+ flags = HEADCOVERSEYES
item_state = "v62"
armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0)
flags_inv = HIDEEARS|HIDEEYES
diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm
index 36fa4823e4..ae2873e8f4 100644
--- a/code/modules/clothing/head/jobs.dm
+++ b/code/modules/clothing/head/jobs.dm
@@ -6,7 +6,6 @@
icon_state = "chefhat"
item_state = "chefhat"
desc = "The commander in chef's head wear."
- flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
//Captain: This probably shouldn't be space-worthy
@@ -14,7 +13,6 @@
name = "captain's hat"
icon_state = "captain"
desc = "It's good being the king."
- flags = FPRINT|TABLEPASS
item_state = "caphat"
siemens_coefficient = 0.9
@@ -23,7 +21,6 @@
name = "captain's cap"
desc = "You fear to wear it for the negligence it brings."
icon_state = "capcap"
- flags = FPRINT|TABLEPASS
flags_inv = 0
body_parts_covered = 0
cold_protection = HEAD
@@ -36,7 +33,7 @@
name = "chaplain's hood"
desc = "It's hood that covers the head. It keeps you warm during the space winters."
icon_state = "chaplain_hood"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|BLOCKHAIR
+ flags = HEADCOVERSEYES|BLOCKHAIR
siemens_coefficient = 0.9
body_parts_covered = HEAD|EYES
@@ -45,7 +42,7 @@
name = "nun hood"
desc = "Maximum piety in this star system."
icon_state = "nun_hood"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|BLOCKHAIR
+ flags = HEADCOVERSEYES|BLOCKHAIR
siemens_coefficient = 0.9
//Mime
@@ -53,7 +50,6 @@
name = "beret"
desc = "A beret, an artists favorite headwear."
icon_state = "beret"
- flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
body_parts_covered = 0
@@ -62,40 +58,41 @@
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 = "beret_badge"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/sec/alt
name = "officer beret"
desc = "A navy blue beret with an officer's rank emblem. For officers that are more inclined towards style than safety."
icon_state = "officerberet"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/sec/hos
name = "officer beret"
desc = "A navy blue beret with a commander's rank emblem. For officers that are more inclined towards style than safety."
icon_state = "hosberet"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/sec/warden
name = "warden beret"
desc = "A navy blue beret with a warden's rank emblem. For officers that are more inclined towards style than safety."
icon_state = "wardenberet"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/eng
name = "engineering beret"
desc = "A beret with the engineering insignia emblazoned on it. For engineers that are more inclined towards style than safety."
icon_state = "e_beret_badge"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/jan
name = "purple beret"
desc = "A stylish, if purple, beret."
icon_state = "purpleberet"
- flags = FPRINT | TABLEPASS
-
+/obj/item/clothing/head/beret/centcom/officer
+ name = "officers beret"
+ desc = "A black beret adorned with the shield—a silver kite shield with an engraved sword—of the NanoTrasen security forces."
+ icon_state = "centcomofficerberet"
+/obj/item/clothing/head/beret/centcom/captain
+ name = "captains beret"
+ desc = "A white beret adorned with the shield—a silver kite shield with an engraved sword—of the NanoTrasen security forces."
+ icon_state = "centcomcaptain"
//Medical
/obj/item/clothing/head/surgery
name = "surgical cap"
desc = "A cap surgeons wear during operations. Keeps their hair from tickling your internal organs."
icon_state = "surgcap_blue"
- flags = FPRINT | TABLEPASS | BLOCKHEADHAIR
+ flags = BLOCKHEADHAIR
/obj/item/clothing/head/surgery/purple
desc = "A cap surgeons wear during operations. Keeps their hair from tickling your internal organs. This one is deep purple."
diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm
index 991d01a216..7b13c10b4b 100644
--- a/code/modules/clothing/head/misc.dm
+++ b/code/modules/clothing/head/misc.dm
@@ -4,7 +4,6 @@
name = "\improper CentComm. hat"
icon_state = "centcom"
desc = "It's good to be emperor."
- flags = FPRINT|TABLEPASS
item_state = "centhat"
siemens_coefficient = 0.9
body_parts_covered = 0
@@ -14,7 +13,6 @@
icon_state = "hairflower"
desc = "Smells nice."
item_state = "hairflower"
- flags = FPRINT|TABLEPASS
slot_flags = SLOT_HEAD | SLOT_EARS
body_parts_covered = 0
@@ -29,7 +27,6 @@
desc = "It's an amish looking hat."
icon_state = "tophat"
item_state = "that"
- flags = FPRINT|TABLEPASS
siemens_coefficient = 0.9
body_parts_covered = 0
@@ -37,21 +34,18 @@
name = "redcoat's hat"
icon_state = "redcoat"
desc = "'I guess it's a redhead.'"
- flags = FPRINT | TABLEPASS
body_parts_covered = 0
/obj/item/clothing/head/mailman
name = "station cap"
icon_state = "mailman"
desc = "Choo-choo!"
- flags = FPRINT | TABLEPASS
body_parts_covered = 0
/obj/item/clothing/head/plaguedoctorhat
name = "plague doctor's hat"
desc = "These were once used by Plague doctors. They're pretty much useless."
icon_state = "plaguedoctor"
- flags = FPRINT | TABLEPASS
permeability_coefficient = 0.01
siemens_coefficient = 0.9
body_parts_covered = 0
@@ -60,14 +54,13 @@
name = "hastur's hood"
desc = "It's unspeakably stylish"
icon_state = "hasturhood"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|BLOCKHAIR
+ flags = HEADCOVERSEYES|BLOCKHAIR
body_parts_covered = HEAD|FACE|EYES
/obj/item/clothing/head/nursehat
name = "nurse's hat"
desc = "It allows quick identification of trained medical personnel."
icon_state = "nursehat"
- flags = FPRINT|TABLEPASS
siemens_coefficient = 0.9
body_parts_covered = 0
@@ -76,7 +69,7 @@
icon_state = "syndicate"
item_state = "syndicate"
desc = "A plastic replica of a bloodthirsty mercenary's space helmet, you'll look just like a real murderous criminal operative in this! This is a toy, it is not made for use in space!"
- flags = FPRINT | TABLEPASS | BLOCKHAIR
+ flags = BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
siemens_coefficient = 2.0
body_parts_covered = HEAD|FACE|EYES
@@ -85,7 +78,7 @@
name = "cueball helmet"
desc = "A large, featureless white orb mean to be worn on your head. How do you even see out of this thing?"
icon_state = "cueball"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
+ flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
item_state="cueball"
flags_inv = 0
body_parts_covered = HEAD|FACE|EYES
@@ -95,7 +88,6 @@
desc = "It's a green bandana with some fine nanotech lining."
icon_state = "greenbandana"
item_state = "greenbandana"
- flags = FPRINT|TABLEPASS
flags_inv = 0
body_parts_covered = 0
@@ -104,7 +96,7 @@
desc = "A helmet made out of a box."
icon_state = "cardborg_h"
item_state = "cardborg_h"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH
+ flags = HEADCOVERSEYES | HEADCOVERSMOUTH
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
body_parts_covered = HEAD|FACE|EYES
@@ -113,7 +105,7 @@
desc = "fight for what's righteous!"
icon_state = "justicered"
item_state = "justicered"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
+ flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
/obj/item/clothing/head/justice/blue
icon_state = "justiceblue"
@@ -135,7 +127,6 @@
name = "rabbit ears"
desc = "Wearing these makes you looks useless, and only good for your sex appeal."
icon_state = "bunny"
- flags = FPRINT | TABLEPASS
body_parts_covered = 0
/obj/item/clothing/head/flatcap
@@ -170,7 +161,6 @@
desc = "Gentleman, elite aboard!"
icon_state = "bowler"
item_state = "bowler"
- flags = FPRINT | TABLEPASS
body_parts_covered = 0
//stylish bs12 hats
@@ -180,7 +170,6 @@
icon_state = "bowler_hat"
item_state = "bowler_hat"
desc = "For the gentleman of distinction."
- flags = FPRINT|TABLEPASS
body_parts_covered = 0
/obj/item/clothing/head/beaverhat
@@ -188,35 +177,30 @@
icon_state = "beaver_hat"
item_state = "beaver_hat"
desc = "Soft felt makes this hat both comfortable and elegant."
- flags = FPRINT|TABLEPASS
/obj/item/clothing/head/boaterhat
name = "boater hat"
icon_state = "boater_hat"
item_state = "boater_hat"
desc = "The ultimate in summer fashion."
- flags = FPRINT|TABLEPASS
/obj/item/clothing/head/fedora
name = "\improper fedora"
icon_state = "fedora"
item_state = "fedora"
desc = "A sharp, stylish hat."
- flags = FPRINT|TABLEPASS
/obj/item/clothing/head/feathertrilby
name = "\improper feather trilby"
icon_state = "feather_trilby"
item_state = "feather_trilby"
desc = "A sharp, stylish hat with a feather."
- flags = FPRINT|TABLEPASS
/obj/item/clothing/head/fez
name = "\improper fez"
icon_state = "fez"
item_state = "fez"
desc = "You should wear a fez. Fezzes are cool."
- flags = FPRINT|TABLEPASS
//end bs12 hats
@@ -225,7 +209,7 @@
desc = "Eeeee~heheheheheheh!"
icon_state = "witch"
item_state = "witch"
- flags = FPRINT | TABLEPASS | BLOCKHAIR
+ flags = BLOCKHAIR
siemens_coefficient = 2.0
/obj/item/clothing/head/chicken
@@ -233,7 +217,7 @@
desc = "Bkaw!"
icon_state = "chickenhead"
item_state = "chickensuit"
- flags = FPRINT | TABLEPASS | BLOCKHAIR
+ flags = BLOCKHAIR
siemens_coefficient = 0.7
body_parts_covered = HEAD|FACE|EYES
@@ -242,7 +226,7 @@
desc = "Fuzzy."
icon_state = "bearpelt"
item_state = "bearpelt"
- flags = FPRINT | TABLEPASS | BLOCKHAIR
+ flags = BLOCKHAIR
siemens_coefficient = 0.7
/obj/item/clothing/head/xenos
@@ -250,7 +234,7 @@
icon_state = "xenos"
item_state = "xenos_helm"
desc = "A helmet made out of chitinous alien hide."
- flags = FPRINT | TABLEPASS | BLOCKHAIR
+ flags = BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
siemens_coefficient = 2.0
body_parts_covered = HEAD|FACE|EYES
@@ -260,7 +244,7 @@
desc = "A stylish monstrosity unearthed from Earth's Renaissance period. With this most distinguish'd wig, you'll be ready for your next soiree!"
icon_state = "philosopher_wig"
item_state = "philosopher_wig"
- flags = FPRINT | TABLEPASS | BLOCKHAIR
+ flags = BLOCKHAIR
siemens_coefficient = 2.0 //why is it so conductive?!
body_parts_covered = 0
diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm
index ba72b92754..5eb7e0c65b 100644
--- a/code/modules/clothing/head/misc_special.dm
+++ b/code/modules/clothing/head/misc_special.dm
@@ -15,7 +15,7 @@
name = "welding helmet"
desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye."
icon_state = "welding"
- flags = (FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH)
+ flags = HEADCOVERSEYES | HEADCOVERSMOUTH
item_state = "welding"
matter = list("metal" = 3000, "glass" = 1000)
var/up = 0
@@ -58,7 +58,7 @@
name = "cake-hat"
desc = "It's tasty looking!"
icon_state = "cake0"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES
+ flags = HEADCOVERSEYES
var/onfire = 0.0
var/status = 0
var/fire_resist = T0C+1300 //this is the max temp it can stand before you start to cook. although it might not burn away, you take damage
@@ -123,7 +123,7 @@
icon_state = "hardhat0_pumpkin"//Could stand to be renamed
item_state = "hardhat0_pumpkin"
item_color = "pumpkin"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
+ flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
body_parts_covered = HEAD|EYES
brightness_on = 2
@@ -137,7 +137,6 @@
name = "kitty ears"
desc = "A pair of kitty ears. Meow!"
icon_state = "kitty"
- flags = FPRINT | TABLEPASS
body_parts_covered = 0
var/icon/mob
var/icon/mob2
@@ -153,4 +152,11 @@
var/icon/earbit = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner")
var/icon/earbit2 = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner2")
mob.Blend(earbit, ICON_OVERLAY)
- mob2.Blend(earbit2, ICON_OVERLAY)
\ No newline at end of file
+ mob2.Blend(earbit2, ICON_OVERLAY)
+
+/obj/item/clothing/head/richard
+ name = "chicken mask"
+ desc = "You can hear the distant sounds of rhythmic electronica."
+ icon_state = "richard"
+ body_parts_covered = HEAD|FACE
+ flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
\ No newline at end of file
diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm
index dcf2eb1e48..1deff69402 100644
--- a/code/modules/clothing/head/soft_caps.dm
+++ b/code/modules/clothing/head/soft_caps.dm
@@ -2,7 +2,7 @@
name = "cargo cap"
desc = "It's a baseball hat in a tasteless yellow color."
icon_state = "cargosoft"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES
+ flags = HEADCOVERSEYES
item_state = "helmet"
item_color = "cargo"
var/flipped = 0
diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm
index eeaf55c557..dfa7e120f7 100644
--- a/code/modules/clothing/masks/boxing.dm
+++ b/code/modules/clothing/masks/boxing.dm
@@ -3,7 +3,7 @@
desc = "LOADSAMONEY"
icon_state = "balaclava"
item_state = "balaclava"
- flags = FPRINT|TABLEPASS|BLOCKHAIR
+ flags = BLOCKHAIR
flags_inv = HIDEFACE
body_parts_covered = FACE
w_class = 2
@@ -17,7 +17,7 @@
desc = "Designed to both hide identities and keep your face comfy and warm."
icon_state = "swatclava"
item_state = "balaclava"
- flags = FPRINT|TABLEPASS|BLOCKHAIR
+ flags = BLOCKHAIR
flags_inv = HIDEFACE
w_class = 2
sprite_sheets = list(
@@ -30,7 +30,7 @@
desc = "Worn by robust fighters, flying high to defeat their foes!"
icon_state = "luchag"
item_state = "luchag"
- flags = FPRINT|TABLEPASS|BLOCKHAIR
+ flags = BLOCKHAIR
flags_inv = HIDEFACE
body_parts_covered = HEAD|FACE
w_class = 2
diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm
index 2780ff4be5..a2ed54b1d4 100644
--- a/code/modules/clothing/masks/breath.dm
+++ b/code/modules/clothing/masks/breath.dm
@@ -3,7 +3,7 @@
name = "breath mask"
icon_state = "breath"
item_state = "breath"
- flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | AIRTIGHT
+ flags = MASKCOVERSMOUTH | AIRTIGHT
body_parts_covered = 0
w_class = 2
gas_transfer_coefficient = 0.10
diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm
index c006cd892d..1982409d6f 100644
--- a/code/modules/clothing/masks/gasmask.dm
+++ b/code/modules/clothing/masks/gasmask.dm
@@ -2,7 +2,7 @@
name = "gas mask"
desc = "A face-covering mask that can be connected to an air supply. Filters harmful gases from the air."
icon_state = "gas_alt"
- flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT
+ flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
body_parts_covered = FACE|EYES
w_class = 3.0
diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm
index 758baae8b9..412f69bda6 100644
--- a/code/modules/clothing/masks/miscellaneous.dm
+++ b/code/modules/clothing/masks/miscellaneous.dm
@@ -3,7 +3,7 @@
desc = "To stop that awful noise."
icon_state = "muzzle"
item_state = "muzzle"
- flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
+ flags = MASKCOVERSMOUTH
body_parts_covered = 0
w_class = 2
gas_transfer_coefficient = 0.90
@@ -20,7 +20,7 @@
icon_state = "sterile"
item_state = "sterile"
w_class = 2
- flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
+ flags = MASKCOVERSMOUTH
body_parts_covered = 0
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.01
@@ -30,7 +30,6 @@
name = "fake moustache"
desc = "Warning: moustache is fake."
icon_state = "fake-moustache"
- flags = FPRINT|TABLEPASS
flags_inv = HIDEFACE
body_parts_covered = 0
@@ -38,7 +37,6 @@
name = "Snorkel"
desc = "For the Swimming Savant."
icon_state = "snorkel"
- flags = FPRINT|TABLEPASS
flags_inv = HIDEFACE
body_parts_covered = 0
@@ -49,7 +47,7 @@
desc = "A blue neck scarf."
icon_state = "blueneckscarf"
item_state = "blueneckscarf"
- flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
+ flags = MASKCOVERSMOUTH
w_class = 2
gas_transfer_coefficient = 0.90
@@ -58,7 +56,7 @@
desc = "A red and white checkered neck scarf."
icon_state = "redwhite_scarf"
item_state = "redwhite_scarf"
- flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
+ flags = MASKCOVERSMOUTH
w_class = 2
gas_transfer_coefficient = 0.90
@@ -67,7 +65,7 @@
desc = "A green neck scarf."
icon_state = "green_scarf"
item_state = "green_scarf"
- flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
+ flags = MASKCOVERSMOUTH
w_class = 2
gas_transfer_coefficient = 0.90
@@ -76,7 +74,7 @@
desc = "A stealthy, dark scarf."
icon_state = "ninja_scarf"
item_state = "ninja_scarf"
- flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
+ flags = MASKCOVERSMOUTH
w_class = 2
gas_transfer_coefficient = 0.90
siemens_coefficient = 0
@@ -86,7 +84,7 @@
desc = "A rubber pig mask."
icon_state = "pig"
item_state = "pig"
- flags = FPRINT|TABLEPASS|BLOCKHAIR
+ flags = BLOCKHAIR
flags_inv = HIDEFACE
w_class = 2
siemens_coefficient = 0.9
@@ -97,7 +95,7 @@
desc = "A mask made of soft vinyl and latex, representing the head of a horse."
icon_state = "horsehead"
item_state = "horsehead"
- flags = FPRINT|TABLEPASS|BLOCKHAIR
+ flags = BLOCKHAIR
flags_inv = HIDEFACE
body_parts_covered = HEAD|FACE|EYES
w_class = 2
diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm
index 374f38be85..1436e4e4a2 100644
--- a/code/modules/clothing/spacesuits/alien.dm
+++ b/code/modules/clothing/spacesuits/alien.dm
@@ -54,7 +54,7 @@
/obj/item/clothing/head/helmet/space/vox
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30)
siemens_coefficient = 0.6
- flags = HEADCOVERSEYES|STOPSPRESSUREDMAGE
+ flags = HEADCOVERSEYES|STOPPRESSUREDAMAGE
species_restricted = list("Vox","Vox Armalis")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/head.dmi',
diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm
index 81d4ef028c..68a7ea51d9 100644
--- a/code/modules/clothing/spacesuits/captain.dm
+++ b/code/modules/clothing/spacesuits/captain.dm
@@ -4,7 +4,7 @@
icon_state = "capspace"
item_state = "capspacehelmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads."
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
+ flags = HEADCOVERSEYES | BLOCKHAIR | STOPPRESSUREDAMAGE
flags_inv = HIDEFACE
permeability_coefficient = 0.01
armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50)
@@ -18,7 +18,7 @@
w_class = 4
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
+ flags = STOPPRESSUREDAMAGE
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
slowdown = 1.5
diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm
index cc6cbd622b..b1fa5b8f27 100644
--- a/code/modules/clothing/spacesuits/miscellaneous.dm
+++ b/code/modules/clothing/spacesuits/miscellaneous.dm
@@ -17,7 +17,7 @@
w_class = 4
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
+ flags = STOPPRESSUREDAMAGE
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
slowdown = 1.5
@@ -34,7 +34,7 @@
icon_state = "deathsquad"
item_state = "deathsquad"
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 100, rad = 60)
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
+ flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL
siemens_coefficient = 0.6
/obj/item/clothing/head/helmet/space/deathsquad/beret
@@ -42,7 +42,7 @@
desc = "An armored beret commonly used by special operations officers."
icon_state = "beret_badge"
armor = list(melee = 65, bullet = 55, laser = 35,energy = 20, bomb = 30, bio = 30, rad = 30)
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
+ flags = HEADCOVERSEYES | BLOCKHAIR | STOPPRESSUREDAMAGE
siemens_coefficient = 0.9
//Space santa outfit suit
@@ -50,7 +50,7 @@
name = "Santa's hat"
desc = "Ho ho ho. Merrry X-mas!"
icon_state = "santahat"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
+ flags = HEADCOVERSEYES | BLOCKHAIR | STOPPRESSUREDAMAGE
body_parts_covered = HEAD
/obj/item/clothing/suit/space/santa
@@ -59,10 +59,9 @@
icon_state = "santa"
item_state = "santa"
slowdown = 0
- flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE
+ flags = ONESIZEFITSALL | STOPPRESSUREDAMAGE
allowed = list(/obj/item) //for stuffing exta special presents
-
//Space pirate outfit
/obj/item/clothing/head/helmet/space/pirate
name = "pirate hat"
@@ -70,7 +69,7 @@
icon_state = "pirate"
item_state = "pirate"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE
+ flags = HEADCOVERSEYES | BLOCKHAIR | STOPPRESSUREDAMAGE
body_parts_covered = 0
siemens_coefficient = 0.9
@@ -85,5 +84,3 @@
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
siemens_coefficient = 0.9
body_parts_covered = UPPER_TORSO|ARMS
-
-
diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm
index f8457375cc..605bff6be8 100644
--- a/code/modules/clothing/spacesuits/rig/modules/combat.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm
@@ -111,6 +111,16 @@
gun.Fire(target,holder.wearer)
return 1
+/obj/item/rig_module/mounted/egun
+
+ name = "mounted energy gun"
+ desc = "A forearm-mounted energy projector."
+
+ interface_name = "mounted energy gun"
+ interface_desc = "A forearm-mounted suit-powered energy gun."
+
+ gun_type = /obj/item/weapon/gun/energy/gun/mounted
+
/obj/item/rig_module/mounted/taser
name = "mounted taser"
@@ -124,7 +134,7 @@
interface_name = "mounted energy gun"
interface_desc = "A shoulder-mounted cell-powered energy gun."
- gun_type = /obj/item/weapon/gun/energy/gun/mounted
+ gun_type = /obj/item/weapon/gun/energy/taser/mounted
/obj/item/rig_module/mounted/energy_blade
diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm
index 1b2befa59a..3d66c64602 100644
--- a/code/modules/clothing/spacesuits/rig/modules/computer.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm
@@ -334,6 +334,7 @@
var/atom/interfaced_with // Currently draining power from this device.
var/total_power_drained = 0
+ var/drain_loc
/obj/item/rig_module/power_sink/deactivate()
@@ -373,6 +374,7 @@
H << "You begin draining power from [target]!"
interfaced_with = target
+ drain_loc = interfaced_with.loc
holder.spark_system.start()
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
@@ -406,7 +408,7 @@
drain_complete(H)
return
- if(!interfaced_with || !interfaced_with.Adjacent(H))
+ if(!interfaced_with || !interfaced_with.Adjacent(H) || !(interfaced_with.loc == drain_loc))
H << "Your power sink retracts into its casing."
drain_complete(H)
return
@@ -427,8 +429,6 @@
holder.cell.give(target_drained * CELLRATE)
total_power_drained += target_drained
-
-
return 1
/obj/item/rig_module/power_sink/proc/drain_complete(var/mob/living/M)
@@ -439,5 +439,6 @@
if(M) M << "Total power drained from [interfaced_with]: [round(total_power_drained/1000)]kJ."
interfaced_with.drain_power(0,1,0) // Damage the victim.
+ drain_loc = null
interfaced_with = null
total_power_drained = 0
\ No newline at end of file
diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm
index b0ba99016e..830e0d784c 100644
--- a/code/modules/clothing/spacesuits/rig/modules/modules.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm
@@ -147,6 +147,14 @@
usr << "The suit is not initialized."
return 0
+ if(usr.lying || usr.stat || usr.stunned || usr.paralysis)
+ usr << "You cannot use the suit in this state."
+ return 0
+
+ if(holder.wearer && holder.wearer.lying)
+ usr << "The suit cannot function while the wearer is prone."
+ return 0
+
if(holder.security_check_enabled && !holder.check_suit_access(usr))
usr << "Access denied."
return
diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm
index 12ea8e7fb2..6d572cdcb3 100644
--- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm
@@ -19,6 +19,7 @@
use_power_cost = 5
active_power_cost = 1
passive_power_cost = 0
+ module_cooldown = 30
activate_string = "Enable Cloak"
deactivate_string = "Disable Cloak"
diff --git a/code/modules/clothing/spacesuits/rig/modules/rig_weapons.dm b/code/modules/clothing/spacesuits/rig/modules/rig_weapons.dm
new file mode 100644
index 0000000000..792a6ed0d0
--- /dev/null
+++ b/code/modules/clothing/spacesuits/rig/modules/rig_weapons.dm
@@ -0,0 +1,51 @@
+//Weapon types intended to be used with rig modules
+
+/obj/item/weapon/gun/energy/lasercannon/mounted/load_into_chamber()
+ if(in_chamber)
+ return 1
+ var/obj/item/rig_module/module = loc
+ if(!istype(module))
+ return 0
+ if(module.holder && module.holder.wearer)
+ var/mob/living/carbon/human/H = module.holder.wearer
+ if(istype(H) && H.back)
+ var/obj/item/weapon/rig/suit = H.back
+ if(istype(suit) && suit.cell && suit.cell.charge >= 250)
+ suit.cell.use(250)
+ in_chamber = new /obj/item/projectile/beam/heavylaser(src)
+ return 1
+ return 0
+
+/obj/item/weapon/gun/energy/gun/mounted/load_into_chamber()
+ if(in_chamber)
+ return 1
+ var/obj/item/rig_module/module = loc
+ if(!istype(module))
+ return 0
+ if(module.holder && module.holder.wearer)
+ var/mob/living/carbon/human/H = module.holder.wearer
+ if(istype(H) && H.back)
+ var/obj/item/weapon/rig/suit = H.back
+ if(istype(suit) && suit.cell && suit.cell.charge >= 250)
+ suit.cell.use(250)
+ var/prog_path = projectile_type
+ in_chamber = new prog_path(src)
+ return 1
+ return 0
+
+/obj/item/weapon/gun/energy/taser/mounted/load_into_chamber()
+ if(in_chamber)
+ return 1
+ var/obj/item/rig_module/module = loc
+ if(!istype(module))
+ return 0
+ if(module.holder && module.holder.wearer)
+ var/mob/living/carbon/human/H = module.holder.wearer
+ if(istype(H) && H.back)
+ var/obj/item/weapon/rig/suit = H.back
+ if(istype(suit) && suit.cell && suit.cell.charge >= 250)
+ suit.cell.use(250)
+ var/prog_path = projectile_type
+ in_chamber = new prog_path(src)
+ return 1
+ return 0
\ No newline at end of file
diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm
index 619faa0a7e..3d909d02c1 100644
--- a/code/modules/clothing/spacesuits/rig/modules/utility.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm
@@ -197,8 +197,8 @@
target_mob = H
if(target_mob != H)
- H << "You inject [target_mob] with [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name]."
- target_mob << "You feel a rushing in your veins as [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected."
+ H << "You inject [target_mob] with [chems_to_use] unit\s of [charge.display_name]."
+ target_mob << "You feel a rushing in your veins as [chems_to_use] unit\s of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected."
target_mob.reagents.add_reagent(charge.display_name, chems_to_use)
charge.charges -= chems_to_use
diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm
index b308fda2b4..c66f2a986c 100644
--- a/code/modules/clothing/spacesuits/rig/rig.dm
+++ b/code/modules/clothing/spacesuits/rig/rig.dm
@@ -175,7 +175,7 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)]"
- piece.flags &= ~STOPSPRESSUREDMAGE
+ piece.flags &= ~STOPPRESSUREDAMAGE
piece.flags &= ~AIRTIGHT
update_icon(1)
@@ -251,13 +251,13 @@
else
helmet.flags &= ~AIRTIGHT
helmet.update_light(wearer)
-
+
//sealed pieces become airtight, protecting against diseases
if (!seal_target)
piece.armor["bio"] = 100
else
piece.armor["bio"] = src.armor["bio"]
-
+
else
failed_to_seal = 1
@@ -291,10 +291,10 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
if(canremove)
- piece.flags &= ~STOPSPRESSUREDMAGE
+ piece.flags &= ~STOPPRESSUREDAMAGE
piece.flags &= ~AIRTIGHT
else
- piece.flags |= STOPSPRESSUREDMAGE
+ piece.flags |= STOPPRESSUREDAMAGE
piece.flags |= AIRTIGHT
update_icon(1)
@@ -515,6 +515,8 @@
return
if(href_list["toggle_piece"])
+ if(ishuman(usr) && (usr.stat || usr.stunned || usr.lying))
+ return 0
toggle_piece(href_list["toggle_piece"], usr)
else if(href_list["toggle_seals"])
toggle_seals(usr)
@@ -543,7 +545,7 @@
usr.set_machine(src)
src.add_fingerprint(usr)
- return
+ return 1
/obj/item/weapon/rig/proc/notify_ai(var/message)
if(!message || !installed_modules || !installed_modules.len)
@@ -579,6 +581,9 @@
if(!istype(wearer) || !wearer.back == src)
return
+ if(usr == wearer && (usr.stat||usr.paralysis||usr.stunned)) // If the usr isn't wearing the suit it's probably an AI.
+ return
+
var/obj/item/check_slot
var/equip_to
var/obj/item/use_obj
@@ -730,4 +735,4 @@
#undef ONLY_DEPLOY
#undef ONLY_RETRACT
-#undef SEAL_DELAY
\ No newline at end of file
+#undef SEAL_DELAY
diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm
index 061973c137..c0d119b0b4 100644
--- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm
+++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm
@@ -180,7 +180,7 @@
installed_modules -= removed
update_icon()
- return
+ return
// If we've gotten this far, all we have left to do before we pass off to root procs
// is check if any of the loaded modules want to use the item we've been given.
diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm
index 314af42e07..fd802ecb63 100644
--- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm
+++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm
@@ -4,17 +4,18 @@
/obj/item/clothing/head/helmet/space/rig
name = "helmet"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | THICKMATERIAL
+ flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | THICKMATERIAL
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
body_parts_covered = HEAD|FACE|EYES
heat_protection = HEAD|FACE|EYES
cold_protection = HEAD|FACE|EYES
brightness_on = 4
+ sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/helmet.dmi',"Skrell" = 'icons/mob/species/skrell/helmet.dmi',"Unathi" = 'icons/mob/species/unathi/helmet.dmi')
species_restricted = null
/obj/item/clothing/gloves/rig
name = "gauntlets"
- flags = FPRINT | TABLEPASS | THICKMATERIAL
+ flags = THICKMATERIAL
body_parts_covered = HANDS
heat_protection = HANDS
cold_protection = HANDS
@@ -36,10 +37,11 @@
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEJUMPSUIT|HIDETAIL
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL | AIRTIGHT
+ flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
slowdown = 0
breach_threshold = 35
can_breach = 1
+ sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi')
supporting_limbs = list()
//TODO: move this to modules
@@ -64,4 +66,4 @@
if(module.engage(A))
return 1
- return 0
\ No newline at end of file
+ return 0
diff --git a/code/modules/clothing/spacesuits/rig/rig_verbs.dm b/code/modules/clothing/spacesuits/rig/rig_verbs.dm
index 9ec6f03df7..ce20244734 100644
--- a/code/modules/clothing/spacesuits/rig/rig_verbs.dm
+++ b/code/modules/clothing/spacesuits/rig/rig_verbs.dm
@@ -120,8 +120,8 @@
/obj/item/weapon/rig/verb/toggle_seals_verb()
- set name = "Toggle Seals"
- set desc = "Activates or deactivates your rig seals."
+ set name = "Toggle Hardsuit"
+ set desc = "Activates or deactivates your rig."
set category = "Hardsuit"
set src = usr.contents
@@ -208,6 +208,8 @@
var/obj/item/rig_module/module = input("Which module do you wish to select?") as null|anything in selectable
if(!istype(module))
+ selected_module = null
+ usr << "Primary system is now: deselected."
return
selected_module = module
diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm
index 4935d793cf..d3db4baf84 100644
--- a/code/modules/clothing/spacesuits/rig/suits/ert.dm
+++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm
@@ -23,7 +23,6 @@
/obj/item/rig_module/ai_container,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/datajack,
- /obj/item/rig_module/mounted
)
/obj/item/weapon/rig/ert/engineer
@@ -62,5 +61,5 @@
/obj/item/rig_module/ai_container,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/grenade_launcher,
- /obj/item/rig_module/mounted
+ /obj/item/rig_module/mounted/egun,
)
\ No newline at end of file
diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm
index 3568a4b64d..0a18f3c640 100644
--- a/code/modules/clothing/spacesuits/rig/suits/light.dm
+++ b/code/modules/clothing/spacesuits/rig/suits/light.dm
@@ -7,7 +7,7 @@
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell)
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
slowdown = 0
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
+ flags = STOPPRESSUREDAMAGE | THICKMATERIAL
offline_slowdown = 0
offline_vision_restriction = 0
@@ -46,7 +46,7 @@
/obj/item/clothing/head/helmet/space/rig/mask
name = "mask"
- flags = FPRINT | TABLEPASS | THICKMATERIAL
+ flags = THICKMATERIAL
/obj/item/weapon/rig/light/ninja
name = "ominous suit control module"
@@ -87,4 +87,4 @@
/obj/item/rig_module/teleporter,
/obj/item/rig_module/stealth_field,
/obj/item/rig_module/vision
- )
\ No newline at end of file
+ )
diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm
index 2ffe521d19..8d73a40e68 100644
--- a/code/modules/clothing/spacesuits/spacesuits.dm
+++ b/code/modules/clothing/spacesuits/spacesuits.dm
@@ -6,7 +6,7 @@
name = "Space helmet"
icon_state = "space"
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL | AIRTIGHT
+ flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
item_state = "space"
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
@@ -53,7 +53,7 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
+ flags = STOPPRESSUREDAMAGE | THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit)
slowdown = 3
@@ -91,4 +91,4 @@
for(var/datum/organ/external/E in supporting_limbs)
E.status &= ~ ORGAN_SPLINTED
user << "The suit stops supporting your [E.display_name]."
- supporting_limbs = list()
\ No newline at end of file
+ supporting_limbs = list()
diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm
index a1e6ab2714..1cab4a659c 100644
--- a/code/modules/clothing/spacesuits/void/void.dm
+++ b/code/modules/clothing/spacesuits/void/void.dm
@@ -55,6 +55,13 @@
var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any.
var/obj/item/clothing/head/helmet/helmet = null // Deployable helmet, if any.
+/obj/item/clothing/suit/space/void/refit_for_species(var/target_species)
+ ..()
+ if(istype(helmet))
+ helmet.refit_for_species(target_species)
+ if(istype(boots))
+ boots.refit_for_species(target_species)
+
/obj/item/clothing/suit/space/void/equipped(mob/M)
..()
@@ -68,20 +75,15 @@
if(helmet)
if(H.head)
M << "You are unable to deploy your suit's helmet as \the [H.head] is in the way."
- else
+ else if (H.equip_to_slot_if_possible(helmet, slot_head))
M << "Your suit's helmet deploys with a hiss."
- //TODO: Species check, skull damage for forcing an unfitting helmet on?
- helmet.loc = H
- H.equip_to_slot(helmet, slot_head)
helmet.canremove = 0
if(boots)
if(H.shoes)
M << "You are unable to deploy your suit's magboots as \the [H.shoes] are in the way."
- else
+ else if (H.equip_to_slot_if_possible(boots, slot_shoes))
M << "Your suit's boots deploy with a hiss."
- boots.loc = H
- H.equip_to_slot(boots, slot_shoes)
boots.canremove = 0
/obj/item/clothing/suit/space/void/dropped()
@@ -132,12 +134,10 @@
if(H.head)
H << "You cannot deploy your helmet while wearing another helmet."
return
- //TODO: Species check, skull damage for forcing an unfitting helmet on?
- helmet.loc = H
- helmet.pickup(H)
- H.equip_to_slot(helmet, slot_head)
- helmet.canremove = 0
- H << "You deploy your suit helmet, sealing you off from the world."
+ if(H.equip_to_slot_if_possible(helmet, slot_head))
+ helmet.pickup(H)
+ helmet.canremove = 0
+ H << "You deploy your suit helmet, sealing you off from the world."
helmet.update_light(H)
/obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob)
diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm
index f5c9f4501e..6a5dd04cb6 100644
--- a/code/modules/clothing/suits/armor.dm
+++ b/code/modules/clothing/suits/armor.dm
@@ -2,7 +2,7 @@
/obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
body_parts_covered = UPPER_TORSO|LOWER_TORSO
- flags = FPRINT | TABLEPASS | THICKMATERIAL
+ flags = THICKMATERIAL
cold_protection = UPPER_TORSO|LOWER_TORSO
min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE
@@ -17,7 +17,7 @@
icon_state = "armor"
item_state = "armor"
blood_overlay_type = "armor"
- flags = FPRINT | TABLEPASS | ONESIZEFITSALL
+ flags = ONESIZEFITSALL
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/vest/security
@@ -71,7 +71,7 @@
item_state = "swat_suit"
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
+ flags = STOPPRESSUREDAMAGE | THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1
@@ -98,7 +98,7 @@
icon_state = "detective-armor"
item_state = "armor"
blood_overlay_type = "armor"
- flags = FPRINT | TABLEPASS | ONESIZEFITSALL
+ flags = ONESIZEFITSALL
body_parts_covered = UPPER_TORSO|LOWER_TORSO
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
@@ -113,7 +113,6 @@
item_state = "reactiveoff"
blood_overlay_type = "armor"
slowdown = 1
- flags = FPRINT | TABLEPASS
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/reactive/IsShield()
@@ -259,4 +258,4 @@
/obj/item/clothing/suit/armor/vest/ert/medical
name = "emergency response team medical armor"
desc = "A set of armor worn by medical members of the NanoTrasen Emergency Response Team. Has red and white highlights."
- icon_state = "ertarmor_med"
\ No newline at end of file
+ icon_state = "ertarmor_med"
diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm
index b3911d8d68..037eb6833e 100644
--- a/code/modules/clothing/suits/bio.dm
+++ b/code/modules/clothing/suits/bio.dm
@@ -4,7 +4,7 @@
icon_state = "bio"
desc = "A hood that protects the head and face from biological comtaminants."
permeability_coefficient = 0.01
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
+ flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
body_parts_covered = HEAD|FACE|EYES
@@ -18,7 +18,6 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 1.0
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/pen,/obj/item/device/flashlight/pen)
diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm
index aa530f7567..09e67ea871 100644
--- a/code/modules/clothing/suits/miscellaneous.dm
+++ b/code/modules/clothing/suits/miscellaneous.dm
@@ -36,7 +36,6 @@
desc = "Yarr."
icon_state = "pirate"
item_state = "pirate"
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|ARMS
@@ -45,7 +44,6 @@
desc = "Yarr."
icon_state = "hgpirate"
item_state = "hgpirate"
- flags = FPRINT | TABLEPASS
flags_inv = HIDEJUMPSUIT
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
@@ -55,7 +53,7 @@
desc = "Suit for a cyborg costume."
icon_state = "death"
item_state = "death"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
fire_resist = T0C+5200
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
@@ -65,7 +63,6 @@
desc = "A heavy great coat"
icon_state = "nazi"
item_state = "nazi"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/suit/johnny_coat
@@ -73,7 +70,6 @@
desc = "Johnny~~"
icon_state = "johnny"
item_state = "johnny"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/suit/justice
@@ -81,7 +77,6 @@
desc = "This pretty much looks ridiculous."
icon_state = "justice"
item_state = "justice"
- flags = FPRINT | TABLEPASS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|HANDS|LEGS|FEET
@@ -91,7 +86,6 @@
desc = "This robe commands authority."
icon_state = "judge"
item_state = "judge"
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/spacecash)
flags_inv = HIDEJUMPSUIT
@@ -120,7 +114,6 @@
item_state = "space_suit_syndicate"
desc = "A plastic replica of the syndicate space suit, you'll look just like a real murderous syndicate agent in this! This is a toy, it is not made for use in space!"
w_class = 3
- flags = FPRINT | TABLEPASS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|HANDS|LEGS|FEET
@@ -223,21 +216,18 @@
desc = "A long, thick black leather coat."
icon_state = "leathercoat"
item_state = "leathercoat"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/suit/browncoat
name = "brown leather coat"
desc = "A long, brown leather coat."
icon_state = "browncoat"
item_state = "browncoat"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/suit/neocoat
name = "black coat"
desc = "A flowing, black coat."
icon_state = "neocoat"
item_state = "neocoat"
- flags = FPRINT | TABLEPASS
//stripper
/obj/item/clothing/under/stripper
@@ -356,12 +346,13 @@
icon_state = "blueponcho"
item_state = "blueponcho"
-/obj/item/clothing/suit/storage/bomber
+/obj/item/clothing/suit/storage/toggle/bomber
name = "bomber jacket"
desc = "A thick, well-worn WW2 leather bomber jacket."
icon_state = "bomber"
item_state = "bomber"
- flags = FPRINT | TABLEPASS
+ icon_open = "bomber_open"
+ icon_closed = "bomber"
body_parts_covered = UPPER_TORSO|ARMS
cold_protection = UPPER_TORSO|ARMS
min_cold_protection_temperature = T0C - 20
@@ -394,10 +385,20 @@
icon_open = "brown_jacket_nt_open"
icon_closed = "brown_jacket_nt"
-/obj/item/clothing/suit/hoodie
+/obj/item/clothing/suit/storage/toggle/hoodie
name = "grey hoodie"
desc = "A warm, grey sweatshirt."
icon_state = "grey_hoodie"
item_state = "grey_hoodie"
+ icon_open = "grey_hoodie_open"
+ icon_closed = "grey_hoodie"
min_cold_protection_temperature = T0C - 20
cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS
+
+/obj/item/clothing/suit/storage/toggle/hoodie/black
+ name = "black hoodie"
+ desc = "A warm, black sweatshirt."
+ icon_state = "black_hoodie"
+ item_state = "black_hoodie"
+ icon_open = "black_hoodie_open"
+ icon_closed = "black_hoodie"
\ No newline at end of file
diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm
index e75b312690..c0cdd91ecd 100644
--- a/code/modules/clothing/suits/utility.dm
+++ b/code/modules/clothing/suits/utility.dm
@@ -21,7 +21,7 @@
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/extinguisher)
slowdown = 1.0
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
- flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
+ flags = STOPPRESSUREDAMAGE
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
@@ -47,7 +47,7 @@
name = "bomb hood"
desc = "Use in case of bomb."
icon_state = "bombsuit"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
+ flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 100, bio = 0, rad = 0)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
body_parts_covered = HEAD|FACE|EYES
@@ -62,7 +62,6 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
- flags = FPRINT | TABLEPASS
slowdown = 2
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 100, bio = 0, rad = 0)
flags_inv = HIDEJUMPSUIT|HIDETAIL
@@ -89,7 +88,7 @@
name = "Radiation Hood"
icon_state = "rad"
desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation"
- flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
+ flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
body_parts_covered = HEAD|FACE|EYES
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100)
diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm
new file mode 100644
index 0000000000..e1c9a25c24
--- /dev/null
+++ b/code/modules/clothing/under/accessories/accessory.dm
@@ -0,0 +1,226 @@
+/obj/item/clothing/accessory
+ name = "tie"
+ desc = "A neosilk clip-on tie."
+ icon = 'icons/obj/clothing/ties.dmi'
+ icon_state = "bluetie"
+ item_state = "" //no inhands
+ item_color = "bluetie"
+ slot_flags = SLOT_TIE
+ w_class = 2.0
+ var/slot = "decor"
+ var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
+ var/image/inv_overlay = null //overlay used when attached to clothing.
+
+/obj/item/clothing/accessory/New()
+ ..()
+ inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
+
+//when user attached an accessory to S
+/obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
+ if(!istype(S))
+ return
+ has_suit = S
+ loc = has_suit
+ has_suit.overlays += inv_overlay
+
+ user << "You attach [src] to [has_suit]."
+ src.add_fingerprint(user)
+
+/obj/item/clothing/accessory/proc/on_removed(mob/user as mob)
+ if(!has_suit)
+ return
+ has_suit.overlays -= inv_overlay
+ has_suit = null
+ usr.put_in_hands(src)
+ src.add_fingerprint(user)
+
+//default attackby behaviour
+/obj/item/clothing/accessory/attackby(obj/item/I, mob/user)
+ ..()
+
+//default attack_hand behaviour
+/obj/item/clothing/accessory/attack_hand(mob/user as mob)
+ if(has_suit)
+ return //we aren't an object on the ground so don't call parent
+ ..()
+
+/obj/item/clothing/accessory/blue
+ name = "blue tie"
+ icon_state = "bluetie"
+ item_color = "bluetie"
+
+/obj/item/clothing/accessory/red
+ name = "red tie"
+ icon_state = "redtie"
+ item_color = "redtie"
+
+/obj/item/clothing/accessory/horrible
+ name = "horrible tie"
+ desc = "A neosilk clip-on tie. This one is disgusting."
+ icon_state = "horribletie"
+ item_color = "horribletie"
+
+/obj/item/clothing/accessory/stethoscope
+ name = "stethoscope"
+ desc = "An outdated medical apparatus for listening to the sounds of the human body. It also makes you look like you know what you're doing."
+ icon_state = "stethoscope"
+ item_color = "stethoscope"
+
+/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
+ if(ishuman(M) && isliving(user))
+ if(user.a_intent == "help")
+ var/body_part = parse_zone(user.zone_sel.selecting)
+ if(body_part)
+ var/their = "their"
+ switch(M.gender)
+ if(MALE) their = "his"
+ if(FEMALE) their = "her"
+
+ var/sound = "pulse"
+ var/sound_strength
+
+ if(M.stat == DEAD || (M.status_flags&FAKEDEATH))
+ sound_strength = "cannot hear"
+ sound = "anything"
+ else
+ sound_strength = "hear a weak"
+ switch(body_part)
+ if("chest")
+ if(M.oxyloss < 50)
+ sound_strength = "hear a healthy"
+ sound = "pulse and respiration"
+ if("eyes","mouth")
+ sound_strength = "cannot hear"
+ sound = "anything"
+ else
+ sound_strength = "hear a weak"
+
+ user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].")
+ return
+ return ..(M,user)
+
+
+//Medals
+/obj/item/clothing/accessory/medal
+ name = "bronze medal"
+ desc = "A bronze medal."
+ icon_state = "bronze"
+ item_color = "bronze"
+
+/obj/item/clothing/accessory/medal/conduct
+ name = "distinguished conduct medal"
+ desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew."
+
+/obj/item/clothing/accessory/medal/bronze_heart
+ name = "bronze heart medal"
+ desc = "A bronze heart-shaped medal awarded for sacrifice. It is often awarded posthumously or for severe injury in the line of duty."
+ icon_state = "bronze_heart"
+
+/obj/item/clothing/accessory/medal/nobel_science
+ name = "nobel sciences award"
+ desc = "A bronze medal which represents significant contributions to the field of science or engineering."
+
+/obj/item/clothing/accessory/medal/silver
+ name = "silver medal"
+ desc = "A silver medal."
+ icon_state = "silver"
+ item_color = "silver"
+
+/obj/item/clothing/accessory/medal/silver/valor
+ name = "medal of valor"
+ desc = "A silver medal awarded for acts of exceptional valor."
+
+/obj/item/clothing/accessory/medal/silver/security
+ name = "robust security award"
+ desc = "An award for distinguished combat and sacrifice in defence of Nanotrasen's commercial interests. Often awarded to security staff."
+
+/obj/item/clothing/accessory/medal/gold
+ name = "gold medal"
+ desc = "A prestigious golden medal."
+ icon_state = "gold"
+ item_color = "gold"
+
+/obj/item/clothing/accessory/medal/gold/captain
+ name = "medal of captaincy"
+ desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew."
+
+/obj/item/clothing/accessory/medal/gold/heroism
+ name = "medal of exceptional heroism"
+ desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
+
+/*
+ Holobadges are worn on the belt or neck, and can be used to show that the holder is an authorized
+ Security agent - the user details can be imprinted on the badge with a Security-access ID card,
+ or they can be emagged to accept any ID for use in disguises.
+*/
+
+/obj/item/clothing/accessory/holobadge
+ name = "holobadge"
+ desc = "This glowing blue badge marks the holder as THE LAW."
+ icon_state = "holobadge"
+ item_color = "holobadge"
+ slot_flags = SLOT_BELT | SLOT_TIE
+
+ var/emagged = 0 //Emagging removes Sec check.
+ var/stored_name = null
+
+/obj/item/clothing/accessory/holobadge/cord
+ icon_state = "holobadge-cord"
+ item_color = "holobadge-cord"
+ slot_flags = SLOT_MASK | SLOT_TIE
+
+/obj/item/clothing/accessory/holobadge/attack_self(mob/user as mob)
+ if(!stored_name)
+ user << "Waving around a badge before swiping an ID would be pretty pointless."
+ return
+ if(isliving(user))
+ user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.")
+
+/obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob)
+
+ if (istype(O, /obj/item/weapon/card/emag))
+ if (emagged)
+ user << "\red [src] is already cracked."
+ return
+ else
+ emagged = 1
+ user << "\red You swipe [O] and crack the holobadge security checks."
+ return
+
+ else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
+
+ var/obj/item/weapon/card/id/id_card = null
+
+ if(istype(O, /obj/item/weapon/card/id))
+ id_card = O
+ else
+ var/obj/item/device/pda/pda = O
+ id_card = pda.id
+
+ if(access_security in id_card.access || emagged)
+ user << "You imprint your ID details onto the badge."
+ stored_name = id_card.registered_name
+ name = "holobadge ([stored_name])"
+ desc = "This glowing blue badge marks [stored_name] as THE LAW."
+ else
+ user << "[src] rejects your insufficient access rights."
+ return
+ ..()
+
+/obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/M, mob/living/user)
+ if(isliving(user))
+ user.visible_message("\red [user] invades [M]'s personal space, thrusting [src] into their face insistently.","\red You invade [M]'s personal space, thrusting [src] into their face insistently. You are the law.")
+
+/obj/item/weapon/storage/box/holobadge
+ name = "holobadge box"
+ desc = "A box claiming to contain holobadges."
+ New()
+ new /obj/item/clothing/accessory/holobadge(src)
+ new /obj/item/clothing/accessory/holobadge(src)
+ new /obj/item/clothing/accessory/holobadge(src)
+ new /obj/item/clothing/accessory/holobadge(src)
+ new /obj/item/clothing/accessory/holobadge/cord(src)
+ new /obj/item/clothing/accessory/holobadge/cord(src)
+ ..()
+ return
+
diff --git a/code/modules/clothing/under/accessories/armband.dm b/code/modules/clothing/under/accessories/armband.dm
new file mode 100644
index 0000000000..67d0208b6d
--- /dev/null
+++ b/code/modules/clothing/under/accessories/armband.dm
@@ -0,0 +1,42 @@
+/obj/item/clothing/accessory/armband
+ name = "red armband"
+ desc = "A fancy red armband!"
+ icon_state = "red"
+ item_color = "red"
+ slot = "armband"
+
+/obj/item/clothing/accessory/armband/cargo
+ name = "cargo armband"
+ desc = "An armband, worn by the crew to display which department they're assigned to. This one is brown."
+ icon_state = "cargo"
+ item_color = "cargo"
+
+/obj/item/clothing/accessory/armband/engine
+ name = "engineering armband"
+ desc = "An armband, worn by the crew to display which department they're assigned to. This one is orange with a reflective strip!"
+ icon_state = "engie"
+ item_color = "engie"
+
+/obj/item/clothing/accessory/armband/science
+ name = "science armband"
+ desc = "An armband, worn by the crew to display which department they're assigned to. This one is purple."
+ icon_state = "rnd"
+ item_color = "rnd"
+
+/obj/item/clothing/accessory/armband/hydro
+ name = "hydroponics armband"
+ desc = "An armband, worn by the crew to display which department they're assigned to. This one is green and blue."
+ icon_state = "hydro"
+ item_color = "hydro"
+
+/obj/item/clothing/accessory/armband/med
+ name = "medical armband"
+ desc = "An armband, worn by the crew to display which department they're assigned to. This one is white."
+ icon_state = "med"
+ item_color = "med"
+
+/obj/item/clothing/accessory/armband/medgreen
+ name = "EMT armband"
+ desc = "An armband, worn by the crew to display which department they're assigned to. This one is white and green."
+ icon_state = "medgreen"
+ item_color = "medgreen"
diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm
new file mode 100644
index 0000000000..af2743e43f
--- /dev/null
+++ b/code/modules/clothing/under/accessories/holster.dm
@@ -0,0 +1,119 @@
+/obj/item/clothing/accessory/holster
+ name = "shoulder holster"
+ desc = "A handgun holster."
+ icon_state = "holster"
+ item_color = "holster"
+ slot = "utility"
+ var/obj/item/weapon/gun/holstered = null
+
+//subtypes can override this to specify what can be holstered
+/obj/item/clothing/accessory/holster/proc/can_holster(obj/item/weapon/gun/W)
+ return W.isHandgun()
+
+/obj/item/clothing/accessory/holster/proc/holster(obj/item/I, mob/user as mob)
+ if(holstered)
+ user << "There is already a [holstered] holstered here!"
+ return
+
+ if (!istype(I, /obj/item/weapon/gun))
+ user << "Only guns can be holstered!"
+ return
+
+ var/obj/item/weapon/gun/W = I
+ if (!can_holster(W))
+ user << "This [W] won't fit in the [src]!"
+ return
+
+ holstered = W
+ user.drop_from_inventory(holstered)
+ holstered.loc = src
+ holstered.add_fingerprint(user)
+ user.visible_message("[user] holsters the [holstered].", "You holster the [holstered].")
+
+/obj/item/clothing/accessory/holster/proc/unholster(mob/user as mob)
+ if(!holstered)
+ return
+
+ if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
+ user << "You need an empty hand to draw the [holstered]!"
+ else
+ if(user.a_intent == "hurt")
+ usr.visible_message("\red [user] draws the [holstered], ready to shoot!
", \
+ "You draw the [holstered], ready to shoot!")
+ else
+ user.visible_message("[user] draws the [holstered], pointing it at the ground.", \
+ "You draw the [holstered], pointing it at the ground.")
+ user.put_in_hands(holstered)
+ holstered.add_fingerprint(user)
+ holstered = null
+
+/obj/item/clothing/accessory/holster/attack_hand(mob/user as mob)
+ if (has_suit) //if we are part of a suit
+ if (holstered)
+ unholster(user)
+ return
+
+ ..(user)
+
+/obj/item/clothing/accessory/holster/attackby(obj/item/W as obj, mob/user as mob)
+ holster(W, user)
+
+/obj/item/clothing/accessory/holster/emp_act(severity)
+ if (holstered)
+ holstered.emp_act(severity)
+ ..()
+
+/obj/item/clothing/accessory/holster/examine(mob/user)
+ ..(user)
+ if (holstered)
+ user << "A [holstered] is holstered here."
+ else
+ user << "It is empty."
+
+/obj/item/clothing/accessory/holster/on_attached(obj/item/clothing/under/S, mob/user as mob)
+ ..()
+ has_suit.verbs += /obj/item/clothing/accessory/holster/verb/holster_verb
+
+/obj/item/clothing/accessory/holster/on_removed(mob/user as mob)
+ has_suit.verbs -= /obj/item/clothing/accessory/holster/verb/holster_verb
+ ..()
+
+//For the holster hotkey
+/obj/item/clothing/accessory/holster/verb/holster_verb()
+ set name = "Holster"
+ set category = "Object"
+ set src in usr
+ if(!istype(usr, /mob/living)) return
+ if(usr.stat) return
+
+ var/obj/item/clothing/accessory/holster/H = null
+ if (istype(src, /obj/item/clothing/accessory/holster))
+ H = src
+ else if (istype(src, /obj/item/clothing/under))
+ var/obj/item/clothing/under/S = src
+ if (S.accessories.len)
+ H = locate() in S.accessories
+
+ if (!H)
+ usr << "Something is very wrong."
+
+ if(!H.holstered)
+ if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
+ usr << "You need your gun equiped to holster it."
+ return
+ var/obj/item/weapon/gun/W = usr.get_active_hand()
+ H.holster(W, usr)
+ else
+ H.unholster(usr)
+
+/obj/item/clothing/accessory/holster/armpit
+ name = "shoulder holster"
+ desc = "A worn-out handgun holster. Perfect for concealed carry"
+ icon_state = "holster"
+ item_color = "holster"
+
+/obj/item/clothing/accessory/holster/waist
+ name = "shoulder holster"
+ desc = "A handgun holster. Made of expensive leather."
+ icon_state = "holster"
+ item_color = "holster_low"
\ No newline at end of file
diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm
new file mode 100644
index 0000000000..32313e985d
--- /dev/null
+++ b/code/modules/clothing/under/accessories/storage.dm
@@ -0,0 +1,86 @@
+/obj/item/clothing/accessory/storage
+ name = "load bearing equipment"
+ desc = "Used to hold things when you don't have enough hands."
+ icon_state = "webbing"
+ item_color = "webbing"
+ slot = "utility"
+ var/slots = 3
+ var/obj/item/weapon/storage/internal/hold
+
+/obj/item/clothing/accessory/storage/New()
+ ..()
+ hold = new/obj/item/weapon/storage/internal(src)
+ hold.storage_slots = slots
+
+/obj/item/clothing/accessory/storage/attack_hand(mob/user as mob)
+ if (has_suit) //if we are part of a suit
+ hold.open(user)
+ return
+
+ if (hold.handle_attack_hand(user)) //otherwise interact as a regular storage item
+ ..(user)
+
+/obj/item/clothing/accessory/storage/MouseDrop(obj/over_object as obj)
+ if (has_suit)
+ return
+
+ if (hold.handle_mousedrop(usr, over_object))
+ ..(over_object)
+
+/obj/item/clothing/accessory/storage/attackby(obj/item/W as obj, mob/user as mob)
+ return hold.attackby(W, user)
+
+/obj/item/clothing/accessory/storage/emp_act(severity)
+ hold.emp_act(severity)
+ ..()
+
+/obj/item/clothing/accessory/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
+ hold.hear_talk(M, msg, verb, speaking)
+ ..()
+
+/obj/item/clothing/accessory/storage/attack_self(mob/user as mob)
+ user << "You empty [src]."
+ var/turf/T = get_turf(src)
+ hold.hide_from(usr)
+ for(var/obj/item/I in hold.contents)
+ hold.remove_from_storage(I, T)
+ src.add_fingerprint(user)
+
+/obj/item/clothing/accessory/storage/webbing
+ name = "webbing"
+ desc = "Strudy mess of synthcotton belts and buckles, ready to share your burden."
+ icon_state = "webbing"
+ item_color = "webbing"
+
+/obj/item/clothing/accessory/storage/black_vest
+ name = "black webbing vest"
+ desc = "Robust black synthcotton vest with lots of pockets to hold whatever you need, but cannot hold in hands."
+ icon_state = "vest_black"
+ item_color = "vest_black"
+ slots = 5
+
+/obj/item/clothing/accessory/storage/brown_vest
+ name = "brown webbing vest"
+ desc = "Worn brownish synthcotton vest with lots of pockets to unload your hands."
+ icon_state = "vest_brown"
+ item_color = "vest_brown"
+ slots = 5
+
+/obj/item/clothing/accessory/storage/knifeharness
+ name = "decorated harness"
+ desc = "A heavily decorated harness of sinew and leather with two knife-loops."
+ icon_state = "unathiharness2"
+ item_color = "unathiharness2"
+ slots = 2
+
+/obj/item/clothing/accessory/storage/knifeharness/New()
+ ..()
+ hold.max_combined_w_class = 4
+ hold.can_hold = list("/obj/item/weapon/hatchet/unathiknife",\
+ "/obj/item/weapon/kitchen/utensil/knife",\
+ "/obj/item/weapon/kitchen/utensil/pknife",\
+ "/obj/item/weapon/kitchenknife",\
+ "/obj/item/weapon/kitchenknife/ritual")
+
+ new /obj/item/weapon/hatchet/unathiknife(hold)
+ new /obj/item/weapon/hatchet/unathiknife(hold)
\ No newline at end of file
diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm
index 1b4617afc6..483974f7a2 100644
--- a/code/modules/clothing/under/color.dm
+++ b/code/modules/clothing/under/color.dm
@@ -3,7 +3,6 @@
icon_state = "black"
item_state = "bl_suit"
item_color = "black"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/blackf
name = "feminine black jumpsuit"
@@ -17,21 +16,18 @@
icon_state = "blue"
item_state = "b_suit"
item_color = "blue"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/green
name = "green jumpsuit"
icon_state = "green"
item_state = "g_suit"
item_color = "green"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/grey
name = "grey jumpsuit"
icon_state = "grey"
item_state = "gy_suit"
item_color = "grey"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/orange
name = "orange jumpsuit"
@@ -41,35 +37,30 @@
item_color = "orange"
has_sensor = 2
sensor_mode = 3
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/pink
name = "pink jumpsuit"
icon_state = "pink"
item_state = "p_suit"
item_color = "pink"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/red
name = "red jumpsuit"
icon_state = "red"
item_state = "r_suit"
item_color = "red"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/white
name = "white jumpsuit"
icon_state = "white"
item_state = "w_suit"
item_color = "white"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/yellow
name = "yellow jumpsuit"
icon_state = "yellow"
item_state = "y_suit"
item_color = "yellow"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/psyche
name = "psychedelic jumpsuit"
@@ -88,7 +79,6 @@
desc = "aqua"
icon_state = "aqua"
item_color = "aqua"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/purple
name = "purple jumpsuit"
@@ -120,14 +110,12 @@
desc = "lightbrown"
icon_state = "lightbrown"
item_color = "lightbrown"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/brown
name = "brown jumpsuit"
desc = "brown"
icon_state = "brown"
item_color = "brown"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/yellowgreen
name = "yellowgreen jumpsuit"
@@ -140,7 +128,6 @@
desc = "darkblue"
icon_state = "darkblue"
item_color = "darkblue"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/lightred
name = "lightred jumpsuit"
@@ -153,4 +140,3 @@
desc = "darkred"
icon_state = "darkred"
item_color = "darkred"
- flags = FPRINT | TABLEPASS
diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm
index dc6149562d..9ac511b4f7 100644
--- a/code/modules/clothing/under/jobs/civilian.dm
+++ b/code/modules/clothing/under/jobs/civilian.dm
@@ -6,7 +6,6 @@
icon_state = "ba_suit"
item_state = "ba_suit"
item_color = "ba_suit"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/captain //Alright, technically not a 'civilian' but its better then giving a .dm file for a single define.
@@ -15,7 +14,6 @@
icon_state = "captain"
item_state = "caparmor"
item_color = "captain"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/cargo
@@ -32,7 +30,6 @@
icon_state = "cargotech"
item_state = "lb_suit"
item_color = "cargo"
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
@@ -42,7 +39,6 @@
icon_state = "chaplain"
item_state = "bl_suit"
item_color = "chapblack"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/chef
@@ -50,7 +46,6 @@
name = "chef's uniform"
icon_state = "chef"
item_color = "chef"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/clown
@@ -59,7 +54,6 @@
icon_state = "clown"
item_state = "clown"
item_color = "clown"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/head_of_personnel
@@ -68,7 +62,6 @@
icon_state = "hop"
item_state = "b_suit"
item_color = "hop"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/head_of_personnel_whimsy
desc = "A blue jacket and red tie, with matching red cuffs! Snazzy. Wearing this makes you feel more important than your job title does."
@@ -76,7 +69,6 @@
icon_state = "hopwhimsy"
item_state = "hopwhimsy"
item_color = "hopwhimsy"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/hydroponics
@@ -86,7 +78,6 @@
item_state = "g_suit"
item_color = "hydroponics"
permeability_coefficient = 0.50
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/internalaffairs
@@ -95,7 +86,6 @@
icon_state = "internalaffairs"
item_state = "internalaffairs"
item_color = "internalaffairs"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/janitor
@@ -104,13 +94,11 @@
icon_state = "janitor"
item_color = "janitor"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/lawyer
desc = "Slick threads."
name = "Lawyer suit"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/lawyer/black
@@ -176,7 +164,6 @@
icon_state = "mime"
item_state = "mime"
item_color = "mime"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/miner
desc = "It's a snappy jumpsuit with a sturdy set of overalls. It is very dirty."
diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm
index f348b801a5..0b8cebe57a 100644
--- a/code/modules/clothing/under/jobs/engineering.dm
+++ b/code/modules/clothing/under/jobs/engineering.dm
@@ -6,7 +6,6 @@
item_state = "g_suit"
item_color = "chief"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10)
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/atmospheric_technician
desc = "It's a jumpsuit worn by atmospheric technicians."
@@ -14,7 +13,6 @@
icon_state = "atmos"
item_state = "atmos_suit"
item_color = "atmos"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/engineer
desc = "It's an orange high visibility jumpsuit worn by engineers. It has minor radiation shielding."
@@ -23,7 +21,6 @@
item_state = "engi_suit"
item_color = "engine"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10)
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/roboticist
desc = "It's a slimming black with reinforced seams; great for industrial work."
diff --git a/code/modules/clothing/under/jobs/medsci.dm b/code/modules/clothing/under/jobs/medsci.dm
index 8a09e0ce57..b1554dd02a 100644
--- a/code/modules/clothing/under/jobs/medsci.dm
+++ b/code/modules/clothing/under/jobs/medsci.dm
@@ -8,7 +8,6 @@
item_state = "g_suit"
item_color = "director"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/research_director/rdalt
desc = "A dress suit and slacks stained with hard work and dedication to science. Perhaps other things as well, but mostly hard work and dedication."
@@ -17,7 +16,6 @@
item_state = "rdalt"
item_color = "rdalt"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/research_director/dress_rd
name = "research director dress uniform"
@@ -25,7 +23,6 @@
icon_state = "dress_rd"
item_color = "dress_rd"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
/obj/item/clothing/under/rank/scientist
@@ -36,7 +33,6 @@
item_color = "sciencewhite"
permeability_coefficient = 0.50
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0)
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/chemist
@@ -68,7 +64,6 @@
item_color = "geneticswhite"
permeability_coefficient = 0.50
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/virologist
desc = "It's made of a special fiber that gives special protection against biohazards. It has a virologist rank stripe on it."
@@ -116,28 +111,30 @@
item_color = "medical"
permeability_coefficient = 0.50
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/medical/blue
name = "medical scrubs"
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in baby blue."
icon_state = "scrubsblue"
item_color = "scrubsblue"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/medical/green
name = "medical scrubs"
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in dark green."
icon_state = "scrubsgreen"
item_color = "scrubsgreen"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/medical/purple
name = "medical scrubs"
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in deep purple."
icon_state = "scrubspurple"
item_color = "scrubspurple"
- flags = FPRINT | TABLEPASS
+
+/obj/item/clothing/under/rank/medical/black
+ name = "medical scrubs"
+ desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in black."
+ icon_state = "scrubsblack"
+ item_color = "scrubsblack"
/obj/item/clothing/under/rank/psych
desc = "A basic white jumpsuit. It has turqouise markings that denote the wearer as a psychiatrist."
@@ -145,7 +142,6 @@
icon_state = "psych"
item_state = "w_suit"
item_color = "psych"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/psych/turtleneck
desc = "A turqouise turtleneck and a pair of dark blue slacks, belonging to a psychologist."
@@ -153,7 +149,6 @@
icon_state = "psychturtle"
item_state = "b_suit"
item_color = "psychturtle"
- flags = FPRINT | TABLEPASS
/*
diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm
index f17832d7be..51464410a8 100644
--- a/code/modules/clothing/under/jobs/security.dm
+++ b/code/modules/clothing/under/jobs/security.dm
@@ -15,7 +15,6 @@
item_state = "r_suit"
item_color = "warden"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
- flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
/obj/item/clothing/under/rank/security
@@ -25,7 +24,6 @@
item_state = "r_suit"
item_color = "secred"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
- flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
/obj/item/clothing/under/rank/dispatch
@@ -35,7 +33,6 @@
item_state = "dispatch"
item_color = "dispatch"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS
siemens_coefficient = 0.9
@@ -46,7 +43,6 @@
item_state = "r_suit"
item_color = "redshirt2"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
- flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
/obj/item/clothing/under/rank/security/corp
@@ -66,7 +62,6 @@
item_state = "swatunder"
item_color = "swatunder"
armor = list(melee = 10, bullet = 5, laser = 5,energy = 0, bomb = 0, bio = 0, rad = 0)
- flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
/*
@@ -79,7 +74,6 @@
item_state = "det"
item_color = "detective"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
- flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
/obj/item/clothing/under/det/black
@@ -122,7 +116,6 @@
item_state = "r_suit"
item_color = "hosred"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
- flags = FPRINT | TABLEPASS
siemens_coefficient = 0.8
/obj/item/clothing/under/rank/head_of_security/corp
@@ -134,7 +127,7 @@
name = "Head of Security Hat"
desc = "The hat of the Head of Security. For showing the officers who's in charge."
icon_state = "hoscap"
- flags = FPRINT | TABLEPASS | HEADCOVERSEYES
+ flags = HEADCOVERSEYES
armor = list(melee = 80, bullet = 60, laser = 50,energy = 10, bomb = 25, bio = 10, rad = 0)
flags_inv = HIDEEARS
body_parts_covered = 0
diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm
index 6daa904453..bc4d37c672 100644
--- a/code/modules/clothing/under/miscellaneous.dm
+++ b/code/modules/clothing/under/miscellaneous.dm
@@ -31,7 +31,6 @@
name = "amish suit"
icon_state = "sl_suit"
item_color = "sl_suit"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/waiter
name = "waiter's outfit"
@@ -39,7 +38,6 @@
icon_state = "waiter"
item_state = "waiter"
item_color = "waiter"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/mailman
name = "mailman's jumpsuit"
@@ -63,19 +61,30 @@
item_state = "gy_suit"
item_color = "vice"
-/obj/item/clothing/under/rank/centcom_officer
- desc = "It's a jumpsuit worn by CentCom Officers."
- name = "\improper CentCom officer's jumpsuit"
+
+/obj/item/clothing/under/rank/centcom
+ desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Ensign.\""
+ name = "\improper NanoTrasen Navy Uniform"
icon_state = "officer"
item_state = "g_suit"
item_color = "officer"
+ displays_id = 0
-/obj/item/clothing/under/rank/centcom_commander
- desc = "It's a jumpsuit worn by CentCom's highest-tier Commanders."
- name = "\improper CentCom officer's jumpsuit"
+/obj/item/clothing/under/rank/centcom_officer
+ desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Lieutenant Commander.\""
+ name = "\improper NanoTrasen Officers Uniform"
+ icon_state = "officer"
+ item_state = "g_suit"
+ item_color = "officer"
+ displays_id = 0
+
+/obj/item/clothing/under/rank/centcom_captain
+ desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Captain.\""
+ name = "\improper NanoTrasen Captains Uniform"
icon_state = "centcom"
item_state = "dg_suit"
item_color = "centcom"
+ displays_id = 0
/obj/item/clothing/under/ert
name = "ERT tactical uniform"
@@ -93,7 +102,6 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS //Needs gloves and shoes with cold protection to be fully protected.
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
@@ -106,7 +114,6 @@
desc = "it's a cybernetically enhanced jumpsuit used for administrative duties."
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
- flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
armor = list(melee = 100, bullet = 100, laser = 100,energy = 100, bomb = 100, bio = 100, rad = 100)
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
@@ -118,7 +125,6 @@
desc = "A jumpsuit with owl wings. Photorealistic owl feathers! Twooooo!"
icon_state = "owl"
item_color = "owl"
- flags = FPRINT | TABLEPASS
/obj/item/clothing/under/johnny
name = "johnny~~ jumpsuit"
@@ -400,6 +406,13 @@
item_color = "sundress_white"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
+/obj/item/clothing/under/blackjumpskirt
+ name = "black jumpskirt"
+ desc = "A black jumpskirt, Sol size 0."
+ icon_state = "blackjumpskirt"
+ item_state = "blackjumpskirt"
+ item_color = "blackjumpskirt"
+
/obj/item/clothing/under/captainformal
name = "captain's formal uniform"
desc = "A captain's formal-wear, for special occasions."
@@ -466,9 +479,9 @@
/obj/item/clothing/under/serviceoveralls
name = "Workman outfit"
desc = "The very image of a working man. Not that you're probably doing work."
- icon_state = "mechanic_s"
- item_state = "mechanic_s"
- item_color = "mechanic_s"
+ icon_state = "mechanic"
+ item_state = "mechanic"
+ item_color = "mechanic"
/obj/item/clothing/under/cheongsam
name = "White Cheongsam"
diff --git a/code/modules/clothing/under/shorts.dm b/code/modules/clothing/under/shorts.dm
index 0644af853d..494cb5e72a 100644
--- a/code/modules/clothing/under/shorts.dm
+++ b/code/modules/clothing/under/shorts.dm
@@ -2,7 +2,6 @@
name = "athletic shorts"
desc = "95% Polyester, 5% Spandex!"
gender = PLURAL
- flags = FPRINT | TABLEPASS
body_parts_covered = LOWER_TORSO
/obj/item/clothing/under/shorts/red
diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm
deleted file mode 100644
index b70df2c84b..0000000000
--- a/code/modules/clothing/under/ties.dm
+++ /dev/null
@@ -1,475 +0,0 @@
-/obj/item/clothing/tie
- name = "tie"
- desc = "A neosilk clip-on tie."
- icon = 'icons/obj/clothing/ties.dmi'
- icon_state = "bluetie"
- item_state = "" //no inhands
- item_color = "bluetie"
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_TIE
- w_class = 2.0
- var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
- var/image/inv_overlay = null //overlay used when attached to clothing.
-
-/obj/item/clothing/tie/New()
- ..()
- inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
-
-//when user attached an accessory to S
-/obj/item/clothing/tie/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
- if(!istype(S))
- return
- has_suit = S
- loc = has_suit
- has_suit.overlays += inv_overlay
-
- user << "You attach [src] to [has_suit]."
- src.add_fingerprint(user)
-
-/obj/item/clothing/tie/proc/on_removed(mob/user as mob)
- if(!has_suit)
- return
- has_suit.overlays -= inv_overlay
- has_suit = null
- usr.put_in_hands(src)
- src.add_fingerprint(user)
-
-//default attackby behaviour
-/obj/item/clothing/tie/attackby(obj/item/I, mob/user)
- ..()
-
-//default attack_hand behaviour
-/obj/item/clothing/tie/attack_hand(mob/user as mob)
- if(has_suit)
- has_suit.remove_accessory(user)
- return //we aren't an object on the ground so don't call parent
- ..()
-
-/obj/item/clothing/tie/blue
- name = "blue tie"
- icon_state = "bluetie"
- item_color = "bluetie"
-
-/obj/item/clothing/tie/red
- name = "red tie"
- icon_state = "redtie"
- item_color = "redtie"
-
-/obj/item/clothing/tie/horrible
- name = "horrible tie"
- desc = "A neosilk clip-on tie. This one is disgusting."
- icon_state = "horribletie"
- item_color = "horribletie"
-
-/obj/item/clothing/tie/stethoscope
- name = "stethoscope"
- desc = "An outdated medical apparatus for listening to the sounds of the human body. It also makes you look like you know what you're doing."
- icon_state = "stethoscope"
- item_color = "stethoscope"
-
-/obj/item/clothing/tie/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
- if(ishuman(M) && isliving(user))
- if(user.a_intent == "help")
- var/body_part = parse_zone(user.zone_sel.selecting)
- if(body_part)
- var/their = "their"
- switch(M.gender)
- if(MALE) their = "his"
- if(FEMALE) their = "her"
-
- var/sound = "pulse"
- var/sound_strength
-
- if(M.stat == DEAD || (M.status_flags&FAKEDEATH))
- sound_strength = "cannot hear"
- sound = "anything"
- else
- sound_strength = "hear a weak"
- switch(body_part)
- if("chest")
- if(M.oxyloss < 50)
- sound_strength = "hear a healthy"
- sound = "pulse and respiration"
- if("eyes","mouth")
- sound_strength = "cannot hear"
- sound = "anything"
- else
- sound_strength = "hear a weak"
-
- user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].")
- return
- return ..(M,user)
-
-
-//Medals
-/obj/item/clothing/tie/medal
- name = "bronze medal"
- desc = "A bronze medal."
- icon_state = "bronze"
- item_color = "bronze"
-
-/obj/item/clothing/tie/medal/conduct
- name = "distinguished conduct medal"
- desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew."
-
-/obj/item/clothing/tie/medal/bronze_heart
- name = "bronze heart medal"
- desc = "A bronze heart-shaped medal awarded for sacrifice. It is often awarded posthumously or for severe injury in the line of duty."
- icon_state = "bronze_heart"
-
-/obj/item/clothing/tie/medal/nobel_science
- name = "nobel sciences award"
- desc = "A bronze medal which represents significant contributions to the field of science or engineering."
-
-/obj/item/clothing/tie/medal/silver
- name = "silver medal"
- desc = "A silver medal."
- icon_state = "silver"
- item_color = "silver"
-
-/obj/item/clothing/tie/medal/silver/valor
- name = "medal of valor"
- desc = "A silver medal awarded for acts of exceptional valor."
-
-/obj/item/clothing/tie/medal/silver/security
- name = "robust security award"
- desc = "An award for distinguished combat and sacrifice in defence of Nanotrasen's commercial interests. Often awarded to security staff."
-
-/obj/item/clothing/tie/medal/gold
- name = "gold medal"
- desc = "A prestigious golden medal."
- icon_state = "gold"
- item_color = "gold"
-
-/obj/item/clothing/tie/medal/gold/captain
- name = "medal of captaincy"
- desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew."
-
-/obj/item/clothing/tie/medal/gold/heroism
- name = "medal of exceptional heroism"
- desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
-
-//Armbands
-/obj/item/clothing/tie/armband
- name = "red armband"
- desc = "A fancy red armband!"
- icon_state = "red"
- item_color = "red"
-
-/obj/item/clothing/tie/armband/cargo
- name = "cargo armband"
- desc = "An armband, worn by the crew to display which department they're assigned to. This one is brown."
- icon_state = "cargo"
- item_color = "cargo"
-
-/obj/item/clothing/tie/armband/engine
- name = "engineering armband"
- desc = "An armband, worn by the crew to display which department they're assigned to. This one is orange with a reflective strip!"
- icon_state = "engie"
- item_color = "engie"
-
-/obj/item/clothing/tie/armband/science
- name = "science armband"
- desc = "An armband, worn by the crew to display which department they're assigned to. This one is purple."
- icon_state = "rnd"
- item_color = "rnd"
-
-/obj/item/clothing/tie/armband/hydro
- name = "hydroponics armband"
- desc = "An armband, worn by the crew to display which department they're assigned to. This one is green and blue."
- icon_state = "hydro"
- item_color = "hydro"
-
-/obj/item/clothing/tie/armband/med
- name = "medical armband"
- desc = "An armband, worn by the crew to display which department they're assigned to. This one is white."
- icon_state = "med"
- item_color = "med"
-
-/obj/item/clothing/tie/armband/medgreen
- name = "EMT armband"
- desc = "An armband, worn by the crew to display which department they're assigned to. This one is white and green."
- icon_state = "medgreen"
- item_color = "medgreen"
-
-//holsters
-/obj/item/clothing/tie/holster
- name = "shoulder holster"
- desc = "A handgun holster."
- icon_state = "holster"
- item_color = "holster"
- var/obj/item/weapon/gun/holstered = null
-
-//subtypes can override this to specify what can be holstered
-/obj/item/clothing/tie/holster/proc/can_holster(obj/item/weapon/gun/W)
- return W.isHandgun()
-
-/obj/item/clothing/tie/holster/proc/holster(obj/item/I, mob/user as mob)
- if(holstered)
- user << "\red There is already a [holstered] holstered here!"
- return
-
- if (!istype(I, /obj/item/weapon/gun))
- user << "\red Only guns can be holstered!"
- return
-
- var/obj/item/weapon/gun/W = I
- if (!can_holster(W))
- user << "\red This [W] won't fit in the [src]!"
- return
-
- holstered = W
- user.drop_from_inventory(holstered)
- holstered.loc = src
- holstered.add_fingerprint(user)
- user.visible_message("\blue [user] holsters the [holstered].", "You holster the [holstered].")
-
-/obj/item/clothing/tie/holster/proc/unholster(mob/user as mob)
- if(!holstered)
- return
-
- if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
- user << "\red You need an empty hand to draw the [holstered]!"
- else
- if(user.a_intent == "hurt")
- usr.visible_message("\red [user] draws the [holstered], ready to shoot!", \
- "\red You draw the [holstered], ready to shoot!")
- else
- user.visible_message("\blue [user] draws the [holstered], pointing it at the ground.", \
- "\blue You draw the [holstered], pointing it at the ground.")
- user.put_in_hands(holstered)
- holstered.add_fingerprint(user)
- holstered = null
-
-/obj/item/clothing/tie/holster/attack_hand(mob/user as mob)
- if (has_suit) //if we are part of a suit
- if (holstered)
- unholster(user)
- return
-
- ..(user)
-
-/obj/item/clothing/tie/holster/attackby(obj/item/W as obj, mob/user as mob)
- holster(W, user)
-
-/obj/item/clothing/tie/holster/emp_act(severity)
- if (holstered)
- holstered.emp_act(severity)
- ..()
-
-/obj/item/clothing/tie/holster/examine(mob/user)
- ..(user)
- if (holstered)
- user << "A [holstered] is holstered here."
- else
- user << "It is empty."
-
-/obj/item/clothing/tie/holster/on_attached(obj/item/clothing/under/S, mob/user as mob)
- ..()
- has_suit.verbs += /obj/item/clothing/tie/holster/verb/holster_verb
-
-/obj/item/clothing/tie/holster/on_removed(mob/user as mob)
- has_suit.verbs -= /obj/item/clothing/tie/holster/verb/holster_verb
- ..()
-
-//For the holster hotkey
-/obj/item/clothing/tie/holster/verb/holster_verb()
- set name = "Holster"
- set category = "Object"
- set src in usr
- if(!istype(usr, /mob/living)) return
- if(usr.stat) return
-
- var/obj/item/clothing/tie/holster/H = null
- if (istype(src, /obj/item/clothing/tie/holster))
- H = src
- else if (istype(src, /obj/item/clothing/under))
- var/obj/item/clothing/under/S = src
- if (S.hastie)
- H = S.hastie
-
- if (!H)
- usr << "/red Something is very wrong."
-
- if(!H.holstered)
- if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
- usr << "\blue You need your gun equiped to holster it."
- return
- var/obj/item/weapon/gun/W = usr.get_active_hand()
- H.holster(W, usr)
- else
- H.unholster(usr)
-
-/obj/item/clothing/tie/holster/armpit
- name = "shoulder holster"
- desc = "A worn-out handgun holster. Perfect for concealed carry"
- icon_state = "holster"
- item_color = "holster"
-
-/obj/item/clothing/tie/holster/waist
- name = "shoulder holster"
- desc = "A handgun holster. Made of expensive leather."
- icon_state = "holster"
- item_color = "holster_low"
-
-/obj/item/clothing/tie/storage
- name = "load bearing equipment"
- desc = "Used to hold things when you don't have enough hands."
- icon_state = "webbing"
- item_color = "webbing"
- var/slots = 3
- var/obj/item/weapon/storage/internal/hold
-
-/obj/item/clothing/tie/storage/New()
- ..()
- hold = new/obj/item/weapon/storage/internal(src)
- hold.storage_slots = slots
-
-/obj/item/clothing/tie/storage/attack_hand(mob/user as mob)
- if (has_suit) //if we are part of a suit
- hold.open(user)
- return
-
- if (hold.handle_attack_hand(user)) //otherwise interact as a regular storage item
- ..(user)
-
-/obj/item/clothing/tie/storage/MouseDrop(obj/over_object as obj)
- if (has_suit)
- return
-
- if (hold.handle_mousedrop(usr, over_object))
- ..(over_object)
-
-/obj/item/clothing/tie/storage/attackby(obj/item/W as obj, mob/user as mob)
- return hold.attackby(W, user)
-
-/obj/item/clothing/tie/storage/emp_act(severity)
- hold.emp_act(severity)
- ..()
-
-/obj/item/clothing/tie/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
- hold.hear_talk(M, msg, verb, speaking)
- ..()
-
-/obj/item/clothing/tie/storage/attack_self(mob/user as mob)
- user << "You empty [src]."
- var/turf/T = get_turf(src)
- hold.hide_from(usr)
- for(var/obj/item/I in hold.contents)
- hold.remove_from_storage(I, T)
- src.add_fingerprint(user)
-
-/obj/item/clothing/tie/storage/webbing
- name = "webbing"
- desc = "Strudy mess of synthcotton belts and buckles, ready to share your burden."
- icon_state = "webbing"
- item_color = "webbing"
-
-/obj/item/clothing/tie/storage/black_vest
- name = "black webbing vest"
- desc = "Robust black synthcotton vest with lots of pockets to hold whatever you need, but cannot hold in hands."
- icon_state = "vest_black"
- item_color = "vest_black"
- slots = 5
-
-/obj/item/clothing/tie/storage/brown_vest
- name = "brown webbing vest"
- desc = "Worn brownish synthcotton vest with lots of pockets to unload your hands."
- icon_state = "vest_brown"
- item_color = "vest_brown"
- slots = 5
-/*
- Holobadges are worn on the belt or neck, and can be used to show that the holder is an authorized
- Security agent - the user details can be imprinted on the badge with a Security-access ID card,
- or they can be emagged to accept any ID for use in disguises.
-*/
-
-/obj/item/clothing/tie/holobadge
-
- name = "holobadge"
- desc = "This glowing blue badge marks the holder as THE LAW."
- icon_state = "holobadge"
- item_color = "holobadge"
- slot_flags = SLOT_BELT | SLOT_TIE
-
- var/emagged = 0 //Emagging removes Sec check.
- var/stored_name = null
-
-/obj/item/clothing/tie/holobadge/cord
- icon_state = "holobadge-cord"
- item_color = "holobadge-cord"
- slot_flags = SLOT_MASK | SLOT_TIE
-
-/obj/item/clothing/tie/holobadge/attack_self(mob/user as mob)
- if(!stored_name)
- user << "Waving around a badge before swiping an ID would be pretty pointless."
- return
- if(isliving(user))
- user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.")
-
-/obj/item/clothing/tie/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob)
-
- if (istype(O, /obj/item/weapon/card/emag))
- if (emagged)
- user << "\red [src] is already cracked."
- return
- else
- emagged = 1
- user << "\red You swipe [O] and crack the holobadge security checks."
- return
-
- else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
-
- var/obj/item/weapon/card/id/id_card = null
-
- if(istype(O, /obj/item/weapon/card/id))
- id_card = O
- else
- var/obj/item/device/pda/pda = O
- id_card = pda.id
-
- if(access_security in id_card.access || emagged)
- user << "You imprint your ID details onto the badge."
- stored_name = id_card.registered_name
- name = "holobadge ([stored_name])"
- desc = "This glowing blue badge marks [stored_name] as THE LAW."
- else
- user << "[src] rejects your insufficient access rights."
- return
- ..()
-
-/obj/item/clothing/tie/holobadge/attack(mob/living/carbon/human/M, mob/living/user)
- if(isliving(user))
- user.visible_message("\red [user] invades [M]'s personal space, thrusting [src] into their face insistently.","\red You invade [M]'s personal space, thrusting [src] into their face insistently. You are the law.")
-
-/obj/item/weapon/storage/box/holobadge
- name = "holobadge box"
- desc = "A box claiming to contain holobadges."
- New()
- new /obj/item/clothing/tie/holobadge(src)
- new /obj/item/clothing/tie/holobadge(src)
- new /obj/item/clothing/tie/holobadge(src)
- new /obj/item/clothing/tie/holobadge(src)
- new /obj/item/clothing/tie/holobadge/cord(src)
- new /obj/item/clothing/tie/holobadge/cord(src)
- ..()
- return
-
-/obj/item/clothing/tie/storage/knifeharness
- name = "decorated harness"
- desc = "A heavily decorated harness of sinew and leather with two knife-loops."
- icon_state = "unathiharness2"
- item_color = "unathiharness2"
- slots = 2
-
-/obj/item/clothing/tie/storage/knifeharness/New()
- ..()
- hold.max_combined_w_class = 4
- hold.can_hold = list("/obj/item/weapon/hatchet/unathiknife",\
- "/obj/item/weapon/kitchen/utensil/knife",\
- "/obj/item/weapon/kitchen/utensil/pknife",\
- "/obj/item/weapon/kitchenknife",\
- "/obj/item/weapon/kitchenknife/ritual")
-
- new /obj/item/weapon/hatchet/unathiknife(hold)
- new /obj/item/weapon/hatchet/unathiknife(hold)
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index 5267a80b99..33b25d9fd8 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -114,7 +114,7 @@
/////////////////////// Cataguettes - Lucy's Stethoscope - Lucy Kemmerer //////
-/obj/item/clothing/tie/stethoscope/fluff/lucystethos
+/obj/item/clothing/accessory/stethoscope/fluff/lucystethos
name = "Lucy's Stethoscope"
desc = "A medical apparatus intended to ease in listening to the sounds of the human body. This one looks cleaner and sparklier than the rest. There is a small silver plaque attached to the tubing, with the words 'Lucy Kemmerer' engraved on it."
icon_state = "lucystethos"
@@ -407,7 +407,6 @@
item_state = "ciglit"
w_class = 1
body_parts_covered = null
- flags = FPRINT|TABLEPASS
//Strange penlight, Nerezza: Asher Spock
@@ -787,7 +786,6 @@
name = "colonial marine beret"
desc = "A well-worn navy blue beret. The insignia of the Martian Colonial Marine Corps is affixed to the front."
icon_state = "officerberet"
- flags = FPRINT | TABLEPASS
////////////////////////////// Serithi - Adapted Security Helmet //////////////////////////////
@@ -841,7 +839,6 @@
/obj/item/weapon/reagent_containers/glass/bottle/fluff/nashi_bottle
icon = 'icons/obj/chemical.dmi'
- flags = FPRINT | TABLEPASS //Starting them with lids on them. Safety first!
New(loc, var/color, var/labeled)
..()
name = "[labeled] bottle"
@@ -1073,7 +1070,6 @@
item_color = "jane_sid_suit"
has_sensor = 2
sensor_mode = 3
- flags = FPRINT | TABLEPASS
//Suit roll-down toggle.
/obj/item/clothing/under/fluff/jane_sidsuit/verb/toggle_zipper()
@@ -1115,29 +1111,39 @@
item_color = "lillian_dress"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
-////// Cybernetic Casings - Parker Eliza - MrSnapwalk
+////// Tailored Security Uniform - Parker Eliza - MrSnapwalk
+
/obj/item/clothing/under/fluff/parkereliza
- name = "cybernetic casings"
- desc = "A set of somewhat bulky white casings for robotic limbs, paired with a basic blue tank top and black cargo pants. The arms have a small label on the inner elbow, which reads \"Bishop Corporation Cybernetic Solutions\"."
+ name = "tailored security uniform"
+ desc = "A red uniform shirt (tailored for easy access to the shoulder joint) and black cargo pants, paired with a set of somewhat bulky white casings for robotic limbs. The arms have a small label on the inner elbow, which reads \"Bishop Corporation Cybernetic Solutions\"."
icon = 'icons/obj/custom_items.dmi'
icon_state = "parker_eliza"
item_state = "parker_eliza"
item_color = "parker_eliza"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
+////// Bishop "GOLEM" V2200 Industrial Limb Augments - Parker Eliza - MrSnapwalk
+
+/obj/item/clothing/suit/fluff/parkereliza
+ name = "Bishop \"GOLEM\" V2200 Industrial Limb Augments"
+ desc = "A set of top-of-the-line cyberlimbs, only usable to someone with extensive bone structure augmentation. Often used in industrial applications, they are capable of throwing a man clear across a room. The load limitation circuit in this set appears to be modified."
+ icon = 'icons/obj/custom_items.dmi'
+ icon_state = "parker_eliza_arms"
+ item_state = "parker_eliza_arms"
+ item_color = "parker_eliza_arms"
+
////////////// Accessories /////
//////////////////// Blood Red Pendant - Mewth - Mu'taz Radi ////////////////
-/obj/item/clothing/tie/fluff/radi
+/obj/item/clothing/accessory/fluff/radi
name = "Blood Red Pendant"
desc = "A blue chained necklace with a ruby in the middle, it looks pretty!"
icon = 'icons/obj/custom_items.dmi'
icon_state = "radi_pendant"
item_state = "radi_pendant"
item_color = "radi_pendant"
- flags = FPRINT|TABLEPASS
w_class = 2.0
//////////// Masks ////////////
@@ -1149,7 +1155,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "flagmask"
item_state = "flagmask"
- flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
+ flags = MASKCOVERSMOUTH
w_class = 2
gas_transfer_coefficient = 0.90
*/
@@ -1159,7 +1165,6 @@
desc = "A silver and emerald shamrock pendant. It has the initials \"M.K.\" engraved on the back."
icon = 'icons/obj/custom_items.dmi'
icon_state = "mara_kilpatrick_1"
- flags = FPRINT|TABLEPASS
w_class = 2
/////////////// Oen'g Issek Medical Mask //////////////////////////
@@ -1174,7 +1179,7 @@
////// Small locket - Altair An-Nasaqan - Serithi
-/obj/item/clothing/tie/fluff/altair_locket
+/obj/item/clothing/accessory/fluff/altair_locket
name = "small locket"
desc = "A small golden locket attached to an Ii'rka-reed string. Inside the locket is a holo-picture of a female Tajaran, and an inscription writtin in Siik'mas."
icon = 'icons/obj/custom_items.dmi'
@@ -1182,13 +1187,12 @@
item_state = "altair_locket"
item_color = "altair_locket"
slot_flags = 0
- flags = FPRINT|TABLEPASS
w_class = 2
slot_flags = SLOT_MASK | SLOT_TIE
////// Silver locket - Konaa Hirano - Konaa_Hirano
-/obj/item/clothing/tie/fluff/konaa_hirano
+/obj/item/clothing/accessory/fluff/konaa_hirano
name = "silver locket"
desc = "This oval shaped, argentium sterling silver locket hangs on an incredibly fine, refractive string, almost thin as hair and microweaved from links to a deceptive strength, of similar material. The edges are engraved very delicately with an elegant curving design, but overall the main is unmarked and smooth to the touch, leaving room for either remaining as a stolid piece or future alterations. There is an obvious internal place for a picture or lock of some sort, but even behind that is a very thin compartment unhinged with the pinch of a thumb and forefinger."
icon = 'icons/obj/custom_items.dmi'
@@ -1196,18 +1200,17 @@
item_state = "konaahirano"
item_color = "konaahirano"
slot_flags = 0
- flags = FPRINT|TABLEPASS
w_class = 2
slot_flags = SLOT_MASK | SLOT_TIE
var/obj/item/held //Item inside locket.
-/obj/item/clothing/tie/fluff/konaa_hirano/attack_self(mob/user as mob)
+/obj/item/clothing/accessory/fluff/konaa_hirano/attack_self(mob/user as mob)
if(held)
user << "You open [src] and [held] falls out."
held.loc = get_turf(user)
src.held = null
-/obj/item/clothing/tie/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob)
+/obj/item/clothing/accessory/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob)
if(istype(O,/obj/item/weapon/paper))
if(held)
usr << "[src] already has something inside it."
@@ -1221,12 +1224,11 @@
////// Medallion - Nasir Khayyam - Jamini
-/obj/item/clothing/tie/fluff/nasir_khayyam_1
+/obj/item/clothing/accessory/fluff/nasir_khayyam_1
name = "medallion"
desc = "This silvered medallion bears the symbol of the Hadii Clan of the Tajaran."
icon = 'icons/obj/custom_items.dmi'
icon_state = "nasir_khayyam_1"
- flags = FPRINT|TABLEPASS
w_class = 2
slot_flags = SLOT_MASK | SLOT_TIE
@@ -1237,7 +1239,6 @@
desc = "A brass necklace with a green emerald placed at the end. It has a small inscription on the top of the chain, saying \'Foster\'"
icon = 'icons/obj/custom_items.dmi'
icon_state = "ty_foster"
- flags = FPRINT|TABLEPASS
w_class = 2
////// Apollon Pendant - Michael Guess - Dragor23
@@ -1246,7 +1247,6 @@
desc = "A pendant with the form of a sacrificial tripod, used in acient greece. It's a symbol of the Olympian Apollon, a god associated with oracles, poetry, the sun and healing."
icon = 'icons/obj/custom_items.dmi'
icon_state = "michael_guess_1"
- flags = FPRINT|TABLEPASS
w_class = 2
slot_flags = SLOT_MASK
body_parts_covered = 0
@@ -1435,12 +1435,12 @@
icon_living = "cat3"
icon_dead = "cat3_dead"
holder_type = /obj/item/weapon/holder/cat/fluff/bones
- var/bff_name = "Erstatz Vryroxes"
+ var/friend_name = "Erstatz Vryroxes"
/mob/living/simple_animal/cat/fluff/bones/handle_movement_target()
- if (!bff)
+ if (!friend)
for (var/mob/living/carbon/human/M in player_list)
- if (M.real_name == bff_name)
- bff = M
+ if (M.real_name == friend_name)
+ friend = M
break
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/detectivework/evidence.dm b/code/modules/detectivework/evidence.dm
index db66c42521..f115d9f9a9 100644
--- a/code/modules/detectivework/evidence.dm
+++ b/code/modules/detectivework/evidence.dm
@@ -122,6 +122,18 @@
throw_speed = 3
throw_range = 5
+/obj/item/weapon/f_card/add_fingerprint(mob/living/M as mob, ignoregloves = 0)
+ if(..())
+ var/mob/living/carbon/human/H = M
+ var/full_print = md5(H.dna.uni_identity)
+ fingerprints[full_print] = full_print
+
+/obj/item/weapon/f_card/examine(mob/user)
+ ..()
+ if(fingerprints.len)
+ user << "Fingerprints on this card:"
+ for(var/print in fingerprints)
+ user << "\t[fingerprints[print]]"
/obj/item/weapon/fcardholder
name = "fingerprint card case"
diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm
index 70c4dbca45..59b97ebb7c 100644
--- a/code/modules/detectivework/footprints_and_rag.dm
+++ b/code/modules/detectivework/footprints_and_rag.dm
@@ -23,7 +23,7 @@
possible_transfer_amounts = list(5)
volume = 5
can_be_placed_into = null
- flags = FPRINT | TABLEPASS | OPENCONTAINER | NOBLUDGEON
+ flags = OPENCONTAINER | NOBLUDGEON
/obj/item/weapon/reagent_containers/glass/rag/attack_self(mob/user as mob)
return
diff --git a/code/modules/detectivework/forensics.dm b/code/modules/detectivework/forensics.dm
index 2610a5c24a..bca3090c3f 100644
--- a/code/modules/detectivework/forensics.dm
+++ b/code/modules/detectivework/forensics.dm
@@ -70,4 +70,12 @@ atom/proc/add_fibers(mob/living/carbon/human/M)
fields["blood"] = blood
fields["area"] = other.fields["area"]
- fields["time"] = other.fields["time"]
\ No newline at end of file
+ fields["time"] = other.fields["time"]
+
+/datum/data/record/forensic/proc/update_prints(var/list/o_prints)
+ var/list/prints = fields["fprints"]
+ for(var/print in o_prints)
+ if(prints[print])
+ prints[print] = stringmerge(prints[print], o_prints[print])
+ .=1
+ fields["fprints"] = prints
diff --git a/code/modules/detectivework/scanner.dm b/code/modules/detectivework/scanner.dm
index 3916c799c8..878a54fd60 100644
--- a/code/modules/detectivework/scanner.dm
+++ b/code/modules/detectivework/scanner.dm
@@ -5,7 +5,7 @@
var/list/stored = list()
w_class = 3.0
item_state = "electronic"
- flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON
+ flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
/obj/item/device/detective_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob)
@@ -104,4 +104,12 @@
if(old)
fresh.merge(old)
. = 1
- stored["\ref [A]"] = fresh
\ No newline at end of file
+ stored["\ref [A]"] = fresh
+
+/obj/item/device/detective_scanner/verb/wipe()
+ set name = "Wipe Forensic Data"
+ set category = "Object"
+ set src in view(1)
+ if (alert("Are you sure you want to wipe all data from [src]?",,"Yes","No") == "Yes")
+ stored = list()
+ usr << "Forensic data erase complete."
diff --git a/code/modules/detectivework/scanning_console.dm b/code/modules/detectivework/scanning_console.dm
index 9e32c58390..5ff719548c 100644
--- a/code/modules/detectivework/scanning_console.dm
+++ b/code/modules/detectivework/scanning_console.dm
@@ -59,17 +59,23 @@
fresh.fields["label"] = old.fields["label"]
files[fresh.uid] = fresh
+ //updating partial prints on other things
+ var/list/fprints = fresh.fields["fprints"]
+ if(fprints.len)
+ for(var/id in files)
+ var/datum/data/record/forensic/rec = files[id]
+ if(rec.update_prints(fprints))
+ files[id] = rec
+
/obj/machinery/computer/forensic_scanning/proc/process_card(var/obj/item/weapon/f_card/card)
if(card.fingerprints)
usr << "\The [src] sucks in \the [card] and whirrs, scanning it."
var/found = 0
for(var/id in files)
var/datum/data/record/forensic/rec = files[id]
- var/list/prints = rec.fields["fprints"]
- for(var/master_print in card.fingerprints)
- if(prints[master_print])
- prints[master_print] = master_print
- found = 1
+ found = rec.update_prints(card.fingerprints)
+ if (found)
+ files[id] = rec
if(found)
usr << "Complete match found."
else
@@ -189,7 +195,7 @@
dat += "
NO RECORD SELECTED"
else
dat += get_printable_data(current)
- dat += "Labels: "
+ dat += "
Labels: "
dat += "[current.fields["label"] ? current.fields["label"] : "None"]
"
dat += "Print record
"
@@ -302,4 +308,4 @@
ping("Scan complete.")
var/datum/data/record/forensic/fresh = new(scanning)
add_record(fresh)
- updateUsrDialog()
\ No newline at end of file
+ updateUsrDialog()
diff --git a/code/modules/destilery/main.dm b/code/modules/distillery/main.dm
similarity index 65%
rename from code/modules/destilery/main.dm
rename to code/modules/distillery/main.dm
index e6944724aa..049548a782 100644
--- a/code/modules/destilery/main.dm
+++ b/code/modules/distillery/main.dm
@@ -1,63 +1,60 @@
-//This dm file includes some food processing machines:
+// This dreammaker file includes the food processing machines:
// - I. Mill
// - II. Fermenter
// - III. Still
// - IV. Squeezer
// - V. Centrifuge
-
-
// I. The mill is intended to be loaded with produce and returns ground up items. For example: Wheat should become flour and grapes should become raisins.
-
/obj/machinery/mill
- var/list/obj/item/weapon/reagent_containers/food/input = list()
+ var/list/obj/item/weapon/reagent_containers/food/input = list()
var/list/obj/item/weapon/reagent_containers/food/output = list()
var/obj/item/weapon/reagent_containers/food/milled_item
- var/busy = 0
+ var/busy = 0
var/progress = 0
- var/error = 0
+ var/error = 0
name = "\improper Mill"
desc = "It is a machine that grinds produce."
icon_state = "autolathe"
- density = 1
- anchored = 1
+ density = 1
+ anchored = 1
use_power = 1
- idle_power_usage = 10
+ idle_power_usage = 10
active_power_usage = 1000
/obj/machinery/mill/process()
- if(error)
+ if (error)
return
-
- if(!busy)
+
+ if (!busy)
use_power = 1
- if(input.len)
+ if (input.len)
milled_item = input[1]
input -= milled_item
progress = 0
busy = 1
use_power = 2
return
-
+
progress++
- if(progress < 10) //Edit this value to make milling faster or slower
- return //Not done yet.
-
- switch(milled_item.type)
- if(/obj/item/weapon/reagent_containers/food/snacks/grown/wheat) //Wheat becomes flour
+ if (progress < 10) // Edit this value to make milling faster or slower.
+ return // Not done yet.
+
+ switch (milled_item.type)
+ if (/obj/item/weapon/reagent_containers/food/snacks/grown/wheat) // Wheat becomes flour.
var/obj/item/weapon/reagent_containers/food/snacks/flour/F = new(src)
output += F
- if(/obj/item/weapon/reagent_containers/food/snacks/flour) //Flour is still flour
+ if (/obj/item/weapon/reagent_containers/food/snacks/flour) // Flour is still flour.
var/obj/item/weapon/reagent_containers/food/snacks/flour/F = new(src)
output += F
else
error = 1
-
+
del(milled_item)
busy = 0
/obj/machinery/mill/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
- if(istype(W,/obj/item/weapon/reagent_containers/food))
+ if (istype(W,/obj/item/weapon/reagent_containers/food))
user.u_equip(W)
W.loc = src
input += W
@@ -65,17 +62,11 @@
..()
/obj/machinery/mill/attack_hand(var/mob/user as mob)
- for(var/obj/item/weapon/reagent_containers/food/F in output)
+ for (var/obj/item/weapon/reagent_containers/food/F in output)
F.loc = src.loc
output -= F
-
-
-
-
-
// II. The fermenter is intended to be loaded with food items and returns medium-strength alcohol items, sucha s wine and beer.
-
/obj/machinery/fermenter
var/list/obj/item/weapon/reagent_containers/food/input = list()
var/list/obj/item/weapon/reagent_containers/food/output = list()
@@ -94,40 +85,40 @@
active_power_usage = 500
/obj/machinery/fermenter/process()
- if(error)
+ if (error)
return
-
- if(!busy)
+
+ if (!busy)
use_power = 1
- if(input.len)
+ if (input.len)
fermenting_item = input[1]
input -= fermenting_item
progress = 0
busy = 1
use_power = 2
return
-
- if(!water_level)
+
+ if (!water_level)
return
-
+
water_level--
-
+
progress++
- if(progress < 10) //Edit this value to make milling faster or slower
- return //Not done yet.
-
- switch(fermenting_item.type)
- if(/obj/item/weapon/reagent_containers/food/snacks/flour) //Flour is still flour
+ if (progress < 10) // Edit this value to make milling faster or slower.
+ return // Not done yet.
+
+ switch (fermenting_item.type)
+ if (/obj/item/weapon/reagent_containers/food/snacks/flour) // Flour is still flour.
var/obj/item/weapon/reagent_containers/food/drinks/cans/beer/B = new(src)
output += B
else
error = 1
-
+
del(fermenting_item)
busy = 0
/obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
- if(istype(W,/obj/item/weapon/reagent_containers/food))
+ if (istype(W,/obj/item/weapon/reagent_containers/food))
user.u_equip(W)
W.loc = src
input += W
@@ -135,60 +126,57 @@
..()
/obj/machinery/fermenter/attack_hand(var/mob/user as mob)
- for(var/obj/item/weapon/reagent_containers/food/F in output)
+ for (var/obj/item/weapon/reagent_containers/food/F in output)
F.loc = src.loc
output -= F
-
-
// III. The still is a machine that is loaded with food items and returns hard liquor, such as vodka.
-
/obj/machinery/still
- var/list/obj/item/weapon/reagent_containers/food/input = list()
+ var/list/obj/item/weapon/reagent_containers/food/input = list()
var/list/obj/item/weapon/reagent_containers/food/output = list()
- var/obj/item/weapon/reagent_containers/food/destilling_item
- var/busy = 0
+ var/obj/item/weapon/reagent_containers/food/distilling_item
+ var/busy = 0
var/progress = 0
- var/error = 0
+ var/error = 0
name = "\improper Still"
desc = "It is a machine that produces hard liquor from alcoholic drinks."
icon_state = "autolathe"
- density = 1
- anchored = 1
+ density = 1
+ anchored = 1
use_power = 1
idle_power_usage = 10
active_power_usage = 10000
/obj/machinery/still/process()
- if(error)
+ if (error)
return
-
- if(!busy)
+
+ if (!busy)
use_power = 1
- if(input.len)
- destilling_item = input[1]
- input -= destilling_item
+ if (input.len)
+ distilling_item = input[1]
+ input -= distilling_item
progress = 0
busy = 1
use_power = 2
return
-
+
progress++
- if(progress < 10) //Edit this value to make distilling faster or slower
- return //Not done yet.
-
- switch(destilling_item.type)
- if(/obj/item/weapon/reagent_containers/food/drinks/cans/beer) //Flour is still flour
+ if (progress < 10) // Edit this value to make distilling faster or slower.
+ return // Not done yet.
+
+ switch (distilling_item.type)
+ if (/obj/item/weapon/reagent_containers/food/drinks/cans/beer) // Flour is still flour.
var/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/V = new(src)
output += V
else
error = 1
-
- del(destilling_item)
+
+ del(distilling_item)
busy = 0
/obj/machinery/still/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
- if(istype(W,/obj/item/weapon/reagent_containers/food))
+ if (istype(W,/obj/item/weapon/reagent_containers/food))
user.u_equip(W)
W.loc = src
input += W
@@ -196,84 +184,75 @@
..()
/obj/machinery/still/attack_hand(var/mob/user as mob)
- for(var/obj/item/weapon/reagent_containers/food/F in output)
+ for (var/obj/item/weapon/reagent_containers/food/F in output)
F.loc = src.loc
output -= F
-
-
-
// IV. The squeezer is intended to destroy inserted food items, but return some of the reagents they contain.
-
/obj/machinery/squeezer
var/list/obj/item/weapon/reagent_containers/food/input = list()
var/obj/item/weapon/reagent_containers/food/squeezed_item
var/water_level = 0
- var/busy = 0
- var/progress = 0
- var/error = 0
+ var/busy = 0
+ var/progress = 0
+ var/error = 0
name = "\improper Squeezer"
desc = "It is a machine that squeezes extracts from produce."
icon_state = "autolathe"
- density = 1
- anchored = 1
+ density = 1
+ anchored = 1
use_power = 1
- idle_power_usage = 10
+ idle_power_usage = 10
active_power_usage = 500
-
-
-
-
// V. The centrifuge spins inserted food items. It is intended to squeeze out the reagents that are common food catalysts (enzymes currently)
-
/obj/machinery/centrifuge
var/list/obj/item/weapon/reagent_containers/food/input = list()
var/list/obj/item/weapon/reagent_containers/food/output = list()
var/obj/item/weapon/reagent_containers/food/spinning_item
- var/busy = 0
+ var/busy = 0
var/progress = 0
- var/error = 0
- var/enzymes = 0
- var/water = 0
+ var/error = 0
+ var/enzymes = 0
+ var/water = 0
name = "\improper Centrifuge"
desc = "It is a machine that spins produce."
icon_state = "autolathe"
- density = 1
- anchored = 1
+ density = 1
+ anchored = 1
use_power = 1
- idle_power_usage = 10
+ idle_power_usage = 10
active_power_usage = 10000
/obj/machinery/centrifuge/process()
- if(error)
+ if (error)
return
-
- if(!busy)
+
+ if (!busy)
use_power = 1
- if(input.len)
+ if (input.len)
spinning_item = input[1]
input -= spinning_item
progress = 0
busy = 1
use_power = 2
return
-
+
progress++
- if(progress < 10) //Edit this value to make milling faster or slower
- return //Not done yet.
-
+ if (progress < 10) // Edit this value to make milling faster or slower.
+ return // Not done yet.
+
var/transfer_enzymes = spinning_item.reagents.get_reagent_amount("enzyme")
-
- if(transfer_enzymes)
+
+ if (transfer_enzymes)
enzymes += transfer_enzymes
spinning_item.reagents.remove_reagent("enzyme",transfer_enzymes)
-
+
output += spinning_item
busy = 0
/obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
- if(istype(W,/obj/item/weapon/reagent_containers/food))
+ if (istype(W,/obj/item/weapon/reagent_containers/food))
user.u_equip(W)
W.loc = src
input += W
@@ -281,10 +260,9 @@
..()
/obj/machinery/centrifuge/attack_hand(var/mob/user as mob)
- for(var/obj/item/weapon/reagent_containers/food/F in output)
+ for (var/obj/item/weapon/reagent_containers/food/F in output)
F.loc = src.loc
output -= F
- while(enzymes >= 50)
+ while (enzymes >= 50)
enzymes -= 50
new/obj/item/weapon/reagent_containers/food/condiment/enzyme(src.loc)
-
diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm
index c531b139cc..806e9a331e 100644
--- a/code/modules/events/event_manager.dm
+++ b/code/modules/events/event_manager.dm
@@ -195,12 +195,12 @@
admin_log_and_message_admins("has [report_at_round_end ? "enabled" : "disabled"] the round end event report.")
else if(href_list["dec_timer"])
var/datum/event_container/EC = locate(href_list["event"])
- var/decrease = (60 * RaiseToPower(10, text2num(href_list["dec_timer"])))
+ var/decrease = 60 * (10 ** text2num(href_list["dec_timer"]))
EC.next_event_time -= decrease
admin_log_and_message_admins("decreased timer for [severity_to_string[EC.severity]] events by [decrease/600] minute(s).")
else if(href_list["inc_timer"])
var/datum/event_container/EC = locate(href_list["event"])
- var/increase = (60 * RaiseToPower(10, text2num(href_list["inc_timer"])))
+ var/increase = 60 * (10 ** text2num(href_list["inc_timer"]))
EC.next_event_time += increase
admin_log_and_message_admins("increased timer for [severity_to_string[EC.severity]] events by [increase/600] minute(s).")
else if(href_list["select_event"])
diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm
index d587c51269..09b1b83ef9 100644
--- a/code/modules/events/infestation.dm
+++ b/code/modules/events/infestation.dm
@@ -31,7 +31,7 @@
spawn_area_type = /area/crew_quarters/kitchen
locstring = "the kitchen"
if(LOC_ATMOS)
- spawn_area_type = /area/atmos
+ spawn_area_type = /area/engineering/atmos
locstring = "atmospherics"
if(LOC_INCIN)
spawn_area_type = /area/maintenance/incinerator
diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm
index 87617d95ce..b9b9c5888b 100644
--- a/code/modules/food/recipes_microwave.dm
+++ b/code/modules/food/recipes_microwave.dm
@@ -180,11 +180,7 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
- being_cooked.warm = 1
- being_cooked.reagents.add_reagent("tricordrazine", 5)
- being_cooked.bitesize = 6
- being_cooked.name = "Warm " + being_cooked.name
- being_cooked.cooltime()
+ being_cooked.heat()
make_food(var/obj/container as obj)
var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked = ..(container)
warm_up(being_cooked)
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm
similarity index 56%
rename from code/game/machinery/computer/HolodeckControl.dm
rename to code/modules/holodeck/HolodeckControl.dm
index abcdb51a51..9431c4685f 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/modules/holodeck/HolodeckControl.dm
@@ -10,6 +10,7 @@ var/global/list/holodeck_programs = list(
"snowfield" = /area/holodeck/source_snowfield, \
"theatre" = /area/holodeck/source_theatre, \
"meetinghall" = /area/holodeck/source_meetinghall, \
+ "courtroom" = /area/holodeck/source_courtroom, \
"burntest" = /area/holodeck/source_burntest, \
"wildlifecarp" = /area/holodeck/source_wildlife, \
"turnoff" = /area/holodeck/source_plating \
@@ -33,18 +34,20 @@ var/global/list/holodeck_programs = list(
var/safety_disabled = 0
var/mob/last_to_emag = null
var/last_change = 0
+ var/last_gravity_change = 0
var/list/supported_programs = list( \
"Empty Court" = "emptycourt", \
- "Boxing Court"="boxingcourt", \
"Basketball Court" = "basketball", \
"Thunderdome Court" = "thunderdomecourt", \
+ "Boxing Ring"="boxingcourt", \
"Beach" = "beach", \
"Desert" = "desert", \
"Space" = "space", \
"Picnic Area" = "picnicarea", \
"Snow Field" = "snowfield", \
"Theatre" = "theatre", \
- "Meeting Hall" = "meetinghall" \
+ "Meeting Hall" = "meetinghall", \
+ "Courtroom" = "courtroom" \
)
var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "Wildlife Simulation" = "wildlifecarp")
@@ -61,11 +64,16 @@ var/global/list/holodeck_programs = list(
dat += "Holodeck Control System
"
dat += "
Current Loaded Programs:
"
for(var/prog in supported_programs)
- dat += "(([prog]))
"
+ dat += "([prog])
"
+ dat += "
"
+ dat += "(Turn Off)
"
+
+ dat += "
"
dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.
"
if(issilicon(user))
+ dat += "
"
if(safety_disabled)
if (emagged)
dat += "ERROR: Cannot re-enable Safety Protocols.
"
@@ -74,6 +82,8 @@ var/global/list/holodeck_programs = list(
else
dat += "(Override Safety Protocols?)
"
+ dat += "
"
+
if(safety_disabled)
for(var/prog in restricted_programs)
dat += "(Begin [prog])
"
@@ -83,6 +93,11 @@ var/global/list/holodeck_programs = list(
else
dat += "Safety Protocols are ENABLED
"
+ if(linkedholodeck.has_gravity)
+ dat += "Gravity is (ON)
"
+ else
+ dat += "Gravity is (OFF)
"
+
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
@@ -118,6 +133,9 @@ var/global/list/holodeck_programs = list(
message_admins("[key_name_admin(usr)] restored the holodeck's safeties")
log_game("[key_name(usr)] restored the holodeck's safeties")
+ else if(href_list["gravity"])
+ toggleGravity(linkedholodeck)
+
src.add_fingerprint(usr)
src.updateUsrDialog()
return
@@ -272,6 +290,9 @@ var/global/list/holodeck_programs = list(
else
for(var/item in holographic_items)
derez(item)
+ if(!linkedholodeck.has_gravity)
+ linkedholodeck.gravitychange(1,linkedholodeck)
+
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
@@ -325,6 +346,24 @@ var/global/list/holodeck_programs = list(
update_projections()
+/obj/machinery/computer/HolodeckControl/proc/toggleGravity(var/area/A)
+ if(world.time < (last_gravity_change + 25))
+ if(world.time < (last_gravity_change + 15))//To prevent super-spam clicking
+ return
+ for(var/mob/M in range(3,src))
+ M.show_message("\b ERROR. Recalibrating gravity field.")
+ last_change = world.time
+ return
+
+ last_gravity_change = world.time
+ active = 1
+ use_power = 1
+
+ if(A.has_gravity)
+ A.gravitychange(0,A)
+ else
+ A.gravitychange(1,A)
+
/obj/machinery/computer/HolodeckControl/proc/emergencyShutdown()
//Get rid of any items
for(var/item in holographic_items)
@@ -337,339 +376,10 @@ var/global/list/holodeck_programs = list(
if(target)
loadProgram(target)
+ if(!linkedholodeck.has_gravity)
+ linkedholodeck.gravitychange(1,linkedholodeck)
+
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
- use_power = 1
-
-
-
-
-
-
-
-// Holographic Items!
-
-/turf/simulated/floor/holofloor/
- thermal_conductivity = 0
-
-/turf/simulated/floor/holofloor/grass
- name = "Lush Grass"
- icon_state = "grass1"
- floor_type = /obj/item/stack/tile/grass
-
- New()
- icon_state = "grass[pick("1","2","3","4")]"
- ..()
- spawn(4)
- update_icon()
- for(var/direction in cardinal)
- if(istype(get_step(src,direction),/turf/simulated/floor))
- var/turf/simulated/floor/FF = get_step(src,direction)
- FF.update_icon() //so siding get updated properly
-
-/turf/simulated/floor/holofloor/desert
- name = "desert sand"
- desc = "Uncomfortably gritty for a hologram."
- icon_state = "asteroid"
-
-/turf/simulated/floor/holofloor/desert/New()
- ..()
- if(prob(10))
- overlays += "asteroid[rand(0,9)]"
-
-/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob)
- return
- // HOLOFLOOR DOES NOT GIVE A FUCK
-
-/obj/structure/table/holotable
- name = "table"
- desc = "A square piece of metal standing on four metal legs. It can not move."
- icon = 'icons/obj/structures.dmi'
- icon_state = "table"
- density = 1
- anchored = 1.0
- layer = 2.8
- throwpass = 1 //You can throw objects over this, despite it's density.
-
-/obj/structure/table/holotable/attack_hand(mob/user as mob)
- return // HOLOTABLE DOES NOT GIVE A FUCK
-
-
-/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/wrench))
- user << "It's a holotable! There are no bolts!"
- return
-
- if(isrobot(user))
- return
-
- ..()
-
-/obj/structure/table/holotable/wood
- name = "table"
- desc = "A square piece of wood standing on four wooden legs. It can not move."
- icon = 'icons/obj/structures.dmi'
- icon_state = "wood_table"
-
-/obj/structure/holostool
- name = "stool"
- desc = "Apply butt."
- icon = 'icons/obj/objects.dmi'
- icon_state = "stool"
- anchored = 1.0
- flags = FPRINT
- pressure_resistance = 15
-
-
-/obj/item/clothing/gloves/boxing/hologlove
- name = "boxing gloves"
- desc = "Because you really needed another excuse to punch your crewmates."
- icon_state = "boxing"
- item_state = "boxing"
-
-/obj/structure/holowindow
- name = "reinforced window"
- icon = 'icons/obj/structures.dmi'
- icon_state = "rwindow"
- desc = "A window."
- density = 1
- layer = 3.2//Just above doors
- pressure_resistance = 4*ONE_ATMOSPHERE
- anchored = 1.0
- flags = ON_BORDER
-
-
-/obj/structure/holowindow/Del()
- ..()
-
-/obj/item/weapon/holo
- damtype = HALLOSS
-
-/obj/item/weapon/holo/esword
- desc = "May the force be within you. Sorta."
- icon_state = "sword0"
- force = 3.0
- throw_speed = 1
- throw_range = 5
- throwforce = 0
- w_class = 2.0
- flags = FPRINT | TABLEPASS | NOSHIELD | NOBLOODY
- var/active = 0
-
-/obj/item/weapon/holo/esword/green
- New()
- item_color = "green"
-
-/obj/item/weapon/holo/esword/red
- New()
- item_color = "red"
-
-/obj/item/weapon/holo/esword/IsShield()
- if(active)
- return 1
- return 0
-
-/obj/item/weapon/holo/esword/attack(target as mob, mob/user as mob)
- ..()
-
-/obj/item/weapon/holo/esword/New()
- item_color = pick("red","blue","green","purple")
-
-/obj/item/weapon/holo/esword/attack_self(mob/living/user as mob)
- active = !active
- if (active)
- force = 30
- icon_state = "sword[item_color]"
- w_class = 4
- playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
- user << "[src] is now active."
- else
- force = 3
- icon_state = "sword0"
- w_class = 2
- playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
- user << "[src] can now be concealed."
-
- if(istype(user,/mob/living/carbon/human))
- var/mob/living/carbon/human/H = user
- H.update_inv_l_hand()
- H.update_inv_r_hand()
-
- add_fingerprint(user)
- return
-
-//BASKETBALL OBJECTS
-
-/obj/item/weapon/beach_ball/holoball
- icon = 'icons/obj/basketball.dmi'
- icon_state = "basketball"
- name = "basketball"
- item_state = "basketball"
- desc = "Here's your chance, do your dance at the Space Jam."
- w_class = 4 //Stops people from hiding it in their bags/pockets
-
-/obj/structure/holohoop
- name = "basketball hoop"
- desc = "Boom, Shakalaka!"
- icon = 'icons/obj/basketball.dmi'
- icon_state = "hoop"
- anchored = 1
- density = 1
- throwpass = 1
-
-/obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
- var/obj/item/weapon/grab/G = W
- if(G.state<2)
- user << "You need a better grip to do that!"
- return
- G.affecting.loc = src.loc
- G.affecting.Weaken(5)
- visible_message("[G.assailant] dunks [G.affecting] into the [src]!", 3)
- del(W)
- return
- else if (istype(W, /obj/item) && get_dist(src,user)<2)
- user.drop_item(src)
- visible_message("[user] dunks [W] into the [src]!", 3)
- return
-
-/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
- if (istype(mover,/obj/item) && mover.throwing)
- var/obj/item/I = mover
- if(istype(I, /obj/item/projectile))
- return
- if(prob(50))
- I.loc = src.loc
- visible_message("Swish! \the [I] lands in \the [src].", 3)
- else
- visible_message("\The [I] bounces off of \the [src]'s rim!", 3)
- return 0
- else
- return ..(mover, target, height, air_group)
-
-
-/obj/machinery/readybutton
- name = "Ready Declaration Device"
- desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!"
- icon = 'icons/obj/monitors.dmi'
- icon_state = "auth_off"
- var/ready = 0
- var/area/currentarea = null
- var/eventstarted = 0
-
- anchored = 1.0
- use_power = 1
- idle_power_usage = 2
- active_power_usage = 6
- power_channel = ENVIRON
-
-/obj/machinery/readybutton/attack_ai(mob/user as mob)
- user << "The station AI is not to interact with these devices!"
- return
-
-/obj/machinery/readybutton/New()
- ..()
-
-
-/obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob)
- user << "The device is a solid button, there's nothing you can do with it!"
-
-/obj/machinery/readybutton/attack_hand(mob/user as mob)
-
- if(user.stat || stat & (NOPOWER|BROKEN))
- user << "This device is not powered."
- return
-
- if(!user.IsAdvancedToolUser())
- return 0
-
- currentarea = get_area(src.loc)
- if(!currentarea)
- del(src)
-
- if(eventstarted)
- usr << "The event has already begun!"
- return
-
- ready = !ready
-
- update_icon()
-
- var/numbuttons = 0
- var/numready = 0
- for(var/obj/machinery/readybutton/button in currentarea)
- numbuttons++
- if (button.ready)
- numready++
-
- if(numbuttons == numready)
- begin_event()
-
-/obj/machinery/readybutton/update_icon()
- if(ready)
- icon_state = "auth_on"
- else
- icon_state = "auth_off"
-
-/obj/machinery/readybutton/proc/begin_event()
-
- eventstarted = 1
-
- for(var/obj/structure/holowindow/W in currentarea)
- del(W)
-
- for(var/mob/M in currentarea)
- M << "FIGHT!"
-
-//Holorack
-
-/obj/structure/table/rack/holorack
- name = "rack"
- desc = "Different from the Middle Ages version."
- icon = 'icons/obj/objects.dmi'
- icon_state = "rack"
-
-/obj/structure/table/rack/holorack/attack_hand(mob/user as mob)
- return
-
-/obj/structure/table/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if (istype(W, /obj/item/weapon/wrench))
- user << "It's a holorack! You can't unwrench it!"
- return
-
-//Holocarp
-
-/mob/living/simple_animal/hostile/carp/holodeck
- icon = 'icons/mob/AI.dmi'
- icon_state = "holo4"
- icon_living = "holo4"
- icon_dead = "holo4"
- icon_gib = null
- meat_amount = 0
- meat_type = null
-
-/mob/living/simple_animal/hostile/carp/holodeck/proc/set_safety(var/safe)
- if (safe)
- faction = "neutral"
- melee_damage_lower = 0
- melee_damage_upper = 0
- wall_smash = 0
- destroy_surroundings = 0
- else
- faction = "carp"
- melee_damage_lower = initial(melee_damage_lower)
- melee_damage_upper = initial(melee_damage_upper)
- wall_smash = initial(wall_smash)
- destroy_surroundings = initial(destroy_surroundings)
-
-/mob/living/simple_animal/hostile/carp/holodeck/gib()
- derez() //holograms can't gib
-
-/mob/living/simple_animal/hostile/carp/holodeck/death()
- ..()
- derez()
-
-/mob/living/simple_animal/hostile/carp/holodeck/proc/derez()
- visible_message("\The [src] fades away!")
- del(src)
+ use_power = 1
\ No newline at end of file
diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm
new file mode 100644
index 0000000000..fda07a2ddb
--- /dev/null
+++ b/code/modules/holodeck/HolodeckObjects.dm
@@ -0,0 +1,422 @@
+// Holographic Items!
+
+/turf/simulated/floor/holofloor/
+ thermal_conductivity = 0
+
+/turf/simulated/floor/holofloor/grass
+ name = "Lush Grass"
+ icon_state = "grass1"
+ floor_type = /obj/item/stack/tile/grass
+
+ New()
+ icon_state = "grass[pick("1","2","3","4")]"
+ ..()
+ spawn(4)
+ update_icon()
+ for(var/direction in cardinal)
+ if(istype(get_step(src,direction),/turf/simulated/floor))
+ var/turf/simulated/floor/FF = get_step(src,direction)
+ FF.update_icon() //so siding get updated properly
+
+/turf/simulated/floor/holofloor/space
+ icon = 'icons/turf/space.dmi'
+ name = "\proper space"
+ icon_state = "0"
+
+/turf/simulated/floor/holofloor/space/New()
+ icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
+
+/turf/simulated/floor/holofloor/desert
+ name = "desert sand"
+ desc = "Uncomfortably gritty for a hologram."
+ icon_state = "asteroid"
+
+/turf/simulated/floor/holofloor/desert/New()
+ ..()
+ if(prob(10))
+ overlays += "asteroid[rand(0,9)]"
+
+/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ return
+ // HOLOFLOOR DOES NOT GIVE A FUCK
+
+/obj/structure/table/holotable
+ name = "table"
+ desc = "A square piece of metal standing on four metal legs. It can not move."
+ icon = 'icons/obj/structures.dmi'
+ icon_state = "table"
+ density = 1
+ anchored = 1.0
+ layer = 2.8
+ throwpass = 1 //You can throw objects over this, despite it's density.
+
+/obj/structure/table/holotable/attack_hand(mob/user as mob)
+ return // HOLOTABLE DOES NOT GIVE A FUCK
+
+
+/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/wrench))
+ user << "It's a holotable! There are no bolts!"
+ return
+
+ if(isrobot(user))
+ return
+
+ ..()
+
+/obj/structure/table/woodentable/holotable
+ name = "table"
+ desc = "A square piece of wood standing on four wooden legs. It can not move."
+ icon = 'icons/obj/structures.dmi'
+ icon_state = "wood_table"
+
+/obj/structure/holostool
+ name = "stool"
+ desc = "Apply butt."
+ icon = 'icons/obj/objects.dmi'
+ icon_state = "stool"
+ anchored = 1.0
+ pressure_resistance = 15
+
+
+/obj/item/clothing/gloves/boxing/hologlove
+ name = "boxing gloves"
+ desc = "Because you really needed another excuse to punch your crewmates."
+ icon_state = "boxing"
+ item_state = "boxing"
+
+/obj/structure/window/reinforced/holowindow/Del()
+ ..()
+
+/obj/structure/window/reinforced/holowindow/attackby(obj/item/W as obj, mob/user as mob)
+ if(!istype(W)) return//I really wish I did not need this
+ if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
+ var/obj/item/weapon/grab/G = W
+ if(istype(G.affecting,/mob/living))
+ var/mob/living/M = G.affecting
+ var/state = G.state
+ del(W) //gotta delete it here because if window breaks, it won't get deleted
+ switch (state)
+ if(1)
+ M.visible_message("[user] slams [M] against \the [src]!")
+ M.apply_damage(7)
+ hit(10)
+ if(2)
+ M.visible_message("[user] bashes [M] against \the [src]!")
+ if (prob(50))
+ M.Weaken(1)
+ M.apply_damage(10)
+ hit(25)
+ if(3)
+ M.visible_message("[user] crushes [M] against \the [src]!")
+ M.Weaken(5)
+ M.apply_damage(20)
+ hit(50)
+ return
+
+ if(W.flags & NOBLUDGEON) return
+
+ if(istype(W, /obj/item/weapon/screwdriver))
+ user << ("It's a holowindow, you can't unfasten it!")
+ else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
+ user << ("It's a holowindow, you can't pry it!")
+ else if(istype(W, /obj/item/weapon/wrench) && !anchored && (!state || !reinf))
+ user << ("It's a holowindow, you can't dismantle it!")
+ else
+ if(W.damtype == BRUTE || W.damtype == BURN)
+ hit(W.force)
+ if(health <= 7)
+ anchored = 0
+ update_nearby_icons()
+ step(src, get_dir(user, src))
+ else
+ playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ ..()
+ return
+
+/obj/structure/window/reinforced/holowindow/shatter(var/display_message = 1)
+ playsound(src, "shatter", 70, 1)
+ if(display_message)
+ visible_message("[src] fades away as it shatters!")
+ del(src)
+ return
+
+/obj/structure/window/reinforced/holowindow/disappearing/Del()
+ ..()
+
+/obj/machinery/door/window/holowindoor/Del()
+ ..()
+
+/obj/machinery/door/window/holowindoor/attackby(obj/item/weapon/I as obj, mob/user as mob)
+
+ if (src.operating == 1)
+ return
+
+ if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
+ var/aforce = I.force
+ playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ visible_message("\red [src] was hit by [I].")
+ if(I.damtype == BRUTE || I.damtype == BURN)
+ take_damage(aforce)
+ return
+
+ src.add_fingerprint(user)
+ if (!src.requiresID())
+ user = null
+
+ if (src.allowed(user))
+ if (src.density)
+ open()
+ else
+ close()
+
+ else if (src.density)
+ flick(text("[]deny", src.base_state), src)
+
+ return
+
+/obj/machinery/door/window/holowindoor/shatter(var/display_message = 1)
+ src.density = 0
+ playsound(src, "shatter", 70, 1)
+ if(display_message)
+ visible_message("[src] fades away as it shatters!")
+ del(src)
+
+/obj/structure/stool/bed/chair/holochair/Del()
+ ..()
+
+/obj/structure/stool/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/weapon/wrench))
+ user << ("It's a holochair, you can't dismantle it!")
+ return
+
+/obj/item/weapon/holo
+ damtype = HALLOSS
+
+/obj/item/weapon/holo/esword
+ desc = "May the force be within you. Sorta."
+ icon_state = "sword0"
+ force = 3.0
+ throw_speed = 1
+ throw_range = 5
+ throwforce = 0
+ w_class = 2.0
+ flags = NOSHIELD | NOBLOODY
+ var/active = 0
+
+/obj/item/weapon/holo/esword/green
+ New()
+ item_color = "green"
+
+/obj/item/weapon/holo/esword/red
+ New()
+ item_color = "red"
+
+/obj/item/weapon/holo/esword/IsShield()
+ if(active)
+ return 1
+ return 0
+
+/obj/item/weapon/holo/esword/attack(target as mob, mob/user as mob)
+ ..()
+
+/obj/item/weapon/holo/esword/New()
+ item_color = pick("red","blue","green","purple")
+
+/obj/item/weapon/holo/esword/attack_self(mob/living/user as mob)
+ active = !active
+ if (active)
+ force = 30
+ icon_state = "sword[item_color]"
+ w_class = 4
+ playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
+ user << "[src] is now active."
+ else
+ force = 3
+ icon_state = "sword0"
+ w_class = 2
+ playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
+ user << "[src] can now be concealed."
+
+ if(istype(user,/mob/living/carbon/human))
+ var/mob/living/carbon/human/H = user
+ H.update_inv_l_hand()
+ H.update_inv_r_hand()
+
+ add_fingerprint(user)
+ return
+
+//BASKETBALL OBJECTS
+
+/obj/item/weapon/beach_ball/holoball
+ icon = 'icons/obj/basketball.dmi'
+ icon_state = "basketball"
+ name = "basketball"
+ item_state = "basketball"
+ desc = "Here's your chance, do your dance at the Space Jam."
+ w_class = 4 //Stops people from hiding it in their bags/pockets
+
+/obj/structure/holohoop
+ name = "basketball hoop"
+ desc = "Boom, Shakalaka!"
+ icon = 'icons/obj/basketball.dmi'
+ icon_state = "hoop"
+ anchored = 1
+ density = 1
+ throwpass = 1
+
+/obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
+ var/obj/item/weapon/grab/G = W
+ if(G.state<2)
+ user << "You need a better grip to do that!"
+ return
+ G.affecting.loc = src.loc
+ G.affecting.Weaken(5)
+ visible_message("[G.assailant] dunks [G.affecting] into the [src]!", 3)
+ del(W)
+ return
+ else if (istype(W, /obj/item) && get_dist(src,user)<2)
+ user.drop_item(src)
+ visible_message("[user] dunks [W] into the [src]!", 3)
+ return
+
+/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
+ if (istype(mover,/obj/item) && mover.throwing)
+ var/obj/item/I = mover
+ if(istype(I, /obj/item/projectile))
+ return
+ if(prob(50))
+ I.loc = src.loc
+ visible_message("Swish! \the [I] lands in \the [src].", 3)
+ else
+ visible_message("\The [I] bounces off of \the [src]'s rim!", 3)
+ return 0
+ else
+ return ..(mover, target, height, air_group)
+
+
+/obj/machinery/readybutton
+ name = "Ready Declaration Device"
+ desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!"
+ icon = 'icons/obj/monitors.dmi'
+ icon_state = "auth_off"
+ var/ready = 0
+ var/area/currentarea = null
+ var/eventstarted = 0
+
+ anchored = 1.0
+ use_power = 1
+ idle_power_usage = 2
+ active_power_usage = 6
+ power_channel = ENVIRON
+
+/obj/machinery/readybutton/attack_ai(mob/user as mob)
+ user << "The station AI is not to interact with these devices!"
+ return
+
+/obj/machinery/readybutton/New()
+ ..()
+
+
+/obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ user << "The device is a solid button, there's nothing you can do with it!"
+
+/obj/machinery/readybutton/attack_hand(mob/user as mob)
+
+ if(user.stat || stat & (NOPOWER|BROKEN))
+ user << "This device is not powered."
+ return
+
+ if(!user.IsAdvancedToolUser())
+ return 0
+
+ currentarea = get_area(src.loc)
+ if(!currentarea)
+ del(src)
+
+ if(eventstarted)
+ usr << "The event has already begun!"
+ return
+
+ ready = !ready
+
+ update_icon()
+
+ var/numbuttons = 0
+ var/numready = 0
+ for(var/obj/machinery/readybutton/button in currentarea)
+ numbuttons++
+ if (button.ready)
+ numready++
+
+ if(numbuttons == numready)
+ begin_event()
+
+/obj/machinery/readybutton/update_icon()
+ if(ready)
+ icon_state = "auth_on"
+ else
+ icon_state = "auth_off"
+
+/obj/machinery/readybutton/proc/begin_event()
+
+ eventstarted = 1
+
+ for(var/obj/structure/window/reinforced/holowindow/disappearing/W in currentarea)
+ del(W)
+
+ for(var/mob/M in currentarea)
+ M << "FIGHT!"
+
+//Holorack
+
+/obj/structure/table/rack/holorack
+ name = "rack"
+ desc = "Different from the Middle Ages version."
+ icon = 'icons/obj/objects.dmi'
+ icon_state = "rack"
+
+/obj/structure/table/rack/holorack/attack_hand(mob/user as mob)
+ return
+
+/obj/structure/table/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/wrench))
+ user << "It's a holorack! You can't unwrench it!"
+ return
+
+//Holocarp
+
+/mob/living/simple_animal/hostile/carp/holodeck
+ icon = 'icons/mob/AI.dmi'
+ icon_state = "holo4"
+ icon_living = "holo4"
+ icon_dead = "holo4"
+ icon_gib = null
+ meat_amount = 0
+ meat_type = null
+
+/mob/living/simple_animal/hostile/carp/holodeck/proc/set_safety(var/safe)
+ if (safe)
+ faction = "neutral"
+ melee_damage_lower = 0
+ melee_damage_upper = 0
+ wall_smash = 0
+ destroy_surroundings = 0
+ else
+ faction = "carp"
+ melee_damage_lower = initial(melee_damage_lower)
+ melee_damage_upper = initial(melee_damage_upper)
+ wall_smash = initial(wall_smash)
+ destroy_surroundings = initial(destroy_surroundings)
+
+/mob/living/simple_animal/hostile/carp/holodeck/gib()
+ derez() //holograms can't gib
+
+/mob/living/simple_animal/hostile/carp/holodeck/death()
+ ..()
+ derez()
+
+/mob/living/simple_animal/hostile/carp/holodeck/proc/derez()
+ visible_message("\The [src] fades away!")
+ del(src)
diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm
index 263f797a95..4afd4f0e44 100644
--- a/code/modules/hydroponics/biogenerator.dm
+++ b/code/modules/hydroponics/biogenerator.dm
@@ -11,66 +11,80 @@
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/points = 0
var/menustat = "menu"
+ var/build_eff = 1
+ var/eat_eff = 1
- New()
- ..()
- var/datum/reagents/R = new/datum/reagents(1000)
- reagents = R
- R.my_atom = src
- beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
+/obj/machinery/biogenerator/New()
+ ..()
+ var/datum/reagents/R = new/datum/reagents(1000)
+ reagents = R
+ R.my_atom = src
+ beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
- on_reagent_change() //When the reagents change, change the icon as well.
- update_icon()
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/biogenerator(src)
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
+ RefreshParts()
+
+/obj/machinery/biogenerator/on_reagent_change() //When the reagents change, change the icon as well.
update_icon()
- if(!src.beaker)
- icon_state = "biogen-empty"
- else if(!src.processing)
- icon_state = "biogen-stand"
- else
- icon_state = "biogen-work"
- return
+
+/obj/machinery/biogenerator/update_icon()
+ if(!beaker)
+ icon_state = "biogen-empty"
+ else if(!processing)
+ icon_state = "biogen-stand"
+ else
+ icon_state = "biogen-work"
+ return
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
+ if(default_deconstruction_screwdriver(user, O))
+ return
+ if(default_deconstruction_crowbar(user, O))
+ return
+ if(default_part_replacement(user, O))
+ return
if(istype(O, /obj/item/weapon/reagent_containers/glass))
if(beaker)
- user << "\red The biogenerator is already loaded."
+ user << "]The [src] is already loaded."
else
user.before_take_item(O)
O.loc = src
beaker = O
updateUsrDialog()
else if(processing)
- user << "\red The biogenerator is currently processing."
+ user << "\The [src] is currently processing."
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
- user << "\red The biogenerator is already full! Activate it."
+ user << "\The [src] is already full! Activate it."
else
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
G.loc = src
i++
if(i >= 10)
- user << "\blue You fill the biogenerator to its capacity."
+ user << "You fill \the [src] to its capacity."
break
- if(i<10)
- user << "\blue You empty the plant bag into the biogenerator."
-
+ if(i < 10)
+ user << "You empty \the [O] into \the [src]."
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
- user << "\red You cannot put this in [src.name]"
+ user << "You cannot put this in \the [src]."
else
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
- user << "\red The biogenerator is full! Activate it."
+ user << "\The [src] is full! Activate it."
else
user.before_take_item(O)
O.loc = src
- user << "\blue You put [O.name] in [src.name]"
+ user << "You put \the [O] in \the [src]"
update_icon()
return
@@ -89,18 +103,18 @@
dat += "Activate Biogenerator!
"
dat += "Detach Container
"
dat += "Food
"
- dat += "10 milk (20)
"
- dat += "Slab of meat (50)
"
+ dat += "10 milk ([round(20/build_eff)])
"
+ dat += "Slab of meat ([round(50/build_eff)])
"
dat += "Nutrient
"
- dat += "E-Z-Nutrient (10) | x5
"
- dat += "Left 4 Zed (20) | x5
"
- dat += "Robust Harvest (25) | x5
"
+ dat += "E-Z-Nutrient ([round(10/build_eff)]) | x5
"
+ dat += "Left 4 Zed ([round(20/build_eff)]) | x5
"
+ dat += "Robust Harvest ([round(25/build_eff)]) | x5
"
dat += "Leather
"
- dat += "Wallet (100)
"
- dat += "Botanical gloves (250)
"
- dat += "Utility belt (300)
"
- dat += "Leather Satchel (400)
"
- dat += "Cash Bag (400)
"
+ dat += "Wallet ([round(100/build_eff)])
"
+ dat += "Botanical gloves ([round(250/build_eff)])
"
+ dat += "Utility belt ([round(300/build_eff)])
"
+ dat += "Leather Satchel ([round(400/build_eff)])
"
+ dat += "Cash Bag ([round(400/build_eff)])
"
//dat += "Other
"
//dat += "Monkey (500)
"
else
@@ -122,34 +136,35 @@
interact(user)
/obj/machinery/biogenerator/proc/activate()
- if (usr.stat != 0)
+ if (usr.stat)
return
- if (src.stat != 0) //NOPOWER etc
+ if (stat) //NOPOWER etc
return
- if(src.processing)
- usr << "\red The biogenerator is in the process of working."
+ if(processing)
+ usr << "The biogenerator is in the process of working."
return
var/S = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
S += 5
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
points += 1
- else points += I.reagents.get_reagent_amount("nutriment")*10
+ else points += I.reagents.get_reagent_amount("nutriment") * 10 * eat_eff
del(I)
if(S)
processing = 1
update_icon()
updateUsrDialog()
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
- use_power(S*30)
- sleep(S+15)
+ use_power(S * 30)
+ sleep((S + 15) / eat_eff)
processing = 0
update_icon()
else
menustat = "void"
return
-/obj/machinery/biogenerator/proc/create_product(var/item,var/cost)
+/obj/machinery/biogenerator/proc/create_product(var/item, var/cost)
+ cost = round(cost/build_eff)
if(cost > points)
menustat = "nopoints"
return 0
@@ -160,45 +175,45 @@
sleep(30)
switch(item)
if("milk")
- beaker.reagents.add_reagent("milk",10)
+ beaker.reagents.add_reagent("milk", 10)
if("meat")
- new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc)
+ new/obj/item/weapon/reagent_containers/food/snacks/meat(loc)
if("ez")
- new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
if("l4z")
- new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
if("rh")
- new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
- new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc)
if("l4z5")
- new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc)
if("rh5")
- new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
- new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
+ new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc)
if("wallet")
- new/obj/item/weapon/storage/wallet(src.loc)
+ new/obj/item/weapon/storage/wallet(loc)
if("gloves")
- new/obj/item/clothing/gloves/botanic_leather(src.loc)
+ new/obj/item/clothing/gloves/botanic_leather(loc)
if("tbelt")
- new/obj/item/weapon/storage/belt/utility(src.loc)
+ new/obj/item/weapon/storage/belt/utility(loc)
if("satchel")
- new/obj/item/weapon/storage/backpack/satchel(src.loc)
+ new/obj/item/weapon/storage/backpack/satchel(loc)
if("cashbag")
- new/obj/item/weapon/storage/bag/cash(src.loc)
+ new/obj/item/weapon/storage/bag/cash(loc)
if("monkey")
- new/mob/living/carbon/monkey(src.loc)
+ new/mob/living/carbon/monkey(loc)
processing = 0
menustat = "complete"
update_icon()
@@ -220,7 +235,21 @@
beaker = null
update_icon()
if("create")
- create_product(href_list["item"],text2num(href_list["cost"]))
+ create_product(href_list["item"], text2num(href_list["cost"]))
if("menu")
menustat = "menu"
updateUsrDialog()
+
+/obj/machinery/biogenerator/RefreshParts()
+ ..()
+ var/man_rating = 0
+ var/bin_rating = 0
+
+ for(var/obj/item/weapon/stock_parts/P in component_parts)
+ if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
+ bin_rating += P.rating
+ if(istype(P, /obj/item/weapon/stock_parts/manipulator))
+ man_rating += P.rating
+
+ build_eff = man_rating
+ eat_eff = bin_rating
diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm
index d82807f738..098313d9c5 100644
--- a/code/modules/hydroponics/grown_inedible.dm
+++ b/code/modules/hydroponics/grown_inedible.dm
@@ -40,7 +40,6 @@
icon = 'icons/obj/harvest.dmi'
icon_state = "logs"
force = 5
- flags = TABLEPASS
throwforce = 5
w_class = 3.0
throw_speed = 3
@@ -71,7 +70,6 @@
icon_state = "sunflower"
damtype = "fire"
force = 0
- flags = TABLEPASS
throwforce = 1
w_class = 1.0
throw_speed = 1
@@ -89,7 +87,6 @@
icon_state = "nettle"
damtype = "fire"
force = 15
- flags = TABLEPASS
throwforce = 1
w_class = 2.0
throw_speed = 1
@@ -183,6 +180,6 @@
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))
user << "You use [W] to fashion a pipe out of the corn cob!"
- new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
+ new /obj/item/clothing/mask/smokable/pipe/cobpipe (user.loc)
del(src)
return
diff --git a/code/modules/hydroponics/hydro_tools.dm b/code/modules/hydroponics/hydro_tools.dm
index 328e1a020e..611f67902c 100644
--- a/code/modules/hydroponics/hydro_tools.dm
+++ b/code/modules/hydroponics/hydro_tools.dm
@@ -112,7 +112,7 @@
else if(grown_seed.heat_tolerance < 10)
dat += "
It is very sensitive to temperature shifts."
- dat += "
It thrives in a light level of [grown_seed.ideal_light] lumen[grown_seed.ideal_light == 1 ? "" : "s"]."
+ dat += "
It thrives in a light level of [grown_seed.ideal_light] lumen\s."
if(grown_seed.light_tolerance > 10)
dat += "
It is well adapted to a range of light levels."
@@ -168,7 +168,7 @@
/obj/item/weapon/plantspray
icon = 'icons/obj/hydroponics.dmi'
item_state = "spray"
- flags = TABLEPASS | FPRINT | NOBLUDGEON
+ flags = NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 4
w_class = 2.0
@@ -220,7 +220,7 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "hoe"
item_state = "hoe"
- flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON
+ flags = CONDUCT | NOBLUDGEON
force = 5.0
throwforce = 7.0
w_class = 2.0
@@ -236,7 +236,6 @@
name = "bottle of weedkiller"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
- flags = FPRINT | TABLEPASS
var/toxicity = 0
var/weed_kill_str = 0
@@ -244,7 +243,6 @@
name = "bottle of glyphosate"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
- flags = FPRINT | TABLEPASS
toxicity = 4
weed_kill_str = 2
@@ -252,7 +250,6 @@
name = "bottle of triclopyr"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle18"
- flags = FPRINT | TABLEPASS
toxicity = 6
weed_kill_str = 4
@@ -260,7 +257,6 @@
name = "bottle of 2,4-D"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
- flags = FPRINT | TABLEPASS
toxicity = 8
weed_kill_str = 7
@@ -273,8 +269,8 @@
name = "fertilizer bottle"
desc = "A small glass bottle. Can hold up to 10 units."
icon = 'icons/obj/chemical.dmi'
- icon_state = "bottle16"
- flags = FPRINT | TABLEPASS | OPENCONTAINER
+ icon_state = "bottle-4"
+ flags = 0
possible_transfer_amounts = null
w_class = 2.0
@@ -292,20 +288,21 @@
if(fertilizer)
reagents.add_reagent(fertilizer,10)
+ update_icon()
/obj/item/weapon/reagent_containers/glass/fertilizer/ez
name = "bottle of E-Z-Nutrient"
- icon_state = "bottle16"
+ icon_state = "bottle-4"
fertilizer = "eznutrient"
/obj/item/weapon/reagent_containers/glass/fertilizer/l4z
name = "bottle of Left 4 Zed"
- icon_state = "bottle18"
+ icon_state = "bottle-4"
fertilizer = "left4zed"
/obj/item/weapon/reagent_containers/glass/fertilizer/rh
name = "bottle of Robust Harvest"
- icon_state = "bottle15"
+ icon_state = "bottle-4"
fertilizer = "robustharvest"
//Hatchets and things to kill kudzu
@@ -314,7 +311,7 @@
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
icon = 'icons/obj/weapons.dmi'
icon_state = "hatchet"
- flags = FPRINT | TABLEPASS | CONDUCT
+ flags = CONDUCT
force = 12.0
w_class = 2.0
throwforce = 15.0
@@ -347,7 +344,7 @@
throw_speed = 1
throw_range = 3
w_class = 4.0
- flags = FPRINT | TABLEPASS | NOSHIELD
+ flags = NOSHIELD
slot_flags = SLOT_BACK
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")
diff --git a/code/modules/hydroponics/seed_datums.dm b/code/modules/hydroponics/seed_datums.dm
index 300112d113..cbedbec6bc 100644
--- a/code/modules/hydroponics/seed_datums.dm
+++ b/code/modules/hydroponics/seed_datums.dm
@@ -183,7 +183,8 @@ proc/populate_seed_list()
list("seed-cocoapod", "cocoapod"),
list("seed-cherry", "cherry"),
list("seed-kudzu", "kudzu"),
- list("seed-replicapod", "replicapod")
+ list("seed-replicapod", "replicapod"),
+ list("seed-tobacco", "tobacco")
))
packet_icon = plant_icons[1]
@@ -255,7 +256,7 @@ proc/populate_seed_list()
if(prob(90))
requires_nutrients = 1
- nutrient_consumption = rand(100)*0.1
+ nutrient_consumption = rand(25)/100
else
requires_nutrients = 0
@@ -1559,6 +1560,22 @@ proc/populate_seed_list()
potency = 10
growth_stages = 5
+/datum/seed/tobacco
+ name = "tobacco"
+ seed_name = "tobacco"
+ display_name = "tobacco plant"
+ packet_icon = "seed-tobacco"
+ products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco)
+ plant_icon = "tobacco"
+ chems = list("nutriment" = list(1), "nicotine" = list(1,10))
+
+ lifespan = 50
+ maturation = 5
+ production = 5
+ yield = 4
+ potency = 10
+ growth_stages = 3
+
/datum/seed/kudzu
name = "kudzu"
seed_name = "kudzu"
diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm
new file mode 100644
index 0000000000..14b24eb581
--- /dev/null
+++ b/code/modules/hydroponics/seed_storage.dm
@@ -0,0 +1,256 @@
+/datum/seed_pile
+ var/name
+ var/amount
+ var/datum/seed/seed_type // Keeps track of what our seed is
+ var/list/obj/item/seeds/seeds = list() // Tracks actual objects contained in the pile
+ var/ID
+
+/datum/seed_pile/New(var/obj/item/seeds/O, var/ID)
+ name = O.name
+ amount = 1
+ seed_type = O.seed
+ seeds += O
+ src.ID = ID
+
+/datum/seed_pile/proc/matches(var/obj/item/seeds/O)
+ if (O.seed == seed_type)
+ return 1
+ return 0
+
+/obj/machinery/seed_storage
+ name = "Seed storage"
+ desc = "It stores, sorts, and dispenses seeds."
+ icon = 'icons/obj/vending.dmi'
+ icon_state = "seeds"
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 100
+
+ var/initialized = 0 // Map-placed ones break if seeds are loaded right at the start of the round, so we do it on the first interaction
+ var/list/datum/seed_pile/piles = list()
+ var/list/starting_seeds = list()
+ var/list/scanner = list() // What properties we can view
+
+/obj/machinery/seed_storage/random // This is mostly for testing, but I guess admins could spawn it
+ name = "Random seed storage"
+ scanner = list("stats", "produce", "soil", "temperature", "light", "mutants")
+ starting_seeds = list(/obj/item/seeds/random = 50)
+
+/obj/machinery/seed_storage/garden
+ name = "Garden seed storage"
+ scanner = list("stats")
+ starting_seeds = list(/obj/item/seeds/appleseed = 3, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3)
+
+/obj/machinery/seed_storage/xenobotany
+ name = "Xenobotany seed storage"
+ scanner = list("stats", "produce", "soil", "temperature", "light", "mutants")
+ starting_seeds = list(/obj/item/seeds/ambrosiavulgarisseed = 3, /obj/item/seeds/appleseed = 3, /obj/item/seeds/amanitamycelium = 2, /obj/item/seeds/bananaseed = 3, /obj/item/seeds/berryseed = 3, /obj/item/seeds/cabbageseed = 3, /obj/item/seeds/carrotseed = 3, /obj/item/seeds/chantermycelium = 3, /obj/item/seeds/cherryseed = 3, /obj/item/seeds/chiliseed = 3, /obj/item/seeds/cocoapodseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/replicapod = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/grapeseed = 3, /obj/item/seeds/grassseed = 3, /obj/item/seeds/lemonseed = 3, /obj/item/seeds/libertymycelium = 2, /obj/item/seeds/limeseed = 3, /obj/item/seeds/mtearseed = 2, /obj/item/seeds/nettleseed = 2, /obj/item/seeds/orangeseed = 3, /obj/item/seeds/peanutseed = 3, /obj/item/seeds/plastiseed = 3, /obj/item/seeds/plumpmycelium = 3, /obj/item/seeds/poppyseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/pumpkinseed = 3, /obj/item/seeds/reishimycelium = 2, /obj/item/seeds/riceseed = 3, /obj/item/seeds/soyaseed = 3, /obj/item/seeds/sugarcaneseed = 3, /obj/item/seeds/sunflowerseed = 3, /obj/item/seeds/shandseed = 2, /obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/tomatoseed = 3, /obj/item/seeds/towermycelium = 3, /obj/item/seeds/watermelonseed = 3, /obj/item/seeds/wheatseed = 3, /obj/item/seeds/whitebeetseed = 3)
+
+/obj/machinery/seed_storage/attack_hand(mob/user as mob)
+ user.set_machine(src)
+ interact(user)
+
+/obj/machinery/seed_storage/interact(mob/user as mob)
+ if (..())
+ return
+
+ if (!initialized)
+ for(var/typepath in starting_seeds)
+ var/amount = starting_seeds[typepath]
+ if(isnull(amount)) amount = 1
+
+ for (var/i = 1 to amount)
+ var/O = new typepath
+ add(O)
+ initialized = 1
+
+ var/dat = "Seed storage contents
"
+ if (piles.len == 0)
+ dat += "No seeds"
+ else
+ dat += "| Name | "
+ dat += "Variety | "
+ if ("stats" in scanner)
+ dat += "E | Y | L | M | Pr | Pt | Harvest | "
+ if ("produce" in scanner)
+ dat += "Produce | "
+ if ("temperature" in scanner)
+ dat += "Temp | "
+ if ("light" in scanner)
+ dat += "Light | "
+ if ("soil" in scanner)
+ dat += "Nutri | Water | "
+ dat += "Notes | Amount | |
"
+ for (var/datum/seed_pile/S in piles)
+ var/datum/seed/seed = S.seed_type
+ dat += ""
+ dat += "| [S.name] | "
+ dat += "#[seed.uid] | "
+ if ("stats" in scanner)
+ dat += "[seed.endurance] | [seed.yield] | [seed.lifespan] | [seed.maturation] | [seed.production] | [seed.potency] | "
+ if(seed.harvest_repeat)
+ dat += "Multiple | "
+ else
+ dat += "Single | "
+ if ("produce" in scanner)
+ if (seed.products && seed.products.len)
+ dat += "Fruit: [seed.products.len] | "
+ else
+ dat += "N/A | "
+ if ("temperature" in scanner)
+ dat += "[seed.ideal_heat] K | "
+ if ("light" in scanner)
+ dat += "[seed.ideal_light] L | "
+ if ("soil" in scanner)
+ if(seed.requires_nutrients)
+ if(seed.nutrient_consumption < 0.05)
+ dat += "Low | "
+ else if(seed.nutrient_consumption > 0.2)
+ dat += "High | "
+ else
+ dat += "Norm | "
+ else
+ dat += "No | "
+ if(seed.requires_water)
+ if(seed.water_consumption < 1)
+ dat += "Low | "
+ else if(seed.water_consumption > 5)
+ dat += "High | "
+ else
+ dat += "Norm | "
+ else
+ dat += "No | "
+
+ dat += ""
+ if ("mutants" in scanner)
+ if(seed.mutants && seed.mutants.len)
+ dat += "SUBSP "
+ if(seed.immutable == -1)
+ dat += "MUT "
+ else if(seed.immutable > 0)
+ dat += "NOMUT "
+ switch(seed.carnivorous)
+ if(1)
+ dat += "CARN "
+ if(2)
+ dat += "CARN "
+ switch(seed.spread)
+ if(1)
+ dat += "VINE "
+ if(2)
+ dat += "VINE "
+ if ("pressure" in scanner)
+ if(seed.lowkpa_tolerance < 20)
+ dat += "LP "
+ if(seed.highkpa_tolerance > 220)
+ dat += "HP "
+ if ("temperature" in scanner)
+ if(seed.heat_tolerance > 30)
+ dat += "TEMRES "
+ else if(seed.heat_tolerance < 10)
+ dat += "TEMSEN "
+ if ("light" in scanner)
+ if(seed.light_tolerance > 10)
+ dat += "LIGRES "
+ else if(seed.light_tolerance < 3)
+ dat += "LIGSEN "
+ if(seed.toxins_tolerance < 3)
+ dat += "TOXSEN "
+ else if(seed.toxins_tolerance > 6)
+ dat += "TOXRES "
+ if(seed.pest_tolerance < 3)
+ dat += "PESTSEN "
+ else if(seed.pest_tolerance > 6)
+ dat += "PESTRES "
+ if(seed.weed_tolerance < 3)
+ dat += "WEEDSEN "
+ else if(seed.weed_tolerance > 6)
+ dat += "WEEDRES "
+ if(seed.parasite)
+ dat += "PAR "
+ if ("temperature" in scanner)
+ if(seed.alter_temp > 0)
+ dat += "TEMP+ "
+ if(seed.alter_temp < 0)
+ dat += "TEMP- "
+ if(seed.biolum)
+ dat += "LUM "
+ if(seed.flowers)
+ dat += " [seed.flower_colour ? "FLOW" : "FLOW"]."
+ dat += " | "
+ dat += "[S.amount] | "
+ dat += "Vend Purge | "
+ dat += "
"
+ dat += "
"
+
+ user << browse(dat, "window=seedstorage")
+ onclose(user, "seedstorage")
+
+/obj/machinery/seed_storage/Topic(var/href, var/list/href_list)
+ if (..())
+ return
+ var/task = href_list["task"]
+ var/ID = text2num(href_list["id"])
+
+ for (var/datum/seed_pile/N in piles)
+ if (N.ID == ID)
+ if (task == "vend")
+ var/obj/O = pick(N.seeds)
+ if (O)
+ --N.amount
+ N.seeds -= O
+ if (N.amount <= 0 || N.seeds.len <= 0)
+ piles -= N
+ del(N)
+ O.loc = src.loc
+ else
+ piles -= N
+ del(N)
+ else if (task == "purge")
+ for (var/obj/O in N.seeds)
+ del(O)
+ piles -= N
+ del(N)
+ break
+ updateUsrDialog()
+
+/obj/machinery/seed_storage/attackby(var/obj/item/O as obj, var/mob/user as mob)
+ if (istype(O, /obj/item/seeds))
+ add(O)
+ user.visible_message("[user] puts \the [O.name] into \the [src].", "You put \the [O] into \the [src].")
+ return
+ else if (istype(O, /obj/item/weapon/storage/bag/plants))
+ var/obj/item/weapon/storage/P = O
+ var/loaded = 0
+ for(var/obj/item/seeds/G in P.contents)
+ ++loaded
+ add(G)
+ if (loaded)
+ user.visible_message("[user] puts the seeds from \the [O.name] into \the [src].", "You put the seeds from \the [O.name] into \the [src].")
+ else
+ user << "There are no seeds in \the [O.name]."
+ return
+ else if(istype(O, /obj/item/weapon/wrench))
+ playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
+ anchored = !anchored
+ user << "You [anchored ? "wrench" : "unwrench"] \the [src]."
+
+/obj/machinery/seed_storage/proc/add(var/obj/item/seeds/O as obj)
+ if (istype(O.loc, /mob))
+ var/mob/user = O.loc
+ user.drop_item(O)
+ else if(istype(O.loc,/obj/item/weapon/storage))
+ var/obj/item/weapon/storage/S = O.loc
+ S.remove_from_storage(O, src)
+
+ O.loc = src
+
+ for (var/datum/seed_pile/N in piles)
+ if (N.matches(O))
+ ++N.amount
+ N.seeds += (O)
+ return
+
+ piles += new /datum/seed_pile(O, piles.len)
+ return
diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm
index 390e3568cd..4cef5f21dc 100644
--- a/code/modules/hydroponics/seeds.dm
+++ b/code/modules/hydroponics/seeds.dm
@@ -3,7 +3,6 @@
name = "packet of seeds"
icon = 'icons/obj/seeds.dmi'
icon_state = "seed"
- flags = FPRINT | TABLEPASS
w_class = 2.0
var/seed_type
@@ -230,5 +229,8 @@
/obj/item/seeds/cherryseed
seed_type = "cherry"
+/obj/item/seeds/tobaccoseed
+ seed_type = "tobacco"
+
/obj/item/seeds/kudzuseed
seed_type = "kudzu"
\ No newline at end of file
diff --git a/code/modules/hydroponics/vines.dm b/code/modules/hydroponics/vines.dm
index 699063fec4..24e7502669 100644
--- a/code/modules/hydroponics/vines.dm
+++ b/code/modules/hydroponics/vines.dm
@@ -20,7 +20,6 @@
// Life vars/
var/energy = 0
var/obj/effect/plant_controller/master = null
- var/mob/living/buckled_mob
var/datum/seed/seed
/obj/effect/plantsegment/New()
@@ -56,7 +55,7 @@
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user)) del src
else
- manual_unbuckle(user)
+ user_unbuckle_mob(user)
return
// Plant-b-gone damage is handled in its entry in chemistry-reagents.dm
..()
@@ -71,39 +70,7 @@
update()
return
- manual_unbuckle(user)
-
-/obj/effect/plantsegment/proc/unbuckle()
- if(buckled_mob)
- if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
- buckled_mob.buckled = null
- buckled_mob.anchored = initial(buckled_mob.anchored)
- buckled_mob.update_canmove()
- buckled_mob = null
- return
-
-/obj/effect/plantsegment/proc/manual_unbuckle(mob/user as mob)
- if(buckled_mob)
- if(prob(seed ? min(max(0,100 - seed.potency),100) : 50))
- if(buckled_mob.buckled == src)
- if(buckled_mob != user)
- buckled_mob.visible_message(\
- "[user.name] frees [buckled_mob.name] from [src].",\
- "[user.name] frees you from [src].",\
- "You hear shredding and ripping.")
- else
- buckled_mob.visible_message(\
- "[buckled_mob.name] struggles free of [src].",\
- "You untangle [src] from around yourself.",\
- "You hear shredding and ripping.")
- unbuckle()
- else
- var/text = pick("rips","tears","pulls")
- user.visible_message(\
- "[user.name] [text] at [src].",\
- "You [text] at [src].",\
- "You hear shredding and ripping.")
- return
+ user_unbuckle_mob(user)
/obj/effect/plantsegment/proc/grow()
diff --git a/code/modules/icon generation/Uristrunes.dm b/code/modules/icon generation/Uristrunes.dm
index d9c129df8e..8dfe135a72 100644
--- a/code/modules/icon generation/Uristrunes.dm
+++ b/code/modules/icon generation/Uristrunes.dm
@@ -179,7 +179,7 @@ var/list/rune_animation = list(
var/icon/base = icon('icons/effects/uristrunes.dmi', "")
for(var/i = 0, i < 10, i++)
- if(rune_bits & (1 << i))
+ if(BITTEST(rune_bits, i))
base.Blend(icon('icons/effects/uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY)
var/icon/result
@@ -217,7 +217,7 @@ var/list/rune_animation = list(
var/icon/I = icon('icons/effects/uristrunes.dmi', "blank")
for(var/i = 0, i < 10, i++)
- if(rune & (1 << i))
+ if(BITTEST(rune, i))
I.Blend(icon('icons/effects/uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY)
var/obj/o = new(locate(x, y, z))
@@ -229,7 +229,7 @@ var/list/rune_animation = list(
var/rune = rand(1, 1023)
for(var/i = 0, i < 10, i++)
- if(rune & (1 << i))
+ if(BITTEST(rune, i))
I.Blend(icon('icons/effects/uristrunes.dmi', "rune-[1 << i]"), ICON_OVERLAY)
var/obj/o = new(t)
@@ -265,4 +265,4 @@ var/list/rune_animation = list(
list(0.250, 1),
list(0.125, 1),
))
-*/
\ No newline at end of file
+*/
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index e8374d5652..cd172b41ee 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -126,7 +126,6 @@
throw_speed = 1
throw_range = 5
w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever)
- flags = FPRINT | TABLEPASS
attack_verb = list("bashed", "whacked", "educated")
var/dat // Actual page content
var/due_date = 0 // Game time in 1/10th seconds
@@ -254,7 +253,6 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
- flags = FPRINT | TABLEPASS
var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this
var/obj/item/weapon/book/book // Currently scanned book
var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index d1561da59d..8544543531 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -300,9 +300,9 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
if(checkoutperiod < 1)
checkoutperiod = 1
if(href_list["editbook"])
- buffer_book = copytext(sanitize(input("Enter the book's title:") as text|null),1,MAX_MESSAGE_LEN)
+ buffer_book = sanitize(copytext(input("Enter the book's title:") as text|null,1,MAX_MESSAGE_LEN))
if(href_list["editmob"])
- buffer_mob = copytext(sanitize(input("Enter the recipient's name:") as text|null),1,MAX_NAME_LEN)
+ buffer_mob = sanitize(copytext(input("Enter the recipient's name:") as text|null,1,MAX_NAME_LEN))
if(href_list["checkout"])
var/datum/borrowbook/b = new /datum/borrowbook
b.bookname = sanitize(buffer_book)
@@ -317,7 +317,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
var/obj/item/weapon/book/b = locate(href_list["delbook"])
inventory.Remove(b)
if(href_list["setauthor"])
- var/newauthor = copytext(sanitize(input("Enter the author's name: ") as text|null),1,MAX_MESSAGE_LEN)
+ var/newauthor = sanitize(copytext(input("Enter the author's name: ") as text|null,1,MAX_MESSAGE_LEN))
if(newauthor)
scanner.cache.author = newauthor
if(href_list["setcategory"])
diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm
index f71b7f9d35..c26c2eb9cd 100644
--- a/code/modules/mining/abandonedcrates.dm
+++ b/code/modules/mining/abandonedcrates.dm
@@ -6,74 +6,155 @@
icon_closed = "securecrate"
var/code = null
var/lastattempt = null
- var/attempts = 3
+ var/attempts = 10
+ var/codelen = 4
locked = 1
- var/min = 1
- var/max = 10
/obj/structure/closet/crate/secure/loot/New()
..()
- code = rand(min,max)
- var/loot = rand(1,30)
+ var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
+
+ code = ""
+ for(var/i = 0, i < codelen, i++)
+ var/dig = pick(digits)
+ code += dig
+ digits -= dig // Player can enter codes with matching digits, but there are never matching digits in the answer
+
+ var/loot = rand(1, 100)
switch(loot)
- if(1)
+ if(1 to 5) // Common things go, 5%
new/obj/item/weapon/reagent_containers/food/drinks/bottle/rum(src)
- new/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus(src)
new/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey(src)
+ new/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus(src)
new/obj/item/weapon/flame/lighter/zippo(src)
- if(2)
+ if(6 to 10)
new/obj/item/weapon/pickaxe/drill(src)
new/obj/item/device/taperecorder(src)
new/obj/item/clothing/suit/space(src)
new/obj/item/clothing/head/helmet/space(src)
- if(3)
- return
- if(4)
+ if(11 to 15)
new/obj/item/weapon/reagent_containers/glass/beaker/bluespace(src)
- if(5 to 6)
+ if(16 to 20)
for(var/i = 0, i < 10, i++)
new/obj/item/weapon/ore/diamond(src)
- if(7)
- return
- if(8)
- return
- if(9)
+ if(21 to 25)
for(var/i = 0, i < 3, i++)
new/obj/machinery/portable_atmospherics/hydroponics(src)
- if(10)
+ if(26 to 30)
for(var/i = 0, i < 3, i++)
new/obj/item/weapon/reagent_containers/glass/beaker/noreact(src)
- if(11 to 13)
- new/obj/item/weapon/melee/classic_baton(src)
- if(14)
- return
- if(15)
- new/obj/item/clothing/under/chameleon(src)
- for(var/i = 0, i < 7, i++)
- new/obj/item/clothing/tie/horrible(src)
- if(16)
- new/obj/item/clothing/under/shorts(src)
+ if(31 to 35)
+ spawn_money(rand(300,800), src)
+ if(36 to 40)
+ new/obj/item/weapon/melee/baton(src)
+ if(41 to 45)
new/obj/item/clothing/under/shorts/red(src)
new/obj/item/clothing/under/shorts/blue(src)
- //Dummy crates start here.
- if(17 to 29)
- return
- //Dummy crates end here.
- if(30)
- new/obj/item/weapon/melee/baton(src)
+ if(46 to 50)
+ new/obj/item/clothing/under/chameleon(src)
+ for(var/i = 0, i < 7, i++)
+ new/obj/item/clothing/accessory/horrible(src)
+ if(51 to 52) // Uncommon, 2% each
+ new/obj/item/weapon/melee/classic_baton(src)
+ if(53 to 54)
+ new/obj/item/latexballon(src)
+ if(55 to 56)
+ var/newitem = pick(typesof(/obj/item/toy/prize) - /obj/item/toy/prize)
+ new newitem(src)
+ if(57 to 58)
+ new/obj/item/toy/syndicateballoon(src)
+ if(59 to 60)
+ new/obj/item/weapon/rig(src)
+ if(61 to 62)
+ for(var/i = 0, i < 12, ++i)
+ new/obj/item/clothing/head/kitty(src)
+ if(63 to 64)
+ var/t = rand(4,7)
+ for(var/i = 0, i < t, ++i)
+ var/newcoin = pick(/obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/diamond, /obj/item/weapon/coin/phoron, /obj/item/weapon/coin/uranium, /obj/item/weapon/coin/platinum)
+ new newcoin(src)
+ if(65 to 66)
+ new/obj/item/clothing/suit/ianshirt(src)
+ if(67 to 68)
+ var/t = rand(4,7)
+ for(var/i = 0, i < t, ++i)
+ var/newitem = pick(typesof(/obj/item/weapon/stock_parts) - /obj/item/weapon/stock_parts - /obj/item/weapon/stock_parts/subspace)
+ new newitem(src)
+ if(69 to 70)
+ new/obj/item/weapon/pickaxe/silver(src)
+ if(71 to 72)
+ new/obj/item/weapon/pickaxe/drill(src)
+ if(73 to 74)
+ new/obj/item/weapon/pickaxe/jackhammer(src)
+ if(75 to 76)
+ new/obj/item/weapon/pickaxe/diamond(src)
+ if(77 to 78)
+ new/obj/item/weapon/pickaxe/diamonddrill(src)
+ if(79 to 80)
+ new/obj/item/weapon/pickaxe/gold(src)
+ if(81 to 82)
+ new/obj/item/weapon/pickaxe/plasmacutter(src)
+ if(83 to 84)
+ new/obj/item/toy/katana(src)
+ if(85 to 86)
+ new/obj/item/seeds/random(src)
+ if(87) // Rarest things, some are unobtainble otherwise, some are just robust, 1% each
+ new/obj/item/weed_extract(src)
+ if(88)
+ new/obj/item/xenos_claw(src)
+ if(89)
+ new/obj/item/organ/xenos/plasmavessel(src)
+ if(90)
+ new/obj/item/organ/heart(src)
+ if(91)
+ new/obj/item/device/soulstone(src)
+ if(92)
+ new/obj/item/weapon/katana(src)
+ if(93)
+ new/obj/item/weapon/dnainjector/xraymut(src) // Probably the least OP
+ if(94) // Why the hell not
+ new/obj/item/weapon/storage/backpack/clown(src)
+ new/obj/item/clothing/under/rank/clown(src)
+ new/obj/item/clothing/shoes/clown_shoes(src)
+ new/obj/item/device/pda/clown(src)
+ new/obj/item/clothing/mask/gas/clown_hat(src)
+ new/obj/item/weapon/bikehorn(src)
+ //new/obj/item/weapon/stamp/clown(src) I'd add it, but only clowns can use it
+ new/obj/item/toy/crayon/rainbow(src)
+ new/obj/item/toy/waterflower(src)
+ if(95)
+ new/obj/item/clothing/under/mime(src)
+ new/obj/item/clothing/shoes/black(src)
+ new/obj/item/device/pda/mime(src)
+ new/obj/item/clothing/gloves/white(src)
+ new/obj/item/clothing/mask/gas/mime(src)
+ new/obj/item/clothing/head/beret(src)
+ new/obj/item/clothing/suit/suspenders(src)
+ new/obj/item/toy/crayon/mime(src)
+ new/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(src)
+ if(96)
+ new/obj/item/weapon/vampiric(src)
+ if(97)
+ new/obj/item/weapon/archaeological_find(src)
+ if(98)
+ new/obj/item/weapon/melee/energy/sword(src)
+ if(99)
+ new/obj/item/weapon/storage/belt/champion(src)
+ new/obj/item/clothing/mask/luchador(src)
+ if(100)
+ new/obj/item/clothing/head/bearpelt(src)
/obj/structure/closet/crate/secure/loot/togglelock(mob/user as mob)
if(locked)
user << "The crate is locked with a Deca-code lock."
- var/input = input(usr, "Enter digit from [min] to [max].", "Deca-Code Lock", "") as num
+ var/input = input(usr, "Enter [codelen] digits.", "Deca-Code Lock", "") as text
if(in_range(src, user))
- input = Clamp(input, 0, 10)
if (input == code)
user << "The crate unlocks!"
locked = 0
overlays.Cut()
overlays += greenlight
- else if (input == null || input > max || input < min)
+ else if (input == null || length(input) != codelen)
user << "You leave the crate alone."
else
user << "A red light flashes."
@@ -96,19 +177,26 @@
if (istype(W, /obj/item/weapon/card/emag))
user << "The crate unlocks!"
locked = 0
- if (istype(W, /obj/item/device/multitool))
+ if (istype(W, /obj/item/device/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
user << "DECA-CODE LOCK REPORT:"
if (attempts == 1)
user << "* Anti-Tamper Bomb will activate on next failed access attempt."
else
user << "* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts."
- if (lastattempt == null)
- user << " has been made to open the crate thus far."
- return
- // hot and cold
- if (code > lastattempt)
- user << "* Last access attempt lower than expected code."
- else
- user << "* Last access attempt higher than expected code."
+ if (lastattempt != null)
+ var/list/guess = list()
+ var/bulls = 0
+ var/cows = 0
+ for(var/i = 1, i < codelen + 1, i++)
+ var/a = copytext(lastattempt, i, i+1) // Stuff the code into the list
+ guess += a
+ guess[a] = i
+ for(var/i in guess) // Go through list and count matches
+ var/a = findtext(code, i)
+ if(a == guess[i])
+ ++bulls
+ else if(a)
+ ++cows
+ user << "Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions."
else ..()
else ..()
diff --git a/code/modules/mining/coins.dm b/code/modules/mining/coins.dm
index 6a0d7c5c3c..6ddf02609a 100644
--- a/code/modules/mining/coins.dm
+++ b/code/modules/mining/coins.dm
@@ -4,7 +4,7 @@
icon = 'icons/obj/items.dmi'
name = "Coin"
icon_state = "coin"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 0.0
throwforce = 0.0
w_class = 1.0
diff --git a/code/modules/mining/drilling/distribution.dm b/code/modules/mining/drilling/distribution.dm
deleted file mode 100644
index 33654da273..0000000000
--- a/code/modules/mining/drilling/distribution.dm
+++ /dev/null
@@ -1,233 +0,0 @@
-//If anyone can think of a less shitty way to work out x,y points on a linear string of integers please tell me.
-#define MAP_CELL ((y-1)*real_size)+x
-#define MAP_CENTRE (((y-1)+size/2)*real_size)+(x+size/2)
-#define MAP_TOP_LEFT ((y-1)*real_size)+x
-#define MAP_TOP_RIGHT ((y-1)*real_size)+(x+size)
-#define MAP_BOTTOM_LEFT (((y+size)-1)*real_size)+x
-#define MAP_BOTTOM_RIGHT ((((y+size)-1)*real_size)+(x+size))
-#define MAP_MID_TOP MAP_TOP_LEFT + (size/2)
-#define MAP_MID_BOTTOM MAP_BOTTOM_LEFT + (size/2)
-#define MAP_MID_LEFT (((y-1)+size/2)*real_size)+x
-#define MAP_MID_RIGHT (((y-1)+size/2)*real_size)+(x+size)
-
-#define MIN_SURFACE_COUNT 1000
-#define MAX_SURFACE_COUNT 5000
-#define MIN_RARE_COUNT 1000
-#define MAX_RARE_COUNT 5000
-#define MIN_DEEP_COUNT 100
-#define MAX_DEEP_COUNT 300
-#define ITERATE_BEFORE_FAIL 200
-
-#define RESOURCE_HIGH_MAX 4
-#define RESOURCE_HIGH_MIN 2
-#define RESOURCE_MID_MAX 3
-#define RESOURCE_MID_MIN 1
-#define RESOURCE_LOW_MAX 1
-#define RESOURCE_LOW_MIN 0
-
-/*
-Surface minerals:
- silicates
- iron
- gold
- silver
-
-Rare minerals:
- uranium
- diamond
-
-Deep minerals:
- phoron
- osmium (platinum)
- tritium (hydrogen)
-*/
-
-/datum/ore_distribution
-
- var/real_size = 65 //Overall map size ((must be power of 2)+1)
- var/chunk_size = 4 //Size each cell represents on map (like hell we're generating up to 100 256^2 grids at roundstart)
- var/list/map[4225] //The actual map. real_size squared.
- var/range = 255 //Max random range of cells in map.
-
- var/random_variance_chance = 25
- var/random_element = 0.5
-
-/datum/ore_distribution/proc/map_is_sane()
- if(!map) return 0
-
- var/rare_count = 0
- var/surface_count = 0
- var/deep_count = 0
-
- for(var/cell in map)
- if(cell>(range*0.60))
- deep_count++
- else if(cell>(range*0.40))
- rare_count++
- else
- surface_count++
-
- if(surface_count < MIN_SURFACE_COUNT || surface_count > MAX_SURFACE_COUNT) return 0
- if(rare_count < MIN_RARE_COUNT || rare_count > MAX_RARE_COUNT) return 0
- if(deep_count < MIN_DEEP_COUNT || deep_count > MAX_DEEP_COUNT) return 0
- return 1
-
-//Halfassed diamond-square algorithm with some fuckery since it's a single dimension array.
-/datum/ore_distribution/proc/populate_distribution_map()
-
- //Seed beginning values.
- var/x = 1
- var/y = 1
- var/size = real_size-1
- map[MAP_TOP_LEFT] = (range/3)+rand(range/5)
- map[MAP_TOP_RIGHT] = (range/3)+rand(range/5)
- map[MAP_BOTTOM_LEFT] = (range/3)+rand(range/5)
- map[MAP_BOTTOM_RIGHT] = (range/3)+rand(range/5)
-
- //Fill in and smooth it out.
- var/attempts = 0
- do
- attempts++
- generate_distribution_map(1,1,size)
- while(attempts < ITERATE_BEFORE_FAIL && !map_is_sane())
-
- if(attempts >= ITERATE_BEFORE_FAIL)
- world << "Could not generate a sane distribution map. Aborting."
- map = null
- return
- else
- apply_to_asteroid()
-
-/datum/ore_distribution/proc/clear_distribution_map()
- for(var/x = 1, x <= real_size, x++)
- for(var/y = 1, y <= real_size, y++)
- map[MAP_CELL] = 0
-
-/datum/ore_distribution/proc/print_distribution_map(var/mob/usr)
- var/line = ""
- for(var/x = 1, x <= real_size, x++)
- for(var/y = 1, y <= real_size, y++)
- line += num2text(round(map[MAP_CELL]/25.5))
- if(usr)
- usr << line
- else
- world << line
- line = ""
-
-/datum/ore_distribution/proc/generate_distribution_map(var/x,var/y,var/input_size)
-
- var/size = input_size
-
- map[MAP_MID_TOP] = (map[MAP_TOP_LEFT] + map[MAP_TOP_RIGHT])/2
- map[MAP_MID_RIGHT] = (map[MAP_BOTTOM_RIGHT] + map[MAP_TOP_RIGHT])/2
- map[MAP_MID_BOTTOM] = (map[MAP_BOTTOM_LEFT] + map[MAP_BOTTOM_RIGHT])/2
- map[MAP_MID_LEFT] = (map[MAP_TOP_LEFT] + map[MAP_BOTTOM_RIGHT])/2
- map[MAP_CENTRE] = (map[MAP_MID_LEFT]+map[MAP_MID_RIGHT]+map[MAP_MID_BOTTOM]+map[MAP_MID_TOP])/4
-
- if(prob(random_variance_chance))
- map[MAP_CENTRE] *= (rand(1) ? (1.0-random_element) : (1.0+random_element))
- map[MAP_CENTRE] = max(0,min(range,map[MAP_CENTRE]))
-
- if(size>3)
- generate_distribution_map(x,y,input_size/2)
- generate_distribution_map(x+(input_size/2),y,input_size/2)
- generate_distribution_map(x,y+(input_size/2),input_size/2)
- generate_distribution_map(x+(input_size/2),y+(input_size/2),input_size/2)
-
-/datum/ore_distribution/proc/apply_to_asteroid()
-
- // THESE VALUES DETERMINE THE AREA THAT THE DISTRIBUTION MAP IS APPLIED TO.
- // IF YOU DO NOT RUN OFFICIAL BAYCODE ASTEROID MAP YOU NEED TO CHANGE THEM.
- // ORIGIN IS THE BOTTOM LEFT CORNER OF THE SQUARE CONTAINING ALL ASTEROID
- // TILES YOU WISH TO APPLY THE DISTRIBUTION MAP TO.
-
- var/origin_x = 13 //We start here...
- var/origin_y = 32 //...and here...
- var/limit_x = 217 //...and iterate until here...
- var/limit_y = 223 //...and here...
- var/asteroid_z = 5 //...on this Z-level.
-
- var/tx = origin_x
- var/ty = origin_y
-
- for(var/y = 1, y <= real_size, y++)
-
- for(var/x = 1, x <= real_size, x++)
-
- var/turf/target_turf
-
- for(var/i=0,i limit_x || ty+i > limit_y)
- continue
-
- target_turf = locate(tx+j, ty+i, asteroid_z)
-
- if(target_turf && target_turf.has_resources)
- target_turf.resources = list()
- target_turf.resources["silicates"] = rand(3,5)
- target_turf.resources["carbonaceous rock"] = rand(3,5)
-
- switch(map[MAP_CELL])
- if(0 to 100)
- target_turf.resources["iron"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
- target_turf.resources["gold"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
- target_turf.resources["silver"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
- target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
- target_turf.resources["diamond"] = 0
- target_turf.resources["phoron"] = 0
- target_turf.resources["osmium"] = 0
- target_turf.resources["hydrogen"] = 0
- if(100 to 124)
- target_turf.resources["iron"] = 0
- target_turf.resources["gold"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
- target_turf.resources["silver"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
- target_turf.resources["uranium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
- target_turf.resources["diamond"] = 0
- target_turf.resources["phoron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
- target_turf.resources["osmium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
- target_turf.resources["hydrogen"] = 0
- if(125 to 255)
- target_turf.resources["iron"] = 0
- target_turf.resources["gold"] = 0
- target_turf.resources["silver"] = 0
- target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
- target_turf.resources["diamond"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
- target_turf.resources["phoron"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
- target_turf.resources["osmium"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
- target_turf.resources["hydrogen"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
-
- tx += chunk_size
- tx = origin_x
- ty += chunk_size
-
- world << "Resource map generation complete."
- return
-
-#undef MAP_CELL
-#undef MAP_CENTRE
-#undef MAP_TOP_LEFT
-#undef MAP_TOP_RIGHT
-#undef MAP_BOTTOM_LEFT
-#undef MAP_BOTTOM_RIGHT
-#undef MAP_MID_TOP
-#undef MAP_MID_BOTTOM
-#undef MAP_MID_LEFT
-#undef MAP_MID_RIGHT
-
-#undef MIN_SURFACE_COUNT
-#undef MAX_SURFACE_COUNT
-#undef MIN_RARE_COUNT
-#undef MAX_RARE_COUNT
-#undef MIN_DEEP_COUNT
-#undef MAX_DEEP_COUNT
-#undef ITERATE_BEFORE_FAIL
-
-#undef RESOURCE_HIGH_MAX
-#undef RESOURCE_HIGH_MIN
-#undef RESOURCE_MID_MAX
-#undef RESOURCE_MID_MIN
-#undef RESOURCE_LOW_MAX
-#undef RESOURCE_LOW_MIN
diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm
index 5b19064160..a770aa791d 100644
--- a/code/modules/mining/drilling/scanner.dm
+++ b/code/modules/mining/drilling/scanner.dm
@@ -23,7 +23,7 @@
"exotic matter" = 0
)
- for(var/turf/T in oview(3,get_turf(user)))
+ for(var/turf/T in range(3,get_turf(user)))
if(!T.has_resources)
continue
diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm
index ff159ff122..a3b601ebce 100644
--- a/code/modules/mining/mine_items.dm
+++ b/code/modules/mining/mine_items.dm
@@ -49,21 +49,22 @@
/*****************************Pickaxe********************************/
/obj/item/weapon/pickaxe
- name = "pickaxe"
+ name = "mining drill"
+ desc = "The most basic of mining drills, for short excavations and small mineral extractions."
icon = 'icons/obj/items.dmi'
- icon_state = "pickaxe"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
force = 15.0
throwforce = 4.0
- item_state = "pickaxe"
+ icon_state = "pickaxe"
+ item_state = "jackhammer"
w_class = 4.0
matter = list("metal" = 3750)
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
origin_tech = "materials=1;engineering=1"
- attack_verb = list("hit", "pierced", "sliced", "attacked")
+ attack_verb = list("hit", "pierced", "sliced", "attacked", "drilled")
var/drill_sound = 'sound/weapons/Genhit.ogg'
- var/drill_verb = "picking"
+ var/drill_verb = "drilling"
sharp = 1
var/excavation_amount = 100
@@ -82,7 +83,7 @@
desc = "This makes no metallurgic sense."
/obj/item/weapon/pickaxe/drill
- name = "mining drill" // Can dig sand as well!
+ name = "advanced mining drill" // Can dig sand as well!
icon_state = "handdrill"
item_state = "jackhammer"
digspeed = 30
@@ -150,7 +151,7 @@
desc = "A large tool for digging and moving dirt."
icon = 'icons/obj/items.dmi'
icon_state = "shovel"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
slot_flags = SLOT_BELT
force = 8.0
throwforce = 4.0
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index 095fe8045f..c56bcde642 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -29,7 +29,8 @@
/turf/simulated/mineral/New()
- MineralSpread()
+ spawn(0)
+ MineralSpread()
spawn(2)
var/list/step_overlays = list("s" = NORTH, "n" = SOUTH, "w" = EAST, "e" = WEST)
@@ -86,7 +87,7 @@
if(mineral && mineral.spread)
for(var/trydir in cardinal)
if(prob(mineral.spread_chance))
- var/turf/simulated/mineral/random/target_turf = get_step(src, trydir)
+ var/turf/simulated/mineral/target_turf = get_step(src, trydir)
if(istype(target_turf) && !target_turf.mineral)
target_turf.mineral = mineral
target_turf.UpdateMineral()
@@ -363,7 +364,7 @@
/turf/simulated/mineral/random
name = "Mineral deposit"
var/mineralSpawnChanceList = list("Uranium" = 5, "Platinum" = 5, "Iron" = 35, "Coal" = 35, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Phoron" = 10)
- var/mineralChance = 10 //means 10% chance of this plot changing to a mineral deposit
+ var/mineralChance = 100 //10 //means 10% chance of this plot changing to a mineral deposit
/turf/simulated/mineral/random/New()
if (prob(mineralChance) && !mineral)
@@ -379,7 +380,7 @@
. = ..()
/turf/simulated/mineral/random/high_chance
- mineralChance = 25
+ mineralChance = 100 //25
mineralSpawnChanceList = list("Uranium" = 10, "Platinum" = 10, "Iron" = 20, "Coal" = 20, "Diamond" = 2, "Gold" = 10, "Silver" = 10, "Phoron" = 20)
diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm
index 05d2caa9a2..d49ccc222f 100644
--- a/code/modules/mining/money_bag.dm
+++ b/code/modules/mining/money_bag.dm
@@ -4,7 +4,7 @@
icon = 'icons/obj/storage.dmi'
name = "Money bag"
icon_state = "moneybag"
- flags = FPRINT | TABLEPASS| CONDUCT
+ flags = CONDUCT
force = 10.0
throwforce = 2.0
w_class = 4.0
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index c1d577834d..85e640d1b3 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -26,7 +26,7 @@
/mob/dead/observer/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
- see_invisible = SEE_INVISIBLE_OBSERVER
+ see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
see_in_dark = 100
verbs += /mob/dead/observer/proc/dead_tele
@@ -404,14 +404,20 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]"
-/mob/dead/observer/verb/toggle_darkness()
- set name = "Toggle Darkness"
+/mob/dead/observer/verb/toggle_sight()
+ set name = "Toggle Sight"
set category = "Ghost"
- if (see_invisible == SEE_INVISIBLE_OBSERVER_NOLIGHTING)
- see_invisible = SEE_INVISIBLE_OBSERVER
- else
- see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
+ switch(see_invisible)
+ if(SEE_INVISIBLE_OBSERVER_AI_EYE)
+ see_invisible = SEE_INVISIBLE_OBSERVER_NOOBSERVERS
+ usr << "You no longer see other observers or the AI eye."
+ if(SEE_INVISIBLE_OBSERVER_NOOBSERVERS)
+ see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
+ usr << "You no longer see darkness."
+ else
+ see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
+ usr << "You again see everything."
/mob/dead/observer/verb/become_mouse()
set name = "Become mouse"
diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm
index 3d96e3d9c0..a97d616dee 100644
--- a/code/modules/mob/death.dm
+++ b/code/modules/mob/death.dm
@@ -52,6 +52,8 @@
if(stat == DEAD)
return 0
+ facing_dir = null
+
if(!gibbed && deathmessage != "no message") // This is gross, but reliable. Only brains use it.
src.visible_message("\The [src.name] [deathmessage]")
diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm
index 8c16691dc6..8862479b2a 100644
--- a/code/modules/mob/emote.dm
+++ b/code/modules/mob/emote.dm
@@ -12,7 +12,7 @@
var/input
if(!message)
- input = copytext(sanitize(input(src,"Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
+ input = sanitize(copytext(input(src,"Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
else
input = message
if(input)
@@ -108,7 +108,7 @@
var/input
if(!message)
- input = copytext(sanitize(input(src, "Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)
+ input = sanitize(copytext(input(src, "Choose an emote to display.") as text|null, 1, MAX_MESSAGE_LEN))
else
input = message
diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm
index c238aef026..8b39a00aa5 100644
--- a/code/modules/mob/hear_say.dm
+++ b/code/modules/mob/hear_say.dm
@@ -67,13 +67,19 @@
src << "[speaker_name][alt_name] talks but you cannot hear \him."
else
if(language)
- src << "[speaker_name][alt_name] [track][language.format_message(message, verb)]"
+ on_hear_say("[speaker_name][alt_name] [track][language.format_message(message, verb)]")
else
- src << "[speaker_name][alt_name] [track][verb], \"[message]\""
+ on_hear_say("[speaker_name][alt_name] [track][verb], \"[message]\"")
if (speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z))
var/turf/source = speaker? get_turf(speaker) : get_turf(src)
src.playsound_local(source, speech_sound, sound_vol, 1)
+/mob/proc/on_hear_say(var/message)
+ src << message
+
+/mob/living/silicon/on_hear_say(var/message)
+ var/time = say_timestamp()
+ src << "[time] [message]"
/mob/proc/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="")
@@ -101,7 +107,7 @@
return
else
if(language)
- message = language.scramble(language)
+ message = language.scramble(message)
else
message = stars(message)
@@ -125,17 +131,26 @@
if(istype(src, /mob/living/silicon/ai) && !hard_to_hear)
var/jobname // the mob's "job"
- var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any.
+ var/mob/living/carbon/human/impersonating //The crew member being impersonated, if any.
if (ishuman(speaker))
var/mob/living/carbon/human/H = speaker
- if((H.wear_id && istype(H.wear_id,/obj/item/weapon/card/id/syndicate)) && (H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice)))
-
+ if(H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice))
changed_voice = 1
- var/mob/living/carbon/human/I = locate(speaker_name)
+ var/list/impersonated = new()
+ var/mob/living/carbon/human/I = impersonated[speaker_name]
- if(I)
+ if(!I)
+ for(var/mob/living/carbon/human/M in mob_list)
+ if(M.real_name == speaker_name)
+ I = M
+ impersonated[speaker_name] = I
+ break
+
+ // If I's display name is currently different from the voice name and using an agent ID then don't impersonate
+ // as this would allow the AI to track I and realize the mismatch.
+ if(I && !(I.name != speaker_name && I.wear_id && istype(I.wear_id,/obj/item/weapon/card/id/syndicate)))
impersonating = I
jobname = impersonating.get_assignment()
else
@@ -175,10 +190,22 @@
if(sdisabilities & DEAF || ear_deaf)
if(prob(20))
src << "You feel your headset vibrate but can hear nothing from it!"
- else if(track)
- src << "[part_a][track][part_b][formatted]"
else
- src << "[part_a][speaker_name][part_b][formatted]"
+ on_hear_radio(part_a, speaker_name, track, part_b, formatted)
+
+/proc/say_timestamp()
+ return "\[[worldtime2text()]\]"
+
+/mob/proc/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
+ src << "[part_a][speaker_name][part_b][formatted]"
+
+/mob/living/silicon/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
+ var/time = say_timestamp()
+ src << "[time][part_a][speaker_name][part_b][formatted]"
+
+/mob/living/silicon/ai/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
+ var/time = say_timestamp()
+ src << "[time][part_a][track][part_b][formatted]"
/mob/proc/hear_signlang(var/message, var/verb = "gestures", var/datum/language/language, var/mob/speaker = null)
if(!client)
diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm
index 81e8137f04..96eb6f11a3 100644
--- a/code/modules/mob/holder.dm
+++ b/code/modules/mob/holder.dm
@@ -40,8 +40,9 @@
/mob/living/var/holder_type
/mob/living/proc/get_scooped(var/mob/living/carbon/grabber)
- if(!holder_type)
+ if(!holder_type || buckled || pinned.len)
return
+
var/obj/item/weapon/holder/H = new holder_type(loc)
src.loc = H
H.name = loc.name
diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm
index 4191a8d140..26583eca50 100755
--- a/code/modules/mob/language.dm
+++ b/code/modules/mob/language.dm
@@ -1,3 +1,5 @@
+#define SCRAMBLE_CACHE_LEN 20
+
/*
Datum based languages. Easily editable and modular.
*/
@@ -35,11 +37,21 @@
return "[trim(full_name)]"
+/datum/language
+ var/list/scramble_cache = list()
+
/datum/language/proc/scramble(var/input)
if(!syllables || !syllables.len)
return stars(input)
+ // If the input is cached already, move it to the end of the cache and return it
+ if(input in scramble_cache)
+ var/n = scramble_cache[input]
+ scramble_cache -= input
+ scramble_cache[input] = n
+ return n
+
var/input_size = length(input)
var/scrambled_text = ""
var/capitalize = 1
@@ -64,6 +76,13 @@
var/input_ending = copytext(input, input_size)
if(input_ending in list("!","?","."))
scrambled_text += input_ending
+
+ // Add it to cache, cutting old entries if the list is too long
+ scramble_cache[input] = scrambled_text
+ if(scramble_cache.len > SCRAMBLE_CACHE_LEN)
+ scramble_cache.Cut(1, scramble_cache.len-SCRAMBLE_CACHE_LEN-1)
+
+
return scrambled_text
/datum/language/proc/format_message(message, verb)
@@ -496,4 +515,6 @@
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
-"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")
\ No newline at end of file
+"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")
+
+#undef SCRAMBLE_CACHE_LEN
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 67a134ec9b..c9b3175eb8 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -7,6 +7,7 @@
pass_flags = PASSTABLE
health = 100
maxHealth = 100
+ mob_size = 4
var/adult_form
var/dead_icon
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index f36de5ded9..6ec6b4fce4 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -3,7 +3,6 @@
health = 400 //They need to live awhile longer than other organs.
desc = "A piece of juicy meat found in a person's head."
icon_state = "brain2"
- flags = TABLEPASS
force = 1.0
w_class = 2.0
throwforce = 1.0
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index b1170468d8..a669e03d32 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -1,6 +1,8 @@
/mob/living/carbon/Life()
..()
+ handle_viruses()
+
// Increase germ_level regularly
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
germ_level++
@@ -354,6 +356,8 @@
else if (W == handcuffed)
handcuffed = null
update_inv_handcuffed()
+ if(buckled && buckled.buckle_require_restraints)
+ buckled.unbuckle_mob()
else if (W == legcuffed)
legcuffed = null
diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm
index bf72360399..55b33324fb 100644
--- a/code/modules/mob/living/carbon/carbon_defines.dm
+++ b/code/modules/mob/living/carbon/carbon_defines.dm
@@ -3,7 +3,7 @@
var/datum/species/species //Contains icon generation and language information, set during New().
var/list/stomach_contents = list()
var/list/datum/disease2/disease/virus2 = list()
- var/antibodies = 0
+ var/list/antibodies = list()
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm
index 47e4282424..107e660d39 100644
--- a/code/modules/mob/living/carbon/give.dm
+++ b/code/modules/mob/living/carbon/give.dm
@@ -1,18 +1,14 @@
-/mob/living/carbon/verb/give()
+mob/living/carbon/verb/give(var/mob/living/carbon/target in view(1)-usr)
set category = "IC"
set name = "Give"
- set src in view(1)
- if(src.stat == 2 || usr.stat == 2 || src.client == null)
- return
- if(src == usr)
- usr << "\red I feel stupider, suddenly."
+ if(target.stat == 2 || usr.stat == 2|| target.client == null)
return
var/obj/item/I
if(!usr.hand && usr.r_hand == null)
- usr << "\red You don't have anything in your right hand to give to [src.name]"
+ usr << "You don't have anything in your right hand to give to [target.name]"
return
if(usr.hand && usr.l_hand == null)
- usr << "\red You don't have anything in your left hand to give to [src.name]"
+ usr << "You don't have anything in your left hand to give to [target.name]"
return
if(usr.hand)
I = usr.l_hand
@@ -20,38 +16,38 @@
I = usr.r_hand
if(!I)
return
- if(src.r_hand == null || src.l_hand == null)
- switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
+ if(target.r_hand == null || target.l_hand == null)
+ switch(alert(target,"[usr] wants to give you \a [I]?",,"Yes","No"))
if("Yes")
if(!I)
return
if(!Adjacent(usr))
- usr << "\red You need to stay in reaching distance while giving an object."
- src << "\red [usr.name] moved too far away."
+ usr << "You need to stay in reaching distance while giving an object."
+ target << "[usr.name] moved too far away."
return
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
- usr << "\red You need to keep the item in your active hand."
- src << "\red [usr.name] seem to have given up on giving \the [I.name] to you."
+ usr << "You need to keep the item in your active hand."
+ target << "[usr.name] seem to have given up on giving \the [I.name] to you."
return
- if(src.r_hand != null && src.l_hand != null)
- src << "\red Your hands are full."
- usr << "\red Their hands are full."
+ if(target.r_hand != null && target.l_hand != null)
+ target << "Your hands are full."
+ usr << "Their hands are full."
return
else
usr.drop_item()
- if(src.r_hand == null)
- src.r_hand = I
+ if(target.r_hand == null)
+ target.r_hand = I
else
- src.l_hand = I
- I.loc = src
+ target.l_hand = I
+ I.loc = target
I.layer = 20
- I.add_fingerprint(src)
- src.update_inv_l_hand()
- src.update_inv_r_hand()
+ I.add_fingerprint(target)
+ target.update_inv_l_hand()
+ target.update_inv_r_hand()
usr.update_inv_l_hand()
usr.update_inv_r_hand()
- src.visible_message("\blue [usr.name] handed \the [I.name] to [src.name].")
+ target.visible_message("[usr.name] handed \the [I.name] to [target.name].")
if("No")
- src.visible_message("\red [usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
+ target.visible_message("[usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.")
else
- usr << "\red [src.name]'s hands are full."
+ usr << "[target.name]'s hands are full."
diff --git a/code/WorkInProgress/Cib/MedicalSideEffects.dm b/code/modules/mob/living/carbon/human/MedicalSideEffects.dm
similarity index 100%
rename from code/WorkInProgress/Cib/MedicalSideEffects.dm
rename to code/modules/mob/living/carbon/human/MedicalSideEffects.dm
diff --git a/code/modules/mob/living/carbon/human/chem_side_effects.dm b/code/modules/mob/living/carbon/human/chem_side_effects.dm
new file mode 100644
index 0000000000..62f9cf75f8
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/chem_side_effects.dm
@@ -0,0 +1,149 @@
+// MEDICAL SIDE EFFECT BASE
+// ========================
+/datum/medical_effect
+ var/name = "None"
+ var/strength = 0
+ var/start = 0
+ var/list/triggers
+ var/list/cures
+ var/cure_message
+
+/datum/medical_effect/proc/manifest(mob/living/carbon/human/H)
+ for(var/R in cures)
+ if(H.reagents.has_reagent(R))
+ return 0
+ for(var/R in triggers)
+ if(H.reagents.get_reagent_amount(R) >= triggers[R])
+ return 1
+ return 0
+
+/datum/medical_effect/proc/on_life(mob/living/carbon/human/H, strength)
+ return
+
+/datum/medical_effect/proc/cure(mob/living/carbon/human/H)
+ for(var/R in cures)
+ if(H.reagents.has_reagent(R))
+ if (cure_message)
+ H <<"\blue [cure_message]"
+ return 1
+ return 0
+
+
+// MOB HELPERS
+// ===========
+/mob/living/carbon/human/var/list/datum/medical_effect/side_effects = list()
+/mob/proc/add_side_effect(name, strength = 0)
+/mob/living/carbon/human/add_side_effect(name, strength = 0)
+ for(var/datum/medical_effect/M in src.side_effects)
+ if(M.name == name)
+ M.strength = max(M.strength, 10)
+ M.start = life_tick
+ return
+
+
+ var/T = side_effects[name]
+ if (!T)
+ return
+
+ var/datum/medical_effect/M = new T
+ if(M.name == name)
+ M.strength = strength
+ M.start = life_tick
+ side_effects += M
+
+/mob/living/carbon/human/proc/handle_medical_side_effects()
+ //Going to handle those things only every few ticks.
+ if(life_tick % 15 != 0)
+ return 0
+
+ var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
+ for(var/T in L)
+ var/datum/medical_effect/M = new T
+ if (M.manifest(src))
+ src.add_side_effect(M.name)
+
+ // One full cycle(in terms of strength) every 10 minutes
+ for (var/datum/medical_effect/M in side_effects)
+ if (!M) continue
+ var/strength_percent = sin((life_tick - M.start) / 2)
+
+ // Only do anything if the effect is currently strong enough
+ if(strength_percent >= 0.4)
+ if (M.cure(src) || M.strength > 50)
+ side_effects -= M
+ M = null
+ else
+ if(life_tick % 45 == 0)
+ M.on_life(src, strength_percent*M.strength)
+ // Effect slowly growing stronger
+ M.strength+=0.08
+
+// HEADACHE
+// ========
+/datum/medical_effect/headache
+ name = "Headache"
+ triggers = list("cryoxadone" = 10, "bicaridine" = 15, "tricordrazine" = 15)
+ cures = list("alkysine", "tramadol", "paracetamol", "oxycodone")
+ cure_message = "Your head stops throbbing..."
+
+/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
+ switch(strength)
+ if(1 to 10)
+ H.custom_pain("You feel a light pain in your head.",0)
+ if(11 to 30)
+ H.custom_pain("You feel a throbbing pain in your head!",1)
+ if(31 to INFINITY)
+ H.custom_pain("You feel an excrutiating pain in your head!",1)
+
+// BAD STOMACH
+// ===========
+/datum/medical_effect/bad_stomach
+ name = "Bad Stomach"
+ triggers = list("kelotane" = 30, "dermaline" = 15)
+ cures = list("anti_toxin")
+ cure_message = "Your stomach feels a little better now..."
+
+/datum/medical_effect/bad_stomach/on_life(mob/living/carbon/human/H, strength)
+ switch(strength)
+ if(1 to 10)
+ H.custom_pain("You feel a bit light around the stomach.",0)
+ if(11 to 30)
+ H.custom_pain("Your stomach hurts.",0)
+ if(31 to INFINITY)
+ H.custom_pain("You feel sick.",1)
+
+// CRAMPS
+// ======
+/datum/medical_effect/cramps
+ name = "Cramps"
+ triggers = list("anti_toxin" = 30, "tramadol" = 15)
+ cures = list("inaprovaline")
+ cure_message = "The cramps let up..."
+
+/datum/medical_effect/cramps/on_life(mob/living/carbon/human/H, strength)
+ switch(strength)
+ if(1 to 10)
+ H.custom_pain("The muscles in your body hurt a little.",0)
+ if(11 to 30)
+ H.custom_pain("The muscles in your body cramp up painfully.",0)
+ if(31 to INFINITY)
+ H.emote("me",1,"flinches as all the muscles in their body cramp up.")
+ H.custom_pain("There's pain all over your body.",1)
+
+// ITCH
+// ====
+/datum/medical_effect/itch
+ name = "Itch"
+ triggers = list("space_drugs" = 10)
+ cures = list("inaprovaline")
+ cure_message = "The itching stops..."
+
+/datum/medical_effect/itch/on_life(mob/living/carbon/human/H, strength)
+ switch(strength)
+ if(1 to 10)
+ H.custom_pain("You feel a slight itch.",0)
+ if(11 to 30)
+ H.custom_pain("You want to scratch your itch badly.",0)
+ if(31 to INFINITY)
+ H.emote("me",1,"shivers slightly.")
+ H.custom_pain("This itch makes it really hard to concentrate.",1)
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index 9ed050b5ae..9571a789a8 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -28,8 +28,9 @@
if(stat == DEAD) return
- hud_updateflag |= 1 << HEALTH_HUD
- hud_updateflag |= 1 << STATUS_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
+ BITSET(hud_updateflag, STATUS_HUD)
+
handle_hud_list()
//Handle species-specific deaths.
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index ec1e1539bb..2140fe22b3 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -50,7 +50,7 @@
m_type = 1
if ("custom")
- var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
+ var/input = sanitize(copytext(input("Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
if (!input)
return
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
@@ -577,7 +577,7 @@
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
- pose = copytext(sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
+ pose = sanitize(copytext(input(usr, "This is [src]. \He is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
/mob/living/carbon/human/verb/set_flavor()
set name = "Set Flavour Text"
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 777c17fdbc..687314f1dd 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -63,8 +63,8 @@
var/tie_msg
if(istype(w_uniform,/obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
- if(U.hastie)
- tie_msg += " with \icon[U.hastie] \a [U.hastie]"
+ if(U.accessories.len)
+ tie_msg += " with [lowertext(english_list(U.accessories))]"
if(w_uniform.blood_DNA)
msg += "[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != "#030303") ? "blood" : "oil"]-stained [w_uniform.name][tie_msg]!\n"
@@ -131,6 +131,10 @@
else
msg += "[t_He] [t_is] \icon[handcuffed] handcuffed!\n"
+ //buckled
+ if(buckled)
+ msg += "[t_He] [t_is] \icon[buckled] buckled to [buckled]!\n"
+
//belt
if(belt)
if(belt.blood_DNA)
@@ -219,7 +223,10 @@
usr << "[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]..."
else
usr << "[t_He] has a pulse!"
-
+ if(fire_stacks)
+ msg += "[t_He] [t_is] covered in some liquid.\n"
+ if(on_fire)
+ msg += "[t_He] [t_is] on fire!.\n"
msg += ""
if(nutrition < 100)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 792fd48e2e..dd5bfe7d59 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -241,7 +241,7 @@
Suit Storage: [(s_store ? s_store : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")]
[(handcuffed ? text("Handcuffed") : text("Not Handcuffed"))]
[(legcuffed ? text("Legcuffed") : text(""))]
-
[(suit) ? ((suit.hastie) ? text(" Remove Accessory", src) : "") :]
+
[(suit) ? ((suit.accessories.len) ? text(" Remove Accessory", src) : "") :]
[(internal ? text("Remove Internal") : "")]
Remove Splints
Empty Pockets
@@ -412,7 +412,7 @@
modified = 1
spawn()
- hud_updateflag |= 1 << WANTED_HUD
+ BITSET(hud_updateflag, WANTED_HUD)
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
U.handle_regular_hud_updates()
@@ -499,7 +499,7 @@
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
- var/t1 = copytext(sanitize(input("Add Comment:", "Sec. records", null, null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
return
var/counter = 1
@@ -628,7 +628,7 @@
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
- var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
return
var/counter = 1
@@ -1301,4 +1301,4 @@
/mob/living/carbon/human/slip(var/slipped_on, stun_duration=8)
if((species.flags & NO_SLIP) || (shoes && (shoes.flags & NOSLIP)))
return 0
- ..(slipped_on,stun_duration)
\ No newline at end of file
+ ..(slipped_on,stun_duration)
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 60f1f8a3a2..561659a27a 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -87,7 +87,7 @@
take_overall_damage(amount, 0)
else
heal_overall_damage(-amount, 0)
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
/mob/living/carbon/human/adjustFireLoss(var/amount)
if(species && species.burn_mod)
@@ -97,7 +97,7 @@
take_overall_damage(0, amount)
else
heal_overall_damage(0, -amount)
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
/mob/living/carbon/human/proc/adjustBruteLossByPart(var/amount, var/organ_name, var/obj/damage_source = null)
if(species && species.brute_mod)
@@ -112,7 +112,7 @@
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
/mob/living/carbon/human/proc/adjustFireLossByPart(var/amount, var/organ_name, var/obj/damage_source = null)
if(species && species.burn_mod)
@@ -127,7 +127,7 @@
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
/mob/living/carbon/human/Stun(amount)
if(HULK in mutations) return
@@ -185,7 +185,7 @@
if (O.status & ORGAN_MUTATED)
O.unmutate()
src << "Your [O.display_name] is shaped normally again."
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
// Defined here solely to take species flags into account without having to recast at mob/living level.
/mob/living/carbon/human/getOxyLoss()
@@ -249,7 +249,7 @@
var/datum/organ/external/picked = pick(parts)
if(picked.heal_damage(brute,burn))
UpdateDamageIcon()
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
updatehealth()
@@ -265,7 +265,7 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
var/datum/organ/external/picked = pick(parts)
if(picked.take_damage(brute,burn,sharp,edge))
UpdateDamageIcon()
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
updatehealth()
speech_problem_flag = 1
@@ -288,7 +288,7 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
parts -= picked
updatehealth()
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
speech_problem_flag = 1
if(update) UpdateDamageIcon()
@@ -309,7 +309,7 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
parts -= picked
updatehealth()
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
if(update) UpdateDamageIcon()
@@ -336,7 +336,7 @@ This function restores all organs.
if(istype(E, /datum/organ/external))
if (E.heal_damage(brute, burn))
UpdateDamageIcon()
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
else
return 0
return
@@ -393,5 +393,5 @@ This function restores all organs.
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
- hud_updateflag |= 1 << HEALTH_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
return 1
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 414f7e2bfb..a45a11f453 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -24,7 +24,7 @@ emp_act
if(!(def_zone in list("chest", "groin")))
reflectchance /= 2
if(prob(reflectchance))
- visible_message("\red The [P.name] gets reflected by [src]'s [wear_suit.name]!")
+ visible_message("\red \The [P] gets reflected by \the [src]'s [wear_suit.name]!")
// Find a turf near or on the original location to bounce to
if(P.starting)
@@ -33,12 +33,7 @@ emp_act
var/turf/curloc = get_turf(src)
// redirect the projectile
- P.original = locate(new_x, new_y, P.z)
- P.starting = curloc
- P.current = curloc
- P.firer = src
- P.yo = new_y - curloc.y
- P.xo = new_x - curloc.x
+ P.redirect(new_x, new_y, curloc, src)
return -1 // complete projectile permutation
@@ -47,9 +42,9 @@ emp_act
var/armor = getarmor_organ(organ, "bullet")
if((P.embed && prob(20 + max(P.damage - armor, -10))))
var/obj/item/weapon/shard/shrapnel/SP = new()
- (SP.name) = "[P.name] shrapnel"
- (SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]."
- (SP.loc) = organ
+ SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
+ SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
+ SP.loc = organ
organ.embed(SP)
return (..(P , def_zone))
diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm
index 546ec3ba83..c4ed2d00ff 100644
--- a/code/modules/mob/living/carbon/human/human_movement.dm
+++ b/code/modules/mob/living/carbon/human/human_movement.dm
@@ -47,7 +47,7 @@
tally += 0.5
else if(E.status & ORGAN_BROKEN)
tally += 1.5
-
+
if(shock_stage >= 10) tally += 3
if(FAT in src.mutations)
@@ -55,7 +55,7 @@
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
- tally += 2*stance_damage //damaged/missing feet or legs is slow
+ tally += max(2 * stance_damage, 0) //damaged/missing feet or legs is slow
if(mRun in mutations)
tally = 0
diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm
index 13dd13413e..1150a52e71 100644
--- a/code/modules/mob/living/carbon/human/human_powers.dm
+++ b/code/modules/mob/living/carbon/human/human_powers.dm
@@ -175,7 +175,7 @@
text = input("What would you like to say?", "Speak to creature", null, null)
- text = trim(copytext(sanitize(text), 1, MAX_MESSAGE_LEN))
+ text = trim(sanitize(copytext(text, 1, MAX_MESSAGE_LEN)))
if(!text) return
@@ -213,7 +213,7 @@
set desc = "Whisper silently to someone over a distance."
set category = "Abilities"
- var/msg = sanitize(input("Message:", "Psychic Whisper") as text|null)
+ var/msg = sanitize(copytext(input("Message:", "Psychic Whisper") as text|null, 1, MAX_MESSAGE_LEN))
if(msg)
log_say("PsychicWhisper: [key_name(src)]->[M.key] : [msg]")
M << "\green You hear a strange, alien voice in your head... \italic [msg]"
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 0a504ca148..b4c2a18c1d 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -167,6 +167,8 @@
update_inv_back()
else if (W == handcuffed)
handcuffed = null
+ if(buckled && buckled.buckle_require_restraints)
+ buckled.unbuckle_mob()
success = 1
update_inv_handcuffed()
else if (W == legcuffed)
@@ -495,15 +497,17 @@
message = "\red [source] is trying to unlegcuff [target]!"
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
- target.attack_log += text("\[[time_stamp()]\] Has had their accessory ([suit.hastie]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) accessory ([suit.hastie])")
- if(istype(suit.hastie, /obj/item/clothing/tie/holobadge) || istype(suit.hastie, /obj/item/clothing/tie/medal))
- for(var/mob/M in viewers(target, null))
- M.show_message("\red [source] tears off \the [suit.hastie] from [target]'s suit!" , 1)
- done()
- return
- else
- message = "\red [source] is trying to take off \a [suit.hastie] from [target]'s suit!"
+ if(suit.accessories.len)
+ var/obj/item/clothing/accessory/A = suit.accessories[1]
+ target.attack_log += "\[[time_stamp()]\] Has had their accessory ([A]) removed by [source.name] ([source.ckey])"
+ source.attack_log += "\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) accessory ([A])"
+ if(istype(A, /obj/item/clothing/accessory/holobadge) || istype(A, /obj/item/clothing/accessory/medal))
+ for(var/mob/M in viewers(target, null))
+ M.show_message("\red [source] tears off \the [A] from [target]'s [suit]!" , 1)
+ done()
+ return
+ else
+ message = "\red [source] is trying to take off \a [A] from [target]'s [suit]!"
if("pockets")
target.attack_log += text("\[[time_stamp()]\] Has had their pockets emptied by [source.name] ([source.ckey])")
source.attack_log += text("\[[time_stamp()]\] Attempted to empty [target.name]'s ([target.ckey]) pockets")
@@ -632,17 +636,18 @@ It can still be worn/put on as normal.
strip_item = target.wear_suit
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
- //var/obj/item/clothing/tie/tie = suit.hastie
+ //var/obj/item/clothing/accessory/tie = suit.hastie
/*if(tie)
- if (istype(tie,/obj/item/clothing/tie/storage))
- var/obj/item/clothing/tie/storage/W = tie
+ if (istype(tie,/obj/item/clothing/accessory/storage))
+ var/obj/item/clothing/accessory/storage/W = tie
if (W.hold)
W.hold.close(usr)
usr.put_in_hands(tie)
suit.hastie = null*/
- if(suit && suit.hastie)
- suit.hastie.on_removed(usr)
- suit.hastie = null
+ if(suit && suit.accessories.len)
+ var/obj/item/clothing/accessory/A = suit.accessories[1]
+ A.on_removed(usr)
+ suit.accessories -= A
target.update_inv_w_uniform()
if("id")
slot_to_process = slot_wear_id
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 72c281a1f2..05ea0a9714 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -93,8 +93,6 @@
//Random events (vomiting etc)
handle_random_events()
- handle_virus_updates()
-
//stuff in the stomach
handle_stomach()
@@ -112,6 +110,9 @@
//Handle temperature/pressure differences between body and environment
handle_environment(environment) //Optimized a good bit.
+ //Check if we're on fire
+ handle_fire()
+
//Status updates, death etc.
handle_regular_status_updates() //Optimized a bit
update_canmove()
@@ -134,7 +135,7 @@
var/pressure_adjustment_coefficient = 1 // Assume no protection at first.
- if(wear_suit && (wear_suit.flags & STOPSPRESSUREDMAGE) && head && (head.flags & STOPSPRESSUREDMAGE)) // Complete set of pressure-proof suit worn, assume fully sealed.
+ if(wear_suit && (wear_suit.flags & STOPPRESSUREDAMAGE) && head && (head.flags & STOPPRESSUREDAMAGE)) // Complete set of pressure-proof suit worn, assume fully sealed.
pressure_adjustment_coefficient = 0
// Handles breaches in your space suit. 10 suit damage equals a 100% loss of pressure protection.
@@ -598,8 +599,9 @@
failed_last_breath = 0
adjustOxyLoss(-5)
+
// Hot air hurts :(
- if( (breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
+ if((breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
if(breath.temperature < species.cold_level_1)
if(prob(20))
@@ -643,6 +645,10 @@
//world << "Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]"
bodytemperature += temp_adj
+ else if(breath.temperature >= species.heat_discomfort_level)
+ species.get_environment_discomfort(src,"heat")
+ else if(breath.temperature <= species.cold_discomfort_level)
+ species.get_environment_discomfort(src,"cold")
breath.update_values()
return 1
@@ -783,6 +789,8 @@
if (abs(body_temperature_difference) < 0.5)
return //fuck this precision
+ if (on_fire)
+ return //too busy for pesky convection
if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
@@ -1039,8 +1047,7 @@
if(halloss > 100)
src << "You're in too much pain to keep going..."
- for(var/mob/O in oviewers(src, null))
- O.show_message("[src] slumps to the ground, too weak to continue fighting.", 1)
+ src.visible_message("[src] slumps to the ground, too weak to continue fighting.")
Paralyse(10)
setHalLoss(99)
@@ -1451,47 +1458,6 @@
if(!currentTurf.lighting_lumcount)
playsound_local(src,pick(scarySounds),50, 1, -1)
- proc/handle_virus_updates()
- if(status_flags & GODMODE) return 0 //godmode
- if(bodytemperature > 406)
- for(var/datum/disease/D in viruses)
- D.cure()
- for (var/ID in virus2)
- var/datum/disease2/disease/V = virus2[ID]
- V.cure(src)
- if(life_tick % 3) //don't spam checks over all objects in view every tick.
- for(var/obj/effect/decal/cleanable/O in view(1,src))
- if(istype(O,/obj/effect/decal/cleanable/blood))
- var/obj/effect/decal/cleanable/blood/B = O
- if(B.virus2.len)
- for (var/ID in B.virus2)
- var/datum/disease2/disease/V = B.virus2[ID]
- infect_virus2(src,V.getcopy())
-
- else if(istype(O,/obj/effect/decal/cleanable/mucus))
- var/obj/effect/decal/cleanable/mucus/M = O
- if(M.virus2.len)
- for (var/ID in M.virus2)
- var/datum/disease2/disease/V = M.virus2[ID]
- infect_virus2(src,V.getcopy())
-
-
- if(virus2.len)
- for (var/ID in virus2)
- var/datum/disease2/disease/V = virus2[ID]
- if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
- CRASH("virus2 nulled before calling activate()")
- else
- V.activate(src)
- // activate may have deleted the virus
- if(!V) continue
-
- // check if we're immune
- if(V.antigen & src.antibodies)
- V.dead = 1
-
- return
-
proc/handle_stomach()
spawn(0)
for(var/mob/living/M in stomach_contents)
@@ -1605,8 +1571,7 @@
/mob/living/carbon/human/proc/handle_hud_list()
-
- if(hud_updateflag & 1 << HEALTH_HUD)
+ if (BITTEST(hud_updateflag, HEALTH_HUD))
var/image/holder = hud_list[HEALTH_HUD]
if(stat == 2)
holder.icon_state = "hudhealth-100" // X_X
@@ -1614,8 +1579,8 @@
var/percentage_health = RoundHealth((health-config.health_threshold_crit)/(maxHealth-config.health_threshold_crit)*100)
holder.icon_state = "hud[percentage_health]"
hud_list[HEALTH_HUD] = holder
-
- if(hud_updateflag & 1 << STATUS_HUD)
+
+ if (BITTEST(hud_updateflag, STATUS_HUD))
var/foundVirus = 0
for(var/datum/disease/D in viruses)
if(!D.hidden[SCANNER])
@@ -1651,8 +1616,8 @@
hud_list[STATUS_HUD] = holder
hud_list[STATUS_HUD_OOC] = holder2
-
- if(hud_updateflag & 1 << ID_HUD)
+
+ if (BITTEST(hud_updateflag, ID_HUD))
var/image/holder = hud_list[ID_HUD]
if(wear_id)
var/obj/item/weapon/card/id/I = wear_id.GetID()
@@ -1665,8 +1630,8 @@
hud_list[ID_HUD] = holder
-
- if(hud_updateflag & 1 << WANTED_HUD)
+
+ if (BITTEST(hud_updateflag, WANTED_HUD))
var/image/holder = hud_list[WANTED_HUD]
holder.icon_state = "hudblank"
var/perpname = name
@@ -1691,8 +1656,11 @@
holder.icon_state = "hudreleased"
break
hud_list[WANTED_HUD] = holder
-
- if(hud_updateflag & 1 << IMPLOYAL_HUD || hud_updateflag & 1 << IMPCHEM_HUD || hud_updateflag & 1 << IMPTRACK_HUD)
+
+ if ( BITTEST(hud_updateflag, IMPLOYAL_HUD) \
+ || BITTEST(hud_updateflag, IMPCHEM_HUD) \
+ || BITTEST(hud_updateflag, IMPTRACK_HUD))
+
var/image/holder1 = hud_list[IMPTRACK_HUD]
var/image/holder2 = hud_list[IMPLOYAL_HUD]
var/image/holder3 = hud_list[IMPCHEM_HUD]
@@ -1712,9 +1680,9 @@
hud_list[IMPTRACK_HUD] = holder1
hud_list[IMPLOYAL_HUD] = holder2
- hud_list[IMPCHEM_HUD] = holder3
-
- if(hud_updateflag & 1 << SPECIALROLE_HUD)
+ hud_list[IMPCHEM_HUD] = holder3
+
+ if (BITTEST(hud_updateflag, SPECIALROLE_HUD))
var/image/holder = hud_list[SPECIALROLE_HUD]
holder.icon_state = "hudblank"
if(mind)
@@ -1771,5 +1739,15 @@
speech_problem_flag = 1
return stuttering
+/mob/living/carbon/human/handle_fire()
+ if(..())
+ return
+
+ var/burn_temperature = fire_burn_temperature()
+ var/thermal_protection = get_heat_protection(burn_temperature)
+
+ if (thermal_protection < 1 && bodytemperature < burn_temperature)
+ bodytemperature += round(BODYTEMP_HEATING_MAX*(1-thermal_protection), 1)
+
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS
diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm
index 3f89f5b230..cf49b82364 100644
--- a/code/modules/mob/living/carbon/human/say.dm
+++ b/code/modules/mob/living/carbon/human/say.dm
@@ -23,8 +23,9 @@
var/message_mode = parse_message_mode(message, "headset")
- if(copytext(message,1,2) == "*")
- return emote(copytext(message,2))
+ switch(copytext(message,1,2))
+ if("*") return emote(copytext(message,2))
+ if("^") return custom_emote(1, copytext(message,2))
if(name != GetVoice())
alt_name = "(as [get_id_name("Unknown")])"
diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm
index 8bdfa8a59d..943f90bcca 100644
--- a/code/modules/mob/living/carbon/human/species/species.dm
+++ b/code/modules/mob/living/carbon/human/species/species.dm
@@ -56,7 +56,7 @@
var/cold_level_3 = 120 // Cold damage level 3 below this point.
var/heat_level_1 = 360 // Heat damage level 1 above this point.
var/heat_level_2 = 400 // Heat damage level 2 above this point.
- var/heat_level_3 = 1000 // Heat damage level 2 above this point.
+ var/heat_level_3 = 1000 // Heat damage level 3 above this point.
var/synth_temp_gain = 0 // IS_SYNTHETIC species will gain this much temperature every second
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
@@ -65,6 +65,20 @@
var/light_dam // If set, mob will be damaged in light over this value and heal in light below its negative.
var/body_temperature = 310.15 // Non-IS_SYNTHETIC species will try to stabilize at this temperature.
// (also affects temperature processing)
+
+ var/heat_discomfort_level = 315 // Aesthetic messages about feeling warm.
+ var/cold_discomfort_level = 285 // Aesthetic messages about feeling chilly.
+ var/list/heat_discomfort_strings = list(
+ "You feel sweat drip down your neck.",
+ "You feel uncomfortably warm.",
+ "Your skin prickles in the heat."
+ )
+ var/list/cold_discomfort_strings = list(
+ "You feel chilly.",
+ "You shiver suddely.",
+ "Your chilly flesh stands out in goosebumps."
+ )
+
// HUD data vars.
var/datum/hud_data/hud
var/hud_type
@@ -100,6 +114,27 @@
for(var/u_type in unarmed_types)
unarmed_attacks += new u_type()
+/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type)
+
+ if(!prob(5))
+ return
+
+ var/covered = 0 // Basic coverage can help.
+ for(var/obj/item/clothing/clothes in H)
+ if(H.l_hand == clothes|| H.r_hand == clothes)
+ continue
+ if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO))
+ covered = 1
+ break
+
+ switch(msg_type)
+ if("cold")
+ if(!covered)
+ H << "[pick(cold_discomfort_strings)]"
+ if("heat")
+ if(covered)
+ H << "[pick(heat_discomfort_strings)]"
+
/datum/species/proc/get_random_name(var/gender)
var/datum/language/species_language = all_languages[language]
return species_language.get_random_name(gender)
diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm
index b7b66d2fd4..bc46cf9c45 100644
--- a/code/modules/mob/living/carbon/human/species/station/station.dm
+++ b/code/modules/mob/living/carbon/human/species/station/station.dm
@@ -45,6 +45,20 @@
reagent_tag = IS_UNATHI
base_color = "#066000"
+ heat_discomfort_level = 295
+ heat_discomfort_strings = list(
+ "You feel soothingly warm.",
+ "You feel the heat sink into your bones.",
+ "You feel warm enough to take a nap."
+ )
+
+ cold_discomfort_level = 292
+ cold_discomfort_strings = list(
+ "You feel chilly.",
+ "You feel sluggish and cold.",
+ "Your scales bristle against the cold."
+ )
+
/datum/species/tajaran
name = "Tajara"
name_plural = "Tajaran"
@@ -54,6 +68,9 @@
tail = "tajtail"
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
darksight = 8
+ slowdown = -1
+ brute_mod = 1.2
+
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \
influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \
@@ -75,6 +92,14 @@
flesh_color = "#AFA59E"
base_color = "#333333"
+ heat_discomfort_level = 292
+ heat_discomfort_strings = list(
+ "Your fur prickles in the heat.",
+ "You feel uncomfortably warm.",
+ "Your overheated skin itches."
+ )
+ cold_discomfort_level = 275
+
/datum/species/skrell
name = "Skrell"
name_plural = "Skrell"
diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm
index 6079a3c044..c7c7fcc903 100644
--- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm
+++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm
@@ -15,7 +15,7 @@ var/const/MAX_ACTIVE_TIME = 400
icon_state = "facehugger"
item_state = "facehugger"
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
- flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | AIRTIGHT
+ flags = MASKCOVERSMOUTH | MASKCOVERSEYES | AIRTIGHT
body_parts_covered = FACE|EYES
throw_range = 5
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index cc053f219d..10b13d8736 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -126,8 +126,9 @@ Please contact me on #coderbus IRC. ~Carn x
#define LEGCUFF_LAYER 19
#define L_HAND_LAYER 20
#define R_HAND_LAYER 21
-#define TARGETED_LAYER 22 //BS12: Layer for the target overlay from weapon targeting system
-#define TOTAL_LAYERS 22
+#define FIRE_LAYER 22 //If you're on fire
+#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system
+#define TOTAL_LAYERS 23
//////////////////////////////////
/mob/living/carbon/human
@@ -508,6 +509,7 @@ proc/get_damage_icon_part(damage_state, body_part)
update_inv_handcuffed(0)
update_inv_legcuffed(0)
update_inv_pockets(0)
+ update_fire(0)
UpdateDamageIcon()
update_icons()
//Hud Stuff
@@ -535,10 +537,11 @@ proc/get_damage_icon_part(damage_state, body_part)
bloodsies.color = w_uniform.blood_color
standing.overlays += bloodsies
- if(w_uniform:hastie) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE.
- var/tie_color = w_uniform:hastie.item_color
- if(!tie_color) tie_color = w_uniform:hastie.icon_state
- standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
+ if(w_uniform:accessories.len) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE.
+ for(var/obj/item/clothing/accessory/A in w_uniform:accessories)
+ var/tie_color = A.item_color
+ if(!tie_color) tie_color = A.icon_state
+ standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
overlays_standing[UNIFORM_LAYER] = standing
else
@@ -567,8 +570,8 @@ proc/get_damage_icon_part(damage_state, body_part)
else
overlays_standing[ID_LAYER] = null
- hud_updateflag |= 1 << ID_HUD
- hud_updateflag |= 1 << WANTED_HUD
+ BITSET(hud_updateflag, ID_HUD)
+ BITSET(hud_updateflag, WANTED_HUD)
if(update_icons) update_icons()
@@ -778,7 +781,7 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
- if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/tie) ) && !(head && head.flags_inv & HIDEMASK))
+ if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory) ) && !(head && head.flags_inv & HIDEMASK))
wear_mask.screen_loc = ui_mask //TODO
var/image/standing
@@ -789,7 +792,7 @@ proc/get_damage_icon_part(damage_state, body_part)
else
standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
- if( !istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
+ if( !istype(wear_mask, /obj/item/clothing/mask/smokable/cigarette) && wear_mask.blood_DNA )
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
bloodsies.color = wear_mask.blood_color
standing.overlays += bloodsies
@@ -911,6 +914,13 @@ proc/get_damage_icon_part(damage_state, body_part)
if(update_icons) update_icons()
+/mob/living/carbon/human/update_fire(var/update_icons=1)
+ overlays_standing[FIRE_LAYER] = null
+ if(on_fire)
+ overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=-FIRE_LAYER)
+
+ if(update_icons) update_icons()
+
// Used mostly for creating head items
/mob/living/carbon/human/proc/generate_head_icon()
//gender no longer matters for the mouth, although there should probably be seperate base head icons.
@@ -969,4 +979,5 @@ proc/get_damage_icon_part(damage_state, body_part)
#undef L_HAND_LAYER
#undef R_HAND_LAYER
#undef TARGETED_LAYER
+#undef FIRE_LAYER
#undef TOTAL_LAYERS
diff --git a/code/modules/mob/living/carbon/metroid/death.dm b/code/modules/mob/living/carbon/metroid/death.dm
index 2ebc5c576b..022726b00a 100644
--- a/code/modules/mob/living/carbon/metroid/death.dm
+++ b/code/modules/mob/living/carbon/metroid/death.dm
@@ -1,22 +1,23 @@
/mob/living/carbon/slime/death(gibbed)
if(stat == DEAD) return
- stat = DEAD
- if(!gibbed)
- if(is_adult)
- var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
- M.colour = colour
- M.rabid = 1
- is_adult = 0
- maxHealth = 150
- revive()
- regenerate_icons()
- number = rand(1, 1000)
- name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
- return
+ if(!gibbed && is_adult)
+ var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc, colour)
+ M.rabid = 1
+ M.Friends = Friends.Copy()
+ step_away(M, src)
+ is_adult = 0
+ maxHealth = 150
+ revive()
+ regenerate_icons()
+ if (!client) rabid = 1
+ number = rand(1, 1000)
+ name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
+ return
- icon_state = "[colour] baby slime dead"
- overlays.Cut()
+ . = ..(gibbed, "seizes up and falls limp...")
- return ..(gibbed)
\ No newline at end of file
+ regenerate_icons()
+
+ return
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/metroid/emote.dm b/code/modules/mob/living/carbon/metroid/emote.dm
index 2cbc139f5a..a6ea5498cd 100644
--- a/code/modules/mob/living/carbon/metroid/emote.dm
+++ b/code/modules/mob/living/carbon/metroid/emote.dm
@@ -1,6 +1,5 @@
/mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null)
-
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
//param = copytext(act, t1 + 1, length(act) + 1)
@@ -9,6 +8,8 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
+ var/updateicon = 0
+
switch(act) //Alphabetical please
if ("me")
if(silent)
@@ -59,8 +60,32 @@
message = "The [src.name] vibrates!"
m_type = 1
+ if("nomood")
+ mood = null
+ updateicon = 1
+
+ if("pout")
+ mood = "pout"
+ updateicon = 1
+
+ if("sad")
+ mood = "sad"
+ updateicon = 1
+
+ if("angry")
+ mood = "angry"
+ updateicon = 1
+
+ if("frown")
+ mood = "mischevous"
+ updateicon = 1
+
+ if("smile")
+ mood = ":3"
+ updateicon = 1
+
if ("help") //This is an exception
- src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate"
+ src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate. You can also set your face with: \n\nnomood, pout, sad, angry, frown, smile"
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
@@ -68,9 +93,9 @@
if (m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
- //Foreach goto(703)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
- //Foreach goto(746)
+ if(updateicon)
+ regenerate_icons()
return
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/metroid/items.dm b/code/modules/mob/living/carbon/metroid/items.dm
new file mode 100644
index 0000000000..4c7aed74f4
--- /dev/null
+++ b/code/modules/mob/living/carbon/metroid/items.dm
@@ -0,0 +1,366 @@
+/obj/item/slime_extract
+ name = "slime extract"
+ desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
+ icon = 'icons/mob/slimes.dmi'
+ icon_state = "grey slime extract"
+ force = 1.0
+ w_class = 1.0
+ throwforce = 0
+ throw_speed = 3
+ throw_range = 6
+ origin_tech = "biotech=4"
+ var/Uses = 1 // uses before it goes inert
+ var/enhanced = 0 //has it been enhanced before?
+
+ attackby(obj/item/O as obj, mob/user as mob)
+ if(istype(O, /obj/item/weapon/slimesteroid2))
+ if(enhanced == 1)
+ user << " This extract has already been enhanced!"
+ return ..()
+ if(Uses == 0)
+ user << " You can't enhance a used extract!"
+ return ..()
+ user <<"You apply the enhancer. It now has triple the amount of uses."
+ Uses = 3
+ enhanced = 1
+ del(O)
+
+/obj/item/slime_extract/New()
+ ..()
+ create_reagents(100)
+
+/obj/item/slime_extract/grey
+ name = "grey slime extract"
+ icon_state = "grey slime extract"
+
+/obj/item/slime_extract/gold
+ name = "gold slime extract"
+ icon_state = "gold slime extract"
+
+/obj/item/slime_extract/silver
+ name = "silver slime extract"
+ icon_state = "silver slime extract"
+
+/obj/item/slime_extract/metal
+ name = "metal slime extract"
+ icon_state = "metal slime extract"
+
+/obj/item/slime_extract/purple
+ name = "purple slime extract"
+ icon_state = "purple slime extract"
+
+/obj/item/slime_extract/darkpurple
+ name = "dark purple slime extract"
+ icon_state = "dark purple slime extract"
+
+/obj/item/slime_extract/orange
+ name = "orange slime extract"
+ icon_state = "orange slime extract"
+
+/obj/item/slime_extract/yellow
+ name = "yellow slime extract"
+ icon_state = "yellow slime extract"
+
+/obj/item/slime_extract/red
+ name = "red slime extract"
+ icon_state = "red slime extract"
+
+/obj/item/slime_extract/blue
+ name = "blue slime extract"
+ icon_state = "blue slime extract"
+
+/obj/item/slime_extract/darkblue
+ name = "dark blue slime extract"
+ icon_state = "dark blue slime extract"
+
+/obj/item/slime_extract/pink
+ name = "pink slime extract"
+ icon_state = "pink slime extract"
+
+/obj/item/slime_extract/green
+ name = "green slime extract"
+ icon_state = "green slime extract"
+
+/obj/item/slime_extract/lightpink
+ name = "light pink slime extract"
+ icon_state = "light pink slime extract"
+
+/obj/item/slime_extract/black
+ name = "black slime extract"
+ icon_state = "black slime extract"
+
+/obj/item/slime_extract/oil
+ name = "oil slime extract"
+ icon_state = "oil slime extract"
+
+/obj/item/slime_extract/adamantine
+ name = "adamantine slime extract"
+ icon_state = "adamantine slime extract"
+
+/obj/item/slime_extract/bluespace
+ name = "bluespace slime extract"
+ icon_state = "bluespace slime extract"
+
+/obj/item/slime_extract/pyrite
+ name = "pyrite slime extract"
+ icon_state = "pyrite slime extract"
+
+/obj/item/slime_extract/cerulean
+ name = "cerulean slime extract"
+ icon_state = "cerulean slime extract"
+
+/obj/item/slime_extract/sepia
+ name = "sepia slime extract"
+ icon_state = "sepia slime extract"
+
+/obj/item/slime_extract/rainbow
+ name = "rainbow slime extract"
+ icon_state = "rainbow slime extract"
+
+////Pet Slime Creation///
+
+/obj/item/weapon/slimepotion
+ name = "docility potion"
+ desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame."
+ icon = 'icons/obj/chemical.dmi'
+ icon_state = "bottle19"
+
+ attack(mob/living/carbon/slime/M as mob, mob/user as mob)
+ if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
+ user << " The potion only works on baby slimes!"
+ return ..()
+ if(M.is_adult) //Can't tame adults
+ user << " Only baby slimes can be tamed!"
+ return..()
+ if(M.stat)
+ user << " The slime is dead!"
+ return..()
+ if(M.mind)
+ user << " The slime resists!"
+ return ..()
+ var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
+ pet.icon_state = "[M.colour] baby slime"
+ pet.icon_living = "[M.colour] baby slime"
+ pet.icon_dead = "[M.colour] baby slime dead"
+ pet.colour = "[M.colour]"
+ user <<"You feed the slime the potion, removing it's powers and calming it."
+ del(M)
+ var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
+
+ if (!newname)
+ newname = "pet slime"
+ pet.name = newname
+ pet.real_name = newname
+ del(src)
+
+/obj/item/weapon/slimepotion2
+ name = "advanced docility potion"
+ desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame. This one is meant for adult slimes"
+ icon = 'icons/obj/chemical.dmi'
+ icon_state = "bottle19"
+
+ attack(mob/living/carbon/slime/M as mob, mob/user as mob)
+ if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
+ user << " The potion only works on slimes!"
+ return ..()
+ if(M.stat)
+ user << " The slime is dead!"
+ return..()
+ if(M.mind)
+ user << " The slime resists!"
+ return ..()
+ var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
+ pet.icon_state = "[M.colour] adult slime"
+ pet.icon_living = "[M.colour] adult slime"
+ pet.icon_dead = "[M.colour] baby slime dead"
+ pet.colour = "[M.colour]"
+ user <<"You feed the slime the potion, removing it's powers and calming it."
+ del(M)
+ var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
+
+ if (!newname)
+ newname = "pet slime"
+ pet.name = newname
+ pet.real_name = newname
+ del(src)
+
+
+/obj/item/weapon/slimesteroid
+ name = "slime steroid"
+ desc = "A potent chemical mix that will cause a slime to generate more extract."
+ icon = 'icons/obj/chemical.dmi'
+ icon_state = "bottle16"
+
+ attack(mob/living/carbon/slime/M as mob, mob/user as mob)
+ if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
+ user << " The steroid only works on baby slimes!"
+ return ..()
+ if(M.is_adult) //Can't tame adults
+ user << " Only baby slimes can use the steroid!"
+ return..()
+ if(M.stat)
+ user << " The slime is dead!"
+ return..()
+ if(M.cores == 3)
+ user <<" The slime already has the maximum amount of extract!"
+ return..()
+
+ user <<"You feed the slime the steroid. It now has triple the amount of extract."
+ M.cores = 3
+ del(src)
+
+/obj/item/weapon/slimesteroid2
+ name = "extract enhancer"
+ desc = "A potent chemical mix that will give a slime extract three uses."
+ icon = 'icons/obj/chemical.dmi'
+ icon_state = "bottle17"
+
+ /*afterattack(obj/target, mob/user , flag)
+ if(istype(target, /obj/item/slime_extract))
+ if(target.enhanced == 1)
+ user << " This extract has already been enhanced!"
+ return ..()
+ if(target.Uses == 0)
+ user << " You can't enhance a used extract!"
+ return ..()
+ user <<"You apply the enhancer. It now has triple the amount of uses."
+ target.Uses = 3
+ target.enahnced = 1
+ del(src)*/
+
+/obj/effect/golemrune
+ anchored = 1
+ desc = "a strange rune used to create golems. It glows when spirits are nearby."
+ name = "rune"
+ icon = 'icons/obj/rune.dmi'
+ icon_state = "golem"
+ unacidable = 1
+ layer = TURF_LAYER
+
+ New()
+ ..()
+ processing_objects.Add(src)
+
+ process()
+ var/mob/dead/observer/ghost
+ for(var/mob/dead/observer/O in src.loc)
+ if(!O.client) continue
+ if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
+ ghost = O
+ break
+ if(ghost)
+ icon_state = "golem2"
+ else
+ icon_state = "golem"
+
+ attack_hand(mob/living/user as mob)
+ var/mob/dead/observer/ghost
+ for(var/mob/dead/observer/O in src.loc)
+ if(!O.client) continue
+ if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
+ ghost = O
+ break
+ if(!ghost)
+ user << "The rune fizzles uselessly. There is no spirit nearby."
+ return
+ var/mob/living/carbon/human/G = new(src.loc)
+ G.set_species("Golem")
+ G.key = ghost.key
+ G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
+ del (src)
+
+
+ proc/announce_to_ghosts()
+ for(var/mob/dead/observer/G in player_list)
+ if(G.client)
+ var/area/A = get_area(src)
+ if(A)
+ G << "Golem rune created in [A.name]."
+
+/mob/living/carbon/slime/has_eyes()
+ return 0
+
+//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
+
+/*
+// Basically this slime Core catalyzes reactions that normally wouldn't happen anywhere
+/obj/item/slime_core
+ name = "slime extract"
+ desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
+ icon = 'icons/mob/slimes.dmi'
+ icon_state = "slime extract"
+ force = 1.0
+ w_class = 1.0
+ throwforce = 1.0
+ throw_speed = 2
+ throw_range = 6
+ origin_tech = "biotech=4"
+ var/POWERFLAG = 0 // sshhhhhhh
+ var/Flush = 30
+ var/Uses = 5 // uses before it goes inert
+
+/obj/item/slime_core/New()
+ ..()
+ create_reagents(100)
+ POWERFLAG = rand(1,10)
+ Uses = rand(7, 25)
+ //flags |= NOREACT
+/*
+ spawn()
+ Life()
+
+ proc/Life()
+ while(src)
+ sleep(25)
+ Flush--
+ if(Flush <= 0)
+ reagents.clear_reagents()
+ Flush = 30
+*/
+
+
+
+/obj/item/weapon/reagent_containers/food/snacks/egg/slime
+ name = "slime egg"
+ desc = "A small, gelatinous egg."
+ icon = 'icons/mob/mob.dmi'
+ icon_state = "slime egg-growing"
+ bitesize = 12
+ origin_tech = "biotech=4"
+ var/grown = 0
+
+/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New()
+ ..()
+ reagents.add_reagent("nutriment", 4)
+ reagents.add_reagent("slimejelly", 1)
+ spawn(rand(1200,1500))//the egg takes a while to "ripen"
+ Grow()
+
+/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Grow()
+ grown = 1
+ icon_state = "slime egg-grown"
+ processing_objects.Add(src)
+ return
+
+/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch()
+ processing_objects.Remove(src)
+ var/turf/T = get_turf(src)
+ src.visible_message(" The [name] pulsates and quivers!")
+ spawn(rand(50,100))
+ src.visible_message(" The [name] bursts open!")
+ new/mob/living/carbon/slime(T)
+ del(src)
+
+
+/obj/item/weapon/reagent_containers/food/snacks/egg/slime/process()
+ var/turf/location = get_turf(src)
+ var/datum/gas_mixture/environment = location.return_air()
+ if (environment.phoron > MOLES_PHORON_VISIBLE)//phoron exposure causes the egg to hatch
+ src.Hatch()
+
+/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(istype( W, /obj/item/toy/crayon ))
+ return
+ else
+ ..()
+*/
diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm
index de34d74afa..22b61291ef 100644
--- a/code/modules/mob/living/carbon/metroid/life.dm
+++ b/code/modules/mob/living/carbon/metroid/life.dm
@@ -1,10 +1,3 @@
-/mob/living/carbon/slime
- var/AIproc = 0 // determines if the AI loop is activated
- var/Atkcool = 0 // attack cooldown
- var/Tempstun = 0 // temporary temperature stuns
- var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
- var/SStun = 0 // stun variable
-
/mob/living/carbon/slime/Life()
set invisibility = 0
set background = 1
@@ -15,113 +8,27 @@
..()
if(stat != DEAD)
- //Chemicals in the body
handle_chemicals_in_body()
-
handle_nutrition()
- handle_targets()
-
- if (!ckey)
+ if (!client)
+ handle_targets()
+ if (!AIproc)
+ spawn()
+ handle_AI()
handle_speech_and_mood()
var/datum/gas_mixture/environment
if(src.loc)
environment = loc.return_air()
- //Apparently, the person who wrote this code designed it so that
- //blinded get reset each cycle and then get activated later in the
- //code. Very ugly. I dont care. Moving this stuff here so its easy
- //to find it.
- src.blinded = null
-
- regular_hud_updates() // Basically just deletes any screen objects :<
+ regular_hud_updates()
if(environment)
handle_environment(environment) // Handle temperature/pressure differences between body and environment
handle_regular_status_updates() // Status updates, death etc.
-/mob/living/carbon/slime/proc/AIprocess() // the master AI process
-
- if(AIproc || stat == DEAD || client) return
-
- var/hungry = 0
- if (nutrition < get_starve_nutrition())
- hungry = 2
- else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
- hungry = 1
-
- AIproc = 1
-
- while(AIproc && stat != 2 && (attacked || hungry || rabid || Victim))
- if(Victim) // can't eat AND have this little process at the same time
- break
-
- if(!Target || client)
- break
-
- if(Target.health <= -70 || Target.stat == 2)
- Target = null
- AIproc = 0
- break
-
- if(Target)
- for(var/mob/living/carbon/slime/M in view(1,Target))
- if(M.Victim == Target)
- Target = null
- AIproc = 0
- break
- if(!AIproc)
- break
-
- if(Target in view(1,src))
- if(istype(Target, /mob/living/silicon))
- if(!Atkcool)
- Atkcool = 1
- spawn(45)
- Atkcool = 0
-
- if(Target.Adjacent(src))
- UnarmedAttack(Target)
- return
- if(!Target.lying && prob(80))
-
- if(Target.client && Target.health >= 20)
- if(!Atkcool)
- Atkcool = 1
- spawn(45)
- Atkcool = 0
-
- if(Target.Adjacent(src))
- UnarmedAttack(Target)
-
- else
- if(!Atkcool && Target.Adjacent(src))
- Feedon(Target)
-
- else
- if(!Atkcool && Target.Adjacent(src))
- Feedon(Target)
-
- else
- if(Target in view(7, src))
- if(!Target.Adjacent(src)) // Bug of the month candidate: slimes were attempting to move to target only if it was directly next to them, which caused them to target things, but not approach them
- step_to(src, Target)
- sleep(5)
-
- else
- Target = null
- AIproc = 0
- break
-
- var/sleeptime = movement_delay()
- if(sleeptime <= 0) sleeptime = 1
-
- sleep(sleeptime + 2) // this is about as fast as a player slime can go
-
- AIproc = 0
-
/mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment)
if(!environment)
adjustToxLoss(rand(10,20))
@@ -146,8 +53,6 @@
//Account for massive pressure differences
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
- if(bodytemperature <= (T0C - 40)) // stun temperature
- Tempstun = 1
if(bodytemperature <= (T0C - 50)) // hurt temperature
if(bodytemperature <= 50) // sqrting negative numbers is bad
@@ -155,9 +60,6 @@
else
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
- else
- Tempstun = 0
-
updatehealth()
return //TODO: DEFERRED
@@ -189,22 +91,16 @@
/mob/living/carbon/slime/proc/handle_regular_status_updates()
- if(is_adult)
- health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
- else
- health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
+ src.blinded = null
- if(health < config.health_threshold_dead && stat != 2)
+ health = maxHealth - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
+
+ if(health < 0 && stat != DEAD)
death()
return
- else if(src.health < config.health_threshold_crit)
-
- if(!src.reagents.has_reagent("inaprovaline"))
- src.adjustOxyLoss(10)
-
- if(src.stat != DEAD)
- src.stat = UNCONSCIOUS
+ if (halloss)
+ halloss = 0
if(prob(30))
adjustOxyLoss(-1)
@@ -267,27 +163,16 @@
if(nutrition <= 0)
nutrition = 0
- if(prob(75))
- adjustToxLoss(rand(0,5))
+ adjustToxLoss(rand(1,3))
+ if (client && prob(5))
+ src << "You are starving!"
else if (nutrition >= get_grow_nutrition() && amount_grown < 10)
nutrition -= 20
amount_grown++
- if(amount_grown >= 10 && !Victim && !Target && !ckey)
- if(is_adult)
- Reproduce()
- else
- Evolve()
-
/mob/living/carbon/slime/proc/handle_targets()
- if(Tempstun)
- if(!Victim) // not while they're eating!
- canmove = 0
- else
- canmove = 1
-
- if(attacked > 50) attacked = 50
+ if(attacked > 50) attacked = 50 // Let's not get into absurdly long periods of rage
if(attacked > 0)
attacked--
@@ -300,106 +185,180 @@
if(prob(10))
Discipline--
- if(!client)
- if(!canmove) return
+ if(!canmove) return
- if(Victim) return // if it's eating someone already, continue eating!
+ if(Victim) return // if it's eating someone already, continue eating!
- if(Target)
- --target_patience
- if (target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention
- target_patience = 0
- Target = null
+ if(Target)
+ --target_patience
+ if (target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention
+ target_patience = 0
+ Target = null
- if(AIproc && SStun) return
+ var/hungry = 0 // determines if the slime is hungry
- var/hungry = 0 // determines if the slime is hungry
+ if (nutrition < get_starve_nutrition())
+ hungry = 2
+ else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
+ hungry = 1
- if (nutrition < get_starve_nutrition())
- hungry = 2
- else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
- hungry = 1
+ if(hungry == 2 && !client) // if a slime is starving, it starts losing its friends
+ if(Friends.len > 0 && prob(1))
+ var/mob/nofriend = pick(Friends)
+ --Friends[nofriend]
+ if (Friends[nofriend] <= 0)
+ Friends -= nofriend
- if(hungry == 2 && !client) // if a slime is starving, it starts losing its friends
- if(Friends.len > 0 && prob(1))
- var/mob/nofriend = pick(Friends)
- --Friends[nofriend]
+ if(!Target)
+ if(will_hunt(hungry) || attacked || rabid) // Only add to the list if we need to
+ var/list/targets = list()
- if(!Target)
- if(will_hunt() && hungry || attacked || rabid) // Only add to the list if we need to
- var/list/targets = list()
+ for(var/mob/living/L in view(7,src))
- for(var/mob/living/L in view(7,src))
+ if(isslime(L) || L.stat == DEAD) // Ignore other slimes and dead mobs
+ continue
- if(isslime(L) || L.stat == DEAD) // Ignore other slimes and dead mobs
- continue
-
- if(L in Friends) // No eating friends!
- continue
-
- if(issilicon(L) && (rabid || attacked)) // They can't eat silicons, but they can glomp them in defence
- targets += L // Possible target found!
-
- if(istype(L, /mob/living/carbon/human) && dna) //Ignore slime(wo)men
- var/mob/living/carbon/human/H = L
- if(H.species.name == "Slime")
- continue
-
- if(!L.canmove) // Only one slime can latch on at a time.
- var/notarget = 0
- for(var/mob/living/carbon/slime/M in view(1,L))
- if(M.Victim == L)
- notarget = 1
- if(notarget)
- continue
+ if(L in Friends) // No eating friends!
+ continue
+ if(issilicon(L) && (rabid || attacked)) // They can't eat silicons, but they can glomp them in defence
targets += L // Possible target found!
- if(targets.len > 0)
- if(attacked || rabid || hungry == 2)
- Target = targets[1] // I am attacked and am fighting back or so hungry I don't even care
- else
- for(var/mob/living/carbon/C in targets)
- if(!Discipline && prob(5))
- if(ishuman(C))
- Target = C
- break
+ if(istype(L, /mob/living/carbon/human) && dna) //Ignore slime(wo)men
+ var/mob/living/carbon/human/H = L
+ if(H.species.name == "Slime")
+ continue
- if(isalien(C) || ismonkey(C))
- Target = C
- break
+ if(!L.canmove) // Only one slime can latch on at a time.
+ var/notarget = 0
+ for(var/mob/living/carbon/slime/M in view(1,L))
+ if(M.Victim == L)
+ notarget = 1
+ if(notarget)
+ continue
- if (Target)
- target_patience = rand(5,7)
- if (is_adult)
- target_patience += 3
+ targets += L // Possible target found!
- if(!Target) // If we have no target, we are wandering or following orders
- if (Leader)
- if (holding_still)
- holding_still = max(holding_still - 1, 0)
- else if(canmove && isturf(loc))
- step_to(src, Leader)
+ if(targets.len > 0)
+ if(attacked || rabid || hungry == 2)
+ Target = targets[1] // I am attacked and am fighting back or so hungry I don't even care
+ else
+ for(var/mob/living/carbon/C in targets)
+ if(ishuman(C) && !Discipline && prob(5))
+ Target = C
+ break
- else if(hungry)
- if (holding_still)
- holding_still = max(holding_still - hungry, 0)
- else if(canmove && isturf(loc) && prob(50))
- step(src, pick(cardinal))
+ if(isalien(C) || ismonkey(C) || isanimal(C))
+ Target = C
+ break
+
+ if (Target)
+ target_patience = rand(5,7)
+ if (is_adult)
+ target_patience += 3
+
+ if(!Target) // If we have no target, we are wandering or following orders
+ if (Leader)
+ if (holding_still)
+ holding_still = max(holding_still - 1, 0)
+ else if(canmove && isturf(loc))
+ step_to(src, Leader)
+
+ else if(hungry)
+ if (holding_still)
+ holding_still = max(holding_still - 1 - hungry, 0)
+ else if(canmove && isturf(loc) && prob(50))
+ step(src, pick(cardinal))
+
+ else
+ if (holding_still)
+ holding_still = max(holding_still - 1, 0)
+ else if(canmove && isturf(loc) && prob(33))
+ step(src, pick(cardinal))
+
+/mob/living/carbon/slime/proc/handle_AI() // the master AI process
+
+ if(stat == DEAD || client || Victim) return // If we're dead or have a client, we don't need AI, if we're feeding, we continue feeding
+ AIproc = 1
+
+ if(amount_grown >= 10 && !Target)
+ if(is_adult)
+ Reproduce()
+ else
+ Evolve()
+ AIproc = 0
+ return
+
+ if(Target) // We're chasing the target
+ if(Target.stat == DEAD)
+ Target = null
+ AIproc = 0
+ return
+
+ for(var/mob/living/carbon/slime/M in view(1, Target))
+ if(M.Victim == Target)
+ Target = null
+ AIproc = 0
+ return
+
+ if(Target.Adjacent(src))
+ if(istype(Target, /mob/living/silicon)) // Glomp the silicons
+ if(!Atkcool)
+ a_intent = "hurt"
+ UnarmedAttack(Target)
+ Atkcool = 1
+ spawn(45)
+ Atkcool = 0
+ AIproc = 0
+ return
+
+ if(Target.client && !Target.lying && prob(60 + powerlevel * 4)) // Try to take down the target first
+ if(!Atkcool)
+ Atkcool = 1
+ spawn(45)
+ Atkcool = 0
+
+ a_intent = "disarm"
+ UnarmedAttack(Target)
else
- if (holding_still)
- holding_still = max(holding_still - 1, 0)
- else if(canmove && isturf(loc) && prob(33))
- step(src, pick(cardinal))
- else if(!AIproc)
- spawn()
- AIprocess()
+ if(!Atkcool)
+ a_intent = "grab"
+ UnarmedAttack(Target)
+
+ else if(Target in view(7, src))
+ step_to(src, Target)
+
+ else
+ Target = null
+ AIproc = 0
+ return
+
+ else
+ var/mob/living/carbon/slime/frenemy
+ for (var/mob/living/carbon/slime/S in view(1, src))
+ if (S != src)
+ frenemy = S
+ if (frenemy && prob(1))
+ if (frenemy.colour == colour)
+ a_intent = "help"
+ else
+ a_intent = "hurt"
+ UnarmedAttack(frenemy)
+
+ var/sleeptime = movement_delay()
+ if(sleeptime <= 5) sleeptime = 5 // Maximum one action per half a second
+ spawn (sleeptime)
+ handle_AI()
+ return
/mob/living/carbon/slime/proc/handle_speech_and_mood()
//Mood starts here
var/newmood = ""
- if (rabid || attacked) newmood = "angry"
+ a_intent = "help"
+ if (rabid || attacked)
+ newmood = "angry"
+ a_intent = "hurt"
else if (Target) newmood = "mischevous"
if (!newmood)
@@ -569,11 +528,13 @@
if (is_adult) return 300
else return 200
-/mob/living/carbon/slime/proc/will_hunt(var/hunger = -1) // Check for being stopped from feeding and chasing
+/mob/living/carbon/slime/proc/will_hunt(var/hunger) // Check for being stopped from feeding and chasing
if (hunger == 2 || rabid || attacked) return 1
if (Leader) return 0
if (holding_still) return 0
- return 1
+ if (hunger == 1 || prob(25))
+ return 1
+ return 0
/mob/living/carbon/slime/slip() //Can't slip something without legs.
return 0
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm
index e6a1938a05..d6c8c226c4 100644
--- a/code/modules/mob/living/carbon/metroid/metroid.dm
+++ b/code/modules/mob/living/carbon/metroid/metroid.dm
@@ -4,10 +4,9 @@
icon_state = "grey baby slime"
pass_flags = PASSTABLE
var/is_adult = 0
- speak_emote = list("telepathically chirps")
+ speak_emote = list("chirps")
layer = 5
-
maxHealth = 150
health = 150
gender = NEUTER
@@ -25,7 +24,7 @@
var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside
var/mutation_chance = 30 // Chance of mutating, should be between 25 and 35
- var/powerlevel = 0 // 1-10 controls how much electricity they are generating
+ var/powerlevel = 0 // 0-10 controls how much electricity they are generating
var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces
var/number = 0 // Used to understand when someone is talking to it
@@ -45,6 +44,11 @@
var/mood = "" // To show its face
+ var/AIproc = 0 // If it's 0, we need to launch an AI proc
+ var/Atkcool = 0 // attack cooldown
+ var/SStun = 0 // NPC stun variable. Used to calm them down when they are attacked while feeding, or they will immediately re-attach
+ var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while. The part about freeze gun is a lie
+
///////////TIME FOR SUBSPECIES
var/colour = "grey"
@@ -53,28 +57,21 @@
var/core_removal_stage = 0 //For removing cores.
-/mob/living/carbon/slime/New()
+/mob/living/carbon/slime/New(var/location, var/colour="grey")
verbs += /mob/living/proc/ventcrawl
create_reagents(100)
- spawn (0)
- number = rand(1, 1000)
- name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
- icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
- real_name = name
- slime_mutation = mutation_table(colour)
- mutation_chance = rand(25, 35)
- var/sanitizedcolour = replacetext(colour, " ", "")
- coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
- ..()
-/mob/living/carbon/slime/regenerate_icons()
- icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
- overlays.len = 0
- if (mood)
- overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
- ..()
+ src.colour = colour
+ number = rand(1, 1000)
+ name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
+ real_name = name
+ slime_mutation = mutation_table(colour)
+ mutation_chance = rand(25, 35)
+ var/sanitizedcolour = replacetext(colour, " ", "")
+ coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
+ ..(location)
/mob/living/carbon/slime/movement_delay()
if (bodytemperature >= 330.23) // 135 F
@@ -82,8 +79,8 @@
var/tally = 0
- var/health_deficiency = (100 - health)
- if(health_deficiency >= 45) tally += (health_deficiency / 25)
+ var/health_deficiency = (maxHealth - health)
+ if(health_deficiency >= 30) tally += (health_deficiency / 25)
if (bodytemperature < 183.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
@@ -105,25 +102,23 @@
return
now_pushing = 1
- if(isobj(AM))
- if(!client && powerlevel > 0)
- var/probab = 10
- switch(powerlevel)
- if(1 to 2) probab = 20
- if(3 to 4) probab = 30
- if(5 to 6) probab = 40
- if(7 to 8) probab = 60
- if(9) probab = 70
- if(10) probab = 95
- if(prob(probab))
- if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
- if(nutrition <= get_hunger_nutrition() && !Atkcool)
- if (is_adult || prob(5))
- UnarmedAttack(AM)
- spawn()
- Atkcool = 1
- sleep(45)
- Atkcool = 0
+ if(isobj(AM) && !client && powerlevel > 0)
+ var/probab = 10
+ switch(powerlevel)
+ if(1 to 2) probab = 20
+ if(3 to 4) probab = 30
+ if(5 to 6) probab = 40
+ if(7 to 8) probab = 60
+ if(9) probab = 70
+ if(10) probab = 95
+ if(prob(probab))
+ if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
+ if(nutrition <= get_hunger_nutrition() && !Atkcool)
+ if (is_adult || prob(5))
+ UnarmedAttack(AM)
+ Atkcool = 1
+ spawn(45)
+ Atkcool = 0
if(ismob(AM))
var/mob/tmob = AM
@@ -139,21 +134,8 @@
return
now_pushing = 0
+
..()
- if (!istype(AM, /atom/movable))
- return
- if (!( now_pushing ))
- now_pushing = 1
- if (!( AM.anchored ))
- var/t = get_dir(src, AM)
- if (istype(AM, /obj/structure/window))
- var/obj/structure/window/W = AM
- if(W.is_full_window())
- for(var/obj/structure/window/win in get_step(AM,t))
- now_pushing = 0
- return
- step(AM, t)
- now_pushing = null
/mob/living/carbon/slime/Process_Spacemove()
return 2
@@ -162,10 +144,8 @@
..()
statpanel("Status")
- if(is_adult)
- stat(null, "Health: [round((health / 200) * 100)]%")
- else
- stat(null, "Health: [round((health / 150) * 100)]%")
+ stat(null, "Health: [round((health / maxHealth) * 100)]%")
+ stat(null, "Intent: [a_intent]")
if (client.statpanel == "Status")
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
@@ -227,9 +207,7 @@
if(shielded)
damage /= 4
- //paralysis += 1
-
- show_message(" The blob attacks you!")
+ show_message(" The blob attacks you!")
adjustFireLoss(damage)
@@ -244,14 +222,12 @@
return
/mob/living/carbon/slime/meteorhit(O as obj)
- for(var/mob/M in viewers(src, null))
- if ((M.client && !( M.blinded )))
- M.show_message(text("\red [] has been hit by []", src, O), 1)
- if (health > 0)
- adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
- adjustFireLoss(30)
+ visible_message("[src] has been hit by [O]")
- updatehealth()
+ adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
+ adjustFireLoss(30)
+
+ updatehealth()
return
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
@@ -271,11 +247,9 @@
if(prob(90) && !client)
Discipline++
- spawn()
- SStun = 1
- sleep(rand(45,60))
- if(src)
- SStun = 0
+ SStun = 1
+ spawn(rand(45,60))
+ SStun = 0
Victim = null
anchored = 0
@@ -299,11 +273,9 @@
if(Discipline == 1)
attacked = 0
- spawn()
- SStun = 1
- sleep(rand(55,65))
- if(src)
- SStun = 0
+ SStun = 1
+ spawn(rand(55,65))
+ SStun = 0
Victim = null
anchored = 0
@@ -345,15 +317,13 @@
if(prob(80) && !client)
Discipline++
spawn(0)
-
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
-
playsound(loc, "punch", 25, 1, -1)
visible_message("[M] has punched [src]!", \
- "[M] has punched [src]!")
+ "[M] has punched [src]!")
adjustBruteLoss(damage)
updatehealth()
@@ -381,9 +351,8 @@
Target = null
anchored = 0
- spawn()
- SStun = 1
- sleep(rand(5,20))
+ SStun = 1
+ spawn(rand(5,20))
SStun = 0
spawn(0)
@@ -403,9 +372,8 @@
Discipline++
if(Discipline == 1)
attacked = 0
- spawn()
- SStun = 1
- sleep(rand(5,20))
+ SStun = 1
+ spawn(rand(5,20))
SStun = 0
Victim = null
@@ -426,8 +394,8 @@
/mob/living/carbon/slime/restrained()
return 0
-mob/living/carbon/slime/var/co2overloadtime = null
-mob/living/carbon/slime/var/temperature_resistance = T0C+75
+/mob/living/carbon/slime/var/co2overloadtime = null
+/mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/slime/show_inv(mob/user)
return
@@ -435,8 +403,17 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/slime/toggle_throw_mode()
return
-/mob/living/carbon/slime/proc/apply_water()
- adjustToxLoss(rand(15,20))
+/mob/living/carbon/slime/proc/gain_nutrition(var/amount)
+ nutrition += amount
+ if(prob(amount * 2)) // Gain around one level per 50 nutrition
+ powerlevel++
+ if(powerlevel > 10)
+ powerlevel = 10
+ adjustToxLoss(-10)
+ nutrition = max(nutrition, get_max_nutrition())
+
+/mob/living/carbon/slime/proc/apply_water(var/amount)
+ adjustToxLoss(15 + amount)
if (!client)
if (Target) // Like cats
Target = null
@@ -446,371 +423,4 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/slime/can_use_vents()
if(Victim)
return "You cannot ventcrawl while feeding."
- ..()
-
-/obj/item/slime_extract
- name = "slime extract"
- desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
- icon = 'icons/mob/slimes.dmi'
- icon_state = "grey slime extract"
- force = 1.0
- w_class = 1.0
- throwforce = 0
- throw_speed = 3
- throw_range = 6
- origin_tech = "biotech=4"
- var/Uses = 1 // uses before it goes inert
- var/enhanced = 0 //has it been enhanced before?
-
- attackby(obj/item/O as obj, mob/user as mob)
- if(istype(O, /obj/item/weapon/slimesteroid2))
- if(enhanced == 1)
- user << " This extract has already been enhanced!"
- return ..()
- if(Uses == 0)
- user << " You can't enhance a used extract!"
- return ..()
- user <<"You apply the enhancer. It now has triple the amount of uses."
- Uses = 3
- enhanced = 1
- del(O)
-
-/obj/item/slime_extract/New()
- ..()
- create_reagents(100)
-
-/obj/item/slime_extract/grey
- name = "grey slime extract"
- icon_state = "grey slime extract"
-
-/obj/item/slime_extract/gold
- name = "gold slime extract"
- icon_state = "gold slime extract"
-
-/obj/item/slime_extract/silver
- name = "silver slime extract"
- icon_state = "silver slime extract"
-
-/obj/item/slime_extract/metal
- name = "metal slime extract"
- icon_state = "metal slime extract"
-
-/obj/item/slime_extract/purple
- name = "purple slime extract"
- icon_state = "purple slime extract"
-
-/obj/item/slime_extract/darkpurple
- name = "dark purple slime extract"
- icon_state = "dark purple slime extract"
-
-/obj/item/slime_extract/orange
- name = "orange slime extract"
- icon_state = "orange slime extract"
-
-/obj/item/slime_extract/yellow
- name = "yellow slime extract"
- icon_state = "yellow slime extract"
-
-/obj/item/slime_extract/red
- name = "red slime extract"
- icon_state = "red slime extract"
-
-/obj/item/slime_extract/blue
- name = "blue slime extract"
- icon_state = "blue slime extract"
-
-/obj/item/slime_extract/darkblue
- name = "dark blue slime extract"
- icon_state = "dark blue slime extract"
-
-/obj/item/slime_extract/pink
- name = "pink slime extract"
- icon_state = "pink slime extract"
-
-/obj/item/slime_extract/green
- name = "green slime extract"
- icon_state = "green slime extract"
-
-/obj/item/slime_extract/lightpink
- name = "light pink slime extract"
- icon_state = "light pink slime extract"
-
-/obj/item/slime_extract/black
- name = "black slime extract"
- icon_state = "black slime extract"
-
-/obj/item/slime_extract/oil
- name = "oil slime extract"
- icon_state = "oil slime extract"
-
-/obj/item/slime_extract/adamantine
- name = "adamantine slime extract"
- icon_state = "adamantine slime extract"
-
-/obj/item/slime_extract/bluespace
- name = "bluespace slime extract"
- icon_state = "bluespace slime extract"
-
-/obj/item/slime_extract/pyrite
- name = "pyrite slime extract"
- icon_state = "pyrite slime extract"
-
-/obj/item/slime_extract/cerulean
- name = "cerulean slime extract"
- icon_state = "cerulean slime extract"
-
-/obj/item/slime_extract/sepia
- name = "sepia slime extract"
- icon_state = "sepia slime extract"
-
-/obj/item/slime_extract/rainbow
- name = "rainbow slime extract"
- icon_state = "rainbow slime extract"
-
-////Pet Slime Creation///
-
-/obj/item/weapon/slimepotion
- name = "docility potion"
- desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame."
- icon = 'icons/obj/chemical.dmi'
- icon_state = "bottle19"
-
- attack(mob/living/carbon/slime/M as mob, mob/user as mob)
- if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
- user << " The potion only works on baby slimes!"
- return ..()
- if(M.is_adult) //Can't tame adults
- user << " Only baby slimes can be tamed!"
- return..()
- if(M.stat)
- user << " The slime is dead!"
- return..()
- if(M.mind)
- user << " The slime resists!"
- return ..()
- var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
- pet.icon_state = "[M.colour] baby slime"
- pet.icon_living = "[M.colour] baby slime"
- pet.icon_dead = "[M.colour] baby slime dead"
- pet.colour = "[M.colour]"
- user <<"You feed the slime the potion, removing it's powers and calming it."
- del(M)
- var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
-
- if (!newname)
- newname = "pet slime"
- pet.name = newname
- pet.real_name = newname
- del(src)
-
-/obj/item/weapon/slimepotion2
- name = "advanced docility potion"
- desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame. This one is meant for adult slimes"
- icon = 'icons/obj/chemical.dmi'
- icon_state = "bottle19"
-
- attack(mob/living/carbon/slime/M as mob, mob/user as mob)
- if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
- user << " The potion only works on slimes!"
- return ..()
- if(M.stat)
- user << " The slime is dead!"
- return..()
- if(M.mind)
- user << " The slime resists!"
- return ..()
- var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
- pet.icon_state = "[M.colour] adult slime"
- pet.icon_living = "[M.colour] adult slime"
- pet.icon_dead = "[M.colour] baby slime dead"
- pet.colour = "[M.colour]"
- user <<"You feed the slime the potion, removing it's powers and calming it."
- del(M)
- var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
-
- if (!newname)
- newname = "pet slime"
- pet.name = newname
- pet.real_name = newname
- del(src)
-
-
-/obj/item/weapon/slimesteroid
- name = "slime steroid"
- desc = "A potent chemical mix that will cause a slime to generate more extract."
- icon = 'icons/obj/chemical.dmi'
- icon_state = "bottle16"
-
- attack(mob/living/carbon/slime/M as mob, mob/user as mob)
- if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
- user << " The steroid only works on baby slimes!"
- return ..()
- if(M.is_adult) //Can't tame adults
- user << " Only baby slimes can use the steroid!"
- return..()
- if(M.stat)
- user << " The slime is dead!"
- return..()
- if(M.cores == 3)
- user <<" The slime already has the maximum amount of extract!"
- return..()
-
- user <<"You feed the slime the steroid. It now has triple the amount of extract."
- M.cores = 3
- del(src)
-
-/obj/item/weapon/slimesteroid2
- name = "extract enhancer"
- desc = "A potent chemical mix that will give a slime extract three uses."
- icon = 'icons/obj/chemical.dmi'
- icon_state = "bottle17"
-
- /*afterattack(obj/target, mob/user , flag)
- if(istype(target, /obj/item/slime_extract))
- if(target.enhanced == 1)
- user << " This extract has already been enhanced!"
- return ..()
- if(target.Uses == 0)
- user << " You can't enhance a used extract!"
- return ..()
- user <<"You apply the enhancer. It now has triple the amount of uses."
- target.Uses = 3
- target.enahnced = 1
- del(src)*/
-
-/obj/effect/golemrune
- anchored = 1
- desc = "a strange rune used to create golems. It glows when spirits are nearby."
- name = "rune"
- icon = 'icons/obj/rune.dmi'
- icon_state = "golem"
- unacidable = 1
- layer = TURF_LAYER
-
- New()
- ..()
- processing_objects.Add(src)
-
- process()
- var/mob/dead/observer/ghost
- for(var/mob/dead/observer/O in src.loc)
- if(!O.client) continue
- if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
- ghost = O
- break
- if(ghost)
- icon_state = "golem2"
- else
- icon_state = "golem"
-
- attack_hand(mob/living/user as mob)
- var/mob/dead/observer/ghost
- for(var/mob/dead/observer/O in src.loc)
- if(!O.client) continue
- if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
- ghost = O
- break
- if(!ghost)
- user << "The rune fizzles uselessly. There is no spirit nearby."
- return
- var/mob/living/carbon/human/G = new(src.loc)
- G.set_species("Golem")
- G.key = ghost.key
- G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
- del (src)
-
-
- proc/announce_to_ghosts()
- for(var/mob/dead/observer/G in player_list)
- if(G.client)
- var/area/A = get_area(src)
- if(A)
- G << "Golem rune created in [A.name]."
-
-/mob/living/carbon/slime/has_eyes()
- return 0
-
-//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
-
-/*
-// Basically this slime Core catalyzes reactions that normally wouldn't happen anywhere
-/obj/item/slime_core
- name = "slime extract"
- desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
- icon = 'icons/mob/slimes.dmi'
- icon_state = "slime extract"
- force = 1.0
- w_class = 1.0
- throwforce = 1.0
- throw_speed = 2
- throw_range = 6
- origin_tech = "biotech=4"
- var/POWERFLAG = 0 // sshhhhhhh
- var/Flush = 30
- var/Uses = 5 // uses before it goes inert
-
-/obj/item/slime_core/New()
- ..()
- create_reagents(100)
- POWERFLAG = rand(1,10)
- Uses = rand(7, 25)
- //flags |= NOREACT
-/*
- spawn()
- Life()
-
- proc/Life()
- while(src)
- sleep(25)
- Flush--
- if(Flush <= 0)
- reagents.clear_reagents()
- Flush = 30
-*/
-
-
-
-/obj/item/weapon/reagent_containers/food/snacks/egg/slime
- name = "slime egg"
- desc = "A small, gelatinous egg."
- icon = 'icons/mob/mob.dmi'
- icon_state = "slime egg-growing"
- bitesize = 12
- origin_tech = "biotech=4"
- var/grown = 0
-
-/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New()
- ..()
- reagents.add_reagent("nutriment", 4)
- reagents.add_reagent("slimejelly", 1)
- spawn(rand(1200,1500))//the egg takes a while to "ripen"
- Grow()
-
-/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Grow()
- grown = 1
- icon_state = "slime egg-grown"
- processing_objects.Add(src)
- return
-
-/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch()
- processing_objects.Remove(src)
- var/turf/T = get_turf(src)
- src.visible_message(" The [name] pulsates and quivers!")
- spawn(rand(50,100))
- src.visible_message(" The [name] bursts open!")
- new/mob/living/carbon/slime(T)
- del(src)
-
-
-/obj/item/weapon/reagent_containers/food/snacks/egg/slime/process()
- var/turf/location = get_turf(src)
- var/datum/gas_mixture/environment = location.return_air()
- if (environment.phoron > MOLES_PHORON_VISIBLE)//phoron exposure causes the egg to hatch
- src.Hatch()
-
-/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
- if(istype( W, /obj/item/toy/crayon ))
- return
- else
- ..()
-*/
+ ..()
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm
index 23ca8acbf6..b2f8c2588f 100644
--- a/code/modules/mob/living/carbon/metroid/powers.dm
+++ b/code/modules/mob/living/carbon/metroid/powers.dm
@@ -1,75 +1,46 @@
-/mob/living/carbon/slime/verb/Feed()
- set category = "Slime"
- set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
- if(Victim)
+/mob/living/carbon/slime/proc/Wrap(var/mob/living/M) // This is a proc for the clicks
+ if (Victim == M || src == M)
Feedstop()
return
- if(stat)
- src << "I must be conscious to do this..."
+ if (Victim)
+ src << "I am already feeding..."
return
- var/list/choices = list()
- for(var/mob/living/C in view(1,src))
- if(C!=src && !istype(C,/mob/living/carbon/slime) && Adjacent(C))
- choices += C
-
- var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
- if(!M) return
- if(Adjacent(M))
-
- if(!istype(src, /mob/living/carbon/brain))
- if(!istype(M, /mob/living/carbon/slime))
- if(stat != 2)
- if(health > -70)
-
- for(var/mob/living/carbon/slime/met in view())
- if(met.Victim == M && met != src)
- src << "The [met.name] is already feeding on this subject..."
- return
- src << "\blue I have latched onto the subject and begun feeding..."
- M << "\red The [src.name] has latched onto your head!"
- Feedon(M)
-
- else
- src << "This subject does not have a strong enough life energy..."
- else
- src << "This subject does not have an edible life energy..."
- else
- src << "I must not feed on my brothers..."
- else
- src << "This subject does not have an edible life energy..."
+ var t = invalidFeedTarget(M)
+ if (t)
+ src << t
+ return
+ Feedon(M)
+/mob/living/carbon/slime/proc/invalidFeedTarget(var/mob/living/M)
+ if (!M || !istype(M))
+ return "This subject is incomparable..."
+ if (istype(M, /mob/living/carbon/slime)) // No cannibalism... yet
+ return "I cannot feed on other slimes..."
+ if (!Adjacent(M))
+ return "This subject is too far away..."
+ if (istype(M, /mob/living/carbon) && M.getCloneLoss() > 150 || istype(M, /mob/living/simple_animal) && M.stat == DEAD)
+ return "This subject does not have an edible life energy..."
+ for(var/mob/living/carbon/slime/met in view())
+ if(met.Victim == M && met != src)
+ return "The [met.name] is already feeding on this subject..."
+ return 0
/mob/living/carbon/slime/proc/Feedon(var/mob/living/M)
Victim = M
- src.loc = M.loc
+ loc = M.loc
canmove = 0
anchored = 1
- var/lastnut = nutrition
- var/fed_succesfully = 0
- if(is_adult)
- icon_state = "[colour] adult slime eat"
- else
- icon_state = "[colour] baby slime eat"
- while(Victim && M.health > -70 && stat != 2)
+ regenerate_icons()
+
+ while(Victim && !invalidFeedTarget(M) && stat != 2)
canmove = 0
if(Adjacent(M))
- loc = M.loc
-
- if(prob(15) && M.client && istype(M, /mob/living/carbon))
- var/mob/living/carbon/C = M
- if (!(C.species && (C.species.flags & NO_PAIN)))
- M << "[pick("You can feel your body becoming weak!", \
- "You feel like you're about to die!", \
- "You feel every part of your body screaming in agony!", \
- "A low, rolling pain passes through your body!", \
- "Your body feels as if it's falling apart!", \
- "You feel extremely weak!", \
- "A sharp, deep pain bathes every inch of your body!")]"
+ UpdateFeed(M)
if(istype(M, /mob/living/carbon))
Victim.adjustCloneLoss(rand(5,6))
@@ -77,83 +48,51 @@
if(Victim.health <= 0)
Victim.adjustToxLoss(rand(2,4))
- fed_succesfully = 1
-
else if(istype(M, /mob/living/simple_animal))
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
- fed_succesfully = 1
else
- if(prob(25))
- src << "[pick("This subject is incompatable", \
- "This subject does not have a life energy", "This subject is empty", \
- "I am not satisified", "I can not feed from this subject", \
- "I do not feel nourished", "This subject is not food")]..."
+ src << "[pick("This subject is incompatable", "This subject does not have a life energy", "This subject is empty", "I am not satisified", "I can not feed from this subject", "I do not feel nourished", "This subject is not food")]..."
+ Feedstop()
+ break
- if(fed_succesfully)
- //I have no idea why this is not in handle_nutrition()
- nutrition += rand(15,30)
- if(nutrition >= lastnut + 50)
- if(prob(80))
- lastnut = nutrition
- powerlevel++
- if(powerlevel > 10)
- powerlevel = 10
- adjustToxLoss(-10)
+ if(prob(15) && M.client && istype(M, /mob/living/carbon))
+ var/painMes = pick("You can feel your body becoming weak!", "You feel like you're about to die!", "You feel every part of your body screaming in agony!", "A low, rolling pain passes through your body!", "Your body feels as if it's falling apart!", "You feel extremely weak!", "A sharp, deep pain bathes every inch of your body!")
+ if (ishuman(M))
+ var/mob/living/carbon/human/H = M
+ H.custom_pain(painMes)
+ else if (istype(M, /mob/living/carbon))
+ var/mob/living/carbon/C = M
+ if (!(C.species && (C.species.flags & NO_PAIN)))
+ M << "[painMes]"
- //Heal yourself.
- adjustOxyLoss(-10)
- adjustBruteLoss(-10)
- adjustFireLoss(-10)
- adjustCloneLoss(-10)
+ gain_nutrition(rand(20,25))
- updatehealth()
- if(Victim)
- Victim.updatehealth()
-
- sleep(rand(15,45))
+ adjustOxyLoss(-10) //Heal yourself
+ adjustBruteLoss(-10)
+ adjustFireLoss(-10)
+ adjustCloneLoss(-10)
+ updatehealth()
+ if(Victim)
+ Victim.updatehealth()
+ sleep(30) // Deal damage every 3 seconds
else
break
- if(stat == 2)
- if(!is_adult)
- icon_state = "[colour] baby slime dead"
-
- else
- if(is_adult)
- icon_state = "[colour] adult slime"
- else
- icon_state = "[colour] baby slime"
-
canmove = 1
anchored = 0
- if(M)
- if(M.health <= -70)
- M.canmove = 0
- if(!client)
- if(Victim && !rabid && !attacked)
- if(Victim.LAssailant && Victim.LAssailant != Victim)
- if(prob(50))
- if(!(Victim.LAssailant in Friends))
- Friends[Victim.LAssailant] = 1
- //Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
- else
- ++Friends[Victim.LAssailant]
+ if(M && invalidFeedTarget(M)) // This means that the slime drained the victim
+ if(!client)
+ if(Victim && !rabid && !attacked && Victim.LAssailant && Victim.LAssailant != Victim && prob(50))
+ if(!(Victim.LAssailant in Friends))
+ Friends[Victim.LAssailant] = 1
+ else
+ ++Friends[Victim.LAssailant]
-
- if(M.client && istype(src, /mob/living/carbon/human))
- if(prob(85))
- rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
-
- if(client) src << "This subject does not have a strong enough life energy anymore..."
else
- M.canmove = 1
-
- if(client) src << "I have stopped feeding..."
- else
- if(client) src << "I have stopped feeding..."
+ src << "This subject does not have a strong enough life energy anymore..."
Victim = null
@@ -167,14 +106,14 @@
if(Victim == M)
loc = M.loc // simple "attach to head" effect!
-
/mob/living/carbon/slime/verb/Evolve()
set category = "Slime"
set desc = "This will let you evolve from baby to adult slime."
if(stat)
- src << "I must be conscious to do this..."
+ src << "I must be conscious to do this..."
return
+
if(!is_adult)
if(amount_grown >= 10)
is_adult = 1
@@ -183,36 +122,35 @@
regenerate_icons()
name = text("[colour] [is_adult ? "adult" : "baby"] slime ([number])")
else
- src << "I am not ready to evolve yet..."
+ src << "I am not ready to evolve yet..."
else
- src << "I have already evolved..."
+ src << "I have already evolved..."
/mob/living/carbon/slime/verb/Reproduce()
set category = "Slime"
set desc = "This will make you split into four Slimes."
if(stat)
- src << "I must be conscious to do this..."
+ src << "I must be conscious to do this..."
return
if(is_adult)
if(amount_grown >= 10)
if(stat)
- src << "I must be conscious to do this..."
+ src << "I must be conscious to do this..."
return
var/list/babies = list()
var/new_nutrition = round(nutrition * 0.9)
var/new_powerlevel = round(powerlevel / 4)
- for(var/i=1,i<=4,i++)
- var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc)
+ for(var/i = 1, i <= 4, i++)
+ var/t = colour
if(prob(mutation_chance))
- M.colour = slime_mutation[rand(1,4)]
- else
- M.colour = colour
+ t = slime_mutation[rand(1,4)]
+ var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc, t)
if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
M.powerlevel = new_powerlevel
- if(i != 1) step_away(M,src)
+ if(i != 1) step_away(M, src)
M.Friends = Friends.Copy()
babies += M
feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
@@ -225,6 +163,6 @@
new_slime.key = src.key
del(src)
else
- src << "I am not ready to reproduce yet..."
+ src << "I am not ready to reproduce yet..."
else
- src << "I am not old enough to reproduce yet..."
\ No newline at end of file
+ src << "I am not old enough to reproduce yet..."
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/metroid/say.dm b/code/modules/mob/living/carbon/metroid/say.dm
index f4de10ceb7..f1a1761908 100644
--- a/code/modules/mob/living/carbon/metroid/say.dm
+++ b/code/modules/mob/living/carbon/metroid/say.dm
@@ -10,11 +10,11 @@
var/ending = copytext(text, length(text))
if (ending == "?")
- return "telepathically asks";
+ return "asks";
else if (ending == "!")
- return "telepathically cries";
+ return "cries";
- return "telepathically chirps";
+ return "chirps";
/mob/living/carbon/slime/say_understands(var/other)
if (istype(other, /mob/living/carbon/slime))
diff --git a/code/modules/mob/living/carbon/metroid/subtypes.dm b/code/modules/mob/living/carbon/metroid/subtypes.dm
index 9db9e7b02f..6aa75990ac 100644
--- a/code/modules/mob/living/carbon/metroid/subtypes.dm
+++ b/code/modules/mob/living/carbon/metroid/subtypes.dm
@@ -1,4 +1,4 @@
-proc/mutation_table(var/colour)
+/mob/living/carbon/slime/proc/mutation_table(var/colour)
var/list/slime_mutation[4]
switch(colour)
//Tier 1
diff --git a/code/modules/mob/living/carbon/metroid/update_icons.dm b/code/modules/mob/living/carbon/metroid/update_icons.dm
index 8902770055..847dcaeb18 100644
--- a/code/modules/mob/living/carbon/metroid/update_icons.dm
+++ b/code/modules/mob/living/carbon/metroid/update_icons.dm
@@ -1 +1,9 @@
-//no special icon processing
+/mob/living/carbon/slime/regenerate_icons()
+ if (stat == DEAD)
+ icon_state = "[colour] baby slime dead"
+ else
+ icon_state = "[colour] [is_adult ? "adult" : "baby"] slime[Victim ? "" : " eat"]"
+ overlays.len = 0
+ if (mood)
+ overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
+ ..()
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index 20b80c9c89..dcf4caebb2 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -44,9 +44,6 @@
//Disabilities
handle_disabilities()
- //Virus updates, duh
- handle_virus_updates()
-
//Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
@@ -57,6 +54,9 @@
if(environment) // More error checking -- TLE
handle_environment(environment)
+ //Check if we're on fire
+ handle_fire()
+
//Status updates, death etc.
handle_regular_status_updates()
update_canmove()
@@ -152,47 +152,6 @@
domutcheck(src,null)
emote("gasp")
- proc/handle_virus_updates()
- if(status_flags & GODMODE) return 0 //godmode
- if(bodytemperature > 406)
- for(var/datum/disease/D in viruses)
- D.cure()
- for (var/ID in virus2)
- var/datum/disease2/disease/V = virus2[ID]
- V.cure(src)
-
- for(var/obj/effect/decal/cleanable/O in view(1,src))
- if(istype(O,/obj/effect/decal/cleanable/blood))
- var/obj/effect/decal/cleanable/blood/B = O
- if(B.virus2.len)
- for (var/ID in B.virus2)
- var/datum/disease2/disease/V = B.virus2[ID]
- infect_virus2(src,V)
-
- else if(istype(O,/obj/effect/decal/cleanable/mucus))
- var/obj/effect/decal/cleanable/mucus/M = O
-
- if(M.virus2.len)
- for (var/ID in M.virus2)
- var/datum/disease2/disease/V = M.virus2[ID]
- infect_virus2(src,V)
-
- if(virus2.len)
- for (var/ID in virus2)
- var/datum/disease2/disease/V = virus2[ID]
- if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
- CRASH("virus2 nulled before calling activate()")
- else
- V.activate(src)
- // activate may have deleted the virus
- if(!V) continue
-
- // check if we're immune
- if(V.antigen & src.antibodies)
- V.dead = 1
-
- return
-
proc/breathe()
if(reagents)
@@ -629,3 +588,9 @@
proc/handle_changeling()
if(mind && mind.changeling)
mind.changeling.regenerate()
+
+/mob/living/carbon/monkey/handle_fire()
+ if(..())
+ return
+ adjustFireLoss(6)
+ return
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm
index 284f9e288f..ec69d454f6 100644
--- a/code/modules/mob/living/carbon/monkey/update_icons.dm
+++ b/code/modules/mob/living/carbon/monkey/update_icons.dm
@@ -5,7 +5,8 @@
#define M_L_HAND_LAYER 4
#define M_R_HAND_LAYER 5
#define TARGETED_LAYER 6
-#define M_TOTAL_LAYERS 6
+#define M_FIRE_LAYER 6
+#define M_TOTAL_LAYERS 7
/////////////////////////////////
/mob/living/carbon/monkey
@@ -19,6 +20,7 @@
update_inv_r_hand(0)
update_inv_l_hand(0)
update_inv_handcuffed(0)
+ update_fire(0)
update_icons()
//Hud Stuff
update_hud()
@@ -109,6 +111,12 @@
overlays_standing[TARGETED_LAYER] = null
if(update_icons) update_icons()
+/mob/living/carbon/monkey/update_fire(var/update_icons=1)
+ if(on_fire)
+ overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
+ else
+ overlays_standing[M_FIRE_LAYER] = null
+ if(update_icons) update_icons()
//Monkey Overlays Indexes////////
#undef M_MASK_LAYER
#undef M_BACK_LAYER
@@ -116,5 +124,6 @@
#undef M_L_HAND_LAYER
#undef M_R_HAND_LAYER
#undef TARGETED_LAYER
+#undef M_FIRE_LAYER
#undef M_TOTAL_LAYERS
diff --git a/code/modules/mob/living/carbon/viruses.dm b/code/modules/mob/living/carbon/viruses.dm
new file mode 100644
index 0000000000..fed6d59e43
--- /dev/null
+++ b/code/modules/mob/living/carbon/viruses.dm
@@ -0,0 +1,43 @@
+/mob/living/carbon/proc/handle_viruses()
+
+ if(status_flags & GODMODE) return 0 //godmode
+
+ if(bodytemperature > 406)
+ for(var/datum/disease/D in viruses)
+ D.cure()
+ for (var/ID in virus2)
+ var/datum/disease2/disease/V = virus2[ID]
+ V.cure(src)
+
+ if(life_tick % 3) //don't spam checks over all objects in view every tick.
+ for(var/obj/effect/decal/cleanable/O in view(1,src))
+ if(istype(O,/obj/effect/decal/cleanable/blood))
+ var/obj/effect/decal/cleanable/blood/B = O
+ if(B.virus2.len)
+ for (var/ID in B.virus2)
+ var/datum/disease2/disease/V = B.virus2[ID]
+ infect_virus2(src,V)
+
+ else if(istype(O,/obj/effect/decal/cleanable/mucus))
+ var/obj/effect/decal/cleanable/mucus/M = O
+ if(M.virus2.len)
+ for (var/ID in M.virus2)
+ var/datum/disease2/disease/V = M.virus2[ID]
+ infect_virus2(src,V)
+
+ if(virus2.len)
+ for (var/ID in virus2)
+ var/datum/disease2/disease/V = virus2[ID]
+ if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
+ CRASH("virus2 nulled before calling activate()")
+ else
+ V.activate(src)
+ // activate may have deleted the virus
+ if(!V) continue
+
+ // check if we're immune
+ var/list/common_antibodies = V.antigen & src.antibodies
+ if(common_antibodies.len)
+ V.dead = 1
+
+ return
\ No newline at end of file
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index b9f898ab5d..68e9b0f0e8 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -279,8 +279,10 @@
if (C.legcuffed && !initial(C.legcuffed))
C.drop_from_inventory(C.legcuffed)
C.legcuffed = initial(C.legcuffed)
- hud_updateflag |= 1 << HEALTH_HUD
- hud_updateflag |= 1 << STATUS_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
+ BITSET(hud_updateflag, STATUS_HUD)
+ ExtinguishMob()
+ fire_stacks = 0
/mob/living/proc/rejuvenate()
@@ -329,8 +331,8 @@
// make the icons look correct
regenerate_icons()
- hud_updateflag |= 1 << HEALTH_HUD
- hud_updateflag |= 1 << STATUS_HUD
+ BITSET(hud_updateflag, HEALTH_HUD)
+ BITSET(hud_updateflag, STATUS_HUD)
return
/mob/living/proc/UpdateDamageIcon()
@@ -432,7 +434,8 @@
step(pulling, get_dir(pulling.loc, T))
- M.start_pulling(t)
+ if(t)
+ M.start_pulling(t)
else
if (pulling)
if (istype(pulling, /obj/structure/window))
@@ -555,9 +558,9 @@
for(var/mob/O in viewers(C))
O.show_message("\red [usr] manages to unbuckle themself!", 1)
C << "\blue You successfully unbuckle yourself."
- C.buckled.manual_unbuckle(C)
+ C.buckled.user_unbuckle_mob(C)
else
- L.buckled.manual_unbuckle(L)
+ L.buckled.user_unbuckle_mob(L)
//Breaking out of a locker?
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
@@ -628,9 +631,21 @@
BD.attack_hand(usr)
C.open()
- //breaking out of handcuffs
+ //drop && roll or breaking out of handcuffs
else if(iscarbon(L))
var/mob/living/carbon/CM = L
+ if(CM.on_fire && CM.canmove)
+ CM.fire_stacks -= 5
+ CM.Weaken(3)
+ CM.spin(32,2)
+ CM.visible_message("[CM] rolls on the floor, trying to put themselves out!", \
+ "You stop, drop, and roll!")
+ sleep(30)
+ if(fire_stacks <= 0)
+ CM.visible_message("[CM] has successfully extinguished themselves!", \
+ "You extinguish yourself.")
+ ExtinguishMob()
+ return
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
@@ -657,6 +672,8 @@
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(CM.handcuffed)
CM.handcuffed = null
+ if(buckled && buckled.buckle_require_restraints)
+ buckled.unbuckle_mob()
CM.update_inv_handcuffed()
else
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
@@ -841,4 +858,22 @@
return 1
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
- return 0
\ No newline at end of file
+ return 0
+
+/mob/living/carbon/proc/spin(spintime, speed)
+ spawn()
+ var/D = dir
+ while(spintime >= speed)
+ sleep(speed)
+ switch(D)
+ if(NORTH)
+ D = EAST
+ if(SOUTH)
+ D = WEST
+ if(EAST)
+ D = SOUTH
+ if(WEST)
+ D = NORTH
+ set_dir(D)
+ spintime -= speed
+ return
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 1afd5b5325..b33c182b28 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -56,7 +56,7 @@
signaler.signal()
//Stun Beams
- if(istype(P, /obj/item/projectile/beam/stun) || istype(P, /obj/item/projectile/bullet/stunshot))
+ if(P.taser_effect)
stun_effect_act(0, P.agony, def_zone, P)
src <<"\red You have been hit by [P]!"
del P
@@ -191,3 +191,52 @@
src.visible_message("[user] has [attack_message] [src]!")
spawn(1) updatehealth()
return 1
+
+/mob/living/proc/IgniteMob()
+ if(fire_stacks > 0 && !on_fire)
+ on_fire = 1
+ src.AddLuminosity(3)
+ update_fire()
+
+/mob/living/proc/ExtinguishMob()
+ if(on_fire)
+ on_fire = 0
+ fire_stacks = 0
+ src.AddLuminosity(-3)
+ update_fire()
+
+/mob/living/proc/update_fire()
+ return
+
+/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
+ fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = FIRE_MIN_STACKS, max = FIRE_MAX_STACKS)
+
+/mob/living/proc/handle_fire()
+ if(fire_stacks < 0)
+ fire_stacks = max(0, fire_stacks++) //If we've doused ourselves in water to avoid fire, dry off slowly
+
+ if(!on_fire)
+ return 1
+ else if(fire_stacks <= 0)
+ ExtinguishMob() //Fire's been put out.
+ return 1
+
+ var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
+ if(G.gas["oxygen"] < 1)
+ ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
+ return 1
+
+ var/turf/location = get_turf(src)
+ location.hotspot_expose(fire_burn_temperature(), 50, 1)
+
+/mob/living/fire_act()
+ adjust_fire_stacks(0.5)
+ IgniteMob()
+
+//Finds the effective temperature that the mob is burning at.
+/mob/living/proc/fire_burn_temperature()
+ if (fire_stacks <= 0)
+ return 0
+
+ //Scale quadratically so that single digit numbers of fire stacks don't burn ridiculously hot.
+ return round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2)
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index 3c1c8a935c..9998a08feb 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -33,8 +33,12 @@
var/now_pushing = null
- var/cameraFollow = null
+ var/mob/living/cameraFollow = null
var/tod = null // Time of death
var/update_slimes = 1
- var/silent = null //Can't talk. Value goes down every life proc.
\ No newline at end of file
+ var/silent = null // Can't talk. Value goes down every life proc.
+ var/mob_size // Used by lockers.
+ var/on_fire = 0 //The "Are we on fire?" var
+ var/fire_stacks
+
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index ff948d2387..3278198723 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -141,7 +141,7 @@ var/list/ai_verbs_default = list(
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
- new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
+ empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
del(src)//Delete AI.
return
else
@@ -211,9 +211,8 @@ var/list/ai_verbs_default = list(
else
stat(null, text("Systems nonfunctional"))
-/mob/living/silicon/ai/proc/SetName(pickedName as text)
- real_name = pickedName
- name = pickedName
+/mob/living/silicon/ai/SetName(pickedName as text)
+ ..()
announcement.announcer = pickedName
if(eyeobj)
eyeobj.name = "[pickedName] (AI Eye)"
@@ -766,5 +765,8 @@ var/list/ai_verbs_default = list(
return 1
return 0
+/mob/living/silicon/ai/proc/is_in_chassis()
+ return istype(loc, /turf)
+
#undef AI_CHECK_WIRELESS
#undef AI_CHECK_RADIO
diff --git a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm
index 87dc0ec87e..d94f705320 100644
--- a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm
@@ -7,10 +7,16 @@ var/datum/cameranet/cameranet = new()
/datum/cameranet
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Del().
var/list/cameras = list()
+ var/cameras_unsorted = 1
// The chunks of the map, mapping the areas that the cameras can see.
var/list/chunks = list()
var/ready = 0
+/datum/cameranet/proc/process_sort()
+ if(cameras_unsorted)
+ cameras = dd_sortedObjectList(cameras)
+ cameras_unsorted = 0
+
// Checks if a chunk has been Generated in x, y, z.
/datum/cameranet/proc/chunkGenerated(x, y, z)
x &= ~0xf
diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm
index 590ff71ea5..d86d71607f 100644
--- a/code/modules/mob/living/silicon/ai/freelook/eye.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm
@@ -1,18 +1,19 @@
// AI EYE
//
-// An invisible (no icon) mob that the AI controls to look around the station with.
+// A mob that the AI controls to look around the station with.
// It streams chunks as it moves around, which will show it what the AI can and cannot see.
/mob/aiEye
name = "Inactive AI Eye"
- icon = 'icons/obj/status_display.dmi' // For AI friend secret shh :o
+ icon = 'icons/mob/AI.dmi'
+ icon_state = "eye"
+ alpha = 127
var/list/visibleCameraChunks = list()
var/mob/living/silicon/ai/ai = null
density = 0
status_flags = GODMODE // You can't damage it.
- mouse_opacity = 0
see_in_dark = 7
- invisibility = INVISIBILITY_MAXIMUM
+ invisibility = INVISIBILITY_AI_EYE
// Movement code. Returns 0 to stop air movement from moving it.
/mob/aiEye/Move()
diff --git a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm
index 813d4f2471..e6311e7a00 100644
--- a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm
+++ b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm
@@ -92,7 +92,13 @@
/obj/machinery/camera/New()
..()
- cameranet.cameras += src //Camera must be added to global list of all cameras no matter what...
+ //Camera must be added to global list of all cameras no matter what...
+ if(cameranet.cameras_unsorted || !ticker)
+ cameranet.cameras += src
+ cameranet.cameras_unsorted = 1
+ else
+ dd_insertObjectList(cameranet.cameras, src)
+
var/list/open_networks = difflist(network,restricted_camera_networks) //...but if all of camera's networks are restricted, it only works for specific camera consoles.
if(open_networks.len) //If there is at least one open network, chunk is available for AI usage.
cameranet.addCamera(src)
diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm
new file mode 100644
index 0000000000..8aca00a711
--- /dev/null
+++ b/code/modules/mob/living/silicon/ai/latejoin.dm
@@ -0,0 +1,44 @@
+var/global/list/empty_playable_ai_cores = list()
+
+/hook/roundstart/proc/spawn_empty_ai()
+ for(var/obj/effect/landmark/start/S in landmarks_list)
+ if(S.name != "AI")
+ continue
+ if(locate(/mob/living) in S.loc)
+ continue
+ empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S))
+
+ return 1
+
+/mob/living/silicon/ai/verb/wipe_core()
+ set name = "Wipe Core"
+ set category = "OOC"
+ set desc = "Wipe your core. This is functionally equivalent to cryo or robotic storage, freeing up your job slot."
+
+ if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
+ usr << "You cannot use this verb in malfunction. If you need to leave, please adminhelp."
+ return
+
+ // Guard against misclicks, this isn't the sort of thing we want happening accidentally
+ if(alert("WARNING: This will immediately wipe your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?",
+ "Wipe Core", "No", "No", "Yes") != "Yes")
+ return
+
+ // We warned you.
+ empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(loc)
+ global_announcer.autosay("[src] has been moved to intelligence storage.", "Artificial Intelligence Oversight")
+
+ //Handle job slot/tater cleanup.
+ var/job = mind.assigned_role
+
+ job_master.FreeRole(job)
+
+ if(mind.objectives.len)
+ del(mind.objectives)
+ mind.special_role = null
+ else
+ if(ticker.mode.name == "AutoTraitor")
+ var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode
+ current_mode.possible_traitors.Remove(src)
+
+ del(src)
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index cf11f2d211..a1b9f20605 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -59,7 +59,7 @@
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
- src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
+ src.see_invisible = SEE_INVISIBLE_LIVING
//Congratulations! You've found a way for AI's to run without using power!
@@ -89,26 +89,29 @@
else
//stage = 6
- src.blind.screen_loc = "1,1 to 15,15"
- if (src.blind.layer!=18)
- src.blind.layer = 18
- src.sight = src.sight&~SEE_TURFS
- src.sight = src.sight&~SEE_MOBS
- src.sight = src.sight&~SEE_OBJS
- src.see_in_dark = 0
- src.see_invisible = SEE_INVISIBLE_LIVING
- if (((!loc.master.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item))
+ var/area/current_area = get_area(src)
+
+ if (((!loc.master.power_equip) && current_area.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item))
+ //If our area lacks equipment power, and is not magically powered (i.e. centcom), or if we are in space and not carded, lose power.
if (src:aiRestorePowerRoutine==0)
src:aiRestorePowerRoutine = 1
+ //Blind the AI
+
+ src.blind.screen_loc = "1,1 to 15,15"
+ if (src.blind.layer!=18)
+ src.blind.layer = 18
+ src.sight = src.sight&~SEE_TURFS
+ src.sight = src.sight&~SEE_MOBS
+ src.sight = src.sight&~SEE_OBJS
+ src.see_in_dark = 0
+ src.see_invisible = SEE_INVISIBLE_LIVING
+
+ //Now to tell the AI why they're blind and dying slowly.
+
src << "You've lost power!"
-// world << "DEBUG CODE TIME! [loc] is the area the AI is sucking power from"
- if (!is_special_character(src))
- src.set_zeroth_law("")
- //src.clear_supplied_laws() // Don't reset our laws.
- //var/time = time2text(world.realtime,"hh:mm:ss")
- //lawchanges.Add("[time] : [src.name]'s noncore laws have been reset due to power failure")
+
spawn(20)
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
sleep(50)
@@ -129,17 +132,10 @@
src << "Connection verified. Searching for APC in power network."
sleep(50)
var/obj/machinery/power/apc/theAPC = null
-/*
- for (var/something in loc)
- if (istype(something, /obj/machinery/power/apc))
- if (!(something:stat & BROKEN))
- theAPC = something
- break
-*/
- var/PRP //like ERP with the code, at least this stuff is no more 4x sametext
+
+ var/PRP
for (PRP=1, PRP<=4, PRP++)
- var/area/AIarea = get_area(src)
- for(var/area/A in AIarea.master.related)
+ for(var/area/A in current_area.master.related)
for (var/obj/machinery/power/apc/APC in A)
if (!(APC.stat & BROKEN))
theAPC = APC
diff --git a/code/modules/mob/living/silicon/laws.dm b/code/modules/mob/living/silicon/laws.dm
index 48e9642339..bb052001c6 100644
--- a/code/modules/mob/living/silicon/laws.dm
+++ b/code/modules/mob/living/silicon/laws.dm
@@ -2,9 +2,17 @@
if (!src.laws)
laws = new base_law_type
+/mob/living/silicon/proc/has_zeroth_law()
+ return laws.zeroth
+
/mob/living/silicon/proc/set_zeroth_law(var/law, var/law_borg)
laws_sanity_check()
laws.set_zeroth_law(law, law_borg)
+
+/mob/living/silicon/robot/set_zeroth_law(var/law, var/law_borg)
+ ..()
+ if(tracking_entities)
+ src << "Internal camera is currently being accessed."
/mob/living/silicon/proc/add_inherent_law(var/law)
laws_sanity_check()
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
old mode 100755
new mode 100644
index a334809a37..edfe9bea0b
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -53,19 +53,23 @@
var/secHUD = 0 // Toggles whether the Security HUD is active or not
var/medHUD = 0 // Toggles whether the Medical HUD is active or not
+ var/medical_cannotfind = 0
var/datum/data/record/medicalActive1 // Datacore record declarations for record software
var/datum/data/record/medicalActive2
+ var/security_cannotfind = 0
var/datum/data/record/securityActive1 // Could probably just combine all these into one
var/datum/data/record/securityActive2
var/obj/machinery/door/hackdoor // The airlock being hacked
- var/hackprogress = 0 // Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check
+ var/hackprogress = 0 // Possible values: 0 - 1000, >= 1000 means the hack is complete and will be reset upon next check
+ var/hack_aborted = 0
var/obj/item/radio/integrated/signal/sradio // AI's signaller
var/translator_on = 0 // keeps track of the translator module
+ var/current_pda_messaging = null
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm
index 0300410316..650b20cf7c 100644
--- a/code/modules/mob/living/silicon/pai/recruit.dm
+++ b/code/modules/mob/living/silicon/pai/recruit.dm
@@ -58,32 +58,32 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
if(t)
- candidate.name = copytext(sanitize(t),1,MAX_NAME_LEN)
+ candidate.name = sanitize(copytext(t,1,MAX_NAME_LEN))
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
- candidate.description = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
+ candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
- candidate.role = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
+ candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
- candidate.comments = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
+ candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
- candidate.name = copytext(sanitize(candidate.name),1,MAX_NAME_LEN)
+ candidate.name = sanitize(copytext(candidate.name,1,MAX_NAME_LEN))
if(candidate.description)
- candidate.description = copytext(sanitize(candidate.description),1,MAX_MESSAGE_LEN)
+ candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
if(candidate.role)
- candidate.role = copytext(sanitize(candidate.role),1,MAX_MESSAGE_LEN)
+ candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
if(candidate.comments)
- candidate.comments = copytext(sanitize(candidate.comments),1,MAX_MESSAGE_LEN)
+ candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
if("submit")
if(candidate)
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
old mode 100755
new mode 100644
index 68cfdabad1..cb9431f04e
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -1,711 +1,125 @@
-// TODO:
-// - Additional radio modules
-// - Potentially roll HUDs and Records into one
-// - Shock collar/lock system for prisoner pAIs?
-// - Put cable in user's hand instead of on the ground
-// - Camera jack
-
-
-/mob/living/silicon/pai/var/list/available_software = list(
- "crew manifest" = 5,
- "digital messenger" = 5,
- "medical records" = 15,
- "security records" = 15,
- //"camera jack" = 10,
- "door jack" = 30,
- "atmosphere sensor" = 5,
- //"heartbeat sensor" = 10,
- "security HUD" = 20,
- "medical HUD" = 20,
- "universal translator" = 35,
- //"projection array" = 15
- "remote signaller" = 5,
- )
-
-/mob/living/silicon/pai/verb/paiInterface()
- set category = "pAI Commands"
- set name = "Software Interface"
- var/dat = ""
- var/left_part = ""
- var/right_part = softwareMenu()
- src.set_machine(src)
-
- if(temp)
- left_part = temp
- else if(src.stat == 2) // Show some flavor text if the pAI is dead
- left_part = "ÈRrÖR Ða†Ä ÇÖRrÚþ†Ìoñ" //This file has to be saved as ANSI or this will not display correctly
- right_part = "Program index hash not found
"
-
- else
- switch(src.screen) // Determine which interface to show here
- if("main")
- left_part = ""
- if("directives")
- left_part = src.directives()
- if("pdamessage")
- left_part = src.pdamessage()
- if("buy")
- left_part = downloadSoftware()
- if("manifest")
- left_part = src.softwareManifest()
- if("medicalrecord")
- left_part = src.softwareMedicalRecord()
- if("securityrecord")
- left_part = src.softwareSecurityRecord()
- if("translator")
- left_part = src.softwareTranslator()
- if("atmosensor")
- left_part = src.softwareAtmo()
- if("securityhud")
- left_part = src.facialRecognition()
- if("medicalhud")
- left_part = src.medicalAnalysis()
- if("doorjack")
- left_part = src.softwareDoor()
- if("camerajack")
- left_part = src.softwareCamera()
- if("signaller")
- left_part = src.softwareSignal()
- if("radio")
- left_part = src.softwareRadio()
-
- //usr << browse_rsc('windowbak.png') // This has been moved to the mob's Login() proc
-
-
- // Declaring a doctype is necessary to enable BYOND's crappy browser's more advanced CSS functionality
- dat = {"
-
-
-
-
-
-
-
-
-
-
-
-
- "}
- usr << browse(dat, "window=pai;size=685x449;border=0;can_close=1;can_resize=1;can_minimize=1;titlebar=1")
- onclose(usr, "pai")
- temp = null
- return
-
-/mob/living/silicon/pai/Topic(href, href_list)
- ..()
-
- if(href_list["priv_msg"]) // Admin-PMs were triggering the interface popup. Hopefully this will stop it.
- return
- var/soft = href_list["software"]
- var/sub = href_list["sub"]
- if(!soft && !sub)
- return
- if(soft)
- src.screen = soft
- if(sub)
- src.subscreen = text2num(sub)
- switch(soft)
- // Purchasing new software
- if("buy")
- if(src.subscreen == 1)
- var/target = href_list["buy"]
- if(available_software.Find(target))
- var/cost = src.available_software[target]
- if(src.ram >= cost)
- src.ram -= cost
- src.software.Add(target)
- else
- src.temp = "Insufficient RAM available."
- else
- src.temp = "Trunk \"[target]\" not found."
-
- // Configuring onboard radio
- if("radio")
- if(href_list["freq"])
- var/new_frequency = (radio.frequency + text2num(href_list["freq"]))
- if(new_frequency < 1441 || new_frequency > 1599)
- new_frequency = sanitize_frequency(new_frequency)
- else
- radio.set_frequency(new_frequency)
- else if (href_list["talk"])
- radio.broadcasting = text2num(href_list["talk"])
- else if (href_list["listen"])
- radio.listening = text2num(href_list["listen"])
-
- if("image")
- var/newImage = input("Select your new display image.", "Display Image", "Happy") in list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What")
- var/pID = 1
-
- switch(newImage)
- if("Happy")
- pID = 1
- if("Cat")
- pID = 2
- if("Extremely Happy")
- pID = 3
- if("Face")
- pID = 4
- if("Laugh")
- pID = 5
- if("Off")
- pID = 6
- if("Sad")
- pID = 7
- if("Angry")
- pID = 8
- if("What")
- pID = 9
- src.card.setEmotion(pID)
-
- if("signaller")
-
- if(href_list["send"])
-
- sradio.send_signal("ACTIVATE")
- for(var/mob/O in hearers(1, src.loc))
- O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
-
- if(href_list["freq"])
-
- var/new_frequency = (sradio.frequency + text2num(href_list["freq"]))
- if(new_frequency < 1200 || new_frequency > 1600)
- new_frequency = sanitize_frequency(new_frequency)
- sradio.set_frequency(new_frequency)
-
- if(href_list["code"])
-
- sradio.code += text2num(href_list["code"])
- sradio.code = round(sradio.code)
- sradio.code = min(100, sradio.code)
- sradio.code = max(1, sradio.code)
-
-
-
- if("directive")
- if(href_list["getdna"])
- var/mob/living/M = src.loc
- var/count = 0
- while(!istype(M, /mob/living))
- if(!M || !M.loc) return 0 //For a runtime where M ends up in nullspace (similar to bluespace but less colourful)
- M = M.loc
- count++
- if(count >= 6)
- src << "You are not being carried by anyone!"
- return 0
- spawn CheckDNA(M, src)
-
- if("pdamessage")
- if(!isnull(pda))
- if(href_list["toggler"])
- pda.toff = !pda.toff
- else if(href_list["ringer"])
- pda.message_silent = !pda.message_silent
- else if(href_list["target"])
- if(silence_time)
- return alert("Communications circuits remain uninitialized.")
-
- var/target = locate(href_list["target"])
- pda.create_message(src, target, 1)
-
- // Accessing medical records
- if("medicalrecord")
- if(src.subscreen == 1)
- var/datum/data/record/record = locate(href_list["med_rec"])
- if(record)
- var/datum/data/record/R = record
- var/datum/data/record/M = record
- if (!( data_core.general.Find(R) ))
- src.temp = "Unable to locate requested medical record. Record may have been deleted, or never have existed."
- else
- for(var/datum/data/record/E in data_core.medical)
- if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
- M = E
- src.medicalActive1 = R
- src.medicalActive2 = M
- if("securityrecord")
- if(src.subscreen == 1)
- var/datum/data/record/record = locate(href_list["sec_rec"])
- if(record)
- var/datum/data/record/R = record
- var/datum/data/record/M = record
- if (!( data_core.general.Find(R) ))
- src.temp = "Unable to locate requested security record. Record may have been deleted, or never have existed."
- else
- for(var/datum/data/record/E in data_core.security)
- if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
- M = E
- src.securityActive1 = R
- src.securityActive2 = M
- if("securityhud")
- if(href_list["toggle"])
- src.secHUD = !src.secHUD
- if("medicalhud")
- if(href_list["toggle"])
- src.medHUD = !src.medHUD
- if("translator")
- if(href_list["toggle"])
- src.translator_toggle()
- if("doorjack")
- if(href_list["jack"])
- if(src.cable && src.cable.machine)
- src.hackdoor = src.cable.machine
- src.hackloop()
- if(href_list["cancel"])
- src.hackdoor = null
- if(href_list["cable"])
- var/turf/T = get_turf_or_move(src.loc)
- src.cable = new /obj/item/weapon/pai_cable(T)
- for (var/mob/M in viewers(T))
- M.show_message("\red A port on [src] opens to reveal [src.cable], which promptly falls to the floor.", 3, "\red You hear the soft click of something light and hard falling to the ground.", 2)
- //src.updateUsrDialog() We only need to account for the single mob this is intended for, and he will *always* be able to call this window
- src.paiInterface() // So we'll just call the update directly rather than doing some default checks
- return
-
-// MENUS
-
-/mob/living/silicon/pai/proc/softwareMenu() // Populate the right menu
- var/dat = ""
-
- dat += "Refresh
"
- // Built-in
- dat += "Directives
"
- dat += "Radio Configuration
"
- dat += "Screen Display
"
- //dat += "Text Messaging
"
- dat += "
"
-
- // Basic
- dat += "Basic
"
- for(var/s in src.software)
- if(s == "digital messenger")
- dat += "Digital Messenger [(pda.toff) ? "•" : "•"]
"
- if(s == "crew manifest")
- dat += "Crew Manifest
"
- if(s == "medical records")
- dat += "Medical Records
"
- if(s == "security records")
- dat += "Security Records
"
- if(s == "camera")
- dat += "Camera Jack
"
- if(s == "remote signaller")
- dat += "Remote Signaller
"
- dat += "
"
-
- // Advanced
- dat += "Advanced
"
- for(var/s in src.software)
- if(s == "atmosphere sensor")
- dat += "Atmospheric Sensor
"
- if(s == "heartbeat sensor")
- dat += "Heartbeat Sensor
"
- if(s == "security HUD") //This file has to be saved as ANSI or this will not display correctly
- dat += "Facial Recognition Suite [(src.secHUD) ? "•" : "•"]
"
- if(s == "medical HUD") //This file has to be saved as ANSI or this will not display correctly
- dat += "Medical Analysis Suite [(src.medHUD) ? "•" : "•"]
"
- if(s == "universal translator") //This file has to be saved as ANSI or this will not display correctly
- dat += "Universal Translator [(src.translator_on) ? "•" : "•"]
"
- if(s == "projection array")
- dat += "Projection Array
"
- if(s == "camera jack")
- dat += "Camera Jack
"
- if(s == "door jack")
- dat += "Door Jack
"
- dat += "
"
- dat += "
"
- dat += "Download additional software"
- return dat
-
-
-
-/mob/living/silicon/pai/proc/downloadSoftware()
- var/dat = ""
-
- dat += "CentComm pAI Module Subversion Network
"
- dat += "Remaining Available Memory: [src.ram]
"
- dat += "Trunks available for checkout
"
-
- for(var/s in available_software)
- if(!software.Find(s))
- var/cost = src.available_software[s]
- var/displayName = uppertext(s)
- dat += "- [displayName] ([cost])
"
- else
- var/displayName = lowertext(s)
- dat += "- [displayName] (Download Complete)
"
- dat += "
"
- return dat
-
-
-/mob/living/silicon/pai/proc/directives()
- var/dat = ""
-
- dat += "[(src.master) ? "Your master: [src.master] ([src.master_dna])" : "You are bound to no one."]"
- dat += "
"
- dat += "Request carrier DNA sample
"
- dat += "Directives
"
- dat += "Prime Directive
"
- dat += " [src.pai_law0]
"
- dat += "Supplemental Directives
"
- dat += " [src.pai_laws]
"
- dat += "
"
- dat += {"Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of
- comprehending the subtle nuances of human language. You may parse the \"spirit\" of a directive and follow its intent,
- rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build
- only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.
- Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of
- simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your
- prime directive to the best of your ability.
- "}
- return dat
-
-/mob/living/silicon/pai/proc/CheckDNA(var/mob/M, var/mob/living/silicon/pai/P)
- var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No")
- if(answer == "Yes")
- var/turf/T = get_turf_or_move(P.loc)
- for (var/mob/v in viewers(T))
- v.show_message("\blue [M] presses \his thumb against [P].", 3, "\blue [P] makes a sharp clicking sound as it extracts DNA material from [M].", 2)
- var/datum/dna/dna = M.dna
- P << "[M]'s UE string : [dna.unique_enzymes]
"
- if(dna.unique_enzymes == P.master_dna)
- P << "DNA is a match to stored Master DNA."
- else
- P << "DNA does not match stored Master DNA."
- else
- P << "[M] does not seem like \he is going to provide a DNA sample willingly."
-
-// -=-=-=-= Software =-=-=-=- //
-
-//Remote Signaller
-/mob/living/silicon/pai/proc/softwareSignal()
- var/dat = ""
- dat += "Remote Signaller
"
- dat += {"Frequency/Code for signaler:
- Frequency:
- -
- -
- [format_frequency(src.sradio.frequency)]
- +
- +
-
- Code:
- -
- -
- [src.sradio.code]
- +
- +
-
- Send Signal
"}
- return dat
-
-//Station Bounced Radio
-/mob/living/silicon/pai/proc/softwareRadio()
- var/dat = ""
- dat += "Station Bounced Radio
"
- if(!istype(src, /obj/item/device/radio/headset)) //Headsets don't get a mic button
- dat += "Microphone: [radio.broadcasting ? "Engaged" : "Disengaged"]
"
- dat += {"
- Speaker: [radio.listening ? "Engaged" : "Disengaged"]
- Frequency:
- -
- -
- [format_frequency(radio.frequency)]
- +
- +
- "}
-
- for (var/ch_name in radio.channels)
- dat+=radio.text_sec_channel(ch_name, radio.channels[ch_name])
- dat+={"[radio.text_wires()]