mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge remote-tracking branch 'remotes/git-svn' into bs12_with_tgport
Conflicts: baystation12.dme code/datums/organs/organ_internal.dm code/datums/vote.dm code/defines/atom.dm code/defines/procs/gamehelpers.dm code/defines/turf.dm code/game/algorithm.dm code/game/cellautomata.dm code/game/gamemodes/cult/runes.dm code/game/gamemodes/events.dm code/game/gamemodes/events/ninja_equipment.dm code/game/gamemodes/events/space_ninja.dm code/game/gamemodes/wizard/rightandwrong.dm code/game/jobs/job/captain.dm code/game/machinery/computer/ai_core.dm code/game/machinery/computer/law.dm code/game/machinery/computer/pod.dm code/game/machinery/computer/syndicate_shuttle.dm code/game/machinery/doors/firedoor.dm code/game/machinery/teleporter.dm code/game/machinery/wishgranter.dm code/game/objects/items/devices/uplinks.dm code/game/objects/items/weapons/cigs_lighters.dm code/game/objects/structures/electricchair.dm code/game/turfs/turf.dm code/game/vote.dm code/hub.dm code/modules/admin/admin_verbs.dm code/modules/awaymissions/zlevel.dm code/modules/client/client defines.dm code/modules/food/food.dm code/modules/food/meat.dm code/modules/food/recipes_microwave.dm code/modules/mob/living/carbon/carbon_defines.dm code/modules/mob/living/carbon/human/hud.dm code/modules/mob/living/carbon/human/update_icons.dm code/modules/mob/living/login.dm code/modules/mob/living/simple_animal/life.dm code/modules/mob/mob_defines.dm code/modules/mob/new_player/login.dm code/modules/paperwork/filingcabinet.dm code/modules/paperwork/folders.dm code/modules/paperwork/photocopier.dm code/setup.dm icons/effects/genetics.dmi interface/interface.dm interface/skin.dmf maps/RandomZLevels/fileList.txt various misc mergefixes and todos Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -16,18 +16,16 @@
|
||||
#define FILE_DIR "code/datums"
|
||||
#define FILE_DIR "code/datums/diseases"
|
||||
#define FILE_DIR "code/datums/helper_datums"
|
||||
#define FILE_DIR "code/datums/organs"
|
||||
#define FILE_DIR "code/datums/spells"
|
||||
#define FILE_DIR "code/defines"
|
||||
#define FILE_DIR "code/defines/area"
|
||||
#define FILE_DIR "code/defines/obj"
|
||||
#define FILE_DIR "code/defines/obj/clothing"
|
||||
#define FILE_DIR "code/defines/procs"
|
||||
#define FILE_DIR "code/defines/sd_procs"
|
||||
#define FILE_DIR "code/defines/tanning"
|
||||
#define FILE_DIR "code/FEA"
|
||||
#define FILE_DIR "code/game"
|
||||
#define FILE_DIR "code/game/area"
|
||||
#define FILE_DIR "code/game/asteroid"
|
||||
#define FILE_DIR "code/game/events"
|
||||
#define FILE_DIR "code/game/events/EventProcs"
|
||||
#define FILE_DIR "code/game/events/Events"
|
||||
@@ -100,6 +98,7 @@
|
||||
#define FILE_DIR "code/game/structure"
|
||||
#define FILE_DIR "code/game/turfs"
|
||||
#define FILE_DIR "code/game/turfs/simulated"
|
||||
#define FILE_DIR "code/game/turfs/space"
|
||||
#define FILE_DIR "code/game/turfs/unsimulated"
|
||||
#define FILE_DIR "code/game/vehicles"
|
||||
#define FILE_DIR "code/game/vehicles/airtight"
|
||||
@@ -161,7 +160,6 @@
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/robot"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal"
|
||||
#define FILE_DIR "code/modules/mob/new_player"
|
||||
#define FILE_DIR "code/modules/mob/organ"
|
||||
#define FILE_DIR "code/modules/mob/simple_animal"
|
||||
#define FILE_DIR "code/modules/paperwork"
|
||||
#define FILE_DIR "code/modules/power"
|
||||
@@ -271,14 +269,15 @@
|
||||
// END_FILE_DIR
|
||||
|
||||
// BEGIN_PREFERENCES
|
||||
#define DEBUG
|
||||
// END_PREFERENCES
|
||||
|
||||
// BEGIN_INCLUDE
|
||||
#include "code\global.dm"
|
||||
#include "code\hub.dm"
|
||||
#include "code\names.dm"
|
||||
#include "code\setup.dm"
|
||||
#include "code\stylesheet.dm"
|
||||
#include "code\world.dm"
|
||||
#include "code\ATMOSPHERICS\atmospherics.dm"
|
||||
#include "code\ATMOSPHERICS\datum_pipe_network.dm"
|
||||
#include "code\ATMOSPHERICS\datum_pipeline.dm"
|
||||
@@ -306,10 +305,12 @@
|
||||
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
|
||||
#include "code\controllers\_DynamicAreaLighting_TG.dm"
|
||||
#include "code\controllers\configuration.dm"
|
||||
#include "code\controllers\failsafe.dm"
|
||||
#include "code\controllers\lighting_controller.dm"
|
||||
#include "code\controllers\master_controller.dm"
|
||||
#include "code\controllers\shuttle_controller.dm"
|
||||
#include "code\controllers\verbs.dm"
|
||||
#include "code\controllers\voting.dm"
|
||||
#include "code\datums\ai_laws.dm"
|
||||
#include "code\datums\computerfiles.dm"
|
||||
#include "code\datums\datacore.dm"
|
||||
@@ -323,7 +324,6 @@
|
||||
#include "code\datums\spell.dm"
|
||||
#include "code\datums\sun.dm"
|
||||
#include "code\datums\supplypacks.dm"
|
||||
#include "code\datums\vote.dm"
|
||||
#include "code\datums\diseases\alien_embryo.dm"
|
||||
#include "code\datums\diseases\appendicitis.dm"
|
||||
#include "code\datums\diseases\beesease.dm"
|
||||
@@ -350,6 +350,9 @@
|
||||
#include "code\datums\helper_datums\global_iterator.dm"
|
||||
#include "code\datums\helper_datums\teleport.dm"
|
||||
#include "code\datums\helper_datums\topic_input.dm"
|
||||
#include "code\datums\organs\organ.dm"
|
||||
#include "code\datums\organs\organ_external.dm"
|
||||
#include "code\datums\organs\wound.dm"
|
||||
#include "code\datums\spells\area_teleport.dm"
|
||||
#include "code\datums\spells\conjure.dm"
|
||||
#include "code\datums\spells\emplosion.dm"
|
||||
@@ -363,13 +366,7 @@
|
||||
#include "code\datums\spells\trigger.dm"
|
||||
#include "code\datums\spells\turf_teleport.dm"
|
||||
#include "code\datums\spells\wizard.dm"
|
||||
#include "code\defines\atom.dm"
|
||||
#include "code\defines\hub.dm"
|
||||
#include "code\defines\obj.dm"
|
||||
#include "code\defines\turf.dm"
|
||||
#include "code\defines\world.dm"
|
||||
#include "code\defines\area\Space Station 13 areas.dm"
|
||||
#include "code\defines\obj\costume.dm"
|
||||
#include "code\defines\obj\hydro.dm"
|
||||
#include "code\defines\obj\machinery.dm"
|
||||
#include "code\defines\obj\storage.dm"
|
||||
@@ -397,37 +394,20 @@
|
||||
#include "code\defines\procs\statistics.dm"
|
||||
#include "code\defines\procs\syndicate_name.dm"
|
||||
#include "code\defines\procs\time_stamp.dm"
|
||||
#include "code\defines\tanning\leather.dm"
|
||||
#include "code\game\algorithm.dm"
|
||||
#include "code\game\atom_procs.dm"
|
||||
#include "code\game\cellautomata.dm"
|
||||
#include "code\game\chemistry.dm"
|
||||
#include "code\game\asteroid.dm"
|
||||
#include "code\game\atoms.dm"
|
||||
#include "code\game\atoms_movable.dm"
|
||||
#include "code\game\communications.dm"
|
||||
#include "code\game\dna.dm"
|
||||
#include "code\game\hud.dm"
|
||||
#include "code\game\json.dm"
|
||||
#include "code\game\landmarks.dm"
|
||||
#include "code\game\prisonshuttle.dm"
|
||||
#include "code\game\response_team.dm"
|
||||
#include "code\game\shuttle_engines.dm"
|
||||
#include "code\game\skincmd.dm"
|
||||
#include "code\game\smoothwall.dm"
|
||||
#include "code\game\socket_talk.dm"
|
||||
#include "code\game\sound.dm"
|
||||
#include "code\game\specops_shuttle.dm"
|
||||
#include "code\game\status.dm"
|
||||
#include "code\game\step_triggers.dm"
|
||||
#include "code\game\supplyshuttle.dm"
|
||||
#include "code\game\syndicate_shuttle.dm"
|
||||
#include "code\game\syndicate_specops_shuttle.dm"
|
||||
#include "code\game\throwing.dm"
|
||||
#include "code\game\topic.dm"
|
||||
#include "code\game\vote.dm"
|
||||
#include "code\game\area\ai_monitored.dm"
|
||||
#include "code\game\area\areas.dm"
|
||||
#include "code\game\asteroid\artifacts.dm"
|
||||
#include "code\game\asteroid\asteroid.dm"
|
||||
#include "code\game\asteroid\turf.dm"
|
||||
#include "code\game\area\Space Station 13 areas.dm"
|
||||
#include "code\game\gamemodes\events.dm"
|
||||
#include "code\game\gamemodes\factions.dm"
|
||||
#include "code\game\gamemodes\game_mode.dm"
|
||||
@@ -503,7 +483,6 @@
|
||||
#include "code\game\machinery\autolathe.dm"
|
||||
#include "code\game\machinery\Beacon.dm"
|
||||
#include "code\game\machinery\biogenerator.dm"
|
||||
#include "code\game\machinery\camera_circuit.dm"
|
||||
#include "code\game\machinery\cell_charger.dm"
|
||||
#include "code\game\machinery\cloning.dm"
|
||||
#include "code\game\machinery\constructable_frame.dm"
|
||||
@@ -513,7 +492,6 @@
|
||||
#include "code\game\machinery\door_control.dm"
|
||||
#include "code\game\machinery\doppler_array.dm"
|
||||
#include "code\game\machinery\flasher.dm"
|
||||
#include "code\game\machinery\floodlight.dm"
|
||||
#include "code\game\machinery\Freezer.dm"
|
||||
#include "code\game\machinery\gateway.dm"
|
||||
#include "code\game\machinery\hologram.dm"
|
||||
@@ -530,7 +508,6 @@
|
||||
#include "code\game\machinery\portable_turret.dm"
|
||||
#include "code\game\machinery\recharger.dm"
|
||||
#include "code\game\machinery\rechargestation.dm"
|
||||
#include "code\game\machinery\records_scanner.dm"
|
||||
#include "code\game\machinery\requests_console.dm"
|
||||
#include "code\game\machinery\robot_fabricator.dm"
|
||||
#include "code\game\machinery\seed_extractor.dm"
|
||||
@@ -543,14 +520,15 @@
|
||||
#include "code\game\machinery\teleporter.dm"
|
||||
#include "code\game\machinery\turrets.dm"
|
||||
#include "code\game\machinery\vending.dm"
|
||||
#include "code\game\machinery\walllockers.dm"
|
||||
#include "code\game\machinery\washing_machine.dm"
|
||||
#include "code\game\machinery\wishgranter.dm"
|
||||
#include "code\game\machinery\atmoalter\area_atmos_computer.dm"
|
||||
#include "code\game\machinery\atmoalter\canister.dm"
|
||||
#include "code\game\machinery\atmoalter\meter.dm"
|
||||
#include "code\game\machinery\atmoalter\portable_atmospherics.dm"
|
||||
#include "code\game\machinery\atmoalter\pump.dm"
|
||||
#include "code\game\machinery\atmoalter\scrubber.dm"
|
||||
#include "code\game\machinery\atmoalter\zvent.dm"
|
||||
#include "code\game\machinery\bots\bots.dm"
|
||||
#include "code\game\machinery\bots\cleanbot.dm"
|
||||
#include "code\game\machinery\bots\ed209bot.dm"
|
||||
@@ -570,7 +548,6 @@
|
||||
#include "code\game\machinery\computer\atmos_alert.dm"
|
||||
#include "code\game\machinery\computer\buildandrepair.dm"
|
||||
#include "code\game\machinery\computer\camera.dm"
|
||||
#include "code\game\machinery\computer\camera_monitor.dm"
|
||||
#include "code\game\machinery\computer\card.dm"
|
||||
#include "code\game\machinery\computer\cloning.dm"
|
||||
#include "code\game\machinery\computer\communications.dm"
|
||||
@@ -585,10 +562,14 @@
|
||||
#include "code\game\machinery\computer\pod.dm"
|
||||
#include "code\game\machinery\computer\power.dm"
|
||||
#include "code\game\machinery\computer\prisoner.dm"
|
||||
#include "code\game\machinery\computer\prisonshuttle.dm"
|
||||
#include "code\game\machinery\computer\robot.dm"
|
||||
#include "code\game\machinery\computer\security.dm"
|
||||
#include "code\game\machinery\computer\shuttle.dm"
|
||||
#include "code\game\machinery\computer\specops_shuttle.dm"
|
||||
#include "code\game\machinery\computer\station_alert.dm"
|
||||
#include "code\game\machinery\computer\syndicate_shuttle.dm"
|
||||
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
|
||||
#include "code\game\machinery\doors\airlock.dm"
|
||||
#include "code\game\machinery\doors\airlock_electronics.dm"
|
||||
#include "code\game\machinery\doors\brigdoors.dm"
|
||||
@@ -647,7 +628,6 @@
|
||||
#include "code\game\objects\structures.dm"
|
||||
#include "code\game\objects\weapons.dm"
|
||||
#include "code\game\objects\effects\aliens.dm"
|
||||
#include "code\game\objects\effects\barsign.dm"
|
||||
#include "code\game\objects\effects\biomass_rift.dm"
|
||||
#include "code\game\objects\effects\effect_system.dm"
|
||||
#include "code\game\objects\effects\gibs.dm"
|
||||
@@ -659,6 +639,7 @@
|
||||
#include "code\game\objects\effects\overlays.dm"
|
||||
#include "code\game\objects\effects\portals.dm"
|
||||
#include "code\game\objects\effects\signs.dm"
|
||||
#include "code\game\objects\effects\step_triggers.dm"
|
||||
#include "code\game\objects\effects\decals\cleanable.dm"
|
||||
#include "code\game\objects\effects\decals\contraband.dm"
|
||||
#include "code\game\objects\effects\decals\crayon.dm"
|
||||
@@ -670,6 +651,7 @@
|
||||
#include "code\game\objects\effects\decals\Cleanable\robots.dm"
|
||||
#include "code\game\objects\effects\spawners\bombspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\gibspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\vaultspawner.dm"
|
||||
#include "code\game\objects\items\apc_frame.dm"
|
||||
#include "code\game\objects\items\blueprints.dm"
|
||||
#include "code\game\objects\items\bodybag.dm"
|
||||
@@ -710,6 +692,7 @@
|
||||
#include "code\game\objects\items\stacks\rods.dm"
|
||||
#include "code\game\objects\items\stacks\stack.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\glass.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\leather.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\light.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\mineral.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\sheet_types.dm"
|
||||
@@ -832,14 +815,27 @@
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
|
||||
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
|
||||
#include "code\game\player\admin_report.dm"
|
||||
#include "code\game\turfs\simulated.dm"
|
||||
#include "code\game\turfs\turf.dm"
|
||||
#include "code\game\turfs\unsimulated.dm"
|
||||
#include "code\game\turfs\simulated\asteroid.dm"
|
||||
#include "code\game\turfs\simulated\beach.dm"
|
||||
#include "code\game\turfs\simulated\floor.dm"
|
||||
#include "code\game\turfs\simulated\floor_types.dm"
|
||||
#include "code\game\turfs\simulated\walls.dm"
|
||||
#include "code\game\turfs\simulated\walls_mineral.dm"
|
||||
#include "code\game\turfs\simulated\walls_misc.dm"
|
||||
#include "code\game\turfs\simulated\walls_reinforced.dm"
|
||||
#include "code\game\turfs\space\space.dm"
|
||||
#include "code\game\turfs\space\transit.dm"
|
||||
#include "code\game\turfs\unsimulated\beach.dm"
|
||||
#include "code\game\turfs\unsimulated\floor.dm"
|
||||
#include "code\game\turfs\unsimulated\walls.dm"
|
||||
#include "code\game\vehicles\vehicle.dm"
|
||||
#include "code\game\vehicles\airtight\airtight.dm"
|
||||
#include "code\game\vehicles\airtight\land.dm"
|
||||
#include "code\game\vehicles\airtight\space.dm"
|
||||
#include "code\game\verbs\atom_verbs.dm"
|
||||
#include "code\game\verbs\ooc.dm"
|
||||
#include "code\game\verbs\sound.dm"
|
||||
#include "code\game\verbs\suicide.dm"
|
||||
@@ -875,6 +871,7 @@
|
||||
#include "code\modules\admin\verbs\mapping.dm"
|
||||
#include "code\modules\admin\verbs\massmodvar.dm"
|
||||
#include "code\modules\admin\verbs\modifyvariables.dm"
|
||||
#include "code\modules\admin\verbs\one_click_antag.dm"
|
||||
#include "code\modules\admin\verbs\onlyone.dm"
|
||||
#include "code\modules\admin\verbs\playsound.dm"
|
||||
#include "code\modules\admin\verbs\possess.dm"
|
||||
@@ -885,6 +882,7 @@
|
||||
#include "code\modules\admin\verbs\ticklag.dm"
|
||||
#include "code\modules\admin\verbs\tripAI.dm"
|
||||
#include "code\modules\assembly\assembly.dm"
|
||||
#include "code\modules\assembly\bomb.dm"
|
||||
#include "code\modules\assembly\helpers.dm"
|
||||
#include "code\modules\assembly\holder.dm"
|
||||
#include "code\modules\assembly\igniter.dm"
|
||||
@@ -895,6 +893,7 @@
|
||||
#include "code\modules\assembly\timer.dm"
|
||||
#include "code\modules\awaymissions\gateway.dm"
|
||||
#include "code\modules\awaymissions\loot.dm"
|
||||
#include "code\modules\awaymissions\pamphlet.dm"
|
||||
#include "code\modules\awaymissions\trigger.dm"
|
||||
#include "code\modules\awaymissions\zlevel.dm"
|
||||
#include "code\modules\awaymissions\maploader\dmm_suite.dm"
|
||||
@@ -948,14 +947,11 @@
|
||||
#include "code\modules\clothing\under\jobs\engineering.dm"
|
||||
#include "code\modules\clothing\under\jobs\medsci.dm"
|
||||
#include "code\modules\clothing\under\jobs\security.dm"
|
||||
#include "code\modules\clothing\uniforms\lawyer.dm"
|
||||
#include "code\modules\critters\critter.dm"
|
||||
#include "code\modules\critters\critter_AI.dm"
|
||||
#include "code\modules\critters\critter_defenses.dm"
|
||||
#include "code\modules\critters\critters.dm"
|
||||
#include "code\modules\critters\hivebots\hivebot.dm"
|
||||
#include "code\modules\customitems\item_defines.dm"
|
||||
#include "code\modules\customitems\item_spawning.dm"
|
||||
#include "code\modules\DetectiveWork\detective_work.dm"
|
||||
#include "code\modules\DetectiveWork\evidence.dm"
|
||||
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
|
||||
@@ -996,6 +992,7 @@
|
||||
#include "code\modules\mob\update_icons.dm"
|
||||
#include "code\modules\mob\dead\death.dm"
|
||||
#include "code\modules\mob\dead\observer\hud.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"
|
||||
@@ -1009,7 +1006,6 @@
|
||||
#include "code\modules\mob\living\blob\blob.dm"
|
||||
#include "code\modules\mob\living\carbon\carbon.dm"
|
||||
#include "code\modules\mob\living\carbon\carbon_defines.dm"
|
||||
#include "code\modules\mob\living\carbon\give.dm"
|
||||
#include "code\modules\mob\living\carbon\alien\alien.dm"
|
||||
#include "code\modules\mob\living\carbon\alien\death.dm"
|
||||
#include "code\modules\mob\living\carbon\alien\login.dm"
|
||||
@@ -1133,6 +1129,7 @@
|
||||
#include "code\modules\mob\living\simple_animal\behemoth.dm"
|
||||
#include "code\modules\mob\living\simple_animal\carp.dm"
|
||||
#include "code\modules\mob\living\simple_animal\cat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\clown.dm"
|
||||
#include "code\modules\mob\living\simple_animal\constructs.dm"
|
||||
#include "code\modules\mob\living\simple_animal\corgi.dm"
|
||||
#include "code\modules\mob\living\simple_animal\crab.dm"
|
||||
@@ -1154,8 +1151,6 @@
|
||||
#include "code\modules\mob\new_player\savefile.dm"
|
||||
#include "code\modules\mob\new_player\skill.dm"
|
||||
#include "code\modules\mob\new_player\sprite_accessories.dm"
|
||||
#include "code\modules\mob\organ\organ.dm"
|
||||
#include "code\modules\mob\organ\organ_external.dm"
|
||||
#include "code\modules\paperwork\clipboard.dm"
|
||||
#include "code\modules\paperwork\filingcabinet.dm"
|
||||
#include "code\modules\paperwork\folders.dm"
|
||||
@@ -1308,6 +1303,7 @@
|
||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||
#include "code\ZAS\Airflow.dm"
|
||||
#include "code\ZAS\Connection.dm"
|
||||
#include "code\ZAS\Debug.dm"
|
||||
#include "code\ZAS\FEA_gas_mixture.dm"
|
||||
#include "code\ZAS\FEA_system.dm"
|
||||
#include "code\ZAS\Fire.dm"
|
||||
@@ -1316,6 +1312,7 @@
|
||||
#include "code\ZAS\Variable Settings.dm"
|
||||
#include "code\ZAS\ZAS_Turfs.dm"
|
||||
#include "code\ZAS\ZAS_Zones.dm"
|
||||
#include "interface\interface.dm"
|
||||
#include "interface\skin.dmf"
|
||||
#include "maps\tgstation.2.0.9.dmm"
|
||||
// END_INCLUDE
|
||||
|
||||
@@ -81,7 +81,8 @@ datum/air_group
|
||||
turf/process_group()
|
||||
current_cycle = air_master.current_cycle
|
||||
if(!group_processing) //Revert to individual processing then end
|
||||
for(var/turf/simulated/member in members)
|
||||
for(var/T in members)
|
||||
var/turf/simulated/member = T
|
||||
member.process_cell()
|
||||
return
|
||||
|
||||
@@ -204,12 +205,14 @@ datum/air_group
|
||||
suspend_group_processing()
|
||||
else
|
||||
if(air.check_tile_graphic())
|
||||
for(var/turf/simulated/member in members)
|
||||
for(var/T in members)
|
||||
var/turf/simulated/member = T
|
||||
member.update_visuals(air)
|
||||
|
||||
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
for(var/turf/simulated/member in members)
|
||||
for(var/T in members)
|
||||
var/turf/simulated/member = T
|
||||
member.hotspot_expose(air.temperature, CELL_VOLUME)
|
||||
member.consider_superconductivity(starting=1)
|
||||
|
||||
|
||||
@@ -163,7 +163,8 @@ What are the archived variables for?
|
||||
else
|
||||
burned_fuel = fuel_store.moles
|
||||
oxygen -= fuel_store.moles
|
||||
del(fuel_store)
|
||||
trace_gases -= fuel_store
|
||||
fuel_store = null
|
||||
|
||||
energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel
|
||||
carbon_dioxide += burned_fuel
|
||||
|
||||
@@ -154,17 +154,10 @@ datum
|
||||
for(var/turf/simulated/S in world)
|
||||
if(!S.blocks_air && !S.parent && S.z < 5) // Added last check to force skipping asteroid z-levels -- TLE
|
||||
assemble_group_turf(S)
|
||||
for(var/turf/simulated/S in world) //Update all pathing and border information as well
|
||||
if(S.z > 4) // Skipping asteroids -- TLE
|
||||
continue
|
||||
S.update_air_properties()
|
||||
/*
|
||||
for(var/obj/movable/floor/S in world)
|
||||
if(!S.parent)
|
||||
assemble_group_object(S)
|
||||
for(var/obj/movable/floor/S in world) //Update all pathing and border information as well
|
||||
S.update_air_properties()
|
||||
*/
|
||||
|
||||
world << "\red \b Geometry processed in [(world.timeofday-start_time)/10] seconds!"
|
||||
|
||||
assemble_group_turf(turf/simulated/base)
|
||||
@@ -284,7 +277,8 @@ datum
|
||||
return 1
|
||||
|
||||
process_update_tiles()
|
||||
for(var/turf/simulated/T in tiles_to_update)
|
||||
for(var/turf in tiles_to_update)
|
||||
var/turf/simulated/T = turf
|
||||
T.update_air_properties()
|
||||
/*
|
||||
for(var/obj/movable/floor/O in tiles_to_update)
|
||||
@@ -296,7 +290,8 @@ datum
|
||||
var/turf/list/turfs = list()
|
||||
|
||||
for(var/datum/air_group/turf/turf_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members
|
||||
for(var/turf/simulated/T in turf_AG.members)
|
||||
for(var/turf in turf_AG.members)
|
||||
var/turf/simulated/T = turf
|
||||
T.parent = null
|
||||
turfs += T
|
||||
del(turf_AG)
|
||||
@@ -309,7 +304,7 @@ datum
|
||||
|
||||
// var/obj/movable/list/movable_objects = list()
|
||||
|
||||
for(var/datum/air_group/object/object_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members
|
||||
// for(var/datum/air_group/object/object_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members
|
||||
/*
|
||||
for(var/obj/movable/floor/OM in object_AG.members)
|
||||
OM.parent = null
|
||||
|
||||
@@ -499,10 +499,12 @@ turf
|
||||
mimic_temperature_solid(neighbor, neighbor.thermal_conductivity)
|
||||
|
||||
//Radiate excess tile heat to space
|
||||
var/turf/space/sample_space = locate(/turf/space)
|
||||
if(sample_space && (temperature > T0C))
|
||||
//Considering 0 degC as te break even point for radiation in and out
|
||||
mimic_temperature_solid(sample_space, FLOOR_HEAT_TRANSFER_COEFFICIENT)
|
||||
if(temperature > T0C)
|
||||
// Is there a pre-defined Space Tile?
|
||||
if(!Space_Tile)
|
||||
Space_Tile = locate(/turf/space) // Define one
|
||||
//Considering 0 degC as te break even point for radiation in and out
|
||||
mimic_temperature_solid(Space_Tile, FLOOR_HEAT_TRANSFER_COEFFICIENT)
|
||||
|
||||
//Conduct with air on my tile if I have it
|
||||
if(air)
|
||||
|
||||
@@ -274,11 +274,11 @@ area
|
||||
if(!src) return
|
||||
if(light < 0)
|
||||
light = 0
|
||||
luminosity = 0
|
||||
// luminosity = 0
|
||||
else
|
||||
if(light > lighting_controller.lighting_states)
|
||||
light = lighting_controller.lighting_states
|
||||
luminosity = 1
|
||||
// luminosity = 1
|
||||
|
||||
if(lighting_overlay)
|
||||
overlays -= lighting_overlay
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
var/allow_admin_jump = 1 // allows admin jumping
|
||||
var/allow_admin_spawning = 1 // allows admin item spawning
|
||||
var/allow_admin_rev = 1 // allows admin revives
|
||||
var/vote_delay = 600 // minimum time between voting sessions (seconds, 10 minute default)
|
||||
var/vote_period = 60 // length of voting period (seconds, default 1 minute)
|
||||
var/vote_delay = 6000 // minimum time between voting sessions (deciseconds, 10 minute default)
|
||||
var/vote_period = 600 // length of voting period (deciseconds, default 1 minute)
|
||||
var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
|
||||
var/vote_no_dead = 0 // dead people can't vote (tbi)
|
||||
// var/enable_authentication = 0 // goon authentication
|
||||
@@ -74,6 +74,12 @@
|
||||
var/health_threshold_crit = 0
|
||||
var/health_threshold_dead = -100
|
||||
|
||||
var/organ_health_multiplier = 1
|
||||
var/organ_regeneration_multiplier = 1
|
||||
|
||||
var/bones_can_break = 0
|
||||
var/limbs_can_break = 0
|
||||
|
||||
var/revival_pod_plants = 1
|
||||
var/revival_cloning = 1
|
||||
var/revival_brain_life = -1
|
||||
@@ -371,6 +377,14 @@
|
||||
config.metroid_delay = value
|
||||
if("animal_delay")
|
||||
config.animal_delay = value
|
||||
if("organ_health_multiplier")
|
||||
config.organ_health_multiplier = value / 100
|
||||
if("organ_regeneration_multiplier")
|
||||
config.organ_regeneration_multiplier = value / 100
|
||||
if("bones_can_break")
|
||||
config.bones_can_break = value
|
||||
if("limbs_can_break")
|
||||
config.limbs_can_break = value
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
|
||||
72
code/controllers/failsafe.dm
Normal file
72
code/controllers/failsafe.dm
Normal file
@@ -0,0 +1,72 @@
|
||||
var/datum/controller/failsafe/Failsafe
|
||||
|
||||
/datum/controller/failsafe // This thing pretty much just keeps poking the master controller
|
||||
var/processing = 0
|
||||
var/processing_interval = 100 //poke the MC every 10 seconds
|
||||
|
||||
var/MC_iteration = 0
|
||||
var/MC_defcon = 0 //alert level. For every poke that fails this is raised by 1. When it reaches 5 the MC is replaced with a new one. (effectively killing any master_controller.process() and starting a new one)
|
||||
|
||||
var/lighting_iteration = 0
|
||||
var/lighting_defcon = 0 //alert level for lighting controller.
|
||||
|
||||
/datum/controller/failsafe/New()
|
||||
//There can be only one failsafe. Out with the old in with the new (that way we can restart the Failsafe by spawning a new one)
|
||||
if(Failsafe != src)
|
||||
if(istype(Failsafe))
|
||||
del(Failsafe)
|
||||
Failsafe = src
|
||||
Failsafe.process()
|
||||
|
||||
|
||||
/datum/controller/failsafe/proc/process()
|
||||
processing = 1
|
||||
spawn(0)
|
||||
set background = 1
|
||||
while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop
|
||||
if(!master_controller) new /datum/controller/game_controller() //replace the missing master_controller! This should never happen.
|
||||
if(!lighting_controller) new /datum/controller/lighting() //replace the missing lighting_controller
|
||||
|
||||
if(processing)
|
||||
if(master_controller.processing) //only poke if these overrides aren't in effect
|
||||
if(MC_iteration == controller_iteration) //master_controller hasn't finished processing in the defined interval
|
||||
switch(MC_defcon)
|
||||
if(0 to 3)
|
||||
MC_defcon++
|
||||
if(4)
|
||||
for(var/client/C in admin_list)
|
||||
C << "<font color='red' size='2'><b>Warning. The Master Controller has not fired in the last [MC_defcon*processing_interval] ticks. Automatic restart in [processing_interval] ticks.</b></font>"
|
||||
MC_defcon = 5
|
||||
if(5)
|
||||
for(var/client/C in admin_list)
|
||||
C << "<font color='red' size='2'><b>Warning. The Master Controller has still not fired within the last [MC_defcon*processing_interval] ticks. Killing and restarting...</b></font>"
|
||||
new /datum/controller/game_controller() //replace the old master_controller (hence killing the old one's process)
|
||||
master_controller.process() //Start it rolling again
|
||||
MC_defcon = 0
|
||||
else
|
||||
MC_defcon = 0
|
||||
MC_iteration = controller_iteration
|
||||
|
||||
if(lighting_controller.processing)
|
||||
if(lighting_iteration == lighting_controller.iteration) //master_controller hasn't finished processing in the defined interval
|
||||
switch(lighting_defcon)
|
||||
if(0 to 3)
|
||||
lighting_defcon++
|
||||
if(4)
|
||||
for(var/client/C in admin_list)
|
||||
C << "<font color='red' size='2'><b>Warning. The Lighting Controller has not fired in the last [lighting_defcon*processing_interval] ticks. Automatic restart in [processing_interval] ticks.</b></font>"
|
||||
lighting_defcon = 5
|
||||
if(5)
|
||||
for(var/client/C in admin_list)
|
||||
C << "<font color='red' size='2'><b>Warning. The Lighting Controller has still not fired within the last [lighting_defcon*processing_interval] ticks. Killing and restarting...</b></font>"
|
||||
new /datum/controller/lighting() //replace the old lighting_controller (hence killing the old one's process)
|
||||
lighting_controller.process() //Start it rolling again
|
||||
lighting_defcon = 0
|
||||
else
|
||||
lighting_defcon = 0
|
||||
lighting_iteration = lighting_controller.iteration
|
||||
else
|
||||
MC_defcon = 0
|
||||
lighting_defcon = 0
|
||||
|
||||
sleep(processing_interval)
|
||||
@@ -3,7 +3,6 @@
|
||||
//WIP, needs lots of work still
|
||||
|
||||
var/global/datum/controller/game_controller/master_controller //Set in world.New()
|
||||
var/global/datum/failsafe/Failsafe
|
||||
|
||||
var/global/controller_iteration = 0
|
||||
var/global/last_tick_timeofday = world.timeofday
|
||||
@@ -30,11 +29,13 @@ datum/controller/game_controller
|
||||
datum/controller/game_controller/New()
|
||||
//There can be only one master_controller. Out with the old and in with the new.
|
||||
if(master_controller != src)
|
||||
if(istype(master_controller,/datum/controller/game_controller))
|
||||
if(istype(master_controller))
|
||||
Recover()
|
||||
del(master_controller)
|
||||
master_controller = src
|
||||
|
||||
createRandomZlevel()
|
||||
|
||||
if(!air_master)
|
||||
air_master = new /datum/controller/air_system()
|
||||
air_master.setup()
|
||||
@@ -54,7 +55,6 @@ datum/controller/game_controller/New()
|
||||
datum/controller/game_controller/proc/setup()
|
||||
world.tick_lag = config.Ticklag
|
||||
|
||||
createRandomZlevel()
|
||||
setup_objects()
|
||||
setupgenetics()
|
||||
setupfactions()
|
||||
@@ -96,7 +96,7 @@ datum/controller/game_controller/proc/process()
|
||||
spawn(0)
|
||||
set background = 1
|
||||
while(1) //far more efficient than recursively calling ourself
|
||||
if(!Failsafe) new /datum/failsafe()
|
||||
if(!Failsafe) new /datum/controller/failsafe()
|
||||
|
||||
var/currenttime = world.timeofday
|
||||
last_tick_duration = (currenttime - last_tick_timeofday) / 10
|
||||
@@ -107,6 +107,8 @@ datum/controller/game_controller/proc/process()
|
||||
var/start_time = world.timeofday
|
||||
controller_iteration++
|
||||
|
||||
vote.process()
|
||||
|
||||
//AIR
|
||||
/*timer = world.timeofday
|
||||
last_thing_processed = air_master.type
|
||||
@@ -266,65 +268,3 @@ datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
|
||||
msg += "\t [varname] = [varval]\n"
|
||||
world.log << msg
|
||||
|
||||
/datum/failsafe // This thing pretty much just keeps poking the master controller
|
||||
var/spinning = 1
|
||||
var/current_iteration = 0
|
||||
var/ticks_per_spin = 100 //poke the MC every 10 seconds
|
||||
var/defcon = 0 //alert level. For every poke that fails this is raised by 1. When it reaches 5 the MC is replaced with a new one. (effectively killing any master_controller.process() and starting a new one)
|
||||
|
||||
/datum/failsafe/New()
|
||||
//There can be only one failsafe. Out with the old in with the new (that way we can restart the Failsafe by spawning a new one)
|
||||
if(Failsafe && (Failsafe != src))
|
||||
del(Failsafe)
|
||||
Failsafe = src
|
||||
|
||||
current_iteration = controller_iteration
|
||||
Failsafe.spin()
|
||||
|
||||
|
||||
/datum/failsafe/proc/spin()
|
||||
spawn(0)
|
||||
set background = 1
|
||||
while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop
|
||||
if(master_controller)
|
||||
if(spinning && master_controller.processing) //only poke if these overrides aren't in effect
|
||||
if(current_iteration == controller_iteration) //master_controller hasn't finished processing in the defined interval
|
||||
switch(defcon)
|
||||
if(0 to 3)
|
||||
defcon++
|
||||
if(4)
|
||||
for(var/client/C in admin_list)
|
||||
if(C.holder)
|
||||
C << "<font color='red' size='2'><b>Warning. The Master Controller has not fired in the last [defcon*ticks_per_spin] ticks. Automatic restart in [ticks_per_spin] ticks.</b></font>"
|
||||
defcon = 5
|
||||
if(5)
|
||||
for(var/client/C in admin_list)
|
||||
if(C.holder)
|
||||
C << "<font color='red' size='2'><b>Warning. The Master Controller has still not fired within the last [defcon*ticks_per_spin] ticks. Killing and restarting...</b></font>"
|
||||
new /datum/controller/game_controller() //replace the old master_controller (hence killing the old one's process)
|
||||
master_controller.process() //Start it rolling again
|
||||
defcon = 0
|
||||
else
|
||||
defcon = 0
|
||||
current_iteration = controller_iteration
|
||||
else
|
||||
defcon = 0
|
||||
else
|
||||
new /datum/controller/game_controller() //replace the missing master_controller! This should never happen.
|
||||
sleep(ticks_per_spin)
|
||||
|
||||
//DEBUG VERBS
|
||||
/*
|
||||
/client/verb/spawn_MC()
|
||||
new /datum/controller/game_controller()
|
||||
|
||||
|
||||
/client/verb/spawn_FS()
|
||||
new /datum/failsafe()
|
||||
|
||||
/client/verb/machines_list()
|
||||
for(var/i=1,i<=machines.len,i++)
|
||||
var/machine = machines[i]
|
||||
if(istype(machine,/datum)) world.log << machine:type
|
||||
else world.log << machine
|
||||
*/
|
||||
@@ -1,7 +1,7 @@
|
||||
//TODO: rewrite and standardise all controller datums to the datum/controller type
|
||||
//TODO: allow all controllers to be deleted for clean restarts (see WIP master controller stuff) - MC done - lighting done
|
||||
|
||||
/client/proc/restart_controller(controller in list("Master","Lighting","Supply Shuttle"))
|
||||
/client/proc/restart_controller(controller in list("Master","Failsafe","Lighting","Supply Shuttle"))
|
||||
set category = "Debug"
|
||||
set name = "Restart Controller"
|
||||
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -14,6 +14,9 @@
|
||||
new /datum/controller/game_controller()
|
||||
master_controller.process()
|
||||
feedback_add_details("admin_verb","RMC")
|
||||
if("Failsafe")
|
||||
new /datum/controller/failsafe()
|
||||
feedback_add_details("admin_verb","RFailsafe")
|
||||
if("Lighting")
|
||||
new /datum/controller/lighting()
|
||||
lighting_controller.process()
|
||||
@@ -25,7 +28,7 @@
|
||||
return
|
||||
|
||||
|
||||
/client/proc/debug_controller(controller in list("Master","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply Shuttle","Emergency Shuttle","Configuration","pAI"))
|
||||
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply Shuttle","Emergency Shuttle","Configuration","pAI"))
|
||||
set category = "Debug"
|
||||
set name = "Debug Controller"
|
||||
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -35,6 +38,9 @@
|
||||
if("Master")
|
||||
debug_variables(master_controller)
|
||||
feedback_add_details("admin_verb","DMC")
|
||||
if("Failsafe")
|
||||
debug_variables(Failsafe)
|
||||
feedback_add_details("admin_verb","DFailsafe")
|
||||
if("Ticker")
|
||||
debug_variables(ticker)
|
||||
feedback_add_details("admin_verb","DTicker")
|
||||
|
||||
233
code/controllers/voting.dm
Normal file
233
code/controllers/voting.dm
Normal file
@@ -0,0 +1,233 @@
|
||||
var/datum/controller/vote/vote = new()
|
||||
|
||||
datum/controller/vote
|
||||
var/initiator = null
|
||||
var/started_timeofday = null
|
||||
var/time_remaining = 0
|
||||
var/mode = null
|
||||
var/question = null
|
||||
var/list/choices = list()
|
||||
var/list/voted = list()
|
||||
var/list/voting = list()
|
||||
|
||||
New()
|
||||
if(vote != src)
|
||||
if(istype(vote))
|
||||
del(vote)
|
||||
vote = src
|
||||
|
||||
proc/process() //called by master_controller
|
||||
if(mode)
|
||||
time_remaining = started_timeofday + config.vote_period
|
||||
if(world.timeofday < started_timeofday)
|
||||
time_remaining -= 864000
|
||||
time_remaining = round((time_remaining - world.timeofday)/10)
|
||||
|
||||
var/i=1
|
||||
if(time_remaining < 0)
|
||||
result()
|
||||
while(i<=voting.len)
|
||||
var/client/C = voting[i]
|
||||
if(C)
|
||||
C << browse(null,"window=vote;can_close=0")
|
||||
i++
|
||||
reset()
|
||||
else
|
||||
while(i<=voting.len)
|
||||
var/client/C = voting[i]
|
||||
if(C)
|
||||
C << browse(vote.interface(C),"window=vote;can_close=0")
|
||||
i++
|
||||
else
|
||||
voting.Cut(i,i+1)
|
||||
|
||||
proc/reset()
|
||||
initiator = null
|
||||
time_remaining = 0
|
||||
mode = null
|
||||
question = null
|
||||
choices.Cut()
|
||||
voted.Cut()
|
||||
voting.Cut()
|
||||
|
||||
proc/get_result()
|
||||
//get the highest number of votes
|
||||
var/greatest_votes = 0
|
||||
for(var/option in choices)
|
||||
var/votes = choices[option]
|
||||
if(votes > greatest_votes)
|
||||
greatest_votes = votes
|
||||
//get all options with that many votes and return them in a list
|
||||
. = list()
|
||||
if(greatest_votes)
|
||||
for(var/option in choices)
|
||||
if(choices[option] == greatest_votes)
|
||||
. += option
|
||||
return .
|
||||
|
||||
proc/announce_result()
|
||||
var/list/winners = get_result()
|
||||
var/text
|
||||
if(winners.len > 0)
|
||||
if(winners.len > 1)
|
||||
text = "<b>Vote Tied Between:</b>\n"
|
||||
for(var/option in winners)
|
||||
text += "\t[option]\n"
|
||||
. = pick(winners)
|
||||
text += "<b>Vote Result: [.]</b>"
|
||||
else
|
||||
text += "<b>Vote Result: Inconclusive - No Votes!</b>"
|
||||
log_vote(text)
|
||||
world << "<font color='purple'>[text]</font>"
|
||||
return .
|
||||
|
||||
proc/result()
|
||||
. = announce_result()
|
||||
var/restart = 0
|
||||
if(.)
|
||||
switch(mode)
|
||||
if("restart")
|
||||
if(. == "Restart Round")
|
||||
restart = 1
|
||||
if("gamemode")
|
||||
if(master_mode != .)
|
||||
world.save_mode(.)
|
||||
if(ticker && ticker.mode)
|
||||
restart = 1
|
||||
else
|
||||
master_mode = .
|
||||
|
||||
if(restart)
|
||||
world << "World restarting due to vote..."
|
||||
feedback_set_details("end_error","restart vote")
|
||||
if(blackbox) blackbox.save_all_data_to_sql()
|
||||
sleep(50)
|
||||
log_game("Rebooting due to restart vote")
|
||||
world.Reboot()
|
||||
|
||||
return .
|
||||
|
||||
proc/submit_vote(var/vote)
|
||||
if(mode)
|
||||
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
|
||||
return 0
|
||||
if(!(usr.ckey in voted))
|
||||
if(vote && 1<=vote && vote<=choices.len)
|
||||
voted += usr.ckey
|
||||
choices[choices[vote]]++ //check this
|
||||
return vote
|
||||
return 0
|
||||
|
||||
proc/initiate_vote(var/vote_type, var/initiator_key)
|
||||
if(!mode)
|
||||
if(started_timeofday != null)
|
||||
var/next_allowed_timeofday = (started_timeofday + config.vote_delay)
|
||||
if(world.timeofday < started_timeofday)
|
||||
next_allowed_timeofday -= 864000
|
||||
if(next_allowed_timeofday > world.timeofday)
|
||||
return 0
|
||||
|
||||
reset()
|
||||
switch(vote_type)
|
||||
if("restart") choices.Add("Restart Round","Continue Playing")
|
||||
if("gamemode") choices.Add(config.votable_modes)
|
||||
if("custom")
|
||||
question = html_encode(input(usr,"What is the vote for?") as text|null)
|
||||
if(!question) return 0
|
||||
for(var/i=1,i<=10,i++)
|
||||
var/option = capitalize(html_encode(input(usr,"Please enter an option or hit cancel to finish") as text|null))
|
||||
if(!option || mode || !usr.client) break
|
||||
choices.Add(option)
|
||||
else return 0
|
||||
mode = vote_type
|
||||
initiator = initiator_key
|
||||
started_timeofday = world.timeofday
|
||||
var/text = "[capitalize(mode)] vote started by [initiator]."
|
||||
log_vote(text)
|
||||
world << "<font color='purple'><b>[text]</b>\nType vote to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>"
|
||||
time_remaining = round(config.vote_period/10)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/interface(var/client/C)
|
||||
if(!C) return
|
||||
var/admin = 0
|
||||
if(C.holder)
|
||||
admin = 1
|
||||
voting |= C
|
||||
|
||||
. = "<html><head><title>Voting Panel</title></head><body>"
|
||||
if(mode)
|
||||
if(question) . += "<h2>Vote: '[question]'</h2>"
|
||||
else . += "<h2>Vote: [capitalize(mode)]</h2>"
|
||||
. += "Time Left: [time_remaining] s<hr><ul>"
|
||||
for(var/i=1,i<=choices.len,i++)
|
||||
var/votes = choices[choices[i]]
|
||||
if(!votes) votes = 0
|
||||
. += "<li><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a> ([votes] votes)</li>"
|
||||
. += "</ul><hr>"
|
||||
if(admin)
|
||||
. += "(<a href='?src=\ref[src];vote=cancel'>Cancel Vote</a>) "
|
||||
else
|
||||
. += "<h2>Start a vote:</h2><hr><ul><li>"
|
||||
//restart
|
||||
if(admin || config.allow_vote_restart)
|
||||
. += "<a href='?src=\ref[src];vote=restart'>Restart</a>"
|
||||
else
|
||||
. += "<font color='grey'>Restart (Disallowed)</font>"
|
||||
if(admin)
|
||||
. += "\t(<a href='?src=\ref[src];vote=toggle_restart'>[config.allow_vote_restart?"Allowed":"Disallowed"]</a>)"
|
||||
. += "</li><li>"
|
||||
//gamemode
|
||||
if(admin || config.allow_vote_mode)
|
||||
. += "<a href='?src=\ref[src];vote=gamemode'>GameMode</a>"
|
||||
else
|
||||
. += "<font color='grey'>GameMode (Disallowed)</font>"
|
||||
if(admin)
|
||||
. += "\t(<a href='?src=\ref[src];vote=toggle_gamemode'>[config.allow_vote_mode?"Allowed":"Disallowed"]</a>)"
|
||||
|
||||
. += "</li>"
|
||||
//custom
|
||||
if(admin)
|
||||
. += "<li><a href='?src=\ref[src];vote=custom'>Custom</a></li>"
|
||||
. += "</ul><hr>"
|
||||
. += "<a href='?src=\ref[src];vote=close' style='position:absolute;right:50px'>Close</a></body></html>"
|
||||
return .
|
||||
|
||||
|
||||
Topic(href,href_list[],hsrc)
|
||||
if(!usr || !usr.client) return //not necessary but meh...just in-case somebody does something stupid
|
||||
switch(href_list["vote"])
|
||||
if("close")
|
||||
voting -= usr.ckey
|
||||
usr << browse(null, "window=vote")
|
||||
return
|
||||
if("cancel")
|
||||
if(usr.client.holder)
|
||||
reset()
|
||||
if("toggle_restart")
|
||||
if(usr.client.holder)
|
||||
config.allow_vote_restart = !config.allow_vote_restart
|
||||
if("toggle_gamemode")
|
||||
if(usr.client.holder)
|
||||
config.allow_vote_mode = !config.allow_vote_mode
|
||||
if("restart")
|
||||
if(config.allow_vote_restart || usr.client.holder)
|
||||
initiate_vote("restart",usr.key)
|
||||
if("gamemode")
|
||||
if(config.allow_vote_mode || usr.client.holder)
|
||||
initiate_vote("gamemode",usr.key)
|
||||
if("custom")
|
||||
if(usr.client.holder)
|
||||
initiate_vote("custom",usr.key)
|
||||
else
|
||||
submit_vote(round(text2num(href_list["vote"])))
|
||||
usr.vote()
|
||||
|
||||
|
||||
/mob/verb/vote()
|
||||
set category = "OOC"
|
||||
set name = "Vote"
|
||||
|
||||
if(vote)
|
||||
src << browse(vote.interface(client),"window=vote;can_close=0")
|
||||
@@ -168,4 +168,6 @@
|
||||
else
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
return 0
|
||||
if(destination.z > 7)
|
||||
return 0
|
||||
return 1
|
||||
@@ -651,10 +651,10 @@ datum/mind
|
||||
if( !changeling || !changeling.absorbed_dna.len )
|
||||
usr << "\red Resetting DNA failed!"
|
||||
else
|
||||
usr.dna = changeling.absorbed_dna[changeling.absorbed_dna[1]]
|
||||
usr.real_name = changeling.absorbed_dna[1]
|
||||
updateappearance(usr, usr.dna.uni_identity)
|
||||
domutcheck(usr, null)
|
||||
current.dna = changeling.absorbed_dna[1]
|
||||
current.real_name = current.dna.real_name
|
||||
updateappearance(current, current.dna.uni_identity)
|
||||
domutcheck(current, null)
|
||||
|
||||
else if (href_list["nuclear"])
|
||||
switch(href_list["nuclear"])
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/datum/organ
|
||||
var/name = "organ"
|
||||
var/mob/owner = null
|
||||
var/mob/living/carbon/human/owner = null
|
||||
|
||||
///datum/organ/proc/process()
|
||||
// return 0
|
||||
@@ -10,5 +8,8 @@
|
||||
///datum/organ/proc/receive_chem(chemical as obj)
|
||||
// return 0
|
||||
|
||||
proc/process()
|
||||
return 0
|
||||
|
||||
|
||||
proc/receive_chem(chemical as obj)
|
||||
return 0
|
||||
661
code/datums/organs/organ_external.dm
Normal file
661
code/datums/organs/organ_external.dm
Normal file
@@ -0,0 +1,661 @@
|
||||
/****************************************************
|
||||
EXTERNAL ORGANS
|
||||
****************************************************/
|
||||
/datum/organ/external
|
||||
name = "external"
|
||||
var/icon_name = null
|
||||
var/body_part = null
|
||||
|
||||
var/damage_state = "00"
|
||||
var/brute_dam = 0
|
||||
var/burn_dam = 0
|
||||
var/max_damage = 0
|
||||
var/max_size = 0
|
||||
var/tmp/list/obj/item/weapon/implant/implant
|
||||
|
||||
var/display_name
|
||||
var/list/wounds = list()
|
||||
var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len!
|
||||
|
||||
var/tmp/perma_injury = 0
|
||||
var/tmp/perma_dmg = 0
|
||||
var/tmp/destspawn = 0 //Has it spawned the broken limb?
|
||||
var/tmp/amputated = 0 // Whether this has been cleanly amputated, thus causing no pain
|
||||
var/min_broken_damage = 30
|
||||
|
||||
var/datum/organ/external/parent
|
||||
var/list/datum/organ/external/children
|
||||
|
||||
var/damage_msg = "\red You feel an intense pain"
|
||||
|
||||
var/status = 0
|
||||
var/broken_description
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
|
||||
proc/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
|
||||
// TODO: this proc needs to be rewritten toa not update damages directly
|
||||
if((brute <= 0) && (burn <= 0))
|
||||
return 0
|
||||
if(status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
if(status & ORGAN_ROBOT)
|
||||
brute *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
burn *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
|
||||
//if(owner && !(status & ORGAN_ROBOT))
|
||||
// owner.pain(display_name, (brute+burn)*3, 1, burn > brute)
|
||||
|
||||
if(sharp)
|
||||
var/nux = brute * rand(10,15)
|
||||
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
|
||||
if(prob(5 * brute))
|
||||
status |= ORGAN_DESTROYED
|
||||
droplimb()
|
||||
return
|
||||
|
||||
else if(prob(nux))
|
||||
createwound( CUT, brute )
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
owner << "You feel something wet on your [display_name]"
|
||||
|
||||
else if(brute > 20)
|
||||
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
|
||||
if(prob(5 * brute))
|
||||
status |= ORGAN_DESTROYED
|
||||
droplimb()
|
||||
return
|
||||
|
||||
// If the limbs can break, make sure we don't exceed the maximum damage a limb can take before breaking
|
||||
if((brute_dam + burn_dam + brute + burn) < max_damage || !config.limbs_can_break)
|
||||
if(brute)
|
||||
brute_dam += brute
|
||||
if( (prob(brute*2) && !sharp) || sharp )
|
||||
createwound( CUT, brute )
|
||||
else if(!sharp)
|
||||
createwound( BRUISE, brute )
|
||||
if(burn)
|
||||
burn_dam += burn
|
||||
createwound( BURN, burn )
|
||||
else
|
||||
var/can_inflict = max_damage * config.organ_health_multiplier - (brute_dam + burn_dam) //How much damage can we actually cause?
|
||||
if(can_inflict)
|
||||
if (brute > 0 && burn > 0)
|
||||
brute = can_inflict/2
|
||||
burn = can_inflict/2
|
||||
var/ratio = brute / (brute + burn)
|
||||
brute_dam += ratio * can_inflict
|
||||
burn_dam += (1 - ratio) * can_inflict
|
||||
else
|
||||
if (brute > 0)
|
||||
brute = can_inflict
|
||||
brute_dam += brute
|
||||
createwound(BRUISE, brute)
|
||||
else
|
||||
burn = can_inflict
|
||||
burn_dam += burn
|
||||
createwound(BRUISE, brute)
|
||||
else if(!(status & ORGAN_ROBOT))
|
||||
var/passed_dam = (brute + burn) - can_inflict //Getting how much overdamage we have.
|
||||
var/list/datum/organ/external/possible_points = list()
|
||||
if(parent)
|
||||
possible_points += parent
|
||||
if(children)
|
||||
possible_points += children
|
||||
if(forbidden_limbs.len)
|
||||
possible_points -= forbidden_limbs
|
||||
if(!possible_points.len)
|
||||
message_admins("Oh god WHAT! [owner]'s [src] was unable to find an organ to pass overdamage too!")
|
||||
else
|
||||
var/datum/organ/external/target = pick(possible_points)
|
||||
if(brute)
|
||||
target.take_damage(passed_dam, 0, sharp, used_weapon, forbidden_limbs + src)
|
||||
else
|
||||
target.take_damage(0, passed_dam, sharp, used_weapon, forbidden_limbs + src)
|
||||
else
|
||||
droplimb(1) //Robot limbs just kinda fail at full damage.
|
||||
|
||||
|
||||
if(status & ORGAN_BROKEN)
|
||||
owner.emote("scream")
|
||||
|
||||
owner.updatehealth()
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
|
||||
var/result = update_icon()
|
||||
return result
|
||||
|
||||
|
||||
|
||||
proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
|
||||
if(status & ORGAN_ROBOT && !robo_repair)
|
||||
return
|
||||
|
||||
// heal damage on the individual wounds
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(brute == 0 && burn == 0)
|
||||
break
|
||||
|
||||
// heal brute damage
|
||||
if(W.damage_type == CUT || W.damage_type == BRUISE)
|
||||
brute = W.heal_damage(brute)
|
||||
else if(W.damage_type == BURN)
|
||||
burn = W.heal_damage(burn)
|
||||
|
||||
// sync organ damage with wound damages
|
||||
update_damages()
|
||||
|
||||
if(internal)
|
||||
status &= ~ORGAN_BROKEN
|
||||
perma_injury = 0
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
|
||||
owner.updatehealth()
|
||||
var/result = update_icon()
|
||||
return result
|
||||
|
||||
proc/update_damages()
|
||||
number_wounds = 0
|
||||
brute_dam = 0
|
||||
burn_dam = 0
|
||||
status &= ~ORGAN_BLEEDING
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(W.damage_type == CUT || W.damage_type == BRUISE)
|
||||
brute_dam += W.damage
|
||||
else if(W.damage_type == BURN)
|
||||
burn_dam += W.damage
|
||||
|
||||
if(!W.bandaged && W.damage > 4)
|
||||
status |= ORGAN_BLEEDING
|
||||
|
||||
number_wounds += W.amount
|
||||
|
||||
proc/update_wounds()
|
||||
for(var/datum/wound/W in wounds)
|
||||
// wounds can disappear after 10 minutes at the earliest
|
||||
if(W.damage == 0 && W.created + 10 * 10 * 60 <= world.time)
|
||||
wounds -= W
|
||||
// let the GC handle the deletion of the wound
|
||||
if(W.is_treated())
|
||||
// slow healing
|
||||
var/amount = 0.2
|
||||
if(W.bandaged) amount++
|
||||
if(W.salved) amount++
|
||||
if(W.disinfected) amount++
|
||||
// amount of healing is spread over all the wounds
|
||||
W.heal_damage((amount * W.amount * config.organ_regeneration_multiplier) / (5*owner.number_wounds+1))
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
|
||||
|
||||
proc/get_damage() //returns total damage
|
||||
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
|
||||
|
||||
proc/get_damage_brute()
|
||||
return max(brute_dam+perma_injury, perma_injury)
|
||||
|
||||
proc/get_damage_fire()
|
||||
return burn_dam
|
||||
|
||||
process()
|
||||
// process wounds, doing healing etc., only do this every 4 ticks to save processing power
|
||||
if(owner.life_tick % 4 == 0)
|
||||
update_wounds()
|
||||
if(status & ORGAN_DESTROYED)
|
||||
if(!destspawn && config.limbs_can_break)
|
||||
droplimb()
|
||||
return
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
perma_dmg = 0
|
||||
if(parent)
|
||||
if(parent.status & ORGAN_DESTROYED)
|
||||
status |= ORGAN_DESTROYED
|
||||
owner.update_body(1)
|
||||
return
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
|
||||
owner.emote("scream")
|
||||
status |= ORGAN_BROKEN
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
perma_injury = brute_dam
|
||||
return
|
||||
|
||||
// new damage icon system
|
||||
// returns just the brute/burn damage code
|
||||
proc/damage_state_text()
|
||||
if(status & ORGAN_DESTROYED)
|
||||
return "--"
|
||||
|
||||
var/tburn = 0
|
||||
var/tbrute = 0
|
||||
|
||||
if(burn_dam ==0)
|
||||
tburn =0
|
||||
else if (burn_dam < (max_damage * 0.25 / 2))
|
||||
tburn = 1
|
||||
else if (burn_dam < (max_damage * 0.75 / 2))
|
||||
tburn = 2
|
||||
else
|
||||
tburn = 3
|
||||
|
||||
if (brute_dam == 0)
|
||||
tbrute = 0
|
||||
else if (brute_dam < (max_damage * 0.25 / 2))
|
||||
tbrute = 1
|
||||
else if (brute_dam < (max_damage * 0.75 / 2))
|
||||
tbrute = 2
|
||||
else
|
||||
tbrute = 3
|
||||
return "[tbrute][tburn]"
|
||||
|
||||
|
||||
// new damage icon system
|
||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||
proc/update_icon()
|
||||
var/n_is = damage_state_text()
|
||||
if (n_is != damage_state)
|
||||
damage_state = n_is
|
||||
owner.update_body(1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/droplimb(var/override = 0,var/no_explode = 0)
|
||||
if(override)
|
||||
status |= ORGAN_DESTROYED
|
||||
if(status & ORGAN_DESTROYED)
|
||||
if(status & ORGAN_SPLINTED)
|
||||
status &= ~ORGAN_SPLINTED
|
||||
if(implant)
|
||||
for(var/implants in implant)
|
||||
del(implants)
|
||||
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy")
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in owner.organs)
|
||||
if(O.parent == src)
|
||||
O.droplimb(1)
|
||||
|
||||
var/obj/item/weapon/organ/H
|
||||
switch(body_part)
|
||||
if(UPPER_TORSO)
|
||||
owner.gib()
|
||||
if(LOWER_TORSO)
|
||||
owner << "\red You are now sterile."
|
||||
if(HEAD)
|
||||
H = new /obj/item/weapon/organ/head(owner.loc, owner)
|
||||
if(ishuman(owner))
|
||||
if(owner.gender == FEMALE)
|
||||
H.icon_state = "head_f_l"
|
||||
H.overlays += owner.generate_head_icon()
|
||||
H:transfer_identity(owner)
|
||||
H.pixel_x = -10
|
||||
H.pixel_y = 6
|
||||
H.name = "[owner.real_name]'s head"
|
||||
|
||||
owner.u_equip(owner.glasses)
|
||||
owner.u_equip(owner.head)
|
||||
owner.u_equip(owner.ears)
|
||||
owner.u_equip(owner.wear_mask)
|
||||
|
||||
owner.regenerate_icons()
|
||||
|
||||
owner.death()
|
||||
if(ARM_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_arm(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_arm_l"
|
||||
if(ARM_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_arm(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_arm_l"
|
||||
if(LEG_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_leg(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_leg_l"
|
||||
if(LEG_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_leg(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_leg_l"
|
||||
if(HAND_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_hand(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_hand_l"
|
||||
owner.u_equip(owner.gloves)
|
||||
if(HAND_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_hand(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_hand_l"
|
||||
owner.u_equip(owner.gloves)
|
||||
if(FOOT_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_foot/(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_foot_l"
|
||||
owner.u_equip(owner.shoes)
|
||||
if(FOOT_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_foot(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_foot_l"
|
||||
owner.u_equip(owner.shoes)
|
||||
if(ismonkey(owner))
|
||||
H.icon = 'monkey.dmi'
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
destspawn = 1
|
||||
if(status & ORGAN_ROBOT)
|
||||
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
|
||||
"\red <b>Your [display_name] explodes!</b>",\
|
||||
"You hear an explosion followed by a scream!")
|
||||
if(!no_explode)
|
||||
explosion(get_turf(owner),-1,-1,2,3)
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
else
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
|
||||
// force the icon to rebuild
|
||||
owner.regenerate_icons()
|
||||
|
||||
proc/createwound(var/type = CUT, var/damage)
|
||||
if(hasorgans(owner))
|
||||
var/wound_type
|
||||
var/size = min( max( 1, damage/10 ) , 6)
|
||||
|
||||
// first check whether we can widen an existing wound
|
||||
if(wounds.len > 0 && prob(25))
|
||||
if((type == CUT || type == BRUISE) && damage >= 5)
|
||||
var/datum/wound/W = pick(wounds)
|
||||
if(W.amount == 1 && W.started_healing())
|
||||
W.open_wound()
|
||||
owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping voice.",\
|
||||
"\red The wound on your [display_name] widens with a nasty ripping voice.",\
|
||||
"You hear a nasty ripping noise, as if flesh is being torn apart.")
|
||||
|
||||
return
|
||||
|
||||
if(damage == 0) return
|
||||
|
||||
// the wound we will create
|
||||
var/datum/wound/W
|
||||
|
||||
switch(type)
|
||||
if(CUT)
|
||||
src.status |= ORGAN_BLEEDING
|
||||
var/list/size_names = list(/datum/wound/cut, /datum/wound/deep_cut, /datum/wound/flesh_wound, /datum/wound/gaping_wound, /datum/wound/big_gaping_wound, /datum/wound/massive_wound)
|
||||
wound_type = size_names[size]
|
||||
|
||||
W = new wound_type(damage)
|
||||
|
||||
if(BRUISE)
|
||||
var/list/size_names = list(/datum/wound/bruise/tiny_bruise, /datum/wound/bruise/small_bruise, /datum/wound/bruise/moderate_bruise, /datum/wound/bruise/large_bruise, /datum/wound/bruise/huge_bruise, /datum/wound/bruise/monumental_bruise)
|
||||
wound_type = size_names[size]
|
||||
|
||||
W = new wound_type(damage)
|
||||
if(BURN)
|
||||
var/list/size_names = list(/datum/wound/moderate_burn, /datum/wound/large_burn, /datum/wound/severe_burn, /datum/wound/deep_burn, /datum/wound/carbonised_area)
|
||||
wound_type = size_names[size]
|
||||
|
||||
W = new wound_type(damage)
|
||||
|
||||
|
||||
|
||||
// check whether we can add the wound to an existing wound
|
||||
for(var/datum/wound/other in wounds)
|
||||
if(other.desc == W.desc)
|
||||
// okay, add it!
|
||||
other.damage += W.damage
|
||||
other.amount += 1
|
||||
W = null // to signify that the wound was added
|
||||
break
|
||||
|
||||
// if we couldn't add the wound to another wound, ignore
|
||||
if(W)
|
||||
wounds += W
|
||||
|
||||
proc/emp_act(severity)
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
return
|
||||
if(prob(30*severity))
|
||||
take_damage(4(4-severity), 0, 1, used_weapon = "EMP")
|
||||
else
|
||||
droplimb(1)
|
||||
|
||||
proc/getDisplayName()
|
||||
switch(name)
|
||||
if("l_leg")
|
||||
return "left leg"
|
||||
if("r_leg")
|
||||
return "right leg"
|
||||
if("l_arm")
|
||||
return "left arm"
|
||||
if("r_arm")
|
||||
return "right arm"
|
||||
if("l_foot")
|
||||
return "left foot"
|
||||
if("r_foot")
|
||||
return "right foot"
|
||||
if("l_hand")
|
||||
return "left hand"
|
||||
if("r_hand")
|
||||
return "right hand"
|
||||
else
|
||||
return name
|
||||
|
||||
/datum/organ/external/chest
|
||||
name = "chest"
|
||||
icon_name = "chest"
|
||||
display_name = "chest"
|
||||
max_damage = 150
|
||||
min_broken_damage = 75
|
||||
body_part = UPPER_TORSO
|
||||
|
||||
/datum/organ/external/groin
|
||||
name = "groin"
|
||||
icon_name = "diaper"
|
||||
display_name = "groin"
|
||||
max_damage = 115
|
||||
min_broken_damage = 70
|
||||
body_part = LOWER_TORSO
|
||||
|
||||
/datum/organ/external/head
|
||||
name = "head"
|
||||
icon_name = "head"
|
||||
display_name = "head"
|
||||
max_damage = 75
|
||||
min_broken_damage = 40
|
||||
body_part = HEAD
|
||||
var/disfigured = 0
|
||||
|
||||
/datum/organ/external/l_arm
|
||||
name = "l_arm"
|
||||
display_name = "left arm"
|
||||
icon_name = "l_arm"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = ARM_LEFT
|
||||
|
||||
/datum/organ/external/l_leg
|
||||
name = "l_leg"
|
||||
display_name = "left leg"
|
||||
icon_name = "l_leg"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = LEG_LEFT
|
||||
|
||||
/datum/organ/external/r_arm
|
||||
name = "r_arm"
|
||||
display_name = "right arm"
|
||||
icon_name = "r_arm"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = ARM_RIGHT
|
||||
|
||||
/datum/organ/external/r_leg
|
||||
name = "r_leg"
|
||||
display_name = "right leg"
|
||||
icon_name = "r_leg"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = LEG_RIGHT
|
||||
|
||||
/datum/organ/external/l_foot
|
||||
name = "l_foot"
|
||||
display_name = "left foot"
|
||||
icon_name = "l_foot"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = FOOT_LEFT
|
||||
|
||||
/datum/organ/external/r_foot
|
||||
name = "r_foot"
|
||||
display_name = "right foot"
|
||||
icon_name = "r_foot"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = FOOT_RIGHT
|
||||
|
||||
/datum/organ/external/r_hand
|
||||
name = "r_hand"
|
||||
display_name = "right hand"
|
||||
icon_name = "r_hand"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_RIGHT
|
||||
|
||||
/datum/organ/external/l_hand
|
||||
name = "l_hand"
|
||||
display_name = "left hand"
|
||||
icon_name = "l_hand"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_LEFT
|
||||
|
||||
/****************************************************
|
||||
EXTERNAL ORGAN ITEMS
|
||||
****************************************************/
|
||||
|
||||
obj/item/weapon/organ
|
||||
icon = 'human.dmi'
|
||||
|
||||
obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
..(loc)
|
||||
if(!istype(H))
|
||||
return
|
||||
if(H.dna)
|
||||
if(!blood_DNA)
|
||||
blood_DNA = list()
|
||||
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
|
||||
var/icon/I = new /icon(icon, icon_state)
|
||||
|
||||
if (H.s_tone >= 0)
|
||||
I.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
|
||||
else
|
||||
I.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
|
||||
icon = I
|
||||
|
||||
obj/item/weapon/organ/head
|
||||
name = "head"
|
||||
icon_state = "head_m_l"
|
||||
var/mob/living/carbon/brain/brainmob
|
||||
var/brain_op_stage = 0
|
||||
|
||||
obj/item/weapon/organ/head/New()
|
||||
..()
|
||||
spawn(5)
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
brainmob.container = src
|
||||
|
||||
obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/scalpel))
|
||||
switch(brain_op_stage)
|
||||
if(0)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] is beginning to have \his head cut open with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to cut open your head with [src]!"
|
||||
user << "\red You cut [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 1
|
||||
|
||||
if(2)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] is having \his connections to the brain delicately severed with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to cut open your head with [src]!"
|
||||
user << "\red You cut [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 3.0
|
||||
else
|
||||
..()
|
||||
else if(istype(W,/obj/item/weapon/circular_saw))
|
||||
switch(brain_op_stage)
|
||||
if(1)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] has \his skull sawed open with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to saw open your head with [src]!"
|
||||
user << "\red You saw [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 2
|
||||
if(3)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] has \his spine's connection to the brain severed with [src] by [user].", 1)
|
||||
brainmob << "\red [user] severs your brain's connection to the spine with [src]!"
|
||||
user << "\red You sever [brainmob]'s brain's connection to the spine with [src]!"
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [brainmob.name] ([brainmob.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
brainmob.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
log_admin("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
|
||||
message_admins("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
|
||||
|
||||
var/obj/item/brain/B = new(loc)
|
||||
B.transfer_identity(brainmob)
|
||||
|
||||
brain_op_stage = 4.0
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
|
||||
obj/item/weapon/organ/l_arm
|
||||
name = "left arm"
|
||||
icon_state = "l_arm_l"
|
||||
obj/item/weapon/organ/l_foot
|
||||
name = "left foot"
|
||||
icon_state = "l_foot_l"
|
||||
obj/item/weapon/organ/l_hand
|
||||
name = "left hand"
|
||||
icon_state = "l_hand_l"
|
||||
obj/item/weapon/organ/l_leg
|
||||
name = "left leg"
|
||||
icon_state = "l_leg_l"
|
||||
obj/item/weapon/organ/r_arm
|
||||
name = "right arm"
|
||||
icon_state = "r_arm_l"
|
||||
obj/item/weapon/organ/r_foot
|
||||
name = "right foot"
|
||||
icon_state = "r_foot_l"
|
||||
obj/item/weapon/organ/r_hand
|
||||
name = "right hand"
|
||||
icon_state = "r_hand_l"
|
||||
obj/item/weapon/organ/r_leg
|
||||
name = "right leg"
|
||||
icon_state = "r_leg_l"
|
||||
@@ -1,3 +1,9 @@
|
||||
/****************************************************
|
||||
INTERNAL ORGANS
|
||||
****************************************************/
|
||||
/datum/organ/internal
|
||||
name = "internal"
|
||||
|
||||
/datum/organ/internal/blood_vessels
|
||||
name = "blood vessels"
|
||||
var/heart = null
|
||||
@@ -45,3 +51,4 @@
|
||||
name = "throat"
|
||||
var/lungs = null
|
||||
var/stomach = null
|
||||
|
||||
196
code/datums/organs/wound.dm
Normal file
196
code/datums/organs/wound.dm
Normal file
@@ -0,0 +1,196 @@
|
||||
|
||||
/****************************************************
|
||||
WOUNDS
|
||||
****************************************************/
|
||||
/datum/wound
|
||||
// stages such as "cut", "deep cut", etc.
|
||||
var/list/stages
|
||||
// number representing the current stage
|
||||
var/current_stage = 0
|
||||
|
||||
// description of the wound
|
||||
var/desc = ""
|
||||
|
||||
// amount of damage this wound causes
|
||||
var/damage = 0
|
||||
|
||||
// amount of damage the current wound type requires(less means we need to apply the next healing stage)
|
||||
var/min_damage = 0
|
||||
|
||||
// one of CUT, BRUISE, BURN
|
||||
var/damage_type = CUT
|
||||
|
||||
// whether this wound needs a bandage/salve to heal at all
|
||||
var/needs_treatment = 0
|
||||
|
||||
// is the wound bandaged?
|
||||
var/tmp/bandaged = 0
|
||||
// is the wound salved?
|
||||
var/tmp/salved = 0
|
||||
// is the wound disinfected?
|
||||
var/tmp/disinfected = 0
|
||||
var/tmp/created = 0
|
||||
|
||||
// number of wounds of this type
|
||||
var/tmp/amount = 1
|
||||
|
||||
// helper lists
|
||||
var/tmp/list/desc_list = list()
|
||||
var/tmp/list/damage_list = list()
|
||||
New(var/damage)
|
||||
|
||||
created = world.time
|
||||
|
||||
// reading from a list("stage" = damage) is pretty difficult, so build two separate
|
||||
// lists from them instead
|
||||
for(var/V in stages)
|
||||
desc_list += V
|
||||
damage_list += stages[V]
|
||||
|
||||
src.damage = damage
|
||||
|
||||
// initialize with the first stage
|
||||
next_stage()
|
||||
|
||||
// this will ensure the size of the wound matches the damage
|
||||
src.heal_damage(0)
|
||||
|
||||
// returns 1 if there's a next stage, 0 otherwise
|
||||
proc/next_stage()
|
||||
if(current_stage + 1 > src.desc_list.len)
|
||||
return 0
|
||||
|
||||
current_stage++
|
||||
|
||||
src.min_damage = damage_list[current_stage]
|
||||
src.desc = desc_list[current_stage]
|
||||
return 1
|
||||
|
||||
// returns 1 if the wound has started healing
|
||||
proc/started_healing()
|
||||
return (current_stage > 1)
|
||||
|
||||
// checks whether the wound has been appropriately treated
|
||||
// always returns 1 for wounds that don't need to be treated
|
||||
proc/is_treated()
|
||||
if(!needs_treatment) return 1
|
||||
|
||||
if(damage_type == BRUISE || damage_type == CUT)
|
||||
return bandaged
|
||||
else if(damage_type == BURN)
|
||||
return salved
|
||||
|
||||
// heal the given amount of damage, and if the given amount of damage was more
|
||||
// than what needed to be healed, return how much heal was left
|
||||
proc/heal_damage(amount)
|
||||
var/healed_damage = min(src.damage, amount)
|
||||
amount -= healed_damage
|
||||
src.damage -= healed_damage
|
||||
|
||||
while(src.damage / src.amount < damage_list[current_stage] && current_stage < src.desc_list.len)
|
||||
current_stage++
|
||||
desc = desc_list[current_stage]
|
||||
|
||||
// return amount of healing still leftover, can be used for other wounds
|
||||
return amount
|
||||
|
||||
// opens the wound again
|
||||
proc/open_wound()
|
||||
if(current_stage > 1)
|
||||
// e.g. current_stage is 2, then reset it to 0 and do next_stage(), bringing it to 1
|
||||
src.current_stage -= 2
|
||||
next_stage()
|
||||
src.damage = src.min_damage + 5
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut
|
||||
// link wound descriptions to amounts of damage
|
||||
stages = list("cut" = 5, "healing cut" = 2, "small scab" = 0)
|
||||
|
||||
/datum/wound/deep_cut
|
||||
stages = list("deep cut" = 15, "clotted cut" = 8, "scab" = 2, "fresh skin" = 0)
|
||||
|
||||
/datum/wound/flesh_wound
|
||||
stages = list("flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0)
|
||||
|
||||
/datum/wound/gaping_wound
|
||||
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, \
|
||||
"small straight scar" = 0)
|
||||
|
||||
/datum/wound/big_gaping_wound
|
||||
stages = list("big gaping wound" = 60, "gauze wrapped wound" = 50, "blood soaked bandage" = 25,\
|
||||
"large angry scar" = 10, "large straight scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
/datum/wound/massive_wound
|
||||
stages = list("massive wound" = 70, "massive blood soaked bandage" = 40, "huge bloody mess" = 20,\
|
||||
"massive angry scar" = 10, "massive jagged scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
/** BRUISES **/
|
||||
/datum/wound/bruise
|
||||
stages = list("monumental bruise" = 80, "huge bruise" = 50, "large bruise" = 30,\
|
||||
"moderate bruise" = 20, "small bruise" = 10, "tiny bruise" = 5)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
damage_type = BRUISE
|
||||
|
||||
/datum/wound/bruise/monumental_bruise
|
||||
|
||||
// implement sub-paths by starting at a later stage
|
||||
/datum/wound/bruise/huge_bruise
|
||||
current_stage = 1
|
||||
|
||||
/datum/wound/bruise/large_bruise
|
||||
current_stage = 2
|
||||
|
||||
/datum/wound/bruise/moderate_bruise
|
||||
current_stage = 3
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/small_bruise
|
||||
current_stage = 4
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/tiny_bruise
|
||||
current_stage = 5
|
||||
needs_treatment = 0
|
||||
|
||||
/** BURNS **/
|
||||
/datum/wound/moderate_burn
|
||||
stages = list("moderate burn" = 5, "moderate salved burn" = 2, "fresh skin" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/large_burn
|
||||
stages = list("large burn" = 15, "large salved burn" = 5, "fresh skin" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/severe_burn
|
||||
stages = list("severe burn" = 30, "severe salved burn" = 10, "burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/deep_burn
|
||||
stages = list("deep burn" = 40, "deep salved burn" = 15, "large burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
|
||||
/datum/wound/carbonised_area
|
||||
stages = list("carbonised area" = 50, "treated carbonised area" = 20, "massive burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
@@ -144,7 +144,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(overlay)
|
||||
for(var/atom/target in targets)
|
||||
var/location
|
||||
if(istype(target,/mob))
|
||||
if(istype(target,/mob/living))
|
||||
location = target.loc
|
||||
else if(istype(target,/turf))
|
||||
location = target
|
||||
@@ -159,11 +159,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
/obj/effect/proc_holder/spell/proc/after_cast(list/targets)
|
||||
for(var/atom/target in targets)
|
||||
var/location
|
||||
if(istype(target,/mob))
|
||||
if(istype(target,/mob/living))
|
||||
location = target.loc
|
||||
else if(istype(target,/turf))
|
||||
location = target
|
||||
if(istype(target,/mob) && message)
|
||||
if(istype(target,/mob/living) && message)
|
||||
target << text("[message]")
|
||||
if(sparks_spread)
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
@@ -235,9 +235,13 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(range < 0)
|
||||
targets += user
|
||||
else
|
||||
var/possible_targets = view_or_range(range, user, selection_type)
|
||||
if(!include_user && user in possible_targets)
|
||||
possible_targets -= user
|
||||
var/possible_targets = list()
|
||||
|
||||
for(var/mob/living/M in view_or_range(range, user, selection_type))
|
||||
if(!include_user && user == M)
|
||||
continue
|
||||
possible_targets += M
|
||||
|
||||
targets += input("Choose the target for the spell.", "Targeting") as mob in possible_targets
|
||||
else
|
||||
var/list/possible_targets = list()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return thearea
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea)
|
||||
for(var/mob/target in targets)
|
||||
for(var/mob/living/target in targets)
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
if(!T.density)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/emplosion/cast(list/targets)
|
||||
|
||||
for(var/mob/target in targets)
|
||||
for(var/mob/living/target in targets)
|
||||
empulse(target.loc, emp_heavy, emp_light)
|
||||
|
||||
return
|
||||
@@ -15,7 +15,7 @@
|
||||
var/jaunt_duration = 50 //in deciseconds
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded
|
||||
for(var/mob/target in targets)
|
||||
for(var/mob/living/target in targets)
|
||||
spawn(0)
|
||||
var/mobloc = get_turf(target.loc)
|
||||
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/explosion/cast(list/targets)
|
||||
|
||||
for(var/mob/target in targets)
|
||||
for(var/mob/living/target in targets)
|
||||
explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
|
||||
|
||||
return
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets)
|
||||
|
||||
for(var/mob/target in targets)
|
||||
for(var/mob/living/target in targets)
|
||||
for(var/x in mutations)
|
||||
target.mutations.Add(x)
|
||||
target.disabilities |= disabilities
|
||||
|
||||
@@ -31,7 +31,7 @@ Also, you never added distance checking after target is selected. I've went ahea
|
||||
user << "Too many minds! You're not a hive damnit!"//Whaa...aat?
|
||||
return
|
||||
|
||||
var/mob/target = targets[1]
|
||||
var/mob/living/target = targets[1]
|
||||
|
||||
if(!(target in oview(range)))//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it.
|
||||
user << "They are too far away!"
|
||||
@@ -53,7 +53,7 @@ Also, you never added distance checking after target is selected. I've went ahea
|
||||
user << "Their mind is resisting your spell."
|
||||
return
|
||||
|
||||
var/mob/victim = target//The target of the spell whos body will be transferred to.
|
||||
var/mob/living/victim = target//The target of the spell whos body will be transferred to.
|
||||
var/mob/caster = user//The wizard/whomever doing the body transferring.
|
||||
|
||||
//SPELL LOSS BEGIN
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/projectile/cast(list/targets, mob/user = usr)
|
||||
|
||||
for(var/mob/target in targets)
|
||||
for(var/mob/living/target in targets)
|
||||
spawn(0)
|
||||
var/obj/effect/proc_holder/spell/targeted/projectile
|
||||
if(istext(proj_type))
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/trigger/cast(list/targets)
|
||||
for(var/mob/target in targets)
|
||||
for(var/mob/living/target in targets)
|
||||
for(var/obj/effect/proc_holder/spell/spell in contents)
|
||||
spell.perform(list(target),0)
|
||||
for(var/obj/effect/proc_holder/spell/spell in linked_spells)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/include_dense = 0 //whether it includes dense tiles in possible teleport locations
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets)
|
||||
for(var/mob/target in targets)
|
||||
for(var/mob/living/target in targets)
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in range(target,outer_tele_radius))
|
||||
if(T in range(target,inner_tele_radius)) continue
|
||||
|
||||
@@ -253,7 +253,6 @@
|
||||
range = 0
|
||||
summon_type = list("/turf/simulated/floor/engine/cult")
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
delay = 10
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall
|
||||
name = "Leser Construction"
|
||||
@@ -267,7 +266,6 @@
|
||||
range = 0
|
||||
summon_type = list("/turf/simulated/wall/cult")
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
delay = 20
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall/reinforced
|
||||
name = "Greater Construction"
|
||||
|
||||
@@ -263,10 +263,10 @@
|
||||
|
||||
// Basically this Metroid Core catalyzes reactions that normally wouldn't happen anywhere
|
||||
/obj/item/metroid_core
|
||||
name = "metroid core"
|
||||
desc = "A very slimy and tender part of a Metroid. They also legend to have \"magical powers\"."
|
||||
name = "roro core"
|
||||
desc = "A very slimy and tender part of a Rorobeast. Legends claim these to have \"magical powers\"."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "metroid core"
|
||||
icon_state = "roro core"
|
||||
flags = TABLEPASS
|
||||
force = 1.0
|
||||
w_class = 1.0
|
||||
|
||||
@@ -1550,6 +1550,13 @@
|
||||
m_amt = 12000
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/kitchenknife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
|
||||
/obj/item/weapon/butch
|
||||
name = "butcher's Cleaver"
|
||||
@@ -1625,6 +1632,7 @@
|
||||
icon_state = "knife"
|
||||
force = 10.0
|
||||
throwforce = 10.0
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/spoon
|
||||
name = "spoon"
|
||||
@@ -1647,6 +1655,7 @@
|
||||
g_amt = 5000
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/retractor
|
||||
name = "retractor"
|
||||
@@ -1713,6 +1722,7 @@
|
||||
g_amt = 10000
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
attack_verb = list("attacked", "slashed", "sawed", "cut")
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/syntiflesh
|
||||
name = "syntiflesh"
|
||||
|
||||
@@ -165,8 +165,6 @@
|
||||
// Returns a list of mobs in range of R from source. Used in radio and say code.
|
||||
|
||||
var/turf/T = get_turf(source)
|
||||
if(!istype(T))
|
||||
return
|
||||
var/list/hear = list()
|
||||
|
||||
if(!T)
|
||||
@@ -256,7 +254,23 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
else
|
||||
return 0
|
||||
|
||||
proc/check_can_reach(atom/user, atom/target)
|
||||
if(!in_range(user,target))
|
||||
return 0
|
||||
return CanReachThrough(get_turf(user), get_turf(target), target)
|
||||
/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions
|
||||
//returns only NORTH, SOUTH, EAST, or WEST
|
||||
var/dx = finish.x - start.x
|
||||
var/dy = finish.y - start.y
|
||||
if(abs(dy) > abs (dx)) //slope is above 1:1 (move horizontally in a tie)
|
||||
if(dy > 0)
|
||||
return get_step(start, SOUTH)
|
||||
else
|
||||
return get_step(start, NORTH)
|
||||
else
|
||||
if(dx > 0)
|
||||
return get_step(start, WEST)
|
||||
else
|
||||
return get_step(start, EAST)
|
||||
|
||||
/proc/get_mob_by_key(var/key)
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.ckey == lowertext(key))
|
||||
return M
|
||||
return null
|
||||
|
||||
@@ -12,6 +12,7 @@ var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hai
|
||||
var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
|
||||
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
var/global/list/landmarks_list = list() //list of all landmarks created
|
||||
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
|
||||
@@ -309,9 +309,16 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if((world.time-time_passed)>300)
|
||||
return //took too long
|
||||
newname = reject_bad_name(newname,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
|
||||
|
||||
for(var/mob/living/M in player_list)
|
||||
if(M == src)
|
||||
continue
|
||||
if(!newname || M.real_name == newname)
|
||||
newname = null
|
||||
break
|
||||
if(newname)
|
||||
break //That's a suitable name!
|
||||
src << "Sorry, that [role]-name wasn't appropriate, please try another. It's possibly too long/short or has bad characters."
|
||||
src << "Sorry, that [role]-name wasn't appropriate, please try another. It's possibly too long/short, has bad characters or is already taken."
|
||||
|
||||
if(!newname) //we'll stick with the oldname then
|
||||
return
|
||||
@@ -1222,6 +1229,10 @@ proc/get_mob_with_client_list()
|
||||
else if (zone == "r_leg") return "right leg"
|
||||
else if (zone == "l_foot") return "left foot"
|
||||
else if (zone == "r_foot") return "right foot"
|
||||
else if (zone == "l_hand") return "left hand"
|
||||
else if (zone == "r_hand") return "right hand"
|
||||
else if (zone == "l_foot") return "left foot"
|
||||
else if (zone == "r_foot") return "right foot"
|
||||
else return zone
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
world
|
||||
mob = /mob/new_player
|
||||
turf = /turf/space
|
||||
area = /area
|
||||
view = "15x15"
|
||||
|
||||
|
||||
Topic(href, href_list[])
|
||||
// world << "Received a Topic() call!"
|
||||
// world << "[href]"
|
||||
// for(var/a in href_list)
|
||||
// world << "[a]"
|
||||
// if(href_list["hello"])
|
||||
// world << "Hello world!"
|
||||
// return "Hello world!"
|
||||
// world << "End of Topic() call."
|
||||
// ..()
|
||||
@@ -1450,6 +1450,18 @@ proc/process_ghost_teleport_locs()
|
||||
name = "Mars"
|
||||
icon_state = "away"
|
||||
|
||||
/area/awaymission/BMPship1
|
||||
name = "\improper Aft Block"
|
||||
icon_state = "away1"
|
||||
|
||||
/area/awaymission/BMPship2
|
||||
name = "\improper Midship Block"
|
||||
icon_state = "away2"
|
||||
|
||||
/area/awaymission/BMPship3
|
||||
name = "\improper Fore Block"
|
||||
icon_state = "away3"
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
@@ -1,109 +1,22 @@
|
||||
|
||||
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
|
||||
/obj/item/weapon/pickaxe/silver =4,
|
||||
/obj/item/weapon/pickaxe/drill =4,
|
||||
/obj/item/weapon/pickaxe/jackhammer =4,
|
||||
/mob/living/simple_animal/carp =3,
|
||||
/obj/item/weapon/pickaxe/diamond =3,
|
||||
/obj/item/weapon/pickaxe/diamonddrill =3,
|
||||
/obj/item/weapon/pickaxe/gold =3,
|
||||
/obj/item/weapon/pickaxe/plasmacutter =2,
|
||||
/obj/structure/closet/syndicate/resources =2,
|
||||
/obj/item/weapon/melee/energy/sword/pirate =1,
|
||||
/obj/mecha/working/ripley/mining =1
|
||||
)
|
||||
|
||||
var/global/list/spawned_surprises = list()
|
||||
|
||||
var/global/max_secret_rooms = 3
|
||||
|
||||
|
||||
|
||||
/*
|
||||
proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0 or null - random, 1 - nothing, 2 - iron, 3 - silicon
|
||||
if(!size)
|
||||
size = pick(100;2,50;3,35;4,25;6,10;12)
|
||||
if(start_loc.x - size < 5 || start_loc.x + size >= world.maxx - 5 || start_loc.y - size < 5 || start_loc.y + size > world.maxy -5)
|
||||
return 0
|
||||
if(!type)
|
||||
type = pick(50;1,2,3)
|
||||
if(!richness)
|
||||
richness = rand(10,40)
|
||||
// world << "Asteroid size: [size]; Asteroid type: [type]"
|
||||
var/list/turfs = circlerangeturfs(start_loc,size)
|
||||
if(!islist(turfs) || isemptylist(turfs))
|
||||
return 0
|
||||
var/area/asteroid/AstAr = new
|
||||
AstAr.name = "Asteroid #[start_loc.x][start_loc.y][start_loc.z]"
|
||||
for(var/turf/T in turfs)
|
||||
var/dist = get_dist(start_loc,T)
|
||||
if(abs(GaussRand(dist))<size) //prob(100-(dist*rand(2,4))))//I'm terrible at generating random things.
|
||||
var/turf/simulated/wall/asteroid/A
|
||||
if(type > 1 && prob(richness))
|
||||
switch(type)
|
||||
if(2)
|
||||
A = new /turf/simulated/wall/asteroid/iron(T)
|
||||
if(3)
|
||||
A = new /turf/simulated/wall/asteroid/silicon(T)
|
||||
else
|
||||
A = new /turf/simulated/wall/asteroid(T)
|
||||
A.opacity = 0
|
||||
A.sd_NewOpacity(1)
|
||||
AstAr.contents += A
|
||||
|
||||
if(max_secret_rooms && size >= 10)
|
||||
var/x_len = rand(4,size)
|
||||
var/y_len = pick(4,size)
|
||||
var/st_l = locate(start_loc.x-round(x_len/2),start_loc.y-round(y_len/2),start_loc.z)
|
||||
if(st_l)
|
||||
spawn_room(st_l,x_len,y_len)
|
||||
max_secret_rooms--
|
||||
|
||||
return 1
|
||||
*/
|
||||
/*
|
||||
/proc/populate_w_asteroids(var/z,var/density=null)
|
||||
if(!density)
|
||||
density = pick(10,20,40)
|
||||
while(density)
|
||||
var/x = rand(1,world.maxx)
|
||||
var/y = rand(1,world.maxy)
|
||||
// world << "Asteroid coords: [x], [y], [z]"
|
||||
var/start_loc = locate(x,y,z)
|
||||
if(start_loc && spawn_asteroid(start_loc))
|
||||
density--
|
||||
return
|
||||
*/
|
||||
//this is terrible! -Pete
|
||||
/*
|
||||
/datum/game_mode/proc/setup_sectors()
|
||||
world << "\blue \b Randomizing space sectors."
|
||||
var/list/sectors = list(1,3,4,0,0,0,0,0,0)
|
||||
var/length = sectors.len/3
|
||||
global_map = new/list(length,length)//3x3 map
|
||||
var/x
|
||||
var/y
|
||||
|
||||
for(x=1,x<=length,x++)
|
||||
for(y=1,y<=length,y++)
|
||||
var/sector
|
||||
if(sectors.len)
|
||||
sector = pick(sectors)
|
||||
sectors -= sector
|
||||
if(sector == 0)
|
||||
sector = ++world.maxz
|
||||
populate_w_asteroids(sector)
|
||||
global_map[x][y] = sector
|
||||
else
|
||||
break
|
||||
world << "\blue \b Randomization complete."
|
||||
|
||||
//debug
|
||||
for(x=1,x<=global_map.len,x++)
|
||||
var/list/y_arr = global_map[x]
|
||||
for(y=1,y<=y_arr.len,y++)
|
||||
var/t = ""
|
||||
switch(y_arr[y])
|
||||
if(1) t = "SS13"
|
||||
if(3) t = "AI Satellite"
|
||||
if(4) t = "Derelict"
|
||||
else t = "Empty Cold Space"
|
||||
world << "Global map [x] - [y] contains [t] (Z = [y_arr[y]])"
|
||||
//debug
|
||||
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/spawn_exporation_packs()
|
||||
for (var/obj/effect/landmark/L in world)
|
||||
if (L.tag == "landmark*ExplorationPack")
|
||||
new /obj/item/weapon/storage/explorers_box(L.loc)
|
||||
del(L)
|
||||
return
|
||||
*/
|
||||
|
||||
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , var/clean = 0 , var/name)
|
||||
var/list/room_turfs = list("walls"=list(),"floors"=list())
|
||||
|
||||
@@ -145,7 +58,6 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
|
||||
|
||||
return room_turfs
|
||||
|
||||
|
||||
proc/admin_spawn_room_at_pos()
|
||||
var/wall
|
||||
var/floor
|
||||
@@ -1,15 +1,215 @@
|
||||
//Movable atoms
|
||||
/atom/movable
|
||||
var/mob/pulledby = null
|
||||
/atom
|
||||
layer = 2
|
||||
var/level = 2
|
||||
var/flags = FPRINT
|
||||
var/list/fingerprints
|
||||
var/list/fingerprintshidden
|
||||
var/fingerprintslast = null
|
||||
var/list/blood_DNA
|
||||
var/last_bumped = 0
|
||||
var/pass_flags = 0
|
||||
var/throwpass = 0
|
||||
|
||||
/atom/movable/verb/pull()
|
||||
set name = "Pull"
|
||||
set category = "IC"
|
||||
set src in oview(1)
|
||||
///Chemistry.
|
||||
var/datum/reagents/reagents = null
|
||||
|
||||
usr.start_pulling(src)
|
||||
//var/chem_is_open_container = 0
|
||||
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
|
||||
///Chemistry.
|
||||
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
|
||||
/atom/proc/throw_impact(atom/hit_atom)
|
||||
if(istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.visible_message("\red [hit_atom] has been hit by [src].")
|
||||
if(isobj(src))//Hate typecheckin for a child object but this is just fixing crap another guy broke so if someone wants to put the time in and make this proper feel free.
|
||||
M.take_organ_damage(src:throwforce)
|
||||
|
||||
|
||||
else if(isobj(hit_atom))
|
||||
var/obj/O = hit_atom
|
||||
if(!O.anchored)
|
||||
step(O, src.dir)
|
||||
O.hitby(src)
|
||||
|
||||
else if(isturf(hit_atom))
|
||||
var/turf/T = hit_atom
|
||||
if(T.density)
|
||||
spawn(2)
|
||||
step(src, turn(src.dir, 180))
|
||||
if(istype(src,/mob/living))
|
||||
var/mob/living/M = src
|
||||
M.take_organ_damage(20)
|
||||
|
||||
|
||||
/atom/proc/assume_air(datum/gas_mixture/giver)
|
||||
del(giver)
|
||||
return null
|
||||
|
||||
/atom/proc/remove_air(amount)
|
||||
return null
|
||||
|
||||
/atom/proc/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
else
|
||||
return null
|
||||
|
||||
/atom/proc/check_eye(user as mob)
|
||||
if (istype(user, /mob/living/silicon/ai))
|
||||
return 1
|
||||
return
|
||||
|
||||
/atom/proc/on_reagent_change()
|
||||
return
|
||||
|
||||
/atom/proc/Bumped(AM as mob|obj)
|
||||
return
|
||||
|
||||
// Convenience proc to see if a container is open for chemistry handling
|
||||
// returns true if open
|
||||
// false if closed
|
||||
/atom/proc/is_open_container()
|
||||
return flags & OPENCONTAINER
|
||||
|
||||
/*//Convenience proc to see whether a container can be accessed in a certain way.
|
||||
|
||||
proc/can_subract_container()
|
||||
return flags & EXTRACT_CONTAINER
|
||||
|
||||
proc/can_add_container()
|
||||
return flags & INSERT_CONTAINER
|
||||
*/
|
||||
|
||||
|
||||
/atom/proc/meteorhit(obj/meteor as obj)
|
||||
return
|
||||
|
||||
/atom/proc/allow_drop()
|
||||
return 1
|
||||
|
||||
/atom/proc/CheckExit()
|
||||
return 1
|
||||
|
||||
/atom/proc/HasEntered(atom/movable/AM as mob|obj)
|
||||
return
|
||||
|
||||
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
|
||||
return
|
||||
|
||||
/atom/proc/emp_act(var/severity)
|
||||
return
|
||||
|
||||
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
|
||||
return 0
|
||||
|
||||
/atom/proc/in_contents_of(container)//can take class or object instance as argument
|
||||
if(ispath(container))
|
||||
if(istype(src.loc, container))
|
||||
return 1
|
||||
else if(src in container)
|
||||
return 1
|
||||
return
|
||||
|
||||
/*
|
||||
* atom/proc/search_contents_for(path,list/filter_path=null)
|
||||
* Recursevly searches all atom contens (including contents contents and so on).
|
||||
*
|
||||
* ARGS: path - search atom contents for atoms of this type
|
||||
* list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
|
||||
*
|
||||
* RETURNS: list of found atoms
|
||||
*/
|
||||
|
||||
/atom/proc/search_contents_for(path,list/filter_path=null)
|
||||
var/list/found = list()
|
||||
for(var/atom/A in src)
|
||||
if(istype(A, path))
|
||||
found += A
|
||||
if(filter_path)
|
||||
var/pass = 0
|
||||
for(var/type in filter_path)
|
||||
pass |= istype(A, type)
|
||||
if(!pass)
|
||||
continue
|
||||
if(A.contents.len)
|
||||
found += A.search_contents_for(path,filter_path)
|
||||
return found
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Beam code by Gunbuddy
|
||||
|
||||
Beam() proc will only allow one beam to come from a source at a time. Attempting to call it more than
|
||||
once at a time per source will cause graphical errors.
|
||||
Also, the icon used for the beam will have to be vertical and 32x32.
|
||||
The math involved assumes that the icon is vertical to begin with so unless you want to adjust the math,
|
||||
its easier to just keep the beam vertical.
|
||||
*/
|
||||
/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='icons/effects/beam.dmi',time=50, maxdistance=10)
|
||||
//BeamTarget represents the target for the beam, basically just means the other end.
|
||||
//Time is the duration to draw the beam
|
||||
//Icon is obviously which icon to use for the beam, default is beam.dmi
|
||||
//Icon_state is what icon state is used. Default is b_beam which is a blue beam.
|
||||
//Maxdistance is the longest range the beam will persist before it gives up.
|
||||
var/EndTime=world.time+time
|
||||
while(BeamTarget&&world.time<EndTime&&get_dist(src,BeamTarget)<maxdistance&&z==BeamTarget.z)
|
||||
//If the BeamTarget gets deleted, the time expires, or the BeamTarget gets out
|
||||
//of range or to another z-level, then the beam will stop. Otherwise it will
|
||||
//continue to draw.
|
||||
|
||||
dir=get_dir(src,BeamTarget) //Causes the source of the beam to rotate to continuosly face the BeamTarget.
|
||||
|
||||
for(var/obj/effect/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to
|
||||
if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the
|
||||
del O //pieces to a new orientation.
|
||||
var/Angle=round(Get_Angle(src,BeamTarget))
|
||||
var/icon/I=new(icon,icon_state)
|
||||
I.Turn(Angle)
|
||||
var/DX=(32*BeamTarget.x+BeamTarget.pixel_x)-(32*x+pixel_x)
|
||||
var/DY=(32*BeamTarget.y+BeamTarget.pixel_y)-(32*y+pixel_y)
|
||||
var/N=0
|
||||
var/length=round(sqrt((DX)**2+(DY)**2))
|
||||
for(N,N<length,N+=32)
|
||||
var/obj/effect/overlay/beam/X=new(loc)
|
||||
X.BeamSource=src
|
||||
if(N+32>length)
|
||||
var/icon/II=new(icon,icon_state)
|
||||
II.DrawBox(null,1,(length-N),32,32)
|
||||
II.Turn(Angle)
|
||||
X.icon=II
|
||||
else X.icon=I
|
||||
var/Pixel_x=round(sin(Angle)+32*sin(Angle)*(N+16)/32)
|
||||
var/Pixel_y=round(cos(Angle)+32*cos(Angle)*(N+16)/32)
|
||||
if(DX==0) Pixel_x=0
|
||||
if(DY==0) Pixel_y=0
|
||||
if(Pixel_x>32)
|
||||
for(var/a=0, a<=Pixel_x,a+=32)
|
||||
X.x++
|
||||
Pixel_x-=32
|
||||
if(Pixel_x<-32)
|
||||
for(var/a=0, a>=Pixel_x,a-=32)
|
||||
X.x--
|
||||
Pixel_x+=32
|
||||
if(Pixel_y>32)
|
||||
for(var/a=0, a<=Pixel_y,a+=32)
|
||||
X.y++
|
||||
Pixel_y-=32
|
||||
if(Pixel_y<-32)
|
||||
for(var/a=0, a>=Pixel_y,a-=32)
|
||||
X.y--
|
||||
Pixel_y+=32
|
||||
X.pixel_x=Pixel_x
|
||||
X.pixel_y=Pixel_y
|
||||
sleep(3) //Changing this to a lower value will cause the beam to follow more smoothly with movement, but it will also be more laggy.
|
||||
//I've found that 3 ticks provided a nice balance for my use.
|
||||
for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) del O
|
||||
|
||||
|
||||
//All atoms
|
||||
/atom/verb/examine()
|
||||
set name = "Examine"
|
||||
@@ -349,36 +549,6 @@
|
||||
del(blood_DNA)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/clean_blood()
|
||||
. = ..()
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.gloves)
|
||||
if(H.gloves.clean_blood())
|
||||
H.update_inv_gloves(0)
|
||||
else
|
||||
if(H.bloody_hands)
|
||||
H.bloody_hands = 0
|
||||
H.update_inv_gloves(0)
|
||||
update_icons() //apply the now updated overlays to the mob
|
||||
|
||||
/obj/item/clean_blood()
|
||||
. = ..()
|
||||
if(blood_overlay)
|
||||
overlays.Remove(blood_overlay)
|
||||
if(istype(src, /obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = src
|
||||
G.transfer_blood = 0
|
||||
|
||||
/*
|
||||
/turf/simulated/clean_blood()
|
||||
. = ..()
|
||||
if(icon_old)
|
||||
var/icon/I = new /icon(icon_old, icon_state)
|
||||
icon = I
|
||||
else
|
||||
icon = initial(icon)
|
||||
*/
|
||||
|
||||
|
||||
/atom/MouseDrop(atom/over_object as mob|obj|turf|area)
|
||||
@@ -1183,76 +1353,3 @@ var/list/DummyCache = list()
|
||||
|
||||
/atom/proc/checkpass(passflag)
|
||||
return pass_flags&passflag
|
||||
|
||||
|
||||
//Could not find object proc defines and this could almost be an atom level one.
|
||||
|
||||
/obj/proc/process()
|
||||
processing_objects.Remove(src)
|
||||
return 0
|
||||
|
||||
|
||||
/*Really why was this in the click proc of all the places you could put it
|
||||
if (usr:a_intent == "help")
|
||||
// ------- YOU HAVE THE HELP INTENT SELECTED -------
|
||||
if(istype(src, /mob/living/carbon))
|
||||
// ------- YOUR TARGET IS LIVING CARBON CREATURE (NOT AI OR CYBORG OR SIMPLE ANIMAL) -------
|
||||
var/mob/living/carbon/C = src
|
||||
if(HEAL in usr:mutations)
|
||||
// ------- YOU ARE HUMAN, WITH THE HELP INTENT TARGETING A HUMAN AND HAVE THE 'HEAT' GENETIC MUTATION -------
|
||||
|
||||
if(C.stat != 2)
|
||||
// ------- THE PERSON YOU'RE TOUCHING IS NOT DEAD -------
|
||||
|
||||
var/t_him = "it"
|
||||
if (src.gender == MALE)
|
||||
t_him = "his"
|
||||
else if (src.gender == FEMALE)
|
||||
t_him = "her"
|
||||
var/u_him = "it"
|
||||
if (usr.gender == MALE)
|
||||
t_him = "him"
|
||||
else if (usr.gender == FEMALE)
|
||||
t_him = "her"
|
||||
|
||||
if(src != usr)
|
||||
usr.visible_message( \
|
||||
"\blue <i>[usr] places [u_him] palms on [src], healing [t_him]!</i>", \
|
||||
"\blue You place your palms on [src] and heal [t_him].", \
|
||||
)
|
||||
else
|
||||
usr.visible_message( \
|
||||
"\blue <i>[usr] places [u_him] palms on [u_him]self and heals.</i>", \
|
||||
"\blue You place your palms on yourself and heal.", \
|
||||
)
|
||||
|
||||
C.adjustOxyLoss(-25)
|
||||
C.adjustToxLoss(-25)
|
||||
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
// ------- YOUR TARGET IS HUMAN -------
|
||||
var/mob/living/carbon/human/H = C
|
||||
var/datum/organ/external/affecting = H.get_organ(check_zone(usr:zone_sel:selecting))
|
||||
if(affecting && affecting.heal_damage(25, 25))
|
||||
H.UpdateDamageIcon()
|
||||
else
|
||||
C.heal_organ_damage(25, 25)
|
||||
C.adjustCloneLoss(-25)
|
||||
C.stunned = max(0, C.stunned-5)
|
||||
C.paralysis = max(0, C.paralysis-5)
|
||||
C.stuttering = max(0, C.stuttering-5)
|
||||
C.drowsyness = max(0, C.drowsyness-5)
|
||||
C.weakened = max(0, C.weakened-5)
|
||||
usr:nutrition -= rand(1,10)
|
||||
usr.next_move = world.time + 6
|
||||
else
|
||||
// ------- PERSON YOU'RE TOUCHING IS ALREADY DEAD -------
|
||||
usr << "\red [src] is dead and can't be healed."
|
||||
return
|
||||
|
||||
// ------- IF YOU DON'T HAVE THE SILLY ABILITY ABOVE OR FAIL ON ANY OTHER CHECK, THEN YOU'RE CLICKING ON SOMETHING WITH AN EMPTY HAND. ATTACK_HAND IT IS THEN -------
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
179
code/game/atoms_movable.dm
Normal file
179
code/game/atoms_movable.dm
Normal file
@@ -0,0 +1,179 @@
|
||||
/atom/movable
|
||||
layer = 3
|
||||
var/last_move = null
|
||||
var/anchored = 0
|
||||
// var/elevation = 2 - not used anywhere
|
||||
var/move_speed = 10
|
||||
var/l_move_time = 1
|
||||
var/m_flag = 1
|
||||
var/throwing = 0
|
||||
var/throw_speed = 2
|
||||
var/throw_range = 7
|
||||
var/moved_recently = 0
|
||||
var/mob/pulledby = null
|
||||
|
||||
/atom/movable/Move()
|
||||
var/atom/A = src.loc
|
||||
. = ..()
|
||||
src.move_speed = world.timeofday - src.l_move_time
|
||||
src.l_move_time = world.timeofday
|
||||
src.m_flag = 1
|
||||
if ((A != src.loc && A && A.z == src.z))
|
||||
src.last_move = get_dir(A, src.loc)
|
||||
return
|
||||
|
||||
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
|
||||
if(src.throwing)
|
||||
src.throw_impact(A)
|
||||
src.throwing = 0
|
||||
|
||||
spawn( 0 )
|
||||
if ((A && yes))
|
||||
A.last_bumped = world.time
|
||||
A.Bumped(src)
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
/atom/movable/proc/forceMove(atom/destination)
|
||||
if(destination)
|
||||
if(loc)
|
||||
loc.Exited(src)
|
||||
loc = destination
|
||||
loc.Entered(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/atom/movable/proc/hit_check()
|
||||
if(src.throwing)
|
||||
for(var/atom/A in get_turf(src))
|
||||
if(A == src) continue
|
||||
if(istype(A,/mob/living))
|
||||
if(A:lying) continue
|
||||
src.throw_impact(A)
|
||||
if(src.throwing == 1)
|
||||
src.throwing = 0
|
||||
if(isobj(A))
|
||||
if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement
|
||||
src.throw_impact(A)
|
||||
src.throwing = 0
|
||||
|
||||
/atom/movable/proc/throw_at(atom/target, range, speed)
|
||||
if(!target || !src) return 0
|
||||
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target
|
||||
|
||||
src.throwing = 1
|
||||
|
||||
if(usr)
|
||||
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
src.throwing = 2 // really strong throw!
|
||||
|
||||
var/dist_x = abs(target.x - src.x)
|
||||
var/dist_y = abs(target.y - src.y)
|
||||
|
||||
var/dx
|
||||
if (target.x > src.x)
|
||||
dx = EAST
|
||||
else
|
||||
dx = WEST
|
||||
|
||||
var/dy
|
||||
if (target.y > src.y)
|
||||
dy = NORTH
|
||||
else
|
||||
dy = SOUTH
|
||||
var/dist_travelled = 0
|
||||
var/dist_since_sleep = 0
|
||||
var/area/a = get_area(src.loc)
|
||||
if(dist_x > dist_y)
|
||||
var/error = dist_x/2 - dist_y
|
||||
|
||||
|
||||
|
||||
while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
|
||||
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
|
||||
if(error < 0)
|
||||
var/atom/step = get_step(src, dy)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error += dist_x
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
else
|
||||
var/atom/step = get_step(src, dx)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error -= dist_y
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
a = get_area(src.loc)
|
||||
else
|
||||
var/error = dist_y/2 - dist_x
|
||||
while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
|
||||
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
|
||||
if(error < 0)
|
||||
var/atom/step = get_step(src, dx)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error += dist_y
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
else
|
||||
var/atom/step = get_step(src, dy)
|
||||
if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge
|
||||
break
|
||||
src.Move(step)
|
||||
hit_check()
|
||||
error -= dist_x
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
|
||||
a = get_area(src.loc)
|
||||
|
||||
//done throwing, either because it hit something or it finished moving
|
||||
src.throwing = 0
|
||||
if(isobj(src)) src:throw_impact(get_turf(src))
|
||||
|
||||
|
||||
//Overlays
|
||||
/atom/movable/overlay
|
||||
var/atom/master = null
|
||||
anchored = 1
|
||||
|
||||
/atom/movable/overlay/New()
|
||||
for(var/x in src.verbs)
|
||||
src.verbs -= x
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attackby(a, b)
|
||||
if (src.master)
|
||||
return src.master.attackby(a, b)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_paw(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_paw(a, b, c)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_hand(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_hand(a, b, c)
|
||||
return
|
||||
@@ -1,104 +0,0 @@
|
||||
#define REGULATE_RATE 5
|
||||
|
||||
/obj/item/weapon/storage/beakerbox
|
||||
name = "Beaker Box"
|
||||
icon_state = "beaker"
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
/obj/item/weapon/storage/beakerbox/New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker( src )
|
||||
|
||||
/obj/item/weapon/paper/alchemy/
|
||||
name = "paper- 'Chemistry Information'"
|
||||
|
||||
/obj/item/weapon/storage/trashcan
|
||||
name = "disposal unit"
|
||||
w_class = 4.0
|
||||
anchored = 1.0
|
||||
density = 1.0
|
||||
var/processing = null
|
||||
var/locked = 1
|
||||
req_access = list(access_janitor)
|
||||
desc = "A compact incineration device, used to dispose of garbage."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "trashcan"
|
||||
item_state = "syringe_kit"
|
||||
|
||||
/obj/item/weapon/storage/trashcan/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
//..()
|
||||
|
||||
if (src.contents.len >= 7)
|
||||
user << "The trashcan is full!"
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/disk/nuclear)||istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
user << "This is far too important to throw away!"
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/storage/))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
user << "You cannot fit the person inside."
|
||||
return
|
||||
var/t
|
||||
for(var/obj/item/weapon/O in src)
|
||||
t += O.w_class
|
||||
//Foreach goto(46)
|
||||
t += W.w_class
|
||||
if (t > 30)
|
||||
user << "You cannot fit the item inside. (Remove the larger items first)"
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
user.visible_message("\blue [user] has put [W] in [src]!")
|
||||
|
||||
if (src.contents.len >= 7)
|
||||
src.locked = 1
|
||||
src.icon_state = "trashcan1"
|
||||
spawn (200)
|
||||
if (src.contents.len < 7)
|
||||
src.locked = 0
|
||||
src.icon_state = "trashcan"
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/trashcan/attack_hand(mob/user as mob)
|
||||
if(src.allowed(usr))
|
||||
locked = !locked
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
if (src.processing)
|
||||
return
|
||||
if (src.contents.len >= 7)
|
||||
user << "\blue You begin the emptying procedure."
|
||||
var/area/A = src.loc.loc // make sure it's in an area
|
||||
if(!A || !isarea(A))
|
||||
return
|
||||
// var/turf/T = src.loc
|
||||
A.use_power(250, EQUIP)
|
||||
src.processing = 1
|
||||
src.contents.len = 0
|
||||
src.icon_state = "trashmelt"
|
||||
if (istype(loc, /turf))
|
||||
loc:hotspot_expose(1000,10)
|
||||
sleep (60)
|
||||
src.icon_state = "trashcan"
|
||||
src.processing = 0
|
||||
return
|
||||
else
|
||||
src.icon_state = "trashcan"
|
||||
user << "\blue Due to conservation measures, the unit is unable to start until it is completely filled."
|
||||
return
|
||||
|
||||
|
||||
@@ -505,8 +505,6 @@
|
||||
|
||||
for(var/obj/T in (M.contents-implants))
|
||||
del(T)
|
||||
//for(var/R in M.organs)
|
||||
// del(M.organs[text("[]", R)])
|
||||
|
||||
O.loc = M.loc
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
if(!(P in src.verbs))
|
||||
src.verbs += P.verbpath
|
||||
|
||||
if(!mind.changeling.absorbed_dna.len)
|
||||
mind.changeling.absorbed_dna += dna
|
||||
mind.changeling.absorbed_dna |= dna
|
||||
return 1
|
||||
|
||||
//removes our changeling verbs
|
||||
@@ -110,17 +109,19 @@
|
||||
T << "<span class='danger'>You have been absorbed by the changeling!</span>"
|
||||
|
||||
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
|
||||
changeling.absorbed_dna += T.dna
|
||||
changeling.absorbed_dna |= T.dna
|
||||
if(usr.nutrition < 400) usr.nutrition = min((usr.nutrition + T.nutrition), 400)
|
||||
changeling.chem_charges += 10
|
||||
changeling.geneticpoints += 2
|
||||
|
||||
if(T.mind && T.mind.changeling)
|
||||
if(T.mind.changeling.absorbed_dna)
|
||||
changeling.absorbed_dna |= T.mind.changeling.absorbed_dna //steal all their loot
|
||||
changeling.absorbedcount += T.mind.changeling.absorbedcount
|
||||
|
||||
T.mind.changeling.absorbed_dna = list(T.dna)
|
||||
for(var/dna_data in T.mind.changeling.absorbed_dna) //steal all their loot
|
||||
if(dna_data in changeling.absorbed_dna)
|
||||
continue
|
||||
changeling.absorbed_dna += dna_data
|
||||
changeling.absorbedcount++
|
||||
T.mind.changeling.absorbed_dna.len = 1
|
||||
|
||||
if(T.mind.changeling.purchasedpowers)
|
||||
for(var/datum/power/changeling/Tp in T.mind.changeling.purchasedpowers)
|
||||
@@ -137,6 +138,8 @@
|
||||
changeling.chem_charges += T.mind.changeling.chem_charges
|
||||
changeling.geneticpoints += T.mind.changeling.geneticpoints
|
||||
T.mind.changeling.chem_charges = 0
|
||||
T.mind.changeling.geneticpoints = 0
|
||||
T.mind.changeling.absorbedcount = 0
|
||||
|
||||
changeling.absorbedcount++
|
||||
changeling.isabsorbing = 0
|
||||
@@ -344,12 +347,11 @@
|
||||
set category = "Changeling"
|
||||
set name = "Regenerative Stasis (20)"
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(20,0,100,DEAD)
|
||||
var/datum/changeling/changeling = changeling_power(20,1,100,DEAD)
|
||||
if(!changeling) return
|
||||
|
||||
changeling.chem_charges -= 20
|
||||
var/mob/living/carbon/C = usr
|
||||
C << "<span class='notice'>We will regenerate our form.</span>"
|
||||
C << "<span class='notice'>We will attempt to regenerate our form.</span>"
|
||||
|
||||
C.status_flags |= FAKEDEATH //play dead
|
||||
C.update_canmove()
|
||||
@@ -359,26 +361,28 @@
|
||||
C.tod = worldtime2text()
|
||||
|
||||
spawn(rand(800,2000))
|
||||
if(C.stat == DEAD)
|
||||
dead_mob_list -= C
|
||||
living_mob_list += C
|
||||
C.stat = CONSCIOUS
|
||||
C.tod = null
|
||||
C.setToxLoss(0)
|
||||
C.setOxyLoss(0)
|
||||
C.setCloneLoss(0)
|
||||
C.SetParalysis(0)
|
||||
C.SetStunned(0)
|
||||
C.SetWeakened(0)
|
||||
C.radiation = 0
|
||||
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
|
||||
C.reagents.clear_reagents()
|
||||
C << "<span class='notice'>We have regenerated.</span>"
|
||||
C.visible_message("<span class='warning'>[usr] appears to wake from the dead, having healed all wounds.</span>")
|
||||
if(changeling_power(20,1,100,DEAD))
|
||||
changeling.chem_charges -= 20
|
||||
if(C.stat == DEAD)
|
||||
dead_mob_list -= C
|
||||
living_mob_list += C
|
||||
C.stat = CONSCIOUS
|
||||
C.tod = null
|
||||
C.setToxLoss(0)
|
||||
C.setOxyLoss(0)
|
||||
C.setCloneLoss(0)
|
||||
C.SetParalysis(0)
|
||||
C.SetStunned(0)
|
||||
C.SetWeakened(0)
|
||||
C.radiation = 0
|
||||
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
|
||||
C.reagents.clear_reagents()
|
||||
C << "<span class='notice'>We have regenerated.</span>"
|
||||
C.visible_message("<span class='warning'>[usr] appears to wake from the dead, having healed all wounds.</span>")
|
||||
|
||||
C.status_flags &= ~(FAKEDEATH)
|
||||
C.update_canmove()
|
||||
C.make_changeling()
|
||||
C.status_flags &= ~(FAKEDEATH)
|
||||
C.update_canmove()
|
||||
C.make_changeling()
|
||||
feedback_add_details("changeling_powers","FD")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
icon_state = "cultblade"
|
||||
item_state = "cultblade"
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
force = 40
|
||||
w_class = 4
|
||||
force = 30
|
||||
throwforce = 10
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
|
||||
@@ -377,8 +377,8 @@ var/list/sacrificed = list()
|
||||
"\red You hear liquid flowing.")
|
||||
D.real_name = "Unknown"
|
||||
for(var/obj/item/weapon/paper/P in this_rune.loc)
|
||||
if(length(P.name)<=24)
|
||||
D.real_name = P.name
|
||||
if(P.info)
|
||||
D.real_name = copytext(P.info, 1, MAX_NAME_LEN)
|
||||
break
|
||||
D.universal_speak = 1
|
||||
D.nodamage = 0
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
|
||||
|
||||
/proc/carp_migration() // -- Darem
|
||||
for(var/obj/effect/landmark/C in world)
|
||||
for(var/obj/effect/landmark/C in landmarks_list)
|
||||
if(C.name == "carpspawn")
|
||||
new /mob/living/simple_animal/carp(C.loc)
|
||||
//sleep(100)
|
||||
@@ -383,7 +383,7 @@
|
||||
|
||||
for(var/i=1,i<=lightsoutAmount,i++)
|
||||
var/list/possibleEpicentres = list()
|
||||
for(var/obj/effect/landmark/newEpicentre in world)
|
||||
for(var/obj/effect/landmark/newEpicentre in landmarks_list)
|
||||
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
|
||||
possibleEpicentres += newEpicentre
|
||||
if(possibleEpicentres.len)
|
||||
|
||||
@@ -844,15 +844,16 @@ ________________________________________________________________________________
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit.
|
||||
if(I:stored)//If it has something on it.
|
||||
var/obj/item/weapon/disk/tech_disk/tdisk = I
|
||||
if(tdisk.stored)//If it has something on it.
|
||||
U << "Research information detected, processing..."
|
||||
if(do_after(U,s_delay))
|
||||
for(var/datum/tech/current_data in stored_research)
|
||||
if(current_data.id==I:stored.id)
|
||||
if(current_data.level<I:stored.level)
|
||||
current_data.level=I:stored.level
|
||||
if(current_data.id==tdisk.stored.id)
|
||||
if(current_data.level<tdisk.stored.level)
|
||||
current_data.level=tdisk.stored.level
|
||||
break
|
||||
I:stored = null
|
||||
tdisk.stored = null
|
||||
U << "\blue Data analyzed and updated. Disk erased."
|
||||
else
|
||||
U << "\red <b>ERROR</b>: \black Procedure interrupted. Process terminated."
|
||||
|
||||
@@ -133,7 +133,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
|
||||
//Here we pick a location and spawn the ninja.
|
||||
var/list/spawn_list = list()
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "carpspawn")
|
||||
spawn_list.Add(L)
|
||||
|
||||
@@ -411,7 +411,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
return
|
||||
|
||||
var/list/spawn_list = list()
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if (L.name == "carpspawn")
|
||||
spawn_list.Add(L)
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
spawn(0)//Forking here so we dont have to wait for this to finish
|
||||
mode.post_setup()
|
||||
//Cleanup some stuff
|
||||
for(var/obj/effect/landmark/start/S in world)
|
||||
for(var/obj/effect/landmark/start/S in landmarks_list)
|
||||
//Deleting Startpoints but we need the ai point to AI-ize people later
|
||||
if (S.name != "AI")
|
||||
del(S)
|
||||
|
||||
@@ -167,11 +167,11 @@ rcd light flash thingy on matter drain
|
||||
C.upgradeMotion()
|
||||
upgraded = 1
|
||||
// Add it to machines that process
|
||||
machines |= src
|
||||
machines |= C
|
||||
|
||||
if(upgraded)
|
||||
UC.uses --
|
||||
C.visible_message("<span class='notice'>\icon[src] *beep*</span>")
|
||||
C.visible_message("<span class='notice'>\icon[C] *beep*</span>")
|
||||
usr << "Camera successully upgraded!"
|
||||
else
|
||||
usr << "This camera is already upgraded!"
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
var/nukes_left = 1 // Call 3714-PRAY right now and order more nukes! Limited offer!
|
||||
var/nuke_off_station = 0 //Used for tracking if the syndies actually haul the nuke to the station
|
||||
var/herp = 0 //Used for tracking if the syndies got the shuttle off of the z-level
|
||||
//It is so hillarious so I wont rename those two variables --rastaf0
|
||||
var/syndies_didnt_escape = 0 //Used for tracking if the syndies got the shuttle off of the z-level
|
||||
|
||||
|
||||
/datum/game_mode/nuclear/announce()
|
||||
@@ -112,7 +111,7 @@
|
||||
|
||||
var/list/turf/synd_spawn = list()
|
||||
|
||||
for(var/obj/effect/landmark/A in world)
|
||||
for(var/obj/effect/landmark/A in landmarks_list)
|
||||
if (A.name == "Syndicate-Gear-Closet")
|
||||
new /obj/structure/closet/syndicate/personal(A.loc)
|
||||
del(A)
|
||||
@@ -229,10 +228,10 @@
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/card/id/syndicate(synd_mob), slot_wear_id)
|
||||
if(synd_mob.backbag == 2) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(synd_mob), slot_back)
|
||||
if(synd_mob.backbag == 3) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(synd_mob), slot_back)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/ammo_magazine/a50(synd_mob), slot_in_backpack)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/ammo_magazine/a50(synd_mob), slot_in_backpack)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/ammo_magazine/a12mm(synd_mob), slot_in_backpack)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/ammo_magazine/a12mm(synd_mob), slot_in_backpack)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(synd_mob), slot_in_backpack)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/deagle(synd_mob), slot_belt)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/c20r(synd_mob), slot_belt)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(synd_mob.back), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob)
|
||||
E.imp_in = synd_mob
|
||||
@@ -269,25 +268,25 @@
|
||||
|
||||
//nukes_left
|
||||
//station_was_nuked
|
||||
//derp //Used for tracking if the syndies actually haul the nuke to the station
|
||||
//herp //Used for tracking if the syndies got the shuttle off of the z-level
|
||||
//derp //Used for tracking if the syndies actually haul the nuke to the station //no
|
||||
//herp //Used for tracking if the syndies got the shuttle off of the z-level //NO, DON'T FUCKING NAME VARS LIKE THIS
|
||||
|
||||
if (!disk_rescued && station_was_nuked && !herp)
|
||||
if (!disk_rescued && station_was_nuked && !syndies_didnt_escape)
|
||||
feedback_set_details("round_end_result","win - syndicate nuke")
|
||||
world << "<FONT size = 3><B>Syndicate Major Victory!</B></FONT>"
|
||||
world << "<B>[syndicate_name()] operatives have destroyed [station_name()]!</B>"
|
||||
|
||||
else if (!disk_rescued && station_was_nuked && herp)
|
||||
else if (!disk_rescued && station_was_nuked && syndies_didnt_escape)
|
||||
feedback_set_details("round_end_result","halfwin - syndicate nuke - did not evacuate in time")
|
||||
world << "<FONT size = 3><B>Total Annihilation</B></FONT>"
|
||||
world << "<B>[syndicate_name()] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion.</B> Next time, don't lose the disk!"
|
||||
|
||||
else if (!disk_rescued && !station_was_nuked && nuke_off_station && !herp)
|
||||
else if (!disk_rescued && !station_was_nuked && nuke_off_station && !syndies_didnt_escape)
|
||||
feedback_set_details("round_end_result","halfwin - blew wrong station")
|
||||
world << "<FONT size = 3><B>Crew Minor Victory</B></FONT>"
|
||||
world << "<B>[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()].</B> Next time, don't lose the disk!"
|
||||
|
||||
else if (!disk_rescued && !station_was_nuked && nuke_off_station && herp)
|
||||
else if (!disk_rescued && !station_was_nuked && nuke_off_station && syndies_didnt_escape)
|
||||
feedback_set_details("round_end_result","halfwin - blew wrong station - did not evacuate in time")
|
||||
world << "<FONT size = 3><B>[syndicate_name()] operatives have earned Darwin Award!</B></FONT>"
|
||||
world << "<B>[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion.</B> Next time, don't lose the disk!"
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
if (ticker)
|
||||
if(ticker.mode && ticker.mode.name == "nuclear emergency")
|
||||
ticker.mode:herp = syndicate_station_at_station
|
||||
ticker.mode:syndies_didnt_escape = syndicate_station_at_station
|
||||
ticker.mode:nuke_off_station = off_station
|
||||
ticker.station_explosion_cinematic(off_station,null)
|
||||
if(ticker.mode)
|
||||
|
||||
@@ -51,7 +51,7 @@ datum/objective/assassinate
|
||||
|
||||
check_completion()
|
||||
if(target && target.current)
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current)) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
/* This was used for something before, I think, but is not worth the effort to process now.
|
||||
/proc/setupcorpses()
|
||||
for (var/obj/effect/landmark/A in world)
|
||||
for (var/obj/effect/landmark/A in landmarks_list)
|
||||
if (A.name == "Corpse")
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
/mob/proc/rightandwrong()
|
||||
message_admins("[key_name_admin(usr, 1)] summoned guns!")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if(H.stat == 2 || !(H.client)) continue
|
||||
if(is_special_character(H)) continue
|
||||
|
||||
@@ -211,7 +211,6 @@
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser(Z)
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/wall(Z)
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/floor(Z)
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/wall/reinforced(Z)
|
||||
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone(Z)
|
||||
Z.cancel_camera()
|
||||
del(C)
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
if("Station Engineer")
|
||||
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
|
||||
if("Assistant")
|
||||
return list(access_maint_tunnels)
|
||||
return list()
|
||||
if("Chaplain")
|
||||
return list(access_morgue, access_chapel_office, access_crematorium)
|
||||
if("Detective")
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar(H), slot_wear_mask)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H), slot_r_hand)
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/ce(H), slot_l_store)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat/white(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette(H), slot_wear_mask)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
|
||||
if(H.backbag == 1)
|
||||
|
||||
@@ -299,7 +299,7 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
if(!joined_late)
|
||||
var/obj/S = null
|
||||
for(var/obj/effect/landmark/start/sloc in world)
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if(sloc.name != rank) continue
|
||||
if(locate(/mob/living) in sloc.loc) continue
|
||||
S = sloc
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/obj/effect/landmark/New()
|
||||
|
||||
..()
|
||||
tag = text("landmark*[]", name)
|
||||
invisibility = 101
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("shuttle")
|
||||
shuttle_z = z
|
||||
del(src)
|
||||
|
||||
if("airtunnel_stop")
|
||||
airtunnel_stop = x
|
||||
|
||||
if("airtunnel_start")
|
||||
airtunnel_start = x
|
||||
|
||||
if("airtunnel_bottom")
|
||||
airtunnel_bottom = y
|
||||
|
||||
if("monkey")
|
||||
monkeystart += loc
|
||||
del(src)
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
del(src)
|
||||
|
||||
if("wizard")
|
||||
wizardstart += loc
|
||||
del(src)
|
||||
|
||||
if("JoinLate")
|
||||
latejoin += loc
|
||||
del(src)
|
||||
|
||||
//prisoners
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
del(src)
|
||||
// if("mazewarp")
|
||||
// mazewarp += loc
|
||||
if("Holding Facility")
|
||||
holdingfacility += loc
|
||||
if("tdome1")
|
||||
tdome1 += loc
|
||||
if("tdome2")
|
||||
tdome2 += loc
|
||||
if("tdomeadmin")
|
||||
tdomeadmin += loc
|
||||
if("tdomeobserve")
|
||||
tdomeobserve += loc
|
||||
//not prisoners
|
||||
if("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
del(src)
|
||||
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
del(src)
|
||||
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
del(src)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/start/New()
|
||||
..()
|
||||
tag = "start*[name]"
|
||||
invisibility = 101
|
||||
|
||||
return 1
|
||||
@@ -140,8 +140,8 @@
|
||||
itemname = P.name
|
||||
info = P.notehtml
|
||||
U << "You hold \a [itemname] up to the camera ..."
|
||||
for(var/mob/living/silicon/ai/O in player_list)
|
||||
//if (O.current == src)
|
||||
for(var/mob/living/silicon/ai/O in living_mob_list)
|
||||
if(!O.client) continue
|
||||
if(U.name == "Unknown") O << "<b>[U]</b> holds \a [itemname] up to one of your cameras ..."
|
||||
else O << "<b><a href='byond://?src=\ref[O];track2=\ref[O];track=\ref[U]'>[U]</a></b> holds \a [itemname] up to one of your cameras ..."
|
||||
O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
|
||||
@@ -246,7 +246,7 @@
|
||||
var/turf/simulated/wall/T = null
|
||||
for(var/i = 1, i <= 8; i += i)
|
||||
T = get_ranged_target_turf(src, i, 1)
|
||||
if(!isnull(T) && istype(T))
|
||||
if(istype(T))
|
||||
//If someone knows a better way to do this, let me know. -Giacom
|
||||
switch(i)
|
||||
if(NORTH)
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
if(iswelder(W))
|
||||
if(weld(W, user))
|
||||
user << "You weld the assembly securely into place."
|
||||
anchored = 1
|
||||
state = 2
|
||||
return
|
||||
|
||||
@@ -67,6 +68,7 @@
|
||||
if(weld(W, user))
|
||||
user << "You unweld the assembly from it's place."
|
||||
state = 1
|
||||
anchored = 1
|
||||
return
|
||||
|
||||
|
||||
@@ -96,14 +98,14 @@
|
||||
|
||||
else if(iswirecutter(W))
|
||||
|
||||
new/obj/item/weapon/cable_coil(src.loc, 2)
|
||||
new/obj/item/weapon/cable_coil(get_turf(src), 2)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "You cut the wires from the circuits."
|
||||
state = 2
|
||||
return
|
||||
|
||||
// Upgrades!
|
||||
if(is_type_in_list(W, possible_upgrades))
|
||||
if(is_type_in_list(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already.
|
||||
user << "You attach the [W] into the assembly inner circuits."
|
||||
upgrades += W
|
||||
user.drop_item(W)
|
||||
@@ -116,7 +118,7 @@
|
||||
if(U)
|
||||
user << "You unattach an upgrade from the assembly."
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
U.loc = src.loc
|
||||
U.loc = get_turf(src)
|
||||
upgrades -= U
|
||||
return
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
// Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this.
|
||||
if(M.loc.z == 2)
|
||||
continue
|
||||
if(M.loc.z > 6)
|
||||
continue
|
||||
if(M == usr)
|
||||
continue
|
||||
if(M.invisibility)//cloaked
|
||||
@@ -105,8 +107,8 @@
|
||||
return
|
||||
|
||||
if (!near_camera(target))
|
||||
U << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)."
|
||||
sleep(50) //because we're sleeping another second after this (a few lines down)
|
||||
U << "Target is not near any active cameras."
|
||||
sleep(100)
|
||||
continue
|
||||
|
||||
if(U.eyeobj)
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
|
||||
/obj/machinery/cell_charger
|
||||
name = "cell charger"
|
||||
desc = "It charges power cells."
|
||||
@@ -19,13 +16,13 @@
|
||||
|
||||
if(charging && !(stat & (BROKEN|NOPOWER)) )
|
||||
|
||||
var/newlevel = round( charging.percent() * 4.0 / 99 )
|
||||
var/newlevel = round(charging.percent() * 4.0 / 99)
|
||||
//world << "nl: [newlevel]"
|
||||
|
||||
if(chargelevel != newlevel)
|
||||
|
||||
overlays = null
|
||||
overlays += image('icons/obj/power.dmi', "ccharger-o[newlevel]")
|
||||
overlays += "ccharger-o[newlevel]"
|
||||
|
||||
chargelevel = newlevel
|
||||
else
|
||||
@@ -87,7 +84,7 @@
|
||||
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
|
||||
return
|
||||
|
||||
var/added = charging.give(75)
|
||||
use_power(added / CELLRATE)
|
||||
use_power(200) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
|
||||
charging.give(175) //inefficiency.
|
||||
|
||||
updateicon()
|
||||
|
||||
@@ -154,7 +154,8 @@
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "\blue You connect the monitor."
|
||||
new /mob/living/silicon/ai ( loc, laws, brain )
|
||||
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain )
|
||||
A.rename_self("ai", 1)
|
||||
feedback_inc("cyborg_ais_created",1)
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
|
||||
if(!isAI(user))
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if (src.z > 6)
|
||||
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
usr.machine = src
|
||||
|
||||
if(!href_list["operation"])
|
||||
@@ -274,6 +277,9 @@
|
||||
/obj/machinery/computer/communications/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
var/dat = "<head><title>Communications Console</title></head><body>"
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..()) return
|
||||
if (src.z > 6)
|
||||
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=crewcomp")
|
||||
usr.machine = null
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
|
||||
|
||||
attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||
if (user.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/aiModule))
|
||||
var/obj/item/weapon/aiModule/M = O
|
||||
M.install(src)
|
||||
|
||||
@@ -8,13 +8,14 @@
|
||||
var/obj/machinery/mass_driver/connected = null
|
||||
var/timing = 0.0
|
||||
var/time = 30.0
|
||||
var/title = "Mass Driver Controls"
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
for(var/obj/machinery/mass_driver/M in world)
|
||||
if (M.id == id)
|
||||
if(M.id == id)
|
||||
connected = M
|
||||
else
|
||||
return
|
||||
@@ -25,18 +26,16 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if (!( connected ))
|
||||
if(!( connected ))
|
||||
viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
|
||||
return
|
||||
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if (M.id == id)
|
||||
spawn( 0 )
|
||||
M.open()
|
||||
return
|
||||
if(M.id == id)
|
||||
M.open()
|
||||
return
|
||||
sleep(20)
|
||||
|
||||
//connected.drive() *****RM from 40.93.3S
|
||||
for(var/obj/machinery/mass_driver/M in world)
|
||||
if(M.id == id)
|
||||
M.power = connected.power
|
||||
@@ -44,10 +43,9 @@
|
||||
|
||||
sleep(50)
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if (M.id == id)
|
||||
spawn( 0 )
|
||||
M.close()
|
||||
return
|
||||
if(M.id == id)
|
||||
M.close()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -55,7 +53,7 @@
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (stat & BROKEN)
|
||||
if(stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
|
||||
new /obj/item/weapon/shard( loc )
|
||||
@@ -119,40 +117,38 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/dat = "<HTML><BODY><TT><B>Mass Driver Controls</B>"
|
||||
var/dat = "<HTML><BODY><TT><B>[title]</B>"
|
||||
user.machine = src
|
||||
var/d2
|
||||
if (timing)
|
||||
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Launch</A>", src)
|
||||
else
|
||||
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Launch</A>", src)
|
||||
var/second = time % 60
|
||||
var/minute = (time - second) / 60
|
||||
dat += text("<HR>\nTimer System: []\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>", d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
|
||||
if (connected)
|
||||
if(connected)
|
||||
var/d2
|
||||
if(timing) //door controls do not need timers.
|
||||
d2 = "<A href='?src=\ref[src];time=0'>Stop Time Launch</A>"
|
||||
else
|
||||
d2 = "<A href='?src=\ref[src];time=1'>Initiate Time Launch</A>"
|
||||
var/second = time % 60
|
||||
var/minute = (time - second) / 60
|
||||
dat += "<HR>\nTimer System: [d2]\nTime Left: [minute ? "[minute]:" : null][second] <A href='?src=\ref[src];tp=-30'>-</A> <A href='?src=\ref[src];tp=-1'>-</A> <A href='?src=\ref[src];tp=1'>+</A> <A href='?src=\ref[src];tp=30'>+</A>"
|
||||
var/temp = ""
|
||||
var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 )
|
||||
for(var/t in L)
|
||||
if (t == connected.power)
|
||||
temp += text("[] ", t)
|
||||
if(t == connected.power)
|
||||
temp += "[t] "
|
||||
else
|
||||
temp += text("<A href = '?src=\ref[];power=[]'>[]</A> ", src, t, t)
|
||||
//Foreach goto(172)
|
||||
dat += text("<HR>\nPower Level: []<BR>\n<A href = '?src=\ref[];alarm=1'>Firing Sequence</A><BR>\n<A href = '?src=\ref[];drive=1'>Test Fire Driver</A><BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", temp, src, src, src)
|
||||
//*****RM from 40.93.3S
|
||||
temp += "<A href = '?src=\ref[src];power=[t]'>[t]</A> "
|
||||
dat += "<HR>\nPower Level: [temp]<BR>\n<A href = '?src=\ref[src];alarm=1'>Firing Sequence</A><BR>\n<A href = '?src=\ref[src];drive=1'>Test Fire Driver</A><BR>\n<A href = '?src=\ref[src];door=1'>Toggle Outer Door</A><BR>"
|
||||
else
|
||||
dat += text("<BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", src)
|
||||
//*****
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user)
|
||||
dat += "<BR>\n<A href = '?src=\ref[src];door=1'>Toggle Outer Door</A><BR>"
|
||||
dat += "<BR><BR><A href='?src=\ref[user];mach_close=computer'>Close</A></TT></BODY></HTML>"
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
add_fingerprint(usr)
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/process()
|
||||
..()
|
||||
if (timing)
|
||||
if (time > 0)
|
||||
if(timing)
|
||||
if(time > 0)
|
||||
time = round(time) - 1
|
||||
else
|
||||
alarm()
|
||||
@@ -165,42 +161,28 @@
|
||||
/obj/machinery/computer/pod/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.machine = src
|
||||
if (href_list["power"])
|
||||
if(href_list["power"])
|
||||
var/t = text2num(href_list["power"])
|
||||
t = min(max(0.25, t), 16)
|
||||
if (connected)
|
||||
if(connected)
|
||||
connected.power = t
|
||||
else
|
||||
if (href_list["alarm"])
|
||||
alarm()
|
||||
else
|
||||
if (href_list["time"])
|
||||
timing = text2num(href_list["time"])
|
||||
else
|
||||
if (href_list["tp"])
|
||||
var/tp = text2num(href_list["tp"])
|
||||
time += tp
|
||||
time = min(max(round(time), 0), 120)
|
||||
if(href_list["alarm"])
|
||||
alarm()
|
||||
if(href_list["time"])
|
||||
timing = text2num(href_list["time"])
|
||||
if(href_list["tp"])
|
||||
var/tp = text2num(href_list["tp"])
|
||||
time += tp
|
||||
time = min(max(round(time), 0), 120)
|
||||
if(href_list["door"])
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if(M.id == id)
|
||||
if(M.density)
|
||||
M.open()
|
||||
else
|
||||
if (href_list["door"])
|
||||
if(istype(src, /obj/machinery/computer/pod/old/syndicate))//Added here so Nuke ops don't go running naked into space before moving the shuttle.
|
||||
if(syndicate_station_at_station == 0)
|
||||
usr << "\red You need to launch the Syndicate Shuttle via the computer terminal at the head of the ship before departing."
|
||||
return
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if (M.id == id)
|
||||
if (M.density)
|
||||
spawn( 0 )
|
||||
M.open()
|
||||
return
|
||||
else
|
||||
spawn( 0 )
|
||||
M.close()
|
||||
return
|
||||
//Foreach goto(298)
|
||||
add_fingerprint(usr)
|
||||
M.close()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -209,12 +191,14 @@
|
||||
/obj/machinery/computer/pod/old
|
||||
icon_state = "old"
|
||||
name = "DoorMex Control Computer"
|
||||
title = "Door Controls"
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/old/syndicate
|
||||
name = "ProComp Executive IIc"
|
||||
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
|
||||
title = "External Airlock Controls"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
/obj/machinery/computer/robotics/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
user.machine = src
|
||||
var/dat
|
||||
if (src.temp)
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
var/dat
|
||||
|
||||
if (temp)
|
||||
|
||||
@@ -81,10 +81,10 @@ var/specops_shuttle_timeleft = 0
|
||||
sleep(10)
|
||||
|
||||
var/spawn_marauder[] = new()
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "Marauder Entry")
|
||||
spawn_marauder.Add(L)
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "Marauder Exit")
|
||||
var/obj/effect/portal/P = new(L.loc)
|
||||
P.invisibility = 101//So it is not seen by anyone.
|
||||
@@ -83,10 +83,10 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
sleep(10)
|
||||
|
||||
var/spawn_marauder[] = new()
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "Marauder Entry")
|
||||
spawn_marauder.Add(L)
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "Marauder Exit")
|
||||
var/obj/effect/portal/P = new(L.loc)
|
||||
P.invisibility = 101//So it is not seen by anyone.
|
||||
@@ -429,10 +429,8 @@ About the new airlock wires panel:
|
||||
//tries to open the door without ID
|
||||
//will succeed only if the ID wire is cut or the door requires no access
|
||||
if(!src.requiresID() || src.check_access(null))
|
||||
if(src.density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
if(density) open()
|
||||
else close()
|
||||
if(AIRLOCK_WIRE_SAFETY)
|
||||
safe = !safe
|
||||
if(!src.density)
|
||||
@@ -1234,75 +1232,29 @@ About the new airlock wires panel:
|
||||
|
||||
del(src)
|
||||
return
|
||||
else if(src.arePowerSystemsOn() && !(stat & NOPOWER))
|
||||
user << "\blue The airlock's motors resist your efforts to pry it open."
|
||||
else if(src.locked)
|
||||
user << "\blue The airlock's bolts prevent it from being pried open."
|
||||
if((src.density) && (!( src.welded ) && !( src.operating ) && ((!src.arePowerSystemsOn()) || (stat & NOPOWER)) && !( src.locked )))
|
||||
|
||||
if(beingcrowbarred == 0) //being fireaxe'd
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = C
|
||||
if(F:wielded)
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("opening")
|
||||
|
||||
sleep(15)
|
||||
|
||||
layer = 2.7
|
||||
src.density = 0
|
||||
update_icon()
|
||||
|
||||
src.SetOpacity(0) //ugh...lots of lag for something so trivial
|
||||
src.operating = 0
|
||||
return
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
return
|
||||
else
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("opening")
|
||||
|
||||
sleep(15)
|
||||
|
||||
layer = 2.7
|
||||
src.density = 0
|
||||
update_icon()
|
||||
|
||||
src.SetOpacity(0) //ugh...lots of lag for something so trivial
|
||||
src.operating = 0
|
||||
return
|
||||
|
||||
else
|
||||
if((!src.density) && (!( src.welded ) && !( src.operating ) && !( src.locked )))
|
||||
if(beingcrowbarred == 0)
|
||||
else if(arePowerSystemsOn() && !(stat & NOPOWER))
|
||||
user << "\blue The airlock's motors resist your efforts to force it."
|
||||
else if(locked)
|
||||
user << "\blue The airlock's bolts prevent it from being forced."
|
||||
else if( !welded && !operating )
|
||||
if(density)
|
||||
if(beingcrowbarred == 0) //being fireaxe'd
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = C
|
||||
if(F:wielded)
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("closing")
|
||||
|
||||
layer = 3.1
|
||||
src.density = 1
|
||||
sleep(15)
|
||||
update_icon()
|
||||
|
||||
src.SetOpacity(initial(opacity))
|
||||
src.operating = 0
|
||||
spawn(0) open(1)
|
||||
else
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
else
|
||||
spawn( 0 )
|
||||
src.operating = 1
|
||||
animate("closing")
|
||||
|
||||
layer = 3.1
|
||||
src.density = 1
|
||||
sleep(15)
|
||||
update_icon()
|
||||
|
||||
src.SetOpacity(initial(opacity))
|
||||
src.operating = 0
|
||||
spawn(0) open(1)
|
||||
else
|
||||
if(beingcrowbarred == 0)
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = C
|
||||
if(F:wielded)
|
||||
spawn(0) close(1)
|
||||
else
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
else
|
||||
spawn(0) close(1)
|
||||
|
||||
else
|
||||
..()
|
||||
@@ -1313,9 +1265,12 @@ About the new airlock wires panel:
|
||||
ignite(is_hot(C))
|
||||
..()
|
||||
|
||||
/obj/machinery/door/airlock/open()
|
||||
if(src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_OPEN_DOOR) || src.operating)
|
||||
/obj/machinery/door/airlock/open(var/forced=0)
|
||||
if( operating || welded || locked )
|
||||
return 0
|
||||
if(!forced)
|
||||
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
|
||||
return 0
|
||||
use_power(50)
|
||||
if(istype(src, /obj/machinery/door/airlock/glass))
|
||||
playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1)
|
||||
@@ -1327,9 +1282,12 @@ About the new airlock wires panel:
|
||||
src.closeOther.close()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/airlock/close()
|
||||
if(src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) || src.operating)
|
||||
/obj/machinery/door/airlock/close(var/forced=0)
|
||||
if(operating || welded || locked)
|
||||
return
|
||||
if(!forced)
|
||||
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) )
|
||||
return
|
||||
if(safe)
|
||||
if(locate(/mob/living) in get_turf(src))
|
||||
// playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete
|
||||
|
||||
@@ -94,10 +94,9 @@
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
|
||||
if(allowed(user) && density)
|
||||
open()
|
||||
else if(density)
|
||||
flick("door_deny", src)
|
||||
if(density)
|
||||
if(allowed(user)) open()
|
||||
else flick("door_deny", src)
|
||||
return
|
||||
|
||||
meteorhit(obj/M as obj)
|
||||
@@ -199,10 +198,10 @@
|
||||
|
||||
|
||||
open()
|
||||
if(!density) return 1
|
||||
if(!density) return 1
|
||||
if(operating > 0) return
|
||||
if(!ticker) return 0
|
||||
if(!operating) operating = 1
|
||||
if(!ticker) return 0
|
||||
if(!operating) operating = 1
|
||||
|
||||
animate("opening")
|
||||
icon_state = "door0"
|
||||
@@ -212,7 +211,7 @@
|
||||
src.density = 0
|
||||
explosion_resistance = 0
|
||||
update_icon()
|
||||
// src.SetOpacity(0)
|
||||
SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating) operating = 0
|
||||
@@ -238,8 +237,8 @@
|
||||
src.layer = 3.1
|
||||
sleep(10)
|
||||
update_icon()
|
||||
|
||||
src.SetOpacity(initial(opacity))
|
||||
if(visible && !glass)
|
||||
SetOpacity(1) //caaaaarn!
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
return
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
/var/const/OPEN = 1
|
||||
/var/const/CLOSED = 2
|
||||
|
||||
|
||||
/obj/machinery/door/firedoor
|
||||
name = "Firelock"
|
||||
desc = "Apply crowbar"
|
||||
icon = 'icons/obj/doors/Doorfire.dmi'
|
||||
icon_state = "door_open"
|
||||
var/blocked = 0
|
||||
opacity = 0
|
||||
density = 0
|
||||
var/blocked = 0
|
||||
var/nextstate = null
|
||||
|
||||
|
||||
@@ -28,26 +27,24 @@
|
||||
|
||||
|
||||
attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
if(operating) return//Already doing something.
|
||||
if(istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
if(W.remove_fuel(0, user))
|
||||
src.blocked = !src.blocked
|
||||
blocked = !blocked
|
||||
user << text("\red You [blocked?"welded":"unwelded"] the [src]")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (istype(C, /obj/item/weapon/crowbar) || (istype(C,/obj/item/weapon/twohanded/fireaxe) && C:wielded == 1))
|
||||
if(istype(C, /obj/item/weapon/crowbar) || (istype(C,/obj/item/weapon/twohanded/fireaxe) && C:wielded == 1))
|
||||
if(blocked || operating) return
|
||||
if(src.density)
|
||||
spawn(0)
|
||||
open()
|
||||
return
|
||||
else //close it up again
|
||||
spawn(0)
|
||||
close()
|
||||
return
|
||||
if(density)
|
||||
open()
|
||||
return
|
||||
else //close it up again //fucking 10/10 commenting here einstein
|
||||
close()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -56,11 +53,9 @@
|
||||
return
|
||||
switch(nextstate)
|
||||
if(OPEN)
|
||||
spawn()
|
||||
open()
|
||||
open()
|
||||
if(CLOSED)
|
||||
spawn()
|
||||
close()
|
||||
close()
|
||||
nextstate = null
|
||||
return
|
||||
|
||||
@@ -104,9 +99,9 @@
|
||||
return 1
|
||||
|
||||
|
||||
//todo: is this needed?
|
||||
/*update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
//skytodo
|
||||
update_nearby_tiles(need_rebuild)
|
||||
/*if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/destination = get_step(source,dir)
|
||||
@@ -124,9 +119,5 @@
|
||||
air_master.tiles_to_update += destination
|
||||
else
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(destination)) air_master.tiles_to_update += destination
|
||||
return 1*/
|
||||
|
||||
/obj/machinery/door/firedoor/border_only/hazard
|
||||
name = "hazard door"
|
||||
icon = 'icons/obj/doors/DoorHazard.dmi'
|
||||
if(istype(destination)) air_master.tiles_to_update += destination*/
|
||||
return 1
|
||||
@@ -8,10 +8,10 @@
|
||||
layer = 3.1
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if (!( istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1) ))
|
||||
add_fingerprint(user)
|
||||
if(!(istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1) ))
|
||||
return
|
||||
if(src.density && (stat & NOPOWER) && !src.operating)
|
||||
if(density && (stat & NOPOWER) && !operating)
|
||||
operating = 1
|
||||
spawn(-1)
|
||||
flick("shutterc0", src)
|
||||
@@ -24,16 +24,16 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/open()
|
||||
if (src.operating == 1) //doors can still open when emag-disabled
|
||||
if(operating == 1) //doors can still open when emag-disabled
|
||||
return
|
||||
if (!ticker)
|
||||
if(!ticker)
|
||||
return 0
|
||||
if(!operating) //in case of emag
|
||||
operating = 1
|
||||
flick("shutterc0", src)
|
||||
src.icon_state = "shutter0"
|
||||
icon_state = "shutter0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
density = 0
|
||||
SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
@@ -45,16 +45,16 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/close()
|
||||
if (src.operating)
|
||||
if(operating)
|
||||
return
|
||||
src.operating = 1
|
||||
operating = 1
|
||||
flick("shutterc1", src)
|
||||
src.icon_state = "shutter1"
|
||||
src.density = 1
|
||||
if(src.visible)
|
||||
icon_state = "shutter1"
|
||||
density = 1
|
||||
if(visible)
|
||||
SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
src.operating = 0
|
||||
operating = 0
|
||||
return
|
||||
@@ -26,7 +26,7 @@ var/const/HOLOPAD_MODE = 0
|
||||
last_request = world.time
|
||||
user << "<span class='notice'>You request an AI's presence.</span>"
|
||||
var/area/area = get_area(src)
|
||||
for(var/mob/living/silicon/ai/AI in player_list)
|
||||
for(var/mob/living/silicon/ai/AI in living_mob_list)
|
||||
if(!AI.client) continue
|
||||
AI << "<span class='info'>Your presence is requested at <a href='?src=\ref[AI];jumptoholopad=\ref[src]'>\the [area]</a>.</span>"
|
||||
else
|
||||
@@ -50,8 +50,7 @@ var/const/HOLOPAD_MODE = 0
|
||||
if(!(stat & NOPOWER) && user.eyeobj.loc == src.loc)//If the projector has power and client eye is on it.
|
||||
if(!hologram)//If there is not already a hologram.
|
||||
create_holo(user)//Create one.
|
||||
for(var/mob/M in viewers())
|
||||
M.show_message("A holographic image of [user] flicks to life right before your eyes!",1)
|
||||
src.visible_message("A holographic image of [user] flicks to life right before your eyes!")
|
||||
else
|
||||
user << "\red ERROR: \black Image feed in progress."
|
||||
else
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
metroid
|
||||
input = /mob/living/carbon/metroid
|
||||
output = /obj/item/weapon/reagent_containers/food/drinks/jar
|
||||
output = /obj/item/weapon/reagent_containers/glass/beaker/roro
|
||||
|
||||
monkey
|
||||
process(loc, what)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
var/obj/L = null
|
||||
|
||||
for(var/obj/effect/landmark/sloc in world)
|
||||
for(var/obj/effect/landmark/sloc in landmarks_list)
|
||||
if(sloc.name != C.data) continue
|
||||
if(locate(/mob/living) in sloc.loc) continue
|
||||
L = sloc
|
||||
@@ -66,7 +66,7 @@
|
||||
var/turf/T = get_turf(R)
|
||||
if (!T)
|
||||
continue
|
||||
if(T.z == 2)
|
||||
if(T.z == 2 || T.z > 7)
|
||||
continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
|
||||
@@ -1,40 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
|
||||
// /obj/item/weapon/pickaxe/hammer =4, //Waiting on a sprite
|
||||
/obj/item/weapon/pickaxe/silver =4,
|
||||
/obj/item/weapon/pickaxe/drill =4,
|
||||
/obj/item/weapon/pickaxe/jackhammer =4,
|
||||
/mob/living/simple_animal/carp =3,
|
||||
/obj/item/weapon/pickaxe/diamond =3,
|
||||
/obj/item/weapon/pickaxe/diamonddrill =3,
|
||||
/obj/item/weapon/pickaxe/gold =3,
|
||||
/obj/item/weapon/pickaxe/plasmacutter =2,
|
||||
/obj/structure/closet/syndicate/resources =2,
|
||||
/obj/item/weapon/melee/energy/sword/pirate =1,
|
||||
/obj/mecha/working/ripley/mining =1
|
||||
|
||||
// /obj/creature =0,
|
||||
// /obj/item/weapon/rcd =0,
|
||||
// /obj/item/weapon/rcd_ammo =0,
|
||||
// /obj/item/weapon/spacecash =0,
|
||||
// /obj/item/weapon/cloaking_device =0,
|
||||
// /obj/item/weapon/gun/energy/teleport_gun =0,
|
||||
// /obj/item/weapon/rubber_chicken =0,
|
||||
// /obj/machinery/wish_granter =0, // Okayyyy... Mayyyybe Kor is kinda sorta right. A little. Tiny bit. >.>
|
||||
// /obj/item/clothing/glasses/thermal =0, // Could maybe be cool as its own rapid mode, sorta like wizard. Maybe.
|
||||
// /obj/item/weapon/storage/box/stealth/ =0
|
||||
// =11
|
||||
)
|
||||
|
||||
var/global/list/spawned_surprises = list()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/wish_granter
|
||||
name = "Wish Granter"
|
||||
desc = "You're not so sure about this, anymore..."
|
||||
@@ -107,18 +70,4 @@ var/global/list/spawned_surprises = list()
|
||||
|
||||
user << "You have a very bad feeling about this."
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/stealth/
|
||||
name = "Infiltration Gear"
|
||||
desc = "An old box full of old equipment. It doesn't look like it was ever opened."
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/stealth/New()
|
||||
..()
|
||||
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/clothing/mask/gas/voice(src)
|
||||
new /obj/item/weapon/card/id/syndicate(src)
|
||||
new /obj/item/clothing/shoes/syndigaloshes(src)
|
||||
return
|
||||
return
|
||||
@@ -400,11 +400,17 @@
|
||||
/obj/machinery/mecha_part_fabricator/proc/process_queue()
|
||||
var/obj/item/part = listgetindex(src.queue, 1)
|
||||
if(!part)
|
||||
remove_from_queue(1)
|
||||
return process_queue()
|
||||
if(remove_from_queue(1))
|
||||
return process_queue()
|
||||
else
|
||||
// Most likely means we have an empty queue, so stop processing
|
||||
return 0
|
||||
if(!(part.vars.Find("construction_time")) || !(part.vars.Find("construction_cost")))//If it shouldn't be printed
|
||||
remove_from_queue(1)//Take it out of the quene
|
||||
return process_queue()//Then reprocess it
|
||||
if(remove_from_queue(1))//Take it out of the quene
|
||||
return process_queue()//Then reprocess it
|
||||
else
|
||||
// Most likely means we have an empty queue, so stop processing
|
||||
return 0
|
||||
temp = null
|
||||
while(part)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
|
||||
@@ -948,7 +948,8 @@
|
||||
lights = !lights
|
||||
if(lights) SetLuminosity(luminosity + lights_power)
|
||||
else SetLuminosity(luminosity - lights_power)
|
||||
log_message("Toggled lights.")
|
||||
src.occupant_message("Toggled lights [lights?"on":"off"].")
|
||||
log_message("Toggled lights [lights?"on":"off"].")
|
||||
return
|
||||
|
||||
|
||||
@@ -960,6 +961,7 @@
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
use_internal_tank = !use_internal_tank
|
||||
src.occupant_message("Now taking air from [use_internal_tank?"internal airtank":"environment"].")
|
||||
src.log_message("Now taking air from [use_internal_tank?"internal airtank":"environment"].")
|
||||
return
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/health = 50
|
||||
var/health = 15
|
||||
|
||||
node
|
||||
icon_state = "weednode"
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
layer = 16.0
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/point/point()
|
||||
set src in oview()
|
||||
set hidden = 1
|
||||
return
|
||||
|
||||
// Used for spray that you spray at walls, tables, hydrovats etc
|
||||
/obj/effect/decal/spraystill
|
||||
density = 0
|
||||
|
||||
@@ -441,11 +441,6 @@ steam.start() -- spawns the effect
|
||||
cardinals = c
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
|
||||
/*
|
||||
if((src.reagents.has_reagent("pacid")) || (src.reagents.has_reagent("lube"))) // Messages admins if someone sprays polyacid or space lube from a Cleaner bottle.
|
||||
message_admins("[key_name_admin(user)] fired Polyacid/Space lube from a Cleaner bottle.") // Polymorph
|
||||
log_game("[key_name(user)] fired Polyacid/Space lube from a Cleaner bottle.")
|
||||
*/
|
||||
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
@@ -454,12 +449,26 @@ steam.start() -- spawns the effect
|
||||
if(direct)
|
||||
direction = direct
|
||||
|
||||
var/contained = ""
|
||||
for(var/reagent in carry.reagent_list)
|
||||
contained += " [reagent] "
|
||||
if(contained)
|
||||
contained = "\[[contained]\]"
|
||||
var/area/A = get_area(location)
|
||||
|
||||
var/where = "[A.name] | [location.x], [location.y]"
|
||||
var/whereLink = "<A HREF='?src=%holder_ref%;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
|
||||
|
||||
if(carry.my_atom.fingerprintslast)
|
||||
message_admins("A chemical smoke reaction has taken place in ([location.x], [location.y]). Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
log_game("A chemical smoke reaction has taken place in ([location.x], [location.y]). Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "(<A HREF='?src=%holder_ref%;adminmoreinfo=\ref[M]'>?</a>)"
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
message_admins("A chemical smoke reaction has taken place in ([location.x], [location.y]). No associated key.")
|
||||
log_game("A chemical smoke reaction has taken place in ([location.x], [location.y]). No associated key.")
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
start()
|
||||
var/i = 0
|
||||
|
||||
@@ -5,12 +5,89 @@
|
||||
anchored = 1.0
|
||||
unacidable = 1
|
||||
|
||||
/obj/effect/landmark/New()
|
||||
|
||||
..()
|
||||
tag = text("landmark*[]", name)
|
||||
invisibility = 101
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("shuttle")
|
||||
shuttle_z = z
|
||||
del(src)
|
||||
|
||||
if("airtunnel_stop")
|
||||
airtunnel_stop = x
|
||||
|
||||
if("airtunnel_start")
|
||||
airtunnel_start = x
|
||||
|
||||
if("airtunnel_bottom")
|
||||
airtunnel_bottom = y
|
||||
|
||||
if("monkey")
|
||||
monkeystart += loc
|
||||
del(src)
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
del(src)
|
||||
|
||||
if("wizard")
|
||||
wizardstart += loc
|
||||
del(src)
|
||||
|
||||
if("JoinLate")
|
||||
latejoin += loc
|
||||
del(src)
|
||||
|
||||
//prisoners
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
del(src)
|
||||
// if("mazewarp")
|
||||
// mazewarp += loc
|
||||
if("Holding Facility")
|
||||
holdingfacility += loc
|
||||
if("tdome1")
|
||||
tdome1 += loc
|
||||
if("tdome2")
|
||||
tdome2 += loc
|
||||
if("tdomeadmin")
|
||||
tdomeadmin += loc
|
||||
if("tdomeobserve")
|
||||
tdomeobserve += loc
|
||||
//not prisoners
|
||||
if("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
del(src)
|
||||
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
del(src)
|
||||
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
del(src)
|
||||
|
||||
landmarks_list += src
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/Del()
|
||||
landmarks_list -= src
|
||||
..()
|
||||
|
||||
/obj/effect/landmark/start
|
||||
name = "start"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x"
|
||||
anchored = 1.0
|
||||
|
||||
/obj/effect/landmark/start/New()
|
||||
..()
|
||||
tag = "start*[name]"
|
||||
invisibility = 101
|
||||
|
||||
return 1
|
||||
|
||||
//Costume spawner landmarks
|
||||
|
||||
|
||||
26
code/game/objects/effects/spawners/vaultspawner.dm
Normal file
26
code/game/objects/effects/spawners/vaultspawner.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
/obj/effect/vaultspawner
|
||||
var/maxX = 6
|
||||
var/maxY = 6
|
||||
var/minX = 2
|
||||
var/minY = 2
|
||||
|
||||
/obj/effect/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null)
|
||||
if(!type)
|
||||
type = pick("sandstone","rock","alien")
|
||||
|
||||
var/lowBoundX = location.x
|
||||
var/lowBoundY = location.y
|
||||
|
||||
var/hiBoundX = location.x + rand(lX,uX)
|
||||
var/hiBoundY = location.y + rand(lY,uY)
|
||||
|
||||
var/z = location.z
|
||||
|
||||
for(var/i = lowBoundX,i<=hiBoundX,i++)
|
||||
for(var/j = lowBoundY,j<=hiBoundY,j++)
|
||||
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
|
||||
new /turf/simulated/wall/vault(locate(i,j,z),type)
|
||||
else
|
||||
new /turf/simulated/floor/vault(locate(i,j,z),type)
|
||||
|
||||
del(src)
|
||||
@@ -655,4 +655,12 @@
|
||||
if(M.stat != 2)
|
||||
M << "\red You go blind!"
|
||||
M.sdisabilities |= BLIND
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/clean_blood()
|
||||
. = ..()
|
||||
if(blood_overlay)
|
||||
overlays.Remove(blood_overlay)
|
||||
if(istype(src, /obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = src
|
||||
G.transfer_blood = 0
|
||||
|
||||
@@ -595,15 +595,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
//SYNDICATE FUNCTIONS===================================
|
||||
|
||||
if("Toggle Door")
|
||||
if(!isnull(cartridge) && cartridge.access_remote_door)
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
if(cartridge && cartridge.access_remote_door)
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if(M.id == cartridge.remote_door_id)
|
||||
if(M.density)
|
||||
spawn(0)
|
||||
M.open()
|
||||
M.open()
|
||||
else
|
||||
spawn(0)
|
||||
M.close()
|
||||
M.close()
|
||||
|
||||
if("Detonate")//Detonate PDA
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
@@ -614,7 +612,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
var/difficulty = 0
|
||||
|
||||
if (!isnull(P.cartridge))
|
||||
if(P.cartridge)
|
||||
difficulty += P.cartridge.access_medical
|
||||
difficulty += P.cartridge.access_security
|
||||
difficulty += P.cartridge.access_engine
|
||||
@@ -624,7 +622,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
difficulty += 2
|
||||
|
||||
if ((prob(difficulty * 12)) || (P.hidden_uplink))
|
||||
if(prob(difficulty * 12) || (P.hidden_uplink))
|
||||
U.show_message("\red An error flashes on your [src].", 1)
|
||||
else if (prob(difficulty * 3))
|
||||
U.show_message("\red Energy feeds back into your [src]!", 1)
|
||||
@@ -839,8 +837,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
C.loc = src
|
||||
user << "<span class='notice'>You insert [C] into [src].</span>"
|
||||
cartridge = C
|
||||
if(C:radio)
|
||||
C:radio.hostpda = src
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
|
||||
else if(istype(C, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/idcard = C
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
name = "Detomatix Cartridge"
|
||||
icon_state = "cart"
|
||||
access_remote_door = 1
|
||||
remote_door_id = "syndicate" //Make sure this matches the syndicate shuttle's shield/door id!!
|
||||
remote_door_id = "smindicate" //Make sure this matches the syndicate shuttle's shield/door id!! //don't ask about the name, testing.
|
||||
var/shock_charges = 4
|
||||
|
||||
proc/unlock()
|
||||
|
||||
@@ -1,161 +1,124 @@
|
||||
/obj/item/device/radio/electropack
|
||||
name = "Electropack"
|
||||
name = "electropack"
|
||||
desc = "Dance my monkeys! DANCE!!!"
|
||||
icon_state = "electropack0"
|
||||
var/code = 2
|
||||
var/e_pads = 0.0
|
||||
g_amt = 2500
|
||||
m_amt = 10000
|
||||
item_state = "electropack"
|
||||
frequency = 1449
|
||||
w_class = 5.0
|
||||
flags = FPRINT | CONDUCT | TABLEPASS
|
||||
slot_flags = SLOT_BACK
|
||||
item_state = "electropack"
|
||||
|
||||
/obj/item/device/radio/electropack/examine()
|
||||
set src in view()
|
||||
|
||||
..()
|
||||
if ((in_range(src, usr) || src.loc == usr))
|
||||
if (src.e_pads)
|
||||
usr << "\blue The electric pads are exposed!"
|
||||
return
|
||||
|
||||
/obj/item/device/radio/electropack/attack_paw(mob/user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
w_class = 5.0
|
||||
g_amt = 2500
|
||||
m_amt = 10000
|
||||
var/code = 2
|
||||
|
||||
/obj/item/device/radio/electropack/attack_hand(mob/user as mob)
|
||||
|
||||
if (src == user.back)
|
||||
user << "\blue You need help taking this off!"
|
||||
if(src == user.back)
|
||||
user << "<span class='notice'>You need help taking this off!</span>"
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/electropack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/clothing/head/helmet))
|
||||
if(!b_stat)
|
||||
user << "<span class='notice'>[src] is not ready to be attached!</span>"
|
||||
return
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
src.e_pads = !( src.e_pads )
|
||||
if (src.e_pads)
|
||||
user.show_message("\blue The electric pads have been exposed!")
|
||||
else
|
||||
user.show_message("\blue The electric pads have been reinserted!")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
else
|
||||
if (istype(W, /obj/item/clothing/head/helmet))
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = A
|
||||
W.master = A
|
||||
A.part1 = W
|
||||
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = A
|
||||
W.master = A
|
||||
A.part1 = W
|
||||
user.drop_from_inventory(src)
|
||||
loc = A
|
||||
master = A
|
||||
A.part2 = src
|
||||
|
||||
user.drop_from_inventory(src)
|
||||
src.loc = A
|
||||
src.master = A
|
||||
A.part2 = src
|
||||
|
||||
user.put_in_hands(A)
|
||||
A.add_fingerprint(user)
|
||||
return
|
||||
user.put_in_hands(A)
|
||||
A.add_fingerprint(user)
|
||||
|
||||
/obj/item/device/radio/electropack/Topic(href, href_list)
|
||||
//..()
|
||||
if (usr.stat || usr.restrained())
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if (((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(src.master) || (in_range(src, usr) && istype(src.loc, /turf)))))
|
||||
if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
|
||||
usr.machine = src
|
||||
if (href_list["freq"])
|
||||
if(href_list["freq"])
|
||||
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
set_frequency(new_frequency)
|
||||
else
|
||||
if (href_list["code"])
|
||||
src.code += text2num(href_list["code"])
|
||||
src.code = round(src.code)
|
||||
src.code = min(100, src.code)
|
||||
src.code = max(1, src.code)
|
||||
if(href_list["code"])
|
||||
code += text2num(href_list["code"])
|
||||
code = round(code)
|
||||
code = min(100, code)
|
||||
code = max(1, code)
|
||||
else
|
||||
if (href_list["power"])
|
||||
src.on = !( src.on )
|
||||
src.icon_state = text("electropack[]", src.on)
|
||||
if (!( src.master ))
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
if(href_list["power"])
|
||||
on = !( on )
|
||||
icon_state = "electropack[on]"
|
||||
if(!( master ))
|
||||
if(istype(loc, /mob))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(308)
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
src.attack_self(src.master.loc)
|
||||
if(istype(master.loc, /mob))
|
||||
attack_self(master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src.master))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
//Foreach goto(384)
|
||||
for(var/mob/M in viewers(1, master))
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
else
|
||||
usr << browse(null, "window=radio")
|
||||
return
|
||||
return
|
||||
/*
|
||||
/obj/item/device/radio/electropack/accept_rad(obj/item/device/radio/signaler/R as obj, message)
|
||||
|
||||
if ((istype(R, /obj/item/device/radio/signaler) && R.frequency == src.frequency && R.code == src.code))
|
||||
return 1
|
||||
else
|
||||
return null
|
||||
return*/
|
||||
|
||||
/obj/item/device/radio/electropack/receive_signal(datum/signal/signal)
|
||||
if(!signal || (signal.encryption != code))
|
||||
if(!signal || signal.encryption != code)
|
||||
return
|
||||
|
||||
if ((ismob(src.loc) && src.on))
|
||||
|
||||
var/mob/M = src.loc
|
||||
if(ismob(loc) && on)
|
||||
var/mob/M = loc
|
||||
var/turf/T = M.loc
|
||||
if ((istype(T, /turf)))
|
||||
if (!M.moved_recently && M.last_move)
|
||||
if(istype(T, /turf))
|
||||
if(!M.moved_recently && M.last_move)
|
||||
M.moved_recently = 1
|
||||
step(M, M.last_move)
|
||||
sleep 50
|
||||
sleep(50)
|
||||
if(M)
|
||||
M.moved_recently = 0
|
||||
M.show_message("\red <B>You feel a sharp shock!</B>")
|
||||
M << "<span class='danger'>You feel a sharp shock!</span>"
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, M)
|
||||
s.start()
|
||||
|
||||
M.Weaken(10)
|
||||
|
||||
if ((src.master && src.wires & 1))
|
||||
src.master.receive_signal()
|
||||
if(master && wires & 1)
|
||||
master.receive_signal()
|
||||
return
|
||||
|
||||
/obj/item/device/radio/electropack/attack_self(mob/user as mob, flag1)
|
||||
|
||||
if (!( istype(user, /mob/living/carbon/human) ))
|
||||
if(!istype(user, /mob/living/carbon/human))
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = {"<TT>
|
||||
<A href='?src=\ref[src];power=1'>Turn [src.on ? "Off" : "On"]</A><BR>
|
||||
<A href='?src=\ref[src];power=1'>Turn [on ? "Off" : "On"]</A><BR>
|
||||
<B>Frequency/Code</B> for electropack:<BR>
|
||||
Frequency:
|
||||
<A href='byond://?src=\ref[src];freq=-10'>-</A>
|
||||
<A href='byond://?src=\ref[src];freq=-2'>-</A> [format_frequency(src.frequency)]
|
||||
<A href='byond://?src=\ref[src];freq=-2'>-</A> [format_frequency(frequency)]
|
||||
<A href='byond://?src=\ref[src];freq=2'>+</A>
|
||||
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
|
||||
|
||||
Code:
|
||||
<A href='byond://?src=\ref[src];code=-5'>-</A>
|
||||
<A href='byond://?src=\ref[src];code=-1'>-</A> [src.code]
|
||||
<A href='byond://?src=\ref[src];code=-1'>-</A> [code]
|
||||
<A href='byond://?src=\ref[src];code=1'>+</A>
|
||||
<A href='byond://?src=\ref[src];code=5'>+</A><BR>
|
||||
</TT>"}
|
||||
|
||||
@@ -20,40 +20,40 @@
|
||||
throw_range = 20
|
||||
|
||||
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg)
|
||||
if (recording)
|
||||
if(recording)
|
||||
var/ending = copytext(msg, length(msg))
|
||||
src.timestamp+= src.timerecorded
|
||||
if (M.stuttering)
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] stammers, \"[msg]\""
|
||||
timestamp+= timerecorded
|
||||
if(M.stuttering)
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] stammers, \"[msg]\""
|
||||
return
|
||||
if (M.getBrainLoss() >= 60)
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] gibbers, \"[msg]\""
|
||||
if(M.getBrainLoss() >= 60)
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] gibbers, \"[msg]\""
|
||||
return
|
||||
if (ending == "?")
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] asks, \"[msg]\""
|
||||
if(ending == "?")
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] asks, \"[msg]\""
|
||||
return
|
||||
else if (ending == "!")
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] exclaims, \"[msg]\""
|
||||
else if(ending == "!")
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] exclaims, \"[msg]\""
|
||||
return
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] says, \"[msg]\""
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] says, \"[msg]\""
|
||||
return
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/card/emag))
|
||||
if (src.emagged == 0)
|
||||
src.emagged = 1
|
||||
src.recording = 0
|
||||
user << "\red PZZTTPFFFT"
|
||||
src.icon_state = "taperecorderidle"
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
if(emagged == 0)
|
||||
emagged = 1
|
||||
recording = 0
|
||||
user << "<span class='warning'>PZZTTPFFFT</span>"
|
||||
icon_state = "taperecorderidle"
|
||||
else
|
||||
user << "\red That is already emagged!"
|
||||
user << "<span class='warning'>It is already emagged!</span>"
|
||||
|
||||
/obj/item/device/taperecorder/proc/explode()
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.show_message("\red The [src] explodes!", 1)
|
||||
var/turf/T = get_turf(loc)
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M << "<span class='danger'>\The [src] explodes!</span>"
|
||||
if(T)
|
||||
T.hotspot_expose(700,125)
|
||||
explosion(T, -1, -1, 0, 4)
|
||||
@@ -63,28 +63,28 @@
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "Not when you're incapacitated."
|
||||
return
|
||||
if(src.emagged == 1)
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
src.icon_state = "taperecorderrecording"
|
||||
if(src.timerecorded < 3600 && src.playing == 0)
|
||||
usr << "\blue Recording started."
|
||||
src.recording = 1
|
||||
src.timestamp+= src.timerecorded
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording started."
|
||||
for(src.timerecorded, src.timerecorded<3600)
|
||||
if(src.recording == 0)
|
||||
icon_state = "taperecorderrecording"
|
||||
if(timerecorded < 3600 && playing == 0)
|
||||
usr << "<span class='notice'>Recording started.</span>"
|
||||
recording = 1
|
||||
timestamp+= timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording started."
|
||||
for(timerecorded, timerecorded<3600)
|
||||
if(recording == 0)
|
||||
break
|
||||
src.timerecorded++
|
||||
timerecorded++
|
||||
sleep(10)
|
||||
src.recording = 0
|
||||
src.icon_state = "taperecorderidle"
|
||||
recording = 0
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else
|
||||
usr << "\red Either your tape recorder's memory is full, or it is currently playing back its memory."
|
||||
usr << "<span class='notice'>Either your tape recorder's memory is full, or it is currently playing back its memory.</span>"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
@@ -92,24 +92,22 @@
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "Not when you're incapacitated."
|
||||
return
|
||||
if (src.recording == 1)
|
||||
src.recording = 0
|
||||
src.timestamp+= src.timerecorded
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording stopped."
|
||||
usr << "\blue Recording stopped."
|
||||
src.icon_state = "taperecorderidle"
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
else if (src.playing == 1)
|
||||
src.playing = 0
|
||||
if(recording == 1)
|
||||
recording = 0
|
||||
timestamp+= timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording stopped."
|
||||
usr << "<span class='notice'>Recording stopped.</span>"
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else if(playing == 1)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/O in hearers(world.view-1, T))
|
||||
O.show_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>",2)
|
||||
src.icon_state = "taperecorderidle"
|
||||
return
|
||||
else
|
||||
usr << "\red Stop what?"
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
|
||||
|
||||
@@ -118,19 +116,18 @@
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "Not when you're incapicated."
|
||||
return
|
||||
if(src.emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
if(emagged == 1)
|
||||
usr << "<span class='warning'>The tape recorder makes a scratchy noise.</span>"
|
||||
return
|
||||
if (src.recording == 1 || src.playing == 1)
|
||||
usr << "\red You can't clear the memory while playing or recording!"
|
||||
if(recording == 1 || playing == 1)
|
||||
usr << "<span class='notice'>You can't clear the memory while playing or recording!</span>"
|
||||
return
|
||||
else
|
||||
src.storedinfo -= src.storedinfo
|
||||
src.timestamp -= src.timestamp
|
||||
src.timerecorded = 0
|
||||
usr << "\blue Memory cleared."
|
||||
storedinfo -= storedinfo
|
||||
timestamp -= timestamp
|
||||
timerecorded = 0
|
||||
usr << "<span class='notice'>Memory cleared.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -139,76 +136,80 @@
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "Not when you're incapicated."
|
||||
return
|
||||
if (src.recording == 1)
|
||||
usr << "\red You can't playback when recording!"
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
if (src.playing == 1)
|
||||
usr << "\red You're already playing!"
|
||||
if(recording == 1)
|
||||
usr << "<span class='notice'>You can't playback when recording!</span>"
|
||||
return
|
||||
src.playing = 1
|
||||
src.icon_state = "taperecorderplaying"
|
||||
usr << "\blue Playing started."
|
||||
for(var/i=1,src.timerecorded<3600,sleep(10 * (src.playsleepseconds) ))
|
||||
if (src.playing == 0)
|
||||
if(playing == 1)
|
||||
usr << "<span class='notice'>You're already playing!</span>"
|
||||
return
|
||||
playing = 1
|
||||
icon_state = "taperecorderplaying"
|
||||
usr << "<span class='notice'>Playing started.</span>"
|
||||
for(var/i=1,timerecorded<3600,sleep(10 * (playsleepseconds) ))
|
||||
if(playing == 0)
|
||||
break
|
||||
if (src.storedinfo.len < i)
|
||||
if(storedinfo.len < i)
|
||||
break
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/O in hearers(world.view-1, T))
|
||||
O.show_message("<font color=Maroon><B>Tape Recorder</B>: [src.storedinfo[i]]</font>",2)
|
||||
if (src.storedinfo.len < i+1)
|
||||
src.playsleepseconds = 1
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: [storedinfo[i]]</font>")
|
||||
if(storedinfo.len < i+1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
for(var/mob/O in hearers(world.view-1, T))
|
||||
O.show_message("<font color=Maroon><B>Tape Recorder</B>: End of recording.</font>",2)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: End of recording.</font>")
|
||||
else
|
||||
src.playsleepseconds = src.timestamp[i+1] - src.timestamp[i]
|
||||
if (src.playsleepseconds > 19)
|
||||
playsleepseconds = timestamp[i+1] - timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
for(var/mob/O in hearers(world.view-1, T))
|
||||
O.show_message("<font color=Maroon><B>Tape Recorder</B>: Skipping [src.playsleepseconds] seconds of silence</font>",2)
|
||||
src.playsleepseconds = 1
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Skipping [playsleepseconds] seconds of silence</font>")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
src.icon_state = "taperecorderidle"
|
||||
src.playing = 0
|
||||
if (src.emagged == 1.0)
|
||||
for(var/mob/O in hearers(world.view-1, get_turf(src)))
|
||||
O.show_message("Tape Recorder: This tape recorder will self destruct in <B>5</B>",2)
|
||||
icon_state = "taperecorderidle"
|
||||
playing = 0
|
||||
if(emagged == 1.0)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: This tape recorder will self-destruct in... Five.</font>")
|
||||
sleep(10)
|
||||
for(var/mob/O in hearers(world.view-1, get_turf(src)))
|
||||
O.show_message("<B>4</B>",2)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Four.</font>")
|
||||
sleep(10)
|
||||
for(var/mob/O in hearers(world.view-1, get_turf(src)))
|
||||
O.show_message("<B>3</B>",2)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Three.</font>")
|
||||
sleep(10)
|
||||
for(var/mob/O in hearers(world.view-1, get_turf(src)))
|
||||
O.show_message("<B>2</B>",2)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Two.</font>")
|
||||
sleep(10)
|
||||
for(var/mob/O in hearers(world.view-1, get_turf(src)))
|
||||
O.show_message("<B>1</B>",2)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: One.</font>")
|
||||
sleep(10)
|
||||
src.explode()
|
||||
explode()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/print_transcript()
|
||||
set name = "Print Transcript"
|
||||
set category = "Object"
|
||||
|
||||
if (!canprint)
|
||||
usr << "\red The recorder can't print that fast!"
|
||||
if(usr.stat)
|
||||
return
|
||||
if (src.recording == 1 || src.playing == 1)
|
||||
usr << "\red You can't print the transcript while playing or recording!"
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
usr << "\blue Transcript printed."
|
||||
if(!canprint)
|
||||
usr << "<span class='notice'>The recorder can't print that fast!</span>"
|
||||
return
|
||||
if(recording == 1 || playing == 1)
|
||||
usr << "<span class='notice'>You can't print the transcript while playing or recording!</span>"
|
||||
return
|
||||
usr << "<span class='notice'>Transcript printed.</span>"
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i=1,src.storedinfo.len >= i,i++)
|
||||
t1 += "[src.storedinfo[i]]<BR>"
|
||||
for(var/i=1,storedinfo.len >= i,i++)
|
||||
t1 += "[storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
canprint = 0
|
||||
@@ -217,26 +218,25 @@
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(src.recording == 0 && src.playing == 0)
|
||||
if(recording == 0 && playing == 0)
|
||||
if(usr.stat)
|
||||
usr << "Not when you're incapacitated."
|
||||
return
|
||||
if(src.emagged == 1)
|
||||
if(emagged == 1)
|
||||
usr << "\red The tape recorder makes a scratchy noise."
|
||||
return
|
||||
src.icon_state = "taperecorderrecording"
|
||||
if(src.timerecorded < 3600 && src.playing == 0)
|
||||
icon_state = "taperecorderrecording"
|
||||
if(timerecorded < 3600 && playing == 0)
|
||||
usr << "\blue Recording started."
|
||||
src.recording = 1
|
||||
src.timestamp+= src.timerecorded
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording started."
|
||||
for(src.timerecorded, src.timerecorded<3600)
|
||||
if(src.recording == 0)
|
||||
recording = 1
|
||||
timestamp+= timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording started."
|
||||
for(timerecorded, timerecorded<3600)
|
||||
if(recording == 0)
|
||||
break
|
||||
src.timerecorded++
|
||||
timerecorded++
|
||||
sleep(10)
|
||||
src.recording = 0
|
||||
src.icon_state = "taperecorderidle"
|
||||
recording = 0
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else
|
||||
usr << "\red Either your tape recorder's memory is full, or it is currently playing back its memory."
|
||||
@@ -244,19 +244,19 @@
|
||||
if(usr.stat)
|
||||
usr << "Not when you're incapacitated."
|
||||
return
|
||||
if (src.recording == 1)
|
||||
src.recording = 0
|
||||
src.timestamp+= src.timerecorded
|
||||
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording stopped."
|
||||
if(recording == 1)
|
||||
recording = 0
|
||||
timestamp+= timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording stopped."
|
||||
usr << "\blue Recording stopped."
|
||||
src.icon_state = "taperecorderidle"
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else if (src.playing == 1)
|
||||
src.playing = 0
|
||||
else if(playing == 1)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/O in hearers(world.view-1, T))
|
||||
O.show_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>",2)
|
||||
src.icon_state = "taperecorderidle"
|
||||
icon_state = "taperecorderidle"
|
||||
return
|
||||
else
|
||||
usr << "\red Stop what?"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/obj/item/weapon/tank/tank_one
|
||||
var/obj/item/weapon/tank/tank_two
|
||||
var/obj/item/device/attached_device
|
||||
var/mob/attacher = "Unknown"
|
||||
var/mob/attacher = null
|
||||
var/valve_open = 0
|
||||
var/toggle = 1
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
bombers += "[key_name(user)] attached a [item] to a transfer valve."
|
||||
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
|
||||
attacher = key_name(user)
|
||||
attacher = user
|
||||
return
|
||||
|
||||
|
||||
@@ -156,10 +156,28 @@
|
||||
if(valve_open==0 && (tank_one && tank_two))
|
||||
valve_open = 1
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/bombarea = bombturf.loc.name
|
||||
var/log_str = "Bomb valve opened in [bombarea] with [attached_device ? attached_device : "no device"] attacher: [attacher]. Last touched by: [src.fingerprintslast]"
|
||||
var/area/A = get_area(bombturf)
|
||||
|
||||
var/attacher_name = ""
|
||||
if(!attacher)
|
||||
attacher_name = "Unknown"
|
||||
else
|
||||
attacher_name = "[attacher.name]([attacher.ckey])"
|
||||
|
||||
var/log_str = "Bomb valve opened in <A HREF='?src=%holder_ref%;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name]</a> "
|
||||
log_str += "with [attached_device ? attached_device : "no device"] attacher: [attacher_name]"
|
||||
|
||||
if(attacher)
|
||||
log_str += "(<A HREF='?src=%holder_ref%;adminmoreinfo=\ref[attacher]'>?</A>)"
|
||||
|
||||
var/mob/mob = get_mob_by_key(src.fingerprintslast)
|
||||
var/last_touch_info = ""
|
||||
if(mob)
|
||||
last_touch_info = "(<A HREF='?src=%holder_ref%;adminmoreinfo=\ref[mob]'>?</A>)"
|
||||
|
||||
log_str += " Last touched by: [src.fingerprintslast][last_touch_info]"
|
||||
bombers += log_str
|
||||
message_admins(log_str)
|
||||
message_admins(log_str, 0, 1)
|
||||
log_game(log_str)
|
||||
merge_gases()
|
||||
spawn(20) // In case one tank bursts
|
||||
|
||||
@@ -350,6 +350,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
/obj/item/device/radio/uplink/New()
|
||||
hidden_uplink = new(src)
|
||||
icon_state = "radio"
|
||||
|
||||
/obj/item/device/radio/uplink/attack_self(mob/user as mob)
|
||||
if(hidden_uplink)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
var/obj/item/robot_parts/r_leg/r_leg = null
|
||||
var/obj/item/robot_parts/chest/chest = null
|
||||
var/obj/item/robot_parts/head/head = null
|
||||
var/created_name = "Cyborg"
|
||||
var/created_name = ""
|
||||
|
||||
/obj/item/robot_parts/robot_suit/New()
|
||||
..()
|
||||
@@ -194,8 +194,8 @@
|
||||
user.drop_item()
|
||||
|
||||
O.invisibility = 0
|
||||
O.name = created_name
|
||||
O.real_name = created_name
|
||||
O.custom_name = created_name
|
||||
O.updatename("Default")
|
||||
|
||||
M.brainmob.mind.transfer_to(O)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user