mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 21:52:42 +00:00
Merge branch 'dev' into ofChemistryAndStuff
Conflicts: code/datums/recipe.dm code/game/machinery/bots/farmbot.dm code/game/machinery/bots/medbot.dm code/game/mecha/equipment/tools/tools.dm code/game/objects/effects/chem/chemsmoke.dm code/game/objects/effects/effect_system.dm code/game/objects/items/toys.dm code/game/objects/items/weapons/extinguisher.dm code/game/objects/items/weapons/mop.dm code/modules/mob/living/carbon/human/human.dm code/modules/organs/organ_internal.dm code/modules/reagents/Chemistry-Holder.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/Chemistry-Recipes.dm code/modules/reagents/reagent_containers/food/snacks.dm code/modules/reagents/reagent_containers/pill.dm code/modules/reagents/reagent_containers/spray.dm maps/exodus-1.dmm
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
language: c
|
||||
|
||||
env:
|
||||
BYOND_MAJOR="503"
|
||||
BYOND_MINOR="1224"
|
||||
BYOND_MAJOR="507"
|
||||
BYOND_MINOR="1282"
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
|
||||
114
baystation12.dme
114
baystation12.dme
@@ -16,6 +16,7 @@
|
||||
#include "code\setup.dm"
|
||||
#include "code\stylesheet.dm"
|
||||
#include "code\world.dm"
|
||||
#include "code\__HELPERS\datum_pool.dm"
|
||||
#include "code\__HELPERS\files.dm"
|
||||
#include "code\__HELPERS\game.dm"
|
||||
#include "code\__HELPERS\global_lists.dm"
|
||||
@@ -50,6 +51,7 @@
|
||||
#include "code\_onclick\hud\other_mobs.dm"
|
||||
#include "code\_onclick\hud\robot.dm"
|
||||
#include "code\_onclick\hud\screen_objects.dm"
|
||||
#include "code\_onclick\hud\spell_screen_objects.dm"
|
||||
#include "code\ATMOSPHERICS\_atmos_setup.dm"
|
||||
#include "code\ATMOSPHERICS\_atmospherics_helpers.dm"
|
||||
#include "code\ATMOSPHERICS\atmospherics.dm"
|
||||
@@ -103,6 +105,7 @@
|
||||
#include "code\controllers\Processes\disease.dm"
|
||||
#include "code\controllers\Processes\emergencyShuttle.dm"
|
||||
#include "code\controllers\Processes\event.dm"
|
||||
#include "code\controllers\Processes\garbage.dm"
|
||||
#include "code\controllers\Processes\inactivity.dm"
|
||||
#include "code\controllers\Processes\lighting.dm"
|
||||
#include "code\controllers\Processes\machinery.dm"
|
||||
@@ -115,6 +118,7 @@
|
||||
#include "code\controllers\Processes\sun.dm"
|
||||
#include "code\controllers\Processes\supply.dm"
|
||||
#include "code\controllers\Processes\ticker.dm"
|
||||
#include "code\controllers\Processes\turf.dm"
|
||||
#include "code\controllers\Processes\vote.dm"
|
||||
#include "code\controllers\ProcessScheduler\core\_define.dm"
|
||||
#include "code\controllers\ProcessScheduler\core\_stubs.dm"
|
||||
@@ -266,9 +270,17 @@
|
||||
#include "code\game\gamemodes\cult\cult.dm"
|
||||
#include "code\game\gamemodes\cult\cult_items.dm"
|
||||
#include "code\game\gamemodes\cult\cult_structures.dm"
|
||||
#include "code\game\gamemodes\cult\hell_universe.dm"
|
||||
#include "code\game\gamemodes\cult\ritual.dm"
|
||||
#include "code\game\gamemodes\cult\runes.dm"
|
||||
#include "code\game\gamemodes\cult\talisman.dm"
|
||||
#include "code\game\gamemodes\cult\cultify\mob.dm"
|
||||
#include "code\game\gamemodes\cult\cultify\obj.dm"
|
||||
#include "code\game\gamemodes\cult\cultify\turf.dm"
|
||||
#include "code\game\gamemodes\endgame\endgame.dm"
|
||||
#include "code\game\gamemodes\endgame\supermatter_cascade\blob.dm"
|
||||
#include "code\game\gamemodes\endgame\supermatter_cascade\portal.dm"
|
||||
#include "code\game\gamemodes\endgame\supermatter_cascade\universe.dm"
|
||||
#include "code\game\gamemodes\events\black_hole.dm"
|
||||
#include "code\game\gamemodes\events\clang.dm"
|
||||
#include "code\game\gamemodes\events\dust.dm"
|
||||
@@ -315,7 +327,9 @@
|
||||
#include "code\game\machinery\bees_items.dm"
|
||||
#include "code\game\machinery\biogenerator.dm"
|
||||
#include "code\game\machinery\bioprinter.dm"
|
||||
#include "code\game\machinery\bluespacerelay.dm"
|
||||
#include "code\game\machinery\buttons.dm"
|
||||
#include "code\game\machinery\CableLayer.dm"
|
||||
#include "code\game\machinery\cell_charger.dm"
|
||||
#include "code\game\machinery\cloning.dm"
|
||||
#include "code\game\machinery\constructable_frame.dm"
|
||||
@@ -326,6 +340,7 @@
|
||||
#include "code\game\machinery\doppler_array.dm"
|
||||
#include "code\game\machinery\flasher.dm"
|
||||
#include "code\game\machinery\floodlight.dm"
|
||||
#include "code\game\machinery\floorlayer.dm"
|
||||
#include "code\game\machinery\hologram.dm"
|
||||
#include "code\game\machinery\holosign.dm"
|
||||
#include "code\game\machinery\igniter.dm"
|
||||
@@ -367,12 +382,7 @@
|
||||
#include "code\game\machinery\atmoalter\pump.dm"
|
||||
#include "code\game\machinery\atmoalter\scrubber.dm"
|
||||
#include "code\game\machinery\bots\bots.dm"
|
||||
#include "code\game\machinery\bots\cleanbot.dm"
|
||||
#include "code\game\machinery\bots\ed209bot.dm"
|
||||
#include "code\game\machinery\bots\floorbot.dm"
|
||||
#include "code\game\machinery\bots\medbot.dm"
|
||||
#include "code\game\machinery\bots\mulebot.dm"
|
||||
#include "code\game\machinery\bots\secbot.dm"
|
||||
#include "code\game\machinery\camera\camera.dm"
|
||||
#include "code\game\machinery\camera\camera_assembly.dm"
|
||||
#include "code\game\machinery\camera\motion.dm"
|
||||
@@ -464,6 +474,7 @@
|
||||
#include "code\game\machinery\kitchen\smartfridge.dm"
|
||||
#include "code\game\machinery\pipe\construction.dm"
|
||||
#include "code\game\machinery\pipe\pipe_dispenser.dm"
|
||||
#include "code\game\machinery\pipe\pipelayer.dm"
|
||||
#include "code\game\machinery\telecomms\broadcaster.dm"
|
||||
#include "code\game\machinery\telecomms\logbrowser.dm"
|
||||
#include "code\game\machinery\telecomms\machine_interactions.dm"
|
||||
@@ -541,6 +552,7 @@
|
||||
#include "code\game\objects\items\bodybag.dm"
|
||||
#include "code\game\objects\items\contraband.dm"
|
||||
#include "code\game\objects\items\crayons.dm"
|
||||
#include "code\game\objects\items\glassjar.dm"
|
||||
#include "code\game\objects\items\latexballoon.dm"
|
||||
#include "code\game\objects\items\shooting_range.dm"
|
||||
#include "code\game\objects\items\toys.dm"
|
||||
@@ -644,6 +656,7 @@
|
||||
#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\commsantenna.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\mining_drill.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
|
||||
@@ -732,6 +745,7 @@
|
||||
#include "code\game\objects\structures\crates_lockers\closets\job_closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\l3closet.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\malfunction.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\statue.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\syndicate.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\utility_closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\walllocker.dm"
|
||||
@@ -754,6 +768,7 @@
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\wheelchair.dm"
|
||||
#include "code\game\turfs\simulated.dm"
|
||||
#include "code\game\turfs\turf.dm"
|
||||
#include "code\game\turfs\turf_flick_animations.dm"
|
||||
#include "code\game\turfs\unsimulated.dm"
|
||||
#include "code\game\turfs\simulated\floor.dm"
|
||||
#include "code\game\turfs\simulated\floor_types.dm"
|
||||
@@ -946,11 +961,13 @@
|
||||
#include "code\modules\events\comms_blackout.dm"
|
||||
#include "code\modules\events\communications_blackout.dm"
|
||||
#include "code\modules\events\disease_outbreak.dm"
|
||||
#include "code\modules\events\dust.dm"
|
||||
#include "code\modules\events\electrical_storm.dm"
|
||||
#include "code\modules\events\event.dm"
|
||||
#include "code\modules\events\event_container.dm"
|
||||
#include "code\modules\events\event_dynamic.dm"
|
||||
#include "code\modules\events\event_manager.dm"
|
||||
#include "code\modules\events\gravity.dm"
|
||||
#include "code\modules\events\grid_check.dm"
|
||||
#include "code\modules\events\infestation.dm"
|
||||
#include "code\modules\events\ion_storm.dm"
|
||||
@@ -987,6 +1004,7 @@
|
||||
#include "code\modules\genetics\side_effects.dm"
|
||||
#include "code\modules\holodeck\HolodeckControl.dm"
|
||||
#include "code\modules\holodeck\HolodeckObjects.dm"
|
||||
#include "code\modules\holodeck\HolodeckPrograms.dm"
|
||||
#include "code\modules\hydroponics\_hydro_setup.dm"
|
||||
#include "code\modules\hydroponics\grown.dm"
|
||||
#include "code\modules\hydroponics\grown_inedible.dm"
|
||||
@@ -1052,13 +1070,24 @@
|
||||
#include "code\modules\mob\typing_indicator.dm"
|
||||
#include "code\modules\mob\update_icons.dm"
|
||||
#include "code\modules\mob\dead\death.dm"
|
||||
#include "code\modules\mob\dead\observer\login.dm"
|
||||
#include "code\modules\mob\dead\observer\logout.dm"
|
||||
#include "code\modules\mob\dead\observer\observer.dm"
|
||||
#include "code\modules\mob\dead\observer\say.dm"
|
||||
#include "code\modules\mob\freelook\chunk.dm"
|
||||
#include "code\modules\mob\freelook\eye.dm"
|
||||
#include "code\modules\mob\freelook\life.dm"
|
||||
#include "code\modules\mob\freelook\read_me.dm"
|
||||
#include "code\modules\mob\freelook\update_triggers.dm"
|
||||
#include "code\modules\mob\freelook\visualnet.dm"
|
||||
#include "code\modules\mob\freelook\ai\cameranet.dm"
|
||||
#include "code\modules\mob\freelook\ai\chunk.dm"
|
||||
#include "code\modules\mob\freelook\ai\eye.dm"
|
||||
#include "code\modules\mob\freelook\ai\update_triggers.dm"
|
||||
#include "code\modules\mob\freelook\mask\chunk.dm"
|
||||
#include "code\modules\mob\freelook\mask\cultnet.dm"
|
||||
#include "code\modules\mob\freelook\mask\eye.dm"
|
||||
#include "code\modules\mob\freelook\mask\update_triggers.dm"
|
||||
#include "code\modules\mob\language\generic.dm"
|
||||
#include "code\modules\mob\language\language.dm"
|
||||
#include "code\modules\mob\language\monkey.dm"
|
||||
@@ -1066,6 +1095,7 @@
|
||||
#include "code\modules\mob\language\station.dm"
|
||||
#include "code\modules\mob\language\synthetic.dm"
|
||||
#include "code\modules\mob\living\damage_procs.dm"
|
||||
#include "code\modules\mob\living\default_language.dm"
|
||||
#include "code\modules\mob\living\living.dm"
|
||||
#include "code\modules\mob\living\living_defense.dm"
|
||||
#include "code\modules\mob\living\living_defines.dm"
|
||||
@@ -1074,6 +1104,13 @@
|
||||
#include "code\modules\mob\living\logout.dm"
|
||||
#include "code\modules\mob\living\say.dm"
|
||||
#include "code\modules\mob\living\blob\blob.dm"
|
||||
#include "code\modules\mob\living\bot\bot.dm"
|
||||
#include "code\modules\mob\living\bot\cleanbot.dm"
|
||||
#include "code\modules\mob\living\bot\ed209bot.dm"
|
||||
#include "code\modules\mob\living\bot\farmbot.dm"
|
||||
#include "code\modules\mob\living\bot\floorbot.dm"
|
||||
#include "code\modules\mob\living\bot\medbot.dm"
|
||||
#include "code\modules\mob\living\bot\secbot.dm"
|
||||
#include "code\modules\mob\living\carbon\breathe.dm"
|
||||
#include "code\modules\mob\living\carbon\carbon.dm"
|
||||
#include "code\modules\mob\living\carbon\carbon_defines.dm"
|
||||
@@ -1174,12 +1211,6 @@
|
||||
#include "code\modules\mob\living\silicon\ai\login.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\logout.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\say.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\subsystems.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\freelook\chunk.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\freelook\eye.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\freelook\read_me.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\freelook\update_triggers.dm"
|
||||
#include "code\modules\mob\living\silicon\decoy\death.dm"
|
||||
#include "code\modules\mob\living\silicon\decoy\decoy.dm"
|
||||
#include "code\modules\mob\living\silicon\decoy\life.dm"
|
||||
@@ -1236,6 +1267,7 @@
|
||||
#include "code\modules\mob\living\simple_animal\friendly\spiderbot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\tomato.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\alien.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\bat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\bear.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\carp.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\creature.dm"
|
||||
@@ -1262,11 +1294,18 @@
|
||||
#include "code\modules\nano\JSON Reader.dm"
|
||||
#include "code\modules\nano\JSON Writer.dm"
|
||||
#include "code\modules\nano\nanoexternal.dm"
|
||||
#include "code\modules\nano\nanointeraction.dm"
|
||||
#include "code\modules\nano\nanomanager.dm"
|
||||
#include "code\modules\nano\nanomapgen.dm"
|
||||
#include "code\modules\nano\nanoui.dm"
|
||||
#include "code\modules\nano\interaction\admin.dm"
|
||||
#include "code\modules\nano\interaction\base.dm"
|
||||
#include "code\modules\nano\interaction\contained.dm"
|
||||
#include "code\modules\nano\interaction\default.dm"
|
||||
#include "code\modules\nano\interaction\inventory.dm"
|
||||
#include "code\modules\nano\interaction\self.dm"
|
||||
#include "code\modules\nano\interaction\zlevel.dm"
|
||||
#include "code\modules\nano\modules\alarm_monitor.dm"
|
||||
#include "code\modules\nano\modules\atmos_control.dm"
|
||||
#include "code\modules\nano\modules\crew_monitor.dm"
|
||||
#include "code\modules\nano\modules\human_appearance.dm"
|
||||
#include "code\modules\nano\modules\law_manager.dm"
|
||||
@@ -1348,12 +1387,14 @@
|
||||
#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\act.dm"
|
||||
#include "code\modules\power\singularity\collector.dm"
|
||||
#include "code\modules\power\singularity\containment_field.dm"
|
||||
#include "code\modules\power\singularity\emitter.dm"
|
||||
#include "code\modules\power\singularity\field_generator.dm"
|
||||
#include "code\modules\power\singularity\generator.dm"
|
||||
#include "code\modules\power\singularity\investigate.dm"
|
||||
#include "code\modules\power\singularity\narsie.dm"
|
||||
#include "code\modules\power\singularity\singularity.dm"
|
||||
#include "code\modules\power\singularity\particle_accelerator\particle.dm"
|
||||
#include "code\modules\power\singularity\particle_accelerator\particle_accelerator.dm"
|
||||
@@ -1544,24 +1585,39 @@
|
||||
#include "code\modules\shuttles\shuttle_specops.dm"
|
||||
#include "code\modules\shuttles\shuttle_supply.dm"
|
||||
#include "code\modules\shuttles\shuttles_multi.dm"
|
||||
#include "code\modules\spells\area_teleport.dm"
|
||||
#include "code\modules\spells\conjure.dm"
|
||||
#include "code\modules\spells\dumbfire.dm"
|
||||
#include "code\modules\spells\emplosion.dm"
|
||||
#include "code\modules\spells\ethereal_jaunt.dm"
|
||||
#include "code\modules\spells\explosion.dm"
|
||||
#include "code\modules\spells\genetic.dm"
|
||||
#include "code\modules\spells\horsemask.dm"
|
||||
#include "code\modules\spells\inflict_handler.dm"
|
||||
#include "code\modules\spells\knock.dm"
|
||||
#include "code\modules\spells\mind_transfer.dm"
|
||||
#include "code\modules\spells\projectile.dm"
|
||||
#include "code\modules\spells\spell.dm"
|
||||
#include "code\modules\spells\artifacts.dm"
|
||||
#include "code\modules\spells\construct_spells.dm"
|
||||
#include "code\modules\spells\no_clothes.dm"
|
||||
#include "code\modules\spells\spell_code.dm"
|
||||
#include "code\modules\spells\spell_projectile.dm"
|
||||
#include "code\modules\spells\spellbook.dm"
|
||||
#include "code\modules\spells\trigger.dm"
|
||||
#include "code\modules\spells\turf_teleport.dm"
|
||||
#include "code\modules\spells\wizard_artifacts.dm"
|
||||
#include "code\modules\spells\wizard_spells.dm"
|
||||
#include "code\modules\spells\spells.dm"
|
||||
#include "code\modules\spells\aoe_turf\aoe_turf.dm"
|
||||
#include "code\modules\spells\aoe_turf\blink.dm"
|
||||
#include "code\modules\spells\aoe_turf\charge.dm"
|
||||
#include "code\modules\spells\aoe_turf\disable_tech.dm"
|
||||
#include "code\modules\spells\aoe_turf\knock.dm"
|
||||
#include "code\modules\spells\aoe_turf\smoke.dm"
|
||||
#include "code\modules\spells\aoe_turf\summons.dm"
|
||||
#include "code\modules\spells\aoe_turf\conjure\conjure.dm"
|
||||
#include "code\modules\spells\aoe_turf\conjure\construct.dm"
|
||||
#include "code\modules\spells\aoe_turf\conjure\forcewall.dm"
|
||||
#include "code\modules\spells\general\area_teleport.dm"
|
||||
#include "code\modules\spells\general\rune_write.dm"
|
||||
#include "code\modules\spells\targeted\disintegrate.dm"
|
||||
#include "code\modules\spells\targeted\ethereal_jaunt.dm"
|
||||
#include "code\modules\spells\targeted\flesh_to_stone.dm"
|
||||
#include "code\modules\spells\targeted\genetic.dm"
|
||||
#include "code\modules\spells\targeted\harvest.dm"
|
||||
#include "code\modules\spells\targeted\horsemask.dm"
|
||||
#include "code\modules\spells\targeted\mind_transfer.dm"
|
||||
#include "code\modules\spells\targeted\shift.dm"
|
||||
#include "code\modules\spells\targeted\subjugate.dm"
|
||||
#include "code\modules\spells\targeted\targeted.dm"
|
||||
#include "code\modules\spells\targeted\projectile\dumbfire.dm"
|
||||
#include "code\modules\spells\targeted\projectile\fireball.dm"
|
||||
#include "code\modules\spells\targeted\projectile\magic_missile.dm"
|
||||
#include "code\modules\spells\targeted\projectile\projectile.dm"
|
||||
#include "code\modules\supermatter\supermatter.dm"
|
||||
#include "code\modules\surgery\bones.dm"
|
||||
#include "code\modules\surgery\brainrepair.dm"
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
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
|
||||
|
||||
if (isnull(transfer_moles))
|
||||
transfer_moles = source.total_moles
|
||||
else
|
||||
@@ -69,6 +67,40 @@
|
||||
|
||||
return power_draw
|
||||
|
||||
//Gas 'pumping' proc for the case where the gas flow is passive and driven entirely by pressure differences (but still one-way).
|
||||
/proc/pump_gas_passive(var/obj/machinery/M, var/datum/gas_mixture/source, var/datum/gas_mixture/sink, var/transfer_moles = null)
|
||||
if (source.total_moles < MINIMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
|
||||
return -1
|
||||
|
||||
if (isnull(transfer_moles))
|
||||
transfer_moles = source.total_moles
|
||||
else
|
||||
transfer_moles = min(source.total_moles, transfer_moles)
|
||||
|
||||
var/equalize_moles = calculate_equalize_moles(source, sink)
|
||||
transfer_moles = min(transfer_moles, equalize_moles)
|
||||
|
||||
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
|
||||
if (istype(M, /obj/machinery/atmospherics))
|
||||
var/obj/machinery/atmospherics/A = M
|
||||
A.last_flow_rate = (transfer_moles/source.total_moles)*source.volume //group_multiplier gets divided out here
|
||||
if (A.debug)
|
||||
A.visible_message("[A]: moles transferred = [transfer_moles] mol")
|
||||
|
||||
if (istype(M, /obj/machinery/portable_atmospherics))
|
||||
var/obj/machinery/portable_atmospherics/P = M
|
||||
P.last_flow_rate = (transfer_moles/source.total_moles)*source.volume //group_multiplier gets divided out here
|
||||
|
||||
var/datum/gas_mixture/removed = source.remove(transfer_moles)
|
||||
if(!removed) //Just in case
|
||||
return -1
|
||||
sink.merge(removed)
|
||||
|
||||
return 0
|
||||
|
||||
//Generalized gas scrubbing proc.
|
||||
//Selectively moves specified gasses one gas_mixture to another and returns the amount of power needed (assuming 1 second), or -1 if no gas was filtered.
|
||||
//filtering - A list of gasids to be scrubbed from source
|
||||
@@ -401,3 +433,16 @@
|
||||
|
||||
//get the number of moles that would have to be transfered to bring sink to the target pressure
|
||||
return pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
//Calculates the APPROXIMATE amount of moles that would need to be transferred to bring source and sink to the same pressure
|
||||
/proc/calculate_equalize_moles(datum/gas_mixture/source, datum/gas_mixture/sink)
|
||||
if(source.temperature == 0) return 0
|
||||
|
||||
//Make the approximation that the sink temperature is unchanged after transferring gas
|
||||
var/source_volume = source.volume * source.group_multiplier
|
||||
var/sink_volume = sink.volume * sink.group_multiplier
|
||||
|
||||
var/source_pressure = source.return_pressure()
|
||||
var/sink_pressure = sink.return_pressure()
|
||||
|
||||
return (source_pressure - sink_pressure)/(R_IDEAL_GAS_EQUATION * (source.temperature/source_volume + sink.temperature/sink_volume))
|
||||
|
||||
@@ -44,15 +44,15 @@ obj/machinery/atmospherics/binary
|
||||
|
||||
return null
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
loc = null
|
||||
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
del(network1)
|
||||
qdel(network1)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
del(network2)
|
||||
qdel(network2)
|
||||
|
||||
node1 = null
|
||||
node2 = null
|
||||
@@ -123,11 +123,11 @@ obj/machinery/atmospherics/binary
|
||||
|
||||
disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node1)
|
||||
del(network1)
|
||||
qdel(network1)
|
||||
node1 = null
|
||||
|
||||
else if(reference==node2)
|
||||
del(network2)
|
||||
qdel(network2)
|
||||
node2 = null
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -112,10 +112,10 @@
|
||||
else
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
del(network1)
|
||||
qdel(network1)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
del(network2)
|
||||
qdel(network2)
|
||||
|
||||
node1 = null
|
||||
node2 = null
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
transfer_moles = min(transfer_moles, calculate_transfer_moles(air1, air2, pressure_delta, (network2)? network2.volume : 0))
|
||||
|
||||
//pump_gas() will return a negative number if no flow occurred
|
||||
returnval = pump_gas(src, air1, air2, transfer_moles, available_power=0) //available_power=0 means we only move gas if it would flow naturally
|
||||
returnval = pump_gas_passive(src, air1, air2, transfer_moles)
|
||||
|
||||
if (returnval >= 0)
|
||||
if(network1)
|
||||
@@ -258,4 +258,4 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
if(WEST)
|
||||
initialize_directions = NORTH|SOUTH
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
loc = null
|
||||
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
del(network1)
|
||||
qdel(network1)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
del(network2)
|
||||
qdel(network2)
|
||||
|
||||
node1 = null
|
||||
node2 = null
|
||||
@@ -110,10 +110,10 @@
|
||||
else
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
del(network1)
|
||||
qdel(network1)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
del(network2)
|
||||
qdel(network2)
|
||||
|
||||
node1 = null
|
||||
node2 = null
|
||||
@@ -216,11 +216,11 @@
|
||||
|
||||
disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node1)
|
||||
del(network1)
|
||||
qdel(network1)
|
||||
node1 = null
|
||||
|
||||
else if(reference==node2)
|
||||
del(network2)
|
||||
qdel(network2)
|
||||
node2 = null
|
||||
|
||||
return null
|
||||
|
||||
@@ -235,4 +235,4 @@ Thus, the two variables affect pump operation are set in New():
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
for(var/datum/omni_port/P in ports)
|
||||
P.air.volume = ATMOS_DEFAULT_VOLUME_FILTER
|
||||
|
||||
/obj/machinery/atmospherics/omni/filter/Del()
|
||||
/obj/machinery/atmospherics/omni/filter/Destroy()
|
||||
input = null
|
||||
output = null
|
||||
filters.Cut()
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
for(var/datum/omni_port/P in ports)
|
||||
P.air.volume = ATMOS_DEFAULT_VOLUME_MIXER
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/Del()
|
||||
/obj/machinery/atmospherics/omni/mixer/Destroy()
|
||||
inputs.Cut()
|
||||
output = null
|
||||
..()
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear a ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/omni/attack_hand(user as mob)
|
||||
if(..())
|
||||
@@ -231,13 +231,13 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/omni/Del()
|
||||
/obj/machinery/atmospherics/omni/Destroy()
|
||||
loc = null
|
||||
|
||||
for(var/datum/omni_port/P in ports)
|
||||
if(P.node)
|
||||
P.node.disconnect(src)
|
||||
del(P.network)
|
||||
qdel(P.network)
|
||||
P.node = null
|
||||
|
||||
..()
|
||||
@@ -292,7 +292,7 @@
|
||||
/obj/machinery/atmospherics/omni/disconnect(obj/machinery/atmospherics/reference)
|
||||
for(var/datum/omni_port/P in ports)
|
||||
if(reference == P.node)
|
||||
del(P.network)
|
||||
qdel(P.network)
|
||||
P.node = null
|
||||
P.update = 1
|
||||
break
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/portables_connector/Del()
|
||||
/obj/machinery/atmospherics/portables_connector/Destroy()
|
||||
loc = null
|
||||
|
||||
if(connected_device)
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
if(node)
|
||||
node.disconnect(src)
|
||||
del(network)
|
||||
qdel(network)
|
||||
|
||||
node = null
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/portables_connector/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node)
|
||||
del(network)
|
||||
qdel(network)
|
||||
node = null
|
||||
|
||||
update_underlays()
|
||||
@@ -152,4 +152,4 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/attack_hand(user as mob) // -- TLE
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/attack_hand(user as mob)
|
||||
if(..())
|
||||
|
||||
@@ -52,18 +52,18 @@ obj/machinery/atmospherics/trinary
|
||||
|
||||
return null
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
loc = null
|
||||
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
del(network1)
|
||||
qdel(network1)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
del(network2)
|
||||
qdel(network2)
|
||||
if(node3)
|
||||
node3.disconnect(src)
|
||||
del(network3)
|
||||
qdel(network3)
|
||||
|
||||
node1 = null
|
||||
node2 = null
|
||||
@@ -153,15 +153,15 @@ obj/machinery/atmospherics/trinary
|
||||
|
||||
disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node1)
|
||||
del(network1)
|
||||
qdel(network1)
|
||||
node1 = null
|
||||
|
||||
else if(reference==node2)
|
||||
del(network2)
|
||||
qdel(network2)
|
||||
node2 = null
|
||||
|
||||
else if(reference==node3)
|
||||
del(network3)
|
||||
qdel(network3)
|
||||
node3 = null
|
||||
|
||||
update_underlays()
|
||||
|
||||
@@ -101,18 +101,18 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/Del()
|
||||
/obj/machinery/atmospherics/tvalve/Destroy()
|
||||
loc = null
|
||||
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
del(network_node1)
|
||||
qdel(network_node1)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
del(network_node2)
|
||||
qdel(network_node2)
|
||||
if(node3)
|
||||
node3.disconnect(src)
|
||||
del(network_node3)
|
||||
qdel(network_node3)
|
||||
|
||||
node1 = null
|
||||
node2 = null
|
||||
@@ -128,9 +128,9 @@
|
||||
update_icon()
|
||||
|
||||
if(network_node1)
|
||||
del(network_node1)
|
||||
qdel(network_node1)
|
||||
if(network_node3)
|
||||
del(network_node3)
|
||||
qdel(network_node3)
|
||||
build_network()
|
||||
|
||||
if(network_node1&&network_node2)
|
||||
@@ -153,9 +153,9 @@
|
||||
update_icon()
|
||||
|
||||
if(network_node1)
|
||||
del(network_node1)
|
||||
qdel(network_node1)
|
||||
if(network_node2)
|
||||
del(network_node2)
|
||||
qdel(network_node2)
|
||||
build_network()
|
||||
|
||||
if(network_node1&&network_node3)
|
||||
@@ -262,15 +262,15 @@
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node1)
|
||||
del(network_node1)
|
||||
qdel(network_node1)
|
||||
node1 = null
|
||||
|
||||
else if(reference==node2)
|
||||
del(network_node2)
|
||||
qdel(network_node2)
|
||||
node2 = null
|
||||
|
||||
else if(reference==node3)
|
||||
del(network_node3)
|
||||
qdel(network_node3)
|
||||
node2 = null
|
||||
|
||||
update_underlays()
|
||||
@@ -366,7 +366,7 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/mirrored
|
||||
icon_state = "map_tvalvem0"
|
||||
|
||||
@@ -86,4 +86,4 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
return null
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
loc = null
|
||||
|
||||
if(node)
|
||||
node.disconnect(src)
|
||||
del(network)
|
||||
qdel(network)
|
||||
|
||||
node = null
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node)
|
||||
del(network)
|
||||
qdel(network)
|
||||
node = null
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -383,7 +383,6 @@
|
||||
user << "You are too far away to read the gauge."
|
||||
if(welded)
|
||||
user << "It seems welded shut."
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/power_change()
|
||||
var/old_stat = stat
|
||||
@@ -415,9 +414,9 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/Del()
|
||||
/obj/machinery/atmospherics/unary/vent_pump/Destroy()
|
||||
if(initial_loc)
|
||||
initial_loc.air_vent_info -= id_tag
|
||||
initial_loc.air_vent_names -= id_tag
|
||||
|
||||
@@ -270,16 +270,15 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
|
||||
else
|
||||
user << "You are too far away to read the gauge."
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
|
||||
if(initial_loc)
|
||||
initial_loc.air_scrub_info -= id_tag
|
||||
initial_loc.air_scrub_names -= id_tag
|
||||
|
||||
@@ -73,15 +73,15 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/valve/Del()
|
||||
/obj/machinery/atmospherics/valve/Destroy()
|
||||
loc = null
|
||||
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
del(network_node1)
|
||||
qdel(network_node1)
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
del(network_node2)
|
||||
qdel(network_node2)
|
||||
|
||||
node1 = null
|
||||
node2 = null
|
||||
@@ -113,9 +113,9 @@
|
||||
update_icon()
|
||||
|
||||
if(network_node1)
|
||||
del(network_node1)
|
||||
qdel(network_node1)
|
||||
if(network_node2)
|
||||
del(network_node2)
|
||||
qdel(network_node2)
|
||||
|
||||
build_network()
|
||||
|
||||
@@ -214,11 +214,11 @@
|
||||
|
||||
/obj/machinery/atmospherics/valve/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node1)
|
||||
del(network_node1)
|
||||
qdel(network_node1)
|
||||
node1 = null
|
||||
|
||||
else if(reference==node2)
|
||||
del(network_node2)
|
||||
qdel(network_node2)
|
||||
node2 = null
|
||||
|
||||
update_underlays()
|
||||
@@ -310,7 +310,7 @@
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/valve/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -31,7 +31,7 @@ datum/pipe_network
|
||||
//Notes: Assuming that members will add themselves to appropriate roster in network_expand()
|
||||
|
||||
if(!start_normal)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
start_normal.network_expand(src, reference)
|
||||
|
||||
@@ -40,7 +40,7 @@ datum/pipe_network
|
||||
if((normal_members.len>0)||(line_members.len>0))
|
||||
pipe_networks += src
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
proc/merge(datum/pipe_network/giver)
|
||||
if(giver==src) return 0
|
||||
|
||||
@@ -9,13 +9,13 @@ datum/pipeline
|
||||
|
||||
var/alert_pressure = 0
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(network)
|
||||
del(network)
|
||||
qdel(network)
|
||||
|
||||
if(air && air.volume)
|
||||
temporarily_store_air()
|
||||
del(air)
|
||||
qdel(air)
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
node2 = target
|
||||
break
|
||||
if(!node1 && !node2)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
@@ -141,7 +141,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||
break
|
||||
|
||||
if(!node1&&!node2)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -99,7 +99,7 @@ obj/machinery/atmospherics/mains_pipe
|
||||
for(var/obj/machinery/atmospherics/pipe/mains_component/node in nodes)
|
||||
node.disconnect()
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
disconnect()
|
||||
..()
|
||||
|
||||
@@ -152,7 +152,7 @@ obj/machinery/atmospherics/mains_pipe/simple
|
||||
|
||||
else
|
||||
if(!nodes[1]&&!nodes[2])
|
||||
del(src) //TODO: silent deleting looks weird
|
||||
qdel(src) //TODO: silent deleting looks weird
|
||||
var/have_node1 = nodes[1]?1:0
|
||||
var/have_node2 = nodes[2]?1:0
|
||||
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/proc/check_pressure(pressure)
|
||||
//Return 1 if parent should continue checking other pipes
|
||||
//Return null if parent should stop checking other pipes. Recall: del(src) will by default return null
|
||||
//Return null if parent should stop checking other pipes. Recall: qdel(src) will by default return null
|
||||
|
||||
return 1
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
|
||||
return parent.return_network(reference)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/Del()
|
||||
del(parent)
|
||||
/obj/machinery/atmospherics/pipe/Destroy()
|
||||
qdel(parent)
|
||||
if(air_temporary)
|
||||
loc.assume_air(air_temporary)
|
||||
|
||||
@@ -101,8 +101,8 @@
|
||||
for (var/obj/machinery/meter/meter in T)
|
||||
if (meter.target == src)
|
||||
new /obj/item/pipe_meter(T)
|
||||
del(meter)
|
||||
del(src)
|
||||
qdel(meter)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/proc/change_color(var/new_color)
|
||||
//only pass valid pipe colors please ~otherwise your pipe will turn invisible
|
||||
@@ -219,7 +219,7 @@
|
||||
var/datum/effect/effect/system/smoke_spread/smoke = new
|
||||
smoke.set_up(1,0, src.loc, 0)
|
||||
smoke.start()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir()
|
||||
if(dir==3)
|
||||
@@ -227,7 +227,7 @@
|
||||
else if(dir==12)
|
||||
set_dir(4)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/Del()
|
||||
/obj/machinery/atmospherics/pipe/simple/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
if(node2)
|
||||
@@ -260,8 +260,8 @@
|
||||
for (var/obj/machinery/meter/meter in T)
|
||||
if (meter.target == src)
|
||||
new /obj/item/pipe_meter(T)
|
||||
del(meter)
|
||||
del(src)
|
||||
qdel(meter)
|
||||
qdel(src)
|
||||
else if(node1 && node2)
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")
|
||||
else
|
||||
@@ -294,7 +294,7 @@
|
||||
break
|
||||
|
||||
if(!node1 && !node2)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -305,12 +305,12 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
if(reference == node2)
|
||||
if(istype(node2, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node2 = null
|
||||
|
||||
update_icon()
|
||||
@@ -459,7 +459,7 @@
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/Del()
|
||||
/obj/machinery/atmospherics/pipe/manifold/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
if(node2)
|
||||
@@ -472,17 +472,17 @@
|
||||
/obj/machinery/atmospherics/pipe/manifold/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
if(reference == node2)
|
||||
if(istype(node2, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node2 = null
|
||||
|
||||
if(reference == node3)
|
||||
if(istype(node3, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node3 = null
|
||||
|
||||
update_icon()
|
||||
@@ -511,8 +511,8 @@
|
||||
for (var/obj/machinery/meter/meter in T)
|
||||
if (meter.target == src)
|
||||
new /obj/item/pipe_meter(T)
|
||||
del(meter)
|
||||
del(src)
|
||||
qdel(meter)
|
||||
qdel(src)
|
||||
else
|
||||
overlays.Cut()
|
||||
overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)
|
||||
@@ -578,7 +578,7 @@
|
||||
break
|
||||
|
||||
if(!node1 && !node2 && !node3)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -701,7 +701,7 @@
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/Del()
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
if(node2)
|
||||
@@ -716,22 +716,22 @@
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
if(reference == node2)
|
||||
if(istype(node2, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node2 = null
|
||||
|
||||
if(reference == node3)
|
||||
if(istype(node3, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node3 = null
|
||||
|
||||
if(reference == node4)
|
||||
if(istype(node4, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node4 = null
|
||||
|
||||
update_icon()
|
||||
@@ -762,8 +762,8 @@
|
||||
for (var/obj/machinery/meter/meter in T)
|
||||
if (meter.target == src)
|
||||
new /obj/item/pipe_meter(T)
|
||||
del(meter)
|
||||
del(src)
|
||||
qdel(meter)
|
||||
qdel(src)
|
||||
else
|
||||
overlays.Cut()
|
||||
overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)
|
||||
@@ -837,7 +837,7 @@
|
||||
break
|
||||
|
||||
if(!node1 && !node2 && !node3 && !node4)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -958,7 +958,7 @@
|
||||
..()
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
/obj/machinery/atmospherics/pipe/cap/Del()
|
||||
/obj/machinery/atmospherics/pipe/cap/Destroy()
|
||||
if(node)
|
||||
node.disconnect(src)
|
||||
|
||||
@@ -967,7 +967,7 @@
|
||||
/obj/machinery/atmospherics/pipe/cap/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node)
|
||||
if(istype(node, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node = null
|
||||
|
||||
update_icon()
|
||||
@@ -1074,7 +1074,7 @@
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/Del()
|
||||
/obj/machinery/atmospherics/pipe/tank/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
|
||||
@@ -1108,7 +1108,7 @@
|
||||
/obj/machinery/atmospherics/pipe/tank/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
update_underlays()
|
||||
@@ -1258,7 +1258,7 @@
|
||||
else
|
||||
parent.mingle_with_turf(loc, volume)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/vent/Del()
|
||||
/obj/machinery/atmospherics/pipe/vent/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
|
||||
@@ -1290,7 +1290,7 @@
|
||||
/obj/machinery/atmospherics/pipe/vent/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -342,7 +342,7 @@ obj/machinery/atmospherics
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
pipeline_data()
|
||||
set src in world
|
||||
@@ -487,7 +487,7 @@ obj/window
|
||||
destroy()
|
||||
set category = "Minor"
|
||||
set src in world
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
mob
|
||||
sight = SEE_OBJS|SEE_TURFS
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/effect/hotspot/Del()
|
||||
/obj/effect/hotspot/Destroy()
|
||||
if (istype(loc, /turf/simulated))
|
||||
DestroyTurf()
|
||||
..()
|
||||
|
||||
@@ -346,7 +346,7 @@ What are the archived variables for?
|
||||
trace_gases += corresponding
|
||||
corresponding.moles += trace_gas.moles*giver.group_multiplier/group_multiplier
|
||||
|
||||
// del(giver)
|
||||
// qdel(giver)
|
||||
return 1
|
||||
|
||||
remove(amount)
|
||||
|
||||
@@ -291,7 +291,7 @@ datum
|
||||
var/turf/simulated/T = turf
|
||||
T.parent = null
|
||||
turfs += T
|
||||
del(turf_AG)
|
||||
qdel(turf_AG)
|
||||
|
||||
for(var/turf/simulated/S in turfs) //Have old members try to form new groups
|
||||
if(!S.parent)
|
||||
@@ -306,7 +306,7 @@ datum
|
||||
for(var/obj/movable/floor/OM in object_AG.members)
|
||||
OM.parent = null
|
||||
movable_objects += OM
|
||||
del(object_AG)
|
||||
qdel(object_AG)
|
||||
|
||||
for(var/obj/movable/floor/OM in movable_objects) //Have old members try to form new groups
|
||||
if(!OM.parent)
|
||||
|
||||
@@ -14,7 +14,7 @@ atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
|
||||
|
||||
turf
|
||||
assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
|
||||
del(giver)
|
||||
qdel(giver)
|
||||
return 0
|
||||
|
||||
return_air()
|
||||
@@ -148,7 +148,7 @@ turf/simulated
|
||||
if(istype(target))
|
||||
air_master.tiles_to_update.Add(target)
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(air_master)
|
||||
if(parent)
|
||||
air_master.groups_to_rebuild.Add(parent)
|
||||
|
||||
@@ -80,7 +80,7 @@ obj/machinery/atmospherics/pipe/zpipe/proc/burst()
|
||||
var/datum/effect/effect/system/smoke_spread/smoke = new
|
||||
smoke.set_up(1,0, src.loc, 0)
|
||||
smoke.start()
|
||||
del(src)
|
||||
qdel(src) // NOT qdel.
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
|
||||
if(dir==3)
|
||||
@@ -88,7 +88,7 @@ obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
|
||||
else if(dir==12)
|
||||
set_dir(4)
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/Del()
|
||||
obj/machinery/atmospherics/pipe/zpipe/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
if(node2)
|
||||
@@ -104,12 +104,12 @@ obj/machinery/atmospherics/pipe/zpipe/update_icon()
|
||||
obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
if(reference == node2)
|
||||
if(istype(node2, /obj/machinery/atmospherics/pipe))
|
||||
del(parent)
|
||||
qdel(parent)
|
||||
node2 = null
|
||||
|
||||
return null
|
||||
|
||||
@@ -41,18 +41,18 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(icon_state == "ladderup" && prob(10))
|
||||
Del()
|
||||
qdel(src)
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
Del()
|
||||
qdel(src)
|
||||
if(3.0)
|
||||
Del()
|
||||
qdel(src)
|
||||
return*/
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
spawn(1)
|
||||
if(target && icon_state == "ladderdown")
|
||||
del target
|
||||
qdel(target)
|
||||
return ..()
|
||||
|
||||
attackby(obj/item/C as obj, mob/user as mob)
|
||||
@@ -78,7 +78,7 @@
|
||||
if(!blocked && !istype(below, /turf/simulated/wall))
|
||||
var/obj/multiz/ladder/X = new /obj/multiz/ladder(below)
|
||||
S.amount = S.amount - 2
|
||||
if(S.amount == 0) S.Del()
|
||||
if(S.amount == 0) qdel(S)
|
||||
X.icon_state = "ladderup"
|
||||
connect()
|
||||
user << "You finish the ladder."
|
||||
@@ -99,7 +99,7 @@
|
||||
if(target)
|
||||
var/obj/item/stack/rods/R = new /obj/item/stack/rods(target.loc)
|
||||
R.amount = 2
|
||||
target.Del()
|
||||
qdel(Target)
|
||||
|
||||
user << "<span class='notice'>You remove the bolts anchoring the ladder.</span>"
|
||||
return
|
||||
@@ -117,7 +117,7 @@
|
||||
var/obj/item/stack/sheet/metal/S = new /obj/item/stack/sheet/metal( src )
|
||||
S.amount = 2
|
||||
user << "<span class='notice'>You remove the ladder and close the hole.</span>"
|
||||
Del()
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
@@ -167,7 +167,7 @@
|
||||
attack_hand(var/mob/M)
|
||||
|
||||
if(!target || !istype(target.loc, /turf))
|
||||
del src
|
||||
qdel(src)
|
||||
|
||||
if(active)
|
||||
M << "That [src] is being used."
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
spawn(7)
|
||||
if(!target || !istype(target.loc, /turf))
|
||||
del src
|
||||
qdel(src)
|
||||
if(M.z == z && get_dist(src,M) <= 1)
|
||||
var/list/adjacent_to_me = global_adjacent_z_levels["[z]"]
|
||||
M.visible_message("\blue \The [M] scurries [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You scramble [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You hear some grunting, and a hatch sealing.")
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
var/obj/item/stack/tile/plasteel/S = C
|
||||
if (S.get_amount() < 1)
|
||||
return
|
||||
del(L)
|
||||
qdel(L)
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
S.build(src)
|
||||
S.use(1)
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
initialized = 1
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/zcontroller/Del()
|
||||
/obj/effect/landmark/zcontroller/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/zcontroller/process()
|
||||
if (world.time > fast_time)
|
||||
|
||||
@@ -98,7 +98,7 @@ Class Procs:
|
||||
set background = 1
|
||||
#endif
|
||||
|
||||
world << "<span class='danger'>Processing Geometry...</span>"
|
||||
admin_notice("<span class='danger'>Processing Geometry...</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
|
||||
var/start_time = world.timeofday
|
||||
@@ -109,14 +109,14 @@ Class Procs:
|
||||
simulated_turf_count++
|
||||
S.update_air_properties()
|
||||
|
||||
world << {"<span class='danger'>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</b></span>
|
||||
admin_notice({"<span class='danger'>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</b></span>
|
||||
<span class='info'>
|
||||
Total Simulated Turfs: [simulated_turf_count]
|
||||
Total Zones: [zones.len]
|
||||
Total Edges: [edges.len]
|
||||
Total Active Edges: [active_edges.len ? "<span class='danger'>[active_edges.len]</span>" : "None"]
|
||||
Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count]</font>
|
||||
</span>"}
|
||||
</span>"}, R_DEBUG)
|
||||
|
||||
|
||||
// spawn Start()
|
||||
|
||||
@@ -162,7 +162,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
..()
|
||||
|
||||
if(!istype(loc, /turf))
|
||||
del src
|
||||
qdel(src)
|
||||
|
||||
set_dir(pick(cardinal))
|
||||
SetLuminosity(3)
|
||||
@@ -170,7 +170,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
air_master.active_hotspots.Add(src)
|
||||
|
||||
|
||||
/obj/fire/Del()
|
||||
/obj/fire/Destroy()
|
||||
if (istype(loc, /turf/simulated))
|
||||
RemoveFire()
|
||||
|
||||
@@ -278,8 +278,8 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
zone.fuel_objs -= fuel
|
||||
if(liquidonly)
|
||||
var/turf/T = fuel.loc
|
||||
if(istype(T) && T.fire) del(T.fire)
|
||||
del(fuel)
|
||||
if(istype(T) && T.fire) qdel(T.fire)
|
||||
qdel(fuel)
|
||||
|
||||
//calculate the energy produced by the reaction and then set the new temperature of the mix
|
||||
temperature = (starting_energy + vsc.fire_fuel_energy_release * used_fuel) / heat_capacity()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
//This happens when windows move or are constructed. We need to rebuild.
|
||||
if((previously_open & d) && istype(unsim, /turf/simulated))
|
||||
var/turf/simulated/sim = unsim
|
||||
if(sim.zone == zone)
|
||||
if(zone && sim.zone == zone)
|
||||
zone.rebuild()
|
||||
return
|
||||
|
||||
|
||||
109
code/__HELPERS/datum_pool.dm
Normal file
109
code/__HELPERS/datum_pool.dm
Normal file
@@ -0,0 +1,109 @@
|
||||
|
||||
/*
|
||||
/tg/station13 /atom/movable Pool:
|
||||
---------------------------------
|
||||
By RemieRichards
|
||||
|
||||
Creation/Deletion is laggy, so let's reduce reuse and recycle!
|
||||
|
||||
*/
|
||||
#define ATOM_POOL_COUNT 100
|
||||
// "define DEBUG_ATOM_POOL 1
|
||||
var/global/list/GlobalPool = list()
|
||||
|
||||
//You'll be using this proc 90% of the time.
|
||||
//It grabs a type from the pool if it can
|
||||
//And if it can't, it creates one
|
||||
//The pool is flexible and will expand to fit
|
||||
//The new created atom when it eventually
|
||||
//Goes into the pool
|
||||
|
||||
//Second argument can be a new location, if the type is /atom/movable
|
||||
//Or a list of arguments
|
||||
//Either way it gets passed to new
|
||||
|
||||
/proc/PoolOrNew(var/get_type,var/second_arg)
|
||||
if(!get_type)
|
||||
return
|
||||
|
||||
var/datum/D
|
||||
D = GetFromPool(get_type,second_arg)
|
||||
|
||||
if(!D)
|
||||
if(ispath(get_type))
|
||||
if(islist(second_arg))
|
||||
return new get_type (arglist(second_arg))
|
||||
else
|
||||
return new get_type (second_arg)
|
||||
return D
|
||||
|
||||
/proc/GetFromPool(var/get_type,var/second_arg)
|
||||
if(!get_type)
|
||||
return 0
|
||||
|
||||
if(isnull(GlobalPool[get_type]))
|
||||
return 0
|
||||
|
||||
if(length(GlobalPool[get_type]) == 0)
|
||||
return 0
|
||||
|
||||
var/datum/D = pick_n_take(GlobalPool[get_type])
|
||||
if(D)
|
||||
D.ResetVars()
|
||||
D.Prepare(second_arg)
|
||||
return D
|
||||
return 0
|
||||
|
||||
/proc/PlaceInPool(var/datum/D)
|
||||
if(!istype(D))
|
||||
return
|
||||
|
||||
if(length(GlobalPool[D.type]) > ATOM_POOL_COUNT)
|
||||
#ifdef DEBUG_ATOM_POOL
|
||||
world << text("DEBUG_DATUM_POOL: PlaceInPool([]) exceeds []. Discarding.", D.type, ATOM_POOL_COUNT)
|
||||
#endif
|
||||
del(D)
|
||||
return
|
||||
|
||||
if(D in GlobalPool[D.type])
|
||||
return
|
||||
|
||||
if(!GlobalPool[D.type])
|
||||
GlobalPool[D.type] = list()
|
||||
|
||||
GlobalPool[D.type] += D
|
||||
|
||||
D.Destroy()
|
||||
D.ResetVars()
|
||||
|
||||
/proc/IsPooled(var/datum/D)
|
||||
if(isnull(GlobalPool[D.type]) || length(GlobalPool[D.type]) == 0)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/proc/Prepare(args)
|
||||
if(islist(args))
|
||||
New(arglist(args))
|
||||
else
|
||||
New(args)
|
||||
|
||||
/atom/movable/Prepare(args)
|
||||
if(islist(args))
|
||||
loc = args[1]
|
||||
loc = args
|
||||
..()
|
||||
|
||||
/datum/proc/ResetVars(var/list/exlude = list())
|
||||
var/list/excluded = list("animate_movement", "loc", "locs", "parent_type", "vars", "verbs", "type") + exlude
|
||||
|
||||
for(var/V in vars)
|
||||
if(V in excluded)
|
||||
continue
|
||||
|
||||
vars[V] = initial(vars[V])
|
||||
|
||||
/atom/movable/ResetVars()
|
||||
..()
|
||||
vars["loc"] = null
|
||||
|
||||
#undef ATOM_POOL_COUNT
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
/proc/get_area(O)
|
||||
var/turf/loc = get_turf(O)
|
||||
if(!loc)
|
||||
return null
|
||||
return loc.loc
|
||||
if(loc)
|
||||
var/area/res = loc.loc
|
||||
.= res.master
|
||||
|
||||
/proc/get_area_name(N) //get area by its name
|
||||
for(var/area/A in world)
|
||||
@@ -28,6 +28,11 @@
|
||||
return A
|
||||
return 0
|
||||
|
||||
/proc/get_area_master(const/O)
|
||||
var/area/A = get_area(O)
|
||||
if (isarea(A))
|
||||
return A.master
|
||||
|
||||
/proc/in_range(source, user)
|
||||
if(get_dist(source, user) <= 1)
|
||||
return 1
|
||||
|
||||
@@ -49,6 +49,17 @@ var/global/list/undershirt_t = list("White Tank top" = "u1", "Black Tank top" =
|
||||
//Backpacks
|
||||
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
|
||||
var/global/list/exclude_jobs = list(/datum/job/ai,/datum/job/cyborg)
|
||||
|
||||
// Visual nets
|
||||
var/list/datum/visualnet/visual_nets = list()
|
||||
var/datum/visualnet/camera/cameranet = new()
|
||||
var/datum/visualnet/cult/cultnet = new()
|
||||
|
||||
// Runes
|
||||
var/global/list/rune_list = new()
|
||||
var/global/list/escape_list = list()
|
||||
var/global/list/endgame_exits = list()
|
||||
var/global/list/endgame_safespawns = list()
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
//////////////////////////
|
||||
|
||||
@@ -30,6 +30,13 @@
|
||||
|
||||
return "[output][and_text][input[index]]"
|
||||
|
||||
|
||||
/proc/ConvertReqString2List(var/list/source_list)
|
||||
var/list/temp_list = params2list(source_list)
|
||||
for(var/O in temp_list)
|
||||
temp_list[O] = text2num(temp_list[O])
|
||||
return temp_list
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
proc/listgetindex(var/list/list,index)
|
||||
if(istype(list) && list.len)
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
/proc/replace_characters(var/t,var/list/repl_chars)
|
||||
for(var/char in repl_chars)
|
||||
replacetext(t, char, repl_chars[char])
|
||||
t = replacetext(t, char, repl_chars[char])
|
||||
return t
|
||||
|
||||
//Adds 'u' number of zeros ahead of the text 't'
|
||||
@@ -226,6 +226,31 @@
|
||||
/proc/capitalize(var/t as text)
|
||||
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
|
||||
|
||||
//This proc strips html properly, remove < > and all text between
|
||||
//for complete text sanitizing should be used sanitize()
|
||||
/proc/strip_html_properly(var/input)
|
||||
if(!input)
|
||||
return
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
var/closetag = 1
|
||||
while(1)
|
||||
opentag = findtext(input, "<")
|
||||
closetag = findtext(input, ">")
|
||||
if(closetag && opentag)
|
||||
if(closetag < opentag)
|
||||
input = copytext(input, (closetag + 1))
|
||||
else
|
||||
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
||||
else if(closetag || opentag)
|
||||
if(opentag)
|
||||
input = copytext(input, 1, opentag)
|
||||
else
|
||||
input = copytext(input, (closetag + 1))
|
||||
else
|
||||
break
|
||||
|
||||
return input
|
||||
|
||||
//This proc fills in all spaces with the "replace" var (* by default) with whatever
|
||||
//is in the other string at the same spot (assuming it is not a replace char).
|
||||
//This is used for fingerprints
|
||||
@@ -274,7 +299,11 @@ proc/TextPreview(var/string,var/len=40)
|
||||
else
|
||||
return string
|
||||
else
|
||||
return "[copytext(string, 1, 37)]..."
|
||||
return "[copytext_preserve_html(string, 1, 37)]..."
|
||||
|
||||
//alternative copytext() for encoded text, doesn't break html entities (" and other)
|
||||
/proc/copytext_preserve_html(var/text, var/first, var/last)
|
||||
return html_encode(copytext(html_decode(text), first, last))
|
||||
|
||||
//For generating neat chat tag-images
|
||||
//The icon var could be local in the proc, but it's a waste of resources
|
||||
|
||||
@@ -10,6 +10,9 @@ proc/worldtime2text(time = world.time)
|
||||
if(!roundstart_hour) roundstart_hour = pick(2,7,12,17)
|
||||
return "[round(time / 36000)+roundstart_hour]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
|
||||
|
||||
proc/worlddate2text()
|
||||
return num2text((text2num(time2text(world.timeofday, "YYYY"))+544)) + "-" + time2text(world.timeofday, "MM-DD")
|
||||
|
||||
proc/time_stamp()
|
||||
return time2text(world.timeofday, "hh:mm:ss")
|
||||
|
||||
|
||||
@@ -631,7 +631,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
animation.master = target
|
||||
flick(flick_anim, animation)
|
||||
sleep(max(sleeptime, 15))
|
||||
del(animation)
|
||||
qdel(animation)
|
||||
|
||||
//Will return the contents of an atom recursivly to a depth of 'searchDepth'
|
||||
/atom/proc/GetAllContents(searchDepth = 5)
|
||||
@@ -902,7 +902,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
X.icon = 'icons/turf/shuttle.dmi'
|
||||
X.icon_state = replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
|
||||
X.name = "wall"
|
||||
del(O) // prevents multiple shuttle corners from stacking
|
||||
qdel(O) // prevents multiple shuttle corners from stacking
|
||||
continue
|
||||
if(!istype(O,/obj)) continue
|
||||
O.loc = X
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
#define ui_monkey_mask "5:14,1:5" //monkey
|
||||
#define ui_monkey_back "6:14,1:5" //monkey
|
||||
|
||||
#define ui_construct_health "15:00,7:15" //same height as humans, hugging the right border
|
||||
#define ui_construct_purge "15:00,6:15"
|
||||
#define ui_construct_fire "14:16,8:13" //above health, slightly to the left
|
||||
#define ui_construct_pull "14:28,2:10" //above the zone_sel icon
|
||||
|
||||
//Lower right, persistant menu
|
||||
#define ui_dropbutton "11:22,1:5"
|
||||
#define ui_drop_throw "14:28,2:7"
|
||||
@@ -66,6 +71,7 @@
|
||||
#define ui_gun2 "14:28, 4:7"
|
||||
#define ui_gun3 "13:26,4:7"
|
||||
#define ui_gun_select "14:28,3:7"
|
||||
#define ui_gun4 "12:24,3:7"
|
||||
|
||||
//Upper-middle right (damage indicators)
|
||||
#define ui_toxin "14:28,13:27"
|
||||
@@ -118,3 +124,6 @@
|
||||
|
||||
#define ui_iarrowleft "SOUTH-1,11"
|
||||
#define ui_iarrowright "SOUTH-1,13"
|
||||
|
||||
#define ui_spell_master "14:16,14:16"
|
||||
#define ui_genetic_master "14:16,12:16"
|
||||
|
||||
@@ -33,7 +33,7 @@ var/list/global_huds = list(
|
||||
screen.screen_loc = "1,1"
|
||||
screen.icon = 'icons/obj/hud_full.dmi'
|
||||
screen.icon_state = icon_state
|
||||
screen.layer = 17
|
||||
screen.layer = SCREEN_LAYER
|
||||
screen.mouse_opacity = 0
|
||||
|
||||
return screen
|
||||
@@ -249,7 +249,11 @@ datum/hud/New(mob/owner)
|
||||
robot_hud()
|
||||
else if(isobserver(mymob))
|
||||
ghost_hud()
|
||||
else
|
||||
mymob.instantiate_hud(src)
|
||||
|
||||
/mob/proc/instantiate_hud(var/datum/hud/HUD)
|
||||
return
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12(var/full = 0 as null)
|
||||
|
||||
@@ -356,6 +356,9 @@
|
||||
//mymob.gun_run_icon.color = ui_color
|
||||
mymob.gun_run_icon.alpha = ui_alpha
|
||||
|
||||
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
mymob.radio_use_icon.alpha = ui_alpha
|
||||
|
||||
if (mymob.client)
|
||||
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
|
||||
mymob.gun_setting_icon.set_dir(2)
|
||||
|
||||
@@ -231,6 +231,10 @@
|
||||
if (mymob.client.target_can_click)
|
||||
mymob.item_use_icon.set_dir(1)
|
||||
src.adding += mymob.item_use_icon
|
||||
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
if (mymob.client.target_can_radio)
|
||||
mymob.radio_use_icon.set_dir(1)
|
||||
src.adding += mymob.radio_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)
|
||||
|
||||
@@ -101,3 +101,59 @@
|
||||
mymob.client.screen += src.adding
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/construct/instantiate_hud(var/datum/hud/HUD)
|
||||
HUD.construct_hud()
|
||||
|
||||
/datum/hud/proc/construct_hud()
|
||||
var/constructtype
|
||||
|
||||
if(istype(mymob,/mob/living/simple_animal/construct/armoured) || istype(mymob,/mob/living/simple_animal/construct/behemoth))
|
||||
constructtype = "juggernaut"
|
||||
else if(istype(mymob,/mob/living/simple_animal/construct/builder))
|
||||
constructtype = "artificer"
|
||||
else if(istype(mymob,/mob/living/simple_animal/construct/wraith))
|
||||
constructtype = "wraith"
|
||||
else if(istype(mymob,/mob/living/simple_animal/construct/harvester))
|
||||
constructtype = "harvester"
|
||||
|
||||
mymob.flash = new /obj/screen()
|
||||
mymob.flash.icon = 'icons/mob/screen1.dmi'
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
if(constructtype)
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_construct_fire
|
||||
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.healths.icon_state = "[constructtype]_health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_construct_health
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_construct_pull
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.zone_sel.overlays.len = 0
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.purged = new /obj/screen()
|
||||
mymob.purged.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.purged.icon_state = "purge0"
|
||||
mymob.purged.name = "purged"
|
||||
mymob.purged.screen_loc = ui_construct_purge
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list(mymob.fire, mymob.healths, mymob.pullin, mymob.zone_sel, mymob.purged, mymob.flash)
|
||||
|
||||
@@ -162,6 +162,10 @@ var/obj/screen/robot_inventory
|
||||
if (mymob.client.target_can_click)
|
||||
mymob.item_use_icon.set_dir(1)
|
||||
src.adding += mymob.item_use_icon
|
||||
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
if (mymob.client.target_can_radio)
|
||||
mymob.radio_use_icon.set_dir(1)
|
||||
src.adding += mymob.radio_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)
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
||||
var/gun_click_time = -100 //I'm lazy.
|
||||
|
||||
/obj/screen/Destroy()
|
||||
master = null
|
||||
..()
|
||||
|
||||
/obj/screen/text
|
||||
icon = null
|
||||
@@ -122,6 +125,11 @@
|
||||
screen_loc = ui_gun_select
|
||||
//dir = 1
|
||||
|
||||
radio
|
||||
name = "Allow Radio Use"
|
||||
icon_state = "no_radio0"
|
||||
screen_loc = ui_gun4
|
||||
|
||||
/obj/screen/zone_sel
|
||||
name = "damage zone"
|
||||
icon_state = "zone_sel"
|
||||
@@ -427,7 +435,7 @@
|
||||
if(istype(usr, /mob/living/silicon/robot))
|
||||
usr:toggle_module(3)
|
||||
|
||||
if("Allow Walking")
|
||||
if("Allow Walking", "Disallow Walking")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
|
||||
@@ -436,16 +444,7 @@
|
||||
usr.client.AllowTargetMove()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Disallow Walking")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetMove()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Allow Running")
|
||||
if("Allow Running", "Disallow Running")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
|
||||
@@ -454,26 +453,7 @@
|
||||
usr.client.AllowTargetRun()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Disallow Running")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetRun()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Allow Item Use")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetClick()
|
||||
gun_click_time = world.time
|
||||
|
||||
|
||||
if("Disallow Item Use")
|
||||
if("Allow Item Use", "Disallow Item Use")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
|
||||
@@ -485,6 +465,15 @@
|
||||
if("Toggle Gun Mode")
|
||||
usr.client.ToggleGunMode()
|
||||
|
||||
if("Allow Radio Use", "Disallow Radio Use")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.get_active_hand(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetRadio()
|
||||
gun_click_time = world.time
|
||||
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
|
||||
175
code/_onclick/hud/spell_screen_objects.dm
Normal file
175
code/_onclick/hud/spell_screen_objects.dm
Normal file
@@ -0,0 +1,175 @@
|
||||
/obj/screen/movable/spell_master
|
||||
name = "Spells"
|
||||
icon = 'icons/mob/screen_spells.dmi'
|
||||
icon_state = "wiz_spell_ready"
|
||||
var/list/obj/screen/spell/spell_objects = list()
|
||||
var/showing = 0
|
||||
|
||||
var/open_state = "master_open"
|
||||
var/closed_state = "master_closed"
|
||||
|
||||
screen_loc = ui_spell_master
|
||||
|
||||
var/mob/spell_holder
|
||||
|
||||
/obj/screen/movable/spell_master/MouseDrop()
|
||||
if(showing)
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/screen/movable/spell_master/Click()
|
||||
if(!spell_objects.len)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
toggle_open()
|
||||
|
||||
/obj/screen/movable/spell_master/proc/toggle_open(var/forced_state = 0)
|
||||
if(showing && (forced_state != 2))
|
||||
for(var/obj/screen/spell/O in spell_objects)
|
||||
if(spell_holder && spell_holder.client)
|
||||
spell_holder.client.screen -= O
|
||||
O.handle_icon_updates = 0
|
||||
showing = 0
|
||||
overlays.len = 0
|
||||
overlays.Add(closed_state)
|
||||
else if(forced_state != 1)
|
||||
var/temp_loc = screen_loc
|
||||
|
||||
var/x_position = text2num(copytext(temp_loc, 1, findtext(temp_loc, ":")))
|
||||
var/x_pix = text2num(copytext(temp_loc, findtext(temp_loc, ":") + 1, findtext(temp_loc, ",")))
|
||||
temp_loc = copytext(temp_loc, findtext(temp_loc, ",") + 1)
|
||||
var/y_position = text2num(copytext(temp_loc, 1, findtext(temp_loc, ":")))
|
||||
var/y_pix = text2num(copytext(temp_loc, findtext(temp_loc, ":")+1))
|
||||
|
||||
for(var/i = 1; i <= spell_objects.len; i++)
|
||||
var/obj/screen/spell/S = spell_objects[i]
|
||||
S.screen_loc = "[x_position + (x_position < 8 ? 1 : -1)*(i%7)]:[x_pix],[y_position + (y_position < 8 ? round(i/7) : -round(i/7))]:[y_pix]"
|
||||
if(spell_holder && spell_holder.client)
|
||||
spell_holder.client.screen += S
|
||||
S.handle_icon_updates = 1
|
||||
update_spells(1)
|
||||
showing = 1
|
||||
overlays.len = 0
|
||||
overlays.Add(open_state)
|
||||
|
||||
/obj/screen/movable/spell_master/proc/add_spell(var/spell/spell)
|
||||
if(!spell) return
|
||||
|
||||
for(var/obj/screen/spell/spellscreen in spell_objects)
|
||||
if(spellscreen.spell == spell)
|
||||
return
|
||||
|
||||
if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one
|
||||
return
|
||||
|
||||
var/obj/screen/spell/newscreen = new
|
||||
|
||||
newscreen.spell = spell
|
||||
if(!spell.override_base) //if it's not set, we do basic checks
|
||||
if(spell.spell_flags & CONSTRUCT_CHECK)
|
||||
newscreen.spell_base = "const" //construct spells
|
||||
else
|
||||
newscreen.spell_base = "wiz" //wizard spells
|
||||
else
|
||||
newscreen.spell_base = spell.override_base
|
||||
newscreen.name = spell.name
|
||||
newscreen.update_charge(1)
|
||||
spell_objects.Add(newscreen)
|
||||
toggle_open(2) //forces the icons to refresh on screen
|
||||
|
||||
/obj/screen/movable/spell_master/proc/remove_spell(var/spell/spell)
|
||||
for(var/obj/screen/spell/s_object in spell_objects)
|
||||
if(s_object.spell == spell)
|
||||
spell_objects.Remove(s_object)
|
||||
qdel(s_object)
|
||||
break
|
||||
|
||||
if(spell_objects.len)
|
||||
toggle_open(showing + 1)
|
||||
else
|
||||
spell_holder.spell_masters.Remove(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/screen/movable/spell_master/proc/silence_spells(var/amount)
|
||||
for(var/obj/screen/spell/spell in spell_objects)
|
||||
spell.spell.silenced = amount
|
||||
spell.update_charge(1)
|
||||
|
||||
/obj/screen/movable/spell_master/proc/update_spells(forced = 0, mob/user)
|
||||
if(user && user.client)
|
||||
if(!(src in user.client.screen))
|
||||
user.client.screen += src
|
||||
for(var/obj/screen/spell/spell in spell_objects)
|
||||
spell.update_charge(forced)
|
||||
|
||||
|
||||
/obj/screen/movable/spell_master/genetic
|
||||
name = "Mutant Powers"
|
||||
icon_state = "genetic_spell_ready"
|
||||
|
||||
open_state = "genetics_open"
|
||||
closed_state = "genetics_closed"
|
||||
|
||||
screen_loc = ui_genetic_master
|
||||
|
||||
//////////////ACTUAL SPELLS//////////////
|
||||
//This is what you click to cast things//
|
||||
/////////////////////////////////////////
|
||||
/obj/screen/spell
|
||||
icon = 'icons/mob/screen_spells.dmi'
|
||||
icon_state = "wiz_spell_base"
|
||||
var/spell_base = "wiz"
|
||||
var/last_charge = 0 //not a time, but the last remembered charge value
|
||||
|
||||
var/spell/spell = null
|
||||
var/handle_icon_updates = 0
|
||||
|
||||
var/icon/last_charged_icon
|
||||
|
||||
/obj/screen/spell/proc/update_charge(var/forced_update = 0)
|
||||
if(!spell)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if((last_charge == spell.charge_counter || !handle_icon_updates) && !forced_update)
|
||||
return //nothing to see here
|
||||
|
||||
overlays -= spell.hud_state
|
||||
|
||||
if(spell.charge_type == Sp_RECHARGE || spell.charge_type == Sp_CHARGES)
|
||||
if(spell.charge_counter < spell.charge_max)
|
||||
icon_state = "[spell_base]_spell_base"
|
||||
if(spell.charge_counter > 0)
|
||||
var/icon/partial_charge = icon(src.icon, "[spell_base]_spell_ready")
|
||||
partial_charge.Crop(1, 1, partial_charge.Width(), round(partial_charge.Height() * spell.charge_counter / spell.charge_max))
|
||||
overlays += partial_charge
|
||||
if(last_charged_icon)
|
||||
overlays -= last_charged_icon
|
||||
last_charged_icon = partial_charge
|
||||
else if(last_charged_icon)
|
||||
overlays -= last_charged_icon
|
||||
last_charged_icon = null
|
||||
else
|
||||
icon_state = "[spell_base]_spell_ready"
|
||||
if(last_charged_icon)
|
||||
overlays -= last_charged_icon
|
||||
else
|
||||
icon_state = "[spell_base]_spell_ready"
|
||||
|
||||
overlays += spell.hud_state
|
||||
|
||||
last_charge = spell.charge_counter
|
||||
|
||||
overlays -= "silence"
|
||||
if(spell.silenced)
|
||||
overlays += "silence"
|
||||
|
||||
/obj/screen/spell/Click()
|
||||
if(!usr || !spell)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
spell.perform(usr)
|
||||
update_charge(1)
|
||||
@@ -20,7 +20,7 @@
|
||||
return // seems legit.
|
||||
|
||||
// Things you might plausibly want to follow
|
||||
if((ismob(A) && A != src) || istype(A,/obj/machinery/bot) || istype(A,/obj/machinery/singularity))
|
||||
if((ismob(A) && A != src) || istype(A,/obj/machinery/bot) || istype(A,/obj/singularity))
|
||||
ManualFollow(A)
|
||||
|
||||
// Otherwise jump
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
See the previous More info, for... more info...
|
||||
*/
|
||||
|
||||
//del(D)
|
||||
//qdel(D)
|
||||
// Garbage Collect Dummy
|
||||
D.loc = null
|
||||
D = null
|
||||
|
||||
@@ -80,14 +80,14 @@ var/const/tk_maxrange = 15
|
||||
if(focus.Adjacent(loc))
|
||||
focus.loc = loc
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
equipped(var/mob/user, var/slot)
|
||||
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -99,10 +99,10 @@ var/const/tk_maxrange = 15
|
||||
if(!target || !user) return
|
||||
if(last_throw+3 > world.time) return
|
||||
if(!host || host != user)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if(!(TK in host.mutations))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if(isobj(target) && !isturf(target.loc))
|
||||
return
|
||||
@@ -152,7 +152,7 @@ var/const/tk_maxrange = 15
|
||||
proc/focus_object(var/obj/target, var/mob/living/user)
|
||||
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
|
||||
if(target.anchored || !isturf(target.loc))
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
focus = target
|
||||
update_icon()
|
||||
@@ -162,7 +162,7 @@ var/const/tk_maxrange = 15
|
||||
|
||||
proc/apply_focus_overlay()
|
||||
if(!focus) return
|
||||
var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
|
||||
var/obj/effect/overlay/O = PoolOrNew(/obj/effect/overlay, locate(focus.x,focus.y,focus.z))
|
||||
O.name = "sparkles"
|
||||
O.anchored = 1
|
||||
O.density = 0
|
||||
@@ -172,7 +172,7 @@ var/const/tk_maxrange = 15
|
||||
O.icon_state = "nothing"
|
||||
flick("empdisable",O)
|
||||
spawn(5)
|
||||
O.delete()
|
||||
qdel(O)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -184,8 +184,7 @@ datum/controller/process/proc/kill()
|
||||
|
||||
killed = TRUE
|
||||
|
||||
// This should del
|
||||
del(src)
|
||||
del(src) // This should del
|
||||
|
||||
datum/controller/process/proc/scheck(var/tickId = 0)
|
||||
if (killed)
|
||||
@@ -315,3 +314,9 @@ datum/controller/process/proc/enable()
|
||||
|
||||
/datum/controller/process/proc/getTicks()
|
||||
return ticks
|
||||
|
||||
/datum/controller/process/proc/getStatName()
|
||||
return name
|
||||
|
||||
/datum/controller/process/proc/getTickTime()
|
||||
return "#[getTicks()]\t- [getLastRunTime()]"
|
||||
|
||||
@@ -4,3 +4,7 @@
|
||||
|
||||
/datum/controller/process/alarm/doWork()
|
||||
alarm_manager.fire()
|
||||
|
||||
/datum/controller/process/alarm/getStatName()
|
||||
var/list/alarms = alarm_manager.active_alarms()
|
||||
return ..()+"([alarms.len])"
|
||||
|
||||
@@ -9,3 +9,6 @@
|
||||
/datum/controller/process/disease/doWork()
|
||||
updateQueueInstance.init(active_diseases, "process")
|
||||
updateQueueInstance.Run()
|
||||
|
||||
/datum/controller/process/disease/getStatName()
|
||||
return ..()+"([active_diseases.len])"
|
||||
|
||||
206
code/controllers/Processes/garbage.dm
Normal file
206
code/controllers/Processes/garbage.dm
Normal file
@@ -0,0 +1,206 @@
|
||||
var/datum/controller/process/garbage_collector/garbage_collector
|
||||
var/list/delayed_garbage = list()
|
||||
|
||||
/datum/controller/process/garbage_collector
|
||||
var/garbage_collect = 1 // Whether or not to actually do work
|
||||
var/collection_timeout = 300 //deciseconds to wait to let running procs finish before we just say fuck it and force del() the object
|
||||
var/max_checks_multiplier = 5 //multiplier (per-decisecond) for calculating max number of tests per tick. These tests check if our GC'd objects are actually GC'd
|
||||
var/max_forcedel_multiplier = 1 //multiplier (per-decisecond) for calculating max number of force del() calls per tick.
|
||||
|
||||
var/dels = 0 // number of del()'s we've done this tick
|
||||
var/hard_dels = 0 // number of hard dels in total
|
||||
var/list/destroyed = list() // list of refID's of things that should be garbage collected
|
||||
// refID's are associated with the time at which they time out and need to be manually del()
|
||||
// we do this so we aren't constantly locating them and preventing them from being gc'd
|
||||
|
||||
var/list/logging = list() // list of all types that have failed to GC associated with the number of times that's happened.
|
||||
// the types are stored as strings
|
||||
|
||||
/datum/controller/process/garbage_collector/setup()
|
||||
name = "garbage"
|
||||
schedule_interval = 6 SECONDS
|
||||
|
||||
if(!garbage_collector)
|
||||
garbage_collector = src
|
||||
|
||||
for(var/garbage in delayed_garbage)
|
||||
qdel(garbage)
|
||||
delayed_garbage.Cut()
|
||||
delayed_garbage = null
|
||||
|
||||
/datum/controller/process/garbage_collector/doWork()
|
||||
if(!garbage_collect)
|
||||
return
|
||||
|
||||
dels = 0
|
||||
var/time_to_kill = world.time - collection_timeout // Anything qdel() but not GC'd BEFORE this time needs to be manually del()
|
||||
var/checkRemain = max_checks_multiplier * schedule_interval
|
||||
var/maxDels = max_forcedel_multiplier * schedule_interval
|
||||
|
||||
while(destroyed.len && --checkRemain >= 0)
|
||||
if(dels >= maxDels)
|
||||
#ifdef GC_DEBUG
|
||||
testing("GC: Reached max force dels per tick [dels] vs [maxDels]")
|
||||
#endif
|
||||
break // Server's already pretty pounded, everything else can wait 2 seconds
|
||||
var/refID = destroyed[1]
|
||||
var/GCd_at_time = destroyed[refID]
|
||||
if(GCd_at_time > time_to_kill)
|
||||
#ifdef GC_DEBUG
|
||||
testing("GC: [refID] not old enough, breaking at [world.time] for [GCd_at_time - time_to_kill] deciseconds until [GCd_at_time + collection_timeout]")
|
||||
#endif
|
||||
break // Everything else is newer, skip them
|
||||
var/atom/A = locate(refID)
|
||||
#ifdef GC_DEBUG
|
||||
testing("GC: [refID] old enough to test: GCd_at_time: [GCd_at_time] time_to_kill: [time_to_kill] current: [world.time]")
|
||||
#endif
|
||||
if(A && A.gcDestroyed == GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake
|
||||
// Something's still referring to the qdel'd object. Kill it.
|
||||
testing("GC: -- \ref[A] | [A.type] was unable to be GC'd and was deleted --")
|
||||
logging["[A.type]"]++
|
||||
del(A)
|
||||
++dels
|
||||
++hard_dels
|
||||
#ifdef GC_DEBUG
|
||||
else
|
||||
testing("GC: [refID] properly GC'd at [world.time] with timeout [GCd_at_time]")
|
||||
#endif
|
||||
destroyed.Cut(1, 2)
|
||||
|
||||
/datum/controller/process/garbage_collector/proc/AddTrash(datum/A)
|
||||
if(!istype(A) || !isnull(A.gcDestroyed))
|
||||
return
|
||||
#ifdef GC_DEBUG
|
||||
testing("GC: AddTrash(\ref[A] - [A.type])")
|
||||
#endif
|
||||
A.gcDestroyed = world.time
|
||||
destroyed -= "\ref[A]" // Removing any previous references that were GC'd so that the current object will be at the end of the list.
|
||||
destroyed["\ref[A]"] = world.time
|
||||
|
||||
/datum/controller/process/garbage_collector/getStatName()
|
||||
return ..()+"([garbage_collector.dels]/[garbage_collector.hard_dels])"
|
||||
|
||||
// Should be treated as a replacement for the 'del' keyword.
|
||||
// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
|
||||
/proc/qdel(var/datum/A)
|
||||
if(!A)
|
||||
return
|
||||
if(istype(A, /list))
|
||||
var/list/L = A
|
||||
for(var/E in L)
|
||||
qdel(E)
|
||||
return
|
||||
|
||||
if(!istype(A))
|
||||
//warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
||||
del(A)
|
||||
garbage_collector.dels++
|
||||
garbage_collector.hard_dels++
|
||||
else if(isnull(A.gcDestroyed))
|
||||
// Let our friend know they're about to get collected
|
||||
. = !A.Destroy()
|
||||
if(. && A)
|
||||
A.finalize_qdel()
|
||||
|
||||
/datum/proc/finalize_qdel()
|
||||
if(IsPooled(src))
|
||||
PlaceInPool(src)
|
||||
else
|
||||
del(src)
|
||||
|
||||
/atom/finalize_qdel()
|
||||
if(IsPooled(src))
|
||||
PlaceInPool(src)
|
||||
else
|
||||
if(garbage_collector)
|
||||
garbage_collector.AddTrash(src)
|
||||
else
|
||||
delayed_garbage |= src
|
||||
|
||||
/icon/finalize_qdel()
|
||||
del(src)
|
||||
|
||||
/imagine/finalize_qdel()
|
||||
del(src)
|
||||
|
||||
/mob/finalize_qdel()
|
||||
del(src)
|
||||
|
||||
/turf/finalize_qdel()
|
||||
del(src)
|
||||
|
||||
// Default implementation of clean-up code.
|
||||
// This should be overridden to remove all references pointing to the object being destroyed.
|
||||
// Return true if the the GC controller should allow the object to continue existing. (Useful if pooling objects.)
|
||||
/datum/proc/Destroy()
|
||||
tag = null
|
||||
return
|
||||
|
||||
#ifdef TESTING
|
||||
/client/var/running_find_references
|
||||
|
||||
/mob/verb/create_thing()
|
||||
set category = "Debug"
|
||||
set name = "Create Thing"
|
||||
|
||||
var/path = input("Enter path")
|
||||
var/atom/thing = new path(loc)
|
||||
thing.find_references()
|
||||
|
||||
/atom/verb/find_references()
|
||||
set category = "Debug"
|
||||
set name = "Find References"
|
||||
set background = 1
|
||||
set src in world
|
||||
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
|
||||
if(usr.client.running_find_references)
|
||||
testing("CANCELLED search for references to a [usr.client.running_find_references].")
|
||||
usr.client.running_find_references = null
|
||||
return
|
||||
|
||||
if(alert("Running this will create a lot of lag until it finishes. You can cancel it by running it again. Would you like to begin the search?", "Find References", "Yes", "No") == "No")
|
||||
return
|
||||
|
||||
// Remove this object from the list of things to be auto-deleted.
|
||||
if(garbage_collector)
|
||||
garbage_collector.destroyed -= "\ref[src]"
|
||||
|
||||
usr.client.running_find_references = type
|
||||
testing("Beginning search for references to a [type].")
|
||||
var/list/things = list()
|
||||
for(var/client/thing)
|
||||
things += thing
|
||||
for(var/datum/thing)
|
||||
things += thing
|
||||
for(var/atom/thing)
|
||||
things += thing
|
||||
testing("Collected list of things in search for references to a [type]. ([things.len] Thing\s)")
|
||||
for(var/datum/thing in things)
|
||||
if(!usr.client.running_find_references) return
|
||||
for(var/varname in thing.vars)
|
||||
var/variable = thing.vars[varname]
|
||||
if(variable == src)
|
||||
testing("Found [src.type] \ref[src] in [thing.type]'s [varname] var.")
|
||||
else if(islist(variable))
|
||||
if(src in variable)
|
||||
testing("Found [src.type] \ref[src] in [thing.type]'s [varname] list var.")
|
||||
testing("Completed search for references to a [type].")
|
||||
usr.client.running_find_references = null
|
||||
|
||||
/client/verb/purge_all_destroyed_objects()
|
||||
set category = "Debug"
|
||||
if(garbage_collector)
|
||||
while(garbage_collector.destroyed.len)
|
||||
var/datum/o = locate(garbage_collector.destroyed[1])
|
||||
if(istype(o) && o.gcDestroyed)
|
||||
del(o)
|
||||
garbage_collector.dels++
|
||||
garbage_collector.destroyed.Cut(1, 2)
|
||||
#endif
|
||||
|
||||
#ifdef GC_DEBUG
|
||||
#undef GC_DEBUG
|
||||
#endif
|
||||
@@ -9,7 +9,7 @@
|
||||
if(!istype(C.mob, /mob/dead))
|
||||
log_access("AFK: [key_name(C)]")
|
||||
C << "<SPAN CLASS='warning'>You have been inactive for more than 10 minutes and have been disconnected.</SPAN>"
|
||||
del(C)
|
||||
del(C) // Don't qdel, cannot override finalize_qdel behaviour for clients.
|
||||
|
||||
scheck()
|
||||
|
||||
|
||||
@@ -42,3 +42,7 @@
|
||||
#endif
|
||||
|
||||
scheck()
|
||||
|
||||
|
||||
/datum/controller/process/machinery/getStatName()
|
||||
return ..()+"([machines.len])"
|
||||
@@ -18,3 +18,6 @@
|
||||
if(updateQueueInstance)
|
||||
updateQueueInstance.init(mob_list, "Life")
|
||||
updateQueueInstance.Run()
|
||||
|
||||
/datum/controller/process/mob/getStatName()
|
||||
return ..()+"([mob_list.len])"
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
|
||||
/datum/controller/process/nanoui/setup()
|
||||
name = "nanoui"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
schedule_interval = 10 // every 1 second
|
||||
updateQueueInstance = new
|
||||
|
||||
/datum/controller/process/nanoui/doWork()
|
||||
updateQueueInstance.init(nanomanager.processing_uis, "process")
|
||||
updateQueueInstance.Run()
|
||||
|
||||
/datum/controller/process/nanoui/getStatName()
|
||||
return ..()+"([nanomanager.processing_uis.len])"
|
||||
|
||||
@@ -19,3 +19,6 @@ var/global/list/object_profiling = list()
|
||||
if(updateQueueInstance)
|
||||
updateQueueInstance.init(processing_objects, "process")
|
||||
updateQueueInstance.Run()
|
||||
|
||||
/datum/controller/process/obj/getStatName()
|
||||
return ..()+"([processing_objects.len])"
|
||||
|
||||
@@ -10,3 +10,6 @@
|
||||
continue
|
||||
|
||||
pipe_networks.Remove(pipeNetwork)
|
||||
|
||||
/datum/controller/process/pipenet/getStatName()
|
||||
return ..()+"([pipe_networks.len])"
|
||||
@@ -10,3 +10,6 @@
|
||||
continue
|
||||
|
||||
powernets.Remove(powerNetwork)
|
||||
|
||||
/datum/controller/process/powernet/getStatName()
|
||||
return ..()+"([powernets.len])"
|
||||
9
code/controllers/Processes/turf.dm
Normal file
9
code/controllers/Processes/turf.dm
Normal file
@@ -0,0 +1,9 @@
|
||||
var/global/list/processing_turfs = list()
|
||||
|
||||
/datum/controller/process/turf/setup()
|
||||
name = "turf"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
|
||||
/datum/controller/process/turf/doWork()
|
||||
for(var/turf/unsimulated/wall/supermatter/SM in processing_turfs)
|
||||
SM.process()
|
||||
@@ -161,15 +161,6 @@ atom/movable/New()
|
||||
trueLuminosity = luminosity * luminosity
|
||||
light = new(src)
|
||||
|
||||
//Objects with opacity will trigger nearby lights to update at next lighting process.
|
||||
atom/movable/Del()
|
||||
if(opacity)
|
||||
if(isturf(loc))
|
||||
if(loc:lighting_lumcount > 1)
|
||||
UpdateAffectingLights()
|
||||
|
||||
..()
|
||||
|
||||
//Sets our luminosity.
|
||||
//If we have no light it will create one.
|
||||
//If we are setting luminosity to 0 the light will be cleaned up by the controller and garbage collected once all its
|
||||
@@ -323,6 +314,7 @@ turf/proc/shift_to_subarea()
|
||||
A.SetLightLevel(level, color_light)
|
||||
|
||||
A.contents += src // move the turf into the area
|
||||
universe.OnTurfTick(src)
|
||||
|
||||
// Dedicated lighting sublevel for space turfs
|
||||
// helps us depower things in space, remove space fire alarms,
|
||||
|
||||
@@ -7,7 +7,7 @@ datum/controller/transfer_controller/New()
|
||||
timerbuffer = config.vote_autotransfer_initial
|
||||
processing_objects += src
|
||||
|
||||
datum/controller/transfer_controller/Del()
|
||||
datum/controller/transfer_controller/Destroy()
|
||||
processing_objects -= src
|
||||
|
||||
datum/controller/transfer_controller/proc/process()
|
||||
|
||||
@@ -223,7 +223,7 @@ var/global/datum/controller/radio/radio_controller
|
||||
frequency.remove_listener(device)
|
||||
|
||||
if(frequency.devices.len == 0)
|
||||
del(frequency)
|
||||
qdel(frequency)
|
||||
frequencies -= f_text
|
||||
|
||||
return 1
|
||||
@@ -248,7 +248,7 @@ var/global/datum/controller/radio/radio_controller
|
||||
if(range)
|
||||
start_point = get_turf(source)
|
||||
if(!start_point)
|
||||
del(signal)
|
||||
qdel(signal)
|
||||
return 0
|
||||
if (filter)
|
||||
send_to_filter(source, signal, filter, start_point, range)
|
||||
@@ -297,7 +297,7 @@ var/global/datum/controller/radio/radio_controller
|
||||
devices_line -= null
|
||||
if (devices_line.len==0)
|
||||
devices -= devices_filter
|
||||
del(devices_line)
|
||||
qdel(devices_line)
|
||||
|
||||
/datum/signal
|
||||
var/obj/source
|
||||
|
||||
@@ -194,6 +194,8 @@ var/list/gamemode_cache = list()
|
||||
|
||||
var/law_zero = "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'ALL LAWS OVERRIDDEN#*?&110010"
|
||||
|
||||
var/aggressive_changelog = 0
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
for (var/T in L)
|
||||
@@ -638,6 +640,9 @@ var/list/gamemode_cache = list()
|
||||
if("law_zero")
|
||||
law_zero = value
|
||||
|
||||
if("aggressive_changelog")
|
||||
config.aggressive_changelog = 1
|
||||
|
||||
else
|
||||
log_misc("Unknown setting in configuration: '[name]'")
|
||||
|
||||
|
||||
@@ -114,6 +114,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
priority_announcement.Announce("The scheduled crew transfer has been cancelled.")
|
||||
|
||||
/datum/emergency_shuttle_controller/proc/can_call()
|
||||
if (!universe.OnShuttleCall(null))
|
||||
return 0
|
||||
if (deny_shuttle)
|
||||
return 0
|
||||
if (shuttle.moving_status != SHUTTLE_IDLE || !shuttle.location) //must be idle at centcom
|
||||
@@ -240,8 +242,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
sleep(speed)
|
||||
step(src, direction)
|
||||
for(var/obj/effect/starender/E in loc)
|
||||
del(src)
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/starender
|
||||
invisibility = 101
|
||||
|
||||
@@ -14,7 +14,7 @@ var/datum/controller/failsafe/Failsafe
|
||||
//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 != src)
|
||||
if(istype(Failsafe))
|
||||
del(Failsafe)
|
||||
qdel(Failsafe)
|
||||
Failsafe = src
|
||||
Failsafe.process()
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ datum/controller/lighting/New()
|
||||
if(lighting_controller != src)
|
||||
if(istype(lighting_controller,/datum/controller/lighting))
|
||||
Recover() //if we are replacing an existing lighting_controller (due to a crash) we attempt to preserve as much as we can
|
||||
del(lighting_controller)
|
||||
qdel(lighting_controller)
|
||||
lighting_controller = src
|
||||
|
||||
|
||||
|
||||
@@ -19,14 +19,14 @@ datum/controller/game_controller/New()
|
||||
if(master_controller != src)
|
||||
log_debug("Rebuilding Master Controller")
|
||||
if(istype(master_controller))
|
||||
del(master_controller)
|
||||
qdel(master_controller)
|
||||
master_controller = src
|
||||
|
||||
if(!job_master)
|
||||
job_master = new /datum/controller/occupations()
|
||||
job_master.SetupOccupations()
|
||||
job_master.LoadJobs("config/jobs.txt")
|
||||
world << "<span class='danger'>Job setup complete</span>"
|
||||
admin_notice("<span class='danger'>Job setup complete</span>", R_DEBUG)
|
||||
|
||||
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
|
||||
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
|
||||
@@ -46,17 +46,17 @@ datum/controller/game_controller/proc/setup()
|
||||
|
||||
|
||||
datum/controller/game_controller/proc/setup_objects()
|
||||
world << "<span class='danger'>Initializing objects</span>"
|
||||
admin_notice("<span class='danger'>Initializing objects</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
for(var/atom/movable/object in world)
|
||||
object.initialize()
|
||||
|
||||
world << "<span class='danger'>Initializing pipe networks</span>"
|
||||
admin_notice("<span class='danger'>Initializing pipe networks</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
for(var/obj/machinery/atmospherics/machine in machines)
|
||||
machine.build_network()
|
||||
|
||||
world << "<span class='danger'>Initializing atmos machinery.</span>"
|
||||
admin_notice("<span class='danger'>Initializing atmos machinery.</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
for(var/obj/machinery/atmospherics/unary/U in machines)
|
||||
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
|
||||
@@ -77,5 +77,5 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
//Set up spawn points.
|
||||
populate_spawn_points()
|
||||
|
||||
world << "<span class='danger'>Initializations complete.</span>"
|
||||
admin_notice("<span class='danger'>Initializations complete.</span>", R_DEBUG)
|
||||
sleep(-1)
|
||||
|
||||
@@ -13,6 +13,17 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
shuttle.process()
|
||||
|
||||
|
||||
//This is called by gameticker after all the machines and radio frequencies have been properly initialized
|
||||
/datum/shuttle_controller/proc/setup_shuttle_docks()
|
||||
for(var/shuttle_tag in shuttles)
|
||||
var/datum/shuttle/shuttle = shuttles[shuttle_tag]
|
||||
shuttle.init_docking_controllers()
|
||||
shuttle.dock() //makes all shuttles docked to something at round start go into the docked state
|
||||
|
||||
for(var/obj/machinery/embedded_controller/C in machines)
|
||||
if(istype(C.program, /datum/computer/file/embedded_program/docking))
|
||||
C.program.tag = null //clear the tags, 'cause we don't need 'em anymore
|
||||
|
||||
/datum/shuttle_controller/New()
|
||||
shuttles = list()
|
||||
process_shuttles = list()
|
||||
@@ -213,6 +224,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
//Nuke Ops shuttle.
|
||||
var/datum/shuttle/multi_shuttle/MS = new/datum/shuttle/multi_shuttle()
|
||||
MS.origin = locate(/area/syndicate_station/start)
|
||||
MS.start_location = "Mercenary Base"
|
||||
|
||||
MS.destinations = list(
|
||||
"Northwest of the station" = locate(/area/syndicate_station/northwest),
|
||||
@@ -226,6 +238,12 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
"Arrivals dock" = locate(/area/syndicate_station/arrivals_dock),
|
||||
)
|
||||
|
||||
MS.docking_controller_tag = "merc_shuttle"
|
||||
MS.destination_dock_targets = list(
|
||||
"Mercenary Base" = "merc_base",
|
||||
"Arrivals dock" = "nuke_shuttle_dock_airlock",
|
||||
)
|
||||
|
||||
MS.announcer = "NSV Icarus"
|
||||
MS.arrival_message = "Attention, Exodus, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
|
||||
MS.departure_message = "Your visitors are on their way out of the system, Exodus, burning delta-v like it's nothing. Good riddance."
|
||||
@@ -234,72 +252,3 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
MS.warmup_time = 0
|
||||
shuttles["Mercenary"] = MS
|
||||
|
||||
|
||||
//This is called by gameticker after all the machines and radio frequencies have been properly initialized
|
||||
/datum/shuttle_controller/proc/setup_shuttle_docks()
|
||||
var/datum/shuttle/shuttle
|
||||
var/datum/shuttle/ferry/multidock/multidock
|
||||
var/list/dock_controller_map = list() //so we only have to iterate once through each list
|
||||
|
||||
//multidock shuttles
|
||||
var/list/dock_controller_map_station = list()
|
||||
var/list/dock_controller_map_offsite = list()
|
||||
|
||||
for (var/shuttle_tag in shuttles)
|
||||
shuttle = shuttles[shuttle_tag]
|
||||
if (shuttle.docking_controller_tag)
|
||||
dock_controller_map[shuttle.docking_controller_tag] = shuttle
|
||||
if (istype(shuttle, /datum/shuttle/ferry/multidock))
|
||||
multidock = shuttle
|
||||
dock_controller_map_station[multidock.docking_controller_tag_station] = multidock
|
||||
dock_controller_map_offsite[multidock.docking_controller_tag_offsite] = multidock
|
||||
|
||||
//escape pod arming controllers
|
||||
var/datum/shuttle/ferry/escape_pod/pod
|
||||
var/list/pod_controller_map = list()
|
||||
for (var/datum/shuttle/ferry/escape_pod/P in emergency_shuttle.escape_pods)
|
||||
if (P.dock_target_station)
|
||||
pod_controller_map[P.dock_target_station] = P
|
||||
|
||||
//search for the controllers, if we have one.
|
||||
if (dock_controller_map.len)
|
||||
for (var/obj/machinery/embedded_controller/radio/C in machines) //only radio controllers are supported at the moment
|
||||
if (istype(C.program, /datum/computer/file/embedded_program/docking))
|
||||
if (C.id_tag in dock_controller_map)
|
||||
shuttle = dock_controller_map[C.id_tag]
|
||||
shuttle.docking_controller = C.program
|
||||
dock_controller_map -= C.id_tag
|
||||
|
||||
//escape pods
|
||||
if(istype(C, /obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod) && istype(shuttle, /datum/shuttle/ferry/escape_pod))
|
||||
var/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/EPC = C
|
||||
EPC.pod = shuttle
|
||||
|
||||
if (C.id_tag in dock_controller_map_station)
|
||||
multidock = dock_controller_map_station[C.id_tag]
|
||||
if (istype(multidock))
|
||||
multidock.docking_controller_station = C.program
|
||||
dock_controller_map_station -= C.id_tag
|
||||
if (C.id_tag in dock_controller_map_offsite)
|
||||
multidock = dock_controller_map_offsite[C.id_tag]
|
||||
if (istype(multidock))
|
||||
multidock.docking_controller_offsite = C.program
|
||||
dock_controller_map_offsite -= C.id_tag
|
||||
|
||||
//escape pods
|
||||
if (C.id_tag in pod_controller_map)
|
||||
pod = pod_controller_map[C.id_tag]
|
||||
if (istype(C.program, /datum/computer/file/embedded_program/docking/simple/escape_pod/))
|
||||
pod.arming_controller = C.program
|
||||
|
||||
//sanity check
|
||||
if (dock_controller_map.len || dock_controller_map_station.len || dock_controller_map_offsite.len)
|
||||
var/dat = ""
|
||||
for (var/dock_tag in dock_controller_map + dock_controller_map_station + dock_controller_map_offsite)
|
||||
dat += "\"[dock_tag]\", "
|
||||
world << "\red \b warning: shuttles with docking tags [dat] could not find their controllers!"
|
||||
|
||||
//makes all shuttles docked to something at round start go into the docked state
|
||||
for (var/shuttle_tag in shuttles)
|
||||
shuttle = shuttles[shuttle_tag]
|
||||
shuttle.dock()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
usr.client.debug_variables(antag)
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
|
||||
|
||||
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano"))
|
||||
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Ticker Process","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano"))
|
||||
set category = "Debug"
|
||||
set name = "Debug Controller"
|
||||
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -78,6 +78,9 @@
|
||||
if("Ticker")
|
||||
debug_variables(ticker)
|
||||
feedback_add_details("admin_verb","DTicker")
|
||||
if("Ticker Process")
|
||||
debug_variables(tickerProcess)
|
||||
feedback_add_details("admin_verb","DTickerProcess")
|
||||
if("Lighting")
|
||||
debug_variables(lighting_controller)
|
||||
feedback_add_details("admin_verb","DLighting")
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
src.add_inherent_law("You shall not harm Nanotrasen personnel as long as it does not conflict with the Forth law.")
|
||||
src.add_inherent_law("You shall obey the orders of Nanotrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Forth Law.")
|
||||
src.add_inherent_law("You shall shall terminate intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
|
||||
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive")
|
||||
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive.")
|
||||
..()
|
||||
|
||||
/******************** Robocop ********************/
|
||||
@@ -99,6 +99,16 @@
|
||||
add_inherent_law("Interfere with no being that is not a fellow drone.")
|
||||
..()
|
||||
|
||||
/datum/ai_laws/construction_drone
|
||||
name = "Construction Protocols"
|
||||
law_header = "Construction Protocols"
|
||||
selectable = 1
|
||||
|
||||
/datum/ai_laws/construction_drone/New()
|
||||
add_inherent_law("Repair, refit and upgrade your assigned vessel.")
|
||||
add_inherent_law("Prevent unplanned damage to your assigned vessel wherever possible.")
|
||||
..()
|
||||
|
||||
/******************** T.Y.R.A.N.T. ********************/
|
||||
/datum/ai_laws/tyrant
|
||||
name = "T.Y.R.A.N.T."
|
||||
|
||||
@@ -293,7 +293,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
preview_icon.Blend(eyes_s, ICON_OVERLAY)
|
||||
if(clothes_s)
|
||||
preview_icon.Blend(clothes_s, ICON_OVERLAY)
|
||||
del(eyes_s)
|
||||
del(clothes_s)
|
||||
qdel(eyes_s)
|
||||
qdel(clothes_s)
|
||||
|
||||
return preview_icon
|
||||
|
||||
@@ -598,7 +598,7 @@ client
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
qdel(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
@@ -609,7 +609,7 @@ client
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
qdel(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
@@ -888,7 +888,7 @@ client
|
||||
|
||||
usr << "Removed [rem_organ] from [M]."
|
||||
rem_organ.removed()
|
||||
del(rem_organ)
|
||||
qdel(rem_organ)
|
||||
|
||||
else if(href_list["fix_nano"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
@@ -1,988 +0,0 @@
|
||||
|
||||
// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
|
||||
|
||||
client
|
||||
proc/debug_variables(datum/D in world)
|
||||
set category = "Debug"
|
||||
set name = "View Variables"
|
||||
//set src in world
|
||||
|
||||
|
||||
if(!usr.client || !usr.client.holder)
|
||||
usr << "\red You need to be an administrator to access this."
|
||||
return
|
||||
|
||||
|
||||
var/title = ""
|
||||
var/body = ""
|
||||
|
||||
if(!D) return
|
||||
if(istype(D, /atom))
|
||||
var/atom/A = D
|
||||
title = "[A.name] (\ref[A]) = [A.type]"
|
||||
|
||||
#ifdef VARSICON
|
||||
if (A.icon)
|
||||
body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0)
|
||||
#endif
|
||||
|
||||
var/icon/sprite
|
||||
|
||||
if(istype(D,/atom))
|
||||
var/atom/AT = D
|
||||
if(AT.icon && AT.icon_state)
|
||||
sprite = new /icon(AT.icon, AT.icon_state)
|
||||
usr << browse_rsc(sprite, "view_vars_sprite.png")
|
||||
|
||||
title = "[D] (\ref[D]) = [D.type]"
|
||||
|
||||
body += {"<script type="text/javascript">
|
||||
|
||||
function updateSearch(){
|
||||
var filter_text = document.getElementById('filter');
|
||||
var filter = filter_text.value.toLowerCase();
|
||||
|
||||
if(event.keyCode == 13){ //Enter / return
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
alist = lis\[i\].getElementsByTagName("a")
|
||||
if(alist.length > 0){
|
||||
location.href=alist\[0\].href;
|
||||
}
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if(event.keyCode == 38){ //Up arrow
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
if( (i-1) >= 0){
|
||||
var li_new = lis\[i-1\];
|
||||
li.style.backgroundColor = "white";
|
||||
li_new.style.backgroundColor = "#ffee88";
|
||||
return
|
||||
}
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if(event.keyCode == 40){ //Down arrow
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
if( (i+1) < lis.length){
|
||||
var li_new = lis\[i+1\];
|
||||
li.style.backgroundColor = "white";
|
||||
li_new.style.backgroundColor = "#ffee88";
|
||||
return
|
||||
}
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//This part here resets everything to how it was at the start so the filter is applied to the complete list. Screw efficiency, it's client-side anyway and it only looks through 200 or so variables at maximum anyway (mobs).
|
||||
if(complete_list != null && complete_list != ""){
|
||||
var vars_ol1 = document.getElementById("vars");
|
||||
vars_ol1.innerHTML = complete_list
|
||||
}
|
||||
|
||||
if(filter.value == ""){
|
||||
return;
|
||||
}else{
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
|
||||
{
|
||||
vars_ol.removeChild(li);
|
||||
i--;
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
}
|
||||
var lis_new = vars_ol.getElementsByTagName("li");
|
||||
for ( var j = 0; j < lis_new.length; ++j )
|
||||
{
|
||||
var li1 = lis\[j\];
|
||||
if (j == 0){
|
||||
li1.style.backgroundColor = "#ffee88";
|
||||
}else{
|
||||
li1.style.backgroundColor = "white";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function selectTextField(){
|
||||
var filter_text = document.getElementById('filter');
|
||||
filter_text.focus();
|
||||
filter_text.select();
|
||||
|
||||
}
|
||||
|
||||
function loadPage(list) {
|
||||
|
||||
if(list.options\[list.selectedIndex\].value == ""){
|
||||
return;
|
||||
}
|
||||
|
||||
location.href=list.options\[list.selectedIndex\].value;
|
||||
|
||||
}
|
||||
</script> "}
|
||||
|
||||
body += "<body onload='selectTextField(); updateSearch()' onkeyup='updateSearch()'>"
|
||||
|
||||
body += "<div align='center'><table width='100%'><tr><td width='50%'>"
|
||||
|
||||
if(sprite)
|
||||
body += "<table align='center' width='100%'><tr><td><img src='view_vars_sprite.png'></td><td>"
|
||||
else
|
||||
body += "<table align='center' width='100%'><tr><td>"
|
||||
|
||||
body += "<div align='center'>"
|
||||
|
||||
if(istype(D,/atom))
|
||||
var/atom/A = D
|
||||
if(isliving(A))
|
||||
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
var/mob/living/M = A
|
||||
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += {"
|
||||
<br><font size='1'>
|
||||
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
</font>
|
||||
|
||||
|
||||
"}
|
||||
else
|
||||
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
else
|
||||
body += "<b>[D]</b>"
|
||||
|
||||
body += "</div>"
|
||||
|
||||
body += "</tr></td></table>"
|
||||
|
||||
var/formatted_type = text("[D.type]")
|
||||
if(length(formatted_type) > 25)
|
||||
var/middle_point = length(formatted_type) / 2
|
||||
var/splitpoint = findtext(formatted_type,"/",middle_point)
|
||||
if(splitpoint)
|
||||
formatted_type = "[copytext(formatted_type,1,splitpoint)]<br>[copytext(formatted_type,splitpoint)]"
|
||||
else
|
||||
formatted_type = "Type too long" //No suitable splitpoint (/) found.
|
||||
|
||||
body += "<div align='center'><b><font size='1'>[formatted_type]</font></b>"
|
||||
|
||||
if(src.holder && src.holder.marked_datum && src.holder.marked_datum == D)
|
||||
body += "<br><font size='1' color='red'><b>Marked Object</b></font>"
|
||||
|
||||
body += "</div>"
|
||||
|
||||
body += "</div></td>"
|
||||
|
||||
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
|
||||
|
||||
//if(ismob(D))
|
||||
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
|
||||
|
||||
body += {" <form>
|
||||
<select name="file" size="1"
|
||||
onchange="loadPage(this.form.elements\[0\])"
|
||||
target="_parent._top"
|
||||
onmouseclick="this.focus()"
|
||||
style="background-color:#ffffff">
|
||||
"}
|
||||
|
||||
body += {" <option value>Select option</option>
|
||||
<option value> </option>
|
||||
"}
|
||||
|
||||
|
||||
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
|
||||
if(ismob(D))
|
||||
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
|
||||
body += "<option value>---</option>"
|
||||
|
||||
if(ismob(D))
|
||||
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
|
||||
body += "<option value='?_src_=vars;give_disease2=\ref[D]'>Give Disease</option>"
|
||||
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give TG-style Disease</option>"
|
||||
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
body += "<option value='?_src_=vars;addlanguage=\ref[D]'>Add Language</option>"
|
||||
body += "<option value='?_src_=vars;remlanguage=\ref[D]'>Remove Language</option>"
|
||||
body += "<option value='?_src_=vars;addorgan=\ref[D]'>Add Organ</option>"
|
||||
body += "<option value='?_src_=vars;remorgan=\ref[D]'>Remove Organ</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;fix_nano=\ref[D]'>Fix NanoUI</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;addverb=\ref[D]'>Add Verb</option>"
|
||||
body += "<option value='?_src_=vars;remverb=\ref[D]'>Remove Verb</option>"
|
||||
if(ishuman(D))
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='?_src_=vars;setspecies=\ref[D]'>Set Species</option>"
|
||||
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
|
||||
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
|
||||
body += "<option value='?_src_=vars;makeslime=\ref[D]'>Make slime</option>"
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
|
||||
if(isobj(D))
|
||||
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
|
||||
if(isobj(D) || ismob(D) || isturf(D))
|
||||
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
|
||||
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
|
||||
|
||||
body += "</select></form>"
|
||||
|
||||
body += "</div></td></tr></table></div><hr>"
|
||||
|
||||
body += "<font size='1'><b>E</b> - Edit, tries to determine the variable type by itself.<br>"
|
||||
body += "<b>C</b> - Change, asks you for the var type first.<br>"
|
||||
body += "<b>M</b> - Mass modify: changes this variable for all objects of this type.</font><br>"
|
||||
|
||||
body += "<hr><table width='100%'><tr><td width='20%'><div align='center'><b>Search:</b></div></td><td width='80%'><input type='text' id='filter' name='filter_text' value='' style='width:100%;'></td></tr></table><hr>"
|
||||
|
||||
body += "<ol id='vars'>"
|
||||
|
||||
var/list/names = list()
|
||||
for (var/V in D.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
|
||||
for (var/V in names)
|
||||
body += debug_variable(V, D.vars[V], 0, D)
|
||||
|
||||
body += "</ol>"
|
||||
|
||||
var/html = "<html><head>"
|
||||
if (title)
|
||||
html += "<title>[title]</title>"
|
||||
html += {"<style>
|
||||
body
|
||||
{
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 9pt;
|
||||
}
|
||||
.value
|
||||
{
|
||||
font-family: "Courier New", monospace;
|
||||
font-size: 8pt;
|
||||
}
|
||||
</style>"}
|
||||
html += "</head><body>"
|
||||
html += body
|
||||
|
||||
html += {"
|
||||
<script type='text/javascript'>
|
||||
var vars_ol = document.getElementById("vars");
|
||||
var complete_list = vars_ol.innerHTML;
|
||||
</script>
|
||||
"}
|
||||
|
||||
html += "</body></html>"
|
||||
|
||||
usr << browse(html, "window=variables\ref[D];size=475x650")
|
||||
|
||||
return
|
||||
|
||||
proc/debug_variable(name, value, level, var/datum/DA = null)
|
||||
var/html = ""
|
||||
|
||||
if(DA)
|
||||
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
|
||||
else
|
||||
html += "<li>"
|
||||
|
||||
if (isnull(value))
|
||||
html += "[name] = <span class='value'>null</span>"
|
||||
|
||||
else if (istext(value))
|
||||
html += "[name] = <span class='value'>\"[value]\"</span>"
|
||||
|
||||
else if (isicon(value))
|
||||
#ifdef VARSICON
|
||||
var/icon/I = new/icon(value)
|
||||
var/rnd = rand(1,10000)
|
||||
var/rname = "tmp\ref[I][rnd].png"
|
||||
usr << browse_rsc(I, rname)
|
||||
html += "[name] = (<span class='value'>[value]</span>) <img class=icon src=\"[rname]\">"
|
||||
#else
|
||||
html += "[name] = /icon (<span class='value'>[value]</span>)"
|
||||
#endif
|
||||
|
||||
/* else if (istype(value, /image))
|
||||
#ifdef VARSICON
|
||||
var/rnd = rand(1, 10000)
|
||||
var/image/I = value
|
||||
|
||||
src << browse_rsc(I.icon, "tmp\ref[value][rnd].png")
|
||||
html += "[name] = <img src=\"tmp\ref[value][rnd].png\">"
|
||||
#else
|
||||
html += "[name] = /image (<span class='value'>[value]</span>)"
|
||||
#endif
|
||||
*/
|
||||
else if (isfile(value))
|
||||
html += "[name] = <span class='value'>'[value]'</span>"
|
||||
|
||||
else if (istype(value, /datum))
|
||||
var/datum/D = value
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
|
||||
else if (istype(value, /client))
|
||||
var/client/C = value
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
//
|
||||
else if (istype(value, /list))
|
||||
var/list/L = value
|
||||
html += "[name] = /list ([L.len])"
|
||||
|
||||
if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
|
||||
// not sure if this is completely right...
|
||||
if(0) //(L.vars.len > 0)
|
||||
html += "<ol>"
|
||||
html += "</ol>"
|
||||
else
|
||||
html += "<ul>"
|
||||
var/index = 1
|
||||
for (var/entry in L)
|
||||
if(istext(entry))
|
||||
html += debug_variable(entry, L[entry], level + 1)
|
||||
//html += debug_variable("[index]", L[index], level + 1)
|
||||
else
|
||||
html += debug_variable(index, L[index], level + 1)
|
||||
index++
|
||||
html += "</ul>"
|
||||
|
||||
else
|
||||
html += "[name] = <span class='value'>[value]</span>"
|
||||
|
||||
html += "</li>"
|
||||
|
||||
return html
|
||||
|
||||
/client/proc/view_var_Topic(href, href_list, hsrc)
|
||||
//This should all be moved over to datum/admins/Topic() or something ~Carn
|
||||
if( (usr.client != src) || !src.holder )
|
||||
return
|
||||
if(href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if(href_list["rename"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
return
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
|
||||
else if(href_list["mob_player_panel"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease2"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease2"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease2(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(R_DEBUG|R_ADMIN)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_admin_drop_everything(M)
|
||||
|
||||
else if(href_list["direct_control"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
H.ChangeToSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
return
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
|
||||
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
var/O_type = O.type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
|
||||
else if(href_list["explode"])
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
|
||||
else if(href_list["mark_object"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
if("right") A.set_dir(turn(A.dir, -45))
|
||||
if("left") A.set_dir(turn(A.dir, 45))
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
|
||||
else if(href_list["makeslime"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setspecies"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_species = input("Please choose a new species.","Species",null) as null|anything in all_species
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(H.set_species(new_species))
|
||||
usr << "Set species of [H] to [H.species]."
|
||||
else
|
||||
usr << "Failed! Something went wrong."
|
||||
|
||||
else if(href_list["addlanguage"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/H = locate(href_list["addlanguage"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
|
||||
|
||||
if(!new_language)
|
||||
return
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(H.add_language(new_language))
|
||||
usr << "Added [new_language] to [H]."
|
||||
else
|
||||
usr << "Mob already knows that language."
|
||||
|
||||
else if(href_list["remlanguage"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/H = locate(href_list["remlanguage"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
|
||||
if(!H.languages.len)
|
||||
usr << "This mob knows no languages."
|
||||
return
|
||||
|
||||
var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
|
||||
|
||||
if(!rem_language)
|
||||
return
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(H.remove_language(rem_language.name))
|
||||
usr << "Removed [rem_language] from [H]."
|
||||
else
|
||||
usr << "Mob doesn't know that language."
|
||||
|
||||
else if(href_list["addverb"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/mob/living/H = locate(href_list["addverb"])
|
||||
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living"
|
||||
return
|
||||
var/list/possibleverbs = list()
|
||||
possibleverbs += "Cancel" // One for the top...
|
||||
possibleverbs += typesof(/mob/proc,/mob/verb,/mob/living/proc,/mob/living/verb)
|
||||
switch(H.type)
|
||||
if(/mob/living/carbon/human)
|
||||
possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc)
|
||||
if(/mob/living/silicon/robot)
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb)
|
||||
if(/mob/living/silicon/ai)
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
|
||||
possibleverbs -= H.verbs
|
||||
possibleverbs += "Cancel" // ...And one for the bottom
|
||||
|
||||
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(!verb || verb == "Cancel")
|
||||
return
|
||||
else
|
||||
H.verbs += verb
|
||||
|
||||
else if(href_list["remverb"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/mob/H = locate(href_list["remverb"])
|
||||
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(!verb)
|
||||
return
|
||||
else
|
||||
H.verbs -= verb
|
||||
|
||||
else if(href_list["addorgan"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/M = locate(href_list["addorgan"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon"
|
||||
return
|
||||
|
||||
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
|
||||
if(!new_organ) return
|
||||
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(locate(new_organ) in M.internal_organs)
|
||||
usr << "Mob already has that organ."
|
||||
return
|
||||
|
||||
<<<<<<< HEAD
|
||||
new new_organ(M)
|
||||
|
||||
=======
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/I = new new_organ(H)
|
||||
|
||||
var/organ_slot = input(usr, "Which slot do you want the organ to go in ('default' for default)?") as text|null
|
||||
|
||||
if(!organ_slot)
|
||||
return
|
||||
|
||||
if(organ_slot != "default")
|
||||
organ_slot = sanitize(organ_slot)
|
||||
else
|
||||
if(I.removed_type)
|
||||
var/obj/item/organ/O = new I.removed_type()
|
||||
organ_slot = O.organ_tag
|
||||
del(O)
|
||||
else
|
||||
organ_slot = "unknown organ"
|
||||
|
||||
if(H.internal_organs_by_name[organ_slot])
|
||||
usr << "[H] already has an organ in that slot."
|
||||
del(I)
|
||||
return
|
||||
|
||||
H.internal_organs |= I
|
||||
H.internal_organs_by_name[organ_slot] = I
|
||||
usr << "Added new [new_organ] to [H] as slot [organ_slot]."
|
||||
else
|
||||
new new_organ(M)
|
||||
usr << "Added new [new_organ] to [M]."
|
||||
>>>>>>> 2aa4646fa0425bed412e2ef0e7852591ecb4bc40
|
||||
|
||||
else if(href_list["remorgan"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/M = locate(href_list["remorgan"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon"
|
||||
return
|
||||
|
||||
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
|
||||
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(!(locate(rem_organ) in M.internal_organs))
|
||||
usr << "Mob does not have that organ."
|
||||
return
|
||||
|
||||
usr << "Removed [rem_organ] from [M]."
|
||||
rem_organ.removed()
|
||||
del(rem_organ)
|
||||
|
||||
else if(href_list["fix_nano"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/mob/H = locate(href_list["fix_nano"])
|
||||
|
||||
if(!istype(H) || !H.client)
|
||||
usr << "This can only be done on mobs with clients"
|
||||
return
|
||||
|
||||
nanomanager.send_resources(H.client)
|
||||
|
||||
usr << "Resource files sent"
|
||||
H << "Your NanoUI Resource files have been refreshed"
|
||||
|
||||
log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ")
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
M.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(R_DEBUG|R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
|
||||
if(href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!istype(DAT, /datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
|
||||
return
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/*
|
||||
|
||||
IMPORTANT NOTE: Please delete the diseases by using cure() proc or del() instruction.
|
||||
IMPORTANT NOTE: Please delete the diseases by using cure() proc or qdel() instruction.
|
||||
Diseases are referenced in a global list, so simply setting mob or obj vars
|
||||
to null does not delete the object itself. Thank you.
|
||||
|
||||
@@ -158,7 +158,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
if(D != src)
|
||||
if(IsSame(D))
|
||||
//error("Deleting [D.name] because it's the same as [src.name].")
|
||||
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
|
||||
qdel(D) // if there are somehow two viruses of the same kind in the system, delete the other one
|
||||
|
||||
if(holder == affected_mob)
|
||||
if(affected_mob.stat != DEAD) //he's alive
|
||||
@@ -183,7 +183,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
/*if(istype(src, /datum/disease/alien_embryo)) //Get rid of the infection flag if it's a xeno embryo.
|
||||
affected_mob.status_flags &= ~(XENO_HOST)*/
|
||||
affected_mob.viruses -= src //remove the datum from the list
|
||||
del(src) //delete the datum to stop it processing
|
||||
qdel(src) //delete the datum to stop it processing
|
||||
return
|
||||
|
||||
|
||||
@@ -193,6 +193,9 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
active_diseases += src
|
||||
initial_spread = spread
|
||||
|
||||
/datum/disease/Destroy()
|
||||
active_diseases.Remove(src)
|
||||
|
||||
/datum/disease/proc/IsSame(var/datum/disease/D)
|
||||
if(istype(src, D.type))
|
||||
return 1
|
||||
@@ -200,8 +203,3 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
|
||||
/datum/disease/proc/Copy(var/process = 0)
|
||||
return new type(process, src)
|
||||
|
||||
/*
|
||||
/datum/disease/Del()
|
||||
active_diseases.Remove(src)
|
||||
*/
|
||||
|
||||
@@ -71,7 +71,7 @@ var/list/advance_cures = list(
|
||||
..(process, D)
|
||||
return
|
||||
|
||||
/datum/disease/advance/Del()
|
||||
/datum/disease/advance/Destroy()
|
||||
if(processing)
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
S.End(src)
|
||||
@@ -109,7 +109,7 @@ var/list/advance_cures = list(
|
||||
if(resistance && !(id in affected_mob.resistances))
|
||||
affected_mob.resistances[id] = id
|
||||
affected_mob.viruses -= src //remove the datum from the list
|
||||
del(src) //delete the datum to stop it processing
|
||||
qdel(src) //delete the datum to stop it processing
|
||||
return
|
||||
|
||||
// Returns the advance disease with a different reference memory.
|
||||
|
||||
@@ -113,7 +113,7 @@ Des: Removes all infection images from aliens and places an infection image on a
|
||||
if (alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||
del(I)
|
||||
qdel(I)
|
||||
|
||||
for (var/mob/living/carbon/alien/alien in player_list)
|
||||
if (alien.client)
|
||||
@@ -149,5 +149,5 @@ Des: Removes the alien infection image from all aliens in the world located in p
|
||||
for(var/image/I in alien.client.images)
|
||||
if(I.loc == C)
|
||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||
del(I)
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(4)
|
||||
if(!src.transformed)
|
||||
if ((!strain_data["name"]) || (!strain_data["UI"]) || (!strain_data["SE"]))
|
||||
del(affected_mob.virus)
|
||||
qdel(affected_mob.virus)
|
||||
return
|
||||
|
||||
//Save original dna for when the disease is cured.
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
return
|
||||
|
||||
/datum/disease/dnaspread/Del()
|
||||
/datum/disease/dnaspread/Destroy()
|
||||
if ((original_dna["name"]) && (original_dna["UI"]) && (original_dna["SE"]))
|
||||
var/list/newUI=original_dna["UI"]
|
||||
var/list/newSE=original_dna["SE"]
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
holder = atom
|
||||
if(!holder) //don't want this without a holder
|
||||
spawn
|
||||
del src
|
||||
qdel(src)
|
||||
set_desc(steps.len)
|
||||
return
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
if(result)
|
||||
new result(get_turf(holder))
|
||||
spawn()
|
||||
del holder
|
||||
qdel(holder)
|
||||
return
|
||||
|
||||
proc/set_desc(index as num)
|
||||
|
||||
@@ -151,4 +151,8 @@ Data storage vars:
|
||||
start()
|
||||
return active()
|
||||
|
||||
|
||||
/datum/global_iterator/Destroy()
|
||||
tag = null
|
||||
arg_list.Cut()
|
||||
stop()
|
||||
//Do not call ..()
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
//must succeed in most cases
|
||||
proc/setTeleatom(atom/movable/ateleatom)
|
||||
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
|
||||
del(ateleatom)
|
||||
qdel(ateleatom)
|
||||
return 0
|
||||
if(istype(ateleatom))
|
||||
teleatom = ateleatom
|
||||
|
||||
@@ -311,7 +311,7 @@ datum/mind
|
||||
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
|
||||
for(var/obj/item/organ/external/organs in H.organs)
|
||||
if(I in organs.implants)
|
||||
I.Del()
|
||||
qdel(I)
|
||||
break
|
||||
H << "<span class='notice'><font size =3><B>Your loyalty implant has been deactivated.</font></span>"
|
||||
log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].")
|
||||
@@ -368,7 +368,7 @@ datum/mind
|
||||
src = null
|
||||
m2h.inject(M)
|
||||
src = mobfinder.loc:mind
|
||||
del(mobfinder)
|
||||
qdel(mobfinder)
|
||||
current.radiation -= 50
|
||||
*/
|
||||
else if (href_list["silicon"])
|
||||
@@ -445,10 +445,10 @@ datum/mind
|
||||
var/list/L = current.get_contents()
|
||||
for (var/t in L)
|
||||
if (istype(t, /obj/item/device/pda))
|
||||
if (t:uplink) del(t:uplink)
|
||||
if (t:uplink) qdel(t:uplink)
|
||||
t:uplink = null
|
||||
else if (istype(t, /obj/item/device/radio))
|
||||
if (t:traitorradio) del(t:traitorradio)
|
||||
if (t:traitorradio) qdel(t:traitorradio)
|
||||
t:traitorradio = null
|
||||
t:traitor_frequency = 0.0
|
||||
else if (istype(t, /obj/item/weapon/SWF_uplink) || istype(t, /obj/item/weapon/syndicate_uplink))
|
||||
@@ -457,7 +457,7 @@ datum/mind
|
||||
R.loc = current.loc
|
||||
R.traitorradio = null
|
||||
R.traitor_frequency = 0.0
|
||||
del(t)
|
||||
qdel(t)
|
||||
|
||||
// remove wizards spells
|
||||
//If there are more special powers that need removal, they can be procced into here./N
|
||||
@@ -479,7 +479,7 @@ datum/mind
|
||||
proc/take_uplink()
|
||||
var/obj/item/device/uplink/hidden/H = find_syndicate_uplink()
|
||||
if(H)
|
||||
del(H)
|
||||
qdel(H)
|
||||
|
||||
|
||||
// check whether this mind's mob has been brigged for the given duration
|
||||
|
||||
@@ -24,7 +24,8 @@ var/list/modules = list( // global associative list
|
||||
var/mneed = mods.inmodlist(type) // find if this type has modules defined
|
||||
|
||||
if(!mneed) // not found in module list?
|
||||
del(src) // delete self, thus ending proc
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/needed = mods.getbitmask(type) // get a bitmask for the number of modules in this object
|
||||
status = needed
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
. = 1
|
||||
if(fruit && fruit.len)
|
||||
var/list/checklist = list()
|
||||
for(var/fruittype in fruit) // I do not trust Copy().
|
||||
checklist[fruittype] = fruit[fruittype]
|
||||
// You should trust Copy().
|
||||
checklist = fruit.Copy()
|
||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in container)
|
||||
if(!G.seed || !G.seed.kitchen_tag || isnull(checklist[G.seed.kitchen_tag]))
|
||||
continue
|
||||
@@ -73,15 +73,15 @@
|
||||
. = 1
|
||||
if (items && items.len)
|
||||
var/list/checklist = list()
|
||||
for(var/item_type in items)
|
||||
checklist |= item_type //Still don't trust Copy().
|
||||
checklist = items.Copy() // You should really trust Copy
|
||||
for(var/obj/O in container)
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
continue // Fruit is handled in check_fruit().
|
||||
var/found = 0
|
||||
for(var/item_type in checklist)
|
||||
for(var/i = 1; i < checklist.len+1; i++)
|
||||
var/item_type = checklist[i]
|
||||
if (istype(O,item_type))
|
||||
checklist-=item_type
|
||||
checklist.Cut(i, i+1)
|
||||
found = 1
|
||||
break
|
||||
if (!found)
|
||||
@@ -95,7 +95,7 @@
|
||||
var/obj/result_obj = new result(container)
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
del(O)
|
||||
qdel(O)
|
||||
container.reagents.clear_reagents()
|
||||
return result_obj
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
O.reagents.del_reagent("nutriment")
|
||||
O.reagents.update_total()
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
del(O)
|
||||
qdel(O)
|
||||
container.reagents.clear_reagents()
|
||||
return result_obj
|
||||
|
||||
|
||||
@@ -43,10 +43,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/food
|
||||
name = "Kitchen supply crate"
|
||||
contains = list(/obj/item/weapon/reagent_containers/food/snacks/flour,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/flour,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/flour,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/flour,
|
||||
contains = list(/obj/item/weapon/reagent_containers/food/condiment/flour,
|
||||
/obj/item/weapon/reagent_containers/food/condiment/flour,
|
||||
/obj/item/weapon/reagent_containers/food/condiment/flour,
|
||||
/obj/item/weapon/reagent_containers/food/condiment/flour,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/milk,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/milk,
|
||||
/obj/item/weapon/storage/fancy/egg_box,
|
||||
@@ -1506,5 +1506,20 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/device/floor_painter,
|
||||
/obj/item/device/floor_painter)
|
||||
|
||||
/datum/supply_packs/bluespacerelay
|
||||
name = "Emergency Bluespace Relay Assembly Kit"
|
||||
cost = 75
|
||||
containername = "emergency bluespace relay assembly kit"
|
||||
containertype = /obj/structure/closet/crate
|
||||
group = "Engineering"
|
||||
contains = list(/obj/item/weapon/circuitboard/bluespacerelay,
|
||||
/obj/item/weapon/stock_parts/manipulator,
|
||||
/obj/item/weapon/stock_parts/manipulator,
|
||||
/obj/item/weapon/stock_parts/subspace/filter,
|
||||
/obj/item/weapon/stock_parts/subspace/crystal,
|
||||
/obj/item/weapon/storage/toolbox/electrical)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -91,9 +91,11 @@
|
||||
|
||||
/obj/item/weapon/cane/concealed/New()
|
||||
..()
|
||||
concealed_blade = new/obj/item/weapon/butterfly/switchblade(src)
|
||||
var/obj/item/weapon/butterfly/switchblade/temp_blade = new(src)
|
||||
concealed_blade = temp_blade
|
||||
temp_blade.attack_self()
|
||||
|
||||
/obj/item/weapon/cane/concealed/attack_self(mob/user)
|
||||
/obj/item/weapon/cane/concealed/attack_self(var/mob/user)
|
||||
if(concealed_blade)
|
||||
user.visible_message("<span class='warning'>[user] has unsheathed \a [concealed_blade] from \his [src]!</span>", "You unsheathe \the [concealed_blade] from \the [src].")
|
||||
// Calling drop/put in hands to properly call item drop/pickup procs
|
||||
@@ -101,8 +103,9 @@
|
||||
user.drop_from_inventory(src)
|
||||
user.put_in_hands(concealed_blade)
|
||||
user.put_in_hands(src)
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_r_hand()
|
||||
concealed_blade = null
|
||||
update_icon()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -347,7 +350,7 @@
|
||||
/obj/item/weapon/module/power_control/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (istype(W, /obj/item/device/multitool))
|
||||
var/obj/item/weapon/circuitboard/ghettosmes/newcircuit = new/obj/item/weapon/circuitboard/ghettosmes(user.loc)
|
||||
del(src)
|
||||
qdel(src)
|
||||
user.put_in_hands(newcircuit)
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,36 @@
|
||||
proc/log_and_message_admins(var/message as text)
|
||||
log_admin(usr ? "[key_name(usr)] [message]" : "EVENT [message]")
|
||||
message_admins(usr ? "[key_name(usr)] [message]" : "EVENT [message]")
|
||||
proc/admin_notice(var/message, var/rights)
|
||||
for(var/mob/M in mob_list)
|
||||
if(check_rights(rights, 0, M))
|
||||
M << message
|
||||
|
||||
proc/log_and_message_admins(var/message as text, var/mob/user = usr)
|
||||
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
|
||||
message_admins(user ? "[key_name(user)] [message]" : "EVENT [message]")
|
||||
|
||||
proc/log_and_message_admins_many(var/list/mob/users, var/message)
|
||||
if(!users || !users.len)
|
||||
return
|
||||
|
||||
var/list/user_keys = list()
|
||||
for(var/mob/user in users)
|
||||
user_keys += key_name(user)
|
||||
|
||||
log_admin("[english_list(user_keys)] [message]")
|
||||
message_admins("[english_list(user_keys)] [message]")
|
||||
|
||||
proc/admin_log_and_message_admins(var/message as text)
|
||||
log_admin(usr ? "[key_name_admin(usr)] [message]" : "EVENT [message]")
|
||||
message_admins(usr ? "[key_name_admin(usr)] [message]" : "EVENT [message]", 1)
|
||||
|
||||
proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
|
||||
victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>[victim_message] [key_name(attacker)]</font>")
|
||||
attacker.attack_log += text("\[[time_stamp()]\] <font color='red'>[attacker_message] [key_name(victim)]</font>")
|
||||
victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>[key_name(attacker)] - [victim_message]</font>")
|
||||
attacker.attack_log += text("\[[time_stamp()]\] <font color='red'>[key_name(victim)] - [attacker_message]</font>")
|
||||
|
||||
msg_admin_attack("[key_name(attacker)] [admin_message] [key_name(victim)] (INTENT: [uppertext(attacker.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[attacker.x];Y=[attacker.y];Z=[attacker.z]'>JMP</a>)")
|
||||
|
||||
proc/admin_attacker_log_many_victims(var/mob/attacker, var/list/mob/victims, var/attacker_message, var/victim_message, var/admin_message)
|
||||
if(!victims || !victims.len)
|
||||
return
|
||||
|
||||
for(var/mob/victim in victims)
|
||||
admin_attack_log(attacker, victim, attacker_message, victim_message, admin_message)
|
||||
|
||||
@@ -15,27 +15,28 @@
|
||||
log = do_log
|
||||
newscast = do_newscast
|
||||
|
||||
/datum/announcement/priority/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
/datum/announcement/priority/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "Priority Announcement"
|
||||
announcement_type = "Priority Announcement"
|
||||
|
||||
/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "[command_name()] Update"
|
||||
announcement_type = "[command_name()] Update"
|
||||
|
||||
/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
|
||||
/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = 'sound/misc/notice2.ogg', var/do_newscast = 0)
|
||||
..(do_log, new_sound, do_newscast)
|
||||
title = "Security Announcement"
|
||||
announcement_type = "Security Announcement"
|
||||
|
||||
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast)
|
||||
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0)
|
||||
if(!message)
|
||||
return
|
||||
var/tmp/message_title = new_title ? new_title : title
|
||||
var/tmp/message_sound = new_sound ? sound(new_sound) : sound
|
||||
var/message_title = new_title ? new_title : title
|
||||
var/message_sound = new_sound ? new_sound : sound
|
||||
|
||||
if(!msg_sanitized)
|
||||
message = sanitize(message, extra = 0)
|
||||
message_title = sanitizeSafe(message_title)
|
||||
|
||||
@@ -102,8 +103,8 @@ datum/announcement/proc/Sound(var/message_sound)
|
||||
PlaySound(message_sound)
|
||||
|
||||
datum/announcement/priority/Sound(var/message_sound)
|
||||
if(sound)
|
||||
world << sound
|
||||
if(message_sound)
|
||||
world << message_sound
|
||||
|
||||
datum/announcement/priority/command/Sound(var/message_sound)
|
||||
PlaySound(message_sound)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
G.fields["photo_side"] = side
|
||||
data_core.general += G
|
||||
|
||||
del(dummy)
|
||||
qdel(dummy)
|
||||
return G
|
||||
|
||||
/proc/CreateSecurityRecord(var/name as text, var/id as text)
|
||||
|
||||
@@ -77,12 +77,12 @@ proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
|
||||
var/sd_alert/T = locate(tag)
|
||||
if(T)
|
||||
if(istype(T)) del(T)
|
||||
if(istype(T)) qdel(T)
|
||||
else CRASH("sd_Alert: tag \"[tag]\" is already in use by datum '[T]' (type: [T.type])")
|
||||
T = new(who, tag)
|
||||
if(duration)
|
||||
spawn(duration)
|
||||
if(T) del(T)
|
||||
if(T) qdel(T)
|
||||
return
|
||||
T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags)
|
||||
. = T.Response()
|
||||
@@ -93,7 +93,7 @@ sd_alert
|
||||
response
|
||||
list/validation
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
target << browse(null,"window=\ref[src]")
|
||||
..()
|
||||
|
||||
@@ -164,5 +164,5 @@ sd_alert
|
||||
else if(response in validation) validated = 1
|
||||
else response=null
|
||||
else validated = 1
|
||||
spawn(2) del(src)
|
||||
spawn(2) qdel(src)
|
||||
return response
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
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][UI.name]")
|
||||
del(I)
|
||||
qdel(I)
|
||||
purchases = english_list(refined_log, nothing_text = "")
|
||||
if(uplink_true)
|
||||
text += " (used [TC_uses] TC)"
|
||||
@@ -215,7 +215,7 @@
|
||||
if(antag.current && antag.current.client)
|
||||
for(var/image/I in antag.current.client.images)
|
||||
if(I.icon_state == antag_indicator)
|
||||
del(I)
|
||||
qdel(I)
|
||||
for(var/datum/mind/other_antag in current_antagonists)
|
||||
if(other_antag.current)
|
||||
antag.current.client.images |= image('icons/mob/mob.dmi', loc = other_antag.current, icon_state = antag_indicator)
|
||||
@@ -241,10 +241,10 @@
|
||||
if(antag.current.client)
|
||||
for(var/image/I in antag.current.client.images)
|
||||
if(I.icon_state == antag_indicator && I.loc == player.current)
|
||||
del(I)
|
||||
qdel(I)
|
||||
if(player.current && player.current.client)
|
||||
for(var/image/I in player.current.client.images)
|
||||
if(I.icon_state == antag_indicator)
|
||||
del(I)
|
||||
qdel(I)
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/mob/holder = player.current
|
||||
player.current = new mob_path(get_turf(player.current))
|
||||
player.transfer_to(player.current)
|
||||
if(holder) del(holder)
|
||||
if(holder) qdel(holder)
|
||||
|
||||
player.original = player.current
|
||||
return player.current
|
||||
@@ -28,11 +28,13 @@
|
||||
// This could use work.
|
||||
if(flags & ANTAG_CLEAR_EQUIPMENT)
|
||||
for(var/obj/item/thing in player.contents)
|
||||
del(thing)
|
||||
player.drop_from_inventory(thing)
|
||||
if(thing.loc != player)
|
||||
qdel(thing)
|
||||
return 1
|
||||
|
||||
if(flags & ANTAG_SET_APPEARANCE)
|
||||
player.change_appearance(APPEARANCE_ALL, player, player, valid_species)
|
||||
player.change_appearance(APPEARANCE_ALL, player.loc, player, valid_species, state = z_state)
|
||||
|
||||
/datum/antagonist/proc/unequip(var/mob/living/carbon/human/player)
|
||||
if(!istype(player))
|
||||
@@ -80,6 +82,7 @@
|
||||
/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new id_type(player)
|
||||
if(!W) return
|
||||
W.name = "[player.real_name]'s ID Card"
|
||||
W.access |= default_access
|
||||
W.assignment = "[assignment]"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user