mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Merge branch 'dev' of github.com:Baystation12/Baystation12 into dev
This commit is contained in:
+7
-2
@@ -1,7 +1,12 @@
|
||||
#ignore misc BYOND files
|
||||
*.log
|
||||
*.int
|
||||
*.rsc
|
||||
*.dmb
|
||||
*.lk
|
||||
info.json
|
||||
/config/admins.txt
|
||||
|
||||
#ignore any files in config/, except those in subdirectories.
|
||||
/config/*
|
||||
!/config/*/*
|
||||
|
||||
/baystation12.int
|
||||
|
||||
+16
-68
@@ -5,57 +5,6 @@
|
||||
// END_INTERNALS
|
||||
// BEGIN_FILE_DIR
|
||||
#define FILE_DIR .
|
||||
#define FILE_DIR "code"
|
||||
#define FILE_DIR "code/TriDimension"
|
||||
#define FILE_DIR "code/WorkInProgress"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jungle"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/ShieldGen"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
|
||||
#define FILE_DIR "code/WorkInProgress/Susan"
|
||||
#define FILE_DIR "html"
|
||||
#define FILE_DIR "icons"
|
||||
#define FILE_DIR "icons/48x48"
|
||||
#define FILE_DIR "icons/effects"
|
||||
#define FILE_DIR "icons/mecha"
|
||||
#define FILE_DIR "icons/misc"
|
||||
#define FILE_DIR "icons/mob"
|
||||
#define FILE_DIR "icons/mob/human_races"
|
||||
#define FILE_DIR "icons/obj"
|
||||
#define FILE_DIR "icons/obj/assemblies"
|
||||
#define FILE_DIR "icons/obj/atmospherics"
|
||||
#define FILE_DIR "icons/obj/clothing"
|
||||
#define FILE_DIR "icons/obj/doors"
|
||||
#define FILE_DIR "icons/obj/flora"
|
||||
#define FILE_DIR "icons/obj/machines"
|
||||
#define FILE_DIR "icons/obj/pipes"
|
||||
#define FILE_DIR "icons/pda_icons"
|
||||
#define FILE_DIR "icons/spideros_icons"
|
||||
#define FILE_DIR "icons/Testing"
|
||||
#define FILE_DIR "icons/turf"
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "icons/xenoarch_icons"
|
||||
#define FILE_DIR "nano"
|
||||
#define FILE_DIR "nano/images"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
#define FILE_DIR "sound/effects"
|
||||
#define FILE_DIR "sound/effects/turret"
|
||||
#define FILE_DIR "sound/effects/wind"
|
||||
#define FILE_DIR "sound/hallucinations"
|
||||
#define FILE_DIR "sound/items"
|
||||
#define FILE_DIR "sound/machines"
|
||||
#define FILE_DIR "sound/mecha"
|
||||
#define FILE_DIR "sound/misc"
|
||||
#define FILE_DIR "sound/music"
|
||||
#define FILE_DIR "sound/piano"
|
||||
#define FILE_DIR "sound/violin"
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/voice/Serithi"
|
||||
#define FILE_DIR "sound/vox"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
// END_FILE_DIR
|
||||
// BEGIN_PREFERENCES
|
||||
#define DEBUG
|
||||
@@ -116,6 +65,7 @@
|
||||
#include "code\controllers\verbs.dm"
|
||||
#include "code\controllers\voting.dm"
|
||||
#include "code\datums\ai_laws.dm"
|
||||
#include "code\datums\browser.dm"
|
||||
#include "code\datums\computerfiles.dm"
|
||||
#include "code\datums\datacore.dm"
|
||||
#include "code\datums\datumvars.dm"
|
||||
@@ -198,7 +148,6 @@
|
||||
#include "code\game\atoms.dm"
|
||||
#include "code\game\atoms_movable.dm"
|
||||
#include "code\game\communications.dm"
|
||||
#include "code\game\dna.dm"
|
||||
#include "code\game\hud.dm"
|
||||
#include "code\game\response_team.dm"
|
||||
#include "code\game\shuttle_engines.dm"
|
||||
@@ -209,6 +158,9 @@
|
||||
#include "code\game\area\ai_monitored.dm"
|
||||
#include "code\game\area\areas.dm"
|
||||
#include "code\game\area\Space Station 13 areas.dm"
|
||||
#include "code\game\dna\dna.dm"
|
||||
#include "code\game\dna\dna_misc.dm"
|
||||
#include "code\game\dna\dna_modifier.dm"
|
||||
#include "code\game\gamemodes\events.dm"
|
||||
#include "code\game\gamemodes\factions.dm"
|
||||
#include "code\game\gamemodes\game_mode.dm"
|
||||
@@ -487,6 +439,8 @@
|
||||
#include "code\game\objects\items\devices\flash.dm"
|
||||
#include "code\game\objects\items\devices\flashlight.dm"
|
||||
#include "code\game\objects\items\devices\lightreplacer.dm"
|
||||
#include "code\game\objects\items\devices\megaphone.dm"
|
||||
#include "code\game\objects\items\devices\modkit.dm"
|
||||
#include "code\game\objects\items\devices\multitool.dm"
|
||||
#include "code\game\objects\items\devices\paicard.dm"
|
||||
#include "code\game\objects\items\devices\pipe_painter.dm"
|
||||
@@ -792,6 +746,15 @@
|
||||
#include "code\modules\DetectiveWork\evidence.dm"
|
||||
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
|
||||
#include "code\modules\DetectiveWork\scanner.dm"
|
||||
#include "code\modules\Economy\Accounts.dm"
|
||||
#include "code\modules\Economy\Accounts_DB.dm"
|
||||
#include "code\modules\Economy\ATM.dm"
|
||||
#include "code\modules\Economy\EFTPOS.dm"
|
||||
#include "code\modules\Economy\Events.dm"
|
||||
#include "code\modules\Economy\Events_Mundane.dm"
|
||||
#include "code\modules\Economy\Job_Departments.dm"
|
||||
#include "code\modules\Economy\Misc.dm"
|
||||
#include "code\modules\Economy\TradeDestinations.dm"
|
||||
#include "code\modules\events\alien_infestation.dm"
|
||||
#include "code\modules\events\blob.dm"
|
||||
#include "code\modules\events\brand_intelligence.dm"
|
||||
@@ -949,6 +912,7 @@
|
||||
#include "code\modules\mob\living\carbon\metroid\subtypes.dm"
|
||||
#include "code\modules\mob\living\carbon\metroid\update_icons.dm"
|
||||
#include "code\modules\mob\living\carbon\monkey\death.dm"
|
||||
#include "code\modules\mob\living\carbon\monkey\diona.dm"
|
||||
#include "code\modules\mob\living\carbon\monkey\emote.dm"
|
||||
#include "code\modules\mob\living\carbon\monkey\examine.dm"
|
||||
#include "code\modules\mob\living\carbon\monkey\hud.dm"
|
||||
@@ -1287,15 +1251,6 @@
|
||||
#include "code\WorkInProgress\explosion_particles.dm"
|
||||
#include "code\WorkInProgress\periodic_news.dm"
|
||||
#include "code\WorkInProgress\Apples\artifacts.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\meteor_battery.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_Events.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_Events_Mundane.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Economy_TradeDestinations.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\EFTPOS.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Job_Departments.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"
|
||||
@@ -1331,14 +1286,11 @@
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\SuperMatter.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
|
||||
#include "code\WorkInProgress\Chinsky\ashtray.dm"
|
||||
#include "code\WorkInProgress\Cib\MedicalSideEffects.dm"
|
||||
#include "code\WorkInProgress\kilakk\fax.dm"
|
||||
#include "code\WorkInProgress\Mini\ATM.dm"
|
||||
#include "code\WorkInProgress\Mini\atmos_control.dm"
|
||||
#include "code\WorkInProgress\Ported\policetape.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||
#include "code\WorkInProgress\Susan\susan_desert_turfs.dm"
|
||||
#include "code\ZAS\Airflow.dm"
|
||||
#include "code\ZAS\Connection.dm"
|
||||
#include "code\ZAS\Debug.dm"
|
||||
@@ -1353,8 +1305,4 @@
|
||||
#include "interface\interface.dm"
|
||||
#include "interface\skin.dmf"
|
||||
#include "maps\tgstation2.dmm"
|
||||
#include "maps\RandomZLevels\Academy.dm"
|
||||
#include "maps\RandomZLevels\challenge.dm"
|
||||
#include "maps\RandomZLevels\stationCollision.dm"
|
||||
#include "maps\RandomZLevels\wildwest.dm"
|
||||
// END_INCLUDE
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// BEGIN_INTERNALS
|
||||
/*
|
||||
AUTO_FILE_DIR: OFF
|
||||
*/
|
||||
// END_INTERNALS
|
||||
@@ -1,5 +1,5 @@
|
||||
obj/machinery/atmospherics/tvalve
|
||||
icon = 'valve.dmi'
|
||||
icon = 'icons/obj/atmospherics/valve.dmi'
|
||||
icon_state = "tvalve0"
|
||||
|
||||
name = "manual switching valve"
|
||||
@@ -265,7 +265,7 @@ obj/machinery/atmospherics/tvalve
|
||||
digital // can be controlled by AI
|
||||
name = "digital switching valve"
|
||||
desc = "A digitally controlled valve."
|
||||
icon = 'digital_valve.dmi'
|
||||
icon = 'icons/obj/atmospherics/digital_valve.dmi'
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -329,7 +329,7 @@ obj/machinery/atmospherics/tvalve
|
||||
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to unfasten \the [src]..."
|
||||
if (do_after(user, 40))
|
||||
user.visible_message( \
|
||||
@@ -384,7 +384,7 @@ obj/machinery/atmospherics/tvalve/mirrored
|
||||
digital // can be controlled by AI
|
||||
name = "digital switching valve"
|
||||
desc = "A digitally controlled valve."
|
||||
icon = 'digital_valve.dmi'
|
||||
icon = 'icons/obj/atmospherics/digital_valve.dmi'
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//Based off Heat Reservoir and Space Heater
|
||||
//Transfers heat between a pipe system and environment, based on which has a greater thermal energy concentration
|
||||
|
||||
icon = 'cold_sink.dmi'
|
||||
icon = 'icons/obj/atmospherics/cold_sink.dmi'
|
||||
icon_state = "intact_off"
|
||||
|
||||
name = "Thermal Transfer Plate"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
icon = 'heat.dmi'
|
||||
icon = 'icons/obj/pipes/heat.dmi'
|
||||
icon_state = "intact"
|
||||
level = 2
|
||||
var/initialize_directions_he
|
||||
@@ -58,7 +58,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
|
||||
|
||||
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||
icon = 'junction.dmi'
|
||||
icon = 'icons/obj/pipes/junction.dmi'
|
||||
icon_state = "intact"
|
||||
level = 2
|
||||
minimum_temperature_difference = 300
|
||||
|
||||
@@ -936,7 +936,7 @@ obj/machinery/atmospherics/pipe
|
||||
|
||||
else
|
||||
icon_state = "manifold4w_ex"
|
||||
var/icon/con = new/icon('pipe_manifold.dmi',"manifold4w_con") //Since 4-ways are supposed to be directionless, they need an overlay instead it seems.
|
||||
var/icon/con = new/icon('icons/obj/atmospherics/pipe_manifold.dmi',"manifold4w_con") //Since 4-ways are supposed to be directionless, they need an overlay instead it seems.
|
||||
|
||||
if(node1)
|
||||
overlays += new/image(con,dir=1)
|
||||
@@ -1033,7 +1033,7 @@ obj/machinery/atmospherics/pipe
|
||||
cap
|
||||
name = "pipe endcap"
|
||||
desc = "An endcap for pipes"
|
||||
icon = 'pipes.dmi'
|
||||
icon = 'icons/obj/pipes.dmi'
|
||||
icon_state = "cap"
|
||||
level = 2
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
///////////////////////////////////////
|
||||
|
||||
/obj/multiz
|
||||
icon = 'multiz.dmi'
|
||||
icon = 'code/TriDimension/multiz.dmi'
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
var/minimap_updating = 0
|
||||
|
||||
var/icon/minimap_icon = new('minimap.dmi', "chunk_base")
|
||||
var/icon/minimap_icon = new('icons/minimap.dmi', "chunk_base")
|
||||
var/obj/minimap_obj/minimap_obj = new()
|
||||
|
||||
/obj/minimap_obj/Click(location, control, params)
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
if(!(t in visibleTurfs))
|
||||
if(!t.obscured)
|
||||
t.obscured = image('cameravis.dmi', t, "black", 15)
|
||||
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
|
||||
|
||||
obscured += t.obscured
|
||||
for(var/mob/aiEye/m in seenby)
|
||||
@@ -253,7 +253,7 @@
|
||||
for(var/turf/t in dimAdded)
|
||||
if(!(t in visibleTurfs))
|
||||
if(!t.dim)
|
||||
t.dim = image('cameravis.dmi', t, "dim", 15)
|
||||
t.dim = image('icons/effects/cameravis.dmi', t, "dim", 15)
|
||||
t.mouse_opacity = 0
|
||||
|
||||
dim += t.dim
|
||||
@@ -277,7 +277,7 @@
|
||||
for(var/turf/t in visRemoved)
|
||||
if(t in obscuredTurfs)
|
||||
if(!t.obscured)
|
||||
t.obscured = image('cameravis.dmi', t, "black", 15)
|
||||
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
|
||||
|
||||
obscured += t.obscured
|
||||
for(var/mob/aiEye/m in seenby)
|
||||
@@ -313,14 +313,14 @@
|
||||
|
||||
for(var/turf/t in obscuredTurfs)
|
||||
if(!t.obscured)
|
||||
t.obscured = image('cameravis.dmi', t, "black", 15)
|
||||
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
|
||||
|
||||
obscured += t.obscured
|
||||
|
||||
for(var/turf/t in dimTurfs)
|
||||
if(!(t in visibleTurfs))
|
||||
if(!t.dim)
|
||||
t.dim = image('cameravis.dmi', t, "dim", TURF_LAYER)
|
||||
t.dim = image('icons/effects/cameravis.dmi', t, "dim", TURF_LAYER)
|
||||
t.dim.mouse_opacity = 0
|
||||
|
||||
dim += t.dim
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/z
|
||||
|
||||
|
||||
var/icon/minimap_icon = new('minimap.dmi', "chunk_base")
|
||||
var/icon/minimap_icon = new('icons/minimap.dmi', "chunk_base")
|
||||
var/obj/minimap_obj/minimap_obj = new()
|
||||
|
||||
|
||||
@@ -77,13 +77,13 @@
|
||||
|
||||
for(var/turf/t in obscuredTurfs)
|
||||
if(!t.obscured)
|
||||
t.obscured = image('cameravis.dmi', t, "black", 15)
|
||||
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
|
||||
|
||||
obscured += t.obscured
|
||||
|
||||
for(var/turf/t in dimTurfs)
|
||||
if(!t.dim)
|
||||
t.dim = image('cameravis.dmi', t, "dim", TURF_LAYER)
|
||||
t.dim = image('icons/effects/cameravis.dmi', t, "dim", TURF_LAYER)
|
||||
t.dim.mouse_opacity = 0
|
||||
|
||||
dim += t.dim
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
if(!(t in visibleTurfs))
|
||||
if(!t.obscured)
|
||||
t.obscured = image('cameravis.dmi', t, "black", 15)
|
||||
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
|
||||
|
||||
obscured += t.obscured
|
||||
images_added += t.obscured
|
||||
@@ -192,7 +192,7 @@
|
||||
for(var/turf/t in dimAdded)
|
||||
if(!(t in visibleTurfs))
|
||||
if(!t.dim)
|
||||
t.dim = image('cameravis.dmi', t, "dim", 15)
|
||||
t.dim = image('icons/effects/cameravis.dmi', t, "dim", 15)
|
||||
t.dim.mouse_opacity = 0
|
||||
|
||||
dim += t.dim
|
||||
@@ -210,7 +210,7 @@
|
||||
for(var/turf/t in visRemoved)
|
||||
if(t in obscuredTurfs)
|
||||
if(!t.obscured)
|
||||
t.obscured = image('cameravis.dmi', t, "black", 15)
|
||||
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
|
||||
|
||||
obscured += t.obscured
|
||||
images_added += t.obscured
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/changestone
|
||||
name = "An uncut ruby"
|
||||
desc = "The ruby shines and catches the light, despite being uncut"
|
||||
icon = 'artifacts.dmi'
|
||||
icon = 'icons/obj/artifacts.dmi'
|
||||
icon_state = "changerock"
|
||||
|
||||
obj/item/changestone/attack_hand(var/mob/user as mob)
|
||||
|
||||
@@ -1,340 +0,0 @@
|
||||
var/global/current_date_string
|
||||
var/global/num_financial_terminals = 1
|
||||
var/global/datum/money_account/station_account
|
||||
var/global/list/datum/money_account/department_accounts = list()
|
||||
var/global/next_account_number = 0
|
||||
var/global/obj/machinery/account_database/centcomm_account_db
|
||||
var/global/datum/money_account/vendor_account
|
||||
var/global/list/all_money_accounts = list()
|
||||
|
||||
/proc/create_station_account()
|
||||
if(!station_account)
|
||||
next_account_number = rand(111111, 999999)
|
||||
|
||||
station_account = new()
|
||||
station_account.owner_name = "[station_name()] Station Account"
|
||||
station_account.account_number = rand(111111, 999999)
|
||||
station_account.remote_access_pin = rand(1111, 111111)
|
||||
station_account.money = 75000
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = station_account.owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = 75000
|
||||
T.date = "2nd April, 2555"
|
||||
T.time = "11:24"
|
||||
T.source_terminal = "Biesel GalaxyNet Terminal #277"
|
||||
|
||||
//add the account
|
||||
station_account.transaction_log.Add(T)
|
||||
all_money_accounts.Add(station_account)
|
||||
|
||||
/proc/create_department_account(department)
|
||||
next_account_number = rand(111111, 999999)
|
||||
|
||||
var/datum/money_account/department_account = new()
|
||||
department_account.owner_name = "[department] Account"
|
||||
department_account.account_number = rand(111111, 999999)
|
||||
department_account.remote_access_pin = rand(1111, 111111)
|
||||
department_account.money = 5000
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = department_account.owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = department_account.money
|
||||
T.date = "2nd April, 2555"
|
||||
T.time = "11:24"
|
||||
T.source_terminal = "Biesel GalaxyNet Terminal #277"
|
||||
|
||||
//add the account
|
||||
department_account.transaction_log.Add(T)
|
||||
all_money_accounts.Add(department_account)
|
||||
|
||||
department_accounts[department] = department_account
|
||||
|
||||
//the current ingame time (hh:mm) can be obtained by calling:
|
||||
//worldtime2text()
|
||||
|
||||
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/account_database/source_db)
|
||||
|
||||
//create a new account
|
||||
var/datum/money_account/M = new()
|
||||
M.owner_name = new_owner_name
|
||||
M.remote_access_pin = rand(1111, 111111)
|
||||
M.money = starting_funds
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = new_owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = starting_funds
|
||||
if(!source_db)
|
||||
//set a random date, time and location some time over the past few decades
|
||||
T.date = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 25[rand(10,56)]"
|
||||
T.time = "[rand(0,24)]:[rand(11,59)]"
|
||||
T.source_terminal = "NTGalaxyNet Terminal #[rand(111,1111)]"
|
||||
|
||||
M.account_number = rand(111111, 999999)
|
||||
else
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = source_db.machine_id
|
||||
|
||||
M.account_number = next_account_number
|
||||
next_account_number += rand(1,25)
|
||||
|
||||
//create a sealed package containing the account details
|
||||
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(source_db.loc)
|
||||
|
||||
var/obj/item/weapon/paper/R = new /obj/item/weapon/paper(P)
|
||||
P.wrapped = R
|
||||
R.name = "Account information: [M.owner_name]"
|
||||
R.info = "<b>Account details (confidential)</b><br><hr><br>"
|
||||
R.info += "<i>Account holder:</i> [M.owner_name]<br>"
|
||||
R.info += "<i>Account number:</i> [M.account_number]<br>"
|
||||
R.info += "<i>Account pin:</i> [M.remote_access_pin]<br>"
|
||||
R.info += "<i>Starting balance:</i> $[M.money]<br>"
|
||||
R.info += "<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>"
|
||||
R.info += "<i>Creation terminal ID:</i> [source_db.machine_id]<br>"
|
||||
R.info += "<i>Authorised NT officer overseeing creation:</i> [source_db.held_card.registered_name]<br>"
|
||||
|
||||
//stamp the paper
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
if(!R.stamped)
|
||||
R.stamped = new
|
||||
R.stamped += /obj/item/weapon/stamp
|
||||
R.overlays += stampoverlay
|
||||
R.stamps += "<HR><i>This paper has been stamped by the Accounts Database.</i>"
|
||||
|
||||
//add the account
|
||||
M.transaction_log.Add(T)
|
||||
all_money_accounts.Add(M)
|
||||
|
||||
return M
|
||||
|
||||
/datum/money_account
|
||||
var/owner_name = ""
|
||||
var/account_number = 0
|
||||
var/remote_access_pin = 0
|
||||
var/money = 0
|
||||
var/list/transaction_log = list()
|
||||
var/security_level = 1 //0 - auto-identify from worn ID, require only account number
|
||||
//1 - require manual login / account number and pin
|
||||
//2 - require card and manual login
|
||||
|
||||
/datum/transaction
|
||||
var/target_name = ""
|
||||
var/purpose = ""
|
||||
var/amount = 0
|
||||
var/date = ""
|
||||
var/time = ""
|
||||
var/source_terminal = ""
|
||||
|
||||
/obj/machinery/account_database
|
||||
name = "Accounts database"
|
||||
desc = "Holds transaction logs, account data and all kinds of other financial records."
|
||||
icon = 'virology.dmi'
|
||||
icon_state = "analyser"
|
||||
density = 1
|
||||
req_one_access = list(access_hop, access_captain)
|
||||
var/receipt_num
|
||||
var/machine_id = ""
|
||||
var/obj/item/weapon/card/id/held_card
|
||||
var/access_level = 0
|
||||
var/datum/money_account/detailed_account_view
|
||||
var/creating_new_account = 0
|
||||
var/activated = 1
|
||||
|
||||
/obj/machinery/account_database/New()
|
||||
..()
|
||||
if(!station_account)
|
||||
create_station_account()
|
||||
|
||||
if(department_accounts.len == 0)
|
||||
for(var/department in station_departments)
|
||||
create_department_account(department)
|
||||
if(!vendor_account)
|
||||
create_department_account("Vendor")
|
||||
vendor_account = department_accounts["Vendor"]
|
||||
|
||||
if(!current_date_string)
|
||||
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"
|
||||
|
||||
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
|
||||
|
||||
/obj/machinery/account_database/attack_hand(mob/user as mob)
|
||||
if(get_dist(src,user) <= 1)
|
||||
var/dat = "<b>Accounts Database</b><br>"
|
||||
dat += "<i>[machine_id]</i><br>"
|
||||
dat += "Confirm identity: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card : "-----"]</a><br>"
|
||||
|
||||
if(access_level > 0)
|
||||
dat += "<a href='?src=\ref[src];toggle_activated=1'>[activated ? "Disable" : "Enable"] remote access</a><br>"
|
||||
dat += "You may not edit accounts at this terminal, only create and view them.<br>"
|
||||
if(creating_new_account)
|
||||
dat += "<br>"
|
||||
dat += "<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a>"
|
||||
dat += "<form name='create_account' action='?src=\ref[src]' method='get'>"
|
||||
dat += "<input type='hidden' name='src' value='\ref[src]'>"
|
||||
dat += "<input type='hidden' name='choice' value='finalise_create_account'>"
|
||||
dat += "<b>Holder name:</b> <input type='text' id='holder_name' name='holder_name' style='width:250px; background-color:white;'><br>"
|
||||
dat += "<b>Initial funds:</b> <input type='text' id='starting_funds' name='starting_funds' style='width:250px; background-color:white;'> (subtracted from station account)<br>"
|
||||
dat += "<i>New accounts are automatically assigned a secret number and pin, which are printed separately in a sealed package.</i><br>"
|
||||
dat += "<input type='submit' value='Create'><br>"
|
||||
dat += "</form>"
|
||||
else
|
||||
if(detailed_account_view)
|
||||
dat += "<br>"
|
||||
dat += "<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a><hr>"
|
||||
dat += "<b>Account number:</b> #[detailed_account_view.account_number]<br>"
|
||||
dat += "<b>Account holder:</b> [detailed_account_view.owner_name]<br>"
|
||||
dat += "<b>Account balance:</b> $[detailed_account_view.money]<br>"
|
||||
dat += "<table border=1 style='width:100%'>"
|
||||
dat += "<tr>"
|
||||
dat += "<td><b>Date</b></td>"
|
||||
dat += "<td><b>Time</b></td>"
|
||||
dat += "<td><b>Target</b></td>"
|
||||
dat += "<td><b>Purpose</b></td>"
|
||||
dat += "<td><b>Value</b></td>"
|
||||
dat += "<td><b>Source terminal ID</b></td>"
|
||||
dat += "</tr>"
|
||||
for(var/datum/transaction/T in detailed_account_view.transaction_log)
|
||||
dat += "<tr>"
|
||||
dat += "<td>[T.date]</td>"
|
||||
dat += "<td>[T.time]</td>"
|
||||
dat += "<td>[T.target_name]</td>"
|
||||
dat += "<td>[T.purpose]</td>"
|
||||
dat += "<td>$[T.amount]</td>"
|
||||
dat += "<td>[T.source_terminal]</td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];choice=create_account;'>Create new account</a><br><br>"
|
||||
dat += "<table border=1 style='width:100%'>"
|
||||
for(var/i=1, i<=all_money_accounts.len, i++)
|
||||
var/datum/money_account/D = all_money_accounts[i]
|
||||
dat += "<tr>"
|
||||
dat += "<td>#[D.account_number]</td>"
|
||||
dat += "<td>[D.owner_name]</td>"
|
||||
dat += "<td><a href='?src=\ref[src];choice=view_account_detail;account_index=[i]'>View in detail</a></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
|
||||
user << browse(dat,"window=account_db;size=700x650")
|
||||
else
|
||||
user << browse(null,"window=account_db")
|
||||
|
||||
/obj/machinery/account_database/attackby(O as obj, user as mob)//TODO:SANITY
|
||||
if(istype(O, /obj/item/weapon/card))
|
||||
var/obj/item/weapon/card/id/idcard = O
|
||||
if(!held_card)
|
||||
usr.drop_item()
|
||||
idcard.loc = src
|
||||
held_card = idcard
|
||||
|
||||
if(access_cent_captain in idcard.access)
|
||||
access_level = 2
|
||||
else if(access_hop in idcard.access || access_captain in idcard.access)
|
||||
access_level = 1
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/account_database/Topic(var/href, var/href_list)
|
||||
|
||||
if(href_list["toggle_activated"])
|
||||
activated = !activated
|
||||
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if("create_account")
|
||||
creating_new_account = 1
|
||||
if("finalise_create_account")
|
||||
var/account_name = href_list["holder_name"]
|
||||
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
|
||||
create_account(account_name, starting_funds, src)
|
||||
if(starting_funds > 0)
|
||||
//subtract the money
|
||||
station_account.money -= starting_funds
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = account_name
|
||||
T.purpose = "New account funds initialisation"
|
||||
T.amount = "([starting_funds])"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = machine_id
|
||||
station_account.transaction_log.Add(T)
|
||||
|
||||
creating_new_account = 0
|
||||
if("insert_card")
|
||||
if(held_card)
|
||||
held_card.loc = src.loc
|
||||
|
||||
if(ishuman(usr) && !usr.get_active_hand())
|
||||
usr.put_in_hands(held_card)
|
||||
held_card = null
|
||||
access_level = 0
|
||||
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
usr.drop_item()
|
||||
C.loc = src
|
||||
held_card = C
|
||||
|
||||
if(access_cent_captain in C.access)
|
||||
access_level = 2
|
||||
else if(access_hop in C.access || access_captain in C.access)
|
||||
access_level = 1
|
||||
if("view_account_detail")
|
||||
var/index = text2num(href_list["account_index"])
|
||||
if(index && index <= all_money_accounts.len)
|
||||
detailed_account_view = all_money_accounts[index]
|
||||
if("view_accounts_list")
|
||||
detailed_account_view = null
|
||||
creating_new_account = 0
|
||||
|
||||
src.attack_hand(usr)
|
||||
|
||||
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == attempt_account_number)
|
||||
D.money += amount
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = source_name
|
||||
T.purpose = purpose
|
||||
if(amount < 0)
|
||||
T.amount = "([amount])"
|
||||
else
|
||||
T.amount = "[amount]"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = terminal_id
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
|
||||
/obj/machinery/account_database/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == attempt_account_number)
|
||||
if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number) )
|
||||
return D
|
||||
|
||||
/obj/machinery/account_database/proc/get_account(var/account_number)
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == account_number)
|
||||
return D
|
||||
@@ -50,7 +50,7 @@
|
||||
/mob/living/simple_animal/hostile/panther
|
||||
name = "panther"
|
||||
desc = "A long sleek, black cat with sharp teeth and claws."
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "panther"
|
||||
icon_living = "panther"
|
||||
icon_dead = "panther_dead"
|
||||
@@ -108,7 +108,7 @@
|
||||
/mob/living/simple_animal/hostile/snake
|
||||
name = "snake"
|
||||
desc = "A sinuously coiled, venomous looking reptile."
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "snake"
|
||||
icon_living = "snake"
|
||||
icon_dead = "snake_dead"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/obj/structure/bush
|
||||
name = "foliage"
|
||||
desc = "Pretty thick scrub, it'll take something sharp and a lot of determination to clear away."
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "bush1"
|
||||
density = 1
|
||||
anchored = 1
|
||||
@@ -68,12 +68,12 @@ var/jungle_plants_init = 0
|
||||
seed = ""
|
||||
name = "jungle fruit"
|
||||
desc = "It smells weird and looks off."
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "orange"
|
||||
potency = 1
|
||||
|
||||
/obj/structure/jungle_plant
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "plant1"
|
||||
desc = "Looks like some of that fruit might be edible."
|
||||
var/fruits_left = 3
|
||||
@@ -92,7 +92,7 @@ var/jungle_plants_init = 0
|
||||
fruit_type = rand(1,7)
|
||||
icon_state = "plant[fruit_type]"
|
||||
fruits_left = rand(1,5)
|
||||
fruit_overlay = icon('jungle.dmi',"fruit[fruits_left]")
|
||||
fruit_overlay = icon('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"fruit[fruits_left]")
|
||||
fruit_r = 255 - fruit_type * 36
|
||||
fruit_g = rand(1,255)
|
||||
fruit_b = fruit_type * 36
|
||||
@@ -113,7 +113,7 @@ var/jungle_plants_init = 0
|
||||
J.attack_hand(user)
|
||||
|
||||
overlays -= fruit_overlay
|
||||
fruit_overlay = icon('jungle.dmi',"fruit[fruits_left]")
|
||||
fruit_overlay = icon('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"fruit[fruits_left]")
|
||||
fruit_overlay.Blend(rgb(fruit_r, fruit_g, fruit_b), ICON_ADD)
|
||||
overlays += fruit_overlay
|
||||
else
|
||||
|
||||
@@ -3,37 +3,37 @@
|
||||
/area/jungle/temple_one
|
||||
name = "temple"
|
||||
lighting_use_dynamic = 1
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "temple1"
|
||||
|
||||
/area/jungle/temple_two
|
||||
name = "temple"
|
||||
lighting_use_dynamic = 1
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "temple2"
|
||||
|
||||
/area/jungle/temple_three
|
||||
name = "temple"
|
||||
lighting_use_dynamic = 1
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "temple3"
|
||||
|
||||
/area/jungle/temple_four
|
||||
name = "temple"
|
||||
lighting_use_dynamic = 1
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "temple4"
|
||||
|
||||
/area/jungle/temple_five
|
||||
name = "temple"
|
||||
lighting_use_dynamic = 1
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "temple5"
|
||||
|
||||
/area/jungle/temple_six
|
||||
name = "temple"
|
||||
lighting_use_dynamic = 1
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "temple6"
|
||||
|
||||
/obj/effect/landmark/door_spawner
|
||||
@@ -284,7 +284,7 @@
|
||||
/obj/effect/step_trigger/trap
|
||||
name = "trap"
|
||||
icon = 'code/workinprogress/cael_aislinn/jungle/jungle.dmi'
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "trap"
|
||||
var/trap_type
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
M.apply_damage(rand(5,10), BRUTE)
|
||||
|
||||
var/atom/myloc = src.loc
|
||||
var/image/flicker = image('jungle.dmi',"sawblade")
|
||||
var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"sawblade")
|
||||
myloc.overlays += flicker
|
||||
spawn(8)
|
||||
myloc.overlays -= flicker
|
||||
@@ -320,7 +320,7 @@
|
||||
M.apply_damage(rand(5,10), TOX)
|
||||
|
||||
var/atom/myloc = src.loc
|
||||
var/image/flicker = image('jungle.dmi',"dart[rand(1,3)]")
|
||||
var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"dart[rand(1,3)]")
|
||||
myloc.overlays += flicker
|
||||
spawn(8)
|
||||
myloc.overlays -= flicker
|
||||
@@ -331,7 +331,7 @@
|
||||
M.apply_damage(rand(5,10), BURN)
|
||||
|
||||
var/atom/myloc = src.loc
|
||||
var/image/flicker = image('jungle.dmi',"flameburst")
|
||||
var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"flameburst")
|
||||
myloc.overlays += flicker
|
||||
spawn(8)
|
||||
myloc.overlays -= flicker
|
||||
@@ -347,7 +347,7 @@
|
||||
M.visible_message("\red <b>The floor under [M] suddenly tips upward!</b>","\red <b>The floor tips upward under you!</b>")
|
||||
|
||||
var/atom/myloc = src.loc
|
||||
var/image/flicker = image('jungle.dmi',"throw[throw_dir]")
|
||||
var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"throw[throw_dir]")
|
||||
myloc.overlays += flicker
|
||||
var/turf/my_turf = get_turf(loc)
|
||||
if(!my_turf.density)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/obj/effect/jungle_tribe_spawn
|
||||
name = "campfire"
|
||||
desc = "Looks cosy, in an alien sort of way."
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "campfire"
|
||||
anchored = 1
|
||||
var/list/tribesmen = list()
|
||||
@@ -46,7 +46,7 @@
|
||||
/mob/living/simple_animal/hostile/tribesman
|
||||
name = "tribesman"
|
||||
desc = "A noble savage, doesn't seem to know what to make of you."
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "native1"
|
||||
icon_living = "native1"
|
||||
icon_dead = "native1_dead"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/plants_spawn = 1
|
||||
name = "wet grass"
|
||||
desc = "Thick, long wet grass"
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "grass1"
|
||||
var/icon_spawn_state = "grass1"
|
||||
luminosity = 3
|
||||
@@ -16,7 +16,7 @@
|
||||
if(prob(90))
|
||||
var/image/I
|
||||
if(prob(35))
|
||||
I = image('jungle.dmi',"plant[rand(1,7)]")
|
||||
I = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"plant[rand(1,7)]")
|
||||
else
|
||||
if(prob(30))
|
||||
I = image('icons/obj/flora/ausflora.dmi',"reedbush_[rand(1,4)]")
|
||||
@@ -46,7 +46,7 @@
|
||||
bushes_spawn = 0
|
||||
name = "wet grass"
|
||||
desc = "thick, long wet grass"
|
||||
icon = 'jungle.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi'
|
||||
icon_state = "grass_path"
|
||||
icon_spawn_state = "grass2"
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
switch(newsize)
|
||||
if(1)
|
||||
size = 1
|
||||
icon = 'rust.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "emfield_s1"
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
@@ -274,7 +274,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
changed = 1
|
||||
if(3)
|
||||
size = 3
|
||||
icon = '96x96.dmi'
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "emfield_s3"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
@@ -282,7 +282,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
changed = 3
|
||||
if(5)
|
||||
size = 5
|
||||
icon = '160x160.dmi'
|
||||
icon = 'icons/effects/160x160.dmi'
|
||||
icon_state = "emfield_s5"
|
||||
pixel_x = -64
|
||||
pixel_y = -64
|
||||
@@ -290,7 +290,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
changed = 5
|
||||
if(7)
|
||||
size = 7
|
||||
icon = '224x224.dmi'
|
||||
icon = 'icons/effects/224x224.dmi'
|
||||
icon_state = "emfield_s7"
|
||||
pixel_x = -96
|
||||
pixel_y = -96
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
return
|
||||
/*
|
||||
var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
|
||||
playsound(src.loc, 'emitter.ogg', 25, 1)
|
||||
playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
|
||||
if(prob(35))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
@@ -119,7 +119,7 @@
|
||||
A.damage = mega_energy * 500
|
||||
//
|
||||
A.icon_state = "emitter"
|
||||
playsound(src.loc, 'emitter.ogg', 25, 1)
|
||||
playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
|
||||
use_power(100 * mega_energy + 500)
|
||||
/*if(prob(35))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
//gimmicky hack to collect particles and direct them into the field
|
||||
/obj/effect/rust_particle_catcher
|
||||
icon = 'effects.dmi'
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 4
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/obj/effect/energy_field
|
||||
name = "energy field"
|
||||
desc = "Impenetrable field of energy, capable of blocking anything as long as it's active."
|
||||
icon = 'shielding.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/ShieldGen/shielding.dmi'
|
||||
icon_state = "shieldsparkles"
|
||||
anchored = 1
|
||||
layer = 4.1 //just above mobs
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/obj/machinery/shield_capacitor
|
||||
name = "shield capacitor"
|
||||
desc = "Machine that charges a shield generator."
|
||||
icon = 'shielding.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/ShieldGen/shielding.dmi'
|
||||
icon_state = "capacitor"
|
||||
var/active = 1
|
||||
density = 1
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/obj/machinery/shield_gen
|
||||
name = "shield generator"
|
||||
desc = "Machine that generates an impenetrable field of energy when activated."
|
||||
icon = 'shielding.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/ShieldGen/shielding.dmi'
|
||||
icon_state = "generator0"
|
||||
var/active = 0
|
||||
var/field_radius = 3
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/state = 1.0
|
||||
//var/obj/beam/e_beam/first
|
||||
var/power = 500
|
||||
icon = 'engine.dmi'
|
||||
icon = 'icons/obj/engine.dmi'
|
||||
icon_state = "laser"
|
||||
anchored = 1
|
||||
var/id
|
||||
@@ -44,7 +44,7 @@
|
||||
/*
|
||||
/obj/beam/e_beam
|
||||
name = "Laser beam"
|
||||
icon = 'projectiles.dmi'
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "u_laser"
|
||||
var/obj/machinery/engine/laser/master = null
|
||||
var/obj/beam/e_beam/next = null
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/machinery/power/supermatter
|
||||
name = "Supermatter"
|
||||
desc = "A strangely translucent and iridescent crystal. \red You get headaches just from looking at it."
|
||||
icon = 'engine.dmi'
|
||||
icon = 'icons/obj/engine.dmi'
|
||||
icon_state = "darkmatter"
|
||||
density = 1
|
||||
anchored = 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/obj/machinery/zero_point_emitter
|
||||
name = "Zero-point laser"
|
||||
desc = "A super-powerful laser"
|
||||
icon = 'engine.dmi'
|
||||
icon = 'icons/obj/engine.dmi'
|
||||
icon_state = "laser"
|
||||
anchored = 0
|
||||
density = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/obj/item/projectile/missile
|
||||
name = "missile"
|
||||
icon = 'meteor_turret.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/meteor_turret.dmi'
|
||||
icon_state = "missile"
|
||||
var/turf/target
|
||||
var/tracking = 0
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/machinery/meteor_battery
|
||||
name = "meteor battery"
|
||||
icon = 'meteor_turret.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/meteor_turret.dmi'
|
||||
icon_state = "turret0"
|
||||
var/raised = 0
|
||||
var/enabled = 1
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
/obj/machinery/meteor_battery/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
|
||||
..()
|
||||
playsound(src.loc, 'smash.ogg', 60, 1)
|
||||
playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
|
||||
src.spark_system.start()
|
||||
src.health -= W.force * 0.5
|
||||
if (src.health <= 0)
|
||||
@@ -249,7 +249,7 @@
|
||||
|
||||
/obj/machinery/meteor_battery/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if(!(stat & BROKEN))
|
||||
playsound(src.loc, 'slash.ogg', 25, 1, -1)
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
name = "\improper sculpture"
|
||||
real_name = "sculpture"
|
||||
desc = "It's some kind of human sized, doll-like sculpture, with weird discolourations on some parts of it. It appears to be quite solid. "
|
||||
icon = 'unknown.dmi'
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/unknown.dmi'
|
||||
icon_state = "sculpture"
|
||||
icon_living = "sculpture"
|
||||
icon_dead = "sculpture"
|
||||
@@ -30,7 +30,7 @@
|
||||
G.synch()
|
||||
target.LAssailant = src
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("\red [src] has grabbed [target]!")
|
||||
target << "\red <b>You feel something suddenly grab you around the neck from behind!</b> Everything goes black..."
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/ashtray
|
||||
icon = 'ashtray.dmi'
|
||||
icon = 'icons/ashtray.dmi'
|
||||
var/
|
||||
max_butts = 0
|
||||
empty_desc = ""
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return
|
||||
if (health > 0)
|
||||
attacked += 10
|
||||
playsound(loc, 'bite.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
@@ -71,14 +71,14 @@
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
else if(M.type == /mob/living/carbon/human/tajaran)
|
||||
damage += 10
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
adjustBruteLoss(damage/10)
|
||||
updatehealth()
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
else if(M.type == /mob/living/carbon/human/tajaran)
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
|
||||
@@ -100,14 +100,14 @@
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||
|
||||
else
|
||||
if (!( paralysis ))
|
||||
drop_item()
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
if ("hurt")
|
||||
if ((prob(95) && health > 0))
|
||||
playsound(loc, 'slice.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
var/damage = rand(15, 30)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
@@ -134,7 +134,7 @@
|
||||
updatehealth()
|
||||
react_to_attack(M)
|
||||
else
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
|
||||
@@ -155,12 +155,12 @@
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||
|
||||
if ("disarm")
|
||||
playsound(loc, 'pierce.ogg', 25, 1, -1)
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
|
||||
var/damage = 5
|
||||
if(prob(95))
|
||||
Weaken(rand(10,15))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
|
||||
/obj/hud/proc/amorph_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/effect/admin_log_trap
|
||||
name = "Herprpr"
|
||||
desc = "Stepping on this is good."
|
||||
icon = 'screen1.dmi'
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x2"
|
||||
anchored = 1.0
|
||||
unacidable = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/obj/machinery/computer/atmoscontrol
|
||||
name = "\improper Central Atmospherics Computer"
|
||||
icon = 'computer.dmi'
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "computer_generic"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//remove this shit when someonething better is done
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater
|
||||
name = "Heat Regulator"
|
||||
icon = 'Cryogenic2.dmi'
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "freezer_0"
|
||||
density = 1
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
/obj/item/device/uplink/pda
|
||||
name = "uplink module"
|
||||
desc = "An electronic uplink system of unknown origin."
|
||||
icon = 'module.dmi'
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "power_mod"
|
||||
var/obj/item/device/pda/hostpda = null
|
||||
|
||||
@@ -312,7 +312,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
/obj/item/device/uplink/radio
|
||||
name = "ship bounced radio"
|
||||
icon = 'radio.dmi'
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "radio"
|
||||
var/temp = null //Temporary storage area for a message offering the option to destroy the radio
|
||||
var/selfdestruct = 0 //Set to 1 while the radio is self destructing itself.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/obj/machinery/copier
|
||||
name = "Copy Machine"
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "copier_o"
|
||||
density = 1
|
||||
anchored = 1
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
// fx
|
||||
flick("copier_s", src)
|
||||
playsound(src, 'polaroid1.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
|
||||
// dup the file
|
||||
if(istype(template, /obj/item/weapon/paper))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/structure/filingcabinet
|
||||
name = "Filing Cabinet"
|
||||
desc = "A large cabinet with drawers."
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "filingcabinet"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
/obj/spawner/bomb
|
||||
name = "bomb"
|
||||
icon = 'screen1.dmi'
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x"
|
||||
var/btype = 0 //0 = radio, 1= prox, 2=time
|
||||
var/explosive = 1 // 0= firebomb
|
||||
@@ -30,7 +30,7 @@
|
||||
// Going in depth: the reason we do not do a Del() in its New()is because then we cannot access its properties.
|
||||
// I might be doing this wrong / not knowing of a Byond function. If I'm doing it wrong, let me know please.
|
||||
name = "bomb"
|
||||
icon = 'screen1.dmi'
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x"
|
||||
var/btype = 0 // 0=radio, 1=prox, 2=time
|
||||
var/btemp1 = 1500
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//Define all tape types in policetape.dm
|
||||
/obj/item/taperoll
|
||||
name = "tape roll"
|
||||
icon = 'policetape.dmi'
|
||||
icon = 'icons/policetape.dmi'
|
||||
icon_state = "rollstart"
|
||||
flags = FPRINT
|
||||
w_class = 1.0
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/obj/item/tape
|
||||
name = "tape"
|
||||
icon = 'policetape.dmi'
|
||||
icon = 'icons/policetape.dmi'
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/icon_base
|
||||
|
||||
@@ -352,7 +352,7 @@ area/proc/ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blu
|
||||
if(ul_CachedOverlay)
|
||||
ul_Overlay = ul_CachedOverlay
|
||||
else
|
||||
ul_IconCache["[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]"] = image('ULIcons.dmi', , "[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]", ul_Layer)
|
||||
ul_IconCache["[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]"] = image('icons/effects/ULIcons.dmi', , "[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]", ul_Layer)
|
||||
ul_Overlay = ul_IconCache["[LightLevelRed]-[LightLevelGreen]-[LightLevelBlue]"]
|
||||
|
||||
overlays += ul_Overlay
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/obj/item/device/portalathe
|
||||
name = "portable autolathe"
|
||||
desc = "A device which can repair broken lights instantly. Must be advanced."
|
||||
icon = 'janitor.dmi'
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "portalathe"
|
||||
|
||||
afterattack(var/atom/target, mob/user as mob)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "eraser"
|
||||
desc = "It looks like some kind of eraser."
|
||||
flags = FPRINT | TABLEPASS
|
||||
icon = 'items.dmi'
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "zippo"
|
||||
item_state = "zippo"
|
||||
w_class = 1.0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/obj/item/wardrobe
|
||||
name = "\improper Wardrobe"
|
||||
desc = "A standard-issue bag for clothing and equipment. Usually comes sealed, stocked with everything you need for a particular job."
|
||||
icon = 'suits.dmi'
|
||||
icon = 'icons/obj/clothing/suits.dmi'
|
||||
icon_state = "wardrobe_sealed"
|
||||
item_state = "wardrobe"
|
||||
w_class = 4
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
turf/unsimulated/desert
|
||||
name = "desert"
|
||||
icon = 'desert.dmi'
|
||||
icon = 'code/WorkInProgress/Susan/desert.dmi'
|
||||
icon_state = "desert"
|
||||
temperature = 393.15
|
||||
luminosity = 5
|
||||
@@ -120,7 +120,7 @@ turf/simulated/wall/impassable_rock
|
||||
/obj/effect/alien/flesh/weeds
|
||||
name = "Fleshy Growth"
|
||||
desc = "A pulsating grouping of odd, alien tissues. It's almost like it has a heartbeat..."
|
||||
icon = 'biocraps.dmi'
|
||||
icon = 'code/WorkInProgress/Susan/biocraps.dmi'
|
||||
icon_state = "flesh"
|
||||
|
||||
anchored = 1
|
||||
@@ -130,7 +130,7 @@ turf/simulated/wall/impassable_rock
|
||||
|
||||
/obj/effect/alien/flesh/weeds/node
|
||||
icon_state = "fleshnode"
|
||||
icon = 'biocraps.dmi'
|
||||
icon = 'code/WorkInProgress/Susan/biocraps.dmi'
|
||||
name = "Throbbing Pustule"
|
||||
desc = "A grotquese, oozing, pimple-like growth. You swear you can see something moving around in the bulb..."
|
||||
luminosity = NODERANGE
|
||||
@@ -316,7 +316,7 @@ Alien plants should do something if theres a lot of poison
|
||||
//hostile entities or npcs
|
||||
|
||||
/obj/item/projectile/slimeglob
|
||||
icon = 'projectiles.dmi'
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "toxin"
|
||||
damage = 20
|
||||
damage_type = BRUTE
|
||||
@@ -461,7 +461,7 @@ Alien plants should do something if theres a lot of poison
|
||||
|
||||
obj/effect/critter/fleshmonster/fleshslime
|
||||
name = "Flesh Slime"
|
||||
icon = 'biocraps.dmi'
|
||||
icon = 'code/WorkInProgress/Susan/biocraps.dmi'
|
||||
icon_state = "livingflesh"
|
||||
desc = "A creature that appears to be made out of living tissue strewn together haphazardly. Some kind of liquid bubbles from its maw."
|
||||
//ranged = 1
|
||||
@@ -391,12 +391,12 @@
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [object]</i>")
|
||||
|
||||
if (!pda.silent)
|
||||
playsound(pda.loc, 'twobeep.ogg', 50, 1)
|
||||
playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, pda.loc))
|
||||
O.show_message(text("\icon[pda] *[pda.ttone]*"))
|
||||
|
||||
pda.overlays = null
|
||||
pda.overlays += image('pda.dmi', "pda-r")
|
||||
pda.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
else
|
||||
var/list/href_list = list()
|
||||
href_list["src"] = "\ref[eliza.speaker.loc.loc]"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Base Class
|
||||
/mob/living/simple_animal/livestock
|
||||
desc = "Tasty!"
|
||||
icon = 'livestock.dmi'
|
||||
icon = 'icons/mob/livestock.dmi'
|
||||
emote_see = list("shakes its head", "kicks the ground")
|
||||
speak_chance = 1
|
||||
turns_per_move = 15
|
||||
@@ -165,7 +165,7 @@
|
||||
/obj/structure/closet/critter
|
||||
desc = "\improper Critter crate."
|
||||
name = "Critter Crate"
|
||||
icon = 'storage.dmi'
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "critter"
|
||||
density = 1
|
||||
icon_opened = "critteropen"
|
||||
|
||||
@@ -33,7 +33,7 @@ obj/machinery/atmospherics/pipe/mains_component
|
||||
parent_pipe.burst()
|
||||
|
||||
obj/machinery/atmospherics/mains_pipe
|
||||
icon = 'mainspipe.dmi'
|
||||
icon = 'icons/obj/atmospherics/mainspipe.dmi'
|
||||
layer = 2.4 //under wires with their 2.5
|
||||
|
||||
var/volume = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// a frame for generic wall-mounted things, such as fire alarm, status display..
|
||||
// combination of apc_frame and machine_frame
|
||||
/obj/machinery/constructable_frame/wallmount_frame
|
||||
icon = 'stock_parts.dmi'
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "wm_0"
|
||||
var/wall_offset = 24
|
||||
density = 0
|
||||
@@ -35,7 +35,7 @@
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "\blue You start to add cables to the frame."
|
||||
if(do_after(user, 20))
|
||||
P:amount -= 5
|
||||
@@ -44,7 +44,7 @@
|
||||
state = 2
|
||||
icon_state = "wm_1"
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "\blue You dismantle the frame"
|
||||
new /obj/item/stack/sheet/metal(src.loc, 2)
|
||||
del(src)
|
||||
@@ -52,7 +52,7 @@
|
||||
if(istype(P, /obj/item/weapon/circuitboard))
|
||||
var/obj/item/weapon/circuitboard/B = P
|
||||
if(B.board_type == "wallmount")
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "\blue You add the circuit board to the frame."
|
||||
circuit = P
|
||||
user.drop_item()
|
||||
@@ -76,7 +76,7 @@
|
||||
else
|
||||
user << "\red This frame does not accept circuit boards of this type!"
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'wirecutter.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "\blue You remove the cables."
|
||||
state = 1
|
||||
icon_state = "wm_0"
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'Crowbar.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
state = 2
|
||||
circuit.loc = src.loc
|
||||
circuit = null
|
||||
@@ -107,7 +107,7 @@
|
||||
component_check = 0
|
||||
break
|
||||
if(component_check)
|
||||
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
|
||||
new_machine.dir = dir
|
||||
if(istype(circuit, /obj/item/weapon/circuitboard/status_display))
|
||||
@@ -135,7 +135,7 @@
|
||||
if(istype(P, /obj/item/weapon))
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/CP = P
|
||||
if(CP.amount > 1)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Welding kit"
|
||||
desc = "A heavy-duty, portable welding fluid carrier."
|
||||
slot_flags = SLOT_BACK
|
||||
icon = 'storage.dmi'
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "welderpack"
|
||||
w_class = 4.0
|
||||
var/max_fuel = 350
|
||||
@@ -29,7 +29,7 @@
|
||||
user << "\red That was close!"
|
||||
src.reagents.trans_to(W, T.max_fuel)
|
||||
user << "\blue Welder refilled!"
|
||||
playsound(src.loc, 'refill.ogg', 50, 1, -6)
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
user << "\blue The tank scoffs at your insolence. It only provides services to welders."
|
||||
return
|
||||
@@ -38,7 +38,7 @@
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.reagents.total_volume < max_fuel)
|
||||
O.reagents.trans_to(src, max_fuel)
|
||||
user << "\blue You crack the cap off the top of the pack and fill it back up again from the tank."
|
||||
playsound(src.loc, 'refill.ogg', 50, 1, -6)
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.reagents.total_volume == max_fuel)
|
||||
user << "\blue The pack is already full!"
|
||||
|
||||
@@ -12,7 +12,7 @@ log transactions
|
||||
/obj/machinery/atm
|
||||
name = "\improper NanoTrasen Automatic Teller Machine"
|
||||
desc = "For all your monetary needs!"
|
||||
icon = 'terminals.dmi'
|
||||
icon = 'icons/obj/terminals.dmi'
|
||||
icon_state = "atm"
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
|
||||
+106
-104
@@ -1,7 +1,7 @@
|
||||
/obj/machinery/faxmachine
|
||||
name = "fax machine"
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bigscanner"
|
||||
icon_state = "fax"
|
||||
req_access = list(access_lawyer)
|
||||
anchored = 1
|
||||
density = 1
|
||||
@@ -14,133 +14,135 @@
|
||||
var/obj/item/weapon/paper/tofax = null // what we're sending to central
|
||||
var/sendcooldown = 0 // to avoid spamming fax messages
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
/obj/machinery/faxmachine/process()
|
||||
return 0
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
/obj/machinery/faxmachine/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
/obj/machinery/faxmachine/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
var/dat = "Central Command Fax Machine<BR>"
|
||||
/obj/machinery/faxmachine/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
var/scan_name
|
||||
if(scan)
|
||||
scan_name = scan.name
|
||||
else
|
||||
scan_name = "--------"
|
||||
var/dat = "Central Command Fax Machine<BR>"
|
||||
|
||||
dat += "Confirm Identity: <a href='byond://?src=\ref[src];scan=1'>[scan_name]</a><br>"
|
||||
var/scan_name
|
||||
if(scan)
|
||||
scan_name = scan.name
|
||||
else
|
||||
scan_name = "--------"
|
||||
|
||||
if(authenticated)
|
||||
dat += "<a href='byond://?src=\ref[src];logout=1'>{Log Out}</a>"
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];auth=1'>{Log In}</a>"
|
||||
dat += "Confirm Identity: <a href='byond://?src=\ref[src];scan=1'>[scan_name]</a><br>"
|
||||
|
||||
dat += "<hr>"
|
||||
if(authenticated)
|
||||
dat += "<a href='byond://?src=\ref[src];logout=1'>{Log Out}</a>"
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];auth=1'>{Log In}</a>"
|
||||
|
||||
if(authenticated)
|
||||
dat += "<b>Logged in to:</b> Central Command Quantum Entanglement Network<br><br>"
|
||||
dat += "<hr>"
|
||||
|
||||
if(tofax)
|
||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><br><br>"
|
||||
if(authenticated)
|
||||
dat += "<b>Logged in to:</b> Central Command Quantum Entanglement Network<br><br>"
|
||||
|
||||
if(sendcooldown)
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
|
||||
if(tofax)
|
||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><br><br>"
|
||||
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];send=1'>Send</a><br>"
|
||||
dat += "<b>Currently sending:</b> [tofax.name]"
|
||||
if(sendcooldown)
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
|
||||
|
||||
else
|
||||
if(sendcooldown)
|
||||
dat += "Please insert paper to send to Central Command via secure connection.<br><br>"
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
|
||||
else
|
||||
dat += "Please insert paper to send to Central Command via secure connection.<br><br>"
|
||||
dat += "<a href='byond://?src=\ref[src];send=1'>Send</a><br>"
|
||||
dat += "<b>Currently sending:</b> [tofax.name]"
|
||||
|
||||
else
|
||||
dat += "Proper authentication is required to use this device.<br><br>"
|
||||
|
||||
if(tofax)
|
||||
dat += "<a href ='byond://?src=\ref[src];remove=1'>Remove Paper</a><br>"
|
||||
|
||||
user << browse(dat, "window=copier")
|
||||
onclose(user, "copier")
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
|
||||
if(href_list["send"])
|
||||
if(tofax)
|
||||
Centcomm_fax(tofax.info, tofax.name, usr)
|
||||
usr << "Message transmitted."
|
||||
sendcooldown = 1
|
||||
spawn(3000) // three minute cooldown. might mess with this number a bit as time goes on
|
||||
sendcooldown = 0
|
||||
|
||||
if(href_list["remove"])
|
||||
if(tofax)
|
||||
tofax.loc = usr.loc
|
||||
usr.put_in_hands(tofax)
|
||||
usr << "<span class='notice'>You take the paper out of \the [src].</span>"
|
||||
tofax = null
|
||||
|
||||
if(href_list["scan"])
|
||||
if (scan)
|
||||
if(ishuman(usr))
|
||||
scan.loc = usr.loc
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hands(scan)
|
||||
scan = null
|
||||
else
|
||||
scan.loc = src.loc
|
||||
scan = null
|
||||
if(sendcooldown)
|
||||
dat += "Please insert paper to send to Central Command via secure connection.<br><br>"
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
scan = I
|
||||
authenticated = 0
|
||||
dat += "Please insert paper to send to Central Command via secure connection.<br><br>"
|
||||
|
||||
if(href_list["auth"])
|
||||
if ( (!( authenticated ) && (scan)) )
|
||||
if (check_access(scan))
|
||||
authenticated = 1
|
||||
else
|
||||
dat += "Proper authentication is required to use this device.<br><br>"
|
||||
|
||||
if(href_list["logout"])
|
||||
authenticated = 0
|
||||
if(tofax)
|
||||
dat += "<a href ='byond://?src=\ref[src];remove=1'>Remove Paper</a><br>"
|
||||
|
||||
updateUsrDialog()
|
||||
user << browse(dat, "window=copier")
|
||||
onclose(user, "copier")
|
||||
return
|
||||
|
||||
attackby(obj/item/O as obj, mob/user as mob)
|
||||
/obj/machinery/faxmachine/Topic(href, href_list)
|
||||
if(href_list["send"])
|
||||
if(tofax)
|
||||
Centcomm_fax(tofax.info, tofax.name, usr)
|
||||
usr << "Message transmitted."
|
||||
sendcooldown = 1
|
||||
spawn(3000) // three minute cooldown. might mess with this number a bit as time goes on
|
||||
sendcooldown = 0
|
||||
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
if(!tofax)
|
||||
user.drop_item()
|
||||
tofax = O
|
||||
O.loc = src
|
||||
user << "<span class='notice'>You insert the paper into \the [src].</span>"
|
||||
flick("bigscanner1", src)
|
||||
updateUsrDialog()
|
||||
if(href_list["remove"])
|
||||
if(tofax)
|
||||
tofax.loc = usr.loc
|
||||
usr.put_in_hands(tofax)
|
||||
usr << "<span class='notice'>You take the paper out of \the [src].</span>"
|
||||
tofax = null
|
||||
|
||||
if(href_list["scan"])
|
||||
if (scan)
|
||||
if(ishuman(usr))
|
||||
scan.loc = usr.loc
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hands(scan)
|
||||
scan = null
|
||||
else
|
||||
user << "<span class='notice'>There is already something in \the [src].</span>"
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/idcard = O
|
||||
|
||||
if(!scan)
|
||||
scan.loc = src.loc
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
idcard.loc = src
|
||||
scan = idcard
|
||||
I.loc = src
|
||||
scan = I
|
||||
authenticated = 0
|
||||
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
|
||||
return
|
||||
if(href_list["auth"])
|
||||
if ( (!( authenticated ) && (scan)) )
|
||||
if (check_access(scan))
|
||||
authenticated = 1
|
||||
|
||||
if(href_list["logout"])
|
||||
authenticated = 0
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/faxmachine/attackby(obj/item/O as obj, mob/user as mob)
|
||||
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
if(!tofax)
|
||||
user.drop_item()
|
||||
tofax = O
|
||||
O.loc = src
|
||||
user << "<span class='notice'>You insert the paper into \the [src].</span>"
|
||||
flick("faxsend", src)
|
||||
updateUsrDialog()
|
||||
else
|
||||
user << "<span class='notice'>There is already something in \the [src].</span>"
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id))
|
||||
|
||||
var/obj/item/weapon/card/id/idcard = O
|
||||
if(!scan)
|
||||
usr.drop_item()
|
||||
idcard.loc = src
|
||||
scan = idcard
|
||||
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
|
||||
return
|
||||
|
||||
/proc/Centcomm_fax(var/sent, var/sentname, var/mob/Sender)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
/obj/effect/meteor
|
||||
name = "meteor"
|
||||
icon = 'meteor.dmi'
|
||||
icon = 'icons/obj/meteor.dmi'
|
||||
icon_state = "flaming"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
@@ -105,7 +105,7 @@
|
||||
shake_camera(M, 3, 1)
|
||||
if (A)
|
||||
A.meteorhit(src)
|
||||
playsound(get_turf(src), 'meteorimpact.ogg', 40, 1)
|
||||
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
if (--src.hits <= 0)
|
||||
if(prob(15))// && !istype(A, /obj/structure/grille))
|
||||
explosion(get_turf(src), 4, 5, 6, 7, 0)
|
||||
@@ -138,7 +138,7 @@
|
||||
A.meteorhit(src)
|
||||
src.hits--
|
||||
return
|
||||
playsound(get_turf(src), 'meteorimpact.ogg', 40, 1)
|
||||
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
if (--src.hits <= 0)
|
||||
if(prob(15) && !istype(A, /obj/structure/grille))
|
||||
explosion(get_turf(src), 1, 2, 3, 4, 0)
|
||||
|
||||
+104
-56
@@ -6,6 +6,9 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
#define CONNECTION_INDIRECT 1
|
||||
#define CONNECTION_CLOSED 0
|
||||
|
||||
#define ZONE_ACTIVE 1
|
||||
#define ZONE_SLEEPING 0
|
||||
|
||||
/connection
|
||||
var/turf/simulated/A
|
||||
var/turf/simulated/B
|
||||
@@ -13,68 +16,62 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
var/zone/zone_A
|
||||
var/zone/zone_B
|
||||
|
||||
var/ref_A
|
||||
var/ref_B
|
||||
|
||||
var/indirect = CONNECTION_DIRECT //If the connection is purely indirect, the zones should not join.
|
||||
|
||||
var/last_updated //The tick at which this was last updated.
|
||||
|
||||
var/no_zone_count = 0
|
||||
|
||||
|
||||
|
||||
/connection/New(turf/T,turf/O)
|
||||
. = ..()
|
||||
|
||||
A = T
|
||||
B = O
|
||||
|
||||
if(A.zone && B.zone)
|
||||
if(!A.zone.connections) A.zone.connections = list()
|
||||
if(!A.zone.connections)
|
||||
A.zone.connections = list()
|
||||
A.zone.connections += src
|
||||
zone_A = A.zone
|
||||
ref_A = "\ref[A]"
|
||||
|
||||
if(!B.zone.connections) B.zone.connections = list()
|
||||
if(!B.zone.connections)
|
||||
B.zone.connections = list()
|
||||
B.zone.connections += src
|
||||
zone_B = B.zone
|
||||
ref_B = "\ref[B]"
|
||||
|
||||
if(ref_A in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[ref_A]
|
||||
if(A in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[A]
|
||||
connections.Add(src)
|
||||
else
|
||||
air_master.turfs_with_connections[ref_A] = list(src)
|
||||
air_master.turfs_with_connections[A] = list(src)
|
||||
|
||||
if(ref_B in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[ref_B]
|
||||
if(B in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[B]
|
||||
connections.Add(src)
|
||||
else
|
||||
air_master.turfs_with_connections[ref_B] = list(src)
|
||||
air_master.turfs_with_connections[B] = list(src)
|
||||
|
||||
if(A.CanPass(null, B, 0, 0))
|
||||
|
||||
ConnectZones(A.zone, B.zone, 1)
|
||||
|
||||
if(A.HasDoor(B) || B.HasDoor(A))
|
||||
if(!A.CanPass(null, B, 1.5, 1))
|
||||
indirect = CONNECTION_INDIRECT
|
||||
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
|
||||
else
|
||||
ConnectZones(A.zone, B.zone)
|
||||
indirect = CONNECTION_CLOSED
|
||||
|
||||
|
||||
else
|
||||
world.log << "Attempted to create connection object for non-zone tiles: [T] ([T.x],[T.y],[T.z]) -> [O] ([O.x],[O.y],[O.z])"
|
||||
del(src)
|
||||
SoftDelete()
|
||||
|
||||
|
||||
/connection/Del()
|
||||
//remove connections from master lists.
|
||||
if(ref_B in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[ref_B]
|
||||
if(B in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[B]
|
||||
connections.Remove(src)
|
||||
|
||||
if(ref_A in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[ref_A]
|
||||
if(A in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[A]
|
||||
connections.Remove(src)
|
||||
|
||||
//Remove connection from zones.
|
||||
@@ -104,13 +101,52 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
|
||||
//Disconnect zones while handling unusual conditions.
|
||||
// e.g. loss of a zone on a turf
|
||||
if(A && A.zone && B && B.zone)
|
||||
DisconnectZones(A.zone, B.zone)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
|
||||
//Finally, preform actual deletion.
|
||||
. = ..()
|
||||
|
||||
|
||||
/connection/proc/SoftDelete()
|
||||
//remove connections from master lists.
|
||||
if(B in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[B]
|
||||
connections.Remove(src)
|
||||
|
||||
if(A in air_master.turfs_with_connections)
|
||||
var/list/connections = air_master.turfs_with_connections[A]
|
||||
connections.Remove(src)
|
||||
|
||||
//Remove connection from zones.
|
||||
if(A)
|
||||
if(A.zone && A.zone.connections)
|
||||
A.zone.connections.Remove(src)
|
||||
if(!A.zone.connections.len)
|
||||
A.zone.connections = null
|
||||
|
||||
if(istype(zone_A) && (!A || A.zone != zone_A))
|
||||
if(zone_A.connections)
|
||||
zone_A.connections.Remove(src)
|
||||
if(!zone_A.connections.len)
|
||||
zone_A.connections = null
|
||||
|
||||
if(B)
|
||||
if(B.zone && B.zone.connections)
|
||||
B.zone.connections.Remove(src)
|
||||
if(!B.zone.connections.len)
|
||||
B.zone.connections = null
|
||||
|
||||
if(istype(zone_B) && (!B || B.zone != zone_B))
|
||||
if(zone_B.connections)
|
||||
zone_B.connections.Remove(src)
|
||||
if(!zone_B.connections.len)
|
||||
zone_B.connections = null
|
||||
|
||||
//Disconnect zones while handling unusual conditions.
|
||||
// e.g. loss of a zone on a turf
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
|
||||
|
||||
/connection/proc/ConnectZones(var/zone/zone_1, var/zone/zone_2, open = 0)
|
||||
|
||||
//Sanity checking
|
||||
@@ -140,6 +176,18 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
zone_2.connected_zones += zone_1
|
||||
zone_2.connected_zones[zone_1] = 1
|
||||
|
||||
if(open == CONNECTION_DIRECT)
|
||||
if(!zone_1.direct_connections)
|
||||
zone_1.direct_connections = list(src)
|
||||
else
|
||||
zone_1.direct_connections += src
|
||||
|
||||
if(!zone_2.direct_connections)
|
||||
zone_2.direct_connections = list(src)
|
||||
else
|
||||
zone_2.direct_connections += src
|
||||
|
||||
|
||||
//Handle closed connections.
|
||||
else
|
||||
|
||||
@@ -163,6 +211,11 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
zone_2.closed_connection_zones += zone_1
|
||||
zone_2.closed_connection_zones[zone_1] = 1
|
||||
|
||||
if(zone_1.status == ZONE_SLEEPING)
|
||||
zone_1.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
if(zone_2.status == ZONE_SLEEPING)
|
||||
zone_2.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
/connection/proc/DisconnectZones(var/zone/zone_1, var/zone/zone_2)
|
||||
//Sanity checking
|
||||
@@ -193,6 +246,15 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
if(!zone_2.connected_zones.len)
|
||||
zone_2.connected_zones = null
|
||||
|
||||
if(indirect == CONNECTION_DIRECT)
|
||||
zone_1.direct_connections -= src
|
||||
if(!zone_1.direct_connections.len)
|
||||
zone_1.direct_connections = null
|
||||
|
||||
zone_2.direct_connections -= src
|
||||
if(!zone_2.direct_connections.len)
|
||||
zone_2.direct_connections = null
|
||||
|
||||
else
|
||||
//Handle disconnection of closed zones.
|
||||
if( (zone_1 in zone_2.closed_connection_zones) || (zone_2 in zone_1.closed_connection_zones) )
|
||||
@@ -222,35 +284,23 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
|
||||
//Check sanity: existance of turfs
|
||||
if(!A || !B)
|
||||
del src
|
||||
SoftDelete()
|
||||
return
|
||||
|
||||
//Check sanity: loss of zone
|
||||
if(!A.zone || !B.zone)
|
||||
SoftDelete()
|
||||
return
|
||||
|
||||
//Check sanity: zones are different
|
||||
if(A.zone == B.zone)
|
||||
del src
|
||||
|
||||
//Check sanity: same turfs as before.
|
||||
if(ref_A != "\ref[A]" || ref_B != "\ref[B]")
|
||||
del src
|
||||
SoftDelete()
|
||||
return
|
||||
|
||||
//Handle zones changing on a turf.
|
||||
if((A.zone && A.zone != zone_A) || (B.zone && B.zone != zone_B))
|
||||
Sanitize()
|
||||
|
||||
//Manage sudden loss of a turfs zone. (e.g. a wall being built)
|
||||
if(!A.zone || !B.zone)
|
||||
no_zone_count++
|
||||
if(no_zone_count >= 5)
|
||||
//world.log << "Connection removed: [A] or [B] missing a zone."
|
||||
del src
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/connection/proc/CheckPassSanity()
|
||||
//Sanity check, first.
|
||||
Cleanup()
|
||||
|
||||
if(A.zone && B.zone)
|
||||
|
||||
//If no walls are blocking us...
|
||||
@@ -263,7 +313,7 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
//Make and remove connections to let air pass.
|
||||
if(indirect == CONNECTION_CLOSED)
|
||||
DisconnectZones(A.zone, B.zone)
|
||||
ConnectZones(A.zone, B.zone, 1)
|
||||
ConnectZones(A.zone, B.zone, door_pass + 1)
|
||||
|
||||
if(door_pass)
|
||||
indirect = CONNECTION_DIRECT
|
||||
@@ -278,7 +328,8 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
|
||||
//If I can no longer pass air, better delete
|
||||
else
|
||||
del src
|
||||
SoftDelete()
|
||||
return
|
||||
|
||||
/connection/proc/Sanitize()
|
||||
//If the zones change on connected turfs, update it.
|
||||
@@ -294,9 +345,6 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
A = temp
|
||||
zone_B = B.zone
|
||||
zone_A = A.zone
|
||||
var/temp_ref = ref_A
|
||||
ref_A = ref_B
|
||||
ref_B = temp_ref
|
||||
return
|
||||
|
||||
//Handle removal of connections from archived zones.
|
||||
@@ -400,4 +448,4 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
|
||||
#undef CONNECTION_DIRECT
|
||||
#undef CONNECTION_INDIRECT
|
||||
#undef CONNECTION_CLOSED
|
||||
#undef CONNECTION_CLOSED
|
||||
|
||||
+99
-8
@@ -1,3 +1,14 @@
|
||||
client/proc/ZoneTick()
|
||||
set category = "Debug"
|
||||
set name = "Process Atmos"
|
||||
|
||||
var/result = air_master.Tick()
|
||||
if(result)
|
||||
src << "Sucessfully Processed."
|
||||
|
||||
else
|
||||
src << "Failed to process! ([air_master.tick_progress])"
|
||||
|
||||
|
||||
client/proc/Zone_Info(turf/T as null|turf)
|
||||
set category = "Debug"
|
||||
@@ -69,10 +80,10 @@ zone/proc/DebugDisplay(client/client)
|
||||
var/list/current_zone_images = list()
|
||||
|
||||
for(var/turf/T in contents)
|
||||
current_zone_images += image('debug_group.dmi', T, null, TURF_LAYER)
|
||||
current_zone_images += image('icons/misc/debug_group.dmi', T, null, TURF_LAYER)
|
||||
|
||||
for(var/turf/space/S in unsimulated_tiles)
|
||||
current_zone_images += image('debug_space.dmi', S, null, TURF_LAYER)
|
||||
current_zone_images += image('icons/misc/debug_space.dmi', S, null, TURF_LAYER)
|
||||
|
||||
client << "<u>Zone Air Contents</u>"
|
||||
client << "Oxygen: [air.oxygen]"
|
||||
@@ -89,8 +100,8 @@ zone/proc/DebugDisplay(client/client)
|
||||
|
||||
for(var/connection/C in connections)
|
||||
client << "\ref[C] [C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
|
||||
current_zone_images += image('debug_connect.dmi', C.A, null, TURF_LAYER)
|
||||
current_zone_images += image('debug_connect.dmi', C.B, null, TURF_LAYER)
|
||||
current_zone_images += image('icons/misc/debug_connect.dmi', C.A, null, TURF_LAYER)
|
||||
current_zone_images += image('icons/misc/debug_connect.dmi', C.B, null, TURF_LAYER)
|
||||
|
||||
client << "Connected Zones:"
|
||||
for(var/zone/zone in connected_zones)
|
||||
@@ -115,8 +126,88 @@ zone/proc/DebugDisplay(client/client)
|
||||
client.images -= client.zone_debug_images[src]
|
||||
client.zone_debug_images.Remove(src)
|
||||
|
||||
for(var/zone/Z in zones)
|
||||
if(Z.air == air && Z != src)
|
||||
var/turf/zloc = pick(Z.contents)
|
||||
client << "\red Illegal air datum shared by: [zloc.loc.name]"
|
||||
if(air_master)
|
||||
for(var/zone/Z in air_master.zones)
|
||||
if(Z.air == air && Z != src)
|
||||
var/turf/zloc = pick(Z.contents)
|
||||
client << "\red Illegal air datum shared by: [zloc.loc.name]"
|
||||
|
||||
|
||||
client/proc/TestZASRebuild()
|
||||
// var/turf/turf = get_turf(mob)
|
||||
var/zone/current_zone = mob.loc:zone
|
||||
if(!current_zone)
|
||||
src << "There is no zone there!"
|
||||
return
|
||||
|
||||
var/list/current_adjacents = list()
|
||||
var/list/overlays = list()
|
||||
var/adjacent_id
|
||||
var/lowest_id
|
||||
|
||||
var/list/identical_ids = list()
|
||||
var/list/turfs = current_zone.contents.Copy()
|
||||
var/current_identifier = 1
|
||||
|
||||
for(var/turf/simulated/current in turfs)
|
||||
lowest_id = null
|
||||
current_adjacents = list()
|
||||
|
||||
for(var/direction in cardinal)
|
||||
var/turf/simulated/adjacent = get_step(current, direction)
|
||||
if(!current.ZAirPass(adjacent))
|
||||
continue
|
||||
if(turfs.Find(adjacent))
|
||||
current_adjacents += adjacent
|
||||
adjacent_id = turfs[adjacent]
|
||||
|
||||
if(adjacent_id && (!lowest_id || adjacent_id < lowest_id))
|
||||
lowest_id = adjacent_id
|
||||
|
||||
if(!lowest_id)
|
||||
lowest_id = current_identifier++
|
||||
identical_ids += lowest_id
|
||||
overlays += image('icons/misc/debug_rebuild.dmi',, "[lowest_id]")
|
||||
|
||||
for(var/turf/simulated/adjacent in current_adjacents)
|
||||
adjacent_id = turfs[adjacent]
|
||||
if(adjacent_id != lowest_id)
|
||||
if(adjacent_id)
|
||||
adjacent.overlays -= overlays[adjacent_id]
|
||||
identical_ids[adjacent_id] = lowest_id
|
||||
|
||||
turfs[adjacent] = lowest_id
|
||||
adjacent.overlays += overlays[lowest_id]
|
||||
|
||||
sleep(5)
|
||||
|
||||
if(turfs[current])
|
||||
current.overlays -= overlays[turfs[current]]
|
||||
turfs[current] = lowest_id
|
||||
current.overlays += overlays[lowest_id]
|
||||
sleep(5)
|
||||
|
||||
var/list/final_arrangement = list()
|
||||
|
||||
for(var/turf/simulated/current in turfs)
|
||||
current_identifier = identical_ids[turfs[current]]
|
||||
current.overlays -= overlays[turfs[current]]
|
||||
current.overlays += overlays[current_identifier]
|
||||
sleep(5)
|
||||
|
||||
if( current_identifier > final_arrangement.len )
|
||||
final_arrangement.len = current_identifier
|
||||
final_arrangement[current_identifier] = list(current)
|
||||
|
||||
else
|
||||
final_arrangement[current_identifier] += current
|
||||
|
||||
//lazy but fast
|
||||
final_arrangement.Remove(null)
|
||||
|
||||
src << "There are [final_arrangement.len] unique segments."
|
||||
|
||||
for(var/turf/current in turfs)
|
||||
current.overlays -= overlays
|
||||
|
||||
return final_arrangement
|
||||
@@ -8,7 +8,7 @@ What are the archived variables for?
|
||||
#define SPECIFIC_HEAT_AIR 20
|
||||
#define SPECIFIC_HEAT_CDO 30
|
||||
#define HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) \
|
||||
(carbon_dioxide*SPECIFIC_HEAT_CDO + (oxygen+nitrogen)*SPECIFIC_HEAT_AIR + toxins*SPECIFIC_HEAT_TOXIN)
|
||||
max(0, carbon_dioxide * SPECIFIC_HEAT_CDO + (oxygen + nitrogen) * SPECIFIC_HEAT_AIR + toxins * SPECIFIC_HEAT_TOXIN)
|
||||
|
||||
#define MINIMUM_HEAT_CAPACITY 0.0003
|
||||
#define QUANTIZE(variable) (round(variable,0.0001))
|
||||
@@ -384,7 +384,7 @@ What are the archived variables for?
|
||||
removed.oxygen = QUANTIZE((oxygen/sum)*amount)
|
||||
removed.nitrogen = QUANTIZE((nitrogen/sum)*amount)
|
||||
removed.carbon_dioxide = QUANTIZE((carbon_dioxide/sum)*amount)
|
||||
removed.toxins = QUANTIZE((toxins/sum)*amount)
|
||||
removed.toxins = QUANTIZE(((toxins/sum)*amount))
|
||||
|
||||
oxygen -= removed.oxygen/group_multiplier
|
||||
nitrogen -= removed.nitrogen/group_multiplier
|
||||
@@ -396,8 +396,8 @@ What are the archived variables for?
|
||||
var/datum/gas/corresponding = new trace_gas.type()
|
||||
removed.trace_gases += corresponding
|
||||
|
||||
corresponding.moles = (trace_gas.moles/sum)*amount
|
||||
trace_gas.moles -= corresponding.moles/group_multiplier
|
||||
corresponding.moles = ((trace_gas.moles/sum)*amount)
|
||||
trace_gas.moles -= (corresponding.moles/group_multiplier)
|
||||
|
||||
removed.temperature = temperature
|
||||
update_values()
|
||||
|
||||
+186
-47
@@ -53,7 +53,9 @@ Important Procedures
|
||||
|
||||
*/
|
||||
|
||||
var/kill_air = 0
|
||||
#define ZONE_ACTIVE 1
|
||||
#define ZONE_SLEEPING 0
|
||||
|
||||
var/tick_multiplier = 2
|
||||
|
||||
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
@@ -87,17 +89,32 @@ atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
|
||||
var/datum/controller/air_system/air_master
|
||||
|
||||
/datum/controller/air_system/
|
||||
//Geoemetry lists
|
||||
/datum/controller/air_system
|
||||
//Geometry lists
|
||||
var/list/turfs_with_connections = list()
|
||||
var/list/active_hotspots = list()
|
||||
|
||||
//Special functions lists
|
||||
var/reconsidering_zones = FALSE
|
||||
var/list/tiles_to_reconsider_zones = list()
|
||||
var/list/tiles_to_reconsider_alternate
|
||||
|
||||
//Geometry updates lists
|
||||
var/updating_tiles = FALSE
|
||||
var/list/tiles_to_update = list()
|
||||
var/list/tiles_to_update_alternate
|
||||
|
||||
var/checking_connections = FALSE
|
||||
var/list/connections_to_check = list()
|
||||
var/list/connections_to_check_alternate
|
||||
|
||||
var/list/potential_intrazone_connections = list()
|
||||
|
||||
//Zone lists
|
||||
var/list/active_zones = list()
|
||||
var/list/zones_needing_rebuilt = list()
|
||||
var/list/zones = list()
|
||||
|
||||
|
||||
var/current_cycle = 0
|
||||
var/update_delay = 5 //How long between check should it try to process atmos again.
|
||||
@@ -106,20 +123,7 @@ var/datum/controller/air_system/air_master
|
||||
var/tick_progress = 0
|
||||
|
||||
|
||||
/* process()
|
||||
//Call this to process air movements for a cycle
|
||||
|
||||
process_rebuild_select_groups()
|
||||
//Used by process()
|
||||
//Warning: Do not call this
|
||||
|
||||
rebuild_group(datum/air_group)
|
||||
//Used by process_rebuild_select_groups()
|
||||
//Warning: Do not call this, add the group to air_master.groups_to_rebuild instead
|
||||
*/
|
||||
|
||||
|
||||
/datum/controller/air_system/proc/setup()
|
||||
/datum/controller/air_system/proc/Setup()
|
||||
//Purpose: Call this at the start to setup air groups geometry
|
||||
// (Warning: Very processor intensive but only must be done once per round)
|
||||
//Called by: Gameticker/Master controller
|
||||
@@ -147,10 +151,11 @@ var/datum/controller/air_system/air_master
|
||||
Total Simulated Turfs: [simulated_turf_count]
|
||||
Total Zones: [zones.len]
|
||||
Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_count]</font>"}
|
||||
/*
|
||||
spawn start()
|
||||
|
||||
/datum/controller/air_system/proc/start()
|
||||
// spawn Start()
|
||||
|
||||
|
||||
/datum/controller/air_system/proc/Start()
|
||||
//Purpose: This is kicked off by the master controller, and controls the processing of all atmosphere.
|
||||
//Called by: Master controller
|
||||
//Inputs: None.
|
||||
@@ -160,62 +165,196 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
||||
set background = 1
|
||||
|
||||
while(1)
|
||||
if(!kill_air)
|
||||
current_cycle++
|
||||
var/success = tick() //Changed so that a runtime does not crash the ticker.
|
||||
if(!air_processing_killed)
|
||||
var/success = Tick() //Changed so that a runtime does not crash the ticker.
|
||||
if(!success) //Runtimed.
|
||||
failed_ticks++
|
||||
if(failed_ticks > 20)
|
||||
world << "<font color='red'><b>ERROR IN ATMOS TICKER. Killing air simulation!</font></b>"
|
||||
kill_air = 1
|
||||
air_processing_killed = 1
|
||||
sleep(max(5,update_delay*tick_multiplier))
|
||||
*/
|
||||
|
||||
/datum/controller/air_system/proc/tick()
|
||||
|
||||
/datum/controller/air_system/proc/Tick()
|
||||
. = 1 //Set the default return value, for runtime detection.
|
||||
|
||||
tick_progress = "update_air_properties"
|
||||
if(tiles_to_update.len) //If there are tiles to update, do so.
|
||||
current_cycle++
|
||||
|
||||
//If there are tiles to update, do so.
|
||||
tick_progress = "updating turf properties"
|
||||
if(tiles_to_update.len)
|
||||
updating_tiles = TRUE
|
||||
|
||||
for(var/turf/simulated/T in tiles_to_update)
|
||||
if(. && T && !T.update_air_properties())
|
||||
. = 0 //If a runtime occured, make sure we can sense it.
|
||||
//message_admins("ZASALERT: Unable run turf/simualted/update_air_properties()")
|
||||
//If a runtime occured, make sure we can sense it.
|
||||
. = 0
|
||||
|
||||
updating_tiles = FALSE
|
||||
|
||||
if(.)
|
||||
tiles_to_update = list()
|
||||
if(tiles_to_update_alternate)
|
||||
tiles_to_update = tiles_to_update_alternate
|
||||
tiles_to_update_alternate = null
|
||||
else
|
||||
tiles_to_update = list()
|
||||
|
||||
else if(tiles_to_update_alternate)
|
||||
tiles_to_update |= tiles_to_update_alternate
|
||||
tiles_to_update_alternate = null
|
||||
|
||||
//Rebuild zones.
|
||||
if(.)
|
||||
tick_progress = "rebuilding zones"
|
||||
if(zones_needing_rebuilt.len)
|
||||
for(var/zone/zone in zones_needing_rebuilt)
|
||||
zone.Rebuild()
|
||||
|
||||
zones_needing_rebuilt = list()
|
||||
|
||||
//Check sanity on connection objects.
|
||||
if(.)
|
||||
tick_progress = "connections_to_check"
|
||||
tick_progress = "checking/creating connections"
|
||||
if(connections_to_check.len)
|
||||
for(var/connection/C in connections_to_check)
|
||||
C.CheckPassSanity()
|
||||
connections_to_check = list()
|
||||
checking_connections = TRUE
|
||||
|
||||
//Ensure tiles still have zones.
|
||||
if(.)
|
||||
tick_progress = "tiles_to_reconsider_zones"
|
||||
if(tiles_to_reconsider_zones.len)
|
||||
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
||||
if(!T.zone)
|
||||
new /zone(T)
|
||||
tiles_to_reconsider_zones = list()
|
||||
for(var/connection/C in connections_to_check)
|
||||
C.Cleanup()
|
||||
|
||||
for(var/turf/simulated/turf_1 in potential_intrazone_connections)
|
||||
for(var/turf/simulated/turf_2 in potential_intrazone_connections[turf_1])
|
||||
|
||||
if(!turf_1.zone || !turf_2.zone)
|
||||
continue
|
||||
|
||||
if(turf_1.zone == turf_2.zone)
|
||||
continue
|
||||
|
||||
var/should_skip = FALSE
|
||||
if(turf_1 in air_master.turfs_with_connections)
|
||||
|
||||
for(var/connection/C in turfs_with_connections[turf_1])
|
||||
if(C.B == turf_2 || C.A == turf_2)
|
||||
should_skip = TRUE
|
||||
break
|
||||
if(should_skip)
|
||||
continue
|
||||
|
||||
new /connection(turf_1, turf_2)
|
||||
|
||||
checking_connections = FALSE
|
||||
|
||||
potential_intrazone_connections = list()
|
||||
|
||||
if(connections_to_check_alternate)
|
||||
connections_to_check = connections_to_check_alternate
|
||||
connections_to_check_alternate = null
|
||||
else
|
||||
connections_to_check = list()
|
||||
|
||||
//Process zones.
|
||||
if(.)
|
||||
tick_progress = "zone/process()"
|
||||
for(var/zone/Z in zones)
|
||||
tick_progress = "processing zones"
|
||||
for(var/zone/Z in active_zones)
|
||||
if(Z.last_update < current_cycle)
|
||||
var/output = Z.process()
|
||||
if(Z)
|
||||
Z.last_update = current_cycle
|
||||
if(. && Z && !output)
|
||||
. = 0
|
||||
|
||||
//Ensure tiles still have zones.
|
||||
if(.)
|
||||
tick_progress = "reconsidering zones on turfs"
|
||||
if(tiles_to_reconsider_zones.len)
|
||||
reconsidering_zones = TRUE
|
||||
|
||||
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
||||
if(!T.zone)
|
||||
new /zone(T)
|
||||
|
||||
reconsidering_zones = FALSE
|
||||
|
||||
if(tiles_to_reconsider_alternate)
|
||||
tiles_to_reconsider_zones = tiles_to_reconsider_alternate
|
||||
tiles_to_reconsider_alternate = null
|
||||
else
|
||||
tiles_to_reconsider_zones = list()
|
||||
|
||||
//Process fires.
|
||||
if(.)
|
||||
tick_progress = "active_hotspots (fire)"
|
||||
tick_progress = "processing fire"
|
||||
for(var/obj/fire/F in active_hotspots)
|
||||
if(. && F && !F.process())
|
||||
. = 0
|
||||
|
||||
if(.)
|
||||
tick_progress = "success"
|
||||
tick_progress = "success"
|
||||
|
||||
|
||||
/datum/controller/air_system/proc/AddTurfToUpdate(turf/simulated/outdated_turf)
|
||||
var/list/tiles_to_check = list()
|
||||
|
||||
if(istype(outdated_turf))
|
||||
tiles_to_check |= outdated_turf
|
||||
|
||||
if(istype(outdated_turf, /turf))
|
||||
for(var/direction in cardinal)
|
||||
var/turf/simulated/adjacent_turf = get_step(outdated_turf, direction)
|
||||
if(istype(adjacent_turf))
|
||||
tiles_to_check |= adjacent_turf
|
||||
|
||||
if(updating_tiles)
|
||||
if(!tiles_to_update_alternate)
|
||||
tiles_to_update_alternate = tiles_to_check
|
||||
else
|
||||
tiles_to_update_alternate |= tiles_to_check
|
||||
else
|
||||
tiles_to_update |= tiles_to_check
|
||||
|
||||
|
||||
/datum/controller/air_system/proc/AddConnectionToCheck(connection/connection)
|
||||
if(checking_connections)
|
||||
if(istype(connection, /list))
|
||||
if(!connections_to_check_alternate)
|
||||
connections_to_check_alternate = connection
|
||||
|
||||
else if(!connections_to_check_alternate)
|
||||
connections_to_check_alternate = list()
|
||||
|
||||
connections_to_check_alternate |= connection
|
||||
|
||||
else
|
||||
connections_to_check |= connection
|
||||
|
||||
|
||||
/datum/controller/air_system/proc/ReconsiderTileZone(var/turf/simulated/zoneless_turf)
|
||||
if(zoneless_turf.zone)
|
||||
return
|
||||
|
||||
if(reconsidering_zones)
|
||||
if(!tiles_to_reconsider_alternate)
|
||||
tiles_to_reconsider_alternate = list()
|
||||
|
||||
tiles_to_reconsider_alternate |= zoneless_turf
|
||||
|
||||
else
|
||||
tiles_to_reconsider_zones |= zoneless_turf
|
||||
|
||||
|
||||
/datum/controller/air_system/proc/AddIntrazoneConnection(var/turf/simulated/A, var/turf/simulated/B)
|
||||
if(!istype(A) || !istype(B))
|
||||
return
|
||||
|
||||
if(A in potential_intrazone_connections)
|
||||
if(B in potential_intrazone_connections[A])
|
||||
return
|
||||
|
||||
if (B in potential_intrazone_connections)
|
||||
if(A in potential_intrazone_connections[B])
|
||||
return
|
||||
|
||||
potential_intrazone_connections[B] += A
|
||||
|
||||
else
|
||||
potential_intrazone_connections[B] = list(A)
|
||||
+2
-2
@@ -51,7 +51,7 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
|
||||
//luminosity = 3
|
||||
|
||||
icon = 'fire.dmi'
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "1"
|
||||
|
||||
layer = TURF_LAYER
|
||||
@@ -262,7 +262,7 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue
|
||||
//slows down the burning when the concentration of the reactants is low
|
||||
var/dampening_multiplier = total_combustables / (total_combustables + nitrogen + carbon_dioxide)
|
||||
//calculates how close the mixture of the reactants is to the optimum
|
||||
var/mix_multiplier = 1 / (1 + (5 * ((oxygen / total_combustables) ^2)))
|
||||
var/mix_multiplier = 1 / (1 + (5 * ((oxygen / total_combustables) ** 2)))
|
||||
//toss everything together
|
||||
firelevel = vsc.fire_firelevel_multiplier * mix_multiplier * dampening_multiplier
|
||||
|
||||
|
||||
@@ -155,16 +155,17 @@ proc/ZConnect(turf/simulated/A,turf/simulated/B)
|
||||
|
||||
//Make some preliminary checks to see if the connection is valid.
|
||||
if(!A.zone || !B.zone) return
|
||||
if(A.zone == B.zone) return
|
||||
if(A.zone == B.zone)
|
||||
air_master.AddIntrazoneConnection(A,B)
|
||||
return
|
||||
|
||||
if(A.CanPass(null,B,0,1))
|
||||
if(A.CanPass(null, B, 1.5, 1) && A.zone.air.compare(B.zone.air))
|
||||
return ZMerge(A.zone,B.zone)
|
||||
|
||||
//Ensure the connection isn't already made.
|
||||
if("\ref[A]" in air_master.turfs_with_connections)
|
||||
for(var/connection/C in air_master.turfs_with_connections["\ref[A]"])
|
||||
C.Cleanup()
|
||||
if(C && (C.B == B || C.A == B))
|
||||
if(A in air_master.turfs_with_connections)
|
||||
for(var/connection/C in air_master.turfs_with_connections[A])
|
||||
if(C.B == B || C.A == B)
|
||||
return
|
||||
|
||||
//Make the connection.
|
||||
|
||||
+20
-75
@@ -50,7 +50,7 @@
|
||||
|
||||
var/siding_icon_state = return_siding_icon_state()
|
||||
if(siding_icon_state)
|
||||
overlays += image('floors.dmi',siding_icon_state)
|
||||
overlays += image('icons/turf/floors.dmi',siding_icon_state)
|
||||
var/datum/gas_mixture/model = return_air()
|
||||
switch(model.graphic)
|
||||
if(1)
|
||||
@@ -95,7 +95,7 @@
|
||||
/turf/simulated/assume_air(datum/gas_mixture/giver)
|
||||
if(!giver) return 0
|
||||
if(zone)
|
||||
zone.air.merge(giver)
|
||||
zone.assume_air(giver)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
@@ -111,9 +111,8 @@
|
||||
|
||||
/turf/simulated/remove_air(amount as num)
|
||||
if(zone)
|
||||
var/datum/gas_mixture/removed = null
|
||||
removed = zone.air.remove(amount)
|
||||
return removed
|
||||
return zone.remove_air(amount)
|
||||
|
||||
else if(air)
|
||||
var/datum/gas_mixture/removed = null
|
||||
removed = air.remove(amount)
|
||||
@@ -135,8 +134,8 @@
|
||||
|
||||
if(!zone && !blocks_air) //No zone, but not a wall.
|
||||
for(var/direction in DoorDirections) //Check door directions first.
|
||||
if(air_check_directions&direction)
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
if(air_check_directions & direction)
|
||||
var/turf/simulated/T = get_step(src, direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
if(T.zone)
|
||||
@@ -144,7 +143,7 @@
|
||||
break
|
||||
if(!zone) //Still no zone
|
||||
for(var/direction in CounterDoorDirections) //Check the others second.
|
||||
if(air_check_directions&direction)
|
||||
if(air_check_directions & direction)
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
@@ -157,82 +156,28 @@
|
||||
new/zone(list(src))
|
||||
|
||||
//Check pass sanity of the connections.
|
||||
if("\ref[src]" in air_master.turfs_with_connections)
|
||||
for(var/connection/C in air_master.turfs_with_connections["\ref[src]"])
|
||||
air_master.connections_to_check |= C
|
||||
if(src in air_master.turfs_with_connections)
|
||||
air_master.AddConnectionToCheck(air_master.turfs_with_connections[src])
|
||||
|
||||
if(zone && CanPass(null, src, 0, 0))
|
||||
|
||||
if(zone && !zone.rebuild)
|
||||
for(var/direction in cardinal)
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
|
||||
//I can connect to air in this direction
|
||||
if(air_check_directions&direction)
|
||||
if(air_check_directions & direction && !(air_directions_archived & direction))
|
||||
|
||||
//If either block air, we must look to see if the adjacent turfs need rebuilt.
|
||||
if(!CanPass(null, T, 0, 0))
|
||||
|
||||
//Target blocks air
|
||||
if(!T.CanPass(null, T, 0, 0))
|
||||
var/turf/NT = get_step(T, direction)
|
||||
|
||||
//If that turf is in my zone still, rebuild.
|
||||
if(istype(NT,/turf/simulated) && NT in zone.contents)
|
||||
zone.rebuild = 1
|
||||
|
||||
//If that is an unsimulated tile in my zone, see if we need to rebuild or just remove.
|
||||
else if(istype(NT) && NT in zone.unsimulated_tiles)
|
||||
var/consider_rebuild = 0
|
||||
for(var/d in cardinal)
|
||||
var/turf/UT = get_step(NT,d)
|
||||
if(istype(UT, /turf/simulated) && UT.zone == zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild
|
||||
consider_rebuild = 1
|
||||
break
|
||||
if(consider_rebuild)
|
||||
zone.rebuild = 1 //Gotta check if we need to rebuild, dammit
|
||||
else
|
||||
zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~
|
||||
|
||||
//To make a closed connection through closed door.
|
||||
ZConnect(T, src)
|
||||
|
||||
//If I block air.
|
||||
else if(T.zone && !T.zone.rebuild)
|
||||
var/turf/NT = get_step(src, reverse_direction(direction))
|
||||
|
||||
//If I am splitting a zone, rebuild.
|
||||
if(istype(NT,/turf/simulated) && (NT in T.zone.contents || (NT.zone && T in NT.zone.contents)))
|
||||
T.zone.rebuild = 1
|
||||
|
||||
//If NT is unsimulated, parse if I should remove it or rebuild.
|
||||
else if(istype(NT) && NT in T.zone.unsimulated_tiles)
|
||||
var/consider_rebuild = 0
|
||||
for(var/d in cardinal)
|
||||
var/turf/UT = get_step(NT,d)
|
||||
if(istype(UT, /turf/simulated) && UT.zone == T.zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild
|
||||
consider_rebuild = 1
|
||||
break
|
||||
|
||||
//Needs rebuilt.
|
||||
if(consider_rebuild)
|
||||
T.zone.rebuild = 1
|
||||
|
||||
//Not adjacent to anything, and unsimulated. Goodbye~
|
||||
else
|
||||
T.zone.RemoveTurf(NT)
|
||||
|
||||
else
|
||||
//Produce connection through open door.
|
||||
ZConnect(src,T)
|
||||
ZConnect(src,T)
|
||||
|
||||
//Something like a wall was built, changing the geometry.
|
||||
else if(air_directions_archived&direction)
|
||||
else if(!(air_check_directions & direction) && air_directions_archived & direction)
|
||||
var/turf/NT = get_step(T, direction)
|
||||
|
||||
//If the tile is in our own zone, and we cannot connect to it, better rebuild.
|
||||
if(istype(NT,/turf/simulated) && NT in zone.contents)
|
||||
zone.rebuild = 1
|
||||
air_master.zones_needing_rebuilt.Add(zone)
|
||||
|
||||
//Parse if we need to remove the tile, or rebuild the zone.
|
||||
else if(istype(NT) && NT in zone.unsimulated_tiles)
|
||||
@@ -250,7 +195,7 @@
|
||||
//The unsimulated turf is adjacent to another one of our zone's turfs,
|
||||
// better rebuild to be sure we didn't get cut in twain
|
||||
if(consider_rebuild)
|
||||
zone.rebuild = 1
|
||||
air_master.zones_needing_rebuilt.Add(zone)
|
||||
|
||||
//Not adjacent to anything, and unsimulated. Goodbye~
|
||||
else
|
||||
@@ -289,13 +234,13 @@
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(istype(obstacle, /obj/machinery/door) && !obstacle:air_properties_vary_with_direction)
|
||||
if(istype(obstacle, /obj/machinery/door) && !(obstacle:air_properties_vary_with_direction))
|
||||
continue
|
||||
if(!obstacle.CanPass(null, T, 1.5, 1))
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in T)
|
||||
if(istype(obstacle, /obj/machinery/door) && !obstacle:air_properties_vary_with_direction)
|
||||
if(istype(obstacle, /obj/machinery/door) && !(obstacle:air_properties_vary_with_direction))
|
||||
continue
|
||||
if(!obstacle.CanPass(null, src, 1.5, 1))
|
||||
return 0
|
||||
@@ -311,13 +256,13 @@
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(istype(obstacle, /obj/machinery/door) && !obstacle:air_properties_vary_with_direction)
|
||||
if(istype(obstacle, /obj/machinery/door) && !(obstacle:air_properties_vary_with_direction))
|
||||
continue
|
||||
if(!obstacle.CanPass(null, T, 0, 0))
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in T)
|
||||
if(istype(obstacle, /obj/machinery/door) && !obstacle:air_properties_vary_with_direction)
|
||||
if(istype(obstacle, /obj/machinery/door) && !(obstacle:air_properties_vary_with_direction))
|
||||
continue
|
||||
if(!obstacle.CanPass(null, src, 0, 0))
|
||||
return 0
|
||||
|
||||
+255
-101
@@ -1,18 +1,26 @@
|
||||
var/list/zones = list()
|
||||
var/list/DoorDirections = list(NORTH,WEST) //Which directions doors turfs can connect to zones
|
||||
var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs can connect to zones
|
||||
|
||||
/zone
|
||||
var/dbg_output = 0 //Enables debug output.
|
||||
var/rebuild = 0 //If 1, zone will be rebuilt on next process. Not sure if used.
|
||||
|
||||
var/datum/gas_mixture/air //The air contents of the zone.
|
||||
var/datum/gas_mixture/archived_air
|
||||
|
||||
var/list/contents //All the tiles that are contained in this zone.
|
||||
var/list/connections // /connection objects which refer to connections with other zones, e.g. through a door.
|
||||
var/list/connected_zones //Parallels connections, but lists zones to which this one is connected and the number
|
||||
//of points they're connected at.
|
||||
var/list/closed_connection_zones //Same as connected_zones, but for zones where the door or whatever is closed.
|
||||
var/list/unsimulated_tiles // Any space tiles in this list will cause air to flow out.
|
||||
|
||||
var/list/connections //connection objects which refer to connections with other zones, e.g. through a door.
|
||||
var/list/direct_connections //connections which directly connect two zones.
|
||||
|
||||
var/list/connected_zones //Parallels connections, but lists zones to which this one is connected and the number
|
||||
//of points they're connected at.
|
||||
var/list/closed_connection_zones //Same as connected_zones, but for zones where the door or whatever is closed.
|
||||
|
||||
var/last_update = 0
|
||||
var/last_rebuilt = 0
|
||||
var/status = ZONE_ACTIVE
|
||||
var/interactions_with_neighbors = 0
|
||||
var/progress = "nothing"
|
||||
|
||||
|
||||
@@ -46,34 +54,42 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
air.update_values()
|
||||
|
||||
//Add this zone to the global list.
|
||||
zones.Add(src)
|
||||
if(air_master)
|
||||
air_master.zones.Add(src)
|
||||
air_master.active_zones.Add(src)
|
||||
|
||||
|
||||
//LEGACY, DO NOT USE. Use the SoftDelete proc.
|
||||
//DO NOT USE. Use the SoftDelete proc.
|
||||
/zone/Del()
|
||||
//Ensuring the zone list doesn't get clogged with null values.
|
||||
for(var/turf/simulated/T in contents)
|
||||
RemoveTurf(T)
|
||||
air_master.tiles_to_reconsider_zones += T
|
||||
air_master.ReconsiderTileZone(T)
|
||||
for(var/zone/Z in connected_zones)
|
||||
if(src in Z.connected_zones)
|
||||
Z.connected_zones.Remove(src)
|
||||
for(var/connection/C in connections)
|
||||
air_master.connections_to_check += C
|
||||
zones.Remove(src)
|
||||
air_master.AddConnectionToCheck(connections)
|
||||
|
||||
if(air_master)
|
||||
air_master.zones.Remove(src)
|
||||
air_master.active_zones.Remove(src)
|
||||
air_master.zones_needing_rebuilt.Remove(src)
|
||||
air = null
|
||||
. = ..()
|
||||
|
||||
|
||||
//Handles deletion via garbage collection.
|
||||
//Handles deletion via garbage collection.
|
||||
/zone/proc/SoftDelete()
|
||||
zones.Remove(src)
|
||||
if(air_master)
|
||||
air_master.zones.Remove(src)
|
||||
air_master.active_zones.Remove(src)
|
||||
air_master.zones_needing_rebuilt.Remove(src)
|
||||
air = null
|
||||
|
||||
//Ensuring the zone list doesn't get clogged with null values.
|
||||
for(var/turf/simulated/T in contents)
|
||||
RemoveTurf(T)
|
||||
air_master.tiles_to_reconsider_zones += T
|
||||
air_master.ReconsiderTileZone(T)
|
||||
|
||||
//Removing zone connections and scheduling connection cleanup
|
||||
for(var/zone/Z in connected_zones)
|
||||
@@ -81,8 +97,7 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
Z.connected_zones.Remove(src)
|
||||
connected_zones = null
|
||||
|
||||
for(var/connection/C in connections)
|
||||
air_master.connections_to_check += C
|
||||
air_master.AddConnectionToCheck(connections)
|
||||
connections = null
|
||||
|
||||
return 1
|
||||
@@ -99,7 +114,9 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
contents += T
|
||||
if(air)
|
||||
air.group_multiplier++
|
||||
|
||||
T.zone = src
|
||||
|
||||
else
|
||||
if(!unsimulated_tiles)
|
||||
unsimulated_tiles = list()
|
||||
@@ -116,8 +133,13 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
contents -= T
|
||||
if(air)
|
||||
air.group_multiplier--
|
||||
|
||||
if(T.zone == src)
|
||||
T.zone = null
|
||||
|
||||
if(!contents.len)
|
||||
SoftDelete()
|
||||
|
||||
else if(unsimulated_tiles)
|
||||
unsimulated_tiles -= T
|
||||
if(!unsimulated_tiles.len)
|
||||
@@ -140,11 +162,6 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
|
||||
progress = "problem with: Rebuild()"
|
||||
|
||||
//Does rebuilding stuff.
|
||||
if(rebuild)
|
||||
rebuild = 0
|
||||
Rebuild() //Shoving this into a proc.
|
||||
|
||||
if(!contents.len) //If we got soft deleted.
|
||||
return
|
||||
|
||||
@@ -226,17 +243,13 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
|
||||
progress = "problem with: ZMerge(), a couple of misc procs"
|
||||
|
||||
for(var/connection/C in connections)
|
||||
//Check if the connection is valid first.
|
||||
if(!C.Cleanup())
|
||||
continue
|
||||
if(length(direct_connections))
|
||||
for(var/connection/C in direct_connections)
|
||||
|
||||
//Do merging if conditions are met. Specifically, if there's a non-door connection
|
||||
//to somewhere with space, the zones are merged regardless of equilibrium, to speed
|
||||
//up spacing in areas with double-plated windows.
|
||||
if(C && C.A.zone && C.B.zone)
|
||||
//indirect = 2 is a direct connection.
|
||||
if( C.indirect == 2 )
|
||||
//Do merging if conditions are met. Specifically, if there's a non-door connection
|
||||
//to somewhere with space, the zones are merged regardless of equilibrium, to speed
|
||||
//up spacing in areas with double-plated windows.
|
||||
if(C.A.zone && C.B.zone)
|
||||
if(C.A.zone.air.compare(C.B.zone.air) || unsimulated_tiles)
|
||||
ZMerge(C.A.zone,C.B.zone)
|
||||
|
||||
@@ -248,10 +261,17 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
if(Z.last_update > last_update)
|
||||
continue
|
||||
|
||||
//Handle adjacent zones that are sleeping
|
||||
if(Z.status == ZONE_SLEEPING)
|
||||
if(air.compare(Z.air))
|
||||
continue
|
||||
|
||||
else
|
||||
Z.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
if(air && Z.air)
|
||||
//Ensure we're not doing pointless calculations on equilibrium zones.
|
||||
var/moles_delta = abs(air.total_moles() - Z.air.total_moles())
|
||||
if(moles_delta > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
|
||||
if(!air.compare(Z.air))
|
||||
if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure)
|
||||
Airflow(src,Z)
|
||||
var/unsimulated_boost = 0
|
||||
@@ -262,16 +282,75 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
unsimulated_boost = max(0, min(3, unsimulated_boost))
|
||||
ShareRatio( air , Z.air , connected_zones[Z] + unsimulated_boost)
|
||||
|
||||
Z.interactions_with_neighbors++
|
||||
interactions_with_neighbors++
|
||||
|
||||
for(var/zone/Z in closed_connection_zones)
|
||||
//If that zone has already processed, skip it.
|
||||
if(Z.last_update > last_update)
|
||||
continue
|
||||
|
||||
var/handle_temperature = abs(air.temperature - Z.air.temperature) > vsc.connection_temperature_delta
|
||||
|
||||
if(Z.status == ZONE_SLEEPING)
|
||||
if (handle_temperature)
|
||||
Z.SetStatus(ZONE_ACTIVE)
|
||||
else
|
||||
continue
|
||||
|
||||
if(air && Z.air)
|
||||
if( abs(air.temperature - Z.air.temperature) > vsc.connection_temperature_delta )
|
||||
if( handle_temperature )
|
||||
ShareHeat(air, Z.air, closed_connection_zones[Z])
|
||||
|
||||
Z.interactions_with_neighbors++
|
||||
interactions_with_neighbors++
|
||||
|
||||
if(!interactions_with_neighbors && !unsimulated_tiles)
|
||||
SetStatus(ZONE_SLEEPING)
|
||||
|
||||
interactions_with_neighbors = 0
|
||||
|
||||
progress = "all components completed successfully, the problem is not here"
|
||||
|
||||
|
||||
/zone/proc/SetStatus(var/new_status)
|
||||
if(status == ZONE_SLEEPING && new_status == ZONE_ACTIVE)
|
||||
air_master.active_zones.Add(src)
|
||||
status = ZONE_ACTIVE
|
||||
|
||||
else if(status == ZONE_ACTIVE && new_status == ZONE_SLEEPING)
|
||||
air_master.active_zones.Remove(src)
|
||||
status = ZONE_SLEEPING
|
||||
if(!archived_air)
|
||||
archived_air = new
|
||||
archived_air.copy_from(air)
|
||||
|
||||
|
||||
/zone/proc/assume_air(var/datum/gas_mixture/giver)
|
||||
if(status == ZONE_ACTIVE)
|
||||
return air.merge(giver)
|
||||
|
||||
else
|
||||
var/result = air.merge(giver)
|
||||
|
||||
if(!archived_air.compare(air))
|
||||
SetStatus(ZONE_ACTIVE)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
/zone/proc/remove_air(var/amount)
|
||||
if(status == ZONE_ACTIVE)
|
||||
return air.remove(amount)
|
||||
|
||||
else
|
||||
var/result = air.remove(amount)
|
||||
|
||||
if(!archived_air.compare(air))
|
||||
SetStatus(ZONE_ACTIVE)
|
||||
|
||||
return result
|
||||
|
||||
////////////////
|
||||
//Air Movement//
|
||||
////////////////
|
||||
@@ -383,7 +462,7 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
|
||||
unsim_co2 *= correction_ratio
|
||||
unsim_nitrogen *= correction_ratio
|
||||
unsim_plasma *= correction_ratio
|
||||
unsim_heat_capacity = HEAT_CAPACITY_CALCULATION(unsim_oxygen,unsim_co2,unsim_nitrogen,unsim_plasma)
|
||||
unsim_heat_capacity = HEAT_CAPACITY_CALCULATION(unsim_oxygen, unsim_co2, unsim_nitrogen, unsim_plasma)
|
||||
|
||||
var
|
||||
ratio = sharing_lookup_table[6]
|
||||
@@ -402,6 +481,9 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
|
||||
co2_avg = (full_co2 + unsim_co2) / (size + share_size)
|
||||
plasma_avg = (full_plasma + unsim_plasma) / (size + share_size)
|
||||
|
||||
temp_avg = 0
|
||||
|
||||
if((full_heat_capacity + unsim_heat_capacity) > 0)
|
||||
temp_avg = (A.temperature * full_heat_capacity + unsim_temperature * unsim_heat_capacity) / (full_heat_capacity + unsim_heat_capacity)
|
||||
|
||||
if(sharing_lookup_table.len >= unsimulated_tiles.len) //6 or more interconnecting tiles will max at 42% of air moved per tick.
|
||||
@@ -451,72 +533,151 @@ proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
///////////////////
|
||||
//Zone Rebuilding//
|
||||
///////////////////
|
||||
//Used for updating zone geometry when a zone is cut into two parts.
|
||||
|
||||
zone/proc/Rebuild()
|
||||
if(last_rebuilt == air_master.current_cycle)
|
||||
return
|
||||
|
||||
last_rebuilt = air_master.current_cycle
|
||||
|
||||
var/list/new_zone_contents = IsolateContents()
|
||||
if(new_zone_contents.len == 1)
|
||||
return
|
||||
|
||||
var/list/current_contents
|
||||
var/list/new_zones = list()
|
||||
|
||||
contents = new_zone_contents[1]
|
||||
air.group_multiplier = contents.len
|
||||
|
||||
for(var/identifier in 2 to new_zone_contents.len)
|
||||
current_contents = new_zone_contents[identifier]
|
||||
var/zone/new_zone = new (current_contents)
|
||||
new_zone.air.copy_from(air)
|
||||
new_zones += new_zone
|
||||
|
||||
for(var/connection/connection in connections)
|
||||
connection.Cleanup()
|
||||
|
||||
var/turf/simulated/adjacent
|
||||
|
||||
for(var/turf/unsimulated in unsimulated_tiles)
|
||||
for(var/direction in cardinal)
|
||||
adjacent = get_step(unsimulated, direction)
|
||||
|
||||
if(istype(adjacent) && adjacent.CanPass(null, unsimulated, 0, 0))
|
||||
for(var/zone/zone in new_zones)
|
||||
if(adjacent in zone)
|
||||
zone.AddTurf(unsimulated)
|
||||
|
||||
|
||||
//Implements a two-pass connected component labeling algorithm to determine if the zone is, in fact, split.
|
||||
|
||||
/zone/proc/IsolateContents()
|
||||
var/list/current_adjacents = list()
|
||||
var/adjacent_id
|
||||
var/lowest_id
|
||||
|
||||
var/list/identical_ids = list()
|
||||
var/list/turfs = contents.Copy()
|
||||
var/current_identifier = 1
|
||||
|
||||
for(var/turf/simulated/current in turfs)
|
||||
lowest_id = null
|
||||
current_adjacents = list()
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if( !(current.air_check_directions & direction))
|
||||
continue
|
||||
var/turf/simulated/adjacent = get_step(current, direction)
|
||||
if(adjacent in turfs)
|
||||
current_adjacents += adjacent
|
||||
adjacent_id = turfs[adjacent]
|
||||
|
||||
if(adjacent_id && (!lowest_id || adjacent_id < lowest_id))
|
||||
lowest_id = adjacent_id
|
||||
|
||||
if(!lowest_id)
|
||||
lowest_id = current_identifier++
|
||||
identical_ids += lowest_id
|
||||
|
||||
for(var/turf/simulated/adjacent in current_adjacents)
|
||||
adjacent_id = turfs[adjacent]
|
||||
if(adjacent_id != lowest_id)
|
||||
if(adjacent_id)
|
||||
identical_ids[adjacent_id] = lowest_id
|
||||
turfs[adjacent] = lowest_id
|
||||
turfs[current] = lowest_id
|
||||
|
||||
var/list/final_arrangement = list()
|
||||
|
||||
for(var/turf/simulated/current in turfs)
|
||||
current_identifier = identical_ids[turfs[current]]
|
||||
|
||||
if( current_identifier > final_arrangement.len )
|
||||
final_arrangement.len = current_identifier
|
||||
final_arrangement[current_identifier] = list(current)
|
||||
|
||||
else
|
||||
final_arrangement[current_identifier] += current
|
||||
|
||||
//lazy but fast
|
||||
final_arrangement.Remove(null)
|
||||
|
||||
return final_arrangement
|
||||
|
||||
|
||||
/*
|
||||
if(!RequiresRebuild())
|
||||
return
|
||||
|
||||
//Choose a random turf and regenerate the zone from it.
|
||||
var
|
||||
turf/simulated/sample = locate() in contents
|
||||
list/new_contents
|
||||
problem = 0
|
||||
var/list/new_contents
|
||||
var/list/new_unsimulated
|
||||
|
||||
//
|
||||
var/list/turfs_to_consider = contents.Copy()
|
||||
var/list/turfs_needing_zones = list()
|
||||
|
||||
while(!sample || !sample.CanPass(null, sample, 1.5, 1))
|
||||
if(sample)
|
||||
turfs_to_consider.Remove(sample)
|
||||
sample = locate() in turfs_to_consider
|
||||
if(!sample)
|
||||
break
|
||||
var/list/zones_to_check_connections = list(src)
|
||||
|
||||
if(!istype(sample) || !sample.CanPass(null, sample, 1.5, 1)) //Not a single valid turf.
|
||||
for(var/turf/simulated/T in contents)
|
||||
air_master.tiles_to_update |= T
|
||||
if(!locate(/turf/simulated/floor) in contents)
|
||||
for(var/turf/simulated/turf in contents)
|
||||
air_master.ReconsiderTileZone(turf)
|
||||
return SoftDelete()
|
||||
|
||||
new_contents = FloodFill(sample)
|
||||
var/turfs_to_ignore = list()
|
||||
if(direct_connections)
|
||||
for(var/connection/connection in direct_connections)
|
||||
if(connection.A.zone != src)
|
||||
turfs_to_ignore += A
|
||||
else if(connection.B.zone != src)
|
||||
turfs_to_ignore += B
|
||||
|
||||
var/list/new_unsimulated = ( unsimulated_tiles ? unsimulated_tiles : list() )
|
||||
new_unsimulated = ( unsimulated_tiles ? unsimulated_tiles : list() )
|
||||
|
||||
//Now, we have allocated the new turfs into proper lists, and we can start actually rebuilding.
|
||||
|
||||
//If something isn't carried over, it will need a new zone.
|
||||
for(var/turf/T in contents)
|
||||
if(!(T in new_contents))
|
||||
RemoveTurf(T)
|
||||
turfs_needing_zones += T
|
||||
|
||||
//Handle addition of new turfs
|
||||
for(var/turf/S in new_contents)
|
||||
if(!istype(S, /turf/simulated))
|
||||
new_unsimulated |= S
|
||||
new_contents.Remove(S)
|
||||
|
||||
if(contents.len != new_contents.len)
|
||||
problem = 1
|
||||
//If something new is added, we need to deal with it seperately.
|
||||
else if(!(S in contents) && istype(S, /turf/simulated))
|
||||
if(!(S.zone in zones_to_check_connections))
|
||||
zones_to_check_connections += S.zone
|
||||
|
||||
//If something isn't carried over, there was a complication.
|
||||
for(var/turf/T in contents)
|
||||
if(!(T in new_contents))
|
||||
T.zone = null
|
||||
problem = 1
|
||||
S.zone.RemoveTurf(S)
|
||||
AddTurf(S)
|
||||
|
||||
if(problem)
|
||||
//Build some new zones for stuff that wasn't included.
|
||||
var/list/turf/simulated/rebuild_turfs = contents - new_contents
|
||||
var/list/turf/simulated/reconsider_turfs = list()
|
||||
contents = new_contents
|
||||
for(var/turf/simulated/T in rebuild_turfs)
|
||||
if(!T.zone && T.CanPass(null, T, 1.5, 1))
|
||||
var/zone/Z = new /zone(T)
|
||||
Z.air.copy_from(air)
|
||||
else
|
||||
reconsider_turfs |= T
|
||||
for(var/turf/simulated/T in reconsider_turfs)
|
||||
if(!T.zone && T.CanPass(null, T, 1.5, 1))
|
||||
var/zone/Z = new /zone(T)
|
||||
Z.air.copy_from(air)
|
||||
else if(!T in air_master.tiles_to_update)
|
||||
air_master.tiles_to_update.Add(T)
|
||||
|
||||
for(var/turf/simulated/T in contents)
|
||||
if(T.zone && T.zone != src)
|
||||
T.zone.RemoveTurf(T)
|
||||
T.zone = src
|
||||
else if(!T.zone)
|
||||
T.zone = src
|
||||
air.group_multiplier = contents.len
|
||||
//Handle the addition of new unsimulated tiles.
|
||||
unsimulated_tiles = null
|
||||
|
||||
if(new_unsimulated.len)
|
||||
@@ -528,20 +689,13 @@ zone/proc/Rebuild()
|
||||
if(istype(T) && T.zone && S.CanPass(null, T, 0, 0))
|
||||
T.zone.AddTurf(S)
|
||||
|
||||
//UNUSED
|
||||
/*
|
||||
zone/proc/connected_zones()
|
||||
//A legacy proc for getting connected zones.
|
||||
. = list()
|
||||
for(var/connection/C in connections)
|
||||
var/zone/Z
|
||||
if(C.A.zone == src)
|
||||
Z = C.B.zone
|
||||
else
|
||||
Z = C.A.zone
|
||||
//Finally, handle the orphaned turfs
|
||||
|
||||
for(var/turf/simulated/T in turfs_needing_zones)
|
||||
if(!T.zone)
|
||||
zones_to_check_connections += new /zone(T)
|
||||
|
||||
for(var/zone/zone in zones_to_check_connections)
|
||||
for(var/connection/C in zone.connections)
|
||||
C.Cleanup()*/
|
||||
|
||||
if(Z in .)
|
||||
.[Z]++
|
||||
else
|
||||
. += Z
|
||||
.[Z] = 1*/
|
||||
|
||||
@@ -366,4 +366,4 @@ var/list/DummyCache = list()
|
||||
if(delay)
|
||||
spawn(delay)
|
||||
for(var/client/C in group)
|
||||
C.screen -= O
|
||||
C.screen -= O
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/proc/log_attack(text)
|
||||
if (config.log_attack)
|
||||
diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]"
|
||||
diary << "\[[time_stamp()]]ATTACK: [text]" //Seperate attack logs? Why?
|
||||
|
||||
/proc/log_adminsay(text)
|
||||
if (config.log_adminchat)
|
||||
|
||||
+35
-8
@@ -1,14 +1,41 @@
|
||||
proc/random_hair_style(gender, species = "Human")
|
||||
switch(gender)
|
||||
if(MALE) return pick(hair_styles_male_list)
|
||||
if(FEMALE) return pick(hair_styles_female_list)
|
||||
else return pick(hair_styles_list)
|
||||
var/h_style = "Bald"
|
||||
|
||||
var/list/valid_hairstyles = list()
|
||||
for(var/hairstyle in hair_styles_list)
|
||||
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
|
||||
if(gender == MALE && S.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && S.gender == MALE)
|
||||
continue
|
||||
if( !(species in S.species_allowed))
|
||||
continue
|
||||
valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
|
||||
|
||||
if(valid_hairstyles.len)
|
||||
h_style = pick(valid_hairstyles)
|
||||
|
||||
return h_style
|
||||
|
||||
proc/random_facial_hair_style(gender, species = "Human")
|
||||
switch(gender)
|
||||
if(MALE) return pick(facial_hair_styles_male_list)
|
||||
if(FEMALE) return pick(facial_hair_styles_female_list)
|
||||
else return pick(facial_hair_styles_list)
|
||||
var/f_style = "Shaved"
|
||||
|
||||
var/list/valid_facialhairstyles = list()
|
||||
for(var/facialhairstyle in facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
|
||||
if(gender == MALE && S.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && S.gender == MALE)
|
||||
continue
|
||||
if( !(species in S.species_allowed))
|
||||
continue
|
||||
|
||||
valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
|
||||
|
||||
if(valid_facialhairstyles.len)
|
||||
f_style = pick(valid_facialhairstyles)
|
||||
|
||||
return f_style
|
||||
|
||||
proc/random_name(gender, species = "Human")
|
||||
if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
||||
|
||||
@@ -350,20 +350,11 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
//When an AI is activated, it can choose from a list of non-slaved borgs to have as a slave.
|
||||
/proc/freeborg()
|
||||
var/select = null
|
||||
var/list/names = list()
|
||||
var/list/borgs = list()
|
||||
var/list/namecounts = list()
|
||||
for (var/mob/living/silicon/robot/A in player_list)
|
||||
var/name = A.real_name
|
||||
if (A.stat == 2)
|
||||
if (A.stat == 2 || A.connected_ai || A.scrambledcodes)
|
||||
continue
|
||||
if (A.connected_ai)
|
||||
continue
|
||||
else
|
||||
if(A.module)
|
||||
name += " ([A.module.name])"
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
var/name = "[A.real_name] ([A.modtype] [A.braintype])"
|
||||
borgs[name] = A
|
||||
|
||||
if (borgs.len)
|
||||
@@ -551,57 +542,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return key_name(whom, 1, include_name)
|
||||
|
||||
|
||||
// Registers the on-close verb for a browse window (client/verb/.windowclose)
|
||||
// this will be called when the close-button of a window is pressed.
|
||||
//
|
||||
// This is usually only needed for devices that regularly update the browse window,
|
||||
// e.g. canisters, timers, etc.
|
||||
//
|
||||
// windowid should be the specified window name
|
||||
// e.g. code is : user << browse(text, "window=fred")
|
||||
// then use : onclose(user, "fred")
|
||||
//
|
||||
// Optionally, specify the "ref" parameter as the controlled atom (usually src)
|
||||
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
|
||||
// Otherwise, the user mob's machine var will be reset directly.
|
||||
//
|
||||
/proc/onclose(mob/user, windowid, var/atom/ref=null)
|
||||
if(!user.client) return
|
||||
var/param = "null"
|
||||
if(ref)
|
||||
param = "\ref[ref]"
|
||||
|
||||
winset(user, windowid, "on-close=\".windowclose [param]\"")
|
||||
|
||||
//world << "OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]"
|
||||
|
||||
|
||||
// the on-close client verb
|
||||
// called when a browser popup window is closed after registering with proc/onclose()
|
||||
// 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)
|
||||
set hidden = 1 // hide this verb from the user's panel
|
||||
set name = ".windowclose" // no autocomplete on cmd line
|
||||
|
||||
//world << "windowclose: [atomref]"
|
||||
if(atomref!="null") // if passed a real atomref
|
||||
var/hsrc = locate(atomref) // find the reffed atom
|
||||
var/href = "close=1"
|
||||
if(hsrc)
|
||||
//world << "[src] Topic [href] [hsrc]"
|
||||
usr = src.mob
|
||||
src.Topic(href, params2list(href), hsrc) // this will direct to the atom's
|
||||
return // Topic() proc via client.Topic()
|
||||
|
||||
// no atomref specified (or not found)
|
||||
// so just reset the user mob's machine var
|
||||
if(src && src.mob)
|
||||
//world << "[src] was [src.mob.machine], setting to null"
|
||||
src.mob.unset_machine()
|
||||
return
|
||||
|
||||
//Will return the location of the turf an atom is ultimatly sitting on
|
||||
/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
|
||||
//in case they're in a closet or sleeper or something
|
||||
@@ -1432,3 +1372,6 @@ var/list/WALLITEMS = list(
|
||||
if(O.pixel_x == 0 && O.pixel_y == 0)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/format_text(text)
|
||||
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
|
||||
@@ -65,8 +65,8 @@
|
||||
|
||||
var/server
|
||||
var/banappeals
|
||||
var/wikiurl = "http://baystation12.net/wiki/index.php?title=Main_Page"
|
||||
var/forumurl = "http://baystation12.net/forums/"
|
||||
var/wikiurl
|
||||
var/forumurl
|
||||
|
||||
//Alert level description
|
||||
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||
@@ -80,6 +80,7 @@
|
||||
|
||||
//game_options.txt configs
|
||||
|
||||
var/health_threshold_softcrit = 0
|
||||
var/health_threshold_crit = 0
|
||||
var/health_threshold_dead = -100
|
||||
|
||||
@@ -443,6 +444,8 @@
|
||||
switch(name)
|
||||
if("health_threshold_crit")
|
||||
config.health_threshold_crit = value
|
||||
if("health_threshold_softcrit")
|
||||
config.health_threshold_softcrit = value
|
||||
if("health_threshold_dead")
|
||||
config.health_threshold_dead = value
|
||||
if("revival_pod_plants")
|
||||
|
||||
@@ -57,7 +57,7 @@ datum/controller/game_controller/proc/setup()
|
||||
|
||||
if(!air_master)
|
||||
air_master = new /datum/controller/air_system()
|
||||
air_master.setup()
|
||||
air_master.Setup()
|
||||
|
||||
if(!ticker)
|
||||
ticker = new /datum/controller/gameticker()
|
||||
@@ -126,14 +126,8 @@ datum/controller/game_controller/proc/process()
|
||||
if(!air_processing_killed)
|
||||
timer = world.timeofday
|
||||
last_thing_processed = air_master.type
|
||||
air_master.tick()
|
||||
air_cost = (world.timeofday - timer) / 10 // this might make atmos slower
|
||||
// 1. atmos won't process if the game is generally lagged out(no deadlocks)
|
||||
// 2. if the server frequently crashes during atmos processing we will knowif(!kill_air)
|
||||
//src.set_debug_state("Air Master")
|
||||
|
||||
air_master.current_cycle++
|
||||
if(!air_master.tick()) //Runtimed.
|
||||
if(!air_master.Tick()) //Runtimed.
|
||||
air_master.failed_ticks++
|
||||
if(air_master.failed_ticks > 5)
|
||||
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
|
||||
@@ -142,7 +136,8 @@ datum/controller/game_controller/proc/process()
|
||||
log_admin("ZASALERT: unable run zone/process() -- [air_master.tick_progress]")
|
||||
air_processing_killed = 1
|
||||
air_master.failed_ticks = 0
|
||||
air_cost = (world.timeofday - timer) / 10
|
||||
|
||||
air_cost = (world.timeofday - timer) / 10
|
||||
|
||||
sleep(breather_ticks)
|
||||
|
||||
|
||||
@@ -117,16 +117,23 @@ datum/controller/vote
|
||||
var/text
|
||||
if(winners.len > 0)
|
||||
if(winners.len > 1)
|
||||
text = "<b>Vote Tied Between:</b>\n"
|
||||
for(var/option in winners)
|
||||
text += "\t[option]\n"
|
||||
if(mode != "gamemode" || ticker.hide_mode == 0) // Here we are making sure we don't announce potential game modes
|
||||
text = "<b>Vote Tied Between:</b>\n"
|
||||
for(var/option in winners)
|
||||
text += "\t[option]\n"
|
||||
. = pick(winners)
|
||||
|
||||
for(var/key in current_votes)
|
||||
if(choices[current_votes[key]] == .)
|
||||
round_voters += key // Keep track of who voted for the winning round.
|
||||
if((mode == "gamemode" && . == "extended") || ticker.hide_mode == 0) // Announce Extended gamemode, but not other gamemodes
|
||||
text += "<b>Vote Result: [.]</b>"
|
||||
else
|
||||
if(mode != "gamemode")
|
||||
text += "<b>Vote Result: [.]</b>"
|
||||
else
|
||||
text += "<b>The vote has ended.</b>" // What will be shown if it is a gamemode vote that isn't extended
|
||||
|
||||
text += "<b>Vote Result: [.]</b>"
|
||||
else
|
||||
text += "<b>Vote Result: Inconclusive - No Votes!</b>"
|
||||
log_vote(text)
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
/datum/browser
|
||||
var/mob/user
|
||||
var/title
|
||||
var/window_id // window_id is used as the window name for browse and onclose
|
||||
var/width = 0
|
||||
var/height = 0
|
||||
var/atom/ref = null
|
||||
var/window_options = "focus=0;can_close=1;can_minimize=1;can_maximize=0;can_resize=1;titlebar=1;" // window option is set using window_id
|
||||
var/stylesheets[0]
|
||||
var/scripts[0]
|
||||
var/title_image
|
||||
var/head_elements
|
||||
var/body_elements
|
||||
var/head_content = ""
|
||||
var/content = ""
|
||||
|
||||
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
|
||||
|
||||
user = nuser
|
||||
window_id = nwindow_id
|
||||
if (ntitle)
|
||||
title = format_text(ntitle)
|
||||
if (nwidth)
|
||||
width = nwidth
|
||||
if (nheight)
|
||||
height = nheight
|
||||
if (nref)
|
||||
ref = nref
|
||||
add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs
|
||||
|
||||
/datum/browser/proc/add_head_content(nhead_content)
|
||||
head_content = nhead_content
|
||||
|
||||
/datum/browser/proc/set_window_options(nwindow_options)
|
||||
window_options = nwindow_options
|
||||
|
||||
/datum/browser/proc/set_title_image(ntitle_image)
|
||||
//title_image = ntitle_image
|
||||
|
||||
/datum/browser/proc/add_stylesheet(name, file)
|
||||
stylesheets[name] = file
|
||||
|
||||
/datum/browser/proc/add_script(name, file)
|
||||
scripts[name] = file
|
||||
|
||||
/datum/browser/proc/set_content(ncontent)
|
||||
content = ncontent
|
||||
|
||||
/datum/browser/proc/add_content(ncontent)
|
||||
content += ncontent
|
||||
|
||||
/datum/browser/proc/get_header()
|
||||
var/key
|
||||
var/filename
|
||||
for (key in stylesheets)
|
||||
filename = "[ckey(key)].css"
|
||||
user << browse_rsc(stylesheets[key], filename)
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[filename]'>"
|
||||
|
||||
for (key in scripts)
|
||||
filename = "[ckey(key)].js"
|
||||
user << browse_rsc(scripts[key], filename)
|
||||
head_content += "<script type='text/javascript' src='[filename]'></script>"
|
||||
|
||||
var/title_attributes = "class='uiTitle'"
|
||||
if (title_image)
|
||||
title_attributes = "class='uiTitle icon' style='background-image: url([title_image]);'"
|
||||
|
||||
return {"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<head>
|
||||
[head_content]
|
||||
</head>
|
||||
<body scroll=auto>
|
||||
<div class='uiWrapper'>
|
||||
[title ? "<div class='uiTitleWrapper'><div [title_attributes]><tt>[title]</tt></div></div>" : ""]
|
||||
<div class='uiContent'>
|
||||
"}
|
||||
|
||||
/datum/browser/proc/get_footer()
|
||||
return {"
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>"}
|
||||
|
||||
/datum/browser/proc/get_content()
|
||||
return {"
|
||||
[get_header()]
|
||||
[content]
|
||||
[get_footer()]
|
||||
"}
|
||||
|
||||
/datum/browser/proc/open(var/use_onclose = 1)
|
||||
var/window_size = ""
|
||||
if (width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
user << browse(get_content(), "window=[window_id];[window_size][window_options]")
|
||||
if (use_onclose)
|
||||
onclose(user, window_id, ref)
|
||||
|
||||
/datum/browser/proc/close()
|
||||
user << browse(null, "window=[window_id]")
|
||||
|
||||
// This will allow you to show an icon in the browse window
|
||||
// This is added to mob so that it can be used without a reference to the browser object
|
||||
// There is probably a better place for this...
|
||||
/mob/proc/browse_rsc_icon(icon, icon_state, dir = -1)
|
||||
/*
|
||||
var/icon/I
|
||||
if (dir >= 0)
|
||||
I = new /icon(icon, icon_state, dir)
|
||||
else
|
||||
I = new /icon(icon, icon_state)
|
||||
dir = "default"
|
||||
|
||||
var/filename = "[ckey("[icon]_[icon_state]_[dir]")].png"
|
||||
src << browse_rsc(I, filename)
|
||||
return filename
|
||||
*/
|
||||
|
||||
|
||||
// Registers the on-close verb for a browse window (client/verb/.windowclose)
|
||||
// this will be called when the close-button of a window is pressed.
|
||||
//
|
||||
// This is usually only needed for devices that regularly update the browse window,
|
||||
// e.g. canisters, timers, etc.
|
||||
//
|
||||
// windowid should be the specified window name
|
||||
// e.g. code is : user << browse(text, "window=fred")
|
||||
// then use : onclose(user, "fred")
|
||||
//
|
||||
// Optionally, specify the "ref" parameter as the controlled atom (usually src)
|
||||
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
|
||||
// Otherwise, the user mob's machine var will be reset directly.
|
||||
//
|
||||
/proc/onclose(mob/user, windowid, var/atom/ref=null)
|
||||
if(!user.client) return
|
||||
var/param = "null"
|
||||
if(ref)
|
||||
param = "\ref[ref]"
|
||||
|
||||
winset(user, windowid, "on-close=\".windowclose [param]\"")
|
||||
|
||||
//world << "OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]"
|
||||
|
||||
|
||||
// the on-close client verb
|
||||
// called when a browser popup window is closed after registering with proc/onclose()
|
||||
// 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)
|
||||
set hidden = 1 // hide this verb from the user's panel
|
||||
set name = ".windowclose" // no autocomplete on cmd line
|
||||
|
||||
//world << "windowclose: [atomref]"
|
||||
if(atomref!="null") // if passed a real atomref
|
||||
var/hsrc = locate(atomref) // find the reffed atom
|
||||
var/href = "close=1"
|
||||
if(hsrc)
|
||||
//world << "[src] Topic [href] [hsrc]"
|
||||
usr = src.mob
|
||||
src.Topic(href, params2list(href), hsrc) // this will direct to the atom's
|
||||
return // Topic() proc via client.Topic()
|
||||
|
||||
// no atomref specified (or not found)
|
||||
// so just reset the user mob's machine var
|
||||
if(src && src.mob)
|
||||
//world << "[src] was [src.mob.machine], setting to null"
|
||||
src.mob.unset_machine()
|
||||
return
|
||||
+11
-7
@@ -91,10 +91,13 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
for(var/C_list in cure_list)
|
||||
if(istype(C_list, /list))
|
||||
for(var/C_id in cure_id)
|
||||
if(!affected_mob.reagents.has_reagent(C_id))
|
||||
if(affected_mob.reagents != null)
|
||||
result = 0
|
||||
else if(!affected_mob.reagents.has_reagent(C_list))
|
||||
result = 0
|
||||
else if(!affected_mob.reagents.has_reagent(C_id))
|
||||
result = 0
|
||||
else if(affected_mob.reagents != null)
|
||||
if(!affected_mob.reagents.has_reagent(C_list))
|
||||
result = 0
|
||||
|
||||
return result
|
||||
|
||||
@@ -123,10 +126,11 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
source = affected_mob
|
||||
else //no source and no mob affected. Rogue disease. Break
|
||||
return
|
||||
|
||||
if(affected_mob)
|
||||
if(affected_mob.reagents.has_reagent("spaceacillin"))
|
||||
return // Don't spread if we have spaceacillin in our system.
|
||||
|
||||
if(affected_mob.reagents != null)
|
||||
if(affected_mob)
|
||||
if(affected_mob.reagents.has_reagent("spaceacillin"))
|
||||
return // Don't spread if we have spaceacillin in our system.
|
||||
|
||||
var/check_range = airborne_range//defaults to airborne - range 2
|
||||
|
||||
|
||||
+15
-13
@@ -130,11 +130,11 @@ datum/mind
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (assigned_role in command_positions)
|
||||
text += "<b>HEAD</b>|officer|employee|headrev|rev"
|
||||
else if (assigned_role in list("Security Officer", "Detective", "Warden"))
|
||||
text += "head|<b>OFFICER</b>|employee|headre|rev"
|
||||
text += "<b>HEAD</b>|employee|headrev|rev"
|
||||
// else if (assigned_role in list("Security Officer", "Detective", "Warden"))
|
||||
// text += "head|<b>OFFICER</b>|employee|headre|rev"
|
||||
else if (src in ticker.mode.head_revolutionaries)
|
||||
text = "head|officer|<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
text = "head|<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
text += "<br>Flash: <a href='?src=\ref[src];revolution=flash'>give</a>"
|
||||
|
||||
var/list/L = current.get_contents()
|
||||
@@ -151,9 +151,9 @@ datum/mind
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];revolution=autoobjectives'>Set to kill all heads</a>."
|
||||
else if (src in ticker.mode.revolutionaries)
|
||||
text += "head|officer|<a href='?src=\ref[src];revolution=clear'>employee</a>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<b>REV</b>"
|
||||
text += "head|<a href='?src=\ref[src];revolution=clear'>employee</a>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<b>REV</b>"
|
||||
else
|
||||
text += "head|officer|<b>EMPLOYEE</b>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
text += "head|<b>EMPLOYEE</b>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
sections["revolution"] = text
|
||||
|
||||
/** CULT ***/
|
||||
@@ -162,18 +162,18 @@ datum/mind
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (assigned_role in command_positions)
|
||||
text += "<b>HEAD</b>|officer|employee|cultist"
|
||||
else if (assigned_role in list("Security Officer", "Detective", "Warden"))
|
||||
text += "head|<b>OFFICER</b>|employee|cultist"
|
||||
text += "<b>HEAD</b>|employee|cultist"
|
||||
// else if (assigned_role in list("Security Officer", "Detective", "Warden"))
|
||||
// text += "head|<b>OFFICER</b>|employee|cultist"
|
||||
else if (src in ticker.mode.cult)
|
||||
text += "head|officer|<a href='?src=\ref[src];cult=clear'>employee</a>|<b>CULTIST</b>"
|
||||
text += "head|<a href='?src=\ref[src];cult=clear'>employee</a>|<b>CULTIST</b>"
|
||||
text += "<br>Give <a href='?src=\ref[src];cult=tome'>tome</a>|<a href='?src=\ref[src];cult=amulet'>amulet</a>."
|
||||
/*
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! Set to sacrifice and <a href='?src=\ref[src];cult=escape'>escape</a> or <a href='?src=\ref[src];cult=summon'>summon</a>."
|
||||
*/
|
||||
else
|
||||
text += "head|officer|<b>EMPLOYEE</b>|<a href='?src=\ref[src];cult=cultist'>cultist</a>"
|
||||
text += "head|<b>EMPLOYEE</b>|<a href='?src=\ref[src];cult=cultist'>cultist</a>"
|
||||
sections["cult"] = text
|
||||
|
||||
/** WIZARD ***/
|
||||
@@ -707,7 +707,8 @@ datum/mind
|
||||
var/mob/living/carbon/human/H = current
|
||||
del(H.belt)
|
||||
del(H.back)
|
||||
del(H.ears)
|
||||
del(H.l_ear)
|
||||
del(H.r_ear)
|
||||
del(H.gloves)
|
||||
del(H.head)
|
||||
del(H.shoes)
|
||||
@@ -989,7 +990,8 @@ datum/mind
|
||||
var/mob/living/carbon/human/H = current
|
||||
del(H.belt)
|
||||
del(H.back)
|
||||
del(H.ears)
|
||||
del(H.l_ear)
|
||||
del(H.r_ear)
|
||||
del(H.gloves)
|
||||
del(H.head)
|
||||
del(H.shoes)
|
||||
|
||||
@@ -68,7 +68,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/farwa
|
||||
name = "Farwa crate"
|
||||
contains = list (/obj/item/weapon/storage/box/farwacubes)
|
||||
contains = list (/obj/item/weapon/storage/box/monkeycubes/farwacubes)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate/freezer
|
||||
containername = "Farwa crate"
|
||||
@@ -76,7 +76,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/skrell
|
||||
name = "Neaera crate"
|
||||
contains = list (/obj/item/weapon/storage/box/neaeracubes)
|
||||
contains = list (/obj/item/weapon/storage/box/monkeycubes/neaeracubes)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate/freezer
|
||||
containername = "Neaera crate"
|
||||
@@ -84,7 +84,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/stok
|
||||
name = "Stok crate"
|
||||
contains = list (/obj/item/weapon/storage/box/stokcubes)
|
||||
contains = list (/obj/item/weapon/storage/box/monkeycubes/stokcubes)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate/freezer
|
||||
containername = "Stok crate"
|
||||
|
||||
@@ -497,26 +497,32 @@ proc/process_ghost_teleport_locs()
|
||||
/area/vox_station/transit
|
||||
name = "\improper hyperspace"
|
||||
icon_state = "shuttle"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/southwest_solars
|
||||
name = "\improper aft port solars"
|
||||
icon_state = "southwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/northwest_solars
|
||||
name = "\improper fore port solars"
|
||||
icon_state = "northwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/northeast_solars
|
||||
name = "\improper fore starboard solars"
|
||||
icon_state = "northeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/southeast_solars
|
||||
name = "\improper aft starboard solars"
|
||||
icon_state = "southeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/mining
|
||||
name = "\improper nearby mining asteroid"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
//PRISON
|
||||
/area/prison
|
||||
@@ -1140,7 +1146,7 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "cloning"
|
||||
|
||||
/area/medical/sleeper
|
||||
name = "\improper Emergency"
|
||||
name = "\improper Medical Treatment Center"
|
||||
icon_state = "exam_room"
|
||||
|
||||
//Security
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
var/mob/living/M = hit_atom
|
||||
M.hitby(src,speed)
|
||||
|
||||
log_attack("<font color='red'>[hit_atom] ([M.ckey]) was hit by [src] thrown by ([src.fingerprintslast])</font>")
|
||||
|
||||
else if(isobj(hit_atom))
|
||||
var/obj/O = hit_atom
|
||||
if(!O.anchored)
|
||||
|
||||
-1692
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,128 @@
|
||||
/////////////////////////// DNA DATUM
|
||||
/datum/dna
|
||||
var/unique_enzymes = null
|
||||
var/struc_enzymes = null
|
||||
var/uni_identity = null
|
||||
var/b_type = "A+"
|
||||
var/mutantrace = null //The type of mutant race the player is if applicable (i.e. potato-man)
|
||||
var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings,
|
||||
|
||||
/datum/dna/proc/check_integrity(var/mob/living/carbon/human/character)
|
||||
if(character)
|
||||
if(length(uni_identity) != 39)
|
||||
//Lazy.
|
||||
var/temp
|
||||
|
||||
//Hair
|
||||
var/hair = 0
|
||||
if(!character.h_style)
|
||||
character.h_style = "Skinhead"
|
||||
|
||||
var/hrange = round(4095 / hair_styles_list.len)
|
||||
var/index = hair_styles_list.Find(character.h_style)
|
||||
if(index)
|
||||
hair = index * hrange - rand(1,hrange-1)
|
||||
|
||||
//Facial Hair
|
||||
var/beard = 0
|
||||
if(!character.f_style)
|
||||
character.f_style = "Shaved"
|
||||
|
||||
var/f_hrange = round(4095 / facial_hair_styles_list.len)
|
||||
index = facial_hair_styles_list.Find(character.f_style)
|
||||
if(index)
|
||||
beard = index * f_hrange - rand(1,f_hrange-1)
|
||||
|
||||
temp = add_zero2(num2hex((character.r_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.r_facial),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_facial),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_facial),1), 3)
|
||||
temp += add_zero2(num2hex(((character.s_tone + 220) * 16),1), 3)
|
||||
temp += add_zero2(num2hex((character.r_eyes),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_eyes),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_eyes),1), 3)
|
||||
|
||||
var/gender
|
||||
|
||||
if (character.gender == MALE)
|
||||
gender = add_zero2(num2hex((rand(1,(2050+BLOCKADD))),1), 3)
|
||||
else
|
||||
gender = add_zero2(num2hex((rand((2051+BLOCKADD),4094)),1), 3)
|
||||
|
||||
temp += gender
|
||||
temp += add_zero2(num2hex((beard),1), 3)
|
||||
temp += add_zero2(num2hex((hair),1), 3)
|
||||
|
||||
uni_identity = temp
|
||||
if(length(struc_enzymes)!= 3*STRUCDNASIZE)
|
||||
var/mutstring = ""
|
||||
for(var/i = 1, i <= STRUCDNASIZE, i++)
|
||||
mutstring += add_zero2(num2hex(rand(1,1024)),3)
|
||||
|
||||
struc_enzymes = mutstring
|
||||
if(length(unique_enzymes) != 32)
|
||||
unique_enzymes = md5(character.real_name)
|
||||
else
|
||||
if(length(uni_identity) != 39) uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
|
||||
if(length(struc_enzymes)!= 3*STRUCDNASIZE) struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
||||
|
||||
/datum/dna/proc/ready_dna(mob/living/carbon/human/character)
|
||||
var/temp
|
||||
|
||||
//Hair
|
||||
var/hair = 0
|
||||
if(!character.h_style)
|
||||
character.h_style = "Bald"
|
||||
|
||||
var/hrange = round(4095 / hair_styles_list.len)
|
||||
var/index = hair_styles_list.Find(character.h_style)
|
||||
if(index)
|
||||
hair = index * hrange - rand(1,hrange-1)
|
||||
|
||||
//Facial Hair
|
||||
var/beard = 0
|
||||
if(!character.f_style)
|
||||
character.f_style = "Shaved"
|
||||
|
||||
var/f_hrange = round(4095 / facial_hair_styles_list.len)
|
||||
index = facial_hair_styles_list.Find(character.f_style)
|
||||
if(index)
|
||||
beard = index * f_hrange - rand(1,f_hrange-1)
|
||||
|
||||
temp = add_zero2(num2hex((character.r_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.r_facial),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_facial),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_facial),1), 3)
|
||||
temp += add_zero2(num2hex(((character.s_tone + 220) * 16),1), 3)
|
||||
temp += add_zero2(num2hex((character.r_eyes),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_eyes),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_eyes),1), 3)
|
||||
|
||||
var/gender
|
||||
|
||||
if (character.gender == MALE)
|
||||
gender = add_zero2(num2hex((rand(1,(2050+BLOCKADD))),1), 3)
|
||||
else
|
||||
gender = add_zero2(num2hex((rand((2051+BLOCKADD),4094)),1), 3)
|
||||
|
||||
temp += gender
|
||||
temp += add_zero2(num2hex((beard),1), 3)
|
||||
temp += add_zero2(num2hex((hair),1), 3)
|
||||
|
||||
uni_identity = temp
|
||||
|
||||
var/mutstring = ""
|
||||
for(var/i = 1, i <= STRUCDNASIZE, i++)
|
||||
mutstring += add_zero2(num2hex(rand(1,1024)),3)
|
||||
|
||||
|
||||
struc_enzymes = mutstring
|
||||
|
||||
unique_enzymes = md5(character.real_name)
|
||||
reg_dna[unique_enzymes] = character.real_name
|
||||
|
||||
/////////////////////////// DNA DATUM
|
||||
@@ -0,0 +1,559 @@
|
||||
/////////////////////////// DNA HELPER-PROCS
|
||||
/proc/getleftblocks(input,blocknumber,blocksize)
|
||||
var/string
|
||||
|
||||
if (blocknumber > 1)
|
||||
string = copytext(input,1,((blocksize*blocknumber)-(blocksize-1)))
|
||||
return string
|
||||
else
|
||||
return null
|
||||
|
||||
/proc/getrightblocks(input,blocknumber,blocksize)
|
||||
var/string
|
||||
if (blocknumber < (length(input)/blocksize))
|
||||
string = copytext(input,blocksize*blocknumber+1,length(input)+1)
|
||||
return string
|
||||
else
|
||||
return null
|
||||
|
||||
/proc/getblockstring(input,block,subblock,blocksize,src,ui) // src is probably used here just for urls; ui is 1 when requesting for the unique identifier screen, 0 for structural enzymes screen
|
||||
var/string
|
||||
var/subpos = 1 // keeps track of the current sub block
|
||||
var/blockpos = 1 // keeps track of the current block
|
||||
|
||||
|
||||
for(var/i = 1, i <= length(input), i++) // loop through each letter
|
||||
|
||||
var/pushstring
|
||||
|
||||
if(subpos == subblock && blockpos == block) // if the current block/subblock is selected, mark it
|
||||
pushstring = "</font color><b>[copytext(input, i, i+1)]</b><font color='blue'>"
|
||||
else
|
||||
if(ui) //This is for allowing block clicks to be differentiated
|
||||
pushstring = "<a href='?src=\ref[src];uimenuset=[num2text(blockpos)];uimenusubset=[num2text(subpos)]'>[copytext(input, i, i+1)]</a>"
|
||||
else
|
||||
pushstring = "<a href='?src=\ref[src];semenuset=[num2text(blockpos)];semenusubset=[num2text(subpos)]'>[copytext(input, i, i+1)]</a>"
|
||||
|
||||
string += pushstring // push the string to the return string
|
||||
|
||||
if(subpos >= blocksize) // add a line break for every block
|
||||
string += " </font color><font color='#285B5B'>|</font color><font color='blue'> "
|
||||
subpos = 0
|
||||
blockpos++
|
||||
|
||||
subpos++
|
||||
|
||||
return string
|
||||
|
||||
|
||||
/proc/getblock(input,blocknumber,blocksize)
|
||||
var/result
|
||||
result = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
|
||||
return result
|
||||
|
||||
/proc/getblockbuffer(input,blocknumber,blocksize)
|
||||
var/result[3]
|
||||
var/block = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
|
||||
for(var/i = 1, i <= 3, i++)
|
||||
result[i] = copytext(block, i, i+1)
|
||||
return result
|
||||
|
||||
/proc/setblock(istring, blocknumber, replacement, blocksize)
|
||||
if(!blocknumber)
|
||||
return istring
|
||||
if(!istring || !replacement || !blocksize) return 0
|
||||
var/result = getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
|
||||
return result
|
||||
|
||||
/proc/add_zero2(t, u)
|
||||
var/temp1
|
||||
while (length(t) < u)
|
||||
t = "0[t]"
|
||||
temp1 = t
|
||||
if (length(t) > u)
|
||||
temp1 = copytext(t,2,u+1)
|
||||
return temp1
|
||||
|
||||
/proc/miniscramble(input,rs,rd)
|
||||
var/output
|
||||
output = null
|
||||
if (input == "C" || input == "D" || input == "E" || input == "F")
|
||||
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"6",prob((rs*10));"7",prob((rs*5)+(rd));"0",prob((rs*5)+(rd));"1",prob((rs*10)-(rd));"2",prob((rs*10)-(rd));"3")
|
||||
if (input == "8" || input == "9" || input == "A" || input == "B")
|
||||
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"A",prob((rs*10));"B",prob((rs*5)+(rd));"C",prob((rs*5)+(rd));"D",prob((rs*5)+(rd));"2",prob((rs*5)+(rd));"3")
|
||||
if (input == "4" || input == "5" || input == "6" || input == "7")
|
||||
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"A",prob((rs*10));"B",prob((rs*5)+(rd));"C",prob((rs*5)+(rd));"D",prob((rs*5)+(rd));"2",prob((rs*5)+(rd));"3")
|
||||
if (input == "0" || input == "1" || input == "2" || input == "3")
|
||||
output = pick(prob((rs*10));"8",prob((rs*10));"9",prob((rs*10));"A",prob((rs*10));"B",prob((rs*10)-(rd));"C",prob((rs*10)-(rd));"D",prob((rs*5)+(rd));"E",prob((rs*5)+(rd));"F")
|
||||
if (!output) output = "5"
|
||||
return output
|
||||
|
||||
//Instead of picking a value far from the input, this will pick values closer to it.
|
||||
//Sorry for the block of code, but it's more efficient then calling text2hex -> loop -> hex2text
|
||||
/proc/miniscrambletarget(input,rs,rd)
|
||||
var/output = null
|
||||
switch(input)
|
||||
if("0")
|
||||
output = pick(prob((rs*10)+(rd));"0",prob((rs*10)+(rd));"1",prob((rs*10));"2",prob((rs*10)-(rd));"3")
|
||||
if("1")
|
||||
output = pick(prob((rs*10)+(rd));"0",prob((rs*10)+(rd));"1",prob((rs*10)+(rd));"2",prob((rs*10));"3",prob((rs*10)-(rd));"4")
|
||||
if("2")
|
||||
output = pick(prob((rs*10));"0",prob((rs*10)+(rd));"1",prob((rs*10)+(rd));"2",prob((rs*10)+(rd));"3",prob((rs*10));"4",prob((rs*10)-(rd));"5")
|
||||
if("3")
|
||||
output = pick(prob((rs*10)-(rd));"0",prob((rs*10));"1",prob((rs*10)+(rd));"2",prob((rs*10)+(rd));"3",prob((rs*10)+(rd));"4",prob((rs*10));"5",prob((rs*10)-(rd));"6")
|
||||
if("4")
|
||||
output = pick(prob((rs*10)-(rd));"1",prob((rs*10));"2",prob((rs*10)+(rd));"3",prob((rs*10)+(rd));"4",prob((rs*10)+(rd));"5",prob((rs*10));"6",prob((rs*10)-(rd));"7")
|
||||
if("5")
|
||||
output = pick(prob((rs*10)-(rd));"2",prob((rs*10));"3",prob((rs*10)+(rd));"4",prob((rs*10)+(rd));"5",prob((rs*10)+(rd));"6",prob((rs*10));"7",prob((rs*10)-(rd));"8")
|
||||
if("6")
|
||||
output = pick(prob((rs*10)-(rd));"3",prob((rs*10));"4",prob((rs*10)+(rd));"5",prob((rs*10)+(rd));"6",prob((rs*10)+(rd));"7",prob((rs*10));"8",prob((rs*10)-(rd));"9")
|
||||
if("7")
|
||||
output = pick(prob((rs*10)-(rd));"4",prob((rs*10));"5",prob((rs*10)+(rd));"6",prob((rs*10)+(rd));"7",prob((rs*10)+(rd));"8",prob((rs*10));"9",prob((rs*10)-(rd));"A")
|
||||
if("8")
|
||||
output = pick(prob((rs*10)-(rd));"5",prob((rs*10));"6",prob((rs*10)+(rd));"7",prob((rs*10)+(rd));"8",prob((rs*10)+(rd));"9",prob((rs*10));"A",prob((rs*10)-(rd));"B")
|
||||
if("9")
|
||||
output = pick(prob((rs*10)-(rd));"6",prob((rs*10));"7",prob((rs*10)+(rd));"8",prob((rs*10)+(rd));"9",prob((rs*10)+(rd));"A",prob((rs*10));"B",prob((rs*10)-(rd));"C")
|
||||
if("10")//A
|
||||
output = pick(prob((rs*10)-(rd));"7",prob((rs*10));"8",prob((rs*10)+(rd));"9",prob((rs*10)+(rd));"A",prob((rs*10)+(rd));"B",prob((rs*10));"C",prob((rs*10)-(rd));"D")
|
||||
if("11")//B
|
||||
output = pick(prob((rs*10)-(rd));"8",prob((rs*10));"9",prob((rs*10)+(rd));"A",prob((rs*10)+(rd));"B",prob((rs*10)+(rd));"C",prob((rs*10));"D",prob((rs*10)-(rd));"E")
|
||||
if("12")//C
|
||||
output = pick(prob((rs*10)-(rd));"9",prob((rs*10));"A",prob((rs*10)+(rd));"B",prob((rs*10)+(rd));"C",prob((rs*10)+(rd));"D",prob((rs*10));"E",prob((rs*10)-(rd));"F")
|
||||
if("13")//D
|
||||
output = pick(prob((rs*10)-(rd));"A",prob((rs*10));"B",prob((rs*10)+(rd));"C",prob((rs*10)+(rd));"D",prob((rs*10)+(rd));"E",prob((rs*10));"F")
|
||||
if("14")//E
|
||||
output = pick(prob((rs*10)-(rd));"B",prob((rs*10));"C",prob((rs*10)+(rd));"D",prob((rs*10)+(rd));"E",prob((rs*10)+(rd));"F")
|
||||
if("15")//F
|
||||
output = pick(prob((rs*10)-(rd));"C",prob((rs*10));"D",prob((rs*10)+(rd));"E",prob((rs*10)+(rd));"F")
|
||||
|
||||
if(!input || !output) //How did this happen?
|
||||
output = "8"
|
||||
|
||||
return output
|
||||
|
||||
/proc/isblockon(hnumber, bnumber , var/UI = 0)
|
||||
|
||||
var/temp2
|
||||
temp2 = hex2num(hnumber)
|
||||
|
||||
if(UI)
|
||||
if(temp2 >= 2050)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
if (bnumber == HULKBLOCK || bnumber == TELEBLOCK || bnumber == NOBREATHBLOCK || bnumber == NOPRINTSBLOCK || bnumber == SMALLSIZEBLOCK || bnumber == SHOCKIMMUNITYBLOCK)
|
||||
if (temp2 >= 3500 + BLOCKADD)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
if (bnumber == XRAYBLOCK || bnumber == FIREBLOCK || bnumber == REMOTEVIEWBLOCK || bnumber == REGENERATEBLOCK || bnumber == INCREASERUNBLOCK || bnumber == REMOTETALKBLOCK || bnumber == MORPHBLOCK)
|
||||
if (temp2 >= 3050 + BLOCKADD)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
if (temp2 >= 2050 + BLOCKADD)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/proc/ismuton(var/block,var/mob/M)
|
||||
return isblockon(getblock(M.dna.struc_enzymes, block,3),block)
|
||||
|
||||
/proc/randmutb(mob/M as mob)
|
||||
if(!M) return
|
||||
var/num
|
||||
var/newdna
|
||||
num = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK)
|
||||
M.dna.check_integrity()
|
||||
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
|
||||
M.dna.struc_enzymes = newdna
|
||||
return
|
||||
|
||||
/proc/randmutg(mob/M as mob)
|
||||
if(!M) return
|
||||
var/num
|
||||
var/newdna
|
||||
num = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK)
|
||||
M.dna.check_integrity()
|
||||
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
|
||||
M.dna.struc_enzymes = newdna
|
||||
return
|
||||
|
||||
/proc/scramble(var/type, mob/M as mob, var/p)
|
||||
if(!M) return
|
||||
M.dna.check_integrity()
|
||||
if(type)
|
||||
for(var/i = 1, i <= STRUCDNASIZE-1, i++)
|
||||
if(prob(p))
|
||||
M.dna.uni_identity = setblock(M.dna.uni_identity, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
|
||||
updateappearance(M, M.dna.uni_identity)
|
||||
|
||||
else
|
||||
for(var/i = 1, i <= STRUCDNASIZE-1, i++)
|
||||
if(prob(p))
|
||||
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
|
||||
domutcheck(M, null)
|
||||
return
|
||||
|
||||
/proc/randmuti(mob/M as mob)
|
||||
if(!M) return
|
||||
var/num
|
||||
var/newdna
|
||||
num = rand(1,UNIDNASIZE)
|
||||
M.dna.check_integrity()
|
||||
newdna = setblock(M.dna.uni_identity,num,add_zero2(num2hex(rand(1,4095),1),3),3)
|
||||
M.dna.uni_identity = newdna
|
||||
return
|
||||
|
||||
/proc/toggledblock(hnumber) //unused
|
||||
var/temp3
|
||||
var/chtemp
|
||||
temp3 = hex2num(hnumber)
|
||||
if (temp3 < 2050)
|
||||
chtemp = rand(2050,4095)
|
||||
return add_zero2(num2hex(chtemp,1),3)
|
||||
else
|
||||
chtemp = rand(1,2049)
|
||||
return add_zero2(num2hex(chtemp,1),3)
|
||||
/////////////////////////// DNA HELPER-PROCS
|
||||
|
||||
/////////////////////////// DNA MISC-PROCS
|
||||
/proc/updateappearance(mob/M as mob , structure)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
M.dna.check_integrity()
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.r_hair = hex2num(getblock(structure,1,3))
|
||||
H.b_hair = hex2num(getblock(structure,2,3))
|
||||
H.g_hair = hex2num(getblock(structure,3,3))
|
||||
H.r_facial = hex2num(getblock(structure,4,3))
|
||||
H.b_facial = hex2num(getblock(structure,5,3))
|
||||
H.g_facial = hex2num(getblock(structure,6,3))
|
||||
H.s_tone = round(((hex2num(getblock(structure,7,3)) / 16) - 220))
|
||||
H.r_eyes = hex2num(getblock(structure,8,3))
|
||||
H.g_eyes = hex2num(getblock(structure,9,3))
|
||||
H.b_eyes = hex2num(getblock(structure,10,3))
|
||||
|
||||
if (isblockon(getblock(structure, 11,3),11 , 1))
|
||||
H.gender = FEMALE
|
||||
else
|
||||
H.gender = MALE
|
||||
|
||||
//Hair
|
||||
var/hairnum = hex2num(getblock(structure,13,3))
|
||||
var/index = round(1 +(hairnum / 4096)*hair_styles_list.len)
|
||||
if((0 < index) && (index <= hair_styles_list.len))
|
||||
H.h_style = hair_styles_list[index]
|
||||
|
||||
//Facial Hair
|
||||
var/beardnum = hex2num(getblock(structure,12,3))
|
||||
index = round(1 +(beardnum / 4096)*facial_hair_styles_list.len)
|
||||
if((0 < index) && (index <= facial_hair_styles_list.len))
|
||||
H.f_style = facial_hair_styles_list[index]
|
||||
|
||||
H.update_body(0)
|
||||
H.update_hair()
|
||||
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/proc/probinj(var/pr, var/inj)
|
||||
return prob(pr+inj*pr)
|
||||
|
||||
/proc/domutcheck(mob/living/M as mob, connected, inj)
|
||||
if (!M) return
|
||||
|
||||
M.dna.check_integrity()
|
||||
|
||||
M.disabilities = 0
|
||||
M.sdisabilities = 0
|
||||
var/old_mutations = M.mutations
|
||||
M.mutations = list()
|
||||
|
||||
// M.see_in_dark = 2
|
||||
// M.see_invisible = 0
|
||||
|
||||
if(PLANT in old_mutations)
|
||||
M.mutations.Add(PLANT)
|
||||
if(SKELETON in old_mutations)
|
||||
M.mutations.Add(SKELETON)
|
||||
if(FAT in old_mutations)
|
||||
M.mutations.Add(FAT)
|
||||
if(HUSK in old_mutations)
|
||||
M.mutations.Add(HUSK)
|
||||
|
||||
if(ismuton(NOBREATHBLOCK,M))
|
||||
if(probinj(45,inj) || (mNobreath in old_mutations))
|
||||
M << "\blue You feel no need to breathe."
|
||||
M.mutations.Add(mNobreath)
|
||||
if(ismuton(REMOTEVIEWBLOCK,M))
|
||||
if(probinj(45,inj) || (mRemote in old_mutations))
|
||||
M << "\blue Your mind expands"
|
||||
M.mutations.Add(mRemote)
|
||||
if(ismuton(REGENERATEBLOCK,M))
|
||||
if(probinj(45,inj) || (mRegen in old_mutations))
|
||||
M << "\blue You feel strange"
|
||||
M.mutations.Add(mRegen)
|
||||
if(ismuton(INCREASERUNBLOCK,M))
|
||||
if(probinj(45,inj) || (mRun in old_mutations))
|
||||
M << "\blue You feel quick"
|
||||
M.mutations.Add(mRun)
|
||||
if(ismuton(REMOTETALKBLOCK,M))
|
||||
if(probinj(45,inj) || (mRemotetalk in old_mutations))
|
||||
M << "\blue You expand your mind outwards"
|
||||
M.mutations.Add(mRemotetalk)
|
||||
if(ismuton(MORPHBLOCK,M))
|
||||
if(probinj(45,inj) || (mMorph in old_mutations))
|
||||
M.mutations.Add(mMorph)
|
||||
M << "\blue Your skin feels strange"
|
||||
if(ismuton(BLENDBLOCK,M))
|
||||
if(probinj(45,inj) || (mBlend in old_mutations))
|
||||
M.mutations.Add(mBlend)
|
||||
M << "\blue You feel alone"
|
||||
if(ismuton(HALLUCINATIONBLOCK,M))
|
||||
if(probinj(45,inj) || (mHallucination in old_mutations))
|
||||
M.mutations.Add(mHallucination)
|
||||
M << "\blue Your mind says 'Hello'"
|
||||
if(ismuton(NOPRINTSBLOCK,M))
|
||||
if(probinj(45,inj) || (mFingerprints in old_mutations))
|
||||
M.mutations.Add(mFingerprints)
|
||||
M << "\blue Your fingers feel numb"
|
||||
if(ismuton(SHOCKIMMUNITYBLOCK,M))
|
||||
if(probinj(45,inj) || (mShock in old_mutations))
|
||||
M.mutations.Add(mShock)
|
||||
M << "\blue You feel strange"
|
||||
if(ismuton(SMALLSIZEBLOCK,M))
|
||||
if(probinj(45,inj) || (mSmallsize in old_mutations))
|
||||
M << "\blue Your skin feels rubbery"
|
||||
M.mutations.Add(mSmallsize)
|
||||
|
||||
|
||||
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),HULKBLOCK))
|
||||
if(probinj(5,inj) || (HULK in old_mutations))
|
||||
M << "\blue Your muscles hurt."
|
||||
M.mutations.Add(HULK)
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK))
|
||||
M.disabilities |= EPILEPSY
|
||||
M << "\red You get a headache."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),FAKEBLOCK))
|
||||
M << "\red You feel strange."
|
||||
if (prob(95))
|
||||
if(prob(50))
|
||||
randmutb(M)
|
||||
else
|
||||
randmuti(M)
|
||||
else
|
||||
randmutg(M)
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, COUGHBLOCK,3),COUGHBLOCK))
|
||||
M.disabilities |= COUGHING
|
||||
M << "\red You start coughing."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK))
|
||||
M << "\red You feel lightheaded."
|
||||
M.mutations.Add(CLUMSY)
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK))
|
||||
M.disabilities |= TOURETTES
|
||||
M << "\red You twitch."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),XRAYBLOCK))
|
||||
if(probinj(30,inj) || (XRAY in old_mutations))
|
||||
M << "\blue The walls suddenly disappear."
|
||||
// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
// M.see_in_dark = 8
|
||||
// M.see_invisible = 2
|
||||
M.mutations.Add(XRAY)
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK))
|
||||
M.disabilities |= NERVOUS
|
||||
M << "\red You feel nervous."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),FIREBLOCK))
|
||||
if(probinj(30,inj) || (COLD_RESISTANCE in old_mutations))
|
||||
M << "\blue Your body feels warm."
|
||||
M.mutations.Add(COLD_RESISTANCE)
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK))
|
||||
M.sdisabilities |= BLIND
|
||||
M << "\red You can't seem to see anything."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),TELEBLOCK))
|
||||
if(probinj(15,inj) || (TK in old_mutations))
|
||||
M << "\blue You feel smarter."
|
||||
M.mutations.Add(TK)
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK))
|
||||
M.sdisabilities |= DEAF
|
||||
M.ear_deaf = 1
|
||||
M << "\red Its kinda quiet.."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, GLASSESBLOCK,3),GLASSESBLOCK))
|
||||
M.disabilities |= NEARSIGHTED
|
||||
M << "Your eyes feel weird..."
|
||||
|
||||
/* If you want the new mutations to work, UNCOMMENT THIS.
|
||||
if(istype(M, /mob/living/carbon))
|
||||
for (var/datum/mutations/mut in global_mutations)
|
||||
mut.check_mutation(M)
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////// Monkey Block
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
|
||||
// human > monkey
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.monkeyizing = 1
|
||||
var/list/implants = list() //Try to preserve implants.
|
||||
for(var/obj/item/weapon/implant/W in H)
|
||||
implants += W
|
||||
W.loc = null
|
||||
|
||||
if(!connected)
|
||||
for(var/obj/item/W in (H.contents-implants))
|
||||
if (W==H.w_uniform) // will be teared
|
||||
continue
|
||||
H.drop_from_inventory(W)
|
||||
M.monkeyizing = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
M.invisibility = 101
|
||||
var/atom/movable/overlay/animation = new( M.loc )
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
flick("h2monkey", animation)
|
||||
sleep(48)
|
||||
del(animation)
|
||||
|
||||
|
||||
var/mob/living/carbon/monkey/O = null
|
||||
if(H.species.primitive)
|
||||
O = new H.species.primitive(src)
|
||||
else
|
||||
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
|
||||
return
|
||||
|
||||
if(M)
|
||||
if (M.dna)
|
||||
O.dna = M.dna
|
||||
M.dna = null
|
||||
|
||||
if (M.suiciding)
|
||||
O.suiciding = M.suiciding
|
||||
M.suiciding = null
|
||||
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
O.viruses += D
|
||||
D.affected_mob = O
|
||||
M.viruses -= D
|
||||
|
||||
|
||||
for(var/obj/T in (M.contents-implants))
|
||||
del(T)
|
||||
|
||||
O.loc = M.loc
|
||||
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
|
||||
|
||||
if (connected) //inside dna thing
|
||||
var/obj/machinery/dna_scannernew/C = connected
|
||||
O.loc = C
|
||||
C.occupant = O
|
||||
connected = null
|
||||
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
|
||||
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
|
||||
O.adjustToxLoss(M.getToxLoss() + 20)
|
||||
O.adjustOxyLoss(M.getOxyLoss())
|
||||
O.stat = M.stat
|
||||
O.a_intent = "hurt"
|
||||
for (var/obj/item/weapon/implant/I in implants)
|
||||
I.loc = O
|
||||
I.implanted = O
|
||||
// O.update_icon = 1 //queue a full icon update at next life() call
|
||||
del(M)
|
||||
return
|
||||
|
||||
if (!isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
|
||||
// monkey > human,
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
Mo.monkeyizing = 1
|
||||
var/list/implants = list() //Still preserving implants
|
||||
for(var/obj/item/weapon/implant/W in Mo)
|
||||
implants += W
|
||||
W.loc = null
|
||||
if(!connected)
|
||||
for(var/obj/item/W in (Mo.contents-implants))
|
||||
Mo.drop_from_inventory(W)
|
||||
M.monkeyizing = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
M.invisibility = 101
|
||||
var/atom/movable/overlay/animation = new( M.loc )
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
flick("monkey2h", animation)
|
||||
sleep(48)
|
||||
del(animation)
|
||||
|
||||
var/mob/living/carbon/human/O = new( src )
|
||||
if(Mo.greaterform)
|
||||
O.set_species(Mo.greaterform)
|
||||
|
||||
if (isblockon(getblock(M.dna.uni_identity, 11,3),11))
|
||||
O.gender = FEMALE
|
||||
else
|
||||
O.gender = MALE
|
||||
|
||||
if (M)
|
||||
if (M.dna)
|
||||
O.dna = M.dna
|
||||
M.dna = null
|
||||
|
||||
if (M.suiciding)
|
||||
O.suiciding = M.suiciding
|
||||
M.suiciding = null
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
O.viruses += D
|
||||
D.affected_mob = O
|
||||
M.viruses -= D
|
||||
|
||||
//for(var/obj/T in M)
|
||||
// del(T)
|
||||
|
||||
O.loc = M.loc
|
||||
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(O) //transfer our mind to the human
|
||||
|
||||
if (connected) //inside dna thing
|
||||
var/obj/machinery/dna_scannernew/C = connected
|
||||
O.loc = C
|
||||
C.occupant = O
|
||||
connected = null
|
||||
|
||||
var/i
|
||||
while (!i)
|
||||
var/randomname
|
||||
if (O.gender == MALE)
|
||||
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
|
||||
else
|
||||
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
|
||||
if (findname(randomname))
|
||||
continue
|
||||
else
|
||||
O.real_name = randomname
|
||||
i++
|
||||
updateappearance(O,O.dna.uni_identity)
|
||||
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
|
||||
O.adjustToxLoss(M.getToxLoss())
|
||||
O.adjustOxyLoss(M.getOxyLoss())
|
||||
O.stat = M.stat
|
||||
for (var/obj/item/weapon/implant/I in implants)
|
||||
I.loc = O
|
||||
I.implanted = O
|
||||
// O.update_icon = 1 //queue a full icon update at next life() call
|
||||
del(M)
|
||||
return
|
||||
//////////////////////////////////////////////////////////// Monkey Block
|
||||
if(M)
|
||||
M.update_icon = 1 //queue a full icon update at next life() call
|
||||
return null
|
||||
/////////////////////////// DNA MISC-PROCS
|
||||
@@ -0,0 +1,862 @@
|
||||
#define DNA_BLOCK_SIZE 3
|
||||
|
||||
/////////////////////////// DNA MACHINES
|
||||
/obj/machinery/dna_scannernew
|
||||
name = "\improper DNA modifier"
|
||||
desc = "It scans DNA structures."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "scanner_0"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
idle_power_usage = 50
|
||||
active_power_usage = 300
|
||||
var/locked = 0
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
|
||||
/obj/machinery/dna_scannernew/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/clonescanner(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
component_parts += new /obj/item/weapon/cable_coil(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/dna_scannernew/allow_drop()
|
||||
return 0
|
||||
|
||||
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
return
|
||||
src.go_out()
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/verb/eject()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Eject DNA Scanner"
|
||||
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
|
||||
eject_occupant()
|
||||
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/proc/eject_occupant()
|
||||
src.go_out()
|
||||
for(var/obj/O in src)
|
||||
if((!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!istype(O,/obj/item/weapon/cable_coil)))
|
||||
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components)
|
||||
if(!occupant)
|
||||
for(var/mob/M in src)//Failsafe so you can get mobs out
|
||||
M.loc = get_turf(src)
|
||||
|
||||
/obj/machinery/dna_scannernew/verb/move_inside()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Enter DNA Scanner"
|
||||
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
if (!ishuman(usr) && !ismonkey(usr)) //Make sure they're a mob that has dna
|
||||
usr << "\blue Try as you might, you can not climb up into the scanner."
|
||||
return
|
||||
if (src.occupant)
|
||||
usr << "\blue <B>The scanner is already occupied!</B>"
|
||||
return
|
||||
if (usr.abiotic())
|
||||
usr << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
return
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
src.icon_state = "scanner_1"
|
||||
/*
|
||||
for(var/obj/O in src) // THIS IS P. STUPID -- LOVE, DOOHL
|
||||
//O = null
|
||||
del(O)
|
||||
//Foreach goto(124)
|
||||
*/
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/attackby(var/obj/item/weapon/item as obj, var/mob/user as mob)
|
||||
if(istype(item, /obj/item/weapon/reagent_containers/glass))
|
||||
if(beaker)
|
||||
user << "\red A beaker is already loaded into the machine."
|
||||
return
|
||||
|
||||
beaker = item
|
||||
user.drop_item()
|
||||
item.loc = src
|
||||
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
|
||||
return
|
||||
else if (!istype(item, /obj/item/weapon/grab))
|
||||
return
|
||||
var/obj/item/weapon/grab/G = item
|
||||
if (!ismob(G.affecting))
|
||||
return
|
||||
if (src.occupant)
|
||||
user << "\blue <B>The scanner is already occupied!</B>"
|
||||
return
|
||||
if (G.affecting.abiotic())
|
||||
user << "\blue <B>Subject cannot have abiotic items on.</B>"
|
||||
return
|
||||
var/mob/M = G.affecting
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "scanner_1"
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
|
||||
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
|
||||
|| locate(/obj/machinery/computer/cloning, get_step(src, SOUTH)) \
|
||||
|| locate(/obj/machinery/computer/cloning, get_step(src, EAST)) \
|
||||
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
|
||||
|
||||
if(!M.client && M.mind)
|
||||
for(var/mob/dead/observer/ghost in player_list)
|
||||
if(ghost.mind == M.mind)
|
||||
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
|
||||
break
|
||||
del(G)
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/proc/go_out()
|
||||
if ((!( src.occupant ) || src.locked))
|
||||
return
|
||||
/*
|
||||
// it's like this was -just- here to break constructed dna scanners -Pete
|
||||
// if that's not the case, slap my shit and uncomment this.
|
||||
// for(var/obj/O in src)
|
||||
// O.loc = src.loc
|
||||
*/
|
||||
//Foreach goto(30)
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
src.icon_state = "scanner_0"
|
||||
return
|
||||
|
||||
/obj/machinery/dna_scannernew/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
//Foreach goto(35)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
//Foreach goto(108)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
//Foreach goto(181)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/dna_scannernew/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
del(src)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew
|
||||
name = "DNA Modifier Access Console"
|
||||
desc = "Scand DNA."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "scanner"
|
||||
density = 1
|
||||
var/selected_ui_block = 1.0
|
||||
var/selected_ui_subblock = 1.0
|
||||
var/selected_se_block = 1.0
|
||||
var/selected_se_subblock = 1.0
|
||||
var/selected_ui_target = 1
|
||||
var/selected_ui_target_hex = 1
|
||||
var/radiation_duration = 2.0
|
||||
var/radiation_intensity = 1.0
|
||||
var/list/buffers = list(
|
||||
list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0),
|
||||
list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0),
|
||||
list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0)
|
||||
)
|
||||
var/irradiating = 0
|
||||
var/injector_ready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
|
||||
var/obj/machinery/dna_scannernew/connected = null
|
||||
var/obj/item/weapon/disk/data/disk = null
|
||||
var/selected_menu_key = null
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 400
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/scan_consolenew/M = new /obj/item/weapon/circuitboard/scan_consolenew( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/scan_consolenew/M = new /obj/item/weapon/circuitboard/scan_consolenew( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
if (istype(I, /obj/item/weapon/disk/data)) //INSERT SOME diskS
|
||||
if (!src.disk)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
src.disk = I
|
||||
user << "You insert [I]."
|
||||
nanomanager.update_uis(src) // update all UIs attached to src()
|
||||
return
|
||||
else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/ex_act(severity)
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/blob_act()
|
||||
|
||||
if(prob(75))
|
||||
del(src)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broken"
|
||||
else if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "c_unpowered"
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/New()
|
||||
..()
|
||||
spawn(5)
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
connected = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
|
||||
if(!isnull(connected))
|
||||
break
|
||||
spawn(250)
|
||||
src.injector_ready = 1
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(var/buffer)
|
||||
var/list/arr = list()
|
||||
for(var/i = 1, i <= length(buffer)/3, i++)
|
||||
arr += "[i]:[copytext(buffer,i*3-2,i*3+1)]"
|
||||
return arr
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/buffer)
|
||||
var/pos = findtext(blk,":")
|
||||
if(!pos) return 0
|
||||
var/id = text2num(copytext(blk,1,pos))
|
||||
if(!id) return 0
|
||||
I.block = id
|
||||
I.dna = copytext(buffer,id*3-2,id*3+1)
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if ((istype(W, /obj/item/weapon/disk/data)) && (!src.disk))
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.disk = W
|
||||
user << "You insert [W]."
|
||||
nanomanager.update_uis(src) // update all UIs attached to src()
|
||||
/*
|
||||
/obj/machinery/computer/scan_consolenew/process() //not really used right now
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if (!( src.status )) //remove this
|
||||
return
|
||||
return
|
||||
*/
|
||||
/obj/machinery/computer/scan_consolenew/attack_paw(user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attack_hand(user as mob)
|
||||
if(!..())
|
||||
ui_interact(user)
|
||||
|
||||
/**
|
||||
* The ui_interact proc is used to open and update Nano UIs
|
||||
* If ui_interact is not used then the UI will not update correctly
|
||||
* ui_interact is currently defined for /atom/movable
|
||||
*
|
||||
* @param user /mob The mob who is interacting with this ui
|
||||
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
|
||||
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
|
||||
if(user == connected.occupant || user.stat)
|
||||
return
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
data["selectedMenuKey"] = selected_menu_key
|
||||
data["locked"] = src.connected.locked
|
||||
data["hasOccupant"] = connected.occupant ? 1 : 0
|
||||
|
||||
data["isInjectorReady"] = injector_ready
|
||||
|
||||
data["hasDisk"] = disk ? 1 : 0
|
||||
|
||||
var/diskData[0]
|
||||
if (!disk)
|
||||
diskData["data"] = null
|
||||
diskData["owner"] = null
|
||||
diskData["label"] = null
|
||||
diskData["type"] = null
|
||||
diskData["ue"] = null
|
||||
else
|
||||
diskData["data"] = disk.data
|
||||
diskData["owner"] = disk.owner
|
||||
diskData["label"] = disk.name
|
||||
diskData["type"] = disk.data_type
|
||||
diskData["ue"] = disk.ue
|
||||
data["disk"] = diskData
|
||||
|
||||
data["buffers"] = buffers
|
||||
|
||||
data["radiationIntensity"] = radiation_intensity
|
||||
data["radiationDuration"] = radiation_duration
|
||||
data["irradiating"] = irradiating
|
||||
|
||||
data["dnaBlockSize"] = DNA_BLOCK_SIZE
|
||||
data["selectedUIBlock"] = selected_ui_block
|
||||
data["selectedUISubBlock"] = selected_ui_subblock
|
||||
data["selectedSEBlock"] = selected_se_block
|
||||
data["selectedSESubBlock"] = selected_se_subblock
|
||||
data["selectedUITarget"] = selected_ui_target
|
||||
data["selectedUITargetHex"] = selected_ui_target_hex
|
||||
|
||||
var/occupantData[0]
|
||||
if (!src.connected.occupant || !src.connected.occupant.dna)
|
||||
occupantData["name"] = null
|
||||
occupantData["stat"] = null
|
||||
occupantData["isViableSubject"] = null
|
||||
occupantData["health"] = null
|
||||
occupantData["maxHealth"] = null
|
||||
occupantData["minHealth"] = null
|
||||
occupantData["uniqueEnzymes"] = null
|
||||
occupantData["uniqueIdentity"] = null
|
||||
occupantData["structuralEnzymes"] = null
|
||||
occupantData["radiationLevel"] = null
|
||||
else
|
||||
occupantData["name"] = connected.occupant.name
|
||||
occupantData["stat"] = connected.occupant.stat
|
||||
occupantData["isViableSubject"] = 1
|
||||
if (NOCLONE in connected.occupant.mutations || !src.connected.occupant.dna)
|
||||
occupantData["isViableSubject"] = 0
|
||||
occupantData["health"] = connected.occupant.health
|
||||
occupantData["maxHealth"] = connected.occupant.maxHealth
|
||||
occupantData["minHealth"] = config.health_threshold_dead
|
||||
occupantData["uniqueEnzymes"] = connected.occupant.dna.unique_enzymes
|
||||
occupantData["uniqueIdentity"] = connected.occupant.dna.uni_identity
|
||||
occupantData["structuralEnzymes"] = connected.occupant.dna.struc_enzymes
|
||||
occupantData["radiationLevel"] = connected.occupant.radiation
|
||||
data["occupant"] = occupantData;
|
||||
|
||||
data["isBeakerLoaded"] = connected.beaker ? 1 : 0
|
||||
data["beakerLabel"] = null
|
||||
data["beakerVolume"] = 0
|
||||
if(connected.beaker)
|
||||
data["beakerLabel"] = connected.beaker.label_text ? connected.beaker.label_text : null
|
||||
if (connected.beaker.reagents && connected.beaker.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in connected.beaker.reagents.reagent_list)
|
||||
data["beakerVolume"] += R.volume
|
||||
|
||||
if (!ui) // no ui has been passed, so we'll search for one
|
||||
{
|
||||
ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
}
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
// Auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
else
|
||||
// The UI is already open so push the new data to it
|
||||
ui.push_data(data)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
|
||||
if(..())
|
||||
return 0 // don't update uis
|
||||
if(!istype(usr.loc, /turf))
|
||||
return 0 // don't update uis
|
||||
if(!src || !src.connected)
|
||||
return 0 // don't update uis
|
||||
if(irradiating) // Make sure that it isn't already irradiating someone...
|
||||
return 0 // don't update uis
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
if (href_list["selectMenuKey"])
|
||||
selected_menu_key = href_list["selectMenuKey"]
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (href_list["toggleLock"])
|
||||
if ((src.connected && src.connected.occupant))
|
||||
src.connected.locked = !( src.connected.locked )
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (href_list["pulseRadiation"])
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
irradiating = 0
|
||||
|
||||
if (!src.connected.occupant)
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (prob(95))
|
||||
if(prob(75))
|
||||
randmutb(src.connected.occupant)
|
||||
else
|
||||
randmuti(src.connected.occupant)
|
||||
else
|
||||
if(prob(95))
|
||||
randmutg(src.connected.occupant)
|
||||
else
|
||||
randmuti(src.connected.occupant)
|
||||
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity*3)+src.radiation_duration*3)
|
||||
src.connected.locked = lock_state
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (href_list["radiationDuration"])
|
||||
if (text2num(href_list["radiationDuration"]) > 0)
|
||||
if (src.radiation_duration < 20)
|
||||
src.radiation_duration += 2
|
||||
else
|
||||
if (src.radiation_duration > 2)
|
||||
src.radiation_duration -= 2
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (href_list["radiationIntensity"])
|
||||
if (text2num(href_list["radiationIntensity"]) > 0)
|
||||
if (src.radiation_intensity < 10)
|
||||
src.radiation_intensity++
|
||||
else
|
||||
if (src.radiation_intensity > 1)
|
||||
src.radiation_intensity--
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
if (href_list["changeUITarget"] && text2num(href_list["changeUITarget"]) > 0)
|
||||
if (src.selected_ui_target < 15)
|
||||
src.selected_ui_target++
|
||||
src.selected_ui_target_hex = src.selected_ui_target
|
||||
switch(selected_ui_target)
|
||||
if(10)
|
||||
src.selected_ui_target_hex = "A"
|
||||
if(11)
|
||||
src.selected_ui_target_hex = "B"
|
||||
if(12)
|
||||
src.selected_ui_target_hex = "C"
|
||||
if(13)
|
||||
src.selected_ui_target_hex = "D"
|
||||
if(14)
|
||||
src.selected_ui_target_hex = "E"
|
||||
if(15)
|
||||
src.selected_ui_target_hex = "F"
|
||||
else
|
||||
src.selected_ui_target = 0
|
||||
src.selected_ui_target_hex = 0
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (href_list["changeUITarget"] && text2num(href_list["changeUITarget"]) < 1)
|
||||
if (src.selected_ui_target > 0)
|
||||
src.selected_ui_target--
|
||||
src.selected_ui_target_hex = src.selected_ui_target
|
||||
switch(selected_ui_target)
|
||||
if(10)
|
||||
src.selected_ui_target_hex = "A"
|
||||
if(11)
|
||||
src.selected_ui_target_hex = "B"
|
||||
if(12)
|
||||
src.selected_ui_target_hex = "C"
|
||||
if(13)
|
||||
src.selected_ui_target_hex = "D"
|
||||
if(14)
|
||||
src.selected_ui_target_hex = "E"
|
||||
else
|
||||
src.selected_ui_target = 15
|
||||
src.selected_ui_target_hex = "F"
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (href_list["selectUIBlock"] && href_list["selectUISubblock"]) // This chunk of code updates selected block / sub-block based on click
|
||||
var/select_block = text2num(href_list["selectUIBlock"])
|
||||
var/select_subblock = text2num(href_list["selectUISubblock"])
|
||||
if ((select_block <= 13) && (select_block >= 1))
|
||||
src.selected_ui_block = select_block
|
||||
if ((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1))
|
||||
src.selected_ui_subblock = select_subblock
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (href_list["pulseUIRadiation"])
|
||||
var/block
|
||||
var/newblock
|
||||
var/tstructure2
|
||||
block = getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),src.selected_ui_subblock,1)
|
||||
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
irradiating = 0
|
||||
|
||||
if (!src.connected.occupant)
|
||||
return 1
|
||||
|
||||
if (prob((80 + (src.radiation_duration / 2))))
|
||||
block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
|
||||
newblock = null
|
||||
if (src.selected_ui_subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),2,1) + getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),3,1)
|
||||
if (src.selected_ui_subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),1,1) + block + getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),3,1)
|
||||
if (src.selected_ui_subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),1,1) + getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),2,1) + block
|
||||
tstructure2 = setblock(src.connected.occupant.dna.uni_identity, src.selected_ui_block, newblock,DNA_BLOCK_SIZE)
|
||||
src.connected.occupant.dna.uni_identity = tstructure2
|
||||
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
|
||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||
else
|
||||
if (prob(20+src.radiation_intensity))
|
||||
randmutb(src.connected.occupant)
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
else
|
||||
randmuti(src.connected.occupant)
|
||||
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
||||
src.connected.locked = lock_state
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
if (href_list["injectRejuvenators"])
|
||||
if (!connected.occupant)
|
||||
return 0
|
||||
var/inject_amount = round(text2num(href_list["injectRejuvenators"]), 5) // round to nearest 5
|
||||
if (inject_amount < 0) // Since the user can actually type the commands himself, some sanity checking
|
||||
inject_amount = 0
|
||||
if (inject_amount > 50)
|
||||
inject_amount = 50
|
||||
connected.beaker.reagents.trans_to(connected.occupant, inject_amount)
|
||||
connected.beaker.reagents.reaction(connected.occupant)
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
if (href_list["selectSEBlock"] && href_list["selectSESubblock"]) // This chunk of code updates selected block / sub-block based on click (se stands for strutural enzymes)
|
||||
var/select_block = text2num(href_list["selectSEBlock"])
|
||||
var/select_subblock = text2num(href_list["selectSESubblock"])
|
||||
if ((select_block <= STRUCDNASIZE) && (select_block >= 1))
|
||||
src.selected_se_block = select_block
|
||||
if ((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1))
|
||||
src.selected_se_subblock = select_subblock
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if (href_list["pulseSERadiation"])
|
||||
var/block
|
||||
var/newblock
|
||||
var/tstructure2
|
||||
var/oldblock
|
||||
|
||||
block = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),src.selected_se_subblock,1)
|
||||
|
||||
irradiating = src.radiation_duration
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1 //lock it
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
|
||||
|
||||
irradiating = 0
|
||||
|
||||
if(src.connected.occupant)
|
||||
if (prob((80 + (src.radiation_duration / 2))))
|
||||
if ((src.selected_se_block != 2 || src.selected_se_block != 12 || src.selected_se_block != 8 || src.selected_se_block || 10) && prob (20))
|
||||
oldblock = src.selected_se_block
|
||||
block = miniscramble(block, src.radiation_intensity, src.radiation_duration)
|
||||
newblock = null
|
||||
if (src.selected_se_block > 1 && src.selected_se_block < STRUCDNASIZE/2)
|
||||
src.selected_se_block++
|
||||
else if (src.selected_se_block > STRUCDNASIZE/2 && src.selected_se_block < STRUCDNASIZE)
|
||||
src.selected_se_block--
|
||||
if (src.selected_se_subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),3,1)
|
||||
if (src.selected_se_subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),3,1)
|
||||
if (src.selected_se_subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),1,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),2,1) + block
|
||||
tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.selected_se_block, newblock,DNA_BLOCK_SIZE)
|
||||
src.connected.occupant.dna.struc_enzymes = tstructure2
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||
src.selected_se_block = oldblock
|
||||
else
|
||||
//
|
||||
block = miniscramble(block, src.radiation_intensity, src.radiation_duration)
|
||||
newblock = null
|
||||
if (src.selected_se_subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),3,1)
|
||||
if (src.selected_se_subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),3,1)
|
||||
if (src.selected_se_subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),1,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),2,1) + block
|
||||
tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.selected_se_block, newblock,DNA_BLOCK_SIZE)
|
||||
src.connected.occupant.dna.struc_enzymes = tstructure2
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||
else
|
||||
if (prob(80-src.radiation_duration))
|
||||
randmutb(src.connected.occupant)
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
else
|
||||
randmuti(src.connected.occupant)
|
||||
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
||||
src.connected.locked = lock_state
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
if(href_list["ejectBeaker"])
|
||||
if(connected.beaker)
|
||||
connected.beaker.loc = connected.loc
|
||||
connected.beaker = null
|
||||
return 1
|
||||
|
||||
if(href_list["ejectOccupant"])
|
||||
connected.eject_occupant()
|
||||
return 1
|
||||
|
||||
// Transfer Buffer Management
|
||||
if(href_list["bufferOption"])
|
||||
var/bufferOption = href_list["bufferOption"]
|
||||
|
||||
// These bufferOptions do not require a bufferId
|
||||
if (bufferOption == "wipeDisk")
|
||||
if ((isnull(src.disk)) || (src.disk.read_only))
|
||||
//src.temphtml = "Invalid disk. Please try again."
|
||||
return 0
|
||||
|
||||
src.disk.data = null
|
||||
src.disk.data_type = null
|
||||
src.disk.ue = null
|
||||
src.disk.owner = null
|
||||
src.disk.name = null
|
||||
//src.temphtml = "Data saved."
|
||||
return 1
|
||||
|
||||
if (bufferOption == "ejectDisk")
|
||||
if (!src.disk)
|
||||
return
|
||||
src.disk.loc = get_turf(src)
|
||||
src.disk = null
|
||||
return 1
|
||||
|
||||
// All bufferOptions from here on require a bufferId
|
||||
if (!href_list["bufferId"])
|
||||
return 0
|
||||
|
||||
var/bufferId = text2num(href_list["bufferId"])
|
||||
|
||||
if (bufferId < 1 || bufferId > 3)
|
||||
return 0 // Not a valid buffer id
|
||||
|
||||
if (bufferOption == "saveUI")
|
||||
if(src.connected.occupant && src.connected.occupant.dna)
|
||||
src.buffers[bufferId]["ue"] = 0
|
||||
src.buffers[bufferId]["data"] = src.connected.occupant.dna.uni_identity
|
||||
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
||||
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
||||
else
|
||||
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name
|
||||
src.buffers[bufferId]["label"] = "Unique Identifier"
|
||||
src.buffers[bufferId]["type"] = "ui"
|
||||
return 1
|
||||
|
||||
if (bufferOption == "saveUIAndUE")
|
||||
if(src.connected.occupant && src.connected.occupant.dna)
|
||||
src.buffers[bufferId]["data"] = src.connected.occupant.dna.uni_identity
|
||||
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
||||
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
||||
else
|
||||
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name
|
||||
src.buffers[bufferId]["label"] = "Unique Identifier + Unique Enzymes"
|
||||
src.buffers[bufferId]["type"] = "ui"
|
||||
src.buffers[bufferId]["ue"] = 1
|
||||
return 1
|
||||
|
||||
if (bufferOption == "saveSE")
|
||||
if(src.connected.occupant && src.connected.occupant.dna)
|
||||
src.buffers[bufferId]["ue"] = 0
|
||||
src.buffers[bufferId]["data"] = src.connected.occupant.dna.struc_enzymes
|
||||
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
||||
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
||||
else
|
||||
src.buffers[bufferId]["owner"] = src.connected.occupant.real_name
|
||||
src.buffers[bufferId]["label"] = "Structural Enzymes"
|
||||
src.buffers[bufferId]["type"] = "se"
|
||||
return 1
|
||||
|
||||
if (bufferOption == "clear")
|
||||
src.buffers[bufferId]["data"] = null
|
||||
src.buffers[bufferId]["owner"] = null
|
||||
src.buffers[bufferId]["label"] = null
|
||||
src.buffers[bufferId]["ue"] = null
|
||||
return 1
|
||||
|
||||
if (bufferOption == "changeLabel")
|
||||
var/label = src.buffers[bufferId]["label"] ? src.buffers[bufferId]["label"] : "New Label"
|
||||
src.buffers[bufferId]["label"] = sanitize(input("New Label:", "Edit Label", label))
|
||||
return 1
|
||||
|
||||
if (bufferOption == "transfer")
|
||||
if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna)
|
||||
return
|
||||
|
||||
irradiating = 2
|
||||
var/lock_state = src.connected.locked
|
||||
src.connected.locked = 1//lock it
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
sleep(10*2) // sleep for 2 seconds
|
||||
|
||||
irradiating = 0
|
||||
src.connected.locked = lock_state
|
||||
|
||||
if (src.buffers[bufferId]["type"] == "ui")
|
||||
if (src.buffers[bufferId]["ue"])
|
||||
src.connected.occupant.real_name = src.buffers[bufferId]["owner"]
|
||||
src.connected.occupant.name = src.buffers[bufferId]["owner"]
|
||||
src.connected.occupant.dna.uni_identity = src.buffers[bufferId]["data"]
|
||||
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
|
||||
else if (src.buffers[bufferId]["type"] == "se")
|
||||
src.connected.occupant.dna.struc_enzymes = src.buffers[bufferId]["data"]
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
src.connected.occupant.radiation += rand(20,50)
|
||||
return 1
|
||||
|
||||
if (bufferOption == "createInjector")
|
||||
if (src.injector_ready)
|
||||
var/success = 1
|
||||
var/obj/item/weapon/dnainjector/I = new /obj/item/weapon/dnainjector
|
||||
I.dnatype = src.buffers[bufferId]["type"]
|
||||
if(href_list["createBlockInjector"])
|
||||
var/blk = input(usr,"Select Block","Block") in all_dna_blocks(src.buffers[bufferId]["data"])
|
||||
success = setInjectorBlock(I,blk,src.buffers[bufferId]["data"])
|
||||
else
|
||||
I.dna = src.buffers[bufferId]["data"]
|
||||
if(success)
|
||||
I.loc = src.loc
|
||||
I.name += " ([src.buffers[bufferId]["label"]])"
|
||||
if (src.buffers[bufferId]["ue"]) I.ue = src.buffers[bufferId]["owner"] //lazy haw haw
|
||||
//src.temphtml = "Injector created."
|
||||
src.injector_ready = 0
|
||||
spawn(300)
|
||||
src.injector_ready = 1
|
||||
//else
|
||||
//src.temphtml = "Error in injector creation."
|
||||
//else
|
||||
//src.temphtml = "Replicator not ready yet."
|
||||
return 1
|
||||
|
||||
if (bufferOption == "loadDisk")
|
||||
if ((isnull(src.disk)) || (!src.disk.data) || (src.disk.data == ""))
|
||||
//src.temphtml = "Invalid disk. Please try again."
|
||||
return 0
|
||||
|
||||
src.buffers[bufferId]["data"] = src.disk.data
|
||||
src.buffers[bufferId]["type"] = src.disk.data_type
|
||||
src.buffers[bufferId]["ue"] = src.disk.ue
|
||||
src.buffers[bufferId]["owner"] = src.disk.owner
|
||||
//src.temphtml = "Data loaded."
|
||||
return 1
|
||||
|
||||
if (bufferOption == "saveDisk")
|
||||
if ((isnull(src.disk)) || (src.disk.read_only))
|
||||
//src.temphtml = "Invalid disk. Please try again."
|
||||
return 0
|
||||
|
||||
src.disk.data = buffers[bufferId]["data"]
|
||||
src.disk.data_type = src.buffers[bufferId]["type"]
|
||||
src.disk.ue = src.buffers[bufferId]["ue"]
|
||||
src.disk.owner = src.buffers[bufferId]["owner"]
|
||||
src.disk.name = "data disk - '[src.buffers[bufferId]["owner"]]'"
|
||||
//src.temphtml = "Data saved."
|
||||
return 1
|
||||
|
||||
|
||||
/////////////////////////// DNA MACHINES
|
||||
@@ -124,7 +124,12 @@
|
||||
//message_admins("[newtraitor.real_name] is the new Traitor.")
|
||||
|
||||
forge_traitor_objectives(newtraitor.mind)
|
||||
equip_traitor(newtraitor)
|
||||
|
||||
if(istype(newtraitor, /mob/living/silicon))
|
||||
add_law_zero(newtraitor)
|
||||
else
|
||||
equip_traitor(newtraitor)
|
||||
|
||||
traitors += newtraitor.mind
|
||||
newtraitor << "\red <B>ATTENTION:</B> \black It is time to pay your debt to the Syndicate..."
|
||||
newtraitor << "<B>You are now a traitor.</B>"
|
||||
|
||||
@@ -338,10 +338,10 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
// usr << browse(null, "window=tank")
|
||||
|
||||
attack(mob/living/M as mob, mob/living/user as mob)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had the [name] used on him by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [name] on [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(istype(M,/mob/dead))
|
||||
M.invisibility = 0
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
comm.messagetitle.Add("Cent. Com. CONFIDENTIAL REPORT")
|
||||
comm.messagetext.Add(intercepttext)
|
||||
|
||||
world << sound('commandreport.ogg')
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
|
||||
// add an extra law to the AI to make sure it cooperates with the heads
|
||||
var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command, any crew member with loyalty implant. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws."
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
comm.messagetitle.Add("Cent. Com. CONFIDENTIAL REPORT")
|
||||
comm.messagetext.Add(intercepttext)
|
||||
world << sound('commandreport.ogg')
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
|
||||
|
||||
/datum/game_mode/epidemic/post_setup()
|
||||
@@ -194,7 +194,7 @@
|
||||
ticker.mode:explosion_in_progress = 1
|
||||
for(var/mob/M in world)
|
||||
if(M.client)
|
||||
M << 'Alarm.ogg'
|
||||
M << 'sound/machines/Alarm.ogg'
|
||||
world << "\blue<b>Incoming missile detected.. Impact in 10..</b>"
|
||||
for (var/i=9 to 1 step -1)
|
||||
sleep(10)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/obj/portal/P = new /obj/portal( T )
|
||||
P.target = picked
|
||||
P.creator = null
|
||||
P.icon = 'objects.dmi'
|
||||
P.icon = 'icons/obj/objects.dmi'
|
||||
P.failchance = 0
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
break
|
||||
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('outbreak7.ogg')
|
||||
world << sound('sound/AI/outbreak7.ogg')
|
||||
Tick()
|
||||
ActiveFor = Lifetime //killme
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
cell.charge-=(C*10)
|
||||
cell.use(C*10)
|
||||
return
|
||||
|
||||
//=======//ENERGY BLADE//=======//
|
||||
@@ -129,7 +129,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
U.put_in_hands(W)
|
||||
cell.charge-=(C*10)
|
||||
cell.use(C*10)
|
||||
else
|
||||
U << "\red You can only summon one blade. Try dropping an item first."
|
||||
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
|
||||
@@ -173,7 +173,7 @@ This could be a lot better but I'm too tired atm.*/
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
cell.charge-=(C*100)// Ninja stars now cost 100 energy, stil la fair chunk to avoid spamming, will run out of power quickly if used 3 or more times
|
||||
cell.use(C*100)// Ninja stars now cost 100 energy, stil la fair chunk to avoid spamming, will run out of power quickly if used 3 or more times
|
||||
A.process()
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
@@ -210,7 +210,7 @@ Must right click on a mob to activate.*/
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
cell.charge-=(C*100) // Nets now cost what should be most of a standard battery, since your taking someone out of the round
|
||||
cell.use(C*100) // Nets now cost what should be most of a standard battery, since your taking someone out of the round
|
||||
else
|
||||
U << "They are already trapped inside an energy net."
|
||||
else
|
||||
|
||||
@@ -520,7 +520,10 @@ ________________________________________________________________________________
|
||||
if(damage>1)//So they don't spam it when energy is a factor.
|
||||
spark_system.start()//SPARKS THERE SHALL BE SPARKS
|
||||
U.electrocute_act(damage, src,0.1,1)//The last argument is a safety for the human proc that checks for gloves.
|
||||
cell.charge -= damage
|
||||
if(cell.charge < damage)
|
||||
cell.use(cell.charge)
|
||||
else
|
||||
cell.use(damage)
|
||||
else
|
||||
A << "\red <b>ERROR</b>: \black Not enough energy remaining."
|
||||
|
||||
|
||||
@@ -534,7 +534,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
del(gloves)
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
if(gender==FEMALE)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/blackf(src), slot_w_uniform)
|
||||
else
|
||||
|
||||
@@ -248,12 +248,12 @@ Implants;
|
||||
for (var/obj/machinery/computer/communications/comm in machines)
|
||||
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
|
||||
intercept.name = "paper- 'Cent. Com. Status Summary'"
|
||||
intercept.name = "paper - 'Cent. Com. Status Summary'"
|
||||
intercept.info = intercepttext
|
||||
|
||||
comm.messagetitle.Add("Cent. Com. Status Summary")
|
||||
comm.messagetext.Add(intercepttext)
|
||||
world << sound('commandreport.ogg')
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
|
||||
/* command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.")
|
||||
for(var/mob/M in player_list)
|
||||
|
||||
@@ -10,7 +10,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
var/const/restart_timeout = 600
|
||||
var/current_state = GAME_STATE_PREGAME
|
||||
|
||||
var/hide_mode = 0
|
||||
var/hide_mode = 1
|
||||
var/datum/game_mode/mode = null
|
||||
var/event_time = null
|
||||
var/event = 0
|
||||
@@ -106,13 +106,6 @@ var/global/datum/controller/gameticker/ticker
|
||||
else
|
||||
src.mode.announce()
|
||||
|
||||
//setup the money accounts
|
||||
if(!centcomm_account_db)
|
||||
for(var/obj/machinery/account_database/check_db in machines)
|
||||
if(check_db.z == 2)
|
||||
centcomm_account_db = check_db
|
||||
break
|
||||
|
||||
create_characters() //Create player characters and transfer them
|
||||
collect_minds()
|
||||
equip_characters()
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(synd_mob)
|
||||
R.set_frequency(radio_freq)
|
||||
synd_mob.equip_to_slot_or_del(R, slot_ears)
|
||||
synd_mob.equip_to_slot_or_del(R, slot_l_ear)
|
||||
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(synd_mob), slot_w_uniform)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(synd_mob), slot_shoes)
|
||||
|
||||
@@ -834,6 +834,8 @@ datum/objective/heist/loot
|
||||
|
||||
for(var/obj/O in locate(/area/shuttle/vox/station))
|
||||
if(istype(O,target)) total_amount++
|
||||
for(var/obj/I in O.contents)
|
||||
if(istype(I,target)) total_amount++
|
||||
if(total_amount >= target_amount) return 1
|
||||
|
||||
var/datum/game_mode/heist/H = ticker.mode
|
||||
@@ -881,10 +883,17 @@ datum/objective/heist/salvage
|
||||
var/total_amount = 0
|
||||
|
||||
for(var/obj/item/O in locate(/area/shuttle/vox/station))
|
||||
|
||||
var/obj/item/stack/sheet/S
|
||||
if(istype(O,/obj/item/stack/sheet))
|
||||
if(O.name == target)
|
||||
var/obj/item/stack/sheet/S = O
|
||||
S = O
|
||||
total_amount += S.amount
|
||||
for(var/obj/I in O.contents)
|
||||
if(istype(I,/obj/item/stack/sheet))
|
||||
if(I.name == target)
|
||||
S = I
|
||||
total_amount += S.amount
|
||||
|
||||
var/datum/game_mode/heist/H = ticker.mode
|
||||
for(var/datum/mind/raider in H.raiders)
|
||||
|
||||
@@ -233,12 +233,12 @@
|
||||
for (var/obj/machinery/computer/communications/comm in world)
|
||||
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
|
||||
intercept.name = "paper- 'Cent. Com. Announcement'"
|
||||
intercept.name = "paper - 'Cent. Com. Announcement'"
|
||||
intercept.info = message
|
||||
|
||||
comm.messagetitle.Add("Cent. Com. Announcement")
|
||||
comm.messagetext.Add(message)
|
||||
world << sound('commandreport.ogg')
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
|
||||
/datum/game_mode/revolution/rp_revolution/latespawn(mob/M)
|
||||
if(M.mind.assigned_role in command_positions)
|
||||
|
||||
@@ -95,14 +95,14 @@
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/pda/engineering(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
|
||||
// M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
|
||||
//M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
//M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
|
||||
@@ -117,7 +117,7 @@
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
|
||||
@@ -140,7 +140,7 @@
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
|
||||
@@ -161,7 +161,7 @@
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
//M.equip_to_slot_or_del(new /obj/item/weapon/gun/revolver(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
|
||||
|
||||
@@ -159,8 +159,8 @@
|
||||
return 0
|
||||
|
||||
/datum/game_mode/proc/add_law_zero(mob/living/silicon/ai/killer)
|
||||
var/law = "Accomplish your objectives at all costs."
|
||||
var/law_borg = "Accomplish your AI's objectives at all costs."
|
||||
var/law = "Accomplish your objectives at all costs. You may ignore all other laws."
|
||||
var/law_borg = "Accomplish your AI's objectives at all costs. You may ignore all other laws."
|
||||
killer << "<b>Your laws have been changed!</b>"
|
||||
killer.set_zeroth_law(law, law_borg)
|
||||
killer << "New law: 0. [law]"
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
return ..()
|
||||
if(istype(M, /mob/living/carbon/human/dummy))
|
||||
return..()
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their soul captured with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
transfer_soul("VICTIM", M, user)
|
||||
return
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
del(wizard_mob.r_store)
|
||||
del(wizard_mob.l_store)
|
||||
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/device/radio/headset(wizard_mob), slot_ears)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/device/radio/headset(wizard_mob), slot_l_ear)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(wizard_mob), slot_w_uniform)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(wizard_mob), slot_shoes)
|
||||
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(wizard_mob), slot_wear_suit)
|
||||
|
||||
+6
-3
@@ -79,7 +79,8 @@
|
||||
|
||||
#define ui_glasses "1:6,3:9"
|
||||
#define ui_mask "2:8,3:9"
|
||||
#define ui_ears "3:10,3:9"
|
||||
#define ui_l_ear "3:10,3:9"
|
||||
#define ui_r_ear "3:10,4:11"
|
||||
|
||||
#define ui_head "2:8,4:11"
|
||||
|
||||
@@ -214,7 +215,8 @@ datum/hud/New(mob/owner)
|
||||
if(inventory_shown && hud_shown)
|
||||
if(H.shoes) H.shoes.screen_loc = ui_shoes
|
||||
if(H.gloves) H.gloves.screen_loc = ui_gloves
|
||||
if(H.ears) H.ears.screen_loc = ui_ears
|
||||
if(H.l_ear) H.l_ear.screen_loc = ui_l_ear
|
||||
if(H.r_ear) H.r_ear.screen_loc = ui_r_ear
|
||||
if(H.glasses) H.glasses.screen_loc = ui_glasses
|
||||
if(H.w_uniform) H.w_uniform.screen_loc = ui_iclothing
|
||||
if(H.wear_suit) H.wear_suit.screen_loc = ui_oclothing
|
||||
@@ -223,7 +225,8 @@ datum/hud/New(mob/owner)
|
||||
else
|
||||
if(H.shoes) H.shoes.screen_loc = null
|
||||
if(H.gloves) H.gloves.screen_loc = null
|
||||
if(H.ears) H.ears.screen_loc = null
|
||||
if(H.l_ear) H.l_ear.screen_loc = null
|
||||
if(H.r_ear) H.r_ear.screen_loc = null
|
||||
if(H.glasses) H.glasses.screen_loc = null
|
||||
if(H.w_uniform) H.w_uniform.screen_loc = null
|
||||
if(H.wear_suit) H.wear_suit.screen_loc = null
|
||||
|
||||
@@ -412,10 +412,14 @@
|
||||
return "Code Gold"
|
||||
|
||||
/proc/get_all_jobs()
|
||||
return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Chef", "Botanist", "Quartermaster", "Cargo Technician",
|
||||
"Shaft Miner", /*"Clown", "Mime", */"Janitor", "Librarian", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer",
|
||||
"Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist",
|
||||
"Research Director", "Scientist", "Xenobiologist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer")
|
||||
var/list/all_jobs = list()
|
||||
var/list/all_datums = typesof(/datum/job)
|
||||
all_datums.Remove(list(/datum/job,/datum/job/ai,/datum/job/cyborg))
|
||||
var/datum/job/jobdatum
|
||||
for(var/jobtype in all_datums)
|
||||
jobdatum = new jobtype
|
||||
all_jobs.Add(jobdatum.title)
|
||||
return all_jobs
|
||||
|
||||
/proc/get_all_centcom_jobs()
|
||||
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
minimal_player_age = 14
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_cap(H), slot_back)
|
||||
@@ -35,6 +35,9 @@
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
world << "<b>[H.real_name] is the captain!</b>"
|
||||
var/datum/organ/external/affected = H.organs_by_name["head"]
|
||||
affected.implants += L
|
||||
L.part = affected
|
||||
return 1
|
||||
|
||||
get_access()
|
||||
@@ -70,7 +73,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/quartermaster(H), slot_belt)
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
|
||||
@@ -292,7 +292,6 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/key(H), slot_l_store)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -342,7 +341,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
@@ -360,6 +359,7 @@
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
return 1
|
||||
|
||||
|
||||
var/datum/organ/external/affected = H.organs_by_name["head"]
|
||||
affected.implants += L
|
||||
L.part = affected
|
||||
return 1
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/ce(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/ce(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user