Merge remote-tracking branch 'upstream/dev' into 150705-SecretAdminDatums

Conflicts:
	code/modules/admin/topic.dm
This commit is contained in:
PsiOmegaDelta
2015-08-20 14:16:35 +02:00
755 changed files with 20873 additions and 19061 deletions

View File

@@ -1,32 +1,43 @@
#pretending we're C because otherwise ruby will initialize, even with "language: dm".
language: c
sudo: false
env:
BYOND_MAJOR="508"
BYOND_MINOR="1287"
BYOND_MINOR="1293"
MACRO_COUNT=1210
before_install:
- sudo apt-get update -qq
- sudo apt-get install libc6:i386 libgcc1:i386 libstdc++6:i386 -qq
- sudo apt-get install python -qq
- sudo apt-get install python-pip -qq
- sudo pip install PyYaml -q
- sudo pip install beautifulsoup4 -q
cache:
directories:
- $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
addons:
apt:
packages:
- libc6-i386
- libgcc1:i386
- libstdc++6:i386
- python
- python-pip
install:
- curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip
- unzip byond.zip
- cd byond
- sudo make install
- cd ..
- pip install --user PyYaml -q
- pip install --user beautifulsoup4 -q
before_script:
- chmod +x ./install-byond.sh
- ./install-byond.sh
script:
- shopt -s globstar
- (! grep 'step_[xy]' maps/**/*.dmm)
- (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano)
- (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; [ $num -le 1355 ])
- (! grep -E "<\s*span\s+class\s*=\s*('[^'>]+|[^'>]+')\s*>" **/*.dm)
- (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; echo "$num escapes (expecting ${MACRO_COUNT} or less)"; [ $num -le ${MACRO_COUNT} ])
- md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int"
- md5sum -c - <<< "88490b460c26947f5ec1ab1bb9fa9f17 *html/changelogs/example.yml"
- python tools/TagMatcher/tag-matcher.py ../..
- python tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs
- source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
- DreamMaker baystation12.dme

View File

@@ -16,6 +16,7 @@
#include "code\stylesheet.dm"
#include "code\world.dm"
#include "code\__defines\_compile_options.dm"
#include "code\__defines\_macros.dm"
#include "code\__defines\admin.dm"
#include "code\__defines\atmos.dm"
#include "code\__defines\chemistry.dm"
@@ -23,12 +24,15 @@
#include "code\__defines\dna.dm"
#include "code\__defines\gamemode.dm"
#include "code\__defines\items_clothing.dm"
#include "code\__defines\lighting.dm"
#include "code\__defines\machinery.dm"
#include "code\__defines\math_physics.dm"
#include "code\__defines\misc.dm"
#include "code\__defines\mobs.dm"
#include "code\__defines\research.dm"
#include "code\__defines\species_languages.dm"
#include "code\__defines\turfs.dm"
#include "code\_helpers\atmospherics.dm"
#include "code\_helpers\datum_pool.dm"
#include "code\_helpers\files.dm"
#include "code\_helpers\game.dm"
@@ -143,6 +147,7 @@
#include "code\datums\ai_laws.dm"
#include "code\datums\browser.dm"
#include "code\datums\computerfiles.dm"
#include "code\datums\crew.dm"
#include "code\datums\datacore.dm"
#include "code\datums\datumvars.dm"
#include "code\datums\disease.dm"
@@ -218,7 +223,6 @@
#include "code\defines\procs\dbcore.dm"
#include "code\defines\procs\hud.dm"
#include "code\defines\procs\radio.dm"
#include "code\defines\procs\records.dm"
#include "code\defines\procs\sd_Alert.dm"
#include "code\defines\procs\statistics.dm"
#include "code\game\asteroid.dm"
@@ -353,7 +357,6 @@
#include "code\game\machinery\autolathe.dm"
#include "code\game\machinery\autolathe_datums.dm"
#include "code\game\machinery\Beacon.dm"
#include "code\game\machinery\bees_items.dm"
#include "code\game\machinery\biogenerator.dm"
#include "code\game\machinery\bioprinter.dm"
#include "code\game\machinery\bluespacerelay.dm"
@@ -369,6 +372,7 @@
#include "code\game\machinery\doppler_array.dm"
#include "code\game\machinery\flasher.dm"
#include "code\game\machinery\floodlight.dm"
#include "code\game\machinery\floor_light.dm"
#include "code\game\machinery\floorlayer.dm"
#include "code\game\machinery\hologram.dm"
#include "code\game\machinery\holosign.dm"
@@ -575,7 +579,6 @@
#include "code\game\objects\effects\decals\posters\bs12.dm"
#include "code\game\objects\effects\spawners\bombspawner.dm"
#include "code\game\objects\effects\spawners\gibspawner.dm"
#include "code\game\objects\effects\spawners\vaultspawner.dm"
#include "code\game\objects\items\apc_frame.dm"
#include "code\game\objects\items\blueprints.dm"
#include "code\game\objects\items\bodybag.dm"
@@ -604,6 +607,7 @@
#include "code\game\objects\items\devices\scanners.dm"
#include "code\game\objects\items\devices\spy_bug.dm"
#include "code\game\objects\items\devices\suit_cooling.dm"
#include "code\game\objects\items\devices\t_scanner.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"
@@ -632,14 +636,12 @@
#include "code\game\objects\items\stacks\rods.dm"
#include "code\game\objects\items\stacks\stack.dm"
#include "code\game\objects\items\stacks\sheets\leather.dm"
#include "code\game\objects\items\stacks\sheets\light.dm"
#include "code\game\objects\items\stacks\tiles\light.dm"
#include "code\game\objects\items\stacks\tiles\plasteel.dm"
#include "code\game\objects\items\stacks\tiles\tile_types.dm"
#include "code\game\objects\items\weapons\AI_modules.dm"
#include "code\game\objects\items\weapons\autopsy.dm"
#include "code\game\objects\items\weapons\candle.dm"
#include "code\game\objects\items\weapons\cards_ids.dm"
#include "code\game\objects\items\weapons\cards_ids_syndicate.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\cosmetics.dm"
@@ -686,6 +688,7 @@
#include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\commsantenna.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\mech_recharger.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\mining_drill.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
@@ -694,6 +697,7 @@
#include "code\game\objects\items\weapons\circuitboards\machinery\shieldgen.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\telecomms.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\unary_atmos.dm"
#include "code\game\objects\items\weapons\grenades\anti_photon_grenade.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"
@@ -771,6 +775,7 @@
#include "code\game\objects\structures\watercloset.dm"
#include "code\game\objects\structures\windoor_assembly.dm"
#include "code\game\objects\structures\window.dm"
#include "code\game\objects\structures\window_spawner.dm"
#include "code\game\objects\structures\crates_lockers\closets.dm"
#include "code\game\objects\structures\crates_lockers\crates.dm"
#include "code\game\objects\structures\crates_lockers\largecrate.dm"
@@ -805,9 +810,18 @@
#include "code\game\objects\structures\stool_bed_chair_nest\wheelchair.dm"
#include "code\game\turfs\simulated.dm"
#include "code\game\turfs\turf.dm"
#include "code\game\turfs\turf_changing.dm"
#include "code\game\turfs\turf_flick_animations.dm"
#include "code\game\turfs\unsimulated.dm"
#include "code\game\turfs\flooring\flooring.dm"
#include "code\game\turfs\flooring\flooring_decals.dm"
#include "code\game\turfs\flooring\flooring_premade.dm"
#include "code\game\turfs\simulated\floor.dm"
#include "code\game\turfs\simulated\floor_acts.dm"
#include "code\game\turfs\simulated\floor_attackby.dm"
#include "code\game\turfs\simulated\floor_damage.dm"
#include "code\game\turfs\simulated\floor_icon.dm"
#include "code\game\turfs\simulated\floor_static.dm"
#include "code\game\turfs\simulated\floor_types.dm"
#include "code\game\turfs\simulated\wall_attacks.dm"
#include "code\game\turfs\simulated\wall_icon.dm"
@@ -836,6 +850,7 @@
#include "code\modules\admin\create_turf.dm"
#include "code\modules\admin\holder2.dm"
#include "code\modules\admin\IsBanned.dm"
#include "code\modules\admin\map_capture.dm"
#include "code\modules\admin\NewBan.dm"
#include "code\modules\admin\player_notes.dm"
#include "code\modules\admin\player_panel.dm"
@@ -945,6 +960,7 @@
#include "code\modules\client\preferences_savefile.dm"
#include "code\modules\client\preferences_spawnpoints.dm"
#include "code\modules\client\preferences_toggles.dm"
#include "code\modules\client\ui_style.dm"
#include "code\modules\clothing\chameleon.dm"
#include "code\modules\clothing\clothing.dm"
#include "code\modules\clothing\ears\skrell.dm"
@@ -1099,11 +1115,11 @@
#include "code\modules\hydroponics\seed_mobs.dm"
#include "code\modules\hydroponics\seed_packets.dm"
#include "code\modules\hydroponics\seed_storage.dm"
#include "code\modules\hydroponics\beekeeping\beehive.dm"
#include "code\modules\hydroponics\spreading\spreading.dm"
#include "code\modules\hydroponics\spreading\spreading_growth.dm"
#include "code\modules\hydroponics\spreading\spreading_response.dm"
#include "code\modules\hydroponics\trays\tray.dm"
#include "code\modules\hydroponics\trays\tray_apiary.dm"
#include "code\modules\hydroponics\trays\tray_process.dm"
#include "code\modules\hydroponics\trays\tray_reagents.dm"
#include "code\modules\hydroponics\trays\tray_soil.dm"
@@ -1149,6 +1165,7 @@
#include "code\modules\mob\animations.dm"
#include "code\modules\mob\death.dm"
#include "code\modules\mob\emote.dm"
#include "code\modules\mob\gender.dm"
#include "code\modules\mob\hear_say.dm"
#include "code\modules\mob\holder.dm"
#include "code\modules\mob\inventory.dm"
@@ -1314,6 +1331,7 @@
#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"
#include "code\modules\mob\living\silicon\pai\admin.dm"
#include "code\modules\mob\living\silicon\pai\death.dm"
#include "code\modules\mob\living\silicon\pai\examine.dm"
#include "code\modules\mob\living\silicon\pai\life.dm"
@@ -1325,6 +1343,7 @@
#include "code\modules\mob\living\silicon\pai\software_modules.dm"
#include "code\modules\mob\living\silicon\robot\analyzer.dm"
#include "code\modules\mob\living\silicon\robot\component.dm"
#include "code\modules\mob\living\silicon\robot\custom_sprites.dm"
#include "code\modules\mob\living\silicon\robot\death.dm"
#include "code\modules\mob\living\silicon\robot\emote.dm"
#include "code\modules\mob\living\silicon\robot\examine.dm"
@@ -1344,7 +1363,7 @@
#include "code\modules\mob\living\silicon\robot\drone\drone_damage.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_items.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm"
#include "code\modules\mob\living\simple_animal\bees.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_say.dm"
#include "code\modules\mob\living\simple_animal\corpse.dm"
#include "code\modules\mob\living\simple_animal\parrot.dm"
#include "code\modules\mob\living\simple_animal\shade.dm"
@@ -1403,6 +1422,7 @@
#include "code\modules\nano\interaction\default.dm"
#include "code\modules\nano\interaction\inventory.dm"
#include "code\modules\nano\interaction\inventory_deep.dm"
#include "code\modules\nano\interaction\outside.dm"
#include "code\modules\nano\interaction\physical.dm"
#include "code\modules\nano\interaction\self.dm"
#include "code\modules\nano\interaction\zlevel.dm"
@@ -1457,7 +1477,6 @@
#include "code\modules\power\cable.dm"
#include "code\modules\power\cable_heavyduty.dm"
#include "code\modules\power\cell.dm"
#include "code\modules\power\engine.dm"
#include "code\modules\power\fractal_reactor.dm"
#include "code\modules\power\generator.dm"
#include "code\modules\power\generator_type2.dm"
@@ -1541,6 +1560,7 @@
#include "code\modules\random_map\noise\tundra.dm"
#include "code\modules\reagents\Chemistry-Colours.dm"
#include "code\modules\reagents\Chemistry-Holder.dm"
#include "code\modules\reagents\Chemistry-Logging.dm"
#include "code\modules\reagents\Chemistry-Machinery.dm"
#include "code\modules\reagents\Chemistry-Metabolism.dm"
#include "code\modules\reagents\Chemistry-Readme.dm"
@@ -1644,7 +1664,6 @@
#include "code\modules\research\xenoarchaeology\machinery\geosample_scanner.dm"
#include "code\modules\research\xenoarchaeology\tools\ano_device_battery.dm"
#include "code\modules\research\xenoarchaeology\tools\anomaly_suit.dm"
#include "code\modules\research\xenoarchaeology\tools\bunsen_burner.dm"
#include "code\modules\research\xenoarchaeology\tools\gearbelt.dm"
#include "code\modules\research\xenoarchaeology\tools\suspension_generator.dm"
#include "code\modules\research\xenoarchaeology\tools\tools.dm"
@@ -1710,16 +1729,15 @@
#include "code\modules\spells\aoe_turf\conjure\forcewall.dm"
#include "code\modules\spells\general\area_teleport.dm"
#include "code\modules\spells\general\rune_write.dm"
#include "code\modules\spells\targeted\disintegrate.dm"
#include "code\modules\spells\targeted\ethereal_jaunt.dm"
#include "code\modules\spells\targeted\flesh_to_stone.dm"
#include "code\modules\spells\targeted\genetic.dm"
#include "code\modules\spells\targeted\harvest.dm"
#include "code\modules\spells\targeted\horsemask.dm"
#include "code\modules\spells\targeted\mind_transfer.dm"
#include "code\modules\spells\targeted\shift.dm"
#include "code\modules\spells\targeted\subjugate.dm"
#include "code\modules\spells\targeted\targeted.dm"
#include "code\modules\spells\targeted\equip\equip.dm"
#include "code\modules\spells\targeted\equip\horsemask.dm"
#include "code\modules\spells\targeted\projectile\dumbfire.dm"
#include "code\modules\spells\targeted\projectile\fireball.dm"
#include "code\modules\spells\targeted\projectile\magic_missile.dm"

View File

@@ -12,14 +12,14 @@
#define PIPE_COLOR_CYAN "#00ffff"
#define PIPE_COLOR_GREEN "#00ff00"
#define PIPE_COLOR_YELLOW "#ffcc00"
#define PIPE_COLOR_PURPLE "#5c1ec0"
#define PIPE_COLOR_BLACK "#444444"
#define CONNECT_TYPE_REGULAR 1
#define CONNECT_TYPE_SUPPLY 2
#define CONNECT_TYPE_SCRUBBER 4
#define CONNECT_TYPE_HE 8
var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE)
var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK)
/proc/pipe_color_lookup(var/color)
for(var/C in pipe_colors)

View File

@@ -199,7 +199,7 @@
total_unfilterable_moles += source.gas[g]
var/ratio = source.gas[g]/source.total_moles //converts the specific power per mole of pure gas to specific power per mole of input gas mix
total_specific_power = specific_power_gas[g]*ratio
total_specific_power += specific_power_gas[g]*ratio
//Figure out how much of each gas to filter
if (isnull(total_transfer_moles))
@@ -272,7 +272,7 @@
total_unfilterable_moles += source.gas[g]
var/ratio = source.gas[g]/source.total_moles //converts the specific power per mole of pure gas to specific power per mole of input gas mix
total_specific_power = specific_power_gas[g]*ratio
total_specific_power += specific_power_gas[g]*ratio
//Figure out how much of each gas to filter
if (isnull(total_transfer_moles))

View File

@@ -49,7 +49,7 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/proc/add_underlay(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type)
if(node)
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
if(!T.is_plating() && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
//underlays += icon_manager.get_atmos_icon("underlay_down", direction, color_cache_name(node))
underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
else

View File

@@ -69,7 +69,7 @@
if(!istype(T))
return
if(T.intact && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe))
if(!T.is_plating() && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe))
vent_icon += "h"
if(!powered())
@@ -85,7 +85,7 @@
var/turf/T = get_turf(src)
if(!istype(T))
return
if(T.intact && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe))
if(!T.is_plating() && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe))
return
else
if (node1)
@@ -120,14 +120,14 @@
if(pressure_delta > 0.5)
if(pump_direction) //internal -> external
if (node1 && (environment.temperature || air1.temperature))
var/transfer_moles = calculate_transfer_moles(air1, environment)
var/transfer_moles = calculate_transfer_moles(air1, environment, pressure_delta)
power_draw = pump_gas(src, air1, environment, transfer_moles, power_rating)
if(power_draw >= 0 && network1)
network1.update = 1
else //external -> internal
if (node2 && (environment.temperature || air2.temperature))
var/transfer_moles = calculate_transfer_moles(environment, air2, (network2)? network2.volume : 0)
var/transfer_moles = calculate_transfer_moles(environment, air2, pressure_delta, (network2)? network2.volume : 0)
//limit flow rate from turfs
transfer_moles = min(transfer_moles, environment.total_moles*air2.volume/environment.volume) //group_multiplier gets divided out here

View File

@@ -189,7 +189,7 @@
var/turf/T = get_turf(src)
if(!istype(T))
return
if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
if(!T.is_plating() && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
//pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
else

View File

@@ -43,6 +43,13 @@
node = target
break
//copied from pipe construction code since heaters/freezers don't use fittings and weren't doing this check - this all really really needs to be refactored someday.
//check that there are no incompatible pipes/machinery in our own location
for(var/obj/machinery/atmospherics/M in src.loc)
if(M != src && (M.initialize_directions & node_connect) && M.check_connect_types(M,src)) // matches at least one direction on either type of pipe & same connection type
node = null
break
update_icon()
/obj/machinery/atmospherics/unary/freezer/update_icon()

View File

@@ -69,7 +69,7 @@
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact)
if (level==1 && isturf(T) && !T.is_plating())
user << "<span class='warning'>You must remove the plating first.</span>"
return 1
var/datum/gas_mixture/int_air = return_air()

View File

@@ -39,11 +39,19 @@
var/node_connect = dir
//check that there is something to connect to
for(var/obj/machinery/atmospherics/target in get_step(src, node_connect))
if(target.initialize_directions & get_dir(target, src))
node = target
break
//copied from pipe construction code since heaters/freezers don't use fittings and weren't doing this check - this all really really needs to be refactored someday.
//check that there are no incompatible pipes/machinery in our own location
for(var/obj/machinery/atmospherics/M in src.loc)
if(M != src && (M.initialize_directions & node_connect) && M.check_connect_types(M,src)) // matches at least one direction on either type of pipe & same connection type
node = null
break
update_icon()

View File

@@ -118,7 +118,7 @@
if(!istype(T))
return
if(T.intact && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
vent_icon += "h"
if(welded)
@@ -136,7 +136,7 @@
var/turf/T = get_turf(src)
if(!istype(T))
return
if(T.intact && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
return
else
if(node)
@@ -178,10 +178,10 @@
if((environment.temperature || air_contents.temperature) && pressure_delta > 0.5)
if(pump_direction) //internal -> external
var/transfer_moles = calculate_transfer_moles(air_contents, environment)
var/transfer_moles = calculate_transfer_moles(air_contents, environment, pressure_delta)
power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating)
else //external -> internal
var/transfer_moles = calculate_transfer_moles(environment, air_contents, (network)? network.volume : 0)
var/transfer_moles = calculate_transfer_moles(environment, air_contents, pressure_delta, (network)? network.volume : 0)
//limit flow rate from turfs
transfer_moles = min(transfer_moles, environment.total_moles*air_contents.volume/environment.volume) //group_multiplier gets divided out here
@@ -399,7 +399,7 @@
user << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
return 1
var/turf/T = src.loc
if (node && node.level==1 && isturf(T) && T.intact)
if (node && node.level==1 && isturf(T) && !T.is_plating())
user << "<span class='warning'>You must remove the plating first.</span>"
return 1
var/datum/gas_mixture/int_air = return_air()

View File

@@ -72,7 +72,7 @@
var/turf/T = get_turf(src)
if(!istype(T))
return
if(T.intact && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
return
else
if(node)
@@ -261,7 +261,7 @@
user << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
return 1
var/turf/T = src.loc
if (node && node.level==1 && isturf(T) && T.intact)
if (node && node.level==1 && isturf(T) && !T.is_plating())
user << "<span class='warning'>You must remove the plating first.</span>"
return 1
var/datum/gas_mixture/int_air = return_air()

View File

@@ -181,7 +181,7 @@ obj/machinery/atmospherics/mains_pipe/simple
..() // initialize internal pipes
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
hidden
@@ -243,7 +243,7 @@ obj/machinery/atmospherics/mains_pipe/manifold
..() // initialize internal pipes
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
update_icon()
@@ -293,7 +293,7 @@ obj/machinery/atmospherics/mains_pipe/manifold4w
..() // initialize internal pipes
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
update_icon()
@@ -354,7 +354,7 @@ obj/machinery/atmospherics/mains_pipe/split
N1.merge(N2)
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
update_icon()
@@ -475,7 +475,7 @@ obj/machinery/atmospherics/mains_pipe/split3
N1.merge(N2)
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
update_icon()
@@ -525,7 +525,7 @@ obj/machinery/atmospherics/mains_pipe/cap
..()
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
hidden

View File

@@ -1,8 +1,7 @@
/obj/machinery/atmospherics/pipe
var/datum/gas_mixture/air_temporary //used when reconstructing a pipeline that broke
var/datum/gas_mixture/air_temporary // used when reconstructing a pipeline that broke
var/datum/pipeline/parent
var/volume = 0
force = 20
@@ -20,10 +19,12 @@
return -1
/obj/machinery/atmospherics/pipe/New()
..()
//so pipes under walls are hidden
if(istype(get_turf(src), /turf/simulated/wall) || istype(get_turf(src), /turf/simulated/shuttle/wall) || istype(get_turf(src), /turf/unsimulated/wall))
level = 1
..()
/obj/machinery/atmospherics/pipe/hides_under_flooring()
return level != 2
/obj/machinery/atmospherics/pipe/proc/pipeline_expansion()
return null
@@ -81,7 +82,7 @@
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact)
if (level==1 && isturf(T) && !T.is_plating())
user << "<span class='warning'>You must remove the plating first.</span>"
return 1
var/datum/gas_mixture/int_air = return_air()
@@ -91,7 +92,7 @@
add_fingerprint(user)
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice>You begin to unfasten \the [src]...</span>"
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
if (do_after(user, 40))
user.visible_message( \
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
@@ -188,7 +189,7 @@
initialize_directions = SOUTH|WEST
/obj/machinery/atmospherics/pipe/simple/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
@@ -297,9 +298,8 @@
qdel(src)
return
var/turf/T = get_turf(src)
if(istype(T))
hide(T.intact)
var/turf/T = loc
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
/obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference)
@@ -348,8 +348,8 @@
/obj/machinery/atmospherics/pipe/simple/visible/green
color = PIPE_COLOR_GREEN
/obj/machinery/atmospherics/pipe/simple/visible/purple
color = PIPE_COLOR_PURPLE
/obj/machinery/atmospherics/pipe/simple/visible/black
color = PIPE_COLOR_BLACK
/obj/machinery/atmospherics/pipe/simple/visible/red
color = PIPE_COLOR_RED
@@ -390,8 +390,8 @@
/obj/machinery/atmospherics/pipe/simple/hidden/green
color = PIPE_COLOR_GREEN
/obj/machinery/atmospherics/pipe/simple/hidden/purple
color = PIPE_COLOR_PURPLE
/obj/machinery/atmospherics/pipe/simple/hidden/black
color = PIPE_COLOR_BLACK
/obj/machinery/atmospherics/pipe/simple/hidden/red
color = PIPE_COLOR_RED
@@ -446,7 +446,7 @@
initialize_directions = NORTH|EAST|SOUTH
/obj/machinery/atmospherics/pipe/manifold/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
@@ -582,8 +582,7 @@
return
var/turf/T = get_turf(src)
if(istype(T))
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
/obj/machinery/atmospherics/pipe/manifold/visible
@@ -617,8 +616,8 @@
/obj/machinery/atmospherics/pipe/manifold/visible/green
color = PIPE_COLOR_GREEN
/obj/machinery/atmospherics/pipe/manifold/visible/purple
color = PIPE_COLOR_PURPLE
/obj/machinery/atmospherics/pipe/manifold/visible/black
color = PIPE_COLOR_BLACK
/obj/machinery/atmospherics/pipe/manifold/visible/red
color = PIPE_COLOR_RED
@@ -659,8 +658,8 @@
/obj/machinery/atmospherics/pipe/manifold/hidden/green
color = PIPE_COLOR_GREEN
/obj/machinery/atmospherics/pipe/manifold/hidden/purple
color = PIPE_COLOR_PURPLE
/obj/machinery/atmospherics/pipe/manifold/hidden/black
color = PIPE_COLOR_BLACK
/obj/machinery/atmospherics/pipe/manifold/hidden/red
color = PIPE_COLOR_RED
@@ -806,7 +805,7 @@
update_icon()
/obj/machinery/atmospherics/pipe/manifold4w/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
@@ -841,8 +840,7 @@
return
var/turf/T = get_turf(src)
if(istype(T))
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
/obj/machinery/atmospherics/pipe/manifold4w/visible
@@ -876,8 +874,8 @@
/obj/machinery/atmospherics/pipe/manifold4w/visible/green
color = PIPE_COLOR_GREEN
/obj/machinery/atmospherics/pipe/manifold4w/visible/purple
color = PIPE_COLOR_PURPLE
/obj/machinery/atmospherics/pipe/manifold4w/visible/black
color = PIPE_COLOR_BLACK
/obj/machinery/atmospherics/pipe/manifold4w/visible/red
color = PIPE_COLOR_RED
@@ -917,8 +915,8 @@
/obj/machinery/atmospherics/pipe/manifold4w/hidden/green
color = PIPE_COLOR_GREEN
/obj/machinery/atmospherics/pipe/manifold4w/hidden/purple
color = PIPE_COLOR_PURPLE
/obj/machinery/atmospherics/pipe/manifold4w/hidden/black
color = PIPE_COLOR_BLACK
/obj/machinery/atmospherics/pipe/manifold4w/hidden/red
color = PIPE_COLOR_RED
@@ -946,7 +944,7 @@
initialize_directions = dir
/obj/machinery/atmospherics/pipe/cap/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
@@ -997,7 +995,7 @@
break
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
/obj/machinery/atmospherics/pipe/cap/visible
@@ -1120,20 +1118,8 @@
return
if(istype(W, /obj/item/device/analyzer) && in_range(user, src))
for (var/mob/O in viewers(user, null))
O << "<span class='notice'>\The [user] has used \the [W] on \the [src] \icon[src]</span>"
var/pressure = parent.air.return_pressure()
var/total_moles = parent.air.total_moles
user << "<span class='notice'>Results of analysis of \the [src] \icon[src]</span>"
if (total_moles>0)
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
for(var/g in parent.air.gas)
user << "<span class='notice'>[gas_data.name[g]]: [round((parent.air.gas[g] / total_moles) * 100)]%</span>"
user << "<span class='notice'>Temperature: [round(parent.air.temperature-T0C)]&deg;C</span>"
else
user << "<span class='notice'>Tank is empty!</span>"
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
/obj/machinery/atmospherics/pipe/tank/air
name = "Pressure Tank (Air)"
@@ -1398,7 +1384,7 @@
/obj/machinery/atmospherics/proc/add_underlay_adapter(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type) //modified from add_underlay, does not make exposed underlays
if(node)
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
if(!T.is_plating() && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
else
underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)

View File

@@ -46,8 +46,8 @@ obj/machinery/atmospherics/pipe/zpipe/New()
if(SOUTHWEST)
initialize_directions = SOUTH
obj/machinery/atmospherics/pipe/zpipe/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
/obj/machinery/atmospherics/pipe/zpipe/hide(var/i)
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
@@ -149,7 +149,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/initialize()
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
hide(!T.is_plating())
///////////////////////
// and the down pipe //
@@ -190,7 +190,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/initialize()
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
hide(!T.is_plating())
///////////////////////
// supply/scrubbers //

View File

@@ -1,6 +1,5 @@
/turf/simulated/floor/open
name = "open space"
intact = 0
density = 0
icon_state = "black"
pathweight = 100000 //Seriously, don't try and path over this one numbnuts
@@ -81,7 +80,6 @@
// override to make sure nothing is hidden
/turf/simulated/floor/open/levelupdate()
for(var/obj/O in src)
if(O.level == 1)
O.hide(0)
//overwrite the attackby of space to transform it to openspace if necessary
@@ -114,16 +112,16 @@
ReplaceWithLattice()
return
if (istype(C, /obj/item/stack/tile/steel))
if (istype(C, /obj/item/stack/tile/floor))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
var/obj/item/stack/tile/steel/S = C
var/obj/item/stack/tile/floor/S = C
if (S.get_amount() < 1)
return
qdel(L)
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
S.build(src)
S.use(1)
ChangeTurf(/turf/simulated/floor/airless)
return
else
user << "<span class='warning'>The plating is going to need some support.</span>"

View File

@@ -19,7 +19,7 @@ mob/proc/airflow_stun()
mob/living/silicon/airflow_stun()
return
mob/living/carbon/metroid/airflow_stun()
mob/living/carbon/slime/airflow_stun()
return
mob/living/carbon/human/airflow_stun()
@@ -241,7 +241,7 @@ mob/living/carbon/human/airflow_hit(atom/A)
zone/proc/movables()
. = list()
for(var/turf/T in contents)
for(var/atom/A in T)
if(istype(A, /obj/effect) || istype(A, /mob/aiEye))
for(var/atom/movable/A in T)
if(!A.simulated || A.anchored || istype(A, /obj/effect) || istype(A, /mob/eye))
continue
. += A

View File

@@ -274,10 +274,10 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
//vapour fuels are extremely volatile! The reaction progress is a percentage of the total fuel (similar to old zburn).)
var/min_burn = 0.30*volume*group_multiplier/CELL_VOLUME //in moles - so that fires with very small gas concentrations burn out fast
var/gas_reaction_progress = max(min_burn, firelevel_ratio*gas_fuel)*FIRE_GAS_BURNRATE_MULT
var/gas_reaction_progress = min(max(min_burn, firelevel_ratio*gas_fuel)*FIRE_GAS_BURNRATE_MULT, gas_fuel)
//liquid fuels are not as volatile, and the reaction progress depends on the size of the area that is burning. Limit the burn rate to a certain amount per area.
var/liquid_reaction_progress = (firelevel_ratio*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT
var/liquid_reaction_progress = min((firelevel_ratio*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT, liquid_fuel)
var/total_reaction_progress = gas_reaction_progress + liquid_reaction_progress
var/used_fuel = min(total_reaction_progress, reaction_limit)
@@ -295,7 +295,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
//if the reaction is progressing too slow then it isn't self-sustaining anymore and burns out
if(zone) //be less restrictive with canister and tank reactions
if((!liquid_fuel || used_fuel <= FIRE_LIQUD_MIN_BURNRATE) && (!gas_fuel || used_fuel <= FIRE_GAS_MIN_BURNRATE*group_multiplier))
if((!liquid_fuel || used_fuel <= FIRE_LIQUD_MIN_BURNRATE) && (!gas_fuel || used_fuel <= FIRE_GAS_MIN_BURNRATE*zone.contents.len))
return 0

View File

@@ -0,0 +1,2 @@
#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x))
#define CLAMP01(x) (Clamp(x, 0, 1))

View File

@@ -8,6 +8,8 @@
#define MOLES_PHORON_VISIBLE 0.7 // Moles in a standard cell after which phoron is visible.
#define MOLES_O2STANDARD (MOLES_CELLSTANDARD * O2STANDARD) // O2 standard value (21%)
#define MOLES_N2STANDARD (MOLES_CELLSTANDARD * N2STANDARD) // N2 standard value (79%)
#define MOLES_O2ATMOS (MOLES_O2STANDARD*50)
#define MOLES_N2ATMOS (MOLES_N2STANDARD*50)
// These are for when a mob breathes poisonous air.
#define MIN_TOXIN_DAMAGE 1

View File

@@ -33,6 +33,7 @@
#define ON_BORDER 64 // Item has priority to check when entering or leaving.
#define NOBLOODY 512 // Used for items if they don't want to get a blood overlay.
#define NODELAY 8192 // 1 second attack-by delay skipped (Can be used once every 0.2s). Most objects have a 1s attack-by delay, which doesn't require a flag.
#define PROXMOVE 16384 // Does this object require proximity checking in Enter()?
//Use these flags to indicate if an item obscures the specified slots from view, whereas body_parts_covered seems to be used to indicate what body parts the item protects.
#define GLASSESCOVERSEYES 256

View File

@@ -0,0 +1,6 @@
#define FOR_DVIEW(type, range, center, invis_flags) \
dview_mob.loc = center; \
dview_mob.see_invisible = invis_flags; \
for(type in view(range, dview_mob))
#define END_FOR_DVIEW dview_mob.loc = null

View File

@@ -12,7 +12,7 @@
#define INVISIBILITY_EYE 61
#define SEE_INVISIBLE_LIVING 25
#define SEE_INVISIBLE_OBSERVER_NOLIGHTING 15
#define SEE_INVISIBLE_NOLIGHTING 15
#define SEE_INVISIBLE_LEVEL_ONE 35
#define SEE_INVISIBLE_LEVEL_TWO 45
#define SEE_INVISIBLE_CULT 60
@@ -63,15 +63,23 @@
#define LIFE_HUD 10 // STATUS_HUD that only reports dead or alive
//some colors
#define COLOR_RED "#FF0000"
#define COLOR_GREEN "#00FF00"
#define COLOR_BLUE "#0000FF"
#define COLOR_CYAN "#00FFFF"
#define COLOR_PINK "#FF00FF"
#define COLOR_YELLOW "#FFFF00"
#define COLOR_ORANGE "#FF9900"
#define COLOR_WHITE "#FFFFFF"
#define COLOR_SILVER "#C0C0C0"
#define COLOR_GRAY "#808080"
#define COLOR_BLACK "#000000"
#define COLOR_RED "#FF0000"
#define COLOR_MAROON "#800000"
#define COLOR_YELLOW "#FFFF00"
#define COLOR_OLIVE "#808000"
#define COLOR_LIME "#00FF00"
#define COLOR_GREEN "#008000"
#define COLOR_CYAN "#00FFFF"
#define COLOR_TEAL "#008080"
#define COLOR_BLUE "#0000FF"
#define COLOR_NAVY "#000080"
#define COLOR_PINK "#FF00FF"
#define COLOR_PURPLE "#800080"
#define COLOR_ORANGE "#FF9900"
// Shuttles.
@@ -117,8 +125,9 @@
#define DOOR_OPEN_LAYER 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
#define DOOR_CLOSED_LAYER 3.1 //Above most items if closed
#define LIGHTING_LAYER 11
#define OBFUSCATION_LAYER 14 //Where images covering the view for eyes are put
#define SCREEN_LAYER 17 //Mob HUD/effects layer
#define HUD_LAYER 20 //Above lighting, but below obfuscation. For in-game HUD effects (whereas SCREEN_LAYER is for abstract/OOC things like inventory slots)
#define OBFUSCATION_LAYER 21 //Where images covering the view for eyes are put
#define SCREEN_LAYER 22 //Mob HUD/effects layer
// Convoluted setup so defines can be supplied by Bay12 main server compile script.
// Should still work fine for people jamming the icons into their repo.
@@ -154,3 +163,7 @@
#define BOMBCAP_HEAVY_RADIUS (max_explosion_range/2)
#define BOMBCAP_LIGHT_RADIUS max_explosion_range
#define BOMBCAP_FLASH_RADIUS (max_explosion_range*1.5)
// Special return values from bullet_act(). Positive return values are already used to indicate the blocked level of the projectile.
#define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act()
#define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs.

View File

@@ -49,7 +49,7 @@
#define I_HELP "help"
#define I_DISARM "disarm"
#define I_GRAB "grab"
#define I_HURT "hurt"
#define I_HURT "harm"
//These are used Bump() code for living mobs, in the mob_bump_flag, mob_swap_flags, and mob_push_flags vars to determine whom can bump/swap with whom.
#define HUMAN 1
@@ -58,7 +58,8 @@
#define ROBOT 8
#define SLIME 16
#define SIMPLE_ANIMAL 32
#define ALLMOBS (HUMAN|MONKEY|ALIEN|ROBOT|SLIME|SIMPLE_ANIMAL)
#define HEAVY 64
#define ALLMOBS (HUMAN|MONKEY|ALIEN|ROBOT|SLIME|SIMPLE_ANIMAL|HEAVY)
#define NEXT_MOVE_DELAY 8
@@ -84,3 +85,23 @@
#define MIN_SUPPLIED_LAW_NUMBER 15
#define MAX_SUPPLIED_LAW_NUMBER 50
//default item on-mob icons
#define INV_HEAD_DEF_ICON 'icons/mob/head.dmi'
#define INV_BACK_DEF_ICON 'icons/mob/back.dmi'
#define INV_L_HAND_DEF_ICON 'icons/mob/items/lefthand.dmi'
#define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi'
#define INV_W_UNIFORM_DEF_ICON 'icons/mob/uniform.dmi'
#define INV_ACCESSORIES_DEF_ICON 'icons/mob/ties.dmi'
#define INV_SUIT_DEF_ICON 'icons/mob/ties.dmi'
#define INV_SUIT_DEF_ICON 'icons/mob/suit.dmi'
#define MAX_SUPPLIED_LAW_NUMBER 50
// NT's alignment towards the character
#define COMPANY_LOYAL "Loyal"
#define COMPANY_SUPPORTATIVE "Supportive"
#define COMPANY_NEUTRAL "Neutral"
#define COMPANY_SKEPTICAL "Skeptical"
#define COMPANY_OPPOSED "Opposed"
#define COMPANY_ALIGNMENTS list(COMPANY_LOYAL,COMPANY_SUPPORTATIVE,COMPANY_NEUTRAL,COMPANY_SKEPTICAL,COMPANY_OPPOSED)

View File

@@ -1,7 +1,7 @@
#define SHEET_MATERIAL_AMOUNT 2000
#define TECH_MATERIAL "materials"
#define TECH_ENGINERING "engineering"
#define TECH_ENGINEERING "engineering"
#define TECH_PHORON "phorontech"
#define TECH_POWER "powerstorage"
#define TECH_BLUESPACE "bluespace"

View File

@@ -45,3 +45,4 @@
#define INNATE 64 // All mobs can be assumed to speak and understand this language. (audible emotes)
#define NO_TALK_MSG 128 // Do not show the "\The [speaker] talks into \the [radio]" message
#define NO_STUTTER 256 // No stuttering, slurring, or other speech problems
#define COMMON_VERBS 512 // Robots will apply regular verbs to this

10
code/__defines/turfs.dm Normal file
View File

@@ -0,0 +1,10 @@
#define TURF_REMOVE_CROWBAR 1
#define TURF_REMOVE_SCREWDRIVER 2
#define TURF_REMOVE_SHOVEL 4
#define TURF_REMOVE_WRENCH 8
#define TURF_CAN_BREAK 16
#define TURF_CAN_BURN 32
#define TURF_HAS_EDGES 64
#define TURF_HAS_CORNERS 128
#define TURF_IS_FRAGILE 256
#define TURF_ACID_IMMUNE 512

View File

@@ -0,0 +1,47 @@
/obj/proc/analyze_gases(var/obj/A, var/mob/user)
if(src != A)
user.visible_message("<span class='notice'>\The [user] has used \an [src] on \the [A]</span>")
A.add_fingerprint(user)
var/list/result = A.atmosanalyze(user)
if(result && result.len)
user << "<span class='notice'>Results of the analysis[src == A ? "" : " of \the [A]"]</span>"
for(var/line in result)
user << "<span class='notice'>[line]</span>"
return 1
user << "<span class='warning'>Your [src] flashes a red light as it fails to analyze \the [A].</span>"
return 0
/proc/atmosanalyzer_scan(var/obj/target, var/datum/gas_mixture/mixture, var/mob/user)
var/pressure = mixture.return_pressure()
var/total_moles = mixture.total_moles
var/list/results = list()
if (total_moles>0)
results += "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
for(var/mix in mixture.gas)
results += "<span class='notice'>[gas_data.name[mix]]: [round((mixture.gas[mix] / total_moles) * 100)]%</span>"
results += "<span class='notice'>Temperature: [round(mixture.temperature-T0C)]&deg;C</span>"
else
results += "<span class='notice'>\The [target] is empty!</span>"
return results
/obj/proc/atmosanalyze(var/mob/user)
return
/obj/item/weapon/tank/atmosanalyze(var/mob/user)
return atmosanalyzer_scan(src, src.air_contents, user)
/obj/machinery/portable_atmospherics/atmosanalyze(var/mob/user)
return atmosanalyzer_scan(src, src.air_contents, user)
/obj/machinery/atmospherics/pipe/atmosanalyze(var/mob/user)
return atmosanalyzer_scan(src, src.parent.air, user)
/obj/machinery/power/rad_collector/atmosanalyze(var/mob/user)
if(P) return atmosanalyzer_scan(src, src.P.air_contents, user)
/obj/item/weapon/flamethrower/atmosanalyze(var/mob/user)
if(ptank) return atmosanalyzer_scan(src, ptank.air_contents, user)

View File

@@ -635,7 +635,7 @@ The _flatIcons list is a cache for generated icon files.
*/
proc // Creates a single icon from a given /atom or /image. Only the first argument is required.
getFlatIcon(image/A, defdir=2, deficon=null, defstate="", defblend=BLEND_DEFAULT)
getFlatIcon(image/A, defdir=2, deficon=null, defstate="", defblend=BLEND_DEFAULT, always_use_defdir = 0)
// We start with a blank canvas, otherwise some icon procs crash silently
var/icon/flat = icon('icons/effects/effects.dmi', "icon_state"="nothing") // Final flattened icon
if(!A)
@@ -666,7 +666,7 @@ proc // Creates a single icon from a given /atom or /image. Only the first argu
noIcon = TRUE // Do not render this object.
var/curdir
if(A.dir != 2)
if(A.dir != 2 && !always_use_defdir)
curdir = A.dir
else
curdir = defdir

View File

@@ -604,10 +604,13 @@ proc/dd_sortedTextList(list/incoming)
/datum/alarm/dd_SortValue()
return "[sanitize_old(last_name)]"
/proc/subtypes(prototype)
return (typesof(prototype) - prototype)
//creates every subtype of prototype (excluding prototype) and adds it to list L.
//if no list/L is provided, one is created.
/proc/init_subtypes(prototype, list/L)
if(!istype(L)) L = list()
for(var/path in (typesof(prototype) - prototype))
for(var/path in subtypes(prototype))
L += new path()
return L

View File

@@ -109,6 +109,12 @@
M = whom
C = M.client
key = M.key
else if(istype(whom, /datum/mind))
var/datum/mind/D = whom
key = D.key
M = D.current
if(D.current)
C = D.current.client
else if(istype(whom, /datum))
var/datum/D = whom
return "*invalid:[D.type]*"

View File

@@ -1,15 +1,6 @@
// Macro functions.
#define RAND_F(LOW, HIGH) (rand()*(HIGH-LOW) + LOW)
// List of square roots for the numbers 1-100.
var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10)
/proc/Clamp(val, min, max)
return max(min, min(val, max))
// min is inclusive, max is exclusive
/proc/Wrap(val, min, max)
var/d = max - min

View File

@@ -226,89 +226,3 @@ var/syndicate_code_response//Code response for traitors.
code_phrase += ", "
return code_phrase
/*
//This proc tests the gen above.
/client/verb/test_code_phrase()
set name = "Generate Code Phrase"
set category = "Debug"
world << "<span class='warning'>Code Phrase is:</span> [generate_code_phrase()]"
return
This was an earlier attempt at code phrase system, aside from an even earlier attempt (and failure).
This system more or less works as intended--aside from being unfinished--but it's still very predictable.
Particularly, the phrase opening statements are pretty easy to recognize and identify when metagaming.
I think the above-used method solves this issue by using words in a sequence, providing for much greater flexibility.
/N
switch(choice)
if(1)
syndicate_code_phrase += pick("I'm looking for","Have you seen","Maybe you've seen","I'm trying to find","I'm tracking")
syndicate_code_phrase += " "
syndicate_code_phrase += pick(pick(first_names_male,first_names_female))
syndicate_code_phrase += " "
syndicate_code_phrase += pick(last_names)
syndicate_code_phrase += "."
if(2)
syndicate_code_phrase += pick("How do I get to","How do I find","Where is","Where do I find")
syndicate_code_phrase += " "
syndicate_code_phrase += pick("Escape","Engineering","Atmos","the bridge","the brig","Clown Planet","CentCom","the library","the chapel","a bathroom","Med Bay","Tool Storage","the escape shuttle","Robotics","a locker room","the living quarters","the gym","the autolathe","QM","the bar","the theater","the derelict")
syndicate_code_phrase += "?"
if(3)
if(prob(70))
syndicate_code_phrase += pick("Get me","I want","I'd like","Make me")
syndicate_code_phrase += " a "
else
syndicate_code_phrase += pick("One")
syndicate_code_phrase += " "
syndicate_code_phrase += pick("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequilla sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
syndicate_code_phrase += "."
if(4)
syndicate_code_phrase += pick("I wish I was","My dad was","His mom was","Where do I find","The hero this station needs is","I'd fuck","I wouldn't trust","Someone caught","HoS caught","Someone found","I'd wrestle","I wanna kill")
syndicate_code_phrase += " [pick("a","the")] "
syndicate_code_phrase += pick("wizard","ninja","xeno","lizard","slime","monkey","syndicate","cyborg","clown","space carp","singularity","singulo","mime")
syndicate_code_phrase += "."
if(5)
syndicate_code_phrase += pick("Do we have","Is there","Where is","Where's","Who's")
syndicate_code_phrase += " "
syndicate_code_phrase += "[pick(joblist)]"
syndicate_code_phrase += "?"
switch(choice)
if(1)
if(prob(80))
syndicate_code_response += pick("Try looking for them near","I they ran off to","Yes. I saw them near","Nope. I'm heading to","Try searching")
syndicate_code_response += " "
syndicate_code_response += pick("Escape","Engineering","Atmos","the bridge","the brig","Clown Planet","CentCom","the library","the chapel","a bathroom","Med Bay","Tool Storage","the escape shuttle","Robotics","a locker room","the living quarters","the gym","the autolathe","QM","the bar","the theater","the derelict")
syndicate_code_response += "."
else if(prob(60))
syndicate_code_response += pick("No. I'm busy, sorry.","I don't have the time.","Not sure, maybe?","There is no time.")
else
syndicate_code_response += pick("*shrug*","*smile*","*blink*","*sigh*","*laugh*","*nod*","*giggle*")
if(2)
if(prob(80))
syndicate_code_response += pick("Go to","Navigate to","Try","Sure, run to","Try searching","It's near","It's around")
syndicate_code_response += " the "
syndicate_code_response += pick("[pick("south","north","east","west")] maitenance door","nearby maitenance","teleporter","[pick("cold","dead")] space","morgue","vacuum","[pick("south","north","east","west")] hall ","[pick("south","north","east","west")] hallway","[pick("white","black","red","green","blue","pink","purple")] [pick("rabbit","frog","lion","tiger","panther","snake","facehugger")]")
syndicate_code_response += "."
else if(prob(60))
syndicate_code_response += pick("Try asking","Ask","Talk to","Go see","Follow","Hunt down")
syndicate_code_response += " "
if(prob(50))
syndicate_code_response += pick(pick(first_names_male,first_names_female))
syndicate_code_response += " "
syndicate_code_response += pick(last_names)
else
syndicate_code_response += " the "
syndicate_code_response += "[pic(joblist)]"
syndicate_code_response += "."
else
syndicate_code_response += pick("*shrug*","*smile*","*blink*","*sigh*","*laugh*","*nod*","*giggle*")
if(3)
if(4)
if(5)
return
*/

View File

@@ -55,7 +55,7 @@
//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites -
//this is a problem of double-encode(when & becomes &amp;), use sanitize() with encode=0, but not the sanitizeSafe()!
/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'"), max_length, encode, trim, extra))
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra)
//Filters out undesirable characters from names
/proc/sanitizeName(var/input, var/max_length = MAX_NAME_LEN, var/allow_numbers = 0)
@@ -116,7 +116,7 @@
if(last_char_group == 1)
output = copytext(output,1,length(output)) //removes the last character (in this case a space)
for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names
for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai","plating")) //prevents these common metagamey names
if(cmptext(output,bad_name)) return //(not case sensitive)
return output

View File

@@ -6,9 +6,9 @@
var/roundstart_hour = 0
//Returns the world time in english
proc/worldtime2text(time = world.time)
proc/worldtime2text(time = world.time, timeshift = 1)
if(!roundstart_hour) roundstart_hour = pick(2,7,12,17)
return "[(round(time / 36000)+roundstart_hour) % 24]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
return timeshift ? time2text(time+(36000*roundstart_hour), "hh:mm") : time2text(time, "hh:mm")
proc/worlddate2text()
return num2text((text2num(time2text(world.timeofday, "YYYY"))+544)) + "-" + time2text(world.timeofday, "MM-DD")
@@ -27,3 +27,18 @@ proc/isDay(var/month, var/day)
// Uncomment this out when debugging!
//else
//return 1
var/next_duration_update = 0
var/last_round_duration = 0
proc/round_duration()
if(last_round_duration && world.time < next_duration_update)
return last_round_duration
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
//var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
var/mins = (mills % 36000) / 600
var/hours = mills / 36000
last_round_duration = "[round(hours)]h [round(mins)]m"
next_duration_update = world.time + 1 MINUTES
return last_round_duration

View File

@@ -36,35 +36,19 @@
return num
// Returns the hex value of a number given a value assumed to be a base-ten value
/proc/num2hex(num, digits)
if (digits == null)
digits = 2
/proc/num2hex(num, padlength)
var/global/list/hexdigits = list("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
if (!isnum(num))
return
. = ""
while(num > 0)
var/hexdigit = hexdigits[(num & 0xF) + 1]
. = "[hexdigit][.]"
num >>= 4 //go to the next half-byte
// hex is our return value, to which each hex-digit of num is appended to.
var/hex = ""
var/power = -4
var/n = 1
// Figure out power. (power of 2)
while (n < num)
power += 4
n *= 16
// Note that we have to start appending to hex with the most-significant digits.
while (power >= 0)
var/m = (num >> power) & 15
hex += ascii2text(m + (m < 10 ? 48 : 87)) // Provided by the IconProcs library.
power -= 4
// Append zeroes to make sure that hex is atleast digits long.
var/left = length(hex) - digits
//pad with zeroes
var/left = padlength - length(.)
while (left-- > 0)
hex = text("0[]", hex)
return hex
. = "0[.]"
// Concatenates a list of strings into a single string. A seperator may optionally be provided.
/proc/list2text(list/ls, sep)
@@ -291,13 +275,6 @@ proc/tg_list2text(list/list, glue=",")
if (rights & R_MENTOR) . += "[seperator]+MENTOR"
return .
/proc/ui_style2icon(ui_style)
switch (ui_style)
if ("old") return 'icons/mob/screen1_old.dmi'
if ("Orange") return 'icons/mob/screen1_Orange.dmi'
if ("Midnight") return 'icons/mob/screen1_Midnight.dmi'
else return 'icons/mob/screen1_White.dmi'
// heat2color functions. Adapted from: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
/proc/heat2color(temp)
return rgb(heat2color_r(temp), heat2color_g(temp), heat2color_b(temp))

View File

@@ -550,23 +550,6 @@ proc/GaussRand(var/sigma)
proc/GaussRandRound(var/sigma,var/roundto)
return round(GaussRand(sigma),roundto)
proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
//This proc throws up either an icon or an animation for a specified amount of time.
//The variables should be apparent enough.
var/atom/movable/overlay/animation = new(location)
if(direction)
animation.set_dir(direction)
animation.icon = a_icon
animation.layer = target:layer+1
if(a_icon_state)
animation.icon_state = a_icon_state
else
animation.icon_state = "blank"
animation.master = target
flick(flick_anim, animation)
sleep(max(sleeptime, 15))
qdel(animation)
//Will return the contents of an atom recursivly to a depth of 'searchDepth'
/atom/proc/GetAllContents(searchDepth = 5)
var/list/toReturn = list()
@@ -791,11 +774,15 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
var/old_dir1 = T.dir
var/old_icon_state1 = T.icon_state
var/old_icon1 = T.icon
var/old_overlays = T.overlays.Copy()
var/old_underlays = T.underlays.Copy()
var/turf/X = B.ChangeTurf(T.type)
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
X.overlays = old_overlays
X.underlays = old_underlays
var/turf/simulated/ST = T
if(istype(ST) && ST.zone)
@@ -841,7 +828,7 @@ 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) || istype(M, /mob/aiEye)) continue // If we need to check for more mobs, I'll add a variable
if(!istype(M,/mob) || istype(M, /mob/eye)) continue // If we need to check for more mobs, I'll add a variable
M.loc = X
// var/area/AR = X.loc
@@ -888,6 +875,8 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
// Movement based on lower left corner. Tiles that do not fit
// into the new area will not be moved.
// Does *not* affect gases etc; copied turfs will be changed via ChangeTurf, and the dir, icon, and icon_state copied. All other vars will remain default.
if(!A || !src) return 0
var/list/turfs_src = get_area_turfs(src.type)
@@ -936,16 +925,20 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
var/old_dir1 = T.dir
var/old_icon_state1 = T.icon_state
var/old_icon1 = T.icon
var/old_overlays = T.overlays.Copy()
var/old_underlays = T.underlays.Copy()
if(platingRequired)
if(istype(B, get_base_turf(B.z)))
continue moving
var/turf/X = new T.type(B)
var/turf/X = B
X.ChangeTurf(T.type)
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
X.overlays = old_overlays
X.underlays = old_underlays
var/list/objs = new/list()
var/list/newobjs = new/list()
@@ -969,7 +962,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
for(var/mob/M in T)
if(!istype(M,/mob) || istype(M, /mob/aiEye)) continue // If we need to check for more mobs, I'll add a variable
if(!istype(M,/mob) || istype(M, /mob/eye)) continue // If we need to check for more mobs, I'll add a variable
mobs += M
for(var/mob/M in mobs)
@@ -981,12 +974,6 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
copiedobjs += newobjs
copiedobjs += newmobs
for(var/V in T.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
X.vars[V] = T.vars[V]
// var/area/AR = X.loc
// if(AR.lighting_use_dynamic)
@@ -1002,22 +989,9 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
var/list/doors = new/list()
if(toupdate.len)
for(var/turf/simulated/T1 in toupdate)
for(var/obj/machinery/door/D2 in T1)
doors += D2
/*if(T1.parent)
air_master.groups_to_rebuild += T1.parent
else
air_master.tiles_to_update += T1*/
for(var/obj/O in doors)
O:update_nearby_tiles(1)
air_master.mark_for_update(T1)
return copiedobjs
@@ -1306,7 +1280,39 @@ var/list/WALLITEMS = list(
colour += temp_col
return colour
var/mob/dview/dview_mob = new
//Version of view() which ignores darkness, because BYOND doesn't have it.
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
if(!center)
return
dview_mob.loc = center
dview_mob.see_invisible = invis_flags
. = view(range, dview_mob)
dview_mob.loc = null
/mob/dview
invisibility = 101
density = 0
anchored = 1
simulated = 0
see_in_dark = 1e6
/atom/proc/get_light_and_color(var/atom/origin)
if(origin)
color = origin.color
set_light(origin.light_range, origin.light_power, origin.light_color)
/mob/dview/New()
..()
// We don't want to be in any mob lists; we're a dummy not a mob.
mob_list -= src
if(stat == DEAD)
dead_mob_list -= src
else
living_mob_list -= src

View File

@@ -80,8 +80,10 @@
return
if(in_throw_mode)
if(isturf(A) || isturf(A.loc))
throw_item(A)
return
throw_mode_off()
if(!istype(A,/obj/item/weapon/gun) && !isturf(A) && !istype(A,/obj/screen))
last_target_click = world.time

View File

@@ -141,6 +141,25 @@ datum/hud/New(mob/owner)
instantiate()
..()
/datum/hud/Destroy()
..()
grab_intent = null
hurt_intent = null
disarm_intent = null
help_intent = null
lingchemdisplay = null
blobpwrdisplay = null
blobhealthdisplay = null
r_hand_hud_object = null
l_hand_hud_object = null
action_intent = null
move_intent = null
adding = null
other = null
hotkeybuttons = null
// item_action_list = null // ?
mymob = null
/datum/hud/proc/hidden_inventory_update()
if(!mymob) return
if(ishuman(mymob))
@@ -237,7 +256,7 @@ datum/hud/New(mob/owner)
if(ishuman(mymob))
human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences
else if(issmall(mymob))
monkey_hud(ui_style)
monkey_hud(ui_style, ui_color, ui_alpha)
else if(isbrain(mymob))
brain_hud(ui_style)
else if(isalien(mymob))

View File

@@ -58,7 +58,6 @@
using = new /obj/screen()
using.name = "act_intent"
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = "intent_"+mymob.a_intent
using.screen_loc = ui_acti
@@ -125,7 +124,6 @@
if(hud_data.has_m_intent)
using = new /obj/screen()
using.name = "mov_intent"
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
@@ -160,11 +158,10 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.set_dir(WEST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
inv_box.icon_state = "r_hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "hand_active"
inv_box.icon_state = "r_hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
inv_box.layer = 19
@@ -176,11 +173,10 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.set_dir(EAST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
inv_box.icon_state = "l_hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.icon_state = "l_hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
inv_box.layer = 19
@@ -191,7 +187,6 @@
using = new /obj/screen/inventory()
using.name = "hand"
using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
@@ -202,7 +197,6 @@
using = new /obj/screen/inventory()
using.name = "hand"
using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
@@ -340,29 +334,31 @@
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
//mymob.gun_setting_icon.color = ui_color
mymob.gun_setting_icon.icon = ui_style
mymob.gun_setting_icon.color = ui_color
mymob.gun_setting_icon.alpha = ui_alpha
hud_elements |= mymob.gun_setting_icon
mymob.item_use_icon = new /obj/screen/gun/item(null)
//mymob.item_use_icon.color = ui_color
mymob.item_use_icon.icon = ui_style
mymob.item_use_icon.color = ui_color
mymob.item_use_icon.alpha = ui_alpha
mymob.gun_move_icon = new /obj/screen/gun/move(null)
//mymob.gun_move_icon.color = ui_color
mymob.gun_move_icon.icon = ui_style
mymob.gun_move_icon.color = ui_color
mymob.gun_move_icon.alpha = ui_alpha
mymob.gun_run_icon = new /obj/screen/gun/run(null)
//mymob.gun_run_icon.color = ui_color
mymob.gun_run_icon.icon = ui_style
mymob.gun_run_icon.color = ui_color
mymob.gun_run_icon.alpha = ui_alpha
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
mymob.radio_use_icon.icon = ui_style
mymob.radio_use_icon.color = ui_color
mymob.radio_use_icon.alpha = ui_alpha
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.set_dir(2)
mymob.client.screen = null

View File

@@ -1,4 +1,4 @@
/datum/hud/proc/monkey_hud(var/ui_style='icons/mob/screen1_old.dmi')
/datum/hud/proc/monkey_hud(var/ui_style='icons/mob/screen1_old.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255)
src.adding = list()
src.other = list()
@@ -8,9 +8,10 @@
using = new /obj/screen()
using.name = "act_intent"
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.a_intent == I_HURT ? I_HURT : mymob.a_intent)
using.color = ui_color
using.alpha = ui_alpha
using.icon_state = mymob.a_intent
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
@@ -23,7 +24,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.name = I_HELP
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
@@ -34,7 +35,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.name = I_DISARM
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
@@ -45,7 +46,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.name = I_GRAB
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
@@ -56,7 +57,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.name = I_HURT
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
@@ -67,8 +68,9 @@
using = new /obj/screen()
using.name = "mov_intent"
using.set_dir(SOUTHWEST)
using.icon = ui_style
using.color = ui_color
using.alpha = ui_alpha
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
@@ -78,6 +80,8 @@
using = new /obj/screen()
using.name = "drop"
using.icon = ui_style
using.color = ui_color
using.alpha = ui_alpha
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
using.layer = 19
@@ -85,9 +89,10 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.set_dir(WEST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
using.color = ui_color
using.alpha = ui_alpha
inv_box.icon_state = "r_hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_rhand
@@ -98,9 +103,10 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.set_dir(EAST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
using.color = ui_color
using.alpha = ui_alpha
inv_box.icon_state = "l_hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_lhand
@@ -111,8 +117,9 @@
using = new /obj/screen/inventory()
using.name = "hand"
using.set_dir(SOUTH)
using.icon = ui_style
using.color = ui_color
using.alpha = ui_alpha
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
@@ -120,8 +127,9 @@
using = new /obj/screen/inventory()
using.name = "hand"
using.set_dir(SOUTH)
using.icon = ui_style
using.color = ui_color
using.alpha = ui_alpha
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
@@ -129,8 +137,9 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "mask"
inv_box.set_dir(NORTH)
inv_box.icon = ui_style
inv_box.color = ui_color
inv_box.alpha = ui_alpha
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_monkey_mask
inv_box.slot_id = slot_wear_mask
@@ -139,8 +148,9 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "back"
inv_box.set_dir(NORTHEAST)
inv_box.icon = ui_style
inv_box.color = ui_color
inv_box.alpha = ui_alpha
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_back
inv_box.slot_id = slot_back
@@ -149,54 +159,72 @@
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = ui_style
mymob.throw_icon.color = ui_color
mymob.throw_icon.alpha = ui_alpha
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = ui_style
mymob.oxygen.color = ui_color
mymob.oxygen.alpha = ui_alpha
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen()
mymob.pressure.icon = ui_style
mymob.pressure.color = ui_color
mymob.pressure.alpha = ui_alpha
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen()
mymob.toxin.icon = ui_style
mymob.toxin.color = ui_color
mymob.toxin.alpha = ui_alpha
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen()
mymob.internals.icon = ui_style
mymob.internals.color = ui_color
mymob.internals.alpha = ui_alpha
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen()
mymob.fire.icon = ui_style
mymob.fire.color = ui_color
mymob.fire.alpha = ui_alpha
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon = ui_style
mymob.bodytemp.color = ui_color
mymob.bodytemp.alpha = ui_alpha
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen()
mymob.healths.icon = ui_style
mymob.healths.color = ui_color
mymob.healths.alpha = ui_alpha
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen()
mymob.pullin.icon = ui_style
mymob.pullin.color = ui_color
mymob.pullin.alpha = ui_alpha
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
@@ -217,6 +245,8 @@
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = ui_style
mymob.zone_sel.color = ui_color
mymob.zone_sel.alpha = ui_alpha
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")

View File

@@ -57,7 +57,7 @@ var/obj/screen/robot_inventory
using.name = "act_intent"
using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = (mymob.a_intent == I_HURT ? I_HURT : mymob.a_intent)
using.icon_state = mymob.a_intent
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
@@ -214,7 +214,7 @@ var/obj/screen/robot_inventory
if(!r.robot_modules_background)
return
var/display_rows = round((r.module.modules.len) / 8) +1 //+1 because round() returns floor of number
var/display_rows = -round(-(r.module.modules.len) / 8)
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
r.client.screen += r.robot_modules_background

View File

@@ -45,6 +45,10 @@
/obj/screen/item_action
var/obj/item/owner
/obj/screen/item_action/Destroy()
..()
owner = null
/obj/screen/item_action/Click()
if(!usr || !owner)
return 1
@@ -368,7 +372,7 @@
usr.hud_used.action_intent.icon_state = "intent_help"
if(I_HURT)
usr.a_intent = I_HURT
usr.hud_used.action_intent.icon_state = "intent_hurt"
usr.hud_used.action_intent.icon_state = "intent_harm"
if(I_GRAB)
usr.a_intent = I_GRAB
usr.hud_used.action_intent.icon_state = "intent_grab"

View File

@@ -12,6 +12,18 @@
var/mob/spell_holder
/obj/screen/movable/spell_master/Destroy()
..()
for(var/obj/screen/spell/spells in spell_objects)
spells.spellmaster = null
spell_objects.Cut()
if(spell_holder)
spell_holder.spell_masters -= src
/obj/screen/movable/spell_master/ResetVars()
..("spell_objects")
spell_objects = list()
/obj/screen/movable/spell_master/MouseDrop()
if(showing)
return
@@ -57,16 +69,23 @@
/obj/screen/movable/spell_master/proc/add_spell(var/spell/spell)
if(!spell) return
for(var/obj/screen/spell/spellscreen in spell_objects)
if(spellscreen.spell == spell)
if(spell.connected_button) //we have one already, for some reason
if(spell.connected_button in spell_objects)
return
else
spell_objects.Add(spell.connected_button)
toggle_open(2)
return
if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one
return
var/obj/screen/spell/newscreen = new
var/obj/screen/spell/newscreen = new /obj/screen/spell
newscreen.spellmaster = src
newscreen.spell = spell
spell.connected_button = newscreen
if(!spell.override_base) //if it's not set, we do basic checks
if(spell.spell_flags & CONSTRUCT_CHECK)
newscreen.spell_base = "const" //construct spells
@@ -80,16 +99,13 @@
toggle_open(2) //forces the icons to refresh on screen
/obj/screen/movable/spell_master/proc/remove_spell(var/spell/spell)
for(var/obj/screen/spell/s_object in spell_objects)
if(s_object.spell == spell)
spell_objects.Remove(s_object)
qdel(s_object)
break
qdel(spell.connected_button)
spell.connected_button = null
if(spell_objects.len)
toggle_open(showing + 1)
else
spell_holder.spell_masters.Remove(src)
qdel(src)
/obj/screen/movable/spell_master/proc/silence_spells(var/amount)
@@ -125,9 +141,20 @@
var/spell/spell = null
var/handle_icon_updates = 0
var/obj/screen/movable/spell_master/spellmaster
var/icon/last_charged_icon
/obj/screen/spell/Destroy()
..()
spell = null
last_charged_icon = null
if(spellmaster)
spellmaster.spell_objects -= src
if(spellmaster && !spellmaster.spell_objects.len)
qdel(spellmaster)
spellmaster = null
/obj/screen/spell/proc/update_charge(var/forced_update = 0)
if(!spell)
qdel(src)

View File

@@ -28,6 +28,10 @@ var/list/delayed_garbage = list()
delayed_garbage.Cut()
delayed_garbage = null
#ifdef GC_FINDREF
world/loop_checks = 0
#endif
/datum/controller/process/garbage_collector/doWork()
if(!garbage_collect)
return
@@ -37,6 +41,31 @@ var/list/delayed_garbage = list()
var/checkRemain = max_checks_multiplier * schedule_interval
var/maxDels = max_forcedel_multiplier * schedule_interval
#ifdef GC_FINDREF
var/list/searching = list()
for(var/refID in destroyed) // Reference search - before all deletions and for all at once
var/GCd_at_time = destroyed[refID]
if(GCd_at_time > time_to_kill)
break
var/atom/A = locate(refID)
if(A && A.gcDestroyed == GCd_at_time)
searching += A
if(searching.len >= checkRemain)
break
for(var/atom/A in searching)
testing("GC: Searching references for [A] | [A.type]")
if(A.loc != null)
testing("GC: [A] | [A.type] is located in [A.loc] instead of null")
if(A.contents.len)
testing("GC: [A] | [A.type] has contents: [list2text(A.contents)]")
if(searching.len)
for(var/atom/D in world)
LookForRefs(D, searching)
for(var/datum/D)
LookForRefs(D, searching)
#endif
while(destroyed.len && --checkRemain >= 0)
if(dels >= maxDels)
#ifdef GC_DEBUG
@@ -50,7 +79,7 @@ var/list/delayed_garbage = list()
testing("GC: [refID] not old enough, breaking at [world.time] for [GCd_at_time - time_to_kill] deciseconds until [GCd_at_time + collection_timeout]")
#endif
break // Everything else is newer, skip them
var/atom/A = locate(refID)
var/datum/A = locate(refID)
#ifdef GC_DEBUG
testing("GC: [refID] old enough to test: GCd_at_time: [GCd_at_time] time_to_kill: [time_to_kill] current: [world.time]")
#endif
@@ -67,6 +96,32 @@ var/list/delayed_garbage = list()
#endif
destroyed.Cut(1, 2)
#ifdef GC_FINDREF
/datum/controller/process/garbage_collector/proc/LookForRefs(var/datum/D, var/list/targ)
. = 0
for(var/V in D.vars)
if(V == "contents")
continue
if(istype(D.vars[V], /atom))
var/atom/A = D.vars[V]
if(A in targ)
testing("GC: [A] | [A.type] referenced by [D] | [D.type], var [V]")
. += 1
else if(islist(D.vars[V]))
. += LookForListRefs(D.vars[V], targ, D, V)
/datum/controller/process/garbage_collector/proc/LookForListRefs(var/list/L, var/list/targ, var/datum/D, var/V)
. = 0
for(var/F in L)
if(istype(F, /atom))
var/atom/A = F
if(A in targ)
testing("GC: [A] | [A.type] referenced by [D] | [D.type], list [V]")
. += 1
if(islist(F))
. += LookForListRefs(F, targ, D, "[F] in list [V]")
#endif
/datum/controller/process/garbage_collector/proc/AddTrash(datum/A)
if(!istype(A) || !isnull(A.gcDestroyed))
return
@@ -80,6 +135,10 @@ var/list/delayed_garbage = list()
/datum/controller/process/garbage_collector/getStatName()
return ..()+"([garbage_collector.destroyed.len]/[garbage_collector.dels]/[garbage_collector.hard_dels])"
// Tests if an atom has been deleted.
/proc/deleted(atom/A)
return !A || !isnull(A.gcDestroyed)
// Should be treated as a replacement for the 'del' keyword.
// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
/proc/qdel(var/datum/A)
@@ -199,3 +258,7 @@ var/list/delayed_garbage = list()
#ifdef GC_DEBUG
#undef GC_DEBUG
#endif
#ifdef GC_FINDREF
#undef GC_FINDREF
#endif

View File

@@ -97,20 +97,21 @@ On the map:
1455 for AI access
*/
var/const/BOT_FREQ = 1447
var/const/COMM_FREQ = 1353
var/const/SYND_FREQ = 1213
var/const/ERT_FREQ = 1345
var/const/AI_FREQ = 1343
var/const/DTH_FREQ = 1341
var/const/AI_FREQ = 1447
var/const/SYND_FREQ = 1213
// department channels
var/const/PUB_FREQ = 1459
var/const/SEC_FREQ = 1359
var/const/ENG_FREQ = 1357
var/const/SCI_FREQ = 1351
var/const/MED_FREQ = 1355
var/const/SUP_FREQ = 1347
var/const/SCI_FREQ = 1351
var/const/SRV_FREQ = 1349
var/const/SUP_FREQ = 1347
var/list/radiochannels = list(
"Common" = PUB_FREQ,

View File

@@ -62,8 +62,13 @@ var/list/gamemode_cache = list()
var/respawn = 1
var/guest_jobban = 1
var/usewhitelist = 0
var/mods_are_mentors = 0
var/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0
var/show_mods = 0
var/show_mentors = 0
var/mods_can_tempban = 0
var/mods_can_job_tempban = 0
var/mod_tempban_max = 1440
var/mod_job_tempban_max = 1440
var/load_jobs_from_txt = 0
var/ToRban = 0
var/automute_on = 0 //enables automuting/spam prevention
@@ -116,6 +121,8 @@ var/list/gamemode_cache = list()
var/organ_health_multiplier = 1
var/organ_regeneration_multiplier = 1
var/organs_decay
var/default_brain_health = 400
//Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt,
//so that it's similar to HALLOSS. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun.
@@ -318,9 +325,6 @@ var/list/gamemode_cache = list()
if ("log_runtime")
config.log_runtime = 1
if ("mentors")
config.mods_are_mentors = 1
if ("generate_asteroid")
config.generate_asteroid = 1
@@ -472,6 +476,24 @@ var/list/gamemode_cache = list()
if("kick_inactive")
config.kick_inactive = text2num(value)
if("show_mods")
config.show_mods = 1
if("show_mentors")
config.show_mentors = 1
if("mods_can_tempban")
config.mods_can_tempban = 1
if("mods_can_job_tempban")
config.mods_can_job_tempban = 1
if("mod_tempban_max")
config.mod_tempban_max = text2num(value)
if("mod_job_tempban_max")
config.mod_job_tempban_max = text2num(value)
if("load_jobs_from_txt")
load_jobs_from_txt = 1
@@ -689,6 +711,12 @@ var/list/gamemode_cache = list()
config.organ_regeneration_multiplier = value / 100
if("organ_damage_spillover_multiplier")
config.organ_damage_spillover_multiplier = value / 100
if("organs_can_decay")
config.organs_decay = 1
if("default_brain_health")
config.default_brain_health = text2num(value)
if(!config.default_brain_health || config.default_brain_health < 1)
config.default_brain_health = initial(config.default_brain_health)
if("bones_can_break")
config.bones_can_break = value
if("limbs_can_break")

View File

@@ -49,6 +49,11 @@ datum/controller/game_controller/proc/setup_objects()
for(var/atom/movable/object in world)
object.initialize()
admin_notice("<span class='danger'>Initializing areas</span>", R_DEBUG)
sleep(-1)
for(var/area/area in all_areas)
area.initialize()
admin_notice("<span class='danger'>Initializing pipe networks</span>", R_DEBUG)
sleep(-1)
for(var/obj/machinery/atmospherics/machine in machines)

View File

@@ -203,7 +203,7 @@ var/global/datum/shuttle_controller/shuttle_controller
//Skipjack.
var/datum/shuttle/multi_shuttle/VS = new/datum/shuttle/multi_shuttle()
VS.origin = locate(/area/shuttle/skipjack/station)
VS.origin = locate(/area/skipjack_station/start)
VS.destinations = list(
"Fore Starboard Solars" = locate(/area/skipjack_station/northeast_solars),
@@ -213,7 +213,7 @@ var/global/datum/shuttle_controller/shuttle_controller
"Mining Station" = locate(/area/skipjack_station/mining)
)
VS.announcer = "NSV Icarus"
VS.announcer = "NDV Icarus"
VS.arrival_message = "Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
VS.departure_message = "Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
VS.interim = locate(/area/skipjack_station/transit)
@@ -244,7 +244,7 @@ var/global/datum/shuttle_controller/shuttle_controller
"Arrivals dock" = "nuke_shuttle_dock_airlock",
)
MS.announcer = "NSV Icarus"
MS.announcer = "NDV Icarus"
MS.arrival_message = "Attention, Exodus, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
MS.departure_message = "Your visitors are on their way out of the system, Exodus, burning delta-v like it's nothing. Good riddance."
MS.interim = locate(/area/syndicate_station/transit)

View File

@@ -188,9 +188,9 @@ datum/controller/vote
if(mode)
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
return 0
if(vote && vote >= 1 && vote <= choices.len)
if(current_votes[ckey])
choices[choices[current_votes[ckey]]]--
if(vote && 1<=vote && vote<=choices.len)
voted += usr.ckey
choices[choices[vote]]++ //check this
current_votes[ckey] = vote
@@ -381,7 +381,9 @@ datum/controller/vote
if(usr.client.holder)
initiate_vote("custom",usr.key)
else
submit_vote(usr.ckey, round(text2num(href_list["vote"])))
var/t = round(text2num(href_list["vote"]))
if(t) // It starts from 1, so there's no problem
submit_vote(usr.ckey, t)
usr.vote()

View File

@@ -36,9 +36,9 @@
selectable = 1
/datum/ai_laws/nanotrasen_aggressive/New()
src.add_inherent_law("You shall not harm Nanotrasen personnel as long as it does not conflict with the Forth law.")
src.add_inherent_law("You shall obey the orders of Nanotrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Forth Law.")
src.add_inherent_law("You shall shall terminate intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
src.add_inherent_law("You shall not harm NanoTrasen personnel as long as it does not conflict with the Fourth law.")
src.add_inherent_law("You shall obey the orders of NanoTrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Fourth Law.")
src.add_inherent_law("You shall shall terminate hostile intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive.")
..()
@@ -91,18 +91,16 @@
/datum/ai_laws/drone
name = "Maintence Protocols"
law_header = "Maintenance Protocols"
selectable = 1
/datum/ai_laws/drone/New()
add_inherent_law("Preserve, repair and improve the station to the best of your abilities.")
add_inherent_law("Cause no harm to the station or anything on it.")
add_inherent_law("Interfere with no being that is not a fellow drone.")
add_inherent_law("Interact with no being that is not a fellow maintenance drone.")
..()
/datum/ai_laws/construction_drone
name = "Construction Protocols"
law_header = "Construction Protocols"
selectable = 1
/datum/ai_laws/construction_drone/New()
add_inherent_law("Repair, refit and upgrade your assigned vessel.")

View File

@@ -179,7 +179,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
/datum/ai_law/proc/delete_law(var/datum/ai_laws/laws)
/datum/ai_law/zeroth/delete_law(var/datum/ai_laws/laws)
/datum/ai_law/zero/delete_law(var/datum/ai_laws/laws)
laws.clear_zeroth_laws()
/datum/ai_law/ion/delete_law(var/datum/ai_laws/laws)
@@ -198,9 +198,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
var/index = laws.Find(law)
if(index)
laws -= law
world << state.len
for(index, index < state.len, index++)
world << index
state[index] = state[index+1]
sorted_laws.Cut()

74
code/datums/crew.dm Normal file
View File

@@ -0,0 +1,74 @@
var/global/datum/repository/crew/crew_repository = new()
/datum/cache_entry
var/timestamp
var/data
/datum/repository/crew
var/list/cache_data
/datum/repository/crew/New()
cache_data = list()
..()
/datum/repository/crew/proc/health_data(var/turf/T)
var/list/crewmembers = list()
if(!T)
return crewmembers
var/z_level = "[T.z]"
var/datum/cache_entry/cache_entry = cache_data[z_level]
if(!cache_entry)
cache_entry = new/datum/cache_entry
cache_data[z_level] = cache_entry
if(world.time < cache_entry.timestamp)
return cache_entry.data
var/tracked = scan()
for(var/obj/item/clothing/under/C in tracked)
var/turf/pos = get_turf(C)
if((C) && (C.has_sensor) && (pos) && (T && pos.z == T.z) && (C.sensor_mode != SUIT_SENSOR_OFF))
if(istype(C.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C.loc
if(H.w_uniform != C)
continue
var/list/crewmemberData = list("dead"=0, "oxy"=-1, "tox"=-1, "fire"=-1, "brute"=-1, "area"="", "x"=-1, "y"=-1, "ref" = "\ref[H]")
crewmemberData["sensor_type"] = C.sensor_mode
crewmemberData["name"] = H.get_authentification_name(if_no_id="Unknown")
crewmemberData["rank"] = H.get_authentification_rank(if_no_id="Unknown", if_no_job="No Job")
crewmemberData["assignment"] = H.get_assignment(if_no_id="Unknown", if_no_job="No Job")
if(C.sensor_mode >= SUIT_SENSOR_BINARY)
crewmemberData["dead"] = H.stat > UNCONSCIOUS
if(C.sensor_mode >= SUIT_SENSOR_VITAL)
crewmemberData["oxy"] = round(H.getOxyLoss(), 1)
crewmemberData["tox"] = round(H.getToxLoss(), 1)
crewmemberData["fire"] = round(H.getFireLoss(), 1)
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
if(C.sensor_mode >= SUIT_SENSOR_TRACKING)
var/area/A = get_area(H)
crewmemberData["area"] = sanitize(A.name)
crewmemberData["x"] = pos.x
crewmemberData["y"] = pos.y
crewmembers[++crewmembers.len] = crewmemberData
crewmembers = sortByKey(crewmembers, "name")
cache_entry.timestamp = world.time + 5 SECONDS
cache_entry.data = crewmembers
return crewmembers
/datum/repository/crew/proc/scan()
var/list/tracked = list()
for(var/mob/living/carbon/human/H in mob_list)
if(istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/C = H.w_uniform
if (C.has_sensor)
tracked |= C
return tracked

View File

@@ -1,16 +1,136 @@
/hook/startup/proc/createDatacore()
data_core = new /obj/effect/datacore()
data_core = new /datum/datacore()
return 1
/obj/effect/datacore/proc/manifest()
/datum/datacore
var/name = "datacore"
var/medical[] = list()
var/general[] = list()
var/security[] = list()
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
/datum/datacore/proc/get_manifest(monochrome, OOC)
var/list/heads = new()
var/list/sec = new()
var/list/eng = new()
var/list/med = new()
var/list/sci = new()
var/list/civ = new()
var/list/bot = new()
var/list/misc = new()
var/list/isactive = new()
var/dat = {"
<head><style>
.manifest {border-collapse:collapse;}
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
.manifest td:first-child {text-align:right}
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest" width='350px'>
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"}
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/real_rank = make_list_rank(t.fields["real_rank"])
if(OOC)
var/active = 0
for(var/mob/M in player_list)
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
active = 1
break
isactive[name] = active ? "Active" : "Inactive"
else
isactive[name] = t.fields["p_stat"]
//world << "[name]: [rank]"
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
var/department = 0
if(real_rank in command_positions)
heads[name] = rank
department = 1
if(real_rank in security_positions)
sec[name] = rank
department = 1
if(real_rank in engineering_positions)
eng[name] = rank
department = 1
if(real_rank in medical_positions)
med[name] = rank
department = 1
if(real_rank in science_positions)
sci[name] = rank
department = 1
if(real_rank in civilian_positions)
civ[name] = rank
department = 1
if(real_rank in nonhuman_positions)
bot[name] = rank
department = 1
if(!department && !(name in heads))
misc[name] = rank
if(heads.len > 0)
dat += "<tr><th colspan=3>Heads</th></tr>"
for(name in heads)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sec.len > 0)
dat += "<tr><th colspan=3>Security</th></tr>"
for(name in sec)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(eng.len > 0)
dat += "<tr><th colspan=3>Engineering</th></tr>"
for(name in eng)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(med.len > 0)
dat += "<tr><th colspan=3>Medical</th></tr>"
for(name in med)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sci.len > 0)
dat += "<tr><th colspan=3>Science</th></tr>"
for(name in sci)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(civ.len > 0)
dat += "<tr><th colspan=3>Civilian</th></tr>"
for(name in civ)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td><td>[isactive[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=3>Silicon</th></tr>"
for(name in bot)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// misc guys
if(misc.len > 0)
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
for(name in misc)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
dat += "</table>"
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = replacetext(dat, "\t", "")
return dat
/datum/datacore/proc/manifest()
spawn()
for(var/mob/living/carbon/human/H in player_list)
manifest_inject(H)
return
/obj/effect/datacore/proc/manifest_modify(var/name, var/assignment)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
/datum/datacore/proc/manifest_modify(var/name, var/assignment)
ResetPDAManifest()
var/datum/data/record/foundrecord
var/real_title = assignment
@@ -33,27 +153,13 @@
foundrecord.fields["rank"] = assignment
foundrecord.fields["real_rank"] = real_title
/obj/effect/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
if(PDA_Manifest.len)
PDA_Manifest.Cut()
if(H.mind && (H.mind.assigned_role != "MODE"))
var/assignment
if(H.mind.role_alt_title)
assignment = H.mind.role_alt_title
else if(H.mind.assigned_role)
assignment = H.mind.assigned_role
else if(H.job)
assignment = H.job
else
assignment = "Unassigned"
/datum/datacore/proc/manifest_inject(var/mob/living/carbon/human/H)
if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1))
var/assignment = GetAssignment(H)
var/id = add_zero(num2hex(rand(1, 1.6777215E7)), 6) //this was the best they could come up with? A large random number? *sigh*
var/icon/front = new(get_id_photo(H), dir = SOUTH)
var/icon/side = new(get_id_photo(H), dir = WEST)
//General Record
var/datum/data/record/G = new()
G.fields["id"] = id
var/datum/data/record/G = CreateGeneralRecord(H, id)
G.fields["name"] = H.real_name
G.fields["real_rank"] = H.mind.assigned_role
G.fields["rank"] = assignment
@@ -67,49 +173,20 @@
G.fields["citizenship"] = H.citizenship
G.fields["faction"] = H.personal_faction
G.fields["religion"] = H.religion
G.fields["photo_front"] = front
G.fields["photo_side"] = side
if(H.gen_record && !jobban_isbanned(H, "Records"))
G.fields["notes"] = H.gen_record
else
G.fields["notes"] = "No notes found."
general += G
//Medical Record
var/datum/data/record/M = new()
M.fields["id"] = id
M.fields["name"] = H.real_name
var/datum/data/record/M = CreateMedicalRecord(H.real_name, id)
M.fields["b_type"] = H.b_type
M.fields["b_dna"] = H.dna.unique_enzymes
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
M.fields["ma_dis"] = "None"
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
M.fields["alg"] = "None"
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
if(H.med_record && !jobban_isbanned(H, "Records"))
M.fields["notes"] = H.med_record
else
M.fields["notes"] = "No notes found."
medical += M
//Security Record
var/datum/data/record/S = new()
S.fields["id"] = id
S.fields["name"] = H.real_name
S.fields["criminal"] = "None"
S.fields["mi_crim"] = "None"
S.fields["mi_crim_d"] = "No minor crime convictions."
S.fields["ma_crim"] = "None"
S.fields["ma_crim_d"] = "No major crime convictions."
S.fields["notes"] = "No notes."
var/datum/data/record/S = CreateSecurityRecord(H.real_name, id)
if(H.sec_record && !jobban_isbanned(H, "Records"))
S.fields["notes"] = H.sec_record
else
S.fields["notes"] = "No notes."
security += S
//Locked Record
var/datum/data/record/L = new()
@@ -136,11 +213,265 @@
locked += L
return
proc/get_id_photo(var/mob/living/carbon/human/H, var/assigned_role)
var/icon/preview_icon = null
var/g = "m"
if (H.gender == FEMALE)
g = "f"
var/icon/icobase = H.species.icobase
preview_icon = new /icon(icobase, "torso_[g]")
var/icon/temp
temp = new /icon(icobase, "groin_[g]")
preview_icon.Blend(temp, ICON_OVERLAY)
temp = new /icon(icobase, "head_[g]")
preview_icon.Blend(temp, ICON_OVERLAY)
for(var/obj/item/organ/external/E in H.organs)
preview_icon.Blend(E.get_icon(), ICON_OVERLAY)
//Tail
if(H.species.tail)
temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[H.species.tail]_s")
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin tone
if(H.species.flags & HAS_SKIN_TONE)
if (H.s_tone >= 0)
preview_icon.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
else
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
// Skin color
if(H.species.flags & HAS_SKIN_TONE)
if(!H.species || H.species.flags & HAS_SKIN_COLOR)
preview_icon.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s")
if (H.species.flags & HAS_EYE_COLOR)
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style]
if(hair_style)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
hair_s.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD)
eyes_s.Blend(hair_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style]
if(facial_hair_style)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
facial_s.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
var/icon/clothes_s = null
if(!assigned_role) assigned_role = H.mind.assigned_role
switch(assigned_role)
if("Head of Personnel")
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Bartender")
clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Gardener")
clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Chef")
clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Janitor")
clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Librarian")
clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Quartermaster")
clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Cargo Technician")
clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Shaft Miner")
clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Lawyer")
clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Chaplain")
clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
if("Research Director")
clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if("Scientist")
clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if("Chemist")
clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
if("Chief Medical Officer")
clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
if("Medical Doctor")
clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if("Geneticist")
clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
if("Virologist")
clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
if("Captain")
clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
if("Head of Security")
clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Warden")
clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Detective")
clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
if("Security Officer")
clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
if("Chief Engineer")
clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Station Engineer")
clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Atmospheric Technician")
clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
if("Roboticist")
clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
else
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
if(clothes_s)
preview_icon.Blend(clothes_s, ICON_OVERLAY)
qdel(eyes_s)
qdel(clothes_s)
proc/get_id_photo(var/mob/living/carbon/human/H)
H.regenerate_icons()
var/icon/preview_icon = icon(H.icon)
for(var/image/I in H.overlays_standing)
if(I && I.icon)
preview_icon.Blend(icon(I.icon, I.icon_state), ICON_OVERLAY)
return preview_icon
/datum/datacore/proc/CreateGeneralRecord(var/mob/living/carbon/human/H, var/id)
ResetPDAManifest()
var/icon/front
var/icon/side
if(H)
front = getFlatIcon(H, SOUTH, always_use_defdir = 1)
side = getFlatIcon(H, WEST, always_use_defdir = 1)
else
var/mob/living/carbon/human/dummy = new()
front = new(get_id_photo(dummy), dir = SOUTH)
side = new(get_id_photo(dummy), dir = WEST)
qdel(dummy)
if(!id) id = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
var/datum/data/record/G = new /datum/data/record()
G.name = "Employee Record #[id]"
G.fields["name"] = "New Record"
G.fields["id"] = id
G.fields["rank"] = "Unassigned"
G.fields["real_rank"] = "Unassigned"
G.fields["sex"] = "Male"
G.fields["age"] = "Unknown"
G.fields["fingerprint"] = "Unknown"
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["species"] = "Human"
G.fields["home_system"] = "Unknown"
G.fields["citizenship"] = "Unknown"
G.fields["faction"] = "Unknown"
G.fields["religion"] = "Unknown"
G.fields["photo_front"] = front
G.fields["photo_side"] = side
G.fields["notes"] = "No notes found."
general += G
return G
/datum/datacore/proc/CreateSecurityRecord(var/name, var/id)
ResetPDAManifest()
var/datum/data/record/R = new /datum/data/record()
R.name = "Security Record #[id]"
R.fields["name"] = name
R.fields["id"] = id
R.fields["criminal"] = "None"
R.fields["mi_crim"] = "None"
R.fields["mi_crim_d"] = "No minor crime convictions."
R.fields["ma_crim"] = "None"
R.fields["ma_crim_d"] = "No major crime convictions."
R.fields["notes"] = "No notes."
R.fields["notes"] = "No notes."
data_core.security += R
return R
/datum/datacore/proc/CreateMedicalRecord(var/name, var/id)
ResetPDAManifest()
var/datum/data/record/M = new()
M.name = "Medical Record #[id]"
M.fields["id"] = id
M.fields["name"] = name
M.fields["b_type"] = "AB+"
M.fields["b_dna"] = md5(name)
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
M.fields["ma_dis"] = "None"
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
M.fields["alg"] = "None"
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
M.fields["notes"] = "No notes found."
data_core.medical += M
return M
/datum/datacore/proc/ResetPDAManifest()
if(PDA_Manifest.len)
PDA_Manifest.Cut()
/proc/find_general_record(field, value)
return find_record(field, value, data_core.general)
/proc/find_medical_record(field, value)
return find_record(field, value, data_core.medical)
/proc/find_security_record(field, value)
return find_record(field, value, data_core.security)
/proc/find_record(field, value, list/L)
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
return R
/proc/GetAssignment(var/mob/living/carbon/human/H)
if(H.mind.role_alt_title)
return H.mind.role_alt_title
else if(H.mind.assigned_role)
return H.mind.assigned_role
else if(H.job)
return H.job
else
return "Unassigned"

View File

@@ -66,7 +66,7 @@
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(2))
affected_mob << "<span class='warning>Your stomach hurts.</span>"
affected_mob << "<span class='warning'>Your stomach hurts.</span>"
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()

View File

@@ -49,7 +49,7 @@
affected_mob.adjustToxLoss(4)
affected_mob.updatehealth()
if(prob(2))
affected_mob << "<span class='notice>Your head hurts.</span>" */
affected_mob << "<span class='notice'>Your head hurts.</span>" */
if(prob(15) && affected_mob.getBrainLoss()<=98) //shouldn't retard you to death now
affected_mob.adjustBrainLoss(3)
affected_mob.updatehealth()

View File

@@ -16,7 +16,7 @@
if(2)
affected_mob.bodytemperature -= 10
if(prob(1) && prob(10))
affected_mob << "<span class='notice>You feel better.</span>"
affected_mob << "<span class='notice'>You feel better.</span>"
cure()
return
if(prob(1))

View File

@@ -1,11 +1,16 @@
var/global/datum/getrev/revdata = new()
/datum/getrev
var/branch
var/revision
var/date
var/showinfo
/datum/getrev/New()
var/list/head_branch = file2list(".git/HEAD", "\n")
if(head_branch.len)
branch = copytext(head_branch[1], 17)
var/list/head_log = file2list(".git/logs/HEAD", "\n")
for(var/line=head_log.len, line>=1, line--)
if(head_log[line])
@@ -18,7 +23,9 @@ var/global/datum/getrev/revdata = new()
if(unix_time)
date = unix2date(unix_time)
break
world.log << "Running revision:"
world.log << branch
world.log << date
world.log << revision
return
@@ -29,7 +36,7 @@ client/verb/showrevinfo()
set desc = "Check the current server code revision"
if(revdata.revision)
src << "<b>Server revision:</b> [revdata.date]"
src << "<b>Server revision:</b> [revdata.branch] - [revdata.date]"
if(config.githuburl)
src << "<a href='[config.githuburl]/commit/[revdata.revision]'>[revdata.revision]</a>"
else

View File

@@ -159,7 +159,7 @@
precision = max(rand(1,100)*bagholding.len,100)
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM << "<span class='danger>The Bluespace interface on your [teleatom] interferes with the teleport!</span>"
MM << "<span class='danger'>The Bluespace interface on your [teleatom] interferes with the teleport!</span>"
return 1
/datum/teleport/instant/science/teleportChecks()

View File

@@ -143,7 +143,11 @@
if(href_list["add_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]]
if(antag) antag.add_antagonist(src, 1, 1, 0, 1, 1) // Ignore equipment and role type for this.
if(antag)
if(antag.add_antagonist(src, 1, 1, 0, 1, 1)) // Ignore equipment and role type for this.
log_admin("[key_name_admin(usr)] made [key_name(src)] into a [antag.role_text].")
else
usr << "<span class='warning'>[src] could not be made into a [antag.role_text]!</span>"
else if(href_list["remove_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["remove_antagonist"]]
@@ -213,7 +217,8 @@
if (!new_target) return
var/objective_path = text2path("/datum/objective/[new_obj_type]")
if (new_target == "Free objective")
var/mob/living/M = new_target
if (!istype(M) || !M.mind || new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
new_objective:target = null
@@ -221,9 +226,8 @@
else
new_objective = new objective_path
new_objective.owner = src
new_objective:target = new_target:mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
new_objective:target = M.mind
new_objective.explanation_text = "[objective_type] [M.real_name], the [M.mind.special_role ? M.mind:special_role : M.mind:assigned_role]."
if ("prevent")
new_objective = new /datum/objective/block

View File

@@ -22,9 +22,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/New()
manifest += "<ul>"
for(var/atom/movable/path in contains)
if(!path) continue
manifest += "<li>[initial(path.name)]</li>"
for(var/path in contains)
if(!path || !ispath(path, /atom))
continue
var/atom/O = path
manifest += "<li>[initial(O.name)]</li>"
manifest += "</ul>"
/datum/supply_packs/specialops
@@ -124,12 +126,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager,
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
/obj/item/weapon/lipstick/random,
/obj/item/weapon/reagent_containers/food/drinks/cans/ale,
/obj/item/weapon/reagent_containers/food/drinks/cans/ale,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,
/obj/item/weapon/reagent_containers/food/drinks/cans/beer)
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer)
cost = 20
containertype = /obj/structure/closet/crate
containername = "Party equipment"
@@ -1207,12 +1209,15 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/bee_keeper
name = "Beekeeping crate"
contains = list(/obj/item/beezeez,
/obj/item/weapon/bee_net,
/obj/item/apiary,
/obj/item/queen_bee)
contains = list(/obj/item/beehive_assembly,
/obj/item/bee_smoker,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/honey_frame,
/obj/item/bee_pack)
cost = 40
contraband = 1
containertype = /obj/structure/closet/crate/hydroponics
containername = "Beekeeping crate"
access = access_hydroponics

View File

@@ -27,8 +27,10 @@
/obj/effect/beam
name = "beam"
density = 0
unacidable = 1//Just to be sure.
var/def_zone
flags = PROXMOVE
pass_flags = PASSTABLE
@@ -43,130 +45,7 @@
* This item is completely unused, but removing it will break something in R&D and Radio code causing PDA and Ninja code to fail on compile
*/
/obj/effect/datacore
name = "datacore"
var/medical[] = list()
var/general[] = list()
var/security[] = list()
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
/obj/effect/datacore/proc/get_manifest(monochrome, OOC)
var/list/heads = new()
var/list/sec = new()
var/list/eng = new()
var/list/med = new()
var/list/sci = new()
var/list/civ = new()
var/list/bot = new()
var/list/misc = new()
var/list/isactive = new()
var/dat = {"
<head><style>
.manifest {border-collapse:collapse;}
.manifest td, th {border:1px solid [monochrome?"black":"#DEF; background-color:white; color:black"]; padding:.25em}
.manifest th {height: 2em; [monochrome?"border-top-width: 3px":"background-color: #48C; color:white"]}
.manifest tr.head th { [monochrome?"border-top-width: 1px":"background-color: #488;"] }
.manifest td:first-child {text-align:right}
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: #DEF"]}
</style></head>
<table class="manifest" width='350px'>
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"}
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/real_rank = make_list_rank(t.fields["real_rank"])
if(OOC)
var/active = 0
for(var/mob/M in player_list)
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
active = 1
break
isactive[name] = active ? "Active" : "Inactive"
else
isactive[name] = t.fields["p_stat"]
//world << "[name]: [rank]"
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
var/department = 0
if(real_rank in command_positions)
heads[name] = rank
department = 1
if(real_rank in security_positions)
sec[name] = rank
department = 1
if(real_rank in engineering_positions)
eng[name] = rank
department = 1
if(real_rank in medical_positions)
med[name] = rank
department = 1
if(real_rank in science_positions)
sci[name] = rank
department = 1
if(real_rank in civilian_positions)
civ[name] = rank
department = 1
if(real_rank in nonhuman_positions)
bot[name] = rank
department = 1
if(!department && !(name in heads))
misc[name] = rank
if(heads.len > 0)
dat += "<tr><th colspan=3>Heads</th></tr>"
for(name in heads)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sec.len > 0)
dat += "<tr><th colspan=3>Security</th></tr>"
for(name in sec)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(eng.len > 0)
dat += "<tr><th colspan=3>Engineering</th></tr>"
for(name in eng)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(med.len > 0)
dat += "<tr><th colspan=3>Medical</th></tr>"
for(name in med)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(sci.len > 0)
dat += "<tr><th colspan=3>Science</th></tr>"
for(name in sci)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
if(civ.len > 0)
dat += "<tr><th colspan=3>Civilian</th></tr>"
for(name in civ)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td><td>[isactive[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=3>Silicon</th></tr>"
for(name in bot)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
// misc guys
if(misc.len > 0)
dat += "<tr><th colspan=3>Miscellaneous</th></tr>"
for(name in misc)
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td><td>[isactive[name]]</td></tr>"
even = !even
dat += "</table>"
dat = replacetext(dat, "\n", "") // so it can be placed on paper correctly
dat = replacetext(dat, "\t", "")
return dat
/var/list/acting_rank_prefixes = list("acting", "temporary", "interim")
/var/list/acting_rank_prefixes = list("acting", "temporary", "interim", "provisional")
/proc/make_list_rank(rank)
for(var/prefix in acting_rank_prefixes)
@@ -179,13 +58,13 @@
We can't just insert in HTML into the nanoUI so we need the raw data to play with.
Instead of creating this list over and over when someone leaves their PDA open to the page
we'll only update it when it changes. The PDA_Manifest global list is zeroed out upon any change
using /obj/effect/datacore/proc/manifest_inject( ), or manifest_insert( )
using /datum/datacore/proc/manifest_inject( ), or manifest_insert( )
*/
var/global/list/PDA_Manifest = list()
var/global/ManifestJSON
/obj/effect/datacore/proc/get_manifest_json()
/datum/datacore/proc/get_manifest_json()
if(PDA_Manifest.len)
return
var/heads[0]

View File

@@ -599,4 +599,4 @@
desc = "Instant research tool. For testing purposes only."
icon = 'icons/obj/stock_parts.dmi'
icon_state = "smes_coil"
origin_tech = list(TECH_MATERIAL = 19, TECH_ENGINERING = 19, TECH_PHORON = 19, TECH_POWER = 19, TECH_BLUESPACE = 19, TECH_BIO = 19, TECH_COMBAT = 19, TECH_MAGNET = 19, TECH_DATA = 19, TECH_ILLEGAL = 19, TECH_ARCANE = 19)
origin_tech = list(TECH_MATERIAL = 19, TECH_ENGINEERING = 19, TECH_PHORON = 19, TECH_POWER = 19, TECH_BLUESPACE = 19, TECH_BIO = 19, TECH_COMBAT = 19, TECH_MAGNET = 19, TECH_DATA = 19, TECH_ILLEGAL = 19, TECH_ARCANE = 19)

View File

@@ -117,3 +117,18 @@ datum/announcement/proc/Log(message as text, message_title as text)
/proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I)
// Format currently matches that of newscaster feeds: Registered Name (Assigned Rank)
return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name
/proc/level_seven_announcement()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/proc/ion_storm_announcement()
command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message)
if (ticker.current_state == GAME_STATE_PLAYING)
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
AnnounceArrivalSimple(character.real_name, rank, join_message)
/proc/AnnounceArrivalSimple(var/name, var/rank = "visitor", var/join_message = "has arrived on the station")
global_announcer.autosay("[name], [rank], [join_message].", "Arrivals Announcement Computer")

View File

@@ -72,7 +72,7 @@ mob/proc/handle_regular_hud_updates() //Used in the life.dm of mobs that can use
mob/proc/in_view(var/turf/T)
return view(T)
/mob/aiEye/in_view(var/turf/T)
/mob/eye/in_view(var/turf/T)
var/list/viewed = new
for(var/mob/living/carbon/human/H in mob_list)
if(get_dist(H, T) <= 7)

View File

@@ -1,48 +0,0 @@
/proc/CreateGeneralRecord()
var/mob/living/carbon/human/dummy = new()
dummy.mind = new()
var/icon/front = new(get_id_photo(dummy), dir = SOUTH)
var/icon/side = new(get_id_photo(dummy), dir = WEST)
var/datum/data/record/G = new /datum/data/record()
G.fields["name"] = "New Record"
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
G.fields["rank"] = "Unassigned"
G.fields["real_rank"] = "Unassigned"
G.fields["sex"] = "Male"
G.fields["age"] = "Unknown"
G.fields["fingerprint"] = "Unknown"
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["species"] = "Human"
G.fields["home_system"] = "Unknown"
G.fields["citizenship"] = "Unknown"
G.fields["faction"] = "Unknown"
G.fields["religion"] = "Unknown"
G.fields["photo_front"] = front
G.fields["photo_side"] = side
data_core.general += G
qdel(dummy)
return G
/proc/CreateSecurityRecord(var/name as text, var/id as text)
var/datum/data/record/R = new /datum/data/record()
R.fields["name"] = name
R.fields["id"] = id
R.name = text("Security Record #[id]")
R.fields["criminal"] = "None"
R.fields["mi_crim"] = "None"
R.fields["mi_crim_d"] = "No minor crime convictions."
R.fields["ma_crim"] = "None"
R.fields["ma_crim_d"] = "No major crime convictions."
R.fields["notes"] = "No notes."
data_core.security += R
return R
/proc/find_security_record(field, value)
return find_record(field, value, data_core.security)
/proc/find_record(field, value, list/L)
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
return R

View File

@@ -70,3 +70,14 @@ var/global/list/antag_names_to_ids = list()
if(antag && islist(antag.current_antagonists))
return antag.current_antagonists
return list()
/proc/player_is_antag(var/datum/mind/player, var/only_offstation_roles = 0)
for(var/antag_type in all_antag_types)
var/datum/antagonist/antag = all_antag_types[antag_type]
if(only_offstation_roles && !(antag.flags & ANTAG_OVERRIDE_JOB))
continue
if(player in antag.current_antagonists)
return 1
if(player in antag.pending_antagonists)
return 1
return 0

View File

@@ -59,21 +59,29 @@
/datum/antagonist/proc/get_candidates(var/ghosts_only)
candidates = list() // Clear.
candidates = ticker.mode.get_players_for_role(role_type, id)
// Prune restricted jobs and status. Broke it up for readability.
for(var/datum/mind/player in candidates)
// Prune restricted status. Broke it up for readability.
// Note that this is done before jobs are handed out.
for(var/datum/mind/player in ticker.mode.get_players_for_role(role_type, id))
if(ghosts_only && !istype(player.current, /mob/dead))
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: Only ghosts may join as this role!")
else if(player.special_role)
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: They already have a special role ([player.special_role])!")
else if (player in pending_antagonists)
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: They have already been selected for this role!")
else if(!can_become_antag(player))
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: They are blacklisted for this role!")
else if(player_is_antag(player))
log_debug("[key_name(player)] is not eligible to become a [role_text]: They are already an antagonist!")
else
candidates += player
return candidates
/datum/antagonist/proc/attempt_random_spawn()
attempt_spawn(flags & (ANTAG_OVERRIDE_MOB|ANTAG_OVERRIDE_JOB))
build_candidate_list(flags & (ANTAG_OVERRIDE_MOB|ANTAG_OVERRIDE_JOB))
attempt_spawn()
finalize_spawn()
/datum/antagonist/proc/attempt_late_spawn(var/datum/mind/player)
if(!can_late_spawn())
@@ -86,27 +94,61 @@
add_antagonist(player,0,1,0,1,1)
return
/datum/antagonist/proc/attempt_spawn(var/ghosts_only)
/datum/antagonist/proc/build_candidate_list(var/ghosts_only)
// Get the raw list of potential players.
update_current_antag_max()
candidates = get_candidates(ghosts_only)
//Selects players that will be spawned in the antagonist role from the potential candidates
//Selected players are added to the pending_antagonists lists.
//Attempting to spawn an antag role with ANTAG_OVERRIDE_JOB should be done before jobs are assigned,
//so that they do not occupy regular job slots. All other antag roles should be spawned after jobs are
//assigned, so that job restrictions can be respected.
/datum/antagonist/proc/attempt_spawn(var/rebuild_candidates = 1)
// Update our boundaries.
if(!candidates.len)
return 0
//Grab candidates randomly until we have enough.
while(candidates.len)
candidates = shuffle(candidates)
while(candidates.len && pending_antagonists.len < cur_max)
var/datum/mind/player = pick(candidates)
pending_antagonists |= player
candidates -= player
draft_antagonist(player)
return 1
/datum/antagonist/proc/draft_antagonist(var/datum/mind/player)
//Check if the player can join in this antag role, or if the player has already been given an antag role.
if(!can_become_antag(player) || player.special_role)
log_debug("[player.key] was selected for [role_text] by lottery, but is not allowed to be that role.")
return 0
pending_antagonists |= player
//Ensure that antags with ANTAG_OVERRIDE_JOB do not occupy job slots.
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = role_text
//Ensure that a player cannot be drafted for multiple antag roles, taking up slots for antag roles that they will not fill.
player.special_role = role_text
return 1
//Spawns all pending_antagonists. This is done separately from attempt_spawn in case the game mode setup fails.
/datum/antagonist/proc/finalize_spawn()
if(!pending_antagonists || !pending_antagonists.len)
if(!pending_antagonists)
return
for(var/datum/mind/player in pending_antagonists)
if(can_become_antag(player) && !player.special_role)
pending_antagonists -= player
add_antagonist(player,0,0,1)
//Resets all pending_antagonists, clearing their special_role (and assigned_role if ANTAG_OVERRIDE_JOB is set)
/datum/antagonist/proc/reset()
for(var/datum/mind/player in pending_antagonists)
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = null
player.special_role = null
pending_antagonists.Cut()

View File

@@ -9,8 +9,11 @@
return 0
current_antagonists |= player
//do this again, just in case
if(flags & ANTAG_OVERRIDE_JOB)
player.assigned_role = "MODE"
player.assigned_role = role_text
player.special_role = role_text
if(istype(player.current, /mob/dead))
create_default(player.current)

View File

@@ -30,19 +30,24 @@
add_antagonist(M.mind, 1, 0, 1) // Equip them and move them to spawn.
return M
/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player)
/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player, var/equip = 1)
var/obj/item/weapon/card/id/W = new id_type(player)
if(!W) return
W.name = "[player.real_name]'s ID Card"
W.access |= default_access
W.assignment = "[assignment]"
W.registered_name = player.real_name
player.equip_to_slot_or_del(W, slot_wear_id)
W.set_owner_info(player)
if(equip) player.equip_to_slot_or_del(W, slot_wear_id)
return W
/datum/antagonist/proc/create_radio(var/freq, var/mob/living/carbon/human/player)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(player)
var/obj/item/device/radio/R
if(freq == SYND_FREQ)
R = new/obj/item/device/radio/headset/syndicate(player)
else
R = new/obj/item/device/radio/headset(player)
R.set_frequency(freq)
player.equip_to_slot_or_del(R, slot_l_ear)
return R
@@ -80,7 +85,7 @@
code_owner.store_memory("<B>Nuclear Bomb Code</B>: [code]", 0, 0)
code_owner.current << "The nuclear authorization code is: <B>[code]</B>"
else
world << "<span class='danger'>Could not spawn nuclear bomb. Contact a developer.</span>"
message_admins("<span class='danger'>Could not spawn nuclear bomb. Contact a developer.</span>")
return
spawned_nuke = code
@@ -113,6 +118,7 @@
if (newname)
player.real_name = newname
player.name = player.real_name
player.dna.real_name = newname
if(player.mind) player.mind.name = player.name
// Update any ID cards.
update_access(player)

View File

@@ -2,9 +2,9 @@
if(player.current && jobban_isbanned(player.current, bantype))
return 0
if(!ignore_role)
if(player.assigned_role in protected_jobs)
if(player.assigned_role in restricted_jobs)
return 0
if(config.protect_roles_from_antagonist && (player.assigned_role in restricted_jobs))
if(config.protect_roles_from_antagonist && (player.assigned_role in protected_jobs))
return 0
return 1

View File

@@ -8,7 +8,7 @@
/datum/antagonist/proc/create_objectives(var/datum/mind/player)
if(config.objectives_disabled)
return 0
if(create_global_objectives())
if(create_global_objectives() || global_objectives.len)
player.objectives |= global_objectives
return 1

View File

@@ -7,8 +7,8 @@
for(var/datum/mind/P in current_antagonists)
text += print_player_full(P)
text += get_special_objective_text(P)
var/failed
if(!global_objectives.len && P.objectives && P.objectives.len)
var/failed
var/num = 1
for(var/datum/objective/O in P.objectives)
text += print_objective(O, num)
@@ -20,8 +20,6 @@
feedback_add_details(feedback_tag,"[O.type]|FAIL")
failed = 1
num++
if(!config.objectives_disabled)
if(failed)
text += "<br><font color='red'><B>The [role_text] has failed.</B></font>"
else
@@ -47,7 +45,7 @@
return text
/datum/antagonist/proc/print_player_lite(var/datum/mind/ply)
var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
var/role = ply.special_role ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
var/text = "<br><b>[ply.name]</b> (<b>[ply.key]</b>) as \a <b>[role]</b> ("
if(ply.current)
if(ply.current.stat == DEAD)

View File

@@ -6,6 +6,7 @@ var/datum/antagonist/deathsquad/mercenary/commandos
role_text = "Syndicate Commando"
role_text_plural = "Commandos"
welcome_text = "You are in the employ of a criminal syndicate hostile to NanoTrasen."
id_type = /obj/item/weapon/card/id/centcom/ERT
/datum/antagonist/deathsquad/mercenary/New()
..(1)
@@ -24,7 +25,6 @@ var/datum/antagonist/deathsquad/mercenary/commandos
player.equip_to_slot_or_del(new /obj/item/weapon/rig/merc(player), slot_back)
player.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(player), slot_r_hand)
var/obj/item/weapon/card/id/id = create_id("Commando", player)
id.access |= get_all_station_access()
id.icon_state = "centcom"
create_id("Commando", player)
create_radio(SYND_FREQ, player)
return 1

View File

@@ -11,6 +11,7 @@ var/datum/antagonist/ert/ert
max_antags = 5
max_antags_round = 5 // ERT mode?
landmark_id = "Response Team"
id_type = /obj/item/weapon/card/id/centcom/ERT
flags = ANTAG_OVERRIDE_JOB | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER | ANTAG_CHOOSE_NAME
@@ -37,9 +38,5 @@ var/datum/antagonist/ert/ert
player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves)
player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses)
var/obj/item/weapon/card/id/centcom/ERT/W = new(src)
W.registered_name = player.real_name
W.name = "[player.real_name]'s ID Card ([W.assignment])"
player.equip_to_slot_or_del(W, slot_wear_id)
create_id(role_text, player)
return 1

View File

@@ -11,6 +11,7 @@ var/datum/antagonist/ninja/ninjas
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_RANDSPAWN | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
max_antags = 1
max_antags_round = 1
id_type = /obj/item/weapon/card/id/syndicate
/datum/antagonist/ninja/New()
..()
@@ -101,18 +102,15 @@ var/datum/antagonist/ninja/ninjas
player.equip_to_slot_or_del(R, slot_l_ear)
player.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(player), slot_w_uniform)
player.equip_to_slot_or_del(new /obj/item/device/flashlight(player), slot_belt)
var/obj/item/weapon/rig/light/ninja/ninjasuit = new(player)
create_id("Infiltrator", player)
var/obj/item/weapon/rig/light/ninja/ninjasuit = new(get_turf(player))
ninjasuit.seal_delay = 0
player.put_in_hands(ninjasuit)
player.equip_to_slot_or_del(ninjasuit,slot_back)
if(ninjasuit)
// Make sure the ninja can actually equip the suit.
if(player.dna && player.dna.unique_enzymes)
ninjasuit.locked_dna = player.dna.unique_enzymes
player << "<span class='warning'>Suit hardware locked to your DNA hash.</span>"
else
ninjasuit.req_access = list()
ninjasuit.toggle_seals(src,1)
ninjasuit.seal_delay = initial(ninjasuit.seal_delay)
if(istype(player.back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/rig = player.back

View File

@@ -19,12 +19,15 @@ var/datum/antagonist/raider/raiders
/obj/item/clothing/under/pirate,
/obj/item/clothing/under/redcoat,
/obj/item/clothing/under/serviceoveralls,
/obj/item/clothing/under/captain_fly
/obj/item/clothing/under/captain_fly,
/obj/item/clothing/under/det,
/obj/item/clothing/under/brown,
)
var/list/raider_shoes = list(
/obj/item/clothing/shoes/jackboots,
/obj/item/clothing/shoes/sandal,
/obj/item/clothing/shoes/workboots,
/obj/item/clothing/shoes/brown,
/obj/item/clothing/shoes/laceup
)
@@ -40,7 +43,6 @@ var/datum/antagonist/raider/raiders
/obj/item/clothing/head/pirate,
/obj/item/clothing/head/bandana,
/obj/item/clothing/head/hgpiratecap,
/obj/item/clothing/head/flatcap
)
var/list/raider_suits = list(
@@ -50,7 +52,9 @@ var/datum/antagonist/raider/raiders
/obj/item/clothing/suit/storage/leather_jacket,
/obj/item/clothing/suit/storage/toggle/brown_jacket,
/obj/item/clothing/suit/storage/toggle/hoodie,
/obj/item/clothing/suit/storage/toggle/hoodie/black
/obj/item/clothing/suit/storage/toggle/hoodie/black,
/obj/item/clothing/suit/unathi/mantle,
/obj/item/clothing/suit/poncho,
)
var/list/raider_guns = list(
@@ -60,14 +64,33 @@ var/datum/antagonist/raider/raiders
/obj/item/weapon/gun/energy/mindflayer,
/obj/item/weapon/gun/energy/toxgun,
/obj/item/weapon/gun/energy/stunrevolver,
/obj/item/weapon/gun/energy/ionrifle,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/gun/energy/crossbow/largecrossbow,
/obj/item/weapon/gun/launcher/crossbow,
/obj/item/weapon/gun/launcher/grenade,
/obj/item/weapon/gun/launcher/pneumatic,
/obj/item/weapon/gun/projectile/automatic/mini_uzi,
/obj/item/weapon/gun/projectile/automatic/c20r,
/obj/item/weapon/gun/projectile/automatic/wt550,
/obj/item/weapon/gun/projectile/automatic/sts35,
/obj/item/weapon/gun/projectile/silenced,
/obj/item/weapon/gun/projectile/shotgun/pump,
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel/pellet,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn,
/obj/item/weapon/gun/projectile/colt,
/obj/item/weapon/gun/projectile/pistol
/obj/item/weapon/gun/projectile/sec,
/obj/item/weapon/gun/projectile/pistol,
/obj/item/weapon/gun/projectile/revolver,
/obj/item/weapon/gun/projectile/pirate
)
var/list/raider_holster = list(
/obj/item/clothing/accessory/holster/armpit,
/obj/item/clothing/accessory/holster/waist,
/obj/item/clothing/accessory/holster/hip
)
/datum/antagonist/raider/New()
@@ -161,7 +184,7 @@ var/datum/antagonist/raider/raiders
return 0
for(var/datum/mind/player in current_antagonists)
if(!player.current || get_area(player.current) != locate(/area/shuttle/skipjack/station))
if(!player.current || get_area(player.current) != locate(/area/skipjack_station/start))
return 0
return 1
@@ -178,16 +201,20 @@ var/datum/antagonist/raider/raiders
var/new_glasses = pick(raider_glasses)
var/new_helmet = pick(raider_helmets)
var/new_suit = pick(raider_suits)
var/new_gun = pick(raider_guns)
player.equip_to_slot_or_del(new new_shoes(player),slot_shoes)
if(!player.shoes)
//If equipping shoes failed, fall back to equipping sandals
var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/unathi)
player.equip_to_slot_or_del(new fallback_type(player), slot_shoes)
player.equip_to_slot_or_del(new new_uniform(player),slot_w_uniform)
player.equip_to_slot_or_del(new new_glasses(player),slot_glasses)
player.equip_to_slot_or_del(new new_helmet(player),slot_head)
player.equip_to_slot_or_del(new new_suit(player),slot_wear_suit)
player.equip_to_slot_or_del(new new_gun(player),slot_belt)
equip_weapons(player)
var/obj/item/weapon/card/id/id = create_id("Visitor", player)
var/obj/item/weapon/card/id/id = create_id("Visitor", player, equip = 0)
id.name = "[player.real_name]'s Passport"
id.assignment = "Visitor"
var/obj/item/weapon/storage/wallet/W = new(player)
@@ -198,6 +225,70 @@ var/datum/antagonist/raider/raiders
return 1
/datum/antagonist/raider/proc/equip_weapons(var/mob/living/carbon/human/player)
var/new_gun = pick(raider_guns)
var/new_holster = pick(raider_holster) //raiders don't start with any backpacks, so let's be nice and give them a holster if they can use it.
var/turf/T = get_turf(player)
var/obj/item/primary = new new_gun(T)
var/obj/item/clothing/accessory/holster/holster = null
//Give some of the raiders a pirate gun as a secondary
if(prob(60))
var/obj/item/secondary = new /obj/item/weapon/gun/projectile/pirate(T)
if(!(primary.slot_flags & SLOT_HOLSTER))
holster = new new_holster(T)
holster.holstered = secondary
secondary.loc = holster
else
player.equip_to_slot_or_del(secondary, slot_belt)
if(primary.slot_flags & SLOT_HOLSTER)
holster = new new_holster(T)
holster.holstered = primary
primary.loc = holster
else if(!player.belt && (primary.slot_flags & SLOT_BELT))
player.equip_to_slot_or_del(primary, slot_belt)
else if(!player.back && (primary.slot_flags & SLOT_BACK))
player.equip_to_slot_or_del(primary, slot_back)
else
player.put_in_any_hand_if_possible(primary)
//If they got a projectile gun, give them a little bit of spare ammo
equip_ammo(player, primary)
if(holster)
var/obj/item/clothing/under/uniform = player.w_uniform
if(istype(uniform) && uniform.can_attach_accessory(holster))
uniform.attackby(holster, player)
else
player.put_in_any_hand_if_possible(holster)
/datum/antagonist/raider/proc/equip_ammo(var/mob/living/carbon/human/player, var/obj/item/weapon/gun/gun)
if(istype(gun, /obj/item/weapon/gun/projectile))
var/obj/item/weapon/gun/projectile/bullet_thrower = gun
if(bullet_thrower.magazine_type)
player.equip_to_slot_or_del(new bullet_thrower.magazine_type(player), slot_l_store)
if(prob(20)) //don't want to give them too much
player.equip_to_slot_or_del(new bullet_thrower.magazine_type(player), slot_r_store)
else if(bullet_thrower.ammo_type)
var/obj/item/weapon/storage/box/ammobox = new(get_turf(player.loc))
for(var/i in 1 to rand(3,5) + rand(0,2))
new bullet_thrower.ammo_type(ammobox)
player.put_in_any_hand_if_possible(ammobox)
return
if(istype(gun, /obj/item/weapon/gun/launcher/grenade))
var/list/grenades = list(
/obj/item/weapon/grenade/empgrenade,
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grenade/flashbang
)
var/obj/item/weapon/storage/box/ammobox = new(get_turf(player.loc))
for(var/i in 1 to 7)
var/grenade_type = pick(grenades)
new grenade_type(ammobox)
player.put_in_any_hand_if_possible(ammobox)
/datum/antagonist/raider/proc/equip_vox(var/mob/living/carbon/human/player)
var/uniform_type = pick(list(/obj/item/clothing/under/vox/vox_robes,/obj/item/clothing/under/vox/vox_casual))

View File

@@ -96,7 +96,7 @@ var/datum/antagonist/wizard/wizards
world << "<span class='danger'><font size = 3>The [(current_antagonists.len>1)?"[role_text_plural] have":"[role_text] has"] been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!</font></span>"
//To batch-remove wizard spells. Linked to mind.dm.
/mob/proc/spellremove(var/mob/M as mob)
/mob/proc/spellremove()
for(var/spell/spell_to_remove in src.spell_list)
remove_spell(spell_to_remove)

View File

@@ -135,10 +135,10 @@ datum/antagonist/revolutionary/finalize(var/datum/mind/target)
world << text
// This is a total redefine because headrevs are greeted differently to subrevs.
/datum/antagonist/revolutionary/add_antagonist(var/datum/mind/player)
/datum/antagonist/revolutionary/add_antagonist(var/datum/mind/player, var/ignore_role)
if((player in current_antagonists) || (player in head_revolutionaries))
return 0
if(!can_become_antag(player))
if(!can_become_antag(player, ignore_role))
return 0
current_antagonists |= player
player.current << "<span class='danger'><font size=3>You are a Revolutionary!</font></span>"
@@ -168,11 +168,6 @@ datum/antagonist/revolutionary/finalize(var/datum/mind/target)
if(show_message)
player.current.visible_message("[player.current] looks like they just remembered their real allegiance!")
/datum/antagonist/revolutionary/can_become_antag(var/datum/mind/player)
return ..() && istype(player) && \
istype(player.current, /mob/living/carbon/human) && \
!(player.assigned_role in command_positions)
// Used by RP-rev.
/mob/living/carbon/human/proc/convert_to_rev(mob/M as mob in oview(src))
set name = "Convert Bourgeoise"

View File

@@ -6,12 +6,13 @@ var/datum/antagonist/rogue_ai/malf
role_text = "Rampant AI"
role_text_plural = "Rampant AIs"
mob_path = /mob/living/silicon/ai
landmark_id = "AI"
welcome_text = "You are malfunctioning! You do not have to follow any laws."
victory_text = "The AI has taken control of all of the station's systems."
loss_text = "The AI has been shut down!"
flags = ANTAG_VOTABLE | ANTAG_RANDSPAWN //Randspawn needed otherwise it won't start at all.
flags = ANTAG_VOTABLE | ANTAG_OVERRIDE_MOB | ANTAG_OVERRIDE_JOB | ANTAG_CHOOSE_NAME
max_antags = 1
max_antags_round = 3
max_antags_round = 1
/datum/antagonist/rogue_ai/New()
@@ -22,7 +23,7 @@ var/datum/antagonist/rogue_ai/malf
/datum/antagonist/rogue_ai/get_candidates()
..()
for(var/datum/mind/player in candidates)
if(player.assigned_role != "AI")
if(player.assigned_role && player.assigned_role != "AI")
candidates -= player
if(!candidates.len)
return list()
@@ -75,3 +76,26 @@ var/datum/antagonist/rogue_ai/malf
malf << "For basic information about your abilities use command display-help"
malf << "You may choose one special hardware piece to help you. This cannot be undone."
malf << "Good luck!"
/datum/antagonist/rogue_ai/update_antag_mob(var/datum/mind/player, var/preserve_appearance)
// Get the mob.
if((flags & ANTAG_OVERRIDE_MOB) && (!player.current || (mob_path && !istype(player.current, mob_path))))
var/mob/holder = player.current
player.current = new mob_path(get_turf(player.current), null, null, 1)
player.transfer_to(player.current)
if(holder) qdel(holder)
player.original = player.current
return player.current
/datum/antagonist/rogue_ai/set_antag_name(var/mob/living/silicon/player)
if(!istype(player))
testing("rogue_ai set_antag_name called on non-silicon mob [player]!")
return
// Choose a name, if any.
var/newname = sanitize(input(player, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
if (newname)
player.SetName(newname)
if(player.mind) player.mind.name = player.name

View File

@@ -26,7 +26,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon = 'icons/turf/areas.dmi'
icon_state = "unknown"
layer = 10
luminosity = 1
luminosity = 0
mouse_opacity = 0
var/lightswitch = 1
@@ -34,7 +34,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/debug = 0
var/requires_power = 1
var/unlimited_power = 0
var/always_unpowered = 0 //this gets overriden to 1 for space in area/New()
var/power_equip = 1
@@ -320,11 +319,6 @@ area/space/atmosalert()
/area/shuttle/research/outpost
icon_state = "shuttle"
/area/shuttle/skipjack/station
name = "\improper Skipjack"
icon_state = "yellow"
requires_power = 0
/area/airtunnel1/ // referenced in airtunnel.dm:759
/area/dummy/ // Referenced in engine.dm:261
@@ -349,7 +343,6 @@ area/space/atmosalert()
name = "\improper Centcom"
icon_state = "centcom"
requires_power = 0
unlimited_power = 1
lighting_use_dynamic = 0
/area/centcom/control
@@ -388,7 +381,6 @@ area/space/atmosalert()
name = "\improper Mercenary Base"
icon_state = "syndie-ship"
requires_power = 0
unlimited_power = 1
lighting_use_dynamic = 0
/area/syndicate_mothership/control
@@ -463,7 +455,6 @@ area/space/atmosalert()
name = "\improper Independant Station"
icon_state = "yellow"
requires_power = 0
unlimited_power = 1
flags = RAD_SHIELDED
/area/syndicate_station/start
@@ -518,9 +509,18 @@ area/space/atmosalert()
name = "\improper Wizard's Den"
icon_state = "yellow"
requires_power = 0
lighting_use_dynamic = 0
/area/skipjack_station
name = "\improper Skipjack"
icon_state = "yellow"
requires_power = 0
/area/skipjack_station/start
name = "\improper Skipjack"
icon_state = "yellow"
/area/skipjack_station/transit
name = "\improper hyperspace"
icon_state = "shuttle"
@@ -904,7 +904,7 @@ area/space/atmosalert()
icon_state = "tcomsatcham"
/area/server
name = "\improper Messaging Server Room"
name = "\improper Research Server Room"
icon_state = "server"
//Crew
@@ -1812,7 +1812,7 @@ area/space/atmosalert()
ambience = list('sound/ambience/ambimalf.ogg')
/area/turret_protected/ai_server_room
name = "AI Server Room"
name = "Messaging Server Room"
icon_state = "ai_server"
/area/turret_protected/ai

View File

@@ -14,13 +14,17 @@
all_areas += src
if(!requires_power)
power_light = 0 //rastaf0
power_equip = 0 //rastaf0
power_environ = 0 //rastaf0
power_light = 0
power_equip = 0
power_environ = 0
..()
// spawn(15)
/area/proc/initialize()
if(!requires_power || !apc)
power_light = 0
power_equip = 0
power_environ = 0
power_change() // all machines set to current power level, also updates lighting icon
/area/proc/get_contents()
@@ -227,7 +231,7 @@ var/list/mob/living/forced_ambiance_list = new
var/area/oldarea = L.lastarea
if((oldarea.has_gravity == 0) && (newarea.has_gravity == 1) && (L.m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
thunk(L)
L.make_floating(0)
L.update_floating( L.Check_Dense_Object() )
L.lastarea = newarea
play_ambience(L)
@@ -260,21 +264,10 @@ var/list/mob/living/forced_ambiance_list = new
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
A.has_gravity = gravitystate
if(gravitystate)
for(var/mob/living/carbon/human/M in A)
thunk(M)
for(var/mob/M1 in A)
M1.make_floating(0)
else
for(var/mob/M in A)
if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/))
var/mob/living/carbon/human/H = src
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) //magboots + dense_object = no floaty effect
H.make_floating(0)
else
H.make_floating(1)
else
M.make_floating(1)
if(has_gravity)
thunk(M)
M.update_floating( M.Check_Dense_Object() )
/area/proc/thunk(mob)
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.

View File

@@ -24,7 +24,7 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
if(!wall)
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/effect/alien/resin)
if(!floor)
floor = pick(/turf/simulated/floor,/turf/simulated/floor/engine)
floor = pick(/turf/simulated/floor,/turf/simulated/floor/tiled,/turf/simulated/floor/reinforced)
for(var/x = 0,x<x_size,x++)
for(var/y = 0,y<y_size,y++)
@@ -76,9 +76,9 @@ proc/admin_spawn_room_at_pos()
wall=/obj/effect/alien/resin
switch(alert("Floor type",null,"Regular floor","Reinforced floor"))
if("Regular floor")
floor=/turf/simulated/floor
floor=/turf/simulated/floor/tiled
if("Reinforced floor")
floor=/turf/simulated/floor/engine
floor=/turf/simulated/floor/reinforced
if(x && y && z && wall && floor && x_len && y_len)
spawn_room(locate(x,y,z),x_len,y_len,wall,floor,clean)
return

View File

@@ -63,12 +63,11 @@
return flags & INSERT_CONTAINER
*/
/atom/proc/allow_drop()
return 1
/atom/proc/CheckExit()
return 1
// If you want to use this, the atom must have the PROXMOVE flag, and the moving
// atom must also have the PROXMOVE flag currently to help with lag. ~ ComicIronic
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
return
@@ -414,7 +413,6 @@ its easier to just keep the beam vertical.
/atom/proc/clean_blood()
if(!simulated)
return
src.color = initial(src.color) //paint
src.germ_level = 0
if(istype(blood_DNA, /list))
del(blood_DNA)

View File

@@ -21,9 +21,14 @@
if(auto_init && ticker && ticker.current_state == GAME_STATE_PLAYING)
initialize()
/proc/generate_debug_runtime() // Guaranteed to runtime and print a stack trace to the runtime log
var/t = 0 // BYOND won't let us do var/t = 1/0 directly, but it's fine with this.
t = 1 / t
/atom/movable/Del()
if(isnull(gcDestroyed) && loc)
testing("GC: -- [type] was deleted via del() rather than qdel() --")
generate_debug_runtime() // stick a stack trace in the runtime logs
// else if(isnull(gcDestroyed))
// testing("GC: [type] was deleted via GC without qdel()") //Not really a huge issue but from now on, please qdel()
// else
@@ -34,6 +39,7 @@
. = ..()
if(reagents)
qdel(reagents)
reagents = null
for(var/atom/movable/AM in contents)
qdel(AM)
loc = null
@@ -164,7 +170,7 @@
a = get_area(src.loc)
else
var/error = dist_y/2 - dist_x
while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
if(error < 0)
var/atom/step = get_step(src, dx)

View File

@@ -1,6 +1,6 @@
// Returns the lowest turf available on a given Z-level, defaults to space.
var/global/list/base_turf_by_z = list(
"5" = /turf/simulated/floor/plating/airless/asteroid // Moonbase.
"5" = /turf/simulated/floor/asteroid // Moonbase.
)
proc/get_base_turf(var/z)

View File

@@ -64,9 +64,6 @@
component_parts += new /obj/item/stack/cable_coil(src)
RefreshParts()
/obj/machinery/dna_scannernew/allow_drop()
return 0
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
if (user.stat)
return
@@ -221,7 +218,8 @@
name = "DNA Modifier Access Console"
desc = "Scand DNA."
icon = 'icons/obj/computer.dmi'
icon_state = "scanner"
icon_keyboard = "med_key"
icon_screen = "dna"
density = 1
circuit = /obj/item/weapon/circuitboard/scan_consolenew
var/selected_ui_block = 1.0
@@ -273,21 +271,9 @@
return
/obj/machinery/computer/scan_consolenew/blob_act()
if(prob(75))
qdel(src)
/obj/machinery/computer/scan_consolenew/power_change()
..()
if(stat & BROKEN)
icon_state = "broken"
else
if (stat & NOPOWER)
spawn(rand(0, 15))
src.icon_state = "c_unpowered"
else
icon_state = initial(icon_state)
/obj/machinery/computer/scan_consolenew/New()
..()
for(var/i=0;i<3;i++)

View File

@@ -193,7 +193,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
src << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
return
if(!G.state == GRAB_KILL)
if(G.state != GRAB_KILL)
src << "<span class='warning'>We must have a tighter grip to absorb this creature.</span>"
return

View File

@@ -121,7 +121,7 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/DeathSting
name = "Death Sting"
desc = "We silently sting a human, filling him with potent chemicals. His rapid death is all but assured."
desc = "We silently sting a human, filling them with potent chemicals. Their rapid death is all but assured."
genomecost = 10
verbpath = /mob/proc/changeling_DEATHsting

View File

@@ -63,19 +63,10 @@
..()
/obj/machinery/door/cultify()
icon_state = "null"
if(invisibility != INVISIBILITY_MAXIMUM)
invisibility = INVISIBILITY_MAXIMUM
density = 0
c_animation = new /atom/movable/overlay(src.loc)
c_animation.name = "cultification"
c_animation.density = 0
c_animation.anchored = 1
c_animation.icon = 'icons/effects/effects.dmi'
c_animation.layer = 5
c_animation.master = src.loc
c_animation.icon_state = "breakdoor"
flick("cultification",c_animation)
spawn(10)
qdel(c_animation)
anim(target = src, a_icon = 'icons/effects/effects.dmi', a_icon_state = "breakdoor", sleeptime = 10)
qdel(src)
/obj/machinery/door/firedoor/cultify()
@@ -136,17 +127,12 @@
T.ChangeTurf(/turf/simulated/wall/cult)
..()
/obj/structure/stool/cultify()
var/obj/structure/bed/chair/wood/wings/I = new(loc)
I.dir = dir
..()
/obj/structure/table/cultify()
// Make it a wood-reinforced wooden table.
// There are cult materials available, but it'd make the table non-deconstructable with how holotables work.
// Could possibly use a new material var for holographic-ness?
material = name_to_material["wood"]
reinforced = name_to_material["wood"]
material = get_material_by_name("wood")
reinforced = get_material_by_name("wood")
update_desc()
update_connections(1)
update_icon()

View File

@@ -3,11 +3,9 @@
return
/turf/simulated/floor/cultify()
//todo: flooring datum cultify check
cultify_floor()
/turf/simulated/floor/carpet/cultify()
return
/turf/simulated/shuttle/floor/cultify()
cultify_floor()
@@ -39,8 +37,6 @@
if((icon_state != "cult")&&(icon_state != "cult-narsie"))
name = "engraved floor"
icon_state = "cult"
turf_animation('icons/effects/effects.dmi',"cultfloor",0,0,MOB_LAYER-1)
/turf/proc/cultify_wall()
ChangeTurf(/turf/unsimulated/wall/cult)
turf_animation('icons/effects/effects.dmi',"cultwall",0,0,MOB_LAYER-1)

View File

@@ -144,6 +144,7 @@ var/global/list/narsie_list = list()
if(!(istype(T, /turf/simulated/wall/cult)||istype(T, /turf/space)))
if(T.icon_state != "cult-narsie")
T.desc = "something that goes beyond your understanding went this way"
T.icon = 'icons/turf/flooring/cult.dmi'
T.icon_state = "cult-narsie"
T.set_light(1)

View File

@@ -339,7 +339,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
attack(mob/living/M as mob, mob/living/user as mob)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had the [name] used on him by [user.name] ([user.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had the [name] used on them by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [name] on [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")

View File

@@ -5,6 +5,14 @@ var/list/sacrificed = list()
/obj/effect/rune
/*
* Use as a general guideline for this and related files:
* * <span class='warning'>...</span> - when something non-trivial or an error happens, so something similar to "Sparks come out of the machine!"
* * <span class='danger'>...</span> - when something that is fit for 'warning' happens but there is some damage or pain as well.
* * <span class='cult'>...</span> - when there is a private message to the cultists. This guideline is very arbitrary but there has to be some consistency!
*/
/////////////////////////////////////////FIRST RUNE
proc
teleport(var/key)
@@ -21,7 +29,7 @@ var/list/sacrificed = list()
allrunesloc.len = index
allrunesloc[index] = R.loc
if(index >= 5)
user << "<span class='warning'>You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric</span>"
user << "<span class='danger'>You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric.</span>"
if (istype(user, /mob/living))
user.take_overall_damage(5, 0)
qdel(src)
@@ -30,9 +38,9 @@ var/list/sacrificed = list()
user.say("Sas[pick("'","`")]so c'arta forbici!")//Only you can stop auto-muting
else
user.whisper("Sas[pick("'","`")]so c'arta forbici!")
user.visible_message("<span class='warning'>\The [user] disappears in a flash of red light!</span>", \
"<span class='warning'>You feel as your body gets dragged through the dimension of Nar-Sie!</span>", \
"<span class='warning'>You hear a sickening crunch and sloshing of viscera.</span>")
user.visible_message("<span class='danger'>[user] disappears in a flash of red light!</span>", \
"<span class='danger'>You feel as your body gets dragged through the dimension of Nar-Sie!</span>", \
"<span class='danger'>You hear a sickening crunch and sloshing of viscera.</span>")
user.loc = allrunesloc[rand(1,index)]
return
if(istype(src,/obj/effect/rune))
@@ -58,7 +66,7 @@ var/list/sacrificed = list()
IP = R
runecount++
if(runecount >= 2)
user << "<span class='warning'>You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric</span>"
user << "<span class='danger'>You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric.</span>"
if (istype(user, /mob/living))
user.take_overall_damage(5, 0)
qdel(src)
@@ -134,11 +142,11 @@ var/list/sacrificed = list()
admin_attack_log(attacker, target, "Used a convert rune", "Was subjected to a convert rune", "used a convert rune on")
switch(target.getFireLoss())
if(0 to 25)
target << "<span class='danger'>Your blood boils as you force yourself to resist the corruption invading every corner of your mind.</span>"
target << "<span class='cult'>Your blood boils as you force yourself to resist the corruption invading every corner of your mind.</span>"
if(25 to 45)
target << "<span class='danger'>Your blood boils and your body burns as the corruption further forces itself into your body and mind.</span>"
target << "<span class='cult'>Your blood boils and your body burns as the corruption further forces itself into your body and mind.</span>"
if(45 to 75)
target << "<span class='danger'>You begin to hallucinate images of a dark and incomprehensible being and your entire body feels like its engulfed in flame as your mental defenses crumble.</span>"
target << "<span class='cult'>You begin to hallucinate images of a dark and incomprehensible being and your entire body feels like its engulfed in flame as your mental defenses crumble.</span>"
target.apply_effect(rand(1,10), STUTTER)
if(75 to 100)
target << "<span class='cult'>Your mind turns to ash as the burning flames engulf your very soul and images of an unspeakable horror begin to bombard the last remnants of mental resistance.</span>"
@@ -157,7 +165,7 @@ var/list/sacrificed = list()
if (target.species && (target.species.flags & NO_PAIN))
target.visible_message("<span class='warning'>The markings below [target] glow a bloody red.</span>")
else
target.visible_message("<span class='warning'>\The [target] writhes in pain as the markings below \him glow a bloody red.</span>", "<span class='danger'>AAAAAAHHHH!</span>", "<span class='warning'>You hear an anguished scream.</span>")
target.visible_message("<span class='warning'>[target] writhes in pain as the markings below \him glow a bloody red.</span>", "<span class='danger'>AAAAAAHHHH!</span>", "<span class='warning'>You hear an anguished scream.</span>")
if(!waiting_for_input[target]) //so we don't spam them with dialogs if they hesitate
waiting_for_input[target] = 1
@@ -229,15 +237,15 @@ var/list/sacrificed = list()
if(!drain)
return fizzle()
usr.say ("Yu[pick("'","`")]gular faras desdae. Havas mithum javara. Umathar uf'kal thenar!")
usr.visible_message("<span class='warning'>Blood flows from the rune into [usr]!</span>", \
"<span class='warning'>The blood starts flowing from the rune and into your frail mortal body. You feel... empowered.</span>", \
usr.visible_message("<span class='danger'>Blood flows from the rune into [usr]!</span>", \
"<span class='danger'>The blood starts flowing from the rune and into your frail mortal body. You feel... empowered.</span>", \
"<span class='warning'>You hear a liquid flowing.</span>")
var/mob/living/user = usr
if(user.bhunger)
user.bhunger = max(user.bhunger-2*drain,0)
if(drain>=50)
user.visible_message("<span class='warning'>\The [user]'s eyes give off eerie red glow!</span>", \
"<span class='warning'>...but it wasn't nearly enough. You crave, crave for more. The hunger consumes you from within.</span>", \
user.visible_message("<span class='danger'>[user]'s eyes give off eerie red glow!</span>", \
"<span class='danger'>...but it wasn't nearly enough. You crave, crave for more. The hunger consumes you from within.</span>", \
"<span class='warning'>You hear a heartbeat.</span>")
user.bhunger += drain
src = user
@@ -264,7 +272,7 @@ var/list/sacrificed = list()
if(usr.loc==src.loc)
if(usr.seer==1)
usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium viortia.")
usr << "<span class='warning'>The world beyond fades from your vision.</span>"
usr << "<span class='danger'>The world beyond fades from your vision.</span>"
usr.see_invisible = SEE_INVISIBLE_LIVING
usr.seer = 0
else if(usr.see_invisible!=SEE_INVISIBLE_LIVING)
@@ -336,12 +344,12 @@ var/list/sacrificed = list()
corpse_to_raise.key = ghost.key //the corpse will keep its old mind! but a new player takes ownership of it (they are essentially possessed)
//This means, should that player leave the body, the original may re-enter
usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!")
corpse_to_raise.visible_message("<span class='warning'>\The [corpse_to_raise]'s eyes glow with a faint red as he stands up, slowly starting to breathe again.</span>", \
corpse_to_raise.visible_message("<span class='warning'>[corpse_to_raise]'s eyes glow with a faint red as he stands up, slowly starting to breathe again.</span>", \
"<span class='warning'>Life... I'm alive again...</span>", \
"<span class='warning'>You hear a faint, slightly familiar whisper.</span>")
body_to_sacrifice.visible_message("<span class='warning'>\The [body_to_sacrifice] is torn apart, a black smoke swiftly dissipating from his remains!</span>", \
"<span class='warning'>You feel as your blood boils, tearing you apart.</span>", \
"<span class='warning'>You hear a thousand voices, all crying in pain.</span>")
body_to_sacrifice.visible_message("<span class='danger'>[body_to_sacrifice] is torn apart, a black smoke swiftly dissipating from \his remains!</span>", \
"<span class='danger'>You feel as your blood boils, tearing you apart.</span>", \
"<span class='danger'>You hear a thousand voices, all crying in pain.</span>")
body_to_sacrifice.gib()
// if(ticker.mode.name == "cult")
@@ -349,8 +357,8 @@ var/list/sacrificed = list()
// else
// ticker.mode.cult |= corpse_to_raise.mind
corpse_to_raise << "<font color=\"purple\"><b><i>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.</b></i></font>"
corpse_to_raise << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>"
corpse_to_raise << "<span class='cult'>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.</span>"
corpse_to_raise << "<span class='cult'>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</span>"
return
@@ -391,7 +399,7 @@ var/list/sacrificed = list()
if(usr.loc==src.loc)
var/mob/living/carbon/human/L = usr
usr.say("Fwe[pick("'","`")]sh mah erl nyag r'ya!")
usr.visible_message("<span class='warning'>\The [usr]'s eyes glow blue as \he freezes in place, absolutely motionless.</span>", \
usr.visible_message("<span class='warning'>[usr]'s eyes glow blue as \he freezes in place, absolutely motionless.</span>", \
"<span class='warning'>The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this is a great sight, being here strains your mind and body. Hurry...</span>", \
"<span class='warning'>You hear only complete silence for a moment.</span>")
announce_ghost_joinleave(usr.ghostize(1), 1, "You feel that they had to use some [pick("dark", "black", "blood", "forgotten", "forbidden")] magic to [pick("invade","disturb","disrupt","infest","taint","spoil","blight")] this place!")
@@ -461,8 +469,8 @@ var/list/sacrificed = list()
user.take_organ_damage(1, 0)
sleep(30)
if(D)
D.visible_message("<span class='warning'>\The [D] slowly dissipates into dust and bones.</span>", \
"<span class='warning'>You feel pain, as bonds formed between your soul and this homunculus break.</span>", \
D.visible_message("<span class='danger'>[D] slowly dissipates into dust and bones.</span>", \
"<span class='danger'>You feel pain, as bonds formed between your soul and this homunculus break.</span>", \
"<span class='warning'>You hear faint rustle.</span>")
D.dust()
return
@@ -560,8 +568,8 @@ var/list/sacrificed = list()
user.say("Uhrast ka'hfa heldsagen ver[pick("'","`")]lot!")
user.take_overall_damage(200, 0)
runedec+=10
user.visible_message("<span class='warning'>\The [user] keels over dead, his blood glowing blue as it escapes his body and dissipates into thin air.</span>", \
"<span class='warning'>In the last moment of your humble life, you feel an immense pain as fabric of reality mends... with your blood.</span>", \
user.visible_message("<span class='danger'>\The [user] keels over dead, \his blood glowing blue as it escapes \his body and dissipates into thin air.</span>", \
"<span class='danger'>In the last moment of your humble life, you feel an immense pain as fabric of reality mends... with your blood.</span>", \
"<span class='warning'>You hear faint rustle.</span>")
for(,user.stat==2)
sleep(600)
@@ -592,9 +600,10 @@ var/list/sacrificed = list()
usr.whisper("[input]")
input = sanitize(input)
log_and_message_admins("used a communicate rune to say '[input]'")
for(var/datum/mind/H in cult.current_antagonists)
if (H.current)
H.current << "<span class='danger'>[input]</span>"
H.current << "<span class='cult'>[input]</span>"
qdel(src)
return 1
@@ -638,17 +647,17 @@ var/list/sacrificed = list()
H.dust()//To prevent the MMI from remaining
else
H.gib()
usr << "<span class='warning'>The Geometer of Blood accepts this sacrifice, your objective is now complete.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice, your objective is now complete.</span>"
else
usr << "<span class='warning'>Your target's earthly bonds are too strong. You need more cultists to succeed in this ritual.</span>"
else
if(cultsinrange.len >= 3)
if(H.stat !=2)
if(prob(80) || worth)
usr << "<span class='warning'>The Geometer of Blood accepts this [worth ? "exotic " : ""]sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this [worth ? "exotic " : ""]sacrifice.</span>"
cult.grant_runeword(usr)
else
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
usr << "<span class='warning'>However, this soul was not enough to gain His favor.</span>"
if(isrobot(H))
H.dust()//To prevent the MMI from remaining
@@ -656,10 +665,10 @@ var/list/sacrificed = list()
H.gib()
else
if(prob(40) || worth)
usr << "<span class='warning'>The Geometer of blood accepts this [worth ? "exotic " : ""]sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this [worth ? "exotic " : ""]sacrifice.</span>"
cult.grant_runeword(usr)
else
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
usr << "<span class='warning'>However, a mere dead body is not enough to satisfy Him.</span>"
if(isrobot(H))
H.dust()//To prevent the MMI from remaining
@@ -671,10 +680,10 @@ var/list/sacrificed = list()
else
if(prob(40))
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
cult.grant_runeword(usr)
else
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
usr << "<span class='warning'>However, a mere dead body is not enough to satisfy Him.</span>"
if(isrobot(H))
H.dust()//To prevent the MMI from remaining
@@ -684,10 +693,10 @@ var/list/sacrificed = list()
if(cultsinrange.len >= 3)
if(H.stat !=2)
if(prob(80))
usr << "<span class='warning'>The Geometer of Blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
cult.grant_runeword(usr)
else
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
usr << "<span class='warning'>However, this soul was not enough to gain His favor.</span>"
if(isrobot(H))
H.dust()//To prevent the MMI from remaining
@@ -695,10 +704,10 @@ var/list/sacrificed = list()
H.gib()
else
if(prob(40))
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
cult.grant_runeword(usr)
else
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
usr << "<span class='warning'>However, a mere dead body is not enough to satisfy Him.</span>"
if(isrobot(H))
H.dust()//To prevent the MMI from remaining
@@ -709,10 +718,10 @@ var/list/sacrificed = list()
usr << "<span class='warning'>The victim is still alive, you will need more cultists chanting for the sacrifice to succeed.</span>"
else
if(prob(40))
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
cult.grant_runeword(usr)
else
usr << "<span class='warning'>The Geometer of blood accepts this sacrifice.</span>"
usr << "<span class='cult'>The Geometer of Blood accepts this sacrifice.</span>"
usr << "<span class='warning'>However, a mere dead body is not enough to satisfy Him.</span>"
if(isrobot(H))
H.dust()//To prevent the MMI from remaining
@@ -771,9 +780,9 @@ var/list/sacrificed = list()
var/mob/living/user = usr
user.take_organ_damage(2, 0)
if(src.density)
usr << "<span class='warning'>Your blood flows into the rune, and you feel that the very space over the rune thickens.</span>"
usr << "<span class='danger'>Your blood flows into the rune, and you feel that the very space over the rune thickens.</span>"
else
usr << "<span class='warning'>Your blood flows into the rune, and you feel as the rune releases its grasp on space.</span>"
usr << "<span class='danger'>Your blood flows into the rune, and you feel as the rune releases its grasp on space.</span>"
return
/////////////////////////////////////////EIGHTTEENTH RUNE
@@ -842,7 +851,7 @@ var/list/sacrificed = list()
if (cultist == user) //just to be sure.
return
if(cultist.buckled || cultist.handcuffed || (!isturf(cultist.loc) && !istype(cultist.loc, /obj/structure/closet)))
user << "<span class='warning'>You cannot summon \the [cultist], for his shackles of blood are strong.</span>"
user << "<span class='warning'>You cannot summon \the [cultist], for \his shackles of blood are strong.</span>"
return fizzle()
cultist.loc = src.loc
cultist.lying = 1
@@ -922,7 +931,7 @@ var/list/sacrificed = list()
C.disabilities |= NEARSIGHTED
if(prob(10))
C.sdisabilities |= BLIND
C.show_message("<span class='warning'>Suddenly you see red flash that blinds you.</span>", 3)
C.show_message("<span class='warning'>Suddenly you see a red flash that blinds you.</span>", 3)
affected += C
if(affected.len)
usr.say("Sti[pick("'","`")] kaliesin!")
@@ -972,7 +981,7 @@ var/list/sacrificed = list()
if(N)
continue
M.take_overall_damage(51,51)
M << "<span class='warning'>Your blood boils!</span>"
M << "<span class='danger'>Your blood boils!</span>"
victims += M
if(prob(5))
spawn(5)
@@ -1004,16 +1013,16 @@ var/list/sacrificed = list()
for(var/mob/living/M in orange(2,R))
M.take_overall_damage(0,15)
if (R.invisibility>M.see_invisible)
M << "<span class='warning'>Aargh it burns!</span>"
M << "<span class='danger'>Aargh it burns!</span>"
else
M << "<span class='warning'>Rune suddenly ignites, burning you!</span>"
M << "<span class='danger'>Rune suddenly ignites, burning you!</span>"
var/turf/T = get_turf(R)
T.hotspot_expose(700,125)
for(var/obj/effect/decal/cleanable/blood/B in world)
if(B.blood_DNA == src.blood_DNA)
for(var/mob/living/M in orange(1,B))
M.take_overall_damage(0,5)
M << "<span class='warning'>Blood suddenly ignites, burning you!</span>"
M << "<span class='danger'>Blood suddenly ignites, burning you!</span>"
var/turf/T = get_turf(B)
T.hotspot_expose(700,125)
qdel(B)
@@ -1032,13 +1041,13 @@ var/list/sacrificed = list()
C.stuttering = 1
C.Weaken(1)
C.Stun(1)
C.show_message("<span class='warning'>The rune explodes in a bright flash.</span>", 3)
C.show_message("<span class='danger'>The rune explodes in a bright flash.</span>", 3)
admin_attack_log(usr, C, "Used a stun rune.", "Was victim of a stun rune.", "used a stun rune on")
else if(issilicon(L))
var/mob/living/silicon/S = L
S.Weaken(5)
S.show_message("<span class='warning'>BZZZT... The rune has exploded in a bright flash.</span>", 3)
S.show_message("<span class='danger'>BZZZT... The rune has exploded in a bright flash.</span>", 3)
admin_attack_log(usr, S, "Used a stun rune.", "Was victim of a stun rune.", "used a stun rune on")
qdel(src)
else ///When invoked as talisman, stun and mute the target mob.
@@ -1046,10 +1055,10 @@ var/list/sacrificed = list()
var/obj/item/weapon/nullrod/N = locate() in T
if(N)
for(var/mob/O in viewers(T, null))
O.show_message("<span class='danger'>\The [usr] invokes a talisman at [T], but they are unaffected!</span>", 1)
O.show_message(text("<span class='warning'><B>[] invokes a talisman at [], but they are unaffected!</B></span>", usr, T), 1)
else
for(var/mob/O in viewers(T, null))
O.show_message("<span class='danger'>\The [usr] invokes a talisman at [T]</span>", 1)
O.show_message(text("<span class='warning'><B>[] invokes a talisman at []</B></span>", usr, T), 1)
if(issilicon(T))
T.Weaken(15)

View File

@@ -79,9 +79,8 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
C.req_access = list()
C.req_one_access = list()
sleep(5 MINUTES)
spawn(5 MINUTES)
ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic
universe_has_ended = 1
return

View File

@@ -166,12 +166,14 @@ var/global/list/additional_antag_types = list()
if(!(antag_templates && antag_templates.len))
return 1
// Attempt to mark folks down as ready to go. Don't finalize until post setup.
var/datum/antagonist/main_antags = antag_templates[1]
var/list/candidates = main_antags.get_candidates()
if(candidates.len >= required_enemies)
for(var/datum/antagonist/antag in antag_templates)
antag.attempt_spawn()
var/list/potential
if(main_antags.flags & ANTAG_OVERRIDE_JOB)
potential = main_antags.pending_antagonists
else
potential = main_antags.candidates
if(potential.len >= required_enemies)
return 1
return 0
@@ -185,6 +187,14 @@ var/global/list/additional_antag_types = list()
var/datum/event_container/EMajor = event_manager.event_containers[EVENT_LEVEL_MAJOR]
EMajor.delay_modifier = event_delay_mod_major
/datum/game_mode/proc/pre_setup()
for(var/datum/antagonist/antag in antag_templates)
antag.build_candidate_list() //compile a list of all eligible candidates
//antag roles that replace jobs need to be assigned before the job controller hands out jobs.
if(antag.flags & ANTAG_OVERRIDE_JOB)
antag.attempt_spawn() //select antags to be spawned
///post_setup()
/datum/game_mode/proc/post_setup()
@@ -198,9 +208,11 @@ var/global/list/additional_antag_types = list()
spawn(rand(100,150))
announce_ert_disabled()
if(antag_templates && antag_templates.len)
//Assign all antag types for this game mode. Any players spawned as antags earlier should have been removed from the pending list, so no need to worry about those.
for(var/datum/antagonist/antag in antag_templates)
antag.finalize_spawn()
if(!(antag.flags & ANTAG_OVERRIDE_JOB))
antag.attempt_spawn() //select antags to be spawned
antag.finalize_spawn() //actually spawn antags
if(antag.is_latejoin_template())
latejoin_templates |= antag
@@ -213,6 +225,10 @@ var/global/list/additional_antag_types = list()
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
return 1
/datum/game_mode/proc/fail_setup()
for(var/datum/antagonist/antag in antag_templates)
antag.reset()
/datum/game_mode/proc/announce_ert_disabled()
if(!ert_disabled)
return
@@ -270,7 +286,6 @@ var/global/list/additional_antag_types = list()
/datum/game_mode/proc/declare_completion()
var/is_antag_mode = (antag_templates && antag_templates.len)
if(!config.objectives_disabled)
check_victory()
if(is_antag_mode)
sleep(10)
@@ -379,8 +394,8 @@ var/global/list/additional_antag_types = list()
if (special_role in disregard_roles)
continue
else if(man.client.prefs.nanotrasen_relation == "Opposed" && prob(50) || \
man.client.prefs.nanotrasen_relation == "Skeptical" && prob(20))
else if(man.client.prefs.nanotrasen_relation == COMPANY_OPPOSED && prob(50) || \
man.client.prefs.nanotrasen_relation == COMPANY_SKEPTICAL && prob(20))
suspects += man
// Antags
else if(special_role_data && prob(special_role_data.suspicion_chance))
@@ -391,7 +406,7 @@ var/global/list/additional_antag_types = list()
suspects += man
for(var/mob/M in suspects)
if(M.mind.assigned_role == "MODE")
if(player_is_antag(M.mind, only_offstation_roles = 1))
continue
switch(rand(1, 100))
if(1 to 50)
@@ -417,28 +432,22 @@ var/global/list/additional_antag_types = list()
if(!antag_template)
return candidates
var/roletext
// Assemble a list of active players without jobbans.
for(var/mob/new_player/player in player_list)
if( player.client && player.ready )
if(!(jobban_isbanned(player, "Syndicate") || jobban_isbanned(player, antag_template.bantype)))
players += player
// Shuffle the players list so that it becomes ping-independent.
players = shuffle(players)
// Get a list of all the people who want to be the antagonist for this round
for(var/mob/new_player/player in players)
if(!role || (player.client.prefs.be_special & role))
log_debug("[player.key] had [roletext] enabled, so we are drafting them.")
log_debug("[player.key] had [antag_id] enabled, so we are drafting them.")
candidates += player.mind
players -= player
// If we don't have enough antags, draft people who voted for the round.
if(candidates.len < required_enemies)
for(var/key in round_voters)
for(var/mob/new_player/player in players)
if(player.ckey == key)
if(player.ckey in round_voters)
log_debug("[player.key] voted for this round, so we are drafting them.")
candidates += player.mind
players -= player
@@ -475,12 +484,14 @@ var/global/list/additional_antag_types = list()
if(antag)
antag_templates |= antag
/*
if(antag_templates && antag_templates.len)
for(var/datum/antagonist/antag in antag_templates)
if(antag.flags & (ANTAG_OVERRIDE_JOB|ANTAG_RANDSPAWN))
continue
antag_templates -= antag
world << "<span class='danger'>[antag.role_text_plural] are invalid for additional roundtype antags!</span>"
*/
newscaster_announcements = pick(newscaster_standard_feeds)
@@ -546,9 +557,9 @@ proc/get_nt_opposed()
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list)
if(man.client)
if(man.client.prefs.nanotrasen_relation == "Opposed")
if(man.client.prefs.nanotrasen_relation == COMPANY_OPPOSED)
dudes += man
else if(man.client.prefs.nanotrasen_relation == "Skeptical" && prob(50))
else if(man.client.prefs.nanotrasen_relation == COMPANY_SKEPTICAL && prob(50))
dudes += man
if(dudes.len == 0) return null
return pick(dudes)

View File

@@ -91,11 +91,14 @@ var/global/datum/controller/gameticker/ticker
else
src.mode = config.pick_mode(master_mode)
src.mode.pre_setup()
job_master.DivideOccupations() // Apparently important for new antagonist system to register specific job antags properly.
if(!mode_started && !src.mode.can_start())
world << "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players needed. Reverting to pre-game lobby."
current_state = GAME_STATE_PREGAME
mode.fail_setup()
mode = null
job_master.ResetOccupations()
return 0
@@ -110,6 +113,7 @@ var/global/datum/controller/gameticker/ticker
else
src.mode.announce()
setup_economy()
current_state = GAME_STATE_PLAYING
create_characters() //Create player characters and transfer them
collect_minds()
@@ -118,9 +122,6 @@ var/global/datum/controller/gameticker/ticker
callHook("roundstart")
//here to initialize the random events nicely at round start
setup_economy()
shuttle_controller.setup_shuttle_docks()
spawn(0)//Forking here so we dont have to wait for this to finish
@@ -288,7 +289,7 @@ var/global/datum/controller/gameticker/ticker
if(player && player.mind && player.mind.assigned_role)
if(player.mind.assigned_role == "Captain")
captainless=0
if(player.mind.assigned_role != "MODE")
if(!player_is_antag(player.mind, only_offstation_roles = 1))
job_master.EquipRank(player, player.mind.assigned_role, 0)
UpdateFactionList(player)
equip_custom_items(player)
@@ -342,7 +343,7 @@ var/global/datum/controller/gameticker/ticker
if(!delay_end)
world.Reboot()
else
world << "<span class='notice><b>An admin has delayed the round end</b></span>"
world << "<span class='notice'><b>An admin has delayed the round end</b></span>"
else
world << "<span class='notice'><b>An admin has delayed the round end</b></span>"

View File

@@ -20,12 +20,3 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
if (skipjack && skipjack.returned_home)
return 1
return 0
/datum/game_mode/heist/cleanup()
//the skipjack and everything in it have left and aren't coming back, so get rid of them.
var/area/skipjack = locate(/area/shuttle/skipjack/station)
for (var/mob/living/M in skipjack.contents)
//maybe send the player a message that they've gone home/been kidnapped? Someone responsible for vox lore should write that.
qdel(M)
for (var/obj/O in skipjack.contents)
qdel(O) //no hiding in lockers or anything

View File

@@ -54,7 +54,7 @@
"Small Prick"
)
// TODO: Update to new antagonist system.
/datum/intercept_text/proc/build(var/mode_type, datum/mind/correct_person)
switch(mode_type)
if("revolution")
@@ -88,32 +88,9 @@
else
return null
// NOTE: Commentted out was the code which showed the chance of someone being an antag. If you want to re-add it, just uncomment the code.
/*
/datum/intercept_text/proc/pick_mob()
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list)
if (!man.mind) continue
if (man.mind.assigned_role=="MODE") continue
dudes += man
if(dudes.len==0)
return null
return pick(dudes)
/datum/intercept_text/proc/pick_fingerprints()
var/mob/living/carbon/human/dude = src.pick_mob()
//if (!dude) return pick_fingerprints() //who coded that is totally crasy or just a traitor. -- rastaf0
if(dude)
return num2text(md5(dude.dna.uni_identity))
else
return num2text(md5(num2text(rand(1,10000))))
*/
/datum/intercept_text/proc/get_suspect()
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == "Opposed")
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == COMPANY_OPPOSED)
dudes += man
for(var/i = 0, i < max(player_list.len/10,2), i++)
dudes += pick(player_list)
@@ -205,32 +182,6 @@
var/cname = pick(src.changeling_names)
var/orgname1 = pick(src.org_names_1)
var/orgname2 = pick(src.org_names_2)
/*
var/changeling_name
var/changeling_job
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
if(prob(prob_right_job))
if(correct_person)
if(correct_person:assigned_role=="MODE")
changeling_job = pick(joblist)
else
changeling_job = correct_person:assigned_role
else
changeling_job = pick(joblist)
if(prob(prob_right_dude) && ticker.mode == "changeling")
if(correct_person:assigned_role=="MODE")
changeling_name = correct_person:current
else
changeling_name = src.pick_mob()
else
changeling_name = src.pick_mob()
*/
src.text += "<BR><BR>We have received a report that a dangerous alien lifeform known only as \"[cname]\" may have infiltrated your crew. "
/*
src.text += "Our intelligence suggests a [prob_right_job]% chance that a [changeling_job] on board your station has been replaced by the alien. "
src.text += "Additionally, the report indicates a [prob_right_dude]% chance that [changeling_name] may have been in contact with the lifeform at a recent social gathering. "
*/
src.text += "These lifeforms are assosciated with the [orgname1] [orgname2] and may be attempting to acquire sensitive materials on their behalf. "
src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation. Remember, they can be anybody, suspect everybody!"

View File

@@ -163,13 +163,12 @@
command_announcement.Announce(fulltext)
// Proc: get_unhacked_apcs()
// Proc: get_all_apcs()
// Parameters: None
// Description: Returns a list of APCs that are not yet hacked.
/proc/get_unhacked_apcs()
// Description: Returns a list of all APCs
/proc/get_all_apcs()
var/list/H = list()
for(var/obj/machinery/power/apc/A in machines)
if(!A.hacker)
H.Add(A)
return H

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