mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-02 13:33:29 +00:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into dev
Conflicts: icons/mob/head.dmi icons/obj/clothing/hats.dmi
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
#ignore misc BYOND files
|
||||
Thumbs.db
|
||||
*.log
|
||||
*.int
|
||||
*.rsc
|
||||
@@ -7,3 +8,4 @@
|
||||
*.backup
|
||||
data/
|
||||
cfg/
|
||||
|
||||
|
||||
44
.travis.yml
44
.travis.yml
@@ -1,31 +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"
|
||||
|
||||
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
|
||||
|
||||
MACRO_COUNT=1247
|
||||
|
||||
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 ])
|
||||
- ( md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int")
|
||||
- (! 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
|
||||
|
||||
|
||||
@@ -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,6 +24,7 @@
|
||||
#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"
|
||||
@@ -231,12 +233,17 @@
|
||||
#include "code\game\skincmd.dm"
|
||||
#include "code\game\sound.dm"
|
||||
#include "code\game\supplyshuttle.dm"
|
||||
#include "code\game\antagonist\_antagonist_setup.dm"
|
||||
#include "code\game\antagonist\antagonist.dm"
|
||||
#include "code\game\antagonist\antagonist_build.dm"
|
||||
#include "code\game\antagonist\antagonist_globals.dm"
|
||||
#include "code\game\antagonist\antagonist_add.dm"
|
||||
#include "code\game\antagonist\antagonist_create.dm"
|
||||
#include "code\game\antagonist\antagonist_equip.dm"
|
||||
#include "code\game\antagonist\antagonist_helpers.dm"
|
||||
#include "code\game\antagonist\antagonist_objectives.dm"
|
||||
#include "code\game\antagonist\antagonist_spawn.dm"
|
||||
#include "code\game\antagonist\antagonist_panel.dm"
|
||||
#include "code\game\antagonist\antagonist_place.dm"
|
||||
#include "code\game\antagonist\antagonist_print.dm"
|
||||
#include "code\game\antagonist\antagonist_update.dm"
|
||||
#include "code\game\antagonist\alien\borer.dm"
|
||||
#include "code\game\antagonist\alien\xenomorph.dm"
|
||||
#include "code\game\antagonist\outsider\commando.dm"
|
||||
@@ -266,6 +273,7 @@
|
||||
#include "code\game\dna\genes\powers.dm"
|
||||
#include "code\game\gamemodes\events.dm"
|
||||
#include "code\game\gamemodes\game_mode.dm"
|
||||
#include "code\game\gamemodes\game_mode_latespawn.dm"
|
||||
#include "code\game\gamemodes\gameticker.dm"
|
||||
#include "code\game\gamemodes\intercept_report.dm"
|
||||
#include "code\game\gamemodes\objective.dm"
|
||||
@@ -601,7 +609,10 @@
|
||||
#include "code\game\objects\items\devices\taperecorder.dm"
|
||||
#include "code\game\objects\items\devices\traitordevices.dm"
|
||||
#include "code\game\objects\items\devices\transfer_valve.dm"
|
||||
#include "code\game\objects\items\devices\uplinks.dm"
|
||||
#include "code\game\objects\items\devices\uplink.dm"
|
||||
#include "code\game\objects\items\devices\uplink_categories.dm"
|
||||
#include "code\game\objects\items\devices\uplink_items.dm"
|
||||
#include "code\game\objects\items\devices\uplink_random_lists.dm"
|
||||
#include "code\game\objects\items\devices\violin.dm"
|
||||
#include "code\game\objects\items\devices\whistle.dm"
|
||||
#include "code\game\objects\items\devices\PDA\cart.dm"
|
||||
@@ -1267,6 +1278,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"
|
||||
@@ -1278,6 +1290,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"
|
||||
@@ -1297,6 +1310,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\silicon\robot\drone\drone_say.dm"
|
||||
#include "code\modules\mob\living\simple_animal\bees.dm"
|
||||
#include "code\modules\mob\living\simple_animal\corpse.dm"
|
||||
#include "code\modules\mob\living\simple_animal\parrot.dm"
|
||||
@@ -1428,23 +1442,6 @@
|
||||
#include "code\modules\power\antimatter\containment_jar.dm"
|
||||
#include "code\modules\power\antimatter\control.dm"
|
||||
#include "code\modules\power\antimatter\shielding.dm"
|
||||
#include "code\modules\power\rust\circuits_and_design.dm"
|
||||
#include "code\modules\power\rust\core_control.dm"
|
||||
#include "code\modules\power\rust\core_field.dm"
|
||||
#include "code\modules\power\rust\core_gen.dm"
|
||||
#include "code\modules\power\rust\core_monitor.dm"
|
||||
#include "code\modules\power\rust\fuel_assembly.dm"
|
||||
#include "code\modules\power\rust\fuel_assembly_port.dm"
|
||||
#include "code\modules\power\rust\fuel_assembly_port_construction.dm"
|
||||
#include "code\modules\power\rust\fuel_compressor.dm"
|
||||
#include "code\modules\power\rust\fuel_compressor_construction.dm"
|
||||
#include "code\modules\power\rust\fuel_control.dm"
|
||||
#include "code\modules\power\rust\fuel_injector.dm"
|
||||
#include "code\modules\power\rust\fusion_reactions.dm"
|
||||
#include "code\modules\power\rust\gyrotron.dm"
|
||||
#include "code\modules\power\rust\gyrotron_controller.dm"
|
||||
#include "code\modules\power\rust\radiation.dm"
|
||||
#include "code\modules\power\rust\virtual_particle_catcher.dm"
|
||||
#include "code\modules\power\sensors\powernet_sensor.dm"
|
||||
#include "code\modules\power\sensors\sensor_monitoring.dm"
|
||||
#include "code\modules\power\singularity\act.dm"
|
||||
@@ -1511,7 +1508,9 @@
|
||||
#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"
|
||||
#include "code\modules\reagents\Chemistry-Reagents.dm"
|
||||
#include "code\modules\reagents\Chemistry-Recipes.dm"
|
||||
@@ -1613,7 +1612,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"
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -10,6 +10,9 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
*/
|
||||
/obj/machinery/atmospherics
|
||||
|
||||
auto_init = 0
|
||||
|
||||
anchored = 1
|
||||
idle_power_usage = 0
|
||||
active_power_usage = 0
|
||||
@@ -87,7 +90,7 @@ obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/a
|
||||
/obj/machinery/atmospherics/process()
|
||||
last_flow_rate = 0
|
||||
last_power_draw = 0
|
||||
|
||||
|
||||
build_network()
|
||||
|
||||
/obj/machinery/atmospherics/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -91,7 +91,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>", \
|
||||
|
||||
@@ -114,10 +114,10 @@
|
||||
ReplaceWithLattice()
|
||||
return
|
||||
|
||||
if (istype(C, /obj/item/stack/tile/plasteel))
|
||||
if (istype(C, /obj/item/stack/tile/steel))
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
var/obj/item/stack/tile/plasteel/S = C
|
||||
var/obj/item/stack/tile/steel/S = C
|
||||
if (S.get_amount() < 1)
|
||||
return
|
||||
qdel(L)
|
||||
|
||||
@@ -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/aiEye))
|
||||
continue
|
||||
. += A
|
||||
|
||||
@@ -226,14 +226,15 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
//Returns the firelevel
|
||||
/datum/gas_mixture/proc/zburn(zone/zone, force_burn, no_check = 0)
|
||||
#ifdef FIREDBG
|
||||
log_debug("***************** FIREDBG *****************")
|
||||
if(zone) log_debug("Burning [zone.name]!")
|
||||
#endif
|
||||
|
||||
. = 0
|
||||
if((temperature > PHORON_MINIMUM_BURN_TEMPERATURE || force_burn) && (no_check ||check_recombustability(zone? zone.fuel_objs : null)))
|
||||
var/gas_fuel = 0 //in the case of mixed gas/liquid fires, the gas burns first.
|
||||
|
||||
#ifdef FIREDBG
|
||||
log_debug("***************** FIREDBG *****************")
|
||||
log_debug("Burning [zone? zone.name : "zoneless gas_mixture"]!")
|
||||
#endif
|
||||
|
||||
var/gas_fuel = 0
|
||||
var/liquid_fuel = 0
|
||||
var/total_fuel = 0
|
||||
var/total_oxidizers = 0
|
||||
@@ -269,36 +270,40 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
//calculate the firelevel.
|
||||
var/firelevel = calculate_firelevel(total_fuel, total_oxidizers, reaction_limit)
|
||||
var/firelevel_ratio = firelevel / vsc.fire_firelevel_multiplier
|
||||
|
||||
|
||||
//vapour fuels are extremely volatile! The reaction progress is a percentage of the total fuel (similar to old zburn).
|
||||
var/gas_reaction_progress = min(0.2, (firelevel/vsc.fire_firelevel_multiplier))*gas_fuel*FIRE_GAS_BURNRATE_MULT
|
||||
//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 = 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/vsc.fire_firelevel_multiplier)*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)
|
||||
var/used_oxidizers = used_fuel*(FIRE_REACTION_OXIDIZER_AMOUNT/FIRE_REACTION_FUEL_AMOUNT)
|
||||
|
||||
#ifdef FIREDBG
|
||||
log_debug("gas_fuel = [gas_fuel], liquid_fuel = [liquid_fuel], total_oxidizers = [total_oxidizers]")
|
||||
log_debug("fuel_area = [fuel_area], total_fuel = [total_fuel], reaction_limit = [reaction_limit]")
|
||||
log_debug("firelevel -> [firelevel] / [vsc.fire_firelevel_multiplier]")
|
||||
log_debug("liquid_reaction_progress = [liquid_reaction_progress]")
|
||||
log_debug("gas_reaction_progress = [gas_reaction_progress]")
|
||||
log_debug("used_fuel = [used_fuel]; used_oxidizers = [used_oxidizers]; reaction_limit=[reaction_limit]")
|
||||
log_debug("total_reaction_progress = [total_reaction_progress]")
|
||||
log_debug("used_fuel = [used_fuel], used_oxidizers = [used_oxidizers]; ")
|
||||
#endif
|
||||
|
||||
//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
|
||||
|
||||
|
||||
//*** Remove fuel and oxidizer, add carbon dioxide and heat
|
||||
|
||||
//remove and add gasses as calculated
|
||||
var/used_gas_fuel = between(0.25, used_fuel*(gas_reaction_progress/total_reaction_progress), gas_fuel) //remove in proportion to the relative reaction progress
|
||||
var/used_liquid_fuel = between(0.25, used_fuel-used_gas_fuel, liquid_fuel)
|
||||
var/used_gas_fuel = min(max(0.25, used_fuel*(gas_reaction_progress/total_reaction_progress)), gas_fuel) //remove in proportion to the relative reaction progress
|
||||
var/used_liquid_fuel = min(max(0.25, used_fuel-used_gas_fuel), liquid_fuel)
|
||||
|
||||
//remove_by_flag() and adjust_gas() handle the group_multiplier for us.
|
||||
remove_by_flag(XGM_GAS_OXIDIZER, used_oxidizers)
|
||||
@@ -309,10 +314,10 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
zone.remove_liquidfuel(used_liquid_fuel, !check_combustability())
|
||||
|
||||
//calculate the energy produced by the reaction and then set the new temperature of the mix
|
||||
temperature = (starting_energy + vsc.fire_fuel_energy_release * used_fuel) / heat_capacity()
|
||||
temperature = (starting_energy + vsc.fire_fuel_energy_release * (used_gas_fuel + used_liquid_fuel)) / heat_capacity()
|
||||
|
||||
#ifdef FIREDBG
|
||||
log_debug("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_gas_fuel+used_liquid_fuel]")
|
||||
log_debug("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_fuel]")
|
||||
log_debug("new temperature = [temperature]")
|
||||
#endif
|
||||
|
||||
@@ -353,7 +358,7 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
||||
|
||||
. = 0
|
||||
for(var/g in gas)
|
||||
if(gas_data.flags[g] & XGM_GAS_FUEL && QUANTIZE(gas[g] * vsc.fire_consuption_rate) >= 0.1)
|
||||
if(gas_data.flags[g] & XGM_GAS_FUEL && QUANTIZE(gas[g] * vsc.fire_consuption_rate) >= 0.005)
|
||||
. = 1
|
||||
break
|
||||
|
||||
|
||||
2
code/__defines/_macros.dm
Normal file
2
code/__defines/_macros.dm
Normal file
@@ -0,0 +1,2 @@
|
||||
#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x))
|
||||
#define CLAMP01(x) (Clamp(x, 0, 1))
|
||||
@@ -80,6 +80,8 @@ var/list/be_special_flags = list(
|
||||
#define MODE_MALFUNCTION "malf"
|
||||
#define MODE_TRAITOR "traitor"
|
||||
|
||||
#define DEFAULT_TELECRYSTAL_AMOUNT 12
|
||||
|
||||
/////////////////
|
||||
////WIZARD //////
|
||||
/////////////////
|
||||
|
||||
@@ -97,10 +97,13 @@
|
||||
|
||||
// Inventory slot strings.
|
||||
// since numbers cannot be used as associative list keys.
|
||||
#define slot_back_str "back"
|
||||
//icon_back, icon_l_hand, etc would be much better names for these...
|
||||
#define slot_back_str "slot_back"
|
||||
#define slot_l_hand_str "slot_l_hand"
|
||||
#define slot_r_hand_str "slot_r_hand"
|
||||
#define slot_w_uniform_str "w_uniform"
|
||||
#define slot_w_uniform_str "slot_w_uniform"
|
||||
#define slot_head_str "slot_head"
|
||||
#define slot_wear_suit_str "slot_suit"
|
||||
|
||||
// Bitflags for clothing parts.
|
||||
#define HEAD 1
|
||||
|
||||
6
code/__defines/lighting.dm
Normal file
6
code/__defines/lighting.dm
Normal 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
|
||||
@@ -48,6 +48,7 @@ var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret")
|
||||
#define NETWORK_RESEARCH "Research"
|
||||
#define NETWORK_RESEARCH_OUTPOST "Research Outpost"
|
||||
#define NETWORK_PRISON "Prison"
|
||||
#define NETWORK_ROBOTS "Robots"
|
||||
#define NETWORK_SECURITY "Security"
|
||||
#define NETWORK_TELECOM "Tcomsat"
|
||||
#define NETWORK_THUNDER "thunder"
|
||||
|
||||
@@ -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
|
||||
@@ -117,8 +117,8 @@
|
||||
#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 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 +154,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.
|
||||
|
||||
@@ -83,4 +83,14 @@
|
||||
|
||||
|
||||
#define MIN_SUPPLIED_LAW_NUMBER 15
|
||||
#define MAX_SUPPLIED_LAW_NUMBER 50
|
||||
#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'
|
||||
|
||||
@@ -44,4 +44,5 @@
|
||||
#define NONGLOBAL 32 // Do not add to general languages list.
|
||||
#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 NO_STUTTER 256 // No stuttering, slurring, or other speech problems
|
||||
#define COMMON_VERBS 512 // Robots will apply regular verbs to this
|
||||
|
||||
@@ -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
|
||||
@@ -136,4 +127,4 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
|
||||
return (val & (val-1)) == 0
|
||||
|
||||
/proc/RoundUpToPowerOfTwo(var/val)
|
||||
return 2 ** -round(-log(2,val))
|
||||
return 2 ** -round(-log(2,val))
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ var/roundstart_hour = 0
|
||||
//Returns the world time in english
|
||||
proc/worldtime2text(time = world.time)
|
||||
if(!roundstart_hour) roundstart_hour = pick(2,7,12,17)
|
||||
return "[round(time / 36000)+roundstart_hour]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
|
||||
return "[(round(time / 36000)+roundstart_hour) % 24]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
|
||||
|
||||
proc/worlddate2text()
|
||||
return num2text((text2num(time2text(world.timeofday, "YYYY"))+544)) + "-" + time2text(world.timeofday, "MM-DD")
|
||||
|
||||
@@ -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")
|
||||
|
||||
. = ""
|
||||
while(num > 0)
|
||||
var/hexdigit = hexdigits[(num & 0xF) + 1]
|
||||
. = "[hexdigit][.]"
|
||||
num >>= 4 //go to the next half-byte
|
||||
|
||||
if (!isnum(num))
|
||||
return
|
||||
|
||||
// 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)
|
||||
|
||||
@@ -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()
|
||||
@@ -888,6 +871,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)
|
||||
@@ -941,7 +926,8 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
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
|
||||
@@ -981,12 +967,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 +982,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 +1273,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
|
||||
|
||||
@@ -80,8 +80,10 @@
|
||||
return
|
||||
|
||||
if(in_throw_mode)
|
||||
throw_item(A)
|
||||
return
|
||||
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
|
||||
@@ -115,7 +117,7 @@
|
||||
if(W.flags&USEDELAY)
|
||||
next_move += 5
|
||||
|
||||
var/resolved = A.attackby(W,src)
|
||||
var/resolved = W.resolve_attackby(A, src)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params) // 1 indicates adjacency
|
||||
else
|
||||
@@ -136,7 +138,7 @@
|
||||
next_move += 5
|
||||
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = A.attackby(W,src)
|
||||
var/resolved = W.resolve_attackby(A,src)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
|
||||
else
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -74,135 +74,104 @@ var/const/tk_maxrange = 15
|
||||
var/atom/movable/focus = null
|
||||
var/mob/living/host = null
|
||||
|
||||
/obj/item/tk_grab/dropped(mob/user as mob)
|
||||
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
|
||||
if(focus.Adjacent(loc))
|
||||
focus.loc = loc
|
||||
loc = null
|
||||
spawn(1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
dropped(mob/user as mob)
|
||||
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
|
||||
if(focus.Adjacent(loc))
|
||||
focus.loc = loc
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
/obj/item/tk_grab/equipped(var/mob/user, var/slot)
|
||||
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/tk_grab/attack_self(mob/user as mob)
|
||||
if(focus)
|
||||
focus.attack_self_tk(user)
|
||||
|
||||
/obj/item/tk_grab/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
|
||||
if(!target || !user) return
|
||||
if(last_throw+3 > world.time) return
|
||||
if(!host || host != user)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
equipped(var/mob/user, var/slot)
|
||||
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
|
||||
if(!(TK in host.mutations))
|
||||
qdel(src)
|
||||
return
|
||||
if(isobj(target) && !isturf(target.loc))
|
||||
return
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(focus)
|
||||
focus.attack_self_tk(user)
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
|
||||
if(!target || !user) return
|
||||
if(last_throw+3 > world.time) return
|
||||
if(!host || host != user)
|
||||
qdel(src)
|
||||
return
|
||||
if(!(TK in host.mutations))
|
||||
qdel(src)
|
||||
return
|
||||
if(isobj(target) && !isturf(target.loc))
|
||||
return
|
||||
|
||||
var/d = get_dist(user, target)
|
||||
if(focus) d = max(d,get_dist(user,focus)) // whichever is further
|
||||
switch(d)
|
||||
if(0)
|
||||
;
|
||||
if(1 to 5) // not adjacent may mean blocked by window
|
||||
if(!proximity)
|
||||
user.next_move += 2
|
||||
if(5 to 7)
|
||||
user.next_move += 5
|
||||
if(8 to tk_maxrange)
|
||||
user.next_move += 10
|
||||
else
|
||||
user << "<span class='notice'>Your mind won't reach that far.</span>"
|
||||
return
|
||||
|
||||
if(!focus)
|
||||
focus_object(target, user)
|
||||
return
|
||||
|
||||
if(target == focus)
|
||||
target.attack_self_tk(user)
|
||||
return // todo: something like attack_self not laden with assumptions inherent to attack_self
|
||||
|
||||
|
||||
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
|
||||
var/obj/item/I = focus
|
||||
var/resolved = target.attackby(I, user, user:get_organ_target())
|
||||
if(!resolved && target && I)
|
||||
I.afterattack(target,user,1) // for splashing with beakers
|
||||
|
||||
|
||||
var/d = get_dist(user, target)
|
||||
if(focus) d = max(d,get_dist(user,focus)) // whichever is further
|
||||
switch(d)
|
||||
if(0)
|
||||
;
|
||||
if(1 to 5) // not adjacent may mean blocked by window
|
||||
if(!proximity)
|
||||
user.next_move += 2
|
||||
if(5 to 7)
|
||||
user.next_move += 5
|
||||
if(8 to tk_maxrange)
|
||||
user.next_move += 10
|
||||
else
|
||||
apply_focus_overlay()
|
||||
focus.throw_at(target, 10, 1, user)
|
||||
last_throw = world.time
|
||||
return
|
||||
|
||||
attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
return
|
||||
|
||||
|
||||
proc/focus_object(var/obj/target, var/mob/living/user)
|
||||
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
|
||||
if(target.anchored || !isturf(target.loc))
|
||||
qdel(src)
|
||||
user << "<span class='notice'>Your mind won't reach that far.</span>"
|
||||
return
|
||||
focus = target
|
||||
update_icon()
|
||||
|
||||
if(!focus)
|
||||
focus_object(target, user)
|
||||
return
|
||||
|
||||
if(target == focus)
|
||||
target.attack_self_tk(user)
|
||||
return // todo: something like attack_self not laden with assumptions inherent to attack_self
|
||||
|
||||
|
||||
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
|
||||
var/obj/item/I = focus
|
||||
var/resolved = target.attackby(I, user, user:get_organ_target())
|
||||
if(!resolved && target && I)
|
||||
I.afterattack(target,user,1) // for splashing with beakers
|
||||
else
|
||||
apply_focus_overlay()
|
||||
focus.throw_at(target, 10, 1, user)
|
||||
last_throw = world.time
|
||||
return
|
||||
|
||||
/obj/item/tk_grab/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/tk_grab/proc/focus_object(var/obj/target, var/mob/living/user)
|
||||
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
|
||||
if(target.anchored || !isturf(target.loc))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
proc/apply_focus_overlay()
|
||||
if(!focus) return
|
||||
var/obj/effect/overlay/O = PoolOrNew(/obj/effect/overlay, locate(focus.x,focus.y,focus.z))
|
||||
O.name = "sparkles"
|
||||
O.anchored = 1
|
||||
O.density = 0
|
||||
O.layer = FLY_LAYER
|
||||
O.set_dir(pick(cardinal))
|
||||
O.icon = 'icons/effects/effects.dmi'
|
||||
O.icon_state = "nothing"
|
||||
flick("empdisable",O)
|
||||
spawn(5)
|
||||
qdel(O)
|
||||
return
|
||||
|
||||
|
||||
focus = target
|
||||
update_icon()
|
||||
overlays.Cut()
|
||||
if(focus && focus.icon && focus.icon_state)
|
||||
overlays += icon(focus.icon,focus.icon_state)
|
||||
return
|
||||
apply_focus_overlay()
|
||||
return
|
||||
|
||||
/*Not quite done likely needs to use something thats not get_step_to
|
||||
proc/check_path()
|
||||
var/turf/ref = get_turf(src.loc)
|
||||
var/turf/target = get_turf(focus.loc)
|
||||
if(!ref || !target) return 0
|
||||
var/distance = get_dist(ref, target)
|
||||
if(distance >= 10) return 0
|
||||
for(var/i = 1 to distance)
|
||||
ref = get_step_to(ref, target, 0)
|
||||
if(ref != target) return 0
|
||||
return 1
|
||||
*/
|
||||
|
||||
//equip_to_slot_or_del(obj/item/W, slot, del_on_fail = 1)
|
||||
/*
|
||||
if(istype(user, /mob/living/carbon))
|
||||
if(user:mutations & TK && get_dist(source, user) <= 7)
|
||||
if(user:get_active_hand()) return 0
|
||||
var/X = source:x
|
||||
var/Y = source:y
|
||||
var/Z = source:z
|
||||
|
||||
*/
|
||||
/obj/item/tk_grab/proc/apply_focus_overlay()
|
||||
if(!focus) return
|
||||
var/obj/effect/overlay/O = PoolOrNew(/obj/effect/overlay, locate(focus.x,focus.y,focus.z))
|
||||
O.name = "sparkles"
|
||||
O.anchored = 1
|
||||
O.density = 0
|
||||
O.layer = FLY_LAYER
|
||||
O.set_dir(pick(cardinal))
|
||||
O.icon = 'icons/effects/effects.dmi'
|
||||
O.icon_state = "nothing"
|
||||
flick("empdisable",O)
|
||||
spawn(5)
|
||||
qdel(O)
|
||||
return
|
||||
|
||||
/obj/item/tk_grab/update_icon()
|
||||
overlays.Cut()
|
||||
if(focus && focus.icon && focus.icon_state)
|
||||
overlays += icon(focus.icon,focus.icon_state)
|
||||
return
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -199,3 +254,7 @@ var/list/delayed_garbage = list()
|
||||
#ifdef GC_DEBUG
|
||||
#undef GC_DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef GC_FINDREF
|
||||
#undef GC_FINDREF
|
||||
#endif
|
||||
|
||||
@@ -297,7 +297,7 @@ var/global/datum/controller/radio/radio_controller
|
||||
devices_line -= null
|
||||
if (devices_line.len==0)
|
||||
devices -= devices_filter
|
||||
qdel(devices_line)
|
||||
del(devices_line)
|
||||
|
||||
/datum/signal
|
||||
var/obj/source
|
||||
|
||||
@@ -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
|
||||
@@ -91,6 +96,7 @@ var/list/gamemode_cache = list()
|
||||
var/guests_allowed = 1
|
||||
var/debugparanoid = 0
|
||||
|
||||
var/serverurl
|
||||
var/server
|
||||
var/banappeals
|
||||
var/wikiurl
|
||||
@@ -115,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.
|
||||
@@ -163,6 +171,7 @@ var/list/gamemode_cache = list()
|
||||
|
||||
var/use_irc_bot = 0
|
||||
var/irc_bot_host = ""
|
||||
var/irc_bot_export = 0 // whether the IRC bot in use is a Bot32 (or similar) instance; Bot32 uses world.Export() instead of nudge.py/libnudge
|
||||
var/main_irc = ""
|
||||
var/admin_irc = ""
|
||||
var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
|
||||
@@ -316,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
|
||||
|
||||
@@ -385,6 +391,9 @@ var/list/gamemode_cache = list()
|
||||
if ("hostedby")
|
||||
config.hostedby = value
|
||||
|
||||
if ("serverurl")
|
||||
config.serverurl = value
|
||||
|
||||
if ("server")
|
||||
config.server = value
|
||||
|
||||
@@ -467,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
|
||||
|
||||
@@ -500,6 +527,9 @@ var/list/gamemode_cache = list()
|
||||
if("use_irc_bot")
|
||||
use_irc_bot = 1
|
||||
|
||||
if("irc_bot_export")
|
||||
irc_bot_export = 1
|
||||
|
||||
if("ticklag")
|
||||
Ticklag = text2num(value)
|
||||
|
||||
@@ -681,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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -188,9 +188,9 @@ datum/controller/vote
|
||||
if(mode)
|
||||
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
|
||||
return 0
|
||||
if(current_votes[ckey])
|
||||
choices[choices[current_votes[ckey]]]--
|
||||
if(vote && 1<=vote && vote<=choices.len)
|
||||
if(vote && vote >= 1 && vote <= choices.len)
|
||||
if(current_votes[ckey])
|
||||
choices[choices[current_votes[ckey]]]--
|
||||
voted += usr.ckey
|
||||
choices[choices[vote]]++ //check this
|
||||
current_votes[ckey] = vote
|
||||
@@ -237,7 +237,7 @@ datum/controller/vote
|
||||
return 0
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
if(!(antag.id in additional_antag_types) && (antag.flags & ANTAG_VOTABLE))
|
||||
if(!(antag.id in additional_antag_types) && antag.is_votable())
|
||||
choices.Add(antag.role_text)
|
||||
choices.Add("None")
|
||||
if("custom")
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
|
||||
if(H.mind && (H.mind.assigned_role != "MODE"))
|
||||
if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1))
|
||||
var/assignment
|
||||
if(H.mind.role_alt_title)
|
||||
assignment = H.mind.role_alt_title
|
||||
@@ -138,9 +138,160 @@
|
||||
|
||||
|
||||
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)
|
||||
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
|
||||
switch(H.mind.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)
|
||||
|
||||
return preview_icon
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
if(href_list["add_antagonist"])
|
||||
var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]]
|
||||
if(antag) antag.add_antagonist(src)
|
||||
if(antag) antag.add_antagonist(src, 1, 1, 0, 1, 1) // Ignore equipment and role type for this.
|
||||
|
||||
else if(href_list["remove_antagonist"])
|
||||
var/datum/antagonist/antag = all_antag_types[href_list["remove_antagonist"]]
|
||||
@@ -213,7 +213,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 +222,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
|
||||
|
||||
@@ -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
|
||||
@@ -1115,42 +1117,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "Formalwear for the best occasions."
|
||||
group = "Miscellaneous"
|
||||
|
||||
/datum/supply_packs/rust_injector
|
||||
contains = list(/obj/machinery/power/rust_fuel_injector)
|
||||
name = "RUST fuel injector"
|
||||
cost = 50
|
||||
containertype = /obj/structure/closet/crate/secure/large
|
||||
containername = "RUST injector crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_compressor
|
||||
contains = list(/obj/item/weapon/module/rust_fuel_compressor)
|
||||
name = "RUST fuel compressor circuitry"
|
||||
cost = 60
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "RUST fuel compressor circuitry"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_assembly_port
|
||||
contains = list(/obj/item/weapon/module/rust_fuel_port)
|
||||
name = "RUST fuel assembly port circuitry"
|
||||
cost = 40
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "RUST fuel assembly port circuitry"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_core
|
||||
contains = list(/obj/machinery/power/rust_core)
|
||||
name = "RUST Tokamak Core"
|
||||
cost = 75
|
||||
containertype = /obj/structure/closet/crate/secure/large
|
||||
containername = "RUST tokamak crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/shield_gen
|
||||
contains = list(/obj/item/weapon/circuitboard/shield_gen)
|
||||
name = "Bubble shield generator circuitry"
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
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)
|
||||
@@ -310,7 +310,7 @@ var/global/ManifestJSON
|
||||
item_state = "beachball"
|
||||
density = 0
|
||||
anchored = 0
|
||||
w_class = 2.0
|
||||
w_class = 4
|
||||
force = 0.0
|
||||
throwforce = 0.0
|
||||
throw_speed = 1
|
||||
|
||||
@@ -61,7 +61,7 @@ proc/can_process_hud(var/mob/M)
|
||||
return 1
|
||||
|
||||
//Deletes the current HUD images so they can be refreshed with new ones.
|
||||
mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs.
|
||||
mob/proc/handle_regular_hud_updates() //Used in the life.dm of mobs that can use HUDs.
|
||||
if(client)
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud")
|
||||
|
||||
83
code/game/antagonist/_antagonist_setup.dm
Normal file
83
code/game/antagonist/_antagonist_setup.dm
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
MODULAR ANTAGONIST SYSTEM
|
||||
|
||||
Attempts to move all the bullshit snowflake antag tracking code into its own system, which
|
||||
has the added bonus of making the display procs consistent. Still needs work/adjustment/cleanup
|
||||
but should be fairly self-explanatory with a review of the procs. Will supply a few examples
|
||||
of common tasks that the system will be expected to perform below. ~Z
|
||||
|
||||
To use:
|
||||
- Get the appropriate datum via get_antag_data("antagonist id")
|
||||
using the id var of the desired /datum/antagonist ie. var/datum/antagonist/A = get_antag_data("traitor")
|
||||
- Call add_antagonist() on the desired target mind ie. A.add_antagonist(mob.mind)
|
||||
- To ignore protected roles, supply a positive second argument.
|
||||
- To skip equipping with appropriate gear, supply a positive third argument.
|
||||
*/
|
||||
|
||||
// Antagonist datum flags.
|
||||
#define ANTAG_OVERRIDE_JOB 1 // Assigned job is set to MODE when spawning.
|
||||
#define ANTAG_OVERRIDE_MOB 2 // Mob is recreated from datum mob_type var when spawning.
|
||||
#define ANTAG_CLEAR_EQUIPMENT 4 // All preexisting equipment is purged.
|
||||
#define ANTAG_CHOOSE_NAME 8 // Antagonists are prompted to enter a name.
|
||||
#define ANTAG_IMPLANT_IMMUNE 16 // Cannot be loyalty implanted.
|
||||
#define ANTAG_SUSPICIOUS 32 // Shows up on roundstart report.
|
||||
#define ANTAG_HAS_LEADER 64 // Generates a leader antagonist.
|
||||
#define ANTAG_HAS_NUKE 128 // Will spawn a nuke at supplied location.
|
||||
#define ANTAG_RANDSPAWN 256 // Potentially randomly spawns due to events.
|
||||
#define ANTAG_VOTABLE 512 // Can be voted as an additional antagonist before roundstart.
|
||||
#define ANTAG_SET_APPEARANCE 1024 // Causes antagonists to use an appearance modifier on spawn.
|
||||
|
||||
// Globals.
|
||||
var/global/list/all_antag_types = list()
|
||||
var/global/list/all_antag_spawnpoints = list()
|
||||
var/global/list/antag_names_to_ids = list()
|
||||
|
||||
// Global procs.
|
||||
/proc/get_antag_data(var/antag_type)
|
||||
if(all_antag_types[antag_type])
|
||||
return all_antag_types[antag_type]
|
||||
else
|
||||
for(var/cur_antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[cur_antag_type]
|
||||
if(antag && antag.is_type(antag_type))
|
||||
return antag
|
||||
|
||||
/proc/clear_antag_roles(var/datum/mind/player, var/implanted)
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
if(!implanted || !(antag.flags & ANTAG_IMPLANT_IMMUNE))
|
||||
antag.remove_antagonist(player, 1, implanted)
|
||||
|
||||
/proc/update_antag_icons(var/datum/mind/player)
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
if(player)
|
||||
antag.update_icons_removed(player)
|
||||
if(antag.is_antagonist(player))
|
||||
antag.update_icons_added(player)
|
||||
else
|
||||
antag.update_all_icons()
|
||||
|
||||
/proc/populate_antag_type_list()
|
||||
for(var/antag_type in typesof(/datum/antagonist)-/datum/antagonist)
|
||||
var/datum/antagonist/A = new antag_type
|
||||
all_antag_types[A.id] = A
|
||||
all_antag_spawnpoints[A.landmark_id] = list()
|
||||
antag_names_to_ids[A.role_text] = A.id
|
||||
|
||||
/proc/get_antags(var/atype)
|
||||
var/datum/antagonist/antag = all_antag_types[atype]
|
||||
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
|
||||
@@ -26,12 +26,12 @@ var/datum/antagonist/xenos/xenomorphs
|
||||
/datum/antagonist/xenos/Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
if(href_list["move_to_spawn"]) place_mob(href_list["move_to_spawn"])
|
||||
if(href_list["move_to_spawn"]) place_mob(locate(href_list["move_to_spawn"]))
|
||||
|
||||
/datum/antagonist/xenos/get_extra_panel_options(var/datum/mind/player)
|
||||
return "<a href='?src=\ref[src];move_to_spawn=\ref[player.current]'>\[move to vent\]</a>"
|
||||
|
||||
/datum/antagonist/xenos/random_spawn()
|
||||
/datum/antagonist/xenos/attempt_random_spawn()
|
||||
if(config.aliens_allowed) ..()
|
||||
|
||||
/datum/antagonist/xenos/proc/get_vents()
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
var/nuke_spawn_loc
|
||||
|
||||
var/list/valid_species = list("Unathi","Tajara","Skrell","Human") // Used for setting appearance.
|
||||
var/list/starting_locations = list()
|
||||
var/list/current_antagonists = list()
|
||||
var/list/pending_antagonists = list()
|
||||
var/list/starting_locations = list()
|
||||
var/list/global_objectives = list()
|
||||
var/list/restricted_jobs = list()
|
||||
var/list/protected_jobs = list()
|
||||
@@ -42,209 +43,107 @@
|
||||
|
||||
var/default_access = list()
|
||||
var/id_type = /obj/item/weapon/card/id
|
||||
var/announced
|
||||
|
||||
/datum/antagonist/New()
|
||||
..()
|
||||
cur_max = max_antags
|
||||
get_starting_locations()
|
||||
if(!role_text_plural)
|
||||
role_text_plural = role_text
|
||||
if(config.protect_roles_from_antagonist)
|
||||
restricted_jobs |= protected_jobs
|
||||
|
||||
/datum/antagonist/proc/tick()
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/get_panel_entry(var/datum/mind/player)
|
||||
/datum/antagonist/proc/get_candidates(var/ghosts_only)
|
||||
candidates = list() // Clear.
|
||||
candidates = ticker.mode.get_players_for_role(role_type, id)
|
||||
// Prune restricted status. Broke it up for readability.
|
||||
// Note that this is done before jobs are handed out.
|
||||
for(var/datum/mind/player in candidates)
|
||||
if(ghosts_only && !istype(player.current, /mob/dead))
|
||||
candidates -= player
|
||||
else if(player.special_role)
|
||||
candidates -= player
|
||||
else if (player in pending_antagonists)
|
||||
candidates -= player
|
||||
else if(!can_become_antag(player))
|
||||
candidates -= player
|
||||
else if(player_is_antag(player))
|
||||
candidates -= player
|
||||
return candidates
|
||||
|
||||
var/dat = "<tr><td><b>[role_text]:</b>"
|
||||
var/extra = get_extra_panel_options(player)
|
||||
if(is_antagonist(player))
|
||||
dat += "<a href='?src=\ref[player];remove_antagonist=[id]'>\[-\]</a>"
|
||||
dat += "<a href='?src=\ref[player];equip_antagonist=[id]'>\[equip\]</a>"
|
||||
if(starting_locations && starting_locations.len)
|
||||
dat += "<a href='?src=\ref[player];move_antag_to_spawn=[id]'>\[move to spawn\]</a>"
|
||||
if(extra) dat += "[extra]"
|
||||
/datum/antagonist/proc/attempt_random_spawn()
|
||||
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())
|
||||
return
|
||||
if(!istype(player)) player = get_candidates(is_latejoin_template())
|
||||
player.current << "<span class='danger'><i>You have been selected this round as an antagonist!</i></span>"
|
||||
if(istype(player.current, /mob/dead))
|
||||
create_default(player.current)
|
||||
else
|
||||
dat += "<a href='?src=\ref[player];add_antagonist=[id]'>\[+\]</a>"
|
||||
dat += "</td></tr>"
|
||||
|
||||
return dat
|
||||
|
||||
/datum/antagonist/proc/get_extra_panel_options()
|
||||
add_antagonist(player,0,1,0,1,1)
|
||||
return
|
||||
|
||||
/datum/antagonist/proc/get_starting_locations()
|
||||
if(landmark_id)
|
||||
starting_locations = list()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == landmark_id)
|
||||
starting_locations |= get_turf(L)
|
||||
/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)
|
||||
|
||||
/datum/antagonist/proc/place_all_mobs()
|
||||
if(!starting_locations || !starting_locations.len || !current_antagonists || !current_antagonists.len)
|
||||
return
|
||||
for(var/datum/mind/player in current_antagonists)
|
||||
player.current.loc = pick(starting_locations)
|
||||
//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)
|
||||
|
||||
/datum/antagonist/proc/finalize(var/datum/mind/target)
|
||||
|
||||
// This will fail if objectives have already been generated.
|
||||
create_global_objectives()
|
||||
|
||||
if(leader && flags & ANTAG_HAS_NUKE && !spawned_nuke)
|
||||
make_nuke(leader)
|
||||
|
||||
if(target)
|
||||
apply(target)
|
||||
create_objectives(target)
|
||||
update_icons_added(target)
|
||||
greet(target)
|
||||
return
|
||||
|
||||
for(var/datum/mind/player in current_antagonists)
|
||||
apply(player)
|
||||
equip(player.current)
|
||||
create_objectives(player)
|
||||
update_icons_added(player)
|
||||
greet(player)
|
||||
|
||||
place_all_mobs()
|
||||
|
||||
spawn(1)
|
||||
if(spawn_announcement)
|
||||
if(spawn_announcement_delay)
|
||||
sleep(spawn_announcement_delay)
|
||||
if(spawn_announcement_sound)
|
||||
command_announcement.Announce("[spawn_announcement]", "[spawn_announcement_title ? spawn_announcement_title : "Priority Alert"]", new_sound = spawn_announcement_sound)
|
||||
else
|
||||
command_announcement.Announce("[spawn_announcement]", "[spawn_announcement_title ? spawn_announcement_title : "Priority Alert"]")
|
||||
|
||||
|
||||
/datum/antagonist/proc/print_player_summary()
|
||||
|
||||
if(!current_antagonists.len)
|
||||
// Update our boundaries.
|
||||
if(!candidates.len)
|
||||
return 0
|
||||
|
||||
var/text = "<br><font size = 2><b>The [current_antagonists.len == 1 ? "[role_text] was" : "[role_text_plural] were"]:</b></font>"
|
||||
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/num = 1
|
||||
for(var/datum/objective/O in P.objectives)
|
||||
text += print_objective(O, num)
|
||||
if(O.completed) // This is set actively in check_victory()
|
||||
text += "<font color='green'><B>Success!</B></font>"
|
||||
feedback_add_details(feedback_tag,"[O.type]|SUCCESS")
|
||||
else
|
||||
text += "<font color='red'>Fail.</font>"
|
||||
feedback_add_details(feedback_tag,"[O.type]|FAIL")
|
||||
failed = 1
|
||||
num++
|
||||
//Grab candidates randomly until we have enough.
|
||||
while(candidates.len && pending_antagonists.len < cur_max)
|
||||
var/datum/mind/player = pick(candidates)
|
||||
candidates -= player
|
||||
draft_antagonist(player)
|
||||
|
||||
if(!config.objectives_disabled)
|
||||
if(failed)
|
||||
text += "<br><font color='red'><B>The [role_text] has failed.</B></font>"
|
||||
else
|
||||
text += "<br><font color='green'><B>The [role_text] was successful!</B></font>"
|
||||
return 1
|
||||
|
||||
if(global_objectives && global_objectives.len)
|
||||
text += "<BR/><FONT size = 2>Their objectives were:<FONT>"
|
||||
var/num = 1
|
||||
for(var/datum/objective/O in global_objectives)
|
||||
text += print_objective(O, num, 1)
|
||||
num++
|
||||
/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)
|
||||
return 0
|
||||
|
||||
// Display the results.
|
||||
world << text
|
||||
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
|
||||
|
||||
/datum/antagonist/proc/print_objective(var/datum/objective/O, var/num, var/append_success)
|
||||
var/text = "<br><b>Objective [num]:</b> [O.explanation_text] "
|
||||
if(append_success)
|
||||
if(O.check_completion())
|
||||
text += "<font color='green'><B>Success!</B></font>"
|
||||
else
|
||||
text += "<font color='red'>Fail.</font>"
|
||||
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/text = "<br><b>[ply.name]</b> (<b>[ply.key]</b>) as \a <b>[role]</b> ("
|
||||
if(ply.current)
|
||||
if(ply.current.stat == DEAD)
|
||||
text += "died"
|
||||
else if(isNotStationLevel(ply.current.z))
|
||||
text += "fled the station"
|
||||
else
|
||||
text += "survived"
|
||||
if(ply.current.real_name != ply.name)
|
||||
text += " as <b>[ply.current.real_name]</b>"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
|
||||
return text
|
||||
|
||||
/datum/antagonist/proc/print_player_full(var/datum/mind/ply)
|
||||
var/text = print_player_lite(ply)
|
||||
|
||||
var/TC_uses = 0
|
||||
var/uplink_true = 0
|
||||
var/purchases = ""
|
||||
for(var/obj/item/device/uplink/H in world_uplinks)
|
||||
if(H && H.uplink_owner && H.uplink_owner == ply)
|
||||
TC_uses += H.used_TC
|
||||
uplink_true = 1
|
||||
var/list/refined_log = new()
|
||||
for(var/datum/uplink_item/UI in H.purchase_log)
|
||||
var/obj/I = new UI.path
|
||||
refined_log.Add("[H.purchase_log[UI]]x\icon[I][UI.name]")
|
||||
qdel(I)
|
||||
purchases = english_list(refined_log, nothing_text = "")
|
||||
if(uplink_true)
|
||||
text += " (used [TC_uses] TC)"
|
||||
if(purchases)
|
||||
text += "<br>[purchases]"
|
||||
|
||||
return text
|
||||
|
||||
/datum/antagonist/proc/update_all_icons()
|
||||
if(!antag_indicator)
|
||||
//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)
|
||||
return
|
||||
for(var/datum/mind/antag in current_antagonists)
|
||||
if(antag.current && antag.current.client)
|
||||
for(var/image/I in antag.current.client.images)
|
||||
if(I.icon_state == antag_indicator)
|
||||
qdel(I)
|
||||
for(var/datum/mind/other_antag in current_antagonists)
|
||||
if(other_antag.current)
|
||||
antag.current.client.images |= image('icons/mob/mob.dmi', loc = other_antag.current, icon_state = antag_indicator)
|
||||
|
||||
/datum/antagonist/proc/update_icons_added(var/datum/mind/player)
|
||||
if(!antag_indicator || !player.current)
|
||||
return
|
||||
spawn(0)
|
||||
for(var/datum/mind/antag in current_antagonists)
|
||||
if(!antag.current)
|
||||
continue
|
||||
if(antag.current.client)
|
||||
antag.current.client.images |= image('icons/mob/mob.dmi', loc = player.current, icon_state = antag_indicator)
|
||||
if(player.current.client)
|
||||
player.current.client.images |= image('icons/mob/mob.dmi', loc = antag.current, icon_state = antag_indicator)
|
||||
|
||||
/datum/antagonist/proc/update_icons_removed(var/datum/mind/player)
|
||||
if(!antag_indicator || !player.current)
|
||||
return
|
||||
spawn(0)
|
||||
for(var/datum/mind/antag in current_antagonists)
|
||||
if(antag.current)
|
||||
if(antag.current.client)
|
||||
for(var/image/I in antag.current.client.images)
|
||||
if(I.icon_state == antag_indicator && I.loc == player.current)
|
||||
qdel(I)
|
||||
if(player.current && player.current.client)
|
||||
for(var/image/I in player.current.client.images)
|
||||
if(I.icon_state == antag_indicator)
|
||||
qdel(I)
|
||||
|
||||
for(var/datum/mind/player in pending_antagonists)
|
||||
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()
|
||||
|
||||
34
code/game/antagonist/antagonist_add.dm
Normal file
34
code/game/antagonist/antagonist_add.dm
Normal file
@@ -0,0 +1,34 @@
|
||||
/datum/antagonist/proc/add_antagonist(var/datum/mind/player, var/ignore_role, var/do_not_equip, var/move_to_spawn, var/do_not_announce, var/preserve_appearance)
|
||||
if(!istype(player))
|
||||
return 0
|
||||
if(!player.current)
|
||||
return 0
|
||||
if(player in current_antagonists)
|
||||
return 0
|
||||
if(!can_become_antag(player, ignore_role))
|
||||
return 0
|
||||
|
||||
current_antagonists |= player
|
||||
|
||||
//do this again, just in case
|
||||
if(flags & ANTAG_OVERRIDE_JOB)
|
||||
player.assigned_role = role_text
|
||||
player.special_role = role_text
|
||||
|
||||
if(istype(player.current, /mob/dead))
|
||||
create_default(player.current)
|
||||
else
|
||||
create_antagonist(player, move_to_spawn, do_not_announce, preserve_appearance)
|
||||
if(!do_not_equip)
|
||||
equip(player.current)
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted)
|
||||
if(player in current_antagonists)
|
||||
player.current << "<span class='danger'><font size = 3>You are no longer a [role_text]!</font></span>"
|
||||
current_antagonists -= player
|
||||
player.special_role = null
|
||||
update_icons_removed(player)
|
||||
BITSET(player.current.hud_updateflag, SPECIALROLE_HUD)
|
||||
return 1
|
||||
return 0
|
||||
@@ -1,127 +0,0 @@
|
||||
/datum/antagonist/proc/create_objectives(var/datum/mind/player)
|
||||
if(config.objectives_disabled)
|
||||
return 0
|
||||
if(global_objectives && global_objectives.len)
|
||||
player.objectives |= global_objectives
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/apply(var/datum/mind/player)
|
||||
|
||||
if(flags & ANTAG_HAS_LEADER && !leader)
|
||||
leader = current_antagonists[1]
|
||||
|
||||
// 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))
|
||||
player.transfer_to(player.current)
|
||||
if(holder) qdel(holder)
|
||||
|
||||
player.original = player.current
|
||||
return player.current
|
||||
|
||||
/datum/antagonist/proc/equip(var/mob/living/carbon/human/player)
|
||||
|
||||
if(!istype(player))
|
||||
return 0
|
||||
|
||||
// This could use work.
|
||||
if(flags & ANTAG_CLEAR_EQUIPMENT)
|
||||
for(var/obj/item/thing in player.contents)
|
||||
player.drop_from_inventory(thing)
|
||||
if(thing.loc != player)
|
||||
qdel(thing)
|
||||
return 1
|
||||
|
||||
if(flags & ANTAG_SET_APPEARANCE)
|
||||
player.change_appearance(APPEARANCE_ALL, player.loc, player, valid_species, state = z_state)
|
||||
|
||||
/datum/antagonist/proc/unequip(var/mob/living/carbon/human/player)
|
||||
if(!istype(player))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/greet(var/datum/mind/player)
|
||||
|
||||
// Basic intro text.
|
||||
player.current << "<span class='danger'><font size=3>You are a [role_text]!</font></span>"
|
||||
if(leader_welcome_text && player.current == leader)
|
||||
player.current << "<span class='notice'>[leader_welcome_text]</span>"
|
||||
else
|
||||
player.current << "<span class='notice'>[welcome_text]</span>"
|
||||
show_objectives(player)
|
||||
|
||||
// Choose a name, if any.
|
||||
if(flags & ANTAG_CHOOSE_NAME)
|
||||
spawn(5)
|
||||
var/newname = sanitize(input(player.current, "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.current.real_name = newname
|
||||
player.current.name = player.current.real_name
|
||||
player.name = player.current.name
|
||||
// Update any ID cards.
|
||||
update_access(player.current)
|
||||
|
||||
// Clown clumsiness check, I guess downstream might use it.
|
||||
if (player.current.mind)
|
||||
if (player.current.mind.assigned_role == "Clown")
|
||||
player.current << "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself."
|
||||
player.current.mutations.Remove(CLUMSY)
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/update_access(var/mob/living/player)
|
||||
for(var/obj/item/weapon/card/id/id in player.contents)
|
||||
id.name = "[player.real_name]'s ID Card"
|
||||
id.registered_name = player.real_name
|
||||
|
||||
/datum/antagonist/proc/random_spawn()
|
||||
create_global_objectives()
|
||||
attempt_spawn(flags & (ANTAG_OVERRIDE_MOB|ANTAG_OVERRIDE_JOB))
|
||||
finalize()
|
||||
|
||||
/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new id_type(player)
|
||||
if(!W) return
|
||||
W.name = "[player.real_name]'s ID Card"
|
||||
W.access |= default_access
|
||||
W.assignment = "[assignment]"
|
||||
W.registered_name = player.real_name
|
||||
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)
|
||||
R.set_frequency(freq)
|
||||
player.equip_to_slot_or_del(R, slot_l_ear)
|
||||
return R
|
||||
|
||||
/datum/antagonist/proc/make_nuke(var/atom/paper_spawn_loc, var/datum/mind/code_owner)
|
||||
|
||||
// Decide on a code.
|
||||
var/obj/effect/landmark/nuke_spawn = locate(nuke_spawn_loc ? nuke_spawn_loc : "landmark*Nuclear-Bomb")
|
||||
|
||||
var/code
|
||||
if(nuke_spawn)
|
||||
var/obj/machinery/nuclearbomb/nuke = new(get_turf(nuke_spawn))
|
||||
code = "[rand(10000, 99999)]"
|
||||
nuke.r_code = code
|
||||
|
||||
if(code)
|
||||
if(!paper_spawn_loc)
|
||||
paper_spawn_loc = get_turf(locate("landmark*Nuclear-Code"))
|
||||
if(paper_spawn_loc)
|
||||
// Create and pass on the bomb code paper.
|
||||
var/obj/item/weapon/paper/P = new(paper_spawn_loc)
|
||||
P.info = "The nuclear authorization code is: <b>[code]</b>"
|
||||
P.name = "nuclear bomb code"
|
||||
if(code_owner)
|
||||
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>"
|
||||
return
|
||||
|
||||
spawned_nuke = code
|
||||
return code
|
||||
124
code/game/antagonist/antagonist_create.dm
Normal file
124
code/game/antagonist/antagonist_create.dm
Normal file
@@ -0,0 +1,124 @@
|
||||
/datum/antagonist/proc/create_antagonist(var/datum/mind/target, var/move, var/gag_announcement, var/preserve_appearance)
|
||||
|
||||
if(!target)
|
||||
return
|
||||
|
||||
update_antag_mob(target, preserve_appearance)
|
||||
if(!target.current)
|
||||
remove_antagonist(target)
|
||||
return 0
|
||||
if(flags & ANTAG_CHOOSE_NAME)
|
||||
spawn(1)
|
||||
set_antag_name(target.current)
|
||||
if(move)
|
||||
place_mob(target.current)
|
||||
update_leader()
|
||||
create_objectives(target)
|
||||
update_icons_added(target)
|
||||
greet(target)
|
||||
announce_antagonist_spawn()
|
||||
|
||||
/datum/antagonist/proc/create_default(var/mob/source)
|
||||
var/mob/living/M
|
||||
if(mob_path)
|
||||
M = new mob_path(get_turf(source))
|
||||
else
|
||||
M = new /mob/living/carbon/human(get_turf(source))
|
||||
M.real_name = source.real_name
|
||||
M.name = M.real_name
|
||||
M.ckey = source.ckey
|
||||
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, 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
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
/datum/antagonist/proc/create_nuke(var/atom/paper_spawn_loc, var/datum/mind/code_owner)
|
||||
|
||||
// Decide on a code.
|
||||
var/obj/effect/landmark/nuke_spawn = locate(nuke_spawn_loc ? nuke_spawn_loc : "landmark*Nuclear-Bomb")
|
||||
|
||||
var/code
|
||||
if(nuke_spawn)
|
||||
var/obj/machinery/nuclearbomb/nuke = new(get_turf(nuke_spawn))
|
||||
code = "[rand(10000, 99999)]"
|
||||
nuke.r_code = code
|
||||
|
||||
if(code)
|
||||
if(!paper_spawn_loc)
|
||||
if(leader && leader.current)
|
||||
paper_spawn_loc = get_turf(leader.current)
|
||||
else
|
||||
paper_spawn_loc = get_turf(locate("landmark*Nuclear-Code"))
|
||||
|
||||
if(paper_spawn_loc)
|
||||
// Create and pass on the bomb code paper.
|
||||
var/obj/item/weapon/paper/P = new(paper_spawn_loc)
|
||||
P.info = "The nuclear authorization code is: <b>[code]</b>"
|
||||
P.name = "nuclear bomb code"
|
||||
if(leader && leader.current)
|
||||
if(get_turf(P) == get_turf(leader.current) && !(leader.current.l_hand && leader.current.r_hand))
|
||||
leader.current.put_in_hands(P)
|
||||
|
||||
if(!code_owner && leader)
|
||||
code_owner = leader
|
||||
if(code_owner)
|
||||
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>"
|
||||
return
|
||||
|
||||
spawned_nuke = code
|
||||
return code
|
||||
|
||||
/datum/antagonist/proc/greet(var/datum/mind/player)
|
||||
|
||||
// Basic intro text.
|
||||
player.current << "<span class='danger'><font size=3>You are a [role_text]!</font></span>"
|
||||
if(leader_welcome_text && player == leader)
|
||||
player.current << "<span class='notice'>[leader_welcome_text]</span>"
|
||||
else
|
||||
player.current << "<span class='notice'>[welcome_text]</span>"
|
||||
|
||||
if((flags & ANTAG_HAS_NUKE) && !spawned_nuke)
|
||||
create_nuke()
|
||||
|
||||
show_objectives(player)
|
||||
|
||||
// Clown clumsiness check, I guess downstream might use it.
|
||||
if (player.current.mind)
|
||||
if (player.current.mind.assigned_role == "Clown")
|
||||
player.current << "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself."
|
||||
player.current.mutations.Remove(CLUMSY)
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/set_antag_name(var/mob/living/player)
|
||||
// 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.real_name = newname
|
||||
player.name = player.real_name
|
||||
if(player.mind) player.mind.name = player.name
|
||||
// Update any ID cards.
|
||||
update_access(player)
|
||||
17
code/game/antagonist/antagonist_equip.dm
Normal file
17
code/game/antagonist/antagonist_equip.dm
Normal file
@@ -0,0 +1,17 @@
|
||||
/datum/antagonist/proc/equip(var/mob/living/carbon/human/player)
|
||||
|
||||
if(!istype(player))
|
||||
return 0
|
||||
|
||||
// This could use work.
|
||||
if(flags & ANTAG_CLEAR_EQUIPMENT)
|
||||
for(var/obj/item/thing in player.contents)
|
||||
player.drop_from_inventory(thing)
|
||||
if(thing.loc != player)
|
||||
qdel(thing)
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/unequip(var/mob/living/carbon/human/player)
|
||||
if(!istype(player))
|
||||
return 0
|
||||
return 1
|
||||
@@ -1,41 +0,0 @@
|
||||
var/global/list/all_antag_types = list()
|
||||
var/global/list/all_antag_spawnpoints = list()
|
||||
var/global/list/antag_names_to_ids = list()
|
||||
|
||||
/proc/get_antag_data(var/antag_type)
|
||||
if(all_antag_types[antag_type])
|
||||
return all_antag_types[antag_type]
|
||||
else
|
||||
for(var/cur_antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[cur_antag_type]
|
||||
if(antag && antag.is_type(antag_type))
|
||||
return antag
|
||||
|
||||
/proc/clear_antag_roles(var/datum/mind/player, var/implanted)
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
if(!implanted || !(antag.flags & ANTAG_IMPLANT_IMMUNE))
|
||||
antag.remove_antagonist(player, 1, implanted)
|
||||
|
||||
/proc/update_antag_icons(var/datum/mind/player)
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
if(player)
|
||||
antag.update_icons_removed(player)
|
||||
if(antag.is_antagonist(player))
|
||||
antag.update_icons_added(player)
|
||||
else
|
||||
antag.update_all_icons()
|
||||
|
||||
/proc/populate_antag_type_list()
|
||||
for(var/antag_type in typesof(/datum/antagonist)-/datum/antagonist)
|
||||
var/datum/antagonist/A = new antag_type
|
||||
all_antag_types[A.id] = A
|
||||
all_antag_spawnpoints[A.landmark_id] = list()
|
||||
antag_names_to_ids[A.role_text] = A.id
|
||||
|
||||
/proc/get_antags(var/atype)
|
||||
var/datum/antagonist/antag = all_antag_types[atype]
|
||||
if(antag && islist(antag.current_antagonists))
|
||||
return antag.current_antagonists
|
||||
return list()
|
||||
@@ -1,10 +1,11 @@
|
||||
/datum/antagonist/proc/can_become_antag(var/datum/mind/player)
|
||||
/datum/antagonist/proc/can_become_antag(var/datum/mind/player, var/ignore_role)
|
||||
if(player.current && jobban_isbanned(player.current, bantype))
|
||||
return 0
|
||||
if(player.assigned_role in protected_jobs)
|
||||
return 0
|
||||
if(config.protect_roles_from_antagonist && (player.assigned_role in restricted_jobs))
|
||||
return 0
|
||||
if(!ignore_role)
|
||||
if(player.assigned_role in protected_jobs)
|
||||
return 0
|
||||
if(config.protect_roles_from_antagonist && (player.assigned_role in restricted_jobs))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/antags_are_dead()
|
||||
@@ -27,3 +28,15 @@
|
||||
if(antag_type == id || antag_type == role_text)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/antagonist/proc/is_votable()
|
||||
return (flags & ANTAG_VOTABLE)
|
||||
|
||||
/datum/antagonist/proc/can_late_spawn()
|
||||
update_current_antag_max()
|
||||
if(get_antag_count() >= cur_max)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/is_latejoin_template()
|
||||
return (flags & (ANTAG_OVERRIDE_MOB|ANTAG_OVERRIDE_JOB))
|
||||
@@ -1,5 +1,16 @@
|
||||
/datum/antagonist/proc/create_global_objectives()
|
||||
return !((global_objectives && global_objectives.len) || config.objectives_disabled)
|
||||
if(config.objectives_disabled)
|
||||
return 0
|
||||
if(global_objectives && global_objectives.len)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/create_objectives(var/datum/mind/player)
|
||||
if(config.objectives_disabled)
|
||||
return 0
|
||||
if(create_global_objectives())
|
||||
player.objectives |= global_objectives
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/get_special_objective_text()
|
||||
return ""
|
||||
@@ -12,8 +23,6 @@
|
||||
for(var/datum/objective/O in global_objectives)
|
||||
if(!O.completed && !O.check_completion())
|
||||
result = 0
|
||||
else
|
||||
O.completed = 1 //Will this break anything?
|
||||
if(result && victory_text)
|
||||
world << "<span class='danger'><font size = 3>[victory_text]</span>"
|
||||
if(victory_feedback_tag) feedback_set_details("round_end_result","[victory_feedback_tag]")
|
||||
|
||||
61
code/game/antagonist/antagonist_panel.dm
Normal file
61
code/game/antagonist/antagonist_panel.dm
Normal file
@@ -0,0 +1,61 @@
|
||||
/datum/antagonist/proc/get_panel_entry(var/datum/mind/player)
|
||||
|
||||
var/dat = "<tr><td><b>[role_text]:</b>"
|
||||
var/extra = get_extra_panel_options(player)
|
||||
if(is_antagonist(player))
|
||||
dat += "<a href='?src=\ref[player];remove_antagonist=[id]'>\[-\]</a>"
|
||||
dat += "<a href='?src=\ref[player];equip_antagonist=[id]'>\[equip\]</a>"
|
||||
if(starting_locations && starting_locations.len)
|
||||
dat += "<a href='?src=\ref[player];move_antag_to_spawn=[id]'>\[move to spawn\]</a>"
|
||||
if(extra) dat += "[extra]"
|
||||
else
|
||||
dat += "<a href='?src=\ref[player];add_antagonist=[id]'>\[+\]</a>"
|
||||
dat += "</td></tr>"
|
||||
|
||||
return dat
|
||||
|
||||
/datum/antagonist/proc/get_extra_panel_options()
|
||||
return
|
||||
|
||||
/datum/antagonist/proc/get_check_antag_output(var/datum/admins/caller)
|
||||
|
||||
if(!current_antagonists || !current_antagonists.len)
|
||||
return ""
|
||||
|
||||
var/dat = "<br><table cellspacing=5><tr><td><B>[role_text_plural]</B></td><td></td></tr>"
|
||||
for(var/datum/mind/player in current_antagonists)
|
||||
var/mob/M = player.current
|
||||
dat += "<tr>"
|
||||
if(M)
|
||||
dat += "<td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>"
|
||||
if(!M.client) dat += " <i>(logged out)</i>"
|
||||
if(M.stat == DEAD) dat += " <b><font color=red>(DEAD)</font></b>"
|
||||
dat += "</td>"
|
||||
dat += "<td>\[<A href='?src=\ref[caller];priv_msg=\ref[M]'>PM</A>\]\[<A href='?src=\ref[caller];traitor=\ref[M]'>TP</A>\]</td>"
|
||||
else
|
||||
dat += "<td><i>Mob not found!</i></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
|
||||
if(flags & ANTAG_HAS_NUKE)
|
||||
dat += "<br><table><tr><td><B>Nuclear disk(s)</B></td></tr>"
|
||||
for(var/obj/item/weapon/disk/nuclear/N in world)
|
||||
dat += "<tr><td>[N.name], "
|
||||
var/atom/disk_loc = N.loc
|
||||
while(!istype(disk_loc, /turf))
|
||||
if(istype(disk_loc, /mob))
|
||||
var/mob/M = disk_loc
|
||||
dat += "carried by <a href='?src=\ref[caller];adminplayeropts=\ref[M]'>[M.real_name]</a> "
|
||||
if(istype(disk_loc, /obj))
|
||||
var/obj/O = disk_loc
|
||||
dat += "in \a [O.name] "
|
||||
disk_loc = disk_loc.loc
|
||||
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z])</td></tr>"
|
||||
dat += "</table>"
|
||||
dat += get_additional_check_antag_output(caller)
|
||||
dat += "<hr>"
|
||||
return dat
|
||||
|
||||
//Overridden elsewhere.
|
||||
/datum/antagonist/proc/get_additional_check_antag_output(var/datum/admins/caller)
|
||||
return ""
|
||||
29
code/game/antagonist/antagonist_place.dm
Normal file
29
code/game/antagonist/antagonist_place.dm
Normal file
@@ -0,0 +1,29 @@
|
||||
/datum/antagonist/proc/get_starting_locations()
|
||||
if(landmark_id)
|
||||
starting_locations = list()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == landmark_id)
|
||||
starting_locations |= get_turf(L)
|
||||
|
||||
/datum/antagonist/proc/place_all_mobs()
|
||||
if(!starting_locations || !starting_locations.len || !current_antagonists || !current_antagonists.len)
|
||||
return
|
||||
for(var/datum/mind/player in current_antagonists)
|
||||
player.current.loc = pick(starting_locations)
|
||||
|
||||
/datum/antagonist/proc/announce_antagonist_spawn()
|
||||
if(spawn_announcement)
|
||||
if(announced)
|
||||
return
|
||||
announced = 1
|
||||
if(spawn_announcement_delay)
|
||||
sleep(spawn_announcement_delay)
|
||||
if(spawn_announcement_sound)
|
||||
command_announcement.Announce("[spawn_announcement]", "[spawn_announcement_title ? spawn_announcement_title : "Priority Alert"]", new_sound = spawn_announcement_sound)
|
||||
else
|
||||
command_announcement.Announce("[spawn_announcement]", "[spawn_announcement_title ? spawn_announcement_title : "Priority Alert"]")
|
||||
|
||||
/datum/antagonist/proc/place_mob(var/mob/living/mob)
|
||||
if(!starting_locations || !starting_locations.len)
|
||||
return
|
||||
mob.loc = pick(starting_locations)
|
||||
86
code/game/antagonist/antagonist_print.dm
Normal file
86
code/game/antagonist/antagonist_print.dm
Normal file
@@ -0,0 +1,86 @@
|
||||
/datum/antagonist/proc/print_player_summary()
|
||||
|
||||
if(!current_antagonists.len)
|
||||
return 0
|
||||
|
||||
var/text = "<br><br><font size = 2><b>The [current_antagonists.len == 1 ? "[role_text] was" : "[role_text_plural] were"]:</b></font>"
|
||||
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/num = 1
|
||||
for(var/datum/objective/O in P.objectives)
|
||||
text += print_objective(O, num)
|
||||
if(O.check_completion())
|
||||
text += "<font color='green'><B>Success!</B></font>"
|
||||
feedback_add_details(feedback_tag,"[O.type]|SUCCESS")
|
||||
else
|
||||
text += "<font color='red'>Fail.</font>"
|
||||
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
|
||||
text += "<br><font color='green'><B>The [role_text] was successful!</B></font>"
|
||||
|
||||
if(global_objectives && global_objectives.len)
|
||||
text += "<BR><FONT size = 2>Their objectives were:<FONT>"
|
||||
var/num = 1
|
||||
for(var/datum/objective/O in global_objectives)
|
||||
text += print_objective(O, num, 1)
|
||||
num++
|
||||
|
||||
// Display the results.
|
||||
world << text
|
||||
|
||||
/datum/antagonist/proc/print_objective(var/datum/objective/O, var/num, var/append_success)
|
||||
var/text = "<br><b>Objective [num]:</b> [O.explanation_text] "
|
||||
if(append_success)
|
||||
if(O.check_completion())
|
||||
text += "<font color='green'><B>Success!</B></font>"
|
||||
else
|
||||
text += "<font color='red'>Fail.</font>"
|
||||
return text
|
||||
|
||||
/datum/antagonist/proc/print_player_lite(var/datum/mind/ply)
|
||||
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)
|
||||
text += "died"
|
||||
else if(isNotStationLevel(ply.current.z))
|
||||
text += "fled the station"
|
||||
else
|
||||
text += "survived"
|
||||
if(ply.current.real_name != ply.name)
|
||||
text += " as <b>[ply.current.real_name]</b>"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
|
||||
return text
|
||||
|
||||
/datum/antagonist/proc/print_player_full(var/datum/mind/ply)
|
||||
var/text = print_player_lite(ply)
|
||||
|
||||
var/TC_uses = 0
|
||||
var/uplink_true = 0
|
||||
var/purchases = ""
|
||||
for(var/obj/item/device/uplink/H in world_uplinks)
|
||||
if(H && H.owner && H.owner == ply)
|
||||
TC_uses += H.used_TC
|
||||
uplink_true = 1
|
||||
var/list/refined_log = new()
|
||||
for(var/datum/uplink_item/UI in H.purchase_log)
|
||||
refined_log.Add("[H.purchase_log[UI]]x[UI.log_icon()][UI.name]")
|
||||
purchases = english_list(refined_log, nothing_text = "")
|
||||
if(uplink_true)
|
||||
text += " (used [TC_uses] TC)"
|
||||
if(purchases)
|
||||
text += "<br>[purchases]"
|
||||
|
||||
return text
|
||||
@@ -1,85 +0,0 @@
|
||||
/datum/antagonist/proc/attempt_late_spawn(var/datum/mind/player, var/move_to_spawn)
|
||||
|
||||
update_cur_max()
|
||||
if(get_antag_count() >= cur_max)
|
||||
return 0
|
||||
|
||||
player.current << "<span class='danger'><i>You have been selected this round as an antagonist!</i></span>"
|
||||
add_antagonist(player)
|
||||
equip(player.current)
|
||||
if(move_to_spawn)
|
||||
place_mob(player.current)
|
||||
return
|
||||
|
||||
/datum/antagonist/proc/update_cur_max()
|
||||
|
||||
candidates = list()
|
||||
var/main_type
|
||||
if(ticker && ticker.mode)
|
||||
if(ticker.mode.antag_tag && ticker.mode.antag_tag == id)
|
||||
main_type = 1
|
||||
else
|
||||
return list()
|
||||
|
||||
cur_max = (main_type ? max_antags_round : max_antags)
|
||||
if(ticker.mode.antag_scaling_coeff)
|
||||
cur_max = Clamp((ticker.mode.num_players()/ticker.mode.antag_scaling_coeff), 1, cur_max)
|
||||
|
||||
/datum/antagonist/proc/attempt_spawn(var/ghosts_only)
|
||||
|
||||
// Get the raw list of potential players.
|
||||
update_cur_max()
|
||||
candidates = get_candidates(ghosts_only)
|
||||
|
||||
// Update our boundaries.
|
||||
if(!candidates.len)
|
||||
return 0
|
||||
|
||||
//Grab candidates randomly until we have enough.
|
||||
while(candidates.len)
|
||||
var/datum/mind/player = pick(candidates)
|
||||
current_antagonists |= player
|
||||
// Update job and role.
|
||||
player.special_role = role_text
|
||||
if(flags & ANTAG_OVERRIDE_JOB)
|
||||
player.assigned_role = "MODE"
|
||||
candidates -= player
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/place_mob(var/mob/living/mob)
|
||||
if(!starting_locations || !starting_locations.len)
|
||||
return
|
||||
mob.loc = pick(starting_locations)
|
||||
|
||||
/datum/antagonist/proc/add_antagonist(var/datum/mind/player)
|
||||
if(!istype(player))
|
||||
return 0
|
||||
if(player in current_antagonists)
|
||||
return 0
|
||||
if(!can_become_antag(player))
|
||||
return 0
|
||||
|
||||
current_antagonists |= player
|
||||
apply(player)
|
||||
finalize(player)
|
||||
return 1
|
||||
|
||||
/datum/antagonist/proc/remove_antagonist(var/datum/mind/player, var/show_message, var/implanted)
|
||||
if(player in current_antagonists)
|
||||
player.current << "<span class='danger'><font size = 3>You are no longer a [role_text]!</font></span>"
|
||||
current_antagonists -= player
|
||||
player.special_role = null
|
||||
update_icons_removed(player)
|
||||
BITSET(player.current.hud_updateflag, SPECIALROLE_HUD)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/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.
|
||||
for(var/datum/mind/player in candidates)
|
||||
if((ghosts_only && !istype(player.current, /mob/dead)) || player.special_role || (player.assigned_role in restricted_jobs))
|
||||
candidates -= player
|
||||
return candidates
|
||||
71
code/game/antagonist/antagonist_update.dm
Normal file
71
code/game/antagonist/antagonist_update.dm
Normal file
@@ -0,0 +1,71 @@
|
||||
/datum/antagonist/proc/update_leader()
|
||||
if(!leader && current_antagonists.len && (flags & ANTAG_HAS_LEADER))
|
||||
leader = current_antagonists[1]
|
||||
|
||||
/datum/antagonist/proc/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))
|
||||
player.transfer_to(player.current)
|
||||
if(holder) qdel(holder)
|
||||
player.original = player.current
|
||||
if(!preserve_appearance && (flags & ANTAG_SET_APPEARANCE))
|
||||
spawn(3)
|
||||
var/mob/living/carbon/human/H = player.current
|
||||
if(istype(H)) H.change_appearance(APPEARANCE_ALL, H.loc, H, valid_species, state = z_state)
|
||||
return player.current
|
||||
|
||||
/datum/antagonist/proc/update_access(var/mob/living/player)
|
||||
for(var/obj/item/weapon/card/id/id in player.contents)
|
||||
id.name = "[player.real_name]'s ID Card"
|
||||
id.registered_name = player.real_name
|
||||
|
||||
/datum/antagonist/proc/update_all_icons()
|
||||
if(!antag_indicator)
|
||||
return
|
||||
for(var/datum/mind/antag in current_antagonists)
|
||||
if(antag.current && antag.current.client)
|
||||
for(var/image/I in antag.current.client.images)
|
||||
if(I.icon_state == antag_indicator)
|
||||
qdel(I)
|
||||
for(var/datum/mind/other_antag in current_antagonists)
|
||||
if(other_antag.current)
|
||||
antag.current.client.images |= image('icons/mob/mob.dmi', loc = other_antag.current, icon_state = antag_indicator)
|
||||
|
||||
/datum/antagonist/proc/update_icons_added(var/datum/mind/player)
|
||||
if(!antag_indicator || !player.current)
|
||||
return
|
||||
spawn(0)
|
||||
for(var/datum/mind/antag in current_antagonists)
|
||||
if(!antag.current)
|
||||
continue
|
||||
if(antag.current.client)
|
||||
antag.current.client.images |= image('icons/mob/mob.dmi', loc = player.current, icon_state = antag_indicator)
|
||||
if(player.current.client)
|
||||
player.current.client.images |= image('icons/mob/mob.dmi', loc = antag.current, icon_state = antag_indicator)
|
||||
|
||||
/datum/antagonist/proc/update_icons_removed(var/datum/mind/player)
|
||||
if(!antag_indicator || !player.current)
|
||||
return
|
||||
spawn(0)
|
||||
for(var/datum/mind/antag in current_antagonists)
|
||||
if(antag.current)
|
||||
if(antag.current.client)
|
||||
for(var/image/I in antag.current.client.images)
|
||||
if(I.icon_state == antag_indicator && I.loc == player.current)
|
||||
qdel(I)
|
||||
if(player.current && player.current.client)
|
||||
for(var/image/I in player.current.client.images)
|
||||
if(I.icon_state == antag_indicator)
|
||||
qdel(I)
|
||||
|
||||
/datum/antagonist/proc/update_current_antag_max()
|
||||
var/main_type
|
||||
if(ticker && ticker.mode)
|
||||
if(ticker.mode.antag_tag && ticker.mode.antag_tag == id)
|
||||
main_type = 1
|
||||
cur_max = (main_type ? max_antags_round : max_antags)
|
||||
if(ticker.mode.antag_scaling_coeff)
|
||||
cur_max = Clamp((ticker.mode.num_players()/ticker.mode.antag_scaling_coeff), 1, cur_max)
|
||||
@@ -7,7 +7,7 @@ var/datum/antagonist/deathsquad/deathsquad
|
||||
role_text_plural = "Death Commandos"
|
||||
welcome_text = "You work in the service of Central Command Asset Protection, answering directly to the Board of Directors."
|
||||
landmark_id = "Commando"
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_OVERRIDE_MOB | ANTAG_HAS_NUKE
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_OVERRIDE_MOB | ANTAG_HAS_NUKE | ANTAG_HAS_LEADER
|
||||
max_antags = 4
|
||||
max_antags_round = 6
|
||||
default_access = list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)
|
||||
@@ -23,6 +23,9 @@ var/datum/antagonist/deathsquad/deathsquad
|
||||
deployed = 1
|
||||
|
||||
/datum/antagonist/deathsquad/equip(var/mob/living/carbon/human/player)
|
||||
if(!..())
|
||||
return
|
||||
|
||||
if (player.mind == leader)
|
||||
player.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(player), slot_w_uniform)
|
||||
else
|
||||
@@ -49,7 +52,7 @@ var/datum/antagonist/deathsquad/deathsquad
|
||||
id.icon_state = "centcom"
|
||||
create_radio(DTH_FREQ, player)
|
||||
|
||||
/datum/antagonist/deathsquad/apply(var/datum/mind/player)
|
||||
/datum/antagonist/deathsquad/update_antag_mob(var/datum/mind/player)
|
||||
|
||||
..()
|
||||
|
||||
@@ -76,9 +79,6 @@ var/datum/antagonist/deathsquad/deathsquad
|
||||
|
||||
return
|
||||
|
||||
/datum/antagonist/deathsquad/finalize(var/datum/mind/target)
|
||||
|
||||
..()
|
||||
|
||||
if(!deployed)
|
||||
/datum/antagonist/deathsquad/create_antagonist()
|
||||
if(..() && !deployed)
|
||||
deployed = 1
|
||||
|
||||
@@ -10,8 +10,13 @@ var/datum/antagonist/ert/ert
|
||||
leader_welcome_text = "As leader of the Emergency Response Team, you answer only to CentComm, and have authority to override the Captain where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the captain where possible, however."
|
||||
max_antags = 5
|
||||
max_antags_round = 5 // ERT mode?
|
||||
landmark_id = "Response Team"
|
||||
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_SET_APPEARANCE
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER | ANTAG_CHOOSE_NAME
|
||||
|
||||
/datum/antagonist/ert/create_default(var/mob/source)
|
||||
var/mob/living/carbon/human/M = ..()
|
||||
if(istype(M)) M.age = rand(25,45)
|
||||
|
||||
/datum/antagonist/ert/New()
|
||||
..()
|
||||
|
||||
@@ -7,8 +7,9 @@ var/datum/antagonist/mercenary/mercs
|
||||
bantype = "operative"
|
||||
role_text_plural = "Mercenaries"
|
||||
landmark_id = "Syndicate-Spawn"
|
||||
leader_welcome_text = "You are the leader of the mercenary strikeforce; hail to the chief. Use :t to speak to your underlings."
|
||||
welcome_text = "To speak on the strike team's private channel use :t."
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_HAS_NUKE | ANTAG_SET_APPEARANCE
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_HAS_NUKE | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER
|
||||
max_antags = 4
|
||||
max_antags_round = 6
|
||||
id_type = /obj/item/weapon/card/id/syndicate
|
||||
@@ -19,9 +20,10 @@ var/datum/antagonist/mercenary/mercs
|
||||
|
||||
/datum/antagonist/mercenary/create_global_objectives()
|
||||
if(!..())
|
||||
return
|
||||
return 0
|
||||
global_objectives = list()
|
||||
global_objectives |= new /datum/objective/nuclear
|
||||
return 1
|
||||
|
||||
/datum/antagonist/mercenary/equip(var/mob/living/carbon/human/player)
|
||||
|
||||
@@ -50,7 +52,7 @@ var/datum/antagonist/mercenary/mercs
|
||||
if(spawnpos > starting_locations.len)
|
||||
spawnpos = 1
|
||||
|
||||
/datum/antagonist/mercenary/make_nuke()
|
||||
/datum/antagonist/mercenary/create_nuke()
|
||||
..()
|
||||
// Create the radio.
|
||||
var/obj/effect/landmark/uplinkdevice = locate("landmark*Syndicate-Uplink")
|
||||
|
||||
@@ -9,14 +9,15 @@ var/datum/antagonist/ninja/ninjas
|
||||
landmark_id = "ninjastart"
|
||||
welcome_text = "<span class='info'>You are an elite mercenary assassin of the Spider Clan. You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor.</span>"
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_RANDSPAWN | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
|
||||
max_antags = 3
|
||||
max_antags_round = 3
|
||||
max_antags = 1
|
||||
max_antags_round = 1
|
||||
id_type = /obj/item/weapon/card/id/syndicate
|
||||
|
||||
/datum/antagonist/ninja/New()
|
||||
..()
|
||||
ninjas = src
|
||||
|
||||
/datum/antagonist/ninja/random_spawn()
|
||||
/datum/antagonist/ninja/attempt_random_spawn()
|
||||
if(config.ninjas_allowed) ..()
|
||||
|
||||
/datum/antagonist/ninja/create_objectives(var/datum/mind/ninja)
|
||||
@@ -82,7 +83,7 @@ var/datum/antagonist/ninja/ninjas
|
||||
player.store_memory("<B>Directive:</B> <span class='danger'>[directive]</span><br>")
|
||||
player << "<b>Remember your directive:</b> [directive]."
|
||||
|
||||
/datum/antagonist/ninja/apply(var/datum/mind/player)
|
||||
/datum/antagonist/ninja/update_antag_mob(var/datum/mind/player)
|
||||
..()
|
||||
var/ninja_title = pick(ninja_titles)
|
||||
var/ninja_name = pick(ninja_names)
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,7 @@ var/datum/antagonist/raider/raiders
|
||||
bantype = "raider"
|
||||
landmark_id = "voxstart"
|
||||
welcome_text = "Use :H to talk on your encrypted channel."
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER
|
||||
max_antags = 6
|
||||
max_antags_round = 10
|
||||
id_type = /obj/item/weapon/card/id/syndicate
|
||||
@@ -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()
|
||||
@@ -83,8 +106,8 @@ var/datum/antagonist/raider/raiders
|
||||
|
||||
/datum/antagonist/raider/create_global_objectives()
|
||||
|
||||
if(global_objectives.len)
|
||||
return
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/i = 1
|
||||
var/max_objectives = pick(2,2,2,2,3,3,3,4)
|
||||
@@ -107,6 +130,7 @@ var/datum/antagonist/raider/raiders
|
||||
i++
|
||||
|
||||
global_objectives |= new /datum/objective/heist/preserve_crew
|
||||
return 1
|
||||
|
||||
/datum/antagonist/raider/check_victory()
|
||||
// Totally overrides the base proc.
|
||||
@@ -177,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)
|
||||
@@ -197,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))
|
||||
|
||||
@@ -10,6 +10,7 @@ var/datum/antagonist/wizard/wizards
|
||||
welcome_text = "You will find a list of available spells in your spell book. Choose your magic arsenal carefully.<br>In your pockets you will find a teleport scroll. Use it as needed."
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
|
||||
max_antags = 1
|
||||
max_antags_round = 1
|
||||
|
||||
/datum/antagonist/wizard/New()
|
||||
..()
|
||||
@@ -58,7 +59,8 @@ var/datum/antagonist/wizard/wizards
|
||||
wizard.objectives |= hijack_objective
|
||||
return
|
||||
|
||||
/datum/antagonist/wizard/apply(var/datum/mind/wizard)
|
||||
/datum/antagonist/wizard/update_antag_mob(var/datum/mind/wizard)
|
||||
..()
|
||||
wizard.store_memory("<B>Remember:</B> do not forget to prepare your spells.")
|
||||
wizard.current.real_name = "[pick(wizard_first)] [pick(wizard_second)]"
|
||||
wizard.current.name = wizard.current.real_name
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/datum/antagonist/changeling/get_special_objective_text(var/datum/mind/player)
|
||||
return "<br><b>Changeling ID:</b> [player.changeling.changelingID].<br><b>Genomes Absorbed:</b> [player.changeling.absorbedcount]"
|
||||
|
||||
/datum/antagonist/changeling/apply(var/datum/mind/player)
|
||||
/datum/antagonist/changeling/update_antag_mob(var/datum/mind/player)
|
||||
..()
|
||||
player.current.make_changeling()
|
||||
|
||||
|
||||
@@ -111,8 +111,6 @@ var/datum/antagonist/cultist/cult
|
||||
/datum/antagonist/cultist/can_become_antag(var/datum/mind/player)
|
||||
if(!..())
|
||||
return 0
|
||||
if(!istype(player.current, /mob/living/carbon/human))
|
||||
return 0
|
||||
for(var/obj/item/weapon/implant/loyalty/L in player.current)
|
||||
if(L && (L.imp_in == player.current))
|
||||
return 0
|
||||
|
||||
@@ -50,13 +50,43 @@ var/datum/antagonist/revolutionary/revs
|
||||
)
|
||||
mob.equip_in_one_of_slots(T, slots)
|
||||
|
||||
/datum/antagonist/revolutionary/finalize(var/datum/mind/target)
|
||||
/*
|
||||
datum/antagonist/revolutionary/finalize(var/datum/mind/target)
|
||||
if(target)
|
||||
return ..(target)
|
||||
current_antagonists |= head_revolutionaries
|
||||
create_global_objectives()
|
||||
..()
|
||||
|
||||
/datum/antagonist/revolutionary/get_additional_check_antag_output(var/datum/admins/caller)
|
||||
return ..() //Todo
|
||||
|
||||
Rev extras:
|
||||
dat += "<br><table cellspacing=5><tr><td><B>Revolutionaries</B></td><td></td></tr>"
|
||||
for(var/datum/mind/N in ticker.mode.head_revolutionaries)
|
||||
var/mob/M = N.current
|
||||
if(!M)
|
||||
dat += "<tr><td><i>Head Revolutionary not found!</i></td></tr>"
|
||||
else
|
||||
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Leader)</b>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
|
||||
for(var/datum/mind/N in ticker.mode.revolutionaries)
|
||||
var/mob/M = N.current
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td></tr>"
|
||||
dat += "</table><table cellspacing=5><tr><td><B>Target(s)</B></td><td></td><td><B>Location</B></td></tr>"
|
||||
for(var/datum/mind/N in ticker.mode.get_living_heads())
|
||||
var/mob/M = N.current
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?src=\ref[src];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>"
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
dat += "<td>[mob_loc.loc]</td></tr>"
|
||||
else
|
||||
dat += "<tr><td><i>Head not found!</i></td></tr>"
|
||||
*/
|
||||
|
||||
/datum/antagonist/revolutionary/create_global_objectives()
|
||||
if(!..())
|
||||
return
|
||||
@@ -166,7 +196,7 @@ var/datum/antagonist/revolutionary/revs
|
||||
if(choice == "Yes!")
|
||||
M << "<span class='notice'>You join the revolution!</span>"
|
||||
src << "<span class='notice'>[M] joins the revolution!</span>"
|
||||
revs.add_antagonist(M.mind)
|
||||
revs.add_antagonist(M.mind, 0, 0, 1)
|
||||
else if(choice == "No!")
|
||||
M << "<span class='danger'>You reject this traitorous cause!</span>"
|
||||
src << "<span class='danger'>\The [M] does not support the revolution!</span>"
|
||||
|
||||
@@ -18,7 +18,7 @@ var/datum/antagonist/traitor/traitors
|
||||
/datum/antagonist/traitor/Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
if(href_list["spawn_uplink"]) spawn_uplink(href_list["spawn_uplink"])
|
||||
if(href_list["spawn_uplink"]) spawn_uplink(locate(href_list["spawn_uplink"]))
|
||||
|
||||
/datum/antagonist/traitor/create_objectives(var/datum/mind/traitor)
|
||||
if(!..())
|
||||
@@ -148,8 +148,7 @@ var/datum/antagonist/traitor/traitors
|
||||
if ((freq % 2) == 0)
|
||||
freq += 1
|
||||
freq = freqlist[rand(1, freqlist.len)]
|
||||
var/obj/item/device/uplink/hidden/T = new(R)
|
||||
T.uplink_owner = traitor_mob.mind
|
||||
var/obj/item/device/uplink/hidden/T = new(R, traitor_mob.mind)
|
||||
target_radio.hidden_uplink = T
|
||||
target_radio.traitor_frequency = freq
|
||||
traitor_mob << "A portable object teleportation relay has been installed in your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features."
|
||||
@@ -158,8 +157,7 @@ var/datum/antagonist/traitor/traitors
|
||||
else if (istype(R, /obj/item/device/pda))
|
||||
// generate a passcode if the uplink is hidden in a PDA
|
||||
var/pda_pass = "[rand(100,999)] [pick("Alpha","Bravo","Delta","Omega")]"
|
||||
var/obj/item/device/uplink/hidden/T = new(R)
|
||||
T.uplink_owner = traitor_mob.mind
|
||||
var/obj/item/device/uplink/hidden/T = new(R, traitor_mob.mind)
|
||||
R.hidden_uplink = T
|
||||
var/obj/item/device/pda/P = R
|
||||
P.lock_code = pda_pass
|
||||
|
||||
@@ -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
|
||||
@@ -349,7 +348,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 +386,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
|
||||
@@ -438,6 +435,7 @@ area/space/atmosalert()
|
||||
name = "\improper Thunderdome"
|
||||
icon_state = "thunder"
|
||||
requires_power = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/tdome/tdome1
|
||||
name = "\improper Thunderdome (Team 1)"
|
||||
@@ -462,7 +460,6 @@ area/space/atmosalert()
|
||||
name = "\improper Independant Station"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
unlimited_power = 1
|
||||
flags = RAD_SHIELDED
|
||||
|
||||
/area/syndicate_station/start
|
||||
@@ -517,6 +514,7 @@ area/space/atmosalert()
|
||||
name = "\improper Wizard's Den"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/skipjack_station/transit
|
||||
|
||||
|
||||
@@ -227,7 +227,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 +260,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)
|
||||
for(var/mob/M in A)
|
||||
if(has_gravity)
|
||||
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)
|
||||
M.update_floating( M.Check_Dense_Object() )
|
||||
|
||||
/area/proc/thunk(mob)
|
||||
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.
|
||||
@@ -299,4 +288,18 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
for(var/obj/machinery/door/airlock/temp_airlock in src)
|
||||
temp_airlock.prison_open()
|
||||
for(var/obj/machinery/door/window/temp_windoor in src)
|
||||
temp_windoor.open()
|
||||
temp_windoor.open()
|
||||
|
||||
/area/proc/has_gravity()
|
||||
return has_gravity
|
||||
|
||||
/area/space/has_gravity()
|
||||
return 0
|
||||
|
||||
/proc/has_gravity(atom/AT, turf/T)
|
||||
if(!T)
|
||||
T = get_turf(AT)
|
||||
var/area/A = get_area(T)
|
||||
if(A && A.has_gravity())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -35,16 +35,12 @@
|
||||
else
|
||||
return null
|
||||
|
||||
//Currently used only for cryo cells, because they are also pipes and so overriding their return_air() would break their pipe-behaviour.
|
||||
//If cryo cells are ever rewritten so that the part that contains the human is separate from the pipe part --
|
||||
//such as rewriting them so that they are a machine that contains a pipe segment (or a pipe that contains a machine that contains the human?) -- then this can be removed.
|
||||
/atom/proc/return_air_for_internal_lifeform()
|
||||
return return_air()
|
||||
|
||||
//return flags that should be added to the viewer's sight var.
|
||||
//Otherwise return a negative number to indicate that the view should be cancelled.
|
||||
/atom/proc/check_eye(user as mob)
|
||||
if (istype(user, /mob/living/silicon/ai)) // WHYYYY
|
||||
return 1
|
||||
return
|
||||
return 0
|
||||
return -1
|
||||
|
||||
/atom/proc/on_reagent_change()
|
||||
return
|
||||
@@ -67,9 +63,6 @@
|
||||
return flags & INSERT_CONTAINER
|
||||
*/
|
||||
|
||||
/atom/proc/allow_drop()
|
||||
return 1
|
||||
|
||||
/atom/proc/CheckExit()
|
||||
return 1
|
||||
|
||||
@@ -220,6 +213,9 @@ its easier to just keep the beam vertical.
|
||||
|
||||
/atom/proc/ex_act()
|
||||
return
|
||||
|
||||
/atom/proc/emag_act(var/remaining_charges, var/mob/user, var/emag_source)
|
||||
return -1
|
||||
|
||||
/atom/proc/blob_act()
|
||||
return
|
||||
@@ -488,4 +484,4 @@ its easier to just keep the beam vertical.
|
||||
O.show_message( message, 2, deaf_message, 1)
|
||||
else if(ismob(I))
|
||||
var/mob/M = I
|
||||
M.show_message( message, 2, deaf_message, 1)
|
||||
M.show_message( message, 2, deaf_message, 1)
|
||||
|
||||
@@ -14,15 +14,16 @@
|
||||
var/moved_recently = 0
|
||||
var/mob/pulledby = null
|
||||
|
||||
var/auto_init = 1
|
||||
|
||||
/atom/movable/New()
|
||||
..()
|
||||
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
if(auto_init && ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
initialize()
|
||||
|
||||
/atom/movable/Del()
|
||||
if(isnull(gcDestroyed) && loc)
|
||||
testing("GC: -- [type] was deleted via del() rather than qdel() --")
|
||||
CRASH() // Debug until I can get a clean server start.
|
||||
// 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -6,6 +6,5 @@
|
||||
required_players = 5
|
||||
required_players_secret = 15
|
||||
required_enemies = 3
|
||||
uplink_welcome = "Nar-Sie Uplink Console:"
|
||||
end_on_antag_death = 1
|
||||
antag_tag = MODE_CULTIST
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
/obj/item/clothing/head/culthood/magus
|
||||
name = "magus helm"
|
||||
icon_state = "magus"
|
||||
item_state = "magus"
|
||||
desc = "A helm worn by the followers of Nar-Sie."
|
||||
flags_inv = HIDEFACE
|
||||
flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
|
||||
@@ -56,7 +55,6 @@
|
||||
|
||||
/obj/item/clothing/head/culthood/alt
|
||||
icon_state = "cult_hoodalt"
|
||||
item_state = "cult_hoodalt"
|
||||
|
||||
/obj/item/clothing/suit/cultrobes
|
||||
name = "cult robes"
|
||||
@@ -88,7 +86,6 @@
|
||||
name = "cult helmet"
|
||||
desc = "A space worthy helmet used by the followers of Nar-Sie"
|
||||
icon_state = "cult_helmet"
|
||||
item_state = "cult_helmet"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0
|
||||
|
||||
|
||||
@@ -63,19 +63,10 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/door/cultify()
|
||||
icon_state = "null"
|
||||
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)
|
||||
if(invisibility != INVISIBILITY_MAXIMUM)
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
density = 0
|
||||
anim(target = src, a_icon = 'icons/effects/effects.dmi', a_icon_state = "breakdoor", sleeptime = 10)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/door/firedoor/cultify()
|
||||
@@ -145,8 +136,8 @@
|
||||
// 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()
|
||||
|
||||
@@ -592,6 +592,7 @@ 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>"
|
||||
|
||||
@@ -79,10 +79,9 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
|
||||
C.req_access = list()
|
||||
C.req_one_access = list()
|
||||
|
||||
sleep(5 MINUTES)
|
||||
ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic
|
||||
|
||||
universe_has_ended = 1
|
||||
spawn(5 MINUTES)
|
||||
ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic
|
||||
universe_has_ended = 1
|
||||
return
|
||||
|
||||
/datum/universal_state/supermatter_cascade/proc/AreaSet()
|
||||
|
||||
@@ -425,7 +425,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
if(botEmagChance)
|
||||
for(var/obj/machinery/bot/bot in machines)
|
||||
if(prob(botEmagChance))
|
||||
bot.Emag()
|
||||
bot.emag_act(1)
|
||||
|
||||
/*
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
|
||||
else if (istype(clong, /mob))
|
||||
if(clong.density || prob(10))
|
||||
clong.ex_act(1)
|
||||
clong.ex_act(2)
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z in config.station_levels)
|
||||
if(!C.is_critical && C.cell && (C.z in config.station_levels))
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore(var/announce = 1)
|
||||
@@ -29,7 +29,7 @@
|
||||
if(announce)
|
||||
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z in config.station_levels)
|
||||
if(C.cell && (C.z in config.station_levels))
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
var/area/current_area = get_area(S)
|
||||
|
||||
@@ -42,17 +42,10 @@ var/global/list/additional_antag_types = list()
|
||||
|
||||
var/antag_tag // First (main) antag template to spawn.
|
||||
var/list/antag_templates // Extra antagonist types to include.
|
||||
|
||||
var/list/latejoin_templates = list()
|
||||
var/round_autoantag = 0 // Will this round attempt to periodically spawn more antagonists?
|
||||
var/antag_prob = 0 // Likelihood of a new antagonist spawning.
|
||||
var/antag_count = 0 // Current number of antagonists.
|
||||
var/antag_scaling_coeff = 5 // Coefficient for scaling max antagonists to player count.
|
||||
|
||||
var/list/living_antag_templates = list() // Currently selected antag types that do not require a ghosted player.
|
||||
var/list/ghost_antag_templates = list() // Inverse of above.
|
||||
var/list/antag_candidates = list() // Living antag candidates.
|
||||
var/list/ghost_candidates = list() // Observing antag candidates.
|
||||
|
||||
var/station_was_nuked = 0 // See nuclearbomb.dm and malfunction.dm.
|
||||
var/explosion_in_progress = 0 // Sit back and relax
|
||||
var/waittime_l = 600 // Lower bound on time before intercept arrives (in tenths of seconds)
|
||||
@@ -61,85 +54,6 @@ var/global/list/additional_antag_types = list()
|
||||
var/event_delay_mod_moderate // Modifies the timing of random events.
|
||||
var/event_delay_mod_major // As above.
|
||||
|
||||
var/uplink_welcome = "Illegal Uplink Console:"
|
||||
var/uplink_uses = 12
|
||||
|
||||
var/list/datum/uplink_item/uplink_items = list(
|
||||
"Ammunition" = list(
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, ".357", "RA"),
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "9mm", "R9"),
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/chemdart, 2, "Darts", "AD"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 2, "14.5mm", "SA")
|
||||
),
|
||||
"Highly Visible and Dangerous Weapons" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
|
||||
new/datum/uplink_item(/obj/item/weapon/melee/energy/sword, 4, "Energy Sword", "ES"),
|
||||
new/datum/uplink_item(/obj/item/weapon/gun/projectile/dartgun, 5, "Dart Gun", "DG"),
|
||||
new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/g9mm, 5, "Silenced 9mm", "S9"),
|
||||
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
|
||||
new/datum/uplink_item(/obj/item/weapon/gun/projectile/revolver, 6, "Revolver", "RE"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
|
||||
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "Anti-materiel Rifle", "AMR")
|
||||
),
|
||||
"Stealthy and Inconspicuous Weapons" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
|
||||
new/datum/uplink_item(/obj/item/weapon/cane/concealed, 2, "Concealed Cane Sword", "CC"),
|
||||
new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC"),
|
||||
new/datum/uplink_item(/obj/item/weapon/pen/reagent/paralysis, 3, "Paralysis Pen", "PP"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/toxin, 4, "Random Toxin - Beaker", "RT")
|
||||
),
|
||||
"Stealth and Camouflage Items" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/card/id/syndicate, 2, "Agent ID card", "AC"),
|
||||
new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Shoes", "SH"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/spy, 2, "Bug Kit", "BK"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/chameleon, 3, "Chameleon Kit", "CB"),
|
||||
new/datum/uplink_item(/obj/item/device/chameleon, 4, "Chameleon-Projector", "CP"),
|
||||
new/datum/uplink_item(/obj/item/clothing/mask/gas/voice, 4, "Voice Changer", "VC"),
|
||||
new/datum/uplink_item(/obj/item/weapon/disk/file/cameras/syndicate, 6, "Camera Network Access - Floppy", "SF")
|
||||
),
|
||||
"Devices and Tools" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/toolbox/syndicate, 1, "Fully Loaded Toolbox", "ST"),
|
||||
new/datum/uplink_item(/obj/item/weapon/plastique, 2, "C-4 (Destroys walls)", "C4"),
|
||||
new/datum/uplink_item(/obj/item/device/encryptionkey/syndicate, 2, "Encrypted Radio Channel Key", "ER"),
|
||||
new/datum/uplink_item(/obj/item/device/encryptionkey/binary, 3, "Binary Translator Key", "BT"),
|
||||
new/datum/uplink_item(/obj/item/weapon/card/emag, 3, "Cryptographic Sequencer", "EC"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/clerical, 3, "Morphic Clerical Kit", "CK"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/space, 3, "Space Suit", "SS"),
|
||||
new/datum/uplink_item(/obj/item/clothing/glasses/thermal/syndi, 3, "Thermal Imaging Glasses", "TM"),
|
||||
new/datum/uplink_item(/obj/item/clothing/suit/storage/vest/heavy/merc, 4, "Heavy Armor Vest", "HAV"),
|
||||
new/datum/uplink_item(/obj/item/weapon/aiModule/syndicate, 7, "Hacked AI Upload Module", "AI"),
|
||||
new/datum/uplink_item(/obj/item/device/powersink, 5, "Powersink (DANGER!)", "PS",),
|
||||
new/datum/uplink_item(/obj/item/device/radio/beacon/syndicate, 7, "Singularity Beacon (DANGER!)", "SB"),
|
||||
new/datum/uplink_item(/obj/item/weapon/circuitboard/teleporter, 20, "Teleporter Circuit Board", "TP")
|
||||
),
|
||||
"Implants" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_freedom, 3, "Freedom Implant", "FI"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_compress, 4, "Compressed Matter Implant", "CI"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_explosive, 6, "Explosive Implant (DANGER!)", "EI"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/imp_uplink, 10, "Uplink Implant (Contains 5 Telecrystals)", "UI")
|
||||
),
|
||||
"Medical" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/sinpockets, 1, "Box of Sin-Pockets", "DP"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/firstaid/surgery, 5, "Surgery kit", "SK"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/firstaid/combat, 5, "Combat medical kit", "CM")
|
||||
),
|
||||
"Hardsuit Modules" = list(
|
||||
new/datum/uplink_item(/obj/item/rig_module/vision/thermal, 2, "Thermal Scanner", "RTS"),
|
||||
new/datum/uplink_item(/obj/item/rig_module/fabricator/energy_net, 3, "Net Projector", "REN"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/ewar_voice, 4, "Electrowarfare Suite and Voice Synthesiser", "REV"),
|
||||
new/datum/uplink_item(/obj/item/rig_module/maneuvering_jets, 4, "Maneuvering Jets", "RMJ"),
|
||||
new/datum/uplink_item(/obj/item/rig_module/mounted/egun, 6, "Mounted Energy Gun", "REG"),
|
||||
new/datum/uplink_item(/obj/item/rig_module/power_sink, 6, "Power Sink", "RPS"),
|
||||
new/datum/uplink_item(/obj/item/rig_module/mounted, 8, "Mounted Laser Cannon", "RLC")
|
||||
),
|
||||
"(Pointless) Badassery" = list(
|
||||
new/datum/uplink_item(/obj/item/toy/syndicateballoon, 10, "For showing that You Are The BOSS (Useless Balloon)", "BS"),
|
||||
new/datum/uplink_item(/obj/item/toy/nanotrasenballoon, 10, "For showing that you love NT SOO much (Useless Balloon)", "NT")
|
||||
)
|
||||
)
|
||||
|
||||
/datum/game_mode/Topic(href, href_list[])
|
||||
if(..())
|
||||
return
|
||||
@@ -252,12 +166,8 @@ 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()
|
||||
if(main_antags.candidates.len >= required_enemies)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -271,8 +181,15 @@ 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()
|
||||
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
|
||||
/datum/game_mode/proc/post_setup()
|
||||
|
||||
refresh_event_modifiers()
|
||||
@@ -285,9 +202,13 @@ var/global/list/additional_antag_types = list()
|
||||
spawn(rand(100,150))
|
||||
announce_ert_disabled()
|
||||
|
||||
if(antag_templates && antag_templates.len)
|
||||
for(var/datum/antagonist/antag in antag_templates)
|
||||
antag.finalize()
|
||||
//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)
|
||||
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
|
||||
|
||||
if(emergency_shuttle && auto_recall_shuttle)
|
||||
emergency_shuttle.auto_recall = 1
|
||||
@@ -298,6 +219,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
|
||||
@@ -336,67 +261,6 @@ var/global/list/additional_antag_types = list()
|
||||
)
|
||||
command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time, and post-evacuation recovery efforts will be substantially delayed.","Emergency Transmission")
|
||||
|
||||
///process()
|
||||
///Called by the gameticker
|
||||
/datum/game_mode/proc/process()
|
||||
|
||||
if(emergency_shuttle.departed)
|
||||
return
|
||||
|
||||
if(!round_autoantag || !antag_templates || !antag_templates.len)
|
||||
return
|
||||
|
||||
var/player_count = 0
|
||||
antag_count = 0
|
||||
antag_candidates = list()
|
||||
|
||||
for(var/mob/living/player in mob_list)
|
||||
if(player.client)
|
||||
player_count += 1
|
||||
if(player.mind)
|
||||
if(player.stat == 2) // observing
|
||||
ghost_candidates |= player
|
||||
else
|
||||
if(player.mind.special_role)
|
||||
antag_count += 1
|
||||
else
|
||||
antag_candidates |= player
|
||||
|
||||
antag_prob = min(100,max(0,(player_count - 5 * 10) * 5)) // This is arbitrary, probably needs adjusting.
|
||||
|
||||
var/datum/antagonist/spawn_antag
|
||||
var/datum/mind/candidate
|
||||
|
||||
var/from_ghosts
|
||||
if(prob(antag_prob))
|
||||
if(ghost_candidates.len && ghost_antag_templates.len && prob(50))
|
||||
spawn_antag = pick(ghost_antag_templates)
|
||||
candidate = pick(ghost_candidates)
|
||||
from_ghosts = 1
|
||||
else if(antag_candidates.len && living_antag_templates.len)
|
||||
spawn_antag = pick(living_antag_templates)
|
||||
candidate = pick(antag_candidates)
|
||||
else
|
||||
return // Failed :(
|
||||
else
|
||||
return
|
||||
|
||||
if(spawn_antag.can_become_antag(candidate))
|
||||
spawn_antag.attempt_late_spawn(candidate, from_ghosts)
|
||||
|
||||
/datum/game_mode/proc/latespawn(mob/living/carbon/human/character)
|
||||
|
||||
if(emergency_shuttle.departed || !character.mind)
|
||||
return
|
||||
|
||||
var/datum/antagonist/spawn_antag
|
||||
if(prob(antag_prob) && round_autoantag && living_antag_templates.len)
|
||||
spawn_antag = pick(living_antag_templates)
|
||||
if(spawn_antag && spawn_antag.can_become_antag(character.mind))
|
||||
spawn_antag.attempt_late_spawn(character.mind)
|
||||
|
||||
return 0
|
||||
|
||||
/datum/game_mode/proc/check_finished()
|
||||
if(emergency_shuttle.returned() || station_was_nuked)
|
||||
return 1
|
||||
@@ -537,7 +401,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)
|
||||
@@ -623,13 +487,10 @@ var/global/list/additional_antag_types = list()
|
||||
|
||||
if(antag_templates && antag_templates.len)
|
||||
for(var/datum/antagonist/antag in antag_templates)
|
||||
if(antag.flags & ANTAG_OVERRIDE_JOB)
|
||||
ghost_antag_templates |= antag
|
||||
else if(antag.flags & ANTAG_RANDSPAWN)
|
||||
living_antag_templates |= antag
|
||||
else
|
||||
antag_templates -= antag
|
||||
world << "<span class='danger'>[antag.role_text_plural] are invalid for additional roundtype antags!</span>"
|
||||
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)
|
||||
|
||||
|
||||
43
code/game/gamemodes/game_mode_latespawn.dm
Normal file
43
code/game/gamemodes/game_mode_latespawn.dm
Normal file
@@ -0,0 +1,43 @@
|
||||
/datum/game_mode/proc/get_usable_templates(var/list/supplied_templates)
|
||||
var/list/usable_templates = list()
|
||||
for(var/datum/antagonist/A in supplied_templates)
|
||||
if(A.can_late_spawn())
|
||||
usable_templates |= A
|
||||
return usable_templates
|
||||
|
||||
///process()
|
||||
///Called by the gameticker
|
||||
/datum/game_mode/proc/process()
|
||||
try_latespawn()
|
||||
|
||||
/datum/game_mode/proc/latespawn(var/mob/living/carbon/human/character)
|
||||
if(!character.mind)
|
||||
return
|
||||
try_latespawn(character.mind)
|
||||
return 0
|
||||
|
||||
/datum/game_mode/proc/try_latespawn(var/datum/mind/player, var/latejoin_only)
|
||||
|
||||
if(emergency_shuttle.departed || !round_autoantag)
|
||||
return
|
||||
|
||||
if(!prob(get_antag_prob()))
|
||||
return
|
||||
|
||||
var/list/usable_templates
|
||||
if(latejoin_only && latejoin_templates.len)
|
||||
usable_templates = get_usable_templates(latejoin_templates)
|
||||
else if (antag_templates.len)
|
||||
usable_templates = get_usable_templates(antag_templates)
|
||||
else
|
||||
return
|
||||
if(usable_templates.len)
|
||||
var/datum/antagonist/spawn_antag = pick(usable_templates)
|
||||
spawn_antag.attempt_late_spawn(player)
|
||||
|
||||
/datum/game_mode/proc/get_antag_prob()
|
||||
var/player_count = 0
|
||||
for(var/mob/living/M in mob_list)
|
||||
if(M.client)
|
||||
player_count += 1
|
||||
return min(100,max(0,(player_count - 5 * 10) * 5))
|
||||
@@ -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>"
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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,29 +88,6 @@
|
||||
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")
|
||||
@@ -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!"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "AI malfunction"
|
||||
round_description = "The AI is behaving abnormally and must be stopped."
|
||||
extended_round_description = "The AI will attempt to hack the APCs around the station in order to gain as much control as possible."
|
||||
uplink_welcome = "Crazy AI Uplink Console:"
|
||||
config_tag = "malfunction"
|
||||
required_players = 2
|
||||
required_players_secret = 7
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
config_tag = "meteor"
|
||||
required_players = 0
|
||||
votable = 0
|
||||
uplink_welcome = "EVIL METEOR Uplink Console:"
|
||||
deny_respawn = 1
|
||||
var/next_wave = METEOR_DELAY
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ var/list/nuke_disks = list()
|
||||
end_on_antag_death = 1
|
||||
antag_tag = MODE_MERCENARY
|
||||
|
||||
uplink_welcome = "Corporate Backed Uplink Console:"
|
||||
uplink_uses = 40
|
||||
var/nuke_off_station = 0 //Used for tracking if the syndies actually haul the nuke to the station
|
||||
var/syndies_didnt_escape = 0 //Used for tracking if the syndies got the shuttle off of the z-level
|
||||
|
||||
|
||||
@@ -703,7 +703,7 @@ datum/objective/heist/kidnap
|
||||
var/list/priority_targets = list()
|
||||
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (possible_target.assigned_role != "MODE"))
|
||||
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (!possible_target.special_role))
|
||||
possible_targets += possible_target
|
||||
for(var/role in roles)
|
||||
if(possible_target.assigned_role == role)
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
required_players_secret = 15
|
||||
required_enemies = 3
|
||||
auto_recall_shuttle = 1
|
||||
uplink_welcome = "AntagCorp Uplink Console:"
|
||||
uplink_uses = 10
|
||||
end_on_antag_death = 1
|
||||
shuttle_delay = 3
|
||||
antag_tag = MODE_REVOLUTIONARY
|
||||
@@ -47,4 +45,4 @@
|
||||
if(i < revs.head_revolutionaries.len)
|
||||
. += "[revmind.current.real_name],"
|
||||
else
|
||||
. += "and [revmind.current.real_name]"
|
||||
. += "and [revmind.current.real_name]"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
config_tag = "traitor"
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
uplink_welcome = "AntagCorp Portable Teleportation Relay:"
|
||||
end_on_antag_death = 1
|
||||
antag_scaling_coeff = 10
|
||||
antag_tag = MODE_TRAITOR
|
||||
antag_tag = MODE_TRAITOR
|
||||
|
||||
@@ -6,7 +6,5 @@
|
||||
required_players = 1
|
||||
required_players_secret = 10
|
||||
required_enemies = 1
|
||||
uplink_welcome = "Wizardly Uplink Console:"
|
||||
uplink_uses = 10
|
||||
end_on_antag_death = 1
|
||||
antag_tag = MODE_WIZARD
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
region = ACCESS_REGION_SECURITY
|
||||
|
||||
/var/const/access_brig = 2 // Brig timers and permabrig
|
||||
/datum/access/security
|
||||
/datum/access/holding
|
||||
id = access_brig
|
||||
desc = "Holding Cells"
|
||||
region = ACCESS_REGION_SECURITY
|
||||
@@ -305,17 +305,8 @@
|
||||
desc = "Cargo Office"
|
||||
region = ACCESS_REGION_SUPPLY
|
||||
|
||||
/var/const/access_mint = 51
|
||||
/datum/access/mint
|
||||
id = access_mint
|
||||
desc = "Mint"
|
||||
region = ACCESS_REGION_SUPPLY
|
||||
|
||||
/var/const/access_mint_vault = 52
|
||||
/datum/access/mint_vault
|
||||
id = access_mint_vault
|
||||
desc = "Mint Vault"
|
||||
access_type = ACCESS_TYPE_NONE
|
||||
// /var/const/free_access_id = 51
|
||||
// /var/const/free_access_id = 52
|
||||
|
||||
/var/const/access_heads_vault = 53
|
||||
/datum/access/heads_vault
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
selection_color = "#dddddd"
|
||||
access = list() //See /datum/job/assistant/get_access()
|
||||
minimal_access = list() //See /datum/job/assistant/get_access()
|
||||
alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Security Cadet","Visitor")
|
||||
alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Visitor")
|
||||
|
||||
/datum/job/assistant/equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
|
||||
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -124,7 +124,7 @@
|
||||
spawn_positions = 2
|
||||
supervisors = "the quartermaster and the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
|
||||
|
||||
|
||||
@@ -149,8 +149,8 @@
|
||||
spawn_positions = 3
|
||||
supervisors = "the quartermaster and the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
|
||||
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station)
|
||||
minimal_access = list(access_mining, access_mining_station, access_mailsorting)
|
||||
alt_titles = list("Drill Technician","Prospector")
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
/datum/job/proc/equip(var/mob/living/carbon/human/H)
|
||||
return 1
|
||||
|
||||
/datum/job/proc/equip_backpack(var/mob/living/carbon/human/H)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
|
||||
/datum/job/proc/equip_survival(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.species.equip_survival_gear(H,0)
|
||||
|
||||
@@ -13,11 +13,15 @@
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
|
||||
|
||||
equip_survival(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
|
||||
equip_backpack(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
|
||||
/datum/job/ai/is_position_available()
|
||||
return (empty_playable_ai_cores.len != 0)
|
||||
|
||||
@@ -44,6 +48,10 @@
|
||||
equip_survival(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
|
||||
equip_backpack(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/datum/job/cyborg/equip_preview(mob/living/carbon/human/H)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user