mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-27 07:08:55 +01:00
Merge branch 'master' of https://github.com/VOREStation/VOREStation
# Conflicts: # code/game/area/Away Mission areas.dm # code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm # config/custom_items.txt
This commit is contained in:
@@ -41,9 +41,10 @@ Any code submissions that do not meet our coding standards are likely to be reje
|
||||
* When changing any code in any stock Polaris .DM file, you must mark your changes:
|
||||
* For single-line changes: //VOREStation Edit - "Explanation" (Edit can also be Add for new lines or Removal if you are commenting the line out)
|
||||
* For multi-line additions: //VOREStation Edit - "Explanation" and then at the bottom of your changes, //VOREStation Edit End
|
||||
* For multi-like removals: Use a block comment (/\* xxx \*/) to comment out the existing code block (do not modify whitespace more than necessary) and at the start, it should contain /\* VOREStation Removal - "Reason"
|
||||
* For multi-line removals: Use a block comment (/\* xxx \*/) to comment out the existing code block (do not modify whitespace more than necessary) and at the start, it should contain /\* VOREStation Removal - "Reason"
|
||||
* Change whitespace as little as possible. Do not randomly add/remove whitespace.
|
||||
* Any new files should have "_vr" at the end. For example, "life_vr.dm". Just make them in the same location as the file they are related to.
|
||||
* Map changes must be in tgm format. See the [Mapmerge2 Readme] for details.
|
||||
|
||||
The `attempt_vr()` proc has been added for your convienence. It allows a many-line change to become a single-line change in the existing Polaris files, preserving mergeability and allowing better code separation while preventing your new code from causing runtimes that stop the original code from running. If you are wanting to inject new procedures into an existing proc, called `update_atoms()` for example, you would create `update_atoms_vr()` in a nearby `_vr.dm` file, and then call to it from a single line in the original `update_atoms()` with `attempt_vr()`.
|
||||
|
||||
@@ -76,3 +77,5 @@ VOREStation is licensed under the GNU Affero General Public License version 3, w
|
||||
Commits with a git authorship date prior to `1420675200 +0000` (2015/01/08 00:00) are licensed under the GNU General Public License version 3, which can be found in full in LICENSE-GPL3.txt.
|
||||
|
||||
All commits whose authorship dates are not prior to `1420675200 +0000` are assumed to be licensed under AGPL v3, if you wish to license under GPL v3 please make this clear in the commit message and any added files.
|
||||
|
||||
[Mapmerge2 Readme]: ../tools/mapmerge2/readme.md
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
# vorestation
|
||||
# VOREStation
|
||||
|
||||
[Forums](http://forum.vore-station.net/) - [Wiki](http://wiki.vore-station.net/)
|
||||
[](http://forthebadge.com) [](http://forthebadge.com) [](http://forthebadge.com)
|
||||
|
||||
VOREStation is a fork of the Polaris code branch, itself a fork of the Baystation12 code branch, for the game Spacestation13.
|
||||
[Website](https://vore-station.net) - [Forums](https://forum.vore-station.net/) - [Wiki](https://wiki.vore-station.net/)
|
||||
|
||||
Going to make a Pull Request? Make sure you read the [CONTRIBUTING.md](.github/CONTRIBUTING.md) first!
|
||||
|
||||
VOREStation is a fork of the Polaris code branch, itself a fork of the Baystation12 code branch, for the game Space Station 13.
|
||||
|
||||
---
|
||||
|
||||
@@ -20,7 +24,7 @@ See [here](https://www.gnu.org/licenses/why-affero-gpl.html) for more informatio
|
||||
All assets including icons and sound are under a [CC BY-SA 3.0](http://creativecommons.org/licenses/by-sa/3.0/) license unless otherwise indicated.
|
||||
|
||||
### GETTING THE CODE
|
||||
The simplest way to obtain the code is using the github .zip feature.
|
||||
The simplest way to obtain the code is using the github .zip feature. If you do this, you won't be able to make a Pull Request later, though. You'll need to use the git method.
|
||||
|
||||
Click [here](https://github.com/VOREStation/VOREStation/archive/master.zip) to get the latest code as a .zip file, then unzip it to wherever you want.
|
||||
|
||||
@@ -32,13 +36,6 @@ The more complicated and easier to update method is using git. You'll need to d
|
||||
|
||||
This will take a while to download, but it provides an easier method for updating.
|
||||
|
||||
Once the repository is in place, run this command:
|
||||
```bash
|
||||
cd VOREStation
|
||||
git update-index --assume-unchanged vorestation.int
|
||||
```
|
||||
Now git will ignore changes to the file vorestation.int.
|
||||
|
||||
### INSTALLATION
|
||||
|
||||
First-time installation should be fairly straightforward. First, you'll need BYOND installed. You can get it from [here](http://www.byond.com/).
|
||||
@@ -53,7 +50,7 @@ If you see any errors or warnings, something has gone wrong - possibly a corrupt
|
||||
|
||||
Once that's done, open up the config folder. You'll want to edit config.txt to set the probabilities for different gamemodes in Secret and to set your server location so that all your players don't get disconnected at the end of each round. It's recommended you don't turn on the gamemodes with probability 0, as they have various issues and aren't currently being tested, so they may have unknown and bizarre bugs.
|
||||
|
||||
You'll also want to edit admins.txt to remove the default admins and add your own. "Game Master" is the highest level of access, and the other recommended admin levels for now are "Game Admin" and "Moderator". The format is:
|
||||
You'll also want to edit admins.txt to remove the default admins and add your own. "Host" is the highest level of access, and the other recommended admin levels for now are "Game Admin" and "Moderator". The format is:
|
||||
|
||||
byondkey - Rank
|
||||
|
||||
@@ -88,10 +85,4 @@ For a basic setup, simply copy every file from config/example to config.
|
||||
|
||||
### SQL Setup
|
||||
|
||||
The SQL backend for the library and stats tracking requires a MySQL server. Your server details go in /config/dbconfig.txt, and the SQL schema is in /SQL/tgstation_schema.sql. More detailed setup instructions arecoming soon, for now ask in our IRC channel.
|
||||
|
||||
---
|
||||
|
||||
### IRC Bot Setup
|
||||
|
||||
Included in the repo is an IRC bot capable of relaying adminhelps to a specified IRC channel/server (thanks to Skibiliano). Instructions for bot setup are included in the /bot/ folder along with the bot/relay script itself.
|
||||
The SQL backend for the library and stats tracking requires a MySQL server. Your server details go in /config/dbconfig.txt, and the SQL schema is in /SQL/tgstation_schema.sql. More detailed setup instructions arecoming soon, for now ask in our Discord.
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
ui.set_auto_update(1) // auto update every Master Controller tick
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
@@ -129,8 +129,9 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/trinary/atmos_filter/initialize()
|
||||
set_frequency(frequency)
|
||||
..()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/atmos_filter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/digital/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -458,7 +458,7 @@
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/mirrored/digital/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
@@ -123,9 +123,9 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/initialize()
|
||||
..()
|
||||
|
||||
set_frequency(frequency)
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
|
||||
@@ -94,6 +94,22 @@
|
||||
..()
|
||||
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 800
|
||||
|
||||
// VOREStation Edit Start - Wall mounted vents
|
||||
/obj/machinery/atmospherics/unary/vent_pump/high_volume/wall_mounted
|
||||
name = "Wall Mounted Air Vent"
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/high_volume/wall_mounted/can_unwrench()
|
||||
return FALSE // No way to construct these, so don't let them be removed.
|
||||
|
||||
// Return the air from the turf in "front" of us (opposite the way the pipe is facing)
|
||||
/obj/machinery/atmospherics/unary/vent_pump/high_volume/wall_mounted/return_air()
|
||||
var/turf/T = get_step(src, reverse_dir[dir])
|
||||
if(isnull(T))
|
||||
return ..()
|
||||
return T.return_air()
|
||||
|
||||
// VOREStation Edit End
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/engine
|
||||
name = "Engine Core Vent"
|
||||
power_channel = ENVIRON
|
||||
@@ -165,7 +181,7 @@
|
||||
if(!can_pump())
|
||||
return 0
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/environment = return_air() // VOREStation Edit - Use our own proc
|
||||
|
||||
var/power_draw = -1
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/valve/digital/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
@@ -40,10 +40,6 @@ What is the naming convention for planes or layers?
|
||||
|
||||
*/
|
||||
|
||||
#define PLANE_ADMIN1 -92 //Purely for shenanigans
|
||||
#define PLANE_ADMIN2 -91 //And adminbuse
|
||||
#define PLANE_ADMIN3 -90 //And generating salt
|
||||
|
||||
#define SPACE_PLANE -32 // Reserved for use in space/parallax
|
||||
#define PARALLAX_PLANE -30 // Reserved for use in space/parallax
|
||||
|
||||
@@ -74,6 +70,8 @@ What is the naming convention for planes or layers?
|
||||
#define HUD_LAYER 20 //Above lighting, but below obfuscation. For in-game HUD effects (whereas SCREEN_LAYER is for abstract/OOC things like inventory slots)
|
||||
#define SCREEN_LAYER 22 //Mob HUD/effects layer
|
||||
|
||||
#define PLANE_ADMIN1 3 //Purely for shenanigans (below lighting)
|
||||
|
||||
#define PLANE_LIGHTING 5 //Where the lighting (and darkness) lives
|
||||
#define PLANE_LIGHTING_ABOVE 6 //For glowy eyes etc. that shouldn't be affected by darkness
|
||||
|
||||
@@ -94,6 +92,8 @@ What is the naming convention for planes or layers?
|
||||
|
||||
#define PLANE_MESONS 30 //Stuff seen with mesons, like open ceilings. This is 30 for downstreams.
|
||||
|
||||
#define PLANE_ADMIN2 33 //Purely for shenanigans (above lighting)
|
||||
|
||||
//Fullscreen overlays under inventory
|
||||
#define PLANE_FULLSCREEN 90 //Blindness, mesons, druggy, etc
|
||||
#define OBFUSCATION_LAYER 5 //Where images covering the view for eyes are put
|
||||
@@ -110,6 +110,8 @@ What is the naming convention for planes or layers?
|
||||
#define LAYER_HUD_ABOVE 4 //Things that reside above items (highlights)
|
||||
#define PLANE_PLAYER_HUD_ITEMS 96 //Separate layer with which to apply colorblindness
|
||||
|
||||
#define PLANE_ADMIN3 99 //Purely for shenanigans (above HUD)
|
||||
|
||||
|
||||
//////////////////////////
|
||||
/atom/proc/hud_layerise()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// "Character HUDs", aka HUDs, but not the game's UI. Things like medhuds.
|
||||
#define PLANE_CH_HEALTH_VR 27 //Hidden healthbar when at full health
|
||||
#define PLANE_CH_STATUS_R 28 //Right-side status icon
|
||||
#define PLANE_CH_BACKUP 29 //Backup implant
|
||||
#define PLANE_CH_VANTAG 30 //Vore Antag hud
|
||||
#define PLANE_CH_HEALTH_VR 26 //Hidden healthbar when at full health
|
||||
#define PLANE_CH_STATUS_R 27 //Right-side status icon
|
||||
#define PLANE_CH_BACKUP 28 //Backup implant
|
||||
#define PLANE_CH_VANTAG 29 //Vore Antag hud
|
||||
|
||||
#define PLANE_AUGMENTED 40 //Augmented-reality plane
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#define GLOBAL_PROC "some_magic_bullshit"
|
||||
|
||||
#define CALLBACK new /datum/callback
|
||||
#define INVOKE_ASYNC world.ImmediateInvokeAsync
|
||||
@@ -18,5 +18,6 @@
|
||||
#define GC_QUEUED_FOR_HARD_DEL -2
|
||||
#define GC_CURRENTLY_BEING_QDELETED -3
|
||||
|
||||
#define QDELING(X) (X.gc_destroyed)
|
||||
#define QDELETED(X) (!X || X.gc_destroyed)
|
||||
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
|
||||
@@ -1,4 +1,12 @@
|
||||
|
||||
#define INITIALIZATION_INSSATOMS 0 //New should not call Initialize
|
||||
#define INITIALIZATION_INNEW_MAPLOAD 1 //New should call Initialize(TRUE)
|
||||
#define INITIALIZATION_INNEW_REGULAR 2 //New should call Initialize(FALSE)
|
||||
|
||||
#define INITIALIZE_HINT_NORMAL 0 //Nothing happens
|
||||
#define INITIALIZE_HINT_LATELOAD 1 //Call LateInitialize
|
||||
#define INITIALIZE_HINT_QDEL 2 //Call qdel on the atom
|
||||
|
||||
// SS runlevels
|
||||
|
||||
#define RUNLEVEL_INIT 0 // "Initialize Only" - Used for subsystems that should never be fired (Should also have SS_NO_FIRE set)
|
||||
@@ -16,6 +24,10 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
||||
// Subsystems shutdown in the reverse of the order they initialize in
|
||||
// The numbers just define the ordering, they are meaningless otherwise.
|
||||
#define INIT_ORDER_MAPPING 20 // VOREStation Edit
|
||||
#define INIT_ORDER_DECALS 16
|
||||
#define INIT_ORDER_ATOMS 15
|
||||
#define INIT_ORDER_MACHINES 10
|
||||
#define INIT_ORDER_SHUTTLES 3
|
||||
#define INIT_ORDER_LIGHTING 0
|
||||
#define INIT_ORDER_AIR -1
|
||||
#define INIT_ORDER_XENOARCH -20
|
||||
|
||||
@@ -123,6 +123,42 @@ var/global/list/tf_egg_types = list(
|
||||
"Xenochimera" = /obj/structure/closet/secure_closet/egg/scree,
|
||||
"Xenomorph" = /obj/structure/closet/secure_closet/egg/xenomorph)
|
||||
|
||||
var/global/list/edible_trash = list(/obj/item/trash,
|
||||
/obj/item/device/flashlight,
|
||||
/obj/item/toy/figure,
|
||||
/obj/item/weapon/cigbutt,
|
||||
/obj/item/weapon/bananapeel,
|
||||
/obj/item/stack/material/cardboard,
|
||||
/obj/item/weapon/light,
|
||||
/obj/item/weapon/paper,
|
||||
/obj/item/weapon/broken_bottle,
|
||||
/obj/item/weapon/reagent_containers/food,
|
||||
/obj/item/inflatable/torn,
|
||||
/obj/item/weapon/flame/match,
|
||||
/obj/item/clothing/mask/smokable,
|
||||
/obj/item/weapon/storage/wallet,
|
||||
/obj/item/weapon/spacecash,
|
||||
/obj/item/broken_device,
|
||||
/obj/item/weapon/corncob,
|
||||
/obj/item/weapon/paperplane,
|
||||
/obj/item/weapon/pen,
|
||||
/obj/item/weapon/photo,
|
||||
/obj/item/weapon/storage/box/wings,
|
||||
/obj/item/weapon/storage/box/matches,
|
||||
/obj/item/weapon/storage/fancy/cigarettes,
|
||||
/obj/item/weapon/storage/fancy/egg_box,
|
||||
/obj/item/weapon/storage/fancy/candle_box,
|
||||
/obj/item/weapon/storage/fancy/crayons,
|
||||
/obj/item/weapon/dice,
|
||||
/obj/item/weapon/newspaper,
|
||||
/obj/item/weapon/reagent_containers/glass/rag,
|
||||
/obj/item/weapon/lipstick,
|
||||
/obj/item/weapon/soap,
|
||||
/obj/item/weapon/material/shard,
|
||||
/obj/item/device/paicard,
|
||||
/obj/item/device/mmi/digital/posibrain,
|
||||
/obj/item/device/aicard)
|
||||
|
||||
/hook/startup/proc/init_vore_datum_ref_lists()
|
||||
var/paths
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
/datum/controller/process/Shuttle/setup()
|
||||
name = "shuttle controller"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
|
||||
if(!shuttle_controller)
|
||||
shuttle_controller = new
|
||||
|
||||
/datum/controller/process/Shuttle/doWork()
|
||||
shuttle_controller.process()
|
||||
@@ -7,8 +7,30 @@
|
||||
for(last_object in clients)
|
||||
var/client/C = last_object
|
||||
if(C.is_afk(config.kick_inactive MINUTES))
|
||||
if(!istype(C.mob, /mob/observer/dead))
|
||||
log_access("AFK: [key_name(C)]")
|
||||
C << "<SPAN CLASS='warning'>You have been inactive for more than [config.kick_inactive] minute\s and have been disconnected.</SPAN>"
|
||||
del(C) // Don't qdel, cannot override finalize_qdel behaviour for clients.
|
||||
if(!istype(C.mob, /mob/observer/dead) && !istype(C.mob, /mob/new_player))
|
||||
to_chat(C,"<span class='warning'>You have been inactive for more than [config.kick_inactive] minute\s and have been disconnected.</span>")
|
||||
var/information
|
||||
|
||||
if(ishuman(C.mob))
|
||||
var/job
|
||||
var/mob/living/carbon/human/H = C.mob
|
||||
var/datum/data/record/R = find_general_record("name", H.real_name)
|
||||
if(R)
|
||||
job = R.fields["real_rank"]
|
||||
if(!job && H.mind)
|
||||
job = H.mind.assigned_role
|
||||
if(!job && H.job)
|
||||
job = H.job
|
||||
if(job)
|
||||
information = " while [job]."
|
||||
|
||||
else if(issilicon(C.mob))
|
||||
information = " while a silicon."
|
||||
|
||||
var/adminlinks
|
||||
adminlinks = " (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[C.mob.x];Y=[C.mob.y];Z=[C.mob.z]'>JMP</a>|<A HREF='?_src_=holder;cryoplayer=\ref[C.mob]'>CRYO</a>)"
|
||||
|
||||
log_and_message_admins("being kicked for AFK[information][adminlinks]", C.mob)
|
||||
|
||||
qdel(C)
|
||||
SCHECK
|
||||
|
||||
@@ -36,22 +36,22 @@ datum/controller/game_controller/New()
|
||||
datum/controller/game_controller/proc/setup()
|
||||
|
||||
setup_objects()
|
||||
setupgenetics()
|
||||
SetupXenoarch()
|
||||
// setupgenetics() Moved to SSatoms
|
||||
// SetupXenoarch() - Moved to SSxenoarch
|
||||
|
||||
transfer_controller = new
|
||||
admin_notice("<span class='danger'>Initializations complete.</span>", R_DEBUG)
|
||||
|
||||
#if UNIT_TEST
|
||||
#define CHECK_SLEEP_MASTER // For unit tests we don't care about a smooth lobby screen experience. We care about speed.
|
||||
#else
|
||||
#define CHECK_SLEEP_MASTER if(++initialized_objects > 500) { initialized_objects=0;sleep(world.tick_lag); }
|
||||
#endif
|
||||
// #if UNIT_TEST
|
||||
// #define CHECK_SLEEP_MASTER // For unit tests we don't care about a smooth lobby screen experience. We care about speed.
|
||||
// #else
|
||||
// #define CHECK_SLEEP_MASTER if(++initialized_objects > 500) { initialized_objects=0;sleep(world.tick_lag); }
|
||||
// #endif
|
||||
|
||||
datum/controller/game_controller/proc/setup_objects()
|
||||
#if !UNIT_TEST
|
||||
var/initialized_objects = 0
|
||||
#endif
|
||||
// #if !UNIT_TEST
|
||||
// var/initialized_objects = 0
|
||||
// #endif
|
||||
|
||||
// Set up antagonists.
|
||||
populate_antag_type_list()
|
||||
@@ -59,7 +59,8 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
//Set up spawn points.
|
||||
populate_spawn_points()
|
||||
|
||||
to_world_log("Initializing Floor Decals") // VOREStation Edit
|
||||
/*
|
||||
to_world_log("Initializing Floor Decals")
|
||||
admin_notice("<span class='danger'>Initializing Floor Decals</span>", R_DEBUG)
|
||||
var/list/turfs_with_decals = list()
|
||||
for(var/obj/effect/floor_decal/D in world)
|
||||
@@ -118,3 +119,4 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
if(!QDELETED(lift))
|
||||
lift.initialize()
|
||||
CHECK_SLEEP_MASTER
|
||||
*/
|
||||
@@ -1,39 +0,0 @@
|
||||
|
||||
var/global/datum/shuttle_controller/shuttle_controller
|
||||
|
||||
|
||||
/datum/shuttle_controller
|
||||
var/list/shuttles //maps shuttle tags to shuttle datums, so that they can be looked up.
|
||||
var/list/process_shuttles //simple list of shuttles, for processing
|
||||
|
||||
/datum/shuttle_controller/proc/process()
|
||||
//process ferry shuttles
|
||||
for (var/datum/shuttle/shuttle in process_shuttles)
|
||||
if(istype(shuttle, /datum/shuttle/ferry))
|
||||
var/datum/shuttle/ferry/F = shuttle
|
||||
if(F.process_state || F.always_process)
|
||||
F.process()
|
||||
else
|
||||
shuttle.process()
|
||||
|
||||
|
||||
//This is called by gameticker after all the machines and radio frequencies have been properly initialized
|
||||
/datum/shuttle_controller/proc/setup_shuttle_docks()
|
||||
// for(var/shuttle_tag in shuttles)
|
||||
// var/datum/shuttle/shuttle = shuttles[shuttle_tag]
|
||||
for(var/shuttle_type in subtypesof(/datum/shuttle))
|
||||
var/datum/shuttle/shuttle = shuttle_type
|
||||
if(initial(shuttle.category) == shuttle_type)
|
||||
continue
|
||||
shuttle = new shuttle()
|
||||
shuttle.init_docking_controllers()
|
||||
shuttle.dock() //makes all shuttles docked to something at round start go into the docked state
|
||||
|
||||
for(var/obj/machinery/embedded_controller/C in machines)
|
||||
if(istype(C.program, /datum/computer/file/embedded_program/docking))
|
||||
C.program.tag = null //clear the tags, 'cause we don't need 'em anymore
|
||||
|
||||
/datum/shuttle_controller/New()
|
||||
shuttles = list()
|
||||
process_shuttles = list()
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
|
||||
|
||||
if(can_fire && !(SS_NO_FIRE in flags))
|
||||
if(can_fire && !(SS_NO_FIRE & flags))
|
||||
msg = "[round(cost,1)]ms|[round(tick_usage,1)]%|[round(ticks,0.1)]\t[msg]"
|
||||
else
|
||||
msg = "OFFLINE\t[msg]"
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
#define BAD_INIT_QDEL_BEFORE 1
|
||||
#define BAD_INIT_DIDNT_INIT 2
|
||||
#define BAD_INIT_SLEPT 4
|
||||
#define BAD_INIT_NO_HINT 8
|
||||
|
||||
SUBSYSTEM_DEF(atoms)
|
||||
name = "Atoms"
|
||||
init_order = INIT_ORDER_ATOMS
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/initialized = INITIALIZATION_INSSATOMS
|
||||
// var/list/created_atoms // This is never used, so don't bother. ~Leshana
|
||||
var/old_initialized
|
||||
|
||||
var/list/late_loaders
|
||||
var/list/created_atoms
|
||||
|
||||
var/list/BadInitializeCalls = list()
|
||||
|
||||
/datum/controller/subsystem/atoms/Initialize(timeofday)
|
||||
setupgenetics() //to set the mutations' place in structural enzymes, so initializers know where to put mutations.
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
to_world_log("Initializing objects")
|
||||
admin_notice("<span class='danger'>Initializing objects</span>", R_DEBUG)
|
||||
InitializeAtoms()
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms)
|
||||
if(initialized == INITIALIZATION_INSSATOMS)
|
||||
return
|
||||
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
|
||||
LAZYINITLIST(late_loaders)
|
||||
|
||||
var/count
|
||||
var/list/mapload_arg = list(TRUE)
|
||||
if(atoms)
|
||||
created_atoms = list()
|
||||
count = atoms.len
|
||||
for(var/I in atoms)
|
||||
var/atom/A = I
|
||||
if(!A.initialized)
|
||||
if(InitAtom(I, mapload_arg))
|
||||
atoms -= I
|
||||
CHECK_TICK
|
||||
else
|
||||
count = 0
|
||||
for(var/atom/A in world)
|
||||
if(!A.initialized)
|
||||
InitAtom(A, mapload_arg)
|
||||
++count
|
||||
CHECK_TICK
|
||||
|
||||
log_world("Initialized [count] atoms")
|
||||
|
||||
initialized = INITIALIZATION_INNEW_REGULAR
|
||||
|
||||
if(late_loaders.len)
|
||||
for(var/I in late_loaders)
|
||||
var/atom/A = I
|
||||
A.LateInitialize()
|
||||
CHECK_TICK
|
||||
testing("Late initialized [late_loaders.len] atoms")
|
||||
late_loaders.Cut()
|
||||
|
||||
// Nothing ever checks return value of this proc, so don't bother. If this ever changes fix code in /atom/New() ~Leshana
|
||||
// if(atoms)
|
||||
// . = created_atoms + atoms
|
||||
// created_atoms = null
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments)
|
||||
var/the_type = A.type
|
||||
if(QDELING(A))
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_QDEL_BEFORE
|
||||
return TRUE
|
||||
|
||||
var/start_tick = world.time
|
||||
|
||||
var/result = A.initialize(arglist(arguments))
|
||||
|
||||
if(start_tick != world.time)
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_SLEPT
|
||||
|
||||
var/qdeleted = FALSE
|
||||
|
||||
if(result != INITIALIZE_HINT_NORMAL)
|
||||
switch(result)
|
||||
if(INITIALIZE_HINT_LATELOAD)
|
||||
if(arguments[1]) //mapload
|
||||
late_loaders += A
|
||||
else
|
||||
A.LateInitialize()
|
||||
if(INITIALIZE_HINT_QDEL)
|
||||
qdel(A)
|
||||
qdeleted = TRUE
|
||||
else
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_NO_HINT
|
||||
|
||||
if(!A) //possible harddel
|
||||
qdeleted = TRUE
|
||||
else if(!A.initialized)
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_DIDNT_INIT
|
||||
|
||||
return qdeleted || QDELING(A)
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_begin()
|
||||
old_initialized = initialized
|
||||
initialized = INITIALIZATION_INSSATOMS
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_stop()
|
||||
initialized = old_initialized
|
||||
|
||||
/datum/controller/subsystem/atoms/Recover()
|
||||
initialized = SSatoms.initialized
|
||||
if(initialized == INITIALIZATION_INNEW_MAPLOAD)
|
||||
InitializeAtoms()
|
||||
old_initialized = SSatoms.old_initialized
|
||||
BadInitializeCalls = SSatoms.BadInitializeCalls
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitLog()
|
||||
. = ""
|
||||
for(var/path in BadInitializeCalls)
|
||||
. += "Path : [path] \n"
|
||||
var/fails = BadInitializeCalls[path]
|
||||
if(fails & BAD_INIT_DIDNT_INIT)
|
||||
. += "- Didn't call atom/Initialize()\n"
|
||||
if(fails & BAD_INIT_NO_HINT)
|
||||
. += "- Didn't return an Initialize hint\n"
|
||||
if(fails & BAD_INIT_QDEL_BEFORE)
|
||||
. += "- Qdel'd in New()\n"
|
||||
if(fails & BAD_INIT_SLEPT)
|
||||
. += "- Slept during Initialize()\n"
|
||||
|
||||
/datum/controller/subsystem/atoms/Shutdown()
|
||||
var/initlog = InitLog()
|
||||
if(initlog)
|
||||
//text2file(initlog, "[GLOB.log_directory]/initialize.log")
|
||||
var/date_string = time2text(world.realtime, "YYYY/MM-Month/DD-Day")
|
||||
text2file(initlog, "data/logs/[date_string]-initialize.log")
|
||||
|
||||
#undef BAD_INIT_QDEL_BEFORE
|
||||
#undef BAD_INIT_DIDNT_INIT
|
||||
#undef BAD_INIT_SLEPT
|
||||
#undef BAD_INIT_NO_HINT
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// Floor Decals Initialization Subsystem
|
||||
// This is part of the giant decal hack that works around a BYOND bug where DreamDaemon will crash if you
|
||||
// update overlays on turfs too much.
|
||||
// The master_controller on Polaris used to init decals prior to initializing areas (which initilized turfs)
|
||||
// Now that we switched to subsystems we still want to do the same thing, so this takes care of it.
|
||||
//
|
||||
SUBSYSTEM_DEF(floor_decals)
|
||||
name = "Floor Decals"
|
||||
init_order = INIT_ORDER_DECALS
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
/datum/controller/subsystem/floor_decals/Initialize(timeofday)
|
||||
if(floor_decals_initialized)
|
||||
return ..()
|
||||
to_world_log("Initializing Floor Decals")
|
||||
admin_notice("<span class='danger'>Initializing Floor Decals</span>", R_DEBUG)
|
||||
var/list/turfs_with_decals = list()
|
||||
for(var/obj/effect/floor_decal/D in world)
|
||||
var/T = D.add_to_turf_decals()
|
||||
if(T) turfs_with_decals |= T
|
||||
CHECK_TICK
|
||||
for(var/item in turfs_with_decals)
|
||||
var/turf/T = item
|
||||
if(T.decals) T.apply_decals()
|
||||
CHECK_TICK
|
||||
floor_decals_initialized = TRUE
|
||||
return ..()
|
||||
@@ -33,8 +33,9 @@ SUBSYSTEM_DEF(machines)
|
||||
var/list/current_run = list()
|
||||
|
||||
/datum/controller/subsystem/machines/Initialize(timeofday)
|
||||
SSmachines.makepowernets()
|
||||
// TODO - Move world-creation time setup of atmos machinery and pipenets to here
|
||||
makepowernets()
|
||||
admin_notice("<span class='danger'>Initializing atmos machinery.</span>", R_DEBUG)
|
||||
setup_atmos_machinery(global.machines)
|
||||
fire()
|
||||
..()
|
||||
|
||||
@@ -53,13 +54,33 @@ SUBSYSTEM_DEF(machines)
|
||||
for(var/datum/powernet/PN in powernets)
|
||||
qdel(PN)
|
||||
powernets.Cut()
|
||||
setup_powernets_for_cables(cable_list)
|
||||
|
||||
for(var/obj/structure/cable/PC in cable_list)
|
||||
/datum/controller/subsystem/machines/proc/setup_powernets_for_cables(list/cables)
|
||||
for(var/obj/structure/cable/PC in cables)
|
||||
if(!PC.powernet)
|
||||
var/datum/powernet/NewPN = new()
|
||||
NewPN.add_cable(PC)
|
||||
propagate_network(PC,PC.powernet)
|
||||
|
||||
/datum/controller/subsystem/machines/proc/setup_atmos_machinery(list/atmos_machines)
|
||||
for(var/obj/machinery/atmospherics/machine in atmos_machines)
|
||||
machine.atmos_init()
|
||||
CHECK_TICK
|
||||
|
||||
for(var/obj/machinery/atmospherics/machine in atmos_machines)
|
||||
machine.build_network()
|
||||
CHECK_TICK
|
||||
|
||||
for(var/obj/machinery/atmospherics/unary/U in atmos_machines)
|
||||
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/T = U
|
||||
T.broadcast_status()
|
||||
else if(istype(U, /obj/machinery/atmospherics/unary/vent_scrubber))
|
||||
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
|
||||
T.broadcast_status()
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/machines/stat_entry()
|
||||
var/msg = list()
|
||||
msg += "C:{"
|
||||
|
||||
@@ -59,29 +59,34 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/deffo_load = using_map.lateload_z_levels
|
||||
var/list/maybe_load = using_map.lateload_single_pick
|
||||
|
||||
for(var/mapname in deffo_load)
|
||||
var/datum/map_template/MT = map_templates[mapname]
|
||||
if(!istype(MT))
|
||||
error("Lateload Z level \"[mapname]\" is not a valid map!")
|
||||
for(var/list/maplist in deffo_load)
|
||||
if(!islist(maplist))
|
||||
error("Lateload Z level [maplist] is not a list! Must be in a list!")
|
||||
continue
|
||||
MT.load_new_z(centered = FALSE, dont_init = TRUE)
|
||||
//CHECK_TICK //Can't deal with this until SSAtoms
|
||||
for(var/mapname in maplist)
|
||||
var/datum/map_template/MT = map_templates[mapname]
|
||||
if(!istype(MT))
|
||||
error("Lateload Z level \"[mapname]\" is not a valid map!")
|
||||
continue
|
||||
MT.load_new_z(centered = FALSE)
|
||||
CHECK_TICK
|
||||
|
||||
if(LAZYLEN(maybe_load))
|
||||
var/picked = pick(maybe_load)
|
||||
var/list/picklist
|
||||
var/picklist = pick(maybe_load)
|
||||
|
||||
if(islist(picked)) //So you can have a 'chain' of z-levels that make up one away mission
|
||||
picklist = picked
|
||||
else
|
||||
picklist = list(picked)
|
||||
if(!picklist) //No lateload maps at all
|
||||
return
|
||||
|
||||
if(!islist(picklist)) //So you can have a 'chain' of z-levels that make up one away mission
|
||||
error("Randompick Z level [picklist] is not a list! Must be in a list!")
|
||||
return
|
||||
|
||||
for(var/map in picklist)
|
||||
var/datum/map_template/MT = map_templates[map]
|
||||
if(!istype(MT))
|
||||
error("Randompick Z level \"[map]\" is not a valid map!")
|
||||
else
|
||||
MT.load_new_z(centered = FALSE, dont_init = TRUE)
|
||||
MT.load_new_z(centered = FALSE)
|
||||
|
||||
/datum/controller/subsystem/mapping/stat_entry(msg)
|
||||
if (!Debug2)
|
||||
|
||||
@@ -15,14 +15,24 @@ SUBSYSTEM_DEF(mobs)
|
||||
var/list/currentrun = list()
|
||||
var/log_extensively = FALSE
|
||||
var/list/timelog = list()
|
||||
var/list/busy_z_levels
|
||||
var/slept_mobs = 0
|
||||
|
||||
/datum/controller/subsystem/mobs/stat_entry()
|
||||
..("P: [global.mob_list.len]")
|
||||
..("P: [global.mob_list.len] | S: [slept_mobs]")
|
||||
|
||||
/datum/controller/subsystem/mobs/fire(resumed = 0)
|
||||
var/list/busy_z_levels = src.busy_z_levels
|
||||
|
||||
if (!resumed)
|
||||
slept_mobs = 0
|
||||
src.currentrun = mob_list.Copy()
|
||||
if(log_extensively) timelog = list("-Start- [TICK_USAGE]")
|
||||
busy_z_levels = list()
|
||||
for(var/played_mob in player_list)
|
||||
if(!played_mob || isobserver(played_mob))
|
||||
continue
|
||||
var/mob/pm = played_mob
|
||||
busy_z_levels |= pm.z
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
@@ -37,11 +47,10 @@ SUBSYSTEM_DEF(mobs)
|
||||
// Right now mob.Life() is unstable enough I think we need to use a try catch.
|
||||
// Obviously we should try and get rid of this for performance reasons when we can.
|
||||
try
|
||||
var/time_before = TICK_USAGE
|
||||
if(M.low_priority && !(M.z in busy_z_levels))
|
||||
slept_mobs++
|
||||
continue
|
||||
M.Life(times_fired)
|
||||
var/time_after = TICK_USAGE
|
||||
var/time_diff = time_after - time_before
|
||||
if(log_extensively && (time_diff > 0.01)) timelog += list("[time_diff]% - [M] ([M.x],[M.y],[M.z])" = M)
|
||||
catch(var/exception/e)
|
||||
log_runtime(e, M, "Caught by [name] subsystem")
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// SSshuttles subsystem - Handles initialization and processing of shuttles.
|
||||
//
|
||||
|
||||
// This global variable exists for legacy support so we don't have to rename every shuttle_controller to SSshuttles yet.
|
||||
var/global/datum/controller/subsystem/shuttles/shuttle_controller
|
||||
|
||||
SUBSYSTEM_DEF(shuttles)
|
||||
name = "Shuttles"
|
||||
wait = 2 SECONDS
|
||||
priority = 5
|
||||
init_order = INIT_ORDER_SHUTTLES
|
||||
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/shuttles = list() // Maps shuttle tags to shuttle datums, so that they can be looked up.
|
||||
var/list/process_shuttles = list() // Simple list of shuttles, for processing
|
||||
var/list/current_run = list() // Shuttles remaining to process this fire() tick
|
||||
var/list/docks_init_callbacks // List of callbacks to run when we finish setting up shuttle docks.
|
||||
var/docks_initialized = FALSE
|
||||
|
||||
/datum/controller/subsystem/shuttles/Initialize(timeofday)
|
||||
global.shuttle_controller = src
|
||||
setup_shuttle_docks()
|
||||
for(var/I in docks_init_callbacks)
|
||||
var/datum/callback/cb = I
|
||||
cb.InvokeAsync()
|
||||
LAZYCLEARLIST(docks_init_callbacks)
|
||||
docks_init_callbacks = null
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/shuttles/fire(resumed = 0)
|
||||
do_process_shuttles(resumed)
|
||||
|
||||
/datum/controller/subsystem/shuttles/stat_entry()
|
||||
var/msg = list()
|
||||
msg += "AS:[shuttles.len]|"
|
||||
msg += "PS:[process_shuttles.len]|"
|
||||
..(jointext(msg, null))
|
||||
|
||||
/datum/controller/subsystem/shuttles/proc/do_process_shuttles(resumed = 0)
|
||||
if (!resumed)
|
||||
src.current_run = process_shuttles.Copy()
|
||||
|
||||
var/list/current_run = src.current_run // Cache for sanic speed
|
||||
while(current_run.len)
|
||||
var/datum/shuttle/S = current_run[current_run.len]
|
||||
current_run.len--
|
||||
if(istype(S) && !QDELETED(S))
|
||||
if(istype(S, /datum/shuttle/ferry)) // Ferry shuttles get special treatment
|
||||
var/datum/shuttle/ferry/F = S
|
||||
if(F.process_state || F.always_process)
|
||||
F.process()
|
||||
else
|
||||
S.process()
|
||||
else
|
||||
process_shuttles -= S
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
// This should be called after all the machines and radio frequencies have been properly initialized
|
||||
/datum/controller/subsystem/shuttles/proc/setup_shuttle_docks()
|
||||
// Find all declared shuttle datums and initailize them.
|
||||
for(var/shuttle_type in subtypesof(/datum/shuttle))
|
||||
var/datum/shuttle/shuttle = shuttle_type
|
||||
if(initial(shuttle.category) == shuttle_type)
|
||||
continue
|
||||
shuttle = new shuttle()
|
||||
shuttle.init_docking_controllers()
|
||||
shuttle.dock() //makes all shuttles docked to something at round start go into the docked state
|
||||
CHECK_TICK
|
||||
|
||||
for(var/obj/machinery/embedded_controller/C in machines)
|
||||
if(istype(C.program, /datum/computer/file/embedded_program/docking))
|
||||
C.program.tag = null //clear the tags, 'cause we don't need 'em anymore
|
||||
docks_initialized = TRUE
|
||||
|
||||
// Register a callback that will be invoked once the shuttles have been initialized
|
||||
/datum/controller/subsystem/shuttles/proc/OnDocksInitialized(datum/callback/cb)
|
||||
if(!docks_initialized)
|
||||
LAZYADD(docks_init_callbacks, cb)
|
||||
else
|
||||
cb.InvokeAsync()
|
||||
+26
-5
@@ -1,14 +1,35 @@
|
||||
/datum/controller/game_controller
|
||||
var/list/artifact_spawning_turfs = list()
|
||||
var/list/digsite_spawning_turfs = list()
|
||||
|
||||
#define XENOARCH_SPAWN_CHANCE 0.5
|
||||
#define DIGSITESIZE_LOWER 4
|
||||
#define DIGSITESIZE_UPPER 12
|
||||
#define ARTIFACTSPAWNNUM_LOWER 6
|
||||
#define ARTIFACTSPAWNNUM_UPPER 12
|
||||
|
||||
/datum/controller/game_controller/proc/SetupXenoarch()
|
||||
//
|
||||
// Xenoarch subsystem handles initialization of Xenoarcheaology artifacts and digsites.
|
||||
//
|
||||
SUBSYSTEM_DEF(xenoarch)
|
||||
name = "Xenoarch"
|
||||
init_order = INIT_ORDER_XENOARCH
|
||||
flags = SS_NO_FIRE
|
||||
var/list/artifact_spawning_turfs = list()
|
||||
var/list/digsite_spawning_turfs = list()
|
||||
|
||||
/datum/controller/subsystem/xenoarch/Initialize(timeofday)
|
||||
SetupXenoarch()
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/xenoarch/Recover()
|
||||
if (istype(SSxenoarch.artifact_spawning_turfs))
|
||||
artifact_spawning_turfs = SSxenoarch.artifact_spawning_turfs
|
||||
if (istype(SSxenoarch.digsite_spawning_turfs))
|
||||
digsite_spawning_turfs = SSxenoarch.digsite_spawning_turfs
|
||||
|
||||
/datum/controller/subsystem/xenoarch/stat_entry(msg)
|
||||
if (!Debug2)
|
||||
return // Only show up in stat panel if debugging is enabled.
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/xenoarch/proc/SetupXenoarch()
|
||||
for(var/turf/simulated/mineral/M in world)
|
||||
if(!M.density)
|
||||
continue
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
USAGE:
|
||||
|
||||
var/datum/callback/C = new(object|null, /proc/type/path|"procstring", arg1, arg2, ... argn)
|
||||
var/timerid = addtimer(C, time, timertype)
|
||||
OR
|
||||
var/timerid = addtimer(CALLBACK(object|null, /proc/type/path|procstring, arg1, arg2, ... argn), time, timertype)
|
||||
|
||||
Note: proc strings can only be given for datum proc calls, global procs must be proc paths
|
||||
Also proc strings are strongly advised against because they don't compile error if the proc stops existing
|
||||
See the note on proc typepath shortcuts
|
||||
|
||||
INVOKING THE CALLBACK:
|
||||
var/result = C.Invoke(args, to, add) //additional args are added after the ones given when the callback was created
|
||||
OR
|
||||
var/result = C.InvokeAsync(args, to, add) //Sleeps will not block, returns . on the first sleep (then continues on in the "background" after the sleep/block ends), otherwise operates normally.
|
||||
OR
|
||||
INVOKE_ASYNC(<CALLBACK args>) to immediately create and call InvokeAsync
|
||||
|
||||
PROC TYPEPATH SHORTCUTS (these operate on paths, not types, so to these shortcuts, datum is NOT a parent of atom, etc...)
|
||||
|
||||
global proc while in another global proc:
|
||||
.procname
|
||||
Example:
|
||||
CALLBACK(GLOBAL_PROC, .some_proc_here)
|
||||
|
||||
proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents:
|
||||
.procname
|
||||
Example:
|
||||
CALLBACK(src, .some_proc_here)
|
||||
|
||||
when the above doesn't apply:
|
||||
.proc/procname
|
||||
Example:
|
||||
CALLBACK(src, .proc/some_proc_here)
|
||||
|
||||
proc defined on a parent of a some type:
|
||||
Example: /some/type/.proc/some_proc_here
|
||||
|
||||
Other wise you will have to do the full typepath of the proc (/type/of/thing/proc/procname)
|
||||
*/
|
||||
|
||||
/datum/callback
|
||||
var/datum/object = GLOBAL_PROC
|
||||
var/delegate
|
||||
var/list/arguments
|
||||
var/weakref/user
|
||||
|
||||
/datum/callback/New(thingtocall, proctocall, ...)
|
||||
if (thingtocall)
|
||||
object = thingtocall
|
||||
delegate = proctocall
|
||||
if (length(args) > 2)
|
||||
arguments = args.Copy(3)
|
||||
if(usr)
|
||||
user = weakref(usr)
|
||||
|
||||
/world/proc/ImmediateInvokeAsync(thingtocall, proctocall, ...)
|
||||
set waitfor = FALSE
|
||||
|
||||
if (!thingtocall)
|
||||
return
|
||||
|
||||
var/list/calling_arguments = length(args) > 2 ? args.Copy(3) : null
|
||||
|
||||
if (thingtocall == GLOBAL_PROC)
|
||||
call(proctocall)(arglist(calling_arguments))
|
||||
else
|
||||
call(thingtocall, proctocall)(arglist(calling_arguments))
|
||||
|
||||
/datum/callback/proc/Invoke(...)
|
||||
if(!usr)
|
||||
var/weakref/W = user
|
||||
if(W)
|
||||
var/mob/M = W.resolve()
|
||||
if(M)
|
||||
return world.PushUsr(M, src)
|
||||
|
||||
if (!object)
|
||||
return
|
||||
|
||||
var/list/calling_arguments = arguments
|
||||
if (length(args))
|
||||
if (length(arguments))
|
||||
calling_arguments = calling_arguments + args //not += so that it creates a new list so the arguments list stays clean
|
||||
else
|
||||
calling_arguments = args
|
||||
if (object == GLOBAL_PROC)
|
||||
return call(delegate)(arglist(calling_arguments))
|
||||
return call(object, delegate)(arglist(calling_arguments))
|
||||
|
||||
//copy and pasted because fuck proc overhead
|
||||
/datum/callback/proc/InvokeAsync(...)
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!usr)
|
||||
var/weakref/W = user
|
||||
if(W)
|
||||
var/mob/M = W.resolve()
|
||||
if(M)
|
||||
return world.PushUsr(M, src)
|
||||
|
||||
if (!object)
|
||||
return
|
||||
|
||||
var/list/calling_arguments = arguments
|
||||
if (length(args))
|
||||
if (length(arguments))
|
||||
calling_arguments = calling_arguments + args //not += so that it creates a new list so the arguments list stays clean
|
||||
else
|
||||
calling_arguments = args
|
||||
if (object == GLOBAL_PROC)
|
||||
return call(delegate)(arglist(calling_arguments))
|
||||
return call(object, delegate)(arglist(calling_arguments))
|
||||
|
||||
|
||||
/datum/callback_select
|
||||
var/list/finished
|
||||
var/pendingcount
|
||||
var/total
|
||||
|
||||
/datum/callback_select/New(count, savereturns)
|
||||
total = count
|
||||
if (savereturns)
|
||||
finished = new(count)
|
||||
|
||||
/datum/callback_select/proc/invoke_callback(index, datum/callback/callback, list/callback_args, savereturn = TRUE)
|
||||
set waitfor = FALSE
|
||||
if (!callback || !istype(callback))
|
||||
//This check only exists because the alternative is callback_select would block forever if given invalid data
|
||||
CRASH("invalid callback passed to invoke_callback")
|
||||
if (!length(callback_args))
|
||||
callback_args = list()
|
||||
pendingcount++
|
||||
var/rtn = callback.Invoke(arglist(callback_args))
|
||||
pendingcount--
|
||||
if (savereturn)
|
||||
finished[index] = rtn
|
||||
|
||||
//runs a list of callbacks asynchronously, returning once all of them return.
|
||||
//callbacks can be repeated.
|
||||
//callbacks-args is an optional list of argument lists, in the same order as the callbacks,
|
||||
// the inner lists will be sent to the callbacks when invoked() as additional args.
|
||||
//can optionly save and return a list of return values, in the same order as the original list of callbacks
|
||||
//resolution is the number of byond ticks between checks.
|
||||
/proc/callback_select(list/callbacks, list/callback_args, savereturns = TRUE, resolution = 1)
|
||||
if (!callbacks)
|
||||
return
|
||||
var/count = length(callbacks)
|
||||
if (!count)
|
||||
return
|
||||
if (!callback_args)
|
||||
callback_args = list()
|
||||
|
||||
callback_args.len = count
|
||||
|
||||
var/datum/callback_select/CS = new(count, savereturns)
|
||||
for (var/i in 1 to count)
|
||||
CS.invoke_callback(i, callbacks[i], callback_args[i], savereturns)
|
||||
|
||||
while(CS.pendingcount)
|
||||
sleep(resolution*world.tick_lag)
|
||||
return CS.finished
|
||||
|
||||
// Makes a call in the context of a different usr
|
||||
// Use sparingly
|
||||
/world/proc/PushUsr(mob/M, datum/callback/CB)
|
||||
var/temp = usr
|
||||
testing("PushUsr() in use")
|
||||
usr = M
|
||||
. = CB.Invoke()
|
||||
usr = temp
|
||||
+11
-11
@@ -503,53 +503,53 @@
|
||||
|
||||
//slime
|
||||
/mob/living/simple_animal/slime/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "slime"
|
||||
|
||||
/mob/living/carbon/alien/larva/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.special_role = "Larva"
|
||||
|
||||
//AI
|
||||
/mob/living/silicon/ai/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "AI"
|
||||
|
||||
//BORG
|
||||
/mob/living/silicon/robot/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "Cyborg"
|
||||
|
||||
//PAI
|
||||
/mob/living/silicon/pai/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "pAI"
|
||||
mind.special_role = ""
|
||||
|
||||
//Animals
|
||||
/mob/living/simple_animal/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "Animal"
|
||||
|
||||
/mob/living/simple_animal/corgi/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "Corgi"
|
||||
|
||||
/mob/living/simple_animal/shade/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "Shade"
|
||||
|
||||
/mob/living/simple_animal/construct/builder/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "Artificer"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
/mob/living/simple_animal/construct/wraith/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "Wraith"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
/mob/living/simple_animal/construct/armoured/mind_initialize()
|
||||
..()
|
||||
. = ..()
|
||||
mind.assigned_role = "Juggernaut"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
@@ -116,7 +116,7 @@ var/global/repository/radiation/radiation_repository = new()
|
||||
else if(O.density) //So open doors don't get counted
|
||||
var/material/M = O.get_material()
|
||||
if(!M) continue
|
||||
cached_rad_resistance += M.weight
|
||||
cached_rad_resistance += M.radiation_resistance
|
||||
// Looks like storing the contents length is meant to be a basic check if the cache is stale due to items enter/exiting. Better than nothing so I'm leaving it as is. ~Leshana
|
||||
radiation_repository.resistance_cache[src] = (length(contents) + 1)
|
||||
|
||||
|
||||
@@ -4,4 +4,18 @@
|
||||
cost = 1000
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Stolen crate"
|
||||
contraband = 1
|
||||
contraband = 1
|
||||
|
||||
/datum/supply_packs/supply/wolfgirl
|
||||
name = "Wolfgirl Crate"
|
||||
cost = 200 //I mean, it's a whole wolfgirl
|
||||
containertype = /obj/structure/largecrate/animal/wolfgirl
|
||||
containername = "Wolfgirl crate"
|
||||
contraband = 1
|
||||
|
||||
/datum/supply_packs/supply/catgirl
|
||||
name = "Catgirl Crate"
|
||||
cost = 200 //I mean, it's a whole catgirl
|
||||
containertype = /obj/structure/largecrate/animal/catgirl
|
||||
containername = "Catgirl crate"
|
||||
contraband = 1
|
||||
|
||||
@@ -330,8 +330,8 @@
|
||||
access = access_cmo
|
||||
|
||||
/datum/supply_packs/med/defib
|
||||
name = "Defibrilator crate"
|
||||
name = "Defibrillator crate"
|
||||
contains = list(/obj/item/device/defib_kit = 2)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate/medical
|
||||
containername = "Defibrilator crate"
|
||||
containername = "Defibrillator crate"
|
||||
@@ -46,9 +46,9 @@
|
||||
containername = "Experimental weapons crate"
|
||||
access = access_armory
|
||||
|
||||
/datum/supply_packs/munitions/energyweapons
|
||||
/datum/supply_packs/munitions/energyweapons
|
||||
name = "Laser carbine crate"
|
||||
contains = list(/obj/item/weapon/gun/energy/laser = 3)
|
||||
contains = list(/obj/item/weapon/gun/energy/laser = 2) //VOREStation Edit - Made to be consistent with the energy guns crate.
|
||||
cost = 50
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "energy weapons crate"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/datum/supply_packs/munitions/expeditionguns
|
||||
name = "Frontier phaser (station-locked) crate"
|
||||
contains = list(
|
||||
/obj/item/weapon/gun/energy/frontier/locked = 2,
|
||||
)
|
||||
cost = 35
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "frontier phaser crate"
|
||||
access = access_explorer
|
||||
@@ -26,3 +26,16 @@
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Restraints crate"
|
||||
cost = 30
|
||||
|
||||
/datum/supply_packs/recreation/wolfgirl_cosplay_crate
|
||||
name = "Wolfgirl Cosplay Crate"
|
||||
contains = list(
|
||||
/obj/item/clothing/head/fluff/awoo = 1,
|
||||
/obj/item/clothing/shoes/fluff/awoo = 1,
|
||||
/obj/item/clothing/under/fluff/awoo = 1,
|
||||
/obj/item/weapon/melee/fluffstuff/awoosword = 1,
|
||||
/obj/item/weapon/shield/fluff/awooshield = 1
|
||||
)
|
||||
cost = 50
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "wolfgirl cosplay crate"
|
||||
@@ -102,8 +102,9 @@
|
||||
temp_blade.attack_self()
|
||||
|
||||
/obj/item/weapon/cane/concealed/attack_self(var/mob/user)
|
||||
var/datum/gender/T = gender_datums[user.get_visible_gender()]
|
||||
if(concealed_blade)
|
||||
user.visible_message("<span class='warning'>[user] has unsheathed \a [concealed_blade] from \his [src]!</span>", "You unsheathe \the [concealed_blade] from \the [src].")
|
||||
user.visible_message("<span class='warning'>[user] has unsheathed \a [concealed_blade] from [T.his] [src]!</span>", "You unsheathe \the [concealed_blade] from \the [src].")
|
||||
// Calling drop/put in hands to properly call item drop/pickup procs
|
||||
playsound(user.loc, 'sound/weapons/flipblade.ogg', 50, 1)
|
||||
user.drop_from_inventory(src)
|
||||
@@ -117,7 +118,8 @@
|
||||
|
||||
/obj/item/weapon/cane/concealed/attackby(var/obj/item/weapon/material/butterfly/W, var/mob/user)
|
||||
if(!src.concealed_blade && istype(W))
|
||||
user.visible_message("<span class='warning'>[user] has sheathed \a [W] into \his [src]!</span>", "You sheathe \the [W] into \the [src].")
|
||||
var/datum/gender/T = gender_datums[user.get_visible_gender()]
|
||||
user.visible_message("<span class='warning'>[user] has sheathed \a [W] into [T.his] [src]!</span>", "You sheathe \the [W] into \the [src].")
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
src.concealed_blade = W
|
||||
|
||||
@@ -14,10 +14,8 @@
|
||||
for(var/turf/unsimulated/floor/F in src)
|
||||
valid_spawn_turfs |= F
|
||||
|
||||
/area/awaymission/initialize()
|
||||
/area/awaymission/LateInitialize()
|
||||
..()
|
||||
return TRUE
|
||||
/*sleep(180)
|
||||
EvalValidSpawnTurfs()
|
||||
|
||||
if(!valid_spawn_turfs.len)
|
||||
@@ -30,7 +28,7 @@
|
||||
//Handles random flora placement for floracountmax, as defined/randomized in initialize of each individual area.
|
||||
spawn_flora_on_turf()
|
||||
|
||||
world << "Away mission spawning done."*/
|
||||
world << "Away mission spawning done."
|
||||
|
||||
/area/awaymission/proc/spawn_mob_on_turf()
|
||||
if(!valid_mobs.len)
|
||||
|
||||
@@ -25,11 +25,18 @@
|
||||
|
||||
..()
|
||||
|
||||
/area/proc/initialize()
|
||||
/area/initialize()
|
||||
. = ..()
|
||||
return INITIALIZE_HINT_LATELOAD // Areas tradiationally are initialized AFTER other atoms.
|
||||
|
||||
/area/LateInitialize()
|
||||
if(!requires_power || !apc)
|
||||
power_light = 0
|
||||
power_equip = 0
|
||||
power_environ = 0
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/area/LateInitialize()
|
||||
power_change() // all machines set to current power level, also updates lighting icon
|
||||
|
||||
/area/proc/get_contents()
|
||||
|
||||
+42
-2
@@ -24,13 +24,53 @@
|
||||
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
// Track if we are already had initialize() called to prevent double-initialization.
|
||||
var/initialized = FALSE
|
||||
|
||||
//atom creation method that preloads variables at creation
|
||||
/atom/New()
|
||||
/atom/New(loc, ...)
|
||||
// Don't call ..() unless /datum/New() ever exists
|
||||
|
||||
// During dynamic mapload (reader.dm) this assigns the var overrides from the .dmm file
|
||||
// Native BYOND maploading sets those vars before invoking New(), by doing this FIRST we come as close to that behavior as we can.
|
||||
if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
|
||||
_preloader.load(src)
|
||||
|
||||
// Pass our arguments to InitAtom so they can be passed to initialize(), but replace 1st with if-we're-during-mapload.
|
||||
var/do_initialize = SSatoms && SSatoms.initialized // Workaround our non-ideal initialization order: SSatoms may not exist yet.
|
||||
//var/do_initialize = SSatoms.initialized
|
||||
if(do_initialize > INITIALIZATION_INSSATOMS)
|
||||
args[1] = (do_initialize == INITIALIZATION_INNEW_MAPLOAD)
|
||||
if(SSatoms.InitAtom(src, args))
|
||||
// We were deleted. No sense continuing
|
||||
return
|
||||
|
||||
// Uncomment if anything ever uses the return value of SSatoms.InitializeAtoms ~Leshana
|
||||
// If a map is being loaded, it might want to know about newly created objects so they can be handled.
|
||||
// var/list/created = SSatoms.created_atoms
|
||||
// if(created)
|
||||
// created += src
|
||||
|
||||
// Note: I removed "auto_init" feature (letting types disable auto-init) since it shouldn't be needed anymore.
|
||||
// You can replicate the same by checking the value of the first parameter to initialize() ~Leshana
|
||||
|
||||
// Called after New if the map is being loaded, with mapload = TRUE
|
||||
// Called from base of New if the map is not being loaded, with mapload = FALSE
|
||||
// This base must be called or derivatives must set initialized to TRUE
|
||||
// Must not sleep!
|
||||
// Other parameters are passed from New (excluding loc), this does not happen if mapload is TRUE
|
||||
// Must return an Initialize hint. Defined in code/__defines/subsystems.dm
|
||||
/atom/proc/initialize(mapload, ...)
|
||||
if(QDELETED(src))
|
||||
crash_with("GC: -- [type] had initialize() called after qdel() --")
|
||||
if(initialized)
|
||||
crash_with("Warning: [src]([type]) initialized multiple times!")
|
||||
initialized = TRUE
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
// Called after all object's normal initialize() if initialize() returns INITIALIZE_HINT_LATELOAD
|
||||
/atom/proc/LateInitialize()
|
||||
return
|
||||
|
||||
/atom/proc/reveal_blood()
|
||||
return
|
||||
|
||||
|
||||
@@ -18,15 +18,6 @@
|
||||
var/icon_scale = 1 // Used to scale icons up or down in update_transform().
|
||||
var/old_x = 0
|
||||
var/old_y = 0
|
||||
var/auto_init = 1
|
||||
|
||||
/atom/movable/New()
|
||||
..()
|
||||
if(auto_init && ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
if(SScreation && SScreation.map_loading) // If a map is being loaded, newly created objects need to wait for it to finish.
|
||||
SScreation.atoms_needing_initialize += src
|
||||
else
|
||||
initialize()
|
||||
|
||||
/atom/movable/Destroy()
|
||||
. = ..()
|
||||
@@ -47,10 +38,6 @@
|
||||
pulledby.pulling = null
|
||||
pulledby = null
|
||||
|
||||
/atom/movable/proc/initialize()
|
||||
if(QDELETED(src))
|
||||
crash_with("GC: -- [type] had initialize() called after qdel() --")
|
||||
|
||||
/atom/movable/Bump(var/atom/A, yes)
|
||||
if(src.throwing)
|
||||
src.throw_impact(A)
|
||||
|
||||
@@ -86,7 +86,8 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/changeling/suicide_act(mob/user)
|
||||
viewers(user) << "<span class='danger'>[user] is impaling \himself the [src.name]! It looks like \he's trying to commit suicide.</span>"
|
||||
var/datum/gender/T = gender_datums[user.get_visible_gender()]
|
||||
viewers(user) << "<span class='danger'>[user] is impaling [T.himself] with the [src.name]! It looks like [T.he] [T.is] trying to commit suicide.</span>"
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/melee/changeling/process() //Stolen from ninja swords.
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
for(var/limb in H.organs_by_name)
|
||||
var/obj/item/organ/external/current_limb = H.organs_by_name[limb]
|
||||
if(current_limb)
|
||||
current_limb.undislocate()
|
||||
current_limb.relocate()
|
||||
current_limb.open = 0
|
||||
|
||||
BITSET(H.hud_updateflag, HEALTH_HUD)
|
||||
@@ -60,4 +60,4 @@
|
||||
|
||||
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -168,7 +168,8 @@ var/list/sacrificed = list()
|
||||
if (!target.can_feel_pain())
|
||||
target.visible_message("<span class='warning'>The markings below \the [target] glow a bloody red.</span>")
|
||||
else
|
||||
target.visible_message("<span class='warning'>[target] writhes in pain as the markings below \him glow a bloody red.</span>", "<span class='danger'>AAAAAAHHHH!</span>", "<span class='warning'>You hear an anguished scream.</span>")
|
||||
var/datum/gender/TT = gender_datums[target.get_visible_gender()]
|
||||
target.visible_message("<span class='warning'>[target] writhes in pain as the markings below [TT.him] glow a bloody red.</span>", "<span class='danger'>AAAAAAHHHH!</span>", "<span class='warning'>You hear an anguished scream.</span>")
|
||||
|
||||
if(!waiting_for_input[target]) //so we don't spam them with dialogs if they hesitate
|
||||
waiting_for_input[target] = 1
|
||||
@@ -373,15 +374,18 @@ var/list/sacrificed = list()
|
||||
sleep(10 SECONDS)
|
||||
|
||||
if(corpse_to_raise.client)
|
||||
|
||||
var/datum/gender/TU = gender_datums[corpse_to_raise.get_visible_gender()]
|
||||
var/datum/gender/TT = gender_datums[body_to_sacrifice.get_visible_gender()]
|
||||
|
||||
cult.add_antagonist(corpse_to_raise.mind)
|
||||
corpse_to_raise.revive()
|
||||
|
||||
usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!")
|
||||
corpse_to_raise.visible_message("<span class='warning'>[corpse_to_raise]'s eyes glow with a faint red as he stands up, slowly starting to breathe again.</span>", \
|
||||
corpse_to_raise.visible_message("<span class='warning'>[corpse_to_raise]'s eyes glow with a faint red as [TU.he] stand[TU.s] up, slowly starting to breathe again.</span>", \
|
||||
"<span class='warning'>Life... I'm alive again...</span>", \
|
||||
"<span class='warning'>You hear a faint, slightly familiar whisper.</span>")
|
||||
body_to_sacrifice.visible_message("<span class='danger'>[body_to_sacrifice] is torn apart, a black smoke swiftly dissipating from \his remains!</span>", \
|
||||
body_to_sacrifice.visible_message("<span class='danger'>[body_to_sacrifice] is torn apart, a black smoke swiftly dissipating from [TT.his] remains!</span>", \
|
||||
"<span class='danger'>You feel as your blood boils, tearing you apart.</span>", \
|
||||
"<span class='danger'>You hear a thousand voices, all crying in pain.</span>")
|
||||
body_to_sacrifice.gib()
|
||||
@@ -433,8 +437,9 @@ var/list/sacrificed = list()
|
||||
ajourney() //some bits copypastaed from admin tools - Urist
|
||||
if(usr.loc==src.loc)
|
||||
var/mob/living/carbon/human/L = usr
|
||||
var/datum/gender/TU = gender_datums[L.get_visible_gender()]
|
||||
usr.say("Fwe[pick("'","`")]sh mah erl nyag r'ya!")
|
||||
usr.visible_message("<span class='warning'>[usr]'s eyes glow blue as \he freezes in place, absolutely motionless.</span>", \
|
||||
usr.visible_message("<span class='warning'>[usr]'s eyes glow blue as [TU.he] freeze[TU.s] in place, absolutely motionless.</span>", \
|
||||
"<span class='warning'>The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this is a great sight, being here strains your mind and body. Hurry...</span>", \
|
||||
"<span class='warning'>You hear only complete silence for a moment.</span>")
|
||||
announce_ghost_joinleave(usr.ghostize(1), 1, "You feel that they had to use some [pick("dark", "black", "blood", "forgotten", "forbidden")] magic to [pick("invade","disturb","disrupt","infest","taint","spoil","blight")] this place!")
|
||||
@@ -599,11 +604,12 @@ var/list/sacrificed = list()
|
||||
|
||||
mend()
|
||||
var/mob/living/user = usr
|
||||
var/datum/gender/TU = gender_datums[usr.get_visible_gender()]
|
||||
src = null
|
||||
user.say("Uhrast ka'hfa heldsagen ver[pick("'","`")]lot!")
|
||||
user.take_overall_damage(200, 0)
|
||||
runedec+=10
|
||||
user.visible_message("<span class='danger'>\The [user] keels over dead, \his blood glowing blue as it escapes \his body and dissipates into thin air.</span>", \
|
||||
user.visible_message("<span class='danger'>\The [user] keels over dead, [TU.his] blood glowing blue as it escapes [TU.his] body and dissipates into thin air.</span>", \
|
||||
"<span class='danger'>In the last moment of your humble life, you feel an immense pain as fabric of reality mends... with your blood.</span>", \
|
||||
"<span class='warning'>You hear faint rustle.</span>")
|
||||
for(,user.stat==2)
|
||||
@@ -886,7 +892,8 @@ var/list/sacrificed = list()
|
||||
if (cultist == user) //just to be sure.
|
||||
return
|
||||
if(cultist.buckled || cultist.handcuffed || (!isturf(cultist.loc) && !istype(cultist.loc, /obj/structure/closet)))
|
||||
user << "<span class='warning'>You cannot summon \the [cultist], for \his shackles of blood are strong.</span>"
|
||||
var/datum/gender/TU = gender_datums[cultist.get_visible_gender()]
|
||||
user << "<span class='warning'>You cannot summon \the [cultist], for [TU.his] shackles of blood are strong.</span>"
|
||||
return fizzle()
|
||||
cultist.loc = src.loc
|
||||
cultist.lying = 1
|
||||
|
||||
@@ -99,7 +99,9 @@
|
||||
|
||||
/turf/unsimulated/wall/supermatter/Bumped(atom/AM as mob|obj)
|
||||
if(istype(AM, /mob/living))
|
||||
AM.visible_message("<span class=\"warning\">\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.</span>",\
|
||||
var/mob/living/M = AM
|
||||
var/datum/gender/T = gender_datums[M.get_visible_gender()]
|
||||
AM.visible_message("<span class=\"warning\">\The [AM] slams into \the [src] inducing a resonance... [T.his] body starts to glow and catch flame before flashing into ash.</span>",\
|
||||
"<span class=\"danger\">You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",\
|
||||
"<span class=\"warning\">You hear an unearthly noise as a wave of heat washes over you.</span>")
|
||||
else
|
||||
|
||||
@@ -134,8 +134,6 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
callHook("roundstart")
|
||||
|
||||
shuttle_controller.setup_shuttle_docks()
|
||||
|
||||
// TODO - Leshana - Dear God Fix This. Fix all of this. Not just this line, this entire proc. This entire file!
|
||||
spawn(0)//Forking here so we dont have to wait for this to finish
|
||||
mode.post_setup()
|
||||
|
||||
@@ -1252,7 +1252,8 @@ datum
|
||||
proc/find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "[target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role], has defied us for the last time. Make an example of [target.current.gender == MALE ? "him" : target.current.gender == FEMALE ? "her" : "them"], and bring us [target.current.gender == MALE ? "his" : target.current.gender == FEMALE ? "her" : "their"] severed head."
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
explanation_text = "[target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role], has defied us for the last time. Make an example of [T.him], and bring us [T.his] severed head."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
@@ -1261,7 +1262,8 @@ datum
|
||||
find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "[target.current.real_name], the [target.role_alt_title ? target.role_alt_title : (!role_type ? target.assigned_role : target.special_role)], has defied us for the last time. Make an example of [target.current.gender == MALE ? "him" : target.current.gender == FEMALE ? "her" : "them"], and bring us [target.current.gender == MALE ? "his" : target.current.gender == FEMALE ? "her" : "their"] severed head."
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
explanation_text = "[target.current.real_name], the [target.role_alt_title ? target.role_alt_title : (!role_type ? target.assigned_role : target.special_role)], has defied us for the last time. Make an example of [T.him], and bring us [T.his] severed head."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
@@ -69,7 +69,8 @@ datum/objective/anti_revolution/execute
|
||||
find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "[target.current.real_name], the [target.assigned_role] has extracted confidential information above their clearance. Execute \him[target.current]."
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
explanation_text = "[target.current.real_name], the [target.assigned_role] has extracted confidential information above their clearance. Execute [T.him]."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
@@ -78,7 +79,8 @@ datum/objective/anti_revolution/execute
|
||||
find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has extracted confidential information above their clearance. Execute \him[target.current]."
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has extracted confidential information above their clearance. Execute [T.him]."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
@@ -127,7 +129,8 @@ datum/objective/anti_revolution/demote
|
||||
find_target()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "[target.current.real_name], the [target.assigned_role] has been classified as harmful to [using_map.company_name]'s goals. Demote \him[target.current] to assistant."
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
explanation_text = "[target.current.real_name], the [target.assigned_role] has been classified as harmful to [using_map.company_name]'s goals. Demote [T.him] to assistant."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
@@ -135,7 +138,8 @@ datum/objective/anti_revolution/demote
|
||||
find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has been classified as harmful to [using_map.company_name]'s goals. Demote \him[target.current] to assistant."
|
||||
var/datum/gender/T = gender_datums[target.current.get_visible_gender()]
|
||||
explanation_text = "[target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] has been classified as harmful to [using_map.company_name]'s goals. Demote [T.him] to assistant."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
@@ -167,8 +167,9 @@
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make \him feel better!</span>", \
|
||||
"<span class='notice'>You hug [src] to make \him feel better!</span>")
|
||||
var/datum/gender/T = gender_datums[src.get_visible_gender()]
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make [T.him] feel better!</span>", \
|
||||
"<span class='notice'>You hug [src] to make [T.him] feel better!</span>") // slightly redundant as at the moment most mobs still use the normal gender var, but it works and future-proofs it
|
||||
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
if(I_DISARM)
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
minimal_access = list() //See /datum/job/assistant/get_access()
|
||||
outfit_type = /decl/hierarchy/outfit/job/assistant/intern
|
||||
alt_titles = list("Apprentice Engineer","Medical Intern","Lab Assistant","Security Cadet","Jr. Cargo Tech") //VOREStation Edit
|
||||
timeoff_factor = 0 //VOREStation Edit - Interns, noh
|
||||
|
||||
//VOREStation Add
|
||||
/datum/job/intern/New()
|
||||
..()
|
||||
@@ -37,6 +39,7 @@
|
||||
access = list()
|
||||
minimal_access = list()
|
||||
outfit_type = /decl/hierarchy/outfit/job/assistant
|
||||
timeoff_factor = 0
|
||||
/datum/job/assistant/New()
|
||||
..()
|
||||
if(config)
|
||||
|
||||
@@ -39,10 +39,8 @@
|
||||
|
||||
if(!sleeper)
|
||||
findsleeper()
|
||||
if(sleeper)
|
||||
return sleeper.ui_interact(user)
|
||||
else if(sleeper)
|
||||
return sleeper.ui_interact(user)
|
||||
if(sleeper)
|
||||
return ui_interact(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Sleeper not found!</span>")
|
||||
|
||||
@@ -59,6 +57,94 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/machinery/sleep_console/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = outside_state)
|
||||
var/data[0]
|
||||
|
||||
var/obj/machinery/sleeper/S = sleeper
|
||||
var/mob/living/carbon/human/occupant = sleeper.occupant
|
||||
|
||||
data["power"] = S.stat & (NOPOWER|BROKEN) ? 0 : 1
|
||||
|
||||
var/list/reagents = list()
|
||||
for(var/T in S.available_chemicals)
|
||||
var/list/reagent = list()
|
||||
reagent["id"] = T
|
||||
reagent["name"] = S.available_chemicals[T]
|
||||
if(occupant)
|
||||
reagent["amount"] = occupant.reagents.get_reagent_amount(T)
|
||||
reagents += list(reagent)
|
||||
data["reagents"] = reagents.Copy()
|
||||
|
||||
if(occupant)
|
||||
data["occupant"] = 1
|
||||
switch(occupant.stat)
|
||||
if(CONSCIOUS)
|
||||
data["stat"] = "Conscious"
|
||||
if(UNCONSCIOUS)
|
||||
data["stat"] = "Unconscious"
|
||||
if(DEAD)
|
||||
data["stat"] = "<font color='red'>Dead</font>"
|
||||
data["health"] = occupant.health
|
||||
data["maxHealth"] = occupant.getMaxHealth()
|
||||
if(iscarbon(occupant))
|
||||
var/mob/living/carbon/C = occupant
|
||||
data["pulse"] = C.get_pulse(GETPULSE_TOOL)
|
||||
data["brute"] = occupant.getBruteLoss()
|
||||
data["burn"] = occupant.getFireLoss()
|
||||
data["oxy"] = occupant.getOxyLoss()
|
||||
data["tox"] = occupant.getToxLoss()
|
||||
else
|
||||
data["occupant"] = 0
|
||||
if(S.beaker)
|
||||
data["beaker"] = S.beaker.reagents.get_free_space()
|
||||
else
|
||||
data["beaker"] = -1
|
||||
data["filtering"] = S.filtering
|
||||
|
||||
var/stasis_level_name = "Error!"
|
||||
for(var/N in S.stasis_choices)
|
||||
if(S.stasis_choices[N] == S.stasis_level)
|
||||
stasis_level_name = N
|
||||
break
|
||||
data["stasis"] = stasis_level_name
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper UI", 600, 600, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/sleep_console/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/obj/machinery/sleeper/S = sleeper
|
||||
|
||||
if(usr == S.occupant)
|
||||
to_chat(usr, "<span class='warning'>You can't reach the controls from the inside.</span>")
|
||||
return
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(href_list["eject"])
|
||||
S.go_out()
|
||||
if(href_list["beaker"])
|
||||
S.remove_beaker()
|
||||
if(href_list["sleeper_filter"])
|
||||
if(S.filtering != text2num(href_list["sleeper_filter"]))
|
||||
S.toggle_filter()
|
||||
if(href_list["chemical"] && href_list["amount"])
|
||||
if(S.occupant && S.occupant.stat != DEAD)
|
||||
if(href_list["chemical"] in S.available_chemicals) // Your hacks are bad and you should feel bad
|
||||
S.inject_chemical(usr, href_list["chemical"], text2num(href_list["amount"]))
|
||||
if(href_list["change_stasis"])
|
||||
var/new_stasis = input("Levels deeper than 50% stasis level will render the patient unconscious.","Stasis Level") as null|anything in S.stasis_choices
|
||||
if(new_stasis && CanUseTopic(usr, default_state) == STATUS_INTERACTIVE)
|
||||
S.stasis_level = S.stasis_choices[new_stasis]
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/sleeper
|
||||
name = "sleeper"
|
||||
desc = "A stasis pod with built-in injectors, a dialysis machine, and a limited health scanner."
|
||||
@@ -95,6 +181,7 @@
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/sleeper/initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/sleeper/process()
|
||||
@@ -121,89 +208,6 @@
|
||||
/obj/machinery/sleeper/update_icon()
|
||||
icon_state = "sleeper_[occupant ? "1" : "0"]"
|
||||
|
||||
/obj/machinery/sleeper/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = outside_state)
|
||||
var/data[0]
|
||||
|
||||
data["power"] = stat & (NOPOWER|BROKEN) ? 0 : 1
|
||||
|
||||
var/list/reagents = list()
|
||||
for(var/T in available_chemicals)
|
||||
var/list/reagent = list()
|
||||
reagent["id"] = T
|
||||
reagent["name"] = available_chemicals[T]
|
||||
if(occupant)
|
||||
reagent["amount"] = occupant.reagents.get_reagent_amount(T)
|
||||
reagents += list(reagent)
|
||||
data["reagents"] = reagents.Copy()
|
||||
|
||||
if(occupant)
|
||||
data["occupant"] = 1
|
||||
switch(occupant.stat)
|
||||
if(CONSCIOUS)
|
||||
data["stat"] = "Conscious"
|
||||
if(UNCONSCIOUS)
|
||||
data["stat"] = "Unconscious"
|
||||
if(DEAD)
|
||||
data["stat"] = "<font color='red'>Dead</font>"
|
||||
data["health"] = occupant.health
|
||||
data["maxHealth"] = occupant.getMaxHealth()
|
||||
if(iscarbon(occupant))
|
||||
var/mob/living/carbon/C = occupant
|
||||
data["pulse"] = C.get_pulse(GETPULSE_TOOL)
|
||||
data["brute"] = occupant.getBruteLoss()
|
||||
data["burn"] = occupant.getFireLoss()
|
||||
data["oxy"] = occupant.getOxyLoss()
|
||||
data["tox"] = occupant.getToxLoss()
|
||||
else
|
||||
data["occupant"] = 0
|
||||
if(beaker)
|
||||
data["beaker"] = beaker.reagents.get_free_space()
|
||||
else
|
||||
data["beaker"] = -1
|
||||
data["filtering"] = filtering
|
||||
|
||||
var/stasis_level_name = "Error!"
|
||||
for(var/N in stasis_choices)
|
||||
if(stasis_choices[N] == stasis_level)
|
||||
stasis_level_name = N
|
||||
break
|
||||
data["stasis"] = stasis_level_name
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper UI", 600, 600, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/sleeper/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(usr == occupant)
|
||||
to_chat(usr, "<span class='warning'>You can't reach the controls from the inside.</span>")
|
||||
return
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(href_list["eject"])
|
||||
go_out()
|
||||
if(href_list["beaker"])
|
||||
remove_beaker()
|
||||
if(href_list["sleeper_filter"])
|
||||
if(filtering != text2num(href_list["sleeper_filter"]))
|
||||
toggle_filter()
|
||||
if(href_list["chemical"] && href_list["amount"])
|
||||
if(occupant && occupant.stat != DEAD)
|
||||
if(href_list["chemical"] in available_chemicals) // Your hacks are bad and you should feel bad
|
||||
inject_chemical(usr, href_list["chemical"], text2num(href_list["amount"]))
|
||||
if(href_list["change_stasis"])
|
||||
var/new_stasis = input("Levels deeper than 50% stasis level will render the patient unconscious.","Stasis Level") as null|anything in stasis_choices
|
||||
if(new_stasis && CanUseTopic(usr, default_state) == STATUS_INTERACTIVE)
|
||||
stasis_level = stasis_choices[new_stasis]
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/sleeper/attackby(var/obj/item/I, var/mob/user)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
|
||||
|
||||
/obj/machinery/alarm/initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
if(!master_is_operating())
|
||||
elect_master()
|
||||
@@ -991,6 +992,7 @@ FIRE ALARM
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/firealarm/initialize()
|
||||
. = ..()
|
||||
if(z in using_map.contact_levels)
|
||||
set_security_level(security_level? get_security_level() : "green")
|
||||
|
||||
|
||||
@@ -64,12 +64,14 @@
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/air_sensor/initialize()
|
||||
set_frequency(frequency)
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/air_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/computer/general_air_control
|
||||
icon_keyboard = "atmos_key"
|
||||
@@ -128,7 +130,9 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/computer/general_air_control/initialize()
|
||||
set_frequency(frequency)
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/computer/general_air_control/large_tank_control
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
|
||||
@@ -12,17 +12,10 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 15
|
||||
|
||||
/obj/machinery/meter/New()
|
||||
..()
|
||||
spawn(5)
|
||||
target = select_target()
|
||||
return 1
|
||||
|
||||
/obj/machinery/meter/initialize()
|
||||
. = ..()
|
||||
if (!target)
|
||||
spawn(5)
|
||||
target = select_target()
|
||||
target = select_target()
|
||||
|
||||
/obj/machinery/meter/Destroy()
|
||||
pipes_on_turf.Cut()
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
var/obj/item/device/radio/radio = null
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
radio = new(src)
|
||||
radio.listening = TRUE
|
||||
radio.broadcasting = FALSE
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/cloning/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
updatemodules()
|
||||
|
||||
/obj/machinery/computer/cloning/Destroy()
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/initialize()
|
||||
. = ..()
|
||||
power_change()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
if(!linkedServer)
|
||||
if(message_servers && message_servers.len > 0)
|
||||
linkedServer = message_servers[1]
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/message_monitor/attack_hand(var/mob/living/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/machinery/computer/station_alert/initialize()
|
||||
alarm_monitor = new monitor_type(src)
|
||||
alarm_monitor.register_alarm(src, /obj/machinery/computer/station_alert/update_icon)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/computer/station_alert/Destroy()
|
||||
alarm_monitor.unregister_alarm(src)
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cryopod/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
find_control_computer()
|
||||
|
||||
@@ -348,8 +348,8 @@
|
||||
|
||||
// This function can not be undone; do not call this unless you are sure
|
||||
// Also make sure there is a valid control computer
|
||||
/obj/machinery/cryopod/robot/despawn_occupant()
|
||||
var/mob/living/silicon/robot/R = occupant
|
||||
/obj/machinery/cryopod/robot/despawn_occupant(var/mob/to_despawn)
|
||||
var/mob/living/silicon/robot/R = to_despawn
|
||||
if(!istype(R)) return ..()
|
||||
|
||||
qdel(R.mmi)
|
||||
|
||||
@@ -470,6 +470,7 @@
|
||||
/obj/machinery/door/airlock/alien/public // Entry to UFO.
|
||||
req_one_access = list()
|
||||
normalspeed = FALSE // So it closes faster and hopefully keeps the warm air inside.
|
||||
hackProof = TRUE //VOREStation Edit - No borgos
|
||||
|
||||
/*
|
||||
About the new airlock wires panel:
|
||||
@@ -1210,6 +1211,7 @@ About the new airlock wires panel:
|
||||
src.closeOther = A
|
||||
break
|
||||
name = "\improper [name]"
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/door/airlock/Destroy()
|
||||
qdel(wires)
|
||||
|
||||
@@ -130,18 +130,12 @@ obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||
|
||||
|
||||
obj/machinery/door/airlock/initialize()
|
||||
. = ..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
obj/machinery/door/airlock/New()
|
||||
..()
|
||||
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/door/airlock/Destroy()
|
||||
if(frequency && radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
@@ -210,13 +204,9 @@ obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
|
||||
obj/machinery/airlock_sensor/initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/airlock_sensor/New()
|
||||
..()
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/airlock_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
@@ -228,6 +218,13 @@ obj/machinery/airlock_sensor/airlock_interior
|
||||
obj/machinery/airlock_sensor/airlock_exterior
|
||||
command = "cycle_exterior"
|
||||
|
||||
// Return the air from the turf in "front" of us (Used in shuttles, so it can be in the shuttle area but sense outside it)
|
||||
obj/machinery/airlock_sensor/airlock_exterior/shuttle/return_air()
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(isnull(T))
|
||||
return ..()
|
||||
return T.return_air()
|
||||
|
||||
obj/machinery/access_button
|
||||
icon = 'icons/obj/airlock_machines.dmi'
|
||||
icon_state = "access_button_standby"
|
||||
@@ -280,15 +277,9 @@ obj/machinery/access_button/proc/set_frequency(new_frequency)
|
||||
|
||||
|
||||
obj/machinery/access_button/initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
obj/machinery/access_button/New()
|
||||
..()
|
||||
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
obj/machinery/access_button/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/door/airlock/alarmlock/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
radio_controller.remove_object(src, air_frequency)
|
||||
air_connection = radio_controller.add_object(src, air_frequency, RADIO_TO_AIRALARM)
|
||||
open()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
block_air_zones = 0
|
||||
|
||||
/obj/machinery/door/blast/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
implicit_material = get_material_by_name("plasteel")
|
||||
|
||||
/obj/machinery/door/blast/get_material()
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
var/tag_airlock_mech_sensor
|
||||
var/tag_shuttle_mech_sensor
|
||||
var/tag_secure = 0
|
||||
var/cycle_to_external_air = 0
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
program = new/datum/computer/file/embedded_program/airlock(src)
|
||||
|
||||
//Advanced airlock controller for when you want a more versatile airlock controller - useful for turning simple access control rooms into airlocks
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
tag_secure = 1
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
airlock_program = new/datum/computer/file/embedded_program/airlock/docking(src)
|
||||
docking_program = new/datum/computer/file/embedded_program/docking/airlock(src, airlock_program)
|
||||
program = docking_program
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/datum/computer/file/embedded_program/docking/multi/docking_program
|
||||
|
||||
/obj/machinery/embedded_controller/radio/docking_port_multi/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
docking_program = new/datum/computer/file/embedded_program/docking/multi(src)
|
||||
program = docking_program
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
tag_secure = 1
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
airlock_program = new/datum/computer/file/embedded_program/airlock/multi_docking(src)
|
||||
program = airlock_program
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#define TARGET_INOPEN -1
|
||||
#define TARGET_OUTOPEN -2
|
||||
|
||||
#define MIN_TARGET_PRESSURE (ONE_ATMOSPHERE * 0.05) // Never try to pump to pure vacuum, its not happening.
|
||||
#define SKIPCYCLE_MARGIN 1 // Skip cycling airlock (just open the doors) if pressures are within this range.
|
||||
|
||||
/datum/computer/file/embedded_program/airlock
|
||||
var/tag_exterior_door
|
||||
@@ -23,6 +25,10 @@
|
||||
var/state = STATE_IDLE
|
||||
var/target_state = TARGET_NONE
|
||||
|
||||
var/cycle_to_external_air = 0
|
||||
var/tag_pump_out_external
|
||||
var/tag_pump_out_internal
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/New(var/obj/machinery/embedded_controller/M)
|
||||
..(M)
|
||||
|
||||
@@ -38,6 +44,10 @@
|
||||
|
||||
if (istype(M, /obj/machinery/embedded_controller/radio/airlock)) //if our controller is an airlock controller than we can auto-init our tags
|
||||
var/obj/machinery/embedded_controller/radio/airlock/controller = M
|
||||
cycle_to_external_air = controller.cycle_to_external_air
|
||||
if(cycle_to_external_air)
|
||||
tag_pump_out_external = "[id_tag]_pump_out_external"
|
||||
tag_pump_out_internal = "[id_tag]_pump_out_internal"
|
||||
tag_exterior_door = controller.tag_exterior_door? controller.tag_exterior_door : "[id_tag]_outer"
|
||||
tag_interior_door = controller.tag_interior_door? controller.tag_interior_door : "[id_tag]_inner"
|
||||
tag_airpump = controller.tag_airpump? controller.tag_airpump : "[id_tag]_pump"
|
||||
@@ -74,7 +84,7 @@
|
||||
memory["interior_status"]["state"] = signal.data["door_status"]
|
||||
memory["interior_status"]["lock"] = signal.data["lock_status"]
|
||||
|
||||
else if(receive_tag==tag_airpump)
|
||||
else if(receive_tag==tag_airpump || receive_tag==tag_pump_out_internal)
|
||||
if(signal.data["power"])
|
||||
memory["pump_status"] = signal.data["direction"]
|
||||
else
|
||||
@@ -109,13 +119,18 @@
|
||||
var/shutdown_pump = 0
|
||||
switch(command)
|
||||
if("cycle_ext")
|
||||
//If airlock is already cycled in this direction, just toggle the doors.
|
||||
if(!memory["purge"] && abs(memory["external_sensor_pressure"] - memory["chamber_sensor_pressure"]) <= SKIPCYCLE_MARGIN)
|
||||
toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "toggle")
|
||||
//only respond to these commands if the airlock isn't already doing something
|
||||
//prevents the controller from getting confused and doing strange things
|
||||
if(state == target_state)
|
||||
else if(state == target_state)
|
||||
begin_cycle_out()
|
||||
|
||||
if("cycle_int")
|
||||
if(state == target_state)
|
||||
if(!memory["purge"] && abs(memory["internal_sensor_pressure"] - memory["chamber_sensor_pressure"]) <= SKIPCYCLE_MARGIN)
|
||||
toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "toggle")
|
||||
else if(state == target_state)
|
||||
begin_cycle_in()
|
||||
|
||||
if("cycle_ext_door")
|
||||
@@ -151,6 +166,10 @@
|
||||
|
||||
if(shutdown_pump)
|
||||
signalPump(tag_airpump, 0) //send a signal to stop pressurizing
|
||||
if(cycle_to_external_air)
|
||||
signalPump(tag_pump_out_internal, 0)
|
||||
signalPump(tag_pump_out_external, 0)
|
||||
|
||||
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/process()
|
||||
@@ -170,6 +189,9 @@
|
||||
//make sure to return to a sane idle state
|
||||
if(memory["pump_status"] != "off") //send a signal to stop pumping
|
||||
signalPump(tag_airpump, 0)
|
||||
if(cycle_to_external_air)
|
||||
signalPump(tag_pump_out_internal, 0)
|
||||
signalPump(tag_pump_out_external, 0)
|
||||
|
||||
if ((state == STATE_PRESSURIZE || state == STATE_DEPRESSURIZE) && !check_doors_secured())
|
||||
//the airlock will not allow itself to continue to cycle when any of the doors are forced open.
|
||||
@@ -185,24 +207,37 @@
|
||||
//purge apparently means clearing the airlock chamber to vacuum (then refilling, handled later)
|
||||
target_pressure = 0
|
||||
state = STATE_DEPRESSURIZE
|
||||
signalPump(tag_airpump, 1, 0, 0) //send a signal to start depressurizing
|
||||
if(!cycle_to_external_air || target_state == TARGET_OUTOPEN) // if going outside, pump internal air into air tank
|
||||
signalPump(tag_airpump, 1, 0, target_pressure) //send a signal to start depressurizing
|
||||
else
|
||||
signalPump(tag_pump_out_internal, 1, 0, target_pressure) // if going inside, pump external air out of the airlock
|
||||
signalPump(tag_pump_out_external, 1, 1, 15000) // make sure the air is actually going outside
|
||||
|
||||
else if(chamber_pressure <= target_pressure)
|
||||
state = STATE_PRESSURIZE
|
||||
signalPump(tag_airpump, 1, 1, target_pressure) //send a signal to start pressurizing
|
||||
if(!cycle_to_external_air || target_state == TARGET_INOPEN) // if going inside, pump air into airlock
|
||||
signalPump(tag_airpump, 1, 1, target_pressure) //send a signal to start pressurizing
|
||||
else
|
||||
signalPump(tag_pump_out_internal, 1, 1, target_pressure) // if going outside, fill airlock with external air
|
||||
signalPump(tag_pump_out_external, 1, 0, 0)
|
||||
|
||||
else if(chamber_pressure > target_pressure)
|
||||
state = STATE_DEPRESSURIZE
|
||||
signalPump(tag_airpump, 1, 0, target_pressure) //send a signal to start depressurizing
|
||||
|
||||
if(!cycle_to_external_air)
|
||||
state = STATE_DEPRESSURIZE
|
||||
signalPump(tag_airpump, 1, 0, target_pressure) //send a signal to start depressurizing
|
||||
else
|
||||
memory["purge"] = 1 // should always purge first if using external air, chamber pressure should never be higher than target pressure here
|
||||
//Make sure the airlock isn't aiming for pure vacuum - an impossibility
|
||||
memory["target_pressure"] = max(target_pressure, ONE_ATMOSPHERE * 0.05)
|
||||
memory["target_pressure"] = max(target_pressure, MIN_TARGET_PRESSURE)
|
||||
|
||||
if(STATE_PRESSURIZE)
|
||||
if(memory["chamber_sensor_pressure"] >= memory["target_pressure"] * 0.95)
|
||||
//not done until the pump has reported that it's off
|
||||
if(memory["pump_status"] != "off")
|
||||
signalPump(tag_airpump, 0) //send a signal to stop pumping
|
||||
if(cycle_to_external_air)
|
||||
signalPump(tag_pump_out_internal, 0)
|
||||
signalPump(tag_pump_out_external, 0)
|
||||
else
|
||||
cycleDoors(target_state)
|
||||
state = STATE_IDLE
|
||||
@@ -210,15 +245,17 @@
|
||||
|
||||
|
||||
if(STATE_DEPRESSURIZE)
|
||||
if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
|
||||
if(memory["purge"])
|
||||
memory["purge"] = 0
|
||||
memory["target_pressure"] = memory["internal_sensor_pressure"]
|
||||
state = STATE_PREPARE
|
||||
target_state = TARGET_NONE
|
||||
|
||||
else if(memory["pump_status"] != "off")
|
||||
if(memory["chamber_sensor_pressure"] <= max(memory["target_pressure"] * 1.05, MIN_TARGET_PRESSURE))
|
||||
if(memory["pump_status"] != "off")
|
||||
signalPump(tag_airpump, 0)
|
||||
if(cycle_to_external_air)
|
||||
signalPump(tag_pump_out_internal, 0)
|
||||
signalPump(tag_pump_out_external, 0)
|
||||
else if(memory["purge"])
|
||||
memory["purge"] = 0
|
||||
memory["target_pressure"] = (target_state == TARGET_INOPEN ? memory["internal_sensor_pressure"] : memory["external_sensor_pressure"])
|
||||
if (memory["target_pressure"] > SKIPCYCLE_MARGIN)
|
||||
state = STATE_PREPARE // Skip pressurizing if target pressure is already close enough.
|
||||
else
|
||||
cycleDoors(target_state)
|
||||
state = STATE_IDLE
|
||||
@@ -234,10 +271,12 @@
|
||||
/datum/computer/file/embedded_program/airlock/proc/begin_cycle_in()
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_INOPEN
|
||||
memory["purge"] = cycle_to_external_air
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/begin_cycle_out()
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_OUTOPEN
|
||||
memory["purge"] = cycle_to_external_air
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/close_doors()
|
||||
toggleDoor(memory["interior_status"], tag_interior_door, 1, "close")
|
||||
@@ -363,6 +402,7 @@ send an additional command to open the door again.
|
||||
if(doorCommand)
|
||||
signalDoor(doorTag, doorCommand)
|
||||
|
||||
#undef SKIPCYCLE_MARGIN
|
||||
|
||||
#undef STATE_IDLE
|
||||
#undef STATE_DEPRESSURIZE
|
||||
|
||||
@@ -58,6 +58,7 @@ obj/machinery/embedded_controller/radio/Destroy()
|
||||
unacidable = 1
|
||||
|
||||
/obj/machinery/embedded_controller/radio/initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/embedded_controller/radio/update_icon()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/datum/computer/file/embedded_program/docking/simple/docking_program
|
||||
|
||||
/obj/machinery/embedded_controller/radio/simple_docking_controller/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
docking_program = new/datum/computer/file/embedded_program/docking/simple(src)
|
||||
program = docking_program
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
// On initialization, copy our tracks from the global list
|
||||
/obj/machinery/media/jukebox/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(all_jukebox_tracks.len < 1)
|
||||
stat |= BROKEN // No tracks configured this round!
|
||||
return
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
return "vanilla"
|
||||
|
||||
/obj/machinery/icecream_vat/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
create_reagents(100)
|
||||
while(product_types.len < 6)
|
||||
product_types.Add(5)
|
||||
|
||||
@@ -118,10 +118,13 @@ Class Procs:
|
||||
..(l)
|
||||
if(d)
|
||||
set_dir(d)
|
||||
START_MACHINE_PROCESSING(src)
|
||||
if(circuit)
|
||||
circuit = new circuit(src)
|
||||
|
||||
/obj/machinery/initialize()
|
||||
. = ..()
|
||||
START_MACHINE_PROCESSING(src)
|
||||
|
||||
/obj/machinery/Destroy()
|
||||
STOP_MACHINE_PROCESSING(src)
|
||||
if(component_parts)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
// register for radio system
|
||||
/obj/machinery/status_display/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(radio_controller)
|
||||
radio_controller.add_object(src, frequency)
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
|
||||
|
||||
if(istype(R, /obj/item/device/radio/headset))
|
||||
if(istype(R, /obj/item/device/radio/headset) && !R.adhoc_fallback)
|
||||
continue
|
||||
|
||||
if(R.receive_range(display_freq, level) > -1)
|
||||
|
||||
@@ -131,6 +131,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
else
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
add_link(T)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/telecomms/Destroy()
|
||||
telecomms_list -= src
|
||||
@@ -314,7 +315,25 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
circuitboard = "/obj/item/weapon/circuitboard/telecomms/hub"
|
||||
long_range_link = 1
|
||||
netspeed = 40
|
||||
var/list/telecomms_map
|
||||
|
||||
/obj/machinery/telecomms/hub/initialize()
|
||||
. = ..()
|
||||
LAZYINITLIST(telecomms_map)
|
||||
|
||||
/obj/machinery/telecomms/hub/process()
|
||||
. = ..()
|
||||
telecomms_map.Cut()
|
||||
|
||||
if(!on)
|
||||
return
|
||||
|
||||
for(var/M in links)
|
||||
if(istype(M,/obj/machinery/telecomms/receiver) || istype(M,/obj/machinery/telecomms/relay))
|
||||
var/obj/machinery/telecomms/R = M
|
||||
if(!R.on)
|
||||
continue
|
||||
telecomms_map |= R.listening_level
|
||||
|
||||
/obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
|
||||
if(is_freq_listening(signal))
|
||||
@@ -645,9 +664,40 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
var/garbage_collector = 1 // if set to 0, will not be garbage collected
|
||||
var/input_type = "Speech File"
|
||||
|
||||
//Generic telecomm connectivity test proc
|
||||
/proc/can_telecomm(var/atom/A, var/atom/B, var/ad_hoc = FALSE)
|
||||
if(!A || !B)
|
||||
log_debug("can_telecomm(): Undefined endpoints!")
|
||||
return FALSE
|
||||
|
||||
//Can't in this case, obviously!
|
||||
if(is_jammed(A) || is_jammed(B))
|
||||
return FALSE
|
||||
|
||||
//Items don't have a Z when inside an object or mob
|
||||
var/turf/src_turf = get_turf(A)
|
||||
var/turf/dst_turf = get_turf(B)
|
||||
|
||||
//Nullspace, probably.
|
||||
if(!src_turf || !dst_turf)
|
||||
return FALSE
|
||||
|
||||
var/src_z = src_turf.z
|
||||
var/dst_z = dst_turf.z
|
||||
|
||||
//Mysterious!
|
||||
if(!src_z || !dst_z)
|
||||
return FALSE
|
||||
|
||||
//We can do the simple check first, if you have ad_hoc radios.
|
||||
if(ad_hoc && src_z == dst_z)
|
||||
return TRUE
|
||||
|
||||
//Let's look at hubs and see what we got.
|
||||
var/can_comm = FALSE
|
||||
for(var/obj/machinery/telecomms/hub/H in telecomms_list)
|
||||
if((src_z in H.telecomms_map) && (dst_z in H.telecomms_map))
|
||||
can_comm = TRUE
|
||||
break
|
||||
|
||||
return can_comm
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/teleporter/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/obj/machinery/teleport/station/station
|
||||
var/obj/machinery/teleport/hub/hub
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
/obj/machinery/turretid/initialize()
|
||||
if(!control_area)
|
||||
control_area = get_area(src)
|
||||
else if(ispath(control_area))
|
||||
control_area = locate(control_area)
|
||||
else if(istext(control_area))
|
||||
for(var/area/A in world)
|
||||
if(A.name && A.name==control_area)
|
||||
@@ -62,7 +64,7 @@
|
||||
control_area = null
|
||||
|
||||
power_change() //Checks power and initial settings
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/turretid/proc/isLocked(mob/user)
|
||||
if(ailock && issilicon(user))
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/vr_sleeper/initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/vr_sleeper/process()
|
||||
@@ -223,3 +224,4 @@
|
||||
|
||||
else
|
||||
occupant.enter_vr(avatar)
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/initialize()
|
||||
update_categories()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/process()
|
||||
..()
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/pros_fabricator/initialize()
|
||||
. = ..()
|
||||
manufacturer = basic_robolimb.company
|
||||
update_categories()
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
icon_state = "airlock_sensor_off"
|
||||
|
||||
/obj/machinery/mech_sensor/initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/mech_sensor/proc/set_frequency(new_frequency)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/obj/mecha/medical/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(isPlayerLevel(T.z))
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/medical/mechturn(direction)
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
var/cargo_capacity = 5
|
||||
|
||||
/obj/mecha/working/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(isPlayerLevel(T.z))
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
return
|
||||
|
||||
/obj/mecha/working/Destroy()
|
||||
for(var/mob/M in src)
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
pixel_y = 0
|
||||
|
||||
/obj/structure/sign/poster/initialize()
|
||||
. = ..()
|
||||
if (poster_type)
|
||||
var/path = text2path(poster_type)
|
||||
var/datum/poster/design = new path
|
||||
|
||||
@@ -22,9 +22,39 @@
|
||||
icon_state = "mouse"
|
||||
|
||||
/obj/effect/decal/remains/lizard
|
||||
desc = "They look like the remains of a small rodent."
|
||||
desc = "They look like the remains of a small lizard."
|
||||
icon_state = "lizard"
|
||||
|
||||
/obj/effect/decal/remains/unathi
|
||||
desc = "They look like Unathi remains. Pointy."
|
||||
icon_state = "remainsunathi"
|
||||
|
||||
/obj/effect/decal/remains/tajaran
|
||||
desc = "They look like Tajaran remains. They're surprisingly small."
|
||||
icon_state = "remainstajaran"
|
||||
|
||||
/obj/effect/decal/remains/ribcage
|
||||
desc = "They look like animal remains of some sort... You hope."
|
||||
icon_state = "remainsribcage"
|
||||
|
||||
/obj/effect/decal/remains/deer
|
||||
desc = "They look like the remains of a large herbivore, picked clean."
|
||||
icon_state = "remainsdeer"
|
||||
|
||||
/obj/effect/decal/remains/posi
|
||||
desc = "This looks like part of an old FBP. Hopefully it was empty."
|
||||
icon_state = "remainsposi"
|
||||
|
||||
/obj/effect/decal/remains/mummy1
|
||||
name = "mummified remains"
|
||||
desc = "They look like human remains. They've been here a long time."
|
||||
icon_state = "mummified1"
|
||||
|
||||
/obj/effect/decal/remains/mummy2
|
||||
name = "mummified remains"
|
||||
desc = "They look like human remains. They've been here a long time."
|
||||
icon_state = "mummified2"
|
||||
|
||||
/obj/effect/decal/remains/attack_hand(mob/user as mob)
|
||||
user << "<span class='notice'>[src] sinks together into a pile of ash.</span>"
|
||||
var/turf/simulated/floor/F = get_turf(src)
|
||||
|
||||
@@ -104,7 +104,7 @@ steam.start() -- spawns the effect
|
||||
T.hotspot_expose(1000,100)
|
||||
|
||||
/obj/effect/effect/sparks/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
schedule_task_in(5 SECONDS, /proc/qdel, list(src))
|
||||
|
||||
/obj/effect/effect/sparks/Destroy()
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
delete_me = 1
|
||||
|
||||
/obj/effect/landmark/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(delete_me)
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/Destroy(var/force = FALSE)
|
||||
if(delete_me || force)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effect/temporary_effect/cleave_attack/initialize() // Makes the slash fade smoothly. When completely transparent it should qdel itself.
|
||||
. = ..()
|
||||
animate(src, alpha = 0, time = time_to_die - 1)
|
||||
|
||||
/obj/effect/temporary_effect/shuttle_landing
|
||||
@@ -44,4 +45,4 @@
|
||||
|
||||
/obj/effect/temporary_effect/shuttle_landing/initialize()
|
||||
flick("shuttle_warning", src) // flick() forces the animation to always begin at the start.
|
||||
..()
|
||||
. = ..()
|
||||
@@ -129,6 +129,7 @@
|
||||
var/landmark_id = null
|
||||
|
||||
/obj/effect/step_trigger/teleporter/landmark/initialize()
|
||||
. = ..()
|
||||
for(var/obj/effect/landmark/teleport_mark/mark in tele_landmarks)
|
||||
if(mark.landmark_id == landmark_id)
|
||||
the_landmark = mark
|
||||
@@ -184,11 +185,12 @@ var/global/list/tele_landmarks = list() // Terrible, but the alternative is loop
|
||||
A.forceMove(T) // Harmlessly move ghosts.
|
||||
return
|
||||
|
||||
if(isliving(A)) // Someday, implement parachutes. For now, just turbomurder whoever falls.
|
||||
var/mob/living/L = A
|
||||
L.fall_impact(T, 42, 90, FALSE, TRUE) //You will not be defibbed from this.
|
||||
message_admins("\The [A] fell out of the sky.")
|
||||
A.forceMove(T)
|
||||
// Living things should probably be logged when they fall...
|
||||
if(isliving(A))
|
||||
message_admins("\The [A] fell out of the sky.")
|
||||
// ... because they're probably going to die from it.
|
||||
A.fall_impact(T, 42, 90, FALSE, TRUE) //You will not be defibbed from this.
|
||||
else
|
||||
message_admins("ERROR: planetary_fall step trigger lacks a planet to fall onto.")
|
||||
return
|
||||
|
||||
@@ -110,7 +110,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
/obj/item/weapon/cartridge/security/initialize()
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/detective
|
||||
name = "\improper D.E.T.E.C.T. cartridge"
|
||||
@@ -166,7 +166,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
/obj/item/weapon/cartridge/signal/initialize()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/quartermaster
|
||||
name = "\improper Space Parts & Space Vendors cartridge"
|
||||
@@ -200,7 +200,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
/obj/item/weapon/cartridge/hos/initialize()
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/ce
|
||||
name = "\improper Power-On DELUXE"
|
||||
@@ -225,7 +225,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
/obj/item/weapon/cartridge/rd/initialize()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/captain
|
||||
name = "\improper Value-PAK cartridge"
|
||||
|
||||
@@ -173,13 +173,8 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
|
||||
// Parameters: None
|
||||
// Description: Simple check to see if the exonet node is active.
|
||||
/obj/item/device/communicator/proc/get_connection_to_tcomms()
|
||||
if(node && node.on && node.allow_external_communicators && !is_jammed(src))
|
||||
// VOREStation Edit Start - Lose connection if too far from our exonet node.
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T || !is_on_same_plane_or_station(T.z, node.z))
|
||||
return 0
|
||||
// VOREStation Edit End
|
||||
return 1
|
||||
if(node && node.on && node.allow_external_communicators)
|
||||
return can_telecomm(src,node)
|
||||
return 0
|
||||
|
||||
// Proc: process()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
comm.visible_message("<span class='notice'>\icon[src] Connecting to [src].</span>")
|
||||
to_chat(user, "<span class='notice'>\icon[src] Attempting to call [comm].</span>")
|
||||
sleep(10)
|
||||
to_chat(user, "<span class='notice'>\icon[src] Dialing internally from [station_name()], [system_name()].</span>") // Vorestation edit
|
||||
to_chat(user, "<span class='notice'>\icon[src] Dialing internally from [station_name()], [system_name()].</span>")
|
||||
sleep(20) //If they don't have an exonet something is very wrong and we want a runtime.
|
||||
to_chat(user, "<span class='notice'>\icon[src] Connection re-routed to [comm] at [comm.exonet.address].</span>")
|
||||
sleep(40)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/power_use = 1
|
||||
|
||||
/obj/item/device/flashlight/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/New()
|
||||
|
||||
@@ -18,6 +18,7 @@ var/list/GPS_list = list()
|
||||
var/can_hide_signal = FALSE // If it can toggle the above var.
|
||||
|
||||
/obj/item/device/gps/initialize()
|
||||
. = ..()
|
||||
GPS_list += src
|
||||
name = "global positioning system ([gps_tag])"
|
||||
update_icon()
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
ks1type = /obj/item/device/encryptionkey/raider
|
||||
|
||||
/obj/item/device/radio/headset/raider/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
set_frequency(RAID_FREQ)
|
||||
|
||||
/obj/item/device/radio/headset/binary
|
||||
|
||||
@@ -39,6 +39,7 @@ var/global/list/default_medbay_channels = list(
|
||||
var/listening = 1
|
||||
var/list/channels = list() //see communications.dm for full list. First channel is a "default" for :h
|
||||
var/subspace_transmission = 0
|
||||
var/adhoc_fallback = FALSE //Falls back to 'radio' mode if subspace not available
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrypted radio
|
||||
var/centComm = 0//Holder to see if it's a CentCom encrypted radio
|
||||
flags = CONDUCT
|
||||
@@ -79,7 +80,7 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
|
||||
. = ..()
|
||||
if(frequency < RADIO_LOW_FREQ || frequency > RADIO_HIGH_FREQ)
|
||||
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
|
||||
set_frequency(frequency)
|
||||
@@ -414,9 +415,15 @@ var/global/list/default_medbay_channels = list(
|
||||
for(var/obj/machinery/telecomms/allinone/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Receiving code can be located in Telecommunications.dm
|
||||
return signal.data["done"] && position.z in signal.data["level"]
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
return TRUE //Huzzah, sent via subspace
|
||||
|
||||
else if(adhoc_fallback) //Less huzzah, we have to fallback
|
||||
to_chat(loc,"<span class='warning'>\The [src] pings as it falls back to local radio transmission.</span>")
|
||||
subspace_transmission = FALSE
|
||||
return Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
||||
src, message, displayname, jobname, real_name, M.voice_name,
|
||||
signal.transmission_method, signal.data["compression"], list(position.z), connection.frequency,verb,speaking)
|
||||
|
||||
/* ###### Intercoms and station-bounced radios ###### */
|
||||
|
||||
@@ -463,10 +470,10 @@ var/global/list/default_medbay_channels = list(
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
|
||||
sleep(rand(10,25)) // wait a little...
|
||||
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
if(adhoc_fallback)
|
||||
to_chat(loc,"<span class='notice'>\The [src] pings as it reestablishes subspace communications.</span>")
|
||||
subspace_transmission = TRUE
|
||||
// we're done here.
|
||||
return 1
|
||||
|
||||
|
||||
@@ -266,22 +266,26 @@ REAGENT SCANNER
|
||||
if(0)
|
||||
to_chat(usr, "The scanner will now perform a basic analysis.")
|
||||
|
||||
/obj/item/device/healthanalyzer/improved //reports bone fractures, IB, quantity of beneficial reagents in stomach; also regular health analyzer stuff
|
||||
/obj/item/device/healthanalyzer/advanced //reports bone fractures, IB, quantity of beneficial reagents in stomach; also regular health analyzer stuff
|
||||
name = "advanced health analyzer"
|
||||
desc = "A miracle of medical technology, this handheld scanner can produce an accurate and specific report of a patient's biosigns."
|
||||
advscan = 1
|
||||
origin_tech = list(TECH_MAGNET = 5, TECH_BIO = 6)
|
||||
icon_state = "advhealth"
|
||||
icon_state = "health1"
|
||||
|
||||
/obj/item/device/healthanalyzer/advanced //reports all of the above, as well as radiation severity and minor brain damage
|
||||
name = "advanced health analyzer"
|
||||
/obj/item/device/healthanalyzer/enhanced //reports all of the above, as well as radiation severity and minor brain damage
|
||||
name = "enhanced health analyzer"
|
||||
desc = "An even more advanced handheld health scanner, complete with a full biosign monitor and on-board radiation and neurological analysis suites."
|
||||
advscan = 2
|
||||
icon_state = "advhealth"
|
||||
origin_tech = list(TECH_MAGNET = 6, TECH_BIO = 7)
|
||||
icon_state = "health2"
|
||||
|
||||
/obj/item/device/healthanalyzer/enhanced //reports all of the above, as well as name and quantity of nonmed reagents in stomach
|
||||
/obj/item/device/healthanalyzer/phasic //reports all of the above, as well as name and quantity of nonmed reagents in stomach
|
||||
name = "phasic health analyzer"
|
||||
desc = "Possibly the most advanced health analyzer to ever have existed, utilising bluespace technology to determine almost everything worth knowing about a patient."
|
||||
advscan = 3
|
||||
icon_state = "advhealth"
|
||||
origin_tech = list(TECH_MAGNET = 7, TECH_BIO = 8)
|
||||
icon_state = "health3"
|
||||
|
||||
/obj/item/device/analyzer
|
||||
name = "analyzer"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/obj/item/device/text_to_speech
|
||||
name = "TTS device"
|
||||
desc = "A device that speaks an inputted message. Given to crew which can not speak properly or at all."
|
||||
icon = 'icons/obj/electronic_assemblies.dmi'
|
||||
icon_state = "setup_small"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/named
|
||||
|
||||
/obj/item/device/text_to_speech/attack_self(mob/user as mob)
|
||||
if(user.incapacitated(INCAPACITATION_ALL)) //Are you in a state to actual use the device?
|
||||
to_chat(user, "You cannot activate the device in your state.")
|
||||
return
|
||||
|
||||
if(!named)
|
||||
to_chat(user, "You input your name into the device.")
|
||||
name = "[initial(name)] ([user.real_name])"
|
||||
desc = "[initial(desc)] This one is assigned to [user.real_name]."
|
||||
named = 1
|
||||
/* //Another way of naming the device. Gives more freedom, but could lead to issues.
|
||||
device_name = copytext(sanitize(input(user, "What would you like to name your device? You must input a name before the device can be used.", "Name your device", "") as null|text),1,MAX_NAME_LEN)
|
||||
name = "[initial(name)] - [device_name]"
|
||||
named = 1
|
||||
*/
|
||||
|
||||
var/message = sanitize(input(user,"Choose a message to relay to those around you.") as text|null)
|
||||
if(message)
|
||||
var/obj/item/device/text_to_speech/O = src
|
||||
audible_message("\icon[O] \The [O.name] states, \"[message]\"")
|
||||
@@ -4,7 +4,7 @@
|
||||
desc = "This handy device appears to translate the languages it hears into onscreen text for a user."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "translator"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
w_class = ITEMSIZE_NORMAL //VOREStation Edit
|
||||
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
|
||||
var/mult_icons = 1 //Changes sprite when it translates
|
||||
var/visual = 1 //If you need to see to get the message
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user