Merge tgstation13 r4570 into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/defines/obj.dm
	code/defines/procs/helpers.dm
	code/defines/turf.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/gamemodes/cult/cult_structures.dm
	code/game/gamemodes/events.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/master_controller.dm
	code/game/objects/items/blueprints.dm
	code/game/objects/items/devices/uplinks.dm
	code/game/objects/items/item.dm
	code/game/objects/items/weapons/gift_wrappaper.dm
	code/game/objects/items/weapons/wires.dm
	code/game/objects/weapons.dm
	code/game/turfs/turf.dm
	code/modules/clothing/head/hardhat.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mine_turfs.dm
	code/modules/mob/living/silicon/robot/life.dm
	code/modules/mob/mob_defines.dm
	code/modules/mob/new_player/login.dm
	code/modules/paperwork/pen.dm
	code/modules/paperwork/stamps.dm
	code/unused/toilets.dm
	html/changelog.html
	icons/effects/alert.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-08-28 19:57:11 +10:00
269 changed files with 14389 additions and 13349 deletions

View File

@@ -3,6 +3,7 @@
// New source code should be placed in .dm files: choose File/New --> Code File.
// BEGIN_INTERNALS
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
#define FILE_DIR "code"
@@ -11,6 +12,7 @@
#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices"
#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices"
#define FILE_DIR "code/ATMOSPHERICS/components/unary"
#define FILE_DIR "code/controllers"
#define FILE_DIR "code/datums"
#define FILE_DIR "code/datums/diseases"
#define FILE_DIR "code/datums/helper_datums"
@@ -69,24 +71,26 @@
#define FILE_DIR "code/game/objects"
#define FILE_DIR "code/game/objects/closets"
#define FILE_DIR "code/game/objects/closets/secure"
#define FILE_DIR "code/game/objects/devices"
#define FILE_DIR "code/game/objects/devices/PDA"
#define FILE_DIR "code/game/objects/effects"
#define FILE_DIR "code/game/objects/effects/decals"
#define FILE_DIR "code/game/objects/effects/spawners"
#define FILE_DIR "code/game/objects/grenades"
#define FILE_DIR "code/game/objects/items"
#define FILE_DIR "code/game/objects/items/devices"
#define FILE_DIR "code/game/objects/items/devices/PDA"
#define FILE_DIR "code/game/objects/items/devices/radio"
#define FILE_DIR "code/game/objects/items/robot"
#define FILE_DIR "code/game/objects/items/stacks"
#define FILE_DIR "code/game/objects/items/weapons"
#define FILE_DIR "code/game/objects/items/weapons/grenades"
#define FILE_DIR "code/game/objects/items/weapons/implants"
#define FILE_DIR "code/game/objects/radio"
#define FILE_DIR "code/game/objects/secstorage"
#define FILE_DIR "code/game/objects/stacks"
#define FILE_DIR "code/game/objects/items/weapons/secstorage"
#define FILE_DIR "code/game/objects/items/weapons/storage"
#define FILE_DIR "code/game/objects/items/weapons/tanks"
#define FILE_DIR "code/game/objects/storage"
#define FILE_DIR "code/game/objects/structures"
#define FILE_DIR "code/game/objects/structures/crates_lockers"
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets"
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure"
#define FILE_DIR "code/game/objects/tanks"
#define FILE_DIR "code/game/player"
#define FILE_DIR "code/game/structure"
#define FILE_DIR "code/game/turfs"
@@ -141,6 +145,7 @@
#define FILE_DIR "code/modules/mob/living/parasite"
#define FILE_DIR "code/modules/mob/living/silicon"
#define FILE_DIR "code/modules/mob/living/silicon/ai"
#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook"
#define FILE_DIR "code/modules/mob/living/silicon/decoy"
#define FILE_DIR "code/modules/mob/living/silicon/pai"
#define FILE_DIR "code/modules/mob/living/silicon/robot"
@@ -292,9 +297,14 @@
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
#include "code\controllers\_DynamicAreaLighting_TG.dm"
#include "code\controllers\configuration.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\datums\ai_laws.dm"
#include "code\datums\computerfiles.dm"
#include "code\datums\configuration.dm"
#include "code\datums\datacore.dm"
#include "code\datums\datumvars.dm"
#include "code\datums\disease.dm"
@@ -303,7 +313,6 @@
#include "code\datums\modules.dm"
#include "code\datums\organs.dm"
#include "code\datums\recipe.dm"
#include "code\datums\shuttle_controller.dm"
#include "code\datums\spell.dm"
#include "code\datums\sun.dm"
#include "code\datums\vote.dm"
@@ -394,7 +403,6 @@
#include "code\game\hud.dm"
#include "code\game\json.dm"
#include "code\game\landmarks.dm"
#include "code\game\master_controller.dm"
#include "code\game\prisonshuttle.dm"
#include "code\game\response_team.dm"
#include "code\game\shuttle_engines.dm"
@@ -584,6 +592,7 @@
#include "code\game\machinery\kitchen\juicer.dm"
#include "code\game\machinery\kitchen\microwave.dm"
#include "code\game\machinery\kitchen\processor.dm"
#include "code\game\machinery\kitchen\smartfridge.dm"
#include "code\game\machinery\pipe\construction.dm"
#include "code\game\machinery\pipe\pipe_dispenser.dm"
#include "code\game\machinery\telecomms\broadcaster.dm"
@@ -614,93 +623,107 @@
#include "code\game\mecha\working\firefighter.dm"
#include "code\game\mecha\working\ripley.dm"
#include "code\game\mecha\working\working.dm"
#include "code\game\objects\bodybag.dm"
#include "code\game\objects\empulse.dm"
#include "code\game\objects\explosion.dm"
#include "code\game\objects\explosion_recursive.dm"
#include "code\game\objects\facehugger.dm"
#include "code\game\objects\items.dm"
#include "code\game\objects\object_procs.dm"
#include "code\game\objects\shooting_range.dm"
#include "code\game\objects\objs.dm"
#include "code\game\objects\structures.dm"
#include "code\game\objects\toys.dm"
#include "code\game\objects\weapons.dm"
#include "code\game\objects\devices\aicard.dm"
#include "code\game\objects\devices\chameleonproj.dm"
#include "code\game\objects\devices\flash.dm"
#include "code\game\objects\devices\flashlight.dm"
#include "code\game\objects\devices\infra_sensor.dm"
#include "code\game\objects\devices\lightreplacer.dm"
#include "code\game\objects\devices\multitool.dm"
#include "code\game\objects\devices\paicard.dm"
#include "code\game\objects\devices\powersink.dm"
#include "code\game\objects\devices\scanners.dm"
#include "code\game\objects\devices\shields.dm"
#include "code\game\objects\devices\taperecorder.dm"
#include "code\game\objects\devices\traitordevices.dm"
#include "code\game\objects\devices\transfer_valve.dm"
#include "code\game\objects\devices\uplinks.dm"
#include "code\game\objects\devices\PDA\cart.dm"
#include "code\game\objects\devices\PDA\chatroom.dm"
#include "code\game\objects\devices\PDA\PDA.dm"
#include "code\game\objects\devices\PDA\radio.dm"
#include "code\game\objects\effects\aliens.dm"
#include "code\game\objects\effects\biomass.dm"
#include "code\game\objects\effects\biomass_rift.dm"
#include "code\game\objects\effects\effect_system.dm"
#include "code\game\objects\effects\gibs.dm"
#include "code\game\objects\effects\glowshroom.dm"
#include "code\game\objects\effects\manifest.dm"
#include "code\game\objects\effects\mines.dm"
#include "code\game\objects\effects\portals.dm"
#include "code\game\objects\effects\signs.dm"
#include "code\game\objects\effects\decals\blood.dm"
#include "code\game\objects\effects\decals\contraband.dm"
#include "code\game\objects\effects\decals\crayon.dm"
#include "code\game\objects\effects\spawners\bombspawner.dm"
#include "code\game\objects\grenades\chem_grenade.dm"
#include "code\game\objects\grenades\emgrenade.dm"
#include "code\game\objects\grenades\flashbang.dm"
#include "code\game\objects\grenades\grenade.dm"
#include "code\game\objects\grenades\smokebomb.dm"
#include "code\game\objects\grenades\spawnergrenade.dm"
#include "code\game\objects\effects\spawners\gibspawner.dm"
#include "code\game\objects\items\apc_frame.dm"
#include "code\game\objects\items\blueprints.dm"
#include "code\game\objects\items\bodybag.dm"
#include "code\game\objects\items\candle.dm"
#include "code\game\objects\items\helper_procs.dm"
#include "code\game\objects\items\item.dm"
#include "code\game\objects\items\robot_items.dm"
#include "code\game\objects\items\robot_parts.dm"
#include "code\game\objects\items\robot_upgrades.dm"
#include "code\game\objects\items\shock_kit.dm"
#include "code\game\objects\items\crayons.dm"
#include "code\game\objects\items\latexballoon.dm"
#include "code\game\objects\items\shooting_range.dm"
#include "code\game\objects\items\tk_grab.dm"
#include "code\game\objects\items\trash.dm"
#include "code\game\objects\items\devices\aicard.dm"
#include "code\game\objects\items\devices\chameleonproj.dm"
#include "code\game\objects\items\devices\flash.dm"
#include "code\game\objects\items\devices\flashlight.dm"
#include "code\game\objects\items\devices\lightreplacer.dm"
#include "code\game\objects\items\devices\multitool.dm"
#include "code\game\objects\items\devices\paicard.dm"
#include "code\game\objects\items\devices\powersink.dm"
#include "code\game\objects\items\devices\scanners.dm"
#include "code\game\objects\items\devices\shields.dm"
#include "code\game\objects\items\devices\taperecorder.dm"
#include "code\game\objects\items\devices\traitordevices.dm"
#include "code\game\objects\items\devices\transfer_valve.dm"
#include "code\game\objects\items\devices\uplinks.dm"
#include "code\game\objects\items\devices\PDA\cart.dm"
#include "code\game\objects\items\devices\PDA\chatroom.dm"
#include "code\game\objects\items\devices\PDA\PDA.dm"
#include "code\game\objects\items\devices\PDA\radio.dm"
#include "code\game\objects\items\devices\radio\beacon.dm"
#include "code\game\objects\items\devices\radio\electropack.dm"
#include "code\game\objects\items\devices\radio\encryptionkey.dm"
#include "code\game\objects\items\devices\radio\headset.dm"
#include "code\game\objects\items\devices\radio\intercom.dm"
#include "code\game\objects\items\devices\radio\radio.dm"
#include "code\game\objects\items\robot\robot_items.dm"
#include "code\game\objects\items\robot\robot_parts.dm"
#include "code\game\objects\items\robot\robot_upgrades.dm"
#include "code\game\objects\items\stacks\glass.dm"
#include "code\game\objects\items\stacks\medical.dm"
#include "code\game\objects\items\stacks\metal.dm"
#include "code\game\objects\items\stacks\minerals.dm"
#include "code\game\objects\items\stacks\stack.dm"
#include "code\game\objects\items\stacks\wood.dm"
#include "code\game\objects\items\weapons\AI_modules.dm"
#include "code\game\objects\items\weapons\cameras.dm"
#include "code\game\objects\items\weapons\Bedsheets.dm"
#include "code\game\objects\items\weapons\cards_ids.dm"
#include "code\game\objects\items\weapons\cigs_lighters.dm"
#include "code\game\objects\items\weapons\clown_items.dm"
#include "code\game\objects\items\weapons\dice.dm"
#include "code\game\objects\items\weapons\dna_injector.dm"
#include "code\game\objects\items\weapons\explosives.dm"
#include "code\game\objects\items\weapons\extinguisher.dm"
#include "code\game\objects\items\weapons\flamethrower.dm"
#include "code\game\objects\items\weapons\gift_wrappaper.dm"
#include "code\game\objects\items\weapons\handcuffs.dm"
#include "code\game\objects\items\weapons\hydroponics.dm"
#include "code\game\objects\items\weapons\kitchen.dm"
#include "code\game\objects\items\weapons\manuals.dm"
#include "code\game\objects\items\weapons\medical.dm"
#include "code\game\objects\items\weapons\mop.dm"
#include "code\game\objects\items\weapons\mousetraps.dm"
#include "code\game\objects\items\weapons\paint.dm"
#include "code\game\objects\items\weapons\paiwire.dm"
#include "code\game\objects\items\weapons\plant_bag.dm"
#include "code\game\objects\items\weapons\photography.dm"
#include "code\game\objects\items\weapons\RCD.dm"
#include "code\game\objects\items\weapons\RSF.dm"
#include "code\game\objects\items\weapons\scrolls.dm"
#include "code\game\objects\items\weapons\stunbaton.dm"
#include "code\game\objects\items\weapons\stungloves.dm"
#include "code\game\objects\items\weapons\surgery_tools.dm"
#include "code\game\objects\items\weapons\swords_axes_etc.dm"
#include "code\game\objects\items\weapons\table_rack_parts.dm"
#include "code\game\objects\items\weapons\teleportation.dm"
#include "code\game\objects\items\weapons\tiles_wires.dm"
#include "code\game\objects\items\weapons\tools.dm"
#include "code\game\objects\items\weapons\trashbag.dm"
#include "code\game\objects\items\weapons\twohanded.dm"
#include "code\game\objects\items\weapons\wrappingpaper.dm"
#include "code\game\objects\items\weapons\wires.dm"
#include "code\game\objects\items\weapons\grenades\chem_grenade.dm"
#include "code\game\objects\items\weapons\grenades\emgrenade.dm"
#include "code\game\objects\items\weapons\grenades\flashbang.dm"
#include "code\game\objects\items\weapons\grenades\grenade.dm"
#include "code\game\objects\items\weapons\grenades\smokebomb.dm"
#include "code\game\objects\items\weapons\grenades\spawnergrenade.dm"
#include "code\game\objects\items\weapons\implants\implant.dm"
#include "code\game\objects\items\weapons\implants\implantcase.dm"
#include "code\game\objects\items\weapons\implants\implantchair.dm"
@@ -709,40 +732,36 @@
#include "code\game\objects\items\weapons\implants\implantnanoaug.dm"
#include "code\game\objects\items\weapons\implants\implantpad.dm"
#include "code\game\objects\items\weapons\implants\implantuplink.dm"
#include "code\game\objects\radio\beacon.dm"
#include "code\game\objects\radio\electropack.dm"
#include "code\game\objects\radio\encryptionkey.dm"
#include "code\game\objects\radio\headset.dm"
#include "code\game\objects\radio\intercom.dm"
#include "code\game\objects\radio\radio.dm"
#include "code\game\objects\secstorage\sbriefcase.dm"
#include "code\game\objects\secstorage\secstorage.dm"
#include "code\game\objects\secstorage\ssafe.dm"
#include "code\game\objects\stacks\glass.dm"
#include "code\game\objects\stacks\metal.dm"
#include "code\game\objects\stacks\minerals.dm"
#include "code\game\objects\stacks\stack.dm"
#include "code\game\objects\stacks\wood.dm"
#include "code\game\objects\storage\backpack.dm"
#include "code\game\objects\storage\belt.dm"
#include "code\game\objects\storage\bible.dm"
#include "code\game\objects\storage\briefcase.dm"
#include "code\game\objects\storage\fancy.dm"
#include "code\game\objects\storage\firstaid.dm"
#include "code\game\objects\storage\kit.dm"
#include "code\game\objects\storage\lockbox.dm"
#include "code\game\objects\storage\misc.dm"
#include "code\game\objects\storage\storage.dm"
#include "code\game\objects\storage\toolbox.dm"
#include "code\game\objects\storage\uplink_kits.dm"
#include "code\game\objects\items\weapons\secstorage\sbriefcase.dm"
#include "code\game\objects\items\weapons\secstorage\secstorage.dm"
#include "code\game\objects\items\weapons\secstorage\ssafe.dm"
#include "code\game\objects\items\weapons\storage\backpack.dm"
#include "code\game\objects\items\weapons\storage\belt.dm"
#include "code\game\objects\items\weapons\storage\bible.dm"
#include "code\game\objects\items\weapons\storage\briefcase.dm"
#include "code\game\objects\items\weapons\storage\fancy.dm"
#include "code\game\objects\items\weapons\storage\firstaid.dm"
#include "code\game\objects\items\weapons\storage\kit.dm"
#include "code\game\objects\items\weapons\storage\lockbox.dm"
#include "code\game\objects\items\weapons\storage\misc.dm"
#include "code\game\objects\items\weapons\storage\storage.dm"
#include "code\game\objects\items\weapons\storage\toolbox.dm"
#include "code\game\objects\items\weapons\storage\uplink_kits.dm"
#include "code\game\objects\items\weapons\tanks\jetpack.dm"
#include "code\game\objects\items\weapons\tanks\tank_types.dm"
#include "code\game\objects\items\weapons\tanks\tanks.dm"
#include "code\game\objects\structures\aliennests.dm"
#include "code\game\objects\structures\bedsheet_bin.dm"
#include "code\game\objects\structures\displaycase.dm"
#include "code\game\objects\structures\door_assembly.dm"
#include "code\game\objects\structures\electricchair.dm"
#include "code\game\objects\structures\false_walls.dm"
#include "code\game\objects\structures\girders.dm"
#include "code\game\objects\structures\grille.dm"
#include "code\game\objects\structures\kitchen_spike.dm"
#include "code\game\objects\structures\ladders.dm"
#include "code\game\objects\structures\lamarr_cage.dm"
#include "code\game\objects\structures\lattice.dm"
#include "code\game\objects\structures\mineral_doors.dm"
#include "code\game\objects\structures\mirror.dm"
#include "code\game\objects\structures\mop_bucket.dm"
@@ -782,10 +801,6 @@
#include "code\game\objects\structures\crates_lockers\closets\secure\scientist.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\secure_closets.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\security.dm"
#include "code\game\objects\tanks\emergency.dm"
#include "code\game\objects\tanks\jetpack.dm"
#include "code\game\objects\tanks\tank_types.dm"
#include "code\game\objects\tanks\tanks.dm"
#include "code\game\turfs\turf.dm"
#include "code\game\verbs\ooc.dm"
#include "code\game\verbs\sound.dm"
@@ -822,7 +837,6 @@
#include "code\modules\admin\verbs\getlogs.dm"
#include "code\modules\admin\verbs\mapping.dm"
#include "code\modules\admin\verbs\massmodvar.dm"
#include "code\modules\admin\verbs\MC.dm"
#include "code\modules\admin\verbs\modifyvariables.dm"
#include "code\modules\admin\verbs\onlyone.dm"
#include "code\modules\admin\verbs\playsound.dm"
@@ -834,10 +848,12 @@
#include "code\modules\admin\verbs\ticklag.dm"
#include "code\modules\admin\verbs\tripAI.dm"
#include "code\modules\assembly\assembly.dm"
#include "code\modules\assembly\helpers.dm"
#include "code\modules\assembly\holder.dm"
#include "code\modules\assembly\igniter.dm"
#include "code\modules\assembly\infrared.dm"
#include "code\modules\assembly\proximity.dm"
#include "code\modules\assembly\shock_kit.dm"
#include "code\modules\assembly\signaler.dm"
#include "code\modules\assembly\timer.dm"
#include "code\modules\client\client defines.dm"
@@ -848,6 +864,7 @@
#include "code\modules\clothing\gloves\boxing.dm"
#include "code\modules\clothing\gloves\color.dm"
#include "code\modules\clothing\gloves\miscellaneous.dm"
#include "code\modules\clothing\gloves\stungloves.dm"
#include "code\modules\clothing\head\collectable.dm"
#include "code\modules\clothing\head\hardhat.dm"
#include "code\modules\clothing\head\helmet.dm"
@@ -952,6 +969,8 @@
#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"
#include "code\modules\mob\living\carbon\alien\logout.dm"
#include "code\modules\mob\living\carbon\alien\powers.dm"
#include "code\modules\mob\living\carbon\alien\say.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm"
@@ -975,7 +994,9 @@
#include "code\modules\mob\living\carbon\alien\larva\life.dm"
#include "code\modules\mob\living\carbon\alien\larva\powers.dm"
#include "code\modules\mob\living\carbon\alien\larva\update_icons.dm"
#include "code\modules\mob\living\carbon\alien\special\facehugger.dm"
#include "code\modules\mob\living\carbon\brain\brain.dm"
#include "code\modules\mob\living\carbon\brain\brain_item.dm"
#include "code\modules\mob\living\carbon\brain\death.dm"
#include "code\modules\mob\living\carbon\brain\emote.dm"
#include "code\modules\mob\living\carbon\brain\hud.dm"
@@ -1035,6 +1056,11 @@
#include "code\modules\mob\living\silicon\ai\logout.dm"
#include "code\modules\mob\living\silicon\ai\move.dm"
#include "code\modules\mob\living\silicon\ai\say.dm"
#include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm"
#include "code\modules\mob\living\silicon\ai\freelook\chunk.dm"
#include "code\modules\mob\living\silicon\ai\freelook\eye.dm"
#include "code\modules\mob\living\silicon\ai\freelook\read_me.dm"
#include "code\modules\mob\living\silicon\ai\freelook\update_triggers.dm"
#include "code\modules\mob\living\silicon\decoy\death.dm"
#include "code\modules\mob\living\silicon\decoy\decoy.dm"
#include "code\modules\mob\living\silicon\decoy\life.dm"
@@ -1108,7 +1134,6 @@
#include "code\modules\power\lighting.dm"
#include "code\modules\power\port_gen.dm"
#include "code\modules\power\power.dm"
#include "code\modules\power\sd_DynamicAreaLighting.dm"
#include "code\modules\power\smes.dm"
#include "code\modules\power\solar.dm"
#include "code\modules\power\switch.dm"

View File

@@ -54,6 +54,7 @@
icon = 'icons/effects/fire.dmi'
icon_state = "1"
layer = TURF_LAYER
luminosity = 3
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
@@ -136,7 +137,6 @@
New()
..()
dir = pick(cardinal)
sd_SetLuminosity(3)
return
@@ -144,7 +144,6 @@
if (istype(loc, /turf/simulated))
var/turf/simulated/T = loc
loc:active_hotspot = null
src.sd_SetLuminosity(0)
if(T.to_be_destroyed)
var/chance_of_deletion

View File

@@ -162,7 +162,7 @@ obj
del src
dir = pick(cardinal)
sd_SetLuminosity(3,2,0)
//sd_SetLuminosity(3,2,0)
firelevel = fl
for(var/mob/living/carbon/human/M in loc)
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans!
@@ -170,7 +170,7 @@ obj
Del()
if (istype(loc, /turf/simulated))
sd_SetLuminosity(0)
//sd_SetLuminosity(0)
loc = null
air_master.active_hotspots.Remove(src)

View File

@@ -0,0 +1,305 @@
/*
Modified DynamicAreaLighting for TGstation - Coded by Carnwennan
This is TG's 'new' lighting system. It's basically a heavily modified mix of combination of Forum_Account's and
ShadowDarke's respective lighting libraries. Credits, where due, to them.
Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
by using the var/tag variable and moving turfs into the contents list of the correct sub-area.
Unlike sd_DAL however it uses a queueing system. Everytime we call a change to opacity or luminosity
(through SetOpacity() or SetLuminosity()) we are simply updating variables and scheduling certain lights/turfs for an
update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
turning it back on with lighting_controller.processing = 1.
Unlike our old system there is a hardcoded maximum luminosity. This is to discourage coders using large luminosity values
for dynamic lighting, as the cost of lighting grows rapidly at large luminosity levels (especially when changing opacity
at runtime)
Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
have larger memory requirements than our previous system but hopefully it's worth the hassle for the greater control we
gain. Besides, there are far far worse uses of needless lists in the game, it'd be worth pruning some of them to offset
costs.
Known Issues/TODO:
admin-spawned turfs will have broken lumcounts. Not willing to fix it at this moment
mob luminosity will be lower than expected when one of multiple light sources is dropped after exceeding the maximum luminosity
Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
No directional lighting support. Fairly easy to add this and the code is ready.
When opening airlocks etc, lighting does not always update to account for the change in opacity.
*/
#define LIGHTING_MAX_LUMINOSITY 12 //Hard maximum luminosity to prevet lag which could be caused by coders making mini-suns
#define LIGHTING_MAX_LUMINOSITY_MOB 7 //Mobs get their own max because 60-odd human suns running around would be pretty silly
#define LIGHTING_LAYER 10 //Drawing layer for lighting overlays
#define LIGHTING_ICON 'icons/effects/ss13_dark_alpha7.dmi' //Icon used for lighting shading effects
datum/controller/lighting/New() //moved here so its in the define. eek :S
lighting_states = max( 0, length(icon_states(LIGHTING_ICON))-1 )
datum/light_source
var/atom/owner
var/changed = 1
var/mobile = 1
var/list/effect = list()
var/__x = 0 //x coordinate at last update
var/__y = 0 //y coordinate at last update
New(atom/A)
if(!istype(A))
CRASH("The first argument to the light object's constructor must be the atom that is the light source. Expected atom, received '[A]' instead.")
..()
owner = A
if(istype(owner, /atom/movable)) mobile = 1 //apparantly this is faster than type-checking
else mobile = 0 //Perhaps removing support for luminous turfs would be a good idea.
__x = owner.x
__y = owner.y
// the lighting object maintains a list of all light sources
lighting_controller.lights += src
//Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one
proc/check()
if(!owner)
remove_effect()
return 1 //causes it to be removed from our list of lights. The garbage collector will then destroy it.
if(mobile)
// check to see if we've moved since last update
if(owner.x != __x || owner.y != __y)
__x = owner.x
__y = owner.y
changed = 1
if(changed)
changed = 0
remove_effect()
return add_effect()
return 0
proc/remove_effect()
// before we apply the effect we remove the light's current effect.
if(effect.len)
for(var/turf in effect) // negate the effect of this light source
var/turf/T = turf
T.update_lumcount(-effect[T])
effect.Cut() // clear the effect list
proc/add_effect()
// only do this if the light is turned on and is on the map
if(owner.loc && owner.luminosity > 0)
effect = new_effect() // identify the effects of this light source
for(var/turf in effect)
var/turf/T = turf
T.update_lumcount(effect[T]) // apply the effect
return 0
else
owner.light = null
return 1 //cause the light to be removed from the lights list and garbage collected once it's no
//longer referenced by the queue
proc/new_effect()
. = list()
for(var/turf/T in view(owner.luminosity, owner))
// var/area/A = T.loc
// if(!A) continue
var/change_in_lumcount = lum(T)
if(change_in_lumcount > 0)
.[T] = change_in_lumcount
return .
proc/lum(turf/A)
return owner.luminosity - max(abs(A.x-__x),abs(A.y-__y))
// var/dist = cheap_hypotenuse(A.x,A.y,__x,__y) //fetches the pythagorean distance between A and the light
// if(owner.luminosity < dist) //if the turf is outside the radius the light doesn't illuminate it
// return 0
// return round(owner.luminosity - (dist/2),0.1)
atom
var/datum/light_source/light
//Turfs with opacity when they are constructed will trigger nearby lights to update
//Turfs atoms with luminosity when they are constructed will create a light_source automatically
//TODO: lag reduction
turf/New()
..()
if(opacity)
UpdateAffectingLights()
if(luminosity)
world.log << "[type] has luminosity at New()"
if(light) world.log << "## WARNING: [type] - Don't set lights up manually during New(), We do it automatically."
light = new(src)
//Movable atoms with opacity when they are constructed will trigger nearby lights to update
//Movable atoms with luminosity when they are constructed will create a light_source automatically
//TODO: lag reduction
atom/movable/New()
..()
if(opacity)
UpdateAffectingLights()
if(luminosity)
if(light) world.log << "## WARNING: [type] - Don't set lights up manually during New(), We do it automatically."
light = new(src)
//Turfs with opacity will trigger nearby lights to update at next lighting process.
//TODO: is this really necessary? Removing it could help reduce lag during singulo-mayhem somewhat
turf/Del()
if(opacity)
UpdateAffectingLights()
..()
//Objects with opacity will trigger nearby lights to update at next lighting process.
atom/movable/Del()
if(opacity)
UpdateAffectingLights()
..()
//Sets our luminosity. Enforces a hardcoded maximum luminosity by default. This maximum can be overridden but it is extremely
//unwise to do so.
//If we have no light it will create one.
//If we are setting luminosity to 0 the light will be cleaned up and delted once all its queues are complete
//if we have a light already it is merely updated
atom/proc/SetLuminosity(new_luminosity, max_luminosity = LIGHTING_MAX_LUMINOSITY)
if(new_luminosity < 0)
new_luminosity = 0
// world.log << "## WARNING: [type] - luminosity cannot be negative"
else if(max_luminosity < new_luminosity)
new_luminosity = max_luminosity
// if(luminosity != new_luminosity)
// world.log << "## WARNING: [type] - LIGHT_MAX_LUMINOSITY exceeded"
if(isturf(loc))
if(light)
if(luminosity != new_luminosity) //TODO: remove lights from the light list when they're not luminous? DONE in add_effect
light.changed = 1
else
if(new_luminosity)
light = new(src)
luminosity = new_luminosity
//Snowflake code to prevent mobs becoming suns (lag-prevention)
mob/SetLuminosity(new_luminosity)
..(new_luminosity,LIGHTING_MAX_LUMINOSITY_MOB)
//change our opacity (defaults to toggle), and then update all lights that affect us.
atom/proc/SetOpacity(var/new_opacity)
if(new_opacity == null) new_opacity = !opacity
else if(opacity == new_opacity) return
opacity = new_opacity
UpdateAffectingLights()
//set the changed status of all lights which could have possibly lit this atom.
//We don't need to worry about lights which lit us but moved away, since they will have change status set already
atom/proc/UpdateAffectingLights()
var/turf/T = src
if(!isturf(T))
T = loc
if(!isturf(T)) return
for(var/atom in range(LIGHTING_MAX_LUMINOSITY,T)) //TODO: this will probably not work very well :(
var/atom/A = atom
if(A.light && A.luminosity)
A.light.changed = 1 //force it to update at next process()
// for(var/light in lighting_controller.lights) //TODO: this will probably laaaaaag
// var/datum/light_source/L = light
// if(L.changed) continue
// if(!L.owner) continue
// if(!L.owner.luminosity) continue
// if(src in L.effect)
// L.changed = 1
turf
var/lighting_lumcount = 0
var/lighting_changed = 0
turf/space
lighting_lumcount = 4 //starlight
turf/proc/update_lumcount(amount)
lighting_lumcount += amount
// if(lighting_lumcount < 0 || lighting_lumcount > 100)
// world.log << "## WARNING: [type] ([src]) lighting_lumcount = [lighting_lumcount]"
if(!lighting_changed)
lighting_controller.changed_turfs += src
lighting_changed = 1
turf/proc/shift_to_subarea()
lighting_changed = 0
var/area/Area = loc
if(!istype(Area) || !Area.lighting_use_dynamic) return
// change the turf's area depending on its brightness
// restrict light to valid levels
var/light = min(max(round(lighting_lumcount,1),0),lighting_controller.lighting_states)
var/new_tag = "[Area.type]sd_L[light]"
if(Area.tag!=new_tag) //skip if already in this area
var/area/A = locate(new_tag) // find an appropriate area
if(!A)
A = new Area.type() // create area if it wasn't found
// replicate vars
for(var/V in Area.vars)
switch(V)
if("contents","lighting_overlay","overlays") continue
else
if(issaved(Area.vars[V])) A.vars[V] = Area.vars[V]
A.tag = new_tag
A.lighting_subarea = 1
A.SetLightLevel(light)
Area.related += A
A.contents += src // move the turf into the area
area
var/lighting_use_dynamic = 1 //Turn this flag off to prevent sd_DynamicAreaLighting from affecting this area
var/image/lighting_overlay //tracks the darkness image of the area for easy removal
var/lighting_subarea = 0 //tracks whether we're a lighting sub-area
proc/SetLightLevel(light)
if(!src) return
if(light < 0)
light = 0
luminosity = 0
else
if(light > lighting_controller.lighting_states)
light = lighting_controller.lighting_states
luminosity = 1
if(lighting_overlay)
overlays -= lighting_overlay
lighting_overlay.icon_state = "[light]"
else
lighting_overlay = image(LIGHTING_ICON,,num2text(light),LIGHTING_LAYER)
overlays += lighting_overlay
proc/InitializeLighting() //TODO: could probably improve this bit ~Carn
if(!tag) tag = "[type]"
if(!lighting_use_dynamic)
if(!lighting_subarea) // see if this is a lighting subarea already
//show the dark overlay so areas, not yet in a lighting subarea, won't be bright as day and look silly.
SetLightLevel(4)
#undef LIGHTING_MAX_LUMINOSITY
#undef LIGHTING_MAX_LUMINOSITY_MOB
#undef LIGHTING_LAYER
#undef LIGHTING_ICON

View File

@@ -0,0 +1,81 @@
var/datum/controller/lighting/lighting_controller = new ()
datum/controller/lighting
var/processing = 0
var/processing_interval = 5 //setting this too low will probably kill the server. Don't be silly with it!
var/process_cost = 0
var/iteration = 0
var/lighting_states = 7
var/list/lights = list()
var/lights_workload_max = 0
// var/list/changed_lights() //TODO: possibly implement this to reduce on overheads?
var/list/changed_turfs = list()
var/changed_turfs_workload_max = 0
//Workhorse of lighting. It cycles through each light to see which ones need their effects updating. It updates their
//effects and then processes every turf in the queue, moving the turfs to the corresponing lighting sub-area.
//All queue lists prune themselves, which will cause lights with no luminosity to be garbage collected (cheaper and safer
//than deleting them). Processing interval should be roughly half a second for best results.
//By using queues we are ensuring we don't perform more updates than are necessary
datum/controller/lighting/proc/process()
processing = 1
spawn(0)
set background = 1
while(1)
if(processing)
iteration++
var/started = world.timeofday
lights_workload_max = max(lights_workload_max,lights.len)
for(var/i=1, i<=lights.len, i++)
var/datum/light_source/L = lights[i]
if(L.check())
lights.Cut(i,i+1)
i--
sleep(-1)
changed_turfs_workload_max = max(changed_turfs_workload_max,changed_turfs.len)
for(var/i=1, i<=changed_turfs.len, i++)
var/turf/T = changed_turfs[i]
if(T && T.lighting_changed)
T.shift_to_subarea()
changed_turfs.Cut() // reset the changed list
process_cost = (world.timeofday - started)
sleep(processing_interval)
//same as above except it attempts to shift ALL turfs in the world regardless of lighting_changed status
//Does not loop. Should be run prior to process() being called for the first time.
//Note: if we get additional z-levels at runtime (e.g. if the gateway thin ever gets finished) we can initialize specific
//z-levels with the z_level argument
datum/controller/lighting/proc/Initialize(var/z_level)
processing = 0
spawn(-1)
set background = 1
for(var/i=1, i<=lights.len, i++)
var/datum/light_source/L = lights[i]
if(L.check())
lights.Cut(i,i+1)
i--
var/z_start = 1
var/z_finish = world.maxz
if(z_level)
z_level = round(z_level,1)
if(z_level > 0 && z_level <= world.maxz)
z_start = z_level
z_finish = z_level
for(var/k=z_start,k<=z_finish,k++)
for(var/i=1,i<=world.maxx,i++)
for(var/j=1,j<=world.maxy,j++)
var/turf/T = locate(i,j,k)
if(T) T.shift_to_subarea()
changed_turfs.Cut() // reset the changed list

View File

@@ -0,0 +1,211 @@
var/global/datum/controller/game_controller/master_controller //Set in world.New()
var/global/datum/failsafe/Failsafe
var/global/controller_iteration = 0
var/global/last_tick_timeofday = world.timeofday
var/global/last_tick_duration = 0
datum/controller/game_controller
var/processing = 0
var/global/air_master_ready = 0
var/global/sun_ready = 0
var/global/mobs_ready = 0
var/global/diseases_ready = 0
var/global/machines_ready = 0
var/global/objects_ready = 0
var/global/networks_ready = 0
var/global/powernets_ready = 0
var/global/ticker_ready = 0
//Used for MC 'proc break' debugging
var/global/obj/last_obj_processed
var/global/datum/disease/last_disease_processed
var/global/obj/machinery/last_machine_processed
var/global/mob/last_mob_processed
proc/setup()
if(master_controller && (master_controller != src))
del(src)
return
//There can be only one master.
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
if(!job_master)
job_master = new /datum/controller/occupations()
if(job_master.SetupOccupations())
world << "\red \b Job setup complete"
job_master.LoadJobs("config/jobs.txt")
world.tick_lag = config.Ticklag
createRandomZlevel()
setup_objects()
setupgenetics()
for(var/i = 0, i < max_secret_rooms, i++)
make_mining_asteroid_secret()
syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round.
syndicate_code_response = generate_code_phrase()
emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
if(!ticker)
ticker = new /datum/controller/gameticker()
setupfactions()
spawn
ticker.pregame()
proc/setup_objects()
world << "\red \b Initializing objects"
sleep(-1)
for(var/obj/object in world)
object.initialize()
world << "\red \b Initializing pipe networks"
sleep(-1)
for(var/obj/machinery/atmospherics/machine in world)
machine.build_network()
world << "\red \b Initializing atmos machinery."
sleep(-1)
for(var/obj/machinery/atmospherics/unary/vent_pump/T in world)
T.broadcast_status()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world)
T.broadcast_status()
world << "\red \b Initializations complete."
proc/process()
processing = 1
spawn(0)
set background = 1
while(1)
var/currenttime = world.timeofday
var/diff = (currenttime - last_tick_timeofday) / 10
last_tick_timeofday = currenttime
last_tick_duration = diff
if(processing)
controller_iteration++
var/start_time = world.timeofday
air_master_ready = 0
sun_ready = 0
mobs_ready = 0
diseases_ready = 0
machines_ready = 0
objects_ready = 0
networks_ready = 0
powernets_ready = 0
ticker_ready = 0
//skytodo:
/*spawn(0)
air_master.process()
air_master_ready = 1*/
sleep(1)
spawn(0)
sun.calc_position()
sun_ready = 1
sleep(-1)
spawn(0)
for(var/mob/M in world)
last_mob_processed = M
M.Life()
mobs_ready = 1
sleep(-1)
spawn(0)
for(var/datum/disease/D in active_diseases)
last_disease_processed = D
D.process()
diseases_ready = 1
spawn(0)
for(var/obj/machinery/machine in machines)
if(machine)
last_machine_processed = machine
machine.process()
if(machine && machine.use_power)
machine.auto_use_power()
machines_ready = 1
sleep(1)
spawn(-1)
for(var/obj/object in processing_objects)
last_obj_processed = object
object.process()
objects_ready = 1
sleep(-1)
spawn(-1)
for(var/datum/pipe_network/network in pipe_networks)
network.process()
networks_ready = 1
spawn(-1)
for(var/datum/powernet/P in powernets)
P.reset()
powernets_ready = 1
sleep(-1)
spawn(-1)
ticker.process()
ticker_ready = 1
var/IL_check = 0 //Infinite loop check (To report when the master controller breaks.)
while(!air_master_ready || !sun_ready || !mobs_ready || !diseases_ready || !machines_ready || !objects_ready || !networks_ready || !powernets_ready || !ticker_ready)
IL_check++
if(IL_check > 600)
var/MC_report = "air_master_ready = [air_master_ready]; sun_ready = [sun_ready]; mobs_ready = [mobs_ready]; diseases_ready = [diseases_ready]; machines_ready = [machines_ready]; objects_ready = [objects_ready]; networks_ready = [networks_ready]; powernets_ready = [powernets_ready]; ticker_ready = [ticker_ready];"
message_admins("<b><font color='red'>PROC BREAKAGE WARNING:</font> The game's master contorller appears to be stuck in one of it's cycles. It has looped through it's delaying loop [IL_check] times.</b>")
message_admins("<b>The master controller reports: [MC_report]</b>")
if(!diseases_ready)
if(last_disease_processed)
message_admins("<b>DISEASE PROCESSING stuck on </b><A HREF='?src=%holder_ref%;adminplayervars=\ref[last_disease_processed]'>[last_disease_processed]</A>", 0, 1)
else
message_admins("<b>DISEASE PROCESSING stuck on </b>unknown")
if(!machines_ready)
if(last_machine_processed)
message_admins("<b>MACHINE PROCESSING stuck on </b><A HREF='?src=%holder_ref%;adminplayervars=\ref[last_machine_processed]'>[last_machine_processed]</A>", 0, 1)
else
message_admins("<b>MACHINE PROCESSING stuck on </b>unknown")
if(!objects_ready)
if(last_obj_processed)
message_admins("<b>OBJ PROCESSING stuck on </b><A HREF='?src=ADMINHOLDERREF;adminplayervars=\ref[last_obj_processed]'>[last_obj_processed]</A>", 0, 1)
else
message_admins("<b>OBJ PROCESSING stuck on </b>unknown")
log_admin("PROC BREAKAGE WARNING: infinite_loop_check = [IL_check]; [MC_report];")
message_admins("<font color='red'><b>Master controller breaking out of delaying loop. Restarting the round is advised if problem persists. DO NOT manually restart the master controller.</b></font>")
break;
sleep(1)
sleep(world.timeofday+12-start_time)
else
sleep(10)

67
code/controllers/verbs.dm Normal file
View File

@@ -0,0 +1,67 @@
//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)
/client/proc/restart_controller(controller in list("Master","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!)"
if(!holder) return
usr = null
src = null
switch(controller)
if("Master")
master_controller.process()
feedback_add_details("admin_verb","RMC")
if("Lighting")
lighting_controller.process()
feedback_add_details("admin_verb","RLighting")
if("Supply Shuttle")
supply_shuttle.process()
feedback_add_details("admin_verb","RSupply")
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.", 1)
return
/client/proc/debug_controller(controller in list("Master","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!)"
if(!holder) return
switch(controller)
if("Master")
debug_variables(master_controller)
feedback_add_details("admin_verb","DMC")
if("Ticker")
debug_variables(ticker)
feedback_add_details("admin_verb","DTicker")
if("Lighting")
debug_variables(lighting_controller)
feedback_add_details("admin_verb","DLighting")
if("Air")
debug_variables(air_master)
feedback_add_details("admin_verb","DAir")
if("Jobs")
debug_variables(job_master)
feedback_add_details("admin_verb","DJobs")
if("Sun")
debug_variables(sun)
feedback_add_details("admin_verb","DSun")
if("Radio")
debug_variables(radio_controller)
feedback_add_details("admin_verb","DRadio")
if("Supply Shuttle")
debug_variables(supply_shuttle)
feedback_add_details("admin_verb","DSupply")
if("Emergency Shuttle")
debug_variables(emergency_shuttle)
feedback_add_details("admin_verb","DEmergency")
if("Configuration")
debug_variables(config)
feedback_add_details("admin_verb","DConf")
if("pAI")
debug_variables(paiController)
feedback_add_details("admin_verb","DpAI")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.", 1)
return

View File

@@ -15,6 +15,18 @@
cure(0)
return
/datum/disease/alien_embryo/New()
..()
/* Special Hud for xenos */
spawn(0)
if (affected_mob)
AddInfectionImages(affected_mob)
/datum/disease/alien_embryo/cure(var/resistance=1)
..()
spawn(0)
if (affected_mob)
RemoveInfectionImages(affected_mob)
/datum/disease/alien_embryo
name = "Unidentified Foreign Body"
@@ -88,3 +100,51 @@
gibbed = 1
return
/*----------------------------------------
Proc: RefreshInfectionImage()
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
----------------------------------------*/
/datum/disease/alien_embryo/proc/RefreshInfectionImage()
spawn(0)
for (var/mob/living/carbon/alien/alien in world)
if (alien.client)
for(var/image/I in alien.client.images)
if(I.icon_state == "infected")
del(I)
for (var/mob/living/carbon/alien/alien in world)
if (alien.client)
for (var/mob/living/carbon/C in world)
if(C)
if (C.status_flags & XENO_HOST)
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
alien.client.images += I
return
/*----------------------------------------
Proc: AddInfectionImages(C)
Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C.
----------------------------------------*/
/datum/disease/alien_embryo/proc/AddInfectionImages(var/mob/living/carbon/C)
if (C)
for (var/mob/living/carbon/alien/alien in world)
if (alien.client)
if (C.status_flags & XENO_HOST)
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
alien.client.images += I
return
/*----------------------------------------
Proc: RemoveInfectionImage(C)
Des: Removes the alien infection image from all aliens in the world located in passed mob (C).
----------------------------------------*/
/datum/disease/alien_embryo/proc/RemoveInfectionImages(var/mob/living/carbon/C)
if (C)
for (var/mob/living/carbon/alien/alien in world)
if (alien.client)
for(var/image/I in alien.client.images)
if(I.loc == C)
if(I.icon_state == "infected")
del(I)
return

View File

@@ -108,10 +108,6 @@
playSpecials(curturf,effectin,soundin)
// Remove any luminosity etc.
var/prevlum = teleatom.luminosity
teleatom.luminosity = 0
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
@@ -119,9 +115,6 @@
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
// Re-Apply lum
teleatom.sd_SetLuminosity(prevlum)
destarea.Entered(teleatom)
return 1

View File

@@ -48,7 +48,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/area/master // master area used for power calcluations
// (original area before splitting due to sd_DAL)
var/list/related // the other areas of the same type as this
var/list/lights // list of all lights on this area
// var/list/lights // list of all lights on this area
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
@@ -122,10 +122,10 @@ proc/process_ghost_teleport_locs()
//place to another. Look at escape shuttle for example.
//All shuttles show now be under shuttle since we have smooth-wall code.
/area/shuttle //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
/area/shuttle //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
requires_power = 0
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/shuttle/arrival
name = "\improper Arrival Shuttle"
@@ -227,14 +227,14 @@ proc/process_ghost_teleport_locs()
name = "\improper Alien Shuttle Base"
requires_power = 1
luminosity = 0
sd_lighting = 1
lighting_use_dynamic = 1
/area/shuttle/alien/mine
icon_state = "shuttle"
name = "\improper Alien Shuttle Mine"
requires_power = 1
luminosity = 0
sd_lighting = 1
lighting_use_dynamic = 1
/area/shuttle/prison/
name = "\improper Prison Shuttle"
@@ -316,7 +316,7 @@ proc/process_ghost_teleport_locs()
icon_state = "start"
requires_power = 0
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
has_gravity = 1
// === end remove
@@ -796,7 +796,7 @@ proc/process_ghost_teleport_locs()
name = "\improper Holodeck"
icon_state = "Holodeck"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/holodeck/alphadeck
name = "\improper Holodeck Alpha"
@@ -864,7 +864,7 @@ proc/process_ghost_teleport_locs()
/area/solar
requires_power = 0
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
auxport
name = "\improper Fore Port Solar Array"
@@ -1349,25 +1349,25 @@ proc/process_ghost_teleport_locs()
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/turret_protected/AIsatextFS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/turret_protected/AIsatextAS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/turret_protected/AIsatextAP
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/turret_protected/NewAIMain
name = "\improper AI Main New"
@@ -1449,7 +1449,7 @@ proc/process_ghost_teleport_locs()
/area/turret_protected/AssistantRoom
name = "\improper Assistant Room"
icon_state = "storage"
sd_lighting = 0
lighting_use_dynamic = 0
/////////////////////////////////////////////////////////////////////
/*
@@ -1521,7 +1521,7 @@ var/list/the_station_areas = list (
name = "Keelin's private beach"
icon_state = "null"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
requires_power = 0
var/sound/mysound = null

View File

@@ -68,7 +68,7 @@ obj
else
return null
/atom/proc/meteorhit(obj/effect/meteor as obj)
/atom/proc/meteorhit(obj/meteor as obj)
return
/atom/proc/allow_drop()

View File

@@ -14,7 +14,7 @@
var/throwforce = 1
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
//Return: (NONSTANDARD)
// null if object handles breathing logic for lifeform
// datum/air_group to tell lifeform to process using that breath return
@@ -24,7 +24,59 @@
else
return null
proc/initialize()
/obj/proc/initialize()
return
/obj/proc/updateUsrDialog()
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
src.attack_hand(M)
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
if (!(usr in nearby))
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
src.attack_ai(usr)
// check for TK users
//AutoUpdateTK(src)
if (istype(usr, /mob/living/carbon/human))
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
if(!(usr in nearby))
if(usr.client && usr.machine==src)
src.attack_hand(usr)
/obj/proc/updateDialog()
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
src.attack_hand(M)
AutoUpdateAI(src)
//AutoUpdateTK(src)
/obj/proc/update_icon()
return
/obj/item/proc/updateSelfDialog()
var/mob/M = src.loc
if(istype(M) && M.client && M.machine == src)
src.attack_self(M)
/obj/proc/alter_health()
return 1
/obj/proc/hide(h)
return
/obj/proc/hear_talk(mob/M as mob, text)
/*
var/mob/mo = locate(/mob) in src
if(mo)
var/rendered = "<span class='game say'><span class='name'>[M.name]: </span> <span class='message'>[text]</span></span>"
mo.show_message(rendered, 2)
*/
return
/obj/structure/signpost
icon = 'icons/obj/stationobjs.dmi'
@@ -151,37 +203,44 @@
for(name in heads)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td></tr>"
even = !even
if(sec.len > 0)
dat += "<tr><th colspan=2>Security</th></tr>"
for(name in sec)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td></tr>"
even = !even
if(eng.len > 0)
dat += "<tr><th colspan=2>Engineering</th></tr>"
for(name in eng)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td></tr>"
even = !even
if(med.len > 0)
dat += "<tr><th colspan=2>Medical</th></tr>"
for(name in med)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td></tr>"
even = !even
if(sci.len > 0)
dat += "<tr><th colspan=2>Science</th></tr>"
for(name in sci)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td></tr>"
even = !even
if(civ.len > 0)
dat += "<tr><th colspan=2>Civilian</th></tr>"
for(name in civ)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td></tr>"
even = !even
// in case somebody is insane and added them to the manifest, why not
if(bot.len > 0)
dat += "<tr><th colspan=2>Silicon</th></tr>"
for(name in bot)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td></tr>"
even = !even
// misc guys
if(misc.len > 0)
dat += "<tr><th colspan=2>Miscellaneous</th></tr>"
@@ -189,191 +248,11 @@
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td></tr>"
even = !even
dat += "</table>"
dat = dd_replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = dd_replacetext(dat, "\t", "")
return dat
/obj/effect/sign/securearea
desc = "A warning sign which reads 'SECURE AREA'."
name = "SECURE AREA"
icon = 'icons/obj/decals.dmi'
icon_state = "securearea"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/biohazard
desc = "A warning sign which reads 'BIOHAZARD'"
name = "BIOHAZARD"
icon = 'icons/obj/decals.dmi'
icon_state = "bio"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/electricshock
desc = "A warning sign which reads 'HIGH VOLTAGE'"
name = "HIGH VOLTAGE"
icon = 'icons/obj/decals.dmi'
icon_state = "shock"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/examroom
desc = "A guidance sign which reads 'EXAM ROOM'"
name = "EXAM"
icon = 'icons/obj/decals.dmi'
icon_state = "examroom"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/vacuum
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
name = "HARD VACUUM AHEAD"
icon = 'icons/obj/decals.dmi'
icon_state = "space"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/deathsposal
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
name = "DISPOSAL LEADS TO SPACE"
icon = 'icons/obj/decals.dmi'
icon_state = "deathsposal"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/pods
desc = "A warning sign which reads 'ESCAPE PODS'"
name = "ESCAPE PODS"
icon = 'icons/obj/decals.dmi'
icon_state = "pods"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/fire
desc = "A warning sign which reads 'DANGER: FIRE'"
name = "DANGER: FIRE"
icon = 'icons/obj/decals.dmi'
icon_state = "fire"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/nosmoking_1
desc = "A warning sign which reads 'NO SMOKING'"
name = "NO SMOKING"
icon = 'icons/obj/decals.dmi'
icon_state = "nosmoking"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/nosmoking_2
desc = "A warning sign which reads 'NO SMOKING'"
name = "NO SMOKING"
icon = 'icons/obj/decals.dmi'
icon_state = "nosmoking2"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/redcross
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
name = "Med-Bay"
icon = 'icons/obj/decals.dmi'
icon_state = "redcross"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/goldenplaque
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
name = "The Most Robust Men Award for Robustness"
icon = 'icons/obj/decals.dmi'
icon_state = "goldenplaque"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/atmosplaque
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
name = "FEA Atmospherics Division"
icon = 'icons/obj/decals.dmi'
icon_state = "atmosplaque"
anchored = 1.0
opacity = 0
density = 0
/*/obj/item/weapon/plaque_assembly //commenting this out until there's a better rework
desc = "Put this on a wall and engrave an epitaph"
name = "Plaque Assembly"
icon = 'icons/obj/decals.dmi'
icon_state = "goldenplaque"
/obj/item/weapon/plaque_assembly/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
if(istype(A,/turf/simulated/wall) || istype(A,/turf/simulated/shuttle/wall) || istype(A,/turf/unsimulated/wall))
var/epitaph = input("What would you like to engrave", null)
if(epitaph)
var/obj/effect/sign/goldenplaque/gp = new/obj/effect/sign/goldenplaque(A)
gp.name = epitaph
gp.layer = 2.9
del(src)*/
/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
icon = 'icons/obj/decals.dmi'
icon_state = "maltesefalcon1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/maltesefalcon2
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
icon = 'icons/obj/decals.dmi'
icon_state = "maltesefalcon2"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/science//These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
desc = "A warning sign which reads 'SCIENCE!'"
name = "SCIENCE!"
icon = 'icons/obj/decals.dmi'
icon_state = "science1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/chemistry
desc = "A warning sign which reads 'CHEMISTY'"
name = "CHEMISTRY"
icon = 'icons/obj/decals.dmi'
icon_state = "chemistry1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/botany
desc = "A warning sign which reads 'HYDROPONICS'"
name = "HYDROPONICS"
icon = 'icons/obj/decals.dmi'
icon_state = "hydro1"
anchored = 1.0
opacity = 0
density = 0
/obj/hud
name = "hud"
unacidable = 1
@@ -396,264 +275,6 @@
var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define!
/obj/item
name = "item"
icon = 'icons/obj/items.dmi'
var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
var/abstract = 0
var/force = 0
var/item_state = null
var/damtype = "brute"
var/r_speed = 1.0
var/health = null
var/burn_point = null
var/burning = null
var/hitsound = null
var/w_class = 3.0
flags = FPRINT | TABLEPASS
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
pass_flags = PASSTABLE
pressure_resistance = 50
// causeerrorheresoifixthis
var/obj/item/master = null
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
var/icon_action_button //If this is set, The item will make an action button on the player's HUD when picked up. The button will have the icon_action_button sprite from the screen1_action.dmi file.
var/action_button_name //This is the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. Note that icon_action_button needs to be set in order for the action button to appear.
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
var/color = null
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
var/permeability_coefficient = 1 // for chemicals/diseases
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
//Set disable_warning to 1 if you wish it to not give you outputs.
/obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = 0)
if(!slot) return 0
if(!M) return 0
if(ishuman(M))
//START HUMAN
var/mob/living/carbon/human/H = M
if(FAT in H.mutations)
if(!(flags & ONESIZEFITSALL))
if(!disable_warning)
H << "\red You're too fat to wear the [name]."
return 0
switch(slot)
if(slot_l_hand)
if(H.l_hand)
return 0
return 1
if(slot_r_hand)
if(H.r_hand)
return 0
return 1
if(slot_wear_mask)
if(H.wear_mask)
return 0
if( !(slot_flags & SLOT_MASK) )
return 0
return 1
if(slot_back)
if(H.back)
return 0
if( !(slot_flags & SLOT_BACK) )
return 0
return 1
if(slot_wear_suit)
if(H.wear_suit)
return 0
if( !(slot_flags & SLOT_OCLOTHING) )
return 0
return 1
if(slot_gloves)
if(H.gloves)
return 0
if( !(slot_flags & SLOT_GLOVES) )
return 0
return 1
if(slot_shoes)
if(H.shoes)
return 0
if( !(slot_flags & SLOT_FEET) )
return 0
return 1
if(slot_belt)
if(H.belt)
return 0
if(!H.w_uniform)
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
return 0
if( !(slot_flags & SLOT_BELT) )
return
return 1
if(slot_glasses)
if(H.glasses)
return 0
if( !(slot_flags & SLOT_EYES) )
return 0
return 1
if(slot_head)
if(H.head)
return 0
if( !(slot_flags & SLOT_HEAD) )
return 0
return 1
if(slot_ears)
if(H.ears)
return 0
if( !(slot_flags & SLOT_EARS) )
return 0
return 1
if(slot_w_uniform)
if(H.w_uniform)
return 0
if( !(slot_flags & SLOT_ICLOTHING) )
return 0
return 1
if(slot_wear_id)
if(H.wear_id)
return 0
if(!H.w_uniform)
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
return 0
if( !(slot_flags & SLOT_ID) )
return 0
return 1
if(slot_l_store)
if(H.l_store)
return 0
if(!H.w_uniform)
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
return 0
if(slot_flags & SLOT_DENYPOCKET)
return
if( w_class <= 2 || (slot_flags & SLOT_POCKET) )
return 1
if(slot_r_store)
if(H.r_store)
return 0
if(!H.w_uniform)
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
return 0
if(slot_flags & SLOT_DENYPOCKET)
return 0
if( w_class <= 2 || (slot_flags & SLOT_POCKET) )
return 1
return 0
if(slot_s_store)
if(H.s_store)
return 0
if(!H.wear_suit)
if(!disable_warning)
H << "\red You need a suit before you can attach this [name]."
return 0
if(!H.wear_suit.allowed)
if(!disable_warning)
usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
return 0
if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) )
return 1
return 0
if(slot_handcuffed)
if(H.handcuffed)
return 0
if(!istype(src, /obj/item/weapon/handcuffs))
return 0
return 1
if(slot_legcuffed)
if(H.legcuffed)
return 0
if(!istype(src, /obj/item/weapon/legcuffs))
return 0
return 1
if(slot_in_backpack)
if (H.back && istype(H.back, /obj/item/weapon/storage/backpack))
var/obj/item/weapon/storage/backpack/B = H.back
if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
return 1
return 0
return 0 //Unsupported slot
//END HUMAN
else if(ismonkey(M))
//START MONKEY
var/mob/living/carbon/monkey/MO = M
switch(slot)
if(slot_l_hand)
if(MO.l_hand)
return 0
return 1
if(slot_r_hand)
if(MO.r_hand)
return 0
return 1
if(slot_wear_mask)
if(MO.wear_mask)
return 0
if( !(slot_flags & SLOT_MASK) )
return 0
return 1
if(slot_back)
if(MO.back)
return 0
if( !(slot_flags & SLOT_BACK) )
return 0
return 1
return 0 //Unsupported slot
//END MONKEY
/obj/item/verb/verb_pickup()
set src in oview(1)
set category = "Object"
set name = "Pick up"
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(src, usr))
return
if(ishuman(usr))
if(usr.get_active_hand() == null)
src.Click() // Let me know if this has any problems -Giacom
/*
if(usr.get_active_hand() == null)
src.attack_hand(usr)
else
usr << "\red You already have something in your hand."
*/
else
usr << "\red This mob type can't use this verb."
//This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'icon_action_button' to the icon_state of the image of the button in screen1_action.dmi
//The default action is attack_self().
//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob.
/obj/item/proc/ui_action_click()
if( src in usr )
attack_self(usr)
/obj/item/device
icon = 'icons/obj/device.dmi'

View File

@@ -227,6 +227,7 @@
density = 0
anchored = 1
layer = 2
luminosity = 1
icon = 'icons/effects/effects.dmi'
icon_state = "greenglow"

View File

@@ -43,7 +43,7 @@
/obj/machinery/camera
name = "security camera"
desc = "It's used to monitor rooms. It can see through walls."
desc = "It's used to monitor rooms."
icon = 'icons/obj/monitors.dmi'
icon_state = "camera"
var/network = "SS13"

View File

@@ -27,6 +27,13 @@
IsShield()
return 1
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/melee/baton))
user.visible_message("<span class='warning'>[user] bashes their [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
else
..()
/obj/item/weapon/shield/energy
name = "energy combat shield"
desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
@@ -221,6 +228,19 @@
details = 1
origin_tech = "magnets=4;biotech=2"
/obj/item/weapon/melee/chainofcommand
name = "chain of command"
desc = "A tool used by great men to placate the frothing masses."
icon_state = "chain"
item_state = "chain"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
force = 10
throwforce = 7
w_class = 3
origin_tech = "combat=4"
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
/obj/item/weapon/melee/energy
var/active = 0
@@ -688,41 +708,18 @@
item_state = "card-id"
w_class = 1.0
//TODO: Figure out wtf this is and possibly remove it -Nodrak
/obj/item/weapon/dummy
name = "dummy"
invisibility = 101.0
anchored = 1.0
flags = TABLEPASS
/obj/item/weapon/extinguisher
name = "fire extinguisher"
desc = "A traditional red fire extinguisher."
icon = 'icons/obj/items.dmi'
icon_state = "fire_extinguisher0"
var/last_use = 1.0
var/safety = 1
hitsound = 'sound/weapons/smash.ogg'
flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT
throwforce = 10
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 10.0
item_state = "fire_extinguisher"
m_amt = 90
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
/obj/item/weapon/dummy/ex_act()
return
/obj/item/weapon/extinguisher/mini
name = "fire extinguisher"
desc = "A light and compact fibreglass-framed model fire extinguisher."
icon_state = "miniFE0"
hitsound = null //it is much lighter, after all.
flags = FPRINT | USEDELAY | TABLEPASS
throwforce = 2
w_class = 2.0
force = 3.0
item_state = "miniFE"
m_amt = 0
/obj/item/weapon/dummy/blob_act()
return
/obj/item/weapon/f_card
name = "finger print card"
@@ -1291,7 +1288,7 @@
/obj/item/weapon/camera_bug/attack_self(mob/usr as mob)
var/list/cameras = new/list()
for (var/obj/machinery/camera/C in Cameras)
for (var/obj/machinery/camera/C in cameranet.cameras)
if (C.bugged && C.status)
cameras.Add(C)
if (length(cameras) == 0)
@@ -1610,22 +1607,6 @@
icon_state = "mousetraparmed"
armed = 1
/obj/item/weapon/dice // -- TLE
name = "d6"
desc = "A dice with six sides."
var/sides = 6
icon = 'icons/obj/dice.dmi'
icon_state = "d66"
/obj/item/weapon/dice/New()
icon_state = "[name][rand(sides)]"
/obj/item/weapon/dice/d20 // -- TLE
name = "d20"
desc = "A dice with twenty sides."
sides = 20
icon_state = "d2020"
/obj/item/weapon/pai_cable
desc = "A flexible coated cable with a universal jack on one end."
name = "data cable"

View File

@@ -50,20 +50,13 @@
//Magic constants obtained by using linear regression on right-angled triangles of sides 0<x<1, 0<y<1
//They should approximate pythagoras theorem well enough for our needs.
//In fact, less accuracy is kinda better for explosions anyway :P Maybe k1=1, k2=0.5?
#define k1 0.934
#define k2 0.427
/proc/approx_dist(center=usr, T) // T is just the second atom to check distance to center with
var/turf/centerturf = get_turf(center)
var/turf/targetturf = get_turf(T)
var/a = abs(targetturf.x - centerturf.x) //sides of right-angled triangle
var/b = abs(targetturf.y - centerturf.y)
if(a>=b)
return (k1*a) + (k2*b) //No sqrt or powers :)
else
return (k1*b) + (k2*a)
/proc/cheap_hypotenuse(Ax,Ay,Bx,By) // T is just the second atom to check distance to center with
var/dx = abs(Ax - Bx) //sides of right-angled triangle
var/dy = abs(Ay - By)
if(dx>=dy) return (k1*dx) + (k2*dy) //No sqrt or powers :)
else return (k1*dx) + (k2*dy)
#undef k1
#undef k2

View File

@@ -57,6 +57,13 @@ proc/isemptylist(list/list)
return 1
return 0
//Checks for specific types in a list
/proc/is_type_in_list(var/atom/A, var/list/L)
for(var/type in L)
if(istype(A, type))
return 1
return 0
//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
proc/clearlist(list/list)
if(istype(list))
@@ -166,6 +173,29 @@ proc/listclearnulls(list/list)
K += item
return K
//Mergesort: divides up the list into halves to begin the sort
/proc/sortKey(var/list/client/L, var/order = 1)
if(isnull(L) || L.len < 2)
return L
var/middle = L.len / 2 + 1
return mergeKey(sortKey(L.Copy(0,middle)), sortKey(L.Copy(middle)), order)
//Mergsort: does the actual sorting and returns the results back to sortAtom
/proc/mergeKey(var/list/client/L, var/list/client/R, var/order = 1)
var/Li=1
var/Ri=1
var/list/result = new()
while(Li <= L.len && Ri <= R.len)
var/client/rL = L[Li]
var/client/rR = R[Ri]
if(sorttext(rL.ckey, rR.ckey) == order)
result += L[Li++]
else
result += R[Ri++]
if(Li <= L.len)
return (result + L.Copy(Li, 0))
return (result + R.Copy(Ri, 0))
//Mergesort: divides up the list into halves to begin the sort
/proc/sortAtom(var/list/atom/L, var/order = 1)

View File

@@ -199,6 +199,50 @@ proc/tg_list2text(list/list, glue=",")
file = file(file_path)
return dd_text2list(file2text(file), separator)
//Turns a direction into text
/proc/dir2text(direction)
switch(direction)
if(1.0)
return "north"
if(2.0)
return "south"
if(4.0)
return "east"
if(8.0)
return "west"
if(5.0)
return "northeast"
if(6.0)
return "southeast"
if(9.0)
return "northwest"
if(10.0)
return "southwest"
else
return
//Turns text into proper directions
/proc/text2dir(direction)
switch(uppertext(direction))
if("NORTH")
return 1
if("SOUTH")
return 2
if("EAST")
return 4
if("WEST")
return 8
if("NORTHEAST")
return 5
if("NORTHWEST")
return 9
if("SOUTHEAST")
return 6
if("SOUTHWEST")
return 10
else
return
//Converts an angle (degrees) into an ss13 direction
/proc/angle2dir(var/degree)
degree = ((degree+22.5)%365)

View File

@@ -320,6 +320,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
oldname = null//don't bother with the records update crap
world << "<b>[newname] is the AI!</b>"
world << sound('sound/AI/newAI.ogg')
for(var/mob/aiEye/E in mob_list)
if(E.ai && E.ai == src)
E.name = "[newname] (AI Eye)"
break
fully_replace_character_name(oldname,newname)
@@ -399,30 +403,31 @@ Turf and target are seperate in case you want to teleport some distance from a t
return creatures
//Orders mobs by type
//Orders mobs by type then by name
/proc/sortmobs()
var/list/moblist = list()
for(var/mob/living/silicon/ai/M in mob_list)
var/list/sortmob = sortAtom(mob_list)
for(var/mob/living/silicon/ai/M in sortmob)
moblist.Add(M)
for(var/mob/living/silicon/pai/M in mob_list)
for(var/mob/living/silicon/pai/M in sortmob)
moblist.Add(M)
for(var/mob/living/silicon/robot/M in mob_list)
for(var/mob/living/silicon/robot/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/human/M in mob_list)
for(var/mob/living/carbon/human/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/brain/M in mob_list)
for(var/mob/living/carbon/brain/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/alien/M in mob_list)
for(var/mob/living/carbon/alien/M in sortmob)
moblist.Add(M)
for(var/mob/dead/observer/M in mob_list)
for(var/mob/dead/observer/M in sortmob)
moblist.Add(M)
for(var/mob/new_player/M in mob_list)
for(var/mob/new_player/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/monkey/M in mob_list)
for(var/mob/living/carbon/monkey/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/metroid/M in mob_list)
for(var/mob/living/carbon/metroid/M in sortmob)
moblist.Add(M)
for(var/mob/living/simple_animal/M in mob_list)
for(var/mob/living/simple_animal/M in sortmob)
moblist.Add(M)
// for(var/mob/living/silicon/hivebot/M in world)
// mob_list.Add(M)
@@ -762,6 +767,17 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
if(A.vars.Find(lowertext(varname))) return 1
else return 0
//Returns: all the areas in the world
/proc/return_areas()
var/list/area/areas = list()
for(var/area/A in world)
areas += A
return areas
//Returns: all the areas in the world, sorted.
/proc/return_sorted_areas()
return sortAtom(return_areas())
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all areas of that type in the world.
/proc/get_areas(var/areatype)
@@ -907,25 +923,25 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
if(!istype(O,/obj)) continue
O.loc = X
for(var/mob/M in T)
if(!istype(M,/mob)) continue
if(!istype(M,/mob) || istype(M, /mob/aiEye)) continue // If we need to check for more mobs, I'll add a variable
M.loc = X
var/area/AR = X.loc
// var/area/AR = X.loc
if(AR.sd_lighting)
X.opacity = !X.opacity
X.sd_SetOpacity(!X.opacity)
// if(AR.lighting_use_dynamic) //TODO: rewrite this code so it's not messed by lighting ~Carn
// X.opacity = !X.opacity
// X.SetOpacity(!X.opacity)
toupdate += X
if(turftoleave)
var/turf/ttl = new turftoleave(T)
var/area/AR2 = ttl.loc
// var/area/AR2 = ttl.loc
if(AR2.sd_lighting)
ttl.opacity = !ttl.opacity
ttl.sd_SetOpacity(!ttl.opacity)
// if(AR2.lighting_use_dynamic) //TODO: rewrite this code so it's not messed by lighting ~Carn
// ttl.opacity = !ttl.opacity
// ttl.sd_SetOpacity(!ttl.opacity)
fromupdate += ttl
@@ -942,13 +958,19 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
for(var/turf/simulated/T1 in toupdate)
for(var/obj/machinery/door/D2 in T1)
doors += D2
air_master.tiles_to_update |= T1
/*if(T1.parent)
air_master.groups_to_rebuild += T1.parent
else
air_master.tiles_to_update += T1*/
if(fromupdate.len)
for(var/turf/simulated/T2 in fromupdate)
for(var/obj/machinery/door/D2 in T2)
doors += D2
air_master.tiles_to_update |= T2
/*if(T2.parent)
air_master.groups_to_rebuild += T2.parent
else
air_master.tiles_to_update += T2*/
for(var/obj/O in doors)
O:update_nearby_tiles(1)
@@ -1062,9 +1084,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
for(var/mob/M in T)
if(!istype(M,/mob))
continue
if(!istype(M,/mob) || istype(M, /mob/aiEye)) continue // If we need to check for more mobs, I'll add a variable
mobs += M
for(var/mob/M in mobs)
@@ -1079,14 +1099,14 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
for(var/V in T.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity", "sd_light_spill",)))
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
X.vars[V] = T.vars[V]
var/area/AR = X.loc
// var/area/AR = X.loc
if(AR.sd_lighting)
X.opacity = !X.opacity
X.sd_SetOpacity(!X.opacity)
// if(AR.lighting_use_dynamic)
// X.opacity = !X.opacity
// X.sd_SetOpacity(!X.opacity) //TODO: rewrite this code so it's not messed by lighting ~Carn
toupdate += X
@@ -1099,12 +1119,11 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
var/list/doors = new/list()
//skytodo: wtf is going on here?
/*if(toupdate.len)
if(toupdate.len)
for(var/turf/simulated/T1 in toupdate)
for(var/obj/machinery/door/D2 in T1)
doors += D2
if(T1.parent)
/*if(T1.parent)
air_master.groups_to_rebuild += T1.parent
else
air_master.tiles_to_update += T1*/
@@ -1151,26 +1170,152 @@ proc/get_mob_with_client_list()
mobs += M
return mobs
/atom/proc/transfer_fingerprints_to(var/atom/A)
if(!istype(A.fingerprints,/list))
A.fingerprints = list()
if(!istype(A.fingerprintshidden,/list))
A.fingerprintshidden = list()
A.fingerprints |= fingerprints //detective
A.fingerprintshidden |= fingerprintshidden //admin
A.fingerprintslast = fingerprintslast
/proc/parse_zone(zone)
if(zone == "r_hand") return "right hand"
else if (zone == "l_hand") return "left hand"
else if (zone == "l_arm") return "left arm"
else if (zone == "r_arm") return "right arm"
else if (zone == "l_leg") return "left leg"
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 return zone
//todo: this func is missing diagonals
/proc/get_turf(turf/location)
while(location)
if(isturf(location))
return location
location = location.loc
return null
/proc/get_turf_or_move(turf/location)
return get_turf(location)
//Quick type checks for some tools
var/global/list/common_tools = list(
/obj/item/weapon/cable_coil,
/obj/item/weapon/wrench,
/obj/item/weapon/weldingtool,
/obj/item/weapon/screwdriver,
/obj/item/weapon/wirecutters,
/obj/item/device/multitool,
/obj/item/weapon/crowbar)
/proc/istool(O)
if(O && is_type_in_list(O, common_tools))
return 1
return 0
/proc/iswrench(O)
if(istype(O, /obj/item/weapon/wrench))
return 1
return 0
/proc/iswelder(O)
if(istype(O, /obj/item/weapon/weldingtool))
return 1
return 0
/proc/iscoil(O)
if(istype(O, /obj/item/weapon/cable_coil))
return 1
return 0
/proc/iswirecutter(O)
if(istype(O, /obj/item/weapon/wirecutters))
return 1
return 0
/proc/isscrewdriver(O)
if(istype(O, /obj/item/weapon/screwdriver))
return 1
return 0
/proc/ismultitool(O)
if(istype(O, /obj/item/device/multitool))
return 1
return 0
/proc/iscrowbar(O)
if(istype(O, /obj/item/weapon/crowbar))
return 1
return 0
proc/is_hot(obj/item/W as obj)
switch(W.type)
if(/obj/item/weapon/weldingtool)
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())
return 3800
else
return 0
if(/obj/item/weapon/lighter)
if(W:lit)
return 1500
else
return 0
if(/obj/item/weapon/match)
if(W:lit)
return 1000
else
return 0
if(/obj/item/clothing/mask/cigarette)
if(W:lit)
return 1000
else
return 0
if(/obj/item/weapon/pickaxe/plasmacutter)
return 3800
if(/obj/item/weapon/melee/energy)
return 3500
else
return 0
return 0
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
return ( \
istype(W, /obj/item/weapon/screwdriver) || \
istype(W, /obj/item/weapon/pen) || \
istype(W, /obj/item/weapon/weldingtool) || \
istype(W, /obj/item/weapon/lighter/zippo) || \
istype(W, /obj/item/weapon/match) || \
istype(W, /obj/item/clothing/mask/cigarette) || \
istype(W, /obj/item/weapon/wirecutters) || \
istype(W, /obj/item/weapon/circular_saw) || \
istype(W, /obj/item/weapon/melee/energy/sword) || \
istype(W, /obj/item/weapon/melee/energy/blade) || \
istype(W, /obj/item/weapon/shovel) || \
istype(W, /obj/item/weapon/kitchenknife) || \
istype(W, /obj/item/weapon/butch) || \
istype(W, /obj/item/weapon/scalpel) || \
istype(W, /obj/item/weapon/kitchen/utensil/knife) || \
istype(W, /obj/item/weapon/shard) || \
istype(W, /obj/item/weapon/broken_bottle) || \
istype(W, /obj/item/weapon/reagent_containers/syringe) || \
istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \
istype(W, /obj/item/weapon/twohanded/fireaxe) \
)
/proc/reverse_direction(var/dir)
switch(dir)
if(1)
return 2
if(4)
return 8
if(2)
return 1
if(8)
return 4
else
return dir
if(NORTH)
return SOUTH
if(NORTHEAST)
return SOUTHWEST
if(EAST)
return WEST
if(SOUTHEAST)
return NORTHWEST
if(SOUTH)
return NORTH
if(SOUTHWEST)
return NORTHEAST
if(WEST)
return EAST
if(NORTHWEST)
return SOUTHEAST

View File

@@ -38,6 +38,16 @@
proc/return_siding_icon_state() //used for grass floors, which have siding.
return 0
/turf/Entered(atom/A as mob|obj)
..()
if ((A && A.density && !( istype(A, /obj/effect/beam) )))
for(var/obj/effect/beam/i_beam/I in src)
spawn( 0 )
if (I)
I.hit()
return
return
/turf/space
icon = 'icons/turf/space.dmi'
name = "\proper space"
@@ -213,7 +223,7 @@
walltype = "plasma"
if("clown")
name = "bananium wall"
desc = "A wall with bananium plating."
desc = "A wall with bananium plating. Honk!"
icon_state = "clown0"
walltype = "clown"
if("sandstone")
@@ -298,6 +308,12 @@
opacity = 1
density = 1
turf/unsimulated/wall/splashscreen
name = "Space Station 13"
icon = 'icons/misc/fullscreen.dmi'
icon_state = "title"
layer = FLY_LAYER
/turf/unsimulated/wall/other
icon_state = "r_wall"

View File

@@ -3,80 +3,43 @@
// ===
/area/
/area
var/global/global_uid = 0
var/uid
/area/New()
icon_state = ""
layer = 10
master = src //moved outside the spawn(1) to avoid runtimes in lighting.dm when it references src.loc.loc.master ~Carn
src.icon = 'icons/effects/alert.dmi'
uid = ++global_uid
spawn(1)
//world.log << "New: [src] [tag]"
var/sd_created = findtext(tag,"sd_L")
sd_New(sd_created)
if(sd_created)
related += src
return
related = list(src)
src.icon = 'icons/effects/alert.dmi'
src.layer = 10
// update_lights()
if(name == "Space") // override defaults for space
if(type == /area) // override defaults for space. TODO: make space areas of type /area/space rather than /area
requires_power = 1
always_unpowered = 1
sd_SetLuminosity(1)
lighting_use_dynamic = 1
power_light = 0
power_equip = 0
power_environ = 0
// lighting_state = 4
//has_gravity = 0 // Space has gravity. Because.. because.
if(!requires_power)
power_light = 0//rastaf0
power_equip = 0//rastaf0
power_environ = 0//rastaf0
luminosity = 1
sd_lighting = 0 // *DAL*
else
if(requires_power)
luminosity = 0
//sd_SetLuminosity(0) // *DAL*
else
power_light = 0 //rastaf0
power_equip = 0 //rastaf0
power_environ = 0 //rastaf0
luminosity = 1
lighting_use_dynamic = 0
..()
// spawn(15)
power_change() // all machines set to current power level, also updates lighting icon
InitializeLighting()
/*spawn(5)
for(var/turf/T in src) // count the number of turfs (for lighting calc)
if(no_air)
T.oxygen = 0 // remove air if so specified for this area
T.n2 = 0
T.res_vars()
*/
spawn(15)
src.power_change() // all machines set to current power level, also updates lighting icon
/*
/proc/get_area(area/A)
while (A)
if (istype(A, /area))
return A
A = A.loc
return null
*/
/*
/area/proc/update_lights()
var/new_power = 0
for(var/obj/machinery/light/L in src.contents)
if(L.on)
new_power += (L.luminosity * 20)
lighting_power_usage = new_power
return
*/
/area/proc/poweralert(var/state, var/obj/source as obj)
if (state != poweralm)
poweralm = state

View File

@@ -2,7 +2,7 @@ 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)
@@ -43,7 +43,8 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
max_secret_rooms--
return 1
*/
/*
/proc/populate_w_asteroids(var/z,var/density=null)
if(!density)
density = pick(10,20,40)
@@ -55,7 +56,7 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
if(start_loc && spawn_asteroid(start_loc))
density--
return
*/
//this is terrible! -Pete
/*
/datum/game_mode/proc/setup_sectors()
@@ -79,7 +80,7 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
else
break
world << "\blue \b Randomization complete."
/*
//debug
for(x=1,x<=global_map.len,x++)
var/list/y_arr = global_map[x]
@@ -92,7 +93,7 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
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()

View File

@@ -1,6 +1,41 @@
//Movable atoms
/atom/movable
var/mob/pulledby = null
/atom/movable/verb/pull()
set name = "Pull"
set category = "IC"
set src in oview(1)
usr.start_pulling(src)
return
//All atoms
/atom/verb/examine()
set name = "Examine"
set category = "IC"
set src in oview(12) //make it work from farther away
if (!( usr ))
return
usr << "That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn
usr << desc
// *****RM
//usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]"
return
/atom/proc/MouseDrop_T()
return
/atom/proc/relaymove()
return
/atom/proc/ex_act()
return
/atom/proc/blob_act()
return
/atom/proc/attack_hand(mob/user as mob)
return
@@ -32,7 +67,6 @@
src.attack_paw(user)
return
// for metroids
/atom/proc/attack_metroid(mob/user as mob)
return
@@ -166,6 +200,17 @@
del(fingerprints)
return
/atom/proc/transfer_fingerprints_to(var/atom/A)
if(!istype(A.fingerprints,/list))
A.fingerprints = list()
if(!istype(A.fingerprintshidden,/list))
A.fingerprintshidden = list()
A.fingerprints |= fingerprints //detective
A.fingerprintshidden |= fingerprintshidden //admin
A.fingerprintslast = fingerprintslast
//returns 1 if made bloody, returns 0 otherwise
/atom/proc/add_blood(mob/living/carbon/human/M as mob)
if (!( istype(M, /mob/living/carbon/human) ))

View File

@@ -118,8 +118,8 @@
socket_talk = new /datum/socket_talk()
master_controller = new /datum/controller/game_controller()
spawn(-1)
master_controller.setup()
spawn(-1) master_controller.setup()
lighting_controller.Initialize()
return
//Crispy fullban

View File

@@ -344,7 +344,7 @@
set category = "Changeling"
set name = "Regenerative Stasis (20)"
var/datum/changeling/changeling = changeling_power(20,0,100,UNCONSCIOUS)
var/datum/changeling/changeling = changeling_power(20,0,100,DEAD)
if(!changeling) return
changeling.chem_charges -= 20

View File

@@ -27,8 +27,8 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We fake our death while we regenerate our form, even through death."
helptext = "Must be used before death."
desc = "We become weakened to a death-like state, where we will rise again from death."
helptext = "Can be used before or after death. Duration varies greatly."
genomecost = 0
allowduringlesserform = 1
verbpath = /mob/proc/changeling_fakedeath
@@ -56,7 +56,7 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/silence_sting
name = "Silence Sting"
desc = "We silently sting a human, completely silencing them for a short time."
helptext = "Does not provide a warning to a victim that they have been stung, until they try to speak and can not."
helptext = "Does not provide a warning to a victim that they have been stung, until they try to speak and cannot."
genomecost = 2
allowduringlesserform = 1
verbpath = /mob/proc/changeling_silence_sting
@@ -64,6 +64,7 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/transformation_sting
name = "Transformation Sting"
desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another."
helptext = "Does not provide a warning to others. The victim will transform much like a changeling would."
genomecost = 3
verbpath = /mob/proc/changeling_transformation_sting

View File

@@ -24,7 +24,7 @@
name = "Desk"
desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl"
icon_state = "tomealtar"
luminosity = 5
// luminosity = 5
//sprites for this no longer exist -Pete
//(they were stolen from another game anyway)

View File

@@ -92,14 +92,13 @@
IonStorm()
if(14)
spacevine_infestation()
// TODO: Uncomment this after feature freeze -Giacom
//if(15)
// communications_blackout()
if(15)
communications_blackout()
/proc/communications_blackout()
/proc/communications_blackout(var/silent = 1)
//Uncomment below if you want communication blackouts to have a warning.
//command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
if(!silent) command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)

View File

@@ -137,11 +137,12 @@ var/global/datum/controller/gameticker/ticker
if(admins_number == 0)
send2irc("Server", "Round just started with no admins online!")
spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE
supply_shuttle.process() //Start the supply shuttle regenerating points -- TLE
master_controller.process() //Start master_controller.process()
lighting_controller.process() //Start processing DynamicAreaLighting updates
//Start master_controller.process()
spawn master_controller.process()
if (config.sql_enabled)
if(config.sql_enabled)
spawn(3000)
statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE

View File

@@ -164,50 +164,3 @@
del(src)
return
..()
/*
//Testing purposes only!
/obj/item/weapon/meteorgun
name = "Meteor Gun"
desc = "This beast fires meteors!. TESTING PURPOSES ONLY, This gun is <b>incomplete</b>!"
icon = 'icons/obj/gun.dmi'
icon_state = "lasercannon"
item_state = "gun"
/obj/item/weapon/meteorgun/attack_self()
var/start_x = usr.loc.x
var/start_y = usr.loc.y
var/start_z = usr.loc.z
var/end_x = 0
var/end_y = 0
var/end_z = 0
switch(usr.dir)
if(NORTH)
end_x = start_x
end_y = world.maxy-TRANSITIONEDGE
if(SOUTH)
end_x = start_x
end_y = TRANSITIONEDGE
if(EAST)
end_x = world.maxx-TRANSITIONEDGE
end_y = start_y
if(WEST)
end_x = TRANSITIONEDGE
end_y = start_y
else //north
end_x = start_x
end_y = TRANSITIONEDGE
end_z = start_z
var/start = locate(start_x, start_y, start_z)
var/end = locate(end_x, end_y, end_z)
var/obj/effect/meteor/M = new /obj/effect/meteor(start)
M.dest = end
spawn(0)
walk_towards(M, M.dest, 1)
return
*/

View File

@@ -87,6 +87,7 @@
/obj/var/req_one_access_txt = "0"
/obj/New()
..()
//NOTE: If a room requires more than one access (IE: Morgue + medbay) set the req_acesss_txt to "5;6" if it requires 5 and 6
if(src.req_access_txt)
var/list/req_access_str = dd_text2list(req_access_txt,";")
@@ -106,7 +107,7 @@
if(n)
req_one_access += n
..()
//returns 1 if this mob has sufficient access to use this object
/obj/proc/allowed(mob/M)

View File

@@ -4,60 +4,61 @@
tag = text("landmark*[]", name)
invisibility = 101
if (name == "shuttle")
switch(name) //some of these are probably obsolete
if("shuttle")
shuttle_z = z
del(src)
if (name == "airtunnel_stop")
if("airtunnel_stop")
airtunnel_stop = x
if (name == "airtunnel_start")
if("airtunnel_start")
airtunnel_start = x
if (name == "airtunnel_bottom")
if("airtunnel_bottom")
airtunnel_bottom = y
if (name == "monkey")
if("monkey")
monkeystart += loc
del(src)
if (name == "start")
if("start")
newplayer_start += loc
del(src)
if (name == "wizard")
if("wizard")
wizardstart += loc
del(src)
if (name == "JoinLate")
if("JoinLate")
latejoin += loc
del(src)
//prisoners
if (name == "prisonwarp")
if("prisonwarp")
prisonwarp += loc
del(src)
// if (name == "mazewarp")
// mazewarp += loc
if (name == "Holding Facility")
// if("mazewarp")
// mazewarp += loc
if("Holding Facility")
holdingfacility += loc
if (name == "tdome1")
if("tdome1")
tdome1 += loc
if (name == "tdome2")
if("tdome2")
tdome2 += loc
if (name == "tdomeadmin")
if("tdomeadmin")
tdomeadmin += loc
if (name == "tdomeobserve")
if("tdomeobserve")
tdomeobserve += loc
//not prisoners
if (name == "prisonsecuritywarp")
if("prisonsecuritywarp")
prisonsecuritywarp += loc
del(src)
if (name == "blobstart")
if("blobstart")
blobstart += loc
del(src)
if(name == "xeno_spawn")
if("xeno_spawn")
xeno_spawn += loc
del(src)

View File

@@ -108,7 +108,7 @@
/obj/machinery/optable/process()
check_victim()
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
if (istype(W, /obj/item/weapon/grab))
if(ismob(W:affecting))

View File

@@ -3,12 +3,15 @@
/obj/machinery/bot
icon = 'icons/obj/aibots.dmi'
layer = MOB_LAYER
luminosity = 2
var/obj/item/weapon/card/id/botcard // the ID card that the bot "holds"
var/on = 1
var/health = 0 //do not forget to set health for your bot!
var/maxhealth = 0
var/fire_dam_coeff = 1.0
var/brute_dam_coeff = 1.0
var/open = 0//Maint panel
var/locked = 1
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
@@ -29,7 +32,12 @@
src.explode()
/obj/machinery/bot/proc/Emag(mob/user as mob)
if(!emagged) emagged = 1
if(locked)
locked = 0
emagged = 1
user << "<span class='warning'>You bypass [src]'s controls.</span>"
if(!locked && open)
emagged = 2
/obj/machinery/bot/examine()
set src in view()
@@ -70,16 +78,20 @@
/obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
if (src.health < maxhealth)
src.health = min(maxhealth, src.health+25)
user.visible_message(
"\red [user] repairs [src]!",
"\blue You repair [src]!"
)
if(istype(W, /obj/item/weapon/screwdriver))
if(!locked)
open = !open
user << "<span class='notice'>Maintenance panel is now [src.open ? "opened" : "closed"].</span>"
else if(istype(W, /obj/item/weapon/weldingtool))
if(health < maxhealth)
if(open)
health = min(maxhealth, health+10)
user.visible_message("\red [user] repairs [src]!","\blue You repair [src]!")
else
user << "<span class='notice'>Unable to repair with the maintenance panel closed.</span>"
else
user << "<span class='notice'>[src] does not need a repair.</span>"
else if (istype(W, /obj/item/weapon/card/emag) && !emagged)
else if (istype(W, /obj/item/weapon/card/emag) && emagged < 2)
Emag(user)
else
switch(W.damtype)

View File

@@ -26,11 +26,9 @@
health = 25
maxhealth = 25
var/cleaning = 0
var/locked = 1
var/screwloose = 0
var/oddbutton = 0
var/blood = 1
var/panelopen = 0
var/list/target_types = list()
var/obj/effect/decal/cleanable/target
var/obj/effect/decal/cleanable/oldtarget
@@ -86,13 +84,14 @@
dat += text({"
<TT><B>Automatic Station Cleaner v1.0</B></TT><BR><BR>
Status: []<BR>
Behaviour controls are [src.locked ? "locked" : "unlocked"]"},
Behaviour controls are [src.locked ? "locked" : "unlocked"]<BR>
Maintenance panel panel is [src.open ? "opened" : "closed"]"},
text("<A href='?src=\ref[src];operation=start'>[src.on ? "On" : "Off"]</A>"))
if(!src.locked)
dat += text({"<BR>Cleans Blood: []<BR>"}, text("<A href='?src=\ref[src];operation=blood'>[src.blood ? "Yes" : "No"]</A>"))
dat += text({"<BR>Patrol station: []<BR>"}, text("<A href='?src=\ref[src];operation=patrol'>[src.should_patrol ? "Yes" : "No"]</A>"))
// dat += text({"<BR>Beacon frequency: []<BR>"}, text("<A href='?src=\ref[src];operation=freq'>[src.beacon_freq]</A>"))
if(src.panelopen && !src.locked)
if(src.open && !src.locked)
dat += text({"
Odd looking screw twiddled: []<BR>
Weird button pressed: []"},
@@ -138,25 +137,25 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/attackby(obj/item/weapon/W, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(src.allowed(usr))
if(src.allowed(usr) && !open && !emagged)
src.locked = !src.locked
user << "<span class='notice'>You [ src.locked ? "lock" : "unlock"] the [src] behaviour controls.</span>"
else
if(emagged)
user << "<span class='warning'>ERROR</span>"
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
else
user << "<span class='notice'>This [src] doesn't seem to respect your authority.</span>"
else if (istype(W, /obj/item/weapon/screwdriver))
if(!src.locked)
src.panelopen = !src.panelopen
user << "<span class='notice'>You [ src.panelopen ? "open" : "close"] the hidden panel on [src].</span>"
else
return ..()
/obj/machinery/bot/cleanbot/Emag(mob/user as mob)
..()
if(open && !locked)
if(user) user << "<span class='notice'>The [src] buzzes and beeps.</span>"
src.oddbutton = 1
src.screwloose = 1
src.panelopen = 0
src.locked = 1
/obj/machinery/bot/cleanbot/process()
set background = 1

View File

@@ -20,7 +20,6 @@
//var/lasers = 0
var/locked = 1 //Behavior Controls lock
var/mob/living/carbon/target
var/oldtarget_name
var/threatlevel = 0
@@ -124,7 +123,8 @@
dat += text({"
<TT><B>Automatic Security Unit v2.5</B></TT><BR><BR>
Status: []<BR>
Behaviour controls are [src.locked ? "locked" : "unlocked"]"},
Behaviour controls are [src.locked ? "locked" : "unlocked"]<BR>
Maintenance panel panel is [src.open ? "opened" : "closed"]"},
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
@@ -186,11 +186,16 @@ Auto Patrol: []"},
/obj/machinery/bot/ed209/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
if (src.allowed(user) && !open && !emagged)
src.locked = !src.locked
user << "<span class='notice'>Controls are now [src.locked ? "locked" : "unlocked"].</span>"
else
user << "<span class='warning'>Access denied.</span>"
if(emagged)
user << "<span class='warning'>ERROR</span>"
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
else
user << "<span class='notice'>Access denied.</span>"
else
..()
if (!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!src.target))
@@ -201,6 +206,7 @@ Auto Patrol: []"},
/obj/machinery/bot/ed209/Emag(mob/user as mob)
..()
if(open && !locked)
if(user) user << "<span class='warning'>You short out [src]'s target assessment circuits.</span>"
spawn(0)
for(var/mob/O in hearers(src, null))
@@ -209,7 +215,7 @@ Auto Patrol: []"},
if(user) src.oldtarget_name = user.name
src.last_found = world.time
src.anchored = 0
src.emagged = 1
src.emagged = 2
src.on = 1
src.icon_state = "[lasercolor]ed209[src.on]"
src.projectile = null
@@ -654,7 +660,7 @@ Auto Patrol: []"},
/obj/machinery/bot/ed209/proc/assess_perp(mob/living/carbon/human/perp as mob)
var/threatcount = 0
if(src.emagged) return 10 //Everyone is a criminal!
if(src.emagged == 2) return 10 //Everyone is a criminal!
if((src.idcheck) || (isnull(perp:wear_id)) || (istype(perp:wear_id, /obj/item/weapon/card/id/syndicate)))
@@ -814,17 +820,17 @@ Auto Patrol: []"},
if(!projectile)
if(!lasercolor)
if (src.emagged)
if (src.emagged == 2)
projectile = /obj/item/projectile/beam
else
projectile = /obj/item/projectile/energy/electrode
else if(lasercolor == "b")
if (src.emagged)
if (src.emagged == 2)
projectile = /obj/item/projectile/omnitag
else
projectile = /obj/item/projectile/bluetag
else if(lasercolor == "r")
if (src.emagged)
if (src.emagged == 2)
projectile = /obj/item/projectile/omnitag
else
projectile = /obj/item/projectile/redtag
@@ -871,8 +877,8 @@ Auto Patrol: []"},
var/mob/toshoot = pick(targets)
if (toshoot)
targets-=toshoot
if (prob(50) && !emagged)
emagged = 1
if (prob(50) && emagged < 2)
emagged = 2
shootAt(toshoot)
emagged = 0
else

View File

@@ -42,7 +42,6 @@
var/improvefloors = 0
var/eattiles = 0
var/maketiles = 0
var/locked = 1
var/turf/target
var/turf/oldtarget
var/oldloc = null
@@ -80,6 +79,7 @@
var/dat
dat += "<TT><B>Automatic Station Floor Repairer v1.0</B></TT><BR><BR>"
dat += "Status: <A href='?src=\ref[src];operation=start'>[src.on ? "On" : "Off"]</A><BR>"
dat += "Maintenance panel panel is [src.open ? "opened" : "closed"]<BR>"
dat += "Tiles left: [src.amount]<BR>"
dat += "Behvaiour controls are [src.locked ? "locked" : "unlocked"]<BR>"
if(!src.locked)
@@ -109,15 +109,24 @@
user << "<span class='notice'>You load [loaded] tiles into the floorbot. He now contains [src.amount] tiles.</span>"
src.updateicon()
else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(src.allowed(usr))
if(src.allowed(usr) && !open && !emagged)
src.locked = !src.locked
user << "<span class='notice'>You [src.locked ? "lock" : "unlock"] the [src] behaviour controls.</span>"
else
user << "<span class='notice'>The [src] doesn't seem to respect your authority.</span>"
if(emagged)
user << "<span class='warning'>ERROR</span>"
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
else
user << "<span class='warning'>Access denied.</span>"
src.updateUsrDialog()
else
..()
/obj/machinery/bot/floorbot/Emag(mob/user as mob)
..()
if(open && !locked)
if(user) user << "<span class='notice'>The [src] buzzes and beeps.</span>"
/obj/machinery/bot/floorbot/Topic(href, href_list)
if(..())
@@ -184,7 +193,7 @@
for(var/mob/O in viewers(src, null))
O.show_message(text("[src] makes an excited booping beeping sound!"), 1)
if(!src.target || src.target == null)
if((!src.target || src.target == null) && emagged < 2)
if(targetdirection != null)
/*
for (var/turf/space/D in view(7,src))
@@ -217,6 +226,14 @@
src.target = T
break
if((!src.target || src.target == null) && emagged == 2)
if(!src.target || src.target == null)
for (var/turf/simulated/floor/D in view(7,src))
if(!(D in floorbottargets) && D != src.oldtarget && D.floor_tile)
src.oldtarget = D
src.target = D
break
if(!src.target || src.target == null)
if(src.loc != src.oldloc)
src.oldtarget = null
@@ -245,8 +262,23 @@
src.eattile(src.target)
else if(istype(src.target, /obj/item/stack/sheet/metal))
src.maketile(src.target)
else if(istype(src.target, /turf/))
else if(istype(src.target, /turf/) && emagged < 2)
repair(src.target)
else if(emagged == 2 && istype(src.target,/turf/simulated/floor))
var/turf/simulated/floor/F = src.target
src.anchored = 1
src.repairing = 1
if(prob(90))
F.break_tile_to_plating()
else
F.ReplaceWithLattice()
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] makes an excited booping sound."), 1)
spawn(50)
src.amount ++
src.anchored = 0
src.repairing = 0
src.target = null
src.path = new()
return
@@ -348,8 +380,15 @@
if (prob(50))
new /obj/item/robot_parts/l_arm(Tsec)
if (amount)
new /obj/item/stack/tile/plasteel(Tsec) // only one tile, yes
while (amount)//Dumps the tiles into the appropriate sized stacks
if(amount >= 16)
var/obj/item/stack/tile/plasteel/T = new (Tsec)
T.amount = 16
amount -= 16
else
var/obj/item/stack/tile/plasteel/T = new (Tsec)
T.amount = src.amount
amount = 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)

View File

@@ -15,7 +15,6 @@
maxhealth = 20
req_access =list(access_medical)
var/stunned = 0 //It can be stunned by tasers. Delicate circuits.
var/locked = 1
//var/emagged = 0
var/obj/machinery/camera/cam = null
var/list/botcard_access = list(access_medical, access_morgue, access_genetics, access_robotics)
@@ -106,6 +105,7 @@
var/dat
dat += "<TT><B>Automatic Medical Unit v1.0</B></TT><BR><BR>"
dat += "Status: <A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A><BR>"
dat += "Maintenance panel panel is [src.open ? "opened" : "closed"]<BR>"
dat += "Beaker: "
if (src.reagent_glass)
dat += "<A href='?src=\ref[src];eject=1'>Loaded \[[src.reagent_glass.reagents.total_volume]/[src.reagent_glass.reagents.maximum_volume]\]</a>"
@@ -181,10 +181,15 @@
/obj/machinery/bot/medbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
if (src.allowed(user) && !open && !emagged)
src.locked = !src.locked
user << "<span class='notice'>Controls are now [src.locked ? "locked." : "unlocked."]</span>"
src.updateUsrDialog()
else
if(emagged)
user << "<span class='warning'>ERROR</span>"
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
else
user << "<span class='warning'>Access denied.</span>"
@@ -210,6 +215,7 @@
/obj/machinery/bot/medbot/Emag(mob/user as mob)
..()
if(open && !locked)
if(user) user << "<span class='warning'>You short out [src]'s reagent synthesis circuits.</span>"
spawn(0)
for(var/mob/O in hearers(src, null))
@@ -220,7 +226,7 @@
src.currently_healing = 0
src.last_found = world.time
src.anchored = 0
src.emagged = 1
src.emagged = 2
src.on = 1
src.icon_state = "medibot[src.on]"
@@ -322,7 +328,7 @@
if(C.suiciding)
return 0 //Kevorkian school of robotic medical assistants.
if(src.emagged) //Everyone needs our medicine. (Our medicine is toxins)
if(src.emagged == 2) //Everyone needs our medicine. (Our medicine is toxins)
return 1
//If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS.
@@ -380,7 +386,7 @@
if((src.use_beaker) && (src.reagent_glass) && (src.reagent_glass.reagents.total_volume))
reagent_id = "internal_beaker"
if(src.emagged) //Emagged! Time to poison everybody.
if(src.emagged == 2) //Emagged! Time to poison everybody.
reagent_id = "toxin"
var/virus = 0

View File

@@ -17,9 +17,7 @@
maxhealth = 150
fire_dam_coeff = 0.7
brute_dam_coeff = 0.5
var/locked = 1
var/atom/movable/load = null // the loaded crate (usually)
var/beacon_freq = 1400
var/control_freq = 1447
@@ -49,7 +47,6 @@
var/auto_return = 1 // true if auto return to home beacon after unload
var/auto_pickup = 1 // true if auto-pickup at beacon
var/open = 0 // true if maint hatch is open
var/obj/item/weapon/cell/cell
// the installed power cell

View File

@@ -12,7 +12,6 @@
brute_dam_coeff = 0.5
// weight = 1.0E7
req_access = list(access_security)
var/locked = 1 //Behavior Controls lock
var/mob/living/carbon/target
var/oldtarget_name
var/threatlevel = 0
@@ -114,7 +113,8 @@
dat += text({"
<TT><B>Automatic Security Unit v1.3</B></TT><BR><BR>
Status: []<BR>
Behaviour controls are [src.locked ? "locked" : "unlocked"]"},
Behaviour controls are [src.locked ? "locked" : "unlocked"]<BR>
Maintenance panel panel is [src.open ? "opened" : "closed"]"},
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
@@ -162,9 +162,14 @@ Auto Patrol: []"},
/obj/machinery/bot/secbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(src.allowed(user))
if(src.allowed(user) && !open && !emagged)
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
else
if(emagged)
user << "<span class='warning'>ERROR</span>"
if(open)
user << "\red Please close the access panel before locking it."
else
user << "\red Access denied."
else
@@ -174,6 +179,8 @@ Auto Patrol: []"},
src.mode = SECBOT_HUNT
/obj/machinery/bot/secbot/Emag(mob/user as mob)
..()
if(open && !locked)
if(user) user << "\red You short out [src]'s target assessment circuits."
spawn(0)
for(var/mob/O in hearers(src, null))
@@ -182,7 +189,7 @@ Auto Patrol: []"},
if(user) src.oldtarget_name = user.name
src.last_found = world.time
src.anchored = 0
src.emagged = 1
src.emagged = 2
src.on = 1
src.icon_state = "secbot[src.on]"
mode = SECBOT_IDLE
@@ -586,7 +593,7 @@ Auto Patrol: []"},
/obj/machinery/bot/secbot/proc/assess_perp(mob/living/carbon/human/perp as mob)
var/threatcount = 0
if(src.emagged) return 10 //Everyone is a criminal!
if(src.emagged == 2) return 10 //Everyone is a criminal!
if(src.idcheck && !src.allowed(perp))

View File

@@ -1,39 +1,3 @@
var/global/list/obj/machinery/camera/Cameras = list()
/obj/machinery/camera/New()
Cameras += src
..()
/obj/machinery/camera/Del()
Cameras -= src
..()
// Double clicking turfs to move to nearest camera
/turf/proc/move_camera_by_click()
if (usr.stat)
return ..()
if (world.time <= usr:lastDblClick+2)
return ..()
//try to find the closest working camera in the same area, switch to it
var/area/A = get_area(src)
var/best_dist = INFINITY //infinity
var/best_cam = null
for(var/obj/machinery/camera/C in A)
if(usr:network != C.network) continue
if(!C.status) continue // ignore disabled cameras
var/dist = get_dist(src, C)
if(dist < best_dist)
best_dist = dist
best_cam = C
if(!best_cam)
return ..()
usr:lastDblClick = world.time
usr:switchCamera(best_cam)
/mob/living/silicon/ai/proc/ai_camera_list()
set category = "AI Commands"
set name = "Show Camera List"
@@ -55,26 +19,36 @@ var/global/list/obj/machinery/camera/Cameras = list()
var/list/namecounts = list()
var/list/humans = list()
var/list/others = list()
for(var/mob/living/M in mob_list)
//Cameras can't track people wearing an agent card or a ninja hood.
var/human = 0
if(istype(M, /mob/living/carbon/human))
human = 1
if(istype(M:wear_id, /obj/item/weapon/card/id/syndicate))
continue
if(istype(M:head, /obj/item/clothing/head/helmet/space/space_ninja)&&!M:head:canremove)
continue
if(!istype(M.loc, /turf)) //in a closet or something, AI can't see him anyways
continue
if(istype(M.loc.loc, /area/wizard_station))
continue
if(M.invisibility)//cloaked
// Easy checks first.
// 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 == usr)
continue
if(M.invisibility)//cloaked
continue
if(M.digitalcamo)
continue
if(M.loc.z == 2) // Don't detect mobs on Centcom
// Human check
var/human = 0
if(istype(M, /mob/living/carbon/human))
human = 1
var/mob/living/carbon/human/H = M
//Cameras can't track people wearing an agent card or a ninja hood.
if(istype(H.wear_id, /obj/item/weapon/card/id/syndicate))
continue
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
var/obj/item/clothing/head/helmet/space/space_ninja/hood = H.head
if(!hood.canremove)
continue
if(!isturf(M.loc))
continue
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
if(!cameranet.checkCameraVis(M))
continue
var/name = M.name
@@ -104,20 +78,21 @@ var/global/list/obj/machinery/camera/Cameras = list()
var/mob/living/silicon/ai/U = usr
U.cameraFollow = target
U << text("Now tracking [] on camera.", target.name)
if (U.machine == null)
U.machine = U
//U << text("Now tracking [] on camera.", target.name)
//if (U.machine == null)
// U.machine = U
U << "Now tracking [target.name] on camera."
spawn (0)
while (U.cameraFollow == target)
if (U.cameraFollow == null)
return
else if (istype(target, /mob/living/carbon/human))
if (istype(target, /mob/living/carbon/human))
if(istype(target:wear_id, /obj/item/weapon/card/id/syndicate))
U << "Follow camera mode terminated."
U.cameraFollow = null
return
if(istype(target:head, /obj/item/clothing/head/helmet/space/space_ninja)&&!target:head:canremove)
if(istype(target:head, /obj/item/clothing/head/helmet/space/space_ninja) && !target:head:canremove)
U << "Follow camera mode terminated."
U.cameraFollow = null
return
@@ -126,53 +101,20 @@ var/global/list/obj/machinery/camera/Cameras = list()
U.cameraFollow = null
return
else if(istype(target.loc,/obj/effect/dummy))
if(istype(target.loc,/obj/effect/dummy))
U << "Follow camera mode ended."
U.cameraFollow = null
return
else if (!target || !istype(target.loc, /turf)) //in a closet
if (!isturf(target.loc)) //in a closet
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(40) //because we're sleeping another second after this (a few lines down)
sleep(50) //because we're sleeping another second after this (a few lines down)
continue
if(!cameranet.checkCameraVis(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)
continue
var/obj/machinery/camera/C = U.current
if ((C && istype(C, /obj/machinery/camera)) || C==null)
if(isrobot(target))
var/mob/living/silicon/robot/R = target
C = R.camera
U.reset_view(C)
else
var/closestDist = -1
if (C!=null)
if (C.status)
closestDist = get_dist(C, target)
//U << text("Dist = [] for camera []", closestDist, C.name)
var/zmatched = 0
if (closestDist > 7 || closestDist == -1)
//check other cameras
var/obj/machinery/camera/closest = C
for(var/obj/machinery/camera/C2 in Cameras)
if (C2.network == src.network)
if (C2.z == target.z)
zmatched = 1
if (C2.status)
var/dist = get_dist(C2, target)
if ((dist < closestDist) || (closestDist == -1))
closestDist = dist
closest = C2
//U << text("Closest camera dist = [], for camera []", closestDist, closest.area.name)
if (closest != C)
U.reset_view(closest)
//use_power(50)
if (zmatched == 0)
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(40) //because we're sleeping another second after this (a few lines down)
else
U << "Follow camera mode ended."
U.cameraFollow = null
U.eyeobj.setLoc(get_turf(target))
sleep(10)
/proc/camera_sort(list/L)
@@ -191,7 +133,6 @@ var/global/list/obj/machinery/camera/Cameras = list()
L.Swap(j, j + 1)
return L
/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
if (user != src)
return
@@ -199,13 +140,8 @@ var/global/list/obj/machinery/camera/Cameras = list()
if (stat == 2)
return
// If they cancel then just put them back to their old camera
var/obj/machinery/camera/tempC = src.current
user.machine = src
switchCamera(null)
var/list/L = list()
for (var/obj/machinery/camera/C in Cameras)
for (var/obj/machinery/camera/C in cameranet.cameras)
L.Add(C)
camera_sort(L)
@@ -214,19 +150,15 @@ var/global/list/obj/machinery/camera/Cameras = list()
D["Cancel"] = "Cancel"
for (var/obj/machinery/camera/C in L)
if (C.network == src.network)
D[text("[][]", C.c_tag, (C.status ? null : " (Deactivated)"))] = C
D[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
var/t = input(user, "Which camera should you change to?") as null|anything in D
if (!t || t == "Cancel")
if(tempC && tempC.status)
switchCamera(tempC)
else
switchCamera(null)
return 0
var/obj/machinery/camera/C = D[t]
switchCamera(C)
src.eyeobj.setLoc(C)
return
@@ -234,13 +166,15 @@ var/global/list/obj/machinery/camera/Cameras = list()
if(prob(100/(hardened + severity)))
icon_state = "cameraemp"
network = null //Not the best way but it will do. I think.
cameranet.removeCamera(src)
stat |= EMPED
SetLuminosity(0)
spawn(900)
network = initial(network)
icon_state = initial(icon_state)
for(var/mob/living/silicon/ai/O in mob_list)
if (O.current == src)
O.cancel_camera()
O << "Your connection to the camera has been lost."
stat &= ~EMPED
if(can_use())
cameranet.addCamera(src)
for(var/mob/O in mob_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
@@ -266,9 +200,9 @@ var/global/list/obj/machinery/camera/Cameras = list()
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
if (!istype(user))
return
if (src.network != user.network || !(src.status))
if (!src.can_use())
return
user.reset_view(src)
user.eyeobj.setLoc(get_turf(src))
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
if(!istype(user))
@@ -329,7 +263,7 @@ var/global/list/obj/machinery/camera/Cameras = list()
case.motion = 1
del(src)
else if (istype(W, /obj/item/weapon/camera_bug))
if (!src.status)
if (!src.can_use())
user << "\blue Camera non-functional"
return
if (src.bugged)
@@ -381,10 +315,6 @@ var/global/list/obj/machinery/camera/Cameras = list()
// now disconnect anyone using the camera
//Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they can't use it anyway?
for(var/mob/living/silicon/ai/O in player_list)
if (O.current == src)
O.cancel_camera()
O << "Your connection to the camera has been lost."
for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
@@ -393,6 +323,13 @@ var/global/list/obj/machinery/camera/Cameras = list()
O.reset_view(null)
O << "The screen bursts into static."
/obj/machinery/camera/proc/can_use()
if(!status)
return 0
if(stat & EMPED)
return 0
return 1
/atom/proc/auto_turn()
//Automatically turns based on nearby walls.
var/turf/simulated/wall/T = null
@@ -414,9 +351,16 @@ var/global/list/obj/machinery/camera/Cameras = list()
//Return a working camera that can see a given mob
//or null if none
/proc/seen_by_camera(var/mob/M)
for(var/obj/machinery/camera/C in oview(4, M))
if(C.can_use()) // check if camera disabled
return C
break
return null
for(var/obj/machinery/camera/C in oview(M))
if(C.status) // check if camera disabled
/proc/near_range_camera(var/mob/M)
for(var/obj/machinery/camera/C in range(4, M))
if(C.can_use()) // check if camera disabled
return C
break

View File

@@ -30,10 +30,11 @@
attack_hand(var/mob/user as mob)
if(stat & (NOPOWER|BROKEN)) return
if(!isAI(user))
user.machine = src
var/list/L = list()
for (var/obj/machinery/camera/C in Cameras)
for (var/obj/machinery/camera/C in cameranet.cameras)
L.Add(C)
camera_sort(L)
@@ -56,14 +57,20 @@
return 0
if(C)
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )) && (!istype(user, /mob/living/silicon/ai)))
if(!C.status)
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.can_use() )) && (!istype(user, /mob/living/silicon/ai)))
if(!C.can_use() && !isAI(user))
src.current = null
return 0
else
if(isAI(user))
var/mob/living/silicon/ai/A = user
A.eyeobj.setLoc(get_turf(C))
A.client.eye = A.eyeobj
else
src.current = C
use_power(50)
spawn( 5 )
spawn(5)
attack_hand(user)
return
@@ -78,6 +85,15 @@
density = 0
circuit = null
/obj/machinery/computer/security/telescreen/entertainment
name = "entertainment monitor"
desc = "Damn, they better have /tg/thechannel on these things."
icon = 'icons/obj/status_display.dmi'
icon_state = "entertainment"
network = "thunder"
density = 0
circuit = null
/obj/machinery/computer/security/wooden_tv
name = "Security Cameras"

View File

@@ -1,14 +1,13 @@
/obj/machinery/atmospherics/unary/cryo_cell
name = "cryo cell"
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "celltop-P"
icon = 'icons/obj/cryogenics.dmi'
icon_state = "cell-off"
density = 1
anchored = 1.0
layer = 5
var/on = 0
var/temperature_archived
var/obj/effect/overlay/O1 = null
var/mob/living/carbon/occupant = null
var/beaker = null
var/next_trans = 0
@@ -17,12 +16,11 @@
New()
/obj/machinery/atmospherics/unary/cryo_cell/New()
..()
build_icon()
initialize_directions = dir
initialize()
/obj/machinery/atmospherics/unary/cryo_cell/initialize()
if(node) return
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
@@ -30,15 +28,15 @@
node = target
break
process()
/obj/machinery/atmospherics/unary/cryo_cell/process()
..()
if(!node)
return
if(!on)
src.updateUsrDialog()
updateUsrDialog()
return
if(src.occupant)
if(occupant)
if(occupant.stat != 2)
process_occupant()
@@ -50,73 +48,72 @@
if(abs(temperature_archived-air_contents.temperature) > 1)
network.update = 1
src.updateUsrDialog()
updateUsrDialog()
return 1
allow_drop()
/obj/machinery/atmospherics/unary/cryo_cell/allow_drop()
return 0
relaymove(mob/user as mob)
/obj/machinery/atmospherics/unary/cryo_cell/relaymove(mob/user as mob)
if(user.stat)
return
src.go_out()
go_out()
return
attack_hand(mob/user as mob)
/obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user as mob)
user.machine = src
var/beaker_text = ""
var/health_text = ""
var/temp_text = ""
if(src.occupant)
if(src.occupant.health <= -100)
if(occupant)
if(occupant.health <= -100)
health_text = "<FONT color=red>Dead</FONT>"
else if(src.occupant.health < 0)
health_text = "<FONT color=red>[round(src.occupant.health,0.1)]</FONT>"
else if(occupant.health < 0)
health_text = "<FONT color=red>[round(occupant.health,0.1)]</FONT>"
else
health_text = "[round(src.occupant.health,0.1)]"
health_text = "[round(occupant.health,0.1)]"
if(air_contents.temperature > T0C)
temp_text = "<FONT color=red>[air_contents.temperature]</FONT>"
else if(air_contents.temperature > 225)
temp_text = "<FONT color=black>[air_contents.temperature]</FONT>"
else
temp_text = "<FONT color=blue>[air_contents.temperature]</FONT>"
if(src.beaker)
if(beaker)
beaker_text = "<B>Beaker:</B> <A href='?src=\ref[src];eject=1'>Eject</A>"
else
beaker_text = "<B>Beaker:</B> <FONT color=red>No beaker loaded</FONT>"
var/dat = {"<B>Cryo cell control system</B><BR>
<B>Current cell temperature:</B> [temp_text]K<BR>
<B>Cryo status:</B> [ src.on ? "<A href='?src=\ref[src];start=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];start=1'>On</A>"]<BR>
<B>Cryo status:</B> [ on ? "<A href='?src=\ref[src];start=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];start=1'>On</A>"]<BR>
[beaker_text]<BR><BR>
<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>Oxygen deprivation: [round(src.occupant.getOxyLoss(),0.1)]<BR>Brute damage: [round(src.occupant.getBruteLoss(),0.1)]<BR>Fire damage: [round(src.occupant.getFireLoss(),0.1)]<BR>Toxin damage: [round(src.occupant.getToxLoss(),0.1)]<BR>Body temperature: [src.occupant.bodytemperature]" : "<FONT color=red>None</FONT>"]<BR>
<B>Current occupant:</B> [occupant ? "<BR>Name: [occupant]<BR>Health: [health_text]<BR>Oxygen deprivation: [round(occupant.getOxyLoss(),0.1)]<BR>Brute damage: [round(occupant.getBruteLoss(),0.1)]<BR>Fire damage: [round(occupant.getFireLoss(),0.1)]<BR>Toxin damage: [round(occupant.getToxLoss(),0.1)]<BR>Body temperature: [occupant.bodytemperature]" : "<FONT color=red>None</FONT>"]<BR>
"}
user.machine = src
user << browse(dat, "window=cryo")
onclose(user, "cryo")
Topic(href, href_list)
/obj/machinery/atmospherics/unary/cryo_cell/Topic(href, href_list)
if ((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
if(href_list["start"])
src.on = !src.on
build_icon()
on = !on
update_icon()
if(href_list["eject"])
beaker:loc = src.loc
beaker:loc = loc
beaker = null
src.updateUsrDialog()
src.add_fingerprint(usr)
updateUsrDialog()
add_fingerprint(usr)
return
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/cryo_cell/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
if(istype(G, /obj/item/weapon/reagent_containers/glass))
if(src.beaker)
if(beaker)
user << "\red A beaker is already loaded into the machine."
return
src.beaker = G
beaker = G
user.drop_item()
G.loc = src
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
@@ -130,32 +127,19 @@
var/mob/M = G:affecting
if(put_mob(M))
del(G)
src.updateUsrDialog()
updateUsrDialog()
return
proc
add_overlays()
src.overlays = list(O1)
build_icon()
/obj/machinery/atmospherics/unary/cryo_cell/update_icon()
if(on)
if(src.occupant)
icon_state = "celltop_1"
else
icon_state = "celltop"
else
icon_state = "celltop-p"
O1 = new /obj/effect/overlay( )
O1.icon = 'icons/obj/Cryogenic2.dmi'
if(src.node)
O1.icon_state = "cryo_bottom_[src.on]"
else
O1.icon_state = "cryo_bottom"
O1.pixel_y = -32.0
src.pixel_y = 32
add_overlays()
if(occupant)
icon_state = "cell-occupied"
return
icon_state = "cell-on"
return
icon_state = "cell-off"
process_occupant()
/obj/machinery/atmospherics/unary/cryo_cell/proc/process_occupant()
if(air_contents.total_moles() < 10)
return
if(occupant)
@@ -185,7 +169,7 @@
if(next_trans == 10)
next_trans = 0
heat_gas_contents()
/obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents()
if(air_contents.total_moles() < 1)
return
var/air_heat_capacity = air_contents.heat_capacity()
@@ -194,7 +178,7 @@
var/combined_energy = T20C*current_heat_capacity + air_heat_capacity*air_contents.temperature
air_contents.temperature = combined_energy/combined_heat_capacity
expel_gas()
/obj/machinery/atmospherics/unary/cryo_cell/proc/expel_gas()
if(air_contents.total_moles() < 1)
return
var/datum/gas_mixture/expel_gas = new
@@ -203,30 +187,30 @@
expel_gas.temperature = T20C // Lets expel hot gas and see if that helps people not die as they are removed
loc.assume_air(expel_gas)
go_out()
if(!( src.occupant ))
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out()
if(!( occupant ))
return
//for(var/obj/O in src)
// O.loc = src.loc
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
// src.occupant.metabslow = 0
src.occupant = null
build_icon()
// O.loc = loc
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
// occupant.metabslow = 0
occupant = null
update_icon()
return
put_mob(mob/living/carbon/M as mob)
/obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob)
if (!istype(M))
usr << "\red <B>The cryo cell cannot handle such liveform!</B>"
return
if (src.occupant)
if (occupant)
usr << "\red <B>The cryo cell is already occupied!</B>"
return
if (M.abiotic())
usr << "\red Subject may not have abiotic items on."
return
if(!src.node)
if(!node)
usr << "\red The cell is not correctly connected to its pipe network!"
return
if (M.client)
@@ -236,33 +220,32 @@
M.loc = src
if(M.health > -100 && (M.health < 0 || M.sleeping))
M << "\blue <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
src.occupant = M
occupant = M
// M.metabslow = 1
src.add_fingerprint(usr)
build_icon()
add_fingerprint(usr)
update_icon()
return 1
verb
move_eject()
/obj/machinery/atmospherics/unary/cryo_cell/verb/move_eject()
set name = "Eject occupant"
set category = "Object"
set src in oview(1)
if(usr == src.occupant)//If the user is inside the tube...
if(usr == occupant)//If the user is inside the tube...
if (usr.stat == 2)//and he's not dead....
return
usr << "\blue Release sequence activated. This will take two minutes."
sleep(1200)
if(!src || !usr || !src.occupant || (src.occupant != usr)) //Check if someone's released/replaced/bombed him already
if(!src || !usr || !occupant || (occupant != usr)) //Check if someone's released/replaced/bombed him already
return
src.go_out()//and release him from the eternal prison.
go_out()//and release him from the eternal prison.
else
if (usr.stat != 0)
return
src.go_out()
go_out()
add_fingerprint(usr)
return
move_inside()
/obj/machinery/atmospherics/unary/cryo_cell/verb/move_inside()
set name = "Move Inside"
set category = "Object"
set src in oview(1)

View File

@@ -9,6 +9,7 @@
#define AIRLOCK_WIRE_ELECTRIFY 9
#define AIRLOCK_WIRE_SAFETY 10
#define AIRLOCK_WIRE_SPEED 11
#define AIRLOCK_WIRE_LIGHT 12
/*
New methods:
@@ -32,21 +33,26 @@
//This generates the randomized airlock wire assignments for the game.
/proc/RandomAirlockWires()
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
var/list/wires = list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
airlockIndexToFlag = list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
airlockIndexToWireColor = list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
airlockWireColorToIndex = list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
var/list/wires = list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
airlockIndexToFlag = list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
airlockIndexToWireColor = list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
airlockWireColorToIndex = list(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
var/flagIndex = 1
for (var/flag=1, flag<2048, flag+=flag)
for (var/flag=1, flag<4096, flag+=flag)
var/valid = 0
var/list/colorList = list(AIRLOCK_WIRE_IDSCAN, AIRLOCK_WIRE_MAIN_POWER1, AIRLOCK_WIRE_MAIN_POWER2, AIRLOCK_WIRE_DOOR_BOLTS,
AIRLOCK_WIRE_BACKUP_POWER1, AIRLOCK_WIRE_BACKUP_POWER2, AIRLOCK_WIRE_OPEN_DOOR, AIRLOCK_WIRE_AI_CONTROL, AIRLOCK_WIRE_ELECTRIFY,
AIRLOCK_WIRE_SAFETY, AIRLOCK_WIRE_SPEED, AIRLOCK_WIRE_LIGHT)
while (!valid)
var/colorIndex = rand(1, 11)
var/colorIndex = pick(colorList)
if(wires[colorIndex]==0)
valid = 1
wires[colorIndex] = flag
airlockIndexToFlag[flagIndex] = flag
airlockIndexToWireColor[flagIndex] = colorIndex
airlockWireColorToIndex[colorIndex] = flagIndex
colorList -= colorIndex
flagIndex+=1
return wires
@@ -69,13 +75,14 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
var/spawnPowerRestoreRunning = 0
var/welded = null
var/locked = 0
var/wires = 2047
var/lights = 1 // bolt lights show by default
var/wires = 4095
secondsElectrified = 0 //How many seconds remain until the door is no longer electrified. -1 if it is permanently electrified until someone fixes it.
var/aiDisabledIdScanner = 0
var/aiHacking = 0
var/obj/machinery/door/airlock/closeOther = null
var/closeOtherId = null
var/list/signalers[11]
var/list/signalers[12]
var/lockdownbyai = 0
autoclose = 1
var/doortype = 0
@@ -436,6 +443,10 @@ About the new airlock wires panel:
normalspeed = !normalspeed
src.updateUsrDialog()
if(AIRLOCK_WIRE_LIGHT)
lights = !lights
src.updateUsrDialog()
/obj/machinery/door/airlock/proc/cut(var/wireColor)
var/wireFlag = airlockWireColorToFlag[wireColor]
@@ -480,6 +491,10 @@ About the new airlock wires panel:
autoclose = 0
src.updateUsrDialog()
if(AIRLOCK_WIRE_LIGHT)
lights = 0
src.updateUsrDialog()
/obj/machinery/door/airlock/proc/mend(var/wireColor)
var/wireFlag = airlockWireColorToFlag[wireColor]
var/wireIndex = airlockWireColorToIndex[wireColor] //not used in this function
@@ -517,6 +532,10 @@ About the new airlock wires panel:
close()
src.updateUsrDialog()
if(AIRLOCK_WIRE_LIGHT)
lights = 1
src.updateUsrDialog()
/obj/machinery/door/airlock/proc/isElectrified()
if(src.secondsElectrified != 0)
@@ -613,7 +632,7 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/update_icon()
if(overlays) overlays = null
if(density)
if(locked)
if(locked && lights)
icon_state = "door_locked"
else
icon_state = "door_closed"
@@ -710,6 +729,14 @@ About the new airlock wires panel:
t1 += text(" <A href='?src=\ref[];aiEnable=4'>Raise?</a><br>\n", src)
else
t1 += text(" Cannot raise door bolts due to power failure.<br>\n")
if(src.isWireCut(AIRLOCK_WIRE_LIGHT))
t1 += text("Door bolt lights wire is cut.<br>\n")
else if(!src.lights)
t1 += text("Door lights are off. <A href='?src=\ref[];aiEnable=10'>Enable?</a><br>\n", src)
else
t1 += text("Door lights are on. <A href='?src=\ref[];aiDisable=10'>Disable?</a><br>\n", src)
if(src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
t1 += text("Electrification wire is cut.<br>\n")
if(src.secondsElectrified==-1)
@@ -842,7 +869,8 @@ About the new airlock wires panel:
"Grey" = 8,
"Black" = 9,
"Gold" = 10,
"Aqua" = 11
"Aqua" = 11,
"Pink" = 12
)
for(var/wiredesc in wires)
var/is_uncut = src.wires & airlockWireColorToFlag[wires[wiredesc]]
@@ -858,7 +886,7 @@ About the new airlock wires panel:
t1 += "<a href='?src=\ref[src];signaler=[wires[wiredesc]]'>Attach signaler</a>"
t1 += "<br>"
t1 += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (src.locked ? "The door bolts have fallen!" : "The door bolts look up."), ((src.arePowerSystemsOn() && !(stat & NOPOWER)) ? "The test light is on." : "The test light is off!"), (src.aiControlDisabled==0 ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."), (src.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."))
t1 += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]", (src.locked ? "The door bolts have fallen!" : "The door bolts look up."), (src.lights ? "The door bolt lights are on." : "The door bolt lights are off!"), ((src.arePowerSystemsOn() && !(stat & NOPOWER)) ? "The test light is on." : "The test light is off!"), (src.aiControlDisabled==0 ? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."), (src.safe==0 ? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."))
t1 += text("<p><a href='?src=\ref[];close=1'>Close</a></p>\n", src)
@@ -968,7 +996,7 @@ About the new airlock wires panel:
if(5)
//un-electrify door
if(src.isWireCut(AIRLOCK_WIRE_ELECTRIFY))
usr << text("Can't un-electrify the airlock - The electrification wire is cut.<br>\n")
usr << text("Can't un-electrify the airlock - The electrification wire is cut.")
else if(src.secondsElectrified==-1)
src.secondsElectrified = 0
else if(src.secondsElectrified>0)
@@ -977,18 +1005,18 @@ About the new airlock wires panel:
if(8)
// Safeties! We don't need no stinking safeties!
if (src.isWireCut(AIRLOCK_WIRE_SAFETY))
usr << text("Control to door sensors is disabled.</a><br>\n")
usr << text("Control to door sensors is disabled.")
else if (src.safe)
safe = 0
else
usr << text("Firmware reports safeties already overriden.</a><br>\n")
usr << text("Firmware reports safeties already overriden.")
if(9)
// Door speed control
if(src.isWireCut(AIRLOCK_WIRE_SPEED))
usr << text("Control to door timing circuitry has been severed.</a><br>\n")
usr << text("Control to door timing circuitry has been severed.")
else if (src.normalspeed)
normalspeed = 0
else
@@ -997,13 +1025,22 @@ About the new airlock wires panel:
if(7)
//close door
if(src.welded)
usr << text("The airlock has been welded shut!<br>\n")
usr << text("The airlock has been welded shut!")
else if(src.locked)
usr << text("The door bolts are down!<br>\n")
usr << text("The door bolts are down!")
else if(!src.density)
close()
else
usr << text("The airlock is already closed.<br>\n")
open()
if(10)
// Bolt lights
if(src.isWireCut(AIRLOCK_WIRE_LIGHT))
usr << text("Control to door bolt lights has been severed.</a>")
else if (src.lights)
lights = 0
else
usr << text("Door bolt lights are already disabled!")
@@ -1066,17 +1103,17 @@ About the new airlock wires panel:
if (8) // Not in order >.>
// Safeties! Maybe we do need some stinking safeties!
if (src.isWireCut(AIRLOCK_WIRE_SAFETY))
usr << text("Control to door sensors is disabled.<br>\n")
usr << text("Control to door sensors is disabled.")
else if (!src.safe)
safe = 1
src.updateUsrDialog()
else
usr << text("Firmware reports safeties already in place.<br>\n")
usr << text("Firmware reports safeties already in place.")
if(9)
// Door speed control
if(src.isWireCut(AIRLOCK_WIRE_SPEED))
usr << text("Control to door timing circuitry has been severed.</a><br>\n")
usr << text("Control to door timing circuitry has been severed.")
else if (!src.normalspeed)
normalspeed = 1
src.updateUsrDialog()
@@ -1086,14 +1123,24 @@ About the new airlock wires panel:
if(7)
//open door
if(src.welded)
usr << text("The airlock has been welded shut!<br>\n")
usr << text("The airlock has been welded shut!")
else if(src.locked)
usr << text("The door bolts are down!<br>\n")
usr << text("The door bolts are down!")
else if(src.density)
open()
// close()
else
usr << text("The airlock is already opened.<br>\n")
close()
if(10)
// Bolt lights
if(src.isWireCut(AIRLOCK_WIRE_LIGHT))
usr << text("Control to door bolt lights has been severed.</a>")
else if (!src.lights)
lights = 1
src.updateUsrDialog()
else
usr << text("Door bolt lights are already enabled!")
add_fingerprint(usr)
update_icon()
if(!nowindow)
@@ -1206,8 +1253,7 @@ About the new airlock wires panel:
src.density = 0
update_icon()
if(!glass)
src.sd_SetOpacity(0)
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."
@@ -1223,8 +1269,7 @@ About the new airlock wires panel:
src.density = 0
update_icon()
if(!glass)
src.sd_SetOpacity(0)
src.SetOpacity(0) //ugh...lots of lag for something so trivial
src.operating = 0
return
@@ -1242,8 +1287,7 @@ About the new airlock wires panel:
sleep(15)
update_icon()
if((src.visible) && (!glass))
src.sd_SetOpacity(1)
src.SetOpacity(initial(opacity))
src.operating = 0
else
user << "\red You need to be wielding the Fire axe to do that."
@@ -1257,8 +1301,7 @@ About the new airlock wires panel:
sleep(15)
update_icon()
if((src.visible) && (!glass))
src.sd_SetOpacity(1)
src.SetOpacity(initial(opacity))
src.operating = 0
else

View File

@@ -204,12 +204,12 @@
animate("opening")
icon_state = "door0"
src.sd_SetOpacity(0)
src.SetOpacity(0)
sleep(10)
src.layer = 2.7
src.density = 0
update_icon()
src.sd_SetOpacity(0)
// src.SetOpacity(0)
update_nearby_tiles()
if(operating) operating = 0
@@ -235,8 +235,7 @@
sleep(10)
update_icon()
if(visible && !glass)
src.sd_SetOpacity(1)
src.SetOpacity(initial(opacity))
operating = 0
update_nearby_tiles()
return
@@ -265,6 +264,8 @@
close()
return
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
/*
/obj/machinery/door/airlock/proc/ion_act()

View File

@@ -20,9 +20,9 @@
src.operating = 1
flick("pdoorc0", src)
src.icon_state = "pdoor0"
src.SetOpacity(0)
sleep(15)
src.density = 0
src.sd_SetOpacity(0)
src.operating = 0
return
return
@@ -36,9 +36,9 @@
src.operating = 1
flick("pdoorc0", src)
src.icon_state = "pdoor0"
src.SetOpacity(0)
sleep(10)
src.density = 0
src.sd_SetOpacity(0)
update_nearby_tiles()
if(operating == 1) //emag again
@@ -55,15 +55,14 @@
flick("pdoorc1", src)
src.icon_state = "pdoor1"
src.density = 1
if (src.visible)
src.sd_SetOpacity(1)
src.SetOpacity(initial(opacity))
update_nearby_tiles()
sleep(10)
src.operating = 0
return
/*
/obj/machinery/door/poddoor/two_tile_hor/open()
if (src.operating == 1) //doors can still open when emag-disabled
return
@@ -73,14 +72,14 @@
src.operating = 1
flick("pdoorc0", src)
src.icon_state = "pdoor0"
src.SetOpacity(0)
f1.SetOpacity(0)
f2.SetOpacity(0)
sleep(10)
src.density = 0
src.sd_SetOpacity(0)
f1.density = 0
f1.sd_SetOpacity(0)
f2.density = 0
f2.sd_SetOpacity(0)
update_nearby_tiles()
@@ -97,18 +96,18 @@
src.operating = 1
flick("pdoorc1", src)
src.icon_state = "pdoor1"
src.density = 1
f1.density = 1
f1.sd_SetOpacity(1)
f2.density = 1
f2.sd_SetOpacity(1)
if (src.visible)
src.sd_SetOpacity(1)
update_nearby_tiles()
sleep(10)
src.SetOpacity(initial(opacity))
f1.SetOpacity(initial(opacity))
f2.SetOpacity(initial(opacity))
update_nearby_tiles()
src.operating = 0
return
@@ -370,7 +369,7 @@
del f3
del f4
..()
*/
/obj/machinery/door/poddoor/filler_object
name = ""
icon_state = ""

View File

@@ -11,15 +11,15 @@
src.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 )))
spawn( 0 )
src.operating = 1
if(src.density && (stat & NOPOWER) && !src.operating)
operating = 1
spawn(-1)
flick("shutterc0", src)
src.icon_state = "shutter0"
icon_state = "shutter0"
sleep(15)
src.density = 0
src.sd_SetOpacity(0)
src.operating = 0
density = 0
SetOpacity(0)
operating = 0
return
return
@@ -28,20 +28,20 @@
return
if (!ticker)
return 0
if(!src.operating) //in case of emag
src.operating = 1
if(!operating) //in case of emag
operating = 1
flick("shutterc0", src)
src.icon_state = "shutter0"
sleep(10)
src.density = 0
src.sd_SetOpacity(0)
SetOpacity(0)
update_nearby_tiles()
if(operating == 1) //emag again
src.operating = 0
operating = 0
if(autoclose)
spawn(150)
autoclose()
autoclose() //TODO: note to self: look into this ~Carn
return 1
/obj/machinery/door/poddoor/shutters/close()
@@ -51,8 +51,8 @@
flick("shutterc1", src)
src.icon_state = "shutter1"
src.density = 1
if (src.visible)
src.sd_SetOpacity(1)
if(src.visible)
SetOpacity(1)
update_nearby_tiles()
sleep(10)

View File

@@ -94,7 +94,7 @@
sleep(10)
src.density = 0
src.sd_SetOpacity(0)
// src.sd_SetOpacity(0) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
if(operating == 1) //emag again
@@ -110,8 +110,8 @@
src.icon_state = text("[]", src.base_state)
src.density = 1
if (src.visible)
src.sd_SetOpacity(1)
// if(src.visible)
// SetOpacity(1) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
sleep(10)

View File

@@ -22,19 +22,20 @@
base_state = "pflash"
density = 1
/*
/obj/machinery/flasher/New()
sleep(4)
sleep(4) //<--- What the fuck are you doing? D=
src.sd_SetLuminosity(2)
*/
/obj/machinery/flasher/power_change()
if ( powered() )
stat &= ~NOPOWER
icon_state = "[base_state]1"
src.sd_SetLuminosity(2)
// src.sd_SetLuminosity(2)
else
stat |= ~NOPOWER
icon_state = "[base_state]1-p"
src.sd_SetLuminosity(0)
// src.sd_SetLuminosity(0)
//Don't want to render prison breaks impossible
/obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob)

View File

@@ -11,6 +11,7 @@ Possible to do for anyone motivated enough:
Give an AI variable for different hologram icons.
Itegrate EMP effect to disable the unit.
*/
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
return
@@ -31,9 +32,8 @@ Possible to do for anyone motivated enough:
/*There are pretty much only three ways to interact here.
I don't need to check for client since they're clicking on an object.
This may change in the future but for now will suffice.*/
if(user.client.eye!=src)//Set client eye on the object if it's not already.
user.current = src
user.reset_view(src)
if(user.eyeobj.loc != src.loc)//Set client eye on the object if it's not already.
user.eyeobj.setLoc(get_turf(src))
else if(!hologram)//If there is no hologram, possibly make one.
activate_holo(user)
else if(master==user)//If there is a hologram, remove it. But only if the user is the master. Otherwise do nothing.
@@ -41,7 +41,7 @@ Possible to do for anyone motivated enough:
return
/obj/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user)
if(!(stat & NOPOWER)&&user.client.eye==src)//If the projector has power and client eye is on it.
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())
@@ -71,28 +71,31 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.icon = A.holo_icon
hologram.mouse_opacity = 0//So you can't click on it.
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
hologram.sd_SetLuminosity(1)//To make it glowy.
hologram.anchored = 1//So space wind cannot drag it.
hologram.name = "AI hologram"//If someone decides to right click.
sd_SetLuminosity(1)//To make the pad glowy.
hologram.SetLuminosity(2) //hologram lighting
SetLuminosity(2) //pad lighting
icon_state = "holopad1"
A.current = src
master = A//AI is the master.
use_power = 2//Active power usage.
return 1
/obj/machinery/hologram/holopad/proc/clear_holo()
hologram.sd_SetLuminosity(0)//Clear lighting.
// hologram.SetLuminosity(0)//Clear lighting. //handled by the lighting controller when its ower is deleted
del(hologram)//Get rid of hologram.
if(master.current == src)
master.current = null
master = null//Null the master, since no-one is using it now.
sd_SetLuminosity(0)//Clear lighting for the parent.
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
icon_state = "holopad0"
use_power = 1//Passive power usage.
return 1
/obj/machinery/hologram/holopad/process()
if(hologram)//If there is a hologram.
if(master&&!master.stat&&master.client&&master.client.eye==src)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
if( !(get_dist(src,hologram.loc)>3||stat & NOPOWER) )//If the hologram is not out of bounds and the machine has power.
if(master && !master.stat && master.client && master.eyeobj.loc == src.loc)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
if(!(stat & NOPOWER))//If the machine has power.
return 1
clear_holo()//If not, we want to get rid of the hologram.
return 1

View File

@@ -30,6 +30,18 @@
if(src.planted && src.myseed.yield < 2)
src.myseed.yield += 1
/obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if (istype(O, /obj/item/weapon/plantbag))
src.attack_hand(user)
var/obj/item/weapon/plantbag/S = O
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
if (S.contents.len < S.capacity)
S.contents += G;
else
user << "\blue The plant bag is full."
return
obj/machinery/hydroponics/process()
if(myseed && !(myseed in contents))
@@ -176,14 +188,11 @@ obj/machinery/hydroponics/proc/updateicon()
if(src.harvest)
overlays += image('icons/obj/hydroponics.dmi', icon_state="over_harvest3")
if(myseed)
if(luminosity && !istype(myseed,/obj/item/seeds/glowshroom)) //revert luminosity to 0
sd_SetLuminosity(0)
else if(!luminosity && istype(myseed,/obj/item/seeds/glowshroom)) //update luminosity
sd_SetLuminosity(myseed.potency/10)
if(!luminosity)
if(istype(myseed,/obj/item/seeds/glowshroom))
SetLuminosity(round(myseed.potency/10))
else
if(luminosity)
sd_SetLuminosity(0)
SetLuminosity(0)
return
@@ -978,7 +987,6 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
updateicon()
///////////////////////////////////////////////////////////////////////////////
/obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk!
name = "soil"
icon = 'icons/obj/hydroponics.dmi'
@@ -1003,12 +1011,9 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else
overlays += image('icons/obj/hydroponics.dmi', icon_state="[src.myseed.species]-grow[src.myseed.growthstages]")
if(myseed)
if(luminosity && !istype(myseed,/obj/item/seeds/glowshroom))
sd_SetLuminosity(0)
else if(!luminosity && istype(myseed,/obj/item/seeds/glowshroom))
sd_SetLuminosity(myseed.potency/10)
if(!luminosity)
if(istype(myseed,/obj/item/seeds/glowshroom))
SetLuminosity(round(myseed.potency/10))
else
if(luminosity)
sd_SetLuminosity(0)
SetLuminosity(0)
return

View File

@@ -53,11 +53,11 @@
if ( powered() && disable == 0 )
stat &= ~NOPOWER
icon_state = "[base_state]"
src.sd_SetLuminosity(2)
// src.sd_SetLuminosity(2)
else
stat |= ~NOPOWER
icon_state = "[base_state]-p"
src.sd_SetLuminosity(0)
// src.sd_SetLuminosity(0)
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/detective_scanner))

View File

@@ -1,48 +1,3 @@
/**********************Plant Bag**************************/
/obj/item/weapon/plantbag
icon = 'icons/obj/hydroponics.dmi'
icon_state = "plantbag"
name = "Plant Bag"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of plant pieces it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
/obj/item/weapon/plantbag/attack_self(mob/user as mob)
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/O in contents)
contents -= O
O.loc = user.loc
user << "\blue You empty the plant bag."
return
/obj/item/weapon/plantbag/verb/toggle_mode()
set name = "Switch Bagging Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The bag now picks up all plants in a tile at once."
if(0)
usr << "The bag now picks up one plant at a time."
/obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if (istype(O, /obj/item/weapon/plantbag))
src.attack_hand(user)
var/obj/item/weapon/plantbag/S = O
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
if (S.contents.len < S.capacity)
S.contents += G;
else
user << "\blue The plant bag is full."
return
/* SmartFridge. Much todo
*/
/obj/machinery/smartfridge

View File

@@ -184,6 +184,12 @@ Class Procs:
return 0
/obj/machinery/attack_ai(mob/user as mob)
if(isrobot(user))
// For some reason attack_robot doesn't work
// This is to stop robots from using cameras to remotely control machines.
if(user.client && user.client.eye == user)
return src.attack_hand(user)
else
return src.attack_hand(user)
/obj/machinery/attack_paw(mob/user as mob)

View File

@@ -570,6 +570,7 @@
anchored = 1
density = 1
unacidable = 1
luminosity = 3
var/needs_power = 0
var/active = 1
// var/power = 10
@@ -585,8 +586,6 @@
src.gen_secondary = B
if(A && B)
needs_power = 1
spawn(1)
src.sd_SetLuminosity(3)
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
return

View File

@@ -89,14 +89,14 @@
if(mode==4) // supply shuttle timer
var/disp1
var/disp2
if(supply_shuttle_moving)
if(supply_shuttle.moving)
disp1 = "SPPLY"
disp2 = get_supply_shuttle_timer()
if(lentext(disp1) > 5)
disp1 = "**~**"
else
if(supply_shuttle_at_station)
if(supply_shuttle.at_station)
disp1 = "SPPLY"
disp2 = "STATN"
else
@@ -185,8 +185,8 @@
return ""
proc/get_supply_shuttle_timer()
if(supply_shuttle_moving)
var/timeleft = round((supply_shuttle_time - world.timeofday) / 10,1)
if(supply_shuttle.moving)
var/timeleft = round((supply_shuttle.eta_timeofday - world.timeofday) / 10,1)
return "[add_zero(num2text((timeleft / 60) % 60),2)]~[add_zero(num2text(timeleft % 60), 2)]"
// note ~ translates into a blinking :
return ""

View File

@@ -244,9 +244,9 @@
// Let's double check
if(!issilicon(user) && istype(user.get_active_hand(), /obj/item/device/multitool))
P = user.get_active_hand()
//else if(isAI(user))
// var/mob/living/silicon/ai/U = user
// P = U.aiMulti
else if(isAI(user))
var/mob/living/silicon/ai/U = user
P = U.aiMulti
else if(isrobot(user) && in_range(user, src))
if(istype(user.get_active_hand(), /obj/item/device/multitool))
P = user.get_active_hand()

View File

@@ -210,7 +210,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(prob(100/severity))
if(!(stat & EMPED))
stat |= EMPED
spawn(1200/severity)
spawn(1600/severity)
stat &= ~EMPED
..()

View File

@@ -944,14 +944,11 @@
set category = "Exosuit Interface"
set src = usr.loc
set popup_menu = 0
if(usr!=src.occupant)
return
if(usr!=occupant) return
lights = !lights
if(lights)
src.sd_SetLuminosity(src.luminosity + src.lights_power)
else
src.sd_SetLuminosity(src.luminosity - src.lights_power)
src.log_message("Toggled lights.")
if(lights) SetLuminosity(luminosity + lights_power)
else SetLuminosity(luminosity - lights_power)
log_message("Toggled lights.")
return

View File

@@ -1,70 +0,0 @@
/obj/item/device/infra_sensor/process()
if (src.passive)
for(var/obj/effect/beam/i_beam/I in range(2, src.loc))
I.left = 2
return 1
else
processing_objects.Remove(src)
return null
/obj/item/device/infra_sensor/proc/burst()
for(var/obj/effect/beam/i_beam/I in range(src.loc))
I.left = 8
/* for(var/obj/item/device/infra/I in range(src.loc))ugh will have to fix this
I.visible = 1
spawn( 0 )
if ((I && I.first))
I.first.vis_spread(1)
return
for(var/obj/item/assembly/rad_infra/I in range(src.loc))
I.part2.visible = 1
spawn( 0 )
if ((I.part2 && I.part2.first))
I.part2.first.vis_spread(1)
return*/
return
/obj/item/device/infra_sensor/attack_self(mob/user as mob)
user.machine = src
var/dat = text("<TT><B>Infrared Sensor</B><BR>\n<B>Passive Emitter</B>: []<BR>\n<B>Active Emitter</B>: <A href='?src=\ref[];active=0'>Burst Fire</A>\n</TT>", (src.passive ? text("<A href='?src=\ref[];passive=0'>On</A>", src) : text("<A href='?src=\ref[];passive=1'>Off</A>", src)), src)
user << browse(dat, "window=infra_sensor")
onclose(user, "infra_sensor")
return
/obj/item/device/infra_sensor/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
if ((usr.contents.Find(src) || (usr.contents.Find(src.master) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))))
usr.machine = src
if (href_list["passive"])
src.passive = !( src.passive )
if(passive)
processing_objects.Add(src)
if (href_list["active"])
spawn( 0 )
src.burst()
return
if (!( src.master ))
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
else
if (istype(src.master.loc, /mob))
src.attack_self(src.master.loc)
else
for(var/mob/M in viewers(1, src.master))
if (M.client)
src.attack_self(M)
src.add_fingerprint(usr)
else
usr << browse(null, "window=infra_sensor")
onclose(usr, "infra_sensor")
return
return

View File

@@ -1,58 +0,0 @@
/*/obj/item/device/shield I have not see this thing used in quite some time and it just clutters up some of the mob code, also I am fairly sure it makes you invis with the newer cloaking icons
name = "shield"
desc = "This is an item which is specially crafted to shield you. It is much like a visible version of the outdated cloaking device."
icon_state = "shield0"
var/active = 0.0
flags = FPRINT | TABLEPASS| CONDUCT
item_state = "electronic"
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
/obj/item/device/shield/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The shield is now active."
src.icon_state = "shield1"
else
user << "\blue The shield is now inactive."
src.icon_state = "shield0"
src.add_fingerprint(user)
return
*/
/obj/item/weapon/cloaking_device
name = "cloaking device"
desc = "Use this to become invisible to the human eyesocket."
icon = 'icons/obj/device.dmi'
icon_state = "shield0"
var/active = 0.0
flags = FPRINT | TABLEPASS| CONDUCT
item_state = "electronic"
throwforce = 10.0
throw_speed = 2
throw_range = 10
w_class = 2.0
origin_tech = "magnets=3;syndicate=4"
/obj/item/weapon/cloaking_device/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The cloaking device is now active."
src.icon_state = "shield1"
else
user << "\blue The cloaking device is now inactive."
src.icon_state = "shield0"
src.add_fingerprint(user)
return
/obj/item/weapon/cloaking_device/emp_act(severity)
active = 0
icon_state = "shield0"
if(ismob(loc))
loc:update_icons()
..()

View File

@@ -175,6 +175,7 @@
icon_state = "weednode"
name = "purple sac"
desc = "Weird purple octopus-like thing."
luminosity = NODERANGE
/obj/effect/alien/weeds/New()
..()
@@ -187,11 +188,6 @@
Life()
return
/obj/effect/alien/weeds/node/New()
..()
sd_SetLuminosity(NODERANGE)
return
/obj/effect/alien/weeds/proc/Life()
set background = 1
var/turf/U = get_turf(src)

View File

@@ -60,7 +60,5 @@
New()
..()
sd_SetLuminosity(1)
spawn(1200) // 2 minutes
del(src)

View File

@@ -0,0 +1,35 @@
/obj/effect/decal/cleanable/crayon
name = "rune"
desc = "A rune drawn in crayon."
icon = 'icons/obj/rune.dmi'
layer = 2.1
anchored = 1
examine()
set src in view(2)
..()
return
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
name = type
desc = "A [type] drawn in crayon."
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
overlays += mainOverlay
overlays += shadeOverlay

View File

@@ -936,7 +936,7 @@ steam.start() -- spawns the effect
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
density = 1
opacity = 0 // changed in New()
opacity = 1 // changed in New()
anchored = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
@@ -945,11 +945,11 @@ steam.start() -- spawns the effect
New()
..()
update_nearby_tiles(1)
spawn(1)
sd_NewOpacity(1)
Del()
sd_NewOpacity(0)
density = 0
update_nearby_tiles(1)
..()

View File

@@ -63,40 +63,3 @@
gib.streak(directions)
del(src)
/obj/effect/gibspawner
generic
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(2,2,1)
New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/up,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/body,/obj/effect/decal/cleanable/blood/gibs/limb,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
xeno
gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
robot
sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb)
gibamounts = list(1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
gibamounts[6] = pick(0,1,2)
..()

View File

@@ -21,7 +21,7 @@
spreadChance = 0
/obj/effect/glowshroom/New()
set background = 1
..()
dir = CalcDir()
@@ -40,10 +40,8 @@
else //if on the floor, glowshroom on-floor sprite
icon_state = "glowshroomf"
spawn(2) //allows the luminosity and spread rate to be affected by potency at the moment of creation
sd_SetLuminosity(potency/10)
spawn(delay)
if(src)
SetLuminosity(round(potency/10))
Spread()
/obj/effect/glowshroom/proc/Spread()

View File

@@ -0,0 +1,17 @@
/obj/effect/manifest/New()
src.invisibility = 101
return
/obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in mob_list)
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
P.info = dat
P.name = "paper- 'Crew Manifest'"
//SN src = null
del(src)
return

View File

@@ -34,3 +34,182 @@
/obj/effect/sign/blob_act()
del(src)
return
/obj/effect/sign/map
desc = "A framed picture of the station."
name = "station map"
icon = 'icons/obj/decals.dmi'
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/map/left
icon_state = "map-left"
/obj/effect/sign/map/right
icon_state = "map-right"
/obj/effect/sign/securearea
desc = "A warning sign which reads 'SECURE AREA'. This obviously applies to a nun-Clown."
name = "SECURE AREA"
icon = 'icons/obj/decals.dmi'
icon_state = "securearea"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/biohazard
desc = "A warning sign which reads 'BIOHAZARD'"
name = "BIOHAZARD"
icon = 'icons/obj/decals.dmi'
icon_state = "bio"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/electricshock
desc = "A warning sign which reads 'HIGH VOLTAGE'"
name = "HIGH VOLTAGE"
icon = 'icons/obj/decals.dmi'
icon_state = "shock"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/examroom
desc = "A guidance sign which reads 'EXAM ROOM'"
name = "EXAM"
icon = 'icons/obj/decals.dmi'
icon_state = "examroom"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/vacuum
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
name = "HARD VACUUM AHEAD"
icon = 'icons/obj/decals.dmi'
icon_state = "space"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/deathsposal
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
name = "DISPOSAL LEADS TO SPACE"
icon = 'icons/obj/decals.dmi'
icon_state = "deathsposal"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/pods
desc = "A warning sign which reads 'ESCAPE PODS'"
name = "ESCAPE PODS"
icon = 'icons/obj/decals.dmi'
icon_state = "pods"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/fire
desc = "A warning sign which reads 'DANGER: FIRE'"
name = "DANGER: FIRE"
icon = 'icons/obj/decals.dmi'
icon_state = "fire"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/nosmoking_1
desc = "A warning sign which reads 'NO SMOKING'"
name = "NO SMOKING"
icon = 'icons/obj/decals.dmi'
icon_state = "nosmoking"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/nosmoking_2
desc = "A warning sign which reads 'NO SMOKING'"
name = "NO SMOKING"
icon = 'icons/obj/decals.dmi'
icon_state = "nosmoking2"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/redcross
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
name = "Med-Bay"
icon = 'icons/obj/decals.dmi'
icon_state = "redcross"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/goldenplaque
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
name = "The Most Robust Men Award for Robustness"
icon = 'icons/obj/decals.dmi'
icon_state = "goldenplaque"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/atmosplaque
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
name = "FEA Atmospherics Division"
icon = 'icons/obj/decals.dmi'
icon_state = "atmosplaque"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
icon = 'icons/obj/decals.dmi'
icon_state = "maltesefalcon1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/maltesefalcon2
desc = "The Maltese Falcon, Space Bar and Grill."
name = "The Maltese Falcon"
icon = 'icons/obj/decals.dmi'
icon_state = "maltesefalcon2"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/science//These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
desc = "A warning sign which reads 'SCIENCE!'"
name = "SCIENCE!"
icon = 'icons/obj/decals.dmi'
icon_state = "science1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/chemistry
desc = "A warning sign which reads 'CHEMISTY'"
name = "CHEMISTRY"
icon = 'icons/obj/decals.dmi'
icon_state = "chemistry1"
anchored = 1.0
opacity = 0
density = 0
/obj/effect/sign/botany
desc = "A warning sign which reads 'HYDROPONICS'"
name = "HYDROPONICS"
icon = 'icons/obj/decals.dmi'
icon_state = "hydro1"
anchored = 1.0
opacity = 0
density = 0

View File

@@ -0,0 +1,36 @@
/obj/effect/gibspawner
generic
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(2,2,1)
New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/up,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/body,/obj/effect/decal/cleanable/blood/gibs/limb,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
xeno
gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core)
gibamounts = list(1,1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
robot
sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb)
gibamounts = list(1,1,1,1,1,1)
New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
gibamounts[6] = pick(0,1,2)
..()

View File

@@ -8,6 +8,7 @@
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
src = null
spawn(0)
var/start = world.timeofday
epicenter = get_turf(epicenter)
@@ -20,6 +21,10 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
lighting_controller.processing = 0
var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
@@ -35,25 +40,26 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
for(var/turf/T in range(epicenter, max(devastation_range, heavy_impact_range, light_impact_range)))
var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(dist < devastation_range)
dist = 1
else if(dist < heavy_impact_range)
dist = 2
else if(dist < light_impact_range)
dist = 3
else
continue
if(dist < devastation_range) dist = 1
else if(dist < heavy_impact_range) dist = 2
else if(dist < light_impact_range) dist = 3
else continue
T.ex_act(dist)
if(T)
for(var/atom/object in T.contents)
object.ex_act(dist)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
for(var/atom_movable in T.contents)
var/atom/movable/AM = atom_movable
AM.ex_act(dist)
//here util we get explosions to be less laggy, might help us identify issues after changes to splosions (because let's face it we've had a few)
world.log << "## Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [(world.timeofday-start)/10] seconds."
world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [(world.timeofday-start)/10] seconds."
sleep(8)
if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
if(!powernet_rebuild_was_deferred_already)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
return 1

View File

@@ -1,4 +1,6 @@
//TODO: Flash range does nothing currently
//NOTE: This has not yet been updated with the lighting deferal stuff. ~Carn
//Needs some work anyway.
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
spawn(0)

File diff suppressed because it is too large Load Diff

View File

@@ -236,32 +236,3 @@ move an amendment</a> to the drawing.</p>
return ROOM_ERR_SPACE
found+=T
return found
/*
/proc/check_apc(var/area/A)
for(var/area/RA in A.related)
for(var/obj/machinery/power/apc/FINDME in RA)
return 1
return 0
/proc/fuckingfreemachinery()
for(var/obj/machinery/machine in machines)
if (istype(machine,/obj/machinery/power/solar))
continue
var/area/A = machine.loc.loc // make sure it's in an area
if (istype(A,/area/tdome))
continue
if (istype(A,/area/shuttle))
continue
if(!A || !isarea(A))
world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) hasnt area!"
continue
A = A.master
if (A.name=="Space")
world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) work in space!"
continue
if (!check_apc(A))
world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) work without APC!"
world << "\red END ====="
*/

View File

@@ -1,3 +1,5 @@
//Also contains /obj/structure/closet/body_bag because I doubt anyone would think to look for bodybags in /object/structures
/obj/item/bodybag
name = "body bag"
desc = "A folded bag designed to contain dead things."

View File

@@ -1,7 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
#define CANDLE_LUM 3
/obj/item/candle
name = "red candle"
desc = "a candle"
@@ -52,7 +48,7 @@
//src.damtype = "fire"
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
sd_SetLuminosity(CANDLE_LUM)
SetLuminosity(CANDLE_LUM)
processing_objects.Add(src)
@@ -75,17 +71,17 @@
if(lit)
lit = 0
update_icon()
sd_SetLuminosity(0)
user.total_luminosity -= CANDLE_LUM
SetLuminosity(0)
user.SetLuminosity(user.luminosity - CANDLE_LUM)
pickup(mob/user)
if(lit)
src.sd_SetLuminosity(0)
user.total_luminosity += CANDLE_LUM
SetLuminosity(0)
user.SetLuminosity(user.luminosity + CANDLE_LUM)
dropped(mob/user)
if(lit)
user.total_luminosity -= CANDLE_LUM
src.sd_SetLuminosity(CANDLE_LUM)
user.SetLuminosity(user.luminosity - CANDLE_LUM)
SetLuminosity(CANDLE_LUM)

View File

@@ -1,34 +1,3 @@
/*--------
//CONTAINS
CRAYONS
--------*/
/obj/item/weapon/storage/crayonbox/New()
..()
new /obj/item/toy/crayon/red(src)
new /obj/item/toy/crayon/orange(src)
new /obj/item/toy/crayon/yellow(src)
new /obj/item/toy/crayon/green(src)
new /obj/item/toy/crayon/blue(src)
new /obj/item/toy/crayon/purple(src)
update_icon()
/obj/item/weapon/storage/crayonbox/update_icon()
overlays = list() //resets list
overlays += image('icons/obj/crayons.dmi',"crayonbox")
for(var/obj/item/toy/crayon/crayon in contents)
overlays += image('icons/obj/crayons.dmi',crayon.colourName)
/obj/item/weapon/storage/crayonbox/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/toy/crayon))
switch(W:colourName)
if("mime")
usr << "This crayon is too sad to be contained in this box."
return
if("rainbow")
usr << "This crayon is too powerful to be contained in this box."
return
..()
/obj/item/toy/crayon/red
icon_state = "crayonred"
colour = "#DA0000"
@@ -128,39 +97,3 @@ CRAYONS
del(src)
else
..()
/obj/effect/decal/cleanable/crayon
name = "rune"
desc = "A rune drawn in crayon."
icon = 'icons/obj/rune.dmi'
layer = 2.1
anchored = 1
examine()
set src in view(2)
..()
return
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
name = type
desc = "A [type] drawn in crayon."
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
overlays += mainOverlay
overlays += shadeOverlay

View File

@@ -193,20 +193,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
* The Actual PDA
*/
/obj/item/device/pda/pickup(mob/user)
if (fon)
sd_SetLuminosity(0)
user.total_luminosity += f_lum
if(fon)
SetLuminosity(0)
user.SetLuminosity(user.luminosity + f_lum)
/obj/item/device/pda/dropped(mob/user)
if (fon)
user.total_luminosity -= f_lum
sd_SetLuminosity(f_lum)
if(fon)
user.SetLuminosity(user.luminosity - f_lum)
SetLuminosity(f_lum)
/obj/item/device/pda/New()
..()
PDAs += src
spawn(3)
if (default_cartridge)
if(default_cartridge)
cartridge = new default_cartridge(src)
/obj/item/device/pda/proc/can_use()
@@ -496,14 +495,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
//MAIN FUNCTIONS===================================
if("Light")
fon = (!fon)
if (src in U.contents)
if (fon)
U.total_luminosity += f_lum
if(fon)
fon = 0
if(src in U.contents) U.SetLuminosity(U.luminosity - f_lum)
else SetLuminosity(0)
else
U.total_luminosity -= f_lum
else
sd_SetLuminosity(fon * f_lum)
fon = 1
if(src in U.contents) U.SetLuminosity(U.luminosity + f_lum)
else SetLuminosity(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0

View File

@@ -468,17 +468,17 @@ Code:
menu = "<h4><img src=pda_crate.png> Supply Record Interlink</h4>"
menu += "<BR><B>Supply shuttle</B><BR>"
menu += "Location: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"]<BR>"
menu += "Location: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Dock"]<BR>"
menu += "Current approved orders: <BR><ol>"
for(var/S in supply_shuttle_shoppinglist)
for(var/S in supply_shuttle.shoppinglist)
var/datum/supply_order/SO = S
menu += "<li>[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]</li>"
menu += "<li>#[SO.ordernum] - [SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]</li>"
menu += "</ol>"
menu += "Current requests: <BR><ol>"
for(var/S in supply_shuttle_requestlist)
for(var/S in supply_shuttle.requestlist)
var/datum/supply_order/SO = S
menu += "<li>[SO.object.name] requested by [SO.orderedby]</li>"
menu += "<li>#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]</li>"
menu += "</ol><font size=\"-3\">Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management."
if (48) //mulebot control

View File

@@ -1,46 +1,3 @@
/obj/effect/dummy/chameleon
name = ""
desc = ""
density = 0
anchored = 1
var/can_move = 1
var/obj/item/device/chameleon/master = null
attackby()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
attack_hand()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
ex_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
bullet_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
..()
master.disrupt()
relaymove(var/mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement!
if(can_move)
can_move = 0
switch(usr.bodytemperature)
if(300 to INFINITY)
spawn(10) can_move = 1
if(295 to 300)
spawn(13) can_move = 1
if(280 to 295)
spawn(16) can_move = 1
if(260 to 280)
spawn(20) can_move = 1
else
spawn(25) can_move = 1
step(src,direction)
return
/obj/item/device/chameleon
name = "chameleon-projector"
icon_state = "shield0"
@@ -119,3 +76,47 @@
active_dummy = null
can_use = 0
spawn(100) can_use = 1
/obj/effect/dummy/chameleon
name = ""
desc = ""
density = 0
anchored = 1
var/can_move = 1
var/obj/item/device/chameleon/master = null
attackby()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
attack_hand()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
ex_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
master.disrupt()
bullet_act()
for(var/mob/M in src)
M << "\red Your chameleon-projector deactivates."
..()
master.disrupt()
relaymove(var/mob/user, direction)
if(istype(loc, /turf/space)) return //No magical space movement!
if(can_move)
can_move = 0
switch(usr.bodytemperature)
if(300 to INFINITY)
spawn(10) can_move = 1
if(295 to 300)
spawn(13) can_move = 1
if(280 to 295)
spawn(16) can_move = 1
if(260 to 280)
spawn(20) can_move = 1
else
spawn(25) can_move = 1
step(src,direction)
return

View File

@@ -18,25 +18,24 @@
..()
if (on)
icon_state = icon_on
src.sd_SetLuminosity(brightness_on)
src.SetLuminosity(brightness_on)
else
icon_state = icon_off
src.sd_SetLuminosity(0)
src.SetLuminosity(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
if (on)
if(on)
icon_state = icon_on
if(src.loc == user)
user.total_luminosity += brightness_on
else if (isturf(src.loc))
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity + brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
else
icon_state = icon_off
if(src.loc == user)
user.total_luminosity -= brightness_on
else if (isturf(src.loc))
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity - brightness_on)
else if(isturf(loc))
SetLuminosity(0)
/obj/item/device/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
@@ -85,14 +84,14 @@
/obj/item/device/flashlight/pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity + brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity - brightness_on)
SetLuminosity(brightness_on)
/obj/item/device/flashlight/pen

View File

@@ -50,7 +50,7 @@
for(var/mob/M in viewers(user))
if(M == user) continue
M << "[user] detaches the power sink from the cable."
sd_SetLuminosity(0)
SetLuminosity(0)
icon_state = "powersink0"
return
@@ -85,7 +85,7 @@
if(M == user) continue
M << "[user] deactivates the power sink!"
mode = 1
sd_SetLuminosity(0)
SetLuminosity(0)
icon_state = "powersink0"
processing_objects.Remove(src)
@@ -93,9 +93,7 @@
if(attached)
var/datum/powernet/PN = attached.get_powernet()
if(PN)
if(!luminosity)
sd_SetLuminosity(12)
SetLuminosity(12)
// found a powernet, so drain up to max power from it

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