Merge remote-tracking branch 'upstream/master' into flyswatter-fix

To trigger the RUSTG CI
This commit is contained in:
SabreML
2021-04-29 15:23:26 +01:00
1230 changed files with 20187 additions and 20811 deletions
+14 -3
View File
@@ -10,7 +10,7 @@ on:
jobs:
run_linters:
name: Run Linters
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Cache
@@ -37,7 +37,7 @@ jobs:
compile_all_maps:
name: Compile All Maps
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Cache
@@ -54,7 +54,7 @@ jobs:
unit_tests_and_sql:
name: Unit Tests + SQL Validation
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
services:
mariadb:
image: mariadb:latest
@@ -80,6 +80,7 @@ jobs:
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install libssl1.1:i386
ldd librust_g.so
- name: Compile & Run Unit Tests
run: |
tools/ci/install_byond.sh
@@ -87,3 +88,13 @@ jobs:
tools/ci/dm.sh -DCIBUILDING paradise.dme
tools/ci/run_server.sh
windows_dll_tests:
name: Windows RUSTG Validation
runs-on: windows-2016
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.2' # Script was made for 3.8.2
architecture: 'x86' # This MUST be x86
- run: python tools/ci/validate_rustg_windows.py
+20 -8
View File
@@ -5,10 +5,9 @@
# -aa
name: 'Render Nanomaps'
on:
push:
branches: master
paths:
- '_maps/map_files/**'
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
generate_maps:
@@ -17,8 +16,13 @@ jobs:
steps:
- name: 'Update Branch'
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Branch
run: |
git fetch origin
git branch -f nanomap-render
git checkout nanomap-render
git reset --hard origin/master
- name: 'Generate Maps'
run: './tools/github-actions/nanomap-renderer-invoker.sh'
@@ -29,7 +33,15 @@ jobs:
git config --local user.name "NanoMap Generation"
git pull origin master
git commit -m "NanoMap Auto-Update (`date`)" -a || true
- name: 'Push Maps'
uses: ad-m/github-push-action@master
git push -f -u origin nanomap-render
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: "nanomap-render"
destination_branch: "master"
pr_title: "Automatic NanoMap Update"
pr_body: "This pull request updates the server NanoMaps. Please review the diff images before merging."
pr_label: "NanoMaps"
pr_allow_empty: false
github_token: ${{ secrets.GITHUB_TOKEN }}
+8
View File
@@ -0,0 +1,8 @@
{
"workbench.editorAssociations": [
{
"filenamePattern": "*.dmi",
"viewType": "imagePreview.previewEditor"
}
]
}
+2 -2
View File
@@ -159,7 +159,7 @@ DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
`rank` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Administrator',
`admin_rank` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Administrator',
`level` int(2) NOT NULL DEFAULT '0',
`flags` int(16) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
@@ -268,7 +268,7 @@ CREATE TABLE `player` (
`toggles` int(11) DEFAULT NULL,
`toggles_2` int(11) DEFAULT '0',
`sound` mediumint(8) DEFAULT '31',
`volume` smallint(4) DEFAULT '100',
`volume_mixer` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`lastchangelog` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
`exp` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`clientfps` smallint(4) DEFAULT '0',
+2 -2
View File
@@ -158,7 +158,7 @@ DROP TABLE IF EXISTS `SS13_admin`;
CREATE TABLE `SS13_admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ckey` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
`rank` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Administrator',
`admin_rank` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Administrator',
`level` int(2) NOT NULL DEFAULT '0',
`flags` int(16) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
@@ -267,7 +267,7 @@ CREATE TABLE `SS13_player` (
`toggles` int(11) DEFAULT NULL,
`toggles_2` int(11) DEFAULT '0',
`sound` mediumint(8) DEFAULT '31',
`volume` smallint(4) DEFAULT '100',
`volume_mixer` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`lastchangelog` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
`exp` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`clientfps` smallint(4) DEFAULT '0',
+8
View File
@@ -0,0 +1,8 @@
# Updating DB from 20-21
# Replaces volume (number) column by volume_mixer (text) ~dearmochi
# Add column to player
ALTER TABLE `player` ADD COLUMN `volume_mixer` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL AFTER `volume`;
# Remove column from player
ALTER TABLE `player` DROP COLUMN `volume`;
+4
View File
@@ -0,0 +1,4 @@
# Updating DB from 21-22, -AffectedArc07
# Changes `rank` to `admin_rank` to remove use of reserved keyword
ALTER TABLE `admin` CHANGE COLUMN `rank` `admin_rank` VARCHAR(32) NOT NULL DEFAULT 'Administrator' COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`;
+5 -2
View File
@@ -81119,10 +81119,10 @@
/turf/simulated/wall/r_wall,
/area/medical/chemistry)
"cXf" = (
/obj/machinery/status_display{
/obj/structure/closet/secure_closet/reagents,
/obj/structure/disaster_counter/chemistry{
pixel_x = -32
},
/obj/structure/closet/secure_closet/reagents,
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "whitegreen";
@@ -95264,6 +95264,9 @@
network = list("Research Outpost")
},
/obj/effect/decal/warning_stripes/yellow/hollow,
/obj/structure/disaster_counter/toxins{
pixel_y = 32
},
/turf/simulated/floor/plasteel,
/area/toxins/mixing)
"dxe" = (
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
@@ -6735,7 +6735,7 @@
})
"nS" = (
/obj/structure/table/wood,
/obj/item/reagent_containers/food/snacks/beetsoup,
/obj/item/reagent_containers/food/snacks/soup/beetsoup,
/turf/simulated/floor/plasteel{
icon_state = "bar"
},
@@ -5349,8 +5349,7 @@
/obj/effect/decal/cleanable/blood/oil{
color = "black"
},
/obj/item/storage/firstaid/regular{
empty = 1;
/obj/item/storage/firstaid/regular/empty{
name = "First-Aid (empty)"
},
/obj/item/healthanalyzer{
@@ -666,7 +666,7 @@
/area/awaymission/spacebattle/cruiser)
"cS" = (
/obj/structure/table/reinforced,
/obj/item/reagent_containers/food/snacks/stew,
/obj/item/reagent_containers/food/snacks/soup/stew,
/turf/simulated/floor/plasteel{
icon_state = "cafeteria";
dir = 2
+1 -1
View File
@@ -1217,7 +1217,7 @@
},
/area/awaymission/wwgov)
"dy" = (
/obj/item/reagent_containers/food/snacks/stew,
/obj/item/reagent_containers/food/snacks/soup/stew,
/turf/simulated/floor/plasteel{
tag = "icon-stage_bleft";
icon_state = "stage_bleft"
+25 -22
View File
@@ -43596,6 +43596,9 @@
/area/hallway/secondary/entry)
"bLD" = (
/obj/structure/closet/secure_closet/reagents,
/obj/structure/disaster_counter/chemistry{
pixel_x = -32
},
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "whiteyellow"
@@ -44752,12 +44755,6 @@
/area/medical/reception)
"bNA" = (
/obj/effect/decal/warning_stripes/northeast,
/obj/item/radio/intercom{
frequency = 1459;
name = "station intercom (General)";
pixel_x = -28;
pixel_y = 22
},
/turf/simulated/floor/plasteel,
/area/medical/chemistry)
"bNB" = (
@@ -46980,16 +46977,13 @@
/area/assembly/robotics)
"bRm" = (
/obj/structure/table,
/obj/item/storage/firstaid/regular{
empty = 1;
/obj/item/storage/firstaid/regular/empty{
name = "First-Aid (empty)"
},
/obj/item/storage/firstaid/regular{
empty = 1;
/obj/item/storage/firstaid/regular/empty{
name = "First-Aid (empty)"
},
/obj/item/storage/firstaid/regular{
empty = 1;
/obj/item/storage/firstaid/regular/empty{
name = "First-Aid (empty)"
},
/obj/item/healthanalyzer,
@@ -60290,7 +60284,13 @@
pixel_y = 0
},
/obj/machinery/alarm{
pixel_y = 25
pixel_y = 31
},
/obj/machinery/driver_button{
dir = 2;
id_tag = "toxinsdriver";
pixel_y = 22;
range = 18
},
/turf/simulated/floor/plasteel,
/area/toxins/launch{
@@ -61438,15 +61438,12 @@
name = "Toxins Launch Room"
})
"cqq" = (
/obj/machinery/driver_button{
dir = 2;
id_tag = "toxinsdriver";
pixel_y = 24;
range = 18
},
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 8
},
/obj/structure/disaster_counter/toxins{
pixel_y = 32
},
/turf/simulated/floor/plasteel,
/area/toxins/launch{
name = "Toxins Launch Room"
@@ -68306,13 +68303,13 @@
},
/area/toxins/misc_lab)
"cCl" = (
/obj/machinery/newscaster{
pixel_y = 34
},
/obj/machinery/light{
dir = 1;
on = 1
},
/obj/structure/disaster_counter/scichem{
pixel_y = 32
},
/turf/simulated/floor/plasteel{
dir = 5;
icon_state = "vault";
@@ -68334,6 +68331,9 @@
/area/toxins/misc_lab)
"cCn" = (
/obj/machinery/chem_heater,
/obj/machinery/newscaster{
pixel_y = 34
},
/turf/simulated/floor/plasteel{
dir = 5;
icon_state = "vault";
@@ -78694,6 +78694,9 @@
},
/obj/machinery/meter,
/obj/machinery/light,
/obj/structure/disaster_counter/supermatter{
pixel_y = -32
},
/turf/simulated/floor/engine,
/area/engine/engineering)
"cVB" = (
-58
View File
@@ -1,58 +0,0 @@
#define CONTRACT_POWER "Power"
#define CONTRACT_WEALTH "Wealth"
#define CONTRACT_PRESTIGE "Prestige"
#define CONTRACT_MAGIC "Magic"
#define CONTRACT_REVIVE "Revive"
#define CONTRACT_KNOWLEDGE "Knowledge"
#define CONTRACT_UNWILLING "Unwilling"
#define CONTRACT_FRIENDSHIP "Friendship"
// FIXME: Implement these
#define CONTRACT_ETALENT "Engineering Talent"
#define CONTRACT_CTALENT "Chemistry Talent"
#define CONTRACT_RETURNDEAD "Return Dead"
#define CONTRACT_AUGMENT "Cybernetic Augmentations"
#define CONTRACT_CANDY "Endless Candy"
#define CONTRACT_ECHANCE "An Extra Chance"
#define CONTRACT_ATECH "Advanced Technology"
#define CONTRACT_DEVILSMACHINE "Devil's Machinery"
#define CONTRACT_YOUTH "Eternal Youth"
#define CONTRACT_FOOD "Food"
#define CONTRACT_SPACE "Space Gear"
#define CONTRACT_CALAMITY "Calamity"
#define BANE_SALT "salt"
#define BANE_LIGHT "light"
#define BANE_IRON "iron"
#define BANE_WHITECLOTHES "whiteclothes"
#define BANE_SILVER "silver"
#define BANE_HARVEST "harvest"
#define BANE_TOOLBOX "toolbox"
#define OBLIGATION_FOOD "food"
#define OBLIGATION_FIDDLE "fiddle"
#define OBLIGATION_DANCEOFF "danceoff"
#define OBLIGATION_GREET "greet"
#define OBLIGATION_PRESENCEKNOWN "presenceknown"
#define OBLIGATION_SAYNAME "sayname"
#define OBLIGATION_ANNOUNCEKILL "announcekill"
#define OBLIGATION_ANSWERTONAME "answername"
#define BAN_HURTWOMAN "hurtwoman"
#define BAN_HURTMAN "hurtman"
#define BAN_CHAPEL "chapel"
#define BAN_HURTPRIEST "hurtpriest"
#define BAN_AVOIDWATER "avoidwater"
#define BAN_STRIKEUNCONCIOUS "strikeunconcious"
#define BAN_HURTLIZARD "hurtlizard"
#define BAN_HURTANIMAL "hurtanimal"
#define BANISH_WATER "water"
#define BANISH_COFFIN "coffin"
#define BANISH_FORMALDYHIDE "embalm"
#define BANISH_RUNES "runes"
#define BANISH_CANDLES "candles"
#define BANISH_DESTRUCTION "destruction"
#define BANISH_FUNERAL_GARB "funeral"
#define LORE 1
#define LAW 2
+4 -1
View File
@@ -156,6 +156,9 @@
#define COMSIG_ATOM_ORBIT_BEGIN "atom_orbit_begin"
///called when an atom stops orbiting another atom: (atom)
#define COMSIG_ATOM_ORBIT_STOP "atom_orbit_stop"
///from base of atom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
#define COMSIG_ATOM_HITBY "atom_hitby"
/////////////////
///from base of atom/attack_ghost(): (mob/dead/observer/ghost)
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost"
@@ -493,7 +496,7 @@
// /obj/item/clothing signals
///from base of obj/item/clothing/shoes/proc/step_action(): ()
///from [/mob/living/carbon/human/Move]: ()
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action"
///from base of /obj/item/clothing/suit/space/proc/toggle_spacesuit(): (obj/item/clothing/suit/space/suit)
#define COMSIG_SUIT_SPACE_TOGGLE "suit_space_toggle"
+15 -16
View File
@@ -110,22 +110,21 @@
#define NO_RUINS 4
//ITEM INVENTORY SLOT BITMASKS
#define SLOT_OCLOTHING 1
#define SLOT_ICLOTHING 2
#define SLOT_GLOVES 4
#define SLOT_EYES 8
#define SLOT_EARS 16
#define SLOT_MASK 32
#define SLOT_HEAD 64
#define SLOT_FEET 128
#define SLOT_ID 256
#define SLOT_BELT 512
#define SLOT_BACK 1024
#define SLOT_POCKET 2048 //this is to allow items with a w_class of 3 or 4 to fit in pockets.
#define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets.
#define SLOT_TWOEARS 8192
#define SLOT_PDA 16384
#define SLOT_TIE 32768
#define SLOT_OCLOTHING (1<<0)
#define SLOT_ICLOTHING (1<<1)
#define SLOT_GLOVES (1<<2)
#define SLOT_EYES (1<<3)
#define SLOT_EARS (1<<4)
#define SLOT_MASK (1<<5)
#define SLOT_HEAD (1<<6)
#define SLOT_FEET (1<<7)
#define SLOT_ID (1<<8)
#define SLOT_BELT (1<<9)
#define SLOT_BACK (1<<10)
#define SLOT_POCKET (1<<11) //this is to allow items with a w_class of 3 or 4 to fit in pockets.
#define SLOT_TWOEARS (1<<12)
#define SLOT_PDA (1<<13)
#define SLOT_TIE (1<<14)
//ORGAN TYPE FLAGS
#define AFFECT_ROBOTIC_ORGAN 1
+192
View File
@@ -0,0 +1,192 @@
#define FOOTSTEP_WOOD "wood"
#define FOOTSTEP_FLOOR "floor"
#define FOOTSTEP_PLATING "plating"
#define FOOTSTEP_CARPET "carpet"
#define FOOTSTEP_SAND "sand"
#define FOOTSTEP_GRASS "grass"
#define FOOTSTEP_WATER "water"
#define FOOTSTEP_LAVA "lava"
#define FOOTSTEP_MEAT "meat"
//barefoot sounds
#define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot"
#define FOOTSTEP_WOOD_CLAW "woodclaw"
#define FOOTSTEP_HARD_BAREFOOT "hardbarefoot"
#define FOOTSTEP_HARD_CLAW "hardclaw"
#define FOOTSTEP_CARPET_BAREFOOT "carpetbarefoot"
//misc footstep sounds
#define FOOTSTEP_GENERIC_HEAVY "heavy"
//footstep mob defines
#define FOOTSTEP_MOB_CLAW 1
#define FOOTSTEP_MOB_BAREFOOT 2
#define FOOTSTEP_MOB_HEAVY 3
#define FOOTSTEP_MOB_SHOE 4
#define FOOTSTEP_MOB_HUMAN 5 //Warning: Only works on /mob/living/carbon/human
#define FOOTSTEP_MOB_SLIME 6
#define FOOTSTEP_OBJ_MACHINE 7
#define FOOTSTEP_OBJ_ROBOT 8
/*
id = list(
list(sounds),
base volume,
extra range addition
)
*/
GLOBAL_LIST_INIT(footstep, list(
FOOTSTEP_WOOD = list(list(
'sound/effects/footstep/wood1.ogg',
'sound/effects/footstep/wood2.ogg',
'sound/effects/footstep/wood3.ogg',
'sound/effects/footstep/wood4.ogg',
'sound/effects/footstep/wood5.ogg'), 100, 0),
FOOTSTEP_FLOOR = list(list(
'sound/effects/footstep/floor1.ogg',
'sound/effects/footstep/floor2.ogg',
'sound/effects/footstep/floor3.ogg',
'sound/effects/footstep/floor4.ogg',
'sound/effects/footstep/floor5.ogg'), 75, -1),
FOOTSTEP_PLATING = list(list(
'sound/effects/footstep/plating1.ogg',
'sound/effects/footstep/plating2.ogg',
'sound/effects/footstep/plating3.ogg',
'sound/effects/footstep/plating4.ogg',
'sound/effects/footstep/plating5.ogg'), 100, 1),
FOOTSTEP_CARPET = list(list(
'sound/effects/footstep/carpet1.ogg',
'sound/effects/footstep/carpet2.ogg',
'sound/effects/footstep/carpet3.ogg',
'sound/effects/footstep/carpet4.ogg',
'sound/effects/footstep/carpet5.ogg'), 75, -1),
FOOTSTEP_SAND = list(list(
'sound/effects/footstep/asteroid1.ogg',
'sound/effects/footstep/asteroid2.ogg',
'sound/effects/footstep/asteroid3.ogg',
'sound/effects/footstep/asteroid4.ogg',
'sound/effects/footstep/asteroid5.ogg'), 75, 0),
FOOTSTEP_GRASS = list(list(
'sound/effects/footstep/grass1.ogg',
'sound/effects/footstep/grass2.ogg',
'sound/effects/footstep/grass3.ogg',
'sound/effects/footstep/grass4.ogg'), 75, 0),
FOOTSTEP_WATER = list(list(
'sound/effects/footstep/water1.ogg',
'sound/effects/footstep/water2.ogg',
'sound/effects/footstep/water3.ogg',
'sound/effects/footstep/water4.ogg'), 100, 1),
FOOTSTEP_LAVA = list(list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0)
))
//bare footsteps lists
GLOBAL_LIST_INIT(barefootstep, list(
FOOTSTEP_WOOD_BAREFOOT = list(list(
'sound/effects/footstep/woodbarefoot1.ogg',
'sound/effects/footstep/woodbarefoot2.ogg',
'sound/effects/footstep/woodbarefoot3.ogg',
'sound/effects/footstep/woodbarefoot4.ogg',
'sound/effects/footstep/woodbarefoot5.ogg'), 80, -1),
FOOTSTEP_HARD_BAREFOOT = list(list(
'sound/effects/footstep/hardbarefoot1.ogg',
'sound/effects/footstep/hardbarefoot2.ogg',
'sound/effects/footstep/hardbarefoot3.ogg',
'sound/effects/footstep/hardbarefoot4.ogg',
'sound/effects/footstep/hardbarefoot5.ogg'), 80, -1),
FOOTSTEP_CARPET_BAREFOOT = list(list(
'sound/effects/footstep/carpetbarefoot1.ogg',
'sound/effects/footstep/carpetbarefoot2.ogg',
'sound/effects/footstep/carpetbarefoot3.ogg',
'sound/effects/footstep/carpetbarefoot4.ogg',
'sound/effects/footstep/carpetbarefoot5.ogg'), 75, -2),
FOOTSTEP_SAND = list(list(
'sound/effects/footstep/asteroid1.ogg',
'sound/effects/footstep/asteroid2.ogg',
'sound/effects/footstep/asteroid3.ogg',
'sound/effects/footstep/asteroid4.ogg',
'sound/effects/footstep/asteroid5.ogg'), 75, 0),
FOOTSTEP_GRASS = list(list(
'sound/effects/footstep/grass1.ogg',
'sound/effects/footstep/grass2.ogg',
'sound/effects/footstep/grass3.ogg',
'sound/effects/footstep/grass4.ogg'), 75, 0),
FOOTSTEP_WATER = list(list(
'sound/effects/footstep/water1.ogg',
'sound/effects/footstep/water2.ogg',
'sound/effects/footstep/water3.ogg',
'sound/effects/footstep/water4.ogg'), 100, 1),
FOOTSTEP_LAVA = list(list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0),
))
//claw footsteps lists
GLOBAL_LIST_INIT(clawfootstep, list(
FOOTSTEP_WOOD_CLAW = list(list(
'sound/effects/footstep/woodclaw1.ogg',
'sound/effects/footstep/woodclaw2.ogg',
'sound/effects/footstep/woodclaw3.ogg',
'sound/effects/footstep/woodclaw2.ogg',
'sound/effects/footstep/woodclaw1.ogg'), 90, 1),
FOOTSTEP_HARD_CLAW = list(list(
'sound/effects/footstep/hardclaw1.ogg',
'sound/effects/footstep/hardclaw2.ogg',
'sound/effects/footstep/hardclaw3.ogg',
'sound/effects/footstep/hardclaw4.ogg',
'sound/effects/footstep/hardclaw1.ogg'), 90, 1),
FOOTSTEP_CARPET_BAREFOOT = list(list(
'sound/effects/footstep/carpetbarefoot1.ogg',
'sound/effects/footstep/carpetbarefoot2.ogg',
'sound/effects/footstep/carpetbarefoot3.ogg',
'sound/effects/footstep/carpetbarefoot4.ogg',
'sound/effects/footstep/carpetbarefoot5.ogg'), 75, -2),
FOOTSTEP_SAND = list(list(
'sound/effects/footstep/asteroid1.ogg',
'sound/effects/footstep/asteroid2.ogg',
'sound/effects/footstep/asteroid3.ogg',
'sound/effects/footstep/asteroid4.ogg',
'sound/effects/footstep/asteroid5.ogg'), 75, 0),
FOOTSTEP_GRASS = list(list(
'sound/effects/footstep/grass1.ogg',
'sound/effects/footstep/grass2.ogg',
'sound/effects/footstep/grass3.ogg',
'sound/effects/footstep/grass4.ogg'), 75, 0),
FOOTSTEP_WATER = list(list(
'sound/effects/footstep/water1.ogg',
'sound/effects/footstep/water2.ogg',
'sound/effects/footstep/water3.ogg',
'sound/effects/footstep/water4.ogg'), 100, 1),
FOOTSTEP_LAVA = list(list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0),
))
//heavy footsteps list
GLOBAL_LIST_INIT(heavyfootstep, list(
FOOTSTEP_GENERIC_HEAVY = list(list(
'sound/effects/footstep/heavy1.ogg',
'sound/effects/footstep/heavy2.ogg'), 100, 2),
FOOTSTEP_WATER = list(list(
'sound/effects/footstep/water1.ogg',
'sound/effects/footstep/water2.ogg',
'sound/effects/footstep/water3.ogg',
'sound/effects/footstep/water4.ogg'), 100, 2),
FOOTSTEP_LAVA = list(list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0),
))
+1 -1
View File
@@ -81,4 +81,4 @@
#define NO_INTORGANS "no_internal_organs"
#define CAN_WINGDINGS "can_wingdings"
#define NO_CLONESCAN "no_clone_scan"
#define IS_PLANT "is_plant" // Convert this to a biotype TODO
#define NO_HAIR "no_hair"
+2 -3
View File
@@ -53,9 +53,8 @@
#define ANTAG_HUD_VAMPIRE 16
#define ANTAG_HUD_ABDUCTOR 17
#define DATA_HUD_ABDUCTOR 18
#define ANTAG_HUD_DEVIL 19
#define ANTAG_HUD_EVENTMISC 20
#define ANTAG_HUD_BLOB 21
#define ANTAG_HUD_EVENTMISC 19
#define ANTAG_HUD_BLOB 20
// Notification action types
#define NOTIFY_JUMP "jump"
-5
View File
@@ -6,11 +6,6 @@
/// Max number of playing notes per instrument.
#define CHANNELS_PER_INSTRUMENT 128
/// Distance multiplier that makes us not be impacted by 3d sound as much. This is a multiplier so lower it is the closer we will pretend to be to people.
#define INSTRUMENT_DISTANCE_FALLOFF_BUFF 0.2
/// How many tiles instruments have no falloff for
#define INSTRUMENT_DISTANCE_NO_FALLOFF 3
/// Maximum length a note should ever go for
#define INSTRUMENT_MAX_TOTAL_SUSTAIN (5 SECONDS)
+1 -1
View File
@@ -363,7 +363,7 @@
#define INVESTIGATE_BOMB "bombs"
// The SQL version required by this version of the code
#define SQL_VERSION 20
#define SQL_VERSION 22
// Vending machine stuff
#define CAT_NORMAL 1
+19
View File
@@ -13,6 +13,19 @@
#define DROPLIMB_BLUNT 1
#define DROPLIMB_BURN 2
//Mob bio-types flags
#define MOB_ORGANIC (1 << 0)
#define MOB_MINERAL (1 << 1)
#define MOB_ROBOTIC (1 << 2)
#define MOB_UNDEAD (1 << 3)
#define MOB_HUMANOID (1 << 4)
#define MOB_BUG (1 << 5)
#define MOB_BEAST (1 << 6) // Not meant for human species, generally
#define MOB_EPIC (1 << 7) //megafauna
#define MOB_REPTILE (1 << 8)
#define MOB_SPIRIT (1 << 9)
#define MOB_PLANT (1 << 10)
#define AGE_MIN 17 //youngest a character can be
#define AGE_MAX 85 //oldest a character can be
@@ -263,3 +276,9 @@
#define HEARING_PROTECTION_MINOR 1
#define HEARING_PROTECTION_MAJOR 2
#define HEARING_PROTECTION_TOTAL 3
// Eye protection
#define FLASH_PROTECTION_SENSITIVE -1
#define FLASH_PROTECTION_NONE 0
#define FLASH_PROTECTION_FLASH 1
#define FLASH_PROTECTION_WELDER 2
+4 -1
View File
@@ -52,8 +52,11 @@
#define PREFTOGGLE_2_RUNECHAT 64
#define PREFTOGGLE_2_DEATHMESSAGE 128
#define PREFTOGGLE_2_EMOTE_BUBBLE 256
// Yes I know this being an "enable to disable" is misleading, but it avoids having to tweak all existing pref entries
#define PREFTOGGLE_2_REVERB_DISABLE 512
#define PREFTOGGLE_2_FORCE_WHITE_RUNECHAT 1024
#define TOGGLES_2_TOTAL 511 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
#define TOGGLES_2_TOTAL 2047 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE)
-2
View File
@@ -26,7 +26,6 @@
#define ROLE_REVENANT "revenant"
#define ROLE_HOG_GOD "hand of god: god" // We're prolly gonna port this one day or another
#define ROLE_HOG_CULTIST "hand of god: cultist"
#define ROLE_DEVIL "devil"
#define ROLE_RAIDER "vox raider"
#define ROLE_TRADER "trader"
#define ROLE_VAMPIRE "vampire"
@@ -54,7 +53,6 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_CHANGELING = /datum/game_mode/changeling, // Changeling
ROLE_BORER, // Cortical borer
ROLE_CULTIST = /datum/game_mode/cult, // Cultist
ROLE_DEVIL = /datum/game_mode/devil/devil_agents, // Devil
ROLE_GSPIDER, // Giant spider
ROLE_GUARDIAN, // Guardian
ROLE_MORPH, // Morph
+10 -1
View File
@@ -1,5 +1,10 @@
/// Locator for the RUSTG DLL or SO depending on system type
#ifndef RUST_G
/// Locator for the RUSTG DLL or SO depending on system type. Override if needed.
#define RUST_G (world.system_type == UNIX ? "./librust_g.so" : "./rust_g.dll")
#endif
// Gets the version of RUSTG
/proc/rustg_get_version() return call(RUST_G, "get_version")()
// Defines for internal job subsystem //
#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET"
@@ -10,6 +15,7 @@
#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data)
// Noise related operations //
#define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y)
// Git related operations //
@@ -43,3 +49,6 @@
#define rustg_sql_connected(handle) call(RUST_G, "sql_connected")(handle)
#define rustg_sql_disconnect_pool(handle) call(RUST_G, "sql_disconnect_pool")(handle)
#define rustg_sql_check_query(job_id) call(RUST_G, "sql_check_query")("[job_id]")
// RUSTG Version //
#define RUST_G_VERSION "0.4.5-P2"
+20 -2
View File
@@ -6,16 +6,34 @@
#define CHANNEL_HEARTBEAT 1020 //sound channel for heartbeats
#define CHANNEL_BUZZ 1019
#define CHANNEL_AMBIENCE 1018
#define CHANNEL_ENGINE 1017 // Engine ambient sounds
#define USER_VOLUME(M, C) M?.client?.prefs.get_channel_volume(C)
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED
#define CHANNEL_HIGHEST_AVAILABLE 1017
#define CHANNEL_HIGHEST_AVAILABLE 1016
#define MAX_INSTRUMENT_CHANNELS (128 * 6)
///Default range of a sound.
#define SOUND_RANGE 17
///default extra range for sounds considered to be quieter
#define SHORT_RANGE_SOUND_EXTRARANGE -9
///The range deducted from sound range for things that are considered silent / sneaky
#define SILENCED_SOUND_EXTRARANGE -11
///Percentage of sound's range where no falloff is applied
#define SOUND_DEFAULT_FALLOFF_DISTANCE 1 //For a normal sound this would be 1 tile of no falloff
///The default exponent of sound falloff
#define SOUND_FALLOFF_EXPONENT 6
#define SOUND_MINIMUM_PRESSURE 10
#define FALLOFF_SOUNDS 0.5
#define EQUIP_SOUND_VOLUME 30
#define PICKUP_SOUND_VOLUME 15
#define DROP_SOUND_VOLUME 20
#define YEET_SOUND_VOLUME 90
//Ambience types
+1
View File
@@ -94,6 +94,7 @@
#define FIRE_PRIORITY_CLEANUP 10
#define FIRE_PRIORITY_TICKETS 10
#define FIRE_PRIORITY_RESEARCH 10
#define FIRE_PRIORITY_AMBIENCE 10
#define FIRE_PRIORITY_GARBAGE 15
#define FIRE_PRIORITY_WET_FLOORS 20
#define FIRE_PRIORITY_AIR 20
+20 -20
View File
@@ -4,26 +4,26 @@
* The spin from being thrown will interrupt most of these animations as will grabs, account for that accordingly.
*/
/proc/animate_fade_grayscale(var/atom/A, var/time = 5)
/proc/animate_fade_grayscale(atom/A, time = 5)
if(!istype(A) && !istype(A, /client))
return
A.color = null
animate(A, color = MATRIX_GREYSCALE, time = time, easing = SINE_EASING)
/proc/animate_melt_pixel(var/atom/A)
/proc/animate_melt_pixel(atom/A)
if(!istype(A))
return
animate(A, pixel_y = 0, time = 50 - A.pixel_y, alpha = 175, easing = BOUNCE_EASING)
animate(alpha = 0, easing = LINEAR_EASING)
/proc/animate_explode_pixel(var/atom/A)
/proc/animate_explode_pixel(atom/A)
if(!istype(A))
return
var/floatdegrees = rand(5, 20)
var/side = pick(-1, 1)
animate(A, pixel_x = rand(-64, 64), pixel_y = rand(-64, 64), transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = 10, alpha = 0, easing = SINE_EASING)
/proc/animate_float(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1)
/proc/animate_float(atom/A, loopnum = -1, floatspeed = 20, random_side = 1)
if(!istype(A))
return
var/floatdegrees = rand(5, 20)
@@ -35,7 +35,7 @@
animate(A, pixel_y = 32, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
animate(pixel_y = 0, transform = matrix(floatdegrees * (side == 1 ? -1:1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
/proc/animate_levitate(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1)
/proc/animate_levitate(atom/A, loopnum = -1, floatspeed = 20, random_side = 1)
if(!istype(A))
return
var/floatdegrees = rand(5, 20)
@@ -47,7 +47,7 @@
animate(A, pixel_y = 8, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
animate(pixel_y = 0, transform = null, time = floatspeed, loop = loopnum, easing = SINE_EASING)
/proc/animate_ghostly_presence(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1)
/proc/animate_ghostly_presence(atom/A, loopnum = -1, floatspeed = 20, random_side = 1)
if(!istype(A))
return
var/floatdegrees = rand(5, 20)
@@ -59,7 +59,7 @@
animate(A, pixel_y = 8, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
animate(pixel_y = 0, transform = matrix(floatdegrees * (side == 1 ? -1:1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING)
/proc/animate_fading_leap_up(var/atom/A)
/proc/animate_fading_leap_up(atom/A)
if(!istype(A))
return
var/matrix/M = matrix()
@@ -71,7 +71,7 @@
sleep(1)
A.alpha = 0
/proc/animate_fading_leap_down(var/atom/A)
/proc/animate_fading_leap_down(atom/A)
if(!istype(A))
return
var/matrix/M = matrix()
@@ -84,7 +84,7 @@
sleep(1)
animate(A, transform = M, pixel_z = 0, alpha = 255, time = 1, loop = 1, easing = LINEAR_EASING)
/proc/animate_shake(var/atom/A, var/amount = 5, var/x_severity = 2, var/y_severity = 2)
/proc/animate_shake(atom/A, amount = 5, x_severity = 2, y_severity = 2)
// Wiggles the sprite around on its tile then returns it to normal
if(!istype(A))
return
@@ -101,7 +101,7 @@
spawn(amount)
animate(A, transform = null, pixel_y = 0, pixel_x = 0,time = 1,loop = 1, easing = LINEAR_EASING)
/proc/animate_teleport(var/atom/A)
/proc/animate_teleport(atom/A)
if(!istype(A))
return
var/matrix/M = matrix(1, 3, MATRIX_SCALE)
@@ -110,7 +110,7 @@
animate(transform = M, time = 5, color = "#1111ff", alpha = 0, easing = CIRCULAR_EASING)
animate(transform = null, time = 5, color = "#ffffff", alpha = 255, pixel_y = 0, easing = ELASTIC_EASING)
/proc/animate_teleport_wiz(var/atom/A)
/proc/animate_teleport_wiz(atom/A)
if(!istype(A))
return
var/matrix/M = matrix(0, 4, MATRIX_SCALE)
@@ -119,14 +119,14 @@
animate(time = 8, transform = M, alpha = 5) //Do nothing, essentially
animate(transform = null, time = 5, color = "#ffffff", alpha = 255, pixel_y = 0, easing = ELASTIC_EASING)
/proc/animate_rainbow_glow_old(var/atom/A)
/proc/animate_rainbow_glow_old(atom/A)
if(!istype(A))
return
animate(A, color = "#FF0000", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
animate(color = "#00FF00", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
animate(color = "#0000FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
/proc/animate_rainbow_glow(var/atom/A)
/proc/animate_rainbow_glow(atom/A)
if(!istype(A))
return
animate(A, color = "#FF0000", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
@@ -136,37 +136,37 @@
animate(color = "#0000FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
animate(color = "#FF00FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING)
/proc/animate_fade_to_color_fill(var/atom/A, var/the_color, var/time)
/proc/animate_fade_to_color_fill(atom/A, the_color, time)
if(!istype(A) || !the_color || !time)
return
animate(A, color = the_color, time = time, easing = LINEAR_EASING)
/proc/animate_flash_color_fill(var/atom/A, var/the_color, var/loops, var/time)
/proc/animate_flash_color_fill(atom/A, the_color, loops, time)
if(!istype(A) || !the_color || !time || !loops)
return
animate(A, color = the_color, time = time, easing = LINEAR_EASING)
animate(color = "#FFFFFF", time = 5, loop = loops, easing = LINEAR_EASING)
/proc/animate_flash_color_fill_inherit(var/atom/A, var/the_color, var/loops, var/time)
/proc/animate_flash_color_fill_inherit(atom/A, the_color, loops, time)
if(!istype(A) || !the_color || !time || !loops)
return
var/color_old = A.color
animate(A, color = the_color, time = time, loop = loops, easing = LINEAR_EASING)
animate(A, color = color_old, time = time, loop = loops, easing = LINEAR_EASING)
/proc/animate_clownspell(var/atom/A)
/proc/animate_clownspell(atom/A)
if(!istype(A))
return
animate(A, transform = matrix(1.3, MATRIX_SCALE), time = 5, color = "#00ff00", easing = BACK_EASING)
animate(transform = null, time = 5, color = "#ffffff", easing = ELASTIC_EASING)
/proc/animate_wiggle_then_reset(var/atom/A, var/loops = 5, var/speed = 5, var/x_var = 3, var/y_var = 3)
/proc/animate_wiggle_then_reset(atom/A, loops = 5, speed = 5, x_var = 3, y_var = 3)
if(!istype(A) || !loops || !speed)
return
animate(A, pixel_x = rand(-x_var, x_var), pixel_y = rand(-y_var, y_var), time = speed * 2,loop = loops, easing = rand(2,7))
animate(pixel_x = 0, pixel_y = 0, time = speed, easing = rand(2,7))
/proc/animate_spin(var/atom/A, var/dir = "L", var/T = 1, var/looping = -1)
/proc/animate_spin(atom/A, dir = "L", T = 1, looping = -1)
if(!istype(A))
return
@@ -180,7 +180,7 @@
animate(transform = matrix(M, turn, MATRIX_ROTATE | MATRIX_MODIFY), time = T, loop = looping)
animate(transform = matrix(M, turn, MATRIX_ROTATE | MATRIX_MODIFY), time = T, loop = looping)
/proc/animate_shockwave(var/atom/A)
/proc/animate_shockwave(atom/A)
if(!istype(A))
return
var/punchstr = rand(10, 20)
+3 -3
View File
@@ -149,7 +149,7 @@ GLOBAL_PROTECT(log_end)
// A logging proc that only outputs after setup is done, to
// help devs test initialization stuff that happens a lot
/proc/log_after_setup(var/message)
/proc/log_after_setup(message)
if(SSticker && SSticker.current_state > GAME_STATE_SETTING_UP)
to_chat(world, "<span class='danger'>[message]</span>")
log_world(message)
@@ -160,7 +160,7 @@ GLOBAL_PROTECT(log_end)
// Helper procs for building detailed log lines
/proc/datum_info_line(var/datum/d)
/proc/datum_info_line(datum/d)
if(!istype(d))
return
if(!istype(d, /mob))
@@ -168,7 +168,7 @@ GLOBAL_PROTECT(log_end)
var/mob/m = d
return "[m] ([m.ckey]) ([m.type])"
/proc/atom_loc_line(var/atom/a)
/proc/atom_loc_line(atom/a)
if(!istype(a))
return
var/turf/t = get_turf(a)
+9 -19
View File
@@ -51,7 +51,7 @@
// Like view but bypasses luminosity check
/proc/hear(var/range, var/atom/source)
/proc/hear(range, atom/source)
var/lum = source.luminosity
source.luminosity = 6
@@ -145,7 +145,7 @@
// It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects,
// being unable to hear people due to being in a box within a bag.
/proc/recursive_mob_check(var/atom/O, var/list/L = list(), var/recursion_limit = 3, var/client_check = 1, var/sight_check = 1, var/include_radio = 1)
/proc/recursive_mob_check(atom/O, list/L = list(), recursion_limit = 3, client_check = 1, sight_check = 1, include_radio = 1)
//GLOB.debug_mob += O.contents.len
if(!recursion_limit)
@@ -174,7 +174,7 @@
// The old system would loop through lists for a total of 5000 per function call, in an empty server.
// This new system will loop at around 1000 in an empty server.
/proc/get_mobs_in_view(var/R, var/atom/source, var/include_clientless = FALSE)
/proc/get_mobs_in_view(R, atom/source, include_clientless = FALSE)
// Returns a list of mobs in range of R from source. Used in radio and say code.
var/turf/T = get_turf(source)
@@ -200,7 +200,7 @@
return hear
/proc/get_mobs_in_radio_ranges(var/list/obj/item/radio/radios)
/proc/get_mobs_in_radio_ranges(list/obj/item/radio/radios)
. = list()
// Returns a list of mobs who can hear any of the radios given in @radios
var/list/speaker_coverage = list()
@@ -263,7 +263,7 @@
return 0
return 1
/proc/isInSight(var/atom/A, var/atom/B)
/proc/isInSight(atom/A, atom/B)
var/turf/Aturf = get_turf(A)
var/turf/Bturf = get_turf(B)
@@ -293,7 +293,7 @@
if(AM.Move(get_step(T, direction)))
break
/proc/get_mob_by_key(var/key)
/proc/get_mob_by_key(key)
for(var/mob/M in GLOB.mob_list)
if(M.ckey == lowertext(key))
return M
@@ -339,16 +339,6 @@
O.screen_loc = screen_loc
return O
/proc/Show2Group4Delay(obj/O, list/group, delay=0)
if(!isobj(O)) return
if(!group) group = GLOB.clients
for(var/client/C in group)
C.screen += O
if(delay)
spawn(delay)
for(var/client/C in group)
C.screen -= O
/proc/remove_images_from_clients(image/I, list/show_to)
for(var/client/C in show_to)
C.images -= I
@@ -402,7 +392,7 @@
src.dest_x = dest_x
src.dest_y = dest_y
/proc/projectile_trajectory(var/src_x, var/src_y, var/rotation, var/angle, var/power)
/proc/projectile_trajectory(src_x, src_y, rotation, angle, power)
// returns the destination (Vx,y) that a projectile shot at [src_x], [src_y], with an angle of [angle],
// rotated at [rotation] and with the power of [power]
@@ -420,7 +410,7 @@
return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y)
/proc/mobs_in_area(var/area/the_area, var/client_needed=0, var/moblist=GLOB.mob_list)
/proc/mobs_in_area(area/the_area, client_needed=0, moblist=GLOB.mob_list)
var/list/mobs_found[0]
var/area/our_area = get_area(the_area)
for(var/mob/M in moblist)
@@ -431,7 +421,7 @@
mobs_found += M
return mobs_found
/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon)
/proc/alone_in_area(area/the_area, mob/must_be_alone, check_type = /mob/living/carbon)
var/area/our_area = get_area(the_area)
for(var/C in GLOB.alive_mob_list)
if(!istype(C, check_type))
+3 -3
View File
@@ -84,13 +84,13 @@
continue
if(!use_name)
error("Loadout - Missing display name: [G]")
stack_trace("Loadout - Missing display name: [G]")
continue
if(!initial(G.cost))
error("Loadout - Missing cost: [G]")
stack_trace("Loadout - Missing cost: [G]")
continue
if(!initial(G.path))
error("Loadout - Missing path definition: [G]")
stack_trace("Loadout - Missing path definition: [G]")
continue
if(!GLOB.loadout_categories[use_category])
+3 -3
View File
@@ -33,7 +33,7 @@
Sink(1)
//Get a node up to its right position in the heap
/datum/heap/proc/Swim(var/index)
/datum/heap/proc/Swim(index)
var/parent = round(index * 0.5)
while(parent > 0 && (call(cmp)(L[index], L[parent]) > 0))
@@ -42,7 +42,7 @@
parent = round(index * 0.5)
//Get a node down to its right position in the heap
/datum/heap/proc/Sink(var/index)
/datum/heap/proc/Sink(index)
var/g_child = GetGreaterChild(index)
while(g_child > 0 && (call(cmp)(L[index], L[g_child]) < 0))
@@ -52,7 +52,7 @@
//Returns the greater (relative to the comparison proc) of a node children
//or 0 if there's no child
/datum/heap/proc/GetGreaterChild(var/index)
/datum/heap/proc/GetGreaterChild(index)
if(index * 2 > L.len)
return 0
+1 -1
View File
@@ -289,7 +289,7 @@
//Icon smoothing helpers
/proc/smooth_zlevel(var/zlevel, now = FALSE)
/proc/smooth_zlevel(zlevel, now = FALSE)
var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel))
for(var/V in away_turfs)
var/turf/T = V
+5 -5
View File
@@ -894,7 +894,7 @@ The _flatIcons list is a cache for generated icon files.
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
return composite
/proc/adjust_brightness(var/color, var/value)
/proc/adjust_brightness(color, value)
if(!color) return "#FFFFFF"
if(!value) return color
@@ -904,7 +904,7 @@ The _flatIcons list is a cache for generated icon files.
RGB[3] = clamp(RGB[3]+value,0,255)
return rgb(RGB[1],RGB[2],RGB[3])
/proc/sort_atoms_by_layer(var/list/atoms)
/proc/sort_atoms_by_layer(list/atoms)
// Comb sort icons based on levels
var/list/result = atoms.Copy()
var/gap = result.len
@@ -925,7 +925,7 @@ The _flatIcons list is a cache for generated icon files.
//Interface for using DrawBox() to draw 1 pixel on a coordinate.
//Returns the same icon specifed in the argument, but with the pixel drawn
/proc/DrawPixel(var/icon/I,var/colour,var/drawX,var/drawY)
/proc/DrawPixel(icon/I, colour, drawX, drawY)
if(!I)
return 0
var/Iwidth = I.Width()
@@ -938,7 +938,7 @@ The _flatIcons list is a cache for generated icon files.
return I
//Interface for easy drawing of one pixel on an atom.
/atom/proc/DrawPixelOn(var/colour, var/drawX, var/drawY)
/atom/proc/DrawPixelOn(colour, drawX, drawY)
var/icon/I = new(icon)
var/icon/J = DrawPixel(I, colour, drawX, drawY)
if(J) //Only set the icon if it succeeded, the icon without the pixel is 1000x better than a black square.
@@ -961,7 +961,7 @@ The _flatIcons list is a cache for generated icon files.
//Imagine removing pixels from the main icon that are covered by pixels from the mask icon.
//Standard behaviour is to cut pixels from the main icon that are covered by pixels from the mask icon unless passed mask_ready, see below.
/proc/get_icon_difference(var/icon/main, var/icon/mask, var/mask_ready)
/proc/get_icon_difference(icon/main, icon/mask, mask_ready)
/*You should skip prep if the mask is already sprited properly. This significantly improves performance by eliminating most of the realtime icon work.
e.g. A 'ready' mask is a mask where the part you want cut out is missing (no pixels, 0 alpha) from the sprite, and everything else is solid white.*/
+27 -27
View File
@@ -39,7 +39,7 @@
//Returns a list in plain english as a string
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
var/total = input.len
if(!total)
return "[nothing_text]"
@@ -60,7 +60,7 @@
return "[output][and_text][input[index]]"
//Returns list element or null. Should prevent "index out of bounds" error.
/proc/listgetindex(var/list/list,index)
/proc/listgetindex(list/list, index)
if(istype(list) && list.len)
if(isnum(index))
if(InRange(index,1,list.len))
@@ -158,7 +158,7 @@
* If skiprep = 1, repeated elements are treated as one.
* If either of arguments is not a list, returns null
*/
/proc/difflist(var/list/first, var/list/second, var/skiprep=0)
/proc/difflist(list/first, list/second, skiprep=0)
if(!islist(first) || !islist(second))
return
var/list/result = new
@@ -176,7 +176,7 @@
* If skipref = 1, repeated elements are treated as one.
* If either of arguments is not a list, returns null
*/
/proc/uniquemergelist(var/list/first, var/list/second, var/skiprep=0)
/proc/uniquemergelist(list/first, list/second, skiprep=0)
if(!islist(first) || !islist(second))
return
var/list/result = new
@@ -236,7 +236,7 @@
return output
//Randomize: Return the list in a random order
/proc/shuffle(var/list/L)
/proc/shuffle(list/L)
if(!L)
return
L = L.Copy()
@@ -247,20 +247,20 @@
return L
//Return a list with no duplicate entries
/proc/uniquelist(var/list/L)
/proc/uniquelist(list/L)
. = list()
for(var/i in L)
. |= i
//Mergesort: divides up the list into halves to begin the sort
/proc/sortKey(var/list/client/L, var/order = 1)
/proc/sortKey(list/client/L, order = 1)
if(isnull(L) || L.len < 2)
return L
var/middle = L.len / 2 + 1
return mergeKey(sortKey(L.Copy(0,middle)), sortKey(L.Copy(middle)), order)
//Mergsort: does the actual sorting and returns the results back to sortAtom
/proc/mergeKey(var/list/client/L, var/list/client/R, var/order = 1)
/proc/mergeKey(list/client/L, list/client/R, order = 1)
var/Li=1
var/Ri=1
var/list/result = new()
@@ -277,7 +277,7 @@
return (result + R.Copy(Ri, 0))
//Mergesort: divides up the list into halves to begin the sort
/proc/sortAtom(var/list/atom/L, var/order = 1)
/proc/sortAtom(list/atom/L, order = 1)
listclearnulls(L)
if(isnull(L) || L.len < 2)
return L
@@ -285,7 +285,7 @@
return mergeAtoms(sortAtom(L.Copy(0,middle)), sortAtom(L.Copy(middle)), order)
//Mergsort: does the actual sorting and returns the results back to sortAtom
/proc/mergeAtoms(var/list/atom/L, var/list/atom/R, var/order = 1)
/proc/mergeAtoms(list/atom/L, list/atom/R, order = 1)
if(!L || !R) return 0
var/Li=1
var/Ri=1
@@ -306,7 +306,7 @@
//Mergesort: Specifically for record datums in a list.
/proc/sortRecord(var/list/datum/data/record/L, var/field = "name", var/order = 1)
/proc/sortRecord(list/datum/data/record/L, field = "name", order = 1)
if(isnull(L))
return list()
if(L.len < 2)
@@ -315,7 +315,7 @@
return mergeRecordLists(sortRecord(L.Copy(0, middle), field, order), sortRecord(L.Copy(middle), field, order), field, order)
//Mergsort: does the actual sorting and returns the results back to sortRecord
/proc/mergeRecordLists(var/list/datum/data/record/L, var/list/datum/data/record/R, var/field = "name", var/order = 1)
/proc/mergeRecordLists(list/datum/data/record/L, list/datum/data/record/R, field = "name", order = 1)
var/Li=1
var/Ri=1
var/list/result = new()
@@ -342,20 +342,20 @@
//Mergesort: any value in a list
/proc/sortList(var/list/L)
/proc/sortList(list/L)
if(L.len < 2)
return L
var/middle = L.len / 2 + 1 // Copy is first,second-1
return mergeLists(sortList(L.Copy(0,middle)), sortList(L.Copy(middle))) //second parameter null = to end of list
//Mergsorge: uses sortAssoc() but uses the var's name specifically. This should probably be using mergeAtom() instead
/proc/sortNames(var/list/L)
/proc/sortNames(list/L)
var/list/Q = new()
for(var/atom/x in L)
Q[x.name] = x
return sortAssoc(Q)
/proc/mergeLists(var/list/L, var/list/R)
/proc/mergeLists(list/L, list/R)
var/Li=1
var/Ri=1
var/list/result = new()
@@ -371,13 +371,13 @@
// List of lists, sorts by element[key] - for things like crew monitoring computer sorting records by name.
/proc/sortByKey(var/list/L, var/key)
/proc/sortByKey(list/L, key)
if(L.len < 2)
return L
var/middle = L.len / 2 + 1
return mergeKeyedLists(sortByKey(L.Copy(0, middle), key), sortByKey(L.Copy(middle), key), key)
/proc/mergeKeyedLists(var/list/L, var/list/R, var/key)
/proc/mergeKeyedLists(list/L, list/R, key)
var/Li=1
var/Ri=1
var/list/result = new()
@@ -396,13 +396,13 @@
//Mergesort: any value in a list, preserves key=value structure
/proc/sortAssoc(var/list/L)
/proc/sortAssoc(list/L)
if(L.len < 2)
return L
var/middle = L.len / 2 + 1 // Copy is first,second-1
return mergeAssoc(sortAssoc(L.Copy(0,middle)), sortAssoc(L.Copy(middle))) //second parameter null = to end of list
/proc/mergeAssoc(var/list/L, var/list/R)
/proc/mergeAssoc(list/L, list/R)
var/Li=1
var/Ri=1
var/list/result = new()
@@ -434,7 +434,7 @@
return r
// Returns the key based on the index
/proc/get_key_by_index(var/list/L, var/index)
/proc/get_key_by_index(list/L, index)
var/i = 1
for(var/key in L)
if(index == i)
@@ -442,7 +442,7 @@
i++
return null
/proc/count_by_type(var/list/L, type)
/proc/count_by_type(list/L, type)
var/i = 0
for(var/T in L)
if(istype(T, type))
@@ -450,7 +450,7 @@
return i
//Don't use this on lists larger than half a dozen or so
/proc/insertion_sort_numeric_list_ascending(var/list/L)
/proc/insertion_sort_numeric_list_ascending(list/L)
//log_world("ascending len input: [L.len]")
var/list/out = list(pop(L))
for(var/entry in L)
@@ -467,7 +467,7 @@
//log_world(" output: [out.len]")
return out
/proc/insertion_sort_numeric_list_descending(var/list/L)
/proc/insertion_sort_numeric_list_descending(list/L)
//log_world("descending len input: [L.len]")
var/list/out = insertion_sort_numeric_list_ascending(L)
//log_world(" output: [out.len]")
@@ -483,13 +483,13 @@
if(islist(.[i]))
.[i] = .(.[i])
/proc/dd_sortedObjectList(var/list/L, var/cache=list())
/proc/dd_sortedObjectList(list/L, list/cache = list())
if(L.len < 2)
return L
var/middle = L.len / 2 + 1 // Copy is first,second-1
return dd_mergeObjectList(dd_sortedObjectList(L.Copy(0,middle), cache), dd_sortedObjectList(L.Copy(middle), cache), cache) //second parameter null = to end of list
/proc/dd_mergeObjectList(var/list/L, var/list/R, var/list/cache)
/proc/dd_mergeObjectList(list/L, list/R, list/cache)
var/Li=1
var/Ri=1
var/list/result = new()
@@ -514,7 +514,7 @@
return (result + R.Copy(Ri, 0))
// Insert an object into a sorted list, preserving sortedness
/proc/dd_insertObjectList(var/list/L, var/O)
/proc/dd_insertObjectList(list/L, O)
var/min = 1
var/max = L.len
var/Oval = O:dd_SortValue()
@@ -658,7 +658,7 @@ proc/dd_sortedObjectList(list/incoming)
var/case_sensitive = 1
return dd_sortedtextlist(incoming, case_sensitive)
/proc/subtypesof(var/path) //Returns a list containing all subtypes of the given path, but not the given path itself.
/proc/subtypesof(path) //Returns a list containing all subtypes of the given path, but not the given path itself.
if(!path || !ispath(path))
CRASH("Invalid path, failed to fetch subtypes of \"[path]\".")
return (typesof(path) - path)
+5 -5
View File
@@ -1,4 +1,4 @@
/proc/GetOppositeDir(var/dir)
/proc/GetOppositeDir(dir)
switch(dir)
if(NORTH) return SOUTH
if(SOUTH) return NORTH
@@ -46,7 +46,7 @@
return pick(valid_picks)
/proc/random_hair_style(var/gender, species = "Human", var/datum/robolimb/robohead)
/proc/random_hair_style(gender, species = "Human", datum/robolimb/robohead)
var/h_style = "Bald"
var/list/valid_hairstyles = list()
for(var/hairstyle in GLOB.hair_styles_public_list)
@@ -75,7 +75,7 @@
return h_style
/proc/random_facial_hair_style(var/gender, species = "Human", var/datum/robolimb/robohead)
/proc/random_facial_hair_style(gender, species = "Human", datum/robolimb/robohead)
var/f_style = "Shaved"
var/list/valid_facial_hairstyles = list()
for(var/facialhairstyle in GLOB.facial_hair_styles_list)
@@ -119,7 +119,7 @@
return ha_style
/proc/random_marking_style(var/location = "body", species = "Human", var/datum/robolimb/robohead, var/body_accessory, var/alt_head)
/proc/random_marking_style(location = "body", species = "Human", datum/robolimb/robohead, body_accessory, alt_head)
var/m_style = "None"
var/list/valid_markings = list()
for(var/marking in GLOB.marking_styles_list)
@@ -570,7 +570,7 @@ GLOBAL_LIST_INIT(do_after_once_tracker, list())
log_admin("[key_name(usr)] attempted to use a mouse macro: [verbused] [params]")
message_admins("[key_name_admin(usr)] attempted to use a mouse macro: [verbused] [html_encode(params)]")
if(client.next_mouse_macro_warning < world.time) // Warn occasionally
usr << 'sound/misc/sadtrombone.ogg'
SEND_SOUND(usr, sound('sound/misc/sadtrombone.ogg'))
client.next_mouse_macro_warning = world.time + 600
/mob/verb/ClickSubstitute(params as command_text)
set hidden = 1
+18 -18
View File
@@ -22,7 +22,7 @@
return html_encode(txt)
//Simply removes < and > and limits the length of the message
/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
/proc/strip_html_simple(t, limit=MAX_MESSAGE_LEN)
var/list/strip_chars = list("<",">")
t = copytext(t,1,limit)
for(var/char in strip_chars)
@@ -33,13 +33,13 @@
return t
//Removes a few problematic characters
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
/proc/sanitize_simple(t, list/repl_chars = list("\n"="#","\t"="#"))
for(var/char in repl_chars)
t = replacetext(t, char, repl_chars[char])
return t
//Runs byond's sanitization proc along-side sanitize_simple
/proc/sanitize(var/t,var/list/repl_chars = null)
/proc/sanitize(t, list/repl_chars = null)
return html_encode(sanitize_simple(t,repl_chars))
// Gut ANYTHING that isnt alphanumeric, or brackets
@@ -54,7 +54,7 @@
//Runs sanitize and strip_html_simple
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '&lt;' after sanitize() calls byond's html_encode()
/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN)
/proc/strip_html(t, limit=MAX_MESSAGE_LEN)
return copytext((sanitize(strip_html_simple(t))),1,limit)
// Used to get a properly sanitized multiline input, of max_length
@@ -67,12 +67,12 @@
//Runs byond's sanitization proc along-side strip_html_simple
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '&lt;' that html_encode() would cause
/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN)
/proc/adminscrub(t, limit=MAX_MESSAGE_LEN)
return copytext((html_encode(strip_html_simple(t))),1,limit)
//Returns null if there is any bad text in the string
/proc/reject_bad_text(var/text, var/max_length=512)
/proc/reject_bad_text(text, max_length=512)
if(length(text) > max_length) return //message too long
var/non_whitespace = 0
for(var/i=1, i<=length(text), i++)
@@ -106,7 +106,7 @@
return msg
//Filters out undesirable characters from names
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
/proc/reject_bad_name(t_in, allow_numbers=0, max_length=MAX_NAME_LEN)
// Decode so that names with characters like < are still rejected
t_in = html_decode(t_in)
if(!t_in || length(t_in) > max_length)
@@ -174,7 +174,7 @@
//checks text for html tags
//if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm)
//relpaces < with &lt;
/proc/checkhtml(var/t)
/proc/checkhtml(t)
t = sanitize_simple(t, list("&#"="."))
var/p = findtext(t,"<",1)
while(p) //going through all the tags
@@ -226,7 +226,7 @@
* Text modification
*/
// See bygex.dm
/proc/replace_characters(var/t,var/list/repl_chars)
/proc/replace_characters(t, list/repl_chars)
for(var/char in repl_chars)
t = replacetext(t, char, repl_chars[char])
return t
@@ -277,7 +277,7 @@
return trim_left(trim_right(text))
//Returns a string with the first element of the string capitalized.
/proc/capitalize(var/t as text)
/proc/capitalize(t as text)
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
//Centers text by adding spaces to either side of the string.
@@ -305,7 +305,7 @@
return copytext(message, 1, length + 1)
/proc/stringmerge(var/text,var/compare,replace = "*")
/proc/stringmerge(text, compare,replace = "*")
//This proc fills in all spaces with the "replace" var (* by default) with whatever
//is in the other string at the same spot (assuming it is not a replace char).
//This is used for fingerprints
@@ -326,7 +326,7 @@
return 0
return newtext
/proc/stringpercent(var/text,character = "*")
/proc/stringpercent(text, character = "*")
//This proc returns the number of chars of the string that is the character
//This is used for detective work to determine fingerprint completion.
if(!text || !character)
@@ -338,7 +338,7 @@
count++
return count
/proc/reverse_text(var/text = "")
/proc/reverse_text(text = "")
var/new_text = ""
for(var/i = length(text); i > 0; i--)
new_text += copytext(text, i, i+1)
@@ -347,7 +347,7 @@
//This proc strips html properly, but it's not lazy like the other procs.
//This means that it doesn't just remove < and > and call it a day.
//Also limit the size of the input, if specified.
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN, allow_lines = 0)
/proc/strip_html_properly(input, max_length = MAX_MESSAGE_LEN, allow_lines = 0)
if(!input)
return
var/opentag = 1 //These store the position of < and > respectively.
@@ -371,12 +371,12 @@
input = copytext(input,1,max_length)
return sanitize(input, allow_lines ? list("\t" = " ") : list("\n" = " ", "\t" = " "))
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN, allow_lines = 0)
/proc/trim_strip_html_properly(input, max_length = MAX_MESSAGE_LEN, allow_lines = 0)
return trim(strip_html_properly(input, max_length, allow_lines))
//Used in preferences' SetFlavorText and human's set_flavor verb
//Previews a string of len or less length
/proc/TextPreview(var/string,var/len=40)
/proc/TextPreview(string, len=40)
if(length(string) <= len)
if(!length(string))
return "\[...\]"
@@ -386,14 +386,14 @@
return "[copytext_preserve_html(string, 1, 37)]..."
//alternative copytext() for encoded text, doesn't break html entities (&#34; and other)
/proc/copytext_preserve_html(var/text, var/first, var/last)
/proc/copytext_preserve_html(text, first, last)
return html_encode(copytext(html_decode(text), first, last))
//Run sanitize(), but remove <, >, " first to prevent displaying them as &gt; &lt; &34; in some places, after html_encode().
//Best used for sanitize object names, window titles.
//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites -
//this is a problem of double-encode(when & becomes &amp;), use sanitize() with encode=0, but not the sanitizeSafe()!
/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
/proc/sanitizeSafe(input, max_length = MAX_MESSAGE_LEN, encode = 1, trim = 1, extra = 1)
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra)
+3 -3
View File
@@ -62,7 +62,7 @@
return time2text(station_time(time, TRUE), format)
/* Returns 1 if it is the selected month and day */
/proc/isDay(var/month, var/day)
/proc/isDay(month, day)
if(isnum(month) && isnum(day))
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
@@ -94,13 +94,13 @@
return GLOB.month_names.Find(number)
//Take a value in seconds and returns a string of minutes and seconds in the format X minute(s) and X seconds.
/proc/seconds_to_time(var/seconds as num)
/proc/seconds_to_time(seconds as num)
var/numSeconds = seconds % 60
var/numMinutes = (seconds - numSeconds) / 60
return "[numMinutes] [numMinutes > 1 ? "minutes" : "minute"] and [numSeconds] seconds"
//Take a value in seconds and makes it display like a clock
/proc/seconds_to_clock(var/seconds as num)
/proc/seconds_to_clock(seconds as num)
return "[add_zero(num2text((seconds / 60) % 60), 2)]:[add_zero(num2text(seconds % 60), 2)]"
//Takes a value of time in deciseconds.
+4
View File
@@ -138,6 +138,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_BLOODCRAWL "bloodcrawl"
#define TRAIT_BLOODCRAWL_EAT "bloodcrawl_eat"
#define TRAIT_DWARF "dwarf"
#define TRAIT_SILENT_FOOTSTEPS "silent_footsteps" //makes your footsteps completely silent
#define TRAIT_COMIC_SANS "comic_sans"
#define TRAIT_NOFINGERPRINTS "no_fingerprints"
@@ -151,6 +152,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NOEXAMINE "no_examine"
#define TRAIT_NOPAIN "no_pain"
/// Blowing kisses actually does damage to the victim
#define TRAIT_KISS_OF_DEATH "kiss_of_death"
//
// common trait sources
#define TRAIT_GENERIC "generic"
+6 -6
View File
@@ -146,7 +146,7 @@
return
//Converts an angle (degrees) into an ss13 direction
/proc/angle2dir(var/degree)
/proc/angle2dir(degree)
degree = ((degree+22.5)%365)
if(degree < 45) return NORTH
if(degree < 90) return NORTHEAST
@@ -170,7 +170,7 @@
//returns the north-zero clockwise angle in degrees, given a direction
/proc/dir2angle(var/D)
/proc/dir2angle(D)
switch(D)
if(NORTH) return 0
if(SOUTH) return 180
@@ -183,7 +183,7 @@
else return null
//Returns the angle in english
/proc/angle2text(var/degree)
/proc/angle2text(degree)
return dir2text(angle2dir(degree))
//Converts a blend_mode constant to one acceptable to icon.Blend()
@@ -281,7 +281,7 @@
if(3*hue < 2) return (a+(b-a)*((2/3)-hue)*6)
return a
/proc/num2septext(var/theNum, var/sigFig = 7,var/sep=",") // default sigFig (1,000,000)
/proc/num2septext(theNum, sigFig = 7, sep=",") // default sigFig (1,000,000)
var/finalNum = num2text(theNum, sigFig)
// Start from the end, or from the decimal point
@@ -323,7 +323,7 @@
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
//Argument: Give this a space-separated string consisting of 6 numbers. Returns null if you don't
/proc/text2matrix(var/matrixtext)
/proc/text2matrix(matrixtext)
var/list/matrixtext_list = splittext(matrixtext, " ")
var/list/matrix_list = list()
for(var/item in matrixtext_list)
@@ -351,7 +351,7 @@
//The string is well, obviously the string being checked
//The datum is used as a source for var names, to check validity
//Otherwise every single word could technically be a variable!
/proc/string2listofvars(var/t_string, var/datum/var_source)
/proc/string2listofvars(t_string, datum/var_source)
if(!t_string || !var_source)
return list()
+87 -35
View File
@@ -5,7 +5,7 @@
/* Get the direction of startObj relative to endObj.
* Return values: To the right, 1. Below, 2. To the left, 3. Above, 4. Not found adjacent in cardinal directions, 0.
*/
/proc/getRelativeDirection(var/atom/movable/startObj, var/atom/movable/endObj)
/proc/getRelativeDirection(atom/movable/startObj, atom/movable/endObj)
if(endObj.x == startObj.x + 1 && endObj.y == startObj.y)
return EAST
@@ -21,11 +21,11 @@
return 0
//Returns the middle-most value
/proc/dd_range(var/low, var/high, var/num)
/proc/dd_range(low, high, num)
return max(low,min(high,num))
//Returns whether or not A is the middle most value
/proc/InRange(var/A, var/lower, var/upper)
/proc/InRange(A, lower, upper)
if(A < lower) return 0
if(A > upper) return 0
return 1
@@ -152,7 +152,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
// Returns true if direction is blocked from loc
// Checks if doors are open
/proc/DirBlocked(turf/loc,var/dir)
/proc/DirBlocked(turf/loc, dir)
for(var/obj/structure/window/D in loc)
if(!D.density)
continue
@@ -240,7 +240,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return 1
//Ensure the frequency is within bounds of what it should be sending/recieving at
/proc/sanitize_frequency(var/f, var/low = PUBLIC_LOW_FREQ, var/high = PUBLIC_HIGH_FREQ)
/proc/sanitize_frequency(f, low = PUBLIC_LOW_FREQ, high = PUBLIC_HIGH_FREQ)
f = round(f)
f = max(low, f)
f = min(high, f)
@@ -249,10 +249,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
return f
//Turns 1479 into 147.9
/proc/format_frequency(var/f)
/proc/format_frequency(f)
return "[round(f / 10)].[f % 10]"
/obj/proc/atmosanalyzer_scan(var/datum/gas_mixture/air_contents, mob/user, var/obj/target = src)
/obj/proc/atmosanalyzer_scan(datum/gas_mixture/air_contents, mob/user, obj/target = src)
var/obj/icon = target
user.visible_message("[user] has used the analyzer on [target].", "<span class='notice'>You use the analyzer on [target].</span>")
var/pressure = air_contents.return_pressure()
@@ -320,7 +320,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return selected
/proc/select_active_ai(var/mob/user)
/proc/select_active_ai(mob/user)
var/list/ais = active_ais()
if(ais.len)
if(user) . = input(usr,"AI signals detected:", "AI selection") in ais
@@ -438,7 +438,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return DisplayJoules(units * SSmachines.wait * 0.1 / GLOB.CELLRATE)
//Forces a variable to be posative
/proc/modulus(var/M)
/proc/modulus(M)
if(M >= 0)
return M
if(M < 0)
@@ -465,7 +465,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
// 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)
/proc/get_atom_on_turf(atom/movable/M)
var/atom/loc = M
while(loc && loc.loc && !istype(loc.loc, /turf/))
loc = loc.loc
@@ -475,7 +475,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
Returns 1 if the chain up to the area contains the given typepath
0 otherwise
*/
/atom/proc/is_found_within(var/typepath)
/atom/proc/is_found_within(typepath)
var/atom/A = src
while(A.loc)
if(istype(A.loc, typepath))
@@ -491,7 +491,7 @@ Returns 1 if the chain up to the area contains the given typepath
// returns the turf located at the map edge in the specified direction relative to A
// used for mass driver
/proc/get_edge_target_turf(var/atom/A, var/direction)
/proc/get_edge_target_turf(atom/A, direction)
var/turf/target = locate(A.x, A.y, A.z)
if(!A || !target)
@@ -515,7 +515,7 @@ Returns 1 if the chain up to the area contains the given typepath
// result is bounded to map size
// note range is non-pythagorean
// used for disposal system
/proc/get_ranged_target_turf(var/atom/A, var/direction, var/range)
/proc/get_ranged_target_turf(atom/A, direction, range)
var/x = A.x
var/y = A.y
@@ -533,17 +533,17 @@ Returns 1 if the chain up to the area contains the given typepath
// returns turf relative to A offset in dx and dy tiles
// bound to map limits
/proc/get_offset_target_turf(var/atom/A, var/dx, var/dy)
/proc/get_offset_target_turf(atom/A, dx, dy)
var/x = min(world.maxx, max(1, A.x + dx))
var/y = min(world.maxy, max(1, A.y + dy))
return locate(x,y,A.z)
//Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value.
/proc/between(var/low, var/middle, var/high)
/proc/between(low, middle, high)
return max(min(middle, high), low)
//returns random gauss number
/proc/GaussRand(var/sigma)
/proc/GaussRand(sigma)
var/x,y,rsq
do
x=2*rand()-1
@@ -553,7 +553,7 @@ Returns 1 if the chain up to the area contains the given typepath
return sigma*y*sqrt(-2*log(rsq)/rsq)
//returns random gauss number, rounded to 'roundto'
/proc/GaussRandRound(var/sigma,var/roundto)
/proc/GaussRandRound(sigma, roundto)
return round(GaussRand(sigma),roundto)
//Will return the contents of an atom recursivly to a depth of 'searchDepth'
@@ -576,7 +576,7 @@ Returns 1 if the chain up to the area contains the given typepath
return weight
//Step-towards method of determining whether one atom can see another. Similar to viewers()
/proc/can_see(var/atom/source, var/atom/target, var/length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
/proc/can_see(atom/source, atom/target, length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
var/turf/current = get_turf(source)
var/turf/target_turf = get_turf(target)
var/steps = 1
@@ -606,7 +606,7 @@ Returns 1 if the chain up to the area contains the given typepath
return 1
return 0
/proc/get_step_towards2(var/atom/ref , var/atom/trg)
/proc/get_step_towards2(atom/ref , atom/trg)
var/base_dir = get_dir(ref, get_step_towards(ref,trg))
var/turf/temp = get_step_towards(ref,trg)
@@ -636,7 +636,7 @@ Returns 1 if the chain up to the area contains the given typepath
//Takes: Anything that could possibly have variables and a varname to check.
//Returns: 1 if found, 0 if not.
/proc/hasvar(var/datum/A, var/varname)
/proc/hasvar(datum/A, varname)
if(A.vars.Find(lowertext(varname))) return 1
else return 0
@@ -653,7 +653,7 @@ Returns 1 if the chain up to the area contains the given typepath
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all areas of that type in the world.
/proc/get_areas(var/areatype)
/proc/get_areas(areatype)
if(!areatype) return null
if(istext(areatype)) areatype = text2path(areatype)
if(isarea(areatype))
@@ -667,7 +667,7 @@ Returns 1 if the chain up to the area contains the given typepath
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all turfs in areas of that type of that type in the world.
/proc/get_area_turfs(var/areatype)
/proc/get_area_turfs(areatype)
if(!areatype) return null
if(istext(areatype)) areatype = text2path(areatype)
if(isarea(areatype))
@@ -682,7 +682,7 @@ Returns 1 if the chain up to the area contains the given typepath
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all atoms (objs, turfs, mobs) in areas of that type of that type in the world.
/proc/get_area_all_atoms(var/areatype)
/proc/get_area_all_atoms(areatype)
if(!areatype) return null
if(istext(areatype)) areatype = text2path(areatype)
if(isarea(areatype))
@@ -701,7 +701,7 @@ Returns 1 if the chain up to the area contains the given typepath
var/y_pos = null
var/z_pos = null
/area/proc/move_contents_to(var/area/A, var/turftoleave=null, var/direction = null)
/area/proc/move_contents_to(area/A, turftoleave=null, direction = null)
//Takes: Area. Optional: turf type to leave behind.
//Returns: Nothing.
//Notes: Attempts to move the contents of one area to another area.
@@ -840,7 +840,7 @@ Returns 1 if the chain up to the area contains the given typepath
/proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0, var/atom/newloc = null)
/proc/DuplicateObject(obj/original, perfectcopy = 0 , sameloc = 0, atom/newloc = null)
if(!original)
return null
@@ -867,7 +867,7 @@ Returns 1 if the chain up to the area contains the given typepath
O.update_icon()
return O
/area/proc/copy_contents_to(var/area/A , var/platingRequired = 0 )
/area/proc/copy_contents_to(area/A , platingRequired = 0 )
//Takes: Area. Optional: If it should copy to areas that don't have plating
//Returns: Nothing.
//Notes: Attempts to move the contents of one area to another area.
@@ -1096,7 +1096,7 @@ Returns 1 if the chain up to the area contains the given typepath
//centered = 0 counts from turf edge to edge
//centered = 1 counts from turf center to turf center
//of course mathematically this is just adding world.icon_size on again
/proc/getPixelDistance(var/atom/A, var/atom/B, var/centered = 1)
/proc/getPixelDistance(atom/A, atom/B, centered = 1)
if(!istype(A)||!istype(B))
return 0
. = bounds_dist(A, B) + sqrt((((A.pixel_x+B.pixel_x)**2) + ((A.pixel_y+B.pixel_y)**2)))
@@ -1186,7 +1186,7 @@ GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(
return 1
return 0
/proc/reverse_direction(var/dir)
/proc/reverse_direction(dir)
switch(dir)
if(NORTH)
return SOUTH
@@ -1261,7 +1261,7 @@ GLOBAL_LIST_INIT(wall_items, typecacheof(list(/obj/machinery/power/apc, /obj/mac
Standard way to write links -Sayu
*/
/proc/topic_link(var/datum/D, var/arglist, var/content)
/proc/topic_link(datum/D, arglist, content)
if(istype(arglist,/list))
arglist = list2params(arglist)
return "<a href='?src=[D.UID()];[arglist]'>[content]</a>"
@@ -1372,7 +1372,7 @@ Standard way to write links -Sayu
chance = max(chance - (initial_chance / steps), 0)
steps--
/proc/get_random_colour(var/simple, var/lower, var/upper)
/proc/get_random_colour(simple, lower, upper)
var/colour
if(simple)
colour = pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))
@@ -1384,7 +1384,7 @@ Standard way to write links -Sayu
colour += temp_col
return colour
/proc/get_distant_turf(var/turf/T,var/direction,var/distance)
/proc/get_distant_turf(turf/T, direction, distance)
if(!T || !direction || !distance) return
var/dest_x = T.x
@@ -1405,7 +1405,7 @@ Standard way to write links -Sayu
GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
//Version of view() which ignores darkness, because BYOND doesn't have it.
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
/proc/dview(range = world.view, center, invis_flags = 0)
if(!center)
return
@@ -1574,7 +1574,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
//The y dimension of the icon file used in the image
// eg: center_image(I, 32,32)
// eg2: center_image(I, 96,96)
/proc/center_image(var/image/I, x_dimension = 0, y_dimension = 0)
/proc/center_image(image/I, x_dimension = 0, y_dimension = 0)
if(!I)
return
@@ -1729,7 +1729,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
chosen = matches[chosen]
return chosen
/proc/make_types_fancy(var/list/types)
/proc/make_types_fancy(list/types)
if(ispath(types))
types = list(types)
. = list()
@@ -1962,7 +1962,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
result += (1 << num)
return result
/proc/pixel_shift_dir(var/dir, var/amount_x = 32, var/amount_y = 32) //Returns a list with pixel_shift values that will shift an object's icon one tile in the direction passed.
/proc/pixel_shift_dir(dir, amount_x = 32, amount_y = 32) //Returns a list with pixel_shift values that will shift an object's icon one tile in the direction passed.
amount_x = min(max(0, amount_x), 32) //No less than 0, no greater than 32.
amount_y = min(max(0, amount_x), 32)
var/list/shift = list("x" = 0, "y" = 0)
@@ -2093,3 +2093,55 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
))
query_accesslog.warn_execute()
qdel(query_accesslog)
/**
* Returns the clean name of an audio channel.
*
* Arguments:
* * channel - The channel number.
*/
/proc/get_channel_name(channel)
switch(channel)
if(CHANNEL_LOBBYMUSIC)
return "Lobby Music"
if(CHANNEL_ADMIN)
return "Admin MIDIs"
if(CHANNEL_VOX)
return "AI Announcements"
if(CHANNEL_JUKEBOX)
return "Dance Machines"
if(CHANNEL_HEARTBEAT)
return "Heartbeat"
if(CHANNEL_BUZZ)
return "White Noise"
if(CHANNEL_AMBIENCE)
return "Ambience"
if(CHANNEL_ENGINE)
return "Engine Ambience"
/proc/slot_bitfield_to_slot(input_slot_flags) // Kill off this garbage ASAP; slot flags and clothing flags should be IDENTICAL. GOSH DARN IT. Doesn't work with ears or pockets, either.
switch(input_slot_flags)
if(SLOT_OCLOTHING)
return slot_wear_suit
if(SLOT_ICLOTHING)
return slot_w_uniform
if(SLOT_GLOVES)
return slot_gloves
if(SLOT_EYES)
return slot_glasses
if(SLOT_MASK)
return slot_wear_mask
if(SLOT_HEAD)
return slot_head
if(SLOT_FEET)
return slot_shoes
if(SLOT_ID)
return slot_wear_id
if(SLOT_BELT)
return slot_belt
if(SLOT_BACK)
return slot_back
if(SLOT_PDA)
return slot_wear_pda
if(SLOT_TIE)
return slot_tie
-8
View File
@@ -1,8 +0,0 @@
//what could possibly go wrong
GLOBAL_LIST_INIT(devil_machines, typecacheof(/obj/item/circuitboard, TRUE) - list(
/obj/item/circuitboard/shuttle,
/obj/item/circuitboard/swfdoor,
/obj/item/circuitboard/olddoor,
/obj/item/circuitboard/computer,
/obj/item/circuitboard/machine
))
+2
View File
@@ -43,7 +43,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BLOODCRAWL" = TRAIT_BLOODCRAWL,
"TRAIT_BLOODCRAWL_EAT" = TRAIT_BLOODCRAWL_EAT,
"TRAIT_DWARF" = TRAIT_DWARF,
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
"TRAIT_ALCOHOL_TOLERANCE" = TRAIT_ALCOHOL_TOLERANCE,
"TRAIT_KISS_OF_DEATH" = TRAIT_KISS_OF_DEATH,
"TRAIT_COMIC_SANS" = TRAIT_COMIC_SANS,
"TRAIT_NOFINGERPRINTS" = TRAIT_NOFINGERPRINTS,
+6 -6
View File
@@ -10,11 +10,11 @@
Note that in all cases the neighbor is handled simply; this is usually the user's mob, in which case it is up to you
to check that the mob is not inside of something
*/
/atom/proc/Adjacent(var/atom/neighbor) // basic inheritance, unused
/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused
return 0
// Not a sane use of the function and (for now) indicative of an error elsewhere
/area/Adjacent(var/atom/neighbor)
/area/Adjacent(atom/neighbor)
CRASH("Call to /area/Adjacent(), unimplemented proc")
@@ -25,7 +25,7 @@
* If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square.
* Passing through in this case ignores anything with the LETPASSTHROW flag, such as tables, racks, and morgue trays.
*/
/turf/Adjacent(var/atom/neighbor, var/atom/target = null)
/turf/Adjacent(atom/neighbor, atom/target = null)
var/turf/T0 = get_turf(neighbor)
if(T0 == src)
return 1
@@ -63,7 +63,7 @@
Note: Multiple-tile objects are created when the bound_width and bound_height are creater than the tile size.
This is not used in stock /tg/station currently.
*/
/atom/movable/Adjacent(var/atom/neighbor)
/atom/movable/Adjacent(atom/neighbor)
if(neighbor == loc) return 1
if(!isturf(loc)) return 0
for(var/turf/T in locs)
@@ -72,7 +72,7 @@
return 0
// This is necessary for storage items not on your person.
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
/obj/item/Adjacent(atom/neighbor, recurse = 1)
if(neighbor == loc) return 1
if(istype(loc,/obj/item))
if(recurse > 0)
@@ -85,7 +85,7 @@
This is defined as any dense ON_BORDER object, or any dense object without LETPASSTHROW.
The border_only flag allows you to not objects (for source and destination squares)
*/
/turf/proc/ClickCross(var/target_dir, var/border_only, var/target_atom = null)
/turf/proc/ClickCross(target_dir, border_only, target_atom = null)
for(var/obj/O in src)
if( !O.density || O == target_atom || (O.pass_flags & LETPASSTHROW))
continue // LETPASSTHROW is used for anything you can click through
+27 -24
View File
@@ -196,7 +196,7 @@
return FALSE
// Default behavior: ignore double clicks, consider them normal clicks instead
/mob/proc/DblClickOn(var/atom/A, var/params)
/mob/proc/DblClickOn(atom/A, params)
return
/*
@@ -209,7 +209,7 @@
proximity_flag is not currently passed to attack_hand, and is instead used
in human click code to allow glove touches only at melee range.
*/
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
/mob/proc/UnarmedAttack(atom/A, proximity_flag)
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
return
@@ -230,14 +230,14 @@
Used when you are handcuffed and click things.
Not currently used by anything but could easily be.
*/
/mob/proc/RestrainedClickOn(var/atom/A)
/mob/proc/RestrainedClickOn(atom/A)
return
/*
Middle click
Only used for swapping hands
*/
/mob/proc/MiddleClickOn(var/atom/A)
/mob/proc/MiddleClickOn(atom/A)
pointed(A)
return
@@ -285,7 +285,7 @@
// In case of use break glass
/*
/atom/proc/MiddleClick(var/mob/M as mob)
/atom/proc/MiddleClick(mob/M as mob)
return
*/
@@ -294,10 +294,10 @@
For most mobs, examine.
This is overridden in ai.dm
*/
/mob/proc/ShiftClickOn(var/atom/A)
/mob/proc/ShiftClickOn(atom/A)
A.ShiftClick(src)
return
/atom/proc/ShiftClick(var/mob/user)
/atom/proc/ShiftClick(mob/user)
if(user.client && get_turf(user.client.eye) == get_turf(user))
user.examinate(src)
return
@@ -306,7 +306,7 @@
Ctrl click
For most objects, pull
*/
/mob/proc/CtrlClickOn(var/atom/A)
/mob/proc/CtrlClickOn(atom/A)
A.CtrlClick(src)
return
@@ -320,7 +320,7 @@
Alt click
Unused except for AI
*/
/mob/proc/AltClickOn(var/atom/A)
/mob/proc/AltClickOn(atom/A)
A.AltClick(src)
return
@@ -331,36 +331,39 @@
else
..()
/atom/proc/AltClick(var/mob/user)
/atom/proc/AltClick(mob/user)
SEND_SIGNAL(src, COMSIG_CLICK_ALT, user)
var/turf/T = get_turf(src)
if(T)
if(user.TurfAdjacent(T))
user.listed_turf = T
user.client.statpanel = T.name
// If we had a method to force a `Stat` update, it would go here
else
user.listed_turf = null
return
if(T && (isturf(loc) || isturf(src)) && user.TurfAdjacent(T))
user.listed_turf = T
user.client.statpanel = T.name
/mob/proc/TurfAdjacent(var/turf/T)
/// Use this instead of [/mob/proc/AltClickOn] where you only want turf content listing without additional atom alt-click interaction
/atom/proc/AltClickNoInteract(mob/user, atom/A)
var/turf/T = get_turf(A)
if(T && user.TurfAdjacent(T))
user.listed_turf = T
user.client.statpanel = T.name
/mob/proc/TurfAdjacent(turf/T)
return T.Adjacent(src)
/*
Control+Shift/Alt+Shift click
Unused except for AI
*/
/mob/proc/CtrlShiftClickOn(var/atom/A)
/mob/proc/CtrlShiftClickOn(atom/A)
A.CtrlShiftClick(src)
return
/atom/proc/CtrlShiftClick(var/mob/user)
/atom/proc/CtrlShiftClick(mob/user)
return
/mob/proc/AltShiftClickOn(var/atom/A)
/mob/proc/AltShiftClickOn(atom/A)
A.AltShiftClick(src)
return
/atom/proc/AltShiftClick(var/mob/user)
/atom/proc/AltShiftClick(mob/user)
return
@@ -392,7 +395,7 @@
LE.fire()
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
/mob/proc/face_atom(atom/A)
if( stat || buckled || !A || !x || !y || !A.x || !A.y ) return
var/dx = A.x - x
var/dy = A.y - y
+2 -2
View File
@@ -12,7 +12,7 @@
/datum/middleClickOverride/
/datum/middleClickOverride/proc/onClick(var/atom/A, var/mob/living/user)
/datum/middleClickOverride/proc/onClick(atom/A, mob/living/user)
user.middleClickOverride = null
return 1
/* Note, when making a new click override it is ABSOLUTELY VITAL that you set the source's clickOverride to null at some point if you don't want them to be stuck with it forever.
@@ -35,7 +35,7 @@
/datum/middleClickOverride/badminClicker
var/summon_path = /obj/item/reagent_containers/food/snacks/cookie
/datum/middleClickOverride/badminClicker/onClick(var/atom/A, var/mob/living/user)
/datum/middleClickOverride/badminClicker/onClick(atom/A, mob/living/user)
var/atom/movable/newObject = new summon_path
newObject.loc = get_turf(A)
to_chat(user, "<span class='notice'>You release the power you had stored up, summoning \a [newObject.name]! </span>")
-1
View File
@@ -22,7 +22,6 @@
//Middle left indicators
#define ui_lingchemdisplay "WEST:6,CENTER-1:15"
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
//Lower center, persistant menu
#define ui_sstore1 "CENTER-5:10,SOUTH:5"
-87
View File
@@ -1,87 +0,0 @@
//Soul counter is stored with the humans, it does weird when you place it here apparently...
/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
..()
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
static_inventory += using
mymob.pullin = new /obj/screen/pull()
mymob.pullin.icon = ui_style
mymob.pullin.update_icon(mymob)
mymob.pullin.screen_loc = ui_pull_resist
static_inventory += mymob.pullin
inv_box = new /obj/screen/inventory/hand()
inv_box.name = "right hand"
inv_box.icon = ui_style
inv_box.icon_state = "hand_r"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
static_inventory += inv_box
inv_box = new /obj/screen/inventory/hand()
inv_box.name = "left hand"
inv_box.icon = ui_style
inv_box.icon_state = "hand_l"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
static_inventory += inv_box
using = new /obj/screen/swap_hand()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand1
static_inventory += using
using = new /obj/screen/swap_hand()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand2
static_inventory += using
zone_select = new /obj/screen/zone_sel()
zone_select.icon = ui_style
zone_select.update_icon(mymob)
lingchemdisplay = new /obj/screen/ling/chems()
devilsouldisplay = new /obj/screen/devil/soul_counter
infodisplay += devilsouldisplay
for(var/obj/screen/inventory/inv in static_inventory)
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
inv.update_icon()
/datum/hud/devil/persistent_inventory_update()
if(!mymob)
return
var/mob/living/carbon/true_devil/D = mymob
if(hud_version != HUD_STYLE_NOHUD)
if(D.r_hand)
D.r_hand.screen_loc = ui_rhand
D.client.screen += D.r_hand
if(D.l_hand)
D.l_hand.screen_loc = ui_lhand
D.client.screen += D.l_hand
else
if(D.r_hand)
D.r_hand.screen_loc = null
if(D.l_hand)
D.l_hand.screen_loc = null
/mob/living/carbon/true_devil/create_mob_hud()
if(client && !hud_used)
hud_used = new /datum/hud/devil(src, ui_style2icon(client.prefs.UI_style))
-3
View File
@@ -27,8 +27,6 @@
var/obj/screen/move_intent
var/obj/screen/module_store_icon
var/obj/screen/devil/soul_counter/devilsouldisplay
var/list/static_inventory = list() //the screen objects which are static
var/list/toggleable_inventory = list() //the screen objects which can be hidden
var/list/hotkeybuttons = list() //the buttons that can be used via hotkeys
@@ -89,7 +87,6 @@
alien_plasma_display = null
vampire_blood_display = null
nightvisionicon = null
devilsouldisplay = null
QDEL_LIST_ASSOC_VAL(plane_masters)
+1 -33
View File
@@ -36,35 +36,6 @@
var/mob/living/carbon/U = usr
U.unset_sting()
/obj/screen/devil
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/devil/soul_counter
icon = 'icons/mob/screen_gen.dmi'
name = "souls owned"
icon_state = "Devil-6"
screen_loc = ui_devilsouldisplay
/obj/screen/devil/soul_counter/proc/update_counter(souls = 0)
invisibility = 0
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#FF0000'>[souls]</font></div>"
switch(souls)
if(0,null)
icon_state = "Devil-1"
if(1,2)
icon_state = "Devil-2"
if(3 to 5)
icon_state = "Devil-3"
if(6 to 8)
icon_state = "Devil-4"
if(9 to INFINITY)
icon_state = "Devil-5"
else
icon_state = "Devil-6"
/obj/screen/devil/soul_counter/proc/clear()
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/ling/chems
name = "chemical storage"
icon_state = "power_display"
@@ -85,7 +56,7 @@
/datum/hud/human
var/hud_alpha = 255
/datum/hud/human/New(mob/living/carbon/human/owner, var/ui_style = 'icons/mob/screen_white.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255)
/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_white.dmi', ui_color = "#ffffff", ui_alpha = 255)
..()
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness)
@@ -372,9 +343,6 @@
lingstingdisplay = new /obj/screen/ling/sting()
infodisplay += lingstingdisplay
devilsouldisplay = new /obj/screen/devil/soul_counter
infodisplay += devilsouldisplay
zone_select = new /obj/screen/zone_sel()
zone_select.color = ui_color
zone_select.icon = ui_style
+22 -4
View File
@@ -8,7 +8,7 @@
var/last_parallax_shift //world.time of last update
var/parallax_throttle = 0 //ds between updates
var/parallax_movedir = 0
var/parallax_layers_max = 3
var/parallax_layers_max = 4
var/parallax_animate_timer
/datum/hud/proc/create_parallax()
@@ -21,6 +21,8 @@
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/planet(null, C.view)
if(SSparallax.random_layer)
C.parallax_layers_cached += new SSparallax.random_layer
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -44,12 +46,12 @@
switch(C.prefs.parallax)
if (PARALLAX_INSANE)
C.parallax_throttle = FALSE
C.parallax_layers_max = 4
C.parallax_layers_max = 5
return TRUE
if (PARALLAX_MED)
C.parallax_throttle = PARALLAX_DELAY_MED
C.parallax_layers_max = 2
C.parallax_layers_max = 3
return TRUE
if (PARALLAX_LOW)
@@ -60,8 +62,9 @@
if (PARALLAX_DISABLE)
return FALSE
//This is high parallax.
C.parallax_throttle = PARALLAX_DELAY_DEFAULT
C.parallax_layers_max = 3
C.parallax_layers_max = 4
return TRUE
/datum/hud/proc/update_parallax_pref()
@@ -276,6 +279,21 @@
speed = 1.4
layer = 3
/obj/screen/parallax_layer/random
blend_mode = BLEND_OVERLAY
speed = 3
layer = 3
/obj/screen/parallax_layer/random/space_gas
icon_state = "space_gas"
/obj/screen/parallax_layer/random/space_gas/New(view)
..()
add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)
/obj/screen/parallax_layer/random/asteroids
icon_state = "asteroids"
/obj/screen/parallax_layer/planet
icon_state = "planet"
blend_mode = BLEND_OVERLAY
+3 -3
View File
@@ -31,7 +31,7 @@
return FALSE
/obj/attackby(obj/item/I, mob/living/user, params)
return ..() || (can_be_hit && I.attack_obj(src, user))
return ..() || (can_be_hit && I.attack_obj(src, user, params))
/mob/living/attackby(obj/item/I, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
@@ -73,7 +73,7 @@
else
SEND_SIGNAL(M, COMSIG_ITEM_ATTACK)
if(hitsound)
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
playsound(loc, hitsound, get_clamped_volume(), TRUE, extrarange = stealthy_audio ? SILENCED_SOUND_EXTRARANGE : -1, falloff_distance = 0)
M.lastattacker = user.real_name
M.lastattackerckey = user.ckey
@@ -87,7 +87,7 @@
//the equivalent of the standard version of attack() but for object targets.
/obj/item/proc/attack_obj(obj/O, mob/living/user)
/obj/item/proc/attack_obj(obj/O, mob/living/user, params)
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)
return
if(flags & (NOBLUDGEON))
+4 -4
View File
@@ -1,4 +1,4 @@
/mob/dead/observer/DblClickOn(var/atom/A, var/params)
/mob/dead/observer/DblClickOn(atom/A, params)
if(client.click_intercept)
// Not doing a click intercept here, because otherwise we double-tap with the `ClickOn` proc.
// But we return here since we don't want to do regular dblclick handling
@@ -18,7 +18,7 @@
forceMove(get_turf(A))
update_parallax_contents()
/mob/dead/observer/ClickOn(var/atom/A, var/params)
/mob/dead/observer/ClickOn(atom/A, params)
if(client.click_intercept)
client.click_intercept.InterceptClickOn(src, params, A)
return
@@ -48,14 +48,14 @@
ShiftClickOn(A)
return
if(modifiers["alt"])
AltClickOn(A)
AltClickNoInteract(src, A)
return
// You are responsible for checking config.ghost_interaction when you override this function
// Not all of them require checking, see below
A.attack_ghost(src)
// We don't need a fucking toggle.
/mob/dead/observer/ShiftClickOn(var/atom/A)
/mob/dead/observer/ShiftClickOn(atom/A)
examinate(A)
/atom/proc/attack_ghost(mob/user)
+6 -6
View File
@@ -28,11 +28,11 @@
return
/*
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) -- Handled by carbons
/mob/living/carbon/human/RestrainedClickOn(atom/A) -- Handled by carbons
return
*/
/mob/living/carbon/RestrainedClickOn(var/atom/A)
/mob/living/carbon/RestrainedClickOn(atom/A)
return 0
/mob/living/carbon/human/RangedAttack(atom/A, params)
@@ -54,17 +54,17 @@
/*
Animals & All Unspecified
*/
/mob/living/UnarmedAttack(var/atom/A)
/mob/living/UnarmedAttack(atom/A)
A.attack_animal(src)
/mob/living/simple_animal/hostile/UnarmedAttack(var/atom/A)
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
target = A
AttackingTarget()
/atom/proc/attack_animal(mob/user)
return
/mob/living/RestrainedClickOn(var/atom/A)
/mob/living/RestrainedClickOn(atom/A)
return
/*
@@ -109,5 +109,5 @@
return
// pAIs are not intended to interact with anything in the world
/mob/living/silicon/pai/UnarmedAttack(var/atom/A)
/mob/living/silicon/pai/UnarmedAttack(atom/A)
return
+1 -1
View File
@@ -1,7 +1,7 @@
// Blob Overmind Controls
/mob/camera/blob/ClickOn(var/atom/A, var/params) //Expand blob
/mob/camera/blob/ClickOn(atom/A, params) //Expand blob
var/list/modifiers = params2list(params)
if(modifiers["middle"])
MiddleClickOn(A)
+2 -2
View File
@@ -87,7 +87,7 @@
//stops TK grabs being equipped anywhere but into hands
/obj/item/tk_grab/equipped(mob/user, var/slot)
/obj/item/tk_grab/equipped(mob/user, slot)
if( (slot == slot_l_hand) || (slot== slot_r_hand) )
return
qdel(src)
@@ -151,7 +151,7 @@
if(!.)
return I == focus
/obj/item/tk_grab/proc/focus_object(var/obj/target, var/mob/user)
/obj/item/tk_grab/proc/focus_object(obj/target, mob/user)
if(!istype(target,/obj))
return//Cant throw non objects atm might let it do mobs later
if(target.anchored || !isturf(target.loc))
+1 -1
View File
@@ -76,7 +76,7 @@ SUBSYSTEM_DEF(afk)
/datum/controller/subsystem/afk/proc/warn(mob/living/carbon/human/H, text)
to_chat(H, text)
SEND_SOUND(H, 'sound/effects/adminhelp.ogg')
SEND_SOUND(H, sound('sound/effects/adminhelp.ogg'))
if(H.client)
window_flash(H.client)
+5 -5
View File
@@ -283,7 +283,7 @@ SUBSYSTEM_DEF(air)
for(var/turf/simulated/S in T.atmos_adjacent_turfs)
add_to_active(S)
/datum/controller/subsystem/air/proc/setup_allturfs(var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz)))
/datum/controller/subsystem/air/proc/setup_allturfs(list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz)))
var/list/active_turfs = src.active_turfs
// Clear active turfs - faster than removing every single turf in the world
@@ -321,7 +321,7 @@ SUBSYSTEM_DEF(air)
ET.excited = 1
. += ET
/datum/controller/subsystem/air/proc/setup_atmos_machinery(var/list/machines_to_init)
/datum/controller/subsystem/air/proc/setup_atmos_machinery(list/machines_to_init)
var/watch = start_watch()
log_startup_progress("Initializing atmospherics machinery...")
var/count = _setup_atmos_machinery(machines_to_init)
@@ -329,7 +329,7 @@ SUBSYSTEM_DEF(air)
// this underscored variant is so that we can have a means of late initing
// atmos machinery without a loud announcement to the world
/datum/controller/subsystem/air/proc/_setup_atmos_machinery(var/list/machines_to_init)
/datum/controller/subsystem/air/proc/_setup_atmos_machinery(list/machines_to_init)
var/count = 0
for(var/obj/machinery/atmospherics/A in machines_to_init)
A.atmos_init()
@@ -345,7 +345,7 @@ SUBSYSTEM_DEF(air)
//this can't be done with setup_atmos_machinery() because
// all atmos machinery has to initalize before the first
// pipenet can be built.
/datum/controller/subsystem/air/proc/setup_pipenets(var/list/pipes)
/datum/controller/subsystem/air/proc/setup_pipenets(list/pipes)
var/watch = start_watch()
log_startup_progress("Initializing pipe networks...")
var/count = _setup_pipenets(pipes)
@@ -353,7 +353,7 @@ SUBSYSTEM_DEF(air)
// An underscored wrapper that exists for the same reason
// the machine init wrapper does
/datum/controller/subsystem/air/proc/_setup_pipenets(var/list/pipes)
/datum/controller/subsystem/air/proc/_setup_pipenets(list/pipes)
var/count = 0
for(var/obj/machinery/atmospherics/machine in pipes)
machine.build_network()
+30
View File
@@ -0,0 +1,30 @@
/// The subsystem used to play ambience to users every now and then, makes them real excited.
SUBSYSTEM_DEF(ambience)
name = "Ambience"
flags = SS_BACKGROUND | SS_NO_INIT
priority = FIRE_PRIORITY_AMBIENCE
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
wait = 1 SECONDS
///Assoc list of listening client - next ambience time
var/list/ambience_listening_clients = list()
/datum/controller/subsystem/ambience/fire(resumed)
for(var/C in ambience_listening_clients)
var/client/client_iterator = C
if(isnull(client_iterator))
ambience_listening_clients -= client_iterator
continue
if(ambience_listening_clients[client_iterator] > world.time)
continue //Not ready for the next sound
var/area/current_area = get_area(client_iterator.mob)
var/ambience = safepick(current_area.ambientsounds)
if(!ambience)
continue
SEND_SOUND(client_iterator.mob, sound(ambience, repeat = 0, wait = 0, volume = 25 * client_iterator.prefs.get_channel_volume(CHANNEL_AMBIENCE), channel = CHANNEL_AMBIENCE))
ambience_listening_clients[client_iterator] = world.time + rand(current_area.min_ambience_cooldown, current_area.max_ambience_cooldown)
+3 -2
View File
@@ -59,11 +59,12 @@ SUBSYSTEM_DEF(ghost_spawns)
var/category = "[P.hash]_notify_action"
var/notice_sound = sound('sound/misc/notice2.ogg')
for(var/mob/dead/observer/M in (ignore_respawnability ? GLOB.player_list : GLOB.respawnable_list))
if(!is_eligible(M, role, antag_age_check, role, min_hours, check_antaghud))
continue
SEND_SOUND(M, 'sound/misc/notice2.ogg')
SEND_SOUND(M, notice_sound)
if(flash_window)
window_flash(M.client)
@@ -245,7 +246,7 @@ SUBSYSTEM_DEF(ghost_spawns)
if(time_left() <= 0)
if(!silent)
to_chat(M, "<span class='danger'>Sorry, you were too late for the consideration!</span>")
SEND_SOUND(M, 'sound/machines/buzz-sigh.ogg')
SEND_SOUND(M, sound('sound/machines/buzz-sigh.ogg'))
return
signed_up += M
+7 -7
View File
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(jobs)
return
batch_update_player_exp(announce = FALSE) // Set this to true if you ever want to inform players about their EXP gains
/datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station"))
/datum/controller/subsystem/jobs/proc/SetupOccupations(list/faction = list("Station"))
occupations = list()
var/list/all_jobs = subtypesof(/datum/job)
if(!all_jobs.len)
@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(jobs)
return 1
/datum/controller/subsystem/jobs/proc/Debug(var/text)
/datum/controller/subsystem/jobs/proc/Debug(text)
if(!GLOB.debug2)
return 0
job_debug.Add(text)
@@ -67,7 +67,7 @@ SUBSYSTEM_DEF(jobs)
/datum/controller/subsystem/jobs/proc/GetPlayerAltTitle(mob/new_player/player, rank)
return player.client.prefs.GetPlayerAltTitle(GetJob(rank))
/datum/controller/subsystem/jobs/proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0)
/datum/controller/subsystem/jobs/proc/AssignRole(mob/new_player/player, rank, latejoin = 0)
Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]")
if(player && player.mind && rank)
var/datum/job/job = GetJob(rank)
@@ -110,7 +110,7 @@ SUBSYSTEM_DEF(jobs)
Debug("AR has failed, Player: [player], Rank: [rank]")
return 0
/datum/controller/subsystem/jobs/proc/FreeRole(var/rank) //making additional slot on the fly
/datum/controller/subsystem/jobs/proc/FreeRole(rank) //making additional slot on the fly
var/datum/job/job = GetJob(rank)
if(job && job.current_positions >= job.total_positions && job.total_positions != -1)
job.total_positions++
@@ -145,7 +145,7 @@ SUBSYSTEM_DEF(jobs)
candidates += player
return candidates
/datum/controller/subsystem/jobs/proc/GiveRandomJob(var/mob/new_player/player)
/datum/controller/subsystem/jobs/proc/GiveRandomJob(mob/new_player/player)
Debug("GRJ Giving random job, Player: [player]")
for(var/datum/job/job in shuffle(occupations))
if(!job)
@@ -229,7 +229,7 @@ SUBSYSTEM_DEF(jobs)
///This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
/datum/controller/subsystem/jobs/proc/CheckHeadPositions(var/level)
/datum/controller/subsystem/jobs/proc/CheckHeadPositions(level)
for(var/command_position in GLOB.command_positions)
var/datum/job/job = GetJob(command_position)
if(!job)
@@ -409,7 +409,7 @@ SUBSYSTEM_DEF(jobs)
log_debug("Dividing Occupations took [stop_watch(watch)]s")
return 1
/datum/controller/subsystem/jobs/proc/AssignRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
/datum/controller/subsystem/jobs/proc/AssignRank(mob/living/carbon/human/H, rank, joined_late = 0)
if(!H)
return null
var/datum/job/job = GetJob(rank)
+10 -2
View File
@@ -1,19 +1,27 @@
SUBSYSTEM_DEF(parallax)
name = "Parallax"
wait = 2
flags = SS_POST_FIRE_TIMING | SS_BACKGROUND
flags = SS_POST_FIRE_TIMING | SS_BACKGROUND | SS_NO_INIT
priority = FIRE_PRIORITY_PARALLAX
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
offline_implications = "Space parallax will no longer move around. No immediate action is needed."
var/list/currentrun
var/planet_x_offset = 128
var/planet_y_offset = 128
var/random_layer
var/random_parallax_color
/datum/controller/subsystem/parallax/Initialize(timeofday)
//These are cached per client so needs to be done asap so people joining at roundstart do not miss these.
/datum/controller/subsystem/parallax/PreInit()
. = ..()
if(prob(70)) //70% chance to pick a special extra layer
random_layer = pick(/obj/screen/parallax_layer/random/space_gas, /obj/screen/parallax_layer/random/asteroids)
random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_SILVER, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE) //Special color for random_layer1. Has to be done here so everyone sees the same color.
planet_y_offset = rand(100, 160)
planet_x_offset = rand(100, 160)
/datum/controller/subsystem/parallax/fire(resumed = 0)
if(!resumed)
src.currentrun = GLOB.clients.Copy()
+3 -3
View File
@@ -26,7 +26,7 @@ SUBSYSTEM_DEF(radio)
var/list/datum/radio_frequency/frequencies = list()
// This is fucking disgusting and needs to die
/datum/controller/subsystem/radio/proc/frequency_span_class(var/frequency)
/datum/controller/subsystem/radio/proc/frequency_span_class(frequency)
// Antags!
if(frequency in ANTAG_FREQS)
return "syndradio"
@@ -62,7 +62,7 @@ SUBSYSTEM_DEF(radio)
return "radio"
/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, var/new_frequency as num, var/filter = null as text|null)
/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null)
var/f_text = num2text(new_frequency)
var/datum/radio_frequency/frequency = frequencies[f_text]
@@ -87,7 +87,7 @@ SUBSYSTEM_DEF(radio)
return 1
/datum/controller/subsystem/radio/proc/return_frequency(var/new_frequency as num)
/datum/controller/subsystem/radio/proc/return_frequency(new_frequency as num)
var/f_text = num2text(new_frequency)
var/datum/radio_frequency/frequency = frequencies[f_text]
+16 -16
View File
@@ -125,14 +125,14 @@ SUBSYSTEM_DEF(ticker)
current_state = GAME_STATE_FINISHED
Master.SetRunLevel(RUNLEVEL_POSTGAME) // This shouldnt process more than once, but you never know
auto_toggle_ooc(TRUE) // Turn it on
declare_completion()
addtimer(CALLBACK(src, .proc/call_reboot), 5 SECONDS)
spawn(50)
if(mode.station_was_nuked)
reboot_helper("Station destroyed by Nuclear Device.", "nuke")
else
reboot_helper("Round ended.", "proper completion")
/datum/controller/subsystem/ticker/proc/call_reboot()
if(mode.station_was_nuked)
reboot_helper("Station destroyed by Nuclear Device.", "nuke")
else
reboot_helper("Round ended.", "proper completion")
/datum/controller/subsystem/ticker/proc/setup()
cultdat = setupcult()
@@ -251,7 +251,7 @@ SUBSYSTEM_DEF(ticker)
SSdbcore.SetRoundStart()
to_chat(world, "<span class='darkmblue'><B>Enjoy the game!</B></span>")
world << sound('sound/AI/welcome.ogg')
SEND_SOUND(world, sound('sound/AI/welcome.ogg'))
if(SSholiday.holidays)
to_chat(world, "<span class='darkmblue'>and...</span>")
@@ -325,23 +325,23 @@ SUBSYSTEM_DEF(ticker)
if("nuclear emergency") //Nuke wasn't on station when it blew up
flick("intro_nuke", cinematic)
sleep(35)
world << sound('sound/effects/explosionfar.ogg')
SEND_SOUND(world, sound('sound/effects/explosion_distant.ogg'))
flick("station_intact_fade_red", cinematic)
cinematic.icon_state = "summary_nukefail"
if("fake") //The round isn't over, we're just freaking people out for fun
flick("intro_nuke", cinematic)
sleep(35)
world << sound('sound/items/bikehorn.ogg')
SEND_SOUND(world, sound('sound/items/bikehorn.ogg'))
flick("summary_selfdes", cinematic)
else
flick("intro_nuke", cinematic)
sleep(35)
world << sound('sound/effects/explosionfar.ogg')
SEND_SOUND(world, sound('sound/effects/explosion_distant.ogg'))
if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation
sleep(50)
world << sound('sound/effects/explosionfar.ogg')
SEND_SOUND(world, sound('sound/effects/explosion_distant.ogg'))
else //station was destroyed
if(mode && !override)
override = mode.name
@@ -350,25 +350,25 @@ SUBSYSTEM_DEF(ticker)
flick("intro_nuke", cinematic)
sleep(35)
flick("station_explode_fade_red", cinematic)
world << sound('sound/effects/explosionfar.ogg')
SEND_SOUND(world, sound('sound/effects/explosion_distant.ogg'))
cinematic.icon_state = "summary_nukewin"
if("AI malfunction") //Malf (screen,explosion,summary)
flick("intro_malf", cinematic)
sleep(76)
flick("station_explode_fade_red", cinematic)
world << sound('sound/effects/explosionfar.ogg')
SEND_SOUND(world, sound('sound/effects/explosion_distant.ogg'))
cinematic.icon_state = "summary_malf"
if("blob") //Station nuked (nuke,explosion,summary)
flick("intro_nuke", cinematic)
sleep(35)
flick("station_explode_fade_red", cinematic)
world << sound('sound/effects/explosionfar.ogg')
SEND_SOUND(world, sound('sound/effects/explosion_distant.ogg'))
cinematic.icon_state = "summary_selfdes"
else //Station nuked (nuke,explosion,summary)
flick("intro_nuke", cinematic)
sleep(35)
flick("station_explode_fade_red", cinematic)
world << sound('sound/effects/explosionfar.ogg')
SEND_SOUND(world, sound('sound/effects/explosion_distant.ogg'))
cinematic.icon_state = "summary_selfdes"
//If its actually the end of the round, wait for it to end.
//Otherwise if its a verb it will continue on afterwards.
@@ -574,7 +574,7 @@ SUBSYSTEM_DEF(ticker)
// Play a haha funny noise
var/round_end_sound = pick(GLOB.round_end_sounds)
var/sound_length = GLOB.round_end_sounds[round_end_sound]
world << round_end_sound
SEND_SOUND(world, sound(round_end_sound))
sleep(sound_length)
world.Reboot()
@@ -142,8 +142,7 @@ SUBSYSTEM_DEF(tickets)
//Inform the user that they have opened a ticket
to_chat(C, "<span class='[span_class]'>You have opened [ticket_name] number #[(getTicketCounter() - 1)]! Please be patient and we will help you soon!</span>")
var/ticket_open_sound = sound('sound/effects/adminticketopen.ogg')
SEND_SOUND(C, ticket_open_sound)
SEND_SOUND(C, sound('sound/effects/adminticketopen.ogg'))
message_staff(url_title, NONE, TRUE)
@@ -245,8 +244,7 @@ SUBSYSTEM_DEF(tickets)
if("Mentorhelp")
convert_ticket(T)
else
var/msg_sound = sound('sound/effects/adminhelp.ogg')
SEND_SOUND(returnClient(N), msg_sound)
SEND_SOUND(returnClient(N), sound('sound/effects/adminhelp.ogg'))
to_chat_safe(returnClient(N), "<span class='[span_class]'>[key_name_hidden(C)] is autoresponding with: <span/> <span class='adminticketalt'>[response_phrases[message_key]]</span>")//for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
message_staff("[C] has auto responded to [ticket_owner]\'s adminhelp with:<span class='adminticketalt'> [message_key] </span>") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key
T.lastStaffResponse = "Autoresponse: [message_key]"
@@ -599,7 +597,7 @@ UI STUFF
else
usr.client.resolveAllAdminTickets()
/datum/controller/subsystem/tickets/proc/takeTicket(var/index)
/datum/controller/subsystem/tickets/proc/takeTicket(index)
if(assignStaffToTicket(usr.client, index))
if(span_class == "mentorhelp")
message_staff("<span class='[span_class]'>[usr.client] / ([usr]) has taken [ticket_name] number [index]</span>")
+8 -8
View File
@@ -184,7 +184,7 @@ SUBSYSTEM_DEF(vote)
return .
/datum/controller/subsystem/vote/proc/submit_vote(var/ckey, var/vote)
/datum/controller/subsystem/vote/proc/submit_vote(ckey, vote)
if(mode)
if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder)
return 0
@@ -197,7 +197,7 @@ SUBSYSTEM_DEF(vote)
return vote
return 0
/datum/controller/subsystem/vote/proc/initiate_vote(var/vote_type, var/initiator_key)
/datum/controller/subsystem/vote/proc/initiate_vote(vote_type, initiator_key)
if(!mode)
if(started_time != null && !check_rights(R_ADMIN))
var/next_allowed_time = (started_time + config.vote_delay)
@@ -249,11 +249,11 @@ SUBSYSTEM_DEF(vote)
You have [config.vote_period/10] seconds to vote.</font>"})
switch(vote_type)
if("crew_transfer")
world << sound('sound/ambience/alarm4.ogg')
SEND_SOUND(world, sound('sound/ambience/alarm4.ogg'))
if("gamemode")
world << sound('sound/ambience/alarm4.ogg')
SEND_SOUND(world, sound('sound/ambience/alarm4.ogg'))
if("custom")
world << sound('sound/ambience/alarm4.ogg')
SEND_SOUND(world, sound('sound/ambience/alarm4.ogg'))
if(mode == "gamemode" && SSticker.ticker_going)
SSticker.ticker_going = FALSE
to_chat(world, "<font color='red'><b>Round start has been delayed.</b></font>")
@@ -280,7 +280,7 @@ SUBSYSTEM_DEF(vote)
return 1
return 0
/datum/controller/subsystem/vote/proc/browse_to(var/client/C)
/datum/controller/subsystem/vote/proc/browse_to(client/C)
if(!C)
return
var/admin = check_rights(R_ADMIN, 0, user = C.mob)
@@ -330,10 +330,10 @@ SUBSYSTEM_DEF(vote)
popup.set_content(dat)
popup.open()
/datum/controller/subsystem/vote/proc/update_panel(var/client/C)
/datum/controller/subsystem/vote/proc/update_panel(client/C)
C << output(url_encode(vote_html(C)), "vote.browser:update_vote_div")
/datum/controller/subsystem/vote/proc/vote_html(var/client/C)
/datum/controller/subsystem/vote/proc/vote_html(client/C)
. = ""
if(question)
. += "<h2>Vote: '[question]'</h2>"
+1 -1
View File
@@ -17,7 +17,7 @@
var/button_icon_state = "default"
var/mob/owner
/datum/action/New(var/Target)
/datum/action/New(Target)
target = Target
button = new
button.linked_action = src
+29 -60
View File
@@ -17,10 +17,6 @@
/datum/ai_law/zero/get_index()
return 0
/datum/ai_law/sixsixsix/get_index()
return 666
/datum/ai_laws
var/name = "Unknown Laws"
var/law_header = "Prime Directives"
@@ -31,11 +27,9 @@
var/list/datum/ai_law/inherent_laws = list()
var/list/datum/ai_law/supplied_laws = list()
var/list/datum/ai_law/ion/ion_laws = list()
var/list/datum/ai_law/sixsixsix/devil_laws = list()
var/list/datum/ai_law/sorted_laws = list()
var/state_zeroth = 0
var/list/state_devil = list()
var/list/state_ion = list()
var/list/state_inherent = list()
var/list/state_supplied = list()
@@ -68,9 +62,6 @@
for(var/ion_law in ion_laws)
sorted_laws += ion_law
for(var/evil_law in devil_laws)
sorted_laws += evil_law
var/index = 1
for(var/datum/ai_law/inherent_law in inherent_laws)
inherent_law.index = index++
@@ -81,7 +72,7 @@
if(istype(AL))
sorted_laws += AL
/datum/ai_laws/proc/sync(var/mob/living/silicon/S, var/full_sync = 1)
/datum/ai_laws/proc/sync(mob/living/silicon/S, full_sync = 1)
// Add directly to laws to avoid log-spam
S.sync_zeroth(zeroth_law, zeroth_law_borg)
@@ -101,7 +92,7 @@
S.laws.add_supplied_law(law.index, law.law)
/mob/living/silicon/proc/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
/mob/living/silicon/proc/sync_zeroth(datum/ai_law/zeroth_law, datum/ai_law/zeroth_law_borg)
if(!is_special_character(src) || mind.original != src)
if(zeroth_law_borg)
laws.set_zeroth_law(zeroth_law_borg.law)
@@ -110,14 +101,14 @@
else
laws.clear_zeroth_laws()
/mob/living/silicon/ai/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
/mob/living/silicon/ai/sync_zeroth(datum/ai_law/zeroth_law, datum/ai_law/zeroth_law_borg)
if(zeroth_law)
laws.set_zeroth_law(zeroth_law.law, zeroth_law_borg ? zeroth_law_borg.law : null)
/****************
* Add Laws *
****************/
/datum/ai_laws/proc/set_zeroth_law(var/law, var/law_borg = null)
/datum/ai_laws/proc/set_zeroth_law(law, law_borg = null)
if(!law)
return
@@ -128,22 +119,7 @@
zeroth_law_borg = null
sorted_laws.Cut()
/datum/ai_laws/proc/set_sixsixsix_law(var/law)
if(!law)
return
for(var/datum/ai_law/AL in devil_laws)
if(AL.law == law)
return
var/new_law = new/datum/ai_law/sixsixsix(law)
devil_laws += new_law
if(state_devil.len < devil_laws.len)
state_devil += 1
sorted_laws.Cut()
/datum/ai_laws/proc/add_ion_law(var/law)
/datum/ai_laws/proc/add_ion_law(law)
if(!law)
return
@@ -158,7 +134,7 @@
sorted_laws.Cut()
/datum/ai_laws/proc/add_inherent_law(var/law)
/datum/ai_laws/proc/add_inherent_law(law)
if(!law)
return
@@ -173,7 +149,7 @@
sorted_laws.Cut()
/datum/ai_laws/proc/add_supplied_law(var/number, var/law)
/datum/ai_laws/proc/add_supplied_law(number, law)
if(!law)
return
@@ -200,31 +176,28 @@
/****************
* Remove Laws *
*****************/
/datum/ai_laws/proc/delete_law(var/datum/ai_law/law)
/datum/ai_laws/proc/delete_law(datum/ai_law/law)
if(istype(law))
law.delete_law(src)
/datum/ai_law/proc/delete_law(var/datum/ai_laws/laws)
/datum/ai_law/proc/delete_law(datum/ai_laws/laws)
/datum/ai_law/zero/delete_law(var/datum/ai_laws/laws)
/datum/ai_law/zero/delete_law(datum/ai_laws/laws)
laws.clear_zeroth_laws()
/datum/ai_law/ion/delete_law(var/datum/ai_laws/laws)
/datum/ai_law/ion/delete_law(datum/ai_laws/laws)
laws.internal_delete_law(laws.ion_laws, laws.state_ion, src)
/datum/ai_law/sixsixsix/delete_law(var/datum/ai_laws/laws)
laws.internal_delete_law(laws.devil_laws, laws.state_devil, src)
/datum/ai_law/inherent/delete_law(var/datum/ai_laws/laws)
/datum/ai_law/inherent/delete_law(datum/ai_laws/laws)
laws.internal_delete_law(laws.inherent_laws, laws.state_inherent, src)
/datum/ai_law/supplied/delete_law(var/datum/ai_laws/laws)
/datum/ai_law/supplied/delete_law(datum/ai_laws/laws)
var/index = laws.supplied_laws.Find(src)
if(index)
laws.supplied_laws[index] = ""
laws.state_supplied[index] = 1
/datum/ai_laws/proc/internal_delete_law(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law)
/datum/ai_laws/proc/internal_delete_law(list/datum/ai_law/laws, list/state, list/datum/ai_law/law)
var/index = laws.Find(law)
if(index)
laws -= law
@@ -239,10 +212,6 @@
zeroth_law = null
zeroth_law_borg = null
/datum/ai_laws/proc/clear_sixsixsix_laws()
devil_laws.Cut()
sorted_laws.Cut()
/datum/ai_laws/proc/clear_ion_laws()
ion_laws.Cut()
sorted_laws.Cut()
@@ -255,7 +224,7 @@
supplied_laws.Cut()
sorted_laws.Cut()
/datum/ai_laws/proc/show_laws(var/who)
/datum/ai_laws/proc/show_laws(who)
sort_laws()
for(var/datum/ai_law/law in sorted_laws)
if(law == zeroth_law_borg)
@@ -271,25 +240,25 @@
/********
* Get *
********/
/datum/ai_laws/proc/get_state_law(var/datum/ai_law/law)
/datum/ai_laws/proc/get_state_law(datum/ai_law/law)
return law.get_state_law(src)
/datum/ai_law/proc/get_state_law(var/datum/ai_laws/laws)
/datum/ai_law/proc/get_state_law(datum/ai_laws/laws)
/datum/ai_law/zero/get_state_law(var/datum/ai_laws/laws)
/datum/ai_law/zero/get_state_law(datum/ai_laws/laws)
if(src == laws.zeroth_law)
return laws.state_zeroth
/datum/ai_law/ion/get_state_law(var/datum/ai_laws/laws)
/datum/ai_law/ion/get_state_law(datum/ai_laws/laws)
return laws.get_state_internal(laws.ion_laws, laws.state_ion, src)
/datum/ai_law/inherent/get_state_law(var/datum/ai_laws/laws)
/datum/ai_law/inherent/get_state_law(datum/ai_laws/laws)
return laws.get_state_internal(laws.inherent_laws, laws.state_inherent, src)
/datum/ai_law/supplied/get_state_law(var/datum/ai_laws/laws)
/datum/ai_law/supplied/get_state_law(datum/ai_laws/laws)
return laws.get_state_internal(laws.supplied_laws, laws.state_supplied, src)
/datum/ai_laws/proc/get_state_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law)
/datum/ai_laws/proc/get_state_internal(list/datum/ai_law/laws, list/state, list/datum/ai_law/law)
var/index = laws.Find(law)
if(index)
return state[index]
@@ -298,25 +267,25 @@
/********
* Set *
********/
/datum/ai_laws/proc/set_state_law(var/datum/ai_law/law, var/state)
/datum/ai_laws/proc/set_state_law(datum/ai_law/law, state)
law.set_state_law(src, state)
/datum/ai_law/proc/set_state_law(var/datum/ai_law/law, var/state)
/datum/ai_law/proc/set_state_law(datum/ai_law/law, state)
/datum/ai_law/zero/set_state_law(var/datum/ai_laws/laws, var/state)
/datum/ai_law/zero/set_state_law(datum/ai_laws/laws, state)
if(src == laws.zeroth_law)
laws.state_zeroth = state
/datum/ai_law/ion/set_state_law(var/datum/ai_laws/laws, var/state)
/datum/ai_law/ion/set_state_law(datum/ai_laws/laws, state)
laws.set_state_law_internal(laws.ion_laws, laws.state_ion, src, state)
/datum/ai_law/inherent/set_state_law(var/datum/ai_laws/laws, var/state)
/datum/ai_law/inherent/set_state_law(datum/ai_laws/laws, state)
laws.set_state_law_internal(laws.inherent_laws, laws.state_inherent, src, state)
/datum/ai_law/supplied/set_state_law(var/datum/ai_laws/laws, var/state)
/datum/ai_law/supplied/set_state_law(datum/ai_laws/laws, state)
laws.set_state_law_internal(laws.supplied_laws, laws.state_supplied, src, state)
/datum/ai_laws/proc/set_state_law_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law, var/do_state)
/datum/ai_laws/proc/set_state_law_internal(list/datum/ai_law/laws, list/state, list/datum/ai_law/law, do_state)
var/index = laws.Find(law)
if(index)
state[index] = do_state
+4 -4
View File
@@ -16,7 +16,7 @@
var/title_buttons = ""
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null)
user = nuser
window_id = nwindow_id
@@ -101,7 +101,7 @@
[get_footer()]
"}
/datum/browser/proc/open(var/use_onclose = 1)
/datum/browser/proc/open(use_onclose = 1)
var/window_size = ""
if(width && height)
window_size = "size=[width]x[height];"
@@ -145,7 +145,7 @@
// Otherwise, the user mob's machine var will be reset directly.
//
/proc/onclose(mob/user, windowid, var/atom/ref=null)
/proc/onclose(mob/user, windowid, atom/ref=null)
if(!user || !user.client) return
var/param = "null"
if(ref)
@@ -161,7 +161,7 @@
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"
// otherwise, just reset the client mob's machine var.
//
/client/verb/windowclose(var/atomref as text)
/client/verb/windowclose(atomref as text)
set hidden = 1 // hide this verb from the user's panel
set name = ".windowclose" // no autocomplete on cmd line
+1 -1
View File
@@ -1,6 +1,6 @@
GLOBAL_DATUM_INIT(powermonitor_repository, /datum/repository/powermonitor, new())
/datum/repository/powermonitor/proc/powermonitor_data(var/refresh = 0)
/datum/repository/powermonitor/proc/powermonitor_data(refresh = 0)
var/pMonData[0]
var/datum/cache_entry/cache_entry = cache_data
+1 -1
View File
@@ -71,5 +71,5 @@
if(strength >= cleanable)
qdel(src)
/datum/component/decal/proc/examine(datum/source, mob/user, var/list/examine_list)
/datum/component/decal/proc/examine(datum/source, mob/user, list/examine_list)
examine_list += description
+133
View File
@@ -0,0 +1,133 @@
///Footstep component. Plays footsteps at parents location when it is appropriate.
/datum/component/footstep
///How many steps the parent has taken since the last time a footstep was played.
var/steps = 0
///volume determines the extra volume of the footstep. This is multiplied by the base volume, should there be one.
var/volume
///e_range stands for extra range - aka how far the sound can be heard. This is added to the base value and ignored if there isn't a base value.
var/e_range
///footstep_type is a define which determines what kind of sounds should get chosen.
var/footstep_type
///This can be a list OR a soundfile OR null. Determines whatever sound gets played.
var/footstep_sounds
///Whether or not to add variation to the sounds played
var/sound_vary = FALSE
/datum/component/footstep/Initialize(footstep_type_ = FOOTSTEP_MOB_BAREFOOT, volume_ = 0.5, e_range_ = -8, vary)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
volume = volume_
e_range = e_range_
footstep_type = footstep_type_
sound_vary = vary
switch(footstep_type)
if(FOOTSTEP_MOB_HUMAN)
if(!ishuman(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_humanstep)
return
if(FOOTSTEP_MOB_CLAW)
footstep_sounds = GLOB.clawfootstep
if(FOOTSTEP_MOB_BAREFOOT)
footstep_sounds = GLOB.barefootstep
if(FOOTSTEP_MOB_HEAVY)
footstep_sounds = GLOB.heavyfootstep
if(FOOTSTEP_MOB_SHOE)
footstep_sounds = GLOB.footstep
if(FOOTSTEP_MOB_SLIME)
footstep_sounds = 'sound/effects/footstep/slime1.ogg'
if(FOOTSTEP_OBJ_MACHINE)
footstep_sounds = 'sound/effects/bang.ogg'
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_simplestep_machine) //Note that this doesn't get called for humans.
return
if(FOOTSTEP_OBJ_ROBOT)
footstep_sounds = 'sound/effects/tank_treads.ogg'
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_simplestep_machine) //Note that this doesn't get called for humans.
return
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_simplestep) //Note that this doesn't get called for humans.
///Prepares a footstep. Determines if it should get played. Returns the turf it should get played on. Note that it is always a /turf/simulated/floor (eventually /turf/open)
/datum/component/footstep/proc/prepare_step()
var/turf/simulated/floor/T = get_turf(parent)
if(!istype(T))
return
var/mob/living/LM = parent
if(!T.footstep || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing || LM.flying || istype(LM.loc, /obj/machinery/atmospherics))
return
if(ishuman(LM))
var/mob/living/carbon/human/H = LM
if(!H.get_organ(BODY_ZONE_L_LEG) && !H.get_organ(BODY_ZONE_R_LEG))
return
if(H.m_intent == MOVE_INTENT_WALK)
return// stealth
steps++
if(steps >= 6)
steps = 0
if(steps % 2)
return
if(steps != 0 && !has_gravity(LM, T)) // don't need to step as often when you hop around
return
return T
/datum/component/footstep/proc/play_simplestep()
SIGNAL_HANDLER
var/turf/simulated/floor/T = prepare_step()
if(!T)
return
if(isfile(footstep_sounds) || istext(footstep_sounds))
playsound(T, footstep_sounds, volume, falloff_distance = 1, vary = sound_vary)
return
var/turf_footstep
switch(footstep_type)
if(FOOTSTEP_MOB_CLAW)
turf_footstep = T.clawfootstep
if(FOOTSTEP_MOB_BAREFOOT)
turf_footstep = T.barefootstep
if(FOOTSTEP_MOB_HEAVY)
turf_footstep = T.heavyfootstep
if(FOOTSTEP_MOB_SHOE)
turf_footstep = T.footstep
if(!turf_footstep)
return
playsound(T, pick(footstep_sounds[turf_footstep][1]), footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range, falloff_distance = 1, vary = sound_vary)
/datum/component/footstep/proc/play_humanstep()
SIGNAL_HANDLER
if(HAS_TRAIT(parent, TRAIT_SILENT_FOOTSTEPS))
return
var/turf/simulated/floor/T = prepare_step()
if(!T)
return
var/mob/living/carbon/human/H = parent
if((H.wear_suit?.body_parts_covered | H.w_uniform?.body_parts_covered | H.shoes?.body_parts_covered) & FEET)
// we are wearing shoes
playsound(T, pick(GLOB.footstep[T.footstep][1]),
GLOB.footstep[T.footstep][2] * volume,
TRUE,
GLOB.footstep[T.footstep][3] + e_range, falloff_distance = 1, vary = sound_vary)
else
if(H.dna.species.special_step_sounds)
playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE, falloff_distance = 1, vary = sound_vary)
else
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
GLOB.barefootstep[T.barefootstep][2] * volume,
TRUE,
GLOB.barefootstep[T.barefootstep][3] + e_range, falloff_distance = 1, vary = sound_vary)
///Prepares a footstep for machine walking
/datum/component/footstep/proc/play_simplestep_machine()
SIGNAL_HANDLER
var/turf/simulated/floor/T = get_turf(parent)
if(!istype(T))
return
playsound(T, footstep_sounds, 50, falloff_distance = 1, vary = sound_vary)
+1 -1
View File
@@ -205,7 +205,7 @@
return amt
return FALSE
/datum/component/material_container/proc/transer_amt_to(var/datum/component/material_container/T, amt, id)
/datum/component/material_container/proc/transer_amt_to(datum/component/material_container/T, amt, id)
if((amt==0)||(!T)||(!id))
return FALSE
if(amt<0)
+16 -3
View File
@@ -12,7 +12,14 @@
var/last_use = 0
var/use_delay = 20
/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, squeak_on_move)
///extra-range for this component's sound
var/sound_extra_range = -1
///when sounds start falling off for the squeak
var/sound_falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE
///sound exponent for squeak. Defaults to 10 as squeaking is loud and annoying enough.
var/sound_falloff_exponent = 10
/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, squeak_on_move, extrarange, falloff_exponent, fallof_distance)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
@@ -39,6 +46,12 @@
step_delay = step_delay_override
if(isnum(use_delay_override))
use_delay = use_delay_override
if(isnum(extrarange))
sound_extra_range = extrarange
if(isnum(falloff_exponent))
sound_falloff_exponent = falloff_exponent
if(isnum(fallof_distance))
sound_falloff_distance = fallof_distance
/datum/component/squeak/proc/play_squeak()
if(ismob(parent))
@@ -47,9 +60,9 @@
return
if(prob(squeak_chance))
if(!override_squeak_sounds)
playsound(parent, pickweight(default_squeak_sounds), volume, 1, -1)
playsound(parent, pickweight(default_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
else
playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1)
playsound(parent, pickweight(override_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
/datum/component/squeak/proc/step_squeak()
if(steps > step_delay)
+2 -2
View File
@@ -345,7 +345,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
locked += L
return
/proc/get_id_photo(mob/living/carbon/human/H, var/custom_job = null)
/proc/get_id_photo(mob/living/carbon/human/H, custom_job = null)
var/icon/preview_icon = null
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
var/obj/item/organ/internal/eyes/eyes_organ = H.get_int_organ(/obj/item/organ/internal/eyes)
@@ -406,7 +406,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.dna.species ? H.dna.species.eyes : "eyes_s")
if(!eyes_organ)
return
eyes_s.Blend(eyes_organ.eye_colour, ICON_ADD)
eyes_s.Blend(eyes_organ.eye_color, ICON_ADD)
face_s.Blend(eyes_s, ICON_OVERLAY)
var/datum/sprite_accessory/hair_style = GLOB.hair_styles_full_list[head_organ.h_style]
+1 -1
View File
@@ -445,7 +445,7 @@
usr << browse(html, "window=variables[refid];size=475x650")
#define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing )
/proc/debug_variable(name, value, level, var/datum/DA = null, sanitize = TRUE)
/proc/debug_variable(name, value, level, datum/DA = null, sanitize = TRUE)
var/header
if(DA)
if(islist(DA))
+2 -2
View File
@@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
*/
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D)
/datum/disease/advance/New(process = 1, datum/disease/advance/D)
if(!istype(D))
D = null
// Generate symptoms if we weren't given any.
@@ -317,7 +317,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
*/
// Mix a list of advance diseases and return the mixed result.
/proc/Advance_Mix(var/list/D_list)
/proc/Advance_Mix(list/D_list)
// to_chat(world, "Mixing!!!!")
+6 -6
View File
@@ -1,6 +1,6 @@
// Cold
/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
/datum/disease/advance/cold/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Cold"
symptoms = list(new/datum/symptom/sneeze)
@@ -9,7 +9,7 @@
// Flu
/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
/datum/disease/advance/flu/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Flu"
symptoms = list(new/datum/symptom/cough)
@@ -18,7 +18,7 @@
// Voice Changing
/datum/disease/advance/voice_change/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
/datum/disease/advance/voice_change/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Epiglottis Mutation"
symptoms = list(new/datum/symptom/voice_change)
@@ -27,7 +27,7 @@
// Toxin Filter
/datum/disease/advance/heal/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
/datum/disease/advance/heal/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Liver Enhancer"
symptoms = list(new/datum/symptom/heal)
@@ -36,7 +36,7 @@
// Hullucigen
/datum/disease/advance/hullucigen/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
/datum/disease/advance/hullucigen/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Reality Impairment"
symptoms = list(new/datum/symptom/hallucigen)
@@ -44,7 +44,7 @@
// Sensory Restoration
/datum/disease/advance/sensory_restoration/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
/datum/disease/advance/sensory_restoration/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Reality Enhancer"
symptoms = list(new/datum/symptom/sensory_restoration)
@@ -31,20 +31,25 @@ BONUS
to_chat(M, "<span class='warning'>[pick("Your scalp itches.", "Your skin feels flakey.")]</span>")
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(NO_HAIR in H.dna.species.species_traits)
return // Hair can't fall out if you don't have any
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
switch(A.stage)
if(3, 4)
if(!(head_organ.h_style == "Bald") && !(head_organ.h_style == "Balding Hair"))
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
spawn(50)
head_organ.h_style = "Balding Hair"
H.update_hair()
addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, null, "Balding Hair"), 5 SECONDS)
if(5)
if(!(head_organ.f_style == "Shaved") || !(head_organ.h_style == "Bald"))
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
spawn(50)
head_organ.f_style = "Shaved"
head_organ.h_style = "Bald"
H.update_hair()
H.update_fhair()
return
addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, "Shaved", "Bald"), 5 SECONDS)
/datum/symptom/shedding/proc/change_hair(mob/living/carbon/human/H, obj/item/organ/external/head/head_organ, f_style, h_style)
if(!H || !head_organ)
return
if(f_style)
head_organ.f_style = f_style
H.update_fhair()
if(h_style)
head_organ.h_style = h_style
H.update_hair()
+2 -2
View File
@@ -25,7 +25,7 @@
max_stages = 3
spread_flags = SPECIAL
cure_text = "Saline-Glucose Solution"
cures = list("salglu_solution")
cures = list("salglu_solution", "syndicate_nanites")
cure_chance = 10
viable_mobtypes = list(/mob/living/carbon/human)
stage_prob = 6
@@ -86,7 +86,7 @@
max_stages = 3
spread_flags = SPECIAL
cure_text = "Atropine, Epinephrine, or Heparin"
cures = list("atropine", "epinephrine", "heparin")
cures = list("atropine", "epinephrine", "heparin", "syndicate_nanites")
cure_chance = 10
needs_all_cures = FALSE
viable_mobtypes = list(/mob/living/carbon/human)
+1 -1
View File
@@ -54,7 +54,7 @@
if(3)
if(prob(10))
to_chat(affected_mob, "<span class='danger'>Your thoughts are interrupted by a loud <b>HONK!</b></span>")
affected_mob << 'sound/items/airhorn.ogg'
SEND_SOUND(affected_mob, sound('sound/items/airhorn.ogg'))
if(4)
if(prob(5))
affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) )
+42 -1
View File
@@ -31,7 +31,7 @@
if(speak_emote)
D.speak_emote = speak_emote
/datum/dog_fashion/proc/get_overlay(var/dir)
/datum/dog_fashion/proc/get_overlay(dir)
if(icon_file && obj_icon_state)
var/image/corgI = image(icon_file, obj_icon_state, dir = dir)
corgI.alpha = obj_alpha
@@ -124,6 +124,10 @@
name = "Pyromancer REAL_NAME"
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "ONI SOMA!")
/datum/dog_fashion/head/black_wizard
name = "Necromancer REAL_NAME"
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
/datum/dog_fashion/head/cardborg
name = "Borgi"
speak = list("Ping!","Beep!","Woof!")
@@ -148,6 +152,8 @@
name = "Corgi Tech REAL_NAME"
desc = "The reason your yellow gloves have chew-marks."
/datum/dog_fashion/head/softcap
/datum/dog_fashion/head/reindeer
name = "REAL_NAME the red-nosed Corgi"
emote_hear = list("lights the way!", "illuminates.", "yaps!")
@@ -208,3 +214,38 @@
/datum/dog_fashion/head/fried_vox_empty
name = "Colonel REAL_NAME"
desc = "Keep away from live vox."
/datum/dog_fashion/head/HoS
name = "Head of Security REAL_NAME"
desc = "Probably better than the last HoS."
/datum/dog_fashion/head/beret/sec
name = "Officer REAL_NAME"
desc = "Ever-loyal, ever-vigilant."
/datum/dog_fashion/head/bowlerhat
name = "REAL_NAME"
desc = "A sophisticated city gent."
/datum/dog_fashion/head/surgery
name = "Nurse-in-Training REAL_NAME"
desc = "The most adorable bed-side manner ever."
/datum/dog_fashion/head/bucket
name = "REAL_NAME"
desc = "A janitor's best friend."
/datum/dog_fashion/head/justice_wig
name = "Arbiter REAL_NAME"
desc = "Head of the High Court of Cute."
/datum/dog_fashion/head/wizard/magus
name = "Battlemage REAL_NAME"
/datum/dog_fashion/head/wizard/marisa
name = "Witch REAL_NAME"
desc = "Flying broom not included."
/datum/dog_fashion/head/roman
name = "Imperator REAL_NAME"
desc = "For the Senate and the people of Rome!"
@@ -217,7 +217,7 @@
text = replacetext(text,"{HOLDER}","[holder]")
return text
/datum/construction/reversible2/custom_action(index, diff, used_atom, var/mob/user)
/datum/construction/reversible2/custom_action(index, diff, used_atom, mob/user)
if(!..(index,used_atom,user))
return 0
+1 -1
View File
@@ -45,7 +45,7 @@
return result
// Callback function should take the result as the last argument
/datum/async_input/proc/on_close(var/datum/callback/cb)
/datum/async_input/proc/on_close(datum/callback/cb)
onCloseCb = cb
/datum/async_input/proc/show()
+5 -7
View File
@@ -84,14 +84,12 @@
/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound)
if(location)
if(effect)
spawn(-1)
src = null
effect.attach(location)
effect.start()
src = null
effect.attach(location)
effect.start()
if(sound)
spawn(-1)
src = null
playsound(location,sound,60,1)
src = null
playsound(location,sound,60,1)
return
//do the monkey dance
-1
View File
@@ -21,7 +21,6 @@ GLOBAL_LIST_INIT(huds, list( \
ANTAG_HUD_VAMPIRE = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden(),\
DATA_HUD_ABDUCTOR = new/datum/atom_hud/abductor(),\
ANTAG_HUD_DEVIL = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_EVENTMISC = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_BLOB = new/datum/atom_hud/antag/hidden()\
))
+1 -1
View File
@@ -37,7 +37,7 @@
else
. = subject
/datum/log_record/proc/get_health_string(var/mob/living/L)
/datum/log_record/proc/get_health_string(mob/living/L)
var/OX = L.getOxyLoss() > 50 ? "<b>[L.getOxyLoss()]</b>" : L.getOxyLoss()
var/TX = L.getToxLoss() > 50 ? "<b>[L.getToxLoss()]</b>" : L.getToxLoss()
var/BU = L.getFireLoss() > 50 ? "<b>[L.getFireLoss()]</b>" : L.getFireLoss()
@@ -35,3 +35,8 @@
#undef RAD_GEIGER_LOW
#undef RAD_GEIGER_MEDIUM
#undef RAD_GEIGER_HIGH
/datum/looping_sound/tape_recorder_hiss
mid_sounds = list('sound/items/taperecorder/taperecorder_hiss_mid.ogg')
start_sound = list('sound/items/taperecorder/taperecorder_hiss_start.ogg')
volume = 10
+11 -4
View File
@@ -24,10 +24,15 @@
var/end_sound
var/chance
var/volume = 100
var/muted = TRUE
var/vary = FALSE
var/max_loops
var/direct
var/extra_range = 0
var/falloff_exponent
var/muted = TRUE
var/falloff_distance
/// Channel of the audio, random otherwise
var/channel
/datum/looping_sound/New(list/_output_atoms = list(), start_immediately = FALSE, _direct = FALSE)
if(!mid_sounds)
@@ -72,14 +77,16 @@
var/list/atoms_cache = output_atoms
var/sound/S = sound(soundfile)
if(direct)
S.channel = SSsounds.random_available_channel()
S.volume = volume
S.channel = channel || SSsounds.random_available_channel()
for(var/i in 1 to atoms_cache.len)
var/atom/thing = atoms_cache[i]
if(direct)
if(ismob(thing))
var/mob/M = thing
S.volume = volume * (USER_VOLUME(M, channel) || 1)
SEND_SOUND(thing, S)
else
playsound(thing, S, volume, extrarange = extra_range)
playsound(thing, S, volume, vary, extra_range, falloff_exponent = falloff_exponent, falloff_distance = falloff_distance, channel = channel)
/datum/looping_sound/proc/get_sound(looped, _mid_sounds)
if(!_mid_sounds)
@@ -12,4 +12,8 @@
mid_sounds = list('sound/machines/sm/loops/calm.ogg' = 1)
mid_length = 60
volume = 40
extra_range = 10
extra_range = 25
falloff_exponent = 10
falloff_distance = 5
vary = TRUE
channel = CHANNEL_ENGINE
+4 -4
View File
@@ -8,7 +8,7 @@
start_sound = 'sound/weather/ashstorm/outside/active_start.ogg'
start_length = 130
end_sound = 'sound/weather/ashstorm/outside/active_end.ogg'
volume = 40
volume = 80
/datum/looping_sound/active_inside_ashstorm
mid_sounds = list(
@@ -20,7 +20,7 @@
start_sound = 'sound/weather/ashstorm/inside/active_start.ogg'
start_length = 130
end_sound = 'sound/weather/ashstorm/inside/active_end.ogg'
volume = 30
volume = 60
/datum/looping_sound/weak_outside_ashstorm
mid_sounds = list(
@@ -32,7 +32,7 @@
start_sound = 'sound/weather/ashstorm/outside/weak_start.ogg'
start_length = 130
end_sound = 'sound/weather/ashstorm/outside/weak_end.ogg'
volume = 20
volume = 50
/datum/looping_sound/weak_inside_ashstorm
mid_sounds = list(
@@ -44,4 +44,4 @@
start_sound = 'sound/weather/ashstorm/inside/weak_start.ogg'
start_length = 130
end_sound = 'sound/weather/ashstorm/inside/weak_end.ogg'
volume = 10
volume = 30
+5 -130
View File
@@ -55,10 +55,6 @@
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
var/datum/mindslaves/som //stands for slave or master...hush..
var/datum/devilinfo/devilinfo //Information about the devil, if any.
var/damnation_type = 0
var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src
var/hasSoul = TRUE
var/isholy = FALSE // is this person a chaplain or admin role allowed to use bibles
var/isblessed = FALSE // is this person blessed by a chaplain?
@@ -76,7 +72,6 @@
/datum/mind/New(new_key)
key = new_key
soulOwner = src
/datum/mind/Destroy()
SSticker.minds -= src
@@ -88,7 +83,6 @@
antag_datums = null
current = null
original = null
soulOwner = null
return ..()
/datum/mind/proc/transfer_to(mob/living/new_character)
@@ -314,22 +308,6 @@
. += _memory_edit_role_enabled(ROLE_ABDUCTOR)
/datum/mind/proc/memory_edit_devil(mob/living/H)
. = _memory_edit_header("devil", list("devilagents"))
if(src in SSticker.mode.devils)
if(!devilinfo)
. += "<b>No devilinfo found! Yell at a coder!</b>"
else if(!devilinfo.ascendable)
. += "<b>DEVIL</b>|<a href='?src=[UID()];devil=ascendable_devil'>Ascendable Devil</a>|sintouched|<a href='?src=[UID()];devil=clear'>no</a>"
else
. += "<a href='?src=[UID()];devil=devil'>DEVIL</a>|<b>ASCENDABLE DEVIL</b>|sintouched|<a href='?src=[UID()];devil=clear'>no</a>"
else if(src in SSticker.mode.sintouched)
. += "devil|Ascendable Devil|<b>SINTOUCHED</b>|<a href='?src=[UID()];devil=clear'>no</a>"
else
. += "<a href='?src=[UID()];devil=devil'>devil</a>|<a href='?src=[UID()];devil=ascendable_devil'>Ascendable Devil</a>|<a href='?src=[UID()];devil=sintouched'>sintouched</a>|<b>NO</b>"
. += _memory_edit_role_enabled(ROLE_DEVIL)
/datum/mind/proc/memory_edit_eventmisc(mob/living/H)
. = _memory_edit_header("event", list())
if(src in SSticker.mode.eventmiscs)
@@ -461,10 +439,6 @@
sections["shadowling"] = memory_edit_shadowling(H)
/** Abductors **/
sections["abductor"] = memory_edit_abductor(H)
/** DEVIL ***/
var/static/list/devils_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/carbon/true_devil, /mob/living/silicon/robot))
if(is_type_in_typecache(current, devils_typecache))
sections["devil"] = memory_edit_devil(H)
sections["eventmisc"] = memory_edit_eventmisc(H)
/** TRAITOR ***/
sections["traitor"] = memory_edit_traitor()
@@ -912,7 +886,7 @@
special_role = SPECIAL_ROLE_WIZARD
//ticker.mode.learn_basic_spells(current)
SSticker.mode.update_wiz_icons_added(src)
SEND_SOUND(current, 'sound/ambience/antag/ragesmages.ogg')
SEND_SOUND(current, sound('sound/ambience/antag/ragesmages.ogg'))
to_chat(current, "<span class='danger'>You are a Space Wizard!</span>")
current.faction = list("wizard")
log_admin("[key_name(usr)] has wizarded [key_name(current)]")
@@ -958,7 +932,7 @@
SSticker.mode.grant_changeling_powers(current)
SSticker.mode.update_change_icons_added(src)
special_role = SPECIAL_ROLE_CHANGELING
SEND_SOUND(current, 'sound/ambience/antag/ling_aler.ogg')
SEND_SOUND(current, sound('sound/ambience/antag/ling_aler.ogg'))
to_chat(current, "<B><font color='red'>Your powers have awoken. A flash of memory returns to us... we are a changeling!</font></B>")
log_admin("[key_name(usr)] has changelinged [key_name(current)]")
message_admins("[key_name_admin(usr)] has changelinged [key_name_admin(current)]")
@@ -1003,7 +977,7 @@
slaved.masters += src
som = slaved //we MIGT want to mindslave someone
special_role = SPECIAL_ROLE_VAMPIRE
SEND_SOUND(current, 'sound/ambience/antag/vampalert.ogg')
SEND_SOUND(current, sound('sound/ambience/antag/vampalert.ogg'))
to_chat(current, "<B><font color='red'>Your powers have awoken. Your lust for blood grows... You are a Vampire!</font></B>")
log_admin("[key_name(usr)] has vampired [key_name(current)]")
message_admins("[key_name_admin(usr)] has vampired [key_name_admin(current)]")
@@ -1104,76 +1078,6 @@
SSticker.mode.update_eventmisc_icons_added(src)
message_admins("[key_name_admin(usr)] has eventantag'ed [current].")
log_admin("[key_name(usr)] has eventantag'ed [current].")
else if(href_list["devil"])
switch(href_list["devil"])
if("clear")
if(src in SSticker.mode.devils)
if(istype(current,/mob/living/carbon/true_devil/))
to_chat(usr,"<span class='warning'>This cannot be used on true or arch-devils.</span>")
else
SSticker.mode.devils -= src
SSticker.mode.update_devil_icons_removed(src)
special_role = null
to_chat(current,"<span class='userdanger'>Your infernal link has been severed! You are no longer a devil!</span>")
RemoveSpell(/obj/effect/proc_holder/spell/targeted/infernal_jaunt)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/click/fireball/hellish)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/click/summon_contract)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/violin)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/summon_dancefloor)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/sintouch)
RemoveSpell(/obj/effect/proc_holder/spell/targeted/sintouch/ascended)
message_admins("[key_name_admin(usr)] has de-devil'ed [current].")
if(issilicon(current))
var/mob/living/silicon/S = current
S.laws.clear_sixsixsix_laws()
devilinfo = null
log_admin("[key_name(usr)] has de-devil'ed [current].")
else if(src in SSticker.mode.sintouched)
SSticker.mode.sintouched -= src
message_admins("[key_name_admin(usr)] has de-sintouch'ed [current].")
log_admin("[key_name(usr)] has de-sintouch'ed [current].")
if("devil")
if(devilinfo)
devilinfo.ascendable = FALSE
message_admins("[key_name_admin(usr)] has made [current] unable to ascend as a devil.")
log_admin("[key_name_admin(usr)] has made [current] unable to ascend as a devil.")
return
if(!ishuman(current) && !isrobot(current))
to_chat(usr, "<span class='warning'>This only works on humans and cyborgs!</span>")
return
SSticker.mode.devils += src
special_role = "devil"
SSticker.mode.update_devil_icons_added(src)
SSticker.mode.finalize_devil(src, FALSE)
SSticker.mode.forge_devil_objectives(src, 2)
SSticker.mode.greet_devil(src)
message_admins("[key_name_admin(usr)] has devil'ed [current].")
log_admin("[key_name(usr)] has devil'ed [current].")
if("ascendable_devil")
if(devilinfo)
devilinfo.ascendable = TRUE
message_admins("[key_name_admin(usr)] has made [current] able to ascend as a devil.")
log_admin("[key_name_admin(usr)] has made [current] able to ascend as a devil.")
return
if(!ishuman(current) && !isrobot(current))
to_chat(usr, "<span class='warning'>This only works on humans and cyborgs!</span>")
return
SSticker.mode.devils += src
special_role = "devil"
SSticker.mode.update_devil_icons_added(src)
SSticker.mode.finalize_devil(src, TRUE)
SSticker.mode.forge_devil_objectives(src, 2)
SSticker.mode.greet_devil(src)
message_admins("[key_name_admin(usr)] has devil'ed [current]. The devil has been marked as ascendable.")
log_admin("[key_name(usr)] has devil'ed [current]. The devil has been marked as ascendable.")
if("sintouched")
var/mob/living/carbon/human/H = current
H.influenceSin()
message_admins("[key_name_admin(usr)] has sintouch'ed [current].")
log_admin("[key_name(usr)] has sintouch'ed [current].")
else if(href_list["traitor"])
switch(href_list["traitor"])
@@ -1515,14 +1419,8 @@
else if(href_list["common"])
switch(href_list["common"])
if("undress")
if(ishuman(current))
var/mob/living/carbon/human/H = current
// Don't "undress" organs right out of the body
for(var/obj/item/W in H.contents - (H.bodyparts | H.internal_organs))
current.unEquip(W, 1)
else
for(var/obj/item/W in current)
current.unEquip(W, 1)
for(var/obj/item/I in current)
current.unEquip(I, TRUE)
log_admin("[key_name(usr)] has unequipped [key_name(current)]")
message_admins("[key_name_admin(usr)] has unequipped [key_name_admin(current)]")
if("takeuplink")
@@ -1811,17 +1709,6 @@
var/obj/effect/proc_holder/spell/S = X
S.action.Grant(new_character)
/datum/mind/proc/disrupt_spells(delay, list/exceptions = New())
for(var/X in spell_list)
var/obj/effect/proc_holder/spell/S = X
for(var/type in exceptions)
if(istype(S, type))
continue
S.charge_counter = delay
spawn(0)
S.start_recharge()
S.updateButtonIcon()
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
for(var/mob/dead/observer/G in GLOB.dead_mob_list)
if(G.mind == src)
@@ -1897,18 +1784,6 @@
to_chat(current, "<span class='warning'><b>You seem to have forgotten the events of the past 10 minutes or so, and your head aches a bit as if someone beat it savagely with a stick.</b></span>")
to_chat(current, "<span class='warning'><b>This means you don't remember who you were working for or what you were doing.</b></span>")
/datum/mind/proc/is_revivable() //Note, this ONLY checks the mind.
if(damnation_type)
return FALSE
return TRUE
// returns a mob to message to produce something visible for the target mind
/datum/mind/proc/messageable_mob()
if(!QDELETED(current) && current.client)
return current
else
return get_ghost(even_if_they_cant_reenter = TRUE)
//Initialisation procs
/mob/proc/mind_initialize()
if(mind)
+3 -3
View File
@@ -44,9 +44,9 @@
/datum/outfit/proc/equip_item(mob/living/carbon/human/H, path, slot)
var/obj/item/I = new path(H)
if(collect_not_del)
H.equip_or_collect(I, slot)
H.equip_or_collect(I, slot, TRUE)
else
H.equip_to_slot_or_del(I, slot)
H.equip_to_slot_or_del(I, slot, TRUE)
/datum/outfit/proc/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
//to be overriden for toggling internals, id binding, access etc
@@ -115,7 +115,7 @@
H.equip_or_collect(new path(H), slot_in_backpack)
for(var/path in cybernetic_implants)
var/obj/item/organ/internal/O = new path(H)
var/obj/item/organ/internal/O = new path
O.insert(H)
if(!H.head && toggle_helmet && istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit))
+1 -2
View File
@@ -239,9 +239,8 @@
/obj/item/implant/dust
)
cybernetic_implants = list(
/obj/item/organ/internal/cyberimp/eyes/shield,
/obj/item/organ/internal/cyberimp/eyes/hud/security,
/obj/item/organ/internal/cyberimp/eyes/xray,
/obj/item/organ/internal/eyes/cybernetic/xray,
/obj/item/organ/internal/cyberimp/brain/anti_stun/hardened,
/obj/item/organ/internal/cyberimp/chest/nutriment/plus,
/obj/item/organ/internal/cyberimp/arm/combat/centcom
+3 -3
View File
@@ -125,9 +125,9 @@
// Copy cybernetic implants
O.cybernetic_implants = list()
for(var/obj/item/organ/internal/CI in contents)
if(istype(CI))
O.cybernetic_implants |= CI.type
for(var/org in internal_organs)
var/obj/item/organ/internal/aug = org
O.cybernetic_implants |= aug.type
// Copy accessories
var/obj/item/clothing/under/uniform_slot = get_item_by_slot(slot_w_uniform)
+2 -2
View File
@@ -370,13 +370,13 @@ GLOBAL_LIST_EMPTY(rpd_pipe_list) //Some pipes we don't want to be dispensable
pipe_id = PIPE_DISPOSALS_JUNCTION_LEFT
pipe_icon = "pipe-j2"
/proc/get_pipe_name(var/pipe_id, var/pipe_type)
/proc/get_pipe_name(pipe_id, pipe_type)
for(var/datum/pipes/P in GLOB.construction_pipe_list)
if(P.pipe_id == pipe_id && P.pipe_type == pipe_type)
return P.pipe_name
return "unknown pipe"
/proc/get_pipe_icon(var/pipe_id)
/proc/get_pipe_icon(pipe_id)
for(var/datum/pipes/P in GLOB.construction_pipe_list)
if(P.pipe_id == pipe_id)
return P.pipe_icon
+3 -3
View File
@@ -3,7 +3,7 @@
var/frequency as num
var/list/obj/devices = list()
/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, filter = null as text|null, range = null as num|null)
var/turf/start_point
if(range)
start_point = get_turf(source)
@@ -19,7 +19,7 @@
send_to_filter(source, signal, next_filter, start_point, range)
//Sends a signal to all machines belonging to a given filter. Should be called by post_signal()
/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, var/filter, var/turf/start_point = null, var/range = null)
/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, filter, turf/start_point = null, range = null)
if(range && !start_point)
return
@@ -35,7 +35,7 @@
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
/datum/radio_frequency/proc/add_listener(obj/device as obj, var/filter as text|null)
/datum/radio_frequency/proc/add_listener(obj/device as obj, filter as text|null)
if(!filter)
filter = RADIO_DEFAULT
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")

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