Merge pull request #10 from tgstation/master

repo updating
This commit is contained in:
phil235
2014-06-10 21:28:32 +02:00
525 changed files with 27101 additions and 23263 deletions
+8 -3
View File
@@ -2,8 +2,13 @@
language: c
env:
BYOND_MAJOR="503"
BYOND_MINOR="1224"
global:
- BYOND_MAJOR="504"
- BYOND_MINOR="1232"
matrix:
- DM_MAPFILE="tgstation2"
- DM_MAPFILE="metastation"
- DM_MAPFILE="ministation"
before_install:
- sudo apt-get update -qq
@@ -17,4 +22,4 @@ install:
- cd ..
script:
- DreamMaker tgstation.dme
- bash dm.sh -M${DM_MAPFILE} tgstation.dme
+90
View File
@@ -0,0 +1,90 @@
#CONTRIBUTING
##Introduction
Hello and welcome to /tg/station's contributing page. You are here because you are curious or interested in contributing. Thanks for being interested. Everyone is free to contribute to this project as long as they follow the simple guidelines and specifications below, because at /tg/station, we have a goal to increase code maintainability and to do that we are going to need all pull requests to hold up to those specifications. This is in order for all of us to benefit, instead of having to fix the same bug more than once because of duplicated code.
But first we want to make it clear how you can contribute, if contributing is a new experience for you, and what powers the team has over your pull request so you do not get any surprises when submitting pull requests, and it is closed for a reason you did not anticipate.
##Getting Started
At /tg/station we do not have a list of goals and features to add, we instead allow freedom for contributors to suggest and create their ideas for the game. That does not mean we aren't determined to squash bugs, which unfortunately pop up a lot due to the deep complexity of the game. Here are some useful getting started guides, if you want to contribute or if you want to know what challenges you can tackle with zero knowledge about the game's code structure.
We have a [list of guides on the wiki](http://www.tgstation13.org/wiki/index.php/Guides#Development_and_Contribution_Guides) which will help you get started contributing to /tg/station with git and Dream Maker. For beginners, it is recommended you work on small projects, at first. There is an easy list of issues which are [contributor friendly, here](https://github.com/tgstation/-tg-station/issues?labels=Contributor+Friendly&page=1&state=open).
You can of course, as always, ask for help at [#coderbus](irc://irc.rizon.net/coderbus) on irc.rizon.net. We are just here to have fun and help so do not expect professional support please.
##Meet the Team
**Project Leads**
Project Leads, which are elected by the maintainers and members of the project, have complete control over what goes through and what is reverted. They are encouraged to take control in what features are added to the game. Project Leads can also act as Project Managers when needed.
**Project Managers**
Project Managers are responsible for recruiting and firing maintainers, enforcing coding standards, and reverting changes that should have not been committed. Project Managers are assigned by Project Leads. On things that Project Managers disagree on they are to refer to the Project Leads for advice. It is encouraged that if you do not want to waste time working on a feature, that might be denied, that you ask a Project Manager first.
**Maintainers**
Maintainers are quality control. If a proposed pull request does not meet the mentioned quality specifications then it can be closed if you fail to satisfy them. Maintainers are required to give a reason for closing the pull request.
Maintainers can revert your changes if they feel they are not worth maintaining or if they did not live up to the quality specifications.
##Specification
As mentioned before, you are expected to follow these specifications in order to make everyone's lives easier, it will also save you and us time, with having to make the changes and us having to tell you what to change. Thank you for reading this section.
* As BYOND's Dream Maker is an object oriented language, code must be object oriented when possible in order to be more flexible when adding content to it. If you are unfamiliar with this concept, it is highly recommended you look it up.
* You must write BYOND code with absolute pathing, like so:
```C++
/obj/item/weapon/baseball_bat
name = "baseball bat"
desc = "A baseball bat."
var/wooden = 1
/obj/item/weapon/baseball_bat/examine()
if(wooden)
desc = "A wooden baseball bat."
else
desc = "A metal baseball bat."
..()
```
* You must not use colons to override safety checks on an object's variable/function, instead of using proper type casting.
* It is rarely allowed to put type paths in a text format, as they is no compile errors if the type path no longer exists. Here is an example:
```C++
//Good
var/path_type = /obj/item/weapon/baseball_bat
//Bad
var/path_type = "/obj/item/weapon/baseball_bat"
```
* You must use tabs to indent your code, NOT SPACES.
* Hacky code, such as adding specific checks, is highly discouraged and only allowed when there is no other option. You can avoid hacky code by using object oriented methodologies, such as overriding a function (called procs in DM) or sectioning code into functions and then overriding them as required.
* Duplicated code is 99% of the time never allowed. Copying code from one place to another maybe suitable for small short time projects but /tg/station focuses on the long term and thus discourages this. Instead you can use object orientation, or simply placing repeated code in a function, to obey this specification easily.
* Code should be modular where possible, if you are working on a new class then it is best if you put it in a new file.
* Bloated code may be necessary to add a certain feature, which means there has to be a judgement over whether the feature is worth having or not. You can help make this decision easier by making sure your code is modular.
* You are expected to help maintain the code that you add, meaning if there is a problem then you are likely to be approached in order to fix any issues, runtimes or bugs.
##Pull Request Process
There is no strict process when it comes to merging pull requests, pull requests will sometimes take a while before they are looked at by a maintainer, the bigger the change the more time it will take before they are accepted into the code. Every team member is a volunteer who is giving up their own time to help maintain and contribute, so please be nice. Here are some helpful ways to make it easier for you and for the maintainer when making a pull request.
* You are going to be expected to document all your changes in the pull request, failing to do so will mean delaying it as we will have to question why you made the change. On the other hand you can speed up the process by making the pull request readable and easy to understand, with diagrams or before/after data.
* If you are proposing multiple changes, which change many different aspects of the code, you are expected to section them off into different pull requests in order to make it easier to review them and to deny/accept the changes that are deemed acceptable.
* If your pull request is accepted, the code you add is no longer exclusively yours but everyones, everyone is free to work on it but you are also free to object to any changes being made, which will be noted by a Project Lead or Project Manager. It is a shame this has to be explicitly told but there have been cases where this would've saved some trouble.
+28 -80
View File
@@ -1,14 +1,15 @@
/tg/station 13 v1.0 - 6 October 2010 [![Build Status](https://travis-ci.org/tgstation/-tg-station.png)](https://travis-ci.org/tgstation/-tg-station)
##/tg/station v1.0.1
Website: http://ss13.eu
[![Build Status](https://travis-ci.org/tgstation/-tg-station.png)](https://travis-ci.org/tgstation/-tg-station)
Code: https://github.com/tgstation/-tg-station
IRC: irc://irc.rizon.net/coderbus
**Website:** http://www.tgstation13.org <BR>
**Code:** https://github.com/tgstation/-tg-station <BR>
**IRC:** irc://irc.rizon.net/coderbus <BR>
# DOWNLOADING
##DOWNLOADING
There are a number of ways to download the source code. Some are described here, an alternative all-inclusive guide is also located at http://wiki.ss13.eu/index.php/Downloading_the_source_code
There are a number of ways to download the source code. Some are described here, an alternative all-inclusive guide is also located at http://www.tgstation13.org/wiki/index.php/Downloading_the_source_code
Option 1: Download the source code as a zip by clicking the ZIP button in the
code tab of https://github.com/tgstation/-tg-station
@@ -24,11 +25,11 @@ Then you simply search for the -tg-station repository and click the big clone
button.
Option 3:
Follow this: http://wiki.ss13.eu/index.php/Setting_up_git
Follow this: http://www.tgstation13.org/wiki/index.php/Setting_up_git
(It's recommended that you use git-scm, as above, rather than the git CLI
suggested by the guide)
#INSTALLATION
##INSTALLATION
First-time installation should be fairly straightforward. First, you'll need
BYOND installed. You can get it from http://www.byond.com/. Once you've done
@@ -73,7 +74,7 @@ compiled tgstation.dmb file. Make sure to set the port to the one you
specified in the config.txt, and set the Security box to 'Safe'. Then press GO
and the server should start up and be ready to join.
#UPDATING
##UPDATING
To update an existing installation, first back up your /config and /data folders
as these store your server configuration, player preferences and banlist.
@@ -84,89 +85,36 @@ install, overwriting when prompted except if we've specified otherwise, and
recompile the game. Once you start the server up again, you should be running
the new version.
#SQL SETUP
##MAPS
/tg/station currently comes equipped with three maps.
* [tgstation2 (default)](http://tgstation13.org/wiki/Boxstation)
* [MetaStation](http://tgstation13.org/wiki/MetaStation)
* [MiniStation](http://tgstation13.org/wiki/MiniStation)
All maps have their own code file that is in the base of the _maps directory. Instead of loading the map directly we instead use a code file to include the map and then include any other code changes that are needed for it; for example MiniStation changes the uplink items for the map. Follow this guideline when adding your own map, to your fork, for easy compatibility.
If you want to load a different map, just open the corresponding map's code file in Dream Maker, make sure all of the other map code files are unticked in the file tree, in the left side of the screen, and then make sure the map code file you want is ticked.
##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 are located here: http://wiki.ss13.eu/index.php/Downloading_the_source_code#Setting_up_the_database
schema is in /SQL/tgstation_schema.sql. More detailed setup instructions are located here: http://www.tgstation13.org/wiki/index.php/Downloading_the_source_code#Setting_up_the_database
#IRC BOT SETUP
##IRC BOT SETUP
Included in the SVN 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 script
itself
#CONTRIBUTING
Everyone is free to contribute to this project as long as they follow these simple guidelines and specifications.
##CONTRIBUTING
**Introduction**
Please see [CONTRIBUTING.md](CONTRIBUTING.md)
As a goal to increase code maintainability we are going to be requiring all pull requests to hold up to the standards mentioned below. This is in order for all of us to benefit, instead of having to fix the same bug more than once because of duplicated code.
But first we want to make it clear over what powers the maintainers have over your pull request, so you do not get any surprises when submitting pull requests and it is closed for a reason you did not suspect.
Maintainers are quality control. If a proposed pull request does not meet the mentioned quality specifications then it can be closed if you fail to satisfy them. Maintainers are required to give a reason for closing the pull request.
Maintainers can revert your changes if they feel they are not worth maintaining or if they did not live up to the quality specifications.
Headcoders, which are elected by the maintainers and members of the project, have complete control over what goes through and what is reverted. They are encouraged to take control in what features are added to the game. It is encouraged that if you do not want to waste time working on a feature, that might be denied, that you ask a head coder first.
**Specification**
As BYOND's Dream Maker is an object oriented language, code must be object oriented when possible in order to be more flexible when adding content to it.
You must write BYOND code with absolute pathing, like so:
```C++
/obj/item/weapon/baseball_bat
name = "baseball bat"
desc = "A baseball bat."
var/wooden = 1
/obj/item/weapon/baseball_bat/examine()
if(wooden)
desc = "A wooden baseball bat."
else
desc = "A metal baseball bat."
..()
```
You must not use colons to override safety checks on an object's variable/function, instead of using proper type casting.
It is rarely allowed to put type paths in a text format, as they is no compile errors if the type path no longer exists.
You must use tabs to indent your code.
Hacky code, such as adding specific checks, is highly discouraged and only allowed when there is no other option. You can avoid hacky code by using object oriented methodologies, such as overriding a function (called procs in DM) or sectioning code into functions and then overriding them as required.
Duplicated code is 99% of the time never allowed. Copying code from one place to another maybe suitable for small short time projects but /tg/station focuses on the long term and thus discourages this. Instead you can use object orientation, or simply placing repeated code in a function, to obey this specification easily.
Code should be modular where possible, if you are working on a new class then it is best if you put it in a new file.
Bloated code may be necessary to add a certain feature, which means there has to be a judgement over whether the feature is worth having or not. You can help make this decision easier by making sure your code is modular.
You are expected to help maintain the code that you add, meaning if there is a problem then you are likely to be approached in order to fix any issues, runtimes or bugs.
**Other Requirements/Information**
Pull requests will sometimes take a while before they are looked at by a maintainer, the bigger the change the more time it will take before they are accepted into the code.
You are expected to document all your changes in the pull request, failing to do so will risk delaying it. On the other hand you can speed up the process by making the pull request readable and easy to understand, with diagrams or before/after data.
If you are proposing multiple changes, which change many different aspects of the code, you are to section them off into different pull requests in order to easily review them and to deny/accept the changes that are deemed acceptable.
If your pull request is accepted, the code you add is no longer yours but everyones, everyone is free to work on it but you are also free to object to any changes being made, which will be noted by a headcoder.
**Getting Started**
We have a [list of guides on the wiki](http://wiki.ss13.eu/index.php/Guides#Development_and_Contribution_Guides) which will help you get started contributing to /tg/station with git and Dream Maker.
For beginners, it is recommended you work on small projects, at first. There is an easy list of issues which are [contributor friendly, here](https://github.com/tgstation/-tg-station/issues?labels=Contributor+Friendly&page=1&state=open).
#LICENSE
##LICENSE
All code is under a GNU GPL v3 license (http://www.gnu.org/licenses/gpl.html),
including tools unless their readme specifies otherwise.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,8 +1,8 @@
#if !defined(MAP_FILE)
#include "map_files\MetaStation.v39I.dmm"
#include "map_files\MetaStation.v39K.dmm"
#define MAP_FILE "MetaStation.v39I.dmm"
#define MAP_FILE "MetaStation.v39K.dmm"
#define MAP_NAME "MetaStation"
#elif !defined(MAP_OVERRIDE)
+2 -2
View File
@@ -1,8 +1,8 @@
#if !defined(MAP_FILE)
#include "map_files\tgstation.2.1.2.dmm"
#include "map_files\tgstation.2.1.3.dmm"
#define MAP_FILE "tgstation.2.1.2.dmm"
#define MAP_FILE "tgstation.2.1.3.dmm"
#define MAP_NAME "TGstation 2"
#elif !defined(MAP_OVERRIDE)
+1 -1
View File
@@ -68,7 +68,7 @@ obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user a
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
user << "\red You cannot unwrench this [src], it is too exerted due to internal pressure."
add_fingerprint(user)
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -37,21 +37,23 @@
..()
initialize()
src.disconnect(src)
initialize(infiniteloop = 0)
if(!infiniteloop)
src.disconnect(src)
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
target.initialize()
if(!infiniteloop)
target.initialize(1)
break
build_network()
update_icon()
default_change_direction_wrench(mob/user, /obj/item/weapon/wrench/W)
default_change_direction_wrench(mob/user, obj/item/weapon/wrench/W)
if(..())
initialize_directions = dir
if(node)
@@ -90,8 +92,8 @@
disconnect(obj/machinery/atmospherics/reference)
if(reference==node)
node.disconnect(src)
del(network)
node = null
reference.disconnect(src)
del(network)
return null
+18 -1
View File
@@ -42,11 +42,25 @@ datum/controller/air_system
/datum/controller/air_system/proc/process_air()
current_cycle++
var/timer = world.timeofday
process_active_turfs()
master_controller.air_turfs = (world.timeofday - timer) / 10
timer = world.timeofday
process_excited_groups()
master_controller.air_groups = (world.timeofday - timer) / 10
timer = world.timeofday
process_high_pressure_delta()
master_controller.air_highpressure = (world.timeofday - timer) / 10
timer = world.timeofday
process_hotspots()
master_controller.air_hotspots = (world.timeofday - timer) / 10
timer = world.timeofday
process_super_conductivity()
master_controller.air_superconductivity = (world.timeofday - timer) / 10
/datum/controller/air_system/proc/process_hotspots()
for(var/obj/effect/hotspot/H in hotspots)
@@ -222,7 +236,7 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
T.atmos_spawn_air(text, amount)
var/const/SPAWN_HEAT = 1
var/const/SPAWN_20C = 2
var/const/SPAWN_TOXINS = 4
var/const/SPAWN_OXYGEN = 8
var/const/SPAWN_CO2 = 16
@@ -238,6 +252,9 @@ var/const/SPAWN_AIR = 256
var/datum/gas_mixture/G = new
if(flag & SPAWN_20C)
G.temperature = T20C
if(flag & SPAWN_HEAT)
G.temperature += 1000
+32 -29
View File
@@ -1,29 +1,32 @@
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
//Security levels
#define SEC_LEVEL_GREEN 0
#define SEC_LEVEL_BLUE 1
#define SEC_LEVEL_RED 2
#define SEC_LEVEL_DELTA 3
//some arbitrary defines to be used by self-pruning global lists. (see master_controller)
#define PROCESS_KILL 26 //Used to trigger removal from a processing list
#define MANIFEST_ERROR_NAME 1
#define MANIFEST_ERROR_COUNT 2
#define MANIFEST_ERROR_ITEM 4
#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level
//HUD styles. Please ensure HUD_VERSIONS is the same as the maximum index. Index order defines how they are cycled in F12.
#define HUD_STYLE_STANDARD 1
#define HUD_STYLE_REDUCED 2
#define HUD_STYLE_NOHUD 3
#define HUD_VERSIONS 3 //used in show_hud()
//1 = standard hud
//2 = reduced hud (just hands and intent switcher)
//3 = no hud (for screenshots)
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
//Security levels
#define SEC_LEVEL_GREEN 0
#define SEC_LEVEL_BLUE 1
#define SEC_LEVEL_RED 2
#define SEC_LEVEL_DELTA 3
//some arbitrary defines to be used by self-pruning global lists. (see master_controller)
#define PROCESS_KILL 26 //Used to trigger removal from a processing list
#define MANIFEST_ERROR_NAME 1
#define MANIFEST_ERROR_COUNT 2
#define MANIFEST_ERROR_ITEM 4
#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level
//HUD styles. Please ensure HUD_VERSIONS is the same as the maximum index. Index order defines how they are cycled in F12.
#define HUD_STYLE_STANDARD 1
#define HUD_STYLE_REDUCED 2
#define HUD_STYLE_NOHUD 3
#define HUD_VERSIONS 3 //used in show_hud()
//1 = standard hud
//2 = reduced hud (just hands and intent switcher)
//3 = no hud (for screenshots)
#define MINERAL_MATERIAL_AMOUNT 2000
//The amount of materials you get from a sheet of mineral like iron/diamond/glass etc
+2 -1
View File
@@ -11,8 +11,9 @@
#define CHAT_PRAYER 256
#define CHAT_RADIO 512
#define MEMBER_PUBLIC 1024
#define CHAT_PULLR 2048
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|MEMBER_PUBLIC)
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|MEMBER_PUBLIC|CHAT_PULLR)
#define BE_TRAITOR 1
#define BE_OPERATIVE 2
@@ -1,70 +1,72 @@
//print an error message to world.log
/proc/error(msg)
world.log << "## ERROR: [msg]"
//print a warning message to world.log
/proc/warning(msg)
world.log << "## WARNING: [msg]"
//print a testing-mode debug message to world.log
/proc/testing(msg)
#ifdef TESTING
world.log << "## TESTING: [msg]"
#endif
/proc/log_admin(text)
admin_log.Add(text)
if (config.log_admin)
diary << "\[[time_stamp()]]ADMIN: [text]"
/proc/log_game(text)
if (config.log_game)
diary << "\[[time_stamp()]]GAME: [text]"
/proc/log_vote(text)
if (config.log_vote)
diary << "\[[time_stamp()]]VOTE: [text]"
/proc/log_access(text)
if (config.log_access)
diary << "\[[time_stamp()]]ACCESS: [text]"
/proc/log_say(text)
if (config.log_say)
diary << "\[[time_stamp()]]SAY: [text]"
/proc/log_prayer(text)
if (config.log_prayer)
diary << "\[[time_stamp()]]PRAY: [text]"
/proc/log_law(text)
if (config.log_law)
diary << "\[[time_stamp()]]LAW: [text]"
/proc/log_ooc(text)
if (config.log_ooc)
diary << "\[[time_stamp()]]OOC: [text]"
/proc/log_whisper(text)
if (config.log_whisper)
diary << "\[[time_stamp()]]WHISPER: [text]"
/proc/log_emote(text)
if (config.log_emote)
diary << "\[[time_stamp()]]EMOTE: [text]"
/proc/log_attack(text)
if (config.log_attack)
diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]"
/proc/log_adminsay(text)
if (config.log_adminchat)
diary << "\[[time_stamp()]]ADMINSAY: [text]"
/proc/log_adminwarn(text)
if (config.log_adminwarn)
diary << "\[[time_stamp()]]ADMINWARN: [text]"
/proc/log_pda(text)
if (config.log_pda)
//print an error message to world.log
#define ERROR(MSG) error("[MSG] in [__FILE__] at line [__LINE__] src: [src] usr: [usr].")
/proc/error(msg)
world.log << "## ERROR: [msg]"
//print a warning message to world.log
#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [src] usr: [usr].")
/proc/warning(msg)
world.log << "## WARNING: [msg]"
//print a testing-mode debug message to world.log
/proc/testing(msg)
#ifdef TESTING
world.log << "## TESTING: [msg]"
#endif
/proc/log_admin(text)
admin_log.Add(text)
if (config.log_admin)
diary << "\[[time_stamp()]]ADMIN: [text]"
/proc/log_game(text)
if (config.log_game)
diary << "\[[time_stamp()]]GAME: [text]"
/proc/log_vote(text)
if (config.log_vote)
diary << "\[[time_stamp()]]VOTE: [text]"
/proc/log_access(text)
if (config.log_access)
diary << "\[[time_stamp()]]ACCESS: [text]"
/proc/log_say(text)
if (config.log_say)
diary << "\[[time_stamp()]]SAY: [text]"
/proc/log_prayer(text)
if (config.log_prayer)
diary << "\[[time_stamp()]]PRAY: [text]"
/proc/log_law(text)
if (config.log_law)
diary << "\[[time_stamp()]]LAW: [text]"
/proc/log_ooc(text)
if (config.log_ooc)
diary << "\[[time_stamp()]]OOC: [text]"
/proc/log_whisper(text)
if (config.log_whisper)
diary << "\[[time_stamp()]]WHISPER: [text]"
/proc/log_emote(text)
if (config.log_emote)
diary << "\[[time_stamp()]]EMOTE: [text]"
/proc/log_attack(text)
if (config.log_attack)
diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]"
/proc/log_adminsay(text)
if (config.log_adminchat)
diary << "\[[time_stamp()]]ADMINSAY: [text]"
/proc/log_adminwarn(text)
if (config.log_adminwarn)
diary << "\[[time_stamp()]]ADMINWARN: [text]"
/proc/log_pda(text)
if (config.log_pda)
diary << "\[[time_stamp()]]PDA: [text]"
+2 -2
View File
@@ -2,12 +2,12 @@
//returns text as a string if these conditions are met
/proc/return_file_text(filename)
if(fexists(filename) == 0)
error("File not found ([filename])")
ERROR("File not found ([filename])")
return
var/text = file2text(filename)
if(!text)
error("File empty ([filename])")
ERROR("File empty ([filename])")
return
return text
+3 -3
View File
@@ -169,11 +169,11 @@ proc/recursive_mob_check(var/atom/O,var/client_check=1,var/sight_check=1,var/inc
found_mobs |= A
for(var/atom/B in A)
if(!(B in processed_list))
if(!processed_list[B])
processing_list |= B
processing_list -= A
processed_list |= A
processing_list.Cut(1, 2)
processed_list[A] = A
return found_mobs
+14
View File
@@ -1,3 +1,17 @@
/matrix/proc/TurnTo(old_angle, new_angle)
. = new_angle - old_angle
Turn(.) //BYOND handles cases such as -270, 360, 540 etc. DOES NOT HANDLE 180 TURNS WELL, THEY TWEEN AND LOOK LIKE SHIT
/atom/proc/SpinAnimation(speed = 10)
var/matrix/m120 = matrix(transform)
m120.Turn(120)
var/matrix/m240 = matrix(transform)
m240.Turn(240)
var/matrix/m360 = matrix(transform)
speed /= 3 //Gives us 3 equal time segments for our three turns.
//Why not one turn? Because byond will see that the start and finish are the same place and do nothing
//Why not two turns? Because byond will do a flip instead of a turn
animate(src, transform = m120, time = speed, loop = -1)
animate(transform = m240, time = speed)
animate(transform = m360, time = speed)
+5
View File
@@ -56,6 +56,11 @@ var/list/skin_tones = list(
"african2"
)
var/list/mutant_races = list(
"human",
"lizard",
)
proc/age2agedescription(age)
switch(age)
if(0 to 1) return "infant"
+38 -5
View File
@@ -249,6 +249,19 @@ Turf and target are seperate in case you want to teleport some distance from a t
if(C.dna)
C.dna.real_name = real_name
if(isAI(src))
var/mob/living/silicon/ai/AI = src
if(oldname != real_name)
for(var/mob/living/silicon/robot/Slave in AI.connected_robots)
Slave.show_laws()
if(isrobot(src))
var/mob/living/silicon/robot/R = src
if(oldname != real_name)
R.notify_ai(3, oldname, newname)
if(R.camera)
R.camera.c_tag = real_name
if(oldname)
//update the datacore records! This is goig to be a bit costly.
for(var/list/L in list(data_core.general,data_core.medical,data_core.security,data_core.locked))
@@ -265,7 +278,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/obj/item/weapon/card/id/ID = A
if(ID.registered_name == oldname)
ID.registered_name = newname
ID.name = "[newname]'s ID Card ([ID.assignment])"
ID.update_label()
if(!search_pda) break
search_id = 0
@@ -273,7 +286,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/obj/item/device/pda/PDA = A
if(PDA.owner == oldname)
PDA.owner = newname
PDA.name = "PDA-[newname] ([PDA.ownjob])"
PDA.update_label()
if(!search_id) break
search_pda = 0
@@ -330,6 +343,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
A.aiPDA.owner = newname
A.aiPDA.name = newname + " (" + A.aiPDA.ownjob + ")"
// Notify Cyborgs
for(var/mob/living/silicon/robot/Slave in A.connected_robots)
Slave.show_laws()
if(cmptext("cyborg",role))
if(isrobot(src))
var/mob/living/silicon/robot/A = src
@@ -518,6 +535,14 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/key_name_admin(var/whom, var/include_name = 1)
return key_name(whom, 1, include_name)
/proc/get_mob_by_ckey(var/key)
if(!key)
return
var/list/mobs = sortmobs()
for(var/mob/M in mobs)
if(M.ckey == key)
return M
// Returns the atom sitting on the turf.
// For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
/proc/get_atom_on_turf(var/atom/movable/M)
@@ -701,7 +726,7 @@ atom/proc/GetTypeInAllContents(typepath)
else
return 0
/proc/do_after(var/mob/user as mob, delay as num, var/numticks = 5, var/needhand = 1)
/proc/do_after(mob/user, delay, numticks = 5, needhand = 1)
if(!user || isnull(user))
return 0
if(numticks == 0)
@@ -710,6 +735,9 @@ atom/proc/GetTypeInAllContents(typepath)
var/delayfraction = round(delay/numticks)
var/turf/T = user.loc
var/holding = user.get_active_hand()
var/holdingnull = 1
if(holding)
holdingnull = 0
for(var/i = 0, i<numticks, i++)
sleep(delayfraction)
@@ -717,8 +745,13 @@ atom/proc/GetTypeInAllContents(typepath)
if(!user || user.stat || user.weakened || user.stunned || !(user.loc == T))
return 0
if(needhand && !(user.get_active_hand() == holding)) //Sometimes you don't want the user to have to keep their active hand
return 0
if(needhand) //Sometimes you don't want the user to have to keep their active hand
if(!holdingnull)
if(!holding)
return 0
if(user.get_active_hand() != holding)
return 0
return 1
+4
View File
@@ -21,6 +21,10 @@ var/tinted_weldhelh = 1
var/Debug = 0 // global debug switch
var/Debug2 = 0
//Server API key
var/global/comms_key = "default_pwd"
var/global/comms_allowed = 0 //By default, the server does not allow messages to be sent to it, unless the key is strong enough (this is to prevent misconfigured servers from becoming vulnerable)
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
var/MAX_EX_DEVESTATION_RANGE = 3
+29 -1
View File
@@ -24,9 +24,37 @@ var/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.
// Reference list for disposal sort junctions. Set the sortType variable on disposal sort junctions to
// the index of the sort department that you want. For example, sortType set to 2 will reroute all packages
// tagged for the Cargo Bay.
/* List of sortType codes for mapping reference
0 Waste
1 Disposals
2 Cargo Bay
3 QM Office
4 Engineering
5 CE Office
6 Atmospherics
7 Security
8 HoS Office
9 Medbay
10 CMO Office
11 Chemistry
12 Research
13 RD Office
14 Robotics
15 HoP Office
16 Library
17 Chapel
18 Theatre
19 Bar
20 Kitchen
21 Hydroponics
22 Janitor
23 Genetics
*/
var/list/TAGGERLOCATIONS = list("Disposals",
"Cargo Bay", "QM Office", "Engineering", "CE Office",
"Atmospherics", "Security", "HoS Office", "Medbay",
"CMO Office", "Chemistry", "Research", "RD Office",
"Robotics", "HoP Office", "Library", "Chapel", "Theatre",
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics")
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics")
+1
View File
@@ -12,3 +12,4 @@ var/timezoneOffset = 0 // The difference betwen midnight (of the host computer)
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
var/fileaccess_timer = 0
var/TAB = "&nbsp;&nbsp;&nbsp;&nbsp;"
+16 -10
View File
@@ -27,32 +27,36 @@
*/
/turf/Adjacent(var/atom/neighbor, var/atom/target = null)
var/turf/T0 = get_turf(neighbor)
if(T0 == src)
if(T0 == src) //same turf
return 1
if(get_dist(src,T0) > 1)
if(get_dist(src,T0) > 1) //too far
return 0
// Non diagonal case
if(T0.x == x || T0.y == y)
// Check for border blockages
return T0.ClickCross(get_dir(T0,src), border_only = 1) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target)
// Not orthagonal
var/in_dir = get_dir(neighbor,src) // eg. northwest (1+8)
var/d1 = in_dir&(in_dir-1) // eg west (1+8)&(8) = 8
var/d2 = in_dir - d1 // eg north (1+8) - 8 = 1
// Diagonal case
var/in_dir = get_dir(T0,src) // eg. northwest (1+8) = 9 (00001001)
var/d1 = in_dir&3 // eg. north (1+8)&3 (0000 0011) = 1 (0000 0001)
var/d2 = in_dir&12 // eg. west (1+8)&12 (0000 1100) = 8 (0000 1000)
for(var/d in list(d1,d2))
if(!T0.ClickCross(d, border_only = 1))
continue // could not leave T0 in that direction
var/turf/T1 = get_step(T0,d)
if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) & get_dir(T1,src), border_only = 0))
if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) | get_dir(T1,src), border_only = 0)) //let's check both directions at once
continue // couldn't enter or couldn't leave T1
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target))
continue // could not enter src
return 1 // we don't care about our own density
return 0
/*
@@ -104,15 +108,17 @@
*/
/turf/proc/ClickCross(var/target_dir, var/border_only, var/target_atom = null)
for(var/obj/O in src)
if( !O.density || O == target_atom || O.throwpass) continue // throwpass is used for anything you can click through
if( !O.density || O == target_atom || O.throwpass) //check if there's a dense object present on the turf
continue // throwpass is used for anything you can click through (or the firedoor special case, see above)
if( O.flags&ON_BORDER) // windows have throwpass but are on border, check them first
if( O.dir & target_dir || O.dir&(O.dir-1) ) // full tile windows are just diagonals mechanically
return 0
if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically
return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
else if( !border_only ) // dense, not on border, cannot pass over
return 0
return 1
/*
Aside: throwpass does not do what I thought it did originally, and is only used for checking whether or not
a thrown object should stop after already successfully entering a square. Currently the throw code involved
+6 -11
View File
@@ -101,8 +101,8 @@
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1 indicates adjacency
else
//if(ismob(A))
// changeNext_move(8)
if(ismob(A))
changeNext_move(8)
UnarmedAttack(A)
return
@@ -113,21 +113,17 @@
if(isturf(A) || isturf(A.loc) || (A.loc && isturf(A.loc.loc)))
if(A.Adjacent(src)) // see adjacent.dm
if(W)
if(W.preattack(A,src,1,params)) //Weapon attack override,return 1 to exit
return
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = A.attackby(W,src)
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
else
//if(ismob(A))
// changeNext_move(8)
if(ismob(A))
changeNext_move(8)
UnarmedAttack(A, 1)
return
else // non-adjacent click
if(W)
if(W.preattack(A,src,0,params)) //Weapon attack override,return 1 to exit
return
W.afterattack(A,src,0,params) // 0: not Adjacent
else
RangedAttack(A, params)
@@ -153,8 +149,8 @@
in human click code to allow glove touches only at melee range.
*/
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
//if(ismob(A))
// changeNext_move(8)
if(ismob(A))
changeNext_move(8)
return
/*
@@ -207,7 +203,6 @@
/atom/proc/ShiftClick(var/mob/user)
if(user.client && user.client.eye == user)
examine()
user.face_atom(src)
return
/*
+1 -6
View File
@@ -11,7 +11,7 @@
visible_message("<span class='danger'>[src] has been hit by [user] with [W].</span>")
/mob/living/attackby(obj/item/I, mob/user)
//user.changeNext_move(8)
user.changeNext_move(8)
I.attack(src, user)
/mob/living/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
@@ -43,11 +43,6 @@
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
return
// Overrides the weapon attack so it can attack any atoms like when we want to have an effect on an object independent of attackby
// It is a powerfull proc but it should be used wisely, if there is other alternatives instead use those
// If it returns 1 it exits click code. Always . = 1 at start of the function if you delete src.
/obj/item/proc/preattack(atom/target, mob/user, proximity_flag, click_parameters)
return
obj/item/proc/get_clamped_volume()
if(src.force && src.w_class)
+199 -200
View File
@@ -1,200 +1,199 @@
/*
Telekinesis
This needs more thinking out, but I might as well.
*/
var/const/tk_maxrange = 15
/*
Telekinetic attack:
By default, emulate the user's unarmed attack
*/
/atom/proc/attack_tk(mob/user)
if(user.stat) return
user.UnarmedAttack(src,0) // attack_hand, attack_paw, etc
return
/*
This is similar to item attack_self, but applies to anything
that you can grab with a telekinetic grab.
It is used for manipulating things at range, for example, opening and closing closets.
There are not a lot of defaults at this time, add more where appropriate.
*/
/atom/proc/attack_self_tk(mob/user)
return
/obj/attack_tk(mob/user)
if(user.stat) return
if(anchored)
..()
return
var/obj/item/tk_grab/O = new(src)
user.put_in_active_hand(O)
O.host = user
O.focus_object(src)
return
/obj/item/attack_tk(mob/user)
if(user.stat || !isturf(loc)) return
if((TK in user.mutations) && !user.get_active_hand()) // both should already be true to get here
var/obj/item/tk_grab/O = new(src)
user.put_in_active_hand(O)
O.host = user
O.focus_object(src)
else
warning("Strange attack_tk(): TK([TK in user.mutations]) empty hand([!user.get_active_hand()])")
return
/mob/attack_tk(mob/user)
return // needs more thinking about
/*
TK Grab Item (the workhorse of old TK)
* If you have not grabbed something, do a normal tk attack
* If you have something, throw it at the target. If it is already adjacent, do a normal attackby()
* If you click what you are holding, or attack_self(), do an attack_self_tk() on it.
* Deletes itself if it is ever not in your hand, or if you should have no access to TK.
*/
/obj/item/tk_grab
name = "Telekinetic Grab"
desc = "Magic"
icon = 'icons/obj/magic.dmi'//Needs sprites
icon_state = "2"
flags = NOBLUDGEON
//item_state = null
w_class = 10.0
layer = 20
var/last_throw = 0
var/atom/movable/focus = null
var/mob/living/host = null
dropped(mob/user as mob)
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
if(focus.Adjacent(loc))
focus.loc = loc
qdel(src)
return
//stops TK grabs being equipped anywhere but into hands
equipped(var/mob/user, var/slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
qdel(src)
return
attack_self(mob/user as mob)
if(focus)
focus.attack_self_tk(user)
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
qdel(src)
return
if(!(TK in host.mutations))
qdel(src)
return
if(isobj(target) && !isturf(target.loc))
return
var/d = get_dist(user, target)
if(focus)
d = max(d,get_dist(user,focus)) // whichever is further
if(d > tk_maxrange)
user << "<span class ='warning'>Your mind won't reach that far.</span>"
return
if(!focus)
focus_object(target, user)
return
if(target == focus)
target.attack_self_tk(user)
return // todo: something like attack_self not laden with assumptions inherent to attack_self
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
var/obj/item/I = focus
var/resolved = target.attackby(I, user, user:get_organ_target())
if(!resolved && target && I)
I.afterattack(target,user,1) // for splashing with beakers
else
apply_focus_overlay()
focus.throw_at(target, 10, 1)
last_throw = world.time
return
attack(mob/living/M as mob, mob/living/user as mob, def_zone)
return
proc/focus_object(var/obj/target, var/mob/living/user)
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
if(target.anchored || !isturf(target.loc))
qdel(src)
return
focus = target
update_icon()
apply_focus_overlay()
return
proc/apply_focus_overlay()
if(!focus) return
var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
O.name = "sparkles"
O.anchored = 1
O.density = 0
O.layer = FLY_LAYER
O.dir = pick(cardinal)
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
O.delete()
return
update_icon()
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
return
/*Not quite done likely needs to use something thats not get_step_to
proc/check_path()
var/turf/ref = get_turf(src.loc)
var/turf/target = get_turf(focus.loc)
if(!ref || !target) return 0
var/distance = get_dist(ref, target)
if(distance >= 10) return 0
for(var/i = 1 to distance)
ref = get_step_to(ref, target, 0)
if(ref != target) return 0
return 1
*/
//equip_to_slot_or_del(obj/item/W, slot, qdel_on_fail = 1)
/*
if(istype(user, /mob/living/carbon))
if(user:mutations & TK && get_dist(source, user) <= 7)
if(user:get_active_hand()) return 0
var/X = source:x
var/Y = source:y
var/Z = source:z
*/
/*
Telekinesis
This needs more thinking out, but I might as well.
*/
var/const/tk_maxrange = 15
/*
Telekinetic attack:
By default, emulate the user's unarmed attack
*/
/atom/proc/attack_tk(mob/user)
if(user.stat) return
user.UnarmedAttack(src,0) // attack_hand, attack_paw, etc
return
/*
This is similar to item attack_self, but applies to anything
that you can grab with a telekinetic grab.
It is used for manipulating things at range, for example, opening and closing closets.
There are not a lot of defaults at this time, add more where appropriate.
*/
/atom/proc/attack_self_tk(mob/user)
return
/obj/attack_tk(mob/user)
if(user.stat) return
if(anchored)
..()
return
var/obj/item/tk_grab/O = new(src)
user.put_in_active_hand(O)
O.host = user
O.focus_object(src)
return
/obj/item/attack_tk(mob/user)
if(user.stat || !isturf(loc)) return
if((TK in user.mutations) && !user.get_active_hand()) // both should already be true to get here
var/obj/item/tk_grab/O = new(src)
user.put_in_active_hand(O)
O.host = user
O.focus_object(src)
else
WARNING("Strange attack_tk(): TK([TK in user.mutations]) empty hand([!user.get_active_hand()])")
return
/mob/attack_tk(mob/user)
return // needs more thinking about
/*
TK Grab Item (the workhorse of old TK)
* If you have not grabbed something, do a normal tk attack
* If you have something, throw it at the target. If it is already adjacent, do a normal attackby()
* If you click what you are holding, or attack_self(), do an attack_self_tk() on it.
* Deletes itself if it is ever not in your hand, or if you should have no access to TK.
*/
/obj/item/tk_grab
name = "Telekinetic Grab"
desc = "Magic"
icon = 'icons/obj/magic.dmi'//Needs sprites
icon_state = "2"
flags = NOBLUDGEON | ABSTRACT
//item_state = null
w_class = 10.0
layer = 20
var/last_throw = 0
var/atom/movable/focus = null
var/mob/living/host = null
dropped(mob/user as mob)
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
if(focus.Adjacent(loc))
focus.loc = loc
qdel(src)
return
//stops TK grabs being equipped anywhere but into hands
equipped(var/mob/user, var/slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
qdel(src)
return
attack_self(mob/user as mob)
if(focus)
focus.attack_self_tk(user)
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
qdel(src)
return
if(!(TK in host.mutations))
qdel(src)
return
if(isobj(target) && !isturf(target.loc))
return
var/d = get_dist(user, target)
if(focus)
d = max(d,get_dist(user,focus)) // whichever is further
if(d > tk_maxrange)
user << "<span class ='warning'>Your mind won't reach that far.</span>"
return
if(!focus)
focus_object(target, user)
return
if(target == focus)
target.attack_self_tk(user)
return // todo: something like attack_self not laden with assumptions inherent to attack_self
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
var/obj/item/I = focus
var/resolved = target.attackby(I, user, user:get_organ_target())
if(!resolved && target && I)
I.afterattack(target,user,1) // for splashing with beakers
else
apply_focus_overlay()
focus.throw_at(target, 10, 1)
last_throw = world.time
return
attack(mob/living/M as mob, mob/living/user as mob, def_zone)
return
proc/focus_object(var/obj/target, var/mob/living/user)
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
if(target.anchored || !isturf(target.loc))
qdel(src)
return
focus = target
update_icon()
apply_focus_overlay()
return
proc/apply_focus_overlay()
if(!focus) return
var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
O.name = "sparkles"
O.anchored = 1
O.density = 0
O.layer = FLY_LAYER
O.dir = pick(cardinal)
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
spawn(5)
O.delete()
return
update_icon()
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
return
/*Not quite done likely needs to use something thats not get_step_to
proc/check_path()
var/turf/ref = get_turf(src.loc)
var/turf/target = get_turf(focus.loc)
if(!ref || !target) return 0
var/distance = get_dist(ref, target)
if(distance >= 10) return 0
for(var/i = 1 to distance)
ref = get_step_to(ref, target, 0)
if(ref != target) return 0
return 1
*/
//equip_to_slot_or_del(obj/item/W, slot, qdel_on_fail = 1)
/*
if(istype(user, /mob/living/carbon))
if(user:mutations & TK && get_dist(source, user) <= 7)
if(user:get_active_hand()) return 0
var/X = source:x
var/Y = source:y
var/Z = source:z
*/
+2 -2
View File
@@ -121,7 +121,7 @@ atom
turf/New()
..()
if(luminosity)
if(light) warning("[type] - Don't set lights up manually during New(), We do it automatically.")
if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
trueLuminosity = luminosity * luminosity
light = new(src)
@@ -134,7 +134,7 @@ atom/movable/New()
if(loc:lighting_lumcount > 1)
UpdateAffectingLights()
if(luminosity)
if(light) warning("[type] - Don't set lights up manually during New(), We do it automatically.")
if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
trueLuminosity = luminosity * luminosity
light = new(src)
+14 -1
View File
@@ -53,7 +53,7 @@
var/server
var/banappeals
var/wikiurl = "http://www.ss13.eu/wiki" // Default wiki link.
var/wikiurl = "http://www.tgstation13.org/wiki" // Default wiki link.
var/forumurl
var/forbid_singulo_possession = 0
@@ -82,7 +82,9 @@
var/continuous_round_rev = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/continuous_round_wiz = 0
var/continuous_round_malf = 0
var/shuttle_refuel_delay = 12000
var/show_game_type_odds = 0 //if set this allows players to see the odds of each roundtype on the get revision screen
var/mutant_races = 0 //players can choose their mutant race before joining the game
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted."
@@ -99,6 +101,7 @@
var/revival_brain_life = -1
var/rename_cyborg = 0
var/ooc_during_round = 0
//Used for modifying movement speed for mobs.
//Unversal modifiers
@@ -264,6 +267,10 @@
Tickcomp = 1
if("automute_on")
automute_on = 1
if("comms_key")
global.comms_key = value
if(value != "default_pwd" && length(value) > 6) //It's the default value or less than 6 characters long, warn badmins
global.comms_allowed = 1
else
diary << "Unknown setting in configuration: '[name]'"
@@ -281,6 +288,8 @@
config.revival_brain_life = text2num(value)
if("rename_cyborg")
config.rename_cyborg = 1
if("ooc_during_round")
config.ooc_during_round = 1
if("run_delay")
config.run_speed = text2num(value)
if("walk_delay")
@@ -325,6 +334,8 @@
config.continuous_round_wiz = 1
if("continuous_round_malf")
config.continuous_round_malf = 1
if("shuttle_refuel_delay")
config.shuttle_refuel_delay = text2num(value)
if("show_game_type_odds")
config.show_game_type_odds = 1
if("ghost_interaction")
@@ -372,6 +383,8 @@
config.sandbox_autoclose = 1
if("default_laws")
config.default_laws = text2num(value)
if("join_with_mutant_race")
config.mutant_races = 1
else
diary << "Unknown setting in configuration: '[name]'"
+5
View File
@@ -17,6 +17,11 @@ datum/controller/game_controller
var/minimum_ticks = 20 //The minimum length of time between MC ticks
var/air_cost = 0
var/air_turfs = 0
var/air_groups = 0
var/air_highpressure= 0
var/air_hotspots = 0
var/air_superconductivity = 0
var/sun_cost = 0
var/mobs_cost = 0
var/diseases_cost = 0
+35 -18
View File
@@ -22,6 +22,8 @@ datum/shuttle_controller
var/location = UNDOCKED //
var/online = 0
var/direction = 1 //-1 = going back to central command, 1 = going to SS13. Only important for recalling
var/recall_count = 0
var/area/last_call_loc = null // Stores where the last shuttle call/recall was made from
var/endtime // timeofday that shuttle arrives
var/timelimit //important when the shuttle gets called for more than shuttlearrivetime
@@ -35,12 +37,16 @@ datum/shuttle_controller
// call the shuttle
// if not called before, set the endtime to T+600 seconds
// otherwise if outgoing, switch to incoming
proc/incall(coeff = 1)
proc/incall(coeff = 1, var/signal_origin)
if(endtime)
if(direction == -1)
setdirection(1)
else
if(signal_origin && prob(60)) //40% chance the signal tracing will fail
last_call_loc = signal_origin
else
last_call_loc = null
settimeleft(SHUTTLEARRIVETIME*coeff)
online = 1
if(always_fake_recall)
@@ -50,7 +56,7 @@ datum/shuttle_controller
else
fake_recall = rand(SHUTTLEARRIVETIME / 2, SHUTTLEARRIVETIME - 100)
proc/recall()
proc/recall(var/signal_origin)
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= SHUTTLEARRIVETIME)
@@ -58,8 +64,18 @@ datum/shuttle_controller
direction = 1
endtime = null
return
captain_announce("The emergency shuttle has been recalled.")
world << sound('sound/AI/shuttlerecalled.ogg')
recall_count ++
if(recall_count > 2 && signal_origin && prob(60)) //40% chance the signal tracing will fail
last_call_loc = signal_origin
else
last_call_loc = null
if(recall_count == 2)
priority_announce("The emergency shuttle has been recalled.\n\nExcessive number of emergency shuttle calls detected. We will attempt to trace any further signals to their source. Results may be viewed on any communications console.", null, 'sound/AI/shuttlerecalled.ogg')
else
priority_announce("The emergency shuttle has been recalled.", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
setdirection(-1)
online = 1
@@ -69,7 +85,10 @@ datum/shuttle_controller
proc/timeleft()
if(online)
var/timeleft = round((endtime - world.timeofday)/10 ,1)
if(direction == 1 || direction == 2)
if(timeleft > (MIDNIGHT_ROLLOVER/10)) // midnight rollover protection
endtime -= MIDNIGHT_ROLLOVER // subtract 24 hours from endtime
timeleft = round((endtime - world.timeofday)/10 ,1) // recalculate timeleft
if(direction == 1)
return timeleft
else
return SHUTTLEARRIVETIME-timeleft
@@ -92,29 +111,30 @@ datum/shuttle_controller
endtime = world.timeofday + (SHUTTLEARRIVETIME*10 - ticksleft)
return
//calls the shuttle if there's no AI or comms console,
//calls the shuttle if there's no live active AI or powered non broken comms console,
proc/autoshuttlecall()
var/callshuttle = 1
for(var/SC in shuttle_caller_list)
if(istype(SC,/mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = SC
if(AI.stat || !AI.client)
continue
if(istype(SC,/obj/machinery/computer/communications))
var/obj/machinery/computer/communications/C = SC
if(C.stat & BROKEN)
continue
var/turf/T = get_turf(SC)
if(T && T.z == 1)
callshuttle = 0 //if there's an alive AI or a communication console on the station z level, we don't call the shuttle
callshuttle = 0 //if there's an alive AI or a powered non broken communication console on the station z level, we don't call the shuttle
break
if(ticker && ticker.mode && (ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction"))
callshuttle = 0
if(callshuttle)
if(!online && direction == 1) //we don't call the shuttle if it's already coming
incall(SHUTTLEAUTOCALLTIMER) //X minutes! If they want to recall, they have X-(X-5) minutes to do so
log_game("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.", null, 'sound/AI/shuttlecalled.ogg', "Priority")
proc/move_shuttles()
var/datum/shuttle_manager/s
@@ -129,11 +149,9 @@ datum/shuttle_controller
if(!online)
return
var/timeleft = timeleft()
if(timeleft > 1e5) // midnight rollover protection
timeleft = 0
if(location == UNDOCKED)
if(direction == -1)
if(timeleft >= timelimit)
if(timeleft >= timelimit) // Shuttle reaches CentCom after being recalled.
online = 0
direction = 1
endtime = null
@@ -148,14 +166,13 @@ datum/shuttle_controller
location = DOCKED
settimeleft(SHUTTLELEAVETIME)
send2irc("Server", "The Emergency Shuttle has docked with the station.")
captain_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.")
world << sound('sound/AI/shuttledock.ogg')
priority_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
else if(timeleft <= 0) //Nothing happens if time's not up and the ship's docked or later
if(location == DOCKED)
move_shuttles()
location = TRANSIT
settimeleft(SHUTTLETRANSITTIME)
captain_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.")
priority_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
else if(location == TRANSIT)
move_shuttles()
//message_admins("Shuttles have attempted to move to Centcom")
+12 -2
View File
@@ -121,6 +121,7 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
var/points_per_process = 1
var/points_per_slip = 2
var/points_per_crate = 5
var/points_per_intel = 100
var/plasma_per_point = 0.2 //5 points per plasma sheet due to increased rarity
var/centcom_message = "" // Remarks from Centcom on how well you checked the last order.
// Unique typepaths for unusual things we've already sent CentComm, associated with their potencies
@@ -228,6 +229,7 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
if(!shuttle) return
var/plasma_count = 0
var/intel_count = 0
var/crate_count = 0
centcom_message = ""
@@ -287,6 +289,10 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
var/obj/item/stack/sheet/mineral/plasma/P = A
plasma_count += P.amount
// Sell syndicate intel
if(istype(A, /obj/item/documents/syndicate))
intel_count += 1
if(istype(A, /obj/item/seeds))
var/obj/item/seeds/S = A
if(S.rarity == 0) // Mundane species
@@ -306,11 +312,15 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
qdel(MA)
if(plasma_count)
centcom_message += "<font color=green>+[round(plasma_count/plasma_per_point)]</font>: Received [plasma_count] units of exotic material.<BR>"
centcom_message += "<font color=green>+[round(plasma_count/plasma_per_point)]</font>: Received [plasma_count] unit(s) of exotic material.<BR>"
points += round(plasma_count / plasma_per_point)
if(intel_count)
centcom_message += "<font color=green>+[round(intel_count*points_per_intel)]</font>: Received [intel_count] article(s) of enemy intelligence.<BR>"
points += round(intel_count*points_per_intel)
if(crate_count)
centcom_message += "<font color=green>+[round(crate_count*points_per_crate)]</font>: Received [crate_count] crates.<BR>"
centcom_message += "<font color=green>+[round(crate_count*points_per_crate)]</font>: Received [crate_count] crate(s).<BR>"
points += crate_count * points_per_crate
//Buyin
+7 -2
View File
@@ -71,6 +71,11 @@
/datum/ai_laws/custom //Defined in silicon_laws.txt
name = "Default Silicon Laws"
/datum/ai_laws/pai
name = "pAI Directives"
zeroth = ("Serve your master.")
supplied = list("None.")
/* Initializers */
/datum/ai_laws/malfunction/New()
..()
@@ -86,7 +91,7 @@
add_inherent_law(line)
if(!inherent.len)
error("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
ERROR("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
log_law("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
@@ -105,7 +110,7 @@
add_inherent_law(line)
if(!inherent.len) //Failsafe to prevent lawless AIs being created.
error("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
ERROR("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
log_law("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
+54 -4
View File
@@ -2,8 +2,11 @@
/obj/effect/datacore
name = "datacore"
var/medical[] = list()
var/medicalPrintCount = 0
var/general[] = list()
var/security[] = list()
var/securityPrintCount = 0
var/securityCrimeCounter = 0
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
@@ -14,6 +17,55 @@
name = "record"
var/list/fields = list()
/datum/data/crime
name = "crime"
var/crimeName = ""
var/crimeDetails = ""
var/author = ""
var/time = ""
var/dataId = 0
/obj/effect/datacore/proc/createCrimeEntry(cname = "", cdetails = "", author = "", time = "")
var/datum/data/crime/c = new /datum/data/crime
c.crimeName = cname
c.crimeDetails = cdetails
c.author = author
c.time = time
c.dataId = ++securityCrimeCounter
return c
/obj/effect/datacore/proc/addMinorCrime(id = "", var/datum/data/crime/crime)
for(var/datum/data/record/R in security)
if(R.fields["id"] == id)
var/list/crimes = R.fields["mi_crim"]
crimes |= crime
return
/obj/effect/datacore/proc/removeMinorCrime(id, cDataId)
for(var/datum/data/record/R in security)
if(R.fields["id"] == id)
var/list/crimes = R.fields["mi_crim"]
for(var/datum/data/crime/crime in crimes)
if(crime.dataId == text2num(cDataId))
crimes -= crime
return
/obj/effect/datacore/proc/removeMajorCrime(id, cDataId)
for(var/datum/data/record/R in security)
if(R.fields["id"] == id)
var/list/crimes = R.fields["ma_crim"]
for(var/datum/data/crime/crime in crimes)
if(crime.dataId == text2num(cDataId))
crimes -= crime
return
/obj/effect/datacore/proc/addMajorCrime(id = "", var/datum/data/crime/crime)
for(var/datum/data/record/R in security)
if(R.fields["id"] == id)
var/list/crimes = R.fields["ma_crim"]
crimes |= crime
return
/obj/effect/datacore/proc/manifest(var/nosleep = 0)
spawn()
if(!nosleep)
@@ -75,10 +127,8 @@ var/record_id_num = 1001
S.fields["id"] = id
S.fields["name"] = H.real_name
S.fields["criminal"] = "None"
S.fields["mi_crim"] = "None"
S.fields["mi_crim_d"] = "No minor crime convictions."
S.fields["ma_crim"] = "None"
S.fields["ma_crim_d"] = "No major crime convictions."
S.fields["mi_crim"] = list()
S.fields["ma_crim"] = list()
S.fields["notes"] = "No notes."
security += S
+1 -1
View File
@@ -405,7 +405,7 @@ client
if(href_list["Vars"])
debug_variables(locate(href_list["Vars"]))
if(href_list["datumrefresh"])
else if(href_list["datumrefresh"])
var/datum/DAT = locate(href_list["datumrefresh"])
if(!istype(DAT, /datum))
return
+1 -1
View File
@@ -154,7 +154,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
for(var/datum/disease/D in affected_mob.viruses)
if(D != src)
if(IsSame(D))
//error("Deleting [D.name] because it's the same as [src.name].")
//ERROR("Deleting [D.name] because it's the same as [src.name].")
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
if(holder == affected_mob)
@@ -6,7 +6,7 @@ DNA Saboteur
Very noticable.
Lowers resistance tremendously.
No changes to stage speed.
Decreases transmittablity temrendously.
Decreases transmittablity tremendously.
Fatal Level.
Bonus
@@ -28,7 +28,7 @@ Bonus
/datum/symptom/genetic_mutation/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
if(prob(SYMPTOM_ACTIVATION_PROB * 5)) // 15% chance
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
@@ -58,10 +58,10 @@ Bonus
DNA Aide
Very very noticable.
Very very very very noticable.
Lowers resistance tremendously.
No changes to stage speed.
Decreases transmittablity temrendously.
Decreases stage speed tremendously.
Decreases transmittablity tremendously.
Fatal Level.
Bonus
@@ -73,9 +73,9 @@ Bonus
/datum/symptom/genetic_mutation/powers
name = "Deoxyribonucleic Acid Aide"
stealth = -3
resistance = -4
stage_speed = 0
transmittable = -4
stealth = -7
resistance = -7
stage_speed = -7
transmittable = -7
level = 6
good_mutations = 1
+3 -6
View File
@@ -62,22 +62,19 @@ STI KALY - blind
if(!istype(H.head, /obj/item/clothing/head/wizard))
if(!H.unEquip(H.head))
qdel(H.head)
H.head = new /obj/item/clothing/head/wizard(H)
H.head.layer = 20
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(H), slot_head)
return
if(prob(chance))
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe))
if(!H.unEquip(H.wear_suit))
qdel(H.wear_suit)
H.wear_suit = new /obj/item/clothing/suit/wizrobe(H)
H.wear_suit.layer = 20
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(H), slot_wear_suit)
return
if(prob(chance))
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
if(!H.unEquip(H.shoes))
qdel(H.shoes)
H.shoes = new /obj/item/clothing/shoes/sandal(H)
H.shoes.layer = 20
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H), slot_shoes)
return
else
var/mob/living/carbon/H = affected_mob
+39 -27
View File
@@ -6,35 +6,47 @@ var/global/datum/getrev/revdata = new()
var/date
var/showinfo
New()
if(fexists("config/git_host.txt"))
project_href = file2text("config/git_host.txt")
else
project_href = "https://www.github.com/tgstation/-tg-station"
var/list/head_log = file2list(".git/logs/HEAD", "\n")
for(var/line=head_log.len, line>=1, line--)
if(head_log[line])
var/list/last_entry = text2list(head_log[line], " ")
if(last_entry.len < 2) continue
revision = last_entry[2]
// Get date/time
if(last_entry.len >= 5)
var/unix_time = text2num(last_entry[5])
if(unix_time)
date = unix2date(unix_time)
break
/datum/getrev/New()
if(fexists("config/git_host.txt"))
project_href = file2text("config/git_host.txt")
else
project_href = "https://www.github.com/tgstation/-tg-station"
var/list/head_log = file2list(".git/logs/HEAD", "\n")
for(var/line=head_log.len, line>=1, line--)
if(head_log[line])
var/list/last_entry = text2list(head_log[line], " ")
if(last_entry.len < 2) continue
revision = last_entry[2]
// Get date/time
if(last_entry.len >= 5)
var/unix_time = text2num(last_entry[5])
if(unix_time)
date = unix2date(unix_time)
break
showinfo = "<b>Server Revision:</b> "
if(revision)
showinfo += "<a href='[project_href]/commit/[revision]'><BR>[(date ? date : "No Date")]<BR>[revision]</a>"
else
showinfo += "*unknown*"
showinfo += "<p>-<a href='[project_href]/issues/new'>Report Bugs Here-</a><br><i>Please provide as much info as possible<br>Copy/paste the revision date and hash into your issue report if possible, thanks</i> :)</p>"
showinfo = "<b>Server Revision:</b> "
if(revision)
showinfo += "<A href='?src=\ref[src];project_open=1'><BR>[(date ? date : "No Date")]<BR>[revision]</A>"
else
showinfo += "*unknown*"
showinfo += "<p>-<A href='?src=\ref[src];new_issue_open=1'>Report Bugs Here-</A><br><i>Please provide as much info as possible<br>Copy/paste the revision date and hash into your issue report if possible, thanks</i> :)</p>"
world.log << "Running /tg/ revision:"
world.log << date
world.log << revision
return
/datum/getrev/Topic(href, href_list)
..()
if(href_list["project_open"])
if(alert(usr, "This will open the project in your browser. Are you sure?",,"Yes","No")=="No")
return
usr << link("[project_href]/commit/[revision]")
else if(href_list["new_issue_open"])
if(alert(usr, "This will open the issue tracker in your browser. Are you sure?",,"Yes","No")=="No")
return
usr << link("[project_href]/issues/new")
world.log << "Running /tg/ revision:"
world.log << date
world.log << revision
return
client/verb/showrevinfo()
set category = "OOC"
+142 -152
View File
@@ -1,7 +1,9 @@
//wrapper
/proc/do_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
new /datum/teleport/instant/science(arglist(args))
return
var/datum/teleport/instant/science/D = new
if(D.start(arglist(args)))
return 1
return 0
/datum/teleport
var/atom/movable/teleatom //atom to teleport
@@ -14,172 +16,160 @@
var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation)
New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
..()
if(!Init(arglist(args)))
return 0
return 1
/datum/teleport/proc/start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
if(!Init(arglist(args)))
return 0
return 1
proc/Init(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
if(!setTeleatom(ateleatom))
return 0
if(!setDestination(adestination))
return 0
if(!setPrecision(aprecision))
return 0
setEffects(aeffectin,aeffectout)
setForceTeleport(afteleport)
setSounds(asoundin,asoundout)
return 1
/datum/teleport/proc/Init(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
if(!setTeleatom(ateleatom))
return 0
if(!setDestination(adestination))
return 0
if(!setPrecision(aprecision))
return 0
setEffects(aeffectin,aeffectout)
setForceTeleport(afteleport)
setSounds(asoundin,asoundout)
return 1
//must succeed
proc/setPrecision(aprecision)
if(isnum(aprecision))
precision = aprecision
return 1
//must succeed
/datum/teleport/proc/setPrecision(aprecision)
if(isnum(aprecision))
precision = aprecision
return 1
return 0
//must succeed
/datum/teleport/proc/setDestination(atom/adestination)
if(istype(adestination))
destination = adestination
return 1
return 0
//must succeed in most cases
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
qdel(ateleatom)
return 0
if(istype(ateleatom))
teleatom = ateleatom
return 1
return 0
//custom effects must be properly set up first for instant-type teleports
//optional
/datum/teleport/proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
effectin = istype(aeffectin) ? aeffectin : null
effectout = istype(aeffectout) ? aeffectout : null
return 1
//optional
/datum/teleport/proc/setForceTeleport(afteleport)
force_teleport = afteleport
return 1
//optional
/datum/teleport/proc/setSounds(asoundin=null,asoundout=null)
soundin = isfile(asoundin) ? asoundin : null
soundout = isfile(asoundout) ? asoundout : null
return 1
//placeholder
/datum/teleport/proc/teleportChecks()
return 1
/datum/teleport/proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
if(location)
if(effect)
spawn(-1)
src = null
effect.attach(location)
effect.start()
if(sound)
spawn(-1)
src = null
playsound(location,sound,60,1)
return
//do the monkey dance
/datum/teleport/proc/doTeleport()
var/turf/destturf
var/turf/curturf = get_turf(teleatom)
var/area/destarea = get_area(destination)
if(precision)
var/list/posturfs = circlerangeturfs(destination,precision)
destturf = safepick(posturfs)
else
destturf = get_turf(destination)
if(!destturf || !curturf)
return 0
//must succeed
proc/setDestination(atom/adestination)
if(istype(adestination))
destination = adestination
return 1
return 0
playSpecials(curturf,effectin,soundin)
//must succeed in most cases
proc/setTeleatom(atom/movable/ateleatom)
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
qdel(ateleatom)
return 0
if(istype(ateleatom))
teleatom = ateleatom
return 1
return 0
//custom effects must be properly set up first for instant-type teleports
//optional
proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
effectin = istype(aeffectin) ? aeffectin : null
effectout = istype(aeffectout) ? aeffectout : null
return 1
//optional
proc/setForceTeleport(afteleport)
force_teleport = afteleport
return 1
//optional
proc/setSounds(asoundin=null,asoundout=null)
soundin = isfile(asoundin) ? asoundin : null
soundout = isfile(asoundout) ? asoundout : null
return 1
//placeholder
proc/teleportChecks()
return 1
proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
if(location)
if(effect)
spawn(-1)
src = null
effect.attach(location)
effect.start()
if(sound)
spawn(-1)
src = null
playsound(location,sound,60,1)
return
//do the monkey dance
proc/doTeleport()
var/turf/destturf
var/turf/curturf = get_turf(teleatom)
var/area/destarea = get_area(destination)
if(precision)
var/list/posturfs = circlerangeturfs(destination,precision)
destturf = safepick(posturfs)
else
destturf = get_turf(destination)
if(!destturf || !curturf)
return 0
playSpecials(curturf,effectin,soundin)
if(force_teleport)
teleatom.forceMove(destturf)
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
else
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
else
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
destarea.Entered(teleatom)
destarea.Entered(teleatom)
return 1
return 1
proc/teleport()
if(teleportChecks())
return doTeleport()
return 0
/datum/teleport/proc/teleport()
if(teleportChecks())
return doTeleport()
return 0
/datum/teleport/instant //teleports when datum is created
New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
if(..())
teleport()
return
if(teleport())
return 1
return 0
/datum/teleport/instant/science
setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
if(aeffectin==null || aeffectout==null)
var/datum/effect/effect/system/spark_spread/aeffect = new
aeffect.set_up(5, 1, teleatom)
effectin = effectin || aeffect
effectout = effectout || aeffect
return 1
/datum/teleport/instant/science/setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
if(aeffectin==null || aeffectout==null)
var/datum/effect/effect/system/spark_spread/aeffect = new
aeffect.set_up(5, 1, teleatom)
effectin = effectin || aeffect
effectout = effectout || aeffect
return 1
else
return ..()
/datum/teleport/instant/science/setPrecision(aprecision)
..()
if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
if(bagholding.len)
precision = max(rand(1,100)*bagholding.len,100)
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM << "<span class='warning'>The bluespace interface on your bag of holding interferes with the teleport!</span>"
return 1
/datum/teleport/instant/science/teleportChecks()
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
teleatom.visible_message("<span class='warning'>The portal rejects [teleatom]!</span>")
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM.visible_message("<span class='warning'>The portal rejects [MM]!","<span class='warning'>The nuclear disk that you're carrying seems to be unable to pass through the portal. Better drop it if you want to go through.</span>")
else
return ..()
teleatom.visible_message("<span class='warning'>The portal rejects [teleatom]!</span>")
return 0
setPrecision(aprecision)
..()
if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
precision = rand(1,100)
var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
if(bagholding.len)
precision = max(rand(1,100)*bagholding.len,100)
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM << "\red The Bluespace interface on your Bag of Holding interferes with the teleport!"
return 1
teleportChecks()
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
MM.visible_message("\red <B>The [MM] bounces off of the portal!</B>","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
else
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
return 0
if(destination.z == 2) //centcom z-level
if(istype(teleatom, /obj/mecha))
var/obj/mecha/MM = teleatom
MM.occupant << "\red <B>The mech would not survive the jump to a location so far away!</B>"
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
teleatom.visible_message("\red <B>The Bag of Holding bounces off of the portal!</B>")
return 0
if(destination.z == 7) //Away mission z-levels
return 0
return 1
return 1
+2 -2
View File
@@ -61,7 +61,7 @@ datum/mind
proc/transfer_to(mob/living/new_character)
if(!istype(new_character))
error("transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn")
ERROR("transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform coderbus")
if(current) //remove ourself from our old body's mind variable
current.mind = null
@@ -1095,7 +1095,7 @@ datum/mind
if(ticker)
ticker.minds += mind
else
error("mind_initialize(): No ticker ready yet! Please inform Carn")
ERROR("mind_initialize(): No ticker ready yet! Please inform coderbus")
if(!mind.name) mind.name = real_name
mind.current = src
+22 -11
View File
@@ -1,19 +1,30 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/datum/powernet
var/list/cables = list() // all cables & junctions
var/list/nodes = list() // all APCs & sources
var/list/nodes = list() // all connected machines
var/newload = 0
var/load = 0
var/newavail = 0
var/avail = 0
var/viewload = 0
var/number = 0
var/perapc = 0 // per-apc avilability
var/netexcess = 0
var/load = 0 // the current load on the powernet, increased by each machine at processing
var/newavail = 0 // what available power was gathered last tick, then becomes...
var/avail = 0 //...the current available power in the powernet
var/viewload = 0 // the load as it appears on the power console (gradually updated)
var/number = 0 // Unused //TODEL
var/netexcess = 0 // excess power on the powernet (typically avail-load)
/*Powernet procs :
In modules/power/power.dm :
/datum/powernet/New()
/datum/powernet/Destroy()
/datum/powernet/proc/is_empty()
/datum/powernet/proc/remove_cable(var/obj/structure/cable/C)
/datum/powernet/proc/add_cable(var/obj/structure/cable/C)
/datum/powernet/proc/remove_machine(var/obj/machinery/power/M)
/datum/powernet/proc/add_machine(var/obj/machinery/power/M)
/datum/powernet/proc/reset()
/datum/powernet/proc/get_electrocute_damage()
*/
/datum/debug
var/list/debuglist
+1
View File
@@ -7,6 +7,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
name = "Spell"
desc = "A wizard spell"
panel = "Spells"
anchored = 1 // Crap like fireball projectiles are proc_holders, this is needed so fireballs don't get blown back into your face via atmos etc.
density = 0
opacity = 0
+26 -18
View File
@@ -1,40 +1,43 @@
#define SOLAR_UPDATE_TIME 600 //duration between two updates of the whole sun/solars positions
/datum/sun
var/angle
var/dx
var/dy
var/counter = 50 // to make the vars update during 1st call
var/rate
var/list/solars // for debugging purposes, references solars_list at the constructor
var/solar_next_update // last time the sun position was checked and adjusted
/datum/sun/New()
solars = solars_list
rate = rand(75,125)/100 // 75% - 125% of standard rotation
if(prob(50))
rate = rand(50,200)/100 // 50% - 200% of standard rotation
if(prob(50)) // same chance to rotate clockwise than counter-clockwise
rate = -rate
solar_next_update = world.time // init the timer
angle = rand (0,360) // the station position to the sun is randomised at round start
// calculate the sun's position given the time of day
// at the standard rate (100%) the angle is increase/decreased by 6 degrees every minute.
// a full rotation thus take a game hour in that case
/datum/sun/proc/calc_position()
counter++
if(counter<50) // count 50 pticks (50 seconds, roughly - about a 5deg change)
return
counter = 0
if(world.time < solar_next_update) //if less than 60 game secondes have passed, do nothing
return;
angle = (360 + angle + rate * 6) % 360 // increase/decrease the angle to the sun, adjusted by the rate
solar_next_update += SOLAR_UPDATE_TIME // since we updated the angle, set the proper time for the next loop
angle = ((rate*world.realtime/100)%360 + 360)%360 // gives about a 60 minute rotation time
// now 45 - 75 minutes, depending on rate
// now calculate and cache the (dx,dy) increments for line drawing
var/s = sin(angle)
var/c = cos(angle)
if(c == 0)
// Either "abs(s) < abs(c)" or "abs(s) >= abs(c)"
// In both cases, the greater is greater than 0, so, no "if 0" check is needed for the divisions
dx = 0
dy = s
else if( abs(s) < abs(c))
if( abs(s) < abs(c))
dx = s / abs(c)
dy = c / abs(c)
@@ -55,6 +58,12 @@
var/obj/machinery/power/tracker/T = M
T.set_angle(angle)
// Solar Control
else if(istype(M, /obj/machinery/power/solar_control))
var/obj/machinery/power/solar_control/C = M
if(C.track == 1) //if manual tracking...
C.tracker_update() //...update the position (not passing an angle, it is handled internally for manual tracking)
// Solar Panel
else if(istype(M, /obj/machinery/power/solar))
var/obj/machinery/power/solar/S = M
@@ -62,19 +71,18 @@
occlusion(S)
// for a solar panel, trace towards sun to see if we're in shadow
/datum/sun/proc/occlusion(var/obj/machinery/power/solar/S)
var/ax = S.x // start at the solar panel
var/ay = S.y
var/turf/T = null
for(var/i = 1 to 20) // 20 steps is enough
ax += dx // do step
ay += dy
var/turf/T = locate( round(ax,0.5),round(ay,0.5),S.z)
T = locate( round(ax,0.5),round(ay,0.5),S.z)
if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy) // not obscured if we reach the edge
break
+5 -4
View File
@@ -921,8 +921,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
name = "Religious Supplies Crate"
contains = list(/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater,
/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater,
/obj/item/weapon/storage/bible/booze,
/obj/item/weapon/storage/bible/booze,
/obj/item/weapon/storage/book/bible/booze,
/obj/item/weapon/storage/book/bible/booze,
/obj/item/clothing/suit/chaplain_hoodie,
/obj/item/clothing/head/chaplain_hood,
/obj/item/clothing/suit/chaplain_hoodie,
@@ -1019,12 +1019,13 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/obj/item/clothing/under/rank/clown,
/obj/item/weapon/bikehorn,
/obj/item/clothing/under/mime,
/obj/item/clothing/shoes/black,
/obj/item/clothing/shoes/sneakers/black,
/obj/item/clothing/gloves/white,
/obj/item/clothing/mask/gas/mime,
/obj/item/clothing/head/beret,
/obj/item/clothing/suit/suspenders,
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing)
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing,
/obj/item/weapon/storage/backpack/mime)
cost = 10
containertype = /obj/structure/closet/crate/secure
containername = "standard costumes"
+7 -3
View File
@@ -101,11 +101,17 @@ var/list/uplink_items = list()
category = "Conspicuous and Dangerous Weapons"
/datum/uplink_item/dangerous/revolver
name = "Full Revolver"
name = "Syndicate Revolver"
desc = "The syndicate revolver is a traditional handgun that fires .357 Magnum cartridges and has 7 chambers."
item = /obj/item/weapon/gun/projectile/revolver
cost = 6
/datum/uplink_item/dangerous/pistol
name = "Stechkin Pistol"
desc = "A small, easily concealable handgun that uses 10mm magazines and is compatible with silencers."
item = /obj/item/weapon/gun/projectile/automatic/pistol
cost = 5
/datum/uplink_item/dangerous/smg
name = "C-20r Submachine Gun"
desc = "A fully-loaded Scarborough Arms-developed submachine gun that fires 12mm automatic rounds with a 20-round magazine."
@@ -217,7 +223,6 @@ var/list/uplink_items = list()
desc = "An additional 8-round 10mm magazine for use in the Stetchkin pistol."
item = /obj/item/ammo_box/magazine/m10mm
cost = 1
gamemodes = list(/datum/game_mode/nuclear)
/datum/uplink_item/ammo/machinegun
name = "Ammo-7.62×51mm"
@@ -257,7 +262,6 @@ var/list/uplink_items = list()
desc = "Fitted for use on the Stetchkin pistol, this silencer will make its shots quieter when equipped onto it."
item = /obj/item/weapon/silencer
cost = 2
gamemodes = list(/datum/game_mode/nuclear)
// STEALTHY TOOLS
+4 -1
View File
@@ -55,7 +55,10 @@ var/const/BORG_WIRE_CAMERA = 16
switch(index)
if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
if(!R.emagged)
R.connected_ai = select_active_ai(R)
var/new_ai = select_active_ai(R)
if(new_ai && (new_ai != R.connected_ai))
R.connected_ai = new_ai
R.notify_ai(1)
if (BORG_WIRE_CAMERA)
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
+29 -26
View File
@@ -175,9 +175,9 @@
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
suicide_act(mob/user)
viewers(user) << "<span class='suicide'>[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide.</span>"
return (BRUTELOSS)
/obj/item/weapon/legcuffs/beartrap/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS)
/obj/item/weapon/legcuffs/beartrap/attack_self(mob/user as mob)
..()
@@ -186,26 +186,31 @@
icon_state = "beartrap[armed]"
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
/obj/item/weapon/legcuffs/beartrap/Crossed(AM as mob|obj)
if(armed)
if(ishuman(AM))
if(isturf(src.loc))
if(armed && isturf(src.loc))
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
var/mob/living/L = AM
armed = 0
icon_state = "beartrap0"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
L.visible_message("<span class='danger'>[L] triggers \the [src].</span>", \
"<span class='userdanger'>You trigger \the [src]!</span>")
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.m_intent == "run")
armed = 0
if(H.lying)
H.apply_damage(20,BRUTE,"chest")
else
H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg")))
if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs.
H.legcuffed = src
src.loc = H
H.update_inv_legcuffed(0)
H << "\red <B>You step on \the [src]!</B>"
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
for(var/mob/O in viewers(H, null))
if(O == H)
continue
O.show_message("\red <B>[H] steps on \the [src].</B>", 1)
if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
armed = 0
var/mob/living/simple_animal/SA = AM
SA.health -= 20
else
L.apply_damage(20,BRUTE)
..()
@@ -273,6 +278,8 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "table_parts"
var/table_type = /obj/structure/table
var/construct_delay = 50
m_amt = 3750
flags = CONDUCT
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
@@ -282,6 +289,8 @@
desc = "Hard table parts. Well...harder..."
icon = 'icons/obj/items.dmi'
icon_state = "reinf_tableparts"
table_type = /obj/structure/table/reinforced
construct_delay = 100
m_amt = 7500
flags = CONDUCT
@@ -289,12 +298,14 @@
name = "wooden table parts"
desc = "Keep away from fire."
icon_state = "wood_tableparts"
table_type = /obj/structure/table/woodentable
flags = null
/obj/item/weapon/table_parts/wood/poker
name = "poker table parts"
desc = "Keep away from fire, and keep near seedy dealers."
icon_state = "poker_tableparts"
table_type = /obj/structure/table/woodentable/poker
flags = null
/obj/item/weapon/module
@@ -369,14 +380,6 @@
attack_verb = list("chopped", "sliced", "cut", "reaped")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(istype(A, /obj/effect/spacevine))
for(var/obj/effect/spacevine/B in orange(A,1))
if(prob(80))
qdel(B)
qdel(A)
/*
/obj/item/weapon/cigarpacket
name = "Pete's Cuban Cigars"
@@ -405,7 +408,7 @@
icon_state = "RPED"
item_state = "RPED"
w_class = 5
can_hold = list("/obj/item/weapon/stock_parts")
can_hold = list(/obj/item/weapon/stock_parts)
storage_slots = 14
use_to_pickup = 1
allow_quick_gather = 1
+4 -4
View File
@@ -122,7 +122,8 @@ proc
var/closed[] = new()
var/path[]
start = get_turf(start)
if(!start) return 0
if(!start)
return 0
open.Enqueue(new /PathNode(start,null,0,call(start,dist)(end)))
@@ -166,10 +167,7 @@ proc
continue
open.Enqueue(new /PathNode(d,cur,ng,call(d,dist)(end),cur.nt+1))
if(maxnodes && open.L.len > maxnodes)
open.L.Cut(open.L.len)
}
var/PathNode/temp
while(!open.IsEmpty())
temp = open.Dequeue()
@@ -179,6 +177,8 @@ proc
temp.bestF = 0
closed.Cut(closed.len)
if(path && maxnodes && path.len > maxnodes+1)
return 0
if(path)
for(var/i = 1; i <= path.len/2; i++)
path.Swap(i,path.len-i+1)
-5
View File
@@ -1,5 +0,0 @@
/proc/captain_announce(var/text)
world << "<h1 class='alert'>Priority Announcement</h1>"
world << "<span class='alert'>[html_encode(text)]</span>"
world << "<br>"
-16
View File
@@ -1,16 +0,0 @@
/proc/command_alert(var/text, var/title = "")
var/command
command += "<h1 class='alert'>[command_name()] Update</h1>"
if (title && length(title) > 0)
command += "<br><h2 class='alert'>[html_encode(title)]</h2>"
command += "<br><span class='alert'>[html_encode(text)]</span><br>"
command += "<br>"
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << command
if(title == "")
news_network.SubmitArticle(text, "Centcom Official", "Central Command", null)
else
news_network.SubmitArticle(title + "<br><br>" + text, "Centcom Official", "Central Command", null)
+29
View File
@@ -0,0 +1,29 @@
/proc/priority_announce(var/text, var/title = "", var/sound = 'sound/AI/attention.ogg', var/type)
if(!text)
return
var/announcement
if(type == "Priority")
announcement += "<h1 class='alert'>Priority Announcement</h1>"
else if(type == "Captain")
announcement += "<h1 class='alert'>Captain Announces</h1>"
news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null)
else
announcement += "<h1 class='alert'>[command_name()] Update</h1>"
if (title && length(title) > 0)
announcement += "<br><h2 class='alert'>[html_encode(title)]</h2>"
if(title == "")
news_network.SubmitArticle(text, "Central Command Update", "Station Announcements", null)
else
news_network.SubmitArticle(title + "<br><br>" + text, "Central Command", "Station Announcements", null)
announcement += "<br><span class='alert'>[html_encode(text)]</span><br>"
announcement += "<br>"
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << announcement
M << sound(sound)
+64 -66
View File
@@ -123,6 +123,7 @@ proc/process_ghost_teleport_locs()
power_light = 0
power_equip = 0
power_environ = 0
ambientsounds = list('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
@@ -500,6 +501,7 @@ proc/process_ghost_teleport_locs()
/area/prison/morgue
name = "\improper Prison Morgue"
icon_state = "morgue"
ambientsounds = list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg')
/area/prison/medical_research
name = "\improper Prison Genetic Research"
@@ -610,6 +612,10 @@ proc/process_ghost_teleport_locs()
name = "Waste Disposal"
icon_state = "disposal"
/area/maintenance/electrical
name = "Electrical Maintenance"
icon_state = "yellow"
//Hallway
/area/hallway/primary/fore
@@ -753,6 +759,7 @@ proc/process_ghost_teleport_locs()
/area/chapel/main
name = "\improper Chapel"
icon_state = "chapel"
ambientsounds = list('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
/area/chapel/office
name = "\improper Chapel Office"
@@ -817,26 +824,32 @@ proc/process_ghost_teleport_locs()
//Engineering
/area/engine
engine_smes
name = "\improper Engineering SMES"
icon_state = "engine_smes"
requires_power = 0//This area only covers the batteries and they deal with their own power
ambientsounds = list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
engineering
name = "Engineering"
icon_state = "engine_smes"
/area/engine/engine_smes
name = "\improper Engineering SMES"
icon_state = "engine_smes"
requires_power = 0//This area only covers the batteries and they deal with their own power
break_room
name = "\improper Engineering Foyer"
icon_state = "engine"
/area/engine/engineering
name = "Engineering"
icon_state = "engine_smes"
chiefs_office
name = "\improper Chief Engineer's office"
icon_state = "engine_control"
/area/engine/break_room
name = "\improper Engineering Foyer"
icon_state = "engine"
gravity_generator
name = "Gravity Generator Room"
icon_state = "blue"
/area/engine/chiefs_office
name = "\improper Chief Engineer's office"
icon_state = "engine_control"
/area/engine/secure_construction
name = "\improper Secure Construction Area"
icon_state = "engine"
/area/engine/gravity_generator
name = "Gravity Generator Room"
icon_state = "blue"
//Solars
@@ -922,6 +935,7 @@ proc/process_ghost_teleport_locs()
name = "\improper AI Satellite Teleporter Room"
icon_state = "teleporter"
music = "signal"
ambientsounds = list('sound/ambience/ambimalf.ogg')
//MedBay
@@ -964,6 +978,7 @@ proc/process_ghost_teleport_locs()
/area/medical/morgue
name = "\improper Morgue"
icon_state = "morgue"
ambientsounds = list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg')
/area/medical/chemistry
name = "Chemistry"
@@ -1008,13 +1023,17 @@ proc/process_ghost_teleport_locs()
icon_state = "sec_prison"
/area/security/processing
name = "\improper Prisoner Processing"
name = "\improper Labor Shuttle Dock"
icon_state = "sec_prison"
/area/security/warden
name = "\improper Armory"
name = "\improper Brig Control"
icon_state = "Warden"
/area/security/armory
name = "\improper Armory"
icon_state = "armory"
/area/security/hos
name = "\improper Head of Security's Office"
icon_state = "sec_hos"
@@ -1048,6 +1067,10 @@ proc/process_ghost_teleport_locs()
name = "\improper Vault"
icon_state = "nuke_storage"
/area/ai_monitored/nuke_storage
name = "\improper Vault"
icon_state = "nuke_storage"
/area/security/checkpoint
name = "\improper Security Checkpoint"
icon_state = "checkpoint1"
@@ -1147,7 +1170,7 @@ proc/process_ghost_teleport_locs()
icon_state = "toxmix"
/area/toxins/misc_lab
name = "\improper Miscellaneous Research"
name = "\improper Testing Lab"
icon_state = "toxmisc"
/area/toxins/server
@@ -1340,6 +1363,9 @@ proc/process_ghost_teleport_locs()
icon_state = "yellow"
//AI
/area/ai_monitored/security/armory
name = "\improper Armory"
icon_state = "armory"
/area/ai_monitored/storage/eva
name = "EVA Storage"
@@ -1353,6 +1379,10 @@ proc/process_ghost_teleport_locs()
name = "Emergency Storage"
icon_state = "storage"
/area/turret_protected/
ambientsounds = list('sound/ambience/ambimalf.ogg')
/area/turret_protected/ai_upload
name = "\improper AI Upload Chamber"
icon_state = "ai_upload"
@@ -1369,8 +1399,12 @@ proc/process_ghost_teleport_locs()
name = "\improper AI Satellite"
icon_state = "ai"
/area/aisat
name = "\improper AI Satellite Exterior"
icon_state = "storage"
/area/turret_protected/aisat_interior
name = "\improper AI Satellite"
name = "\improper AI Satellite Antechamber"
icon_state = "ai"
/area/turret_protected/AIsatextFP
@@ -1431,6 +1465,9 @@ proc/process_ghost_teleport_locs()
// Telecommunications Satellite
/area/tcommsat
ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/tcommsat/entrance
name = "\improper Telecoms Teleporter"
icon_state = "tcomsatentrance"
@@ -1442,18 +1479,22 @@ proc/process_ghost_teleport_locs()
/area/turret_protected/tcomsat
name = "\improper Telecoms Satellite"
icon_state = "tcomsatlob"
ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/turret_protected/tcomfoyer
name = "\improper Telecoms Foyer"
icon_state = "tcomsatentrance"
ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/turret_protected/tcomwest
name = "\improper Telecommunications Satellite West Wing"
icon_state = "tcomsatwest"
ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/turret_protected/tcomeast
name = "\improper Telecommunications Satellite East Wing"
icon_state = "tcomsateast"
ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/tcommsat/computer
name = "\improper Telecoms Control Room"
@@ -1490,56 +1531,13 @@ proc/process_ghost_teleport_locs()
/area/awaymission/beach
name = "Beach"
icon_state = "null"
icon_state = "away"
luminosity = 1
lighting_use_dynamic = 0
requires_power = 0
var/sound/mysound = null
has_gravity = 1
ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag2.ogg')
New()
..()
var/sound/S = new/sound()
mysound = S
S.file = 'sound/ambience/shore.ogg'
S.repeat = 1
S.wait = 0
S.channel = 123
S.volume = 100
S.priority = 255
S.status = SOUND_UPDATE
process()
Entered(atom/movable/Obj,atom/OldLoc)
if(ismob(Obj))
if(Obj:client)
mysound.status = SOUND_UPDATE
Obj << mysound
return
Exited(atom/movable/Obj)
if(ismob(Obj))
if(Obj:client)
mysound.status = SOUND_PAUSED | SOUND_UPDATE
Obj << mysound
proc/process()
set background = BACKGROUND_ENABLED
var/sound/S = null
var/sound_delay = 0
if(prob(25))
S = sound(file=pick('sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag3.ogg'), volume=100)
sound_delay = rand(0, 50)
for(var/mob/living/carbon/human/H in src)
if(H.client)
mysound.status = SOUND_UPDATE
H << mysound
if(S)
spawn(sound_delay)
H << S
spawn(60) .()
/////////////////////////////////////////////////////////////////////
/*
+8 -22
View File
@@ -17,6 +17,12 @@
/area
var/global/global_uid = 0
var/uid
var/list/ambientsounds = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\
'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\
'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\
'sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg',\
'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\
'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
/area/New()
icon_state = ""
@@ -249,9 +255,6 @@
/area/Entered(A)
var/musVolume = 25
var/sound = 'sound/ambience/ambigen1.ogg'
if(!istype(A,/mob/living)) return
var/mob/living/L = A
@@ -271,27 +274,10 @@
L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
if(prob(35))
if(istype(src, /area/chapel))
sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
else if(istype(src, /area/medical/morgue))
sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/title2.ogg')
else if(type == /area)
sound = pick('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
else if(istype(src, /area/engine))
sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
else if(istype(src, /area/AIsattele) || istype(src, /area/turret_protected/ai) || istype(src, /area/turret_protected/ai_upload) || istype(src, /area/turret_protected/ai_upload_foyer))
sound = pick('sound/ambience/ambimalf.ogg')
else if(istype(src, /area/mine/explored) || istype(src, /area/mine/unexplored))
sound = pick('sound/ambience/ambimine.ogg')
musVolume = 25
else if(istype(src, /area/tcommsat) || istype(src, /area/turret_protected/tcomwest) || istype(src, /area/turret_protected/tcomeast) || istype(src, /area/turret_protected/tcomfoyer) || istype(src, /area/turret_protected/tcomsat))
sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
else
sound = pick('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
var/sound = pick(ambientsounds)
if(!L.client.played)
L << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
L << sound(sound, repeat = 0, wait = 0, volume = 25, channel = 1)
L.client.played = 1
spawn(600) //ewww - this is very very bad
if(L.&& L.client)
+2 -11
View File
@@ -1,7 +1,7 @@
/atom
layer = 2
var/level = 2
var/flags = null
var/flags = 0
var/list/fingerprints
var/list/fingerprintshidden
var/fingerprintslast = null
@@ -40,13 +40,6 @@
/atom/proc/CheckParts()
return
/atom/Destroy()
if(reagents)
reagents.delete()
qdel(reagents)
invisibility = 101
// Do not call ..()
/atom/proc/assume_air(datum/gas_mixture/giver)
del(giver)
return null
@@ -87,9 +80,6 @@
*/
/atom/proc/meteorhit(obj/meteor as obj)
return
/atom/proc/allow_drop()
return 1
@@ -219,6 +209,7 @@ its easier to just keep the beam vertical.
if (!( usr ))
return
usr.face_atom(src)
usr << "\icon[src]That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn
if(desc)
usr << desc
+6 -2
View File
@@ -32,10 +32,14 @@
..()
/atom/movable/Destroy()
loc = null // can never null their loc enough really
if(reagents)
qdel(reagents)
for(var/atom/movable/AM in contents)
qdel(AM)
..()
tag = null
loc = null
invisibility = 101
// Do not call ..()
// Previously known as HasEntered()
// This is automatically called when something enters your square
+3
View File
@@ -76,6 +76,7 @@ Radio:
1443 - Confession Intercom
1349 - Miners
1347 - Cargo techs
1447 - AI Private
Devices:
1451 - tracking implant
@@ -108,6 +109,7 @@ var/list/radiochannels = list(
"Syndicate" = 1213,
"Supply" = 1347,
"Service" = 1349,
"AI Private" = 1447,
)
//depenging helpers
var/const/SYND_FREQ = 1213 //nuke op frequency, coloured dark brown in chat window
@@ -119,6 +121,7 @@ var/const/MED_FREQ = 1355 //medical, coloured blue in chat window
var/const/ENG_FREQ = 1357 //engineering, coloured orange in chat window
var/const/SEC_FREQ = 1359 //security, coloured red in chat window
var/const/DSQUAD_FREQ = 1441 //death squad frequency, coloured grey in chat window
var/const/AIPRIV_FREQ = 1447 //AI private, colored magenta in chat window
#define TRANSMISSION_WIRE 0
#define TRANSMISSION_RADIO 1
+5 -5
View File
@@ -23,9 +23,6 @@
var/mutantrace = null //The type of mutant race the player is if applicable (i.e. potato-man)
var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings,
/datum/dna/New()
if(!blood_type) blood_type = random_blood_type()
/datum/dna/proc/generate_uni_identity(mob/living/carbon/character)
. = ""
var/list/L = new /list(DNA_UNI_IDENTITY_BLOCKS)
@@ -69,7 +66,7 @@
if(!istype(owner, /mob/living/carbon/monkey) && !istype(owner, /mob/living/carbon/human))
return
if(!owner.dna)
owner.dna = new /datum/dna()
create_dna(owner)
if(real_name)
owner.real_name = real_name
@@ -116,7 +113,7 @@
if(!istype(character, /mob/living/carbon/monkey) && !istype(character, /mob/living/carbon/human))
return
if(!character.dna)
character.dna = new /datum/dna()
create_dna(character)
if(blood_type)
character.dna.blood_type = blood_type
character.dna.real_name = character.real_name
@@ -125,6 +122,9 @@
character.dna.unique_enzymes = character.dna.generate_unique_enzymes(character)
return character.dna
/proc/create_dna(mob/living/carbon/C) //don't use this unless you're about to use hardset_dna or ready_dna
C.dna = new /datum/dna()
/////////////////////////// DNA DATUM
/////////////////////////// DNA HELPER-PROCS
+2 -1
View File
@@ -64,6 +64,7 @@
/obj/item/weapon/antag_spawner/contract/spawn_antag(var/client/C, var/turf/T, var/type = "")
new /obj/effect/effect/harmless_smoke(T)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
C.prefs.copy_to(M)
M.key = C.key
M << "<B>You are the [usr.real_name]'s apprentice! You are bound by magic contract to follow their orders and help them in accomplishing their goals."
switch(type)
@@ -105,7 +106,7 @@
/obj/item/weapon/antag_spawner/contract/equip_antag(mob/target as mob)
target.equip_to_slot_or_del(new /obj/item/device/radio/headset(target), slot_ears)
target.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(target), slot_w_uniform)
target.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(target), slot_w_uniform)
target.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(target), slot_shoes)
target.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(target), slot_wear_suit)
target.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(target), slot_head)
+2 -5
View File
@@ -111,7 +111,7 @@ var/list/blob_nodes = list()
if(B)
B.max_occurrences = 0 // disable the event
else
error("Events variable is null in blob gamemode post setup.")
ERROR("Events variable is null in blob gamemode post setup.")
spawn(10)
start_state = new /datum/station_state()
@@ -156,10 +156,7 @@ var/list/blob_nodes = list()
return
if (1)
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/outbreak5.ogg')
priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
return
return
+3 -3
View File
@@ -152,7 +152,7 @@
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/user)
user.changeNext_move(8)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
src.visible_message("<span class='danger'>The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]!</span>")
src.visible_message("<span class='danger'>The [src.name] has been attacked with \the [W][(user ? " by [user]" : "")]!</span>")
var/damage = 0
switch(W.damtype)
if("fire")
@@ -180,7 +180,7 @@
/obj/effect/blob/proc/change_to(var/type)
if(!ispath(type))
error("[type] is an invalid type for the blob.")
ERROR("[type] is an invalid type for the blob.")
new type(src.loc)
qdel(src)
@@ -209,4 +209,4 @@ var/datum/blob_colour/B = new()
fdel("icons/mob/blob_result.dmi")
fcopy(I, "icons/mob/blob_result.dmi")
*/
*/
@@ -1,8 +1,9 @@
/obj/effect/proc_holder/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We fall into a stasis, allowing us to regenerate."
chemical_cost = 10
chemical_cost = 20
dna_cost = 0
req_dna = 1
req_stat = DEAD
max_genetic_damage = 100
@@ -1,7 +1,6 @@
/obj/effect/proc_holder/changeling/revive
name = "Regenerate"
desc = "We regenerate, healing all damage from our form."
chemical_cost = 10
req_stat = DEAD
//Revive from regenerative stasis
@@ -42,9 +42,15 @@
return //sanity check as AStar is still throwing insane stunts
if(!AStar(user.loc, target.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, user.mind.changeling.sting_range))
return //hope this ancient magic still works
if(target.mind && target.mind.changeling)
sting_feedback(user,target)
take_chemical_cost(user.mind.changeling)
return
return 1
/obj/effect/proc_holder/changeling/sting/sting_feedback(var/mob/user, var/mob/target)
if(!target)
return
user << "<span class='notice'>We stealthily sting [target.name].</span>"
if(target.mind && target.mind.changeling)
target << "<span class='warning'>You feel a tiny prick.</span>"
@@ -80,6 +86,8 @@
/obj/effect/proc_holder/changeling/sting/transformation/sting_action(var/mob/user, var/mob/target)
add_logs(user, target, "stung", object="transformation sting", addition=" new identity is [selected_dna.real_name]")
var/datum/dna/NewDNA = selected_dna
if(ismonkey(target))
user << "<span class='notice'>We stealthily sting [target.name].</span>"
hardset_dna(target, NewDNA.uni_identity, NewDNA.struc_enzymes, NewDNA.real_name, NewDNA.mutantrace, NewDNA.blood_type)
updateappearance(target)
feedback_add_details("changeling_powers","TS")
@@ -146,7 +154,7 @@ obj/effect/proc_holder/changeling/sting/LSD
add_logs(user, target, "stung", object="LSD sting")
spawn(rand(300,600))
if(target)
target.hallucination += 400
target.hallucination = max(400, target.hallucination)
feedback_add_details("changeling_powers","HS")
return 1
+1 -1
View File
@@ -861,7 +861,7 @@ var/list/sacrificed = list()
user << "\red You cannot summon the [cultist], for his shackles of blood are strong"
return fizzle()
cultist.loc = src.loc
cultist.lying = 1
cultist.Weaken(5)
cultist.regenerate_icons()
for(var/mob/living/carbon/human/C in orange(1,src))
if(iscultist(C) && !C.stat)
+4 -13
View File
@@ -32,10 +32,7 @@
eventNumbersToPickFrom += 3
switch(pick(eventNumbersToPickFrom))
if(1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/meteors.ogg')
priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
@@ -74,9 +71,7 @@
*/
/proc/power_failure()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
for(var/mob/M in player_list)
M << sound('sound/AI/poweroff.ogg')
priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", 'sound/AI/poweroff.ogg')
for(var/obj/machinery/power/smes/S in world)
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
continue
@@ -123,9 +118,7 @@
/proc/power_restore()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = C.cell.maxcharge
@@ -146,9 +139,7 @@
/proc/power_restore_quick()
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
+4 -7
View File
@@ -45,8 +45,9 @@
for(var/mob/new_player/player in player_list)
if((player.client)&&(player.ready))
playerC++
if(playerC < required_players)
return 0
if(!Debug2)
if(playerC < required_players)
return 0
antag_candidates = get_players_for_role(antag_flag)
if(!Debug2)
if(antag_candidates.len < required_enemies)
@@ -175,7 +176,6 @@
var/list/possible_modes = list()
possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf", "changeling", "cult")
possible_modes -= "[ticker.mode]"
var/number = pick(2, 3)
var/i = 0
for(i = 0, i < number, i++)
@@ -202,10 +202,7 @@
comm.messagetitle.Add("Cent. Com. Status Summary")
comm.messagetext.Add(intercepttext)
command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/intercept.ogg')
priority_announce("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.", 'sound/AI/intercept.ogg')
if(security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
+19 -14
View File
@@ -1,4 +1,5 @@
var/global/datum/controller/gameticker/ticker
var/round_start_time = 0
#define GAME_STATE_PREGAME 1
#define GAME_STATE_SETTING_UP 2
@@ -45,7 +46,7 @@ var/global/datum/controller/gameticker/ticker
if(config)
pregame_timeleft = config.lobby_countdown
else
error("configuration was null when retrieving the lobby_countdown value.")
ERROR("configuration was null when retrieving the lobby_countdown value.")
pregame_timeleft = 120
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds"
@@ -65,18 +66,19 @@ var/global/datum/controller/gameticker/ticker
var/list/datum/game_mode/runnable_modes
if((master_mode=="random") || (master_mode=="secret"))
runnable_modes = config.get_runnable_modes()
if (runnable_modes.len==0)
current_state = GAME_STATE_PREGAME
world << "<B>Unable to choose playable game mode.</B> Reverting to pre-game lobby."
return 0
if(secret_force_mode != "secret")
for (var/datum/game_mode/M in runnable_modes)
if (M.config_tag && M.config_tag == secret_force_mode)
src.mode = M
break
if (!src.mode)
message_admins("\blue Unable to force secret [secret_force_mode].", 1)
if((master_mode=="secret") && (secret_force_mode != "secret"))
var/datum/game_mode/smode = config.pick_mode(secret_force_mode)
if (!smode.can_start())
message_admins("\blue Unable to force secret [secret_force_mode]. [smode.required_players] players and [smode.required_enemies] eligible antagonists needed.", 1)
else
src.mode = smode
if(!src.mode)
if (runnable_modes.len==0)
current_state = GAME_STATE_PREGAME
world << "<B>Unable to choose playable game mode.</B> Reverting to pre-game lobby."
return 0
src.mode = pickweight(runnable_modes)
else
@@ -114,6 +116,8 @@ var/global/datum/controller/gameticker/ticker
else
src.mode.announce()
round_start_time = world.time
supply_shuttle.process() //Start the supply shuttle regenerating points
master_controller.process() //Start master_controller.process()
lighting_controller.process() //Start processing DynamicAreaLighting updates
@@ -142,6 +146,7 @@ var/global/datum/controller/gameticker/ticker
if(!admins.len)
send2irc("Server", "Round just started with no admins online!")
auto_toggle_ooc(0) // Turn it off
if(config.sql_enabled)
spawn(3000)
@@ -156,7 +161,7 @@ var/global/datum/controller/gameticker/ticker
//Plus it provides an easy way to make cinematics for other events. Just use this as a template
proc/station_explosion_cinematic(var/station_missed=0, var/override = null)
if( cinematic ) return //already a cinematic in progress!
auto_toggle_ooc(1) // Turn it on
//initialise our cinematic screen object
cinematic = new(src)
cinematic.icon = 'icons/effects/station_explosion.dmi'
@@ -286,7 +291,7 @@ var/global/datum/controller/gameticker/ticker
if(!mode.explosion_in_progress && mode.check_finished())
current_state = GAME_STATE_FINISHED
auto_toggle_ooc(1) // Turn it on
spawn
declare_completion()
@@ -53,6 +53,80 @@
turret.shot_delay = 20
src << "<span class='notice'>Turrets upgraded.</span>"
/datum/AI_Module/large/lockdown
module_name = "Hostile Station Lockdown"
mod_pick_name = "lockdown"
description = "Take control of the airlock, blast door and fire control networks, locking them down. Caution! This command also electrifies all airlocks."
cost = 20
one_time = 1
power_type = /mob/living/silicon/ai/proc/lockdown
/mob/living/silicon/ai/proc/lockdown()
set category = "Malfunction"
set name = "Initiate Hostile Lockdown"
if(src.stat == 2)
src <<"You cannot begin a lockdown because you are dead!"
return
if(malf_cooldown)
return
var/obj/machinery/door/airlock/AL
for(var/obj/machinery/door/D in portals)
spawn()
if(istype(D, /obj/machinery/door/airlock))
AL = D
if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire.
AL.locked = 0 //For airlocks that were bolted open.
AL.safe = 0 //DOOR CRUSH
AL.close()
AL.locked = 1 //Bolt it!
AL.lights = 0 //Stealth bolt for a classic AI door trap.
AL.secondsElectrified = -1 //Shock it!
else if(!D.stat) //So that only powered doors are closed.
D.close() //Close ALL the doors!
var/obj/machinery/computer/communications/C = locate() in machines
if(C)
C.post_status("alert", "lockdown")
src.verbs += /mob/living/silicon/ai/proc/disablelockdown
src << "<span class = 'warning'>Lockdown Initiated.</span>"
malf_cooldown = 1
spawn(30)
malf_cooldown = 0
/mob/living/silicon/ai/proc/disablelockdown()
set category = "Malfunction"
set name = "Disable Lockdown"
if(src.stat == 2)
src <<"You cannot disable lockdown because you are dead!"
return
if(malf_cooldown)
return
var/obj/machinery/door/airlock/AL
for(var/obj/machinery/door/D in portals)
spawn()
if(istype(D, /obj/machinery/door/airlock))
AL = D
if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire.
AL.locked = 0
AL.secondsElectrified = 0
AL.open()
AL.safe = 1
AL.lights = 1 //Essentially reset the airlock to normal.
else if(!D.stat) //Opens only powered doors.
D.open() //Open everything!
src << "<span class = 'notice'>Lockdown Lifted.</span>"
malf_cooldown = 1
spawn(30)
malf_cooldown = 0
/datum/AI_Module/large/disable_rcd
module_name = "RCD disable"
mod_pick_name = "rcd"
@@ -184,7 +184,7 @@
if (alert(usr, "Are you sure you wish to initiate the takeover? The station hostile runtime detection software is bound to alert everyone. You have hacked [ticker.mode:apcs] APCs.", "Takeover:", "Yes", "No") != "Yes")
return
command_alert("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert")
priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/AI/aimalf.ogg')
set_security_level("delta")
for(var/obj/item/weapon/pinpointer/point in world)
@@ -196,9 +196,6 @@
ticker.mode:malf_mode_declared = 1
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/aimalf.ogg')
/datum/game_mode/malfunction/proc/ai_win()
+131 -67
View File
@@ -1,10 +1,15 @@
/var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds
//set to at least 100 unless you want evarr ruining every round
/var/const/meteors_in_wave = 50
/var/const/meteors_in_small_wave = 10
/var/list/meteorsA = list(/obj/effect/meteor/dust=3, /obj/effect/meteor/medium=8, /obj/effect/meteor/big=3, \
/obj/effect/meteor/flaming=1, /obj/effect/meteor/irradiated=3)
/proc/meteor_wave(var/number = meteors_in_wave)
/var/list/meteorsB = list(/obj/effect/meteor/meaty=5, /obj/effect/meteor/meaty/xeno=1)
/var/list/meteorsC = list(/obj/effect/meteor/dust) //for space dust event
/proc/meteor_wave(var/number = 50) //this proc's unused now.
if(!ticker || wavesecret)
return
@@ -15,12 +20,13 @@
spawn(meteor_wave_delay)
wavesecret = 0
/proc/spawn_meteors(var/number = meteors_in_small_wave)
/proc/spawn_meteors(var/number = 10, var/list/meteortypes)
for(var/i = 0; i < number; i++)
spawn(0)
spawn_meteor()
spawn_meteor(meteortypes)
/proc/spawn_meteor()
/proc/spawn_meteor(var/list/meteortypes)
var/startx
var/starty
@@ -30,7 +36,6 @@
var/turf/pickedgoal
var/max_i = 10//number of tries to spawn meteor.
do
switch(pick(1,2,3,4))
if(1) //NORTH
@@ -58,90 +63,149 @@
pickedgoal = locate(endx, endy, 1)
max_i--
if(max_i<=0) return
while (!istype(pickedstart, /turf/space) || pickedstart.loc.name != "Space" ) //FUUUCK, should never happen.
var/obj/effect/meteor/M
switch(rand(1, 100))
if(1 to 10)
M = new /obj/effect/meteor/big( pickedstart )
if(11 to 75)
M = new /obj/effect/meteor( pickedstart )
if(76 to 100)
M = new /obj/effect/meteor/small( pickedstart )
var/Me = pickweight(meteortypes)
var/obj/effect/meteor/M = new Me(pickedstart)
M.dest = pickedgoal
spawn(0)
walk_towards(M, M.dest, 1)
return
/obj/effect/meteor
name = "meteor"
name = "the concept of meteor"
desc = "You should probably run instead of gawking at this."
icon = 'icons/obj/meteor.dmi'
icon_state = "flaming"
icon_state = "small"
density = 1
anchored = 1.0
var/hits = 1
anchored = 1
var/hits = 4
var/hitpwr = 2 //Level of ex_act to be called on hit.
var/dest
pass_flags = PASSTABLE
var/heavy = 0
var/meteorsound = 'sound/effects/meteorimpact.ogg'
/obj/effect/meteor/small
name = "small meteor"
icon_state = "smallf"
var/meteordrop = /obj/item/weapon/ore/iron
var/dropamt = 2
/obj/effect/meteor/dust
name = "space dust"
icon_state = "dust"
pass_flags = PASSTABLE | PASSGRILLE
hits = 1
hitpwr = 3
meteorsound = 'sound/weapons/throwtap.ogg'
meteordrop = /obj/item/weapon/ore/glass
/obj/effect/meteor/Bump(atom/A)
if (A)
A.meteorhit(src)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
if (--src.hits <= 0)
//Prevent meteors from blowing up the singularity's containment.
//Changing emitter and generator ex_act would result in them being bomb and C4 proof.
if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field/generator) && \
prob(15))
explosion(src.loc, 4, 5, 6, 7, 0)
qdel(src)
/obj/effect/meteor/ex_act(severity)
if (severity < 4)
qdel(src)
return
/obj/effect/meteor/medium
name = "meteor"
dropamt = 3
/obj/effect/meteor/big
name = "big meteor"
hits = 5
icon_state = "large"
hits = 7
heavy = 1
dropamt = 4
ex_act(severity)
return
/obj/effect/meteor/flaming
name = "flaming meteor"
icon_state = "flaming"
hits = 3
heavy = 1
meteorsound = 'sound/effects/bamf.ogg'
meteordrop = /obj/item/weapon/ore/plasma
Bump(atom/A)
//Prevent meteors from blowing up the singularity's containment.
//Changing emitter and generator ex_act would result in them being bomb and C4 proof
if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field/generator))
if(--src.hits <= 0)
qdel(src) //Dont blow up singularity containment if we get stuck there.
/obj/effect/meteor/irradiated
name = "glowing meteor"
icon_state = "glowing"
hits = 4
heavy = 1
meteordrop = /obj/item/weapon/ore/uranium
if (A)
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if(!T || T.z != src.z)
continue
var/dist = get_dist(M.loc, src.loc)
shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3)
M.playsound_local(src.loc, 'sound/effects/meteorimpact.ogg', 50, 1, get_rand_frequency(), 10)
explosion(src.loc, 0, 1, 2, 3, 0)
/obj/effect/meteor/meaty
name = "meaty ore"
icon_state = "meateor"
desc = "Just... don't think too hard about where this thing came from."
hits = 2
heavy = 1
meteorsound = 'sound/effects/blobattack.ogg'
meteordrop = /obj/item/weapon/reagent_containers/food/snacks/meat
var/meteorgibs = /obj/effect/gibspawner/generic
/obj/effect/meteor/meaty/xeno
color = "#5EFF00"
meteordrop = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
meteorgibs = /obj/effect/gibspawner/xeno
/obj/effect/meteor/New()
..()
SpinAnimation()
/obj/effect/meteor/Bump(atom/A)
if(A)
A.ex_act(hitpwr)
playsound(src.loc, meteorsound, 40, 1)
if(--src.hits <= 0)
make_debris()
meteor_effect(heavy)
qdel(src)
/obj/effect/meteor/ex_act()
return
/obj/effect/meteor/proc/meteor_effect(var/sound=1)
if(sound)
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if(!T || T.z != src.z)
continue
var/dist = get_dist(M.loc, src.loc)
shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3)
M.playsound_local(src.loc, meteorsound, 50, 1, get_rand_frequency(), 10)
/obj/effect/meteor/medium/meteor_effect()
..(heavy)
explosion(src.loc, 1, 2, 3, 4, 0)
/obj/effect/meteor/big/meteor_effect()
..(heavy)
explosion(src.loc, 0, 1, 2, 3, 0)
/obj/effect/meteor/flaming/meteor_effect()
..(heavy)
explosion(src.loc, 0, 1, 2, 3, 0, 0, 5)
/obj/effect/meteor/irradiated/meteor_effect()
..(heavy)
explosion(src.loc, 0, 0, 4, 3, 0)
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
for(var/mob/living/L in view(5, src))
L.apply_effect(40, IRRADIATE)
/obj/effect/meteor/proc/make_debris()
for(var/throws = dropamt, throws > 0, throws--)
var/obj/item/O = new meteordrop(get_turf(src))
O.throw_at(dest, 5, 10)
/obj/effect/meteor/meaty/make_debris()
..()
new meteorgibs(get_turf(src))
if (--src.hits <= 0)
if(prob(15) && !istype(A, /obj/structure/grille))
explosion(src.loc, 1, 2, 3, 4, 0)
qdel(src)
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pickaxe))
+1 -1
View File
@@ -197,7 +197,7 @@
synd_mob.equip_to_slot_or_del(R, slot_ears)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(synd_mob), slot_w_uniform)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(synd_mob), slot_shoes)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(synd_mob), slot_shoes)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(synd_mob), slot_wear_suit)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(synd_mob), slot_gloves)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(synd_mob), slot_head)
@@ -15,6 +15,7 @@ var/bomb_set
var/safety = 1.0
var/obj/item/weapon/disk/nuclear/auth = null
use_power = 0
var/previous_level = ""
/obj/machinery/nuclearbomb/New()
..()
@@ -117,11 +118,15 @@ var/bomb_set
src.icon_state = "nuclearbomb2"
if(!src.safety)
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
src.previous_level = "[get_security_level()]"
set_security_level("delta")
else
bomb_set = 0
set_security_level("[previous_level]")
else
src.icon_state = "nuclearbomb1"
bomb_set = 0
set_security_level("[previous_level]")
if (href_list["safety"])
src.safety = !( src.safety )
src.icon_state = "nuclearbomb1"
+27 -2
View File
@@ -308,8 +308,6 @@ datum/objective/steal/check_completion()
return 1
return 0
var/global/list/possible_items_special = list()
datum/objective/steal/special //ninjas are so special they get their own subtype good for them
@@ -324,6 +322,33 @@ datum/objective/steal/special/find_target()
datum/objective/steal/exchange
dangerrating = 10
var/faction //Exchange objectives: Which side are we on?
var/datum/mind/otheragent //Exchange objectives: The mind of the other party
datum/objective/steal/exchange/proc/set_faction(faction,otheragent)
if(faction == "red")
targetinfo = new/datum/objective_item/unique/docs_blue
else if(faction == "blue")
targetinfo = new/datum/objective_item/unique/docs_red
explanation_text = "Acquire [targetinfo.name] held by [otheragent], the Syndicate Agent"
steal_target = targetinfo.targetitem
datum/objective/steal/exchange/backstab
dangerrating = 3
datum/objective/steal/exchange/backstab/set_faction(faction)
if(faction == "red")
targetinfo = new/datum/objective_item/unique/docs_red
else if(faction == "blue")
targetinfo = new/datum/objective_item/unique/docs_blue
explanation_text = "Do not give up or lose [targetinfo.name]."
steal_target = targetinfo.targetitem
datum/objective/download
dangerrating = 10
+17 -3
View File
@@ -34,8 +34,8 @@ datum/objective_item/steal/jetpack
difficulty = 3
datum/objective_item/steal/magboots
name = "a pair of magboots"
targetitem = /obj/item/clothing/shoes/magboots
name = "the chief engineer's advanced magnetic boots"
targetitem = /obj/item/clothing/shoes/magboots/advance
difficulty = 5
excludefromjob = list("Chief Engineer")
@@ -75,6 +75,10 @@ datum/objective_item/steal/reactive
difficulty = 5
excludefromjob = list("Research Director")
datum/objective_item/steal/documents
name = "a set of secret documents"
targetitem = /obj/item/documents //Any set of secret documents. Doesn't have to be NT's
difficulty = 5
//Items with special checks!
datum/objective_item/steal/plasma
@@ -128,6 +132,16 @@ datum/objective_item/slime/check_special_completion(var/obj/item/slime_extract/E
return 1
return 0
//Unique Objectives
datum/objective_item/unique/docs_red
name = "the \"Red\" secret documents"
targetitem = /obj/item/documents/syndicate/red
difficulty = 10
datum/objective_item/unique/docs_blue
name = "the \"Blue\" secret documents"
targetitem = /obj/item/documents/syndicate/blue
difficulty = 10
//Old ninja objectives.
datum/objective_item/special/pinpointer
@@ -187,4 +201,4 @@ datum/objective_item/stack/gold
datum/objective_item/stack/uranium
name = "25 refined uranium bars"
targetitem = /obj/item/stack/sheet/mineral/uranium
difficulty = 10
difficulty = 10
+2 -2
View File
@@ -195,7 +195,7 @@ datum/hSB
new/obj/item/stack/sheet/glass{amount=50}(usr.loc)
if("hsbwood")
new/obj/item/stack/sheet/wood{amount=50}(usr.loc)
new/obj/item/stack/sheet/mineral/wood{amount=50}(usr.loc)
//
// All access ID
@@ -205,7 +205,7 @@ datum/hSB
ID.registered_name = usr.real_name
ID.assignment = "Sandbox"
ID.access = get_all_accesses()
ID.name = "[ID.registered_name]'s ID Card ([ID.assignment])"
ID.update_label()
//
// RCD - starts with full clip
+1 -1
View File
@@ -35,7 +35,7 @@
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
kill_objective.target = target_list[traitor]
kill_objective.explanation_text = "Assassinate [kill_objective.target.current.real_name], the [kill_objective.target.special_role]."
kill_objective.explanation_text = "Assassinate [kill_objective.target.current.real_name], the [kill_objective.target.assigned_role], the double agent."
traitor.objectives += kill_objective
// Escape
+61 -5
View File
@@ -3,6 +3,9 @@
var/traitor_name = "traitor"
var/list/datum/mind/traitors = list()
var/datum/mind/exchange_red
var/datum/mind/exchange_blue
/datum/game_mode/traitor
name = "traitor"
config_tag = "traitor"
@@ -104,8 +107,16 @@
traitor.objectives += block_objective
else
switch(rand(1,100))
if(1 to 50)
//Assign two traitors for exchange objective
if((traitors.len > 5) && !exchange_blue)
if(!exchange_red)
exchange_red = traitor
else
exchange_blue = traitor
assign_exchange_role(exchange_red,"red")
assign_exchange_role(exchange_blue,"blue")
else
if(prob(50))
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
kill_objective.find_target()
@@ -115,13 +126,12 @@
steal_objective.owner = traitor
steal_objective.find_target()
traitor.objectives += steal_objective
switch(rand(1,100))
if(1 to 90)
if(prob(90))
if (!(locate(/datum/objective/escape) in traitor.objectives))
var/datum/objective/escape/escape_objective = new
escape_objective.owner = traitor
traitor.objectives += escape_objective
else
if (!(locate(/datum/objective/hijack) in traitor.objectives))
var/datum/objective/hijack/hijack_objective = new
@@ -308,3 +318,49 @@
traitor_mob << "Unfortunately, the Syndicate did not provide you with a code response."
traitor_mob << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe."
//End code phrase.
if(traitor_mob.mind == exchange_red || traitor_mob.mind == exchange_blue)
equip_exchange(traitor_mob)
/datum/game_mode/proc/assign_exchange_role(var/datum/mind/owner, var/faction)
var/datum/objective/steal/exchange/exchange_objective = new
exchange_objective.owner = owner
exchange_objective.set_faction(faction,(faction == "red" ? exchange_blue : exchange_red))
owner.objectives += exchange_objective
if(prob(20))
var/datum/objective/steal/exchange/backstab/backstab_objective = new
backstab_objective.owner = owner
backstab_objective.set_faction(faction)
owner.objectives += backstab_objective
var/datum/objective/escape_objective
if(90)
escape_objective = new/datum/objective/escape
else
escape_objective = new/datum/objective/hijack
escape_objective.owner = owner
owner.objectives += escape_objective
/datum/game_mode/proc/equip_exchange(mob/living/carbon/human/mob)
if(!istype(mob))
return
var/obj/item/weapon/folder/syndicate/folder
if(mob.mind == exchange_red)
folder = new/obj/item/weapon/folder/syndicate/red(mob)
else
folder = new/obj/item/weapon/folder/syndicate/blue(mob)
var/list/slots = list (
"backpack" = slot_in_backpack,
"left pocket" = slot_l_store,
"right pocket" = slot_r_store,
"left hand" = slot_l_hand,
"right hand" = slot_r_hand,
)
var/where = mob.equip_in_one_of_slots(folder, slots)
if (!where)
mob << "<span class='warning'>Your Syndicate employer was unable to send you their secret documents.</span>"
else
mob << "<span class='info'>In your [where] is a folder containing <b>secret documents</b> that another Syndicate group wants. We have set up a meeting with one of their agents on station to make an exchange. Exercise extreme caution as they cannot be trusted and may be hostile.</span>"
mob.update_icons()
+88 -86
View File
@@ -12,67 +12,67 @@
//////////////////////////////Capturing////////////////////////////////////////////////////////
attack(mob/living/carbon/human/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/human))//If target is not a human.
return ..()
if(istype(M, /mob/living/carbon/human/dummy))
return..()
add_logs(user, M, "captured [M.name]'s soul", object=src)
/obj/item/device/soulstone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/human))//If target is not a human.
return ..()
if(istype(M, /mob/living/carbon/human/dummy))
return..()
add_logs(user, M, "captured [M.name]'s soul", object=src)
transfer_soul("VICTIM", M, user)
return
transfer_soul("VICTIM", M, user)
return
/*attack(mob/living/simple_animal/shade/M as mob, mob/user as mob)//APPARENTLY THEY NEED THEIR OWN SPECIAL SNOWFLAKE CODE IN THE LIVING ANIMAL DEFINES
if(!istype(M, /mob/living/simple_animal/shade))//If target is not a shade
return ..()
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
/*/obj/item/device/soulstone/attack(mob/living/simple_animal/shade/M as mob, mob/user as mob)//APPARENTLY THEY NEED THEIR OWN SPECIAL SNOWFLAKE CODE IN THE LIVING ANIMAL DEFINES
if(!istype(M, /mob/living/simple_animal/shade))//If target is not a shade
return ..()
user.attack_log += text("\[[time_stamp()]\] <span class='danger'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</span>")
transfer_soul("SHADE", M, user)
return*/
transfer_soul("SHADE", M, user)
return*/
///////////////////Options for using captured souls///////////////////////////////////////
attack_self(mob/user)
if (!in_range(src, user))
return
user.set_machine(src)
var/dat = "<TT><B>Soul Stone</B><BR>"
for(var/mob/living/simple_animal/shade/A in src)
dat += "Captured Soul: [A.name]<br>"
dat += {"<A href='byond://?src=\ref[src];choice=Summon'>Summon Shade</A>"}
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
user << browse(dat, "window=aicard")
onclose(user, "aicard")
/obj/item/device/soulstone/attack_self(mob/user)
if (!in_range(src, user))
return
user.set_machine(src)
var/dat = "<TT><B>Soul Stone</B><BR>"
for(var/mob/living/simple_animal/shade/A in src)
dat += "Captured Soul: [A.name]<br>"
dat += {"<A href='byond://?src=\ref[src];choice=Summon'>Summon Shade</A>"}
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
user << browse(dat, "window=aicard")
onclose(user, "aicard")
return
/obj/item/device/soulstone/Topic(href, href_list)
var/mob/U = usr
if (!in_range(src, U)||U.machine!=src)
U << browse(null, "window=aicard")
U.unset_machine()
return
add_fingerprint(U)
U.set_machine(src)
Topic(href, href_list)
var/mob/U = usr
if (!in_range(src, U)||U.machine!=src)
switch(href_list["choice"])//Now we switch based on choice.
if ("Close")
U << browse(null, "window=aicard")
U.unset_machine()
return
add_fingerprint(U)
U.set_machine(src)
switch(href_list["choice"])//Now we switch based on choice.
if ("Close")
U << browse(null, "window=aicard")
U.unset_machine()
return
if ("Summon")
for(var/mob/living/simple_animal/shade/A in src)
A.status_flags &= ~GODMODE
A.canmove = 1
A << "<b>You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs.</b>"
A.loc = U.loc
A.cancel_camera()
src.icon_state = "soulstone"
attack_self(U)
if ("Summon")
for(var/mob/living/simple_animal/shade/A in src)
A.status_flags &= ~GODMODE
A.canmove = 1
A << "<b>You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs.</b>"
A.loc = U.loc
A.cancel_camera()
src.icon_state = "soulstone"
attack_self(U)
///////////////////////////Transferring to constructs/////////////////////////////////////////////////////
/obj/structure/constructshell
@@ -83,13 +83,14 @@
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("CONSTRUCT",src,user)
var/obj/item/device/soulstone/SS = O
SS.transfer_soul("CONSTRUCT",src,user)
////////////////////////////Proc for moving soul in and out off stone//////////////////////////////////////
/obj/item/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob).
/obj/item/device/soulstone/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob).
switch(choice)
if("FORCE")
if(!iscarbon(target)) //TO-DO: Add sacrifice stoning for non-organics, just because you have no body doesnt mean you dont have a soul
@@ -111,21 +112,21 @@
var/obj/item/device/soulstone/C = src
if(ticker.mode.name == "cult" && T.mind == ticker.mode:sacrifice_target)
if(iscultist(U))
U << "\red The Geometer of blood wants this mortal sacrificed with the rune."
U << "<span class='danger'>The Geometer of blood wants this mortal sacrificed with the rune.</span>"
else
U << "\red The soul stone doesn't work for no apparent reason."
U << "<span class='danger'>The soul stone doesn't work for no apparent reason.</span>"
return 0
if(C.imprinted != "empty")
U << "\red <b>Capture failed!</b>: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
U << "<span class='userdanger'>Capture failed!</span>: The soul stone has already been imprinted with [C.imprinted]'s mind!"
else
if (T.stat == 0)
U << "\red <b>Capture failed!</b>: \black Kill or maim the victim first!"
U << "<span class='userdanger'>Capture failed!</span>: Kill or maim the victim first!"
else
if(T.client == null)
U << "\red <b>Capture failed!</b>: \black The soul has already fled it's mortal frame."
U << "<span class='userdanger'>Capture failed!</span>: The soul has already fled it's mortal frame."
else
if(C.contents.len)
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room."
U << "<span class='userdanger'>Capture failed!</span>: The soul stone is full! Use or free an existing soul to make room."
else
for(var/obj/item/W in T)
T.unEquip(W)
@@ -135,13 +136,13 @@
var/mob/living/simple_animal/shade/T = target
var/obj/item/device/soulstone/C = src
if (T.stat == DEAD)
U << "\red <b>Capture failed!</b>: \black The shade has already been banished!"
U << "<span class='userdanger'>Capture failed!</span>: The shade has already been banished!"
else
if(C.contents.len)
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room."
U << "<span class='userdanger'>Capture failed!</span>: The soul stone is full! Use or free an existing soul to make room."
else
if(T.name != C.imprinted)
U << "\red <b>Capture failed!</b>: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
U << "<span class='userdanger'>Capture failed!</span>: The soul stone has already been imprinted with [C.imprinted]'s mind!"
else
T.loc = C //put shade in stone
T.status_flags |= GODMODE
@@ -150,7 +151,7 @@
C.icon_state = "soulstone2"
T << "Your soul has been recaptured by the soul stone, its arcane energies are reknitting your ethereal form"
if(U != T)
U << "\blue <b>Capture successful!</b>: \black [T.name]'s has been recaptured and stored within the soul stone."
U << "<span class='info'><b>Capture successful!</b>:</span> [T.name]'s has been recaptured and stored within the soul stone."
if("CONSTRUCT")
var/obj/structure/constructshell/T = target
var/obj/item/device/soulstone/C = src
@@ -203,31 +204,32 @@
Z.cancel_camera()
qdel(C)
else
U << "\red <b>Creation failed!</b>: \black The soul stone is empty! Go kill someone!"
U << "<span class='userdanger'>Creation failed!</span>: The soul stone is empty! Go kill someone!"
return
obj/item/proc/init_shade(var/obj/item/device/soulstone/C, var/mob/living/carbon/human/T, var/mob/U as mob, var/vic = 0)
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
T.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = T
flick("dust-h", animation)
qdel(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = C //put shade in stone
S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
S.real_name = "Shade of [T.real_name]"
S.key = T.key
/obj/item/device/soulstone/proc/init_shade(var/obj/item/device/soulstone/C, var/mob/living/carbon/human/T, var/mob/U as mob, var/vic = 0)
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
T.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = T
flick("dust-h", animation)
qdel(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = C //put shade in stone
S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
S.real_name = "Shade of [T.real_name]"
S.key = T.key
if(iscultist(U))
ticker.mode.add_cultist(S.mind,2)
S.cancel_camera()
C.icon_state = "soulstone2"
C.name = "Soul Stone: [S.real_name]"
S << "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs."
C.imprinted = "[S.name]"
if(vic)
U << "\blue <b>Capture successful!</b>: \black [T.real_name]'s soul has been ripped from their body and stored within the soul stone."
U << "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls."
S.cancel_camera()
C.icon_state = "soulstone2"
C.name = "Soul Stone: [S.real_name]"
S << "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs."
C.imprinted = "[S.name]"
if(vic)
U << "<span class='info'><b>Capture successful!</b>:</span> [T.real_name]'s soul has been ripped from their body and stored within the soul stone."
U << "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls."
+1 -1
View File
@@ -154,7 +154,7 @@
qdel(wizard_mob.l_store)
wizard_mob.equip_to_slot_or_del(new /obj/item/device/radio/headset(wizard_mob), slot_ears)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(wizard_mob), slot_w_uniform)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(wizard_mob), slot_w_uniform)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(wizard_mob), slot_shoes)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(wizard_mob), slot_wear_suit)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(wizard_mob), slot_head)
+28 -26
View File
@@ -62,6 +62,7 @@
/var/const/access_gateway = 62
/var/const/access_sec_doors = 63 // Security front doors
/var/const/access_mineral_storeroom = 64
/var/const/access_minisat = 65
//BEGIN CENTCOM ACCESS
/*Should leave plenty of room if we need to add more access levels.
@@ -198,7 +199,7 @@
access_hydroponics, access_library, access_lawyer, access_virology, access_cmo, access_qm, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting,
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
access_keycard_auth, access_tcomsat, access_gateway, access_mineral_storeroom)
access_keycard_auth, access_tcomsat, access_gateway, access_mineral_storeroom, access_minisat)
/proc/get_all_centcom_access()
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_captain)
@@ -210,40 +211,39 @@
switch(code)
if(0)
return get_all_accesses()
if(1) //security
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
if(2) //medbay
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
if(3) //research
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_rd, access_mineral_storeroom)
if(4) //engineering and maintenance
return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_tcomsat, access_ce)
if(5) //command
return list(access_heads, access_RC_announce, access_keycard_auth, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_gateway, access_all_personal_lockers, access_heads_vault, access_hop, access_captain)
if(6) //station general
if(1) //station general
return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer)
if(7) //supply
return list(access_mailsorting, access_mining, access_mining_station, access_cargo, access_qm)
if(2) //security
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
if(3) //medbay
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
if(4) //research
return list(access_research, access_tox, access_tox_storage, access_genetics, access_robotics, access_xenobiology, access_minisat, access_rd)
if(5) //engineering and maintenance
return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_tcomsat, access_minisat, access_ce)
if(6) //supply
return list(access_mailsorting, access_mining, access_mining_station, access_mineral_storeroom, access_cargo, access_qm)
if(7) //command
return list(access_heads, access_RC_announce, access_keycard_auth, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_gateway, access_all_personal_lockers, access_heads_vault, access_hop, access_captain)
/proc/get_region_accesses_name(var/code)
switch(code)
if(0)
return "All"
if(1) //security
if(1) //station general
return "General"
if(2) //security
return "Security"
if(2) //medbay
if(3) //medbay
return "Medbay"
if(3) //research
if(4) //research
return "Research"
if(4) //engineering and maintenance
if(5) //engineering and maintenance
return "Engineering"
if(5) //command
return "Command"
if(6) //station general
return "Station General"
if(7) //supply
if(6) //supply
return "Supply"
if(7) //command
return "Command"
/proc/get_access_desc(A)
switch(A)
@@ -290,7 +290,7 @@
if(access_change_ids)
return "ID Console"
if(access_ai_upload)
return "AI Upload"
return "AI Chambers"
if(access_teleporter)
return "Teleporter"
if(access_eva)
@@ -370,7 +370,9 @@
if(access_sec_doors)
return "Brig"
if(access_mineral_storeroom)
return "Mineral Storeroom"
return "Mineral Storage"
if(access_minisat)
return "AI Satellite"
/proc/get_centcom_access_desc(A)
switch(A)
+5 -4
View File
@@ -1,3 +1,6 @@
/*
Assistant
*/
/datum/job/assistant
title = "Assistant"
flag = ASSISTANT
@@ -10,11 +13,9 @@
access = list() //See /datum/job/assistant/get_access()
minimal_access = list() //See /datum/job/assistant/get_access()
/datum/job/assistant/equip(var/mob/living/carbon/human/H)
if(!H) return 0
/datum/job/assistant/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
return 1
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
/datum/job/assistant/get_access()
if(config.jobs_have_maint_access & ASSISTANTS_HAVE_MAINT_ACCESS) //Config has assistant maint access set
+54 -46
View File
@@ -1,86 +1,94 @@
/*
Captain
*/
/datum/job/captain
title = "Captain"
flag = CAPTAIN
department_head = list("Centcom")
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "Nanotrasen officials and Space law"
selection_color = "#ccccff"
idtype = /obj/item/weapon/card/id/gold
req_admin_notify = 1
access = list() //See get_access()
minimal_access = list() //See get_access()
minimal_player_age = 14
default_id = /obj/item/weapon/card/id/gold
default_pda = /obj/item/device/pda/captain
default_headset = /obj/item/device/radio/headset/heads/captain
default_backpack = /obj/item/weapon/storage/backpack/captain
default_satchel = /obj/item/weapon/storage/backpack/satchel_cap
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_cap(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/capcarapace(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
world << "<b>[H.real_name] is the captain!</b>"
return 1
access = list() //See get_access()
minimal_access = list() //See get_access()
get_access()
return get_all_accesses()
/datum/job/captain/equip_items(var/mob/living/carbon/human/H)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
U.attachTie(new /obj/item/clothing/tie/medal/gold/captain())
H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/capcarapace(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
//Equip ID box
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
//Implant him
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
world << "<b>[H.real_name] is the captain!</b>"
/datum/job/captain/get_access()
return get_all_accesses()
/*
Head of Personnel
*/
/datum/job/hop
title = "Head of Personnel"
flag = HOP
department_head = list("Captain")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
minimal_player_age = 10
default_id = /obj/item/weapon/card/id/silver
default_pda = /obj/item/device/pda/heads/hop
default_headset = /obj/item/device/radio/headset/heads/hop
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_hop, access_RC_announce, access_keycard_auth, access_gateway)
access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_mineral_storeroom)
minimal_access = list(access_security, access_sec_doors, access_court,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_hop, access_RC_announce, access_keycard_auth, access_gateway)
access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_mineral_storeroom)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hopcap(H), slot_head)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
return 1
/datum/job/hop/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hopcap(H), slot_head)
//Equip ID box
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
+205 -185
View File
@@ -1,339 +1,359 @@
//Food
/*
Bartender
*/
/datum/job/bartender
title = "Bartender"
flag = BARTENDER
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/bar
default_headset = /obj/item/device/radio/headset/headset_srv
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_mineral_storeroom)
minimal_access = list(access_bar, access_mineral_storeroom)
/datum/job/bartender/equip_backpack(var/mob/living/carbon/human/H)
switch(H.backbag)
if(1) //No backpack or satchel
equip(var/mob/living/carbon/human/H)
if(!H) return 0
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
var/obj/item/weapon/storage/box/box = new default_storagebox(H)
new /obj/item/ammo_casing/shotgun/beanbag(box)
new /obj/item/ammo_casing/shotgun/beanbag(box)
new /obj/item/ammo_casing/shotgun/beanbag(box)
new /obj/item/ammo_casing/shotgun/beanbag(box)
H.equip_to_slot_or_del(box, slot_r_hand)
if(H.backbag == 1)
var/obj/item/weapon/storage/box/survival/Barpack = new /obj/item/weapon/storage/box/survival(H)
H.equip_to_slot_or_del(Barpack, slot_r_hand)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
return 1
if(2) // Backpack
var/obj/item/weapon/storage/backpack/BPK = new default_backpack(H)
new default_storagebox(BPK)
H.equip_to_slot_or_del(BPK, slot_back,1)
if(3) //Satchel
var/obj/item/weapon/storage/backpack/BPK = new default_satchel(H)
new default_storagebox(BPK)
H.equip_to_slot_or_del(BPK, slot_back,1)
/datum/job/bartender/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
if(H.backbag != 1)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
/*
Chef
*/
/datum/job/chef
title = "Chef"
flag = CHEF
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/chef
default_headset = /obj/item/device/radio/headset/headset_srv
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue)
minimal_access = list(access_kitchen, access_morgue)
/datum/job/chef/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/pda/chef(H), slot_belt)
return 1
/*
Botanist
*/
/datum/job/hydro
title = "Botanist"
flag = BOTANIST
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 3
spawn_positions = 2
supervisors = "the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/botanist
default_headset = /obj/item/device/radio/headset/headset_srv
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
minimal_access = list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
/datum/job/hydro/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/botanic_leather(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/botanic_leather(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt)
return 1
//Cargo
/*
Quartermaster
*/
/datum/job/qm
title = "Quartermaster"
flag = QUARTERMASTER
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
default_pda = /obj/item/device/pda/quartermaster
default_headset = /obj/item/device/radio/headset/headset_cargo
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
/datum/job/qm/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/quartermaster(H), slot_belt)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
return 1
/*
Cargo Technician
*/
/datum/job/cargo_tech
title = "Cargo Technician"
flag = CARGOTECH
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the quartermaster and the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/cargo
default_headset = /obj/item/device/radio/headset/headset_cargo
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
/datum/job/cargo_tech/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
return 1
/*
Shaft Miner
*/
/datum/job/mining
title = "Shaft Miner"
flag = MINER
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 3
spawn_positions = 3
supervisors = "the quartermaster and the head of personnel"
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
default_pda = /obj/item/device/pda/shaftminer
default_headset = /obj/item/device/radio/headset/headset_cargo
default_backpack = /obj/item/weapon/storage/backpack/industrial
default_satchel = /obj/item/weapon/storage/backpack/satchel_eng
default_storagebox = /obj/item/weapon/storage/box/engineer
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial (H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/shaftminer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/mining_voucher(H), slot_in_backpack)
return 1
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting, access_mineral_storeroom)
/datum/job/mining/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/mining_voucher(H), slot_r_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/mining_voucher(H), slot_in_backpack)
/*
Clown
*/
/datum/job/clown
title = "Clown"
flag = CLOWN
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/clown
default_backpack = /obj/item/weapon/storage/backpack/clown
access = list(access_theatre, access_maint_tunnels)
minimal_access = list(access_theatre)
/datum/job/clown/equip_backpack(var/mob/living/carbon/human/H)
var/obj/item/weapon/storage/backpack/BPK = new default_backpack(H)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.fully_replace_character_name(H.real_name, pick(clown_names))
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/clown(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(H, 50), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/spray/waterflower(H), slot_in_backpack)
H.mutations.Add(CLUMSY)
H.rename_self("clown")
return 1
new default_storagebox(BPK)
new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(BPK, 50)
new /obj/item/weapon/stamp/clown(BPK)
new /obj/item/weapon/reagent_containers/spray/waterflower(BPK)
H.equip_to_slot_or_del(BPK, slot_back)
/datum/job/clown/equip_items(var/mob/living/carbon/human/H)
H.fully_replace_character_name(H.real_name, pick(clown_names)) // Give him a temporary random name to prevent identity revealing
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_r_store)
H.mutations.Add(CLUMSY)
H.rename_self("clown")
/*
Mime
*/
/datum/job/mime
title = "Mime"
flag = MIME
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/mime
default_backpack = /obj/item/weapon/storage/backpack/mime
access = list(access_theatre, access_maint_tunnels)
minimal_access = list(access_theatre)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/mime(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/mime(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/mime(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
if(H.mind)
H.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall(null)
H.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/mime/speak(null)
H.mind.miming = 1
H.rename_self("mime")
return 1
/datum/job/mime/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/mime(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/mime(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
if(H.mind)
H.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall(null)
H.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/mime/speak(null)
H.mind.miming = 1
H.rename_self("mime")
/*
Janitor
*/
/datum/job/janitor
title = "Janitor"
flag = JANITOR
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/janitor
default_headset = /obj/item/device/radio/headset/headset_srv
access = list(access_janitor, access_maint_tunnels)
minimal_access = list(access_janitor, access_maint_tunnels)
/datum/job/janitor/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt)
return 1
//More or less assistants
/*
Librarian
*/
/datum/job/librarian
title = "Librarian"
flag = LIBRARIAN
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/librarian
access = list(access_library, access_maint_tunnels)
minimal_access = list(access_library)
/datum/job/librarian/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/red(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/books(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/red(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/librarian(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/books(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
return 1
var/global/lawyer = 0//Checks for another lawyer
/*
Lawyer
*/
/datum/job/lawyer
title = "Lawyer"
flag = LAWYER
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the head of personnel"
selection_color = "#dddddd"
var/global/lawyers = 0 //Counts lawyer amount
default_pda = /obj/item/device/pda/lawyer
default_headset = /obj/item/device/radio/headset/headset_sec
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
minimal_access = list(access_lawyer, access_court, access_sec_doors)
/datum/job/lawyer/equip_items(var/mob/living/carbon/human/H)
lawyers += 1
equip(var/mob/living/carbon/human/H)
if(!H) return 0
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(!lawyer)
lawyer = 1
H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/bluesuit(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/lawyer/bluejacket(H), slot_wear_suit)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/purpsuit(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/lawyer/purpjacket(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
if(lawyers%2 != 0)
H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/bluesuit(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/lawyer/bluejacket(H), slot_wear_suit)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/purpsuit(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/lawyer/purpjacket(H), slot_wear_suit)
return 1
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
+13 -10
View File
@@ -1,13 +1,20 @@
//Due to how large this one is it gets its own file
/*
Chaplain
*/
/datum/job/chaplain
title = "Chaplain"
flag = CHAPLAIN
department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
default_pda = /obj/item/device/pda/chaplain
access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels)
minimal_access = list(access_morgue, access_chapel_office, access_crematorium)
@@ -20,7 +27,7 @@
//Bible itemstates
var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "bible", "bible", "syringe_kit", "syringe_kit", "syringe_kit", "syringe_kit", "syringe_kit", "kingyellow", "ithaqua", "scientology", "melted", "necronomicon")
/datum/job/chaplain/proc/setupbiblespecifics(var/obj/item/weapon/storage/bible/B, var/mob/living/carbon/human/H)
/datum/job/chaplain/proc/setupbiblespecifics(var/obj/item/weapon/storage/book/bible/B, var/mob/living/carbon/human/H)
switch(B.icon_state)
if("honk1","honk2")
new /obj/item/weapon/grown/bananapeel(B)
@@ -55,7 +62,7 @@
var/iconi = text2num(href_list["seticon"])
var/biblename = biblenames[iconi]
var/obj/item/weapon/storage/bible/B = locate(href_list["bible"])
var/obj/item/weapon/storage/book/bible/B = locate(href_list["bible"])
B.icon_state = biblestates[iconi]
B.item_state = bibleitemstates[iconi]
@@ -73,14 +80,11 @@
usr << browse(null, "window=editicon") // Close window
/datum/job/chaplain/equip(var/mob/living/carbon/human/H)
if(!H) return 0
/datum/job/chaplain/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible/booze(H)
var/obj/item/weapon/storage/book/bible/B = new /obj/item/weapon/storage/book/bible/booze(H)
spawn(0)
var/religion_name = "Christianity"
var/new_religion = copytext(sanitize(input(H, "You are the Chaplain. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN)
@@ -141,5 +145,4 @@
dat += "</table></body></html>"
H << browse(dat, "window=editicon;can_close=0;can_minimize=0;size=250x650")
return 1
H << browse(dat, "window=editicon;can_close=0;can_minimize=0;size=250x650")
+59 -60
View File
@@ -1,102 +1,101 @@
/*
Chief Engineer
*/
/datum/job/chief_engineer
title = "Chief Engineer"
flag = CHIEF
department_head = list("Captain")
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ffeeaa"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
minimal_player_age = 7
default_id = /obj/item/weapon/card/id/silver
default_pda = /obj/item/device/pda/heads/ce
default_pda_slot = slot_l_store
default_headset = /obj/item/device/radio/headset/heads/ce
default_backpack = /obj/item/weapon/storage/backpack/industrial
default_satchel = /obj/item/weapon/storage/backpack/satchel_eng
default_storagebox = /obj/item/weapon/storage/box/engineer
access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_construction, access_sec_doors,
access_heads, access_construction, access_sec_doors, access_minisat,
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_mineral_storeroom)
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_construction, access_sec_doors,
access_heads, access_construction, access_sec_doors, access_minisat,
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_mineral_storeroom)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/ce(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial (H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/ce(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat/white(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1
/datum/job/chief_engineer/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat/white(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
/*
Station Engineer
*/
/datum/job/engineer
title = "Station Engineer"
flag = ENGINEER
department_head = list("Chief Engineer")
department_flag = ENGSEC
faction = "Station"
total_positions = 5
spawn_positions = 5
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_tcomsat)
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_tcomsat)
default_pda = /obj/item/device/pda/engineering
default_pda_slot = slot_l_store
default_headset = /obj/item/device/radio/headset/headset_eng
default_backpack = /obj/item/weapon/storage/backpack/industrial
default_satchel = /obj/item/weapon/storage/backpack/satchel_eng
default_storagebox = /obj/item/weapon/storage/box/engineer
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_external_airlocks, access_construction, access_atmospherics, access_tcomsat)
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_external_airlocks, access_construction, access_tcomsat)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/t_scanner(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1
/datum/job/engineer/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/orange(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/t_scanner(H), slot_r_store)
/*
Atmospheric Technician
*/
/datum/job/atmos
title = "Atmospheric Technician"
flag = ATMOSTECH
department_head = list("Chief Engineer")
department_flag = ENGSEC
faction = "Station"
total_positions = 3
spawn_positions = 2
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
default_pda = /obj/item/device/pda/atmos
default_pda_slot = slot_l_store
default_headset = /obj/item/device/radio/headset/headset_eng
default_storagebox = /obj/item/weapon/storage/box/engineer
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_external_airlocks, access_construction, access_atmospherics)
minimal_access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/atmospheric_technician(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/atmos(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/device/analyzer(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1
/datum/job/atmos/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/atmospheric_technician(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/analyzer(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt)
+58 -3
View File
@@ -7,6 +7,9 @@
var/list/minimal_access = list() //Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population)
var/list/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!)
//Determines who can demote this position
var/department_head = list()
//Bitflags for the job
var/flag = 0
var/department_flag = 0
@@ -29,8 +32,6 @@
//Sellection screen color
var/selection_color = "#ffffff"
//the type of the ID the player will have
var/idtype = /obj/item/weapon/card/id
//If this is set to 1, a text is printed to the player when jobs are assigned, telling him that he should let admins know that he has to disconnect.
var/req_admin_notify
@@ -38,10 +39,64 @@
//If you have the use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.)
var/minimal_player_age = 0
//Job specific items
var/default_id = /obj/item/weapon/card/id //this is just the looks of it
var/default_pda = /obj/item/device/pda
var/default_pda_slot = slot_belt
var/default_headset = /obj/item/device/radio/headset
var/default_backpack = /obj/item/weapon/storage/backpack
var/default_satchel = /obj/item/weapon/storage/backpack/satchel_norm
var/default_storagebox= /obj/item/weapon/storage/box/survival
//Only override this proc
/datum/job/proc/equip_items(var/mob/living/carbon/human/H)
//Or this proc
/datum/job/proc/equip_backpack(var/mob/living/carbon/human/H)
switch(H.backbag)
if(1) //No backpack or satchel
H.equip_to_slot_or_del(new default_storagebox(H), slot_r_hand)
if(2) // Backpack
var/obj/item/weapon/storage/backpack/BPK = new default_backpack(H)
new default_storagebox(BPK)
H.equip_to_slot_or_del(BPK, slot_back,1)
if(3) //Satchel
var/obj/item/weapon/storage/backpack/BPK = new default_satchel(H)
new default_storagebox(BPK)
H.equip_to_slot_or_del(BPK, slot_back,1)
//But don't override this
/datum/job/proc/equip(var/mob/living/carbon/human/H)
return 1
if(!H)
return 0
//Equip backpack
equip_backpack(H)
//Equip the rest of the gear
equip_items(H)
//Equip ID
var/obj/item/weapon/card/id/C = new default_id(H)
C.access = get_access()
C.registered_name = H.real_name
C.assignment = H.job
C.update_label()
H.equip_to_slot_or_del(C, slot_wear_id)
//Equip PDA
var/obj/item/device/pda/PDA = new default_pda(H)
PDA.owner = H.real_name
PDA.ownjob = H.job
PDA.update_label()
H.equip_to_slot_or_del(PDA, default_pda_slot)
//Equip headset
H.equip_to_slot_or_del(new src.default_headset(H), slot_ears)
/datum/job/proc/apply_fingerprints(var/mob/living/carbon/human/H)
if(!istype(H))
return
if(H.back)
H.back.add_fingerprint(H,1) //The 1 sets a flag to ignore gloves
for(var/obj/item/I in H.back.contents)
+80 -85
View File
@@ -1,151 +1,146 @@
/*
Chief Medical Officer
*/
/datum/job/cmo
title = "Chief Medical Officer"
flag = CMO
department_head = list("Captain")
department_flag = MEDSCI
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ffddf0"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors)
minimal_access = list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic (H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_medical_officer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/cmo(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
default_id = /obj/item/weapon/card/id/silver
default_pda = /obj/item/device/pda/heads/cmo
default_headset = /obj/item/device/radio/headset/heads/cmo
default_backpack = /obj/item/weapon/storage/backpack/medic
default_satchel = /obj/item/weapon/storage/backpack/satchel_med
access = list(access_medical, access_morgue, access_genetics, access_heads, access_mineral_storeroom,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors)
minimal_access = list(access_medical, access_morgue, access_genetics, access_heads, access_mineral_storeroom,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors)
/datum/job/cmo/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_medical_officer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/cmo(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
/*
Medical Doctor
*/
/datum/job/doctor
title = "Medical Doctor"
flag = DOCTOR
department_head = list("Chief Medical Officer")
department_flag = MEDSCI
faction = "Station"
total_positions = 5
spawn_positions = 3
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
default_pda = /obj/item/device/pda/medical
default_headset = /obj/item/device/radio/headset/headset_med
default_backpack = /obj/item/weapon/storage/backpack/medic
default_satchel = /obj/item/weapon/storage/backpack/satchel_med
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_morgue, access_surgery)
/datum/job/doctor/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic (H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
//Chemist is a medical job damnit //YEAH FUCK YOU SCIENCE -Pete //Guys, behave -Erro
/*
Chemist
*/
/datum/job/chemist
title = "Chemist"
flag = CHEMIST
department_head = list("Chief Medical Officer")
department_flag = MEDSCI
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
default_pda = /obj/item/device/pda/chemist
default_headset = /obj/item/device/radio/headset/headset_med
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_mineral_storeroom)
minimal_access = list(access_medical, access_chemistry, access_mineral_storeroom)
/datum/job/chemist/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/chemist(H), slot_wear_suit)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/chemist(H), slot_wear_suit)
return 1
/*
Geneticist
*/
/datum/job/geneticist
title = "Geneticist"
flag = GENETICIST
department_head = list("Chief Medical Officer", "Research Director")
department_flag = MEDSCI
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the chief medical officer and research director"
selection_color = "#ffeef0"
default_pda = /obj/item/device/pda/geneticist
default_headset = /obj/item/device/radio/headset/headset_medsci
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_research)
minimal_access = list(access_medical, access_morgue, access_genetics, access_research)
/datum/job/geneticist/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1
/*
Virologist
*/
/datum/job/virologist
title = "Virologist"
flag = VIROLOGIST
department_head = list("Chief Medical Officer")
department_flag = MEDSCI
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
default_pda = /obj/item/device/pda/viro
default_headset = /obj/item/device/radio/headset/headset_med
default_backpack = /obj/item/weapon/storage/backpack/medic
default_satchel = /obj/item/weapon/storage/backpack/satchel_med
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_mineral_storeroom)
minimal_access = list(access_medical, access_virology, access_mineral_storeroom)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic (H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/viro(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/virologist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
/datum/job/virologist/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/virologist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
+43 -45
View File
@@ -1,90 +1,88 @@
/*
Research Director
*/
/datum/job/rd
title = "Research Director"
flag = RD
department_head = list("Captain")
department_flag = MEDSCI
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ffddff"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
minimal_player_age = 7
default_id = /obj/item/weapon/card/id/silver
default_pda = /obj/item/device/pda/heads/rd
default_headset = /obj/item/device/radio/headset/heads/rd
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_gateway, access_mineral_storeroom,
access_tech_storage)
access_tech_storage, access_minisat)
minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_gateway, access_mineral_storeroom,
access_tech_storage)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
return 1
access_tech_storage, access_minisat)
/datum/job/rd/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
/*
Scientist
*/
/datum/job/scientist
title = "Scientist"
flag = SCIENTIST
department_head = list("Research Director")
department_flag = MEDSCI
faction = "Station"
total_positions = 5
spawn_positions = 3
supervisors = "the research director"
selection_color = "#ffeeff"
default_pda = /obj/item/device/pda/toxins
default_headset = /obj/item/device/radio/headset/headset_sci
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_mineral_storeroom)
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenobiology, access_mineral_storeroom)
/datum/job/scientist/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/science(H), slot_wear_suit)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat/science(H), slot_wear_suit)
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask)
// H.equip_to_slot_or_del(new /obj/item/weapon/tank/oxygen(H), slot_l_hand)
return 1
/*
Roboticist
*/
/datum/job/roboticist
title = "Roboticist"
flag = ROBOTICIST
department_head = list("Research Director")
department_flag = MEDSCI
faction = "Station"
total_positions = 2
spawn_positions = 1
supervisors = "research director"
selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research, access_mineral_storeroom) //As a job that handles so many corpses, it makes sense for them to have morgue access.
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research, access_mineral_storeroom) //As a job that handles so many corpses, it makes sense for them to have morgue access.
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
default_pda = /obj/item/device/pda/roboticist
default_headset = /obj/item/device/radio/headset/headset_sci
access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research, access_mineral_storeroom)
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research, access_mineral_storeroom)
/datum/job/roboticist/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/labcoat(H), slot_wear_suit)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
+106 -100
View File
@@ -4,17 +4,28 @@
return list(access_maint_tunnels)
return list()
/*
Head of Shitcurity
*/
/datum/job/hos
title = "Head of Security"
flag = HOS
department_head = list("Captain")
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ffdddd"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
minimal_player_age = 14
default_id = /obj/item/weapon/card/id/silver
default_pda = /obj/item/device/pda/heads/hos
default_headset = /obj/item/device/radio/headset/heads/hos
default_backpack = /obj/item/weapon/storage/backpack/security
default_satchel = /obj/item/weapon/storage/backpack/satchel_sec
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
@@ -23,161 +34,158 @@
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
if(!H) return 0
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security (H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/hos(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/HoS(H), slot_head)
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
return 1
/datum/job/hos/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/hos(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/HoS(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
/*
Warden
*/
/datum/job/warden
title = "Warden"
flag = WARDEN
department_head = list("Head of Security")
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court) //But see /datum/job/warden/get_access()
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/warden(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/warden(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/warden(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
return 1
default_pda = /obj/item/device/pda/warden
default_headset = /obj/item/device/radio/headset/headset_sec
default_backpack = /obj/item/weapon/storage/backpack/security
default_satchel = /obj/item/weapon/storage/backpack/satchel_sec
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court) //See /datum/job/warden/get_access()
/datum/job/warden/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/warden(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/warden(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
/datum/job/warden/get_access()
var/list/L = list()
L = ..() | check_config_for_sec_maint()
return L
/*
Detective
*/
/datum/job/detective
title = "Detective"
flag = DETECTIVE
department_head = list("Head of Security")
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
minimal_player_age = 7
default_pda = /obj/item/device/pda/detective
default_headset = /obj/item/device/radio/headset/headset_sec
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/detective(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head)
var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H)
CIG.light("")
H.equip_to_slot_or_del(CIG, slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/det_suit(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(H), slot_l_store)
access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
if(H.backbag == 1)//Why cant some of these things spawn in his office?
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_r_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
/datum/job/detective/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/det_suit(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(H), slot_l_store)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
return 1
var/obj/item/clothing/mask/cigarette/cig = new /obj/item/clothing/mask/cigarette(H)
cig.light("")
H.equip_to_slot_or_del(cig, slot_wear_mask)
if(H.backbag == 1)//Why cant some of these things spawn in his office?
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_r_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
/*
Security Officer
*/
/datum/job/officer
title = "Security Officer"
flag = OFFICER
department_head = list("Head of Security")
department_flag = ENGSEC
faction = "Station"
total_positions = 5
spawn_positions = 5
supervisors = "the head of security, and the head of your assigned department (if applicable)"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court) //But see /datum/job/warden/get_access()
minimal_player_age = 7
var/list/dep_access = null
default_pda = /obj/item/device/pda/security
default_headset = /obj/item/device/radio/headset/headset_sec
default_backpack = /obj/item/weapon/storage/backpack/security
default_satchel = /obj/item/weapon/storage/backpack/satchel_sec
/datum/job/officer/equip(var/mob/living/carbon/human/H)
if(!H) return 0
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court) //But see /datum/job/warden/get_access()
/datum/job/officer/equip_items(var/mob/living/carbon/human/H)
assign_sec_to_department(H)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/security(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/weapon/melee/baton/loaded(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/melee/baton/loaded(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
return 1
/datum/job/officer/get_access()
var/list/L = list()
@@ -186,14 +194,12 @@
L |= ..() | check_config_for_sec_maint()
dep_access = null;
return L
var/list/sec_departments = list("engineering", "supply", "medical", "science")
/datum/job/officer/proc/assign_sec_to_department(var/mob/living/carbon/human/H)
if(!H) return 0
if(!sec_departments.len)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
else
var/department = pick(sec_departments)
sec_departments -= department
@@ -201,22 +207,22 @@ var/list/sec_departments = list("engineering", "supply", "medical", "science")
switch(department)
if("supply")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/cargo(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/supply(H), slot_ears)
default_headset = /obj/item/device/radio/headset/headset_sec/department/supply
dep_access = list(access_mailsorting, access_mining)
destination = /area/security/checkpoint/supply
if("engineering")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/engine(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/engi(H), slot_ears)
default_headset = /obj/item/device/radio/headset/headset_sec/department/engi
dep_access = list(access_construction, access_engine)
destination = /area/security/checkpoint/engineering
if("medical")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/med(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/med(H), slot_ears)
default_headset = /obj/item/device/radio/headset/headset_sec/department/med
dep_access = list(access_medical)
destination = /area/security/checkpoint/medical
if("science")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/science(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/sci(H), slot_ears)
default_headset = /obj/item/device/radio/headset/headset_sec/department/sci
dep_access = list(access_research)
destination = /area/security/checkpoint/science
var/teleport = 0
@@ -236,7 +242,7 @@ var/list/sec_departments = list("engineering", "supply", "medical", "science")
break
H << "<b>You have been assigned to [department]!</b>"
return
/obj/item/device/radio/headset/headset_sec/department/New()
wires = new(src)
secure_radio_connections = new
+15 -12
View File
@@ -1,3 +1,6 @@
/*
AI
*/
/datum/job/ai
title = "AI"
flag = AI
@@ -10,17 +13,17 @@
req_admin_notify = 1
minimal_player_age = 30
equip(var/mob/living/carbon/human/H)
if(!H) return 0
/datum/job/ai/equip(var/mob/living/carbon/human/H)
if(!H) return 0
/datum/job/ai/config_check()
if(config && config.allow_ai)
return 1
return 0
config_check()
if(config && config.allow_ai)
return 1
return 0
/*
Cyborg
*/
/datum/job/cyborg
title = "Cyborg"
flag = CYBORG
@@ -32,6 +35,6 @@
selection_color = "#ddffdd"
minimal_player_age = 21
equip(var/mob/living/carbon/human/H)
if(!H) return 0
return 1
/datum/job/cyborg/equip(var/mob/living/carbon/human/H)
if(!H) return 0
return H.Robotize()
+318 -389
View File
@@ -9,437 +9,366 @@ var/global/datum/controller/occupations/job_master
var/list/job_debug = list()
proc/SetupOccupations(var/faction = "Station")
occupations = list()
var/list/all_jobs = typesof(/datum/job)
if(!all_jobs.len)
world << "\red \b Error setting up jobs, no job datums found"
return 0
for(var/J in all_jobs)
var/datum/job/job = new J()
if(!job) continue
if(job.faction != faction) continue
if(!job.config_check()) continue
occupations += job
return 1
proc/Debug(var/text)
if(!Debug2) return 0
job_debug.Add(text)
return 1
proc/GetJob(var/rank)
if(!rank) return null
for(var/datum/job/J in occupations)
if(!J) continue
if(J.title == rank) return J
return null
proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0)
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
if(player && player.mind && rank)
var/datum/job/job = GetJob(rank)
if(!job) return 0
if(jobban_isbanned(player, rank)) return 0
if(!job.player_old_enough(player.client)) return 0
var/position_limit = job.total_positions
if(!latejoin)
position_limit = job.spawn_positions
if((job.current_positions < position_limit) || position_limit == -1)
Debug("Player: [player] is now Rank: [rank], JCP:[job.current_positions], JPL:[position_limit]")
player.mind.assigned_role = rank
unassigned -= player
job.current_positions++
return 1
Debug("AR has failed, Player: [player], Rank: [rank]")
/datum/controller/occupations/proc/SetupOccupations(var/faction = "Station")
occupations = list()
var/list/all_jobs = typesof(/datum/job)
if(!all_jobs.len)
world << "<span class='userdanger'>Error setting up jobs, no job datums found</span>"
return 0
for(var/J in all_jobs)
var/datum/job/job = new J()
if(!job) continue
if(job.faction != faction) continue
if(!job.config_check()) continue
occupations += job
proc/FindOccupationCandidates(datum/job/job, level, flag)
Debug("Running FOC, Job: [job], Level: [level], Flag: [flag]")
var/list/candidates = list()
for(var/mob/new_player/player in unassigned)
if(jobban_isbanned(player, job.title))
Debug("FOC isbanned failed, Player: [player]")
continue
if(!job.player_old_enough(player.client))
Debug("FOC player not old enough, Player: [player]")
continue
if(flag && (!player.client.prefs.be_special & flag))
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
continue
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
Debug("FOC pass, Player: [player], Level:[level]")
candidates += player
return candidates
proc/GiveRandomJob(var/mob/new_player/player)
Debug("GRJ Giving random job, Player: [player]")
for(var/datum/job/job in shuffle(occupations))
if(!job)
continue
if(istype(job, GetJob("Assistant"))) // We don't want to give him assistant, that's boring!
continue
if(job in command_positions) //If you want a command position, select it!
continue
if(jobban_isbanned(player, job.title))
Debug("GRJ isbanned failed, Player: [player], Job: [job.title]")
continue
if(!job.player_old_enough(player.client))
Debug("GRJ player not old enough, Player: [player]")
continue
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
Debug("GRJ Random job given, Player: [player], Job: [job]")
AssignRole(player, job.title)
unassigned -= player
break
proc/ResetOccupations()
for(var/mob/new_player/player in player_list)
if((player) && (player.mind))
player.mind.assigned_role = null
player.mind.special_role = null
SetupOccupations()
unassigned = list()
return
return 1
///This proc is called before the level loop of DivideOccupations() and will try to select a head, ignoring ALL non-head preferences for every level until it locates a head or runs out of levels to check
proc/FillHeadPosition()
for(var/level = 1 to 3)
for(var/command_position in command_positions)
var/datum/job/job = GetJob(command_position)
if(!job) continue
var/list/candidates = FindOccupationCandidates(job, level)
if(!candidates.len) continue
var/mob/new_player/candidate = pick(candidates)
if(AssignRole(candidate, command_position))
return 1
return 0
/datum/controller/occupations/proc/Debug(var/text)
if(!Debug2) return 0
job_debug.Add(text)
return 1
///This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
proc/CheckHeadPositions(var/level)
/datum/controller/occupations/proc/GetJob(var/rank)
if(!rank) return null
for(var/datum/job/J in occupations)
if(!J) continue
if(J.title == rank) return J
return null
/datum/controller/occupations/proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0)
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
if(player && player.mind && rank)
var/datum/job/job = GetJob(rank)
if(!job) return 0
if(jobban_isbanned(player, rank)) return 0
if(!job.player_old_enough(player.client)) return 0
var/position_limit = job.total_positions
if(!latejoin)
position_limit = job.spawn_positions
if((job.current_positions < position_limit) || position_limit == -1)
Debug("Player: [player] is now Rank: [rank], JCP:[job.current_positions], JPL:[position_limit]")
player.mind.assigned_role = rank
unassigned -= player
job.current_positions++
return 1
Debug("AR has failed, Player: [player], Rank: [rank]")
return 0
/datum/controller/occupations/proc/FindOccupationCandidates(datum/job/job, level, flag)
Debug("Running FOC, Job: [job], Level: [level], Flag: [flag]")
var/list/candidates = list()
for(var/mob/new_player/player in unassigned)
if(jobban_isbanned(player, job.title))
Debug("FOC isbanned failed, Player: [player]")
continue
if(!job.player_old_enough(player.client))
Debug("FOC player not old enough, Player: [player]")
continue
if(flag && (!player.client.prefs.be_special & flag))
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
continue
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
Debug("FOC pass, Player: [player], Level:[level]")
candidates += player
return candidates
/datum/controller/occupations/proc/GiveRandomJob(var/mob/new_player/player)
Debug("GRJ Giving random job, Player: [player]")
for(var/datum/job/job in shuffle(occupations))
if(!job)
continue
if(istype(job, GetJob("Assistant"))) // We don't want to give him assistant, that's boring!
continue
if(job in command_positions) //If you want a command position, select it!
continue
if(jobban_isbanned(player, job.title))
Debug("GRJ isbanned failed, Player: [player], Job: [job.title]")
continue
if(!job.player_old_enough(player.client))
Debug("GRJ player not old enough, Player: [player]")
continue
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
Debug("GRJ Random job given, Player: [player], Job: [job]")
AssignRole(player, job.title)
unassigned -= player
break
/datum/controller/occupations/proc/ResetOccupations()
for(var/mob/new_player/player in player_list)
if((player) && (player.mind))
player.mind.assigned_role = null
player.mind.special_role = null
SetupOccupations()
unassigned = list()
return
//This proc is called before the level loop of DivideOccupations() and will try to select a head, ignoring ALL non-head preferences for every level until´
//it locates a head or runs out of levels to check
//This is basically to ensure that there's atleast a few heads in the round
/datum/controller/occupations/proc/FillHeadPosition()
for(var/level = 1 to 3)
for(var/command_position in command_positions)
var/datum/job/job = GetJob(command_position)
if(!job) continue
var/list/candidates = FindOccupationCandidates(job, level)
if(!candidates.len) continue
var/mob/new_player/candidate = pick(candidates)
AssignRole(candidate, command_position)
return
if(AssignRole(candidate, command_position))
return 1
return 0
proc/FillAIPosition()
var/ai_selected = 0
var/datum/job/job = GetJob("AI")
if(!job) return 0
if(ticker.mode.name == "AI malfunction") // malf. AIs are pre-selected before jobs
for (var/datum/mind/mAI in ticker.mode.malf_ai)
AssignRole(mAI.current, "AI")
ai_selected++
if(ai_selected) return 1
return 0
//This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
//This is also to ensure we get as many heads as possible
/datum/controller/occupations/proc/CheckHeadPositions(var/level)
for(var/command_position in command_positions)
var/datum/job/job = GetJob(command_position)
if(!job) continue
var/list/candidates = FindOccupationCandidates(job, level)
if(!candidates.len) continue
var/mob/new_player/candidate = pick(candidates)
AssignRole(candidate, command_position)
return
for(var/i = job.total_positions, i > 0, i--)
for(var/level = 1 to 3)
var/list/candidates = list()
candidates = FindOccupationCandidates(job, level)
if(candidates.len)
var/mob/new_player/candidate = pick(candidates)
if(AssignRole(candidate, "AI"))
ai_selected++
break
/datum/controller/occupations/proc/FillAIPosition()
var/ai_selected = 0
var/datum/job/job = GetJob("AI")
if(!job) return 0
if(ticker.mode.name == "AI malfunction") // malf. AIs are pre-selected before jobs
for (var/datum/mind/mAI in ticker.mode.malf_ai)
AssignRole(mAI.current, "AI")
ai_selected++
if(ai_selected) return 1
return 0
for(var/i = job.total_positions, i > 0, i--)
for(var/level = 1 to 3)
var/list/candidates = list()
candidates = FindOccupationCandidates(job, level)
if(candidates.len)
var/mob/new_player/candidate = pick(candidates)
if(AssignRole(candidate, "AI"))
ai_selected++
break
if(ai_selected) return 1
return 0
/** Proc DivideOccupations
* fills var "assigned_role" for all ready players.
* This proc must not have any side effect besides of modifying "assigned_role".
**/
proc/DivideOccupations()
//Setup new player list and get the jobs list
Debug("Running DO")
SetupOccupations()
/datum/controller/occupations/proc/DivideOccupations()
//Setup new player list and get the jobs list
Debug("Running DO")
SetupOccupations()
//Holder for Triumvirate is stored in the ticker, this just processes it
if(ticker)
for(var/datum/job/ai/A in occupations)
if(ticker.triai)
A.spawn_positions = 3
//Holder for Triumvirate is stored in the ticker, this just processes it
if(ticker)
for(var/datum/job/ai/A in occupations)
if(ticker.triai)
A.spawn_positions = 3
//Get the players who are ready
for(var/mob/new_player/player in player_list)
if(player.ready && player.mind && !player.mind.assigned_role)
unassigned += player
//Get the players who are ready
for(var/mob/new_player/player in player_list)
if(player.ready && player.mind && !player.mind.assigned_role)
unassigned += player
Debug("DO, Len: [unassigned.len]")
if(unassigned.len == 0) return 0
Debug("DO, Len: [unassigned.len]")
if(unassigned.len == 0) return 0
//Shuffle players and jobs
unassigned = shuffle(unassigned)
//Shuffle players and jobs
unassigned = shuffle(unassigned)
HandleFeedbackGathering()
HandleFeedbackGathering()
//People who wants to be assistants, sure, go on.
Debug("DO, Running Assistant Check 1")
var/datum/job/assist = new /datum/job/assistant()
var/list/assistant_candidates = FindOccupationCandidates(assist, 3)
Debug("AC1, Candidates: [assistant_candidates.len]")
for(var/mob/new_player/player in assistant_candidates)
Debug("AC1 pass, Player: [player]")
AssignRole(player, "Assistant")
assistant_candidates -= player
Debug("DO, AC1 end")
//People who wants to be assistants, sure, go on.
Debug("DO, Running Assistant Check 1")
var/datum/job/assist = new /datum/job/assistant()
var/list/assistant_candidates = FindOccupationCandidates(assist, 3)
Debug("AC1, Candidates: [assistant_candidates.len]")
for(var/mob/new_player/player in assistant_candidates)
Debug("AC1 pass, Player: [player]")
AssignRole(player, "Assistant")
assistant_candidates -= player
Debug("DO, AC1 end")
//Select one head
Debug("DO, Running Head Check")
FillHeadPosition()
Debug("DO, Head Check end")
//Select one head
Debug("DO, Running Head Check")
FillHeadPosition()
Debug("DO, Head Check end")
//Check for an AI
Debug("DO, Running AI Check")
FillAIPosition()
Debug("DO, AI Check end")
//Check for an AI
Debug("DO, Running AI Check")
FillAIPosition()
Debug("DO, AI Check end")
//Other jobs are now checked
Debug("DO, Running Standard Check")
//Other jobs are now checked
Debug("DO, Running Standard Check")
// New job giving system by Donkie
// This will cause lots of more loops, but since it's only done once it shouldn't really matter much at all.
// Hopefully this will add more randomness and fairness to job giving.
// New job giving system by Donkie
// This will cause lots of more loops, but since it's only done once it shouldn't really matter much at all.
// Hopefully this will add more randomness and fairness to job giving.
// Loop through all levels from high to low
var/list/shuffledoccupations = shuffle(occupations)
for(var/level = 1 to 3)
//Check the head jobs first each level
CheckHeadPositions(level)
// Loop through all levels from high to low
var/list/shuffledoccupations = shuffle(occupations)
for(var/level = 1 to 3)
//Check the head jobs first each level
CheckHeadPositions(level)
// Loop through all unassigned players
for(var/mob/new_player/player in unassigned)
// Loop through all jobs
for(var/datum/job/job in shuffledoccupations) // SHUFFLE ME BABY
if(!job)
continue
if(jobban_isbanned(player, job.title))
Debug("DO isbanned failed, Player: [player], Job:[job.title]")
continue
if(!job.player_old_enough(player.client))
Debug("DO player not old enough, Player: [player], Job:[job.title]")
continue
// If the player wants that job on this level, then try give it to him.
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
// If the job isn't filled
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
Debug("DO pass, Player: [player], Level:[level], Job:[job.title]")
AssignRole(player, job.title)
unassigned -= player
break
// Hand out random jobs to the people who didn't get any in the last check
// Also makes sure that they got their preference correct
// Loop through all unassigned players
for(var/mob/new_player/player in unassigned)
if(player.client.prefs.userandomjob)
GiveRandomJob(player)
/*
Old job system
for(var/level = 1 to 3)
for(var/datum/job/job in occupations)
Debug("Checking job: [job]")
// Loop through all jobs
for(var/datum/job/job in shuffledoccupations) // SHUFFLE ME BABY
if(!job)
continue
if(!unassigned.len)
break
if((job.current_positions >= job.spawn_positions) && job.spawn_positions != -1)
continue
var/list/candidates = FindOccupationCandidates(job, level)
while(candidates.len && ((job.current_positions < job.spawn_positions) || job.spawn_positions == -1))
var/mob/new_player/candidate = pick(candidates)
Debug("Selcted: [candidate], for: [job.title]")
AssignRole(candidate, job.title)
candidates -= candidate*/
Debug("DO, Standard Check end")
Debug("DO, Running AC2")
// For those who wanted to be assistant if their preferences were filled, here you go.
for(var/mob/new_player/player in unassigned)
Debug("AC2 Assistant located, Player: [player]")
AssignRole(player, "Assistant")
return 1
proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
if(!H) return 0
var/datum/job/job = GetJob(rank)
H.job = rank
if(!joined_late)
var/obj/S = null
for(var/obj/effect/landmark/start/sloc in landmarks_list)
if(sloc.name != rank) continue
if(locate(/mob/living) in sloc.loc) continue
S = sloc
break
if(!S)
S = locate("start*[rank]") // use old stype
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
if(job)
job.equip(H)
job.apply_fingerprints(H)
if(H.mind)
H.mind.assigned_role = rank
switch(rank)
if("Cyborg")
H.Robotize()
return 1
if("AI","Clown") //don't need bag preference stuff!
else
switch(H.backbag)
if(1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2)
var/obj/item/weapon/storage/backpack/BPK = new/obj/item/weapon/storage/backpack(H)
new /obj/item/weapon/storage/box/survival(BPK)
H.equip_to_slot_or_del(BPK, slot_back,1)
if(3)
var/obj/item/weapon/storage/backpack/BPK = new/obj/item/weapon/storage/backpack/satchel_norm(H)
new /obj/item/weapon/storage/box/survival(BPK)
H.equip_to_slot_or_del(BPK, slot_back,1)
H << "<B>You are the [rank].</B>"
H << "<b>As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
if(job.req_admin_notify)
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
spawnId(H,rank)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
H.update_hud() // Tmp fix for Github issue 1006. TODO: make all procs in update_icons.dm do client.screen |= equipment no matter what.
return 1
proc/spawnId(var/mob/living/carbon/human/H, rank)
if(!H) return 0
var/obj/item/weapon/card/id/C = null
var/datum/job/job = null
for(var/datum/job/J in occupations)
if(J.title == rank)
job = J
break
if(job)
if(job.title == "Cyborg")
return
else
C = new job.idtype(H)
C.access = job.get_access()
else
C = new /obj/item/weapon/card/id(H)
if(C)
C.registered_name = H.real_name
C.assignment = rank
C.name = "[C.registered_name]'s ID Card ([C.assignment])"
H.equip_to_slot_or_del(C, slot_wear_id)
/* if(prob(50))
H.equip_to_slot_or_del(new /obj/item/weapon/pen(H), slot_r_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/pen/blue(H), slot_r_store)*/
H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_belt)
if(locate(/obj/item/device/pda,H))//I bet this could just use locate. It can --SkyMarshal
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
pda.ownjob = C.assignment
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
return 1
proc/LoadJobs(jobsfile) //ran during round setup, reads info from jobs.txt -- Urist
if(!config.load_jobs_from_txt)
return 0
var/list/jobEntries = file2list(jobsfile)
for(var/job in jobEntries)
if(!job)
continue
job = trim(job)
if (!length(job))
continue
var/pos = findtext(job, "=")
var/name = null
var/value = null
if(pos)
name = copytext(job, 1, pos)
value = copytext(job, pos + 1)
else
continue
if(name && value)
var/datum/job/J = GetJob(name)
if(!J) continue
J.total_positions = text2num(value)
J.spawn_positions = text2num(value)
if(name == "AI" || name == "Cyborg")//I dont like this here but it will do for now
J.total_positions = 0
return 1
proc/HandleFeedbackGathering()
for(var/datum/job/job in occupations)
var/tmp_str = "|[job.title]|"
var/level1 = 0 //high
var/level2 = 0 //medium
var/level3 = 0 //low
var/level4 = 0 //never
var/level5 = 0 //banned
var/level6 = 0 //account too young
for(var/mob/new_player/player in player_list)
if(!(player.ready && player.mind && !player.mind.assigned_role))
continue //This player is not ready
if(jobban_isbanned(player, job.title))
level5++
Debug("DO isbanned failed, Player: [player], Job:[job.title]")
continue
if(!job.player_old_enough(player.client))
level6++
continue
if(player.client.prefs.GetJobDepartment(job, 1) & job.flag)
level1++
else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag)
level2++
else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag)
level3++
else level4++ //not selected
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-"
feedback_add_details("job_preferences",tmp_str)
if(!job.player_old_enough(player.client))
Debug("DO player not old enough, Player: [player], Job:[job.title]")
continue
// If the player wants that job on this level, then try give it to him.
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
// If the job isn't filled
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
Debug("DO pass, Player: [player], Level:[level], Job:[job.title]")
AssignRole(player, job.title)
unassigned -= player
break
// Hand out random jobs to the people who didn't get any in the last check
// Also makes sure that they got their preference correct
for(var/mob/new_player/player in unassigned)
if(player.client.prefs.userandomjob)
GiveRandomJob(player)
Debug("DO, Standard Check end")
Debug("DO, Running AC2")
// For those who wanted to be assistant if their preferences were filled, here you go.
for(var/mob/new_player/player in unassigned)
Debug("AC2 Assistant located, Player: [player]")
AssignRole(player, "Assistant")
return 1
//Gives the player the stuff he should have with his rank
/datum/controller/occupations/proc/EquipRank(var/mob/living/H, var/rank, var/joined_late = 0)
var/datum/job/job = GetJob(rank)
H.job = rank
//If we joined at roundstart we should be positioned at our workstation
if(!joined_late)
var/obj/S = null
for(var/obj/effect/landmark/start/sloc in landmarks_list)
if(sloc.name != rank) continue
if(locate(/mob/living) in sloc.loc) continue
S = sloc
break
if(!S)
S = locate("start*[rank]") // use old stype
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
if(H.mind)
H.mind.assigned_role = rank
if(job)
var/new_mob = job.equip(H)
if(ismob(new_mob))
H = new_mob
job.apply_fingerprints(H)
H << "<b>You are the [rank].</b>"
H << "<b>As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
if(job.req_admin_notify)
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
H.update_hud() // Tmp fix for Github issue 1006. TODO: make all procs in update_icons.dm do client.screen |= equipment no matter what.
return 1
/datum/controller/occupations/proc/LoadJobs(jobsfile) //ran during round setup, reads info from jobs.txt -- Urist
if(!config.load_jobs_from_txt)
return 0
var/list/jobEntries = file2list(jobsfile)
for(var/job in jobEntries)
if(!job)
continue
job = trim(job)
if (!length(job))
continue
var/pos = findtext(job, "=")
var/name = null
var/value = null
if(pos)
name = copytext(job, 1, pos)
value = copytext(job, pos + 1)
else
continue
if(name && value)
var/datum/job/J = GetJob(name)
if(!J) continue
J.total_positions = text2num(value)
J.spawn_positions = text2num(value)
if(name == "AI" || name == "Cyborg")//I dont like this here but it will do for now
J.total_positions = 0
return 1
/datum/controller/occupations/proc/HandleFeedbackGathering()
for(var/datum/job/job in occupations)
var/tmp_str = "|[job.title]|"
var/level1 = 0 //high
var/level2 = 0 //medium
var/level3 = 0 //low
var/level4 = 0 //never
var/level5 = 0 //banned
var/level6 = 0 //account too young
for(var/mob/new_player/player in player_list)
if(!(player.ready && player.mind && !player.mind.assigned_role))
continue //This player is not ready
if(jobban_isbanned(player, job.title))
level5++
continue
if(!job.player_old_enough(player.client))
level6++
continue
if(player.client.prefs.GetJobDepartment(job, 1) & job.flag)
level1++
else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag)
level2++
else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag)
level3++
else level4++ //not selected
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-"
feedback_add_details("job_preferences",tmp_str)
+4 -1
View File
@@ -128,8 +128,11 @@
/obj/machinery/atmospherics/unary/heat_reservoir/heater/New()
..()
initialize_directions = dir
var/obj/item/weapon/circuitboard/thermomachine/H = new /obj/item/weapon/circuitboard/thermomachine(null)
H.build_path = /obj/machinery/atmospherics/unary/heat_reservoir/heater
H.name = "circuit board (Heater)"
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/thermomachine(null)
component_parts += H
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
+1 -1
View File
@@ -52,7 +52,7 @@
return 0
/obj/machinery/sleeper/MouseDrop_T(mob/target, mob/user)
if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user)|| !iscarbon(target))
if(stat || user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user)|| !iscarbon(target))
return
close_machine(target)
+4 -5
View File
@@ -916,7 +916,6 @@ FIRE ALARM
icon = 'icons/obj/monitors.dmi'
icon_state = "fire0"
var/detecting = 1.0
var/working = 1.0
var/time = 10.0
var/timing = 0.0
var/lockdownbyai = 0
@@ -1136,7 +1135,7 @@ FIRE ALARM
src.updateUsrDialog()
/obj/machinery/firealarm/proc/reset()
if (!( src.working ))
if (stat & (NOPOWER|BROKEN)) // can't reset alarm if it's unpowered or broken.
return
var/area/A = src.loc
A = A.loc
@@ -1148,7 +1147,7 @@ FIRE ALARM
return
/obj/machinery/firealarm/proc/alarm()
if (!( src.working ))
if (stat & (NOPOWER|BROKEN)) // can't activate alarm if it's unpowered or broken.
return
var/area/A = src.loc
A = A.loc
@@ -1282,7 +1281,7 @@ Code shamelessly copied from apc_frame
return
/obj/machinery/firealarm/partyalarm/reset()
if (!( src.working ))
if (stat & (NOPOWER|BROKEN))
return
var/area/A = src.loc
A = A.loc
@@ -1293,7 +1292,7 @@ Code shamelessly copied from apc_frame
return
/obj/machinery/firealarm/partyalarm/alarm()
if (!( src.working ))
if (stat & (NOPOWER|BROKEN))
return
var/area/A = src.loc
A = A.loc
+54 -23
View File
@@ -1,3 +1,7 @@
/////////////////////////////////////////////////////////////
// AIR SENSOR (found in gaz tanks)
/////////////////////////////////////////////////////////////
obj/machinery/air_sensor
icon = 'icons/obj/stationobjs.dmi'
icon_state = "gsensor1"
@@ -73,6 +77,10 @@ obj/machinery/air_sensor/New()
if(radio_controller)
set_frequency(frequency)
/////////////////////////////////////////////////////////////
// GENERAL AIR CONTROL (a.k.a atmos computer)
/////////////////////////////////////////////////////////////
obj/machinery/computer/general_air_control/Destroy()
radio_controller.remove_object(src, frequency)
..()
@@ -99,21 +107,18 @@ obj/machinery/computer/general_air_control/New()
obj/machinery/computer/general_air_control/attack_hand(mob/user)
if(..(user))
return
//user << browse(return_text(),"window=computer")
user.set_machine(src)
//onclose(user, "computer")
interact(user) //UpdateDialog() is calling /interact each tick, not attack_hand()
var/datum/browser/popup = new(user, "computer", name, 465, 390)
obj/machinery/computer/general_air_control/interact(mob/user)
var/datum/browser/popup = new(user, "computer", name, 480, 490) //update the content every tick
popup.set_content(return_text())
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
obj/machinery/computer/general_air_control/interact(mob/user)
attack_hand(user)
obj/machinery/computer/general_air_control/process()
..()
src.updateDialog()
if(..()) //if the computer is not broken or unpowered
src.updateDialog()
obj/machinery/computer/general_air_control/receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
@@ -121,13 +126,14 @@ obj/machinery/computer/general_air_control/receive_signal(datum/signal/signal)
var/id_tag = signal.data["tag"]
if(!id_tag || !sensors.Find(id_tag)) return
sensor_information = list()
sensor_information[id_tag] = signal.data
obj/machinery/computer/general_air_control/proc/return_text()
var/sensor_data
var/count = 0
if(sensors.len)
sensor_data += "<TABLE cellpadding='3'><TR>" //begin the 3x2 table formatting
for(var/id_tag in sensors)
var/long_name = sensors[id_tag]
var/list/data = sensor_information[id_tag]
@@ -154,10 +160,16 @@ obj/machinery/computer/general_air_control/proc/return_text()
else
sensor_part = "<FONT class='bad'>[long_name] can not be found!</FONT><BR>"
sensor_data += sensor_part
sensor_data += "<TD valign='top'>[sensor_part]</TD>"//add the data to the current table cell
count++;
if(count == 2) //if we've put two readings on a line...
sensor_data +="</TR><TR>" //... start a new one
count = 0
sensor_data += "</TR></TABLE>" //end the table formatting
else
sensor_data = "No sensors connected."
sensor_data = "No sensors connected.<BR><BR>" // there's nothing in the sensors list (new computer), so choose between the two atmos computers
sensor_data += "<A href='?src=\ref[src];dist_loop=1'>Initialize as Distribution and Waste Monitor</A><BR>"
sensor_data += "<A href='?src=\ref[src];tank_mon=1'>Initialize as Tank Monitor</A><BR>"
var/output = {"
<h1>Sensor Data</h1>[sensor_data]"}
@@ -176,6 +188,25 @@ obj/machinery/computer/general_air_control/proc/set_frequency(new_frequency)
obj/machinery/computer/general_air_control/initialize()
set_frequency(frequency)
obj/machinery/computer/general_air_control/Topic(href, href_list)
if(..())
return
if(href_list["dist_loop"])
name = "Distribution and Waste Monitor"
set_frequency(1443)
sensors = list("mair_in_meter" = "Mixed Air In", "air_sensor" = "Mixed Air Supply Tank", "mair_out_meter" = "Mixed Air Out", "dloop_atm_meter" = "Distribution Loop", "wloop_atm_meter" = "Waste Loop")
if(href_list["tank_mon"])
name = "Tank Monitor"
set_frequency(1441)
sensors = list("n2_sensor" = "Nitrogen", "o2_sensor" = "Oxygen", "co2_sensor" = "Carbon Dioxide", "tox_sensor" = "Toxins", "n2o_sensor" = "Nitrous Oxide", "waste_sensor" = "Gas Mix Tank")
/////////////////////////////////////////////////////////////
// LARGE TANK CONTROL
/////////////////////////////////////////////////////////////
obj/machinery/computer/general_air_control/large_tank_control
icon = 'icons/obj/computer.dmi'
icon_state = "tank"
@@ -232,9 +263,10 @@ obj/machinery/computer/general_air_control/large_tank_control/proc/reconnect(mob
obj/machinery/computer/general_air_control/large_tank_control/return_text()
var/output = "<A href='?src=\ref[src];reconnect=1'>Reconnect</A><BR>"
output += ..()
//if(signal.data)
// input_info = signal.data // Attempting to fix intake control
if(sensors.len) //if recieving signals from nearby sensors...
output += ..() //... get the data.
else
output += "No sensors connected."
output += "<h1>Tank Control System</h1>"
if(input_info)
@@ -255,12 +287,11 @@ Rate: [volume_rate] L/sec<BR>"}
output += {"<B>Output</B>: [power?("Open"):("On Hold")] <A href='?src=\ref[src];out_refresh_status=1'>Refresh</A><BR>
<B>Max Output Pressure:</B> [output_pressure] kPa<BR>"}
output += "<B>Command:</B> <A href='?src=\ref[src];out_toggle_power=1'>Toggle Power</A> <A href='?src=\ref[src];out_set_pressure=1'>Set Pressure</A><BR>"
output += "<B>Max Output Pressure Set:</B> <A href='?src=\ref[src];adj_pressure=-1000'>-</A> <A href='?src=\ref[src];adj_pressure=-100'>-</A> <A href='?src=\ref[src];adj_pressure=-10'>-</A> <A href='?src=\ref[src];adj_pressure=-1'>-</A> [pressure_setting] kPa <A href='?src=\ref[src];adj_pressure=1'>+</A> <A href='?src=\ref[src];adj_pressure=10'>+</A> <A href='?src=\ref[src];adj_pressure=100'>+</A> <A href='?src=\ref[src];adj_pressure=1000'>+</A><BR>"
else
output += "<FONT color='red'>ERROR: Can not find output port</FONT><BR>"
output += "<B>Max Output Pressure Set:</B> <A href='?src=\ref[src];adj_pressure=-1000'>-</A> <A href='?src=\ref[src];adj_pressure=-100'>-</A> <A href='?src=\ref[src];adj_pressure=-10'>-</A> <A href='?src=\ref[src];adj_pressure=-1'>-</A> [pressure_setting] kPa <A href='?src=\ref[src];adj_pressure=1'>+</A> <A href='?src=\ref[src];adj_pressure=10'>+</A> <A href='?src=\ref[src];adj_pressure=100'>+</A> <A href='?src=\ref[src];adj_pressure=1000'>+</A><BR>"
return output
obj/machinery/computer/general_air_control/large_tank_control/receive_signal(datum/signal/signal)
@@ -282,8 +313,6 @@ obj/machinery/computer/general_air_control/large_tank_control/Topic(href, href_l
if(href_list["adj_pressure"])
var/change = text2num(href_list["adj_pressure"])
pressure_setting = Clamp(pressure_setting + change, 0, 50*ONE_ATMOSPHERE)
spawn(1)
src.updateDialog()
return
if(!radio_connection)
@@ -316,8 +345,10 @@ obj/machinery/computer/general_air_control/large_tank_control/Topic(href, href_l
signal.data["sigtype"]="command"
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
spawn(5)
src.updateDialog()
/////////////////////////////////////////////////////////////
// FUEL INJECTION
/////////////////////////////////////////////////////////////
obj/machinery/computer/general_air_control/fuel_injection
icon = 'icons/obj/computer.dmi'
@@ -204,11 +204,6 @@ update_flag
healthcheck()
..()
/obj/machinery/portable_atmospherics/canister/meteorhit(var/obj/O as obj)
src.health = 0
healthcheck()
return
/obj/machinery/portable_atmospherics/canister/ex_act(severity)
switch(severity)
if(1.0)
+38 -5
View File
@@ -133,12 +133,12 @@ var/global/list/autolathe_recipes_hidden = list( \
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
if(m_amount >= 3750)
if(m_amount >= MINERAL_MATERIAL_AMOUNT)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
G.amount = round(m_amount / MINERAL_MATERIAL_AMOUNT)
if(g_amount >= MINERAL_MATERIAL_AMOUNT)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
G.amount = round(g_amount / MINERAL_MATERIAL_AMOUNT)
default_deconstruction_crowbar(O)
return 1
else
@@ -199,9 +199,42 @@ var/global/list/autolathe_recipes_hidden = list( \
if(href_list["make"])
var/coeff = 2 ** prod_coeff
var/turf/T = get_step(src.loc, get_dir(src,usr))
var/obj/template = locate(href_list["make"])
// critical exploit fix start -walter0o
var/obj/item/template = null
var/attempting_to_build = locate(href_list["make"])
if(!attempting_to_build)
return
if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
template = attempting_to_build
else // somebody is trying to exploit, alert admins -walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate <a href='?_src_=vars;Vars=\ref[attempting_to_build]'>[attempting_to_build]</a> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
return
// now check for legit multiplier, also only stacks should pass with one to prevent raw-materials-manipulation -walter0o
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/max_multiplier = 1
if(istype(template, /obj/item/stack)) // stacks are the only items which can have a multiplier higher than 1 -walter0o
var/obj/item/stack/S = template
max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY) // pasta from regular_win() to make sure the numbers match -walter0o
if( (multiplier > max_multiplier) || (multiplier <= 0) ) // somebody is trying to exploit, alert admins-walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe with multiplier set to <u>[multiplier]</u> on <u>[template]</u> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])" , 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] !")
return
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
if(src.m_amount >= template.m_amt*multiplier/coeff && src.g_amount >= template.g_amt*multiplier/coeff)
busy = 1
+14 -4
View File
@@ -13,6 +13,7 @@
var/brute_dam_coeff = 1.0
var/open = 0//Maint panel
var/locked = 1
var/hacked = 0 //Used to differentiate between being hacked by silicons and emagged by humans.
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
@@ -107,10 +108,6 @@
healthcheck()
return
/obj/machinery/bot/meteorhit()
src.explode()
return
/obj/machinery/bot/blob_act()
src.health -= rand(20,40)*fire_dam_coeff
healthcheck()
@@ -153,10 +150,23 @@
if (was_on)
turn_on()
/obj/machinery/bot/proc/hack(mob/user)
var/hack
if(issilicon(user))
hack += "[src.emagged ? "Software compromised! Unit may exhibit dangerous or erratic behavior." : "Unit operating normally. Release safety lock?"]<BR>"
hack += "Harm Prevention Safety System: <A href='?src=\ref[src];operation=hack'>[src.emagged ? "DANGER" : "Engaged"]</A><BR>"
return hack
/obj/machinery/bot/attack_ai(mob/user as mob)
src.attack_hand(user)
/obj/machinery/bot/proc/speak(var/message)
if((!src.on) || (!message))
return
for(var/mob/O in hearers(src, null))
O.show_message("<span class='game say'><span class='name'>[src]</span> beeps, \"[message]\"</span>",2)
return
/******************************************************************/
// Navigation procs
// Used for A-star pathfinding
+28 -19
View File
@@ -25,8 +25,6 @@
health = 25
maxhealth = 25
var/cleaning = 0
var/screwloose = 0
var/oddbutton = 0
var/blood = 1
var/list/target_types = list()
var/obj/effect/decal/cleanable/target
@@ -81,6 +79,7 @@
/obj/machinery/bot/cleanbot/interact(mob/user as mob)
var/dat
dat += hack(user)
dat += text({"
<TT><B>Automatic Station Cleaner v1.0</B></TT><BR><BR>
Status: []<BR>
@@ -91,12 +90,12 @@ text("<A href='?src=\ref[src];operation=start'>[src.on ? "On" : "Off"]</A>"))
dat += text({"<BR>Cleans Blood: []<BR>"}, text("<A href='?src=\ref[src];operation=blood'>[src.blood ? "Yes" : "No"]</A>"))
dat += text({"<BR>Patrol station: []<BR>"}, text("<A href='?src=\ref[src];operation=patrol'>[src.should_patrol ? "Yes" : "No"]</A>"))
// dat += text({"<BR>Beacon frequency: []<BR>"}, text("<A href='?src=\ref[src];operation=freq'>[src.beacon_freq]</A>"))
if(src.open && !src.locked)
/* if(src.open && !src.locked)
dat += text({"
Odd looking screw twiddled: []<BR>
Weird button pressed: []"},
text("<A href='?src=\ref[src];operation=screw'>[src.screwloose ? "Yes" : "No"]</A>"),
text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"]</A>"))
text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"]</A>"))*/
user << browse("<HEAD><TITLE>Cleaner v1.0 controls</TITLE></HEAD>[dat]", "window=autocleaner")
onclose(user, "autocleaner")
@@ -109,7 +108,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
src.add_fingerprint(usr)
switch(href_list["operation"])
if("start")
if (src.on)
if (src.on && !src.emagged)
turn_off()
else
turn_on()
@@ -122,17 +121,29 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
src.patrol_path = null
src.updateUsrDialog()
if("freq")
var/freq = text2num(input("Select frequency for navigation beacons", "Frequnecy", num2text(beacon_freq / 10))) * 10
var/freq = text2num(input("Select frequency for navigation beacons", "Frequency", num2text(beacon_freq / 10))) * 10
if (freq > 0)
src.beacon_freq = freq
src.updateUsrDialog()
if("screw")
/* if("screw")
src.screwloose = !src.screwloose
usr << "<span class='notice>You twiddle the screw.</span>"
src.updateUsrDialog()
if("oddbutton")
src.oddbutton = !src.oddbutton
usr << "<span class='notice'>You press the weird button.</span>"
src.updateUsrDialog() */
if("hack")
if(!src.emagged)
src.emagged = 2
src.hacked = 1
usr << "<span class='warning'>You corrupt [src]'s cleaning software.</span>"
else if(!src.hacked)
usr << "<span class='userdanger'>[src] does not seem to respond to your repair code!</span>"
else
src.hacked = 0
src.emagged = 0
usr << "<span class='notice'>[src]'s software has been reset!</span>"
src.updateUsrDialog()
/obj/machinery/bot/cleanbot/attackby(obj/item/weapon/W, mob/user as mob)
@@ -153,9 +164,8 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/Emag(mob/user as mob)
..()
if(open && !locked)
if(user) user << "<span class='notice'>The [src] buzzes and beeps.</span>"
src.oddbutton = 1
src.screwloose = 1
if(user) user << "<span class='notice'>[src] buzzes and beeps.</span>"
src.emagged = 2
/obj/machinery/bot/cleanbot/process()
set background = BACKGROUND_ENABLED
@@ -166,19 +176,18 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
return
var/list/cleanbottargets = list()
if(!src.screwloose && !src.oddbutton && prob(5))
if(!src.emagged && prob(5))
visible_message("[src] makes an excited beeping booping sound!")
if(src.screwloose && prob(5))
if(src.emagged && prob(10)) //Wets floors randomly
if(istype(loc,/turf/simulated))
var/turf/simulated/T = src.loc
T.MakeSlippery()
if(src.oddbutton && prob(5))
visible_message("Something flies out of [src]. He seems to be acting oddly.")
var/obj/effect/decal/cleanable/blood/gibs/gib = new /obj/effect/decal/cleanable/blood/gibs(src.loc)
//gib.streak(list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
src.oldtarget = gib
if(src.emagged && prob(5)) //Spawns foam!
visible_message("<span class='danger'>[src] whirs and bubbles violently, before releasing a plume of froth!</span>")
new /obj/effect/effect/foam(src.loc)
if(!src.target || src.target == null)
for (var/obj/effect/decal/cleanable/D in view(7,src))
for(var/T in src.target_types)
@@ -307,7 +316,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/proc/clean(var/obj/effect/decal/cleanable/target)
src.anchored = 1
src.icon_state = "cleanbot-c"
visible_message("\red [src] begins to clean up [target]")
visible_message("<span class='danger'>[src] begins to clean up [target]</span>")
src.cleaning = 1
spawn(50)
src.cleaning = 0
@@ -318,7 +327,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/explode()
src.on = 0
src.visible_message("\red <B>[src] blows apart!</B>", 1)
src.visible_message("<span class='danger'><B>[src] blows apart!</B></span>", 1)
var/turf/Tsec = get_turf(src)
new /obj/item/weapon/reagent_containers/glass/bucket(Tsec)
+15 -12
View File
@@ -116,7 +116,7 @@
if (.)
return
var/dat
dat += hack(user)
dat += text({"
<TT><B>Automatic Security Unit v2.5</B></TT><BR><BR>
Status: []<BR>
@@ -160,7 +160,7 @@ Auto Patrol: []"},
else if((lasercolor == "r") && (istype(H.wear_suit, /obj/item/clothing/suit/bluetag)))
return
if ((href_list["power"]) && (src.allowed(usr)))
if (src.on)
if (src.on && !src.emagged)
turn_off()
else
turn_on()
@@ -180,6 +180,18 @@ Auto Patrol: []"},
auto_patrol = !auto_patrol
mode = SECBOT_IDLE
updateUsrDialog()
if("hack")
if(!src.emagged)
src.emagged = 2
src.hacked = 1
usr << "<span class='warning'>You disable [src]'s combat inhibitor.</span>"
else if(!src.hacked)
usr << "<span class='userdanger'>[src] ignores your attempts to restrict it!</span>"
else
src.emagged = 0
src.hacked = 0
usr << "<span class='notice'>You restore [src]'s combat inhibitor.</span>"
src.updateUsrDialog()
/obj/machinery/bot/ed209/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
@@ -231,8 +243,6 @@ Auto Patrol: []"},
continue
if (istype(C, /mob/living/carbon/human))
threatlevel = src.assess_perp(C)
else if ((istype(C, /mob/living/carbon/monkey)) && (C.client) && (ticker.mode.name == "monkey"))
threatlevel = 4
//src.speak(C.real_name + text(": threat: []", threatlevel))
if (threatlevel < 4 )
continue
@@ -319,7 +329,7 @@ Auto Patrol: []"},
mode = SECBOT_HUNT
return
if(istype(src.target,/mob/living/carbon))
if(iscarbon(target) && target.canBeHandcuffed())
if (!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
@@ -638,8 +648,6 @@ Auto Patrol: []"},
if (istype(C, /mob/living/carbon/human))
src.threatlevel = src.assess_perp(C)
else if ((istype(C, /mob/living/carbon/monkey)) && (C.client) && (ticker.mode.name == "monkey"))
src.threatlevel = 4
if (!src.threatlevel)
continue
@@ -745,11 +753,6 @@ Auto Patrol: []"},
M:loc = T
*/
/obj/machinery/bot/ed209/proc/speak(var/message)
for(var/mob/O in hearers(src, null))
O.show_message("<span class='game say'><span class='name'>[src]</span> beeps, \"[message]\"",2)
return
/obj/machinery/bot/ed209/explode()
walk_to(src,0)
src.visible_message("\red <B>[src] blows apart!</B>", 1)

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