mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 00:35:45 +01:00
@@ -8,3 +8,5 @@
|
||||
#ignore any files in config/, except those in subdirectories.
|
||||
/config/*
|
||||
!/config/*/*
|
||||
|
||||
/baystation12.int
|
||||
|
||||
+5
-9
@@ -65,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"
|
||||
@@ -147,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"
|
||||
@@ -158,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"
|
||||
@@ -435,6 +438,7 @@
|
||||
#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"
|
||||
@@ -1237,8 +1241,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"
|
||||
@@ -1281,14 +1283,12 @@
|
||||
#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"
|
||||
@@ -1303,8 +1303,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
|
||||
|
||||
@@ -14,7 +14,7 @@ var/global/list/all_money_accounts = list()
|
||||
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.remote_access_pin = rand(1000, 9999)
|
||||
station_account.money = 75000
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
@@ -36,7 +36,7 @@ var/global/list/all_money_accounts = list()
|
||||
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.remote_access_pin = rand(1000, 9999)
|
||||
department_account.money = 5000
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
@@ -62,7 +62,7 @@ var/global/list/all_money_accounts = list()
|
||||
//create a new account
|
||||
var/datum/money_account/M = new()
|
||||
M.owner_name = new_owner_name
|
||||
M.remote_access_pin = rand(1111, 111111)
|
||||
M.remote_access_pin = rand(1000, 9999)
|
||||
M.money = starting_funds
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
@@ -161,7 +161,7 @@ var/global/list/all_money_accounts = list()
|
||||
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"
|
||||
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [game_year]"
|
||||
|
||||
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
|
||||
|
||||
|
||||
+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)
|
||||
|
||||
|
||||
+99
-53
@@ -13,68 +13,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.
|
||||
@@ -110,6 +104,46 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
. = ..()
|
||||
|
||||
|
||||
/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
|
||||
@@ -139,6 +173,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
|
||||
|
||||
@@ -162,6 +208,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
|
||||
@@ -192,6 +243,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) )
|
||||
@@ -221,35 +281,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...
|
||||
@@ -262,7 +310,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
|
||||
@@ -277,7 +325,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.
|
||||
@@ -293,9 +342,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.
|
||||
|
||||
+95
-4
@@ -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"
|
||||
@@ -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))
|
||||
@@ -385,7 +385,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
|
||||
@@ -397,8 +397,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()
|
||||
|
||||
+183
-48
@@ -50,10 +50,8 @@ Important Procedures
|
||||
air_master.process()
|
||||
This first processes the air_master update/rebuild lists then processes all groups and tiles for air calculations
|
||||
|
||||
|
||||
*/
|
||||
|
||||
var/kill_air = 0
|
||||
var/tick_multiplier = 2
|
||||
|
||||
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
@@ -87,17 +85,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 +119,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 +147,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 +161,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)
|
||||
+6
-10
@@ -80,7 +80,7 @@ obj
|
||||
if(firelevel > vsc.IgnitionLevel)
|
||||
|
||||
var/turf/simulated/floor/S = loc
|
||||
if(!S.zone) src.gc_del() //Cannot exist where zones are broken.
|
||||
if(!S.zone) del src //Cannot exist where zones are broken.
|
||||
|
||||
if(istype(S))
|
||||
var
|
||||
@@ -139,17 +139,17 @@ obj
|
||||
|
||||
else
|
||||
|
||||
src.gc_del()
|
||||
del src
|
||||
|
||||
|
||||
S.assume_air(flow) //Then put it back where you found it.
|
||||
|
||||
else
|
||||
src.gc_del()
|
||||
del src
|
||||
else
|
||||
src.gc_del()
|
||||
del src
|
||||
else
|
||||
src.gc_del()
|
||||
del src
|
||||
|
||||
|
||||
for(var/mob/living/carbon/human/M in loc)
|
||||
@@ -160,17 +160,13 @@ obj
|
||||
..()
|
||||
|
||||
if(!istype(loc, /turf))
|
||||
src.gc_del()
|
||||
del src
|
||||
|
||||
dir = pick(cardinal)
|
||||
//sd_SetLuminosity(3,2,0)
|
||||
firelevel = fl
|
||||
air_master.active_hotspots.Add(src)
|
||||
|
||||
proc/gc_del()
|
||||
loc = null
|
||||
air_master.active_hotspots.Remove(src)
|
||||
|
||||
Del()
|
||||
if (istype(loc, /turf/simulated))
|
||||
//sd_SetLuminosity(0)
|
||||
|
||||
@@ -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.
|
||||
|
||||
+33
-78
@@ -43,6 +43,8 @@
|
||||
|
||||
/turf/simulated/var/tmp/air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
|
||||
|
||||
/turf/simulated/var/tmp/unsim_check_directions = 0 //See above.
|
||||
|
||||
/turf/simulated/var/tmp/obj/fire/active_hotspot
|
||||
|
||||
/turf/simulated/proc/update_visuals()
|
||||
@@ -95,7 +97,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 +113,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)
|
||||
@@ -129,14 +130,21 @@
|
||||
var/air_directions_archived = air_check_directions
|
||||
air_check_directions = 0
|
||||
|
||||
var/unsim_directions_archived = unsim_check_directions
|
||||
unsim_check_directions = 0
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(ZAirPass(get_step(src,direction)))
|
||||
air_check_directions |= direction
|
||||
var/turf/check_turf = get_step(src, direction)
|
||||
if(ZAirPass(check_turf))
|
||||
if(istype(check_turf, /turf/simulated))
|
||||
air_check_directions |= direction
|
||||
else if(istype(check_turf, /turf/space) || istype(check_turf, /turf/unsimulated))
|
||||
unsim_check_directions |= direction
|
||||
|
||||
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 +152,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 +165,29 @@
|
||||
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 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)
|
||||
//I can connect to air or space in this direction
|
||||
if((air_check_directions & direction && !(air_directions_archived & direction)) || \
|
||||
(unsim_check_directions & direction && !(unsim_directions_archived & direction)))
|
||||
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) || \
|
||||
(!(unsim_check_directions & direction) && unsim_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 +205,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 +244,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 +266,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
|
||||
|
||||
+258
-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,78 @@ 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/CheckStatus()
|
||||
return status
|
||||
|
||||
/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 +465,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 +484,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 +536,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 +692,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*/
|
||||
|
||||
@@ -542,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
|
||||
@@ -1423,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 ","")
|
||||
@@ -67,8 +67,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."
|
||||
@@ -82,6 +82,7 @@
|
||||
|
||||
//game_options.txt configs
|
||||
|
||||
var/health_threshold_softcrit = 0
|
||||
var/health_threshold_crit = 0
|
||||
var/health_threshold_dead = -100
|
||||
|
||||
@@ -451,6 +452,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()
|
||||
@@ -127,8 +127,7 @@ datum/controller/game_controller/proc/process()
|
||||
timer = world.timeofday
|
||||
last_thing_processed = air_master.type
|
||||
|
||||
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>"
|
||||
@@ -137,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)
|
||||
|
||||
|
||||
@@ -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
|
||||
+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"
|
||||
|
||||
@@ -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
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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,7 +248,7 @@ 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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
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")
|
||||
|
||||
@@ -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]"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -73,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)
|
||||
@@ -86,4 +86,4 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -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)
|
||||
@@ -363,4 +362,4 @@
|
||||
var/datum/organ/external/affected = H.organs_by_name["head"]
|
||||
affected.implants += L
|
||||
L.part = affected
|
||||
return 1
|
||||
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)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
|
||||
@@ -50,7 +50,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_sci(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
|
||||
@@ -77,7 +77,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_sci(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
|
||||
@@ -104,7 +104,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_sci(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
|
||||
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
|
||||
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt)
|
||||
@@ -64,7 +64,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/security(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
|
||||
@@ -103,7 +103,7 @@
|
||||
minimal_player_age = 7
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
|
||||
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)
|
||||
@@ -149,7 +149,7 @@
|
||||
minimal_player_age = 7
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
|
||||
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/security(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
|
||||
@@ -165,4 +165,4 @@
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -431,7 +431,7 @@ var/global/datum/controller/occupations/job_master
|
||||
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
|
||||
|
||||
spawnId(H, rank, alt_title)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_l_ear)
|
||||
|
||||
//Gives glasses to the vision impaired
|
||||
if(H.disabilities & NEARSIGHTED)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
|
||||
var/mob/living/occupant = null
|
||||
var/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "dermaline" = "Dermaline", "bicaridine" = "Bicaridine", "dexalin" = "Dexalin")
|
||||
var/amounts = list(10, 20)
|
||||
var/amounts = list(5, 10)
|
||||
|
||||
|
||||
New()
|
||||
@@ -269,11 +269,11 @@
|
||||
|
||||
proc/inject_chemical(mob/living/user as mob, chemical, amount)
|
||||
if(src.occupant && src.occupant.reagents)
|
||||
if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= 40)
|
||||
if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= 20)
|
||||
src.occupant.reagents.add_reagent(chemical, amount)
|
||||
user << "Occupant now has [src.occupant.reagents.get_reagent_amount(chemical)] units of [available_chemicals[chemical]] in his/her bloodstream."
|
||||
return
|
||||
user << "There's no occupant in the sleeper or the subject rejects the chemicals!"
|
||||
user << "There's no occupant in the sleeper or the subject has too many chemicals!"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -164,6 +164,7 @@
|
||||
|
||||
/obj/machinery/body_scanconsole
|
||||
var/obj/machinery/bodyscanner/connected
|
||||
var/known_implants = list(/obj/item/weapon/implant/chem, /obj/item/weapon/implant/death_alarm, /obj/item/weapon/implant/loyalty, /obj/item/weapon/implant/tracking)
|
||||
var/delete
|
||||
var/temphtml
|
||||
name = "Body Scanner Console"
|
||||
@@ -296,8 +297,14 @@
|
||||
AN = "[e.broken_description]:"
|
||||
if(e.open)
|
||||
open = "Open:"
|
||||
if(e.implants.len)
|
||||
imp = "Unknown body present:"
|
||||
var/unknown_body = 0
|
||||
for(var/I in e.implants)
|
||||
if(is_type_in_list(I,known_implants))
|
||||
imp += "[I] implanted:"
|
||||
else
|
||||
unknown_body++
|
||||
if(unknown_body)
|
||||
imp += "Unknown body present:"
|
||||
if(!AN && !open && !infected & !imp)
|
||||
AN = "None:"
|
||||
if(!(e.status & ORGAN_DESTROYED))
|
||||
|
||||
@@ -181,7 +181,8 @@
|
||||
if(target_temperature < T0C + MIN_TEMPERATURE)
|
||||
target_temperature = T0C + MIN_TEMPERATURE
|
||||
|
||||
var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles)
|
||||
var/datum/gas_mixture/gas
|
||||
gas = location.remove_air(0.25*environment.total_moles)
|
||||
var/heat_capacity = gas.heat_capacity()
|
||||
var/energy_used = max( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ var/global/list/autolathe_recipes = list( \
|
||||
new /obj/item/weapon/cautery(),\
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker(), \
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker/large(), \
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker/vial(), \
|
||||
new /obj/item/weapon/reagent_containers/syringe(), \
|
||||
new /obj/item/ammo_casing/shotgun/blank(), \
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(), \
|
||||
new /obj/item/ammo_magazine/c38(), \
|
||||
@@ -40,6 +42,7 @@ var/global/list/autolathe_recipes = list( \
|
||||
new /obj/item/device/radio/off(), \
|
||||
new /obj/item/device/assembly/infra(), \
|
||||
new /obj/item/device/assembly/timer(), \
|
||||
new /obj/item/device/assembly/prox_sensor(), \
|
||||
new /obj/item/weapon/light/tube(), \
|
||||
new /obj/item/weapon/light/bulb(), \
|
||||
new /obj/item/ashtray/glass(), \
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
src.icon_state = "pod_0"
|
||||
src.eject_wait = 0 //If it's still set somehow.
|
||||
domutcheck(src.occupant) //Waiting until they're out before possible monkeyizing.
|
||||
src.occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
|
||||
// src.occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
|
||||
src.occupant = null
|
||||
|
||||
src.biomass -= CLONE_BIOMASS
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
if (I && istype(I))
|
||||
if(access_captain in I.access)
|
||||
if(access_captain in I.access || access_heads in I.access) //Let heads change the alert level.
|
||||
var/old_level = security_level
|
||||
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
@@ -179,16 +179,16 @@
|
||||
if("MessageCentcomm")
|
||||
if(src.authenticated==2)
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
usr << "\red Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Centcomm_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
log_say("[key_name(usr)] has made a Centcomm announcement: [input]")
|
||||
usr << "\blue Message transmitted."
|
||||
log_say("[key_name(usr)] has made an IA Centcomm announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
spawn(300)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
|
||||
|
||||
@@ -196,16 +196,16 @@
|
||||
if("MessageSyndicate")
|
||||
if((src.authenticated==2) && (src.emagged))
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
usr << "\red Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
usr << "\blue Message transmitted."
|
||||
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
spawn(300)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
|
||||
if("RestoreBackup")
|
||||
@@ -308,7 +308,7 @@
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageSyndicate'>Send an emergency message to \[UNKNOWN\]</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=RestoreBackup'>Restore Backup Routing Data</A> \]"
|
||||
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=changeseclevel'>Change alert level</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=changeseclevel'>Change alert level</A> \]"
|
||||
if(emergency_shuttle.location==0)
|
||||
if (emergency_shuttle.online)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=cancelshuttle'>Cancel Shuttle Call</A> \]"
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
src.active2 = null
|
||||
src.authenticated = usr.name
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
src.rank = R.braintype
|
||||
src.rank = "[R.modtype] [R.braintype]"
|
||||
src.screen = 1
|
||||
|
||||
else if (istype(src.scan, /obj/item/weapon/card/id))
|
||||
@@ -432,7 +432,7 @@
|
||||
var/counter = 1
|
||||
while(src.active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557<BR>[t1]")
|
||||
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
|
||||
|
||||
if (href_list["del_c"])
|
||||
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
|
||||
|
||||
@@ -256,7 +256,7 @@ What a mess.*/
|
||||
src.active2 = null
|
||||
src.authenticated = usr.name
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
src.rank = R.braintype
|
||||
src.rank = "[R.modtype] [R.braintype]"
|
||||
src.screen = 1
|
||||
else if (istype(scan, /obj/item/weapon/card/id))
|
||||
active1 = null
|
||||
@@ -369,7 +369,7 @@ What a mess.*/
|
||||
var/counter = 1
|
||||
while(active2.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], 2557<BR>[t1]")
|
||||
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
|
||||
|
||||
if ("Delete Record (ALL)")
|
||||
if (active1)
|
||||
|
||||
+57
-29
@@ -1,5 +1,5 @@
|
||||
/obj/machinery/atmospherics/unary/cryo_cell
|
||||
name = "Cryo Cell"
|
||||
name = "cryo cell"
|
||||
icon = 'icons/obj/cryogenics.dmi'
|
||||
icon_state = "cell-off"
|
||||
density = 1
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
var/current_heat_capacity = 50
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/New()
|
||||
..()
|
||||
initialize_directions = dir
|
||||
@@ -64,18 +62,33 @@
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user)
|
||||
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")
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main")
|
||||
|
||||
var/data[0]
|
||||
data["isOperating"] = on
|
||||
|
||||
if(user == occupant || user.stat)
|
||||
return
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
data["isOperating"] = on
|
||||
data["hasOccupant"] = occupant ? 1 : 0
|
||||
|
||||
|
||||
var/occupantData[0]
|
||||
if (!occupant)
|
||||
occupantData["name"] = null
|
||||
occupantData["stat"] = null
|
||||
occupantData["health"] = null
|
||||
occupantData["maxHealth"] = null
|
||||
occupantData["minHealth"] = null
|
||||
occupantData["bruteLoss"] = null
|
||||
occupantData["oxyLoss"] = null
|
||||
occupantData["toxLoss"] = null
|
||||
@@ -84,12 +97,14 @@
|
||||
else
|
||||
occupantData["name"] = occupant.name
|
||||
occupantData["stat"] = occupant.stat
|
||||
occupantData["health"] = round(occupant.health)
|
||||
occupantData["bruteLoss"] = round(occupant.getBruteLoss())
|
||||
occupantData["oxyLoss"] = round(occupant.getOxyLoss())
|
||||
occupantData["toxLoss"] = round(occupant.getToxLoss())
|
||||
occupantData["fireLoss"] = round(occupant.getFireLoss())
|
||||
occupantData["bodyTemperature"] = round(occupant.bodytemperature)
|
||||
occupantData["health"] = occupant.health
|
||||
occupantData["maxHealth"] = occupant.maxHealth
|
||||
occupantData["minHealth"] = config.health_threshold_dead
|
||||
occupantData["bruteLoss"] = occupant.getBruteLoss()
|
||||
occupantData["oxyLoss"] = occupant.getOxyLoss()
|
||||
occupantData["toxLoss"] = occupant.getToxLoss()
|
||||
occupantData["fireLoss"] = occupant.getFireLoss()
|
||||
occupantData["bodyTemperature"] = occupant.bodytemperature
|
||||
data["occupant"] = occupantData;
|
||||
|
||||
data["cellTemperature"] = round(air_contents.temperature)
|
||||
@@ -103,13 +118,12 @@
|
||||
var beakerContents[0]
|
||||
if(beaker && beaker:reagents && beaker:reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in beaker:reagents.reagent_list)
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
data["beakerContents"] = beakerContents
|
||||
|
||||
//user << list2json(data)
|
||||
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
if (!ui)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
@@ -123,19 +137,33 @@
|
||||
//user.set_machine(src)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/Topic(href, href_list)
|
||||
if ((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
|
||||
if(href_list["start"])
|
||||
on = !on
|
||||
update_icon()
|
||||
if(href_list["eject"])
|
||||
if (beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
B.loc = get_step(loc, SOUTH)
|
||||
beaker = null
|
||||
if(usr == occupant)
|
||||
return 0 // don't update UIs attached to this object
|
||||
|
||||
nanomanager.update_uis(src) // update all UIs attached to this object
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
if(..())
|
||||
return 0 // don't update UIs attached to this object
|
||||
|
||||
if(href_list["switchOn"])
|
||||
on = 1
|
||||
update_icon()
|
||||
|
||||
if(href_list["switchOff"])
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
if(href_list["ejectBeaker"])
|
||||
if(beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
B.loc = get_step(loc, SOUTH)
|
||||
beaker = null
|
||||
|
||||
if(href_list["ejectOccupant"])
|
||||
if(!occupant || isslime(usr) || ispAI(usr))
|
||||
return 0 // don't update UIs attached to this object
|
||||
go_out()
|
||||
|
||||
add_fingerprint(usr)
|
||||
return 1 // update UIs attached to this object
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
if(istype(G, /obj/item/weapon/reagent_containers/glass))
|
||||
|
||||
@@ -257,36 +257,12 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!air_master)
|
||||
return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
update_heat_protection(loc)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
|
||||
if(width > 1)
|
||||
var/turf/simulated/next_turf = src
|
||||
var/step_dir = turn(dir, 180)
|
||||
for(var/current_step = 2, current_step <= width, current_step++)
|
||||
next_turf = get_step(src, step_dir)
|
||||
north = get_step(next_turf, step_dir)
|
||||
east = get_step(next_turf, turn(step_dir, 90))
|
||||
south = get_step(next_turf, turn(step_dir, -90))
|
||||
|
||||
update_heat_protection(next_turf)
|
||||
|
||||
if(istype(north)) air_master.tiles_to_update |= north
|
||||
if(istype(south)) air_master.tiles_to_update |= south
|
||||
if(istype(east)) air_master.tiles_to_update |= east
|
||||
for(var/turf/simulated/turf in locs)
|
||||
update_heat_protection(turf)
|
||||
air_master.AddTurfToUpdate(turf)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -15,13 +15,10 @@
|
||||
|
||||
|
||||
/obj/machinery/door/window/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!air_master)
|
||||
return 0
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
air_master.AddTurfToUpdate(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
|
||||
/obj/machinery/floodlight/process()
|
||||
if(on)
|
||||
cell.charge -= use
|
||||
if(cell.charge <= 0)
|
||||
if(cell.charge >= use)
|
||||
cell.use(use)
|
||||
else
|
||||
on = 0
|
||||
updateicon()
|
||||
SetLuminosity(0)
|
||||
|
||||
@@ -82,9 +82,19 @@
|
||||
if(src.occupant)
|
||||
user << "\red The gibber is full, empty it first!"
|
||||
return
|
||||
if (!( istype(G, /obj/item/weapon/grab)) || !(istype(G.affecting, /mob/living/carbon/human)))
|
||||
|
||||
if( !(istype(G, /obj/item/weapon/grab)) )
|
||||
user << "\red This item is not suitable for the gibber!"
|
||||
return
|
||||
|
||||
if( !(istype(G.affecting, /mob/living/carbon)) && !(istype(G.affecting, /mob/living/simple_animal)) )
|
||||
user << "\red This item is not suitable for the gibber!"
|
||||
return
|
||||
|
||||
if(G.state < 2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
|
||||
if(G.affecting.abiotic(1))
|
||||
user << "\red Subject may not have abiotic items on."
|
||||
return
|
||||
@@ -137,29 +147,69 @@
|
||||
visible_message("\red You hear a loud squelchy grinding sound.")
|
||||
src.operating = 1
|
||||
update_icon()
|
||||
var/sourcename = src.occupant.real_name
|
||||
var/sourcejob = src.occupant.job
|
||||
var/sourcenutriment = src.occupant.nutrition / 15
|
||||
var/sourcetotalreagents = src.occupant.reagents.total_volume
|
||||
|
||||
var/totalslabs = 3
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/meat/allmeat[totalslabs]
|
||||
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/meat/human/allmeat[totalslabs]
|
||||
for (var/i=1 to totalslabs)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/meat/human/newmeat = new
|
||||
newmeat.name = sourcename + newmeat.name
|
||||
newmeat.subjectname = sourcename
|
||||
newmeat.subjectjob = sourcejob
|
||||
newmeat.reagents.add_reagent ("nutriment", sourcenutriment / totalslabs) // Thehehe. Fat guys go first
|
||||
src.occupant.reagents.trans_to (newmeat, round (sourcetotalreagents / totalslabs, 1)) // Transfer all the reagents from the
|
||||
allmeat[i] = newmeat
|
||||
if( istype(src.occupant, /mob/living/carbon/human/) )
|
||||
var/sourcename = src.occupant.real_name
|
||||
var/sourcejob = src.occupant.job
|
||||
var/sourcenutriment = src.occupant.nutrition / 15
|
||||
var/sourcetotalreagents = src.occupant.reagents.total_volume
|
||||
|
||||
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[user]/[user.ckey]</b>" //One shall not simply gib a mob unnoticed!
|
||||
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) gibbed [src.occupant] ([src.occupant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
for(var/i=1 to totalslabs)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/meat/human/newmeat = new
|
||||
newmeat.name = sourcename + newmeat.name
|
||||
newmeat.subjectname = sourcename
|
||||
newmeat.subjectjob = sourcejob
|
||||
newmeat.reagents.add_reagent("nutriment", sourcenutriment / totalslabs) // Thehehe. Fat guys go first
|
||||
src.occupant.reagents.trans_to(newmeat, round (sourcetotalreagents / totalslabs, 1)) // Transfer all the reagents from the
|
||||
allmeat[i] = newmeat
|
||||
|
||||
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[user]/[user.ckey]</b>" //One shall not simply gib a mob unnoticed!
|
||||
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) gibbed [src.occupant] ([src.occupant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
src.occupant.death(1)
|
||||
src.occupant.ghostize()
|
||||
|
||||
else if( istype(src.occupant, /mob/living/carbon/) || istype(src.occupant, /mob/living/simple_animal/ ) )
|
||||
|
||||
var/sourcename = src.occupant.name
|
||||
var/sourcenutriment = src.occupant.nutrition / 15
|
||||
var/sourcetotalreagents = 0
|
||||
|
||||
if( istype(src.occupant, /mob/living/carbon/monkey/) || istype(src.occupant, /mob/living/carbon/alien/) ) // why are you gibbing aliens? oh well
|
||||
totalslabs = 3
|
||||
sourcetotalreagents = src.occupant.reagents.total_volume
|
||||
else if( istype(src.occupant, /mob/living/simple_animal/cow) || istype(src.occupant, /mob/living/simple_animal/hostile/bear) )
|
||||
totalslabs = 2
|
||||
else
|
||||
totalslabs = 1
|
||||
sourcenutriment = src.occupant.nutrition / 30 // small animals don't have as much nutrition
|
||||
|
||||
for(var/i=1 to totalslabs)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/meat/newmeat = new
|
||||
newmeat.name = "[sourcename]-[newmeat.name]"
|
||||
|
||||
newmeat.reagents.add_reagent("nutriment", sourcenutriment / totalslabs)
|
||||
|
||||
// Transfer reagents from the old mob to the meat
|
||||
if( istype(src.occupant, /mob/living/carbon/) )
|
||||
src.occupant.reagents.trans_to(newmeat, round(sourcetotalreagents / totalslabs, 1))
|
||||
|
||||
allmeat[i] = newmeat
|
||||
|
||||
if(src.occupant.client) // Gibbed a cow with a client in it? log that shit
|
||||
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[user]/[user.ckey]</b>"
|
||||
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"
|
||||
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> gibbed <b>[src.occupant]/[src.occupant.ckey]</b>")
|
||||
|
||||
src.occupant.death(1)
|
||||
src.occupant.ghostize()
|
||||
|
||||
src.occupant.death(1)
|
||||
src.occupant.ghostize()
|
||||
del(src.occupant)
|
||||
|
||||
spawn(src.gibtime)
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
operating = 0
|
||||
|
||||
@@ -27,19 +27,10 @@
|
||||
|
||||
//Looks like copy/pasted code... I doubt 'need_rebuild' is even used here - Nodrak
|
||||
/obj/machinery/shield/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!air_master)
|
||||
return 0
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(north)) air_master.tiles_to_update |= north
|
||||
if(istype(south)) air_master.tiles_to_update |= south
|
||||
if(istype(east)) air_master.tiles_to_update |= east
|
||||
if(istype(west)) air_master.tiles_to_update |= west
|
||||
air_master.AddTurfToUpdate(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
|
||||
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
|
||||
continue
|
||||
M << "<font color='red' size='7'>HONK</font>"
|
||||
M.sleeping = 0
|
||||
|
||||
@@ -1371,7 +1371,7 @@
|
||||
/obj/mecha/proc/get_log_html()
|
||||
var/output = "<html><head><title>[src.name] Log</title></head><body style='font: 13px 'Courier', monospace;'>"
|
||||
for(var/list/entry in log)
|
||||
output += {"<div style='font-weight: bold;'>[time2text(entry["time"],"DDD MMM DD hh:mm:ss")] 2555</div>
|
||||
output += {"<div style='font-weight: bold;'>[time2text(entry["time"],"DDD MMM DD hh:mm:ss")] [game_year]</div>
|
||||
<div style='margin-left:15px; margin-bottom:10px;'>[entry["message"]]</div>
|
||||
"}
|
||||
output += "</body></html>"
|
||||
|
||||
@@ -15,4 +15,10 @@
|
||||
/obj/effect/decal/spraystill
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 50
|
||||
layer = 50
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/decal/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
@@ -1030,19 +1030,10 @@ steam.start() -- spawns the effect
|
||||
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!air_master)
|
||||
return 0
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(north)) air_master.tiles_to_update |= north
|
||||
if(istype(south)) air_master.tiles_to_update |= south
|
||||
if(istype(east)) air_master.tiles_to_update |= east
|
||||
if(istype(west)) air_master.tiles_to_update |= west
|
||||
air_master.AddTurfToUpdate(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -460,11 +460,21 @@
|
||||
if( !(slot_flags & SLOT_HEAD) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_ears)
|
||||
if(H.ears)
|
||||
if(slot_l_ear)
|
||||
if(H.l_ear)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_EARS) )
|
||||
return 0
|
||||
if( (slot_flags & SLOT_TWOEARS) && H.r_ear )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_r_ear)
|
||||
if(H.r_ear)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_EARS) )
|
||||
return 0
|
||||
if( (slot_flags & SLOT_TWOEARS) && H.l_ear )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_w_uniform)
|
||||
if(H.w_uniform)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
/obj/item/bodybag/cryobag
|
||||
name = "stasis bag"
|
||||
desc = "A folded, non-reusable bag designed for the preservation of an occupant's brain by stasis."
|
||||
desc = "A folded, non-reusable bag designed to prevent additional damage to an occupant at the cost of genetic damage."
|
||||
icon = 'icons/obj/cryobag.dmi'
|
||||
icon_state = "bodybag_folded"
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag
|
||||
name = "stasis bag"
|
||||
desc = "A non-reusable plastic bag designed for the preservation of an occupant's brain by stasis."
|
||||
desc = "A non-reusable plastic bag designed to prevent additional damage to an occupant at the cost of genetic damage."
|
||||
icon = 'icons/obj/cryobag.dmi'
|
||||
item_path = /obj/item/bodybag/cryobag
|
||||
var/used = 0
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/obj/item/device/megaphone
|
||||
name = "megaphone"
|
||||
desc = "A device used to project your voice. Loudly."
|
||||
icon_state = "megaphone"
|
||||
item_state = "radio"
|
||||
w_class = 1.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
|
||||
var/spamcheck = 0
|
||||
var/emagged = 0
|
||||
var/insults = 0
|
||||
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
|
||||
|
||||
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
|
||||
if (user.client)
|
||||
if(user.client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (muted)."
|
||||
return
|
||||
if(!ishuman(user))
|
||||
user << "\red You don't know how to use this!"
|
||||
return
|
||||
if(user.silent)
|
||||
return
|
||||
if(spamcheck)
|
||||
user << "\red \The [src] needs to recharge!"
|
||||
return
|
||||
|
||||
var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
if ((src.loc == user && usr.stat == 0))
|
||||
if(emagged)
|
||||
if(insults)
|
||||
for(var/mob/O in (viewers(user)))
|
||||
O.show_message("<B>[user]</B> broadcasts, <FONT size=3>\"[pick(insultmsg)]\"</FONT>",2) // 2 stands for hearable message
|
||||
insults--
|
||||
else
|
||||
user << "\red *BZZZZzzzzzt*"
|
||||
else
|
||||
for(var/mob/O in (viewers(user)))
|
||||
O.show_message("<B>[user]</B> broadcasts, <FONT size=3>\"[message]\"</FONT>",2) // 2 stands for hearable message
|
||||
|
||||
spamcheck = 1
|
||||
spawn(20)
|
||||
spamcheck = 0
|
||||
return
|
||||
|
||||
/obj/item/device/megaphone/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
||||
user << "\red You overload \the [src]'s voice synthesizer."
|
||||
emagged = 1
|
||||
insults = rand(1, 3)//to prevent dickflooding
|
||||
return
|
||||
return
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/item/device/radio/headset/receive_range(freq, level)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.ears == src)
|
||||
if(H.l_ear == src || H.r_ear == src)
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
if(emagged)
|
||||
if(insults >= 1)
|
||||
playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0)//hueheuheuheuheuheuhe
|
||||
user.visible_message("<span class='warning'>[user]'s [name] gurgles, \"FUCK YOUR CUNT YOU SHIT EATING CUNT TILL YOU ARE A MASS EATING SHIT CUNT. EAT PENISES IN YOUR FUCK FACE AND SHIT OUT ABORTIONS TO FUCK UP SHIT IN YOUR ASS YOU COCK FUCK SHIT MONKEY FROM THE DEPTHS OF SHIT\"</span>")
|
||||
user.show_message("<span class='warning'>[user]'s [name] gurgles, \"FUCK YOUR CUNT YOU SHIT EATING CUNT TILL YOU ARE A MASS EATING SHIT CUNT. EAT PENISES IN YOUR FUCK FACE AND SHIT OUT ABORTIONS TO FUCK UP SHIT IN YOUR ASS YOU COCK FUCK SHIT MONKEY FROM THE DEPTHS OF SHIT\"</span>",2) //It's a hearable message silly!
|
||||
insults--
|
||||
else
|
||||
user << "\red *BZZZZcuntZZZZT*"
|
||||
else
|
||||
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
|
||||
user.visible_message("<span class='warning'>[user]'s [name] rasps, \"Halt! Security!\"</span>")
|
||||
user.show_message("<span class='warning'>[user]'s [name] rasps, \"Halt! Security!\"</span>",1)
|
||||
|
||||
spamcheck = 1
|
||||
spawn(20)
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
/obj/item/device/lightreplacer,
|
||||
/obj/item/device/taperecorder,
|
||||
/obj/item/device/hailer,
|
||||
/obj/item/device/megaphone,
|
||||
/obj/item/clothing/tie/holobadge,
|
||||
/obj/structure/closet/crate/secure,
|
||||
/obj/structure/closet/secure_closet,
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
icon_state = "grenade"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/cleaner
|
||||
name = "Cleaner Grenade"
|
||||
name = "cleaner grenade"
|
||||
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
|
||||
stage = 2
|
||||
path = 1
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if(iscarbon(M))
|
||||
eye_safety = M.eyecheck()
|
||||
if(ishuman(M))
|
||||
if(istype(M:ears, /obj/item/clothing/ears/earmuffs))
|
||||
if(istype(M:l_ear, /obj/item/clothing/ears/earmuffs) || istype(M:r_ear, /obj/item/clothing/ears/earmuffs))
|
||||
ear_safety += 2
|
||||
if(HULK in M.mutations)
|
||||
ear_safety += 1
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implant/tracking
|
||||
name = "tracking"
|
||||
name = "tracking implant"
|
||||
desc = "Track with this."
|
||||
var/id = 1.0
|
||||
|
||||
@@ -219,7 +219,7 @@ Implant Specifics:<BR>"}
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/implant/chem
|
||||
name = "chem"
|
||||
name = "chemical implant"
|
||||
desc = "Injects things."
|
||||
allow_reagents = 1
|
||||
|
||||
@@ -283,7 +283,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
malfunction--
|
||||
|
||||
/obj/item/weapon/implant/loyalty
|
||||
name = "loyalty"
|
||||
name = "loyalty implant"
|
||||
desc = "Makes you loyal or such."
|
||||
|
||||
get_data()
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
icon_state ="bookEngineering"
|
||||
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
|
||||
title = "Station Repairs and Construction"
|
||||
/*dat = {"
|
||||
|
||||
dat = {"
|
||||
|
||||
<html><head>
|
||||
</head>
|
||||
@@ -23,16 +24,16 @@
|
||||
|
||||
</html>
|
||||
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/engineering_particle_accelerator
|
||||
name = "Particle Accelerator User's Guide"
|
||||
icon_state ="bookParticleAccelerator"
|
||||
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
|
||||
title = "Particle Accelerator User's Guide"
|
||||
//big pile of shit below.
|
||||
|
||||
/*dat = {"<html>
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -65,7 +66,7 @@
|
||||
</ol>
|
||||
|
||||
</body>
|
||||
</html>"}*/
|
||||
</html>"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/engineering_hacking
|
||||
@@ -73,29 +74,28 @@
|
||||
icon_state ="bookHacking"
|
||||
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
|
||||
title = "Hacking"
|
||||
//big pile of shit below.
|
||||
|
||||
/*dat = {"
|
||||
dat = {"
|
||||
|
||||
<html><head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe width='100%' height='97%' src="http://wiki.nanotrasen.com/index.php?title=Hacking&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
<iframe width='100%' height='97%' src="http://baystation12.net/wiki/index.php?title=Hacking&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/engineering_singularity_safety
|
||||
name = "Singularity Safety in Special Circumstances"
|
||||
icon_state ="bookEngineeringSingularitySafety"
|
||||
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
|
||||
title = "Singularity Safety in Special Circumstances"
|
||||
//big pile of shit below.
|
||||
|
||||
/*dat = {"<html>
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -134,14 +134,16 @@
|
||||
Step one: <b>GET THE FUCK OUT OF THERE!!! FORGET THE WOMEN AND CHILDREN, SAVE YOURSELF!!!</b><br>
|
||||
</body>
|
||||
</html>
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/hydroponics_pod_people
|
||||
name = "The Human Harvest - From seed to market"
|
||||
name = "The Diona Harvest - From seed to market"
|
||||
icon_state ="bookHydroponicsPodPeople"
|
||||
author = "Farmer John"
|
||||
title = "The Human Harvest - From seed to market"
|
||||
/*dat = {"<html>
|
||||
title = "The Diona Harvest - From seed to market"
|
||||
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -152,33 +154,29 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Growing Humans</h3>
|
||||
<h3>Growing Diona</h3>
|
||||
|
||||
Why would you want to grow humans? Well I'm expecting most readers to be in the slave trade, but a few might actually
|
||||
want to revive fallen comrades. Growing pod people is easy, but prone to disaster.
|
||||
Growing Diona is easy!
|
||||
<p>
|
||||
<ol>
|
||||
<li>Find a dead person who is in need of cloning. </li>
|
||||
<li>Take a blood sample with a syringe. </li>
|
||||
<li>Inject a seed pack with the blood sample. </li>
|
||||
<li>Plant the seeds. </li>
|
||||
<li>Tend to the plants water and nutrition levels until it is time to harvest the cloned human.</li>
|
||||
<li>Tend to the plants water and nutrition levels until it is time to harvest the Diona.</li>
|
||||
</ol>
|
||||
<p>
|
||||
It really is that easy! Good luck!
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/medical_cloning
|
||||
name = "Cloning techniques of the 26th century"
|
||||
icon_state ="bookCloning"
|
||||
author = "Medical Journal, volume 3" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
|
||||
title = "Cloning techniques of the 26th century"
|
||||
//big pile of shit below.
|
||||
|
||||
/*dat = {"<html>
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -202,7 +200,7 @@
|
||||
<li><a href='#6'>Get clean Structurel Enzymes for the body</a></li>
|
||||
<li><a href='#7'>Put body in morgue</a></li>
|
||||
<li><a href='#8'>Await cloned body</a></li>
|
||||
<li><a href='#9'>Use the clean SW injector</a></li>
|
||||
<li><a href='#9'>Cryo and use the clean SE injector</a></li>
|
||||
<li><a href='#10'>Give person clothes back</a></li>
|
||||
<li><a href='#11'>Send person on their way</a></li>
|
||||
</ol>
|
||||
@@ -231,8 +229,8 @@
|
||||
<a name='8'><H4>Step 8: Await cloned body</H4>
|
||||
Now go back to the lab and wait for your patient to be cloned. It won’t be long now, I promise.
|
||||
|
||||
<a name='9'><H4>Step 9: Use the clean SE injector on person</H4>
|
||||
Has your body been cloned yet? Great! As soon as the guy pops out, grab your injector and jab it in them. Once you’ve injected them, they now have clean Structural Enzymes and their defects, if any, will disappear in a short while.
|
||||
<a name='9'><H4>Step 9: Cyo and clean clean SE injector on person</H4>
|
||||
Has your body been cloned yet? Great! As soon as the guy pops out, grab them and stick them in cryo. Clonexadone and Cryoxadone help rebuild their genetic material. Then grab your cleanr SE injector and jab it in them. Once you’ve injected them, they now have clean Structural Enzymes and their defects, if any, will disappear in a short while.
|
||||
|
||||
<a name='10'><H4>Step 10: Give person clothes back</H4>
|
||||
Obviously the person will be naked after they have been cloned. Provided you weren’t an irresponsible little shit, you should have protected their possessions from thieves and should be able to give them back to the patient. No matter how cruel you are, it’s simply against protocol to force your patients to walk outside naked.
|
||||
@@ -242,11 +240,9 @@
|
||||
|
||||
<p>If you’ve gotten this far, congratulations! You have mastered the art of cloning. Now, the real problem is how to resurrect yourself after that traitor had his way with you for cloning his target.
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/ripley_build_and_repair
|
||||
@@ -254,9 +250,8 @@
|
||||
icon_state ="book"
|
||||
author = "Weyland-Yutani Corp" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
|
||||
title = "APLU \"Ripley\" Construction and Operation Manual"
|
||||
//big pile of shit below.
|
||||
|
||||
/*dat = {"<html>
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -320,9 +315,7 @@
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<h2>Operation</h2>
|
||||
Coming soon...
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/research_and_development
|
||||
@@ -330,8 +323,8 @@
|
||||
icon_state = "rdbook"
|
||||
author = "Dr. L. Ight"
|
||||
title = "Research and Development 101"
|
||||
/*dat = {"
|
||||
<html>
|
||||
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -373,7 +366,7 @@
|
||||
Many machines produces from circuit boards and inserted into a machine frame require a variety of parts to construct. These are parts like capacitors, batteries, matter bins, and so forth. As your knowledge of science improves, more advanced versions are unlocked. If you use these parts when constructing something, its attributes may be improved. For example, if you use an advanced matter bin when constructing an autolathe (rather then a regular one), it'll hold more materials. Experiment around with stock parts of various qualities to see how they affect the end results! Be warned, however: Tier 3 and higher stock parts don't have 100% reliability and their low reliability may affect the reliability of the end machine.
|
||||
</body>
|
||||
</html>
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/robotics_cyborgs
|
||||
@@ -381,7 +374,8 @@
|
||||
icon_state = "borgbook"
|
||||
author = "XISC"
|
||||
title = "Cyborgs for Dummies"
|
||||
/*dat = {"<html>
|
||||
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 21px; margin: 15px 0px 5px;}
|
||||
@@ -576,7 +570,8 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/security_space_law
|
||||
name = "Space Law"
|
||||
@@ -584,6 +579,7 @@
|
||||
icon_state = "bookSpaceLaw"
|
||||
author = "Nanotrasen"
|
||||
title = "Space Law"
|
||||
|
||||
dat = {"
|
||||
|
||||
<html><head>
|
||||
@@ -596,22 +592,24 @@
|
||||
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/engineering_guide
|
||||
name = "Engineering Textbook"
|
||||
icon_state ="bookEngineering2"
|
||||
author = "Engineering Encyclopedia"
|
||||
title = "Engineering Textbook"
|
||||
/*dat = {"
|
||||
|
||||
dat = {"
|
||||
|
||||
<html><head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe width='100%' height='97%' src="http://wiki.nanotrasen.com/index.php?title=Guide_to_engineering&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe> </body>
|
||||
<iframe width='100%' height='97%' src="http://baystation12.net/wiki/index.php?title=Guide_to_Engineering&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe> </body>
|
||||
|
||||
</html>
|
||||
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/chef_recipes
|
||||
@@ -619,7 +617,8 @@
|
||||
icon_state = "cooked_book"
|
||||
author = "Lord Frenrir Cageth"
|
||||
title = "Chef Recipes"
|
||||
/*dat = {"<html>
|
||||
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -664,14 +663,16 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/barman_recipes
|
||||
name = "Barman Recipes"
|
||||
icon_state = "barbook"
|
||||
author = "Sir John Rose"
|
||||
title = "Barman Recipes"
|
||||
/*dat = {"<html>
|
||||
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -716,7 +717,7 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"}*/
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/detective
|
||||
@@ -724,7 +725,8 @@
|
||||
icon_state ="bookDetective"
|
||||
author = "Nanotrasen"
|
||||
title = "The Film Noir: Proper Procedures for Investigations"
|
||||
/*dat = {"<html>
|
||||
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
@@ -758,14 +760,15 @@
|
||||
It really is that easy! Good luck!
|
||||
|
||||
</body>
|
||||
</html>"}*/
|
||||
</html>"}
|
||||
|
||||
/obj/item/weapon/book/manual/nuclear
|
||||
name = "Fission Mailed: Nuclear Sabotage 101"
|
||||
icon_state ="bookNuclear"
|
||||
author = "Syndicate"
|
||||
title = "Fission Mailed: Nuclear Sabotage 101"
|
||||
/*dat = {"<html>
|
||||
|
||||
dat = {"<html>
|
||||
Nuclear Explosives 101:<br>
|
||||
Hello and thank you for choosing the Syndicate for your nuclear information needs.<br>
|
||||
Today's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.<br>
|
||||
@@ -793,4 +796,4 @@
|
||||
<b>Disk, Code, Safety, Timer, Disk, RUN!</b><br>
|
||||
Intelligence Analysts believe that normal Nanotrasen procedure is for the Captain to secure the nuclear authorisation disk.<br>
|
||||
Good luck!
|
||||
</html>"}*/
|
||||
</html>"}
|
||||
@@ -15,40 +15,34 @@
|
||||
|
||||
|
||||
/obj/item/weapon/mop/New()
|
||||
var/datum/reagents/R = new/datum/reagents(5)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
create_reagents(5)
|
||||
|
||||
|
||||
obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
|
||||
reagents.reaction(A,1,10)
|
||||
A.clean_blood()
|
||||
for(var/obj/effect/O in A)
|
||||
if( istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay) )
|
||||
del(O)
|
||||
obj/item/weapon/mop/proc/clean(turf/simulated/A)
|
||||
if(reagents.has_reagent("water", 1))
|
||||
A.clean_blood()
|
||||
for(var/obj/effect/O in A)
|
||||
if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
|
||||
del(O)
|
||||
reagents.reaction(A, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
|
||||
reagents.remove_any(1) //reaction() doesn't use up the reagents
|
||||
|
||||
|
||||
/obj/effect/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/mop))
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/mop/afterattack(atom/A, mob/user as mob)
|
||||
if(reagents.total_volume < 1 || mopcount >= 5)
|
||||
user << "<span class='notice'>Your mop is dry!</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/mop/afterattack(atom/A, mob/user)
|
||||
if(istype(A, /turf/simulated) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
|
||||
if(reagents.total_volume < 1)
|
||||
user << "<span class='notice'>Your mop is dry!</span>"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='warning'>[user] begins to clean \the [get_turf(A)].</span>")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(A)
|
||||
clean(get_turf(A))
|
||||
user << "<span class='notice'>You have finished mopping!</span>"
|
||||
mopcount++
|
||||
|
||||
if(mopcount >= 5) //Okay this stuff is an ugly hack and i feel bad about it.
|
||||
spawn(5)
|
||||
reagents.clear_reagents()
|
||||
mopcount = 0
|
||||
return
|
||||
|
||||
/obj/effect/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap))
|
||||
return
|
||||
..()
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/item/weapon/storage/bag/trash
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon = 'icons/obj/trash.dmi'
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "trashbag0"
|
||||
item_state = "trashbag"
|
||||
|
||||
|
||||
@@ -290,43 +290,33 @@
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube")
|
||||
New()
|
||||
..()
|
||||
for(var/i = 1; i <= 5; i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src)
|
||||
/obj/item/weapon/storage/box/farwacubes
|
||||
if(src.type == /obj/item/weapon/storage/box/monkeycubes)
|
||||
for(var/i = 1; i <= 5; i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src)
|
||||
|
||||
/obj/item/weapon/storage/box/monkeycubes/farwacubes
|
||||
name = "farwa cube box"
|
||||
desc = "Drymate brand farwa cubes. Just add water!"
|
||||
icon = 'icons/obj/food.dmi'
|
||||
icon_state = "monkeycubebox"
|
||||
storage_slots = 7
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/farwacube")
|
||||
desc = "Drymate brand farwa cubes, shipped from Ahdomai. Just add water!"
|
||||
New()
|
||||
..()
|
||||
for(var/i = 1; i <= 5; i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/farwacube/wrapped(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube(src)
|
||||
|
||||
/obj/item/weapon/storage/box/stokcubes
|
||||
/obj/item/weapon/storage/box/monkeycubes/stokcubes
|
||||
name = "stok cube box"
|
||||
desc = "Drymate brand stok cubes. Just add water!"
|
||||
icon = 'icons/obj/food.dmi'
|
||||
icon_state = "monkeycubebox"
|
||||
storage_slots = 7
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/stokcube")
|
||||
desc = "Drymate brand stok cubes, shipped from Moghes. Just add water!"
|
||||
New()
|
||||
..()
|
||||
for(var/i = 1; i <= 5; i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/stokcube/wrapped(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube(src)
|
||||
|
||||
/obj/item/weapon/storage/box/neaeracubes
|
||||
/obj/item/weapon/storage/box/monkeycubes/neaeracubes
|
||||
name = "neaera cube box"
|
||||
desc = "Drymate brand neaera cubes. Just add water!"
|
||||
icon = 'icons/obj/food.dmi'
|
||||
icon_state = "monkeycubebox"
|
||||
storage_slots = 7
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/stokcube")
|
||||
desc = "Drymate brand neaera cubes, shipped from Jargon 4. Just add water!"
|
||||
New()
|
||||
..()
|
||||
for(var/i = 1; i <= 5; i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/neaeracube/wrapped(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src)
|
||||
|
||||
/obj/item/weapon/storage/box/ids
|
||||
name = "spare IDs"
|
||||
|
||||
@@ -44,18 +44,16 @@
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/janitor(src)
|
||||
new /obj/item/weapon/cartridge/janitor(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/clothing/shoes/galoshes(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/storage/bag/trash(src)
|
||||
new /obj/item/device/lightreplacer(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/device/lightreplacer(src)
|
||||
new /obj/item/weapon/storage/bag/trash(src)
|
||||
new /obj/item/clothing/shoes/galoshes(src)
|
||||
|
||||
/*
|
||||
* Lawyer
|
||||
|
||||
@@ -1,3 +1,162 @@
|
||||
/obj/structure/janitorialcart
|
||||
name = "janitorial cart"
|
||||
desc = "The ultimate in janitorial carts! Has space for water, mops, signs, trash bags, and more!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cart"
|
||||
anchored = 0
|
||||
density = 1
|
||||
flags = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/weapon/storage/bag/trash/mybag = null
|
||||
var/obj/item/weapon/mop/mymop = null
|
||||
var/obj/item/weapon/reagent_containers/spray/myspray = null
|
||||
var/obj/item/device/lightreplacer/myreplacer = null
|
||||
var/signs = 0 //maximum capacity hardcoded below
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/New()
|
||||
create_reagents(100)
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/examine()
|
||||
set src in usr
|
||||
usr << "[src] \icon[src] contains [reagents.total_volume] unit\s of liquid!"
|
||||
..()
|
||||
//everything else is visible, so doesn't need to be mentioned
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/storage/bag/trash) && !mybag)
|
||||
user.drop_item()
|
||||
mybag = I
|
||||
I.loc = src
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
user << "<span class='notice'>You put [I] into [src].</span>"
|
||||
|
||||
else if(istype(I, /obj/item/weapon/mop))
|
||||
if(I.reagents.total_volume < I.reagents.maximum_volume) //if it's not completely soaked we assume they want to wet it, otherwise store it
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(I, 5) //
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
return
|
||||
if(!mymop)
|
||||
user.drop_item()
|
||||
mymop = I
|
||||
I.loc = src
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
user << "<span class='notice'>You put [I] into [src].</span>"
|
||||
|
||||
else if(istype(I, /obj/item/weapon/reagent_containers/spray) && !myspray)
|
||||
user.drop_item()
|
||||
myspray = I
|
||||
I.loc = src
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
user << "<span class='notice'>You put [I] into [src].</span>"
|
||||
|
||||
else if(istype(I, /obj/item/device/lightreplacer) && !myreplacer)
|
||||
user.drop_item()
|
||||
myreplacer = I
|
||||
I.loc = src
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
user << "<span class='notice'>You put [I] into [src].</span>"
|
||||
|
||||
else if(istype(I, /obj/item/weapon/caution))
|
||||
if(signs < 4)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
signs++
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
user << "<span class='notice'>You put [I] into [src].</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src] can't hold any more signs.</span>"
|
||||
|
||||
else if(mybag)
|
||||
mybag.attackby(I, user)
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(mybag)
|
||||
dat += "<a href='?src=\ref[src];garbage=1'>[mybag.name]</a><br>"
|
||||
if(mymop)
|
||||
dat += "<a href='?src=\ref[src];mop=1'>[mymop.name]</a><br>"
|
||||
if(myspray)
|
||||
dat += "<a href='?src=\ref[src];spray=1'>[myspray.name]</a><br>"
|
||||
if(myreplacer)
|
||||
dat += "<a href='?src=\ref[src];replacer=1'>[myreplacer.name]</a><br>"
|
||||
if(signs)
|
||||
dat += "<a href='?src=\ref[src];sign=1'>[signs] sign\s</a><br>"
|
||||
var/datum/browser/popup = new(user, "janicart", name, 240, 160)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/Topic(href, href_list)
|
||||
if(!in_range(src, usr))
|
||||
return
|
||||
if(!isliving(usr))
|
||||
return
|
||||
var/mob/living/user = usr
|
||||
if(href_list["garbage"])
|
||||
if(mybag)
|
||||
user.put_in_hands(mybag)
|
||||
user << "<span class='notice'>You take [mybag] from [src].</span>"
|
||||
mybag = null
|
||||
if(href_list["mop"])
|
||||
if(mymop)
|
||||
user.put_in_hands(mymop)
|
||||
user << "<span class='notice'>You take [mymop] from [src].</span>"
|
||||
mymop = null
|
||||
if(href_list["spray"])
|
||||
if(myspray)
|
||||
user.put_in_hands(myspray)
|
||||
user << "<span class='notice'>You take [myspray] from [src].</span>"
|
||||
myspray = null
|
||||
if(href_list["replacer"])
|
||||
if(myreplacer)
|
||||
user.put_in_hands(myreplacer)
|
||||
user << "<span class='notice'>You take [myreplacer] from [src].</span>"
|
||||
myreplacer = null
|
||||
if(href_list["sign"])
|
||||
if(signs)
|
||||
var/obj/item/weapon/caution/Sign = locate() in src
|
||||
if(Sign)
|
||||
user.put_in_hands(Sign)
|
||||
user << "<span class='notice'>You take \a [Sign] from [src].</span>"
|
||||
signs--
|
||||
else
|
||||
warning("[src] signs ([signs]) didn't match contents")
|
||||
signs = 0
|
||||
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/update_icon()
|
||||
overlays = null
|
||||
if(mybag)
|
||||
overlays += "cart_garbage"
|
||||
if(mymop)
|
||||
overlays += "cart_mop"
|
||||
if(myspray)
|
||||
overlays += "cart_spray"
|
||||
if(myreplacer)
|
||||
overlays += "cart_replacer"
|
||||
if(signs)
|
||||
overlays += "cart_sign[signs]"
|
||||
|
||||
|
||||
//old style retardo-cart
|
||||
/obj/structure/stool/bed/chair/janicart
|
||||
name = "janicart"
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
@@ -8,36 +167,36 @@
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/weapon/storage/bag/trash/mybag = null
|
||||
var/callme = "pimpin' ride" //how do people refer to it?
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/New()
|
||||
handle_rotation()
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
create_reagents(100)
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/examine()
|
||||
set src in usr
|
||||
usr << "\icon[src] This pimpin' ride contains [reagents.total_volume] unit\s of water!"
|
||||
usr << "\icon[src] This [callme] contains [reagents.total_volume] unit\s of water!"
|
||||
if(mybag)
|
||||
usr << "\A [mybag] is hanging on the pimpin' ride."
|
||||
usr << "\A [mybag] is hanging on the [callme]."
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume >= 2)
|
||||
reagents.trans_to(W, 2)
|
||||
user << "<span class='notice'>You wet the mop in the pimpin' ride.</span>"
|
||||
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
if(reagents.total_volume < 1)
|
||||
user << "<span class='notice'>This pimpin' ride is out of water!</span>"
|
||||
else if(istype(W, /obj/item/key))
|
||||
user << "Hold [W] in one of your hands while you drive this pimpin' ride."
|
||||
else if(istype(W, /obj/item/weapon/storage/bag/trash))
|
||||
user << "<span class='notice'>You hook the trashbag onto the pimpin' ride.</span>"
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume > 1)
|
||||
reagents.trans_to(I, 2)
|
||||
user << "<span class='notice'>You wet [I] in the [callme].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else
|
||||
user << "<span class='notice'>This [callme] is out of water!</span>"
|
||||
else if(istype(I, /obj/item/key))
|
||||
user << "Hold [I] in one of your hands while you drive this [callme]."
|
||||
else if(istype(I, /obj/item/weapon/storage/bag/trash))
|
||||
user << "<span class='notice'>You hook the trashbag onto the [callme].</span>"
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
mybag = W
|
||||
I.loc = src
|
||||
mybag = I
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
|
||||
@@ -57,7 +216,8 @@
|
||||
update_mob()
|
||||
handle_rotation()
|
||||
else
|
||||
user << "<span class='notice'>You'll need the keys in one of your hands to drive this pimpin' ride.</span>"
|
||||
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/Move()
|
||||
..()
|
||||
@@ -65,6 +225,7 @@
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.loc = loc
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/buckle_mob(mob/M, mob/user)
|
||||
if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon))
|
||||
return
|
||||
@@ -72,8 +233,8 @@
|
||||
unbuckle()
|
||||
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[M] climbs onto the pimpin' ride!</span>",\
|
||||
"<span class='notice'>You climb onto the pimpin' ride!</span>")
|
||||
"<span class='notice'>[M] climbs onto the [callme]!</span>",\
|
||||
"<span class='notice'>You climb onto the [callme]!</span>")
|
||||
M.buckled = src
|
||||
M.loc = loc
|
||||
M.dir = dir
|
||||
@@ -81,7 +242,7 @@
|
||||
buckled_mob = M
|
||||
update_mob()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/unbuckle()
|
||||
if(buckled_mob)
|
||||
@@ -89,6 +250,7 @@
|
||||
buckled_mob.pixel_y = 0
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/handle_rotation()
|
||||
if(dir == SOUTH)
|
||||
layer = FLY_LAYER
|
||||
@@ -102,6 +264,7 @@
|
||||
|
||||
update_mob()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
@@ -119,11 +282,13 @@
|
||||
buckled_mob.pixel_x = -13
|
||||
buckled_mob.pixel_y = 7
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(buckled_mob)
|
||||
if(prob(65))
|
||||
if(prob(85))
|
||||
return buckled_mob.bullet_act(Proj)
|
||||
visible_message("<span class='warning'>[Proj] ricochets off the pimpin' ride!</span>")
|
||||
visible_message("<span class='warning'>[Proj] ricochets off the [callme]!</span>")
|
||||
|
||||
|
||||
/obj/item/key
|
||||
name = "key"
|
||||
|
||||
@@ -156,20 +156,9 @@
|
||||
return
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
|
||||
if(!air_master)
|
||||
return 0
|
||||
air_master.AddTurfToUpdate(get_turf(src))
|
||||
return 1
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
|
||||
@@ -1,44 +1,28 @@
|
||||
/obj/structure/mopbucket
|
||||
desc = "Fill it with water, but don't forget a mop!"
|
||||
name = "mop bucket"
|
||||
desc = "Fill it with water, but don't forget a mop!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = 1
|
||||
pressure_resistance = 5
|
||||
flags = FPRINT | TABLEPASS | OPENCONTAINER
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
|
||||
/obj/structure/mopbucket/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
create_reagents(100)
|
||||
|
||||
|
||||
/obj/structure/mopbucket/examine()
|
||||
set src in usr
|
||||
usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
|
||||
usr << "[src] \icon[src] contains [reagents.total_volume] unit\s of water!"
|
||||
..()
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/mop))
|
||||
if (src.reagents.total_volume >= 2)
|
||||
src.reagents.trans_to(W, 2)
|
||||
user << "\blue You wet the mop"
|
||||
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
if (src.reagents.total_volume < 1)
|
||||
user << "\blue Out of water!"
|
||||
return
|
||||
|
||||
/obj/structure/mopbucket/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(I, 5)
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
@@ -258,8 +258,11 @@
|
||||
if(H.glasses && washglasses)
|
||||
if(H.glasses.clean_blood())
|
||||
H.update_inv_glasses(0)
|
||||
if(H.ears && washears)
|
||||
if(H.ears.clean_blood())
|
||||
if(H.l_ear && washears)
|
||||
if(H.l_ear.clean_blood())
|
||||
H.update_inv_ears(0)
|
||||
if(H.r_ear && washears)
|
||||
if(H.r_ear.clean_blood())
|
||||
H.update_inv_ears(0)
|
||||
if(H.belt)
|
||||
if(H.belt.clean_blood())
|
||||
|
||||
@@ -294,12 +294,9 @@ obj/structure/windoor_assembly/Del()
|
||||
return
|
||||
|
||||
/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!air_master)
|
||||
return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
air_master.AddTurfToUpdate(loc)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -316,21 +316,9 @@
|
||||
|
||||
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
|
||||
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!dir in cardinal)
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
if(istype(source))
|
||||
air_master.tiles_to_update |= source
|
||||
for(var/dir in cardinal)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
return 1
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
if(!air_master)
|
||||
return 0
|
||||
air_master.AddTurfToUpdate(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -280,13 +280,12 @@ proc/trigger_armed_response_team(var/force = 0)
|
||||
/mob/living/carbon/human/proc/equip_strike_team(leader_selected = 0)
|
||||
|
||||
//Special radio setup
|
||||
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_ears)
|
||||
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_l_ear)
|
||||
|
||||
//Replaced with new ERT uniform
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves)
|
||||
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_ears)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(src), slot_back)
|
||||
/*
|
||||
|
||||
+24
-18
@@ -214,8 +214,15 @@
|
||||
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
|
||||
|
||||
if(ispath(N, /turf/simulated/floor))
|
||||
//if the old turf had a zone, connect the new turf to it as well - Cael
|
||||
//Adjusted by SkyMarshal 5/10/13 - The air master will handle the addition of the new turf.
|
||||
if(zone)
|
||||
zone.RemoveTurf(src)
|
||||
if(!zone.CheckStatus())
|
||||
zone.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
||||
W.Assimilate_Air()
|
||||
//W.Assimilate_Air()
|
||||
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount)
|
||||
@@ -225,20 +232,17 @@
|
||||
if (istype(W,/turf/simulated/floor))
|
||||
W.RemoveLattice()
|
||||
|
||||
//if the old turf had a zone, connect the new turf to it as well - Cael
|
||||
if(src.zone)
|
||||
src.zone.RemoveTurf(src)
|
||||
W.zone = src.zone
|
||||
W.zone.AddTurf(W)
|
||||
|
||||
for(var/turf/simulated/T in orange(src,1))
|
||||
air_master.tiles_to_update.Add(T)
|
||||
if(air_master)
|
||||
air_master.AddTurfToUpdate(src)
|
||||
|
||||
W.levelupdate()
|
||||
return W
|
||||
|
||||
else
|
||||
/*if(istype(src, /turf/simulated) && src.zone)
|
||||
src.zone.rebuild = 1*/
|
||||
if(zone)
|
||||
zone.RemoveTurf(src)
|
||||
if(!zone.CheckStatus())
|
||||
zone.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||
W.lighting_lumcount += old_lumcount
|
||||
@@ -246,19 +250,19 @@
|
||||
W.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += W
|
||||
|
||||
if(src.zone)
|
||||
src.zone.RemoveTurf(src)
|
||||
W.zone = src.zone
|
||||
W.zone.AddTurf(W)
|
||||
|
||||
if(air_master)
|
||||
for(var/turf/simulated/T in orange(src,1))
|
||||
air_master.tiles_to_update.Add(T)
|
||||
air_master.AddTurfToUpdate(src)
|
||||
|
||||
W.levelupdate()
|
||||
return W
|
||||
|
||||
|
||||
//Commented out by SkyMarshal 5/10/13 - If you are patching up space, it should be vacuum.
|
||||
// If you are replacing a wall, you have increased the volume of the room without increasing the amount of gas in it.
|
||||
// As such, this will no longer be used.
|
||||
|
||||
//////Assimilate Air//////
|
||||
/*
|
||||
/turf/simulated/proc/Assimilate_Air()
|
||||
var/aoxy = 0//Holders to assimilate air from nearby turfs
|
||||
var/anitro = 0
|
||||
@@ -302,6 +306,8 @@
|
||||
S.air.toxins = air.toxins
|
||||
S.air.temperature = air.temperature
|
||||
S.air.update_values()
|
||||
*/
|
||||
|
||||
|
||||
/turf/proc/ReplaceWithLattice()
|
||||
src.ChangeTurf(/turf/space)
|
||||
|
||||
+2
-1
@@ -79,6 +79,7 @@ var/href_logfile = null
|
||||
var/station_name = "NSS Exodus"
|
||||
var/game_version = "Baystation12"
|
||||
var/changelog_hash = ""
|
||||
var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544)
|
||||
|
||||
var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
|
||||
var/going = 1.0
|
||||
@@ -192,7 +193,7 @@ var/list/AAlarmWireColorToIndex
|
||||
#define SPEED_OF_LIGHT_SQ 9e+16
|
||||
#define FIRE_DAMAGE_MODIFIER 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215)
|
||||
#define AIR_DAMAGE_MODIFIER 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
|
||||
#define INFINITY 1e31 //closer then enough
|
||||
#define INFINITY 1.#INF
|
||||
|
||||
//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
|
||||
#define MAX_MESSAGE_LEN 1024
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
hub = "Exadv1.spacestation13"
|
||||
hub_password = "SORRYNOPASSWORD"
|
||||
name = "Baystation12"
|
||||
name = "Space Station 13"
|
||||
/* This is for any host that would like their server to appear on the main SS13 hub.
|
||||
To use it, simply replace the password above, with the password found below, and it should work.
|
||||
If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there.
|
||||
|
||||
@@ -107,8 +107,8 @@ obj/machinery/computer/forensic_scanning
|
||||
dat += "<a href='?src=\ref[src];operation=logout'>{Log Out}</a><br><hr><br>"
|
||||
if(scanning)
|
||||
if(scan_process)
|
||||
dat += "Scan Object: {[scanning.name]}<br>"
|
||||
dat += "<a href='?src=\ref[src];operation=cancel'>{Cancel Scan}</a> {Print}<br>"
|
||||
dat += {"Scan Object: {[scanning.name]}<br>
|
||||
<a href='?src=\ref[src];operation=cancel'>{Cancel Scan}</a> {Print}<br>"}
|
||||
else
|
||||
if(isai) dat += "Scan Object: {[scanning.name]}<br>"
|
||||
else dat += "Scan Object: <a href='?src=\ref[src];operation=eject'>{[scanning.name]}</a><br>"
|
||||
@@ -117,8 +117,8 @@ obj/machinery/computer/forensic_scanning
|
||||
if(isai) dat += "{No Object Inserted}<br>"
|
||||
else dat += "<a href='?src=\ref[src];operation=insert'>{No Object Inserted}</a><br>"
|
||||
dat += "{Scan} <a href='?src=\ref[src];operation=print'>{Print}</a><br>"
|
||||
dat += "<a href='?src=\ref[src];operation=database'>{Access Database}</a><br><br>"
|
||||
dat += "<tt>[scan_data]</tt>"
|
||||
dat += {"<a href='?src=\ref[src];operation=database'>{Access Database}</a><br><br>"
|
||||
<tt>[scan_data]</tt>"}
|
||||
if(scan_data && !scan_process)
|
||||
dat += "<br><a href='?src=\ref[src];operation=erase'>{Erase Data}</a>"
|
||||
user << browse(dat,"window=scanner")
|
||||
@@ -200,8 +200,8 @@ obj/machinery/computer/forensic_scanning
|
||||
else
|
||||
temp = ""
|
||||
if(misc && misc.len)
|
||||
temp += "<b>Auxiliary Evidence Database</b><br><br>"
|
||||
temp += "This is where anything without fingerprints goes.<br><br>"
|
||||
temp += {"<b>Auxiliary Evidence Database</b><br><br>
|
||||
This is where anything without fingerprints goes.<br><br>"}
|
||||
for(var/atom in misc)
|
||||
var/list/data_entry = misc[atom]
|
||||
temp += "<a href='?src=\ref[src];operation=auxiliary;identifier=[atom]'>{[data_entry[3]]}</a><br>"
|
||||
@@ -215,8 +215,8 @@ obj/machinery/computer/forensic_scanning
|
||||
dossier[2] = new_title
|
||||
else
|
||||
usr << "Illegal or blank name."
|
||||
temp = "<b>Criminal Evidence Database</b><br><br>"
|
||||
temp += "Consolidated data points: [dossier[2]]<br>"
|
||||
temp = {"<b>Criminal Evidence Database</b><br><br>
|
||||
Consolidated data points: [dossier[2]]<br>"}
|
||||
var/print_string = "Fingerprints: Print not complete!<br>"
|
||||
if(stringpercent(dossier[1]) <= FINGERPRINT_COMPLETE)
|
||||
print_string = "Fingerprints: (80% or higher completion reached)<br>[dossier[1]]<br>"
|
||||
|
||||
@@ -560,7 +560,6 @@ var/global/floorIsLava = 0
|
||||
dat += {"
|
||||
<B>Admin Secrets</B><BR>
|
||||
<BR>
|
||||
<A href='?src=\ref[src];secretsadmin=clear_bombs'>Remove all bombs currently in existence</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_bombers'>Bombing List</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=check_antagonist'>Show current traitors and objectives</A><BR>
|
||||
<A href='?src=\ref[src];secretsadmin=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
|
||||
|
||||
@@ -233,7 +233,8 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/cmd_mod_say,
|
||||
/datum/admins/proc/show_player_info,
|
||||
/client/proc/player_panel_new,
|
||||
/datum/admins/proc/show_skills
|
||||
/datum/admins/proc/show_skills,
|
||||
/client/proc/dsay
|
||||
)
|
||||
/client/proc/add_admin_verbs()
|
||||
if(holder)
|
||||
@@ -580,11 +581,11 @@ var/list/admin_verbs_mod = list(
|
||||
set category = "Debug"
|
||||
set name = "Kill Air"
|
||||
set desc = "Toggle Air Processing"
|
||||
if(kill_air)
|
||||
kill_air = 0
|
||||
if(air_processing_killed)
|
||||
air_processing_killed = 0
|
||||
usr << "<b>Enabled air processing.</b>"
|
||||
else
|
||||
kill_air = 1
|
||||
air_processing_killed = 1
|
||||
usr << "<b>Disabled air processing.</b>"
|
||||
feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] used 'kill air'.")
|
||||
|
||||
@@ -18,12 +18,14 @@ var/jobban_keylist[0] //to store the keys & ranks
|
||||
if(M && rank)
|
||||
/*
|
||||
if(_jobban_isbanned(M, rank)) return "Reason Unspecified" //for old jobban
|
||||
*/
|
||||
|
||||
if (guest_jobbans(rank))
|
||||
if(config.guest_jobban && IsGuestKey(M.key))
|
||||
return "Guest Job-ban"
|
||||
if(config.usewhitelist && !check_whitelist(M))
|
||||
return "Whitelisted Job"
|
||||
*/
|
||||
|
||||
for (var/s in jobban_keylist)
|
||||
if( findtext(s,"[M.ckey] - [rank]") == 1 )
|
||||
var/startpos = findtext(s, "## ")+3
|
||||
|
||||
+112
-20
@@ -1405,7 +1405,7 @@
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!istype(H.ears, /obj/item/device/radio/headset))
|
||||
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
@@ -1415,14 +1415,14 @@
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s Centcomm message with the message [input].")
|
||||
message_admins("[src.owner] replied to [key_name(H)]'s Centcom message with: \"[input]\"")
|
||||
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\""
|
||||
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. <b>\"[input]\"</b> Message ends.\""
|
||||
|
||||
else if(href_list["SyndicateReply"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!istype(H.ears, /obj/item/device/radio/headset))
|
||||
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
@@ -1431,7 +1431,7 @@
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].")
|
||||
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\""
|
||||
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. <b>\"[input]\"</b> Message ends.\""
|
||||
|
||||
else if(href_list["CentcommFaxView"])
|
||||
var/info = locate(href_list["CentcommFaxView"])
|
||||
@@ -1446,22 +1446,29 @@
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
for(var/obj/machinery/faxmachine/F in world)
|
||||
for(var/obj/machinery/faxmachine/F in machines)
|
||||
if(! (F.stat & (BROKEN|NOPOWER) ) )
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc )
|
||||
P.name = "[command_name()]- [customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)
|
||||
|
||||
// Stamps
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped by the Central Command Quantum Relay.</i>"
|
||||
// animate! it's alive!
|
||||
flick("faxreceive", F)
|
||||
|
||||
// give the sprite some time to flick
|
||||
spawn(20)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc )
|
||||
P.name = "[command_name()]- [customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
|
||||
playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)
|
||||
|
||||
// Stamps
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped by the Central Command Quantum Relay.</i>"
|
||||
|
||||
src.owner << "Message reply to transmitted successfully."
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(H)]: [input]")
|
||||
@@ -1733,6 +1740,21 @@
|
||||
log_admin("[key_name(usr)] spawned a meteor wave", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] spawned a meteor wave.", 1)
|
||||
new /datum/event/meteor_wave
|
||||
if("goblob")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","Blob")
|
||||
log_admin("[key_name(usr)] spawned a blob", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] spawned a blob.", 1)
|
||||
new /datum/event/blob
|
||||
|
||||
if("aliens")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","Aliens")
|
||||
log_admin("[key_name(usr)] spawned an alien infestation", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] attempted an alien infestation", 1)
|
||||
new /datum/event/alien_infestation
|
||||
|
||||
|
||||
if("power")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","P")
|
||||
@@ -1967,6 +1989,76 @@
|
||||
spawn(0)
|
||||
sleep(rand(30,400))
|
||||
Wall.ex_act(rand(2,1)) */
|
||||
if("wave")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","MW")
|
||||
new /datum/event/meteor_wave
|
||||
|
||||
if("gravanomalies")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","GA")
|
||||
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('sound/AI/granomalies.ogg')
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(100, 600))
|
||||
del(bh)
|
||||
|
||||
if("timeanomalies") //dear god this code was awful :P Still needs further optimisation
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","STA")
|
||||
//moved to its own dm so I could split it up and prevent the spawns copying variables over and over
|
||||
//can be found in code\game\game_modes\events\wormholes.dm
|
||||
wormhole_event()
|
||||
|
||||
if("goblob")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BL")
|
||||
mini_blob_event()
|
||||
message_admins("[key_name_admin(usr)] has spawned blob", 1)
|
||||
if("aliens")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","AL")
|
||||
if(aliens_allowed)
|
||||
new /datum/event/alien_infestation
|
||||
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
|
||||
if("alien_silent") //replaces the spawn_xeno verb
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ALS")
|
||||
if(aliens_allowed)
|
||||
create_xeno()
|
||||
if("spiders")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SL")
|
||||
new /datum/event/spider_infestation
|
||||
message_admins("[key_name_admin(usr)] has spawned spiders", 1)
|
||||
if("comms_blackout")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","CB")
|
||||
var/answer = alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No")
|
||||
if(answer == "Yes")
|
||||
communications_blackout(0)
|
||||
else
|
||||
communications_blackout(1)
|
||||
message_admins("[key_name_admin(usr)] triggered a communications blackout.", 1)
|
||||
if("spaceninja")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SN")
|
||||
if(toggle_space_ninja)
|
||||
if(space_ninja_arrival())//If the ninja is actually spawned. They may not be depending on a few factors.
|
||||
message_admins("[key_name_admin(usr)] has sent in a space ninja", 1)
|
||||
if("carp")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","C")
|
||||
var/choice = input("You sure you want to spawn carp?") in list("Badmin", "Cancel")
|
||||
if(choice == "Badmin")
|
||||
message_admins("[key_name_admin(usr)] has spawned carp.", 1)
|
||||
new /datum/event/carp_migration
|
||||
if("radiation")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","R")
|
||||
message_admins("[key_name_admin(usr)] has has irradiated the station", 1)
|
||||
new /datum/event/radiation_storm
|
||||
if("immovable")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","IR")
|
||||
@@ -2125,13 +2217,13 @@
|
||||
if("spacevines")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","K")
|
||||
//new /datum/event/spacevine
|
||||
new /datum/event/spacevine
|
||||
message_admins("[key_name_admin(usr)] has spawned spacevines", 1)
|
||||
if("onlyone")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","OO")
|
||||
usr.client.only_one()
|
||||
// message_admins("[key_name_admin(usr)] has triggered a battle to the death (only one)")
|
||||
message_admins("[key_name_admin(usr)] has triggered a battle to the death (only one)")
|
||||
if(usr)
|
||||
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
|
||||
if (ok)
|
||||
|
||||
@@ -18,13 +18,21 @@
|
||||
if (src.handle_spam_prevention(msg,MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
var/stafftype = null
|
||||
|
||||
if (src.holder.rights & R_MOD)
|
||||
stafftype = "MOD"
|
||||
|
||||
if (src.holder.rights & R_ADMIN)
|
||||
stafftype = "ADMIN"
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.holder.fakekey ? pick("BADMIN", "hornigranny", "TLF", "scaredforshadows", "KSI", "Silnazi", "HerpEs", "BJ69", "SpoofedEdd", "Uhangay", "Wario90900", "Regarity", "MissPhareon", "LastFish", "unMportant", "Deurpyn", "Fatbeaver") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[stafftype]([src.holder.fakekey ? pick("BADMIN", "hornigranny", "TLF", "scaredforshadows", "KSI", "Silnazi", "HerpEs", "BJ69", "SpoofedEdd", "Uhangay", "Wario90900", "Regarity", "MissPhareon", "LastFish", "unMportant", "Deurpyn", "Fatbeaver") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
|
||||
@@ -667,7 +667,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/chaplain_hood(M), slot_head)
|
||||
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/clothing/glasses/thermal/monocle(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chaplain_hoodie(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(M), slot_l_store)
|
||||
@@ -689,7 +689,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/latex(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_head)
|
||||
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/clothing/glasses/thermal/monocle(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_store)
|
||||
@@ -706,7 +706,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
|
||||
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/clothing/glasses/sunglasses(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wcoat(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(M), slot_l_store)
|
||||
@@ -747,7 +747,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_ears)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
@@ -772,7 +772,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/officer(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
|
||||
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
@@ -797,7 +797,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
|
||||
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
@@ -821,7 +821,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
@@ -840,7 +840,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat/officer(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
|
||||
@@ -861,7 +861,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
||||
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/clothing/head/wizard(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
|
||||
@@ -873,7 +873,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/red(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
||||
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/clothing/head/wizard/red(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
|
||||
@@ -885,7 +885,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/marisa(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/marisa(M), slot_shoes)
|
||||
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/clothing/head/wizard/marisa(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
|
||||
@@ -896,7 +896,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/hgpiratecap(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
|
||||
@@ -2,45 +2,46 @@
|
||||
set category = "Debug"
|
||||
set name = "Show Air Report"
|
||||
|
||||
/*(!master_controller || !air_master)
|
||||
if(!master_controller || !air_master)
|
||||
alert(usr,"Master_controller or air_master not found.","Air Report")
|
||||
return 0
|
||||
return
|
||||
|
||||
var/active_groups = 0
|
||||
var/inactive_groups = 0
|
||||
var/active_tiles = 0
|
||||
for(var/datum/air_group/group in air_master.air_groups)
|
||||
if(group.group_processing)
|
||||
active_groups++
|
||||
else
|
||||
inactive_groups++
|
||||
active_tiles += group.members.len
|
||||
var/active_groups = air_master.active_zones.len
|
||||
var/inactive_groups = air_master.zones.len - active_groups
|
||||
|
||||
var/hotspots = 0
|
||||
for(var/obj/effect/hotspot/hotspot in world)
|
||||
for(var/obj/fire/hotspot in world)
|
||||
hotspots++
|
||||
|
||||
var/active_on_main_station = 0
|
||||
var/inactive_on_main_station = 0
|
||||
for(var/zone/zone in air_master.zones)
|
||||
var/turf/simulated/turf = locate() in zone.contents
|
||||
if(turf && turf.z == 1)
|
||||
if(zone.status)
|
||||
active_on_main_station++
|
||||
else
|
||||
inactive_on_main_station++
|
||||
|
||||
var/output = {"<B>AIR SYSTEMS REPORT</B><HR>
|
||||
<B>General Processing Data</B><BR>
|
||||
<B># of Groups:</B> [air_master.air_groups.len]<BR>
|
||||
Cycle: [air_master.current_cycle]<br>
|
||||
Groups: [air_master.zones.len]<BR>
|
||||
---- <I>Active:</I> [active_groups]<BR>
|
||||
---- <I>Inactive:</I> [inactive_groups]<BR>
|
||||
-------- <I>Tiles:</I> [active_tiles]<BR>
|
||||
<B># of Active Singletons:</B> [air_master.active_singletons.len]<BR>
|
||||
---- <I>Inactive:</I> [inactive_groups]<BR><br>
|
||||
---- <I>Active on station:</i> [active_on_main_station]<br>
|
||||
---- <i>Inactive on station:</i> [inactive_on_main_station]<br>
|
||||
<BR>
|
||||
<B>Special Processing Data</B><BR>
|
||||
<B>Hotspot Processing:</B> [hotspots]<BR>
|
||||
<B>High Temperature Processing:</B> [air_master.active_super_conductivity.len]<BR>
|
||||
<B>High Pressure Processing:</B> [air_master.high_pressure_delta.len] (not yet implemented)<BR>
|
||||
<BR>
|
||||
Hotspot Processing: [hotspots]<BR>
|
||||
<br>
|
||||
<B>Geometry Processing Data</B><BR>
|
||||
<B>Group Rebuild:</B> [air_master.groups_to_rebuild.len]<BR>
|
||||
<B>Tile Update:</B> [air_master.tiles_to_update.len]<BR>
|
||||
Tile Update: [air_master.tiles_to_update.len]<BR>
|
||||
"}
|
||||
|
||||
usr << browse(output,"window=airreport")
|
||||
feedback_add_details("admin_verb","SAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
|
||||
|
||||
/client/proc/air_status(turf/target as turf)
|
||||
set category = "Debug"
|
||||
set name = "Display Air Status"
|
||||
|
||||
@@ -161,6 +161,8 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /client/proc/disable_movement
|
||||
src.verbs += /client/proc/Zone_Info
|
||||
src.verbs += /client/proc/Test_ZAS_Connection
|
||||
src.verbs += /client/proc/ZoneTick
|
||||
src.verbs += /client/proc/TestZASRebuild
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
del(I)
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform)
|
||||
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)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/claymore(H), slot_l_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes)
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=orange>CENTCOMM[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
admins << msg
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
|
||||
@@ -125,7 +125,7 @@ var/global/sent_strike_team = 0
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
|
||||
R.set_frequency(1441)
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
if (leader_selected == 0)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform)
|
||||
else
|
||||
|
||||
@@ -131,7 +131,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
|
||||
R.set_frequency(SYND_FREQ) //Same frequency as the syndicate team in Nuke mode.
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes)
|
||||
if (!syndicate_leader_selected)
|
||||
|
||||
@@ -4,7 +4,7 @@ var/global/vox_tick = 1
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
|
||||
R.set_frequency(SYND_FREQ) //Same frequency as the syndicate team in Nuke mode.
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/vox/vox_robes(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/vox(src), slot_shoes) // REPLACE THESE WITH CODED VOX ALTERNATIVES.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
var/reload = 180
|
||||
name = "bluespace artillery control"
|
||||
icon_state = "control_boxp1"
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if(src.corpsegloves)
|
||||
M.equip_to_slot_or_del(new src.corpsegloves(M), slot_gloves)
|
||||
if(src.corpseradio)
|
||||
M.equip_to_slot_or_del(new src.corpseradio(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new src.corpseradio(M), slot_l_ear)
|
||||
if(src.corpseglasses)
|
||||
M.equip_to_slot_or_del(new src.corpseglasses(M), slot_glasses)
|
||||
if(src.corpsemask)
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
return null
|
||||
|
||||
if(IsGuestKey(key))
|
||||
alert(src,"Baystation12 doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
alert(src,"This server doesn't allow guest accounts to play. Please go to http://www.byond.com/ and register for a key.","Guest","OK")
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
if(config.resource_urls)
|
||||
src.preload_rsc = pick(config.resource_urls)
|
||||
else src.preload_rsc = 1 // If config.resource_urls is not set, preload like normal.
|
||||
|
||||
|
||||
src << "\red If the title screen is black, resources are still downloading. Please be patient until the title screen appears."
|
||||
|
||||
|
||||
@@ -241,6 +241,7 @@
|
||||
|
||||
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
|
||||
/client/proc/send_resources()
|
||||
// preload_vox() //Causes long delays with initial start window and subsequent windows when first logged in.
|
||||
getFiles(
|
||||
'nano/js/libraries.min.js',
|
||||
'nano/js/nano_update.js',
|
||||
@@ -248,6 +249,7 @@
|
||||
'nano/js/nano_base_helpers.js',
|
||||
'nano/css/shared.css',
|
||||
'nano/css/icons.css',
|
||||
'nano/templates/chem_dispenser.tmpl',
|
||||
'nano/templates/cryo.tmpl',
|
||||
'nano/images/uiBackground.png',
|
||||
'nano/images/uiIcons16.png',
|
||||
|
||||
@@ -35,12 +35,60 @@
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_EARS
|
||||
|
||||
/obj/item/clothing/ears/attack_hand(mob/user as mob)
|
||||
if (!user) return
|
||||
|
||||
if (src.loc != user || !istype(user,/mob/living/carbon/human))
|
||||
..()
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.l_ear != src && H.r_ear != src)
|
||||
..()
|
||||
return
|
||||
|
||||
if(!canremove)
|
||||
return
|
||||
|
||||
var/obj/item/clothing/ears/O
|
||||
if(slot_flags & SLOT_TWOEARS )
|
||||
O = (H.l_ear == src ? H.r_ear : H.l_ear)
|
||||
user.u_equip(O)
|
||||
if(!istype(src,/obj/item/clothing/ears/offear))
|
||||
del(O)
|
||||
O = src
|
||||
else
|
||||
O = src
|
||||
|
||||
user.u_equip(src)
|
||||
|
||||
if (O)
|
||||
user.put_in_hands(O)
|
||||
O.add_fingerprint(user)
|
||||
|
||||
if(istype(src,/obj/item/clothing/ears/offear))
|
||||
del(src)
|
||||
|
||||
/obj/item/clothing/ears/offear
|
||||
name = "Other ear"
|
||||
w_class = 5.0
|
||||
icon = 'icons/mob/screen1_Midnight.dmi'
|
||||
icon_state = "block"
|
||||
slot_flags = SLOT_EARS | SLOT_TWOEARS
|
||||
|
||||
New(var/obj/O)
|
||||
name = O.name
|
||||
desc = O.desc
|
||||
icon = O.icon
|
||||
icon_state = O.icon_state
|
||||
dir = O.dir
|
||||
|
||||
/obj/item/clothing/ears/earmuffs
|
||||
name = "earmuffs"
|
||||
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
||||
icon_state = "earmuffs"
|
||||
item_state = "earmuffs"
|
||||
|
||||
slot_flags = SLOT_EARS | SLOT_TWOEARS
|
||||
|
||||
//Glasses
|
||||
/obj/item/clothing/glasses
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
desc = "A rare collectable hat."
|
||||
|
||||
/obj/item/clothing/head/collectable/petehat
|
||||
name = "ultra rare Pete's hat!"
|
||||
desc = "It smells faintly of plasma"
|
||||
name = "ultra rare hat"
|
||||
desc = "an ultra rare hat. It commands a certain respect."
|
||||
icon_state = "petehat"
|
||||
|
||||
/obj/item/clothing/head/collectable/slime
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/clothing/mask/gas
|
||||
name = "gas mask"
|
||||
desc = "A face-covering mask that can be connected to an air supply."
|
||||
desc = "A face-covering mask that can be connected to an air supply. Filters harmful gases from the air."
|
||||
icon_state = "gas_alt"
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
|
||||
@@ -9,6 +9,7 @@
|
||||
gas_transfer_coefficient = 0.01
|
||||
permeability_coefficient = 0.01
|
||||
siemens_coefficient = 0.9
|
||||
var/gas_filter_strength = 1 //For gas mask filters
|
||||
|
||||
//Plague Dr suit can be found in clothing/suits/bio.dm
|
||||
/obj/item/clothing/mask/gas/plaguedoctor
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user