mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Linter diagnostics + bans non-var relative pathing
This commit is contained in:
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@@ -24,6 +24,34 @@ jobs:
|
||||
tools/ci/validate_files.sh
|
||||
tools/ci/build_tgui.sh
|
||||
|
||||
dreamchecker:
|
||||
name: DreamChecker
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Cache SpacemanDMM
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/SpacemanDMM
|
||||
key: ${{ runner.os }}-dreamchecker-${{ hashFiles('dependencies.sh')}}
|
||||
restore-keys: ${{ runner.os }}-dreamchecker
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
tools/ci/install_spaceman_dmm.sh dreamchecker
|
||||
|
||||
- name: Run Linter
|
||||
id: linter
|
||||
run: |
|
||||
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
|
||||
|
||||
- name: Annotate Linter
|
||||
uses: yogstation13/DreamAnnotate@v1
|
||||
if: always()
|
||||
with:
|
||||
outputFile: output-annotations.txt
|
||||
|
||||
unit_tests:
|
||||
name: Integration Tests
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
[diagnostics]
|
||||
macro_redefined = "off"
|
||||
macro_undefined_no_definition = "off"
|
||||
as_local_var = "off"
|
||||
tmp_no_effect = "off"
|
||||
|
||||
[langserver]
|
||||
dreamchecker = true
|
||||
|
||||
[code_standards]
|
||||
disallow_relative_type_definitions = true
|
||||
disallow_relative_proc_definitions = true
|
||||
@@ -1,6 +1,6 @@
|
||||
# This file has all the information on what versions of libraries are thrown into the code
|
||||
# For dreamchecker
|
||||
export SPACEMANDMM_TAG=suite-1.4
|
||||
export SPACEMAN_DMM_VERSION=suite-1.7
|
||||
# For NanoUI + TGUI
|
||||
export NODE_VERSION=12
|
||||
# Byond Major
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//node1, air1, network1 correspond to input
|
||||
//node2, air2, network2 correspond to output
|
||||
|
||||
#define ADIABATIC_EXPONENT 0.667 //Actually adiabatic exponent - 1.
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator
|
||||
name = "circulator"
|
||||
desc = "A gas circulator turbine and heat exchanger."
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#define ADIABATIC_EXPONENT 0.667 //Actually adiabatic exponent - 1.
|
||||
|
||||
/obj/machinery/atmospherics/pipeturbine
|
||||
name = "turbine"
|
||||
desc = "A gas turbine. Converting pressure into energy since 1884."
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
//
|
||||
// "T" Orientation - Inputs are on oposite sides instead of adjacent
|
||||
//
|
||||
obj/machinery/atmospherics/trinary/mixer/t_mixer
|
||||
/obj/machinery/atmospherics/trinary/mixer/t_mixer
|
||||
icon_state = "tmap"
|
||||
construction_type = /obj/item/pipe/trinary // Can't flip a "T", its symmetrical
|
||||
pipe_state = "t_mixer"
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/obj/machinery/atmospherics/unary/generator_input
|
||||
icon = 'icons/obj/atmospherics/heat_exchanger.dmi'
|
||||
icon_state = "intact"
|
||||
density = 1
|
||||
|
||||
name = "Generator Input"
|
||||
desc = "Placeholder"
|
||||
|
||||
var/update_cycle
|
||||
|
||||
update_icon()
|
||||
if(node)
|
||||
icon_state = "intact"
|
||||
else
|
||||
icon_state = "exposed"
|
||||
|
||||
return
|
||||
|
||||
proc
|
||||
return_exchange_air()
|
||||
return air_contents
|
||||
@@ -11,7 +11,7 @@
|
||||
var/obj/machinery/atmospherics/unary/heat_exchanger/partner = null
|
||||
var/update_cycle
|
||||
|
||||
update_icon()
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/update_icon()
|
||||
if(node)
|
||||
icon_state = "intact"
|
||||
else
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
return
|
||||
|
||||
atmos_init()
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/atmos_init()
|
||||
if(!partner)
|
||||
var/partner_connect = turn(dir,180)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
..()
|
||||
|
||||
process()
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/process()
|
||||
..()
|
||||
if(!partner)
|
||||
return 0
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
return ..()
|
||||
var/turf/T = src.loc
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
obj/machinery/atmospherics/unary/oxygen_generator
|
||||
icon = 'icons/obj/atmospherics/oxygen_generator.dmi'
|
||||
icon_state = "intact_off"
|
||||
density = 1
|
||||
|
||||
name = "Oxygen Generator"
|
||||
desc = ""
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH
|
||||
|
||||
var/on = 0
|
||||
|
||||
var/oxygen_content = 10
|
||||
|
||||
update_icon()
|
||||
if(node)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
else
|
||||
icon_state = "exposed_off"
|
||||
|
||||
on = 0
|
||||
|
||||
return
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
air_contents.volume = 50
|
||||
|
||||
process()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
var/total_moles = air_contents.total_moles
|
||||
|
||||
if(total_moles < oxygen_content)
|
||||
var/current_heat_capacity = air_contents.heat_capacity()
|
||||
|
||||
var/added_oxygen = oxygen_content - total_moles
|
||||
|
||||
air_contents.temperature = (current_heat_capacity*air_contents.temperature + 20*added_oxygen*T0C)/(current_heat_capacity+20*added_oxygen)
|
||||
air_contents.adjust_gas("oxygen", added_oxygen)
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
return 1
|
||||
@@ -2,8 +2,8 @@
|
||||
Contains helper procs for airflow, handled in /connection_group.
|
||||
*/
|
||||
|
||||
mob/var/tmp/last_airflow_stun = 0
|
||||
mob/proc/airflow_stun()
|
||||
/mob/var/tmp/last_airflow_stun = 0
|
||||
/mob/proc/airflow_stun()
|
||||
if(stat == 2)
|
||||
return 0
|
||||
if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0
|
||||
@@ -19,16 +19,16 @@ mob/proc/airflow_stun()
|
||||
Weaken(5)
|
||||
last_airflow_stun = world.time
|
||||
|
||||
mob/living/silicon/airflow_stun()
|
||||
/mob/living/silicon/airflow_stun()
|
||||
return
|
||||
|
||||
mob/living/carbon/human/airflow_stun()
|
||||
/mob/living/carbon/human/airflow_stun()
|
||||
if(shoes && (shoes.item_flags & NOSLIP))
|
||||
to_chat(src, "<span class='notice'>Air suddenly rushes past you!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
atom/movable/proc/check_airflow_movable(n)
|
||||
/atom/movable/proc/check_airflow_movable(n)
|
||||
if(!simulated) return 0
|
||||
|
||||
if(anchored && !ismob(src)) return 0
|
||||
@@ -37,19 +37,19 @@ atom/movable/proc/check_airflow_movable(n)
|
||||
|
||||
return 1
|
||||
|
||||
mob/check_airflow_movable(n)
|
||||
/mob/check_airflow_movable(n)
|
||||
if(n < vsc.airflow_heavy_pressure)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
mob/observer/check_airflow_movable()
|
||||
/mob/observer/check_airflow_movable()
|
||||
return 0
|
||||
|
||||
mob/living/silicon/check_airflow_movable()
|
||||
/mob/living/silicon/check_airflow_movable()
|
||||
return 0
|
||||
|
||||
|
||||
obj/check_airflow_movable(n)
|
||||
/obj/check_airflow_movable(n)
|
||||
if (!(. = ..()))
|
||||
return 0
|
||||
if(isnull(w_class))
|
||||
@@ -90,11 +90,11 @@ obj/check_airflow_movable(n)
|
||||
airflow_time = 0
|
||||
. = ..()
|
||||
|
||||
atom/movable/proc/airflow_hit(atom/A)
|
||||
/atom/movable/proc/airflow_hit(atom/A)
|
||||
airflow_speed = 0
|
||||
airflow_dest = null
|
||||
|
||||
mob/airflow_hit(atom/A)
|
||||
/mob/airflow_hit(atom/A)
|
||||
for(var/mob/M in hearers(src))
|
||||
M.show_message("<span class='danger'>\The [src] slams into \a [A]!</span>",1,"<span class='danger'>You hear a loud slam!</span>",2)
|
||||
playsound(src, "smash.ogg", 25, 1, -1)
|
||||
@@ -102,17 +102,17 @@ mob/airflow_hit(atom/A)
|
||||
Weaken(weak_amt)
|
||||
. = ..()
|
||||
|
||||
obj/airflow_hit(atom/A)
|
||||
/obj/airflow_hit(atom/A)
|
||||
for(var/mob/M in hearers(src))
|
||||
M.show_message("<span class='danger'>\The [src] slams into \a [A]!</span>",1,"<span class='danger'>You hear a loud slam!</span>",2)
|
||||
playsound(src, "smash.ogg", 25, 1, -1)
|
||||
. = ..()
|
||||
|
||||
obj/item/airflow_hit(atom/A)
|
||||
/obj/item/airflow_hit(atom/A)
|
||||
airflow_speed = 0
|
||||
airflow_dest = null
|
||||
|
||||
mob/living/carbon/human/airflow_hit(atom/A)
|
||||
/mob/living/carbon/human/airflow_hit(atom/A)
|
||||
// for(var/mob/M in hearers(src))
|
||||
// M.show_message("<span class='danger'>[src] slams into [A]!</span>",1,"<span class='danger'>You hear a loud slam!</span>",2)
|
||||
playsound(src, "punch", 25, 1, -1)
|
||||
@@ -140,7 +140,7 @@ mob/living/carbon/human/airflow_hit(atom/A)
|
||||
Stun(round(airflow_speed * vsc.airflow_stun/2))
|
||||
. = ..()
|
||||
|
||||
zone/proc/movables()
|
||||
/zone/proc/movables()
|
||||
. = list()
|
||||
for(var/turf/T in contents)
|
||||
for(var/atom/movable/A in T)
|
||||
|
||||
@@ -64,13 +64,13 @@
|
||||
// AIR_BLOCKED - Blocked
|
||||
// ZONE_BLOCKED - Not blocked, but zone boundaries will not cross.
|
||||
// BLOCKED - Blocked, zone boundaries will not cross even if opened.
|
||||
atom/proc/c_airblock(turf/other)
|
||||
/atom/proc/c_airblock(turf/other)
|
||||
#ifdef ZASDBG
|
||||
ASSERT(isturf(other))
|
||||
#endif
|
||||
return (AIR_BLOCKED*!CanZASPass(other, FALSE))|(ZONE_BLOCKED*!CanZASPass(other, TRUE))
|
||||
|
||||
turf/c_airblock(turf/other)
|
||||
/turf/c_airblock(turf/other)
|
||||
#ifdef ZASDBG
|
||||
ASSERT(isturf(other))
|
||||
#endif
|
||||
|
||||
@@ -244,7 +244,7 @@ Class Procs:
|
||||
if(!A.air.compare(air, vacuum_exception = 1))
|
||||
air_master.mark_edge_active(src)
|
||||
|
||||
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
/proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
//This implements a simplistic version of the Stefan-Boltzmann law.
|
||||
var/energy_delta = ((A.temperature - B.temperature) ** 4) * STEFAN_BOLTZMANN_CONSTANT * connecting_tiles * 2.5
|
||||
var/maximum_energy_delta = max(0, min(A.temperature * A.heat_capacity() * A.group_multiplier, B.temperature * B.heat_capacity() * B.group_multiplier))
|
||||
|
||||
@@ -16,5 +16,5 @@ var/image/mark = image('icons/Testing/Zone.dmi', icon_state = "mark")
|
||||
add_overlay(img)
|
||||
dbg_img = img
|
||||
|
||||
proc/soft_assert(thing,fail)
|
||||
/proc/soft_assert(thing,fail)
|
||||
if(!thing) message_admins(fail)
|
||||
@@ -1,4 +1,4 @@
|
||||
client/proc/ZoneTick()
|
||||
/client/proc/ZoneTick()
|
||||
set category = "Debug"
|
||||
set name = "Process Atmos"
|
||||
set desc = "Manually run a single tick of the air subsystem"
|
||||
@@ -16,7 +16,7 @@ client/proc/ZoneTick()
|
||||
to_chat(src, "Failed to process! ([air_master.tick_progress])")
|
||||
*/
|
||||
|
||||
client/proc/Zone_Info(turf/T as null|turf)
|
||||
/client/proc/Zone_Info(turf/T as null|turf)
|
||||
set category = "Debug"
|
||||
if(T)
|
||||
if(istype(T,/turf/simulated) && T:zone)
|
||||
@@ -33,9 +33,9 @@ client/proc/Zone_Info(turf/T as null|turf)
|
||||
images -= zone_debug_images[zone]
|
||||
zone_debug_images = null
|
||||
|
||||
client/var/list/zone_debug_images
|
||||
/client/var/list/zone_debug_images
|
||||
|
||||
client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
/client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
set category = "Debug"
|
||||
if(!istype(T))
|
||||
return
|
||||
@@ -94,7 +94,7 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
else
|
||||
to_chat(mob, "both turfs can merge.")
|
||||
|
||||
client/proc/ZASSettings()
|
||||
/client/proc/ZASSettings()
|
||||
set category = "Debug"
|
||||
|
||||
vsc.SetDefault(mob)
|
||||
|
||||
@@ -11,11 +11,11 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
|
||||
/turf/var/obj/fire/fire = null
|
||||
|
||||
//Some legacy definitions so fires can be started.
|
||||
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return null
|
||||
|
||||
|
||||
turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
/turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
|
||||
/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
@@ -320,7 +320,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
return firelevel
|
||||
|
||||
datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
||||
/datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
||||
. = 0
|
||||
for(var/g in gas)
|
||||
if(gas_data.flags[g] & XGM_GAS_OXIDIZER && gas[g] >= 0.1)
|
||||
|
||||
@@ -38,7 +38,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
|
||||
var/N2O_HALLUCINATION_DESC = "Does being in sleeping gas cause you to hallucinate?"
|
||||
|
||||
|
||||
obj/var/contaminated = 0
|
||||
/obj/var/contaminated = 0
|
||||
|
||||
|
||||
/obj/item/proc/can_contaminate()
|
||||
@@ -183,7 +183,7 @@ obj/var/contaminated = 0
|
||||
gloves.contaminate()
|
||||
|
||||
|
||||
turf/Entered(obj/item/I)
|
||||
/turf/Entered(obj/item/I)
|
||||
. = ..()
|
||||
//Items that are in phoron, but not on a mob, can still be contaminated.
|
||||
if(istype(I) && vsc.plc.CLOTH_CONTAMINATION && I.can_contaminate())
|
||||
|
||||
@@ -94,3 +94,7 @@
|
||||
#define ATMOSTANK_CO2 25000 // CO2 and PH are not critically important for station, only for toxins and alternative coolants, no need to store a lot of those.
|
||||
#define ATMOSTANK_PHORON 25000
|
||||
#define ATMOSTANK_NITROUSOXIDE 10000 // N2O doesn't have a real useful use, i guess it's on station just to allow refilling of sec's riot control canisters?
|
||||
|
||||
// Used in various things like tanks and oxygen pumps.
|
||||
#define TANK_MAX_RELEASE_PRESSURE (3*ONE_ATMOSPHERE)
|
||||
#define TANK_DEFAULT_RELEASE_PRESSURE ONE_ATMOSPHERE
|
||||
@@ -7,7 +7,7 @@
|
||||
#define COLOR_MAROON "#800000"
|
||||
#define COLOR_PURPLE "#800080"
|
||||
#define COLOR_VIOLET "#9933ff"
|
||||
#define COLOR_OLIVE "#808000"
|
||||
#define COLOR_OLIVE "#52613b" // VOREStation Edit
|
||||
#define COLOR_BROWN_ORANGE "#824b28"
|
||||
#define COLOR_DARK_ORANGE "#b95a00"
|
||||
#define COLOR_GRAY40 "#666666"
|
||||
@@ -91,7 +91,6 @@
|
||||
#define COLOR_DARK_TEAL "#2db5b5"
|
||||
#define COLOR_LIGHT_VIOLET "#e7bfff"
|
||||
#define COLOR_SAN_MARINO_BLUE "#4b75ab"
|
||||
#define COLOR_OLIVE "#52613b" //VOREStation Addition
|
||||
#define COLOR_HALF_TRANSPARENT_BLACK "#0000007A"
|
||||
|
||||
#define PIPE_COLOR_GREY "#808080"
|
||||
@@ -165,9 +164,6 @@
|
||||
#define COLOR_ASSEMBLY_PURPLE "#6F6192"
|
||||
#define COLOR_ASSEMBLY_HOT_PINK "#FF69B4"
|
||||
|
||||
#define COLOR_ASTEROID_ROCK "#735555"
|
||||
#define COLOR_GOLD "#ffcc33"
|
||||
|
||||
// Discord requires colors to be in decimal instead of hexadecimal.
|
||||
#define COLOR_WEBHOOK_DEFAULT 0x8bbbd5 // "#8bbbd5"
|
||||
#define COLOR_WEBHOOK_GOOD 0x2ECC71 // "#2ECC71"
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
#define PIPING_LAYER_DEFAULT PIPING_LAYER_REGULAR
|
||||
|
||||
// We offset the layer values of the different pipe types to ensure they look nice
|
||||
#define PIPES_SCRUBBER_LAYER (PIPES_LAYER - 0.05)
|
||||
#define PIPES_AUX_LAYER (PIPES_LAYER - 0.04)
|
||||
#define PIPES_FUEL_LAYER (PIPES_LAYER - 0.03)
|
||||
#define PIPES_SCRUBBER_LAYER (PIPES_LAYER - 0.02)
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
/// Signifies that this proc is used to handle signals.
|
||||
/// Every proc you pass to RegisterSignal must have this.
|
||||
#define SIGNAL_HANDLER SHOULD_NOT_SLEEP(TRUE)
|
||||
//#define SIGNAL_HANDLER SHOULD_NOT_SLEEP(TRUE)
|
||||
#define SIGNAL_HANDLER // Sigh
|
||||
|
||||
/// A wrapper for _AddElement that allows us to pretend we're using normal named arguments
|
||||
#define AddElement(arguments...) _AddElement(list(##arguments))
|
||||
|
||||
@@ -121,8 +121,6 @@
|
||||
///from obj/machinery/bsa/full/proc/fire(): ()
|
||||
#define COMSIG_ATOM_BSA_BEAM "atom_bsa_beam_pass"
|
||||
#define COMSIG_ATOM_BLOCKS_BSA_BEAM (1<<0)
|
||||
///from base of atom/set_light(): (l_range, l_power, l_color)
|
||||
#define COMSIG_ATOM_SET_LIGHT "atom_set_light"
|
||||
///from base of atom/setDir(): (old_dir, new_dir)
|
||||
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change"
|
||||
///from base of atom/handle_atom_del(): (atom/deleted)
|
||||
|
||||
@@ -101,7 +101,6 @@ var/list/be_special_flags = list(
|
||||
#define MODE_MONKEY "monkey"
|
||||
#define MODE_RENEGADE "renegade"
|
||||
#define MODE_REVOLUTIONARY "revolutionary"
|
||||
#define MODE_LOYALIST "loyalist"
|
||||
#define MODE_MALFUNCTION "malf"
|
||||
#define MODE_TRAITOR "traitor"
|
||||
#define MODE_AUTOTRAITOR "autotraitor"
|
||||
@@ -150,3 +149,27 @@ var/list/be_special_flags = list(
|
||||
#define Sp_HOLDVAR "holdervar"
|
||||
|
||||
#define CHANGELING_STASIS_COST 20
|
||||
|
||||
//Spell stuff, for Technomancer and Cult.
|
||||
//cast_method flags
|
||||
#define CAST_USE 1 // Clicking the spell in your hand.
|
||||
#define CAST_MELEE 2 // Clicking an atom in melee range.
|
||||
#define CAST_RANGED 4 // Clicking an atom beyond melee range.
|
||||
#define CAST_THROW 8 // Throwing the spell and hitting an atom.
|
||||
#define CAST_COMBINE 16 // Clicking another spell with this spell.
|
||||
#define CAST_INNATE 32 // Activates upon verb usage, used for mobs without hands.
|
||||
|
||||
//Aspects
|
||||
#define ASPECT_FIRE "fire" //Damage over time and raising body-temp. Firesuits protect from this.
|
||||
#define ASPECT_FROST "frost" //Slows down the affected, also involves imbedding with icicles. Winter coats protect from this.
|
||||
#define ASPECT_SHOCK "shock" //Energy-expensive, usually stuns. Insulated armor protects from this.
|
||||
#define ASPECT_AIR "air" //Mostly involves manipulation of atmos, useless in a vacuum. Magboots protect from this.
|
||||
#define ASPECT_FORCE "force" //Manipulates gravity to push things away or towards a location.
|
||||
#define ASPECT_TELE "tele" //Teleportation of self, other objects, or other people.
|
||||
#define ASPECT_DARK "dark" //Makes all those photons vanish using magic-- WITH SCIENCE. Used for sneaky stuff.
|
||||
#define ASPECT_LIGHT "light" //The opposite of dark, usually blinds, makes holo-illusions, or makes laser lightshows.
|
||||
#define ASPECT_BIOMED "biomed" //Mainly concerned with healing and restoration.
|
||||
#define ASPECT_EMP "emp" //Unused now.
|
||||
#define ASPECT_UNSTABLE "unstable" //Heavily RNG-based, causes instability to the victim.
|
||||
#define ASPECT_CHROMATIC "chromatic" //Used to combine with other spells.
|
||||
#define ASPECT_UNHOLY "unholy" //Involves the dead, blood, and most things against divine beings.
|
||||
@@ -2,8 +2,6 @@
|
||||
// Constants and standard colors for the holomap
|
||||
//
|
||||
|
||||
#define WORLD_ICON_SIZE 32 // Size of a standard tile in pixels (world.icon_size)
|
||||
#define PIXEL_MULTIPLIER WORLD_ICON_SIZE/32 // Convert from normal icon size of 32 to whatever insane thing this server is using.
|
||||
#define HOLOMAP_ICON 'icons/480x480.dmi' // Icon file to start with when drawing holomaps (to get a 480x480 canvas).
|
||||
#define HOLOMAP_ICON_SIZE 480 // Pixel width & height of the holomap icon. Used for auto-centering etc.
|
||||
#define ui_holomap "CENTER-7, CENTER-7" // Screen location of the holomap "hud"
|
||||
@@ -21,6 +19,7 @@
|
||||
#define HOLOMAP_EXTRA_STATIONMAP "stationmapformatted"
|
||||
#define HOLOMAP_EXTRA_STATIONMAP_STRATEGIC "stationmapstrategic"
|
||||
#define HOLOMAP_EXTRA_STATIONMAPAREAS "stationareas"
|
||||
#define HOLOMAP_EXTRA_STATIONMAPSMALL "stationmapsmall"
|
||||
#define HOLOMAP_EXTRA_STATIONMAPSMALL_NORTH "stationmapsmallnorth"
|
||||
#define HOLOMAP_EXTRA_STATIONMAPSMALL_SOUTH "stationmapsmallsouth"
|
||||
#define HOLOMAP_EXTRA_STATIONMAPSMALL_EAST "stationmapsmalleast"
|
||||
@@ -85,7 +84,3 @@
|
||||
// #define HOLOMAP_MARKER_DISK "diskspawn"
|
||||
// #define HOLOMAP_MARKER_SKIPJACK "skipjack"
|
||||
// #define HOLOMAP_MARKER_SYNDISHUTTLE "syndishuttle"
|
||||
|
||||
#define HOLOMAP_EXTRA_STATIONMAP "stationmapformatted"
|
||||
#define HOLOMAP_EXTRA_STATIONMAPAREAS "stationareas"
|
||||
#define HOLOMAP_EXTRA_STATIONMAPSMALL "stationmapsmall"
|
||||
@@ -58,3 +58,5 @@
|
||||
//#define isturf(D) istype(D, /turf) //Built in
|
||||
#define isopenspace(A) istype(A, /turf/simulated/open)
|
||||
#define isspace(A) istype(A, /turf/space)
|
||||
|
||||
#define istaurtail(A) istype(A, /datum/sprite_accessory/tail/taur)
|
||||
|
||||
@@ -101,11 +101,9 @@
|
||||
#define slot_r_ear_str "slot_r_ear"
|
||||
#define slot_belt_str "slot_belt"
|
||||
#define slot_shoes_str "slot_shoes"
|
||||
#define slot_head_str "slot_head"
|
||||
#define slot_wear_mask_str "slot_wear_mask"
|
||||
#define slot_handcuffed_str "slot_handcuffed"
|
||||
#define slot_legcuffed_str "slot_legcuffed"
|
||||
#define slot_wear_mask_str "slot_wear_mask"
|
||||
#define slot_wear_id_str "slot_wear_id"
|
||||
#define slot_gloves_str "slot_gloves"
|
||||
#define slot_glasses_str "slot_glasses"
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#undef LIGHT_COLOR_INCANDESCENT_TUBE
|
||||
#define LIGHT_COLOR_INCANDESCENT_TUBE "#E0EFF0"
|
||||
#undef LIGHT_COLOR_INCANDESCENT_BULB
|
||||
#define LIGHT_COLOR_INCANDESCENT_BULB "#FFFEB8"
|
||||
|
||||
//Fake ambient occlusion filter
|
||||
#undef AMBIENT_OCCLUSION
|
||||
#define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-1, size=2, offset=2, color="#04080F55") //VOREStation Edit for prettier visuals.
|
||||
@@ -57,9 +57,6 @@
|
||||
#define MATERIAL_BRITTLE 0x2
|
||||
#define MATERIAL_PADDING 0x4
|
||||
|
||||
#define DEFAULT_TABLE_MATERIAL "plastic"
|
||||
#define DEFAULT_WALL_MATERIAL "steel"
|
||||
|
||||
#define TABLE_BRITTLE_MATERIAL_MULTIPLIER 4 // Amount table damage is multiplied by if it is made of a brittle material (e.g. glass)
|
||||
|
||||
//Material Container Flags.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define R_IDEAL_GAS_EQUATION 8.31 // kPa*L/(K*mol).
|
||||
#define ONE_ATMOSPHERE 101.325 // kPa.
|
||||
#define IDEAL_GAS_ENTROPY_CONSTANT 1164 // (mol^3 * s^3) / (kg^3 * L).
|
||||
#define ADIABATIC_EXPONENT 0.667 //Actually adiabatic exponent - 1.
|
||||
|
||||
#define T0C 273.15 // 0.0 degrees celcius
|
||||
#define T20C 293.15 // 20.0 degrees celcius
|
||||
|
||||
@@ -197,8 +197,6 @@
|
||||
|
||||
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
|
||||
|
||||
#define WORLD_ICON_SIZE 32 //Needed for the R-UST port
|
||||
#define PIXEL_MULTIPLIER WORLD_ICON_SIZE/32 //Needed for the R-UST port
|
||||
#define MAX_CLIENT_VIEW 34 // Maximum effective value of client.view (According to DM references)
|
||||
|
||||
// Maploader bounds indices
|
||||
@@ -465,3 +463,5 @@ GLOBAL_LIST_INIT(all_volume_channels, list(
|
||||
#ifndef HTTP_POST_DLL_LOCATION
|
||||
#define HTTP_POST_DLL_LOCATION (world.system_type == MS_WINDOWS ? WINDOWS_HTTP_POST_DLL_LOCATION : UNIX_HTTP_POST_DLL_LOCATION)
|
||||
#endif
|
||||
|
||||
#define DOCK_ATTEMPT_TIMEOUT 200 //how long in ticks we wait before assuming the docking controller is broken or blown up.
|
||||
@@ -25,19 +25,18 @@
|
||||
#define EMP_OXY_DMG 0x100 // EMPs inflict oxy damage
|
||||
|
||||
// Species allergens
|
||||
#define MEAT 0x1 // Skrell won't like this.
|
||||
#define FISH 0x2 // Seperate for completion's sake. Still bad for skrell.
|
||||
#define FRUIT 0x4 // An apple a day only keeps the doctor away if they're allergic.
|
||||
#define VEGETABLE 0x8 // Taters 'n' carrots. Potato allergy is a thing, apparently.
|
||||
#define GRAINS 0x10 // Wheat, oats, etc.
|
||||
#define BEANS 0x20 // The musical fruit! Includes soy.
|
||||
#define SEEDS 0x40 // Hope you don't have a nut allergy.
|
||||
#define DAIRY 0x80 // Lactose intolerance, ho! Also bad for skrell.
|
||||
#define FUNGI 0x100 // Delicious shrooms.
|
||||
#define COFFEE 0x200 // Mostly here for tajara.
|
||||
#define GENERIC 0x400 // Catchall for stuff that doesn't fall into the groups above. You shouldn't be allergic to this type, ever.
|
||||
#define SUGARS 0x800 // For unathi-like reactions
|
||||
#define EGGS 0x1000 // For Skrell eggs allergy
|
||||
#define ALLERGEN_MEAT 0x1 // Skrell won't like this.
|
||||
#define ALLERGEN_FISH 0x2 // Seperate for completion's sake. Still bad for skrell.
|
||||
#define ALLERGEN_FRUIT 0x4 // An apple a day only keeps the doctor away if they're allergic.
|
||||
#define ALLERGEN_VEGETABLE 0x8 // Taters 'n' carrots. Potato allergy is a thing, apparently.
|
||||
#define ALLERGEN_GRAINS 0x10 // Wheat, oats, etc.
|
||||
#define ALLERGEN_BEANS 0x20 // The musical fruit! Includes soy.
|
||||
#define ALLERGEN_SEEDS 0x40 // Hope you don't have a nut allergy.
|
||||
#define ALLERGEN_DAIRY 0x80 // Lactose intolerance, ho! Also bad for skrell.
|
||||
#define ALLERGEN_FUNGI 0x100 // Delicious shrooms.
|
||||
#define ALLERGEN_COFFEE 0x200 // Mostly here for tajara.
|
||||
#define ALLERGEN_SUGARS 0x400 // For unathi-like reactions
|
||||
#define ALLERGEN_EGGS 0x800 // For Skrell eggs allergy
|
||||
|
||||
// Allergen reactions
|
||||
#define AG_TOX_DMG 0x1 // the classic
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#define INIT_ORDER_HOLOMAPS -5 //VOREStation Add
|
||||
@@ -20,3 +20,4 @@
|
||||
#define isDiagonal(x) (x == NORTHEAST || x == SOUTHEAST || x == NORTHWEST || x == SOUTHWEST)
|
||||
|
||||
#define IS_OPAQUE_TURF(turf) (turf.directional_opacity == ALL_CARDINALS)
|
||||
#define FOOTSTEP_SPRITE_AMT 2
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
return counting_english_list(input, output_icons, determiners, nothing_text, and_text, comma_text, final_comma_text)
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
proc/listgetindex(var/list/list,index)
|
||||
/proc/listgetindex(var/list/list,index)
|
||||
if(istype(list) && list.len)
|
||||
if(isnum(index))
|
||||
if(InRange(index,1,list.len))
|
||||
@@ -89,13 +89,13 @@ proc/listgetindex(var/list/list,index)
|
||||
return
|
||||
|
||||
//Return either pick(list) or null if list is not of type /list or is empty
|
||||
proc/safepick(list/list)
|
||||
/proc/safepick(list/list)
|
||||
if(!islist(list) || !list.len)
|
||||
return
|
||||
return pick(list)
|
||||
|
||||
//Checks if the list is empty
|
||||
proc/isemptylist(list/list)
|
||||
/proc/isemptylist(list/list)
|
||||
if(!list.len)
|
||||
return 1
|
||||
return 0
|
||||
@@ -177,13 +177,13 @@ proc/isemptylist(list/list)
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
|
||||
proc/clearlist(list/list)
|
||||
/proc/clearlist(list/list)
|
||||
if(istype(list))
|
||||
list.len = 0
|
||||
return
|
||||
|
||||
//Removes any null entries from the list
|
||||
proc/listclearnulls(list/list)
|
||||
/proc/listclearnulls(list/list)
|
||||
if(istype(list))
|
||||
while(null in list)
|
||||
list -= null
|
||||
@@ -611,7 +611,7 @@ This actually tests if they have the same entries and values.
|
||||
min = mid+1
|
||||
|
||||
/*
|
||||
proc/dd_sortedObjectList(list/incoming)
|
||||
/proc/dd_sortedObjectList(list/incoming)
|
||||
/*
|
||||
Use binary search to order by dd_SortValue().
|
||||
This works by going to the half-point of the list, seeing if the node in
|
||||
@@ -669,7 +669,7 @@ proc/dd_sortedObjectList(list/incoming)
|
||||
return sorted_list
|
||||
*/
|
||||
|
||||
proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
|
||||
/proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
|
||||
// Returns a new list with the text values sorted.
|
||||
// Use binary search to order by sortValue.
|
||||
// This works by going to the half-point of the list, seeing if the node in question is higher or lower cost,
|
||||
@@ -728,7 +728,7 @@ proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
|
||||
return sorted_text
|
||||
|
||||
|
||||
proc/dd_sortedTextList(list/incoming)
|
||||
/proc/dd_sortedTextList(list/incoming)
|
||||
var/case_sensitive = 1
|
||||
return dd_sortedtextlist(incoming, case_sensitive)
|
||||
|
||||
|
||||
@@ -322,10 +322,7 @@ var/mobs_radio_range_fired = 1 //CHOMPEdit
|
||||
|
||||
return list("mobs" = mobs, "objs" = objs)
|
||||
|
||||
#define SIGN(X) ((X<0)?-1:1)
|
||||
|
||||
proc
|
||||
inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
|
||||
/proc/inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
|
||||
var/turf/T
|
||||
if(X1==X2)
|
||||
if(Y1==Y2)
|
||||
@@ -354,7 +351,6 @@ proc
|
||||
if(T.opacity)
|
||||
return 0
|
||||
return 1
|
||||
#undef SIGN
|
||||
|
||||
/proc/flick_overlay(image/I, list/show_to, duration, gc_after)
|
||||
for(var/client/C in show_to)
|
||||
@@ -373,7 +369,7 @@ proc
|
||||
viewing += M.client
|
||||
flick_overlay(I, viewing, duration, gc_after)
|
||||
|
||||
proc/isInSight(var/atom/A, var/atom/B)
|
||||
/proc/isInSight(var/atom/A, var/atom/B)
|
||||
var/turf/Aturf = get_turf(A)
|
||||
var/turf/Bturf = get_turf(B)
|
||||
|
||||
@@ -454,7 +450,7 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
for(var/client/C in group)
|
||||
C.screen -= O
|
||||
|
||||
datum/projectile_data
|
||||
/datum/projectile_data
|
||||
var/src_x
|
||||
var/src_y
|
||||
var/time
|
||||
|
||||
@@ -199,7 +199,7 @@ mob
|
||||
getFlatIcon(src)
|
||||
Browse_Icon()
|
||||
|
||||
obj/effect/overlayTest
|
||||
/obj/effect/overlayTest
|
||||
icon = 'old_or_unused.dmi'
|
||||
icon_state = "blue"
|
||||
pixel_x = -24
|
||||
@@ -215,26 +215,25 @@ world
|
||||
|
||||
#define TO_HEX_DIGIT(n) ascii2text((n&15) + ((n&15)<10 ? 48 : 87))
|
||||
|
||||
icon
|
||||
proc/MakeLying()
|
||||
/icon/proc/MakeLying()
|
||||
var/icon/I = new(src,dir=SOUTH)
|
||||
I.BecomeLying()
|
||||
return I
|
||||
|
||||
proc/BecomeLying()
|
||||
/icon/proc/BecomeLying()
|
||||
Turn(90)
|
||||
Shift(SOUTH,6)
|
||||
Shift(EAST,1)
|
||||
|
||||
// Multiply all alpha values by this float
|
||||
proc/ChangeOpacity(opacity = 1.0)
|
||||
// Multiply all alpha values by this float
|
||||
/icon/proc/ChangeOpacity(opacity = 1.0)
|
||||
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,opacity, 0,0,0,0)
|
||||
|
||||
// Convert to grayscale
|
||||
proc/GrayScale()
|
||||
// Convert to grayscale
|
||||
/icon/proc/GrayScale()
|
||||
MapColors(0.3,0.3,0.3, 0.59,0.59,0.59, 0.11,0.11,0.11, 0,0,0)
|
||||
|
||||
proc/ColorTone(tone)
|
||||
/icon/proc/ColorTone(tone)
|
||||
GrayScale()
|
||||
|
||||
var/list/TONE = ReadRGB(tone)
|
||||
@@ -251,15 +250,15 @@ icon
|
||||
upper.MapColors((255-TONE[1])/(255-gray),0,0,0, 0,(255-TONE[2])/(255-gray),0,0, 0,0,(255-TONE[3])/(255-gray),0, 0,0,0,0, 0,0,0,1)
|
||||
Blend(upper, ICON_ADD)
|
||||
|
||||
// Take the minimum color of two icons; combine transparency as if blending with ICON_ADD
|
||||
proc/MinColors(icon)
|
||||
// Take the minimum color of two icons; combine transparency as if blending with ICON_ADD
|
||||
/icon/proc/MinColors(icon)
|
||||
var/icon/I = new(src)
|
||||
I.Opaque()
|
||||
I.Blend(icon, ICON_SUBTRACT)
|
||||
Blend(I, ICON_SUBTRACT)
|
||||
|
||||
// Take the maximum color of two icons; combine opacity as if blending with ICON_OR
|
||||
proc/MaxColors(icon)
|
||||
// Take the maximum color of two icons; combine opacity as if blending with ICON_OR
|
||||
/icon/proc/MaxColors(icon)
|
||||
var/icon/I
|
||||
if(isicon(icon))
|
||||
I = new(icon)
|
||||
@@ -274,22 +273,22 @@ icon
|
||||
I.Blend(J, ICON_SUBTRACT)
|
||||
Blend(I, ICON_OR)
|
||||
|
||||
// make this icon fully opaque--transparent pixels become black
|
||||
proc/Opaque(background = "#000000")
|
||||
// make this icon fully opaque--transparent pixels become black
|
||||
/icon/proc/Opaque(background = "#000000")
|
||||
SwapColor(null, background)
|
||||
MapColors(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0,0,0,1)
|
||||
|
||||
// Change a grayscale icon into a white icon where the original color becomes the alpha
|
||||
// I.e., black -> transparent, gray -> translucent white, white -> solid white
|
||||
proc/BecomeAlphaMask()
|
||||
// Change a grayscale icon into a white icon where the original color becomes the alpha
|
||||
// I.e., black -> transparent, gray -> translucent white, white -> solid white
|
||||
/icon/proc/BecomeAlphaMask()
|
||||
SwapColor(null, "#000000ff") // don't let transparent become gray
|
||||
MapColors(0,0,0,0.3, 0,0,0,0.59, 0,0,0,0.11, 0,0,0,0, 1,1,1,0)
|
||||
|
||||
proc/UseAlphaMask(mask)
|
||||
/icon/proc/UseAlphaMask(mask)
|
||||
Opaque()
|
||||
AddAlphaMask(mask)
|
||||
|
||||
proc/AddAlphaMask(mask)
|
||||
/icon/proc/AddAlphaMask(mask)
|
||||
var/icon/M = new(mask)
|
||||
M.Blend("#ffffff", ICON_SUBTRACT)
|
||||
// apply mask
|
||||
@@ -317,7 +316,7 @@ icon
|
||||
Higher value means brighter color
|
||||
*/
|
||||
|
||||
proc/ReadRGB(rgb)
|
||||
/proc/ReadRGB(rgb)
|
||||
if(!rgb) return
|
||||
|
||||
// interpret the HSV or HSVA value
|
||||
@@ -367,14 +366,14 @@ proc/ReadRGB(rgb)
|
||||
. = list(r, g, b)
|
||||
if(usealpha) . += alpha
|
||||
|
||||
proc/RGBdec2hex(var/list/values)
|
||||
/proc/RGBdec2hex(var/list/values)
|
||||
var/string = ""
|
||||
while(values.len)
|
||||
string = "[num2text(values[values.len], 2, 16)][string]"
|
||||
values.len--
|
||||
return "#[string]"
|
||||
|
||||
proc/ReadHSV(hsv)
|
||||
/proc/ReadHSV(hsv)
|
||||
if(!hsv) return
|
||||
|
||||
// interpret the HSV or HSVA value
|
||||
@@ -413,7 +412,7 @@ proc/ReadHSV(hsv)
|
||||
. = list(hue, sat, val)
|
||||
if(usealpha) . += alpha
|
||||
|
||||
proc/HSVtoRGB(hsv)
|
||||
/proc/HSVtoRGB(hsv)
|
||||
if(!hsv) return "#000000"
|
||||
var/list/HSV = ReadHSV(hsv)
|
||||
if(!HSV) return "#000000"
|
||||
@@ -441,7 +440,7 @@ proc/HSVtoRGB(hsv)
|
||||
|
||||
return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b)
|
||||
|
||||
proc/RGBtoHSV(rgb)
|
||||
/proc/RGBtoHSV(rgb)
|
||||
if(!rgb) return "#0000000"
|
||||
var/list/RGB = ReadRGB(rgb)
|
||||
if(!RGB) return "#0000000"
|
||||
@@ -472,7 +471,7 @@ proc/RGBtoHSV(rgb)
|
||||
|
||||
return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null))
|
||||
|
||||
proc/hsv(hue, sat, val, alpha)
|
||||
/proc/hsv(hue, sat, val, alpha)
|
||||
if(hue < 0 || hue >= 1536) hue %= 1536
|
||||
if(hue < 0) hue += 1536
|
||||
if((hue & 0xFF) == 0xFF)
|
||||
@@ -505,7 +504,7 @@ proc/hsv(hue, sat, val, alpha)
|
||||
|
||||
amount<0 or amount>1 are allowed
|
||||
*/
|
||||
proc/BlendHSV(hsv1, hsv2, amount)
|
||||
/proc/BlendHSV(hsv1, hsv2, amount)
|
||||
var/list/HSV1 = ReadHSV(hsv1)
|
||||
var/list/HSV2 = ReadHSV(hsv2)
|
||||
|
||||
@@ -559,7 +558,7 @@ proc/BlendHSV(hsv1, hsv2, amount)
|
||||
|
||||
amount<0 or amount>1 are allowed
|
||||
*/
|
||||
proc/BlendRGB(rgb1, rgb2, amount)
|
||||
/proc/BlendRGB(rgb1, rgb2, amount)
|
||||
var/list/RGB1 = ReadRGB(rgb1)
|
||||
var/list/RGB2 = ReadRGB(rgb2)
|
||||
|
||||
@@ -575,10 +574,10 @@ proc/BlendRGB(rgb1, rgb2, amount)
|
||||
|
||||
return isnull(alpha) ? rgb(r, g, b) : rgb(r, g, b, alpha)
|
||||
|
||||
proc/BlendRGBasHSV(rgb1, rgb2, amount)
|
||||
/proc/BlendRGBasHSV(rgb1, rgb2, amount)
|
||||
return HSVtoRGB(RGBtoHSV(rgb1), RGBtoHSV(rgb2), amount)
|
||||
|
||||
proc/HueToAngle(hue)
|
||||
/proc/HueToAngle(hue)
|
||||
// normalize hsv in case anything is screwy
|
||||
if(hue < 0 || hue >= 1536) hue %= 1536
|
||||
if(hue < 0) hue += 1536
|
||||
@@ -586,7 +585,7 @@ proc/HueToAngle(hue)
|
||||
hue -= hue >> 8
|
||||
return hue / (1530/360)
|
||||
|
||||
proc/AngleToHue(angle)
|
||||
/proc/AngleToHue(angle)
|
||||
// normalize hsv in case anything is screwy
|
||||
if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360)
|
||||
var/hue = angle * (1530/360)
|
||||
@@ -596,7 +595,7 @@ proc/AngleToHue(angle)
|
||||
|
||||
|
||||
// positive angle rotates forward through red->green->blue
|
||||
proc/RotateHue(hsv, angle)
|
||||
/proc/RotateHue(hsv, angle)
|
||||
var/list/HSV = ReadHSV(hsv)
|
||||
|
||||
// normalize hsv in case anything is screwy
|
||||
@@ -618,13 +617,13 @@ proc/RotateHue(hsv, angle)
|
||||
return hsv(HSV[1], HSV[2], HSV[3], (HSV.len > 3 ? HSV[4] : null))
|
||||
|
||||
// Convert an rgb color to grayscale
|
||||
proc/GrayScale(rgb)
|
||||
/proc/GrayScale(rgb)
|
||||
var/list/RGB = ReadRGB(rgb)
|
||||
var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11
|
||||
return (RGB.len > 3) ? rgb(gray, gray, gray, RGB[4]) : rgb(gray, gray, gray)
|
||||
|
||||
// Change grayscale color to black->tone->white range
|
||||
proc/ColorTone(rgb, tone)
|
||||
/proc/ColorTone(rgb, tone)
|
||||
var/list/RGB = ReadRGB(rgb)
|
||||
var/list/TONE = ReadRGB(tone)
|
||||
|
||||
@@ -934,7 +933,7 @@ GLOBAL_LIST_EMPTY(cached_examine_icons)
|
||||
/proc/uncache_examine_icon(var/weakref/WR)
|
||||
GLOB.cached_examine_icons -= WR
|
||||
|
||||
proc/adjust_brightness(var/color, var/value)
|
||||
/proc/adjust_brightness(var/color, var/value)
|
||||
if (!color) return "#FFFFFF"
|
||||
if (!value) return color
|
||||
|
||||
@@ -944,7 +943,7 @@ proc/adjust_brightness(var/color, var/value)
|
||||
RGB[3] = CLAMP(RGB[3]+value,0,255)
|
||||
return rgb(RGB[1],RGB[2],RGB[3])
|
||||
|
||||
proc/sort_atoms_by_layer(var/list/atoms)
|
||||
/proc/sort_atoms_by_layer(var/list/atoms)
|
||||
// Comb sort icons based on levels
|
||||
var/list/result = atoms.Copy()
|
||||
var/gap = result.len
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
proc/random_hair_style(gender, species = SPECIES_HUMAN)
|
||||
/proc/random_hair_style(gender, species = SPECIES_HUMAN)
|
||||
var/h_style = "Bald"
|
||||
|
||||
var/list/valid_hairstyles = list()
|
||||
@@ -17,7 +17,7 @@ proc/random_hair_style(gender, species = SPECIES_HUMAN)
|
||||
|
||||
return h_style
|
||||
|
||||
proc/random_facial_hair_style(gender, species = SPECIES_HUMAN)
|
||||
/proc/random_facial_hair_style(gender, species = SPECIES_HUMAN)
|
||||
var/f_style = "Shaved"
|
||||
|
||||
var/list/valid_facialhairstyles = list()
|
||||
@@ -37,14 +37,14 @@ proc/random_facial_hair_style(gender, species = SPECIES_HUMAN)
|
||||
|
||||
return f_style
|
||||
|
||||
proc/sanitize_name(name, species = SPECIES_HUMAN, robot = 0)
|
||||
/proc/sanitize_name(name, species = SPECIES_HUMAN, robot = 0)
|
||||
var/datum/species/current_species
|
||||
if(species)
|
||||
current_species = GLOB.all_species[species]
|
||||
|
||||
return current_species ? current_species.sanitize_name(name, robot) : sanitizeName(name, MAX_NAME_LEN, robot)
|
||||
|
||||
proc/random_name(gender, species = SPECIES_HUMAN)
|
||||
/proc/random_name(gender, species = SPECIES_HUMAN)
|
||||
|
||||
var/datum/species/current_species
|
||||
if(species)
|
||||
@@ -58,7 +58,7 @@ proc/random_name(gender, species = SPECIES_HUMAN)
|
||||
else
|
||||
return current_species.get_random_name(gender)
|
||||
|
||||
proc/random_skin_tone()
|
||||
/proc/random_skin_tone()
|
||||
switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino"))
|
||||
if("caucasian") . = -10
|
||||
if("afroamerican") . = -115
|
||||
@@ -68,7 +68,7 @@ proc/random_skin_tone()
|
||||
else . = rand(-185,34)
|
||||
return min(max( .+rand(-25, 25), -185),34)
|
||||
|
||||
proc/skintone2racedescription(tone)
|
||||
/proc/skintone2racedescription(tone)
|
||||
switch (tone)
|
||||
if(30 to INFINITY) return "albino"
|
||||
if(20 to 30) return "pale"
|
||||
@@ -80,7 +80,7 @@ proc/skintone2racedescription(tone)
|
||||
if(-INFINITY to -65) return "black"
|
||||
else return "unknown"
|
||||
|
||||
proc/age2agedescription(age)
|
||||
/proc/age2agedescription(age)
|
||||
switch(age)
|
||||
if(0 to 1) return "infant"
|
||||
if(1 to 3) return "toddler"
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
|
||||
//Used in preferences' SetFlavorText and human's set_flavor verb
|
||||
//Previews a string of len or less length
|
||||
proc/TextPreview(var/string,var/len=40)
|
||||
/proc/TextPreview(var/string,var/len=40)
|
||||
if(length(string) <= len)
|
||||
if(!length(string))
|
||||
return "\[...\]"
|
||||
|
||||
@@ -80,7 +80,7 @@ var/next_station_date_change = 1 DAY
|
||||
return time2text(wtime - GLOB.timezoneOffset, format)
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
proc/isDay(var/month, var/day)
|
||||
/proc/isDay(var/month, var/day)
|
||||
if(isnum(month) && isnum(day))
|
||||
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
|
||||
@@ -596,7 +596,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return max(min(middle, high), low)
|
||||
|
||||
//returns random gauss number
|
||||
proc/GaussRand(var/sigma)
|
||||
/proc/GaussRand(var/sigma)
|
||||
var/x,y,rsq
|
||||
do
|
||||
x=2*rand()-1
|
||||
@@ -606,7 +606,7 @@ proc/GaussRand(var/sigma)
|
||||
return sigma*y*sqrt(-2*log(rsq)/rsq)
|
||||
|
||||
//returns random gauss number, rounded to 'roundto'
|
||||
proc/GaussRandRound(var/sigma,var/roundto)
|
||||
/proc/GaussRandRound(var/sigma,var/roundto)
|
||||
return round(GaussRand(sigma),roundto)
|
||||
|
||||
//Will return the contents of an atom recursivly to a depth of 'searchDepth'
|
||||
@@ -867,7 +867,7 @@ proc/GaussRandRound(var/sigma,var/roundto)
|
||||
refined_trg -= B
|
||||
continue moving
|
||||
|
||||
proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
/proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
if(!original)
|
||||
return null
|
||||
|
||||
@@ -1015,16 +1015,16 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
|
||||
|
||||
|
||||
proc/get_cardinal_dir(atom/A, atom/B)
|
||||
/proc/get_cardinal_dir(atom/A, atom/B)
|
||||
var/dx = abs(B.x - A.x)
|
||||
var/dy = abs(B.y - A.y)
|
||||
return get_dir(A, B) & (rand() * (dx+dy) < dy ? 3 : 12)
|
||||
|
||||
//chances are 1:value. anyprob(1) will always return true
|
||||
proc/anyprob(value)
|
||||
/proc/anyprob(value)
|
||||
return (rand(1,value)==value)
|
||||
|
||||
proc/view_or_range(distance = world.view , center = usr , type)
|
||||
/proc/view_or_range(distance = world.view , center = usr , type)
|
||||
switch(type)
|
||||
if("view")
|
||||
. = view(distance,center)
|
||||
@@ -1032,7 +1032,7 @@ proc/view_or_range(distance = world.view , center = usr , type)
|
||||
. = range(distance,center)
|
||||
return
|
||||
|
||||
proc/oview_or_orange(distance = world.view , center = usr , type)
|
||||
/proc/oview_or_orange(distance = world.view , center = usr , type)
|
||||
switch(type)
|
||||
if("view")
|
||||
. = oview(distance,center)
|
||||
@@ -1040,7 +1040,7 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
|
||||
. = orange(distance,center)
|
||||
return
|
||||
|
||||
proc/get_mob_with_client_list()
|
||||
/proc/get_mob_with_client_list()
|
||||
var/list/mobs = list()
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.client)
|
||||
@@ -1097,7 +1097,7 @@ var/global/list/common_tools = list(
|
||||
return TRUE
|
||||
return
|
||||
|
||||
proc/is_hot(obj/item/W as obj)
|
||||
/proc/is_hot(obj/item/W as obj)
|
||||
switch(W.type)
|
||||
if(/obj/item/weapon/weldingtool)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
@@ -1480,8 +1480,6 @@ var/mob/dview/dview_mob = new
|
||||
/proc/pass()
|
||||
return
|
||||
|
||||
#define NAMEOF(datum, X) (#X || ##datum.##X)
|
||||
|
||||
/proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
|
||||
if (value == FALSE) //nothing should be calling us with a number, so this is safe
|
||||
value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
|
||||
|
||||
@@ -40,5 +40,6 @@
|
||||
|
||||
#define ARGS_DEBUG log_debug("[__FILE__] - [__LINE__]") ; for(var/arg in args) { log_debug("\t[log_info_line(arg)]") }
|
||||
|
||||
#define isitem(A) istype(A, /obj/item)
|
||||
#define isTaurTail(A) istype(A, /datum/sprite_accessory/tail/taur)
|
||||
#define WORLD_ICON_SIZE 32 //Needed for the R-UST port
|
||||
|
||||
#define PIXEL_MULTIPLIER WORLD_ICON_SIZE/32 //Needed for the R-UST port
|
||||
@@ -191,7 +191,7 @@ var/list/global_huds = list(
|
||||
|
||||
var/list/minihuds = list()
|
||||
|
||||
datum/hud/New(mob/owner)
|
||||
/datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
instantiate()
|
||||
..()
|
||||
|
||||
@@ -62,6 +62,5 @@
|
||||
client.update_skybox()
|
||||
client.skybox?.scale_to_view(client.view)
|
||||
|
||||
#undef SKYBOX_BORDER
|
||||
#undef SKYBOX_PIXELS
|
||||
#undef SKYBOX_TURFS
|
||||
|
||||
@@ -4,14 +4,14 @@ These are the default click code call sequences used when clicking on stuff with
|
||||
|
||||
Atoms:
|
||||
|
||||
mob/ClickOn() calls the item's resolve_attackby() proc.
|
||||
/mob/ClickOn() calls the item's resolve_attackby() proc.
|
||||
item/resolve_attackby() calls the target atom's attackby() proc.
|
||||
|
||||
Mobs:
|
||||
|
||||
mob/living/attackby() after checking for surgery, calls the item's attack() proc.
|
||||
/mob/living/attackby() after checking for surgery, calls the item's attack() proc.
|
||||
item/attack() generates attack logs, sets click cooldown and calls the mob's attacked_with_item() proc. If you override this, consider whether you need to set a click cooldown, play attack animations, and generate logs yourself.
|
||||
mob/attacked_with_item() should then do mob-type specific stuff (like determining hit/miss, handling shields, etc) and then possibly call the item's apply_hit_effect() proc to actually apply the effects of being hit.
|
||||
/mob/attacked_with_item() should then do mob-type specific stuff (like determining hit/miss, handling shields, etc) and then possibly call the item's apply_hit_effect() proc to actually apply the effects of being hit.
|
||||
|
||||
Item Hit Effects:
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
var/datum/controller/transfer_controller/transfer_controller
|
||||
|
||||
datum/controller/transfer_controller
|
||||
/datum/controller/transfer_controller
|
||||
var/timerbuffer = 0 //buffer for time check
|
||||
var/currenttick = 0
|
||||
var/shift_hard_end = 0 //VOREStation Edit
|
||||
var/shift_last_vote = 0 //VOREStation Edit
|
||||
datum/controller/transfer_controller/New()
|
||||
/datum/controller/transfer_controller/New()
|
||||
timerbuffer = config.vote_autotransfer_initial
|
||||
shift_hard_end = config.vote_autotransfer_initial + (config.vote_autotransfer_interval * 2) //CHOMPStation Edit //Change this "1" to how many extend votes you want there to be. //Note: Fuck you whoever just slapped a number here instead of using the FUCKING CONFIG LIKE ALL THE OTHER NUMBERS HERE
|
||||
shift_last_vote = shift_hard_end - config.vote_autotransfer_interval //VOREStation Edit
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
datum/controller/transfer_controller/Destroy()
|
||||
/datum/controller/transfer_controller/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
datum/controller/transfer_controller/process()
|
||||
/datum/controller/transfer_controller/process()
|
||||
currenttick = currenttick + 1
|
||||
//VOREStation Edit START
|
||||
if (round_duration_in_ds >= shift_last_vote - 2 MINUTES)
|
||||
|
||||
@@ -194,9 +194,6 @@ var/list/DEPT_FREQS = list(AI_FREQ, COMM_FREQ, ENG_FREQ, ENT_FREQ, MED_FREQ, SEC
|
||||
|
||||
var/list/OFFMAP_FREQS = list(TALON_FREQ) //VOREStation Add
|
||||
|
||||
#define TRANSMISSION_WIRE 0
|
||||
#define TRANSMISSION_RADIO 1
|
||||
|
||||
/proc/frequency_span_class(var/frequency)
|
||||
// Antags!
|
||||
if (frequency in ANTAG_FREQS)
|
||||
|
||||
@@ -13,10 +13,10 @@ var/global/last_tick_duration = 0
|
||||
|
||||
var/global/pipe_processing_killed = 0
|
||||
|
||||
datum/controller/game_controller
|
||||
/datum/controller/game_controller
|
||||
var/list/shuttle_list // For debugging and VV
|
||||
|
||||
datum/controller/game_controller/New()
|
||||
/datum/controller/game_controller/New()
|
||||
//There can be only one master_controller. Out with the old and in with the new.
|
||||
if(master_controller != src)
|
||||
log_debug("Rebuilding Master Controller")
|
||||
@@ -33,7 +33,7 @@ datum/controller/game_controller/New()
|
||||
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
|
||||
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
|
||||
|
||||
datum/controller/game_controller/proc/setup()
|
||||
/datum/controller/game_controller/proc/setup()
|
||||
|
||||
setup_objects()
|
||||
// setupgenetics() Moved to SSatoms
|
||||
@@ -48,7 +48,7 @@ datum/controller/game_controller/proc/setup()
|
||||
// #define CHECK_SLEEP_MASTER if(++initialized_objects > 500) { initialized_objects=0;sleep(world.tick_lag); }
|
||||
// #endif
|
||||
|
||||
datum/controller/game_controller/proc/setup_objects()
|
||||
/datum/controller/game_controller/proc/setup_objects()
|
||||
// Set up antagonists.
|
||||
populate_antag_type_list()
|
||||
|
||||
|
||||
@@ -174,5 +174,4 @@ SUBSYSTEM_DEF(machines)
|
||||
|
||||
#undef SSMACHINES_PIPENETS
|
||||
#undef SSMACHINES_MACHINERY
|
||||
#undef SSMACHINES_POWER
|
||||
#undef SSMACHINES_POWER_OBJECTS
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
collection = null
|
||||
return ..()
|
||||
|
||||
datum/category_group/dd_SortValue()
|
||||
/datum/category_group/dd_SortValue()
|
||||
return name
|
||||
|
||||
|
||||
@@ -77,5 +77,5 @@ datum/category_group/dd_SortValue()
|
||||
category = null
|
||||
return ..()
|
||||
|
||||
datum/category_item/dd_SortValue()
|
||||
/datum/category_item/dd_SortValue()
|
||||
return name
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
datum
|
||||
computer
|
||||
var/name
|
||||
folder
|
||||
var/list/datum/computer/contents = list()
|
||||
|
||||
file
|
||||
@@ -6,20 +6,20 @@
|
||||
/datum/events
|
||||
var/list/events
|
||||
|
||||
New()
|
||||
/datum/events/New()
|
||||
..()
|
||||
events = new
|
||||
|
||||
proc/addEventType(event_type as text)
|
||||
/datum/events/proc/addEventType(event_type as text)
|
||||
if(!(event_type in events) || !islist(events[event_type]))
|
||||
events[event_type] = list()
|
||||
return 1
|
||||
return
|
||||
|
||||
|
||||
// Arguments: event_type as text, proc_holder as datum, proc_name as text
|
||||
// Returns: New event, null on error.
|
||||
proc/addEvent(event_type as text, proc_holder, proc_name as text)
|
||||
// Arguments: event_type as text, proc_holder as datum, proc_name as text
|
||||
// Returns: New event, null on error.
|
||||
/datum/events/proc/addEvent(event_type as text, proc_holder, proc_name as text)
|
||||
if(!event_type || !proc_holder || !proc_name)
|
||||
return
|
||||
addEventType(event_type)
|
||||
@@ -28,9 +28,9 @@
|
||||
event += E
|
||||
return E
|
||||
|
||||
// Arguments: event_type as text, any number of additional arguments to pass to event handler
|
||||
// Returns: null
|
||||
proc/fireEvent()
|
||||
// Arguments: event_type as text, any number of additional arguments to pass to event handler
|
||||
// Returns: null
|
||||
/datum/events/proc/fireEvent()
|
||||
//to_world("Events in [args[1]] called")
|
||||
var/list/event = listgetindex(events,args[1])
|
||||
if(istype(event))
|
||||
@@ -40,9 +40,9 @@
|
||||
clearEvent(args[1],E)
|
||||
return
|
||||
|
||||
// Arguments: event_type as text, E as /datum/event
|
||||
// Returns: 1 if event cleared, null on error
|
||||
proc/clearEvent(event_type as text, datum/event/E)
|
||||
// Arguments: event_type as text, E as /datum/event
|
||||
// Returns: 1 if event cleared, null on error
|
||||
/datum/events/proc/clearEvent(event_type as text, datum/event/E)
|
||||
if(!event_type || !E)
|
||||
return
|
||||
var/list/event = listgetindex(events,event_type)
|
||||
@@ -54,12 +54,12 @@
|
||||
var/listener
|
||||
var/proc_name
|
||||
|
||||
New(tlistener,tprocname)
|
||||
/datum/event/New(tlistener,tprocname)
|
||||
listener = tlistener
|
||||
proc_name = tprocname
|
||||
return ..()
|
||||
|
||||
proc/Fire()
|
||||
/datum/event/proc/Fire()
|
||||
//to_world("Event fired")
|
||||
if(listener)
|
||||
call(listener,proc_name)(arglist(args))
|
||||
|
||||
@@ -53,7 +53,7 @@ GLOBAL_DATUM(revdata, /datum/getrev)
|
||||
continue
|
||||
. += "<a href=\"[config.githuburl]/pull/[tm.number]\">#[tm.number][details]</a>"
|
||||
|
||||
client/verb/showrevinfo()
|
||||
/client/verb/showrevinfo()
|
||||
set category = "OOC"
|
||||
set name = "Show Server Revision"
|
||||
set desc = "Check the current server code revision"
|
||||
|
||||
@@ -2,59 +2,59 @@
|
||||
var/href
|
||||
var/list/href_list
|
||||
|
||||
New(thref,list/thref_list)
|
||||
/datum/topic_input/New(thref,list/thref_list)
|
||||
href = thref
|
||||
href_list = thref_list.Copy()
|
||||
return
|
||||
|
||||
proc/get(i)
|
||||
/datum/topic_input/proc/get(i)
|
||||
return listgetindex(href_list,i)
|
||||
|
||||
proc/getAndLocate(i)
|
||||
/datum/topic_input/proc/getAndLocate(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = locate(t)
|
||||
return t || null
|
||||
|
||||
proc/getNum(i)
|
||||
/datum/topic_input/proc/getNum(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = text2num(t)
|
||||
return isnum(t) ? t : null
|
||||
|
||||
proc/getObj(i)
|
||||
/datum/topic_input/proc/getObj(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isobj(t) ? t : null
|
||||
|
||||
proc/getMob(i)
|
||||
/datum/topic_input/proc/getMob(i)
|
||||
var/t = getAndLocate(i)
|
||||
return ismob(t) ? t : null
|
||||
|
||||
proc/getTurf(i)
|
||||
/datum/topic_input/proc/getTurf(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isturf(t) ? t : null
|
||||
|
||||
proc/getAtom(i)
|
||||
/datum/topic_input/proc/getAtom(i)
|
||||
return getType(i,/atom)
|
||||
|
||||
proc/getArea(i)
|
||||
/datum/topic_input/proc/getArea(i)
|
||||
var/t = getAndLocate(i)
|
||||
return isarea(t) ? t : null
|
||||
|
||||
proc/getStr(i)//params should always be text, but...
|
||||
/datum/topic_input/proc/getStr(i)//params should always be text, but...
|
||||
var/t = get(i)
|
||||
return istext(t) ? t : null
|
||||
|
||||
proc/getType(i,type)
|
||||
/datum/topic_input/proc/getType(i,type)
|
||||
var/t = getAndLocate(i)
|
||||
return istype(t,type) ? t : null
|
||||
|
||||
proc/getPath(i)
|
||||
/datum/topic_input/proc/getPath(i)
|
||||
var/t = get(i)
|
||||
if(t)
|
||||
t = text2path(t)
|
||||
return ispath(t) ? t : null
|
||||
|
||||
proc/getList(i)
|
||||
/datum/topic_input/proc/getList(i)
|
||||
var/t = getAndLocate(i)
|
||||
return islist(t) ? t : null
|
||||
@@ -4,7 +4,7 @@
|
||||
/client/can_vv_get(var_name)
|
||||
return var_name != NAMEOF(src, feedback_form) // No snooping.
|
||||
|
||||
GENERAL_PROTECT_DATUM(datum/managed_browser/feedback_form)
|
||||
GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
|
||||
|
||||
// A fairly simple object to hold information about a player's feedback as it's being written.
|
||||
// Having this be it's own object instead of being baked into /mob/new_player allows for it to be used
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
pda_type = /obj/item/device/pda/centcom
|
||||
flags = OUTFIT_EXTENDED_SURVIVAL|OUTFIT_COMPREHENSIVE_SURVIVAL
|
||||
|
||||
post_equip(var/mob/living/carbon/human/H)
|
||||
/decl/hierarchy/outfit/job/emergency_responder/post_equip(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
ert.add_antagonist(H.mind)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
id_type = /obj/item/weapon/card/id/civilian/mime
|
||||
pda_type = /obj/item/device/pda/mime
|
||||
|
||||
post_equip(var/mob/living/carbon/human/H)
|
||||
/decl/hierarchy/outfit/job/mime/post_equip(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_l_hand)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
containertype = /obj/structure/closet/crate/gilthari
|
||||
containername = "Formal suit crate"
|
||||
|
||||
datum/supply_pack/costumes/witch
|
||||
/datum/supply_pack/costumes/witch
|
||||
name = "Witch costume"
|
||||
containername = "Witch costume"
|
||||
containertype = /obj/structure/closet/crate/nanothreads
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/display_name // For displaying in text
|
||||
var/gender = NEUTER
|
||||
|
||||
datum/category_group/underwear/dd_SortValue()
|
||||
/datum/category_group/underwear/dd_SortValue()
|
||||
return sort_order
|
||||
|
||||
/datum/category_group/underwear/top
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
..()
|
||||
items = list()
|
||||
|
||||
datum/uplink_category/ammunition
|
||||
/datum/uplink_category/ammunition
|
||||
name = "Ammunition"
|
||||
|
||||
/datum/uplink_category/services
|
||||
|
||||
@@ -95,7 +95,7 @@ var/datum/uplink/uplink = new()
|
||||
log_and_message_admins("\the [M] bought \a [src] through the uplink")
|
||||
M.mind.purchase_log[src] += 1
|
||||
|
||||
datum/uplink_item/dd_SortValue()
|
||||
/datum/uplink_item/dd_SortValue()
|
||||
return item_cost
|
||||
|
||||
/********************************
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/signpost/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
/obj/structure/signpost/attack_hand(mob/user as mob)
|
||||
switch(alert("Travel back to ss13?",,"Yes","No"))
|
||||
if("Yes")
|
||||
if(user.z != src.z) return
|
||||
@@ -129,7 +129,7 @@
|
||||
drop_sound = 'sound/items/drop/rubber.ogg'
|
||||
pickup_sound = 'sound/items/pickup/rubber.ogg'
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
/obj/item/weapon/beach_ball/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
user.drop_item()
|
||||
src.throw_at(target, throw_range, throw_speed, user)
|
||||
|
||||
|
||||
@@ -37,18 +37,18 @@ length to avoid portals or something i guess?? Not that they're counted right no
|
||||
// Also added 'exclude' turf to avoid travelling over; defaults to null
|
||||
|
||||
|
||||
PriorityQueue
|
||||
/PriorityQueue
|
||||
var/list/queue
|
||||
var/comparison_function
|
||||
|
||||
New(compare)
|
||||
/PriorityQueue/New(compare)
|
||||
queue = list()
|
||||
comparison_function = compare
|
||||
|
||||
proc/IsEmpty()
|
||||
/PriorityQueue/proc/IsEmpty()
|
||||
return !queue.len
|
||||
|
||||
proc/Enqueue(var/data)
|
||||
/PriorityQueue/proc/Enqueue(var/data)
|
||||
queue.Add(data)
|
||||
var/index = queue.len
|
||||
|
||||
@@ -57,12 +57,12 @@ PriorityQueue
|
||||
queue.Swap(index, index / 2)
|
||||
index /= 2
|
||||
|
||||
proc/Dequeue()
|
||||
/PriorityQueue/proc/Dequeue()
|
||||
if(!queue.len)
|
||||
return 0
|
||||
return Remove(1)
|
||||
|
||||
proc/Remove(var/index)
|
||||
/PriorityQueue/proc/Remove(var/index)
|
||||
if(index > queue.len)
|
||||
return 0
|
||||
|
||||
@@ -73,7 +73,7 @@ PriorityQueue
|
||||
FixQueue(index)
|
||||
return thing
|
||||
|
||||
proc/FixQueue(var/index)
|
||||
/PriorityQueue/proc/FixQueue(var/index)
|
||||
var/child = 2 * index
|
||||
var/item = queue[index]
|
||||
|
||||
@@ -88,18 +88,18 @@ PriorityQueue
|
||||
child = 2 * index
|
||||
queue[index] = item
|
||||
|
||||
proc/List()
|
||||
/PriorityQueue/proc/List()
|
||||
return queue.Copy()
|
||||
|
||||
proc/Length()
|
||||
/PriorityQueue/proc/Length()
|
||||
return queue.len
|
||||
|
||||
proc/RemoveItem(data)
|
||||
/PriorityQueue/proc/RemoveItem(data)
|
||||
var/index = queue.Find(data)
|
||||
if(index)
|
||||
return Remove(index)
|
||||
|
||||
PathNode
|
||||
/PathNode
|
||||
var/datum/position
|
||||
var/PathNode/previous_node
|
||||
|
||||
@@ -109,7 +109,7 @@ PathNode
|
||||
var/cost
|
||||
var/nodes_traversed
|
||||
|
||||
New(_position, _previous_node, _known_cost, _cost, _nodes_traversed)
|
||||
/PathNode/New(_position, _previous_node, _known_cost, _cost, _nodes_traversed)
|
||||
position = _position
|
||||
previous_node = _previous_node
|
||||
|
||||
@@ -120,10 +120,10 @@ PathNode
|
||||
best_estimated_cost = estimated_cost
|
||||
nodes_traversed = _nodes_traversed
|
||||
|
||||
proc/PathWeightCompare(PathNode/a, PathNode/b)
|
||||
/proc/PathWeightCompare(PathNode/a, PathNode/b)
|
||||
return a.estimated_cost - b.estimated_cost
|
||||
|
||||
proc/AStar(var/start, var/end, var/adjacent, var/dist, var/max_nodes, var/max_node_depth = 30, var/min_target_dist = 0, var/min_node_dist, var/id, var/datum/exclude)
|
||||
/proc/AStar(var/start, var/end, var/adjacent, var/dist, var/max_nodes, var/max_node_depth = 30, var/min_target_dist = 0, var/min_node_dist, var/id, var/datum/exclude)
|
||||
var/PriorityQueue/open = new /PriorityQueue(/proc/PathWeightCompare)
|
||||
var/list/closed = list()
|
||||
var/list/path
|
||||
|
||||
@@ -38,7 +38,7 @@ var/DB_SERVER = "" // This is the location of your MySQL server (localhost is US
|
||||
var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
|
||||
*/
|
||||
|
||||
DBConnection
|
||||
/DBConnection
|
||||
var/_db_con // This variable contains a reference to the actual database connection.
|
||||
var/dbi // This variable is a string containing the DBI MySQL requires.
|
||||
var/user // This variable contains the username data.
|
||||
@@ -48,14 +48,14 @@ DBConnection
|
||||
var/server = ""
|
||||
var/port = 3306
|
||||
|
||||
DBConnection/New(dbi_handler,username,password_handler,cursor_handler)
|
||||
/DBConnection/New(dbi_handler,username,password_handler,cursor_handler)
|
||||
src.dbi = dbi_handler
|
||||
src.user = username
|
||||
src.password = password_handler
|
||||
src.default_cursor = cursor_handler
|
||||
_db_con = _dm_db_new_con()
|
||||
|
||||
DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
|
||||
/DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
|
||||
if(!config.sql_enabled)
|
||||
return 0
|
||||
if(!src) return 0
|
||||
@@ -63,24 +63,24 @@ DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_han
|
||||
if(!cursor_handler) cursor_handler = Default_Cursor
|
||||
return _dm_db_connect(_db_con,dbi_handler,user_handler,password_handler,cursor_handler,null)
|
||||
|
||||
DBConnection/proc/Disconnect() return _dm_db_close(_db_con)
|
||||
/DBConnection/proc/Disconnect() return _dm_db_close(_db_con)
|
||||
|
||||
DBConnection/proc/IsConnected()
|
||||
/DBConnection/proc/IsConnected()
|
||||
if(!config.sql_enabled) return 0
|
||||
var/success = _dm_db_is_connected(_db_con)
|
||||
return success
|
||||
|
||||
DBConnection/proc/Quote(str) return _dm_db_quote(_db_con,str)
|
||||
/DBConnection/proc/Quote(str) return _dm_db_quote(_db_con,str)
|
||||
|
||||
DBConnection/proc/ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
DBConnection/proc/SelectDB(database_name,dbi)
|
||||
/DBConnection/proc/ErrorMsg() return _dm_db_error_msg(_db_con)
|
||||
/DBConnection/proc/SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
|
||||
DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
/DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
|
||||
DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
/DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
if(sql_query) src.sql = sql_query
|
||||
if(connection_handler) src.db_connection = connection_handler
|
||||
if(cursor_handler) src.default_cursor = cursor_handler
|
||||
@@ -88,7 +88,7 @@ DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
return ..()
|
||||
|
||||
|
||||
DBQuery
|
||||
/DBQuery
|
||||
var/sql // The sql query being executed.
|
||||
var/default_cursor
|
||||
var/list/columns //list of DB Columns populated by Columns()
|
||||
@@ -98,26 +98,26 @@ DBQuery
|
||||
var/DBConnection/db_connection
|
||||
var/_db_query
|
||||
|
||||
DBQuery/proc/Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
||||
/DBQuery/proc/Connect(DBConnection/connection_handler) src.db_connection = connection_handler
|
||||
|
||||
DBQuery/proc/Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
||||
/DBQuery/proc/Execute(sql_query=src.sql,cursor_handler=default_cursor)
|
||||
Close()
|
||||
return _dm_db_execute(_db_query,sql_query,db_connection._db_con,cursor_handler,null)
|
||||
|
||||
DBQuery/proc/NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||
/DBQuery/proc/NextRow() return _dm_db_next_row(_db_query,item,conversions)
|
||||
|
||||
DBQuery/proc/RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||
/DBQuery/proc/RowsAffected() return _dm_db_rows_affected(_db_query)
|
||||
|
||||
DBQuery/proc/RowCount() return _dm_db_row_count(_db_query)
|
||||
/DBQuery/proc/RowCount() return _dm_db_row_count(_db_query)
|
||||
|
||||
DBQuery/proc/ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||
/DBQuery/proc/ErrorMsg() return _dm_db_error_msg(_db_query)
|
||||
|
||||
DBQuery/proc/Columns()
|
||||
/DBQuery/proc/Columns()
|
||||
if(!columns)
|
||||
columns = _dm_db_columns(_db_query,/DBColumn)
|
||||
return columns
|
||||
|
||||
DBQuery/proc/GetRowData()
|
||||
/DBQuery/proc/GetRowData()
|
||||
var/list/columns = Columns()
|
||||
var/list/results
|
||||
if(columns.len)
|
||||
@@ -128,23 +128,23 @@ DBQuery/proc/GetRowData()
|
||||
results[C] = src.item[(cur_col.position+1)]
|
||||
return results
|
||||
|
||||
DBQuery/proc/Close()
|
||||
/DBQuery/proc/Close()
|
||||
item.len = 0
|
||||
columns = null
|
||||
conversions = null
|
||||
return _dm_db_close(_db_query)
|
||||
|
||||
DBQuery/proc/Quote(str)
|
||||
/DBQuery/proc/Quote(str)
|
||||
return db_connection.Quote(str)
|
||||
|
||||
DBQuery/proc/SetConversion(column,conversion)
|
||||
/DBQuery/proc/SetConversion(column,conversion)
|
||||
if(istext(column)) column = columns.Find(column)
|
||||
if(!conversions) conversions = new/list(column)
|
||||
else if(conversions.len < column) conversions.len = column
|
||||
conversions[column] = conversion
|
||||
|
||||
|
||||
DBColumn
|
||||
/DBColumn
|
||||
var/name
|
||||
var/table
|
||||
var/position //1-based index into item data
|
||||
@@ -153,7 +153,7 @@ DBColumn
|
||||
var/length
|
||||
var/max_length
|
||||
|
||||
DBColumn/New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||
/DBColumn/New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
|
||||
src.name = name_handler
|
||||
src.table = table_handler
|
||||
src.position = position_handler
|
||||
@@ -164,7 +164,7 @@ DBColumn/New(name_handler,table_handler,position_handler,type_handler,flag_handl
|
||||
return ..()
|
||||
|
||||
|
||||
DBColumn/proc/SqlTypeName(type_handler=src.sql_type)
|
||||
/DBColumn/proc/SqlTypeName(type_handler=src.sql_type)
|
||||
switch(type_handler)
|
||||
if(TINYINT) return "TINYINT"
|
||||
if(SMALLINT) return "SMALLINT"
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
/* sd_Alert library
|
||||
by Shadowdarke (shadowdarke@byond.com)
|
||||
|
||||
sd_Alert() is a powerful and flexible alternative to the built in BYOND
|
||||
alert() proc. sd_Alert offers timed popups, unlimited buttons, custom
|
||||
appearance, and even the option to popup without stealing keyboard focus
|
||||
from the map or command line.
|
||||
|
||||
Please see demo.dm for detailed examples.
|
||||
|
||||
FORMAT
|
||||
sd_Alert(who, message, title, buttons, default, duration, unfocus, \
|
||||
size, table, style, tag, select, flags)
|
||||
|
||||
ARGUMENTS
|
||||
who - the client or mob to display the alert to.
|
||||
message - text message to display
|
||||
title - title of the alert box
|
||||
buttons - list of buttons
|
||||
Default Value: list("Ok")
|
||||
default - default button selestion
|
||||
Default Value: the first button in the list
|
||||
duration - the number of ticks before this alert expires. If not
|
||||
set, the alert lasts until a button is clicked.
|
||||
Default Value: 0 (unlimited)
|
||||
unfocus - if this value is set, the popup will not steal keyboard
|
||||
focus from the map or command line.
|
||||
Default Value: 1 (do not take focus)
|
||||
size - size of the popup window in px
|
||||
Default Value: "300x200"
|
||||
table - optional parameters for the HTML table in the alert
|
||||
Default Value: "width=100% height=100%" (fill the window)
|
||||
style - optional style sheet information
|
||||
tag - lets you specify a certain tag for this sd_Alert so you may manipulate it
|
||||
externally. (i.e. force the alert to close, change options and redisplay,
|
||||
reuse the same window, etc.)
|
||||
select - if set, the buttons will be replaced with a selection box with a number of
|
||||
lines displayed equal to this value.
|
||||
Default value: 0 (use buttons)
|
||||
flags - optional flags effecting the alert display. These flags may be ORed (|)
|
||||
together for multiple effects.
|
||||
SD_ALERT_SCROLL = display a scrollbar
|
||||
SD_ALERT_SELECT_MULTI = forces selection box display (instead of
|
||||
buttons) allows the user to select multiple
|
||||
choices.
|
||||
SD_ALERT_LINKS = display each choice as a plain text link.
|
||||
Any selection box style overrides this flag.
|
||||
SD_ALERT_NOVALIDATE = don't validate responses
|
||||
Default value: SD_ALERT_SCROLL
|
||||
(button display with scroll bar, validate responses)
|
||||
RETURNS
|
||||
The text of the selected button, or null if the alert duration expired
|
||||
without a button click.
|
||||
|
||||
Version 1 changes (from version 0):
|
||||
* Added the tag, select, and flags arguments, thanks to several suggestions from Foomer.
|
||||
* Split the sd_Alert/Alert() proc into New(), Display(), and Response() to allow more
|
||||
customization by developers. Primarily developers would want to use Display() to change
|
||||
the display of active tagged windows
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#define SD_ALERT_SCROLL 1
|
||||
#define SD_ALERT_SELECT_MULTI 2
|
||||
#define SD_ALERT_LINKS 4
|
||||
#define SD_ALERT_NOVALIDATE 8
|
||||
|
||||
proc/sd_Alert(client/who, message, title, buttons = list("Ok"),\
|
||||
default, duration = 0, unfocus = 1, size = "300x200", \
|
||||
table = "width=100% height=100%", style, tag, select, flags = SD_ALERT_SCROLL)
|
||||
|
||||
if(ismob(who))
|
||||
var/mob/M = who
|
||||
who = M.client
|
||||
if(!istype(who)) CRASH("sd_Alert: Invalid target:[who] (\ref[who])")
|
||||
|
||||
var/sd_alert/T = locate(tag)
|
||||
if(T)
|
||||
if(istype(T)) qdel(T)
|
||||
else CRASH("sd_Alert: tag \"[tag]\" is already in use by datum '[T]' (type: [T.type])")
|
||||
T = new(who, tag)
|
||||
if(duration)
|
||||
spawn(duration)
|
||||
if(T) qdel(T)
|
||||
return
|
||||
T.Display(message,title,buttons,default,unfocus,size,table,style,select,flags)
|
||||
. = T.Response()
|
||||
|
||||
sd_alert
|
||||
var
|
||||
client/target
|
||||
response
|
||||
list/validation
|
||||
|
||||
Destroy()
|
||||
target << browse(null,"window=\ref[src]")
|
||||
..()
|
||||
|
||||
New(who, tag)
|
||||
..()
|
||||
target = who
|
||||
src.tag = tag
|
||||
|
||||
Topic(href,params[])
|
||||
if(usr.client != target) return
|
||||
response = params["clk"]
|
||||
|
||||
proc/Display(message,title,list/buttons,default,unfocus,size,table,style,select,flags)
|
||||
if(unfocus) spawn() target << browse(null,null)
|
||||
if(istext(buttons)) buttons = list(buttons)
|
||||
if(!default) default = buttons[1]
|
||||
if(!(flags & SD_ALERT_NOVALIDATE)) validation = buttons.Copy()
|
||||
|
||||
var/html = {"<head><title>[title]</title>[style]<script>\
|
||||
function c(x) {document.location.href='BYOND://?src=\ref[src];'+x;}\
|
||||
</script></head><body onLoad="fcs.focus();"\
|
||||
[(flags&SD_ALERT_SCROLL)?"":" scroll=no"]><table [table]><tr>\
|
||||
<td>[message]</td></tr><tr><th>"}
|
||||
|
||||
if(select || (flags & SD_ALERT_SELECT_MULTI)) // select style choices
|
||||
html += {"<FORM ID=fcs ACTION='BYOND://?' METHOD=GET>\
|
||||
<INPUT TYPE=HIDDEN NAME=src VALUE='\ref[src]'>
|
||||
<SELECT NAME=clk SIZE=[select]\
|
||||
[(flags & SD_ALERT_SELECT_MULTI)?" MULTIPLE":""]>"}
|
||||
for(var/b in buttons)
|
||||
html += "<OPTION[(b == default)?" SELECTED":""]>\
|
||||
[html_encode(b)]</OPTION>"
|
||||
html += "</SELECT><BR><INPUT TYPE=SUBMIT VALUE=Submit></FORM>"
|
||||
else if(flags & SD_ALERT_LINKS) // text link style
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<A[focus] href=# onClick=\"c('[html_string]')\">[html_encode(b)]</A>\
|
||||
<BR>"
|
||||
else // button style choices
|
||||
for(var/b in buttons)
|
||||
var/list/L = list()
|
||||
L["clk"] = b
|
||||
var/html_string=list2params(L)
|
||||
var/focus
|
||||
if(b == default) focus = " ID=fcs"
|
||||
html += "<INPUT[focus] TYPE=button VALUE='[html_encode(b)]' \
|
||||
onClick=\"c('[html_string]')\"> "
|
||||
|
||||
html += "</th></tr></table></body>"
|
||||
|
||||
target << browse(html,"window=\ref[src];size=[size];can_close=0")
|
||||
|
||||
proc/Response()
|
||||
var/validated
|
||||
while(!validated)
|
||||
while(target && !response) // wait for a response
|
||||
sleep(2)
|
||||
|
||||
if(response && validation)
|
||||
if(istype(response, /list))
|
||||
var/list/L = response - validation
|
||||
if(L.len) response = null
|
||||
else validated = 1
|
||||
else if(response in validation) validated = 1
|
||||
else response=null
|
||||
else validated = 1
|
||||
spawn(2) qdel(src)
|
||||
return response
|
||||
@@ -1,4 +1,4 @@
|
||||
proc/sql_poll_population()
|
||||
/proc/sql_poll_population()
|
||||
if(!sqllogging)
|
||||
return
|
||||
var/admincount = GLOB.admins.len
|
||||
@@ -17,16 +17,16 @@ proc/sql_poll_population()
|
||||
log_game("SQL ERROR during population polling. Error : \[[err]\]\n")
|
||||
qdel(query) //CHOMPEdit TGSQL
|
||||
|
||||
proc/sql_report_round_start()
|
||||
/proc/sql_report_round_start()
|
||||
// TODO
|
||||
if(!sqllogging)
|
||||
return
|
||||
proc/sql_report_round_end()
|
||||
/proc/sql_report_round_end()
|
||||
// TODO
|
||||
if(!sqllogging)
|
||||
return
|
||||
|
||||
proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
/proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
if(!sqllogging)
|
||||
return
|
||||
if(!H)
|
||||
@@ -61,7 +61,7 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
|
||||
qdel(query) //CHOMPEdit TGSQL
|
||||
|
||||
|
||||
proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
/proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
if(!sqllogging)
|
||||
return
|
||||
if(!H)
|
||||
@@ -96,7 +96,7 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
||||
qdel(query) //CHOMPEdit TGSQL
|
||||
|
||||
|
||||
proc/statistic_cycle()
|
||||
/proc/statistic_cycle()
|
||||
set waitfor = 0
|
||||
if(!sqllogging)
|
||||
return
|
||||
@@ -105,7 +105,7 @@ proc/statistic_cycle()
|
||||
sleep(6000)
|
||||
|
||||
//This proc is used for feedback. It is executed at round end.
|
||||
proc/sql_commit_feedback()
|
||||
/proc/sql_commit_feedback()
|
||||
if(!blackbox)
|
||||
log_game("Round ended without a blackbox recorder. No feedback was sent to the database.")
|
||||
return
|
||||
|
||||
@@ -14,19 +14,6 @@
|
||||
- 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()
|
||||
|
||||
@@ -105,7 +105,7 @@ var/datum/antagonist/wizard/wizards
|
||||
for(var/spell/spell_to_remove in src.spell_list)
|
||||
remove_spell(spell_to_remove)
|
||||
|
||||
obj/item/clothing
|
||||
/obj/item/clothing
|
||||
var/wizard_garb = 0
|
||||
|
||||
// Does this clothing slot count as wizard garb? (Combines a few checks)
|
||||
|
||||
@@ -1440,27 +1440,27 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
dynamic_lighting = 0
|
||||
ambience = AMBIENCE_SPACE
|
||||
|
||||
auxport
|
||||
/area/solar/auxport
|
||||
name = "\improper Fore Port Solar Array"
|
||||
icon_state = "panelsA"
|
||||
|
||||
auxstarboard
|
||||
/area/solar/auxstarboard
|
||||
name = "\improper Fore Starboard Solar Array"
|
||||
icon_state = "panelsA"
|
||||
|
||||
fore
|
||||
/area/solar/fore
|
||||
name = "\improper Fore Solar Array"
|
||||
icon_state = "yellow"
|
||||
|
||||
aft
|
||||
/area/solar/aft
|
||||
name = "\improper Aft Solar Array"
|
||||
icon_state = "aft"
|
||||
|
||||
starboard
|
||||
/area/solar/starboard
|
||||
name = "\improper Aft Starboard Solar Array"
|
||||
icon_state = "panelsS"
|
||||
|
||||
port
|
||||
/area/solar/port
|
||||
name = "\improper Aft Port Solar Array"
|
||||
icon_state = "panelsP"
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
always_unpowered = 1
|
||||
dynamic_lighting = 0
|
||||
|
||||
aft
|
||||
/area/outpost/engineering/solarsoutside/aft
|
||||
name = "\improper Engineering Outpost Solar Array"
|
||||
icon_state = "yellow"
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Returns the lowest turf available on a given Z-level, defaults to asteroid for Polaris.
|
||||
|
||||
proc/get_base_turf(var/z)
|
||||
/proc/get_base_turf(var/z)
|
||||
if(!using_map.base_turf_by_z["[z]"])
|
||||
using_map.base_turf_by_z["[z]"] = /turf/space
|
||||
return using_map.base_turf_by_z["[z]"]
|
||||
|
||||
//An area can override the z-level base turf, so our solar array areas etc. can be space-based.
|
||||
proc/get_base_turf_by_area(var/turf/T)
|
||||
/proc/get_base_turf_by_area(var/turf/T)
|
||||
var/area/A = T.loc
|
||||
if(A.base_turf)
|
||||
return A.base_turf
|
||||
|
||||
@@ -89,10 +89,6 @@ var/global/list/datum/dna/gene/dna_genes[0]
|
||||
// Used for genes that check for value rather than a binary on/off.
|
||||
#define GENE_ALWAYS_ACTIVATE 1
|
||||
|
||||
// Skip checking if it's already active.
|
||||
// Used for genes that check for value rather than a binary on/off.
|
||||
#define GENE_ALWAYS_ACTIVATE 1
|
||||
|
||||
/datum/dna
|
||||
// READ-ONLY, GETS OVERWRITTEN
|
||||
// DO NOT FUCK WITH THESE OR BYOND WILL EAT YOUR FACE
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
activation_message="Your mind says 'Hello'."
|
||||
mutation=mHallucination
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/hallucinate/New()
|
||||
block=HALLUCINATIONBLOCK
|
||||
|
||||
/datum/dna/gene/disability/epilepsy
|
||||
@@ -65,7 +65,7 @@
|
||||
activation_message="You get a headache."
|
||||
disability=EPILEPSY
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/epilepsy/New()
|
||||
block=HEADACHEBLOCK
|
||||
|
||||
/datum/dna/gene/disability/cough
|
||||
@@ -73,7 +73,7 @@
|
||||
activation_message="You start coughing."
|
||||
disability=COUGHING
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/cough/New()
|
||||
block=COUGHBLOCK
|
||||
|
||||
/datum/dna/gene/disability/clumsy
|
||||
@@ -81,7 +81,7 @@
|
||||
activation_message="You feel lightheaded."
|
||||
mutation=CLUMSY
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/clumsy/New()
|
||||
block=CLUMSYBLOCK
|
||||
|
||||
/datum/dna/gene/disability/tourettes
|
||||
@@ -89,7 +89,7 @@
|
||||
activation_message="You twitch."
|
||||
disability=TOURETTES
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/tourettes/New()
|
||||
block=TWITCHBLOCK
|
||||
|
||||
/datum/dna/gene/disability/nervousness
|
||||
@@ -97,7 +97,7 @@
|
||||
activation_message="You feel nervous."
|
||||
disability=NERVOUS
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/nervousness/New()
|
||||
block=NERVOUSBLOCK
|
||||
|
||||
/datum/dna/gene/disability/blindness
|
||||
@@ -105,7 +105,7 @@
|
||||
activation_message="You can't seem to see anything."
|
||||
sdisability=BLIND
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/blindness/New()
|
||||
block=BLINDBLOCK
|
||||
|
||||
/datum/dna/gene/disability/deaf
|
||||
@@ -113,10 +113,10 @@
|
||||
activation_message="It's kinda quiet."
|
||||
sdisability=DEAF
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/deaf/New()
|
||||
block=DEAFBLOCK
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
/datum/dna/gene/disability/deaf/activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.ear_deaf = 1
|
||||
|
||||
@@ -125,5 +125,5 @@
|
||||
activation_message="Your eyes feel weird..."
|
||||
disability=NEARSIGHTED
|
||||
|
||||
New()
|
||||
/datum/dna/gene/disability/nearsighted/New()
|
||||
block=GLASSESBLOCK
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
activation_messages=list("You feel no need to breathe.")
|
||||
mutation=mNobreath
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/nobreath/New()
|
||||
block=NOBREATHBLOCK
|
||||
|
||||
/datum/dna/gene/basic/remoteview
|
||||
@@ -15,10 +15,10 @@
|
||||
activation_messages=list("Your mind expands.")
|
||||
mutation=mRemote
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/remoteview/New()
|
||||
block=REMOTEVIEWBLOCK
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
/datum/dna/gene/basic/remoteview/activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
activation_messages=list("You feel better.")
|
||||
mutation=mRegen
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/regenerate/New()
|
||||
block=REGENERATEBLOCK
|
||||
|
||||
/datum/dna/gene/basic/increaserun
|
||||
@@ -35,7 +35,7 @@
|
||||
activation_messages=list("Your leg muscles pulsate.")
|
||||
mutation=mRun
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/increaserun/New()
|
||||
block=INCREASERUNBLOCK
|
||||
|
||||
/datum/dna/gene/basic/remotetalk
|
||||
@@ -43,10 +43,10 @@
|
||||
activation_messages=list("You expand your mind outwards.")
|
||||
mutation=mRemotetalk
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/remotetalk/New()
|
||||
block=REMOTETALKBLOCK
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
/datum/dna/gene/basic/remotetalk/activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.verbs += /mob/living/carbon/human/proc/remotesay
|
||||
|
||||
@@ -55,56 +55,29 @@
|
||||
activation_messages=list("Your skin feels strange.")
|
||||
mutation=mMorph
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/morph/New()
|
||||
block=MORPHBLOCK
|
||||
|
||||
activate(var/mob/M)
|
||||
/datum/dna/gene/basic/morph/activate(var/mob/M)
|
||||
..(M)
|
||||
M.verbs += /mob/living/carbon/human/proc/morph
|
||||
|
||||
/* Not used on bay
|
||||
/datum/dna/gene/basic/heat_resist
|
||||
name="Heat Resistance"
|
||||
activation_messages=list("Your skin is icy to the touch.")
|
||||
mutation=mHeatres
|
||||
|
||||
New()
|
||||
block=COLDBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return !(/datum/dna/gene/basic/cold_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob = 15
|
||||
if(COLD_RESISTANCE in M.mutations)
|
||||
_prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "cold[fat]_s"
|
||||
*/
|
||||
|
||||
/datum/dna/gene/basic/cold_resist
|
||||
name="Cold Resistance"
|
||||
activation_messages=list("Your body is filled with warmth.")
|
||||
mutation=COLD_RESISTANCE
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/cold_resist/New()
|
||||
block=FIREBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
/datum/dna/gene/basic/cold_resist/can_activate(var/mob/M,var/flags)
|
||||
if(flags & MUTCHK_FORCED)
|
||||
return 1
|
||||
// return !(/datum/dna/gene/basic/heat_resist in M.active_genes)
|
||||
// Probability check
|
||||
var/_prob=30
|
||||
//if(mHeatres in M.mutations)
|
||||
// _prob=5
|
||||
if(probinj(_prob,(flags&MUTCHK_FORCED)))
|
||||
return 1
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
/datum/dna/gene/basic/cold_resist/OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "fire[fat]_s"
|
||||
|
||||
/datum/dna/gene/basic/noprints
|
||||
@@ -112,7 +85,7 @@
|
||||
activation_messages=list("Your fingers feel numb.")
|
||||
mutation=mFingerprints
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/noprints/New()
|
||||
block=NOPRINTSBLOCK
|
||||
|
||||
/datum/dna/gene/basic/noshock
|
||||
@@ -120,7 +93,7 @@
|
||||
activation_messages=list("Your skin feels strange.")
|
||||
mutation=mShock
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/noshock/New()
|
||||
block=SHOCKIMMUNITYBLOCK
|
||||
|
||||
/datum/dna/gene/basic/midget
|
||||
@@ -128,20 +101,20 @@
|
||||
activation_messages=list("Your skin feels rubbery.")
|
||||
mutation=mSmallsize
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/midget/New()
|
||||
block=SMALLSIZEBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
/datum/dna/gene/basic/midget/can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
if(HULK in M.mutations)
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
|
||||
activate(var/mob/M, var/connected, var/flags)
|
||||
/datum/dna/gene/basic/midget/activate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags |= 1
|
||||
|
||||
deactivate(var/mob/M, var/connected, var/flags)
|
||||
/datum/dna/gene/basic/midget/deactivate(var/mob/M, var/connected, var/flags)
|
||||
..(M,connected,flags)
|
||||
M.pass_flags &= ~1 //This may cause issues down the track, but offhand I can't think of any other way for humans to get passtable short of varediting so it should be fine. ~Z
|
||||
|
||||
@@ -150,22 +123,22 @@
|
||||
activation_messages=list("Your muscles hurt.")
|
||||
mutation=HULK
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/hulk/New()
|
||||
block=HULKBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
/datum/dna/gene/basic/hulk/can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
if(mSmallsize in M.mutations)
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
/datum/dna/gene/basic/hulk/OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
if(fat)
|
||||
return "hulk_[fat]_s"
|
||||
else
|
||||
return "hulk_[g]_s"
|
||||
|
||||
OnMobLife(var/mob/living/carbon/human/M)
|
||||
/datum/dna/gene/basic/hulk/OnMobLife(var/mob/living/carbon/human/M)
|
||||
if(!istype(M)) return
|
||||
if(M.health <= 25)
|
||||
M.mutations.Remove(HULK)
|
||||
@@ -179,7 +152,7 @@
|
||||
activation_messages=list("The walls suddenly disappear.")
|
||||
mutation=XRAY
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/xray/New()
|
||||
block=XRAYBLOCK
|
||||
|
||||
/datum/dna/gene/basic/tk
|
||||
@@ -188,7 +161,7 @@
|
||||
mutation=TK
|
||||
activation_prob=15
|
||||
|
||||
New()
|
||||
/datum/dna/gene/basic/tk/New()
|
||||
block=TELEBLOCK
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
/datum/dna/gene/basic/tk/OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
return "telekinesishead[fat]_s"
|
||||
|
||||
@@ -160,7 +160,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
//STINGS// //They get a pretty header because there's just so fucking many of them ;_;
|
||||
//////////
|
||||
|
||||
turf/proc/AdjacentTurfsRangedSting()
|
||||
/turf/proc/AdjacentTurfsRangedSting()
|
||||
//Yes this is snowflakey, but I couldn't get it to work any other way.. -Luke
|
||||
var/list/allowed = list(
|
||||
/obj/structure/table,
|
||||
|
||||
@@ -1,29 +1,6 @@
|
||||
//cast_method flags, needs to be up to date with Technomancer's. They were, for some reason, not working outside it.
|
||||
#define CAST_USE 1 // Clicking the spell in your hand.
|
||||
#define CAST_MELEE 2 // Clicking an atom in melee range.
|
||||
#define CAST_RANGED 4 // Clicking an atom beyond melee range.
|
||||
#define CAST_THROW 8 // Throwing the spell and hitting an atom.
|
||||
#define CAST_COMBINE 16 // Clicking another spell with this spell.
|
||||
#define CAST_INNATE 32 // Activates upon verb usage, used for mobs without hands.
|
||||
|
||||
//Aspects
|
||||
#define ASPECT_FIRE "fire" //Damage over time and raising body-temp. Firesuits protect from this.
|
||||
#define ASPECT_FROST "frost" //Slows down the affected, also involves imbedding with icicles. Winter coats protect from this.
|
||||
#define ASPECT_SHOCK "shock" //Energy-expensive, usually stuns. Insulated armor protects from this.
|
||||
#define ASPECT_AIR "air" //Mostly involves manipulation of atmos, useless in a vacuum. Magboots protect from this.
|
||||
#define ASPECT_FORCE "force" //Manipulates gravity to push things away or towards a location.
|
||||
#define ASPECT_TELE "tele" //Teleportation of self, other objects, or other people.
|
||||
#define ASPECT_DARK "dark" //Makes all those photons vanish using magic-- WITH SCIENCE. Used for sneaky stuff.
|
||||
#define ASPECT_LIGHT "light" //The opposite of dark, usually blinds, makes holo-illusions, or makes laser lightshows.
|
||||
#define ASPECT_BIOMED "biomed" //Mainly concerned with healing and restoration.
|
||||
#define ASPECT_EMP "emp" //Unused now.
|
||||
#define ASPECT_UNSTABLE "unstable" //Heavily RNG-based, causes instability to the victim.
|
||||
#define ASPECT_CHROMATIC "chromatic" //Used to combine with other spells.
|
||||
#define ASPECT_UNHOLY "unholy" //Involves the dead, blood, and most things against divine beings.
|
||||
|
||||
//////////////////////////////Construct Spells/////////////////////////
|
||||
|
||||
proc/findNullRod(var/atom/target)
|
||||
/proc/findNullRod(var/atom/target)
|
||||
if(istype(target,/obj/item/weapon/nullrod))
|
||||
return 1
|
||||
else if(target.contents)
|
||||
|
||||
@@ -65,8 +65,8 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
|
||||
// self other technology - Communication rune //was other hear blood
|
||||
// join hide technology - stun rune. Rune color: bright pink.
|
||||
New()
|
||||
..()
|
||||
/obj/effect/rune/Initialize()
|
||||
. = ..()
|
||||
blood_image = image(loc = src)
|
||||
blood_image.override = 1
|
||||
for(var/mob/living/silicon/ai/AI in player_list)
|
||||
@@ -74,7 +74,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
AI.client.images += blood_image
|
||||
rune_list.Add(src)
|
||||
|
||||
Destroy()
|
||||
/obj/effect/rune/Destroy()
|
||||
for(var/mob/living/silicon/ai/AI in player_list)
|
||||
if(AI.client)
|
||||
AI.client.images -= blood_image
|
||||
@@ -83,13 +83,13 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
rune_list.Remove(src)
|
||||
..()
|
||||
|
||||
examine(mob/user)
|
||||
/obj/effect/rune/examine(mob/user)
|
||||
. = ..()
|
||||
if(iscultist(user))
|
||||
. += "This spell circle reads: <i>[word1] [word2] [word3]</i>."
|
||||
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
/obj/effect/rune/attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/book/tome) && iscultist(user))
|
||||
to_chat(user, "You retrace your steps, carefully undoing the lines of the rune.")
|
||||
qdel(src)
|
||||
@@ -101,7 +101,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
return
|
||||
|
||||
|
||||
attack_hand(mob/living/user as mob)
|
||||
/obj/effect/rune/attack_hand(mob/living/user as mob)
|
||||
if(!iscultist(user))
|
||||
to_chat(user, "You can't mouth the arcane scratchings without fumbling over them.")
|
||||
return
|
||||
@@ -164,8 +164,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
return fizzle()
|
||||
|
||||
|
||||
proc
|
||||
fizzle()
|
||||
/obj/effect/rune/proc/fizzle()
|
||||
if(istype(src,/obj/effect/rune))
|
||||
usr.say(pick("Hakkrutju gopoenjim.", "Nherasai pivroiashan.", "Firjji prhiv mazenhor.", "Tanah eh wakantahe.", "Obliyae na oraie.", "Miyf hon vnor'c.", "Wakabai hij fen juswix."))
|
||||
else
|
||||
@@ -174,7 +173,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
V.show_message("<span class='warning'>The markings pulse with a small burst of light, then fall dark.</span>", 3, "<span class='warning'>You hear a faint fizzle.</span>", 2)
|
||||
return
|
||||
|
||||
check_icon()
|
||||
/obj/effect/rune/proc/check_icon()
|
||||
icon = get_uristrune_cult(word1, word2, word3)
|
||||
|
||||
/obj/item/weapon/book/tome
|
||||
@@ -289,14 +288,14 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
</html>
|
||||
"}
|
||||
|
||||
New()
|
||||
..()
|
||||
/obj/item/weapon/book/tome/Initialize()
|
||||
. = ..()
|
||||
if(!cultwords["travel"])
|
||||
runerandom()
|
||||
for(var/V in cultwords)
|
||||
words[cultwords[V]] = V
|
||||
|
||||
attack(mob/living/M as mob, mob/living/user as mob)
|
||||
/obj/item/weapon/book/tome/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
add_attack_logs(user,M,"Hit with [name]")
|
||||
|
||||
if(istype(M,/mob/observer/dead))
|
||||
@@ -315,7 +314,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
to_chat(M, "<span class='danger'>You feel searing heat inside!</span>")
|
||||
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
/obj/item/weapon/book/tome/attack_self(mob/living/user as mob)
|
||||
usr = user
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return
|
||||
@@ -426,7 +425,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
to_chat(user, "The book seems full of illegible scribbles. Is this a joke?")
|
||||
return
|
||||
|
||||
examine(mob/user)
|
||||
/obj/item/weapon/book/tome/examine(mob/user)
|
||||
. = ..()
|
||||
if(!iscultist(user))
|
||||
. += "An old, dusty tome with frayed edges and a sinister looking cover."
|
||||
@@ -439,7 +438,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
|
||||
/obj/item/weapon/book/tome/imbued //admin tome, spawns working runes without waiting
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/cultistsonly = 1
|
||||
attack_self(mob/user as mob)
|
||||
/obj/item/weapon/book/tome/imbued/attack_self(mob/user as mob)
|
||||
if(src.cultistsonly && !iscultist(usr))
|
||||
return
|
||||
if(!cultwords["travel"])
|
||||
|
||||
@@ -3,8 +3,6 @@ var/list/sacrificed = list()
|
||||
/obj/effect/rune/cultify()
|
||||
return
|
||||
|
||||
/obj/effect/rune
|
||||
|
||||
/*
|
||||
* Use as a general guideline for this and related files:
|
||||
* * <span class='warning'>...</span> - when something non-trivial or an error happens, so something similar to "Sparks come out of the machine!"
|
||||
@@ -14,13 +12,11 @@ var/list/sacrificed = list()
|
||||
|
||||
|
||||
/////////////////////////////////////////FIRST RUNE
|
||||
proc
|
||||
teleport(var/key)
|
||||
/obj/effect/rune/proc/teleport(var/key)
|
||||
var/mob/living/user = usr
|
||||
var/allrunesloc[]
|
||||
allrunesloc = new/list()
|
||||
var/index = 0
|
||||
// var/tempnum = 0
|
||||
for(var/obj/effect/rune/R in rune_list)
|
||||
if(R == src)
|
||||
continue
|
||||
@@ -50,11 +46,7 @@ var/list/sacrificed = list()
|
||||
return
|
||||
|
||||
|
||||
itemport(var/key)
|
||||
// var/allrunesloc[]
|
||||
// allrunesloc = new/list()
|
||||
// var/index = 0
|
||||
// var/tempnum = 0
|
||||
/obj/effect/rune/proc/itemport(var/key)
|
||||
var/culcount = 0
|
||||
var/runecount = 0
|
||||
var/obj/effect/rune/IP = null
|
||||
@@ -90,7 +82,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////SECOND RUNE
|
||||
|
||||
tomesummon()
|
||||
/obj/effect/rune/proc/tomesummon()
|
||||
if(istype(src,/obj/effect/rune))
|
||||
usr.say("N[pick("'","`")]ath reth sh'yro eth d'raggathnor!")
|
||||
else
|
||||
@@ -109,7 +101,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////THIRD RUNE
|
||||
|
||||
convert()
|
||||
/obj/effect/rune/proc/convert()
|
||||
var/mob/attacker = usr
|
||||
var/mob/living/carbon/target = null
|
||||
for(var/mob/living/carbon/M in src.loc)
|
||||
@@ -192,7 +184,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////FOURTH RUNE
|
||||
|
||||
tearreality()
|
||||
/obj/effect/rune/proc/tearreality()
|
||||
if(!cult.allow_narsie)
|
||||
return fizzle()
|
||||
|
||||
@@ -217,14 +209,13 @@ var/list/sacrificed = list()
|
||||
emergency_shuttle.launch_time = 0 // Cannot recall
|
||||
|
||||
log_and_message_admins_many(cultists, "summoned the end of days.")
|
||||
// new /obj/singularity/narsie/large(src.loc)
|
||||
return
|
||||
else
|
||||
return fizzle()
|
||||
|
||||
/////////////////////////////////////////FIFTH RUNE
|
||||
|
||||
emp(var/U,var/range_red) //range_red - var which determines by which number to reduce the default emp range, U is the source loc, needed because of talisman emps which are held in hand at the moment of using and that apparently messes things up -- Urist
|
||||
/obj/effect/rune/proc/emp(var/U,var/range_red) //range_red - var which determines by which number to reduce the default emp range, U is the source loc, needed because of talisman emps which are held in hand at the moment of using and that apparently messes things up -- Urist
|
||||
log_and_message_admins("activated an EMP rune.")
|
||||
if(istype(src,/obj/effect/rune))
|
||||
usr.say("Ta'gh fara[pick("'","`")]qha fel d'amar det!")
|
||||
@@ -241,7 +232,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////SIXTH RUNE
|
||||
|
||||
drain()
|
||||
/obj/effect/rune/proc/drain()
|
||||
var/drain = 0
|
||||
for(var/obj/effect/rune/R in rune_list)
|
||||
if(R.word1==cultwords["travel"] && R.word2==cultwords["blood"] && R.word3==cultwords["self"])
|
||||
@@ -301,7 +292,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////SEVENTH RUNE
|
||||
|
||||
seer()
|
||||
/obj/effect/rune/proc/seer()
|
||||
if(usr.loc==src.loc)
|
||||
if(usr.seer==1)
|
||||
usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium viortia.")
|
||||
@@ -322,7 +313,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////EIGHTH RUNE
|
||||
|
||||
raise()
|
||||
/obj/effect/rune/proc/raise()
|
||||
var/mob/living/carbon/human/corpse_to_raise
|
||||
var/mob/living/carbon/human/body_to_sacrifice
|
||||
|
||||
@@ -390,11 +381,6 @@ var/list/sacrificed = list()
|
||||
"<span class='danger'>You hear a thousand voices, all crying in pain.</span>")
|
||||
body_to_sacrifice.gib()
|
||||
|
||||
// if(ticker.mode.name == "cult")
|
||||
// ticker.mode:add_cultist(corpse_to_raise.mind)
|
||||
// else
|
||||
// ticker.mode.cult |= corpse_to_raise.mind
|
||||
|
||||
to_chat(corpse_to_raise, "<span class='cult'>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.</span>")
|
||||
to_chat(corpse_to_raise, "<span class='cult'>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</span>")
|
||||
|
||||
@@ -406,7 +392,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////NINETH RUNE
|
||||
|
||||
obscure(var/rad)
|
||||
/obj/effect/rune/proc/obscure(var/rad)
|
||||
var/S=0
|
||||
for(var/obj/effect/rune/R in orange(rad,src))
|
||||
if(R!=src)
|
||||
@@ -434,7 +420,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////TENTH RUNE
|
||||
|
||||
ajourney() //some bits copypastaed from admin tools - Urist
|
||||
/obj/effect/rune/proc/ajourney() //some bits copypastaed from admin tools - Urist
|
||||
if(usr.loc==src.loc)
|
||||
var/mob/living/carbon/human/L = usr
|
||||
var/datum/gender/TU = gender_datums[L.get_visible_gender()]
|
||||
@@ -458,7 +444,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////ELEVENTH RUNE
|
||||
|
||||
manifest()
|
||||
/obj/effect/rune/proc/manifest()
|
||||
var/obj/effect/rune/this_rune = src
|
||||
src = null
|
||||
if(usr.loc!=this_rune.loc)
|
||||
@@ -521,7 +507,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////TWELFTH RUNE
|
||||
|
||||
talisman()//only hide, emp, teleport, deafen, blind and tome runes can be imbued atm
|
||||
/obj/effect/rune/proc/talisman()//only hide, emp, teleport, deafen, blind and tome runes can be imbued atm
|
||||
var/obj/item/weapon/paper/newtalisman
|
||||
var/unsuitable_newtalisman = 0
|
||||
for(var/obj/item/weapon/paper/P in src.loc)
|
||||
@@ -602,7 +588,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////THIRTEENTH RUNE
|
||||
|
||||
mend()
|
||||
/obj/effect/rune/proc/mend()
|
||||
var/mob/living/user = usr
|
||||
var/datum/gender/TU = gender_datums[usr.get_visible_gender()]
|
||||
src = null
|
||||
@@ -622,8 +608,8 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////FOURTEETH RUNE
|
||||
|
||||
// returns 0 if the rune is not used. returns 1 if the rune is used.
|
||||
communicate()
|
||||
// returns 0 if the rune is not used. returns 1 if the rune is used.
|
||||
/obj/effect/rune/proc/communicate()
|
||||
. = 1 // Default output is 1. If the rune is deleted it will return 1
|
||||
var/input = input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")//sanitize() below, say() and whisper() have their own
|
||||
if(!input)
|
||||
@@ -650,7 +636,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////FIFTEENTH RUNE
|
||||
|
||||
sacrifice()
|
||||
/obj/effect/rune/proc/sacrifice()
|
||||
var/list/mob/living/carbon/human/cultsinrange = list()
|
||||
var/list/mob/living/carbon/human/victims = list()
|
||||
for(var/mob/living/carbon/human/V in src.loc)//Checks for non-cultist humans to sacrifice
|
||||
@@ -771,7 +757,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////SIXTEENTH RUNE
|
||||
|
||||
revealrunes(var/obj/W as obj)
|
||||
/obj/effect/rune/proc/revealrunes(var/obj/W as obj)
|
||||
var/go=0
|
||||
var/rad
|
||||
var/S=0
|
||||
@@ -815,7 +801,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////SEVENTEENTH RUNE
|
||||
|
||||
wall()
|
||||
/obj/effect/rune/proc/wall()
|
||||
usr.say("Khari[pick("'","`")]d! Eske'te tannin!")
|
||||
src.density = !src.density
|
||||
var/mob/living/user = usr
|
||||
@@ -828,7 +814,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////EIGHTTEENTH RUNE
|
||||
|
||||
freedom()
|
||||
/obj/effect/rune/proc/freedom()
|
||||
var/mob/living/user = usr
|
||||
var/list/mob/living/carbon/cultists = new
|
||||
for(var/datum/mind/H in cult.current_antagonists)
|
||||
@@ -875,7 +861,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////NINETEENTH RUNE
|
||||
|
||||
cultsummon()
|
||||
/obj/effect/rune/proc/cultsummon()
|
||||
var/mob/living/user = usr
|
||||
var/list/mob/living/carbon/cultists = new
|
||||
for(var/datum/mind/H in cult.current_antagonists)
|
||||
@@ -916,7 +902,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////TWENTIETH RUNES
|
||||
|
||||
deafen()
|
||||
/obj/effect/rune/proc/deafen()
|
||||
if(istype(src,/obj/effect/rune))
|
||||
var/list/affected = new()
|
||||
for(var/mob/living/carbon/C in range(7,src))
|
||||
@@ -958,7 +944,7 @@ var/list/sacrificed = list()
|
||||
V.show_message("<span class='warning'>Dust flows from [usr]'s hands for a moment, and the world suddenly becomes quiet..</span>", 3)
|
||||
return
|
||||
|
||||
blind()
|
||||
/obj/effect/rune/proc/blind()
|
||||
if(istype(src,/obj/effect/rune))
|
||||
var/list/affected = new()
|
||||
for(var/mob/living/carbon/C in viewers(src))
|
||||
@@ -1002,7 +988,7 @@ var/list/sacrificed = list()
|
||||
return
|
||||
|
||||
|
||||
bloodboil() //cultists need at least one DANGEROUS rune. Even if they're all stealthy.
|
||||
/obj/effect/rune/proc/bloodboil() //cultists need at least one DANGEROUS rune. Even if they're all stealthy.
|
||||
/*
|
||||
var/list/mob/living/carbon/cultists = new
|
||||
for(var/datum/mind/H in ticker.mode.cult)
|
||||
@@ -1043,7 +1029,7 @@ var/list/sacrificed = list()
|
||||
|
||||
// WIP rune, I'll wait for Rastaf0 to add limited blood.
|
||||
|
||||
burningblood()
|
||||
/obj/effect/rune/proc/burningblood()
|
||||
var/culcount = 0
|
||||
for(var/mob/living/carbon/C in orange(1,src))
|
||||
if(iscultist(C) && !C.stat)
|
||||
@@ -1071,7 +1057,7 @@ var/list/sacrificed = list()
|
||||
|
||||
////////// Rune 24 (counting burningblood, which kinda doesnt work yet.)
|
||||
|
||||
runestun(var/mob/living/T as mob)
|
||||
/obj/effect/rune/proc/runestun(var/mob/living/T as mob)
|
||||
if(istype(src,/obj/effect/rune)) ///When invoked as rune, flash and stun everyone around.
|
||||
usr.say("Fuu ma[pick("'","`")]jin!")
|
||||
for(var/mob/living/L in viewers(src))
|
||||
@@ -1116,7 +1102,7 @@ var/list/sacrificed = list()
|
||||
|
||||
/////////////////////////////////////////TWENTY-FIFTH RUNE
|
||||
|
||||
armor()
|
||||
/obj/effect/rune/proc/armor()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(istype(src,/obj/effect/rune))
|
||||
usr.say("N'ath reth sh'yro eth d[pick("'","`")]raggathnor!")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/uses = 0
|
||||
info = "<center><img src='talisman.png'></center><br/><br/>"
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
/obj/item/weapon/paper/talisman/attack_self(mob/living/user as mob)
|
||||
if(iscultist(user))
|
||||
var/delete = 1
|
||||
// who the hell thought this was a good idea :(
|
||||
@@ -43,7 +43,7 @@
|
||||
return
|
||||
|
||||
|
||||
attack(mob/living/carbon/T as mob, mob/living/user as mob)
|
||||
/obj/item/weapon/paper/talisman/attack(mob/living/carbon/T as mob, mob/living/user as mob)
|
||||
if(iscultist(user))
|
||||
if(imbue == "runestun")
|
||||
user.take_organ_damage(5, 0)
|
||||
@@ -55,7 +55,7 @@
|
||||
..()
|
||||
|
||||
|
||||
proc/supply(var/key)
|
||||
/obj/item/weapon/paper/talisman/proc/supply(var/key)
|
||||
if (!src.uses)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -76,7 +76,7 @@
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
/obj/item/weapon/paper/talisman/Topic(href, href_list)
|
||||
if(!src) return
|
||||
if (usr.stat || usr.restrained() || !in_range(src, usr)) return
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
Bump(atom/clong)
|
||||
/obj/effect/immovablerod/Bump(atom/clong)
|
||||
if(istype(clong, /turf/simulated/shuttle)) //Skip shuttles without actually deleting the rod
|
||||
return
|
||||
|
||||
@@ -41,7 +41,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
if(clong && prob(25))
|
||||
src.loc = clong.loc
|
||||
|
||||
Destroy()
|
||||
/obj/effect/immovablerod/Destroy()
|
||||
walk(src, 0) // Because we might have called walk_towards, we must stop the walk loop or BYOND keeps an internal reference to us forever.
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ var/global/list/additional_antag_types = list()
|
||||
//////////////////////////
|
||||
//Reports player logouts//
|
||||
//////////////////////////
|
||||
proc/display_roundstart_logout_report()
|
||||
/proc/display_roundstart_logout_report()
|
||||
var/msg = "<span class='notice'><b>Roundstart logout report</b>\n\n"
|
||||
for(var/mob/living/L in mob_list)
|
||||
|
||||
@@ -549,7 +549,7 @@ proc/display_roundstart_logout_report()
|
||||
if(M.client && M.client.holder)
|
||||
to_chat(M,msg)
|
||||
|
||||
proc/get_nt_opposed()
|
||||
/proc/get_nt_opposed()
|
||||
var/list/dudes = list()
|
||||
for(var/mob/living/carbon/human/man in player_list)
|
||||
if(man.client)
|
||||
|
||||
@@ -1453,7 +1453,7 @@ datum
|
||||
return 0
|
||||
return 1
|
||||
|
||||
datum/objective/silence
|
||||
/datum/objective/silence
|
||||
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
|
||||
|
||||
check_completion()
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
var/global/list/all_objectives = list()
|
||||
|
||||
datum/objective
|
||||
/datum/objective
|
||||
var/datum/mind/owner = null //Who owns the objective.
|
||||
var/explanation_text = "Nothing" //What that person is supposed to do.
|
||||
var/datum/mind/target = null //If they are focused on a particular person.
|
||||
var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter.
|
||||
var/completed = 0 //currently only used for custom objectives.
|
||||
|
||||
New(var/text)
|
||||
/datum/objective/New(var/text)
|
||||
all_objectives |= src
|
||||
if(text)
|
||||
explanation_text = text
|
||||
..()
|
||||
|
||||
Destroy()
|
||||
/datum/objective/Destroy()
|
||||
all_objectives -= src
|
||||
..()
|
||||
|
||||
proc/check_completion()
|
||||
/datum/objective/proc/check_completion()
|
||||
return completed
|
||||
|
||||
proc/find_target()
|
||||
/datum/objective/proc/find_target()
|
||||
var/list/possible_targets = list()
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2))
|
||||
@@ -30,7 +30,7 @@ datum/objective
|
||||
target = pick(possible_targets)
|
||||
|
||||
|
||||
proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned.
|
||||
/datum/objective/proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned.
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) )
|
||||
target = possible_target
|
||||
@@ -38,8 +38,7 @@ datum/objective
|
||||
|
||||
|
||||
|
||||
datum/objective/assassinate
|
||||
find_target()
|
||||
/datum/objective/assassinate/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role]."
|
||||
@@ -48,7 +47,7 @@ datum/objective/assassinate
|
||||
return target
|
||||
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
/datum/objective/assassinate/find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "Assassinate [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
|
||||
@@ -57,7 +56,7 @@ datum/objective/assassinate
|
||||
return target
|
||||
|
||||
|
||||
check_completion()
|
||||
/datum/objective/assassinate/check_completion()
|
||||
if(target && target.current)
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
return 1
|
||||
@@ -65,8 +64,7 @@ datum/objective/assassinate
|
||||
return 1
|
||||
|
||||
|
||||
datum/objective/anti_revolution/execute
|
||||
find_target()
|
||||
/datum/objective/anti_revolution/execute/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
@@ -76,7 +74,7 @@ datum/objective/anti_revolution/execute
|
||||
return target
|
||||
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
/datum/objective/anti_revolution/execute/find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
@@ -85,17 +83,17 @@ datum/objective/anti_revolution/execute
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
check_completion()
|
||||
/datum/objective/anti_revolution/execute/check_completion()
|
||||
if(target && target.current)
|
||||
if(target.current.stat == DEAD || !ishuman(target.current))
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
|
||||
datum/objective/anti_revolution/brig
|
||||
/datum/objective/anti_revolution/brig
|
||||
var/already_completed = 0
|
||||
|
||||
find_target()
|
||||
/datum/objective/anti_revolution/brig/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Brig [target.current.real_name], the [target.assigned_role] for 20 minutes to set an example."
|
||||
@@ -104,7 +102,7 @@ datum/objective/anti_revolution/brig
|
||||
return target
|
||||
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
/datum/objective/anti_revolution/brig/find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "Brig [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] for 20 minutes to set an example."
|
||||
@@ -112,7 +110,7 @@ datum/objective/anti_revolution/brig
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
check_completion()
|
||||
/datum/objective/anti_revolution/brig/check_completion()
|
||||
if(already_completed)
|
||||
return 1
|
||||
|
||||
@@ -125,8 +123,7 @@ datum/objective/anti_revolution/brig
|
||||
return 0
|
||||
return 0
|
||||
|
||||
datum/objective/anti_revolution/demote
|
||||
find_target()
|
||||
/datum/objective/anti_revolution/demote/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
@@ -135,7 +132,7 @@ datum/objective/anti_revolution/demote
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
/datum/objective/anti_revolution/demote/find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
@@ -144,7 +141,7 @@ datum/objective/anti_revolution/demote
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
check_completion()
|
||||
/datum/objective/anti_revolution/demote/check_completion()
|
||||
if(target && target.current && istype(target,/mob/living/carbon/human))
|
||||
var/obj/item/weapon/card/id/I = target.current:wear_id
|
||||
if(istype(I, /obj/item/device/pda))
|
||||
@@ -159,8 +156,8 @@ datum/objective/anti_revolution/demote
|
||||
return 0
|
||||
return 1
|
||||
|
||||
datum/objective/debrain//I want braaaainssss
|
||||
find_target()
|
||||
//I want braaaainssss
|
||||
/datum/objective/debrain/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Steal the brain of [target.current.real_name]."
|
||||
@@ -169,7 +166,7 @@ datum/objective/debrain//I want braaaainssss
|
||||
return target
|
||||
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
/datum/objective/debrain/find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "Steal the brain of [target.current.real_name] the [!role_type ? target.assigned_role : target.special_role]."
|
||||
@@ -177,7 +174,7 @@ datum/objective/debrain//I want braaaainssss
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
check_completion()
|
||||
/datum/objective/debrain/check_completion()
|
||||
if(!target)//If it's a free objective.
|
||||
return 1
|
||||
if( !owner.current || owner.current.stat==DEAD )//If you're otherwise dead.
|
||||
@@ -192,8 +189,8 @@ datum/objective/debrain//I want braaaainssss
|
||||
return 0
|
||||
|
||||
|
||||
datum/objective/protect//The opposite of killing a dude.
|
||||
find_target()
|
||||
//The opposite of killing a dude.
|
||||
/datum/objective/protect/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Protect [target.current.real_name], the [target.assigned_role]."
|
||||
@@ -202,7 +199,7 @@ datum/objective/protect//The opposite of killing a dude.
|
||||
return target
|
||||
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
/datum/objective/protect/find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
|
||||
@@ -210,7 +207,7 @@ datum/objective/protect//The opposite of killing a dude.
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
check_completion()
|
||||
/datum/objective/protect/check_completion()
|
||||
if(!target) //If it's a free objective.
|
||||
return 1
|
||||
if(target.current)
|
||||
@@ -220,10 +217,10 @@ datum/objective/protect//The opposite of killing a dude.
|
||||
return 0
|
||||
|
||||
|
||||
datum/objective/hijack
|
||||
/datum/objective/hijack
|
||||
explanation_text = "Hijack the emergency shuttle by escaping alone."
|
||||
|
||||
check_completion()
|
||||
/datum/objective/hijack/check_completion()
|
||||
if(!owner.current || owner.current.stat)
|
||||
return 0
|
||||
if(!emergency_shuttle.returned())
|
||||
@@ -241,11 +238,11 @@ datum/objective/hijack
|
||||
return 1
|
||||
|
||||
|
||||
datum/objective/block
|
||||
/datum/objective/block
|
||||
explanation_text = "Do not allow any organic lifeforms to escape on the shuttle alive."
|
||||
|
||||
|
||||
check_completion()
|
||||
/datum/objective/block/check_completion()
|
||||
if(!istype(owner.current, /mob/living/silicon))
|
||||
return 0
|
||||
if(!emergency_shuttle.returned())
|
||||
@@ -262,10 +259,10 @@ datum/objective/block
|
||||
return 0
|
||||
return 1
|
||||
|
||||
datum/objective/silence
|
||||
/datum/objective/silence
|
||||
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
|
||||
|
||||
check_completion()
|
||||
/datum/objective/silence/check_completion()
|
||||
if(!emergency_shuttle.returned())
|
||||
return 0
|
||||
|
||||
@@ -282,11 +279,11 @@ datum/objective/silence
|
||||
return 1
|
||||
|
||||
|
||||
datum/objective/escape
|
||||
/datum/objective/escape
|
||||
explanation_text = "Escape on the shuttle or an escape pod alive and free."
|
||||
|
||||
|
||||
check_completion()
|
||||
/datum/objective/escape/check_completion()
|
||||
if(issilicon(owner.current))
|
||||
return 0
|
||||
if(isbrain(owner.current))
|
||||
@@ -322,10 +319,10 @@ datum/objective/escape
|
||||
|
||||
|
||||
|
||||
datum/objective/survive
|
||||
/datum/objective/survive
|
||||
explanation_text = "Stay alive until the end."
|
||||
|
||||
check_completion()
|
||||
/datum/objective/survive/check_completion()
|
||||
if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current))
|
||||
return 0 //Brains no longer win survive objectives. --NEO
|
||||
if(issilicon(owner.current) && owner.current != owner.original)
|
||||
@@ -333,10 +330,10 @@ datum/objective/survive
|
||||
return 1
|
||||
|
||||
// Similar to the anti-rev objective, but for traitors
|
||||
datum/objective/brig
|
||||
/datum/objective/brig
|
||||
var/already_completed = 0
|
||||
|
||||
find_target()
|
||||
/datum/objective/brig/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Have [target.current.real_name], the [target.assigned_role] brigged for 10 minutes."
|
||||
@@ -345,7 +342,7 @@ datum/objective/brig
|
||||
return target
|
||||
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
/datum/objective/brig/find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "Have [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] brigged for 10 minutes."
|
||||
@@ -353,7 +350,7 @@ datum/objective/brig
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
check_completion()
|
||||
/datum/objective/brig/check_completion()
|
||||
if(already_completed)
|
||||
return 1
|
||||
|
||||
@@ -368,10 +365,10 @@ datum/objective/brig
|
||||
return 0
|
||||
|
||||
// Harm a crew member, making an example of them
|
||||
datum/objective/harm
|
||||
/datum/objective/harm
|
||||
var/already_completed = 0
|
||||
|
||||
find_target()
|
||||
/datum/objective/harm/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Make an example of [target.current.real_name], the [target.assigned_role]. Break one of their bones, detach one of their limbs or disfigure their face. Make sure they're alive when you do it."
|
||||
@@ -380,7 +377,7 @@ datum/objective/harm
|
||||
return target
|
||||
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
/datum/objective/harm/find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "Make an example of [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]. Break one of their bones, detach one of their limbs or disfigure their face. Make sure they're alive when you do it."
|
||||
@@ -388,7 +385,7 @@ datum/objective/harm
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
check_completion()
|
||||
/datum/objective/harm/check_completion()
|
||||
if(already_completed)
|
||||
return 1
|
||||
|
||||
@@ -417,12 +414,12 @@ datum/objective/harm
|
||||
return 0
|
||||
|
||||
|
||||
datum/objective/nuclear
|
||||
/datum/objective/nuclear
|
||||
explanation_text = "Destroy the station with a nuclear device."
|
||||
|
||||
|
||||
|
||||
datum/objective/steal
|
||||
/datum/objective/steal
|
||||
var/obj/item/steal_target
|
||||
var/target_name
|
||||
|
||||
@@ -461,7 +458,7 @@ datum/objective/steal
|
||||
)
|
||||
|
||||
|
||||
proc/set_target(item_name)
|
||||
/datum/objective/steal/proc/set_target(item_name)
|
||||
target_name = item_name
|
||||
steal_target = possible_items[target_name]
|
||||
if (!steal_target )
|
||||
@@ -470,11 +467,11 @@ datum/objective/steal
|
||||
return steal_target
|
||||
|
||||
|
||||
find_target()
|
||||
/datum/objective/steal/find_target()
|
||||
return set_target(pick(possible_items))
|
||||
|
||||
|
||||
proc/select_target()
|
||||
/datum/objective/steal/proc/select_target()
|
||||
var/list/possible_items_all = possible_items+possible_items_special+"custom"
|
||||
var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
|
||||
if (!new_target) return
|
||||
@@ -493,7 +490,7 @@ datum/objective/steal
|
||||
set_target(new_target)
|
||||
return steal_target
|
||||
|
||||
check_completion()
|
||||
/datum/objective/steal/check_completion()
|
||||
if(!steal_target || !owner.current) return 0
|
||||
if(!isliving(owner.current)) return 0
|
||||
var/list/all_items = owner.current.get_contents()
|
||||
@@ -547,14 +544,13 @@ datum/objective/steal
|
||||
|
||||
|
||||
|
||||
datum/objective/download
|
||||
proc/gen_amount_goal()
|
||||
/datum/objective/download/proc/gen_amount_goal()
|
||||
target_amount = rand(10,20)
|
||||
explanation_text = "Download [target_amount] research levels."
|
||||
return target_amount
|
||||
|
||||
|
||||
check_completion()
|
||||
/datum/objective/download/check_completion()
|
||||
if(!ishuman(owner.current))
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == 2)
|
||||
@@ -579,14 +575,13 @@ datum/objective/download
|
||||
|
||||
return (current_amount<target_amount) ? 0 : 1
|
||||
|
||||
datum/objective/capture
|
||||
proc/gen_amount_goal()
|
||||
/datum/objective/capture/proc/gen_amount_goal()
|
||||
target_amount = rand(5,10)
|
||||
explanation_text = "Accumulate [target_amount] capture points."
|
||||
return target_amount
|
||||
|
||||
|
||||
check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
||||
/datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
||||
var/captured_amount = 0
|
||||
var/area/centcom/holding/A = locate()
|
||||
|
||||
@@ -609,8 +604,7 @@ datum/objective/capture
|
||||
return 1
|
||||
|
||||
|
||||
/datum/objective/absorb
|
||||
proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6)
|
||||
/datum/objective/absorb/proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6)
|
||||
target_amount = rand (lowbound,highbound)
|
||||
if (ticker)
|
||||
var/n_p = 1 //autowin
|
||||
@@ -627,13 +621,14 @@ datum/objective/capture
|
||||
explanation_text = "Absorb [target_amount] compatible genomes."
|
||||
return target_amount
|
||||
|
||||
check_completion()
|
||||
/datum/objective/absorb/check_completion()
|
||||
if(owner && owner.changeling && owner.changeling.absorbed_dna && (owner.changeling.absorbedcount >= target_amount))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
// Heist objectives.
|
||||
<<<<<<< HEAD
|
||||
datum/objective/heist
|
||||
proc/choose_target()
|
||||
return
|
||||
@@ -676,7 +671,73 @@ datum/objective/heist/kidnap
|
||||
return 1 //They're restrained on the shuttle. Success.
|
||||
else
|
||||
return 0
|
||||
||||||| parent of 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
datum/objective/heist
|
||||
proc/choose_target()
|
||||
return
|
||||
|
||||
datum/objective/heist/kidnap
|
||||
choose_target()
|
||||
var/list/roles = list("Chief Engineer","Research Director","Roboticist","Chemist","Station Engineer")
|
||||
var/list/possible_targets = list()
|
||||
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.special_role))
|
||||
possible_targets += possible_target
|
||||
for(var/role in roles)
|
||||
if(possible_target.assigned_role == role)
|
||||
priority_targets += possible_target
|
||||
continue
|
||||
|
||||
if(priority_targets.len > 0)
|
||||
target = pick(priority_targets)
|
||||
else if(possible_targets.len > 0)
|
||||
target = pick(possible_targets)
|
||||
|
||||
if(target && target.current)
|
||||
explanation_text = "We can get a good price for [target.current.real_name], the [target.assigned_role]. Take them alive."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
check_completion()
|
||||
if(target && target.current)
|
||||
if (target.current.stat == 2)
|
||||
return 0 // They're dead. Fail.
|
||||
//if (!target.current.restrained())
|
||||
// return 0 // They're loose. Close but no cigar.
|
||||
|
||||
var/area/skipjack_station/start/A = locate()
|
||||
for(var/mob/living/carbon/human/M in A)
|
||||
if(target.current == M)
|
||||
return 1 //They're restrained on the shuttle. Success.
|
||||
else
|
||||
return 0
|
||||
=======
|
||||
/datum/objective/heist/proc/choose_target()
|
||||
return
|
||||
|
||||
/datum/objective/heist/kidnap/choose_target()
|
||||
var/list/roles = list("Chief Engineer","Research Director","Roboticist","Chemist","Station Engineer")
|
||||
var/list/possible_targets = list()
|
||||
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.special_role))
|
||||
possible_targets += possible_target
|
||||
for(var/role in roles)
|
||||
if(possible_target.assigned_role == role)
|
||||
priority_targets += possible_target
|
||||
continue
|
||||
|
||||
if(priority_targets.len > 0)
|
||||
target = pick(priority_targets)
|
||||
else if(possible_targets.len > 0)
|
||||
target = pick(possible_targets)
|
||||
>>>>>>> 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
|
||||
<<<<<<< HEAD
|
||||
datum/objective/heist/loot
|
||||
|
||||
choose_target()
|
||||
@@ -732,9 +793,85 @@ datum/objective/heist/loot
|
||||
for(var/obj/O in raider.current.get_contents())
|
||||
if(istype(O,target)) total_amount++
|
||||
if(total_amount >= target_amount) return 1
|
||||
||||||| parent of 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
datum/objective/heist/loot
|
||||
|
||||
choose_target()
|
||||
var/loot = "an object"
|
||||
switch(rand(1,8))
|
||||
if(1)
|
||||
target = /obj/structure/particle_accelerator
|
||||
target_amount = 6
|
||||
loot = "a complete particle accelerator"
|
||||
if(2)
|
||||
target = /obj/machinery/the_singularitygen
|
||||
target_amount = 1
|
||||
loot = "a gravitational generator"
|
||||
if(3)
|
||||
target = /obj/machinery/power/emitter
|
||||
target_amount = 4
|
||||
loot = "four emitters"
|
||||
if(4)
|
||||
target = /obj/machinery/nuclearbomb
|
||||
target_amount = 1
|
||||
loot = "a nuclear bomb"
|
||||
if(5)
|
||||
target = /obj/item/weapon/gun
|
||||
target_amount = 6
|
||||
loot = "six guns"
|
||||
if(6)
|
||||
target = /obj/item/weapon/gun/energy
|
||||
target_amount = 4
|
||||
loot = "four energy guns"
|
||||
if(7)
|
||||
target = /obj/item/weapon/gun/energy/laser
|
||||
target_amount = 2
|
||||
loot = "two laser guns"
|
||||
if(8)
|
||||
target = /obj/item/weapon/gun/energy/ionrifle
|
||||
target_amount = 1
|
||||
loot = "an ion gun"
|
||||
|
||||
explanation_text = "It's a buyer's market out here. Steal [loot] for resale."
|
||||
|
||||
check_completion()
|
||||
|
||||
var/total_amount = 0
|
||||
|
||||
for(var/obj/O in locate(/area/skipjack_station/start))
|
||||
if(istype(O,target)) total_amount++
|
||||
for(var/obj/I in O.contents)
|
||||
if(istype(I,target)) total_amount++
|
||||
if(total_amount >= target_amount) return 1
|
||||
|
||||
for(var/datum/mind/raider in raiders.current_antagonists)
|
||||
if(raider.current)
|
||||
for(var/obj/O in raider.current.get_contents())
|
||||
if(istype(O,target)) total_amount++
|
||||
if(total_amount >= target_amount) return 1
|
||||
=======
|
||||
if(target && target.current)
|
||||
explanation_text = "We can get a good price for [target.current.real_name], the [target.assigned_role]. Take them alive."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
>>>>>>> 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
|
||||
/datum/objective/heist/kidnap/check_completion()
|
||||
if(target && target.current)
|
||||
if (target.current.stat == 2)
|
||||
return 0 // They're dead. Fail.
|
||||
//if (!target.current.restrained())
|
||||
// return 0 // They're loose. Close but no cigar.
|
||||
|
||||
var/area/skipjack_station/start/A = locate()
|
||||
for(var/mob/living/carbon/human/M in A)
|
||||
if(target.current == M)
|
||||
return 1 //They're restrained on the shuttle. Success.
|
||||
else
|
||||
return 0
|
||||
|
||||
<<<<<<< HEAD
|
||||
datum/objective/heist/salvage
|
||||
|
||||
choose_target()
|
||||
@@ -772,6 +909,144 @@ datum/objective/heist/salvage
|
||||
|
||||
for(var/obj/item/O in locate(/area/shuttle/skipjack)) // CHOMPEdit: Shuttle consensing
|
||||
|
||||
var/obj/item/stack/material/S
|
||||
if(istype(O,/obj/item/stack/material))
|
||||
if(O.name == target)
|
||||
S = O
|
||||
||||||| parent of 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
datum/objective/heist/salvage
|
||||
|
||||
choose_target()
|
||||
switch(rand(1,8))
|
||||
if(1)
|
||||
target = DEFAULT_WALL_MATERIAL
|
||||
target_amount = 300
|
||||
if(2)
|
||||
target = "glass"
|
||||
target_amount = 200
|
||||
if(3)
|
||||
target = "plasteel"
|
||||
target_amount = 100
|
||||
if(4)
|
||||
target = "phoron"
|
||||
target_amount = 100
|
||||
if(5)
|
||||
target = "silver"
|
||||
target_amount = 50
|
||||
if(6)
|
||||
target = "gold"
|
||||
target_amount = 20
|
||||
if(7)
|
||||
target = "uranium"
|
||||
target_amount = 20
|
||||
if(8)
|
||||
target = "diamond"
|
||||
target_amount = 20
|
||||
|
||||
explanation_text = "Ransack the station and escape with [target_amount] [target]."
|
||||
|
||||
check_completion()
|
||||
|
||||
var/total_amount = 0
|
||||
|
||||
for(var/obj/item/O in locate(/area/skipjack_station/start))
|
||||
|
||||
var/obj/item/stack/material/S
|
||||
if(istype(O,/obj/item/stack/material))
|
||||
if(O.name == target)
|
||||
S = O
|
||||
=======
|
||||
/datum/objective/heist/loot/choose_target()
|
||||
var/loot = "an object"
|
||||
switch(rand(1,8))
|
||||
if(1)
|
||||
target = /obj/structure/particle_accelerator
|
||||
target_amount = 6
|
||||
loot = "a complete particle accelerator"
|
||||
if(2)
|
||||
target = /obj/machinery/the_singularitygen
|
||||
target_amount = 1
|
||||
loot = "a gravitational generator"
|
||||
if(3)
|
||||
target = /obj/machinery/power/emitter
|
||||
target_amount = 4
|
||||
loot = "four emitters"
|
||||
if(4)
|
||||
target = /obj/machinery/nuclearbomb
|
||||
target_amount = 1
|
||||
loot = "a nuclear bomb"
|
||||
if(5)
|
||||
target = /obj/item/weapon/gun
|
||||
target_amount = 6
|
||||
loot = "six guns"
|
||||
if(6)
|
||||
target = /obj/item/weapon/gun/energy
|
||||
target_amount = 4
|
||||
loot = "four energy guns"
|
||||
if(7)
|
||||
target = /obj/item/weapon/gun/energy/laser
|
||||
target_amount = 2
|
||||
loot = "two laser guns"
|
||||
if(8)
|
||||
target = /obj/item/weapon/gun/energy/ionrifle
|
||||
target_amount = 1
|
||||
loot = "an ion gun"
|
||||
|
||||
explanation_text = "It's a buyer's market out here. Steal [loot] for resale."
|
||||
|
||||
|
||||
/datum/objective/heist/loot/check_completion()
|
||||
var/total_amount = 0
|
||||
|
||||
for(var/obj/O in locate(/area/skipjack_station/start))
|
||||
if(istype(O,target)) total_amount++
|
||||
for(var/obj/I in O.contents)
|
||||
if(istype(I,target)) total_amount++
|
||||
if(total_amount >= target_amount) return 1
|
||||
|
||||
for(var/datum/mind/raider in raiders.current_antagonists)
|
||||
if(raider.current)
|
||||
for(var/obj/O in raider.current.get_contents())
|
||||
if(istype(O,target)) total_amount++
|
||||
if(total_amount >= target_amount) return 1
|
||||
|
||||
return 0
|
||||
|
||||
/datum/objective/heist/salvage/choose_target()
|
||||
switch(rand(1,8))
|
||||
if(1)
|
||||
target = DEFAULT_WALL_MATERIAL
|
||||
target_amount = 300
|
||||
if(2)
|
||||
target = "glass"
|
||||
target_amount = 200
|
||||
if(3)
|
||||
target = "plasteel"
|
||||
target_amount = 100
|
||||
if(4)
|
||||
target = "phoron"
|
||||
target_amount = 100
|
||||
if(5)
|
||||
target = "silver"
|
||||
target_amount = 50
|
||||
if(6)
|
||||
target = "gold"
|
||||
target_amount = 20
|
||||
if(7)
|
||||
target = "uranium"
|
||||
target_amount = 20
|
||||
if(8)
|
||||
target = "diamond"
|
||||
target_amount = 20
|
||||
|
||||
explanation_text = "Ransack the station and escape with [target_amount] [target]."
|
||||
|
||||
/datum/objective/heist/salvage/check_completion()
|
||||
|
||||
var/total_amount = 0
|
||||
|
||||
for(var/obj/item/O in locate(/area/skipjack_station/start))
|
||||
|
||||
var/obj/item/stack/material/S
|
||||
if(istype(O,/obj/item/stack/material))
|
||||
if(O.name == target)
|
||||
@@ -781,6 +1056,7 @@ datum/objective/heist/salvage
|
||||
if(istype(I,/obj/item/stack/material))
|
||||
if(I.name == target)
|
||||
S = I
|
||||
>>>>>>> 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
total_amount += S.get_amount()
|
||||
|
||||
for(var/datum/mind/raider in raiders.current_antagonists)
|
||||
@@ -798,7 +1074,7 @@ datum/objective/heist/salvage
|
||||
/datum/objective/heist/preserve_crew
|
||||
explanation_text = "Do not leave anyone behind, alive or dead."
|
||||
|
||||
check_completion()
|
||||
/datum/objective/heist/preserve_crew/check_completion()
|
||||
if(raiders && raiders.is_raider_crew_safe()) return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ mob
|
||||
if(sandbox)
|
||||
sandbox.update()
|
||||
|
||||
datum/hSB
|
||||
/datum/hSB
|
||||
var/owner = null
|
||||
var/admin = 0
|
||||
proc
|
||||
|
||||
@@ -1,26 +1,3 @@
|
||||
//cast_method flags
|
||||
#define CAST_USE 1 // Clicking the spell in your hand.
|
||||
#define CAST_MELEE 2 // Clicking an atom in melee range.
|
||||
#define CAST_RANGED 4 // Clicking an atom beyond melee range.
|
||||
#define CAST_THROW 8 // Throwing the spell and hitting an atom.
|
||||
#define CAST_COMBINE 16 // Clicking another spell with this spell.
|
||||
#define CAST_INNATE 32 // Activates upon verb usage, used for mobs without hands.
|
||||
|
||||
//Aspects
|
||||
#define ASPECT_FIRE "fire" //Damage over time and raising body-temp. Firesuits protect from this.
|
||||
#define ASPECT_FROST "frost" //Slows down the affected, also involves imbedding with icicles. Winter coats protect from this.
|
||||
#define ASPECT_SHOCK "shock" //Energy-expensive, usually stuns. Insulated armor protects from this.
|
||||
#define ASPECT_AIR "air" //Mostly involves manipulation of atmos, useless in a vacuum. Magboots protect from this.
|
||||
#define ASPECT_FORCE "force" //Manipulates gravity to push things away or towards a location.
|
||||
#define ASPECT_TELE "tele" //Teleportation of self, other objects, or other people.
|
||||
#define ASPECT_DARK "dark" //Makes all those photons vanish using magic-- WITH SCIENCE. Used for sneaky stuff.
|
||||
#define ASPECT_LIGHT "light" //The opposite of dark, usually blinds, makes holo-illusions, or makes laser lightshows.
|
||||
#define ASPECT_BIOMED "biomed" //Mainly concerned with healing and restoration.
|
||||
#define ASPECT_EMP "emp" //Unused now.
|
||||
#define ASPECT_UNSTABLE "unstable" //Heavily RNG-based, causes instability to the victim.
|
||||
#define ASPECT_CHROMATIC "chromatic" //Used to combine with other spells.
|
||||
#define ASPECT_UNHOLY "unholy" //Involves the dead, blood, and most things against divine beings.
|
||||
|
||||
/obj/item/weapon/spell
|
||||
name = "glowing particles"
|
||||
desc = "Your hands appear to be glowing brightly."
|
||||
|
||||
@@ -230,13 +230,13 @@
|
||||
/mob/living/silicon/GetIdCard()
|
||||
return idcard
|
||||
|
||||
proc/FindNameFromID(var/mob/living/carbon/human/H)
|
||||
/proc/FindNameFromID(var/mob/living/carbon/human/H)
|
||||
ASSERT(istype(H))
|
||||
var/obj/item/weapon/card/id/C = H.GetIdCard()
|
||||
if(C)
|
||||
return C.registered_name
|
||||
|
||||
proc/get_all_job_icons() //For all existing HUD icons
|
||||
/proc/get_all_job_icons() //For all existing HUD icons
|
||||
return joblist + list("Prisoner")
|
||||
|
||||
/obj/proc/GetJobName() //Used in secHUD icon generation
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
pto_type = PTO_CIVILIAN
|
||||
|
||||
get_access()
|
||||
/datum/job/centcom_officer/get_access()
|
||||
return get_all_accesses().Copy()
|
||||
|
||||
//YW UNCOMMENTINGSTART: INSTATE LOYALTY IMPLANT
|
||||
@@ -69,9 +69,17 @@
|
||||
|
||||
return 1
|
||||
|
||||
<<<<<<< HEAD
|
||||
get_access()
|
||||
var/access = get_all_accesses()
|
||||
return access*/
|
||||
||||||| parent of 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
get_access()
|
||||
return get_all_accesses().Copy()
|
||||
=======
|
||||
/datum/job/emergency_responder/get_access()
|
||||
return get_all_accesses().Copy()
|
||||
>>>>>>> 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
|
||||
/datum/job/clown
|
||||
title = "Clown"
|
||||
|
||||
@@ -14,7 +14,7 @@ var/global/datum/controller/occupations/job_master
|
||||
//Cache of icons for job info window
|
||||
var/list/job_icons = list()
|
||||
|
||||
proc/SetupOccupations(var/faction = "Station")
|
||||
/datum/controller/occupations/proc/SetupOccupations(var/faction = "Station")
|
||||
occupations = list()
|
||||
//var/list/all_jobs = typesof(/datum/job)
|
||||
var/list/all_jobs = list(/datum/job/assistant) | using_map.allowed_jobs
|
||||
@@ -32,23 +32,23 @@ var/global/datum/controller/occupations/job_master
|
||||
return 1
|
||||
|
||||
|
||||
proc/Debug(var/text)
|
||||
/datum/controller/occupations/proc/Debug(var/text)
|
||||
if(!Debug2) return 0
|
||||
job_debug.Add(text)
|
||||
return 1
|
||||
|
||||
|
||||
proc/GetJob(var/rank)
|
||||
/datum/controller/occupations/proc/GetJob(var/rank)
|
||||
if(!rank) return null
|
||||
for(var/datum/job/J in occupations)
|
||||
if(!J) continue
|
||||
if(J.title == rank) return J
|
||||
return null
|
||||
|
||||
proc/GetPlayerAltTitle(mob/new_player/player, rank)
|
||||
/datum/controller/occupations/proc/GetPlayerAltTitle(mob/new_player/player, rank)
|
||||
return player.client.prefs.GetPlayerAltTitle(GetJob(rank))
|
||||
|
||||
proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0)
|
||||
/datum/controller/occupations/proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0)
|
||||
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
|
||||
if(player && player.mind && rank)
|
||||
var/datum/job/job = GetJob(rank)
|
||||
@@ -80,14 +80,14 @@ var/global/datum/controller/occupations/job_master
|
||||
Debug("AR has failed, Player: [player], Rank: [rank]")
|
||||
return 0
|
||||
|
||||
proc/FreeRole(var/rank) //making additional slot on the fly
|
||||
/datum/controller/occupations/proc/FreeRole(var/rank) //making additional slot on the fly
|
||||
var/datum/job/job = GetJob(rank)
|
||||
if(job && job.total_positions != -1)
|
||||
job.total_positions++
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/FindOccupationCandidates(datum/job/job, level, flag)
|
||||
/datum/controller/occupations/proc/FindOccupationCandidates(datum/job/job, level, flag)
|
||||
Debug("Running FOC, Job: [job], Level: [level], Flag: [flag]")
|
||||
var/list/candidates = list()
|
||||
for(var/mob/new_player/player in unassigned)
|
||||
@@ -116,7 +116,7 @@ var/global/datum/controller/occupations/job_master
|
||||
candidates += player
|
||||
return candidates
|
||||
|
||||
proc/GiveRandomJob(var/mob/new_player/player)
|
||||
/datum/controller/occupations/proc/GiveRandomJob(var/mob/new_player/player)
|
||||
Debug("GRJ Giving random job, Player: [player]")
|
||||
for(var/datum/job/job in shuffle(occupations))
|
||||
if(!job)
|
||||
@@ -154,7 +154,7 @@ var/global/datum/controller/occupations/job_master
|
||||
unassigned -= player
|
||||
break
|
||||
|
||||
proc/ResetOccupations()
|
||||
/datum/controller/occupations/proc/ResetOccupations()
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if((player) && (player.mind))
|
||||
player.mind.assigned_role = null
|
||||
@@ -164,8 +164,8 @@ var/global/datum/controller/occupations/job_master
|
||||
return
|
||||
|
||||
|
||||
///This proc is called before the level loop of DivideOccupations() and will try to select a head, ignoring ALL non-head preferences for every level until it locates a head or runs out of levels to check
|
||||
proc/FillHeadPosition()
|
||||
///This proc is called before the level loop of DivideOccupations() and will try to select a head, ignoring ALL non-head preferences for every level until it locates a head or runs out of levels to check
|
||||
/datum/controller/occupations/proc/FillHeadPosition()
|
||||
for(var/level = 1 to 3)
|
||||
for(var/command_position in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
@@ -205,8 +205,8 @@ var/global/datum/controller/occupations/job_master
|
||||
return 0
|
||||
|
||||
|
||||
///This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
|
||||
proc/CheckHeadPositions(var/level)
|
||||
///This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
|
||||
/datum/controller/occupations/proc/CheckHeadPositions(var/level)
|
||||
for(var/command_position in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job) continue
|
||||
@@ -221,7 +221,7 @@ var/global/datum/controller/occupations/job_master
|
||||
* fills var "assigned_role" for all ready players.
|
||||
* This proc must not have any side effect besides of modifying "assigned_role".
|
||||
**/
|
||||
proc/DivideOccupations()
|
||||
/datum/controller/occupations/proc/DivideOccupations()
|
||||
//Setup new player list and get the jobs list
|
||||
Debug("Running DO")
|
||||
SetupOccupations()
|
||||
@@ -351,7 +351,7 @@ var/global/datum/controller/occupations/job_master
|
||||
return 1
|
||||
|
||||
|
||||
proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
|
||||
/datum/controller/occupations/proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
|
||||
if(!H) return null
|
||||
|
||||
var/datum/job/job = GetJob(rank)
|
||||
@@ -371,12 +371,30 @@ var/global/datum/controller/occupations/job_master
|
||||
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
|
||||
H.forceMove(S.loc)
|
||||
else
|
||||
var/list/spawn_props = LateSpawn(H.client, rank)
|
||||
var/turf/T = spawn_props["turf"]
|
||||
if(!T)
|
||||
to_chat(H, "<span class='critical'>You were unable to be spawned at your chosen late-join spawnpoint. Please verify your job/spawn point combination makes sense, and try another one.</span>")
|
||||
return
|
||||
else
|
||||
<<<<<<< HEAD
|
||||
var/turf/T = get_turf(pick(latejoin))
|
||||
if(!T)
|
||||
to_chat(H, "<span class='critical'>You were unable to be spawned at your chosen late-join spawnpoint. Please verify your job/spawn point combination makes sense, and try another one.</span>")
|
||||
return
|
||||
else
|
||||
H.forceMove(T)
|
||||
||||||| parent of 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
var/list/spawn_props = LateSpawn(H.client, rank)
|
||||
var/turf/T = spawn_props["turf"]
|
||||
if(!T)
|
||||
to_chat(H, "<span class='critical'>You were unable to be spawned at your chosen late-join spawnpoint. Please verify your job/spawn point combination makes sense, and try another one.</span>")
|
||||
return
|
||||
else
|
||||
H.forceMove(T)
|
||||
=======
|
||||
H.forceMove(T)
|
||||
>>>>>>> 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
|
||||
// Moving wheelchair if they have one
|
||||
if(H.buckled && istype(H.buckled, /obj/structure/bed/chair/wheelchair))
|
||||
@@ -431,7 +449,154 @@ var/global/datum/controller/occupations/job_master
|
||||
else
|
||||
custom_equip_leftovers.Add(thing)
|
||||
else
|
||||
<<<<<<< HEAD
|
||||
to_chat(H, "<span class='danger'>Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug.</span>")
|
||||
|
||||
if(istype(H)) //give humans wheelchairs, if they need them.
|
||||
if(istype(H.loc, /obj/belly)) //CHOMPedit start unless in a gut
|
||||
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
|
||||
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
|
||||
var/obj/item/weapon/storage/S = locate() in H.contents
|
||||
var/obj/item/wheelchair/R
|
||||
if(S)
|
||||
R = locate() in S.contents
|
||||
if(!l_foot || !r_foot || R)
|
||||
var/wheelchair_type = R?.unfolded_type || /obj/structure/bed/chair/wheelchair
|
||||
var/obj/structure/bed/chair/wheelchair/W = new wheelchair_type(H.loc)
|
||||
W.buckle_mob(H)
|
||||
H.update_canmove()
|
||||
W.set_dir(H.dir)
|
||||
W.add_fingerprint(H)
|
||||
if(R)
|
||||
W.color = R.color
|
||||
qdel(R) //CHOMPedit end
|
||||
|
||||
to_chat(H, "<B>You are [job.total_positions == 1 ? "the" : "a"] [alt_title ? alt_title : rank].</B>")
|
||||
|
||||
if(job.supervisors)
|
||||
to_chat(H, "<b>As the [alt_title ? alt_title : rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>")
|
||||
if(job.has_headset)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_l_ear)
|
||||
to_chat(H, "<b>To speak on your department's radio channel use :h. For the use of other channels, examine your headset.</b>")
|
||||
|
||||
if(job.req_admin_notify)
|
||||
to_chat(H, "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>")
|
||||
|
||||
// EMAIL GENERATION
|
||||
// Email addresses will be created under this domain name. Mostly for the looks.
|
||||
var/domain = "freemail.nt"
|
||||
if(using_map && LAZYLEN(using_map.usable_email_tlds))
|
||||
domain = using_map.usable_email_tlds[1]
|
||||
var/sanitized_name = sanitize(replacetext(replacetext(lowertext(H.real_name), " ", "."), "'", ""))
|
||||
var/complete_login = "[sanitized_name]@[domain]"
|
||||
|
||||
// It is VERY unlikely that we'll have two players, in the same round, with the same name and branch, but still, this is here.
|
||||
// If such conflict is encountered, a random number will be appended to the email address. If this fails too, no email account will be created.
|
||||
if(ntnet_global.does_email_exist(complete_login))
|
||||
complete_login = "[sanitized_name][random_id(/datum/computer_file/data/email_account/, 100, 999)]@[domain]"
|
||||
|
||||
// If even fallback login generation failed, just don't give them an email. The chance of this happening is astronomically low.
|
||||
if(ntnet_global.does_email_exist(complete_login))
|
||||
to_chat(H, "You were not assigned an email address.")
|
||||
H.mind.store_memory("You were not assigned an email address.")
|
||||
else
|
||||
var/datum/computer_file/data/email_account/EA = new/datum/computer_file/data/email_account()
|
||||
EA.password = GenerateKey()
|
||||
EA.login = complete_login
|
||||
to_chat(H, "Your email account address is <b>[EA.login]</b> and the password is <b>[EA.password]</b>. This information has also been placed into your notes.")
|
||||
H.mind.store_memory("Your email account address is [EA.login] and the password is [EA.password].")
|
||||
// END EMAIL GENERATION
|
||||
|
||||
//Gives glasses to the vision impaired
|
||||
if(H.disabilities & NEARSIGHTED)
|
||||
var/equipped = H.equip_to_slot_or_del(new /obj/item/clothing/glasses/regular(H), slot_glasses)
|
||||
if(equipped != 1)
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
G.prescription = 1
|
||||
|
||||
BITSET(H.hud_updateflag, ID_HUD)
|
||||
BITSET(H.hud_updateflag, IMPLOYAL_HUD)
|
||||
BITSET(H.hud_updateflag, SPECIALROLE_HUD)
|
||||
return H
|
||||
|
||||
proc/LoadJobs(jobsfile) //ran during round setup, reads info from jobs.txt -- Urist
|
||||
if(!config.load_jobs_from_txt)
|
||||
return 0
|
||||
||||||| parent of 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
to_chat(H, "<span class='danger'>Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug.</span>")
|
||||
|
||||
if(istype(H)) //give humans wheelchairs, if they need them.
|
||||
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
|
||||
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
|
||||
var/obj/item/weapon/storage/S = locate() in H.contents
|
||||
var/obj/item/wheelchair/R
|
||||
if(S)
|
||||
R = locate() in S.contents
|
||||
if(!l_foot || !r_foot || R)
|
||||
var/wheelchair_type = R?.unfolded_type || /obj/structure/bed/chair/wheelchair
|
||||
var/obj/structure/bed/chair/wheelchair/W = new wheelchair_type(H.loc)
|
||||
W.buckle_mob(H)
|
||||
H.update_canmove()
|
||||
W.set_dir(H.dir)
|
||||
W.add_fingerprint(H)
|
||||
if(R)
|
||||
W.color = R.color
|
||||
qdel(R)
|
||||
|
||||
to_chat(H, "<B>You are [job.total_positions == 1 ? "the" : "a"] [alt_title ? alt_title : rank].</B>")
|
||||
|
||||
if(job.supervisors)
|
||||
to_chat(H, "<b>As the [alt_title ? alt_title : rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>")
|
||||
if(job.has_headset)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_l_ear)
|
||||
to_chat(H, "<b>To speak on your department's radio channel use :h. For the use of other channels, examine your headset.</b>")
|
||||
|
||||
if(job.req_admin_notify)
|
||||
to_chat(H, "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>")
|
||||
|
||||
// EMAIL GENERATION
|
||||
// Email addresses will be created under this domain name. Mostly for the looks.
|
||||
var/domain = "freemail.nt"
|
||||
if(using_map && LAZYLEN(using_map.usable_email_tlds))
|
||||
domain = using_map.usable_email_tlds[1]
|
||||
var/sanitized_name = sanitize(replacetext(replacetext(lowertext(H.real_name), " ", "."), "'", ""))
|
||||
var/complete_login = "[sanitized_name]@[domain]"
|
||||
|
||||
// It is VERY unlikely that we'll have two players, in the same round, with the same name and branch, but still, this is here.
|
||||
// If such conflict is encountered, a random number will be appended to the email address. If this fails too, no email account will be created.
|
||||
if(ntnet_global.does_email_exist(complete_login))
|
||||
complete_login = "[sanitized_name][random_id(/datum/computer_file/data/email_account/, 100, 999)]@[domain]"
|
||||
|
||||
// If even fallback login generation failed, just don't give them an email. The chance of this happening is astronomically low.
|
||||
if(ntnet_global.does_email_exist(complete_login))
|
||||
to_chat(H, "You were not assigned an email address.")
|
||||
H.mind.store_memory("You were not assigned an email address.")
|
||||
else
|
||||
var/datum/computer_file/data/email_account/EA = new/datum/computer_file/data/email_account()
|
||||
EA.password = GenerateKey()
|
||||
EA.login = complete_login
|
||||
to_chat(H, "Your email account address is <b>[EA.login]</b> and the password is <b>[EA.password]</b>. This information has also been placed into your notes.")
|
||||
H.mind.store_memory("Your email account address is [EA.login] and the password is [EA.password].")
|
||||
// END EMAIL GENERATION
|
||||
|
||||
//Gives glasses to the vision impaired
|
||||
if(H.disabilities & NEARSIGHTED)
|
||||
var/equipped = H.equip_to_slot_or_del(new /obj/item/clothing/glasses/regular(H), slot_glasses)
|
||||
if(equipped != 1)
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
G.prescription = 1
|
||||
|
||||
BITSET(H.hud_updateflag, ID_HUD)
|
||||
BITSET(H.hud_updateflag, IMPLOYAL_HUD)
|
||||
BITSET(H.hud_updateflag, SPECIALROLE_HUD)
|
||||
return H
|
||||
|
||||
proc/LoadJobs(jobsfile) //ran during round setup, reads info from jobs.txt -- Urist
|
||||
if(!config.load_jobs_from_txt)
|
||||
return 0
|
||||
=======
|
||||
spawn_in_storage += thing
|
||||
>>>>>>> 18962f7a77... Merge pull request #10719 from VOREStation/upstream-merge-8150
|
||||
|
||||
// Set up their account
|
||||
job.setup_account(H)
|
||||
@@ -510,7 +675,6 @@ var/global/datum/controller/occupations/job_master
|
||||
to_chat(H, "<span class='danger'>Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug.</span>")
|
||||
|
||||
if(istype(H)) //give humans wheelchairs, if they need them.
|
||||
if(istype(H.loc, /obj/belly)) //CHOMPedit start unless in a gut
|
||||
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
|
||||
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
|
||||
var/obj/item/weapon/storage/S = locate() in H.contents
|
||||
@@ -526,7 +690,7 @@ var/global/datum/controller/occupations/job_master
|
||||
W.add_fingerprint(H)
|
||||
if(R)
|
||||
W.color = R.color
|
||||
qdel(R) //CHOMPedit end
|
||||
qdel(R)
|
||||
|
||||
to_chat(H, "<B>You are [job.total_positions == 1 ? "the" : "a"] [alt_title ? alt_title : rank].</B>")
|
||||
|
||||
@@ -576,7 +740,7 @@ var/global/datum/controller/occupations/job_master
|
||||
BITSET(H.hud_updateflag, SPECIALROLE_HUD)
|
||||
return H
|
||||
|
||||
proc/LoadJobs(jobsfile) //ran during round setup, reads info from jobs.txt -- Urist
|
||||
/datum/controller/occupations/proc/LoadJobs(jobsfile) //ran during round setup, reads info from jobs.txt -- Urist
|
||||
if(!config.load_jobs_from_txt)
|
||||
return 0
|
||||
|
||||
@@ -611,7 +775,7 @@ var/global/datum/controller/occupations/job_master
|
||||
return 1
|
||||
|
||||
|
||||
proc/HandleFeedbackGathering()
|
||||
/datum/controller/occupations/proc/HandleFeedbackGathering()
|
||||
for(var/datum/job/job in occupations)
|
||||
var/tmp_str = "|[job.title]|"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var/jsonpath = "/home/bay12/public_html"
|
||||
var/dmepath = "/home/bay12/git/baystation12.dme"
|
||||
var/makejson = 1 //temp
|
||||
proc/makejson()
|
||||
/proc/makejson()
|
||||
|
||||
if(!makejson)
|
||||
return
|
||||
@@ -82,19 +82,19 @@ proc/makejson()
|
||||
message_admins("Done")
|
||||
world.Reboot("Switching to [newmap]")
|
||||
|
||||
obj/mapinfo
|
||||
/obj/mapinfo
|
||||
invisibility = 101
|
||||
var/mapname = "thismap"
|
||||
var/decks = 4
|
||||
proc/GetMapInfo()
|
||||
/proc/GetMapInfo()
|
||||
// var/obj/mapinfo/M = locate()
|
||||
// Just removing these to try and fix the occasional JSON -> WORLD issue.
|
||||
// to_world(M.name)
|
||||
// to_world(M.mapname)
|
||||
client/proc/ChangeMap(var/X as text)
|
||||
/client/proc/ChangeMap(var/X as text)
|
||||
set name = "Change Map"
|
||||
set category = "Admin"
|
||||
switchmap(X,X)
|
||||
proc/send2adminirc(channel,msg)
|
||||
/proc/send2adminirc(channel,msg)
|
||||
world << channel << " "<< msg
|
||||
shell("python nudge.py '[channel]' [msg]")
|
||||
@@ -69,7 +69,7 @@
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/air_sensor/Destroy()
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
. = ..()
|
||||
@@ -85,7 +85,7 @@ obj/machinery/air_sensor/Destroy()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
circuit = /obj/item/weapon/circuitboard/air_management
|
||||
|
||||
obj/machinery/computer/general_air_control/Destroy()
|
||||
/obj/machinery/computer/general_air_control/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
@@ -305,5 +305,3 @@
|
||||
|
||||
build_eff = man_rating
|
||||
eat_eff = bin_rating
|
||||
|
||||
#undef BIOGENITEM
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
return L
|
||||
|
||||
|
||||
mob/living/proc/near_camera()
|
||||
/mob/living/proc/near_camera()
|
||||
if (!isturf(loc))
|
||||
return 0
|
||||
else if(!cameranet.checkVis(src))
|
||||
@@ -263,16 +263,16 @@ mob/living/proc/near_camera()
|
||||
if(T && (T.z in using_map.station_levels) && hassensorlevel(src, SUIT_SENSOR_TRACKING))
|
||||
return TRACKING_POSSIBLE
|
||||
|
||||
mob/living/proc/tracking_initiated()
|
||||
/mob/living/proc/tracking_initiated()
|
||||
|
||||
mob/living/silicon/robot/tracking_initiated()
|
||||
/mob/living/silicon/robot/tracking_initiated()
|
||||
tracking_entities++
|
||||
if(tracking_entities == 1 && has_zeroth_law())
|
||||
to_chat(src, "<span class='warning'>Internal camera is currently being accessed.</span>")
|
||||
|
||||
mob/living/proc/tracking_cancelled()
|
||||
/mob/living/proc/tracking_cancelled()
|
||||
|
||||
mob/living/silicon/robot/tracking_initiated()
|
||||
/mob/living/silicon/robot/tracking_initiated()
|
||||
tracking_entities--
|
||||
if(!tracking_entities && has_zeroth_law())
|
||||
to_chat(src, "<span class='notice'>Internal camera is no longer being accessed.</span>")
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
name = "data disk - 'God Emperor of Mankind'"
|
||||
read_only = 1
|
||||
|
||||
New()
|
||||
/obj/item/weapon/disk/data/demo/New()
|
||||
initializeDisk()
|
||||
buf.types=DNA2_BUF_UE|DNA2_BUF_UI
|
||||
//data = "066000033000000000AF00330660FF4DB002690"
|
||||
@@ -514,7 +514,7 @@
|
||||
name = "data disk - 'Mr. Muggles'"
|
||||
read_only = 1
|
||||
|
||||
New()
|
||||
/obj/item/weapon/disk/data/monkey/New()
|
||||
..()
|
||||
initializeDisk()
|
||||
buf.types=DNA2_BUF_SE
|
||||
|
||||
@@ -23,10 +23,10 @@ var/prison_shuttle_timeleft = 0
|
||||
var/allowedtocall = 0
|
||||
var/prison_break = 0
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
/obj/machinery/computer/prison_shuttle/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
/obj/machinery/computer/prison_shuttle/attack_hand(var/mob/user as mob)
|
||||
if(!src.allowed(user) && (!hacked))
|
||||
to_chat(user, "<span class='warning'>Access Denied.</span>")
|
||||
return
|
||||
@@ -51,7 +51,7 @@ var/prison_shuttle_timeleft = 0
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
/obj/machinery/computer/prison_shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -94,12 +94,12 @@ var/prison_shuttle_timeleft = 0
|
||||
return
|
||||
|
||||
|
||||
proc/prison_can_move()
|
||||
/obj/machinery/computer/prison_shuttle/proc/prison_can_move()
|
||||
if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return 0
|
||||
else return 1
|
||||
|
||||
|
||||
proc/prison_break()
|
||||
/obj/machinery/computer/prison_shuttle/proc/prison_break()
|
||||
switch(prison_break)
|
||||
if (0)
|
||||
if(!prison_shuttle_at_station || prison_shuttle_moving_to_prison) return
|
||||
@@ -116,7 +116,7 @@ var/prison_shuttle_timeleft = 0
|
||||
prison_break = 0
|
||||
|
||||
|
||||
proc/post_signal(var/command)
|
||||
/obj/machinery/computer/prison_shuttle/proc/post_signal(var/command)
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1311)
|
||||
if(!frequency) return
|
||||
var/datum/signal/status_signal = new
|
||||
@@ -127,7 +127,7 @@ var/prison_shuttle_timeleft = 0
|
||||
return
|
||||
|
||||
|
||||
proc/prison_process()
|
||||
/obj/machinery/computer/prison_shuttle/proc/prison_process()
|
||||
while(prison_shuttle_time - world.timeofday > 0)
|
||||
var/ticksleft = prison_shuttle_time - world.timeofday
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/list/authorized = list( )
|
||||
|
||||
|
||||
attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob)
|
||||
/obj/machinery/computer/shuttle/attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if ((!( istype(W, /obj/item/weapon/card) ) || !( ticker ) || emergency_shuttle.location() || !( user ))) return
|
||||
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#define AIRLOCK_CONTROL_RANGE 22
|
||||
|
||||
// This code allows for airlocks to be controlled externally by setting an id_tag and comm frequency (disables ID access)
|
||||
obj/machinery/door/airlock
|
||||
/obj/machinery/door/airlock
|
||||
var/id_tag
|
||||
var/frequency
|
||||
var/shockedby = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/cur_command = null //the command the door is currently attempting to complete
|
||||
|
||||
obj/machinery/door/airlock/process()
|
||||
/obj/machinery/door/airlock/process()
|
||||
if (..() == PROCESS_KILL && !cur_command)
|
||||
. = PROCESS_KILL
|
||||
if (arePowerSystemsOn())
|
||||
execute_current_command()
|
||||
|
||||
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
/obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
if (!arePowerSystemsOn()) return //no power
|
||||
|
||||
if(!signal || signal.encryption) return
|
||||
@@ -27,7 +27,7 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
START_MACHINE_PROCESSING(src)
|
||||
|
||||
|
||||
obj/machinery/door/airlock/proc/execute_current_command()
|
||||
/obj/machinery/door/airlock/proc/execute_current_command()
|
||||
if(operating)
|
||||
return //emagged or busy doing something else
|
||||
|
||||
@@ -39,7 +39,7 @@ obj/machinery/door/airlock/proc/execute_current_command()
|
||||
if (command_completed(cur_command))
|
||||
cur_command = null
|
||||
|
||||
obj/machinery/door/airlock/proc/do_command(var/command)
|
||||
/obj/machinery/door/airlock/proc/do_command(var/command)
|
||||
switch(command)
|
||||
if("open")
|
||||
open()
|
||||
@@ -70,7 +70,7 @@ obj/machinery/door/airlock/proc/do_command(var/command)
|
||||
|
||||
send_status()
|
||||
|
||||
obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
/obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
switch(command)
|
||||
if("open")
|
||||
return (!density)
|
||||
@@ -92,7 +92,7 @@ obj/machinery/door/airlock/proc/command_completed(var/command)
|
||||
|
||||
return 1 //Unknown command. Just assume it's completed.
|
||||
|
||||
obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
|
||||
/obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
|
||||
if(radio_connection)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = TRANSMISSION_RADIO //radio signal
|
||||
@@ -108,17 +108,17 @@ obj/machinery/door/airlock/proc/send_status(var/bumped = 0)
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, radio_filter = RADIO_AIRLOCK)
|
||||
|
||||
|
||||
obj/machinery/door/airlock/open(surpress_send)
|
||||
/obj/machinery/door/airlock/open(surpress_send)
|
||||
. = ..()
|
||||
if(!surpress_send) send_status()
|
||||
|
||||
|
||||
obj/machinery/door/airlock/close(surpress_send)
|
||||
/obj/machinery/door/airlock/close(surpress_send)
|
||||
. = ..()
|
||||
if(!surpress_send) send_status()
|
||||
|
||||
|
||||
obj/machinery/door/airlock/Bumped(atom/AM)
|
||||
/obj/machinery/door/airlock/Bumped(atom/AM)
|
||||
..(AM)
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
@@ -126,26 +126,26 @@ obj/machinery/door/airlock/Bumped(atom/AM)
|
||||
send_status(1)
|
||||
return
|
||||
|
||||
obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
if(new_frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
|
||||
|
||||
obj/machinery/door/airlock/Initialize()
|
||||
/obj/machinery/door/airlock/Initialize()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
update_icon()
|
||||
|
||||
obj/machinery/door/airlock/Destroy()
|
||||
/obj/machinery/door/airlock/Destroy()
|
||||
if(frequency && radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
return ..()
|
||||
|
||||
obj/machinery/airlock_sensor
|
||||
/obj/machinery/airlock_sensor
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
icon_state = "airlock_sensor_off"
|
||||
layer = ABOVE_WINDOW_LAYER
|
||||
@@ -166,7 +166,7 @@ obj/machinery/airlock_sensor
|
||||
var/alert = 0
|
||||
var/previousPressure
|
||||
|
||||
obj/machinery/airlock_sensor/update_icon()
|
||||
/obj/machinery/airlock_sensor/update_icon()
|
||||
if(on)
|
||||
if(alert)
|
||||
icon_state = "airlock_sensor_alert"
|
||||
@@ -175,7 +175,7 @@ obj/machinery/airlock_sensor/update_icon()
|
||||
else
|
||||
icon_state = "airlock_sensor_off"
|
||||
|
||||
obj/machinery/airlock_sensor/attack_hand(mob/user)
|
||||
/obj/machinery/airlock_sensor/attack_hand(mob/user)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = TRANSMISSION_RADIO //radio signal
|
||||
signal.data["tag"] = master_tag
|
||||
@@ -184,7 +184,7 @@ obj/machinery/airlock_sensor/attack_hand(mob/user)
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, radio_filter = RADIO_AIRLOCK)
|
||||
flick("airlock_sensor_cycle", src)
|
||||
|
||||
obj/machinery/airlock_sensor/process()
|
||||
/obj/machinery/airlock_sensor/process()
|
||||
if(on)
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
var/pressure = round(air_sample.return_pressure(),0.1)
|
||||
@@ -204,34 +204,34 @@ obj/machinery/airlock_sensor/process()
|
||||
|
||||
update_icon()
|
||||
|
||||
obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
|
||||
obj/machinery/airlock_sensor/Initialize()
|
||||
/obj/machinery/airlock_sensor/Initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/airlock_sensor/Destroy()
|
||||
/obj/machinery/airlock_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
return ..()
|
||||
|
||||
obj/machinery/airlock_sensor/airlock_interior
|
||||
/obj/machinery/airlock_sensor/airlock_interior
|
||||
command = "cycle_interior"
|
||||
|
||||
obj/machinery/airlock_sensor/airlock_exterior
|
||||
/obj/machinery/airlock_sensor/airlock_exterior
|
||||
command = "cycle_exterior"
|
||||
|
||||
// Return the air from the turf in "front" of us (Used in shuttles, so it can be in the shuttle area but sense outside it)
|
||||
obj/machinery/airlock_sensor/airlock_exterior/shuttle/return_air()
|
||||
/obj/machinery/airlock_sensor/airlock_exterior/shuttle/return_air()
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(isnull(T))
|
||||
return ..()
|
||||
return T.return_air()
|
||||
|
||||
obj/machinery/access_button
|
||||
/obj/machinery/access_button
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
icon_state = "access_button_standby"
|
||||
layer = ABOVE_WINDOW_LAYER
|
||||
@@ -249,20 +249,20 @@ obj/machinery/access_button
|
||||
var/on = 1
|
||||
|
||||
|
||||
obj/machinery/access_button/update_icon()
|
||||
/obj/machinery/access_button/update_icon()
|
||||
if(on)
|
||||
icon_state = "access_button_standby"
|
||||
else
|
||||
icon_state = "access_button_off"
|
||||
|
||||
obj/machinery/access_button/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/machinery/access_button/attackby(obj/item/I as obj, mob/user as mob)
|
||||
//Swiping ID on the access button
|
||||
if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))
|
||||
attack_hand(user)
|
||||
return
|
||||
..()
|
||||
|
||||
obj/machinery/access_button/attack_hand(mob/user)
|
||||
/obj/machinery/access_button/attack_hand(mob/user)
|
||||
add_fingerprint(usr)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
@@ -277,25 +277,25 @@ obj/machinery/access_button/attack_hand(mob/user)
|
||||
flick("access_button_cycle", src)
|
||||
|
||||
|
||||
obj/machinery/access_button/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/access_button/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
|
||||
|
||||
obj/machinery/access_button/Initialize()
|
||||
/obj/machinery/access_button/Initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/access_button/Destroy()
|
||||
/obj/machinery/access_button/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
obj/machinery/access_button/airlock_interior
|
||||
/obj/machinery/access_button/airlock_interior
|
||||
frequency = 1379
|
||||
command = "cycle_interior"
|
||||
|
||||
obj/machinery/access_button/airlock_exterior
|
||||
/obj/machinery/access_button/airlock_exterior
|
||||
frequency = 1379
|
||||
command = "cycle_exterior"
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
|
||||
// SUBTYPE: Regular
|
||||
// Your classical blast door, found almost everywhere.
|
||||
obj/machinery/door/blast/regular
|
||||
/obj/machinery/door/blast/regular
|
||||
icon_state_open = "pdoor0"
|
||||
icon_state_opening = "pdoorc0"
|
||||
icon_state_closed = "pdoor1"
|
||||
@@ -314,7 +314,7 @@ obj/machinery/door/blast/regular
|
||||
icon_state = "pdoor1"
|
||||
maxhealth = 600
|
||||
|
||||
obj/machinery/door/blast/regular/open
|
||||
/obj/machinery/door/blast/regular/open
|
||||
icon_state = "pdoor0"
|
||||
density = 0
|
||||
opacity = 0
|
||||
@@ -331,7 +331,7 @@ obj/machinery/door/blast/regular/open
|
||||
|
||||
// SUBTYPE: Transparent
|
||||
// Not technically a blast door but operates like one. Allows air and light.
|
||||
obj/machinery/door/blast/gate
|
||||
/obj/machinery/door/blast/gate
|
||||
name = "thick gate"
|
||||
icon_state_open = "tshutter0"
|
||||
icon_state_opening = "tshutterc0"
|
||||
@@ -344,7 +344,7 @@ obj/machinery/door/blast/gate
|
||||
opacity = 0
|
||||
istransparent = 1
|
||||
|
||||
obj/machinery/door/blast/gate/open
|
||||
/obj/machinery/door/blast/gate/open
|
||||
icon_state = "tshutter0"
|
||||
density = 0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
obj/structure/firedoor_assembly
|
||||
/obj/structure/firedoor_assembly
|
||||
name = "\improper emergency shutter assembly"
|
||||
desc = "It can save lives."
|
||||
icon = 'icons/obj/doors/DoorHazard.dmi'
|
||||
@@ -9,7 +9,7 @@ obj/structure/firedoor_assembly
|
||||
var/wired = 0
|
||||
var/glass = FALSE
|
||||
|
||||
obj/structure/firedoor_assembly/update_icon()
|
||||
/obj/structure/firedoor_assembly/update_icon()
|
||||
if(glass)
|
||||
icon = 'icons/obj/doors/DoorHazardGlass.dmi'
|
||||
else
|
||||
@@ -19,7 +19,7 @@ obj/structure/firedoor_assembly/update_icon()
|
||||
else
|
||||
icon_state = "door_construction"
|
||||
|
||||
obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
|
||||
/obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
|
||||
if(istype(C, /obj/item/stack/cable_coil) && !wired && anchored)
|
||||
var/obj/item/stack/cable_coil/cable = C
|
||||
if (cable.get_amount() < 1)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/obj/machinery/embedded_controller/radio/airlock
|
||||
// Setup parameters only
|
||||
radio_filter = RADIO_AIRLOCK
|
||||
program = /datum/computer/file/embedded_program/airlock
|
||||
program = /datum/embedded_program/airlock
|
||||
var/tag_exterior_door
|
||||
var/tag_interior_door
|
||||
var/tag_airpump
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/*
|
||||
* NOTE - This file defines both these datums: Yes, you read that right. Its confusing. Lets try and break it down.
|
||||
* /datum/computer/file/embedded_program/docking/airlock
|
||||
* /datum/embedded_program/docking/airlock
|
||||
* - A docking controller for an airlock based docking port
|
||||
* /datum/computer/file/embedded_program/airlock/docking
|
||||
* /datum/embedded_program/airlock/docking
|
||||
* - An extension to the normal airlock program allows disabling of the regular airlock functions when docking
|
||||
*/
|
||||
|
||||
//a docking port based on an airlock
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port
|
||||
name = "docking port controller"
|
||||
var/datum/computer/file/embedded_program/airlock/docking/airlock_program
|
||||
var/datum/computer/file/embedded_program/docking/airlock/docking_program
|
||||
var/datum/embedded_program/airlock/docking/airlock_program
|
||||
var/datum/embedded_program/docking/airlock/docking_program
|
||||
var/display_name // For mappers to override docking_program.display_name (how would it show up on docking monitoring program)
|
||||
tag_secure = 1
|
||||
valid_actions = list("cycle_ext", "cycle_int", "force_ext", "force_int", "abort", "toggle_override")
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port/Initialize()
|
||||
. = ..()
|
||||
airlock_program = new/datum/computer/file/embedded_program/airlock/docking(src)
|
||||
docking_program = new/datum/computer/file/embedded_program/docking/airlock(src, airlock_program)
|
||||
airlock_program = new/datum/embedded_program/airlock/docking(src)
|
||||
docking_program = new/datum/embedded_program/docking/airlock(src, airlock_program)
|
||||
program = docking_program
|
||||
if(display_name)
|
||||
docking_program.display_name = display_name
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/device/multitool)) //give them part of code, would take few tries to get full
|
||||
var/datum/computer/file/embedded_program/docking/airlock/docking_program = program
|
||||
var/datum/embedded_program/docking/airlock/docking_program = program
|
||||
var/code = docking_program.docking_codes
|
||||
if(!code)
|
||||
code = "N/A"
|
||||
@@ -36,8 +36,8 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port/tgui_data(mob/user)
|
||||
var/datum/computer/file/embedded_program/docking/airlock/docking_program = program
|
||||
var/datum/computer/file/embedded_program/airlock/docking/airlock_program = docking_program.airlock_program
|
||||
var/datum/embedded_program/docking/airlock/docking_program = program
|
||||
var/datum/embedded_program/airlock/docking/airlock_program = docking_program.airlock_program
|
||||
|
||||
. = list(
|
||||
"chamber_pressure" = round(airlock_program.memory["chamber_sensor_pressure"]),
|
||||
@@ -55,15 +55,15 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//A docking controller for an airlock based docking port
|
||||
//
|
||||
/datum/computer/file/embedded_program/docking/airlock
|
||||
var/datum/computer/file/embedded_program/airlock/docking/airlock_program
|
||||
/datum/embedded_program/docking/airlock
|
||||
var/datum/embedded_program/airlock/docking/airlock_program
|
||||
|
||||
/datum/computer/file/embedded_program/docking/airlock/New(var/obj/machinery/embedded_controller/M, var/datum/computer/file/embedded_program/airlock/docking/A)
|
||||
/datum/embedded_program/docking/airlock/New(var/obj/machinery/embedded_controller/M, var/datum/embedded_program/airlock/docking/A)
|
||||
..(M)
|
||||
airlock_program = A
|
||||
airlock_program.master_prog = src
|
||||
|
||||
/datum/computer/file/embedded_program/docking/airlock/receive_user_command(command)
|
||||
/datum/embedded_program/docking/airlock/receive_user_command(command)
|
||||
if (command == "toggle_override")
|
||||
if (override_enabled)
|
||||
disable_override()
|
||||
@@ -74,35 +74,35 @@
|
||||
. = ..(command)
|
||||
. = airlock_program.receive_user_command(command) || . //pass along to subprograms; bypass shortcircuit
|
||||
|
||||
/datum/computer/file/embedded_program/docking/airlock/process()
|
||||
/datum/embedded_program/docking/airlock/process()
|
||||
airlock_program.process()
|
||||
..()
|
||||
|
||||
/datum/computer/file/embedded_program/docking/airlock/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
/datum/embedded_program/docking/airlock/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
airlock_program.receive_signal(signal, receive_method, receive_param) //pass along to subprograms
|
||||
..(signal, receive_method, receive_param)
|
||||
|
||||
//tell the docking port to start getting ready for docking - e.g. pressurize
|
||||
/datum/computer/file/embedded_program/docking/airlock/prepare_for_docking()
|
||||
/datum/embedded_program/docking/airlock/prepare_for_docking()
|
||||
airlock_program.begin_dock_cycle()
|
||||
|
||||
//are we ready for docking?
|
||||
/datum/computer/file/embedded_program/docking/airlock/ready_for_docking()
|
||||
/datum/embedded_program/docking/airlock/ready_for_docking()
|
||||
return airlock_program.done_cycling()
|
||||
|
||||
//we are docked, open the doors or whatever.
|
||||
/datum/computer/file/embedded_program/docking/airlock/finish_docking()
|
||||
/datum/embedded_program/docking/airlock/finish_docking()
|
||||
airlock_program.enable_mech_regulation()
|
||||
airlock_program.open_doors()
|
||||
|
||||
//tell the docking port to start getting ready for undocking - e.g. close those doors.
|
||||
/datum/computer/file/embedded_program/docking/airlock/prepare_for_undocking()
|
||||
/datum/embedded_program/docking/airlock/prepare_for_undocking()
|
||||
airlock_program.stop_cycling()
|
||||
airlock_program.close_doors()
|
||||
airlock_program.disable_mech_regulation()
|
||||
|
||||
//are we ready for undocking?
|
||||
/datum/computer/file/embedded_program/docking/airlock/ready_for_undocking()
|
||||
/datum/embedded_program/docking/airlock/ready_for_undocking()
|
||||
var/ext_closed = airlock_program.check_exterior_door_secured()
|
||||
var/int_closed = airlock_program.check_interior_door_secured()
|
||||
return (ext_closed || int_closed)
|
||||
@@ -111,37 +111,37 @@
|
||||
//An airlock controller to be used by the airlock-based docking port controller.
|
||||
//Same as a regular airlock controller but allows disabling of the regular airlock functions when docking
|
||||
//
|
||||
/datum/computer/file/embedded_program/airlock/docking
|
||||
var/datum/computer/file/embedded_program/docking/airlock/master_prog
|
||||
/datum/embedded_program/airlock/docking
|
||||
var/datum/embedded_program/docking/airlock/master_prog
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/docking/Destroy()
|
||||
/datum/embedded_program/airlock/docking/Destroy()
|
||||
if(master_prog)
|
||||
master_prog.airlock_program = null
|
||||
master_prog = null
|
||||
return ..()
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/docking/receive_user_command(command)
|
||||
/datum/embedded_program/airlock/docking/receive_user_command(command)
|
||||
if (master_prog.undocked() || master_prog.override_enabled) //only allow the port to be used as an airlock if nothing is docked here or the override is enabled
|
||||
return ..(command)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/docking/proc/open_doors()
|
||||
/datum/embedded_program/airlock/docking/proc/open_doors()
|
||||
toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "open")
|
||||
toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "open")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/docking/cycleDoors(var/target)
|
||||
/datum/embedded_program/airlock/docking/cycleDoors(var/target)
|
||||
if (master_prog.undocked() || master_prog.override_enabled) //only allow the port to be used as an airlock if nothing is docked here or the override is enabled
|
||||
..(target)
|
||||
|
||||
/*** DEBUG VERBS ***
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/print_state()
|
||||
/datum/embedded_program/docking/proc/print_state()
|
||||
to_world("id_tag: [id_tag]")
|
||||
to_world("dock_state: [dock_state]")
|
||||
to_world("control_mode: [control_mode]")
|
||||
to_world("tag_target: [tag_target]")
|
||||
to_world("response_sent: [response_sent]")
|
||||
|
||||
/datum/computer/file/embedded_program/docking/post_signal(datum/signal/signal, comm_line)
|
||||
/datum/embedded_program/docking/post_signal(datum/signal/signal, comm_line)
|
||||
to_world("Program [id_tag] sent a message!")
|
||||
print_state()
|
||||
to_world("[id_tag] sent command \"[signal.data["command"]]\" to \"[signal.data["recipient"]]\"")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//this is the master controller, that things will try to dock with.
|
||||
/obj/machinery/embedded_controller/radio/docking_port_multi
|
||||
name = "docking port controller"
|
||||
program = /datum/computer/file/embedded_program/docking/multi
|
||||
program = /datum/embedded_program/docking/multi
|
||||
var/child_tags_txt
|
||||
var/child_names_txt
|
||||
var/list/child_names = list()
|
||||
@@ -16,7 +16,7 @@
|
||||
child_names[tags[i]] = names[i]
|
||||
|
||||
/obj/machinery/embedded_controller/radio/docking_port_multi/tgui_data(mob/user)
|
||||
var/datum/computer/file/embedded_program/docking/multi/docking_program = program // Cast to proper type
|
||||
var/datum/embedded_program/docking/multi/docking_program = program // Cast to proper type
|
||||
|
||||
var/list/airlocks[child_names.len]
|
||||
var/i = 1
|
||||
@@ -36,14 +36,14 @@
|
||||
// This is the actual controller that will be commanded by the master defined above
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port_multi
|
||||
name = "docking port controller"
|
||||
program = /datum/computer/file/embedded_program/airlock/multi_docking
|
||||
program = /datum/embedded_program/airlock/multi_docking
|
||||
var/master_tag //for mapping
|
||||
tag_secure = 1
|
||||
valid_actions = list("cycle_ext", "cycle_int", "force_ext", "force_int", "abort", "toggle_override")
|
||||
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/tgui_data(mob/user)
|
||||
var/datum/computer/file/embedded_program/airlock/multi_docking/airlock_program = program // Cast to proper type
|
||||
var/datum/embedded_program/airlock/multi_docking/airlock_program = program // Cast to proper type
|
||||
|
||||
. = list(
|
||||
"chamber_pressure" = round(airlock_program.memory["chamber_sensor_pressure"]),
|
||||
@@ -58,14 +58,14 @@
|
||||
|
||||
/*** DEBUG VERBS ***
|
||||
|
||||
/datum/computer/file/embedded_program/docking/multi/proc/print_state()
|
||||
/datum/embedded_program/docking/multi/proc/print_state()
|
||||
to_world("id_tag: [id_tag]")
|
||||
to_world("dock_state: [dock_state]")
|
||||
to_world("control_mode: [control_mode]")
|
||||
to_world("tag_target: [tag_target]")
|
||||
to_world("response_sent: [response_sent]")
|
||||
|
||||
/datum/computer/file/embedded_program/docking/multi/post_signal(datum/signal/signal, comm_line)
|
||||
/datum/embedded_program/docking/multi/post_signal(datum/signal/signal, comm_line)
|
||||
to_world("Program [id_tag] sent a message!")
|
||||
print_state()
|
||||
to_world("[id_tag] sent command \"[signal.data["command"]]\" to \"[signal.data["recipient"]]\"")
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
//Handles the control of airlocks
|
||||
|
||||
#define STATE_IDLE 0
|
||||
#define STATE_PREPARE 1
|
||||
#define STATE_DEPRESSURIZE 2
|
||||
@@ -12,7 +11,7 @@
|
||||
#define MIN_TARGET_PRESSURE (ONE_ATMOSPHERE * 0.05) // Never try to pump to pure vacuum, its not happening.
|
||||
#define SKIPCYCLE_MARGIN 1 // Skip cycling airlock (just open the doors) if pressures are within this range.
|
||||
|
||||
/datum/computer/file/embedded_program/airlock
|
||||
/datum/embedded_program/airlock
|
||||
var/tag_exterior_door
|
||||
var/tag_interior_door
|
||||
var/tag_airpump
|
||||
@@ -29,7 +28,7 @@
|
||||
var/tag_pump_out_external
|
||||
var/tag_pump_out_internal
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/New(var/obj/machinery/embedded_controller/M)
|
||||
/datum/embedded_program/airlock/New(var/obj/machinery/embedded_controller/M)
|
||||
..(M)
|
||||
|
||||
memory["chamber_sensor_pressure"] = ONE_ATMOSPHERE
|
||||
@@ -62,7 +61,7 @@
|
||||
signalDoor(tag_exterior_door, "update") //signals connected doors to update their status
|
||||
signalDoor(tag_interior_door, "update")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
/datum/embedded_program/airlock/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
var/receive_tag = signal.data["tag"]
|
||||
if(!receive_tag) return
|
||||
|
||||
@@ -115,7 +114,7 @@
|
||||
receive_user_command("cycle_int")
|
||||
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/receive_user_command(command)
|
||||
/datum/embedded_program/airlock/receive_user_command(command)
|
||||
var/shutdown_pump = 0
|
||||
. = TRUE
|
||||
switch(command)
|
||||
@@ -175,7 +174,7 @@
|
||||
|
||||
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/process()
|
||||
/datum/embedded_program/airlock/process()
|
||||
if(!state) //Idle
|
||||
if(target_state)
|
||||
switch(target_state)
|
||||
@@ -278,49 +277,49 @@
|
||||
|
||||
//these are here so that other types don't have to make so many assuptions about our implementation
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/begin_cycle_in()
|
||||
/datum/embedded_program/airlock/proc/begin_cycle_in()
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_INOPEN
|
||||
memory["purge"] = cycle_to_external_air
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/begin_dock_cycle()
|
||||
/datum/embedded_program/airlock/proc/begin_dock_cycle()
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_INOPEN
|
||||
/datum/computer/file/embedded_program/airlock/proc/begin_cycle_out()
|
||||
/datum/embedded_program/airlock/proc/begin_cycle_out()
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_OUTOPEN
|
||||
memory["purge"] = cycle_to_external_air
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/close_doors()
|
||||
/datum/embedded_program/airlock/proc/close_doors()
|
||||
toggleDoor(memory["interior_status"], tag_interior_door, 1, "close")
|
||||
toggleDoor(memory["exterior_status"], tag_exterior_door, 1, "close")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/stop_cycling()
|
||||
/datum/embedded_program/airlock/proc/stop_cycling()
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_NONE
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/done_cycling()
|
||||
/datum/embedded_program/airlock/proc/done_cycling()
|
||||
return (state == STATE_IDLE && target_state == TARGET_NONE)
|
||||
|
||||
//are the doors closed and locked?
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_exterior_door_secured()
|
||||
/datum/embedded_program/airlock/proc/check_exterior_door_secured()
|
||||
return (memory["exterior_status"]["state"] == "closed" && memory["exterior_status"]["lock"] == "locked")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_interior_door_secured()
|
||||
/datum/embedded_program/airlock/proc/check_interior_door_secured()
|
||||
return (memory["interior_status"]["state"] == "closed" && memory["interior_status"]["lock"] == "locked")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_doors_secured()
|
||||
/datum/embedded_program/airlock/proc/check_doors_secured()
|
||||
var/ext_closed = check_exterior_door_secured()
|
||||
var/int_closed = check_interior_door_secured()
|
||||
return (ext_closed && int_closed)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/signalDoor(var/tag, var/command)
|
||||
/datum/embedded_program/airlock/proc/signalDoor(var/tag, var/command)
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = tag
|
||||
signal.data["command"] = command
|
||||
post_signal(signal, RADIO_AIRLOCK)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/signalPump(var/tag, var/power, var/direction, var/pressure)
|
||||
/datum/embedded_program/airlock/proc/signalPump(var/tag, var/power, var/direction, var/pressure)
|
||||
var/datum/signal/signal = new
|
||||
signal.data = list(
|
||||
"tag" = tag,
|
||||
@@ -332,7 +331,7 @@
|
||||
post_signal(signal)
|
||||
|
||||
//this is called to set the appropriate door state at the end of a cycling process, or for the exterior buttons
|
||||
/datum/computer/file/embedded_program/airlock/proc/cycleDoors(var/target)
|
||||
/datum/embedded_program/airlock/proc/cycleDoors(var/target)
|
||||
switch(target)
|
||||
if(TARGET_OUTOPEN)
|
||||
toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "close")
|
||||
@@ -348,17 +347,17 @@
|
||||
signalDoor(tag_exterior_door, command)
|
||||
signalDoor(tag_interior_door, command)
|
||||
|
||||
datum/computer/file/embedded_program/airlock/proc/signal_mech_sensor(var/command, var/sensor)
|
||||
/datum/embedded_program/airlock/proc/signal_mech_sensor(var/command, var/sensor)
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = sensor
|
||||
signal.data["command"] = command
|
||||
post_signal(signal)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/enable_mech_regulation()
|
||||
/datum/embedded_program/airlock/proc/enable_mech_regulation()
|
||||
signal_mech_sensor("enable", tag_shuttle_mech_sensor)
|
||||
signal_mech_sensor("enable", tag_airlock_mech_sensor)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/disable_mech_regulation()
|
||||
/datum/embedded_program/airlock/proc/disable_mech_regulation()
|
||||
signal_mech_sensor("disable", tag_shuttle_mech_sensor)
|
||||
signal_mech_sensor("disable", tag_airlock_mech_sensor)
|
||||
|
||||
@@ -374,7 +373,7 @@ Only sends a command if it is needed, i.e. if the door is
|
||||
already open, passing an open command to this proc will not
|
||||
send an additional command to open the door again.
|
||||
----------------------------------------------------------*/
|
||||
/datum/computer/file/embedded_program/airlock/proc/toggleDoor(var/list/doorStatus, var/doorTag, var/secure, var/command)
|
||||
/datum/embedded_program/airlock/proc/toggleDoor(var/list/doorStatus, var/doorTag, var/secure, var/command)
|
||||
var/doorCommand = null
|
||||
|
||||
if(command == "toggle")
|
||||
@@ -416,8 +415,10 @@ send an additional command to open the door again.
|
||||
signalDoor(doorTag, doorCommand)
|
||||
|
||||
#undef SKIPCYCLE_MARGIN
|
||||
#undef MIN_TARGET_PRESSURE
|
||||
|
||||
#undef STATE_IDLE
|
||||
#undef STATE_PREPARE
|
||||
#undef STATE_DEPRESSURIZE
|
||||
#undef STATE_PRESSURIZE
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
*/
|
||||
|
||||
|
||||
/datum/computer/file/embedded_program/docking
|
||||
/datum/embedded_program/docking
|
||||
var/tag_target //the tag of the docking controller that we are trying to dock with
|
||||
var/dock_state = STATE_UNDOCKED
|
||||
var/control_mode = MODE_NONE
|
||||
@@ -73,18 +73,18 @@
|
||||
var/docking_codes //would only allow docking when receiving signal with these, if set
|
||||
var/display_name //Override the name shown on docking monitoring program; defaults to area name + coordinates if unset
|
||||
|
||||
/datum/computer/file/embedded_program/docking/New()
|
||||
/datum/embedded_program/docking/New()
|
||||
..()
|
||||
if(id_tag)
|
||||
if(SSshuttles.docking_registry[id_tag])
|
||||
crash_with("Docking controller tag [id_tag] had multiple associated programs.")
|
||||
SSshuttles.docking_registry[id_tag] = src
|
||||
|
||||
/datum/computer/file/embedded_program/docking/Destroy()
|
||||
/datum/embedded_program/docking/Destroy()
|
||||
SSshuttles.docking_registry -= id_tag
|
||||
return ..()
|
||||
|
||||
/datum/computer/file/embedded_program/docking/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
/datum/embedded_program/docking/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
var/receive_tag = signal.data["tag"] //for docking signals, this is the sender id
|
||||
var/command = signal.data["command"]
|
||||
var/recipient = signal.data["recipient"] //the intended recipient of the docking signal
|
||||
@@ -149,7 +149,7 @@
|
||||
if (receive_tag == tag_target)
|
||||
reset()
|
||||
|
||||
/datum/computer/file/embedded_program/docking/process()
|
||||
/datum/embedded_program/docking/process()
|
||||
switch(dock_state)
|
||||
if (STATE_DOCKING) //waiting for our docking port to be ready for docking
|
||||
if (ready_for_docking())
|
||||
@@ -198,7 +198,7 @@
|
||||
control_mode = MODE_NONE
|
||||
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/initiate_docking(var/target)
|
||||
/datum/embedded_program/docking/proc/initiate_docking(var/target)
|
||||
if (dock_state != STATE_UNDOCKED || control_mode == MODE_SERVER) //must be undocked and not serving another request to begin a new docking handshake
|
||||
return
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
|
||||
send_docking_command(tag_target, "request_dock")
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/initiate_undocking()
|
||||
/datum/embedded_program/docking/proc/initiate_undocking()
|
||||
if (dock_state != STATE_DOCKED || control_mode != MODE_CLIENT) //must be docked and must be client to start undocking
|
||||
return
|
||||
|
||||
@@ -220,36 +220,36 @@
|
||||
send_docking_command(tag_target, "request_undock")
|
||||
|
||||
//tell the docking port to start getting ready for docking - e.g. pressurize
|
||||
/datum/computer/file/embedded_program/docking/proc/prepare_for_docking()
|
||||
/datum/embedded_program/docking/proc/prepare_for_docking()
|
||||
return
|
||||
|
||||
//are we ready for docking?
|
||||
/datum/computer/file/embedded_program/docking/proc/ready_for_docking()
|
||||
/datum/embedded_program/docking/proc/ready_for_docking()
|
||||
return 1
|
||||
|
||||
//we are docked, open the doors or whatever.
|
||||
/datum/computer/file/embedded_program/docking/proc/finish_docking()
|
||||
/datum/embedded_program/docking/proc/finish_docking()
|
||||
return
|
||||
|
||||
//tell the docking port to start getting ready for undocking - e.g. close those doors.
|
||||
/datum/computer/file/embedded_program/docking/proc/prepare_for_undocking()
|
||||
/datum/embedded_program/docking/proc/prepare_for_undocking()
|
||||
return
|
||||
|
||||
//we are docked, open the doors or whatever.
|
||||
/datum/computer/file/embedded_program/docking/proc/finish_undocking()
|
||||
/datum/embedded_program/docking/proc/finish_undocking()
|
||||
return
|
||||
|
||||
//are we ready for undocking?
|
||||
/datum/computer/file/embedded_program/docking/proc/ready_for_undocking()
|
||||
/datum/embedded_program/docking/proc/ready_for_undocking()
|
||||
return 1
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/enable_override()
|
||||
/datum/embedded_program/docking/proc/enable_override()
|
||||
override_enabled = 1
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/disable_override()
|
||||
/datum/embedded_program/docking/proc/disable_override()
|
||||
override_enabled = 0
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/reset()
|
||||
/datum/embedded_program/docking/proc/reset()
|
||||
dock_state = STATE_UNDOCKED
|
||||
broadcast_docking_status()
|
||||
|
||||
@@ -258,23 +258,23 @@
|
||||
response_sent = 0
|
||||
received_confirm = 0
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/force_undock()
|
||||
/datum/embedded_program/docking/proc/force_undock()
|
||||
//to_world("[id_tag]: forcing undock")
|
||||
if (tag_target)
|
||||
send_docking_command(tag_target, "dock_error")
|
||||
reset()
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/docked()
|
||||
/datum/embedded_program/docking/proc/docked()
|
||||
return (dock_state == STATE_DOCKED)
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/undocked()
|
||||
/datum/embedded_program/docking/proc/undocked()
|
||||
return (dock_state == STATE_UNDOCKED)
|
||||
|
||||
//returns 1 if we are saftely undocked (and the shuttle can leave)
|
||||
/datum/computer/file/embedded_program/docking/proc/can_launch()
|
||||
/datum/embedded_program/docking/proc/can_launch()
|
||||
return undocked()
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/send_docking_command(var/recipient, var/command)
|
||||
/datum/embedded_program/docking/proc/send_docking_command(var/recipient, var/command)
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = id_tag
|
||||
signal.data["command"] = command
|
||||
@@ -282,21 +282,21 @@
|
||||
signal.data["code"] = docking_codes
|
||||
post_signal(signal)
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/broadcast_docking_status()
|
||||
/datum/embedded_program/docking/proc/broadcast_docking_status()
|
||||
var/datum/signal/signal = new
|
||||
signal.data["tag"] = id_tag
|
||||
signal.data["dock_status"] = get_docking_status()
|
||||
post_signal(signal)
|
||||
|
||||
//this is mostly for NanoUI
|
||||
/datum/computer/file/embedded_program/docking/proc/get_docking_status()
|
||||
/datum/embedded_program/docking/proc/get_docking_status()
|
||||
switch (dock_state)
|
||||
if (STATE_UNDOCKED) return "undocked"
|
||||
if (STATE_DOCKING) return "docking"
|
||||
if (STATE_UNDOCKING) return "undocking"
|
||||
if (STATE_DOCKED) return "docked"
|
||||
|
||||
/datum/computer/file/embedded_program/docking/proc/get_name()
|
||||
/datum/embedded_program/docking/proc/get_name()
|
||||
return display_name ? display_name : "[get_area(master)] ([master.x], [master.y])"
|
||||
|
||||
#undef STATE_UNDOCKED
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user