Merge remote-tracking branch 'upstream/master' into kk-misc3

This commit is contained in:
Killian
2020-11-25 18:31:10 +00:00
657 changed files with 177447 additions and 64796 deletions
+2 -2
View File
@@ -60,8 +60,8 @@ Then in our `handle_grabs_vr()` proc, if we want to avoid performing the stock g
### Pull Requests
* Your submission must pass Travis CI checking. The checks are important, prevent many common mistakes, and even experienced coders get caught by it sometimes. If you think there is a bug in Travis, open an issue. (One known Travis issue is comments in the middle of multi-line lists, just don't do it)
* Your PR should not have an excessive number of commits unless it is a large project or includes many separate remote commits (such as a pull from Polaris). If you need to keep tweaking your PR to pass Travis or to satisfy a maintainer's requests and are making many commits, you should squash them in the end and update your PR accordingly so these commits don't clog up the history.
* Your submission must pass CI checking. The checks are important, prevent many common mistakes, and even experienced coders get caught by it sometimes. If you think there is a bug in CI, open an issue. (One known CI issue is comments in the middle of multi-line lists, just don't do it)
* Your PR should not have an excessive number of commits unless it is a large project or includes many separate remote commits (such as a pull from Polaris). If you need to keep tweaking your PR to pass CI or to satisfy a maintainer's requests and are making many commits, you should squash them in the end and update your PR accordingly so these commits don't clog up the history.
* You can create a WIP PR, and if so, please mark it with [WIP] in the title so it can be labeled appropriately. These can't sit forever, though.
* If your pull request has many no-conflict merge commits ('merge from master' into your PR branch), it cannot be merged. Squash and make a new PR/forcepush to your PR branch.
+69
View File
@@ -0,0 +1,69 @@
name: CI
on:
pull_request:
branches:
- master
env:
BASENAME: "vorestation"
jobs:
file_tests:
name: Run Linters
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Ensure +x on CI directory
run: |
chmod -R +x ./tools/ci
- name: Install Tools
run: |
bash tools/ci/install_build_deps.sh
- name: Run Tests
run: |
tools/ci/validate_files.sh
tools/ci/build_tgui.sh
unit_tests:
name: Integration Tests
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Ensure +x on CI directory
run: |
chmod -R +x ./tools/ci
- name: Setup Cache
uses: actions/cache@v2
with:
path: $HOME/BYOND
key: ${{ runner.os }}-byond
- name: Install RUST_G Dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install libc6:i386 libgcc1:i386 libstdc++6:i386 libssl1.0.0:i386 g++-7 g++-7-multilib gcc-multilib zlib1g:i386
ldd librust_g.so
- name: Unit Tests
run: |
tools/ci/install_byond.sh
tools/ci/compile_and_run.sh
env:
TEST_DEFINE: "UNIT_TEST"
TEST_FILE: "code/_unit_tests.dm"
RUN: "1"
- name: Compile POIs (no run)
run: |
tools/ci/install_byond.sh
tools/ci/compile_and_run.sh
env:
TEST_DEFINE: "MAP_TEST"
TEST_FILE: "code/_map_tests.dm"
RUN: "0"
- name: Compile away missions (no run)
run: |
tools/ci/install_byond.sh
tools/ci/compile_and_run.sh
env:
TEST_DEFINE: "AWAY_MISSION_TEST"
TEST_FILE: "code/_away_mission_tests.dm"
RUN: "0"
+40
View File
@@ -0,0 +1,40 @@
# GitHub action to autorender nanomaps outside the game
# This kills off the awful verb we have that takes a full 50 seconds and hangs the whole server
# The file names and locations are VERY important here
# DO NOT EDIT THIS UNLESS YOU KNOW WHAT YOU ARE DOING
# -aa
name: 'Render Nanomaps'
on:
push:
branches:
- master
paths:
- 'maps/**'
jobs:
generate_maps:
name: 'Generate NanoMaps'
runs-on: ubuntu-18.04
steps:
- name: 'Update Branch'
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Ensure +x on github-actions directory
run: |
chmod -R +x ./tools/github-actions
- name: 'Generate Maps'
run: './tools/github-actions/nanomap-renderer-invoker.sh'
- name: 'Commit Maps'
run: |
git config --local user.email "action@github.com"
git config --local user.name "NanoMap Generation"
git pull origin master
git commit -m "NanoMap Auto-Update (`date`)" -a || true
- name: 'Push Maps'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
-56
View File
@@ -1,56 +0,0 @@
#pretending we're C because otherwise ruby will initialize, even with "language: dm".
language: c
env:
global:
- BASENAME="vorestation" # $BASENAME.dmb, $BASENAME.dme, etc.
cache:
directories:
- $HOME/BYOND
addons:
apt:
packages:
- libc6-i386
- libgcc1:i386
- libstdc++6:i386
- libssl-dev:i386
before_install:
- chmod -R +x ./tools/travis
install:
- ./tools/travis/install_byond.sh
before_script:
- shopt -s globstar
script:
- ./tools/travis/compile_and_run.sh
# Build-specific settings
jobs:
include:
- stage: "File Tests" #This is the odd man out, with specific installs and stuff.
name: "Validate Files"
addons:
apt:
packages:
- python3
- python3-pip
- python3-setuptools
install: #Need python for some of the tag matching stuff
- tools/travis/install_build_deps.sh
script:
- tools/travis/validate_files.sh
- tools/travis/build_tgui.sh
- stage: "Unit Tests"
env: TEST_DEFINE="UNIT_TEST" TEST_FILE="code/_unit_tests.dm" RUN="1"
name: "Compile normally (unit tests)"
- stage: "Isolation Tests"
env: TEST_DEFINE="MAP_TEST" TEST_FILE="code/_map_tests.dm" RUN="0"
name: "Compile POIs (no run)"
- env: TEST_DEFINE="AWAY_MISSION_TEST" TEST_FILE="code/_away_mission_tests.dm" RUN="0"
name: "Compile away missions (no run)"
+2
View File
@@ -8,6 +8,8 @@ Going to make a Pull Request? Make sure you read the [CONTRIBUTING.md](.github/C
VOREStation is a fork of the Polaris code branch, itself a fork of the Baystation12 code branch, for the game Space Station 13.
![Render Nanomaps](https://github.com/VOREStation/VOREStation/workflows/Render%20Nanomaps/badge.svg)
---
### LICENSE
-2
View File
@@ -3,8 +3,6 @@
export SPACEMANDMM_TAG=suite-1.4
# For NanoUI + TGUI
export NODE_VERSION=12
# For the scripts in tools
export PHP_VERSION=5.6
# Byond Major
export BYOND_MAJOR=513
# Byond Minor
@@ -232,7 +232,7 @@
// 0 amount = 0 means ejecting a full stack; -1 means eject everything
/obj/machinery/atmospherics/binary/algae_farm/proc/eject_materials(var/material_name, var/amount)
var/recursive = amount == -1 ? 1 : 0
var/material/matdata = get_material_by_name(material_name)
var/datum/material/matdata = get_material_by_name(material_name)
var/stack_type = matdata.stack_type
var/obj/item/stack/material/S = new stack_type(loc)
if(amount <= 0)
@@ -266,7 +266,7 @@
to_chat(user, "<span class='warning'>\The [src] cannot hold more [S.name].</span>")
return 1
/material/algae
/datum/material/algae
name = MAT_ALGAE
stack_type = /obj/item/stack/material/algae
icon_colour = "#557722"
-4
View File
@@ -70,10 +70,6 @@
if(istype(W, /obj/item/device/pipe_painter))
return
if(istype(W, /obj/item/device/analyzer) && in_range(user, src))
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
/obj/machinery/atmospherics/pipe/tank/air
name = "Pressure Tank (Air)"
icon_state = "air_map"
-4
View File
@@ -7,10 +7,6 @@
2 for preloading absolutely everything;
*/
#define RUST_G "rust_g" // If uncommented, we will use the rust-g (https://github.com/tgstation/rust-g) native library for fast
// logging. This requires you to have the rust_g.dll or rust_g (renamed from librust_g.so) installed in the root folder or BYOND/bin
// The define's value should be the name of library file.
// ZAS Compile Options
//#define ZASDBG // Uncomment to turn on super detailed ZAS debugging that probably won't even compile.
#define MULTIZAS // Uncomment to turn on Multi-Z ZAS Support!
+41
View File
@@ -0,0 +1,41 @@
/// Return this from `/datum/component/Initialize` or `datum/component/OnTransfer` to have the component be deleted if it's applied to an incorrect type.
/// `parent` must not be modified if this is to be returned.
/// This will be noted in the runtime logs
#define COMPONENT_INCOMPATIBLE 1
/// Returned in PostTransfer to prevent transfer, similar to `COMPONENT_INCOMPATIBLE`
#define COMPONENT_NOTRANSFER 2
/// Return value to cancel attaching
#define ELEMENT_INCOMPATIBLE 1
// /datum/element flags
/// Causes the detach proc to be called when the host object is being deleted
#define ELEMENT_DETACH (1 << 0)
/**
* Only elements created with the same arguments given after `id_arg_index` share an element instance
* The arguments are the same when the text and number values are the same and all other values have the same ref
*/
#define ELEMENT_BESPOKE (1 << 1)
// How multiple components of the exact same type are handled in the same datum
/// old component is deleted (default)
#define COMPONENT_DUPE_HIGHLANDER 0
/// duplicates allowed
#define COMPONENT_DUPE_ALLOWED 1
/// new component is deleted
#define COMPONENT_DUPE_UNIQUE 2
/// old component is given the initialization args of the new
#define COMPONENT_DUPE_UNIQUE_PASSARGS 4
/// each component of the same type is consulted as to whether the duplicate should be allowed
#define COMPONENT_DUPE_SELECTIVE 5
//Redirection component init flags
#define REDIRECT_TRANSFER_WITH_TURF 1
//Arch
#define ARCH_PROB "probability" //Probability for each item
#define ARCH_MAXDROP "max_drop_amount" //each item's max drop amount
//Ouch my toes!
#define CALTROP_BYPASS_SHOES 1
#define CALTROP_IGNORE_WALKERS 2
+15
View File
@@ -0,0 +1,15 @@
/// Used to trigger signals and call procs registered for that signal
/// The datum hosting the signal is automaticaly added as the first argument
/// Returns a bitfield gathered from all registered procs
/// Arguments given here are packaged in a list and given to _SendSignal
#define SEND_SIGNAL(target, sigtype, arguments...) ( !target.comp_lookup || !target.comp_lookup[sigtype] ? NONE : target._SendSignal(sigtype, list(target, ##arguments)) )
#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) )
/// A wrapper for _AddElement that allows us to pretend we're using normal named arguments
#define AddElement(arguments...) _AddElement(list(##arguments))
/// A wrapper for _RemoveElement that allows us to pretend we're using normal named arguments
#define RemoveElement(arguments...) _RemoveElement(list(##arguments))
/// A wrapper for _AddComponent that allows us to pretend we're using normal named arguments
#define AddComponent(arguments...) _AddComponent(list(##arguments))
+732
View File
@@ -0,0 +1,732 @@
// All signals. Format:
// When the signal is called: (signal arguments)
// All signals send the source datum of the signal as the first argument
// global signals
// These are signals which can be listened to by any component on any parent
// start global signals with "!", this used to be necessary but now it's just a formatting choice
///from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args)
#define COMSIG_GLOB_NEW_Z "!new_z"
/// called after a successful var edit somewhere in the world: (list/args)
#define COMSIG_GLOB_VAR_EDIT "!var_edit"
/// called after an explosion happened : (epicenter, devastation_range, heavy_impact_range, light_impact_range, took, orig_dev_range, orig_heavy_range, orig_light_range)
#define COMSIG_GLOB_EXPLOSION "!explosion"
/// mob was created somewhere : (mob)
#define COMSIG_GLOB_MOB_CREATED "!mob_created"
/// mob died somewhere : (mob , gibbed)
#define COMSIG_GLOB_MOB_DEATH "!mob_death"
/// global living say plug - use sparingly: (mob/speaker , message)
#define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special"
/// called by datum/cinematic/play() : (datum/cinematic/new_cinematic)
#define COMSIG_GLOB_PLAY_CINEMATIC "!play_cinematic"
#define COMPONENT_GLOB_BLOCK_CINEMATIC (1<<0)
/// ingame button pressed (/obj/machinery/button/button)
#define COMSIG_GLOB_BUTTON_PRESSED "!button_pressed"
/// signals from globally accessible objects
///from SSsun when the sun changes position : (azimuth)
#define COMSIG_SUN_MOVED "sun_moved"
//////////////////////////////////////////////////////////////////
// /datum signals
/// when a component is added to a datum: (/datum/component)
#define COMSIG_COMPONENT_ADDED "component_added"
/// before a component is removed from a datum because of RemoveComponent: (/datum/component)
#define COMSIG_COMPONENT_REMOVING "component_removing"
/// before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted"
/// just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called
#define COMSIG_PARENT_QDELETING "parent_qdeleting"
/// generic topic handler (usr, href_list)
#define COMSIG_TOPIC "handle_topic"
/// fires on the target datum when an element is attached to it (/datum/element)
#define COMSIG_ELEMENT_ATTACH "element_attach"
/// fires on the target datum when an element is attached to it (/datum/element)
#define COMSIG_ELEMENT_DETACH "element_detach"
// /atom signals
///from base of atom/proc/Initialize(): sent any time a new atom is created
#define COMSIG_ATOM_CREATED "atom_created"
//from SSatoms InitAtom - Only if the atom was not deleted or failed initialization
#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE "atom_init_success"
///from base of atom/attackby(): (/obj/item, /mob/living, params)
#define COMSIG_PARENT_ATTACKBY "atom_attackby"
///Return this in response if you don't want afterattack to be called
#define COMPONENT_NO_AFTERATTACK (1<<0)
///from base of atom/attack_hulk(): (/mob/living/carbon/human)
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack"
///from base of atom/animal_attack(): (/mob/user)
#define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal"
///from base of atom/examine(): (/mob)
#define COMSIG_PARENT_EXAMINE "atom_examine"
///from base of atom/get_examine_name(): (/mob, list/overrides)
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name"
//Positions for overrides list
#define EXAMINE_POSITION_ARTICLE (1<<0)
#define EXAMINE_POSITION_BEFORE (1<<1)
//End positions
#define COMPONENT_EXNAME_CHANGED (1<<0)
///from base of atom/update_icon(): ()
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon"
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE (1<<0)
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS (1<<1)
///from base of atom/update_overlays(): (list/new_overlays)
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays"
///from base of atom/update_icon(): (signalOut, did_anything)
#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon"
///from base of atom/Entered(): (atom/movable/entering, /atom)
#define COMSIG_ATOM_ENTERED "atom_entered"
///from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
#define COMSIG_ATOM_EXIT "atom_exit"
#define COMPONENT_ATOM_BLOCK_EXIT (1<<0)
///from base of atom/Exited(): (atom/movable/exiting, atom/newloc)
#define COMSIG_ATOM_EXITED "atom_exited"
///from base of atom/Bumped(): (/atom/movable)
#define COMSIG_ATOM_BUMPED "atom_bumped"
///from base of atom/ex_act(): (severity, target)
#define COMSIG_ATOM_EX_ACT "atom_ex_act"
///from base of atom/emp_act(): (severity)
#define COMSIG_ATOM_EMP_ACT "atom_emp_act"
///from base of atom/fire_act(): (exposed_temperature, exposed_volume)
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act"
///from base of atom/bullet_act(): (/obj/projectile, def_zone)
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act"
///from base of atom/blob_act(): (/obj/structure/blob)
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act"
///from base of atom/acid_act(): (acidpwr, acid_volume)
#define COMSIG_ATOM_ACID_ACT "atom_acid_act"
///from base of atom/emag_act(): (/mob/user)
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act"
///from base of atom/rad_act(intensity)
#define COMSIG_ATOM_RAD_ACT "atom_rad_act"
///from base of atom/narsie_act(): ()
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act"
///from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act"
///from base of atom/singularity_pull(): (S, current_size)
#define COMSIG_ATOM_SING_PULL "atom_sing_pull"
///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)
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del"
///from base of atom/has_gravity(): (turf/location, list/forced_gravities)
#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity"
///from proc/get_rad_contents(): ()
#define COMSIG_ATOM_RAD_PROBE "atom_rad_probe"
#define COMPONENT_BLOCK_RADIATION (1<<0)
///from base of datum/radiation_wave/radiate(): (strength)
#define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam"
#define COMPONENT_BLOCK_CONTAMINATION (1<<0)
///from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width)
#define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass"
#define COMPONENT_RAD_WAVE_HANDLED (1<<0)
///from internal loop in atom/movable/proc/CanReach(): (list/next)
#define COMSIG_ATOM_CANREACH "atom_can_reach"
#define COMPONENT_BLOCK_REACH (1<<0)
///from base of atom/screwdriver_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act"
///from base of atom/wrench_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_WRENCH_ACT "atom_wrench_act"
///from base of atom/multitool_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_MULTITOOL_ACT "atom_multitool_act"
///from base of atom/welder_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_WELDER_ACT "atom_welder_act"
///from base of atom/wirecutter_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_WIRECUTTER_ACT "atom_wirecutter_act"
///from base of atom/crowbar_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_CROWBAR_ACT "atom_crowbar_act"
///from base of atom/analyser_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_ANALYSER_ACT "atom_analyser_act"
#define COMPONENT_BLOCK_TOOL_ATTACK (1<<0)
///called when teleporting into a protected turf: (channel, turf/origin)
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport"
#define COMPONENT_BLOCK_TELEPORT (1<<0)
///called when an atom is added to the hearers on get_hearers_in_view(): (list/processing_list, list/hearers)
#define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view"
///called when an atom starts orbiting another atom: (atom)
#define COMSIG_ATOM_ORBIT_BEGIN "atom_orbit_begin"
///called when an atom stops orbiting another atom: (atom)
#define COMSIG_ATOM_ORBIT_STOP "atom_orbit_stop"
/////////////////
///from base of atom/attack_ghost(): (mob/dead/observer/ghost)
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost"
///from base of atom/attack_hand(): (mob/user)
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand"
///from base of atom/attack_paw(): (mob/user)
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw"
#define COMPONENT_NO_ATTACK_HAND (1<<0) //works on all 3.
//This signal return value bitflags can be found in __DEFINES/misc.dm
///called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels)
#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact"
///called on a movable (NOT living) when someone starts pulling it (atom/movable/puller, state, force)
#define COMSIG_ATOM_START_PULL "movable_start_pull"
///called on /living when someone starts pulling it (atom/movable/puller, state, force)
#define COMSIG_LIVING_START_PULL "living_start_pull"
/////////////////
///from base of area/Entered(): (/area)
#define COMSIG_ENTER_AREA "enter_area"
///from base of area/Exited(): (/area)
#define COMSIG_EXIT_AREA "exit_area"
///from base of atom/Click(): (location, control, params, mob/user)
#define COMSIG_CLICK "atom_click"
///from base of atom/ShiftClick(): (/mob)
#define COMSIG_CLICK_SHIFT "shift_click"
#define COMPONENT_ALLOW_EXAMINATE (1<<0) //Allows the user to examinate regardless of client.eye.
///from base of atom/CtrlClickOn(): (/mob)
#define COMSIG_CLICK_CTRL "ctrl_click"
///from base of atom/AltClick(): (/mob)
#define COMSIG_CLICK_ALT "alt_click"
///from base of atom/CtrlShiftClick(/mob)
#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click"
///from base of atom/MouseDrop(): (/atom/over, /mob/user)
#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto"
#define COMPONENT_NO_MOUSEDROP (1<<0)
///from base of atom/MouseDrop_T: (/atom/from, /mob/user)
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto"
// /area signals
///from base of area/Entered(): (atom/movable/M)
#define COMSIG_AREA_ENTERED "area_entered"
///from base of area/Exited(): (atom/movable/M)
#define COMSIG_AREA_EXITED "area_exited"
// /turf signals
///from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps)
#define COMSIG_TURF_CHANGE "turf_change"
///from base of atom/has_gravity(): (atom/asker, list/forced_gravities)
#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity"
///from base of turf/New(): (turf/source, direction)
#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new"
// /atom/movable signals
///from base of atom/movable/Moved(): (/atom)
#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move"
#define COMPONENT_MOVABLE_BLOCK_PRE_MOVE (1<<0)
///from base of atom/movable/Moved(): (/atom, dir)
#define COMSIG_MOVABLE_MOVED "movable_moved"
///from base of atom/movable/Cross(): (/atom/movable)
#define COMSIG_MOVABLE_CROSS "movable_cross"
///from base of atom/movable/Crossed(): (/atom/movable)
#define COMSIG_MOVABLE_CROSSED "movable_crossed"
///when we cross over something (calling Crossed() on that atom)
#define COMSIG_CROSSED_MOVABLE "crossed_movable"
///from base of atom/movable/Uncross(): (/atom/movable)
#define COMSIG_MOVABLE_UNCROSS "movable_uncross"
#define COMPONENT_MOVABLE_BLOCK_UNCROSS (1<<0)
///from base of atom/movable/Uncrossed(): (/atom/movable)
#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed"
///from base of atom/movable/Bump(): (/atom)
#define COMSIG_MOVABLE_BUMP "movable_bump"
///from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum)
#define COMSIG_MOVABLE_IMPACT "movable_impact"
#define COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH (1<<0) //if true, flip if the impact will push what it hits
#define COMPONENT_MOVABLE_IMPACT_NEVERMIND (1<<1) //return true if you destroyed whatever it was you're impacting and there won't be anything for hitby() to run on
///from base of mob/living/hitby(): (mob/living/target, hit_zone)
#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone"
///from base of atom/movable/buckle_mob(): (mob, force)
#define COMSIG_MOVABLE_BUCKLE "buckle"
///from base of atom/movable/unbuckle_mob(): (mob, force)
#define COMSIG_MOVABLE_UNBUCKLE "unbuckle"
///from base of atom/movable/throw_at(): (list/args)
#define COMSIG_MOVABLE_PRE_THROW "movable_pre_throw"
#define COMPONENT_CANCEL_THROW (1<<0)
///from base of atom/movable/throw_at(): (datum/thrownthing, spin)
#define COMSIG_MOVABLE_POST_THROW "movable_post_throw"
///from base of atom/movable/onTransitZ(): (old_z, new_z)
#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit"
///called when the movable is placed in an unaccessible area, used for stationloving: ()
#define COMSIG_MOVABLE_SECLUDED_LOCATION "movable_secluded"
///from base of atom/movable/Hear(): (proc args list(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode))
#define COMSIG_MOVABLE_HEAR "movable_hear"
#define HEARING_MESSAGE 1
#define HEARING_SPEAKER 2
// #define HEARING_LANGUAGE 3
#define HEARING_RAW_MESSAGE 4
/* #define HEARING_RADIO_FREQ 5
#define HEARING_SPANS 6
#define HEARING_MESSAGE_MODE 7 */
///called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source)
#define COMSIG_MOVABLE_DISPOSING "movable_disposing"
// /mob signals
///from base of /mob/Login(): ()
#define COMSIG_MOB_LOGIN "mob_login"
///from base of /mob/Logout(): ()
#define COMSIG_MOB_LOGOUT "mob_logout"
///from base of mob/death(): (gibbed)
#define COMSIG_MOB_DEATH "mob_death"
///from base of mob/set_stat(): (new_stat)
#define COMSIG_MOB_STATCHANGE "mob_statchange"
///from base of mob/clickon(): (atom/A, params)
#define COMSIG_MOB_CLICKON "mob_clickon"
///from base of mob/MiddleClickOn(): (atom/A)
#define COMSIG_MOB_MIDDLECLICKON "mob_middleclickon"
///from base of mob/AltClickOn(): (atom/A)
#define COMSIG_MOB_ALTCLICKON "mob_altclickon"
#define COMSIG_MOB_CANCEL_CLICKON (1<<0)
///from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj
#define COMSIG_MOB_ALLOWED "mob_allowed"
///from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources)
#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic"
#define COMPONENT_BLOCK_MAGIC (1<<0)
///from base of mob/create_mob_hud(): ()
#define COMSIG_MOB_HUD_CREATED "mob_hud_created"
///from base of atom/attack_hand(): (mob/user)
#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand"
///from base of /obj/item/attack(): (mob/M, mob/user)
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack"
#define COMPONENT_ITEM_NO_ATTACK (1<<0)
///from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone)
#define COMSIG_MOB_APPLY_DAMGE "mob_apply_damage"
///from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters)
#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack"
///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, proxiumity_flag, click_parameters)
#define COMSIG_MOB_ITEM_ATTACK_QDELETED "mob_item_attack_qdeleted"
///from base of mob/RangedAttack(): (atom/A, params)
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged"
///from base of /mob/throw_item(): (atom/target)
#define COMSIG_MOB_THROW "mob_throw"
///from base of /mob/verb/examinate(): (atom/target)
#define COMSIG_MOB_EXAMINATE "mob_examinate"
///from base of /mob/update_sight(): ()
#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight"
////from /mob/living/say(): ()
#define COMSIG_MOB_SAY "mob_say"
#define COMPONENT_UPPERCASE_SPEECH (1<<0)
// used to access COMSIG_MOB_SAY argslist
#define SPEECH_MESSAGE 1
// #define SPEECH_BUBBLE_TYPE 2
#define SPEECH_SPANS 3
/* #define SPEECH_SANITIZE 4
#define SPEECH_LANGUAGE 5
#define SPEECH_IGNORE_SPAM 6
#define SPEECH_FORCED 7 */
///from /mob/say_dead(): (mob/speaker, message)
#define COMSIG_MOB_DEADSAY "mob_deadsay"
#define MOB_DEADSAY_SIGNAL_INTERCEPT (1<<0)
///from /mob/living/emote(): ()
#define COMSIG_MOB_EMOTE "mob_emote"
///from base of mob/swap_hand(): (obj/item)
#define COMSIG_MOB_SWAP_HANDS "mob_swap_hands"
#define COMPONENT_BLOCK_SWAP (1<<0)
// /mob/living signals
///from base of mob/living/resist() (/mob/living)
#define COMSIG_LIVING_RESIST "living_resist"
///from base of mob/living/IgniteMob() (/mob/living)
#define COMSIG_LIVING_IGNITED "living_ignite"
///from base of mob/living/ExtinguishMob() (/mob/living)
#define COMSIG_LIVING_EXTINGUISHED "living_extinguished"
///from base of mob/living/electrocute_act(): (shock_damage, source, siemens_coeff, flags)
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act"
///sent when items with siemen coeff. of 0 block a shock: (power_source, source, siemens_coeff, dist_check)
#define COMSIG_LIVING_SHOCK_PREVENTED "living_shock_prevented"
///sent by stuff like stunbatons and tasers: ()
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock"
///from base of mob/living/revive() (full_heal, admin_revive)
#define COMSIG_LIVING_REVIVE "living_revive"
///from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs)
#define COMSIG_LIVING_REGENERATE_LIMBS "living_regen_limbs"
///from base of /obj/item/bodypart/proc/attach_limb(): (new_limb, special) allows you to fail limb attachment
#define COMSIG_LIVING_ATTACH_LIMB "living_attach_limb"
#define COMPONENT_NO_ATTACH (1<<0)
///sent from borg recharge stations: (amount, repairs)
#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge"
///sent when a mob/login() finishes: (client)
#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login"
///sent from borg mobs to itself, for tools to catch an upcoming destroy() due to safe decon (rather than detonation)
#define COMSIG_BORG_SAFE_DECONSTRUCT "borg_safe_decon"
//ALL OF THESE DO NOT TAKE INTO ACCOUNT WHETHER AMOUNT IS 0 OR LOWER AND ARE SENT REGARDLESS!
///from base of mob/living/Stun() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_STUN "living_stun"
///from base of mob/living/Knockdown() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown"
///from base of mob/living/Paralyze() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_PARALYZE "living_paralyze"
///from base of mob/living/Immobilize() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize"
///from base of mob/living/Unconscious() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious"
///from base of mob/living/Sleeping() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping"
#define COMPONENT_NO_STUN (1<<0) //For all of them
///from base of /mob/living/can_track(): (mob/user)
#define COMSIG_LIVING_CAN_TRACK "mob_cantrack"
#define COMPONENT_CANT_TRACK (1<<0)
// /mob/living/carbon signals
///from base of mob/living/carbon/soundbang_act(): (list(intensity))
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang"
///from /item/organ/proc/Insert() (/obj/item/organ/)
#define COMSIG_CARBON_GAIN_ORGAN "carbon_gain_organ"
///from /item/organ/proc/Remove() (/obj/item/organ/)
#define COMSIG_CARBON_LOSE_ORGAN "carbon_lose_organ"
///from /mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop, silent)
#define COMSIG_CARBON_EQUIP_HAT "carbon_equip_hat"
///from /mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop, silent)
#define COMSIG_CARBON_UNEQUIP_HAT "carbon_unequip_hat"
///defined twice, in carbon and human's topics, fired when interacting with a valid embedded_object to pull it out (mob/living/carbon/target, /obj/item, /obj/item/bodypart/L)
#define COMSIG_CARBON_EMBED_RIP "item_embed_start_rip"
///called when removing a given item from a mob, from mob/living/carbon/remove_embedded_object(mob/living/carbon/target, /obj/item)
#define COMSIG_CARBON_EMBED_REMOVAL "item_embed_remove_safe"
// /mob/living/simple_animal/hostile signals
#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget"
#define COMPONENT_HOSTILE_NO_ATTACK (1<<0)
// /obj signals
///from base of obj/deconstruct(): (disassembled)
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct"
///called in /obj/structure/setAnchored(): (value)
#define COMSIG_OBJ_SETANCHORED "obj_setanchored"
///from base of code/game/machinery
#define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench"
///from base of /turf/proc/levelupdate(). (intact) true to hide and false to unhide
#define COMSIG_OBJ_HIDE "obj_hide"
///called in /obj/update_icon()
#define COMSIG_OBJ_UPDATE_ICON "obj_update_icon"
// /obj/machinery signals
///from /obj/machinery/obj_break(damage_flag): (damage_flag)
#define COMSIG_MACHINERY_BROKEN "machinery_broken"
///from base power_change() when power is lost
#define COMSIG_MACHINERY_POWER_LOST "machinery_power_lost"
///from base power_change() when power is restored
#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored"
// /obj/item signals
///from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
#define COMSIG_ITEM_ATTACK "item_attack"
///from base of obj/item/attack_self(): (/mob)
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self"
#define COMPONENT_NO_INTERACT (1<<0)
///from base of obj/item/attack_obj(): (/obj, /mob)
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj"
#define COMPONENT_NO_ATTACK_OBJ (1<<0)
///from base of obj/item/pre_attack(): (atom/target, mob/user, params)
#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack"
#define COMPONENT_NO_ATTACK (1<<0)
///from base of obj/item/afterattack(): (atom/target, mob/user, params)
#define COMSIG_ITEM_AFTERATTACK "item_afterattack"
///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, params)
#define COMSIG_ITEM_ATTACK_QDELETED "item_attack_qdeleted"
///from base of obj/item/equipped(): (/mob/equipper, slot)
#define COMSIG_ITEM_EQUIPPED "item_equip"
///from base of obj/item/dropped(): (mob/user)
#define COMSIG_ITEM_DROPPED "item_drop"
///from base of obj/item/pickup(): (/mob/taker)
#define COMSIG_ITEM_PICKUP "item_pickup"
///from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone)
#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone"
///return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul"
///called before marking an object for retrieval, checked in /obj/effect/proc_holder/spell/targeted/summonitem/cast() : (mob/user)
#define COMSIG_ITEM_MARK_RETRIEVAL "item_mark_retrieval"
#define COMPONENT_BLOCK_MARK_RETRIEVAL (1<<0)
///from base of obj/item/hit_reaction(): (list/args)
#define COMSIG_ITEM_HIT_REACT "item_hit_react"
///called on item when crossed by something (): (/atom/movable, mob/living/crossed)
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed"
///called on item when microwaved (): (obj/machinery/microwave/M)
#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act"
///from base of item/sharpener/attackby(): (amount, max)
#define COMSIG_ITEM_SHARPEN_ACT "sharpen_act"
#define COMPONENT_BLOCK_SHARPEN_APPLIED (1<<0)
#define COMPONENT_BLOCK_SHARPEN_BLOCKED (1<<1)
#define COMPONENT_BLOCK_SHARPEN_ALREADY (1<<2)
#define COMPONENT_BLOCK_SHARPEN_MAXED (1<<3)
///from base of [/obj/item/proc/tool_check_callback]: (mob/living/user)
#define COMSIG_TOOL_IN_USE "tool_in_use"
///from base of [/obj/item/proc/tool_start_check]: (mob/living/user)
#define COMSIG_TOOL_START_USE "tool_start_use"
///from [/obj/item/proc/disableEmbedding]:
#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed"
///from [/obj/effect/mine/proc/triggermine]:
#define COMSIG_MINE_TRIGGERED "minegoboom"
// /obj/item signals for economy
///called when an item is sold by the exports subsystem
#define COMSIG_ITEM_SOLD "item_sold"
///called when a wrapped up structure is opened by hand
#define COMSIG_STRUCTURE_UNWRAPPED "structure_unwrapped"
#define COMSIG_ITEM_UNWRAPPED "item_unwrapped"
///called when a wrapped up item is opened by hand
#define COMSIG_ITEM_SPLIT_VALUE (1<<0)
///called when getting the item's exact ratio for cargo's profit.
#define COMSIG_ITEM_SPLIT_PROFIT "item_split_profits"
///called when getting the item's exact ratio for cargo's profit, without selling the item.
#define COMSIG_ITEM_SPLIT_PROFIT_DRY "item_split_profits_dry"
// /obj/item/clothing signals
///from base of obj/item/clothing/shoes/proc/step_action(): ()
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action"
///from base of /obj/item/clothing/suit/space/proc/toggle_spacesuit(): (obj/item/clothing/suit/space/suit)
#define COMSIG_SUIT_SPACE_TOGGLE "suit_space_toggle"
// /obj/item/implant signals
///from base of /obj/item/implant/proc/activate(): ()
#define COMSIG_IMPLANT_ACTIVATED "implant_activated"
///from base of /obj/item/implant/proc/implant(): (list/args)
#define COMSIG_IMPLANT_IMPLANTING "implant_implanting"
#define COMPONENT_STOP_IMPLANTING (1<<0)
///called on already installed implants when a new one is being added in /obj/item/implant/proc/implant(): (list/args, obj/item/implant/new_implant)
#define COMSIG_IMPLANT_OTHER "implant_other"
//#define COMPONENT_STOP_IMPLANTING (1<<0) //The name makes sense for both
#define COMPONENT_DELETE_NEW_IMPLANT (1<<1)
#define COMPONENT_DELETE_OLD_IMPLANT (1<<2)
///called on implants being implanted into someone with an uplink implant: (datum/component/uplink)
#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists"
//This uses all return values of COMSIG_IMPLANT_OTHER
// /obj/item/pda signals
///called on pda when the user changes the ringtone: (mob/living/user, new_ringtone)
#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone"
#define COMPONENT_STOP_RINGTONE_CHANGE (1<<0)
#define COMSIG_PDA_CHECK_DETONATE "pda_check_detonate"
#define COMPONENT_PDA_NO_DETONATE (1<<0)
// /obj/item/radio signals
///called from base of /obj/item/radio/proc/set_frequency(): (list/args)
#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency"
// /obj/item/pen signals
///called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user)
#define COMSIG_PEN_ROTATED "pen_rotated"
// /obj/item/gun signals
///called in /obj/item/gun/process_fire (user, target, params, zone_override)
#define COMSIG_MOB_FIRED_GUN "mob_fired_gun"
// /obj/item/grenade signals
///called in /obj/item/gun/process_fire (user, target, params, zone_override)
#define COMSIG_GRENADE_PRIME "grenade_prime"
///called in /obj/item/gun/process_fire (user, target, params, zone_override)
#define COMSIG_GRENADE_ARMED "grenade_armed"
// /obj/projectile signals (sent to the firer)
///from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
#define COMSIG_PROJECTILE_SELF_ON_HIT "projectile_self_on_hit"
///from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit"
///from base of /obj/projectile/proc/fire(): (obj/projectile, atom/original_target)
#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire"
///from the base of /obj/projectile/proc/fire(): ()
#define COMSIG_PROJECTILE_FIRE "projectile_fire"
///sent to targets during the process_hit proc of projectiles
#define COMSIG_PROJECTILE_PREHIT "com_proj_prehit"
///sent to targets during the process_hit proc of projectiles
#define COMSIG_PROJECTILE_RANGE_OUT "projectile_range_out"
///sent when trying to force an embed (mainly for projectiles, only used in the embed element)
#define COMSIG_EMBED_TRY_FORCE "item_try_embed"
///sent to targets during the process_hit proc of projectiles
#define COMSIG_PELLET_CLOUD_INIT "pellet_cloud_init"
// /obj/mecha signals
///sent from mecha action buttons to the mecha they're linked to
#define COMSIG_MECHA_ACTION_ACTIVATE "mecha_action_activate"
// /mob/living/carbon/human signals
///from mob/living/carbon/human/UnarmedAttack(): (atom/target, proximity)
#define COMSIG_HUMAN_EARLY_UNARMED_ATTACK "human_early_unarmed_attack"
///from mob/living/carbon/human/UnarmedAttack(): (atom/target, proximity)
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACK "human_melee_unarmed_attack"
///from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker)
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby"
///Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted)
#define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit"
///Whenever EquipRanked is called, called after job is set
#define COMSIG_JOB_RECEIVED "job_received"
// /datum/species signals
///from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species)
#define COMSIG_SPECIES_GAIN "species_gain"
///from datum/species/on_species_loss(): (datum/species/lost_species)
#define COMSIG_SPECIES_LOSS "species_loss"
// /datum/song signals
///sent to the instrument when a song starts playing
#define COMSIG_SONG_START "song_start"
///sent to the instrument when a song stops playing
#define COMSIG_SONG_END "song_end"
/*******Component Specific Signals*******/
//Janitor
///(): Returns bitflags of wet values.
#define COMSIG_TURF_IS_WET "check_turf_wet"
///(max_strength, immediate, duration_decrease = INFINITY): Returns bool.
#define COMSIG_TURF_MAKE_DRY "make_turf_try"
///called on an object to clean it of cleanables. Usualy with soap: (num/strength)
#define COMSIG_COMPONENT_CLEAN_ACT "clean_act"
//Creamed
///called when you wash your face at a sink: (num/strength)
#define COMSIG_COMPONENT_CLEAN_FACE_ACT "clean_face_act"
//Food
///from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
#define COMSIG_FOOD_EATEN "food_eaten"
//Gibs
///from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases)
#define COMSIG_GIBS_STREAK "gibs_streak"
//Mood
///called when you send a mood event from anywhere in the code.
#define COMSIG_ADD_MOOD_EVENT "add_mood"
///Mood event that only RnD members listen for
#define COMSIG_ADD_MOOD_EVENT_RND "RND_add_mood"
///called when you clear a mood event from anywhere in the code.
#define COMSIG_CLEAR_MOOD_EVENT "clear_mood"
//NTnet
///called on an object by its NTNET connection component on receive. (sending_id(number), sending_netname(text), data(datum/netdata))
#define COMSIG_COMPONENT_NTNET_RECEIVE "ntnet_receive"
//Nanites
///() returns TRUE if nanites are found
#define COMSIG_HAS_NANITES "has_nanites"
///() returns TRUE if nanites have stealth
#define COMSIG_NANITE_IS_STEALTHY "nanite_is_stealthy"
///() deletes the nanite component
#define COMSIG_NANITE_DELETE "nanite_delete"
///(list/nanite_programs) - makes the input list a copy the nanites' program list
#define COMSIG_NANITE_GET_PROGRAMS "nanite_get_programs"
///(amount) Returns nanite amount
#define COMSIG_NANITE_GET_VOLUME "nanite_get_volume"
///(amount) Sets current nanite volume to the given amount
#define COMSIG_NANITE_SET_VOLUME "nanite_set_volume"
///(amount) Adjusts nanite volume by the given amount
#define COMSIG_NANITE_ADJUST_VOLUME "nanite_adjust"
///(amount) Sets maximum nanite volume to the given amount
#define COMSIG_NANITE_SET_MAX_VOLUME "nanite_set_max_volume"
///(amount(0-100)) Sets cloud ID to the given amount
#define COMSIG_NANITE_SET_CLOUD "nanite_set_cloud"
///(method) Modify cloud sync status. Method can be toggle, enable or disable
#define COMSIG_NANITE_SET_CLOUD_SYNC "nanite_set_cloud_sync"
///(amount) Sets safety threshold to the given amount
#define COMSIG_NANITE_SET_SAFETY "nanite_set_safety"
///(amount) Sets regeneration rate to the given amount
#define COMSIG_NANITE_SET_REGEN "nanite_set_regen"
///(code(1-9999)) Called when sending a nanite signal to a mob.
#define COMSIG_NANITE_SIGNAL "nanite_signal"
///(comm_code(1-9999), comm_message) Called when sending a nanite comm signal to a mob.
#define COMSIG_NANITE_COMM_SIGNAL "nanite_comm_signal"
///(mob/user, full_scan) - sends to chat a scan of the nanites to the user, returns TRUE if nanites are detected
#define COMSIG_NANITE_SCAN "nanite_scan"
///(list/data, scan_level) - adds nanite data to the given data list - made for ui_data procs
#define COMSIG_NANITE_UI_DATA "nanite_ui_data"
///(datum/nanite_program/new_program, datum/nanite_program/source_program) Called when adding a program to a nanite component
#define COMSIG_NANITE_ADD_PROGRAM "nanite_add_program"
///Installation successful
#define COMPONENT_PROGRAM_INSTALLED (1<<0)
///Installation failed, but there are still nanites
#define COMPONENT_PROGRAM_NOT_INSTALLED (1<<1)
///(datum/component/nanites, full_overwrite, copy_activation) Called to sync the target's nanites to a given nanite component
#define COMSIG_NANITE_SYNC "nanite_sync"
// /datum/component/storage signals
///() - returns bool.
#define COMSIG_CONTAINS_STORAGE "is_storage"
///(obj/item/inserting, mob/user, silent, force) - returns bool
#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert"
///(mob/show_to, force) - returns bool.
#define COMSIG_TRY_STORAGE_SHOW "storage_show_to"
///(mob/hide_from) - returns bool
#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from"
///returns bool
#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all"
///(newstate)
#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state"
///() - returns bool. MUST CHECK IF STORAGE IS THERE FIRST!
#define COMSIG_IS_STORAGE_LOCKED "storage_get_lockstate"
///(type, atom/destination, amount = INFINITY, check_adjacent, force, mob/user, list/inserted) - returns bool - type can be a list of types.
#define COMSIG_TRY_STORAGE_TAKE_TYPE "storage_take_type"
///(type, amount = INFINITY, force = FALSE). Force will ignore max_items, and amount is normally clamped to max_items.
#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type"
///(obj, new_loc, force = FALSE) - returns bool
#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj"
///(loc) - returns bool - if loc is null it will dump at parent location.
#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty"
///(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE)
#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory"
///(obj/item/insertion_candidate, mob/user, silent) - returns bool
#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip"
// /datum/component/two_handed signals
///from base of datum/component/two_handed/proc/wield(mob/living/carbon/user): (/mob/user)
#define COMSIG_TWOHANDED_WIELD "twohanded_wield"
#define COMPONENT_TWOHANDED_BLOCK_WIELD (1<<0)
///from base of datum/component/two_handed/proc/unwield(mob/living/carbon/user): (/mob/user)
#define COMSIG_TWOHANDED_UNWIELD "twohanded_unwield"
// /datum/action signals
///from base of datum/action/proc/Trigger(): (datum/action)
#define COMSIG_ACTION_TRIGGER "action_trigger"
#define COMPONENT_ACTION_BLOCK_TRIGGER (1<<0)
//Xenobio hotkeys
///from slime CtrlClickOn(): (/mob)
#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl"
///from slime AltClickOn(): (/mob)
#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt"
///from slime ShiftClickOn(): (/mob)
#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift"
///from turf ShiftClickOn(): (/mob)
#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift"
///from turf AltClickOn(): (/mob)
#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt"
///from monkey CtrlClickOn(): (/mob)
#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl"
///SSalarm signals
#define COMSIG_TRIGGERED_ALARM "ssalarm_triggered"
#define COMSIG_CANCELLED_ALARM "ssalarm_cancelled"
+2
View File
@@ -155,6 +155,8 @@
#define MAT_METALHYDROGEN "mhydrogen"
#define MAT_OSMIUM "osmium"
#define MAT_GRAPHITE "graphite"
#define MAT_LEATHER "leather"
#define MAT_CHITIN "chitin"
#define SHARD_SHARD "shard"
#define SHARD_SHRAPNEL "shrapnel"
+1
View File
@@ -63,4 +63,5 @@
#define MAT_TITANIUMGLASS "ti-glass"
#define MAT_PLASTITANIUM "plastitanium"
#define MAT_PLASTITANIUMHULL "plastitanium hull"
#define MAT_PLASTITANIUMGLASS "plastitanium glass"
+103
View File
@@ -0,0 +1,103 @@
// rust_g.dm - DM API for rust_g extension library
//
// To configure, create a `rust_g.config.dm` and set what you care about from
// the following options:
//
// #define RUST_G "path/to/rust_g"
// Override the .dll/.so detection logic with a fixed path or with detection
// logic of your own.
//
// #define RUSTG_OVERRIDE_BUILTINS
// Enable replacement rust-g functions for certain builtins. Off by default.
#ifndef RUST_G
// Default automatic RUST_G detection.
// On Windows, looks in the standard places for `rust_g.dll`.
// On Linux, looks in `.`, `$LD_LIBRARY_PATH`, and `~/.byond/bin` for either of
// `librust_g.so` (preferred) or `rust_g` (old).
/* This comment bypasses grep checks */ /var/__rust_g
/proc/__detect_rust_g()
if (world.system_type == UNIX)
if (fexists("./librust_g.so"))
// No need for LD_LIBRARY_PATH badness.
return __rust_g = "./librust_g.so"
else if (fexists("./rust_g"))
// Old dumb filename.
return __rust_g = "./rust_g"
else if (fexists("[world.GetConfig("env", "HOME")]/.byond/bin/rust_g"))
// Old dumb filename in `~/.byond/bin`.
return __rust_g = "rust_g"
else
// It's not in the current directory, so try others
return __rust_g = "librust_g.so"
else
return __rust_g = "rust_g"
#define RUST_G (__rust_g || __detect_rust_g())
#endif
#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET"
#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB"
#define RUSTG_JOB_ERROR "JOB PANICKED"
#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data)
#define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y)
#define rustg_file_read(fname) call(RUST_G, "file_read")(fname)
#define rustg_file_exists(fname) call(RUST_G, "file_exists")(fname)
#define rustg_file_write(text, fname) call(RUST_G, "file_write")(text, fname)
#define rustg_file_append(text, fname) call(RUST_G, "file_append")(text, fname)
#ifdef RUSTG_OVERRIDE_BUILTINS
#define file2text(fname) rustg_file_read("[fname]")
#define text2file(text, fname) rustg_file_append(text, "[fname]")
#endif
#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev)
#define rustg_hash_string(algorithm, text) call(RUST_G, "hash_string")(algorithm, text)
#define rustg_hash_file(algorithm, fname) call(RUST_G, "hash_file")(algorithm, fname)
#define RUSTG_HASH_MD5 "md5"
#define RUSTG_HASH_SHA1 "sha1"
#define RUSTG_HASH_SHA256 "sha256"
#define RUSTG_HASH_SHA512 "sha512"
#ifdef RUSTG_OVERRIDE_BUILTINS
#define md5(thing) (isfile(thing) ? rustg_hash_file(RUSTG_HASH_MD5, "[thing]") : rustg_hash_string(RUSTG_HASH_MD5, thing))
#endif
#define rustg_json_is_valid(text) (call(RUST_G, "json_is_valid")(text) == "true")
#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format)
/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")()
#define rustg_url_encode(text) call(RUST_G, "url_encode")(text)
#define rustg_url_decode(text) call(RUST_G, "url_decode")(text)
#ifdef RUSTG_OVERRIDE_BUILTINS
#define url_encode(text) rustg_url_encode(text)
#define url_decode(text) rustg_url_decode(text)
#endif
#define RUSTG_HTTP_METHOD_GET "get"
#define RUSTG_HTTP_METHOD_PUT "put"
#define RUSTG_HTTP_METHOD_DELETE "delete"
#define RUSTG_HTTP_METHOD_PATCH "patch"
#define RUSTG_HTTP_METHOD_HEAD "head"
#define RUSTG_HTTP_METHOD_POST "post"
#define rustg_http_request_blocking(method, url, body, headers) call(RUST_G, "http_request_blocking")(method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) call(RUST_G, "http_request_async")(method, url, body, headers)
#define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id)
#define rustg_sql_connect_pool(options) call(RUST_G, "sql_connect_pool")(options)
#define rustg_sql_query_async(handle, query, params) call(RUST_G, "sql_query_async")(handle, query, params)
#define rustg_sql_query_blocking(handle, query, params) call(RUST_G, "sql_query_blocking")(handle, query, params)
#define rustg_sql_connected(handle) call(RUST_G, "sql_connected")(handle)
#define rustg_sql_disconnect_pool(handle) call(RUST_G, "sql_disconnect_pool")(handle)
#define rustg_sql_check_query(job_id) call(RUST_G, "sql_check_query")("[job_id]")
+1
View File
@@ -9,6 +9,7 @@
#define LANGUAGE_DAEMON "Daemon"
#define LANGUAGE_ENOCHIAN "Enochian"
#define LANGUAGE_VESPINAE "Vespinae"
#define LANGUAGE_SPACER "Spacer"
#define LANGUAGE_CHIMPANZEE "Chimpanzee"
#define LANGUAGE_NEAERA "Neaera"
+1
View File
@@ -50,6 +50,7 @@
#define VV_HK_EXPOSE "expose"
#define VV_HK_CALLPROC "proc_call"
#define VV_HK_MARK "mark"
#define VV_HK_ADDCOMPONENT "addcomponent"
// /atom
#define VV_HK_ATOM_EXPLODE "turf_explode"
+2 -2
View File
@@ -1,7 +1,7 @@
/*
*
* This file is used by Travis to indicate that additional maps need to be compiled to look for errors such as missing paths.
* Do not add anything but the AWAY_MISSION_TEST definition here as it will be overwritten by Travis when running tests.
* This file is used by CI to indicate that additional maps need to be compiled to look for errors such as missing paths.
* Do not add anything but the AWAY_MISSION_TEST definition here as it will be overwritten by CI when running tests.
*
*
* Should you wish to edit set AWAY_MISSION_TEST to 1 like so:
+4 -12
View File
@@ -1,25 +1,17 @@
//print an error message to world.log
// Fall back to using old format if we are not using rust-g
#ifdef RUST_G
#define WRITE_LOG(log, text) call(RUST_G, "log_write")(log, text)
#else
#define WRITE_LOG(log, text) log << "\[[time_stamp()]][text]"
#endif
//This is an external call, "true" and "false" are how rust parses out booleans
#define WRITE_LOG(log, text) rustg_log_write(log, text, "true")
#define WRITE_LOG_NO_FORMAT(log, text) rustg_log_write(log, text, "false")
/* For logging round startup. */
/proc/start_log(log)
#ifndef RUST_G
log = file(log)
#endif
WRITE_LOG(log, "START: Starting up [log_path].")
return log
/* Close open log handles. This should be called as late as possible, and no logging should hapen after. */
/proc/shutdown_logging()
#ifdef RUST_G
call(RUST_G, "log_close_all")()
#endif
rustg_log_close_all()
/proc/error(msg)
to_world_log("## ERROR: [msg]")
+4 -1
View File
@@ -61,4 +61,7 @@
/proc/cmp_recipe_complexity_dsc(datum/recipe/A, datum/recipe/B)
var/a_score = LAZYLEN(A.items) + LAZYLEN(A.reagents) + LAZYLEN(A.fruit)
var/b_score = LAZYLEN(B.items) + LAZYLEN(B.reagents) + LAZYLEN(B.fruit)
return b_score - a_score
return b_score - a_score
/proc/cmp_typepaths_asc(A, B)
return sorttext("[B]","[A]")
+1 -1
View File
@@ -55,7 +55,7 @@
input = replace_characters(input, list("\n"=" ","\t"=" "))
if(encode)
// The below \ escapes have a space inserted to attempt to enable Travis auto-checking of span class usage. Please do not remove the space.
// The below \ escapes have a space inserted to attempt to enable CI auto-checking of span class usage. Please do not remove the space.
//In addition to processing html, html_encode removes byond formatting codes like "\ red", "\ i" and other.
//It is important to avoid double-encode text, it can "break" quotes and some other characters.
//Also, keep in mind that escaped characters don't work in the interface (window titles, lower left corner of the main window, etc.)
+16
View File
@@ -381,3 +381,19 @@
. += copytext(text, last_found, found)
last_found = found + delim_len
while (found)
/proc/type2parent(child)
var/string_type = "[child]"
var/last_slash = findlasttext(string_type, "/")
if(last_slash == 1)
switch(child)
if(/datum)
return null
if(/obj || /mob)
return /atom/movable
if(/area || /turf)
return /atom
else
return /datum
return text2path(copytext(string_type, 1, last_slash))
+15 -4
View File
@@ -1178,12 +1178,19 @@ proc/is_hot(obj/item/W as obj)
// check if mob is lying down on something we can operate him on.
// The RNG with table/rollerbeds comes into play in do_surgery() so that fail_step() can be used instead.
/proc/can_operate(mob/living/carbon/M)
return M.lying
/proc/can_operate(mob/living/carbon/M, mob/living/user)
. = M.lying
if(user && M == user && user.allow_self_surgery && user.a_intent == I_HELP) // You can, technically, always operate on yourself after standing still. Inadvised, but you can.
if(!M.isSynthetic())
. = TRUE
return .
// Returns an instance of a valid surgery surface.
/mob/living/proc/get_surgery_surface()
if(!lying)
/mob/living/proc/get_surgery_surface(mob/living/user)
if(!lying && user != src)
return null // Not lying down means no surface.
var/obj/surface = null
for(var/obj/O in loc) // Looks for the best surface.
@@ -1605,3 +1612,7 @@ GLOBAL_REAL_VAR(list/stack_trace_storage)
// Third one is the text that will be clickable.
/proc/href(href_src, list/href_params, href_text)
return "<a href='?src=\ref[href_src];[list2params(href_params)]'>[href_text]</a>"
/proc/CallAsync(datum/source, proctype, list/arguments)
set waitfor = FALSE
return call(source, proctype)(arglist(arguments))
+2 -2
View File
@@ -1,7 +1,7 @@
/*
*
* This file is used by Travis to indicate that additional maps need to be compiled to look for errors such as missing paths.
* Do not add anything but the MAP_TEST definition here as it will be overwritten by Travis when running tests.
* This file is used by CI to indicate that additional maps need to be compiled to look for errors such as missing paths.
* Do not add anything but the MAP_TEST definition here as it will be overwritten by CI when running tests.
*
*
* Should you wish to edit set MAP_TEST to 1 like so:
+4 -3
View File
@@ -114,11 +114,12 @@
trigger_aiming(TARGET_CAN_CLICK)
return 1
// VOREStation Addition Start: inbelly interaction
// VOREStation Addition Start: inbelly item interaction
if(isbelly(loc) && (loc == A.loc))
if(W)
to_chat(src, "The firm confines prevent that kind of dexterity!") //Only hand-based interactions in bellies
return
var/resolved = W.resolve_attackby(A,src)
if(!resolved && A && W)
W.afterattack(A, src, 1, params) // 1: clicking something Adjacent
else
if(ismob(A)) // No instant mob attacking
setClickCooldown(get_attack_speed())
+8 -3
View File
@@ -21,6 +21,8 @@ avoid code duplication. This includes items that may sometimes act as a standard
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
/obj/item/proc/attack_self(mob/user)
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) & COMPONENT_NO_INTERACT)
return
return
// Called at the start of resolve_attackby(), before the actual attack.
@@ -35,16 +37,19 @@ avoid code duplication. This includes items that may sometimes act as a standard
// No comment
/atom/proc/attackby(obj/item/W, mob/user, var/attack_modifier, var/click_parameters)
return
if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, click_parameters) & COMPONENT_NO_AFTERATTACK)
return TRUE
return FALSE
/atom/movable/attackby(obj/item/W, mob/user, var/attack_modifier, var/click_parameters)
if(!(W.flags & NOBLUDGEON))
. = ..()
if(!. && !(W.flags & NOBLUDGEON))
visible_message("<span class='danger'>[src] has been hit by [user] with [W].</span>")
/mob/living/attackby(obj/item/I, mob/user, var/attack_modifier, var/click_parameters)
if(!ismob(user))
return 0
if(can_operate(src) && I.do_surgery(src,user))
if(can_operate(src, user) && I.do_surgery(src,user))
return 1
if(attempt_vr(src,"vore_attackby",args)) return //VOREStation Add - The vore, of course.
return I.attack(src, user, user.zone_sel.selecting, attack_modifier)
-21
View File
@@ -1,21 +0,0 @@
/obj/item/device/paicard/attack_ghost(mob/user as mob)
if(src.pai != null) //Have a person in them already?
user.examinate(src)
return
var/choice = input(user, "You sure you want to inhabit this PAI?") in list("Yes", "No")
var/pai_name = input(user, "Choose your character's name", "Character Name") as text
var/actual_pai_name = sanitize_name(pai_name)
var/pai_key
if (isnull(pai_name))
return
if(choice == "Yes")
pai_key = user.key
else
return
var/turf/location = get_turf(src)
var/obj/item/device/paicard/card = new(location)
var/mob/living/silicon/pai/pai = new(card)
qdel(src)
pai.key = pai_key
card.setPersonality(pai)
pai.SetName(actual_pai_name)
+2 -2
View File
@@ -1,7 +1,7 @@
/*
*
* This file is used by Travis to indicate that Unit Tests are to be ran.
* Do not add anything but the UNIT_TEST definition here as it will be overwritten by Travis when running tests.
* This file is used by CI to indicate that Unit Tests are to be ran.
* Do not add anything but the UNIT_TEST definition here as it will be overwritten by CI when running tests.
*
*
* Should you wish to edit set UNIT_TEST to 1 like so:
+1 -1
View File
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(air)
// Updating zone tiles requires temporary storage location of self-zone-blocked turfs across resumes. Used only by process_tiles_to_update.
var/list/selfblock_deferred = null
// This is used to tell Travis WHERE the edges are.
// This is used to tell CI WHERE the edges are.
var/list/startup_active_edge_log = list()
/datum/controller/subsystem/air/PreInit()
+54
View File
@@ -0,0 +1,54 @@
PROCESSING_SUBSYSTEM_DEF(dcs)
name = "Datum Component System"
flags = SS_NO_INIT
wait = 1 SECONDS
var/list/elements_by_type = list()
/datum/controller/subsystem/processing/dcs/Recover()
comp_lookup = SSdcs.comp_lookup
/datum/controller/subsystem/processing/dcs/proc/GetElement(list/arguments)
var/datum/element/eletype = arguments[1]
var/element_id = eletype
if(!ispath(eletype, /datum/element))
CRASH("Attempted to instantiate [eletype] as a /datum/element")
if(initial(eletype.element_flags) & ELEMENT_BESPOKE)
element_id = GetIdFromArguments(arguments)
. = elements_by_type[element_id]
if(.)
return
. = elements_by_type[element_id] = new eletype
/****
* Generates an id for bespoke elements when given the argument list
* Generating the id here is a bit complex because we need to support named arguments
* Named arguments can appear in any order and we need them to appear after ordered arguments
* We assume that no one will pass in a named argument with a value of null
**/
/datum/controller/subsystem/processing/dcs/proc/GetIdFromArguments(list/arguments)
var/datum/element/eletype = arguments[1]
var/list/fullid = list("[eletype]")
var/list/named_arguments = list()
for(var/i in initial(eletype.id_arg_index) to length(arguments))
var/key = arguments[i]
var/value
if(istext(key))
value = arguments[key]
if(!(istext(key) || isnum(key)))
key = REF(key)
key = "[key]" // Key is stringified so numbers dont break things
if(!isnull(value))
if(!(istext(value) || isnum(value)))
value = REF(value)
named_arguments["[key]"] = value
else
fullid += "[key]"
if(length(named_arguments))
named_arguments = sortList(named_arguments)
fullid += named_arguments
return list2params(fullid)
+3
View File
@@ -284,9 +284,12 @@ SUBSYSTEM_DEF(garbage)
if(isnull(D.gc_destroyed))
if(SEND_SIGNAL(D, COMSIG_PARENT_PREQDELETED, force)) // Give the components a chance to prevent their parent from being deleted
return
D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED
var/start_time = world.time
var/start_tick = world.tick_usage
SEND_SIGNAL(D, COMSIG_PARENT_QDELETING, force) // Let the (remaining) components know about the result of Destroy
var/hint = D.Destroy(force) // Let our friend know they're about to get fucked up.
if(world.time != start_time)
I.slept_destroy++
+1 -1
View File
@@ -105,7 +105,7 @@ SUBSYSTEM_DEF(supply)
// Sell phoron and platinum
if(istype(A, /obj/item/stack))
var/obj/item/stack/P = A
var/material/mat = P.get_material()
var/datum/material/mat = P.get_material()
if(mat?.supply_conversion_value)
EC.contents[EC.contents.len]["value"] = P.get_amount() * mat.supply_conversion_value
EC.contents[EC.contents.len]["quantity"] = P.get_amount()
+9
View File
@@ -0,0 +1,9 @@
# Datum Component System (DCS)
## Concept
Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a `SendSignal()` call. Now every component that want's to can also know about this happening.
See [this thread](https://tgstation13.org/phpBB/viewtopic.php?f=5&t=22674) for an introduction to the system as a whole.
### See/Define signals and their arguments in [__DEFINES\dcs\signals.dm](../../__DEFINES/dcs/signals.dm)
+537
View File
@@ -0,0 +1,537 @@
/**
* # Component
*
* The component datum
*
* A component should be a single standalone unit
* of functionality, that works by receiving signals from it's parent
* object to provide some single functionality (i.e a slippery component)
* that makes the object it's attached to cause people to slip over.
* Useful when you want shared behaviour independent of type inheritance
*/
/datum/component
/**
* Defines how duplicate existing components are handled when added to a datum
*
* See [COMPONENT_DUPE_*][COMPONENT_DUPE_ALLOWED] definitions for available options
*/
var/dupe_mode = COMPONENT_DUPE_HIGHLANDER
/**
* The type to check for duplication
*
* `null` means exact match on `type` (default)
*
* Any other type means that and all subtypes
*/
var/dupe_type
/// The datum this components belongs to
var/datum/parent
/**
* Only set to true if you are able to properly transfer this component
*
* At a minimum [RegisterWithParent][/datum/component/proc/RegisterWithParent] and [UnregisterFromParent][/datum/component/proc/UnregisterFromParent] should be used
*
* Make sure you also implement [PostTransfer][/datum/component/proc/PostTransfer] for any post transfer handling
*/
var/can_transfer = FALSE
/**
* Create a new component.
*
* Additional arguments are passed to [Initialize()][/datum/component/proc/Initialize]
*
* Arguments:
* * datum/P the parent datum this component reacts to signals from
*/
/datum/component/New(list/raw_args)
parent = raw_args[1]
var/list/arguments = raw_args.Copy(2)
if(Initialize(arglist(arguments)) == COMPONENT_INCOMPATIBLE)
stack_trace("Incompatible [type] assigned to a [parent.type]! args: [json_encode(arguments)]")
qdel(src, TRUE, TRUE)
return
_JoinParent(parent)
/**
* Called during component creation with the same arguments as in new excluding parent.
*
* Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead
*/
/datum/component/proc/Initialize(...)
return
/**
* Properly removes the component from `parent` and cleans up references
*
* Arguments:
* * force - makes it not check for and remove the component from the parent
* * silent - deletes the component without sending a [COMSIG_COMPONENT_REMOVING] signal
*/
/datum/component/Destroy(force=FALSE, silent=FALSE)
if(!force && parent)
_RemoveFromParent()
if(!silent)
SEND_SIGNAL(parent, COMSIG_COMPONENT_REMOVING, src)
parent = null
return ..()
/**
* Internal proc to handle behaviour of components when joining a parent
*/
/datum/component/proc/_JoinParent()
var/datum/P = parent
//lazy init the parent's dc list
var/list/dc = P.datum_components
if(!dc)
P.datum_components = dc = list()
//set up the typecache
var/our_type = type
for(var/I in _GetInverseTypeList(our_type))
var/test = dc[I]
if(test) //already another component of this type here
var/list/components_of_type
if(!length(test))
components_of_type = list(test)
dc[I] = components_of_type
else
components_of_type = test
if(I == our_type) //exact match, take priority
var/inserted = FALSE
for(var/J in 1 to components_of_type.len)
var/datum/component/C = components_of_type[J]
if(C.type != our_type) //but not over other exact matches
components_of_type.Insert(J, I)
inserted = TRUE
break
if(!inserted)
components_of_type += src
else //indirect match, back of the line with ya
components_of_type += src
else //only component of this type, no list
dc[I] = src
RegisterWithParent()
/**
* Internal proc to handle behaviour when being removed from a parent
*/
/datum/component/proc/_RemoveFromParent()
var/datum/P = parent
var/list/dc = P.datum_components
for(var/I in _GetInverseTypeList())
var/list/components_of_type = dc[I]
if(length(components_of_type)) //
var/list/subtracted = components_of_type - src
if(subtracted.len == 1) //only 1 guy left
dc[I] = subtracted[1] //make him special
else
dc[I] = subtracted
else //just us
dc -= I
if(!dc.len)
P.datum_components = null
UnregisterFromParent()
/**
* Register the component with the parent object
*
* Use this proc to register with your parent object
*
* Overridable proc that's called when added to a new parent
*/
/datum/component/proc/RegisterWithParent()
return
/**
* Unregister from our parent object
*
* Use this proc to unregister from your parent object
*
* Overridable proc that's called when removed from a parent
* *
*/
/datum/component/proc/UnregisterFromParent()
return
/**
* Register to listen for a signal from the passed in target
*
* This sets up a listening relationship such that when the target object emits a signal
* the source datum this proc is called upon, will recieve a callback to the given proctype
* Return values from procs registered must be a bitfield
*
* Arguments:
* * datum/target The target to listen for signals from
* * sig_type_or_types Either a string signal name, or a list of signal names (strings)
* * proctype The proc to call back when the signal is emitted
* * override If a previous registration exists you must explicitly set this
*/
/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proctype, override = FALSE)
if(QDELETED(src) || QDELETED(target))
return
var/list/procs = signal_procs
if(!procs)
signal_procs = procs = list()
if(!procs[target])
procs[target] = list()
var/list/lookup = target.comp_lookup
if(!lookup)
target.comp_lookup = lookup = list()
var/list/sig_types = islist(sig_type_or_types) ? sig_type_or_types : list(sig_type_or_types)
for(var/sig_type in sig_types)
if(!override && procs[target][sig_type])
stack_trace("[sig_type] overridden. Use override = TRUE to suppress this warning")
procs[target][sig_type] = proctype
if(!lookup[sig_type]) // Nothing has registered here yet
lookup[sig_type] = src
else if(lookup[sig_type] == src) // We already registered here
continue
else if(!length(lookup[sig_type])) // One other thing registered here
lookup[sig_type] = list(lookup[sig_type]=TRUE)
lookup[sig_type][src] = TRUE
else // Many other things have registered here
lookup[sig_type][src] = TRUE
signal_enabled = TRUE
/**
* Stop listening to a given signal from target
*
* Breaks the relationship between target and source datum, removing the callback when the signal fires
*
* Doesn't care if a registration exists or not
*
* Arguments:
* * datum/target Datum to stop listening to signals from
* * sig_typeor_types Signal string key or list of signal keys to stop listening to specifically
*/
/datum/proc/UnregisterSignal(datum/target, sig_type_or_types)
var/list/lookup = target.comp_lookup
if(!signal_procs || !signal_procs[target] || !lookup)
return
if(!islist(sig_type_or_types))
sig_type_or_types = list(sig_type_or_types)
for(var/sig in sig_type_or_types)
if(!signal_procs[target][sig])
continue
switch(length(lookup[sig]))
if(2)
lookup[sig] = (lookup[sig]-src)[1]
if(1)
stack_trace("[target] ([target.type]) somehow has single length list inside comp_lookup")
if(src in lookup[sig])
lookup -= sig
if(!length(lookup))
target.comp_lookup = null
break
if(0)
lookup -= sig
if(!length(lookup))
target.comp_lookup = null
break
else
lookup[sig] -= src
signal_procs[target] -= sig_type_or_types
if(!signal_procs[target].len)
signal_procs -= target
/**
* Called on a component when a component of the same type was added to the same parent
*
* See [/datum/component/var/dupe_mode]
*
* `C`'s type will always be the same of the called component
*/
/datum/component/proc/InheritComponent(datum/component/C, i_am_original)
return
/**
* Called on a component when a component of the same type was added to the same parent with [COMPONENT_DUPE_SELECTIVE]
*
* See [/datum/component/var/dupe_mode]
*
* `C`'s type will always be the same of the called component
*
* return TRUE if you are absorbing the component, otherwise FALSE if you are fine having it exist as a duplicate component
*/
/datum/component/proc/CheckDupeComponent(datum/component/C, ...)
return
/**
* Callback Just before this component is transferred
*
* Use this to do any special cleanup you might need to do before being deregged from an object
*/
/datum/component/proc/PreTransfer()
return
/**
* Callback Just after a component is transferred
*
* Use this to do any special setup you need to do after being moved to a new object
*
* Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead
*/
/datum/component/proc/PostTransfer()
return COMPONENT_INCOMPATIBLE //Do not support transfer by default as you must properly support it
/**
* Internal proc to create a list of our type and all parent types
*/
/datum/component/proc/_GetInverseTypeList(our_type = type)
//we can do this one simple trick
var/current_type = parent_type
. = list(our_type, current_type)
//and since most components are root level + 1, this won't even have to run
while (current_type != /datum/component)
current_type = type2parent(current_type)
. += current_type
/**
* Internal proc to handle most all of the signaling procedure
*
* Will runtime if used on datums with an empty component list
*
* Use the [SEND_SIGNAL] define instead
*/
/datum/proc/_SendSignal(sigtype, list/arguments)
var/target = comp_lookup[sigtype]
if(!length(target))
var/datum/C = target
if(!C.signal_enabled)
return NONE
var/proctype = C.signal_procs[src][sigtype]
return NONE | CallAsync(C, proctype, arguments)
. = NONE
for(var/I in target)
var/datum/C = I
if(!C.signal_enabled)
continue
var/proctype = C.signal_procs[src][sigtype]
. |= CallAsync(C, proctype, arguments)
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
/**
* Return any component assigned to this datum of the given type
*
* This will throw an error if it's possible to have more than one component of that type on the parent
*
* Arguments:
* * datum/component/c_type The typepath of the component you want to get a reference to
*/
/datum/proc/GetComponent(datum/component/c_type)
// RETURN_TYPE(c_type)
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE)
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
var/list/dc = datum_components
if(!dc)
return null
. = dc[c_type]
if(length(.))
return .[1]
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
/**
* Return any component assigned to this datum of the exact given type
*
* This will throw an error if it's possible to have more than one component of that type on the parent
*
* Arguments:
* * datum/component/c_type The typepath of the component you want to get a reference to
*/
/datum/proc/GetExactComponent(datum/component/c_type)
// RETURN_TYPE(c_type)
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE)
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
var/list/dc = datum_components
if(!dc)
return null
var/datum/component/C = dc[c_type]
if(C)
if(length(C))
C = C[1]
if(C.type == c_type)
return C
return null
/**
* Get all components of a given type that are attached to this datum
*
* Arguments:
* * c_type The component type path
*/
/datum/proc/GetComponents(c_type)
var/list/dc = datum_components
if(!dc)
return null
. = dc[c_type]
if(!length(.))
return list(.)
/**
* Creates an instance of `new_type` in the datum and attaches to it as parent
*
* Sends the [COMSIG_COMPONENT_ADDED] signal to the datum
*
* Returns the component that was created. Or the old component in a dupe situation where [COMPONENT_DUPE_UNIQUE] was set
*
* If this tries to add a component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it
*
* Properly handles duplicate situations based on the `dupe_mode` var
*/
/datum/proc/_AddComponent(list/raw_args)
var/new_type = raw_args[1]
var/datum/component/nt = new_type
var/dm = initial(nt.dupe_mode)
var/dt = initial(nt.dupe_type)
var/datum/component/old_comp
var/datum/component/new_comp
if(ispath(nt))
if(nt == /datum/component)
CRASH("[nt] attempted instantiation!")
else
new_comp = nt
nt = new_comp.type
raw_args[1] = src
if(dm != COMPONENT_DUPE_ALLOWED)
if(!dt)
old_comp = GetExactComponent(nt)
else
old_comp = GetComponent(dt)
if(old_comp)
switch(dm)
if(COMPONENT_DUPE_UNIQUE)
if(!new_comp)
new_comp = new nt(raw_args)
if(!QDELETED(new_comp))
old_comp.InheritComponent(new_comp, TRUE)
QDEL_NULL(new_comp)
if(COMPONENT_DUPE_HIGHLANDER)
if(!new_comp)
new_comp = new nt(raw_args)
if(!QDELETED(new_comp))
new_comp.InheritComponent(old_comp, FALSE)
QDEL_NULL(old_comp)
if(COMPONENT_DUPE_UNIQUE_PASSARGS)
if(!new_comp)
var/list/arguments = raw_args.Copy(2)
arguments.Insert(1, null, TRUE)
old_comp.InheritComponent(arglist(arguments))
else
old_comp.InheritComponent(new_comp, TRUE)
if(COMPONENT_DUPE_SELECTIVE)
var/list/arguments = raw_args.Copy()
arguments[1] = new_comp
var/make_new_component = TRUE
for(var/i in GetComponents(new_type))
var/datum/component/C = i
if(C.CheckDupeComponent(arglist(arguments)))
make_new_component = FALSE
QDEL_NULL(new_comp)
break
if(!new_comp && make_new_component)
new_comp = new nt(raw_args)
else if(!new_comp)
new_comp = new nt(raw_args) // There's a valid dupe mode but there's no old component, act like normal
else if(!new_comp)
new_comp = new nt(raw_args) // Dupes are allowed, act like normal
if(!old_comp && !QDELETED(new_comp)) // Nothing related to duplicate components happened and the new component is healthy
SEND_SIGNAL(src, COMSIG_COMPONENT_ADDED, new_comp)
return new_comp
return old_comp
/**
* Get existing component of type, or create it and return a reference to it
*
* Use this if the item needs to exist at the time of this call, but may not have been created before now
*
* Arguments:
* * component_type The typepath of the component to create or return
* * ... additional arguments to be passed when creating the component if it does not exist
*/
/datum/proc/LoadComponent(component_type, ...)
. = GetComponent(component_type)
if(!.)
return _AddComponent(args)
/**
* Removes the component from parent, ends up with a null parent
*/
/datum/component/proc/RemoveComponent()
if(!parent)
return
var/datum/old_parent = parent
PreTransfer()
_RemoveFromParent()
parent = null
SEND_SIGNAL(old_parent, COMSIG_COMPONENT_REMOVING, src)
/**
* Transfer this component to another parent
*
* Component is taken from source datum
*
* Arguments:
* * datum/component/target Target datum to transfer to
*/
/datum/proc/TakeComponent(datum/component/target)
if(!target || target.parent == src)
return
if(target.parent)
target.RemoveComponent()
target.parent = src
var/result = target.PostTransfer()
switch(result)
if(COMPONENT_INCOMPATIBLE)
var/c_type = target.type
qdel(target)
CRASH("Incompatible [c_type] transfer attempt to a [type]!")
if(target == AddComponent(target))
target._JoinParent()
/**
* Transfer all components to target
*
* All components from source datum are taken
*
* Arguments:
* * /datum/target the target to move the components to
*/
/datum/proc/TransferComponents(datum/target)
var/list/dc = datum_components
if(!dc)
return
var/comps = dc[/datum/component]
if(islist(comps))
for(var/datum/component/I in comps)
if(I.can_transfer)
target.TakeComponent(I)
else
var/datum/component/C = comps
if(C.can_transfer)
target.TakeComponent(comps)
/**
* Return the object that is the host of any UI's that this component has
*/
/datum/component/tgui_host()
return parent
+36
View File
@@ -6,6 +6,10 @@
/datum
var/gc_destroyed //Time when this object was destroyed.
var/list/active_timers //for SStimer
var/list/datum_components //for /datum/components
var/list/comp_lookup
var/list/signal_procs
var/signal_enabled = FALSE
var/weakref/weakref // Holder of weakref instance pointing to this datum
var/datum_flags = NONE
@@ -30,6 +34,38 @@
weakref = null // Clear this reference to ensure it's kept for as brief duration as possible.
//BEGIN: ECS SHIT
signal_enabled = FALSE
var/list/dc = datum_components
if(dc)
var/all_components = dc[/datum/component]
if(length(all_components))
for(var/I in all_components)
var/datum/component/C = I
qdel(C, FALSE, TRUE)
else
var/datum/component/C = all_components
qdel(C, FALSE, TRUE)
dc.Cut()
var/list/lookup = comp_lookup
if(lookup)
for(var/sig in lookup)
var/list/comps = lookup[sig]
if(length(comps))
for(var/i in comps)
var/datum/component/comp = i
comp.UnregisterSignal(src, sig)
else
var/datum/component/comp = comps
comp.UnregisterSignal(src, sig)
comp_lookup = lookup = null
for(var/target in signal_procs)
UnregisterSignal(target, signal_procs[target])
//END: ECS SHIT
tag = null
SStgui.close_uis(src)
return QDEL_HINT_QUEUE
+29
View File
@@ -26,6 +26,7 @@
VV_DROPDOWN_OPTION(VV_HK_MARK, "Mark Object")
VV_DROPDOWN_OPTION(VV_HK_DELETE, "Delete")
VV_DROPDOWN_OPTION(VV_HK_EXPOSE, "Show VV To Player")
VV_DROPDOWN_OPTION(VV_HK_ADDCOMPONENT, "Add Component/Element")
//This proc is only called if everything topic-wise is verified. The only verifications that should happen here is things like permission checks!
//href_list is a reference, modifying it in these procs WILL change the rest of the proc in topic.dm of admin/view_variables!
@@ -58,6 +59,34 @@
usr.client.mark_datum(src)
IF_VV_OPTION(VV_HK_CALLPROC)
usr.client.callproc_datum(src)
IF_VV_OPTION(VV_HK_ADDCOMPONENT)
if(!check_rights(NONE))
return
var/list/names = list()
var/list/componentsubtypes = sortTim(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
names += "---Components---"
names += componentsubtypes
names += "---Elements---"
names += sortTim(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
if(QDELETED(src))
to_chat(usr, "That thing doesn't exist anymore!", confidential = TRUE)
return
var/list/lst = usr.client.get_callproc_args()
if(!lst)
return
var/datumname = "error"
lst.Insert(1, result)
if(result in componentsubtypes)
datumname = "component"
_AddComponent(lst)
else
datumname = "element"
_AddElement(lst)
log_admin("[key_name(usr)] has added [result] [datumname] to [key_name(src)].")
message_admins("<span class='notice'>[key_name_admin(usr)] has added [result] [datumname] to [key_name_admin(src)].</span>")
/datum/proc/vv_get_header()
. = list()
+55
View File
@@ -0,0 +1,55 @@
/**
* A holder for simple behaviour that can be attached to many different types
*
* Only one element of each type is instanced during game init.
* Otherwise acts basically like a lightweight component.
*/
/datum/element
/// Option flags for element behaviour
var/element_flags = NONE
/**
* The index of the first attach argument to consider for duplicate elements
*
* Is only used when flags contains [ELEMENT_BESPOKE]
*
* This is infinity so you must explicitly set this
*/
var/id_arg_index = INFINITY
/// Activates the functionality defined by the element on the given target datum
/datum/element/proc/Attach(datum/target)
// SHOULD_CALL_PARENT(1)
if(type == /datum/element)
return ELEMENT_INCOMPATIBLE
SEND_SIGNAL(target, COMSIG_ELEMENT_ATTACH, src)
if(element_flags & ELEMENT_DETACH)
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/Detach, override = TRUE)
/// Deactivates the functionality defines by the element on the given datum
/datum/element/proc/Detach(datum/source, force)
SEND_SIGNAL(source, COMSIG_ELEMENT_DETACH, src)
// SHOULD_CALL_PARENT(1)
UnregisterSignal(source, COMSIG_PARENT_QDELETING)
/datum/element/Destroy(force)
if(!force)
return QDEL_HINT_LETMELIVE
SSdcs.elements_by_type -= type
return ..()
//DATUM PROCS
/// Finds the singleton for the element type given and attaches it to src
/datum/proc/_AddElement(list/arguments)
var/datum/element/ele = SSdcs.GetElement(arguments)
arguments[1] = src
if(ele.Attach(arglist(arguments)) == ELEMENT_INCOMPATIBLE)
CRASH("Incompatible [arguments[1]] assigned to a [type]! args: [json_encode(args)]")
/**
* Finds the singleton for the element type given and detaches it from src
* You only need additional arguments beyond the type if you're using [ELEMENT_BESPOKE]
*/
/datum/proc/_RemoveElement(list/arguments)
var/datum/element/ele = SSdcs.GetElement(arguments)
ele.Detach(src)
+16
View File
@@ -27,3 +27,19 @@
/datum/looping_sound/geiger/stop()
. = ..()
last_radiation = 0
/datum/looping_sound/small_motor
start_sound = 'sound/items/small_motor/motor_start_nopull.ogg'
start_length = 2 SECONDS
mid_sounds = list(
'sound/items/small_motor/motor_idle.ogg',
'sound/items/small_motor/motor_fast.ogg',
'sound/items/small_motor/motor_faster.ogg'
)
mid_length = 1.9 SECONDS //someone make this loop better please, i'm no good at sound. the clips should be 2 seconds exact but there's a gap if it's set to 2
end_sound = 'sound/items/small_motor/motor_end.ogg'
var/speed = 1
/datum/looping_sound/small_motor/get_sound(starttime)
speed = clamp(speed, 1, 3)
return ..(starttime, mid_sounds[speed])
-5
View File
@@ -25,11 +25,6 @@ GLOBAL_DATUM_INIT(moved_event, /decl/observ/moved, new)
/********************
* Movement Handling *
********************/
/atom/Entered(var/atom/movable/am, var/atom/old_loc)
. = ..()
GLOB.moved_event.raise_event(am, old_loc, am.loc)
/atom/movable/Entered(var/atom/movable/am, atom/old_loc)
. = ..()
if(GLOB.moved_event.has_listeners(am))
+2 -1
View File
@@ -38,9 +38,10 @@ var/global/datum/repository/crew/crew_repository = new()
crewmemberData["assignment"] = H.get_assignment(if_no_id="Unknown", if_no_job="No Job")
if(C.sensor_mode >= SUIT_SENSOR_BINARY)
crewmemberData["dead"] = H.stat > UNCONSCIOUS
crewmemberData["dead"] = H.stat == DEAD
if(C.sensor_mode >= SUIT_SENSOR_VITAL)
crewmemberData["stat"] = H.stat
crewmemberData["oxy"] = round(H.getOxyLoss(), 1)
crewmemberData["tox"] = round(H.getToxLoss(), 1)
crewmemberData["fire"] = round(H.getFireLoss(), 1)
+7
View File
@@ -151,6 +151,13 @@
containername = "Singularity Generator crate"
access = access_ce
/datum/supply_pack/eng/engine/tesla_gen
name = "Tesla Generator crate"
contains = list(/obj/machinery/the_singularitygen/tesla)
containertype = /obj/structure/closet/crate/secure/einstein
containername = "Tesla Generator crate"
access = access_ce
/datum/supply_pack/eng/engine/collector
name = "Collector crate"
contains = list(/obj/machinery/power/rad_collector = 3)
+6
View File
@@ -0,0 +1,6 @@
//boosted ERT spawn/cap numbers to match the Von Braun's spawns, just to be safe. not much point going to all the effort of giving you twelve slots if only seven can ever be used without admin fuckery. -Killian
/datum/antagonist/ert
hard_cap = 12
hard_cap_round = 12
initial_spawn_req = 4
initial_spawn_target = 12
+1 -1
View File
@@ -68,7 +68,7 @@ var/datum/antagonist/rogue_ai/malf
sleep(50)
to_chat(malf, "<B>MEMCHCK</B> Corrupted sectors confirmed. Reccomended solution: Delete. Proceed? Y/N: Y")
sleep(10)
// this is so Travis doesn't complain about the backslash-B. Fixed at compile time (or should be).
// this is so CI doesn't complain about the backslash-B. Fixed at compile time (or should be).
to_chat(malf, "<span class='notice'>Corrupted files deleted: sys\\core\\users.dat sys\\core\\laws.dat sys\\core\\" + "backups.dat</span>")
sleep(20)
to_chat(malf, "<span class='notice'><b>CAUTION:</b> Law database not found! User database not found! Unable to restore backups. Activating failsafe AI shutd3wn52&&$#!##</span>")
+7
View File
@@ -349,6 +349,13 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "\improper Thunderdome (Observer.)"
icon_state = "purple"
/area/virtual_reality
name = "Virtual Reality"
icon_state = "Virtual_Reality"
dynamic_lighting = 0
requires_power = 0
flags = AREA_FLAG_IS_NOT_PERSISTENT
//ENEMY
//names are used
@@ -6,6 +6,12 @@
//Rouguelike Mining
/area/asteroid/rogue
has_gravity = 0
requires_power = 1
always_unpowered = 1
power_light = 0
power_equip = 0
power_environ = 0
var/asteroid_spawns = list()
var/mob_spawns = list()
var/shuttle_area //It would be neat if this were more dynamic, but eh.
+16
View File
@@ -210,6 +210,7 @@
if(user.client?.prefs.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL)
user.client.statpanel = "Examine" // Switch to stat panel
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, output)
return output
// Don't make these call bicon or anything, these are what bicon uses. They need to return an icon.
@@ -223,6 +224,7 @@
//called to set the atom's dir and used to add behaviour to dir-changes
/atom/proc/set_dir(new_dir)
SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE, dir, new_dir)
. = new_dir != dir
dir = new_dir
@@ -631,3 +633,17 @@
/atom/proc/speech_bubble(bubble_state = "", bubble_loc = src, list/bubble_recipients = list())
return
/atom/Entered(atom/movable/AM, atom/old_loc)
. = ..()
GLOB.moved_event.raise_event(AM, old_loc, AM.loc)
SEND_SIGNAL(src, COMSIG_ATOM_ENTERED, AM, old_loc)
/atom/Exit(atom/movable/AM, atom/new_loc)
. = ..()
if(SEND_SIGNAL(src, COMSIG_ATOM_EXIT, AM, new_loc) & COMPONENT_ATOM_BLOCK_EXIT)
return FALSE
/atom/Exited(atom/movable/AM, atom/new_loc)
. = ..()
SEND_SIGNAL(src, COMSIG_ATOM_EXITED, AM, new_loc)
+42 -18
View File
@@ -42,20 +42,29 @@
#define DNA_UI_TAIL2_R 23
#define DNA_UI_TAIL2_G 24
#define DNA_UI_TAIL2_B 25
#define DNA_UI_EARS_R 26
#define DNA_UI_EARS_G 27
#define DNA_UI_EARS_B 28
#define DNA_UI_EARS2_R 29
#define DNA_UI_EARS2_G 30
#define DNA_UI_EARS2_B 31
#define DNA_UI_WING_STYLE 32
#define DNA_UI_WING_R 33
#define DNA_UI_WING_G 34
#define DNA_UI_WING_B 35
#define DNA_UI_WING2_R 36
#define DNA_UI_WING2_G 37
#define DNA_UI_WING2_B 38 // VOREStation snippet end.
#define DNA_UI_LENGTH 38 // VOREStation Edit - Needs to match the highest number above.
#define DNA_UI_TAIL3_R 26
#define DNA_UI_TAIL3_G 27
#define DNA_UI_TAIL3_B 28
#define DNA_UI_EARS_R 29
#define DNA_UI_EARS_G 30
#define DNA_UI_EARS_B 31
#define DNA_UI_EARS2_R 32
#define DNA_UI_EARS2_G 33
#define DNA_UI_EARS2_B 34
#define DNA_UI_EARS3_R 35
#define DNA_UI_EARS3_G 36
#define DNA_UI_EARS3_B 37
#define DNA_UI_WING_STYLE 38
#define DNA_UI_WING_R 39
#define DNA_UI_WING_G 40
#define DNA_UI_WING_B 41
#define DNA_UI_WING2_R 42
#define DNA_UI_WING2_G 43
#define DNA_UI_WING2_B 44
#define DNA_UI_WING3_R 45
#define DNA_UI_WING3_G 46
#define DNA_UI_WING3_B 47 // VOREStation snippet end.
#define DNA_UI_LENGTH 47 // VOREStation Edit - Needs to match the highest number above.
#define DNA_SE_LENGTH 49 // VOREStation Edit (original was UI+11)
// For later:
@@ -225,6 +234,10 @@ var/global/list/datum/dna/gene/dna_genes[0]
SetUIValueRange(DNA_UI_TAIL2_G, character.g_tail2, 255, 1)
SetUIValueRange(DNA_UI_TAIL2_B, character.b_tail2, 255, 1)
SetUIValueRange(DNA_UI_TAIL3_R, character.r_tail3, 255, 1)
SetUIValueRange(DNA_UI_TAIL3_G, character.g_tail3, 255, 1)
SetUIValueRange(DNA_UI_TAIL3_B, character.b_tail3, 255, 1)
SetUIValueRange(DNA_UI_WING_R, character.r_wing, 255, 1)
SetUIValueRange(DNA_UI_WING_G, character.g_wing, 255, 1)
SetUIValueRange(DNA_UI_WING_B, character.b_wing, 255, 1)
@@ -233,6 +246,10 @@ var/global/list/datum/dna/gene/dna_genes[0]
SetUIValueRange(DNA_UI_WING2_G, character.g_wing2, 255, 1)
SetUIValueRange(DNA_UI_WING2_B, character.b_wing2, 255, 1)
SetUIValueRange(DNA_UI_WING3_R, character.r_wing3, 255, 1)
SetUIValueRange(DNA_UI_WING3_G, character.g_wing3, 255, 1)
SetUIValueRange(DNA_UI_WING3_B, character.b_wing3, 255, 1)
SetUIValueRange(DNA_UI_EARS_R, character.r_ears, 255, 1)
SetUIValueRange(DNA_UI_EARS_G, character.g_ears, 255, 1)
SetUIValueRange(DNA_UI_EARS_B, character.b_ears, 255, 1)
@@ -241,6 +258,10 @@ var/global/list/datum/dna/gene/dna_genes[0]
SetUIValueRange(DNA_UI_EARS2_G, character.g_ears2, 255, 1)
SetUIValueRange(DNA_UI_EARS2_B, character.b_ears2, 255, 1)
SetUIValueRange(DNA_UI_EARS3_R, character.r_ears3, 255, 1)
SetUIValueRange(DNA_UI_EARS3_G, character.g_ears3, 255, 1)
SetUIValueRange(DNA_UI_EARS3_B, character.b_ears3, 255, 1)
// VORE Station Edit End
SetUIValueRange(DNA_UI_HAIR_R, character.r_hair, 255, 1)
@@ -294,14 +315,17 @@ var/global/list/datum/dna/gene/dna_genes[0]
if (block<=0) return
ASSERT(maxvalue<=4095)
var/range = (4095 / maxvalue)
if(value == 0) //VOREStation Edit
SetUIValue(block,0,defer)
return
if(value)
SetUIValue(block,round(value * range),defer)
// Getter version of above.
/datum/dna/proc/GetUIValueRange(var/block,var/maxvalue)
if (block<=0) return 0
var/value = GetUIValue(block)
return round(0.5 + (value / 4095) * maxvalue)
var/value = ((GetUIValue(block) / 4095) * maxvalue)
return round(0.5 + value)
// Is the UI gene "on" or "off"?
// For UI, this is simply a check of if the value is > 2050.
@@ -386,8 +410,8 @@ var/global/list/datum/dna/gene/dna_genes[0]
// Getter version of above.
/datum/dna/proc/GetSEValueRange(var/block,var/maxvalue)
if (block<=0) return 0
var/value = GetSEValue(block)
return round(1 +(value / 4095)*maxvalue)
var/value = ((GetSEValue(block) / 4095) * maxvalue)
return round(0.5 + value)
// Is the block "on" (1) or "off" (0)? (Un-assigned genes are always off.)
/datum/dna/proc/GetSEState(var/block)
+13
View File
@@ -189,6 +189,10 @@
H.r_ears2 = dna.GetUIValueRange(DNA_UI_EARS2_R, 255)
H.g_ears2 = dna.GetUIValueRange(DNA_UI_EARS2_G, 255)
H.b_ears2 = dna.GetUIValueRange(DNA_UI_EARS2_B, 255)
H.r_ears3 = dna.GetUIValueRange(DNA_UI_EARS3_R, 255)
H.g_ears3 = dna.GetUIValueRange(DNA_UI_EARS3_G, 255)
H.b_ears3 = dna.GetUIValueRange(DNA_UI_EARS3_B, 255)
//Tail
var/tail = dna.GetUIValueRange(DNA_UI_TAIL_STYLE, tail_styles_list.len + 1) - 1
@@ -208,6 +212,12 @@
H.r_wing = dna.GetUIValueRange(DNA_UI_WING_R, 255)
H.g_wing = dna.GetUIValueRange(DNA_UI_WING_G, 255)
H.b_wing = dna.GetUIValueRange(DNA_UI_WING_B, 255)
H.r_wing2 = dna.GetUIValueRange(DNA_UI_WING2_R, 255)
H.g_wing2 = dna.GetUIValueRange(DNA_UI_WING2_G, 255)
H.b_wing2 = dna.GetUIValueRange(DNA_UI_WING2_B, 255)
H.r_wing3 = dna.GetUIValueRange(DNA_UI_WING3_R, 255)
H.g_wing3 = dna.GetUIValueRange(DNA_UI_WING3_G, 255)
H.b_wing3 = dna.GetUIValueRange(DNA_UI_WING3_B, 255)
// Playerscale
var/size = dna.GetUIValueRange(DNA_UI_PLAYERSCALE, player_sizes_list.len)
@@ -221,6 +231,9 @@
H.r_tail2 = dna.GetUIValueRange(DNA_UI_TAIL2_R, 255)
H.g_tail2 = dna.GetUIValueRange(DNA_UI_TAIL2_G, 255)
H.b_tail2 = dna.GetUIValueRange(DNA_UI_TAIL2_B, 255)
H.r_tail3 = dna.GetUIValueRange(DNA_UI_TAIL3_R, 255)
H.g_tail3 = dna.GetUIValueRange(DNA_UI_TAIL3_G, 255)
H.b_tail3 = dna.GetUIValueRange(DNA_UI_TAIL3_B, 255)
// Technically custom_species is not part of the UI, but this place avoids merge problems.
H.custom_species = dna.custom_species
+1 -1
View File
@@ -331,7 +331,7 @@
connected = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
if(connected)
break
VARSET_IN(src, injector_ready, TRUE, 25 SECONDS)
VARSET_IN(src, injector_ready, TRUE, 25 SECONDS)
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(var/list/buffer)
var/list/arr = list()
+17 -10
View File
@@ -19,7 +19,7 @@
alt_titles = list("Intern" = /datum/alt_title/intern,
"Apprentice Engineer" = /datum/alt_title/intern_eng,
"Medical Intern" = /datum/alt_title/intern_med,
"Lab Assistant" = /datum/alt_title/intern_sci,
"Research Intern" = /datum/alt_title/intern_sci,
"Security Cadet" = /datum/alt_title/intern_sec,
"Jr. Cargo Tech" = /datum/alt_title/intern_crg,
"Jr. Explorer" = /datum/alt_title/intern_exp,
@@ -34,7 +34,7 @@
/datum/alt_title/intern_eng
title = "Apprentice Engineer"
title_blurb = "An Apprentice Engineer attempts to provide whatever the Engineering department needs. They are not proper Engineers, and are \
often in training to become an Engineer. A Technical Assistant has no real authority."
often in training to become an Engineer. An Apprentice Engineer has no real authority."
title_outfit = /decl/hierarchy/outfit/job/assistant/engineer
/datum/alt_title/intern_med
@@ -44,9 +44,9 @@
title_outfit = /decl/hierarchy/outfit/job/assistant/medic
/datum/alt_title/intern_sci
title = "Lab Assistant"
title_blurb = "A Lab Assistant attempts to provide whatever the Research department needs. They are not proper Scientists, and are \
often in training to become a Scientist. A Lab Assistant has no real authority."
title = "Research Intern"
title_blurb = "A Research Intern attempts to provide whatever the Research department needs. They are not proper Scientists, and are \
often in training to become a Scientist. A Research Intern has no real authority."
title_outfit = /decl/hierarchy/outfit/job/assistant/scientist
/datum/alt_title/intern_sec
@@ -72,11 +72,6 @@
title_blurb = "A Server helps out kitchen and diner staff with various tasks, primarily food delivery. A Server has no real authority."
title_outfit = /decl/hierarchy/outfit/job/service/server
//////////////////////////////////
// Visitor
//////////////////////////////////
/datum/job/intern/New()
..()
if(config)
@@ -89,11 +84,17 @@
else
return list()
//////////////////////////////////
// Visitor
//////////////////////////////////
/datum/job/assistant // Visitor
title = USELESS_JOB
supervisors = "nobody! You don't work here"
job_description = "A Visitor is just there to visit the place. They have no real authority or responsibility."
timeoff_factor = 0
alt_titles = list("Guest" = /datum/alt_title/guest, "Traveler" = /datum/alt_title/traveler)
/datum/job/assistant/New()
..()
@@ -103,3 +104,9 @@
/datum/job/assistant/get_access()
return list()
/datum/alt_title/guest
title = "Guest"
/datum/alt_title/traveler
title = "Traveler"
+34 -5
View File
@@ -2,6 +2,14 @@
disallow_jobhop = TRUE
pto_type = PTO_CIVILIAN
dept_time_required = 80 //Pending something more complicated
alt_titles = list("Overseer"= /datum/alt_title/overseer, "Facility Director" = /datum/alt_title/facility_director, "Chief Supervisor" = /datum/alt_title/chief_supervisor)
/datum/alt_title/facility_director
title = "Facility Director"
/datum/alt_title/chief_supervisor
title = "Chief Supervisor"
/datum/job/hop
disallow_jobhop = TRUE
@@ -10,8 +18,8 @@
departments_managed = list(DEPARTMENT_CIVILIAN, DEPARTMENT_CARGO, DEPARTMENT_PLANET)
dept_time_required = 60
alt_titles = list("Crew Resources Officer" = /datum/alt_title/cro,
"Deputy Director" = /datum/alt_title/deputy_director)
alt_titles = list("Crew Resources Officer" = /datum/alt_title/cro, "Deputy Manager" = /datum/alt_title/deputy_manager, "Staff Manager" = /datum/alt_title/staff_manager,
"Facility Steward" = /datum/alt_title/facility_steward)
access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
@@ -26,9 +34,30 @@
access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_hop, access_RC_announce, access_keycard_auth)
/datum/alt_title/deputy_director
title = "Deputy Director"
/datum/alt_title/deputy_manager
title = "Deputy Manager"
/datum/alt_title/staff_manager
title = "Staff Manager"
/datum/alt_title/facility_steward
title = "Facility Steward"
/datum/job/secretary
disallow_jobhop = TRUE
pto_type = PTO_CIVILIAN
pto_type = PTO_CIVILIAN
alt_titles = list("Command Liaison" = /datum/alt_title/command_liaison, "Bridge Secretary" = /datum/alt_title/bridge_secretary,
"Command Assistant" = /datum/alt_title/command_assistant, "Command Intern" = /datum/alt_title/command_intern)
/datum/alt_title/command_liaison
title = "Command Liaison"
/datum/alt_title/bridge_secretary
title = "Bridge Secretary"
/datum/alt_title/command_assistant
title = "Command Assistant"
/datum/alt_title/command_intern
title = "Command Intern"
+149 -6
View File
@@ -1,34 +1,104 @@
/datum/job/bartender
pto_type = PTO_CIVILIAN
alt_titles = list("Barkeeper" = /datum/alt_title/barkeeper, "Barmaid" = /datum/alt_title/barmaid, "Barista" = /datum/alt_title/barista, "Mixologist" = /datum/alt_title/mixologist)
/datum/alt_title/barkeeper
title = "Barkeeper"
/datum/alt_title/barmaid
title = "Barmaid"
/datum/alt_title/mixologist
title = "Mixologist"
/datum/job/chef
total_positions = 2 //IT TAKES A LOT TO MAKE A STEW
spawn_positions = 2 //A PINCH OF SALT AND LAUGHTER, TOO
pto_type = PTO_CIVILIAN
alt_titles = list("Sous-chef" = /datum/alt_title/souschef,"Cook" = /datum/alt_title/cook, "Kitchen Worker" = /datum/alt_title/kitchen_worker)
/datum/alt_title/souschef
title = "Sous-chef"
/datum/alt_title/kitchen_worker
title = "Kitchen Worker"
title_blurb = "A Kitchen Worker has the same duties, though they may be less experienced."
/datum/job/hydro
spawn_positions = 2
pto_type = PTO_CIVILIAN
alt_titles = list("Hydroponicist" = /datum/alt_title/hydroponicist, "Cultivator" = /datum/alt_title/cultivator, "Farmer" = /datum/alt_title/farmer,
"Gardener" = /datum/alt_title/gardener, "Florist" = /datum/alt_title/florsit)
/datum/alt_title/hydroponicist
title = "Hydroponicist"
/datum/alt_title/cultivator
title = "Cultivator"
/datum/alt_title/farmer
title = "Farmer"
/datum/alt_title/florsit
title = "Florist"
title_blurb = "A Florist may be less professional than their counterparts, and are more likely to tend to the public gardens if they aren't needed elsewhere."
/datum/job/qm
pto_type = PTO_CARGO
dept_time_required = 20
alt_titles = list("Supply Chief" = /datum/alt_title/supply_chief, "Logistics Manager" = /datum/alt_title/logistics_manager)
/datum/alt_title/logistics_manager
title = "Logistics Manager"
/datum/job/cargo_tech
total_positions = 3
spawn_positions = 3
pto_type = PTO_CARGO
alt_titles = list("Cargo Loader" = /datum/alt_title/cargo_loader, "Cargo Handler" = /datum/alt_title/cargo_handler, "Supply Courier" = /datum/alt_title/supply_courier,
"Disposals Sorter" = /datum/alt_title/disposal_sorter)
/datum/alt_title/supply_courier
title = "Supply Courier"
title_blurb = "A Supply Courier is usually tasked with devlivering packages or cargo directly to whoever requires it."
/datum/alt_title/cargo_loader
title = "Cargo Loader"
title_blurb = "A Cargo Loader is usually tasked with more menial labor within Supply department, such as loading and unloading supply shuttle."
/datum/alt_title/cargo_handler
title = "Cargo Handler"
title_blurb = "A Cargo Loader is usually tasked with more menial labor within Supply department, such as loading and unloading supply shuttle."
/datum/alt_title/disposal_sorter
title = "Disposals Sorter"
title_blurb = "A Disposals Sorter is usually tasked with operating disposals delivery system, sorting the trash and tagging parcels for delivery."
/datum/job/mining
total_positions = 4
spawn_positions = 4
pto_type = PTO_CARGO
alt_titles = list("Deep Space Miner" = /datum/alt_title/deep_space_miner, "Drill Technician" = /datum/alt_title/drill_tech, "Prospector" = /datum/alt_title/prospector)
/datum/alt_title/deep_space_miner
title = "Deep Space Miner"
title_blurb = "A Deep Space Miner specializes primarily in mining operations in zero-g environments, mostly in asteroid and debris fields."
/datum/alt_title/prospector
title = "Prospector"
/datum/job/janitor //Lots of janitor substations on station.
total_positions = 3
spawn_positions = 3
alt_titles = list("Custodian" = /datum/alt_title/custodian, "Sanitation Technician" = /datum/alt_title/sanitation_tech, "Maid" = /datum/alt_title/maid)
pto_type = PTO_CIVILIAN
alt_titles = list("Custodian" = /datum/alt_title/custodian, "Sanitation Technician" = /datum/alt_title/sanitation_tech,
"Maid" = /datum/alt_title/maid, "Garbage Collector" = /datum/alt_title/garbage_collector)
/datum/alt_title/sanitation_tech
title = "Sanitation Technician"
@@ -36,26 +106,73 @@
/datum/alt_title/maid
title = "Maid"
/datum/alt_title/garbage_collector
title = "Garbage Collector"
title_blurb = "A Garbage Collector keeps the station clean, though focuses moreso on collecting larger trash, with wet cleaning being secondary task."
/datum/job/librarian
total_positions = 2
spawn_positions = 2
alt_titles = list("Journalist" = /datum/alt_title/journalist, "Writer" = /datum/alt_title/writer, "Historian" = /datum/alt_title/historian, "Professor" = /datum/alt_title/professor)
alt_titles = list("Journalist" = /datum/alt_title/journalist, "Reporter" = /datum/alt_title/reporter, "Writer" = /datum/alt_title/writer,
"Historian" = /datum/alt_title/historian, "Archivist" = /datum/alt_title/archivist, "Professor" = /datum/alt_title/professor,
"Academic" = /datum/alt_title/academic, "Philosopher" = /datum/alt_title/philosopher)
pto_type = PTO_CIVILIAN
/datum/alt_title/reporter
title = "Reporter"
title_blurb = "The Reporter uses the Library as a base of operations, from which they can report the news and goings-on on the station with their camera."
/datum/alt_title/historian
title = "Historian"
title_blurb = "The Historian uses the Library as a base of operation to record any important events occuring on station."
/datum/alt_title/archivist
title = "Archivist"
title_blurb = "The Archivist uses the Library as a base of operation to record any important events occuring on station."
/datum/alt_title/professor
title = "Professor"
title_blurb = "The Professor uses the Library as a base of operations to share their vast knowledge with the crew."
/datum/alt_title/academic
title = "Academic"
title_blurb = "The Academic uses the Library as a base of operations to share their vast knowledge with the crew."
/datum/alt_title/philosopher
title = "Philosopher"
title_blurb = "The Philosopher uses the Library as a base of operation to ruminate on nature of life and other great questions, and share their opinions with the crew."
/datum/job/lawyer
disallow_jobhop = TRUE
pto_type = PTO_CIVILIAN
alt_titles = list("Internal Affairs Liaison" = /datum/alt_title/ia_liaison, "Internal Affairs Delegate" = /datum/alt_title/ia_delegate,
"Internal Affairs Investigator" = /datum/alt_title/ia_investigator)
/datum/alt_title/ia_liaison
title = "Internal Affairs Liaison"
/datum/alt_title/ia_delegate
title = "Internal Affairs Delegate"
/datum/alt_title/ia_investigator
title = "Internal Affairs Investigator"
/datum/job/chaplain
pto_type = PTO_CIVILIAN
alt_titles = list("Missionary" = /datum/alt_title/missionary, "Preacher" = /datum/alt_title/preacher, "Counselor" = /datum/alt_title/counselor, "Guru" = /datum/alt_title/guru)
/datum/alt_title/guru
title = "Guru"
title_blurb = "The Guru primarily tries to offer spiritual guidance to those who come seeking it."
/datum/alt_title/missionary
title = "Missionary"
/datum/alt_title/preacher
title = "Preacher"
@@ -79,17 +196,43 @@
outfit_type = /decl/hierarchy/outfit/job/assistant
job_description = "An entertainer does just that, entertains! Put on plays, play music, sing songs, tell stories, or read your favorite fanfic."
alt_titles = list("Performer" = /datum/alt_title/performer, "Musician" = /datum/alt_title/musician, "Stagehand" = /datum/alt_title/stagehand)
alt_titles = list("Performer" = /datum/alt_title/performer, "Musician" = /datum/alt_title/musician, "Stagehand" = /datum/alt_title/stagehand,
"Actor" = /datum/alt_title/actor, "Dancer" = /datum/alt_title/dancer, "Singer" = /datum/alt_title/singer,
"Magician" = /datum/alt_title/magician, "Comedian" = /datum/alt_title/comedian, "Tragedian" = /datum/alt_title/tragedian)
// Entertainer Alt Titles
/datum/alt_title/actor
title = "Actor"
title_blurb = "An Actor is someone who acts out a role! Whatever sort of character it is, get into it and impress people with power of comedy and tragedy!"
/datum/alt_title/performer
title = "Performer"
title_blurb = "A Performer is someone who performs! Acting, dancing, wrestling, etc!"
title_blurb = "A Performer is someone who performs! Whatever sort of performance will come to your mind, the world's a stage!"
/datum/alt_title/musician
title = "Musician"
title_blurb = "A Musician is someone who makes music! Singing, playing instruments, slam poetry, it's your call!"
title_blurb = "A Musician is someone who makes music with a wide variety of musical instruments!"
/datum/alt_title/stagehand
title = "Stagehand"
title_blurb = "A Stagehand typically performs everything the rest of the entertainers don't. Operate lights, shutters, windows, or narrate through your voicebox!"
title_blurb = "A Stagehand typically performs everything the rest of the entertainers don't. Operate lights, shutters, windows, or narrate through your voicebox!"
/datum/alt_title/dancer
title = "Dancer"
title_blurb = "A Dancer is someone who impresses people through power of their own body! From waltz to breakdance, as long as crowd as cheering!"
/datum/alt_title/singer
title = "Singer"
title_blurb = "A Singer is someone with gift of melodious voice! Impress people with your vocal range!"
/datum/alt_title/magician
title = "Magician"
title_blurb = "A Magician is someone who awes those around them with impossible! Show off your repertoire of magic tricks, while keeping the secret hidden!"
/datum/alt_title/comedian
title = "Comedian"
title_blurb = "A Comedian will focus on making people laugh with the power of wit! Telling jokes, stand-up comedy, you are here to make others smile!"
/datum/alt_title/tragedian
title = "Tragedian"
title_blurb = "A Tragedian will focus on making people think about life and world around them! Life is a tragedy, and who's better to convey its emotions than you?"
+29 -1
View File
@@ -12,10 +12,38 @@
access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_construction,
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload)
alt_titles = list("Head Engineer" = /datum/alt_title/head_engineer, "Foreman" = /datum/alt_title/foreman, "Maintenance Manager" = /datum/alt_title/maintenance_manager)
/datum/alt_title/head_engineer
title = "Head Engineer"
/datum/alt_title/foreman
title = "Foreman"
/datum/alt_title/maintenance_manager
title = "Maintenance Manager"
/datum/job/engineer
pto_type = PTO_ENGINEERING
alt_titles = list("Maintenance Technician" = /datum/alt_title/maint_tech, "Engine Technician" = /datum/alt_title/engine_tech,
"Electrician" = /datum/alt_title/electrician, "Construction Engineer" = /datum/alt_title/construction_engi)
/datum/alt_title/construction_engi
title = "Construction Engineer"
title_blurb = "A Construction Engineer fulfills similar duties to other engineers, but usually occupies spare time with construction of extra facilities in dedicated areas or \
as additions to station layout."
/datum/job/atmos
spawn_positions = 3
pto_type = PTO_ENGINEERING
pto_type = PTO_ENGINEERING
alt_titles = list("Atmospherics Maintainer" = /datum/alt_title/atmos_maint, "Disposals Technician" = /datum/alt_title/disposals_tech)
/datum/alt_title/atmos_maint
title = "Atmospherics Maintainer"
/datum/alt_title/disposals_tech
title = "Disposals Technician"
title_blurb = "A Disposals Technician is an Atmospheric Technician still and can fulfill all the same duties, although specializes more in disposals delivery system's operations and configurations."
+27 -26
View File
@@ -29,6 +29,8 @@ var/const/SAR =(1<<14)
color = "#bab421"
sorting_order = 2 // Same as cargo in importance.
/datum/job/pathfinder
title = "Pathfinder"
flag = PATHFINDER
@@ -50,9 +52,14 @@ var/const/SAR =(1<<14)
minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_gateway)
outfit_type = /decl/hierarchy/outfit/job/pathfinder
job_description = "The Pathfinder's job is to lead and manage expeditions, and is the primary authority on all off-station expeditions."
alt_titles = list("Expedition Lead" = /datum/alt_title/expedition_lead, "Exploration Manager" = /datum/alt_title/exploration_manager)
/datum/alt_title/expedition_lead
title = "Expedition Lead"
/datum/alt_title/exploration_manager
title = "Exploration Manager"
/datum/alt_title/pathfinder
title = "Pathfinder"
/datum/job/pilot
title = "Pilot"
@@ -71,9 +78,15 @@ var/const/SAR =(1<<14)
minimal_access = list(access_pilot)
outfit_type = /decl/hierarchy/outfit/job/pilot
job_description = "A Pilot flies the various shuttles in the Virgo-Erigone System."
alt_titles = list("Co-Pilot" = /datum/alt_title/co_pilot, "Navigator" = /datum/alt_title/navigator)
/datum/alt_title/co_pilot
title = "Co-Pilot"
title_blurb = "A Co-Pilot is there primarily to assist main pilot as well as learn from them"
/datum/alt_title/navigator
title = "Navigator"
/datum/alt_title/pilot
title = "Pilot"
/datum/job/explorer
title = "Explorer"
@@ -91,9 +104,14 @@ var/const/SAR =(1<<14)
minimal_access = list(access_explorer, access_external_airlocks, access_eva)
outfit_type = /decl/hierarchy/outfit/job/explorer2
job_description = "An Explorer searches for interesting things, and returns them to the station."
alt_titles = list("Surveyor" = /datum/alt_title/surveyor, "Offsite Scout" = /datum/alt_title/offsite_scout)
/datum/alt_title/surveyor
title = "Surveyor"
/datum/alt_title/offsite_scout
title = "Offsite Scout"
/datum/alt_title/explorer
title = "Explorer"
/datum/job/sar
title = "Field Medic"
@@ -112,24 +130,7 @@ var/const/SAR =(1<<14)
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_pilot)
outfit_type = /decl/hierarchy/outfit/job/medical/sar
job_description = "A Field medic works as the field doctor of expedition teams."
alt_titles = list("Expedition Medic" = /datum/alt_title/expedition_medic)
/datum/alt_title/field_medic
title = "Field Medic"
/datum/job/offduty_exploration
title = "Off-duty Explorer"
latejoin_only = TRUE
timeoff_factor = -1
total_positions = -1
faction = "Station"
departments = list(DEPARTMENT_OFFDUTY)
supervisors = "nobody! Enjoy your time off"
selection_color = "#999440"
access = list(access_maint_tunnels, access_external_airlocks)
minimal_access = list(access_maint_tunnels, access_external_airlocks)
outfit_type = /decl/hierarchy/outfit/job/assistant/explorer
job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off."
pto_type = PTO_EXPLORATION
/datum/alt_title/offduty_exp
title = "Off-duty Explorer"
/datum/alt_title/expedition_medic
title = "Expedition Medic"
+56 -1
View File
@@ -10,16 +10,71 @@
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels)
alt_titles = list("Chief Physician" = /datum/alt_title/chief_physician, "Medical Director" = /datum/alt_title/medical_director, "Healthcare Manager" = /datum/alt_title/healthcare_manager)
/datum/alt_title/chief_physician
title = "Chief Physician"
/datum/alt_title/medical_director
title = "Medical Director"
/datum/alt_title/healthcare_manager
title = "Healthcare Manager"
/datum/job/doctor
spawn_positions = 5
pto_type = PTO_MEDICAL
alt_titles = list("Physician" = /datum/alt_title/physician, "Medical Practitioner" = /datum/alt_title/medical_practitioner, "Surgeon" = /datum/alt_title/surgeon,
"Emergency Physician" = /datum/alt_title/emergency_physician, "Nurse" = /datum/alt_title/nurse, "Orderly" = /datum/alt_title/orderly,
"Virologist" = /datum/alt_title/virologist)
/datum/alt_title/physician
title = "Physician"
/datum/alt_title/medical_practitioner
title = "Medical Practitioner"
/datum/alt_title/orderly
title = "Orderly"
title_blurb = "An Orderly acts as Medbay's general helping hand, assisting any doctor that might need some form of help, as well as handling manual \
and dirty labor around the department."
title_outfit = /decl/hierarchy/outfit/job/medical/doctor/nurse
/datum/job/chemist
pto_type = PTO_MEDICAL
alt_titles = list("Pharmacist" = /datum/alt_title/pharmacist, "Pharmacologist" = /datum/alt_title/pharmacologist)
/datum/alt_title/pharmacologist
title = "Pharmacologist"
title_blurb = "A Pharmacologist focuses on the chemical needs of the Medical Department, primarily specializing in producing more advanced forms of medicine."
/datum/job/psychiatrist
pto_type = PTO_MEDICAL
alt_titles = list("Psychologist" = /datum/alt_title/psychologist, "Psychoanalyst" = /datum/alt_title/psychoanalyst, "Psychotherapist" = /datum/alt_title/psychotherapist)
/datum/alt_title/psychoanalyst
title = "Psychoanalyst"
title_blurb = "A Psychoanalyst provides mental health services to crew members in need, focusing more on therapy than medication. They may also be \
called upon to determine whatever ails the mentally unwell, frequently under Security supervision."
title_outfit = /decl/hierarchy/outfit/job/medical/psychiatrist/psychologist
/datum/alt_title/psychotherapist
title = "Psychotherapist"
title_blurb = "A Psychotherapist provides mental health services to crew members in need, focusing more on therapy than medication. They may also be \
called upon to determine whatever ails the mentally unwell, frequently under Security supervision."
title_outfit = /decl/hierarchy/outfit/job/medical/psychiatrist/psychologist
/datum/job/paramedic
pto_type = PTO_MEDICAL
pto_type = PTO_MEDICAL
alt_titles = list("Emergency Medical Technician" = /datum/alt_title/emt, "Medical Responder" = /datum/alt_title/medical_responder)
/datum/alt_title/medical_responder
title = "Medical Responder"
title_blurb = "A Medical Responder is primarily concerned with the recovery of patients who are unable to make it to the Medical Department on their \
own. They are capable of keeping a patient stabilized until they reach the hands of someone with more training."
title_outfit = /decl/hierarchy/outfit/job/medical/paramedic/emt
+21 -17
View File
@@ -16,9 +16,7 @@
outfit_type = /decl/hierarchy/outfit/job/assistant/worker
job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off."
pto_type = PTO_CIVILIAN
/datum/alt_title/offduty_civ
title = "Off-duty Worker"
economic_modifier = 2
/datum/job/offduty_cargo
title = "Off-duty Cargo"
@@ -34,9 +32,7 @@
outfit_type = /decl/hierarchy/outfit/job/assistant/cargo
job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off."
pto_type = PTO_CARGO
/datum/alt_title/offduty_crg
title = "Off-duty Cargo"
economic_modifier = 2
/datum/job/offduty_engineering
title = "Off-duty Engineer"
@@ -52,9 +48,7 @@
outfit_type = /decl/hierarchy/outfit/job/assistant/engineer
job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off."
pto_type = PTO_ENGINEERING
/datum/alt_title/offduty_eng
title = "Off-duty Engineer"
economic_modifier = 5
/datum/job/offduty_medical
title = "Off-duty Medic"
@@ -70,9 +64,7 @@
outfit_type = /decl/hierarchy/outfit/job/assistant/medic
job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off."
pto_type = PTO_MEDICAL
/datum/alt_title/offduty_med
title = "Off-duty Medic"
economic_modifier = 5
/datum/job/offduty_science
title = "Off-duty Scientist"
@@ -88,9 +80,7 @@
outfit_type = /decl/hierarchy/outfit/job/assistant/scientist
job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off."
pto_type = PTO_SCIENCE
/datum/alt_title/offduty_sci
title = "Off-duty Scientist"
economic_modifier = 5
/datum/job/offduty_security
title = "Off-duty Officer"
@@ -106,6 +96,20 @@
outfit_type = /decl/hierarchy/outfit/job/assistant/officer
job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off."
pto_type = PTO_SECURITY
economic_modifier = 4
/datum/alt_title/offduty_sec
title = "Off-duty Officer"
/datum/job/offduty_exploration
title = "Off-duty Explorer"
latejoin_only = TRUE
timeoff_factor = -1
total_positions = -1
faction = "Station"
departments = list(DEPARTMENT_OFFDUTY)
supervisors = "nobody! Enjoy your time off"
selection_color = "#999440"
access = list(access_maint_tunnels, access_external_airlocks)
minimal_access = list(access_maint_tunnels, access_external_airlocks)
outfit_type = /decl/hierarchy/outfit/job/assistant/explorer
job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off."
pto_type = PTO_EXPLORATION
economic_modifier = 5
-1
View File
@@ -23,7 +23,6 @@
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_network)
alt_titles = list("Research Supervisor")
minimum_character_age = 25
minimal_player_age = 14
+53 -2
View File
@@ -11,30 +11,77 @@
access_tox_storage, access_teleporter,
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
access_RC_announce, access_keycard_auth, access_tcomsat, access_xenoarch, access_eva, access_network, access_xenobotany)
alt_titles = list("Research Supervisor" = /datum/alt_title/research_supervisor, "Research Manager" = /datum/alt_title/research_manager,
"Head of Development" = /datum/alt_title/head_of_development,"Head Scientist" = /datum/alt_title/head_scientist)
/datum/alt_title/research_manager
title = "Research Manager"
/datum/alt_title/head_of_development
title = "Head of Development"
/datum/alt_title/head_scientist
title = "Head Scientist"
/datum/job/scientist
spawn_positions = 5
pto_type = PTO_SCIENCE
alt_titles = list("Xenoarchaeologist" = /datum/alt_title/xenoarch, "Anomalist" = /datum/alt_title/anomalist, \
"Phoron Researcher" = /datum/alt_title/phoron_research, "Circuit Designer" = /datum/alt_title/circuit_designer)
alt_titles = list("Lab Assistant" = /datum/alt_title/lab_assistant, "Xenoarchaeologist" = /datum/alt_title/xenoarch, "Xenopaleontologist" = /datum/alt_title/xenopaleontologist, \
"Anomalist" = /datum/alt_title/anomalist, "Phoron Researcher" = /datum/alt_title/phoron_research, "Gas Physicist" = /datum/alt_title/gas_physicist, \
"Circuit Designer" = /datum/alt_title/circuit_designer, "Circuit Programmer" = /datum/alt_title/circuit_programmer)
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_xenobotany)
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch) // Unchanged (for now?), mostly here for reference
/datum/alt_title/lab_assistant
title = "Lab Assistant"
title_blurb = "A Lab Assistant is a lower-level member of research staff, whose main purpose is to help scientists with their specialized work in more menial fashion, while also \
learning the specializations in process."
/datum/alt_title/xenopaleontologist
title = "Xenopaleontologist"
title_blurb = "A Xenopaleontologist enters digsites in search of fossils and other ancient remants of alien life. These digsites are frequently in vacuum or other inhospitable \
locations, and as such a Xenopaleontologist should be prepared to handle hostile evironmental conditions."
/datum/alt_title/gas_physicist
title = "Gas Physicist"
title_blurb = "A Gas Physicist is a specialist in various practical applications of gasses, but currently focuses their attention on phoron, and has knowledge of its practical uses and dangers. \
Many Gas Physicists are interested in the combustability and explosive properties of gaseous phoron, as well as the specific hazards \
of working with the substance in that state."
/datum/alt_title/circuit_designer
title = "Circuit Designer"
title_blurb = "A Circuit Designer is a Scientist whose expertise is working with integrated circuits. They are familar with the workings and programming of those devices. \
They work to create various useful devices using the capabilities of integrated circuitry."
/datum/alt_title/circuit_programmer
title = "Circuit Programmer"
title_blurb = "A Circuit Programmer is a Scientist whose expertise is working with integrated circuits. They are familar with the workings and programming of those devices. \
They work to create various useful devices using the capabilities of integrated circuitry."
/datum/job/xenobiologist
spawn_positions = 3
pto_type = PTO_SCIENCE
alt_titles = list("Xenozoologist" = /datum/alt_title/xenozoologist, "Xenoanthropologist" = /datum/alt_title/xenoanthropologist)
/datum/alt_title/xenozoologist
title = "Xenozoologist"
/datum/alt_title/xenoanthropologist
title = "Xenoanthropologist"
title_blurb = "Xenoanthropologist still heavily focuses their study on alien lifeforms, but their specialty leans more towards fellow sapient beings than simple animals."
/datum/job/roboticist
total_positions = 3
pto_type = PTO_SCIENCE
alt_titles = list("Assembly Technician" = /datum/alt_title/assembly_tech, "Biomechanical Engineer" = /datum/alt_title/biomech, "Mechatronic Engineer" = /datum/alt_title/mech_tech)
/datum/alt_title/assembly_tech
title = "Assembly Technician"
//////////////////////////////////
// Xenobotanist
@@ -59,3 +106,7 @@
outfit_type = /decl/hierarchy/outfit/job/science/xenobiologist
job_description = "A Xenobotanist grows and cares for a variety of abnormal, custom made, and frequently dangerous plant life. When the products of these plants \
are both safe and beneficial to the station, they may choose to introduce it to the rest of the crew."
alt_titles = list("Xenoflorist" = /datum/alt_title/xenoflorist)
/datum/alt_title/xenoflorist
title = "Xenoflorist"
+33 -1
View File
@@ -11,15 +11,47 @@
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_construction,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_external_airlocks)
alt_titles = list("Security Commander" = /datum/alt_title/sec_commander, "Chief of Security" = /datum/alt_title/sec_chief, "Security Manager" = /datum/alt_title/security_manager)
/datum/alt_title/security_manager
title = "Security Manager"
/datum/job/warden
pto_type = PTO_SECURITY
dept_time_required = 20
alt_titles = list("Brig Sentry" = /datum/alt_title/brig_sentry, "Armory Superintendent" = /datum/alt_title/armory_superintendent)
/datum/alt_title/brig_sentry
title = "Brig Sentry"
/datum/alt_title/armory_superintendent
title = "Armory Superintendent"
/datum/job/detective
pto_type = PTO_SECURITY
alt_titles = list("Investigator" = /datum/alt_title/investigator, "Security Inspector" = /datum/alt_title/security_inspector, "Forensic Technician" = /datum/alt_title/forensic_tech)
/datum/alt_title/investigator
title = "Investigator"
/datum/alt_title/security_inspector
title = "Security Inspector"
/datum/job/officer
total_positions = 5
spawn_positions = 5
pto_type = PTO_SECURITY
pto_type = PTO_SECURITY
alt_titles = list("Patrol Officer" = /datum/alt_title/patrol_officer, "Security Guard" = /datum/alt_title/security_guard,
"Security Deputy" = /datum/alt_title/security_guard, "Junior Officer" = /datum/alt_title/junior_officer)
/datum/alt_title/patrol_officer
title = "Patrol Officer"
/datum/alt_title/security_guard
title = "Security Guard"
/datum/alt_title/security_deputy
title = "Security Deputy"
+7 -10
View File
@@ -78,18 +78,18 @@
selection_color = "#515151"
economic_modifier = 1
job_description = "A Clown is there to entertain the crew and keep high morale using various harmless pranks and ridiculous jokes!"
alt_titles = list("Clown" = /datum/alt_title/clown, "Jester" = /datum/alt_title/jester)
whitelist_only = 1
latejoin_only = 1
outfit_type = /decl/hierarchy/outfit/job/clown
pto_type = PTO_CIVILIAN
/datum/alt_title/clown
title = "Clown"
alt_titles = list("Jester" = /datum/alt_title/jester, "Fool" = /datum/alt_title/fool)
/datum/alt_title/jester
title = "Jester"
/datum/alt_title/fool
title = "Fool"
/datum/job/clown/get_access()
if(config.assistant_maint)
return list(access_maint_tunnels, access_entertainment)
@@ -108,17 +108,14 @@
selection_color = "#515151"
economic_modifier = 1
job_description = "A Mime is there to entertain the crew and keep high morale using unbelievable performances and acting skills!"
alt_titles = list("Mime" = /datum/alt_title/mime, "Interpretive Dancer" = /datum/alt_title/interpretive_dancer)
alt_titles = list("Poseur" = /datum/alt_title/poseur)
whitelist_only = 1
latejoin_only = 1
outfit_type = /decl/hierarchy/outfit/job/mime
pto_type = PTO_CIVILIAN
/datum/alt_title/mime
title = "Mime"
/datum/alt_title/interpretive_dancer
title = "Interpretive Dancer"
/datum/alt_title/poseur
title = "Poseur"
/datum/job/mime/get_access()
if(config.assistant_maint)
+6 -3
View File
@@ -387,7 +387,7 @@ var/global/datum/controller/occupations/job_master
if(job)
//Equip custom gear loadout.
var/list/custom_equip_slots = list() //If more than one item takes the same slot, all after the first one spawn in storage.
var/list/custom_equip_slots = list()
var/list/custom_equip_leftovers = list()
if(H.client.prefs.gear && H.client.prefs.gear.len && !(job.mob_type & JOB_SILICON))
for(var/thing in H.client.prefs.gear)
@@ -420,14 +420,15 @@ var/global/datum/controller/occupations/job_master
I.implant_loadout(H)
continue
// Try desperately (and sorta poorly) to equip the item
// Try desperately (and sorta poorly) to equip the item. Now with increased desperation!
if(G.slot && !(G.slot in custom_equip_slots))
var/metadata = H.client.prefs.gear[G.display_name]
if(G.slot == slot_wear_mask || G.slot == slot_wear_suit || G.slot == slot_head)
custom_equip_leftovers += thing
else if(H.equip_to_slot_or_del(G.spawn_item(H, metadata), G.slot))
to_chat(H, "<span class='notice'>Equipping you with \the [thing]!</span>")
custom_equip_slots.Add(G.slot)
if(G.slot != slot_tie)
custom_equip_slots.Add(G.slot)
else
custom_equip_leftovers.Add(thing)
else
@@ -540,6 +541,8 @@ var/global/datum/controller/occupations/job_master
// 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]"
+1 -2
View File
@@ -29,8 +29,7 @@
desc = "Used to control various station atmospheric systems. The light indicates the current air status of the area."
icon = 'icons/obj/monitors_vr.dmi' //VOREStation Edit - Other icons
icon_state = "alarm0"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
layer = ABOVE_WINDOW_LAYER
anchored = 1
use_power = USE_POWER_IDLE
idle_power_usage = 80
@@ -136,12 +136,6 @@
else
to_chat(user, "<span class='notice'>Nothing happens.</span>")
return
else if ((istype(W, /obj/item/device/analyzer)) && Adjacent(user))
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
return
return
+2 -2
View File
@@ -313,7 +313,7 @@
/obj/machinery/autolathe/dismantle()
for(var/mat in stored_material)
var/material/M = get_material_by_name(mat)
var/datum/material/M = get_material_by_name(mat)
if(!istype(M))
continue
var/obj/item/stack/material/S = new M.stack_type(get_turf(src))
@@ -327,7 +327,7 @@
/obj/machinery/autolathe/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
var/recursive = amount == -1 ? 1 : 0
var/matstring = lowertext(material)
var/material/M = get_material_by_name(matstring)
var/datum/material/M = get_material_by_name(matstring)
var/obj/item/stack/material/S = M.place_sheet(get_turf(src))
if(amount <= 0)
+1 -2
View File
@@ -2,8 +2,7 @@
name = "button"
icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
// plane = TURF_PLANE //Can't have them under tables, oh well.
// layer = ABOVE_TURF_LAYER
layer = ABOVE_WINDOW_LAYER
desc = "A remote control switch for something."
var/id = null
var/active = 0
+248 -1
View File
@@ -30,7 +30,7 @@
// If it's a generic arcade machine, pick a random arcade
// circuit board for it and make the new machine
if(!circuit)
var/choice = pick(typesof(/obj/item/weapon/circuitboard/arcade) - /obj/item/weapon/circuitboard/arcade)
var/choice = pick(subtypesof(/obj/item/weapon/circuitboard/arcade) - /obj/item/weapon/circuitboard/arcade/clawmachine)
var/obj/item/weapon/circuitboard/CB = new choice()
new CB.build_path(loc, CB)
qdel(src)
@@ -1072,3 +1072,250 @@
#undef ORION_STATUS_NORMAL
#undef ORION_STATUS_GAMEOVER
#undef ORION_STATUS_MARKET
//////////////////
// Claw Machine //
//////////////////
/obj/machinery/computer/arcade/clawmachine
name = "AlliCo Grab-a-Gift"
desc = "Show off your arcade skills for that special someone!"
icon_state = "clawmachine"
icon_keyboard = null
icon_screen = null
circuit = /obj/item/weapon/circuitboard/arcade/clawmachine
prizes = list(/obj/random/plushie)
var/wintick = 0
var/winprob = 0
var/instructions = "Insert 1 thaler or swipe a card to play!"
var/gameStatus = "CLAWMACHINE_NEW"
var/gamepaid = 0
var/gameprice = 1
var/winscreen = ""
/// Payment
/obj/machinery/computer/arcade/clawmachine/attackby(obj/item/I as obj, mob/user as mob)
if(..())
return
if(gamepaid == 0 && vendor_account && !vendor_account.suspended)
var/paid = 0
var/obj/item/weapon/card/id/W = I.GetID()
if(W) //for IDs and PDAs and wallets with IDs
paid = pay_with_card(W,I)
else if(istype(I, /obj/item/weapon/spacecash/ewallet))
var/obj/item/weapon/spacecash/ewallet/C = I
paid = pay_with_ewallet(C)
else if(istype(I, /obj/item/weapon/spacecash))
var/obj/item/weapon/spacecash/C = I
paid = pay_with_cash(C, user)
if(paid)
gamepaid = 1
instructions = "Hit start to play!"
return
return
////// Cash
/obj/machinery/computer/arcade/clawmachine/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, mob/user)
if(!emagged)
if(gameprice > cashmoney.worth)
// This is not a status display message, since it's something the character
// themselves is meant to see BEFORE putting the money in
to_chat(usr, "[bicon(cashmoney)] <span class='warning'>That is not enough money.</span>")
return 0
if(istype(cashmoney, /obj/item/weapon/spacecash))
visible_message("<span class='info'>\The [usr] inserts some cash into \the [src].</span>")
cashmoney.worth -= gameprice
if(cashmoney.worth <= 0)
usr.drop_from_inventory(cashmoney)
qdel(cashmoney)
else
cashmoney.update_icon()
// Machine has no idea who paid with cash
credit_purchase("(cash)")
return 1
if(emagged)
playsound(src, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
to_chat(user, "<span class='info'>It doesn't seem to accept that! Seem you'll need to swipe a valid ID.</span>")
///// Ewallet
/obj/machinery/computer/arcade/clawmachine/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
if(!emagged)
visible_message("<span class='info'>\The [usr] swipes \the [wallet] through \the [src].</span>")
playsound(src, 'sound/machines/id_swipe.ogg', 50, 1)
if(gameprice > wallet.worth)
visible_message("<span class='info'>Insufficient funds.</span>")
return 0
else
wallet.worth -= gameprice
credit_purchase("[wallet.owner_name] (chargecard)")
return 1
if(emagged)
playsound(src, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
to_chat(usr, "<span class='info'>It doesn't seem to accept that! Seem you'll need to swipe a valid ID.</span>")
///// ID
/obj/machinery/computer/arcade/clawmachine/proc/pay_with_card(var/obj/item/weapon/card/id/I, var/obj/item/ID_container)
if(I==ID_container || ID_container == null)
visible_message("<span class='info'>\The [usr] swipes \the [I] through \the [src].</span>")
else
visible_message("<span class='info'>\The [usr] swipes \the [ID_container] through \the [src].</span>")
playsound(src, 'sound/machines/id_swipe.ogg', 50, 1)
var/datum/money_account/customer_account = get_account(I.associated_account_number)
if(!customer_account)
visible_message("<span class='info'>Error: Unable to access account. Please contact technical support if problem persists.</span>")
return 0
if(customer_account.suspended)
visible_message("<span class='info'>Unable to access account: account suspended.</span>")
return 0
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
visible_message("<span class='info'>Unable to access account: incorrect credentials.</span>")
return 0
if(gameprice > customer_account.money)
visible_message("<span class='info'>Insufficient funds in account.</span>")
return 0
else
// Okay to move the money at this point
if(emagged)
gameprice = customer_account.money
// debit money from the purchaser's account
customer_account.money -= gameprice
// create entry in the purchaser's account log
var/datum/transaction/T = new()
T.target_name = "[vendor_account.owner_name] (via [name])"
T.purpose = "Purchase of arcade game([name])"
if(gameprice > 0)
T.amount = "([gameprice])"
else
T.amount = "[gameprice]"
T.source_terminal = name
T.date = current_date_string
T.time = stationtime2text()
customer_account.transaction_log.Add(T)
// Give the vendor the money. We use the account owner name, which means
// that purchases made with stolen/borrowed card will look like the card
// owner made them
credit_purchase(customer_account.owner_name)
return 1
/// Add to vendor account
/obj/machinery/computer/arcade/clawmachine/proc/credit_purchase(var/target as text)
vendor_account.money += gameprice
var/datum/transaction/T = new()
T.target_name = target
T.purpose = "Purchase of arcade game([name])"
T.amount = "[gameprice]"
T.source_terminal = name
T.date = current_date_string
T.time = stationtime2text()
vendor_account.transaction_log.Add(T)
/// End Payment
/obj/machinery/computer/arcade/clawmachine/New()
..()
/obj/machinery/computer/arcade/clawmachine/attack_hand(mob/living/user)
if(..())
return
tgui_interact(user)
/// TGUI Stuff
/obj/machinery/computer/arcade/clawmachine/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "ClawMachine", name, 300, 400, master_ui, state)
ui.autoupdate = TRUE
ui.open()
/obj/machinery/computer/arcade/clawmachine/tgui_data(mob/user)
var/list/data = list()
data["wintick"] = wintick
data["instructions"] = instructions
data["gameStatus"] = gameStatus
data["winscreen"] = winscreen
return data
/obj/machinery/computer/arcade/clawmachine/tgui_act(action, params)
if(..())
return
if(action == "newgame" && gamepaid == 0)
playsound(src, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
if(action == "newgame" && gamepaid == 1)
gameStatus = "CLAWMACHINE_ON"
icon_state = "clawmachine_move"
instructions = "Guide the claw to the prize you want!"
wintick = 0
if(action == "return" && gameStatus == "CLAWMACHINE_END")
gameStatus = "CLAWMACHINE_NEW"
if(action == "pointless" && wintick < 10)
wintick += 1
if(action == "pointless" && wintick >= 10)
instructions = "Insert 1 thaler or swipe a card to play!"
clawvend()
/obj/machinery/computer/arcade/clawmachine/proc/clawvend() /// True to a real claw machine, it's NEARLY impossible to win.
winprob += 1 /// Yeah.
if(prob(winprob)) /// YEAH.
if(!emagged)
prizevend()
winscreen = "You won!"
else if(emagged)
gameprice = 1
emagged = 0
winscreen = "You won...?"
var/obj/item/weapon/grenade/G = new /obj/item/weapon/grenade/explosive(get_turf(src)) /// YEAAAAAAAAAAAAAAAAAAH!!!!!!!!!!
G.activate()
G.throw_at(get_turf(usr),10,10) /// Play stupid games, win stupid prizes.
playsound(src, 'sound/arcade/Ori_win.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
winprob = 0
else
playsound(src, 'sound/arcade/Ori_fail.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
winscreen = "Aw, shucks. Try again!"
wintick = 0
gamepaid = 0
icon_state = "clawmachine"
gameStatus = "CLAWMACHINE_END"
/obj/machinery/computer/arcade/clawmachine/emag_act(mob/user)
if(!emagged)
to_chat(user, "<span class='info'>You modify the claw of the machine. The next one is sure to win! You just have to pay...</span>")
name = "AlliCo Snag-A-Prize"
desc = "Get some goodies, all for you!"
instructions = "Swipe a card to play!"
winprob = 100
gamepaid = 0
wintick = 0
gameStatus = "CLAWMACHINE_NEW"
emagged = 1
return 1
+1 -2
View File
@@ -59,8 +59,7 @@
name = "Telescreen"
desc = "Used for watching an empty arena."
icon_state = "wallframe"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
layer = ABOVE_WINDOW_LAYER
icon_keyboard = null
icon_screen = null
light_range_on = 0
+1 -2
View File
@@ -79,8 +79,7 @@
name = "guest pass terminal"
desc = "Used to print temporary passes for people. Handy!"
icon_state = "guest"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
layer = ABOVE_WINDOW_LAYER
icon_keyboard = null
icon_screen = "pass"
density = 0
@@ -30,14 +30,15 @@
if(..()) return
if(stat & (NOPOWER|BROKEN)) return
if(!inserted) // No point in giving you an option what to do if there's no ID to do things with.
to_chat(user, "<span class='notice'>No ID is inserted.</span>")
return
var/choice = alert(user,"What do you want to do?","[src]","Restore ID access","Eject ID","Cancel")
if(user.incapacitated() || (get_dist(src, user) > 1))
return
switch(choice)
if("Restore ID access")
if(!inserted)
to_chat(user, "<span class='notice'>No ID is inserted.</span>")
return
var/mob/living/carbon/human/H = user
if(!(istype(H)))
to_chat(user, "<span class='warning'>Invalid user detected. Access denied.</span>")
@@ -66,9 +67,6 @@
flick(icon_fail, src)
return
if("Eject ID")
if(!inserted)
to_chat(user, "<span class='notice'>No ID is inserted.</span>")
return
if(ishuman(user))
inserted.forceMove(get_turf(src))
if(!user.get_active_hand())
+1 -1
View File
@@ -137,7 +137,7 @@
fields[++fields.len] = FIELD("Name", active1.fields["name"], null)
fields[++fields.len] = FIELD("ID", active1.fields["id"], null)
fields[++fields.len] = FIELD("Sex", active1.fields["sex"], "sex")
fields[++fields.len] = FIELD("Age", active1.fields["age"], "age")
fields[++fields.len] = FIELD("Age", "[active1.fields["age"]]", "age")
fields[++fields.len] = FIELD("Fingerprint", active1.fields["fingerprint"], "fingerprint")
fields[++fields.len] = FIELD("Physical Status", active1.fields["p_stat"], "p_stat")
fields[++fields.len] = FIELD("Mental Status", active1.fields["m_stat"], "m_stat")
+1 -1
View File
@@ -148,7 +148,7 @@
fields[++fields.len] = FIELD("ID", active1.fields["id"], "id")
fields[++fields.len] = FIELD("Entity Classification", active1.fields["brain_type"], "brain_type")
fields[++fields.len] = FIELD("Sex", active1.fields["sex"], "sex")
fields[++fields.len] = FIELD("Age", active1.fields["age"], "age")
fields[++fields.len] = FIELD("Age", "[active1.fields["age"]]", "age")
fields[++fields.len] = FIELD("Rank", active1.fields["rank"], "rank")
fields[++fields.len] = FIELD("Fingerprint", active1.fields["fingerprint"], "fingerprint")
fields[++fields.len] = FIELD("Physical Status", active1.fields["p_stat"], null)
+1 -1
View File
@@ -14,7 +14,7 @@ Barricades
density = 1.0
var/health = 100
var/maxhealth = 100
var/material/material
var/datum/material/material
/obj/structure/barricade/New(var/newloc, var/material_name)
..(newloc)
@@ -148,6 +148,7 @@ obj/machinery/door/airlock/Destroy()
obj/machinery/airlock_sensor
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_sensor_off"
layer = ABOVE_WINDOW_LAYER
name = "airlock sensor"
desc = "Sends atmospheric readings to a nearby controller."
@@ -233,6 +234,7 @@ obj/machinery/airlock_sensor/airlock_exterior/shuttle/return_air()
obj/machinery/access_button
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "access_button_standby"
layer = ABOVE_WINDOW_LAYER
name = "access button"
anchored = 1
+1 -1
View File
@@ -19,7 +19,7 @@
icon = 'icons/obj/doors/rapid_pdoor.dmi'
icon_state = null
min_force = 20 //minimum amount of force needed to damage the door with a melee weapon
var/material/implicit_material
var/datum/material/implicit_material
// Icon states for different shutter types. Simply change this instead of rewriting the update_icon proc.
var/icon_state_open = null
var/icon_state_opening = null
+1
View File
@@ -22,6 +22,7 @@
name = "Door Timer"
icon = 'icons/obj/status_display.dmi'
icon_state = "frame"
layer = ABOVE_WINDOW_LAYER
desc = "A remote control for a door."
req_access = list(access_brig)
anchored = 1.0 // can't pick it up
@@ -15,6 +15,7 @@
var/list/dummy_terminals = list()
var/cycle_to_external_air = 0
valid_actions = list("cycle_ext", "cycle_int", "force_ext", "force_int", "abort", "purge", "secure")
layer = ABOVE_WINDOW_LAYER
/obj/machinery/embedded_controller/radio/airlock/Destroy()
// TODO - Leshana - Implement dummy terminals
+10
View File
@@ -0,0 +1,10 @@
/obj/structure/event/stage
name = "stage"
desc = "It's a stage!"
icon = 'icons/misc/event/stage.dmi'
icon_state = "stage1"
anchored = 1.0
density = 0
pixel_y = -224
pixel_x = -224
plane = -44
+1 -2
View File
@@ -6,8 +6,7 @@ FIRE ALARM
desc = "<i>\"Pull this in case of emergency\"</i>. Thus, keep pulling it forever."
icon = 'icons/obj/monitors.dmi'
icon_state = "fire0"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
layer = ABOVE_WINDOW_LAYER
var/detecting = 1.0
var/working = 1.0
var/time = 10.0
+1
View File
@@ -4,6 +4,7 @@
desc = "A wall-mounted flashbulb device."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "mflash1"
layer = ABOVE_WINDOW_LAYER
var/id = null
var/range = 2 //this is roughly the size of brig cell
var/disable = 0
+1
View File
@@ -48,6 +48,7 @@
desc = "A wall-mounted ignition device."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "migniter"
layer = ABOVE_WINDOW_LAYER
var/id = null
var/disable = 0
var/last_spark = 0
+1
View File
@@ -6,6 +6,7 @@
desc = "It turns lights on and off. What are you, simple?"
icon = 'icons/obj/power_vr.dmi' // VOREStation Edit
icon_state = "light1"
layer = ABOVE_WINDOW_LAYER
anchored = 1.0
use_power = USE_POWER_IDLE
idle_power_usage = 10
+1
View File
@@ -4,6 +4,7 @@
desc = "Small wall-mounted electronic sign"
icon = 'icons/obj/neonsigns.dmi'
icon_state = "sign_off"
layer = ABOVE_WINDOW_LAYER
plane = MOB_PLANE
use_power = USE_POWER_IDLE
idle_power_usage = 2
+1 -2
View File
@@ -126,8 +126,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
desc = "A standard newsfeed handler for use on commercial space stations. All the news you absolutely have no use for, in one place!"
icon = 'icons/obj/terminals_vr.dmi' //VOREStation Edit
icon_state = "newscaster_normal"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
layer = ABOVE_WINDOW_LAYER
var/isbroken = 0 //1 if someone banged it with something heavy
var/ispowered = 1 //starts powered, changes with power_change()
//var/list/datum/feed_channel/channel_list = list() //This list will contain the names of the feed channels. Each name will refer to a data region where the messages of the feed channels are stored.
+1 -1
View File
@@ -145,7 +145,7 @@
/obj/machinery/pipelayer/proc/eject_metal()
var/amount_ejected = 0
while (metal >= 1)
var/material/M = get_material_by_name(DEFAULT_WALL_MATERIAL)
var/datum/material/M = get_material_by_name(DEFAULT_WALL_MATERIAL)
var/obj/item/stack/material/S = new M.stack_type(get_turf(src))
S.amount = min(metal, S.max_amount)
metal -= S.amount
+24 -2
View File
@@ -1,6 +1,28 @@
/obj/machinery/porta_turret/stationary/CIWS
name = "CIWS turret"
desc = "A ship weapons turret designed for light defense."
req_one_access = list(access_cent_general)
health = 200
maxhealth = 200
enabled = TRUE
lethal = TRUE
check_weapons = TRUE
can_salvage = FALSE
/obj/machinery/porta_turret/stationary/syndie/CIWS
name = "mercenary CIWS turret"
desc = "A ship weapons turret designed for light defense."
req_one_access = list(access_syndicate)
health = 200
maxhealth = 200
enabled = TRUE
lethal = TRUE
check_weapons = TRUE
can_salvage = FALSE
/obj/machinery/porta_turret/industrial/military
name = "military CIWS turret"
desc = "A ship-grade weapons turret designed for anti-fighter defense."
desc = "A ship weapons turret designed for anti-fighter defense."
req_one_access = list(access_cent_general)
installation = /obj/item/weapon/gun/energy/lasercannon
health = 500
@@ -9,4 +31,4 @@
lethal = TRUE
check_weapons = TRUE
auto_repair = TRUE
can_salvage = FALSE
can_salvage = FALSE
+1 -2
View File
@@ -28,8 +28,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
anchored = 1
icon = 'icons/obj/terminals_vr.dmi' //VOREStation Edit
icon_state = "req_comp0"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
layer = ABOVE_WINDOW_LAYER
circuit = /obj/item/weapon/circuitboard/request
var/department = "Unknown" //The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department
var/list/message_log = list() //List of all messages
+2 -2
View File
@@ -13,7 +13,7 @@
icon = 'icons/obj/status_display.dmi'
icon_state = "frame"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
layer = ABOVE_WINDOW_LAYER
name = "status display"
anchored = 1
density = 0
@@ -267,4 +267,4 @@
#undef FOND_SIZE
#undef FONT_COLOR
#undef FONT_STYLE
#undef SCROLL_SPEED
#undef SCROLL_SPEED
+1
View File
@@ -59,6 +59,7 @@ var/list/ai_status_emotions = list(
/obj/machinery/ai_status_display
icon = 'icons/obj/status_display.dmi'
icon_state = "frame"
layer = ABOVE_WINDOW_LAYER
name = "AI display"
anchored = 1
density = 0
+19 -10
View File
@@ -1210,22 +1210,31 @@
//VOREStation Addition End
//END: downstream variant space
if(target_species)
//Making sure all of our items have the sprites to be refitted.
var/helmet_check = ((helmet!=null && (initial(parent_helmet.icon_state) in icon_states(helmet.sprite_sheets_obj[target_species],1))) || helmet==null)
//If the helmet exists, only return true if there's also sprites for it. If the helmet doesn't exist, return true.
var/suit_check = ((suit!=null && (initial(parent_suit.icon_state) in icon_states(suit.sprite_sheets_obj[target_species],1))) || suit==null)
var/suit_helmet_check = ((suit.helmet!=null && (initial(parent_helmet.icon_state) in icon_states(suit.helmet.sprite_sheets_obj[target_species],1))) || suit.helmet==null)
if(helmet_check && suit_check && suit_helmet_check)
//Only run these checks if they have a sprite sheet defined, otherwise they use human's anyways, and there is almost definitely a sprite.
if((helmet!=null&&(target_species in helmet.sprite_sheets_obj))||(suit!=null&&(target_species in suit.sprite_sheets_obj)))
//Making sure all of our items have the sprites to be refitted.
var/helmet_check = ((helmet!=null && (initial(parent_helmet.icon_state) in icon_states(helmet.sprite_sheets_obj[target_species],1))) || helmet==null)
//If the helmet exists, only return true if there's also sprites for it. If the helmet doesn't exist, return true.
var/suit_check = ((suit!=null && (initial(parent_suit.icon_state) in icon_states(suit.sprite_sheets_obj[target_species],1))) || suit==null)
var/suit_helmet_check = ((suit!=null && suit.helmet!=null && (initial(parent_helmet.icon_state) in icon_states(suit.helmet.sprite_sheets_obj[target_species],1))) || suit==null || suit.helmet==null)
if(helmet_check && suit_check && suit_helmet_check)
if(helmet)
helmet.refit_for_species(target_species)
if(suit)
suit.refit_for_species(target_species)
if(suit.helmet)
suit.helmet.refit_for_species(target_species)
else
//If they don't, alert the user and stop here.
T.visible_message("[bicon(src)]<span class='warning'>Unable to apply specified cosmetics with specified species. Please try again with a different species or cosmetic option selected.</span>")
return
else
if(helmet)
helmet.refit_for_species(target_species)
if(suit)
suit.refit_for_species(target_species)
if(suit.helmet)
suit.helmet.refit_for_species(target_species)
else
//If they don't, alert the user and stop here.
T.visible_message("[bicon(src)]<span class='warning'>Unable to apply specified cosmetics with specified species. Please try again with a different species or cosmetic option selected.</span>")
return
//look at this! isn't it beautiful? -KK (well ok not beautiful but it's a lot cleaner)
if(helmet && target_department != "No Change")
var/obj/item/clothing/H = new parent_helmet
+3 -4
View File
@@ -458,13 +458,9 @@ GLOBAL_LIST_EMPTY(vending_products)
if(!can_buy(R, usr))
return
vend_ready = FALSE // From this point onwards, vendor is locked to performing this transaction only, until it is resolved.
if(R.price <= 0)
vend(R, usr)
add_fingerprint(usr)
vend_ready = TRUE
return TRUE
if(issilicon(usr)) //If the item is not free, provide feedback if a synth is trying to buy something.
@@ -473,6 +469,9 @@ GLOBAL_LIST_EMPTY(vending_products)
if(!ishuman(usr))
return
vend_ready = FALSE // From this point onwards, vendor is locked to performing this transaction only, until it is resolved.
var/mob/living/carbon/human/H = usr
var/obj/item/weapon/card/id/C = H.GetIdCard()
+52
View File
@@ -396,6 +396,7 @@
description_fluff = "NanoMed is NanoTrasen's medical science division, and provides almost all of the modern medbay essentials in-house at no extra charge. By using this vending machine, employees accept liability for products that may or may not be temporarily replaced by placebos or experimental treatments."
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?"
icon_state = "wallmed"
layer = ABOVE_WINDOW_LAYER
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
products = list(/obj/item/stack/medical/bruise_pack = 2,
/obj/item/stack/medical/ointment = 2,
@@ -413,6 +414,7 @@
desc = "A wall-mounted version of the NanoMed, containing only vital first aid equipment."
description_fluff = "NanoMed is NanoTrasen's medical science division, and provides almost all of the modern medbay essentials in-house at no extra charge. By using this vending machine, employees accept liability for products that may or may not be temporarily replaced by placebos or experimental treatments."
icon_state = "wallmed"
layer = ABOVE_WINDOW_LAYER
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
products = list(/obj/item/weapon/reagent_containers/hypospray/autoinjector = 5,
/obj/item/weapon/reagent_containers/syringe/antitoxin = 3,
@@ -814,3 +816,53 @@
/obj/item/stack/cable_coil/random = 4)
premium = list(/obj/item/weapon/storage/box/wormcan/deluxe = 1)
contraband = list(/obj/item/weapon/storage/box/wormcan/deluxe = 1)
/obj/machinery/vending/virtual_autodrobe
name = "Virtual AutoDrobe"
desc = "A virtual vending machine for virtual avatar customization."
icon_state = "Theater"
product_slogans = "Dress for success!;Suited and booted!;It's show time!;Why leave style up to fate? Use AutoDrobe!"
products = list(/obj/item/weapon/storage/box/syndie_kit/chameleon = 20)
/obj/machinery/vending/deathmatch
name = "Annihilation Shop (Green)"
desc = "A virtual vending machine for virtual murder equipment. This one's for green team."
products = list(/obj/item/weapon/melee/energy/sword = 5,
/obj/item/weapon/melee/energy/axe = 5,
/obj/item/weapon/melee/baton/loaded = 5,
/obj/item/weapon/gun/energy/laser = 5,
/obj/item/weapon/gun/projectile/shotgun/pump/combat = 5,
/obj/item/ammo_magazine/clip/c12g/pellet = 40,
/obj/item/ammo_magazine/clip/c12g = 50,
/obj/item/weapon/storage/box/flashbangs = 2,
/obj/item/clothing/head/helmet/swat = 5,
/obj/item/clothing/suit/armor/vest = 5,
/obj/item/clothing/head/helmet/thunderdome = 5,
/obj/item/clothing/shoes/brown = 5,
/obj/item/clothing/suit/armor/tdome/green = 5,
/obj/item/clothing/under/color/green = 5,
/obj/item/weapon/reagent_containers/pill/adminordrazine = 10,
/obj/item/weapon/tool/crowbar = 1)
/obj/machinery/vending/deathmatch/red
name = "Annihilation Shop (Red)"
desc = "A virtual vending machine for virtual murder equipment. This one's for red team."
products = list(/obj/item/weapon/melee/energy/sword = 5,
/obj/item/weapon/melee/energy/axe = 5,
/obj/item/weapon/melee/baton/loaded = 5,
/obj/item/weapon/gun/energy/laser = 5,
/obj/item/weapon/gun/projectile/shotgun/pump/combat = 5,
/obj/item/ammo_magazine/clip/c12g/pellet = 40,
/obj/item/ammo_magazine/clip/c12g = 50,
/obj/item/weapon/storage/box/flashbangs = 2,
/obj/item/clothing/head/helmet/swat = 5,
/obj/item/clothing/suit/armor/vest = 5,
/obj/item/clothing/head/helmet/thunderdome = 5,
/obj/item/clothing/shoes/brown = 5,
/obj/item/clothing/suit/armor/tdome/red = 5,
/obj/item/clothing/under/color/red = 5,
/obj/item/weapon/reagent_containers/pill/adminordrazine = 10,
/obj/item/weapon/tool/crowbar = 1)
File diff suppressed because it is too large Load Diff
+10 -5
View File
@@ -32,7 +32,7 @@
/obj/machinery/washing_machine/Initialize()
. = ..()
default_apply_parts()
/obj/machinery/washing_machine/AltClick()
start()
@@ -67,9 +67,14 @@
//Tanning!
for(var/obj/item/stack/hairlesshide/HH in washing)
var/obj/item/stack/wetleather/WL = new(src)
WL.amount = HH.amount
qdel(HH)
var/obj/item/stack/WL = new HH.wet_type(src)
if(istype(WL))
WL.amount = HH.amount
washing -= HH
HH.forceMove(get_turf(src))
HH.use(HH.amount)
washing += WL
if(locate(/mob,washing))
state = 7
@@ -130,7 +135,7 @@
to_chat(user, "<span class='warning'>You can't fit \the [W] inside.</span>")
return
else if(istype(W, /obj/item/clothing) || istype(W, /obj/item/weapon/bedsheet))
else if(istype(W, /obj/item/clothing) || istype(W, /obj/item/weapon/bedsheet) || istype(W, /obj/item/stack/hairlesshide))
if(washing.len < 5)
if(state in list(1, 3))
user.drop_item()
+2
View File
@@ -17,6 +17,8 @@
max_special_equip = 1
cargo_capacity = 1
encumbrance_gap = 1.5
starting_components = list(
/obj/item/mecha_parts/component/hull/durable,
/obj/item/mecha_parts/component/actuator,
+2
View File
@@ -13,6 +13,8 @@
icon_state = ""
initial_icon = ""
dir_in = null //Don't reset direction when empty
step_in = 2 //Fast
health = 400
+2
View File
@@ -25,6 +25,8 @@
max_universal_equip = 3
max_special_equip = 4
encumbrance_gap = 2
starting_components = list(
/obj/item/mecha_parts/component/hull/durable,
/obj/item/mecha_parts/component/actuator,
+1 -1
View File
@@ -659,7 +659,7 @@
/obj/machinery/mecha_part_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
var/recursive = amount == -1 ? 1 : 0
var/matstring = lowertext(material)
var/material/M = get_material_by_name(matstring)
var/datum/material/M = get_material_by_name(matstring)
var/obj/item/stack/material/S = M.place_sheet(get_turf(src))
if(amount <= 0)
+17 -7
View File
@@ -31,7 +31,10 @@
var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items)
var/can_move = 1
var/mob/living/carbon/occupant = null
var/step_in = 10 //Make a step in step_in/10 sec.
var/encumbrance_gap = 1 //How many points of slowdown are negated from equipment? Added to the mech's base step_in.
var/dir_in = 2 //What direction will the mech face when entered/powered on? Defaults to South.
var/step_energy_drain = 10
var/health = 300 //Health is health
@@ -193,6 +196,7 @@
var/datum/action/innate/mecha/mech_toggle_cloaking/cloak_action = new
var/weapons_only_cycle = FALSE //So combat mechs don't switch to their equipment at times.
/obj/mecha/Initialize()
..()
@@ -641,18 +645,21 @@
/obj/mecha/proc/get_step_delay()
var/tally = 0
if(overload)
tally = min(1, round(step_in/2))
if(LAZYLEN(equipment))
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
if(ME.get_step_delay())
tally += ME.get_step_delay()
if(tally <= encumbrance_gap) // If the total is less than our encumbrance gap, ignore equipment weight.
tally = 0
else // Otherwise, start the tally after cutting that gap out.
tally -= encumbrance_gap
for(var/slot in internal_components)
var/obj/item/mecha_parts/component/C = internal_components[slot]
if(C && C.get_step_delay())
tally += C.get_step_delay()
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
if(ME.get_step_delay())
tally += ME.get_step_delay()
var/obj/item/mecha_parts/component/actuator/actuator = internal_components[MECH_ACTUATOR]
if(!actuator) // Relying purely on hydraulic pumps. You're going nowhere fast.
@@ -674,7 +681,10 @@
break
break
return max(1, round(tally, 0.1))
if(overload) // At the end, because this would normally just make the mech *slower* since tally wasn't starting at 0.
tally = min(1, round(tally/2))
return max(1, round(tally, 0.1)) // Round the total to the nearest 10th. Can't go lower than 1 tick. Even humans have a delay longer than that.
/obj/mecha/proc/dyndomove(direction)
if(!can_move)
+2
View File
@@ -14,6 +14,8 @@
minimum_penetration = 10
encumbrance_gap = 2
starting_components = list(
/obj/item/mecha_parts/component/hull/durable,
/obj/item/mecha_parts/component/actuator,
@@ -86,3 +86,23 @@
icon_state = "dwposter11"
name = "Secgun"
desc = "A striking, wordless advertisement for NanoTrasen's security department. It wasn't very effective and just seems to be used as a warning sign."
/datum/poster/vore_25
icon_state = "sbsposter14"
name = "Awoo"
desc = "A top contender for 'images you can hear'."
/datum/poster/vore_26
icon_state = "sbsposter15"
name = "LikeEmSmall"
desc = "An advertisement for a defunct dating service for normal-sized individuals to find micro partners."
/datum/poster/vore_27
icon_state = "sbsposter16"
name = "Borgar"
desc = "What do you want from Space McDonalds?"
/datum/poster/vore_28
icon_state = "sbsposter17"
name = "DiveIn"
desc = "A limited edition holographic poster that seems to feature subliminal suggestions and conditioning."
/datum/poster/vore_29
icon_state = "sbsposter18"
name = "Perdition"
desc = "You get the feeling that whomever made this intended for you to feel very differently than you do when you look at it."

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