mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge tgstation r4633 into bs12_with_tgport
Conflicts: code/defines/obj/costume.dm code/game/gamemodes/cult/runes.dm code/game/machinery/computer/communications.dm code/game/machinery/telecomms/broadcaster.dm code/game/objects/structures/crates_lockers/closets/fitness.dm code/modules/mob/living/simple_animal/life.dm code/modules/mob/living/simple_animal/parrot.dm code/modules/power/power.dm code/modules/power/switch.dm Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
+17
-15
@@ -74,6 +74,7 @@
|
||||
#define FILE_DIR "code/game/objects/closets/secure"
|
||||
#define FILE_DIR "code/game/objects/effects"
|
||||
#define FILE_DIR "code/game/objects/effects/decals"
|
||||
#define FILE_DIR "code/game/objects/effects/decals/Cleanable"
|
||||
#define FILE_DIR "code/game/objects/effects/spawners"
|
||||
#define FILE_DIR "code/game/objects/items"
|
||||
#define FILE_DIR "code/game/objects/items/devices"
|
||||
@@ -321,6 +322,7 @@
|
||||
#include "code\datums\recipe.dm"
|
||||
#include "code\datums\spell.dm"
|
||||
#include "code\datums\sun.dm"
|
||||
#include "code\datums\supplypacks.dm"
|
||||
#include "code\datums\vote.dm"
|
||||
#include "code\datums\diseases\alien_embryo.dm"
|
||||
#include "code\datums\diseases\appendicitis.dm"
|
||||
@@ -367,17 +369,12 @@
|
||||
#include "code\defines\turf.dm"
|
||||
#include "code\defines\world.dm"
|
||||
#include "code\defines\area\Space Station 13 areas.dm"
|
||||
#include "code\defines\obj\closet.dm"
|
||||
#include "code\defines\obj\costume.dm"
|
||||
#include "code\defines\obj\decal.dm"
|
||||
#include "code\defines\obj\hydro.dm"
|
||||
#include "code\defines\obj\machinery.dm"
|
||||
#include "code\defines\obj\storage.dm"
|
||||
#include "code\defines\obj\supplypacks.dm"
|
||||
#include "code\defines\obj\toy.dm"
|
||||
#include "code\defines\obj\vending.dm"
|
||||
#include "code\defines\obj\weapon.dm"
|
||||
#include "code\defines\obj\window.dm"
|
||||
#include "code\defines\procs\AStar.dm"
|
||||
#include "code\defines\procs\captain_announce.dm"
|
||||
#include "code\defines\procs\church_name.dm"
|
||||
@@ -512,6 +509,7 @@
|
||||
#include "code\game\machinery\deployable.dm"
|
||||
#include "code\game\machinery\dispenser.dm"
|
||||
#include "code\game\machinery\door_control.dm"
|
||||
#include "code\game\machinery\doppler_array.dm"
|
||||
#include "code\game\machinery\flasher.dm"
|
||||
#include "code\game\machinery\Freezer.dm"
|
||||
#include "code\game\machinery\gateway.dm"
|
||||
@@ -649,12 +647,19 @@
|
||||
#include "code\game\objects\effects\landmarks.dm"
|
||||
#include "code\game\objects\effects\manifest.dm"
|
||||
#include "code\game\objects\effects\mines.dm"
|
||||
#include "code\game\objects\effects\misc.dm"
|
||||
#include "code\game\objects\effects\overlays.dm"
|
||||
#include "code\game\objects\effects\portals.dm"
|
||||
#include "code\game\objects\effects\signs.dm"
|
||||
#include "code\game\objects\effects\decals\blood.dm"
|
||||
#include "code\game\objects\effects\decals\cleanable.dm"
|
||||
#include "code\game\objects\effects\decals\contraband.dm"
|
||||
#include "code\game\objects\effects\decals\crayon.dm"
|
||||
#include "code\game\objects\effects\decals\misc.dm"
|
||||
#include "code\game\objects\effects\decals\remains.dm"
|
||||
#include "code\game\objects\effects\decals\Cleanable\aliens.dm"
|
||||
#include "code\game\objects\effects\decals\Cleanable\humans.dm"
|
||||
#include "code\game\objects\effects\decals\Cleanable\misc.dm"
|
||||
#include "code\game\objects\effects\decals\Cleanable\robots.dm"
|
||||
#include "code\game\objects\effects\spawners\bombspawner.dm"
|
||||
#include "code\game\objects\effects\spawners\gibspawner.dm"
|
||||
#include "code\game\objects\items\apc_frame.dm"
|
||||
@@ -794,24 +799,21 @@
|
||||
#include "code\game\objects\structures\crates_lockers\closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\crates.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\largecrate.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\bombsuit.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\emergency.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\coffin.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\crittercrate.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\fireaxe.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\firecloset.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\fitnesscloset.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\fitness.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\gimmick.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\gmcloset.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\janitor.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\kitchen.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\job_closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\l3closet.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\malfunction.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\nuclear.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\syndicate.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\thunderdome.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\utility_closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\wardrobe.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\bar.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\cargo.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\engineering.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\freezer.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\hydroponics.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\medical.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\personal.dm"
|
||||
|
||||
@@ -1,86 +1,14 @@
|
||||
//Inefficient as hell so don't copypasta this anywhere! It's only here as a tool for debugging
|
||||
//prints a map of the powernetworks on z-level 1
|
||||
/client/verb/print_powernets()
|
||||
set name = "print powernets"
|
||||
/*
|
||||
client/verb/powernets_debug()
|
||||
if(!holder) return
|
||||
var/ref_holder = "\ref[holder]"
|
||||
for(var/i=1,i<=powernets.len,i++)
|
||||
src << "<a href='?[ref_holder];adminplayervars=\ref[powernets[i]]'>[copytext("\ref[powernets[i]]",8,12)]</A>"
|
||||
|
||||
var/file = file("powernets_map.html")
|
||||
|
||||
var/list/grid[255][255]
|
||||
|
||||
var/list/checklist = list()
|
||||
for(var/obj/structure/cable/C in world)
|
||||
if(C.z != 1) continue
|
||||
if(C.x < 1 || C.x > 255) continue
|
||||
if(C.y < 1 || C.y > 255) continue
|
||||
grid[C.x][C.y] = C.netnum
|
||||
checklist |= C.netnum
|
||||
|
||||
sleep(1)
|
||||
file << "<font size='1'><tt>"
|
||||
for(var/netnum in checklist)
|
||||
file << "[netnum]<br>"
|
||||
|
||||
for(var/j=255, j>=1, j--)
|
||||
var/line = "<br>"
|
||||
for(var/i=1, i<=255, i++)
|
||||
switch(grid[i][j])
|
||||
if(null) line += " "
|
||||
if(0 to 9) line += "[grid[i][j]]"
|
||||
if(10) line += "a"
|
||||
if(11) line += "b"
|
||||
if(12) line += "c"
|
||||
if(13) line += "d"
|
||||
if(14) line += "e"
|
||||
if(15) line += "f"
|
||||
if(16) line += "g"
|
||||
if(17) line += "h"
|
||||
if(18) line += "i"
|
||||
if(19) line += "j"
|
||||
if(20) line += "k"
|
||||
if(21) line += "l"
|
||||
if(22) line += "m"
|
||||
if(23) line += "n"
|
||||
if(24) line += "o"
|
||||
if(25) line += "p"
|
||||
if(26) line += "q"
|
||||
if(27) line += "r"
|
||||
if(28) line += "s"
|
||||
if(29) line += "t"
|
||||
if(30) line += "u"
|
||||
if(31) line += "v"
|
||||
if(32) line += "w"
|
||||
if(33) line += "x"
|
||||
if(34) line += "y"
|
||||
if(35) line += "z"
|
||||
if(36) line += "A"
|
||||
if(37) line += "B"
|
||||
if(38) line += "C"
|
||||
if(39) line += "D"
|
||||
if(40) line += "E"
|
||||
if(41) line += "F"
|
||||
if(42) line += "G"
|
||||
if(43) line += "H"
|
||||
if(44) line += "I"
|
||||
if(45) line += "J"
|
||||
if(46) line += "K"
|
||||
if(47) line += "L"
|
||||
if(48) line += "M"
|
||||
if(49) line += "N"
|
||||
if(50) line += "O"
|
||||
if(51) line += "P"
|
||||
if(52) line += "Q"
|
||||
if(53) line += "R"
|
||||
if(54) line += "S"
|
||||
if(55) line += "T"
|
||||
if(56) line += "U"
|
||||
if(57) line += "V"
|
||||
if(58) line += "W"
|
||||
if(59) line += "X"
|
||||
if(60) line += "Y"
|
||||
if(61) line += "Z"
|
||||
else line += "#"
|
||||
|
||||
file << line
|
||||
file << "</tt></font>"
|
||||
src << "printed to powernets_map.html"
|
||||
src << browse(file)
|
||||
client/verb/powernet_overlays()
|
||||
for(var/obj/structure/cable/C in cable_list)
|
||||
C.maptext = "<font color='white'>[copytext("\ref[C.powernet]",8,12)]</font>"
|
||||
for(var/obj/machinery/power/M in machines)
|
||||
M.maptext = "<font color='white'>[copytext("\ref[M.powernet]",8,12)]</font>"
|
||||
*/
|
||||
|
||||
@@ -293,10 +293,10 @@ datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
|
||||
if(0 to 3)
|
||||
defcon++
|
||||
if(4)
|
||||
defcon = 5
|
||||
for(var/client/C in admin_list)
|
||||
if(C.holder)
|
||||
C << "<font color='red' size='2'><b>Warning. The Master Controller has not fired in the last [defcon*ticks_per_spin] ticks. Automatic restart in [ticks_per_spin] ticks.</b></font>"
|
||||
defcon = 5
|
||||
if(5)
|
||||
for(var/client/C in admin_list)
|
||||
if(C.holder)
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
emp_heavy = 5
|
||||
emp_light = 7
|
||||
emp_heavy = 6
|
||||
emp_light = 10
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/turf_teleport/blink
|
||||
name = "Blink"
|
||||
|
||||
+1
-1
@@ -200,7 +200,7 @@
|
||||
/obj/structure/cable
|
||||
level = 1
|
||||
anchored =1
|
||||
var/netnum = 0
|
||||
var/datum/powernet/powernet
|
||||
name = "power cable"
|
||||
desc = "A flexible superconducting cable for heavy-duty power transfer"
|
||||
icon = 'icons/obj/power_cond_red.dmi'
|
||||
|
||||
@@ -1,474 +0,0 @@
|
||||
/obj/structure/closet
|
||||
name = "closet"
|
||||
desc = "It's a basic storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "closed"
|
||||
density = 1
|
||||
flags = FPRINT
|
||||
var/icon_closed = "closed"
|
||||
var/icon_opened = "open"
|
||||
var/opened = 0
|
||||
var/welded = 0
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/lastbang
|
||||
var/storage_capacity = 20 //This is so that someone can't pack hundreds of items in a locker/crate
|
||||
//then open it in a populated area to crash clients.
|
||||
|
||||
/obj/structure/closet/acloset
|
||||
name = "strange closet"
|
||||
desc = "It looks alien!"
|
||||
icon_state = "acloset"
|
||||
icon_closed = "acloset"
|
||||
icon_opened = "aclosetopen"
|
||||
|
||||
/obj/structure/closet/cabinet
|
||||
name = "cabinet"
|
||||
desc = "Old will forever be in fashion."
|
||||
icon_state = "cabinet_closed"
|
||||
icon_closed = "cabinet_closed"
|
||||
icon_opened = "cabinet_open"
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
/obj/effect/spresent
|
||||
name = "strange present"
|
||||
desc = "It's a ... present?"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "strangepresent"
|
||||
density = 1
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/closet/gmcloset
|
||||
name = "formal closet"
|
||||
desc = "It's a storage unit for formal clothing."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/emcloset
|
||||
name = "emergency closet"
|
||||
desc = "It's a storage unit for emergency breathmasks and o2 tanks."
|
||||
icon_state = "emergency"
|
||||
icon_closed = "emergency"
|
||||
icon_opened = "emergencyopen"
|
||||
|
||||
/obj/structure/closet/emcloset/legacy
|
||||
|
||||
/obj/structure/closet/firecloset
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "firecloset"
|
||||
icon_closed = "firecloset"
|
||||
icon_opened = "fireclosetopen"
|
||||
|
||||
/obj/structure/closet/firecloset/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/hydrant //wall mounted fire closet
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "hydrant"
|
||||
icon_closed = "hydrant"
|
||||
icon_opened = "hydrant_open"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/obj/structure/closet/medical_wall //wall mounted medical closet
|
||||
name = "first-aid closet"
|
||||
desc = "It's wall-mounted storage unit for first aid supplies."
|
||||
icon_state = "medical_wall"
|
||||
icon_closed = "medical_wall"
|
||||
icon_opened = "medical_wall_open"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/obj/structure/closet/medical_wall/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/toolcloset
|
||||
name = "tool closet"
|
||||
desc = "It's a storage unit for tools."
|
||||
icon_state = "toolcloset"
|
||||
icon_closed = "toolcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
|
||||
/obj/structure/closet/radiation
|
||||
name = "radiation suit closet"
|
||||
desc = "It's a storage unit for rad-protective suits."
|
||||
icon_state = "radsuitcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_closed = "radsuitcloset"
|
||||
|
||||
/obj/structure/closet/jcloset
|
||||
name = "custodial closet"
|
||||
desc = "It's a storage unit for janitorial clothes and gear."
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/lawcloset
|
||||
name = "legal closet"
|
||||
desc = "It's a storage unit for courtroom apparel and items."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/boxinggloves
|
||||
name = "boxing gloves"
|
||||
desc = "It's a storage unit for gloves for use in the boxing ring."
|
||||
|
||||
/obj/structure/closet/masks
|
||||
name = "mask closet"
|
||||
desc = "IT'S A STORAGE UNIT FOR FIGHTER MASKS OLE!"
|
||||
|
||||
/obj/structure/closet/lasertag/red
|
||||
name = "red laser tag equipment"
|
||||
desc = "It's a storage unit for laser tag equipment."
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/lasertag/blue
|
||||
name = "blue laser tag equipment"
|
||||
desc = "It's a storage unit for laser tag equipment."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/athletic_mixed
|
||||
name = "athletic wardrobe"
|
||||
desc = "It's a storage unit for athletic wear."
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
icon_closed = "coffin"
|
||||
icon_opened = "coffin_open"
|
||||
|
||||
/obj/structure/closet/coffin/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/bombcloset
|
||||
name = "\improper EOD closet"
|
||||
desc = "It's a storage unit for explosion-protective suits."
|
||||
icon_state = "bombsuit"
|
||||
icon_closed = "bombsuit"
|
||||
icon_opened = "bombsuitopen"
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity
|
||||
name = "\improper EOD closet"
|
||||
desc = "It's a storage unit for explosion-protective suits."
|
||||
icon_state = "bombsuitsec"
|
||||
icon_closed = "bombsuitsec"
|
||||
icon_opened = "bombsuitsecopen"
|
||||
|
||||
/obj/structure/closet/l3closet
|
||||
name = "level-3 biohazard suit closet"
|
||||
desc = "It's a storage unit for level-3 biohazard gear."
|
||||
icon_state = "bio"
|
||||
icon_closed = "bio"
|
||||
icon_opened = "bioopen"
|
||||
|
||||
/obj/structure/closet/l3closet/general
|
||||
icon_state = "bio_general"
|
||||
icon_closed = "bio_general"
|
||||
icon_opened = "bio_generalopen"
|
||||
|
||||
/obj/structure/closet/l3closet/virology
|
||||
icon_state = "bio_virology"
|
||||
icon_closed = "bio_virology"
|
||||
icon_opened = "bio_virologyopen"
|
||||
|
||||
/obj/structure/closet/l3closet/security
|
||||
icon_state = "bio_security"
|
||||
icon_closed = "bio_security"
|
||||
icon_opened = "bio_securityopen"
|
||||
|
||||
/obj/structure/closet/l3closet/janitor
|
||||
icon_state = "bio_janitor"
|
||||
icon_closed = "bio_janitor"
|
||||
icon_opened = "bio_janitoropen"
|
||||
|
||||
/obj/structure/closet/l3closet/scientist
|
||||
icon_state = "bio_scientist"
|
||||
icon_closed = "bio_scientist"
|
||||
icon_opened = "bio_scientistopen"
|
||||
|
||||
/obj/structure/closet/syndicate
|
||||
name = "armoury closet"
|
||||
desc = "Why is this here?"
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
|
||||
/obj/structure/closet/syndicate/personal
|
||||
desc = "It's a storage unit for operative gear."
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for nuclear-operative gear."
|
||||
|
||||
// Inserting the gimmick clothing stuff here for generic items, IE Tacticool stuff
|
||||
|
||||
|
||||
/obj/structure/closet/gimmick
|
||||
name = "administrative supply closet"
|
||||
desc = "It's a storage unit for things that have no right being here."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/closet/gimmick/russian
|
||||
name = "russian surplus closet"
|
||||
desc = "It's a storage unit for Russian standard-issue surplus."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/gimmick/tacticool
|
||||
name = "tacticool gear closet"
|
||||
desc = "It's a storage unit for Tacticool gear."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/thunderdome
|
||||
name = "\improper Thunderdome closet"
|
||||
desc = "Everything you need!"
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred
|
||||
name = "red-team Thunderdome closet"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen
|
||||
name = "green-team Thunderdome closet"
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
|
||||
/obj/structure/closet/malf/suits
|
||||
desc = "It's a storage unit for operational gear."
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
|
||||
/obj/structure/closet/wardrobe
|
||||
name = "wardrobe"
|
||||
desc = "It's a storage unit for standard-issue Nanotrasen attire."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/wardrobe/black
|
||||
name = "black wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black
|
||||
name = "chapel wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-approved religious attire."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/green
|
||||
name = "green wardrobe"
|
||||
icon_state = "green"
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed
|
||||
name = "mixed wardrobe"
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/wardrobe/orange
|
||||
name = "prison wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
|
||||
icon_state = "orange"
|
||||
icon_closed = "orange"
|
||||
|
||||
/obj/structure/closet/wardrobe/pink
|
||||
name = "pink wardrobe"
|
||||
icon_state = "pink"
|
||||
icon_closed = "pink"
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/wardrobe/white
|
||||
name = "white wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs
|
||||
name = "Pajama wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white
|
||||
name = "toxins wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black
|
||||
name = "robotics wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white
|
||||
name = "chemistry wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white
|
||||
name = "genetics wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white
|
||||
name = "virology wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow
|
||||
name = "yellow wardrobe"
|
||||
icon_state = "wardrobe-y"
|
||||
icon_closed = "wardrobe-y"
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow
|
||||
name = "engineering wardrobe"
|
||||
icon_state = "yellow"
|
||||
icon_closed = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow
|
||||
name = "atmospherics wardrobe"
|
||||
icon_state = "yellow"
|
||||
icon_closed = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/grey
|
||||
name = "grey wardrobe"
|
||||
icon_state = "grey"
|
||||
icon_closed = "grey"
|
||||
|
||||
/obj/structure/closet/secure_closet
|
||||
name = "secure locker"
|
||||
desc = "It's an immobile card-locked storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "secure1"
|
||||
density = 1
|
||||
opened = 0
|
||||
var/locked = 1
|
||||
var/broken = 0
|
||||
var/large = 1
|
||||
icon_closed = "secure"
|
||||
var/icon_locked = "secure1"
|
||||
icon_opened = "secureopen"
|
||||
var/icon_broken = "securebroken"
|
||||
var/icon_off = "secureoff"
|
||||
wall_mounted = 0 //never solid (You can always pass over it)
|
||||
health = 200
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall
|
||||
name = "First Aid Closet"
|
||||
desc = "It's a secure wall-mounted storage unit for first aid supplies."
|
||||
icon_state = "medical_wall_locked"
|
||||
icon_closed = "medical_wall_unlocked"
|
||||
icon_locked = "medical_wall_locked"
|
||||
icon_opened = "medical_wall_open"
|
||||
icon_broken = "medical_wall_spark"
|
||||
icon_off = "medical_wall_off"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
req_access = list(access_medical)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/personal
|
||||
desc = "It's a secure locker for personell. The first card swiped gains control."
|
||||
name = "personal closet"
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
icon_locked = "cabinetdetective_locked"
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/patient
|
||||
name = "patient's closet"
|
||||
|
||||
/obj/structure/closet/secure_closet/wall
|
||||
name = "wall locker"
|
||||
req_access = list(access_security)
|
||||
icon_state = "wall-locker1"
|
||||
density = 1
|
||||
icon_closed = "wall-locker"
|
||||
icon_locked = "wall-locker1"
|
||||
icon_opened = "wall-lockeropen"
|
||||
icon_broken = "wall-lockerbroken"
|
||||
icon_off = "wall-lockeroff"
|
||||
|
||||
//too small to put a man in
|
||||
large = 0
|
||||
|
||||
/obj/structure/closet/secure_closet/wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/crate/critter
|
||||
name = "critter crate"
|
||||
desc = "A crate which can sustain life for a while."
|
||||
icon_state = "critter"
|
||||
icon_opened = "critteropen"
|
||||
icon_closed = "critter"
|
||||
@@ -1,310 +0,0 @@
|
||||
/obj/effect/decal/remains/human
|
||||
name = "remains"
|
||||
desc = "They look like human remains. They have a strange aura about them."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "remains"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/remains/xeno
|
||||
name = "remains"
|
||||
desc = "They look like the remains of something... alien. They have a strange aura about them."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "remainsxeno"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/remains/robot
|
||||
name = "remains"
|
||||
desc = "They look like the remains of something mechanical. They have a strange aura about them."
|
||||
gender = PLURAL
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "remainsrobot"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/point
|
||||
name = "arrow"
|
||||
desc = "It's an arrow hanging in mid-air. There may be a wizard about."
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = 16.0
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/cleanable
|
||||
var/list/random_icon_states = list()
|
||||
|
||||
//HUMANS
|
||||
|
||||
/obj/effect/decal/cleanable/ash
|
||||
name = "ashes"
|
||||
desc = "Ashes to ashes, dust to dust, and into space."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ash"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
desc = "It's red and gooey. Perhaps it's the chef's cooking?"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
//var/datum/disease2/disease/virus2 = null
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
|
||||
return
|
||||
if(src.loc && isturf(src.loc))
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
|
||||
if(B != src)
|
||||
del(B)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter
|
||||
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
icon_state = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
name = "gibs"
|
||||
desc = "They look bloody and gruesome."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 0
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "gibbl5"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibdown1","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/body
|
||||
random_icon_states = list("gibhead", "gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/limb
|
||||
random_icon_states = list("gibleg", "gibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/core
|
||||
random_icon_states = list("gibmid1", "gibmid2", "gibmid3")
|
||||
|
||||
//ALIENS
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood
|
||||
name = "xeno blood"
|
||||
desc = "It's green and acidic. It looks like... <i>blood?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
|
||||
Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xsplatter
|
||||
random_icon_states = list("xgibbl1", "xgibbl2", "xgibbl3", "xgibbl4", "xgibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs
|
||||
name = "xeno gibs"
|
||||
desc = "Gnarly..."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xgib1"
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/up
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/down
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibdown1","xgibdown1","xgibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/body
|
||||
random_icon_states = list("xgibhead", "xgibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/limb
|
||||
random_icon_states = list("xgibleg", "xgibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/core
|
||||
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
icon_state = "xtracks"
|
||||
random_icon_states = null
|
||||
|
||||
//ROBOTS
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris
|
||||
name = "robot debris"
|
||||
desc = "It's a useless heap of junk... <i>or is it?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 0
|
||||
layer = 2
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "gib1"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/limb
|
||||
random_icon_states = list("gibarm", "gibleg")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1") //2:7 is close enough to 1:4
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1") //2:7 is close enough to 1:4
|
||||
|
||||
/obj/effect/decal/cleanable/oil
|
||||
name = "motor oil"
|
||||
desc = "It's black and greasy. Looks like Beepsky made another mess."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "floor1"
|
||||
var/viruses = list()
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
|
||||
Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/oil/streak
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
|
||||
//OTHER
|
||||
|
||||
/obj/effect/decal/cleanable/generic
|
||||
name = "clutter"
|
||||
desc = "Someone should clean that up."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "shards"
|
||||
|
||||
/obj/effect/decal/cleanable/dirt
|
||||
name = "dirt"
|
||||
desc = "Someone should clean that up."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "dirt"
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
name = "glowing goo"
|
||||
desc = "Jeez. I hope that's not for lunch."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
luminosity = 1
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "greenglow"
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb
|
||||
name = "cobweb"
|
||||
desc = "Somebody should remove that."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 3
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "cobweb1"
|
||||
|
||||
/obj/effect/decal/cleanable/molten_item
|
||||
name = "gooey grey mass"
|
||||
desc = "It looks like a melted... something."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 3
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "molten"
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb2
|
||||
name = "cobweb"
|
||||
desc = "Somebody should remove that."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 3
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "cobweb2"
|
||||
|
||||
// Used for spray that you spray at walls, tables, hydrovats etc
|
||||
/obj/effect/decal/spraystill
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 50
|
||||
|
||||
//Vomit (sorry)
|
||||
/obj/effect/decal/cleanable/vomit
|
||||
name = "vomit"
|
||||
desc = "Gosh, how unpleasant."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "vomit_1"
|
||||
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
|
||||
var/list/viruses = list()
|
||||
|
||||
Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/tomato_smudge
|
||||
name = "tomato smudge"
|
||||
desc = "It's red."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
|
||||
|
||||
/obj/effect/decal/cleanable/egg_smudge
|
||||
name = "smashed egg"
|
||||
desc = "Seems like this one won't hatch."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
|
||||
|
||||
/obj/effect/decal/cleanable/pie_smudge //honk
|
||||
name = "smashed pie"
|
||||
desc = "It's pie cream from a cream pie."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_pie")
|
||||
@@ -330,6 +330,7 @@
|
||||
icon_state = "holopad0"
|
||||
var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
|
||||
var/last_request = 0 //to prevent request spam. ~Carn
|
||||
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
|
||||
|
||||
/obj/machinery/hologram/projector
|
||||
name = "hologram projector"
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
/obj/structure/window
|
||||
name = "window"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
desc = "A window."
|
||||
density = 1
|
||||
layer = 3.2//Just above doors
|
||||
var/health = 14.0
|
||||
var/ini_dir = null
|
||||
var/state = 0
|
||||
var/reinf = 0
|
||||
var/silicate = 0 // number of units of silicate
|
||||
var/icon/silicateIcon = null // the silicated icon
|
||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||
anchored = 1.0
|
||||
flags = ON_BORDER
|
||||
|
||||
// Prefab windows to make it easy...
|
||||
|
||||
|
||||
|
||||
// Basic
|
||||
|
||||
/obj/structure/window/basic
|
||||
icon_state = "window"
|
||||
|
||||
// Reinforced
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
reinf = 1
|
||||
icon_state = "rwindow"
|
||||
name = "reinforced window"
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
name = "tinted window"
|
||||
icon_state = "twindow"
|
||||
opacity = 1
|
||||
|
||||
/obj/structure/window/reinforced/tinted/frosted
|
||||
icon_state = "fwindow"
|
||||
name = "frosted window"
|
||||
@@ -168,6 +168,10 @@
|
||||
if(!istype(T))
|
||||
return
|
||||
var/list/hear = list()
|
||||
|
||||
if(!T)
|
||||
return hear
|
||||
|
||||
var/list/range = hear(R, T)
|
||||
|
||||
for(var/atom/A in range)
|
||||
|
||||
@@ -71,6 +71,10 @@
|
||||
else non_whitespace = 1
|
||||
if(non_whitespace) return text //only accepts the text if it has some non-spaces
|
||||
|
||||
// Used to get a sanitized input.
|
||||
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
var/name = input(user, message, title, default)
|
||||
return strip_html_simple(name, max_length)
|
||||
|
||||
//Filters out undesirable characters from names
|
||||
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
|
||||
|
||||
@@ -7,18 +7,20 @@
|
||||
..()
|
||||
// locate and store the motioncamera
|
||||
spawn (20) // spawn on a delay to let turfs/objs load
|
||||
for (var/obj/machinery/camera/motion/M in src)
|
||||
motioncamera = M
|
||||
return
|
||||
for (var/obj/machinery/camera/M in src)
|
||||
if(M.isMotion())
|
||||
motioncamera = M
|
||||
M.area_motion = src
|
||||
return
|
||||
return
|
||||
|
||||
/area/ai_monitored/Entered(atom/movable/O)
|
||||
..()
|
||||
if (istype(O, /mob) && motioncamera)
|
||||
if (ismob(O) && motioncamera)
|
||||
motioncamera.newTarget(O)
|
||||
|
||||
/area/ai_monitored/Exited(atom/movable/O)
|
||||
if (istype(O, /mob) && motioncamera)
|
||||
if (ismob(O) && motioncamera)
|
||||
motioncamera.lostTarget(O)
|
||||
|
||||
|
||||
|
||||
@@ -87,15 +87,9 @@
|
||||
makepowernets()
|
||||
|
||||
sun = new /datum/sun()
|
||||
|
||||
vote = new /datum/vote()
|
||||
|
||||
// coffinhandler = new /datum/coffinhandler()
|
||||
|
||||
radio_controller = new /datum/controller/radio()
|
||||
//main_hud1 = new /obj/hud()
|
||||
data_core = new /obj/effect/datacore()
|
||||
|
||||
paiController = new /datum/paiController()
|
||||
|
||||
..()
|
||||
@@ -118,8 +112,9 @@
|
||||
|
||||
socket_talk = new /datum/socket_talk()
|
||||
master_controller = new /datum/controller/game_controller()
|
||||
spawn(-1) master_controller.setup()
|
||||
lighting_controller.Initialize()
|
||||
spawn(-1)
|
||||
master_controller.setup()
|
||||
lighting_controller.Initialize()
|
||||
return
|
||||
|
||||
//Crispy fullban
|
||||
|
||||
@@ -513,7 +513,7 @@ var/list/sacrificed = list()
|
||||
// returns 0 if the rune is not used. returns 1 if the rune is used.
|
||||
communicate()
|
||||
. = 1 // Default output is 1. If the rune is deleted it will return 1
|
||||
var/input = copytext(sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null),1,MAX_MESSAGE_LEN)
|
||||
var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")
|
||||
if(!input)
|
||||
if (istype(src))
|
||||
fizzle()
|
||||
@@ -524,14 +524,14 @@ var/list/sacrificed = list()
|
||||
usr.say("O bidai nabora se[pick("'","`")]sma!")
|
||||
else
|
||||
usr.whisper("O bidai nabora se[pick("'","`")]sma!")
|
||||
var/input_s = sanitize(input)
|
||||
|
||||
if(istype(src,/obj/effect/rune))
|
||||
usr.say("[input]")
|
||||
else
|
||||
usr.whisper("[input]")
|
||||
for(var/datum/mind/H in ticker.mode.cult)
|
||||
if (H.current)
|
||||
H.current << "\red \b [input_s]"
|
||||
H.current << "\red \b [input]"
|
||||
del(src)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -152,13 +152,23 @@ rcd light flash thingy on matter drain
|
||||
if(UC.uses > 0)
|
||||
if(C.assembly)
|
||||
var/upgraded = 0
|
||||
|
||||
if(!C.isXRay())
|
||||
C.upgradeXRay()
|
||||
//Update what it can see.
|
||||
cameranet.updateVisibility(C)
|
||||
upgraded = 1
|
||||
|
||||
if(!C.isEmpProof())
|
||||
C.upgradeEmpProof()
|
||||
upgraded = 1
|
||||
|
||||
if(!C.isMotion())
|
||||
C.upgradeMotion()
|
||||
upgraded = 1
|
||||
// Add it to machines that process
|
||||
machines |= src
|
||||
|
||||
if(upgraded)
|
||||
UC.uses --
|
||||
C.visible_message("<span class='notice'>\icon[src] *beep*</span>")
|
||||
@@ -303,7 +313,7 @@ rcd light flash thingy on matter drain
|
||||
already = 1
|
||||
if (!already)
|
||||
usr.verbs += /client/proc/upgrade_camera
|
||||
src.temp = "Upgrades a camera to have X-Ray vision and be EMP-Proof. 10 uses."
|
||||
src.temp = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 10 uses."
|
||||
usr:current_modules += new /datum/AI_Module/small/upgrade_camera
|
||||
else src.temp = "Ten additional uses added to ReCam module."
|
||||
src.processing_time -= 15
|
||||
|
||||
@@ -353,11 +353,9 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
del(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
|
||||
src.created_name = t
|
||||
@@ -43,8 +43,6 @@
|
||||
|
||||
var/auto_patrol = 0 // set to make bot automatically patrol
|
||||
|
||||
var/obj/machinery/camera/cam //Camera for the AI to find them I guess
|
||||
|
||||
var/beacon_freq = 1445 // navigation beacon frequency
|
||||
var/control_freq = 1447 // bot control frequency
|
||||
|
||||
@@ -81,9 +79,7 @@
|
||||
spawn(3)
|
||||
src.botcard = new /obj/item/weapon/card/id(src)
|
||||
src.botcard.access = get_access("Detective")
|
||||
src.cam = new /obj/machinery/camera(src)
|
||||
src.cam.c_tag = src.name
|
||||
src.cam.network = "SS13"
|
||||
|
||||
if(radio_controller)
|
||||
radio_controller.add_object(src, control_freq, filter = RADIO_SECBOT)
|
||||
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
|
||||
@@ -854,8 +850,7 @@ Auto Patrol: []"},
|
||||
|
||||
|
||||
/obj/machinery/bot/ed209/emp_act(severity)
|
||||
if (cam)
|
||||
cam.emp_act(severity)
|
||||
|
||||
if(severity==2 && prob(70))
|
||||
..(severity-1)
|
||||
else
|
||||
@@ -896,8 +891,7 @@ Auto Patrol: []"},
|
||||
..()
|
||||
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
created_name = t
|
||||
|
||||
@@ -425,8 +425,7 @@
|
||||
del(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
@@ -445,8 +444,8 @@
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
req_access =list(access_medical)
|
||||
var/stunned = 0 //It can be stunned by tasers. Delicate circuits.
|
||||
//var/emagged = 0
|
||||
var/obj/machinery/camera/cam = null
|
||||
var/list/botcard_access = list(access_medical, access_morgue, access_genetics, access_robotics)
|
||||
var/obj/item/weapon/reagent_containers/glass/reagent_glass = null //Can be set to draw from this for reagents.
|
||||
var/skin = null //Set to "tox", "ointment" or "o2" for the other two firstaid kits.
|
||||
@@ -75,9 +74,6 @@
|
||||
src.botcard.access = get_access("Medical Doctor")
|
||||
else
|
||||
src.botcard.access = src.botcard_access
|
||||
src.cam = new /obj/machinery/camera(src)
|
||||
src.cam.c_tag = src.name
|
||||
src.cam.network = "SS13"
|
||||
|
||||
/obj/machinery/bot/medbot/turn_on()
|
||||
. = ..()
|
||||
@@ -456,11 +452,6 @@
|
||||
src.stunned = min(stunned+10,20)
|
||||
..()
|
||||
|
||||
/obj/machinery/bot/medbot/emp_act(severity)
|
||||
if (cam)
|
||||
cam.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/machinery/bot/medbot/explode()
|
||||
src.on = 0
|
||||
for(var/mob/O in hearers(src, null))
|
||||
@@ -568,13 +559,11 @@
|
||||
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
|
||||
src.created_name = t
|
||||
else
|
||||
switch(build_step)
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
|
||||
var/auto_patrol = 0 // set to make bot automatically patrol
|
||||
|
||||
var/obj/machinery/camera/cam //Camera for the AI to find them I guess
|
||||
|
||||
var/beacon_freq = 1445 // navigation beacon frequency
|
||||
var/control_freq = 1447 // bot control frequency
|
||||
|
||||
@@ -77,9 +75,6 @@
|
||||
spawn(3)
|
||||
src.botcard = new /obj/item/weapon/card/id(src)
|
||||
src.botcard.access = get_access("Detective")
|
||||
src.cam = new /obj/machinery/camera(src)
|
||||
src.cam.c_tag = src.name
|
||||
src.cam.network = "SS13"
|
||||
if(radio_controller)
|
||||
radio_controller.add_object(src, control_freq, filter = RADIO_SECBOT)
|
||||
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
|
||||
@@ -702,11 +697,6 @@ Auto Patrol: []"},
|
||||
src.target = user
|
||||
src.mode = SECBOT_HUNT
|
||||
|
||||
/obj/machinery/bot/secbot/emp_act(severity)
|
||||
if(cam)
|
||||
cam.emp_act(severity)
|
||||
..()
|
||||
|
||||
//Secbot Construction
|
||||
|
||||
/obj/item/clothing/head/helmet/attackby(var/obj/item/device/assembly/signaler/S, mob/user as mob)
|
||||
@@ -764,11 +754,9 @@ Auto Patrol: []"},
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
|
||||
src.created_name = t
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
var/list/motionTargets = list()
|
||||
var/detectTime = 0
|
||||
var/locked = 1
|
||||
var/area/ai_monitored/area_motion = null
|
||||
var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm()
|
||||
|
||||
|
||||
/obj/machinery/camera/process()
|
||||
@@ -12,11 +13,17 @@
|
||||
return
|
||||
if (detectTime > 0)
|
||||
var/elapsed = world.time - detectTime
|
||||
if (elapsed > 300)
|
||||
if (elapsed > alarm_delay)
|
||||
triggerAlarm()
|
||||
else if (detectTime == -1)
|
||||
for (var/mob/target in motionTargets)
|
||||
if (target.stat == 2) lostTarget(target)
|
||||
// If not detecting with motion camera...
|
||||
if (!area_motion)
|
||||
// See if the camera is still in range
|
||||
if(!in_range(src, target))
|
||||
// If they aren't in range, lose the target.
|
||||
lostTarget(target)
|
||||
|
||||
/obj/machinery/camera/proc/newTarget(var/mob/target)
|
||||
if (istype(target, /mob/living/silicon/ai)) return 0
|
||||
@@ -46,3 +53,9 @@
|
||||
detectTime = -1
|
||||
return 1
|
||||
|
||||
/obj/machinery/camera/HasProximity(atom/movable/AM as mob|obj)
|
||||
// Motion cameras outside of an "ai monitored" area will use this to detect stuff.
|
||||
if (!area_motion)
|
||||
if(isliving(AM))
|
||||
newTarget(AM)
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
if(U.eyeobj)
|
||||
U.eyeobj.setLoc(get_turf(target))
|
||||
else
|
||||
core()
|
||||
view_core()
|
||||
return
|
||||
sleep(10)
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
if("announce")
|
||||
if(src.authenticated==2)
|
||||
if(message_cooldown) return
|
||||
var/input = copytext(strip_html_simple(input(usr, "Please choose a message to announce to the station crew.", "What?", "")),1,MAX_MESSAGE_LEN)
|
||||
var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain
|
||||
@@ -177,14 +177,14 @@
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = copytext(sanitize(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.", "")),1,MAX_MESSAGE_LEN)
|
||||
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.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Centcomm_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
log_say("[key_name(usr)] has sent Centcomm a message: [input]") //BS12 EDIT Fix for comms console never cooling down
|
||||
log_say("[key_name(usr)] has made a Centcomm announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(50)//One minute cooldown, nah 5 seconds
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
|
||||
|
||||
@@ -194,14 +194,14 @@
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = copytext(sanitize(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.", "")),1,MAX_MESSAGE_LEN)
|
||||
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.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
log_say("[key_name(usr)] has sent the Syndicate a message: [input]")
|
||||
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(50)//One minute cooldown, nah 5 seconds
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
|
||||
if("RestoreBackup")
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
var/list/doppler_arrays = list()
|
||||
|
||||
/obj/machinery/doppler_array
|
||||
name = "tachyon-doppler array"
|
||||
desc = "A highly precise directional sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array."
|
||||
|
||||
|
||||
/obj/machinery/doppler_array/New()
|
||||
doppler_arrays += src
|
||||
|
||||
/obj/machinery/doppler_array/Del()
|
||||
doppler_arrays -= src
|
||||
|
||||
/obj/machinery/doppler_array/process()
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range,var/took)
|
||||
if(stat & NOPOWER) return
|
||||
if(z != z0) return
|
||||
|
||||
var/dx = abs(x0-x)
|
||||
var/dy = abs(y0-y)
|
||||
var/distance
|
||||
var/direct
|
||||
|
||||
if(dx > dy)
|
||||
distance = dx
|
||||
if(x0 > x) direct = EAST
|
||||
else direct = WEST
|
||||
else
|
||||
distance = dy
|
||||
if(y0 > y) direct = NORTH
|
||||
else direct = SOUTH
|
||||
|
||||
if(distance > 100) return
|
||||
if(!(direct & dir)) return
|
||||
|
||||
var/message = "Explosive disturbance detected - Epicenter at: grid ([x0],[y0]). Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range]. Temporal displacement of tachyons: [took]seconds."
|
||||
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("<span class='game say'><span class='name'>[src]</span> states coldly, \"[message]\"",2)
|
||||
|
||||
|
||||
/obj/machinery/doppler_array/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
else
|
||||
if( powered() )
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
stat |= NOPOWER
|
||||
@@ -12,6 +12,12 @@ Possible to do for anyone motivated enough:
|
||||
Itegrate EMP effect to disable the unit.
|
||||
*/
|
||||
|
||||
// HOLOPAD MODE
|
||||
// 0 = RANGE BASED
|
||||
// 1 = AREA BASED
|
||||
var/const/HOLOPAD_MODE = 1
|
||||
|
||||
|
||||
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
|
||||
if(!istype(user))
|
||||
return
|
||||
@@ -72,7 +78,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
hologram.mouse_opacity = 0//So you can't click on it.
|
||||
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
hologram.anchored = 1//So space wind cannot drag it.
|
||||
hologram.name = "AI hologram"//If someone decides to right click.
|
||||
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
|
||||
hologram.SetLuminosity(2) //hologram lighting
|
||||
SetLuminosity(2) //pad lighting
|
||||
icon_state = "holopad1"
|
||||
@@ -94,12 +100,28 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
|
||||
/obj/machinery/hologram/holopad/process()
|
||||
if(hologram)//If there is a hologram.
|
||||
if(master && !master.stat && master.client && master.eyeobj.loc == src.loc)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
|
||||
if(master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
|
||||
if(!(stat & NOPOWER))//If the machine has power.
|
||||
return 1
|
||||
if((HOLOPAD_MODE == 0 && (get_dist(master.eyeobj, src) <= holo_range)))
|
||||
return 1
|
||||
|
||||
else if (HOLOPAD_MODE == 1)
|
||||
|
||||
var/area/holo_area = get_area(src)
|
||||
var/area/eye_area = get_area(master.eyeobj)
|
||||
|
||||
if(eye_area in holo_area.master.related)
|
||||
return 1
|
||||
|
||||
clear_holo()//If not, we want to get rid of the hologram.
|
||||
return 1
|
||||
|
||||
/obj/machinery/hologram/holopad/proc/move_hologram()
|
||||
if(hologram)
|
||||
step_to(hologram, master.eyeobj) // So it turns.
|
||||
hologram.loc = get_turf(master.eyeobj)
|
||||
return 1
|
||||
|
||||
/obj/machinery/hologram/power_change()
|
||||
if (powered())
|
||||
stat &= ~NOPOWER
|
||||
|
||||
@@ -358,19 +358,15 @@
|
||||
power = 0
|
||||
return 0
|
||||
var/turf/T = src.loc
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
var/net
|
||||
if (C)
|
||||
net = C.netnum // find the powernet of the connected cable
|
||||
|
||||
if(!net)
|
||||
power = 0
|
||||
return 0
|
||||
var/datum/powernet/PN = powernets[net] // find the powernet. Magic code, voodoo code.
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
var/datum/powernet/PN
|
||||
if(C) PN = C.powernet // find the powernet of the connected cable
|
||||
|
||||
if(!PN)
|
||||
power = 0
|
||||
return 0
|
||||
|
||||
var/surplus = max(PN.avail-PN.load, 0)
|
||||
var/shieldload = min(rand(50,200), surplus)
|
||||
if(shieldload==0 && !storedpower) // no cable or no power, and no power stored
|
||||
|
||||
@@ -38,9 +38,10 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
|
||||
if(signal.data["message"])
|
||||
|
||||
// Prevents massive radio spam
|
||||
if("[signal.data["message"]]:[signal.data["realname"]]:[listening_level]" in recentmessages)
|
||||
var/signal_message = "[signal.data["message"]]:[signal.data["realname"]]:[listening_level]"
|
||||
if(signal_message in recentmessages)
|
||||
return
|
||||
recentmessages.Add("[signal.data["message"]]:[signal.data["realname"]]:[listening_level]")
|
||||
recentmessages.Add(signal_message)
|
||||
|
||||
signal.data["done"] = 1 // mark the signal as being broadcasted
|
||||
|
||||
@@ -88,7 +89,7 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"], signal.data["vname"], 4, signal.data["compression"], listening_level)
|
||||
|
||||
spawn(5)
|
||||
spawn(10)
|
||||
recentmessages = list()
|
||||
|
||||
/* --- Do a snazzy animation! --- */
|
||||
@@ -358,11 +359,7 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
|
||||
|
||||
// --- Filter the message; place it in quotes apply a verb ---
|
||||
|
||||
var/quotedmsg = "\"" + message + "\"" //BS12 EDIT For Arrivals Computer
|
||||
if(job == "Automated Announcement")
|
||||
quotedmsg = message
|
||||
else if(M)
|
||||
quotedmsg = M.say_quote(message)
|
||||
var/quotedmsg = M.say_quote(message)
|
||||
|
||||
// --- This following recording is intended for research and feedback in the use of department radio channels ---
|
||||
|
||||
|
||||
@@ -365,23 +365,21 @@
|
||||
NC.d1 = 0
|
||||
NC.d2 = fdirn
|
||||
NC.updateicon()
|
||||
var/netnum
|
||||
|
||||
var/datum/powernet/PN
|
||||
if(last_piece && last_piece.d2 != chassis.dir)
|
||||
last_piece.d1 = min(last_piece.d2, chassis.dir)
|
||||
last_piece.d2 = max(last_piece.d2, chassis.dir)
|
||||
last_piece.updateicon()
|
||||
netnum = last_piece.netnum
|
||||
if(netnum)
|
||||
NC.netnum = netnum
|
||||
PN = powernets[netnum]
|
||||
else
|
||||
PN = last_piece.powernet
|
||||
|
||||
if(!PN)
|
||||
PN = new()
|
||||
PN.number = powernets.len + 1
|
||||
powernets += PN
|
||||
NC.netnum = PN.number
|
||||
NC.powernet = PN
|
||||
PN.cables += NC
|
||||
NC.mergeConnectedNetworks(NC.d2)
|
||||
|
||||
//NC.mergeConnectedNetworksOnTurf()
|
||||
last_piece = NC
|
||||
return 1
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood
|
||||
name = "xeno blood"
|
||||
desc = "It's green and acidic. It looks like... <i>blood?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
|
||||
Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/xenoblood/b = new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
b.viruses += D
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xsplatter
|
||||
random_icon_states = list("xgibbl1", "xgibbl2", "xgibbl3", "xgibbl4", "xgibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs
|
||||
name = "xeno gibs"
|
||||
desc = "Gnarly..."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xgib1"
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/up
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/down
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibdown1","xgibdown1","xgibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/body
|
||||
random_icon_states = list("xgibhead", "xgibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/limb
|
||||
random_icon_states = list("xgibleg", "xgibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/core
|
||||
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
icon_state = "xtracks"
|
||||
random_icon_states = null
|
||||
@@ -0,0 +1,74 @@
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
desc = "It's red and gooey. Perhaps it's the chef's cooking?"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
|
||||
return
|
||||
if(src.loc && isturf(src.loc))
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
|
||||
if(B != src)
|
||||
del(B)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter
|
||||
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
icon_state = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
name = "gibs"
|
||||
desc = "They look bloody and gruesome."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 0
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "gibbl5"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibdown1","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/body
|
||||
random_icon_states = list("gibhead", "gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/limb
|
||||
random_icon_states = list("gibleg", "gibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/core
|
||||
random_icon_states = list("gibmid1", "gibmid2", "gibmid3")
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
b.viruses += D
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
@@ -0,0 +1,117 @@
|
||||
/obj/effect/decal/cleanable/generic
|
||||
name = "clutter"
|
||||
desc = "Someone should clean that up."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "shards"
|
||||
|
||||
/obj/effect/decal/cleanable/ash
|
||||
name = "ashes"
|
||||
desc = "Ashes to ashes, dust to dust, and into space."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ash"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(1200)// 2 minutes
|
||||
del(src)
|
||||
|
||||
/obj/effect/decal/cleanable/dirt
|
||||
name = "dirt"
|
||||
desc = "Someone should clean that up."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "dirt"
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
name = "glowing goo"
|
||||
desc = "Jeez. I hope that's not for lunch."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
luminosity = 1
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "greenglow"
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb
|
||||
name = "cobweb"
|
||||
desc = "Somebody should remove that."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 3
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "cobweb1"
|
||||
|
||||
/obj/effect/decal/cleanable/molten_item
|
||||
name = "gooey grey mass"
|
||||
desc = "It looks like a melted... something."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 3
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "molten"
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb2
|
||||
name = "cobweb"
|
||||
desc = "Somebody should remove that."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 3
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "cobweb2"
|
||||
|
||||
//Vomit (sorry)
|
||||
/obj/effect/decal/cleanable/vomit
|
||||
name = "vomit"
|
||||
desc = "Gosh, how unpleasant."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "vomit_1"
|
||||
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
|
||||
var/list/viruses = list()
|
||||
|
||||
Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/tomato_smudge
|
||||
name = "tomato smudge"
|
||||
desc = "It's red."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
|
||||
|
||||
/obj/effect/decal/cleanable/egg_smudge
|
||||
name = "smashed egg"
|
||||
desc = "Seems like this one won't hatch."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
|
||||
|
||||
/obj/effect/decal/cleanable/pie_smudge //honk
|
||||
name = "smashed pie"
|
||||
desc = "It's pie cream from a cream pie."
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_pie")
|
||||
@@ -0,0 +1,57 @@
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris
|
||||
name = "robot debris"
|
||||
desc = "It's a useless heap of junk... <i>or is it?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 0
|
||||
layer = 2
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "gib1"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
if (prob(40))
|
||||
/*var/obj/effect/decal/cleanable/oil/o =*/
|
||||
new /obj/effect/decal/cleanable/oil/streak(src.loc)
|
||||
else if (prob(10))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/limb
|
||||
random_icon_states = list("gibarm", "gibleg")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1") //2:7 is close enough to 1:4
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1") //2:7 is close enough to 1:4
|
||||
|
||||
/obj/effect/decal/cleanable/oil
|
||||
name = "motor oil"
|
||||
desc = "It's black and greasy. Looks like Beepsky made another mess."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "floor1"
|
||||
var/viruses = list()
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
|
||||
Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/oil/streak
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
@@ -1,64 +0,0 @@
|
||||
/obj/effect/decal/cleanable/New()
|
||||
if (random_icon_states && length(src.random_icon_states) > 0)
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
..()
|
||||
/*
|
||||
/obj/effect/decal/cleanable/blood/burn(fi_amount)
|
||||
if(fi_amount > 900000.0)
|
||||
src.virus = null
|
||||
sleep(11)
|
||||
del(src)
|
||||
return
|
||||
*/
|
||||
|
||||
//Gibs.spread proc in gibs.dm
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
b.viruses += D
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/xenoblood/b = new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
b.viruses += D
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
if (prob(40))
|
||||
/*var/obj/effect/decal/cleanable/oil/o =*/
|
||||
new /obj/effect/decal/cleanable/oil/streak(src.loc)
|
||||
else if (prob(10))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
|
||||
// not a great place for it, but as good as any
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(1200) // 2 minutes
|
||||
del(src)
|
||||
@@ -0,0 +1,7 @@
|
||||
/obj/effect/decal/cleanable
|
||||
var/list/random_icon_states = list()
|
||||
|
||||
/obj/effect/decal/cleanable/New()
|
||||
if (random_icon_states && length(src.random_icon_states) > 0)
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
..()
|
||||
@@ -0,0 +1,13 @@
|
||||
/obj/effect/decal/point
|
||||
name = "arrow"
|
||||
desc = "It's an arrow hanging in mid-air. There may be a wizard about."
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = 16.0
|
||||
anchored = 1
|
||||
|
||||
// Used for spray that you spray at walls, tables, hydrovats etc
|
||||
/obj/effect/decal/spraystill
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 50
|
||||
@@ -0,0 +1,23 @@
|
||||
/obj/effect/decal/remains/human
|
||||
name = "remains"
|
||||
desc = "They look like human remains. They have a strange aura about them."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "remains"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/remains/xeno
|
||||
name = "remains"
|
||||
desc = "They look like the remains of something... alien. They have a strange aura about them."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "remainsxeno"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/remains/robot
|
||||
name = "remains"
|
||||
desc = "They look like the remains of something mechanical. They have a strange aura about them."
|
||||
gender = PLURAL
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "remainsrobot"
|
||||
anchored = 1
|
||||
@@ -9,4 +9,140 @@
|
||||
name = "start"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x"
|
||||
anchored = 1.0
|
||||
anchored = 1.0
|
||||
|
||||
|
||||
//Costume spawner landmarks
|
||||
|
||||
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
|
||||
|
||||
var/list/options = typesof(/obj/effect/landmark/costume)
|
||||
var/PICK= options[rand(1,options.len)]
|
||||
new PICK(src.loc)
|
||||
del(src)
|
||||
|
||||
//SUBCLASSES. Spawn a bunch of items and disappear likewise
|
||||
/obj/effect/landmark/costume/chicken/New()
|
||||
new /obj/item/clothing/suit/chickensuit(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/gladiator/New()
|
||||
new /obj/item/clothing/under/gladiator(src.loc)
|
||||
new /obj/item/clothing/head/helmet/gladiator(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/madscientist/New()
|
||||
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
|
||||
new /obj/item/clothing/head/flatcap(src.loc)
|
||||
new /obj/item/clothing/suit/labcoat/mad(src.loc)
|
||||
new /obj/item/clothing/glasses/gglasses(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/elpresidente/New()
|
||||
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
|
||||
new /obj/item/clothing/head/flatcap(src.loc)
|
||||
new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
|
||||
new /obj/item/clothing/shoes/jackboots(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/nyangirl/New()
|
||||
new /obj/item/clothing/under/schoolgirl(src.loc)
|
||||
new /obj/item/clothing/head/kitty(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/maid/New()
|
||||
new /obj/item/clothing/under/blackskirt(src.loc)
|
||||
var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears )
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/glasses/blindfold(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/butler/New()
|
||||
new /obj/item/clothing/suit/wcoat(src.loc)
|
||||
new /obj/item/clothing/under/suit_jacket(src.loc)
|
||||
new /obj/item/clothing/head/that(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/scratch/New()
|
||||
new /obj/item/clothing/gloves/white(src.loc)
|
||||
new /obj/item/clothing/shoes/white(src.loc)
|
||||
new /obj/item/clothing/under/scratch(src.loc)
|
||||
if (prob(30))
|
||||
new /obj/item/clothing/head/cueball(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/highlander/New()
|
||||
new /obj/item/clothing/under/kilt(src.loc)
|
||||
new /obj/item/clothing/head/beret(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/prig/New()
|
||||
new /obj/item/clothing/suit/wcoat(src.loc)
|
||||
new /obj/item/clothing/glasses/monocle(src.loc)
|
||||
var/CHOICE= pick( /obj/item/clothing/head/bowler, /obj/item/clothing/head/that)
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/shoes/black(src.loc)
|
||||
new /obj/item/weapon/cane(src.loc)
|
||||
new /obj/item/clothing/under/sl_suit(src.loc)
|
||||
new /obj/item/clothing/mask/fakemoustache(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/plaguedoctor/New()
|
||||
new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(src.loc)
|
||||
new /obj/item/clothing/head/plaguedoctorhat(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/nightowl/New()
|
||||
new /obj/item/clothing/under/owl(src.loc)
|
||||
new /obj/item/clothing/mask/owl_mask(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/waiter/New()
|
||||
new /obj/item/clothing/under/waiter(src.loc)
|
||||
var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/suit/apron(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/pirate/New()
|
||||
new /obj/item/clothing/under/pirate(src.loc)
|
||||
new /obj/item/clothing/suit/pirate(src.loc)
|
||||
var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana )
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/glasses/eyepatch(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/commie/New()
|
||||
new /obj/item/clothing/under/soviet(src.loc)
|
||||
new /obj/item/clothing/head/ushanka(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/imperium_monk/New()
|
||||
new /obj/item/clothing/suit/imperium_monk(src.loc)
|
||||
if (prob(25))
|
||||
new /obj/item/clothing/mask/gas/cyborg(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/holiday_priest/New()
|
||||
new /obj/item/clothing/suit/holidaypriest(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/marisawizard/fake/New()
|
||||
new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
|
||||
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/fakewizard/New()
|
||||
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
|
||||
new /obj/item/clothing/head/wizard/fake(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/sexyclown/New()
|
||||
new /obj/item/clothing/mask/gas/sexyclown(src.loc)
|
||||
new /obj/item/clothing/under/sexyclown(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/sexymime/New()
|
||||
new /obj/item/clothing/mask/gas/sexymime(src.loc)
|
||||
new /obj/item/clothing/under/sexymime(src.loc)
|
||||
del(src)
|
||||
@@ -0,0 +1,8 @@
|
||||
//The effect when you wrap a dead body in gift wrap
|
||||
/obj/effect/spresent
|
||||
name = "strange present"
|
||||
desc = "It's a ... present?"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "strangepresent"
|
||||
density = 1
|
||||
anchored = 0
|
||||
@@ -49,10 +49,17 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
if(T)
|
||||
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
|
||||
var/atom/movable/AM = atom_movable
|
||||
AM.ex_act(dist)
|
||||
if(AM) AM.ex_act(dist)
|
||||
|
||||
var/took = (world.timeofday-start)/10
|
||||
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
|
||||
if(Debug2) world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [(world.timeofday-start)/10] seconds."
|
||||
if(Debug2) world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds."
|
||||
|
||||
//Machines which report explosions.
|
||||
for(var/i,i<=doppler_arrays.len,i++)
|
||||
var/obj/machinery/doppler_array/Array = doppler_arrays[i]
|
||||
if(Array)
|
||||
Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took)
|
||||
|
||||
sleep(8)
|
||||
|
||||
|
||||
@@ -360,11 +360,12 @@
|
||||
//START HUMAN
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(FAT in H.mutations)
|
||||
if(!(flags & ONESIZEFITSALL))
|
||||
if(!disable_warning)
|
||||
H << "\red You're too fat to wear the [name]."
|
||||
return 0
|
||||
if(istype(src, /obj/item/clothing/under) || istype(src, /obj/item/clothing/suit))
|
||||
if(FAT in H.mutations)
|
||||
if(!(flags & ONESIZEFITSALL))
|
||||
if(!disable_warning)
|
||||
H << "\red You're too fat to wear the [name]."
|
||||
return 0
|
||||
|
||||
switch(slot)
|
||||
if(slot_l_hand)
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
valve_open = 1
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/bombarea = bombturf.loc.name
|
||||
var/log_str = "Bomb valve opened in [bombarea] with device attacher: [attacher]. Last touched by: [src.fingerprintslast]"
|
||||
var/log_str = "Bomb valve opened in [bombarea] with [attached_device ? attached_device : "no device"] attacher: [attacher]. Last touched by: [src.fingerprintslast]"
|
||||
bombers += log_str
|
||||
message_admins(log_str)
|
||||
log_game(log_str)
|
||||
|
||||
@@ -216,8 +216,7 @@
|
||||
user << "\blue The MMI must go in after everything else!"
|
||||
|
||||
if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/obj/structure/closet
|
||||
name = "closet"
|
||||
desc = "It's a basic storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "closed"
|
||||
density = 1
|
||||
flags = FPRINT
|
||||
var/icon_closed = "closed"
|
||||
var/icon_opened = "open"
|
||||
var/opened = 0
|
||||
var/welded = 0
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/lastbang
|
||||
var/storage_capacity = 20 //This is so that someone can't pack hundreds of items in a locker/crate
|
||||
//then open it in a populated area to crash clients.
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/obj/structure/closet/bombcloset/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bomb_suit( src )
|
||||
new /obj/item/clothing/under/color/black( src )
|
||||
new /obj/item/clothing/shoes/black( src )
|
||||
new /obj/item/clothing/head/bomb_hood( src )
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bomb_suit/security( src )
|
||||
new /obj/item/clothing/under/rank/security( src )
|
||||
new /obj/item/clothing/shoes/brown( src )
|
||||
new /obj/item/clothing/head/bomb_hood/security( src )
|
||||
@@ -0,0 +1,12 @@
|
||||
/obj/structure/closet/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
icon_closed = "coffin"
|
||||
icon_opened = "coffin_open"
|
||||
|
||||
/obj/structure/closet/coffin/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
@@ -0,0 +1,6 @@
|
||||
/obj/structure/closet/crate/critter
|
||||
name = "critter crate"
|
||||
desc = "A crate which can sustain life for a while."
|
||||
icon_state = "critter"
|
||||
icon_opened = "critteropen"
|
||||
icon_closed = "critter"
|
||||
@@ -1,37 +0,0 @@
|
||||
/obj/structure/closet/emcloset/New()
|
||||
..()
|
||||
|
||||
if (prob(40))
|
||||
new /obj/item/weapon/storage/toolbox/emergency(src)
|
||||
|
||||
switch (pickweight(list("small" = 40, "aid" = 25, "tank" = 20, "both" = 10, "nothing" = 4, "delete" = 1)))
|
||||
if ("small")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
|
||||
if ("aid")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||
|
||||
if ("tank")
|
||||
new /obj/item/weapon/tank/air(src)
|
||||
|
||||
if ("both")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
|
||||
if ("nothing")
|
||||
// doot
|
||||
|
||||
// teehee
|
||||
if ("delete")
|
||||
del(src)
|
||||
|
||||
//If you want to re-add fire, just add "fire" = 15 to the pick list.
|
||||
/*if ("fire")
|
||||
new /obj/structure/closet/firecloset(src.loc)
|
||||
del(src)*/
|
||||
|
||||
/obj/structure/closet/emcloset/legacy/New()
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
@@ -1,78 +0,0 @@
|
||||
/obj/structure/closet/firecloset/full/New()
|
||||
..()
|
||||
sleep(4)
|
||||
contents = list()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/New()
|
||||
..()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/*switch (pickweight(list("nothing" = 5, "bare-bones" = 35, "basic" = 40, "pickpocketed" = 10, "untouched" = 10)))
|
||||
if ("nothing")
|
||||
//better luck next time
|
||||
if ("bare-bones")
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
if ("basic")
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
if ("pickpocketed") //suit got stolen
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/helmet/hardhat/red(src)
|
||||
if ("untouched")
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/head/helmet/hardhat/red(src)*/
|
||||
|
||||
/obj/structure/closet/toolcloset/New()
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/flashlight(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wrench(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/t_scanner(src)
|
||||
if(prob(20))
|
||||
new /obj/item/weapon/storage/belt/utility(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(20))
|
||||
new /obj/item/device/multitool(src)
|
||||
if(prob(5))
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
|
||||
/obj/structure/closet/radiation/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
+30
@@ -1,3 +1,9 @@
|
||||
/obj/structure/closet/athletic_mixed
|
||||
name = "athletic wardrobe"
|
||||
desc = "It's a storage unit for athletic wear."
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/athletic_mixed/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -7,6 +13,11 @@
|
||||
new /obj/item/clothing/under/shorts/blue(src)
|
||||
new /obj/item/clothing/under/shorts/green(src)
|
||||
|
||||
|
||||
/obj/structure/closet/boxinggloves
|
||||
name = "boxing gloves"
|
||||
desc = "It's a storage unit for gloves for use in the boxing ring."
|
||||
|
||||
/obj/structure/closet/boxinggloves/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -15,6 +26,11 @@
|
||||
new /obj/item/clothing/gloves/boxing/yellow(src)
|
||||
new /obj/item/clothing/gloves/boxing(src)
|
||||
|
||||
|
||||
/obj/structure/closet/masks
|
||||
name = "mask closet"
|
||||
desc = "IT'S A STORAGE UNIT FOR FIGHTER MASKS OLE!"
|
||||
|
||||
/obj/structure/closet/masks/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -22,6 +38,13 @@
|
||||
new /obj/item/clothing/mask/luchador/rudos(src)
|
||||
new /obj/item/clothing/mask/luchador/tecnicos(src)
|
||||
|
||||
|
||||
/obj/structure/closet/lasertag/red
|
||||
name = "red laser tag equipment"
|
||||
desc = "It's a storage unit for laser tag equipment."
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/lasertag/red/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -30,6 +53,13 @@
|
||||
new /obj/item/clothing/suit/redtag(src)
|
||||
new /obj/item/clothing/suit/redtag(src)
|
||||
|
||||
|
||||
/obj/structure/closet/lasertag/blue
|
||||
name = "blue laser tag equipment"
|
||||
desc = "It's a storage unit for laser tag equipment."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/lasertag/blue/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -1,3 +1,39 @@
|
||||
/obj/structure/closet/cabinet
|
||||
name = "cabinet"
|
||||
desc = "Old will forever be in fashion."
|
||||
icon_state = "cabinet_closed"
|
||||
icon_closed = "cabinet_closed"
|
||||
icon_opened = "cabinet_open"
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/acloset
|
||||
name = "strange closet"
|
||||
desc = "It looks alien!"
|
||||
icon_state = "acloset"
|
||||
icon_closed = "acloset"
|
||||
icon_opened = "aclosetopen"
|
||||
|
||||
|
||||
/obj/structure/closet/gimmick
|
||||
name = "administrative supply closet"
|
||||
desc = "It's a storage unit for things that have no right being here."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/closet/gimmick/russian
|
||||
name = "russian surplus closet"
|
||||
desc = "It's a storage unit for Russian standard-issue surplus."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/gimmick/russian/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -12,6 +48,14 @@
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
|
||||
|
||||
/obj/structure/closet/gimmick/tacticool
|
||||
name = "tacticool gear closet"
|
||||
desc = "It's a storage unit for Tacticool gear."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/gimmick/tacticool/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -28,4 +72,71 @@
|
||||
new /obj/item/clothing/suit/armor/swat(src)
|
||||
new /obj/item/clothing/suit/armor/swat(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
|
||||
|
||||
/obj/structure/closet/thunderdome
|
||||
name = "\improper Thunderdome closet"
|
||||
desc = "Everything you need!"
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/closet/thunderdome/New()
|
||||
..()
|
||||
sleep(2)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred
|
||||
name = "red-team Thunderdome closet"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen
|
||||
name = "green-team Thunderdome closet"
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/obj/structure/closet/gmcloset/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
@@ -1,16 +0,0 @@
|
||||
/obj/structure/closet/jcloset/New()
|
||||
..()
|
||||
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/trashbag(src)
|
||||
new /obj/item/device/lightreplacer(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
@@ -0,0 +1,75 @@
|
||||
/* Closets for specific jobs
|
||||
* Contains:
|
||||
* Bartender
|
||||
* Janitor
|
||||
* Lawyer
|
||||
*/
|
||||
|
||||
/*
|
||||
* Bartender
|
||||
*/
|
||||
/obj/structure/closet/gmcloset
|
||||
name = "formal closet"
|
||||
desc = "It's a storage unit for formal clothing."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/gmcloset/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
/*
|
||||
* Janitor
|
||||
*/
|
||||
/obj/structure/closet/jcloset
|
||||
name = "custodial closet"
|
||||
desc = "It's a storage unit for janitorial clothes and gear."
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/jcloset/New()
|
||||
..()
|
||||
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/trashbag(src)
|
||||
new /obj/item/device/lightreplacer(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
|
||||
/*
|
||||
* Lawyer
|
||||
*/
|
||||
/obj/structure/closet/lawcloset
|
||||
name = "legal closet"
|
||||
desc = "It's a storage unit for courtroom apparel and items."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/lawcloset/New()
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/red(src)
|
||||
new /obj/item/clothing/under/lawyer/bluesuit(src)
|
||||
new /obj/item/clothing/suit/lawyer/bluejacket(src)
|
||||
new /obj/item/clothing/under/lawyer/purpsuit(src)
|
||||
new /obj/item/clothing/suit/lawyer/purpjacket(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
@@ -1,9 +1,22 @@
|
||||
/obj/structure/closet/l3closet
|
||||
name = "level-3 biohazard suit closet"
|
||||
desc = "It's a storage unit for level-3 biohazard gear."
|
||||
icon_state = "bio"
|
||||
icon_closed = "bio"
|
||||
icon_opened = "bioopen"
|
||||
|
||||
/obj/structure/closet/l3closet/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/general
|
||||
icon_state = "bio_general"
|
||||
icon_closed = "bio_general"
|
||||
icon_opened = "bio_generalopen"
|
||||
|
||||
/obj/structure/closet/l3closet/general/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -11,6 +24,12 @@
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/virology
|
||||
icon_state = "bio_virology"
|
||||
icon_closed = "bio_virology"
|
||||
icon_opened = "bio_virologyopen"
|
||||
|
||||
/obj/structure/closet/l3closet/virology/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -18,6 +37,12 @@
|
||||
new /obj/item/clothing/suit/bio_suit/virology( src )
|
||||
new /obj/item/clothing/head/bio_hood/virology( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/security
|
||||
icon_state = "bio_security"
|
||||
icon_closed = "bio_security"
|
||||
icon_opened = "bio_securityopen"
|
||||
|
||||
/obj/structure/closet/l3closet/security/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -25,6 +50,12 @@
|
||||
new /obj/item/clothing/suit/bio_suit/security( src )
|
||||
new /obj/item/clothing/head/bio_hood/security( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/janitor
|
||||
icon_state = "bio_janitor"
|
||||
icon_closed = "bio_janitor"
|
||||
icon_opened = "bio_janitoropen"
|
||||
|
||||
/obj/structure/closet/l3closet/janitor/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -32,6 +63,12 @@
|
||||
new /obj/item/clothing/suit/bio_suit/janitor( src )
|
||||
new /obj/item/clothing/head/bio_hood/janitor( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/scientist
|
||||
icon_state = "bio_scientist"
|
||||
icon_closed = "bio_scientist"
|
||||
icon_opened = "bio_scientistopen"
|
||||
|
||||
/obj/structure/closet/l3closet/scientist/New()
|
||||
..()
|
||||
sleep(2)
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
|
||||
/obj/structure/closet/malf/suits
|
||||
desc = "It's a storage unit for operational gear."
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
|
||||
/obj/structure/closet/malf/suits/New()
|
||||
..()
|
||||
sleep(2)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/weapon/storage/handcuff_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/device/pda/syndicate(src)
|
||||
var/obj/item/device/radio/uplink/U = new(src)
|
||||
U.hidden_uplink.uses = 40
|
||||
return
|
||||
@@ -158,4 +158,30 @@
|
||||
sleep(2)
|
||||
new /obj/item/weapon/storage/pillbottlebox(src)
|
||||
new /obj/item/weapon/storage/pillbottlebox(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall
|
||||
name = "First Aid Closet"
|
||||
desc = "It's a secure wall-mounted storage unit for first aid supplies."
|
||||
icon_state = "medical_wall_locked"
|
||||
icon_closed = "medical_wall_unlocked"
|
||||
icon_locked = "medical_wall_locked"
|
||||
icon_opened = "medical_wall_open"
|
||||
icon_broken = "medical_wall_spark"
|
||||
icon_off = "medical_wall_off"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
req_access = list(access_medical)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
@@ -1,5 +1,8 @@
|
||||
/obj/structure/closet/secure_closet/personal/var/registered_name = null
|
||||
/obj/structure/closet/secure_closet/personal/req_access = list(access_all_personal_lockers)
|
||||
/obj/structure/closet/secure_closet/personal
|
||||
desc = "It's a secure locker for personell. The first card swiped gains control."
|
||||
name = "personal closet"
|
||||
req_access = list(access_all_personal_lockers)
|
||||
var/registered_name = null
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/New()
|
||||
..()
|
||||
@@ -11,6 +14,10 @@
|
||||
new /obj/item/device/radio/headset( src )
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/patient
|
||||
name = "patient's closet"
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/patient/New()
|
||||
..()
|
||||
spawn(4)
|
||||
@@ -20,6 +27,27 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
icon_locked = "cabinetdetective_locked"
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/New()
|
||||
..()
|
||||
spawn(4)
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/obj/structure/closet/secure_closet
|
||||
name = "secure locker"
|
||||
desc = "It's an immobile card-locked storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "secure1"
|
||||
density = 1
|
||||
opened = 0
|
||||
var/locked = 1
|
||||
var/broken = 0
|
||||
var/large = 1
|
||||
icon_closed = "secure"
|
||||
var/icon_locked = "secure1"
|
||||
icon_opened = "secureopen"
|
||||
var/icon_broken = "securebroken"
|
||||
var/icon_off = "secureoff"
|
||||
wall_mounted = 0 //never solid (You can always pass over it)
|
||||
health = 200
|
||||
|
||||
/obj/structure/closet/secure_closet/can_open()
|
||||
..()
|
||||
if(src.locked)
|
||||
|
||||
@@ -242,3 +242,29 @@
|
||||
new /obj/item/clothing/head/powdered_wig (src)
|
||||
new /obj/item/weapon/storage/briefcase(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/wall
|
||||
name = "wall locker"
|
||||
req_access = list(access_security)
|
||||
icon_state = "wall-locker1"
|
||||
density = 1
|
||||
icon_closed = "wall-locker"
|
||||
icon_locked = "wall-locker1"
|
||||
icon_opened = "wall-lockeropen"
|
||||
icon_broken = "wall-lockerbroken"
|
||||
icon_off = "wall-lockeroff"
|
||||
|
||||
//too small to put a man in
|
||||
large = 0
|
||||
|
||||
/obj/structure/closet/secure_closet/wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/obj/structure/closet/syndicate
|
||||
name = "armoury closet"
|
||||
desc = "Why is this here?"
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
|
||||
|
||||
/obj/structure/closet/syndicate/personal
|
||||
desc = "It's a storage unit for operative gear."
|
||||
|
||||
/obj/structure/closet/syndicate/personal/New()
|
||||
..()
|
||||
sleep(2)
|
||||
@@ -12,3 +23,31 @@
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/weapon/shield/energy(src)
|
||||
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for nuclear-operative gear."
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/weapon/storage/handcuff_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/device/pda/syndicate(src)
|
||||
var/obj/item/device/radio/uplink/U = new(src)
|
||||
U.hidden_uplink.uses = 40
|
||||
return
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/obj/structure/closet/thunderdome/New()
|
||||
..()
|
||||
sleep(2)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
@@ -0,0 +1,221 @@
|
||||
/* Utility Closets
|
||||
* Contains:
|
||||
* Emergency Closet
|
||||
* Fire Closet
|
||||
* Tool Closet
|
||||
* Radiation Closet
|
||||
* Bombsuit Closet
|
||||
* Hydrant
|
||||
* First Aid
|
||||
*/
|
||||
|
||||
/*
|
||||
* Emergency Closet
|
||||
*/
|
||||
/obj/structure/closet/emcloset
|
||||
name = "emergency closet"
|
||||
desc = "It's a storage unit for emergency breathmasks and o2 tanks."
|
||||
icon_state = "emergency"
|
||||
icon_closed = "emergency"
|
||||
icon_opened = "emergencyopen"
|
||||
|
||||
/obj/structure/closet/emcloset/New()
|
||||
..()
|
||||
|
||||
if (prob(40))
|
||||
new /obj/item/weapon/storage/toolbox/emergency(src)
|
||||
|
||||
switch (pickweight(list("small" = 40, "aid" = 25, "tank" = 20, "both" = 10, "nothing" = 4, "delete" = 1)))
|
||||
if ("small")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
|
||||
if ("aid")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||
|
||||
if ("tank")
|
||||
new /obj/item/weapon/tank/air(src)
|
||||
|
||||
if ("both")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
|
||||
if ("nothing")
|
||||
// doot
|
||||
|
||||
// teehee
|
||||
if ("delete")
|
||||
del(src)
|
||||
|
||||
//If you want to re-add fire, just add "fire" = 15 to the pick list.
|
||||
/*if ("fire")
|
||||
new /obj/structure/closet/firecloset(src.loc)
|
||||
del(src)*/
|
||||
|
||||
/obj/structure/closet/emcloset/legacy/New()
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
|
||||
/*
|
||||
* Fire Closet
|
||||
*/
|
||||
/obj/structure/closet/firecloset
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "firecloset"
|
||||
icon_closed = "firecloset"
|
||||
icon_opened = "fireclosetopen"
|
||||
|
||||
/obj/structure/closet/firecloset/New()
|
||||
..()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/full/New()
|
||||
..()
|
||||
sleep(4)
|
||||
contents = list()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
/*
|
||||
* Tool Closet
|
||||
*/
|
||||
/obj/structure/closet/toolcloset
|
||||
name = "tool closet"
|
||||
desc = "It's a storage unit for tools."
|
||||
icon_state = "toolcloset"
|
||||
icon_closed = "toolcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
|
||||
/obj/structure/closet/toolcloset/New()
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/flashlight(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wrench(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/t_scanner(src)
|
||||
if(prob(20))
|
||||
new /obj/item/weapon/storage/belt/utility(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(20))
|
||||
new /obj/item/device/multitool(src)
|
||||
if(prob(5))
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
|
||||
|
||||
/*
|
||||
* Radiation Closet
|
||||
*/
|
||||
|
||||
/obj/structure/closet/radiation
|
||||
name = "radiation suit closet"
|
||||
desc = "It's a storage unit for rad-protective suits."
|
||||
icon_state = "radsuitcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_closed = "radsuitcloset"
|
||||
|
||||
/obj/structure/closet/radiation/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
|
||||
/*
|
||||
* Bombsuit closet
|
||||
*/
|
||||
/obj/structure/closet/bombcloset
|
||||
name = "\improper EOD closet"
|
||||
desc = "It's a storage unit for explosion-protective suits."
|
||||
icon_state = "bombsuit"
|
||||
icon_closed = "bombsuit"
|
||||
icon_opened = "bombsuitopen"
|
||||
|
||||
/obj/structure/closet/bombcloset/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bomb_suit( src )
|
||||
new /obj/item/clothing/under/color/black( src )
|
||||
new /obj/item/clothing/shoes/black( src )
|
||||
new /obj/item/clothing/head/bomb_hood( src )
|
||||
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity
|
||||
name = "\improper EOD closet"
|
||||
desc = "It's a storage unit for explosion-protective suits."
|
||||
icon_state = "bombsuitsec"
|
||||
icon_closed = "bombsuitsec"
|
||||
icon_opened = "bombsuitsecopen"
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bomb_suit/security( src )
|
||||
new /obj/item/clothing/under/rank/security( src )
|
||||
new /obj/item/clothing/shoes/brown( src )
|
||||
new /obj/item/clothing/head/bomb_hood/security( src )
|
||||
|
||||
/*
|
||||
* Hydrant
|
||||
*/
|
||||
/obj/structure/closet/hydrant //wall mounted fire closet
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "hydrant"
|
||||
icon_closed = "hydrant"
|
||||
icon_opened = "hydrant_open"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/*
|
||||
* First Aid
|
||||
*/
|
||||
/obj/structure/closet/medical_wall //wall mounted medical closet
|
||||
name = "first-aid closet"
|
||||
desc = "It's wall-mounted storage unit for first aid supplies."
|
||||
icon_state = "medical_wall"
|
||||
icon_closed = "medical_wall"
|
||||
icon_opened = "medical_wall_open"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/obj/structure/closet/medical_wall/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
@@ -1,3 +1,9 @@
|
||||
/obj/structure/closet/wardrobe
|
||||
name = "wardrobe"
|
||||
desc = "It's a storage unit for standard-issue Nanotrasen attire."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/wardrobe/New()
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
@@ -7,6 +13,12 @@
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/wardrobe/red/New()
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
@@ -22,6 +34,12 @@
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/pink
|
||||
name = "pink wardrobe"
|
||||
icon_state = "pink"
|
||||
icon_closed = "pink"
|
||||
|
||||
/obj/structure/closet/wardrobe/pink/New()
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
@@ -31,6 +49,11 @@
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/black
|
||||
name = "black wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/black/New()
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
@@ -43,6 +66,13 @@
|
||||
new /obj/item/clothing/head/that(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black
|
||||
name = "chapel wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-approved religious attire."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black/New()
|
||||
new /obj/item/clothing/under/rank/chaplain(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
@@ -56,6 +86,12 @@
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/green
|
||||
name = "green wardrobe"
|
||||
icon_state = "green"
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/green/New()
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
@@ -63,11 +99,15 @@
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
//new /obj/item/clothing/head/soft/green(src)
|
||||
//new /obj/item/clothing/head/soft/green(src)
|
||||
//new /obj/item/clothing/head/soft/green(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/orange
|
||||
name = "prison wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
|
||||
icon_state = "orange"
|
||||
icon_closed = "orange"
|
||||
|
||||
/obj/structure/closet/wardrobe/orange/New()
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
@@ -75,11 +115,14 @@
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
//new /obj/item/clothing/head/soft/orange(src)
|
||||
//new /obj/item/clothing/head/soft/orange(src)
|
||||
//new /obj/item/clothing/head/soft/orange(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow
|
||||
name = "yellow wardrobe"
|
||||
icon_state = "wardrobe-y"
|
||||
icon_closed = "wardrobe-y"
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow/New()
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
@@ -87,11 +130,14 @@
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow
|
||||
name = "atmospherics wardrobe"
|
||||
icon_state = "yellow"
|
||||
icon_closed = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow/New()
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
@@ -99,11 +145,15 @@
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow
|
||||
name = "engineering wardrobe"
|
||||
icon_state = "yellow"
|
||||
icon_closed = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow/New()
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
@@ -111,11 +161,14 @@
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/white
|
||||
name = "white wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/white/New()
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
@@ -125,6 +178,12 @@
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs
|
||||
name = "Pajama wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs/New()
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
@@ -136,6 +195,12 @@
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white
|
||||
name = "toxins wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white/New()
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
@@ -148,6 +213,12 @@
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black
|
||||
name = "robotics wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black/New()
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
@@ -157,6 +228,12 @@
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white
|
||||
name = "chemistry wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
@@ -166,6 +243,12 @@
|
||||
new /obj/item/clothing/suit/labcoat/chemist(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white
|
||||
name = "genetics wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white/New()
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
@@ -175,6 +258,12 @@
|
||||
new /obj/item/clothing/suit/labcoat/genetics(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white
|
||||
name = "virology wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
@@ -186,6 +275,12 @@
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/grey
|
||||
name = "grey wardrobe"
|
||||
icon_state = "grey"
|
||||
icon_closed = "grey"
|
||||
|
||||
/obj/structure/closet/wardrobe/grey/New()
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
@@ -198,6 +293,12 @@
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed
|
||||
name = "mixed wardrobe"
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed/New()
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
@@ -208,22 +309,4 @@
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
//new /obj/item/clothing/head/soft/mime(src)
|
||||
//new /obj/item/clothing/head/soft/blue(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/green(src)
|
||||
//new /obj/item/clothing/head/soft/orange(src)
|
||||
//new /obj/item/clothing/head/soft/purple(src)
|
||||
//if(prob(10)) new /obj/item/clothing/head/soft/rainbow(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/lawcloset/New()
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/red(src)
|
||||
new /obj/item/clothing/under/lawyer/bluesuit(src)
|
||||
new /obj/item/clothing/suit/lawyer/bluejacket(src)
|
||||
new /obj/item/clothing/under/lawyer/purpsuit(src)
|
||||
new /obj/item/clothing/suit/lawyer/purpjacket(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/obj/structure/falsewall
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
var/mineral = "metal"
|
||||
|
||||
/obj/structure/falsewall/gold
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
/obj/structure/window
|
||||
name = "window"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
desc = "A window."
|
||||
density = 1
|
||||
layer = 3.2//Just above doors
|
||||
var/health = 14.0
|
||||
var/ini_dir = null
|
||||
var/state = 0
|
||||
var/reinf = 0
|
||||
var/silicate = 0 // number of units of silicate
|
||||
var/icon/silicateIcon = null // the silicated icon
|
||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||
anchored = 1.0
|
||||
flags = ON_BORDER
|
||||
|
||||
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
@@ -392,3 +408,22 @@
|
||||
src.icon_state = "window[junction]"
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/window/basic
|
||||
icon_state = "window"
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
reinf = 1
|
||||
icon_state = "rwindow"
|
||||
name = "reinforced window"
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
name = "tinted window"
|
||||
icon_state = "twindow"
|
||||
opacity = 1
|
||||
|
||||
/obj/structure/window/reinforced/tinted/frosted
|
||||
icon_state = "fwindow"
|
||||
name = "frosted window"
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ var/list/OOClog = list()
|
||||
var/list/adminlog = list()
|
||||
|
||||
|
||||
var/list/powernets = null
|
||||
var/list/powernets = list()
|
||||
|
||||
var/Debug = 0 // global debug switch
|
||||
var/Debug2 = 0
|
||||
|
||||
@@ -142,8 +142,8 @@ var/global/BSACooldown = 0
|
||||
M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob)
|
||||
if("parrot")
|
||||
M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob)
|
||||
if("drprofessor")
|
||||
M.change_mob_type( /mob/living/simple_animal/parrot/DrProfessor , null, null, delmob)
|
||||
if("polyparrot")
|
||||
M.change_mob_type( /mob/living/simple_animal/parrot/Poly , null, null, delmob)
|
||||
if("constructarmoured")
|
||||
M.change_mob_type( /mob/living/simple_animal/constructarmoured , null, null, delmob)
|
||||
if("constructbuilder")
|
||||
@@ -802,10 +802,11 @@ var/global/BSACooldown = 0
|
||||
if ((src.rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
|
||||
var/mob/M = locate(href_list["forcespeech"])
|
||||
if (ismob(M))
|
||||
var/speech = copytext(sanitize(input("What will [key_name(M)] say?.", "Force speech", "")),1,MAX_MESSAGE_LEN)
|
||||
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
|
||||
if(!speech)
|
||||
return
|
||||
M.say(speech)
|
||||
speech = sanitize(speech) // Nah, we don't trust them
|
||||
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
|
||||
message_admins("\blue [key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]")
|
||||
else
|
||||
@@ -2041,6 +2042,20 @@ var/global/BSACooldown = 0
|
||||
for(var/obj/machinery/light/L in world)
|
||||
L.fix()
|
||||
message_admins("[key_name_admin(usr)] fixed all lights", 1)
|
||||
if("friendai")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","FA")
|
||||
for(var/mob/aiEye/aE in mob_list)
|
||||
aE.icon_state = "ai_friend"
|
||||
for(var/obj/machinery/M in machines)
|
||||
if(istype(M, /obj/machinery/ai_status_display))
|
||||
var/obj/machinery/ai_status_display/A = M
|
||||
A.emotion = "Friend Computer"
|
||||
else if(istype(M, /obj/machinery/status_display))
|
||||
var/obj/machinery/status_display/A = M
|
||||
A.friendc = 1
|
||||
message_admins("[key_name_admin(usr)] turned all AIs into best friends.", 1)
|
||||
|
||||
if("virus")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","V")
|
||||
@@ -2574,7 +2589,7 @@ var/global/BSACooldown = 0
|
||||
body += "<A href='?src=\ref[src];simplemake=crab;mob=\ref[M]'>Crab</A> | "
|
||||
body += "<A href='?src=\ref[src];simplemake=coffee;mob=\ref[M]'>Coffee</A> | "
|
||||
//body += "<A href='?src=\ref[src];simplemake=parrot;mob=\ref[M]'>Parrot</A> | "
|
||||
//body += "<A href='?src=\ref[src];simplemake=drprofessor;mob=\ref[M]'>DrProfessor</A> | "
|
||||
//body += "<A href='?src=\ref[src];simplemake=polyparrot;mob=\ref[M]'>Poly</A> | "
|
||||
body += "\[ Construct: <A href='?src=\ref[src];simplemake=constructarmoured;mob=\ref[M]'>Armoured</A> , "
|
||||
body += "<A href='?src=\ref[src];simplemake=constructbuilder;mob=\ref[M]'>Builder</A> , "
|
||||
body += "<A href='?src=\ref[src];simplemake=constructwraith;mob=\ref[M]'>Wraith</A> \] "
|
||||
@@ -2939,7 +2954,8 @@ var/global/BSACooldown = 0
|
||||
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>"}
|
||||
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=friendai'>Best Friend AI</A><BR>"}
|
||||
//<A href='?src=\ref[src];secretsfun=shockwave'>Station Shockwave</A><BR>
|
||||
|
||||
if(lvl >= 6)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
O.loc = src
|
||||
update_icon()
|
||||
else if(istype(O, /obj/item/weapon/pen))
|
||||
var/newname = copytext(sanitize(input("What would you like to title this bookshelf?") as text|null),1,MAX_MESSAGE_LEN)
|
||||
var/newname = stripped_input(usr, "What would you like to title this bookshelf?")
|
||||
if(!newname)
|
||||
return
|
||||
else
|
||||
@@ -140,7 +140,7 @@
|
||||
var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
|
||||
switch(choice)
|
||||
if("Title")
|
||||
var/newtitle = copytext(reject_bad_text(input("Write a new title:") as text|null),1,MAX_MESSAGE_LEN)
|
||||
var/newtitle = reject_bad_text(stripped_input(usr, "Write a new title:"))
|
||||
if(!newtitle)
|
||||
usr << "The title is invalid."
|
||||
return
|
||||
@@ -148,14 +148,14 @@
|
||||
src.name = newtitle
|
||||
src.title = newtitle
|
||||
if("Contents")
|
||||
var/content = strip_html(input("Write your book's contents (HTML NOT allowed):"),8192) as message|null
|
||||
var/content = strip_html(input(usr, "Write your book's contents (HTML NOT allowed):"),8192) as message|null
|
||||
if(!content)
|
||||
usr << "The content is invalid."
|
||||
return
|
||||
else
|
||||
src.dat += content
|
||||
if("Author")
|
||||
var/newauthor = copytext(sanitize(input("Write the author's name:") as text|null),1,MAX_NAME_LEN)
|
||||
var/newauthor = stripped_input(usr, "Write the author's name:")
|
||||
if(!newauthor)
|
||||
usr << "The name is invalid."
|
||||
return
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
if (prob(30))
|
||||
switch(pick(1,2))
|
||||
if(1)
|
||||
core()
|
||||
view_core()
|
||||
if(2)
|
||||
ai_call_shuttle()
|
||||
..()
|
||||
@@ -445,7 +445,7 @@
|
||||
return 0
|
||||
|
||||
if(!src.eyeobj)
|
||||
core()
|
||||
view_core()
|
||||
return
|
||||
// ok, we're alive, camera is good and in our network...
|
||||
eyeobj.setLoc(get_turf(C))
|
||||
@@ -510,9 +510,9 @@
|
||||
/mob/living/silicon/ai/cancel_camera()
|
||||
set category = "AI Commands"
|
||||
set name = "Cancel Camera View"
|
||||
//reset_view(null)
|
||||
//machine = null
|
||||
src.cameraFollow = null
|
||||
|
||||
//src.cameraFollow = null
|
||||
src.view_core()
|
||||
|
||||
|
||||
//Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm
|
||||
@@ -547,7 +547,7 @@
|
||||
network = input(U, "Which network would you like to view?") as null|anything in cameralist
|
||||
|
||||
if(!U.eyeobj)
|
||||
U.core()
|
||||
U.view_core()
|
||||
return
|
||||
|
||||
if(isnull(network))
|
||||
@@ -578,16 +578,18 @@
|
||||
return
|
||||
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer")
|
||||
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
||||
for (var/obj/machinery/ai_status_display/AISD in world) //change status
|
||||
spawn( 0 )
|
||||
AISD.emotion = emote
|
||||
for (var/obj/machinery/status_display/SD in world) //if Friend Computer, change ALL displays
|
||||
if(emote=="Friend Computer")
|
||||
spawn(0)
|
||||
SD.friendc = 1
|
||||
else
|
||||
spawn(0)
|
||||
SD.friendc = 0
|
||||
for (var/obj/machinery/M in machines) //change status
|
||||
if(istype(M, /obj/machinery/ai_status_display))
|
||||
var/obj/machinery/ai_status_display/AISD = M
|
||||
AISD.emotion = emote
|
||||
//if Friend Computer, change ALL displays
|
||||
else if(istype(M, /obj/machinery/status_display))
|
||||
|
||||
var/obj/machinery/status_display/SD = M
|
||||
if(emote=="Friend Computer")
|
||||
SD.friendc = 1
|
||||
else
|
||||
SD.friendc = 0
|
||||
return
|
||||
|
||||
//I am the icon meister. Bow fefore me. //>fefore
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
|
||||
/mob/aiEye
|
||||
name = "Inactive AI Eye"
|
||||
icon = 'icons/obj/status_display.dmi' // For AI friend secret shh :o
|
||||
var/list/visibleCameraChunks = list()
|
||||
var/mob/living/silicon/ai/ai = null
|
||||
density = 0
|
||||
nodamage = 1 // You can't damage it.
|
||||
mouse_opacity = 0
|
||||
|
||||
// Movement code. Returns 0 to stop air movement from moving it.
|
||||
/mob/aiEye/Move()
|
||||
@@ -40,6 +42,11 @@
|
||||
if(ai)
|
||||
if(ai.client)
|
||||
ai.client.eye = src
|
||||
//Holopad
|
||||
if(istype(ai.current, /obj/machinery/hologram/holopad))
|
||||
var/obj/machinery/hologram/holopad/H = ai.current
|
||||
H.move_hologram()
|
||||
|
||||
|
||||
// AI MOVEMENT
|
||||
|
||||
@@ -103,11 +110,17 @@
|
||||
/mob/living/silicon/ai/verb/core()
|
||||
set category = "AI Commands"
|
||||
set name = "AI Core"
|
||||
|
||||
view_core()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/view_core()
|
||||
|
||||
current = null
|
||||
cameraFollow = null
|
||||
machine = null
|
||||
|
||||
if(src.eyeobj)
|
||||
if(src.eyeobj && src.loc)
|
||||
src.eyeobj.loc = src.loc
|
||||
else
|
||||
src << "ERROR: Eyeobj not found. Please report this to Giacom. Creating new eye..."
|
||||
|
||||
@@ -33,6 +33,19 @@
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
// EFFECTS
|
||||
|
||||
/obj/effect/Del()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
..()
|
||||
|
||||
/obj/effect/New()
|
||||
..()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
|
||||
// DOORS
|
||||
|
||||
// Simply updates the visibility of the area when it opens/closes/destroyed.
|
||||
|
||||
@@ -22,5 +22,5 @@
|
||||
if(O)
|
||||
O.mode = 1
|
||||
O.emotion = "Neutral"
|
||||
src.core()
|
||||
src.view_core()
|
||||
return
|
||||
@@ -6,5 +6,5 @@
|
||||
if (client)
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
src.core()
|
||||
src.view_core()
|
||||
return
|
||||
@@ -56,7 +56,6 @@
|
||||
|
||||
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
|
||||
|
||||
var/obj/item/device/radio/headset/ears = null
|
||||
/mob/living/simple_animal/New()
|
||||
..()
|
||||
verbs -= /mob/verb/observe
|
||||
|
||||
@@ -1,36 +1,107 @@
|
||||
/* Parrots!
|
||||
* Contains
|
||||
* Defines
|
||||
* Inventory (headset stuff)
|
||||
* Attack responces
|
||||
* AI
|
||||
* Procs / Verbs (usable by players)
|
||||
* Sub-types
|
||||
*/
|
||||
|
||||
/*
|
||||
* Defines
|
||||
*/
|
||||
|
||||
//Only a maximum of one action and one intent should be active at any given time.
|
||||
//Actions
|
||||
#define PARROT_PERCH 1 //Sitting/sleeping, not moving
|
||||
#define PARROT_SWOOP 2 //Moving towards or away from a target
|
||||
#define PARROT_WANDER 4 //Moving without a specific target in mind
|
||||
|
||||
//Intents
|
||||
#define PARROT_STEAL 8 //Flying towards a target to steal it/from it
|
||||
#define PARROT_ATTACK 16 //Flying towards a target to attack it
|
||||
#define PARROT_RETURN 32 //Flying towards its perch
|
||||
#define PARROT_FLEE 64 //Flying away from its attacker
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot
|
||||
name = "\improper Parrot"
|
||||
desc = "It's a parrot! No dirty words!"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "parrot"
|
||||
icon_living = "parrot"
|
||||
icon_dead = "parrot_dead"
|
||||
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
|
||||
desc = "The parrot squacks, \"It's a Parrot! BAWWK!\""
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "chick"
|
||||
icon_living = "chick"
|
||||
icon_dead = "chick_dead"
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me") //TODO: make it pick up on what people are saying.
|
||||
speak_emote = list("squawks","says","yells")
|
||||
emote_hear = list("squawks","bawks")
|
||||
emote_see = list("flutters its wings", "glares at you")
|
||||
emote_see = list("flutters its wings")
|
||||
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/cracker/
|
||||
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently moves aside the"
|
||||
response_harm = "swats the"
|
||||
min_oxy = 16 //Require atleast 16kPA oxygen
|
||||
minbodytemp = 223 //Below -50 Degrees Celcius
|
||||
maxbodytemp = 323 //Above 50 Degrees Celcius
|
||||
stop_automated_movement = 1
|
||||
|
||||
ears = new /obj/item/device/radio/headset/heads/ce()
|
||||
|
||||
/mob/living/simple_animal/parrot/DrProfessor
|
||||
name = "Doctor Professor Parrot, PhD"
|
||||
desc = "That's the Doctor Professor. He has more degrees than all of the engineering team put together, and has several published papers on quantum cracker theory."
|
||||
speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE",":e Open secure storage please.",":e I think something happened to the containment field...")
|
||||
response_harm = "is attacked in the face by"
|
||||
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
|
||||
var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in life() being run every single tick.
|
||||
var/parrot_sleep_dur = 25 //Same as above, this is the var that physically counts down
|
||||
var/parrot_dam_zone = list("chest", "head", "l_arm", "l_leg", "r_arm", "r_leg") //For humans, select a bodypart to attack TODO: pecking out a mob's eyes
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cracker/
|
||||
name = "Cracker"
|
||||
desc = "It's a salted cracker."
|
||||
//Headset for Poly to yell at engineers :)
|
||||
var/obj/item/device/radio/headset/ears = null
|
||||
|
||||
//The thing the parrot is currently interested in. This gets used for items the parrot wants to pick up, mobs it wants to steal from,
|
||||
//mobs it wants to attack or mobs that have attacked it
|
||||
var/atom/movable/parrot_interest = null
|
||||
|
||||
//Parrots will generally sit on their pertch unless something catches their eye.
|
||||
//These vars store their preffered perch and if they dont have one, what they can use as a perch
|
||||
var/obj/parrot_perch = null
|
||||
var/obj/desired_perches = list(/obj/structure/computerframe, /obj/structure/displaycase, \
|
||||
/obj/structure/closet, /obj/structure/filingcabinet, \
|
||||
/obj/machinery/computer, /obj/machinery/clonepod, \
|
||||
/obj/machinery/dna_scanner, /obj/machinery/dna_scannernew, \
|
||||
/obj/machinery/nuclearbomb, /obj/machinery/particle_accelerator, \
|
||||
/obj/machinery/recharge_station, /obj/machinery/smartfridge, \
|
||||
/obj/machinery/suit_storage_unit, /obj/machinery/telecomms, \
|
||||
/obj/machinery/teleport)
|
||||
|
||||
//Parrots are kleptomaniacs. These vars a used for just that.. holding items and storing items the parrot wants to steal.
|
||||
var/obj/item/held_item = null
|
||||
var/list/desired_items = list(/obj/item/weapon/reagent_containers/food/snacks/cracker/, \
|
||||
/obj/item/smallDelivery, /obj/item/weapon/gift, \
|
||||
/obj/item/weapon/soap, /obj/item/toy/spinningtoy, \
|
||||
/obj/item/weapon/coin, /obj/item/weapon/stamp,\
|
||||
/obj/item/weapon/grenade)
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/New()
|
||||
usr << "\red <B>Sorry parrots are not ready yet!</B>"
|
||||
del(src)
|
||||
/*
|
||||
..()
|
||||
parrot_sleep_dur = parrot_sleep_max //In case someone decides to change the max without changing the duration var
|
||||
ears = new /obj/item/device/radio/headset/headset_eng(src)
|
||||
verbs.Add(/mob/living/simple_animal/parrot/proc/steal_from_ground, \
|
||||
/mob/living/simple_animal/parrot/proc/steal_from_mob, \
|
||||
/mob/living/simple_animal/parrot/proc/drop_held_item)
|
||||
*/
|
||||
/mob/living/simple_animal/parrot/Die()
|
||||
if(held_item)
|
||||
held_item.loc = src.loc
|
||||
held_item = null
|
||||
..()
|
||||
|
||||
/*
|
||||
* Inventory
|
||||
*/
|
||||
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
|
||||
user.machine = src
|
||||
if(user.stat) return
|
||||
@@ -45,50 +116,475 @@
|
||||
onclose(user, "mob[real_name]")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/Topic(href, href_list)
|
||||
if(usr.stat) return
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("ears")
|
||||
if(ears)
|
||||
src.say(":e BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
|
||||
ears.loc = src.loc
|
||||
ears = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
//Can the usr physically do this?
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
return
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
usr << "\red You have nothing in your hand to put on its [add_to]."
|
||||
return
|
||||
switch(add_to)
|
||||
if("ears")
|
||||
if(ears)
|
||||
usr << "\red It's already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
//Is the usr's mob type able to do this? (lolaliens)
|
||||
if(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("ears")
|
||||
if(ears)
|
||||
src.say(":e BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
|
||||
ears.loc = src.loc
|
||||
ears = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
|
||||
if( !istype(item_to_add, /obj/item/device/radio/headset) )
|
||||
usr << "\red This object won't fit."
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
usr << "\red You have nothing in your hand to put on its [add_to]."
|
||||
return
|
||||
switch(add_to)
|
||||
if("ears")
|
||||
if(ears)
|
||||
usr << "\red It's already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.ears = item_to_add
|
||||
else
|
||||
..()
|
||||
if( !istype(item_to_add, /obj/item/device/radio/headset) )
|
||||
usr << "\red This object won't fit."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.ears = item_to_add
|
||||
else
|
||||
..()
|
||||
|
||||
/*
|
||||
* Attack responces
|
||||
*/
|
||||
//Humans, monkeys, aliens
|
||||
/mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/M as mob)
|
||||
..()
|
||||
if(client) return
|
||||
if(!stat && M.a_intent == "hurt")
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
parrot_interest = M
|
||||
parrot_state = PARROT_SWOOP //The parrot just got hit, it WILL move, now to pick a direction..
|
||||
|
||||
if(M.getMaxHealth() - M.health < 50) //Weakened mob? Fight back!
|
||||
parrot_state |= PARROT_ATTACK
|
||||
else
|
||||
parrot_state |= PARROT_FLEE //Otherwise, fly like a bat out of hell!
|
||||
drop_held_item(0)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
attack_hand(M)
|
||||
|
||||
/mob/living/simple_animal/parrot/attack_alien(mob/living/carbon/monkey/M as mob)
|
||||
attack_hand(M)
|
||||
|
||||
//Simple animals
|
||||
/mob/living/simple_animal/parrot/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(client) return
|
||||
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
if(M.melee_damage_upper > 0)
|
||||
parrot_interest = M
|
||||
parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless
|
||||
|
||||
//Mobs with objects
|
||||
/mob/living/simple_animal/parrot/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
..()
|
||||
if(!stat && !client && !istype(O, /obj/item/stack/medical))
|
||||
if(O.force)
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
parrot_interest = user
|
||||
parrot_state = PARROT_SWOOP | PARROT_FLEE
|
||||
drop_held_item(0)
|
||||
return
|
||||
|
||||
//Bullets
|
||||
/mob/living/simple_animal/parrot/bullet_act(var/obj/item/projectile/Proj)
|
||||
..()
|
||||
if(!stat && !client)
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
|
||||
|
||||
parrot_interest = null
|
||||
parrot_state = PARROT_WANDER //OWFUCK, Been shot! RUN LIKE HELL!
|
||||
drop_held_item(0)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* AI - Not really intelligent, but I'm calling it AI anyway.
|
||||
*/
|
||||
/mob/living/simple_animal/parrot/Life()
|
||||
..()
|
||||
|
||||
if(client)
|
||||
return //Lets not force players to move
|
||||
|
||||
if(!isturf(src.loc) || !canmove || buckled || pulledby)
|
||||
return //If it can't move, dont let it move. (The buckled check probably isn't necessary)
|
||||
|
||||
world << "State: [parrot_state]"
|
||||
|
||||
//Alright, here we go... down the slope
|
||||
|
||||
//-----SLEEPING
|
||||
if(parrot_state == PARROT_PERCH)
|
||||
world << "Perched"
|
||||
if(parrot_perch.loc != src.loc) //Make sure someone hasnt moved our perch on us
|
||||
if(parrot_perch in view(src))
|
||||
parrot_state = PARROT_SWOOP | PARROT_RETURN
|
||||
return
|
||||
else
|
||||
parrot_state = PARROT_WANDER
|
||||
return
|
||||
|
||||
if(--parrot_sleep_dur) //Zzz
|
||||
world << "Perched: sleeping"
|
||||
return
|
||||
|
||||
else
|
||||
world << "Perched: looking around"
|
||||
parrot_sleep_dur = parrot_sleep_max //This way we only call the loop below once every [sleep_max] ticks.
|
||||
parrot_interest = search_for_item()
|
||||
if(parrot_interest)
|
||||
emote("[src] looks in [parrot_interest]'s direction and takes flight.")
|
||||
parrot_state = PARROT_SWOOP | PARROT_STEAL
|
||||
return
|
||||
|
||||
//-----WANDERING - This is basically a 'I dont know what to do yet' state
|
||||
else if(parrot_state == PARROT_WANDER)
|
||||
world << "Wander"
|
||||
//Stop movement, we'll set it later
|
||||
walk(src, 0)
|
||||
parrot_interest = null
|
||||
|
||||
//Wander around aimlessly. This will help keep the loops from searches down
|
||||
//and possibly move the mob into a new are in view of something they can use
|
||||
if(prob(90))
|
||||
world << "Wander: randomly"
|
||||
step(src, pick(cardinal))
|
||||
return
|
||||
|
||||
if(!held_item && !parrot_perch) //If we've got nothing to do.. look for something to do.
|
||||
world << "Wander: looking for perch or item"
|
||||
world << parrot_interest
|
||||
var/atom/movable/AM = search_for_perch_and_item() //This handles checking through lists so we know it's either a perch or stealable item
|
||||
if(AM)
|
||||
if(istype(AM, /obj/item) || isliving(AM)) //If stealable item
|
||||
parrot_interest = AM
|
||||
emote("[src] turns and flies towards [parrot_interest].")
|
||||
parrot_state = PARROT_SWOOP | PARROT_STEAL
|
||||
world << parrot_interest
|
||||
return
|
||||
else //Else it's a perch
|
||||
parrot_perch = AM
|
||||
parrot_state = PARROT_SWOOP | PARROT_RETURN
|
||||
world << parrot_interest
|
||||
return
|
||||
return
|
||||
|
||||
if(parrot_interest)
|
||||
if(parrot_interest in view(src)) //Putting this in a seperate if so it doesnt run the 'in view' loop as often
|
||||
parrot_state = PARROT_SWOOP | PARROT_STEAL
|
||||
return
|
||||
|
||||
if(parrot_perch)
|
||||
world << "Wander: returning to perch"
|
||||
parrot_state = PARROT_SWOOP | PARROT_RETURN
|
||||
return
|
||||
|
||||
else //Have an item but no perch? Find one!
|
||||
world << "Wander: looking for perch, holding item"
|
||||
parrot_perch = search_for_perch()
|
||||
if(parrot_perch)
|
||||
parrot_state = PARROT_SWOOP | PARROT_RETURN
|
||||
return
|
||||
//-----STEALING
|
||||
else if(parrot_state == (PARROT_SWOOP | PARROT_STEAL))
|
||||
world << "Steal"
|
||||
walk(src,0)
|
||||
if(!parrot_interest || held_item)
|
||||
world << "Steal: lost interest or holding an item"
|
||||
parrot_state = PARROT_SWOOP | PARROT_RETURN
|
||||
return
|
||||
|
||||
if(!(parrot_interest in view(src)))
|
||||
world << "Steal: interest not in view"
|
||||
parrot_state = PARROT_SWOOP | PARROT_RETURN
|
||||
return
|
||||
|
||||
if(in_range(src, parrot_interest))
|
||||
world << "Steal: stealing item"
|
||||
if(isliving(parrot_interest))
|
||||
steal_from_mob()
|
||||
else
|
||||
steal_from_ground()
|
||||
|
||||
parrot_interest = null
|
||||
parrot_state = PARROT_SWOOP | PARROT_RETURN
|
||||
return
|
||||
|
||||
world << "Steal: swooping closer to target"
|
||||
var/oldloc = src.loc
|
||||
step_towards(src, get_step_towards(src,parrot_interest))
|
||||
if(src.loc == oldloc) //Check if the mob is stuck
|
||||
parrot_state = PARROT_WANDER //and demonstrate your amazing obstical avoidance AI
|
||||
|
||||
return
|
||||
|
||||
//-----RETURNING TO PERCH
|
||||
else if(parrot_state == (PARROT_SWOOP | PARROT_RETURN))
|
||||
world << "Return"
|
||||
walk(src, 0)
|
||||
if(!parrot_perch || !isturf(parrot_perch.loc)) //Make sure the perch exists and somehow isnt inside of something else.
|
||||
world << "Return: no perch?"
|
||||
parrot_perch = null
|
||||
parrot_state = PARROT_WANDER
|
||||
return
|
||||
|
||||
if(in_range(src, parrot_perch))
|
||||
world << "Return: landing"
|
||||
src.loc = parrot_perch.loc
|
||||
drop_held_item()
|
||||
parrot_state = PARROT_PERCH
|
||||
return
|
||||
|
||||
world << "Return: returning to perch"
|
||||
var/oldloc = src.loc
|
||||
step_towards(src, get_step_towards(src,parrot_perch))
|
||||
if(src.loc == oldloc) //Check if the mob is stuck
|
||||
parrot_state = PARROT_WANDER //and demonstrate your amazing obstical avoidance AI
|
||||
return
|
||||
|
||||
//-----FLEEING
|
||||
else if(parrot_state == (PARROT_SWOOP | PARROT_FLEE))
|
||||
world << "Flee"
|
||||
walk(src,0)
|
||||
if(!parrot_interest || !isliving(parrot_interest)) //Sanity
|
||||
world << "Flee: lost interest"
|
||||
parrot_state = PARROT_WANDER
|
||||
|
||||
world << "Flee: fleeing"
|
||||
var/oldloc = src.loc
|
||||
step(src, get_step_away(src, parrot_interest))
|
||||
if(src.loc == oldloc) //Check if the mob is stuck
|
||||
parrot_state = PARROT_WANDER //and demonstrate your amazing obstical avoidance AI
|
||||
|
||||
//-----ATTACKING
|
||||
else if(parrot_state == (PARROT_SWOOP | PARROT_ATTACK))
|
||||
world << "Attack"
|
||||
|
||||
//If we're attacking a nothing, an object, a turf or a ghost for some stupid reason, switch to wander
|
||||
if(!parrot_interest || !isliving(parrot_interest))
|
||||
world << "Attack: lost interest"
|
||||
parrot_interest = null
|
||||
parrot_state = PARROT_WANDER
|
||||
return
|
||||
|
||||
var/mob/living/L = parrot_interest
|
||||
|
||||
//If the mob is close enough to interact with
|
||||
if(in_range(src, parrot_interest))
|
||||
|
||||
//If the mob we've been chasing/attacking dies or falls into crit, check for loot!
|
||||
if(L.stat)
|
||||
world << "Attack: looting body"
|
||||
parrot_interest = null
|
||||
if(!held_item)
|
||||
held_item = steal_from_ground()
|
||||
if(!held_item)
|
||||
held_item = steal_from_mob() //Apparently it's possible for dead mobs to hang onto items in certain circumstances.
|
||||
if(parrot_perch in view(src)) //If we have a home nearby, go to it, otherwise find a new home
|
||||
parrot_state = PARROT_SWOOP | PARROT_RETURN
|
||||
else
|
||||
parrot_state = PARROT_WANDER
|
||||
return
|
||||
|
||||
//Time for the hurt to begin!
|
||||
var/damage = rand(5,10)
|
||||
|
||||
if(ishuman(parrot_interest))
|
||||
world << "Attack: attacking human"
|
||||
var/mob/living/carbon/human/H = parrot_interest
|
||||
var/datum/organ/external/affecting = H.get_organ(ran_zone(pick(parrot_dam_zone)))
|
||||
|
||||
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"))
|
||||
emote(pick("pecks [H]'s [affecting]", "cuts [H]'s [affecting] with its talons"))
|
||||
|
||||
else
|
||||
world << "Attack: attacking non-human"
|
||||
L.adjustBruteLoss(damage)
|
||||
emote(pick("pecks at [L]", "claws [L]"))
|
||||
return
|
||||
|
||||
//Otherwise, fly towards the mob!
|
||||
else
|
||||
world << "Attack: swooping towards the mob"
|
||||
var/oldloc = src.loc
|
||||
step_towards(src, get_step_towards(src,parrot_interest))
|
||||
if(src.loc == oldloc) //Check if the mob is stuck
|
||||
parrot_state = PARROT_WANDER //and demonstrate your amazing obstical avoidance AI
|
||||
|
||||
//-----STATE MISHAP
|
||||
else //This should not happen. If it does lets reset everything and try again
|
||||
world << "Unknown state: resetting to wander"
|
||||
walk(src,0)
|
||||
parrot_interest = null
|
||||
parrot_perch = null
|
||||
drop_held_item()
|
||||
parrot_state = PARROT_WANDER
|
||||
return
|
||||
|
||||
/*
|
||||
* Procs
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/parrot/proc/search_for_item()
|
||||
for(var/atom/movable/AM in view(src))
|
||||
for(var/path in desired_items)
|
||||
if(parrot_perch && AM.loc == parrot_perch.loc) //Skip items we already stole
|
||||
continue
|
||||
|
||||
if(istype(AM, path))
|
||||
return AM
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
if(istype(C.l_hand, path) || istype(C.r_hand, path))
|
||||
return C
|
||||
return null
|
||||
|
||||
/mob/living/simple_animal/parrot/proc/search_for_perch()
|
||||
for(var/obj/O in view(src))
|
||||
for(var/path in desired_perches)
|
||||
if(istype(O, path))
|
||||
return O
|
||||
return null
|
||||
|
||||
//This proc was made to save on doing two 'in view' loops seperatly
|
||||
/mob/living/simple_animal/parrot/proc/search_for_perch_and_item()
|
||||
for(var/atom/movable/AM in view(src))
|
||||
for(var/perch_path in desired_perches)
|
||||
if(istype(AM, perch_path))
|
||||
return AM
|
||||
|
||||
for(var/item_path in desired_items)
|
||||
if(parrot_perch && AM.loc == parrot_perch.loc) //Skip items we already stole
|
||||
continue
|
||||
|
||||
if(istype(AM, item_path))
|
||||
return AM
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
if(istype(C.l_hand, item_path) || istype(C.r_hand, item_path))
|
||||
return AM
|
||||
return null
|
||||
|
||||
|
||||
/*
|
||||
* Verbs - These are actually procs, but can be used as verbs by player-controlled parrots.
|
||||
*/
|
||||
/mob/living/simple_animal/parrot/proc/steal_from_ground()
|
||||
set name = "Steal from ground"
|
||||
set category = "Parrot"
|
||||
set desc = "Grabs a nearby item."
|
||||
|
||||
if(stat)
|
||||
return -1
|
||||
|
||||
if(held_item)
|
||||
usr << "\red You are already holding the [held_item]"
|
||||
return 1
|
||||
|
||||
for(var/obj/item/I in view(1,src))
|
||||
for(var/path in desired_items)
|
||||
if(istype(I, path))
|
||||
held_item = I
|
||||
I.loc = src
|
||||
visible_message("[src] grabs the [held_item]!", "\blue You grab the [held_item]!", "You hear the sounds of wings flapping furiously.")
|
||||
return held_item
|
||||
|
||||
usr << "\red There is nothing of interest to take."
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/parrot/proc/steal_from_mob()
|
||||
set name = "Steal from mob"
|
||||
set category = "Parrot"
|
||||
set desc = "Steals an item right out of a person's hand!"
|
||||
if(stat)
|
||||
return -1
|
||||
|
||||
if(held_item)
|
||||
usr << "\red You are already holding the [held_item]"
|
||||
return 1
|
||||
|
||||
var/obj/item/stolen_item = null
|
||||
|
||||
for(var/mob/living/carbon/C in view(1,src))
|
||||
for(var/path in desired_items)
|
||||
if(istype(C.l_hand, path))
|
||||
stolen_item = C.l_hand
|
||||
|
||||
if(istype(C.r_hand, path))
|
||||
stolen_item = C.r_hand
|
||||
|
||||
if(stolen_item)
|
||||
C.u_equip(stolen_item)
|
||||
held_item = stolen_item
|
||||
stolen_item.loc = src
|
||||
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.")
|
||||
return held_item
|
||||
|
||||
usr << "\red There is nothing of interest to take."
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/parrot/proc/drop_held_item(var/drop_gently = 1)
|
||||
set name = "Drop held item"
|
||||
set category = "Parrot"
|
||||
set desc = "Drop the item you're holding."
|
||||
|
||||
if(stat)
|
||||
return -1
|
||||
|
||||
if(!held_item)
|
||||
usr << "\red You have nothing to drop!"
|
||||
return 0
|
||||
|
||||
if(!drop_gently)
|
||||
if(istype(held_item, /obj/item/weapon/grenade))
|
||||
var/obj/item/weapon/grenade/G = held_item
|
||||
G.loc = get_turf(src)
|
||||
G.prime()
|
||||
held_item = null
|
||||
|
||||
usr << "You drop the [held_item]."
|
||||
|
||||
held_item.loc = src.loc
|
||||
held_item = null
|
||||
return 1
|
||||
|
||||
/*
|
||||
* Sub-types
|
||||
*/
|
||||
/mob/living/simple_animal/parrot/Poly
|
||||
name = "Poly"
|
||||
desc = "Poly the Parrot. An expert on quantum cracker theory."
|
||||
speak = list("Poly wanna cracker!", ":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN HARDSUITS?",":e OH GOD ITS FREE CALL THE SHUTTLE")
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
var/main_status = 0
|
||||
var/wiresexposed = 0
|
||||
var/apcwires = 15
|
||||
netnum = -1 // set so that APCs aren't found as powernet nodes
|
||||
powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
|
||||
var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
|
||||
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
|
||||
// luminosity = 1
|
||||
|
||||
+66
-108
@@ -35,21 +35,13 @@
|
||||
|
||||
NC.mergeConnectedNetworks(NC.d2)
|
||||
NC.mergeConnectedNetworksOnTurf()
|
||||
if(netnum == 0 && NC.netnum == 0)
|
||||
var/datum/powernet/PN = new()
|
||||
|
||||
PN.number = powernets.len + 1
|
||||
powernets += PN
|
||||
NC.netnum = PN.number
|
||||
netnum = PN.number
|
||||
PN.cables += NC
|
||||
PN.nodes += src
|
||||
powernet = PN
|
||||
else if(netnum == 0)
|
||||
netnum = NC.netnum
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
powernet = PN
|
||||
PN.nodes += src
|
||||
if(powernet==null)
|
||||
if(NC.powernet == null)
|
||||
NC.powernet = new()
|
||||
powernets += NC.powernet
|
||||
NC.powernet.cables += NC
|
||||
powernet = NC.powernet
|
||||
NC.powernet.nodes += src
|
||||
NC.mergeConnectedNetworksOnTurf()
|
||||
|
||||
coil.use(1)
|
||||
@@ -82,15 +74,11 @@
|
||||
cable_list += src
|
||||
|
||||
|
||||
/obj/structure/cable/Del() // called when a cable is deleted
|
||||
|
||||
if(!defer_powernet_rebuild) // set if network will be rebuilt manually
|
||||
if(netnum && powernets && (powernets.len >= netnum) && (netnum >= 1) ) // make sure cable & powernet data is valid
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
PN.cut_cable(src) // updated the powernets
|
||||
/obj/structure/cable/Del() // called when a cable is deleted
|
||||
if(!defer_powernet_rebuild) // set if network will be rebuilt manually
|
||||
if(powernet)
|
||||
powernet.cut_cable(src) // update the powernets
|
||||
cable_list -= src
|
||||
// else
|
||||
// if(Debug) diary << "Defered cable deletion at [x],[y]: #[netnum]"
|
||||
..() // then go ahead and delete the cable
|
||||
|
||||
/obj/structure/cable/hide(var/i)
|
||||
@@ -107,11 +95,8 @@
|
||||
|
||||
|
||||
// returns the powernet this cable belongs to
|
||||
/obj/structure/cable/proc/get_powernet()
|
||||
var/datum/powernet/PN // find the powernet
|
||||
if(netnum && powernets && powernets.len >= netnum)
|
||||
PN = powernets[netnum]
|
||||
return PN
|
||||
/obj/structure/cable/proc/get_powernet() //TODO: remove this as it is obsolete
|
||||
return powernet
|
||||
|
||||
/obj/structure/cable/attack_hand(mob/user)
|
||||
if(ishuman(user))
|
||||
@@ -127,9 +112,9 @@
|
||||
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
|
||||
if(power_switch)
|
||||
user << "\red This piece of cable is tied to a power switch. Flip the switch to remove it."
|
||||
return
|
||||
// if(power_switch)
|
||||
// user << "\red This piece of cable is tied to a power switch. Flip the switch to remove it."
|
||||
// return
|
||||
|
||||
if (shock(user, 50))
|
||||
return
|
||||
@@ -174,7 +159,7 @@
|
||||
/obj/structure/cable/proc/shock(mob/user, prb, var/siemens_coeff = 1.0)
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
if (electrocute_mob(user, powernets[src.netnum], src, siemens_coeff))
|
||||
if (electrocute_mob(user, powernet, src, siemens_coeff))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
@@ -334,11 +319,9 @@
|
||||
C.add_fingerprint(user)
|
||||
C.updateicon()
|
||||
|
||||
var/datum/powernet/PN = new()
|
||||
PN.number = powernets.len + 1
|
||||
powernets += PN
|
||||
C.netnum = PN.number
|
||||
PN.cables += C
|
||||
C.powernet = new()
|
||||
powernets += C.powernet
|
||||
C.powernet.cables += C
|
||||
|
||||
C.mergeConnectedNetworks(C.d2)
|
||||
C.mergeConnectedNetworksOnTurf()
|
||||
@@ -399,11 +382,11 @@
|
||||
NC.add_fingerprint()
|
||||
NC.updateicon()
|
||||
|
||||
NC.netnum = C.netnum
|
||||
var/datum/powernet/PN = powernets[C.netnum]
|
||||
PN.cables += NC
|
||||
NC.mergeConnectedNetworks(NC.d2)
|
||||
NC.mergeConnectedNetworksOnTurf()
|
||||
if(C.powernet)
|
||||
NC.powernet = C.powernet
|
||||
NC.powernet.cables += NC
|
||||
NC.mergeConnectedNetworks(NC.d2)
|
||||
NC.mergeConnectedNetworksOnTurf()
|
||||
use(1)
|
||||
if (NC.shock(user, 50))
|
||||
if (prob(50)) //fail
|
||||
@@ -453,7 +436,7 @@
|
||||
|
||||
/obj/structure/cable/proc/mergeConnectedNetworks(var/direction)
|
||||
var/turf/TB
|
||||
if((d1 == direction || d2 == direction) != 1)
|
||||
if(!(d1 == direction || d2 == direction))
|
||||
return
|
||||
TB = get_step(src, direction)
|
||||
|
||||
@@ -469,79 +452,54 @@
|
||||
|
||||
if(TC.d1 == fdir || TC.d2 == fdir)
|
||||
|
||||
if(!netnum)
|
||||
var/datum/powernet/PN = powernets[TC.netnum]
|
||||
netnum = TC.netnum
|
||||
PN = powernets[netnum]
|
||||
PN.cables += src
|
||||
continue
|
||||
if(!TC.powernet)
|
||||
TC.powernet = new()
|
||||
powernets += TC.powernet
|
||||
TC.powernet.cables += TC
|
||||
|
||||
if(powernet)
|
||||
merge_powernets(powernet,TC.powernet)
|
||||
else
|
||||
powernet = TC.powernet
|
||||
powernet.cables += src
|
||||
|
||||
|
||||
if(TC.netnum != netnum)
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
var/datum/powernet/TPN = powernets[TC.netnum]
|
||||
|
||||
PN.merge_powernets(TPN)
|
||||
|
||||
/obj/structure/cable/proc/mergeConnectedNetworksOnTurf()
|
||||
if(!powernet)
|
||||
powernet = new()
|
||||
powernets += powernet
|
||||
powernet.cables += src
|
||||
|
||||
for(var/AM in loc)
|
||||
if(istype(AM,/obj/structure/cable))
|
||||
var/obj/structure/cable/C = AM
|
||||
if(C.powernet == powernet) continue
|
||||
if(C.powernet)
|
||||
merge_powernets(powernet, C.powernet)
|
||||
else
|
||||
C.powernet = powernet
|
||||
powernet.cables += C
|
||||
|
||||
for(var/obj/structure/cable/C in loc)
|
||||
else if(istype(AM,/obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/N = AM
|
||||
if(!N.terminal) continue
|
||||
if(N.terminal.powernet)
|
||||
merge_powernets(powernet, N.terminal.powernet)
|
||||
else
|
||||
N.terminal.powernet = powernet
|
||||
powernet.nodes += N.terminal
|
||||
|
||||
else if(istype(AM,/obj/machinery/power))
|
||||
var/obj/machinery/power/M = AM
|
||||
if(M.powernet == powernet) continue
|
||||
if(M.powernet)
|
||||
merge_powernets(powernet, M.powernet)
|
||||
else
|
||||
M.powernet = powernet
|
||||
powernet.nodes += M
|
||||
|
||||
if(!C)
|
||||
continue
|
||||
|
||||
if(C == src)
|
||||
continue
|
||||
if(netnum == 0)
|
||||
var/datum/powernet/PN = powernets[C.netnum]
|
||||
netnum = C.netnum
|
||||
PN.cables += src
|
||||
continue
|
||||
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
var/datum/powernet/TPN = powernets[C.netnum]
|
||||
|
||||
PN.merge_powernets(TPN)
|
||||
|
||||
for(var/obj/machinery/power/M in loc)
|
||||
|
||||
if(!M)
|
||||
continue
|
||||
|
||||
if(!M.netnum)
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
PN.nodes += M
|
||||
M.netnum = netnum
|
||||
M.powernet = powernets[M.netnum]
|
||||
|
||||
if(M.netnum < 0)
|
||||
continue
|
||||
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
var/datum/powernet/TPN = powernets[M.netnum]
|
||||
|
||||
PN.merge_powernets(TPN)
|
||||
|
||||
for(var/obj/machinery/power/apc/N in loc)
|
||||
if(!N) continue
|
||||
|
||||
var/obj/machinery/power/M
|
||||
M = N.terminal
|
||||
if(!M) continue
|
||||
|
||||
if(!M.netnum)
|
||||
if(!netnum)continue
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
PN.nodes += M
|
||||
M.netnum = netnum
|
||||
M.powernet = powernets[M.netnum]
|
||||
continue
|
||||
|
||||
var/datum/powernet/PN = powernets[netnum]
|
||||
var/datum/powernet/TPN = powernets[M.netnum]
|
||||
|
||||
PN.merge_powernets(TPN)
|
||||
|
||||
obj/structure/cable/proc/cableColor(var/colorC)
|
||||
var/color_n = "red"
|
||||
|
||||
+166
-213
@@ -3,7 +3,6 @@
|
||||
icon = 'icons/obj/power.dmi'
|
||||
anchored = 1.0
|
||||
var/datum/powernet/powernet = null
|
||||
var/netnum = 0
|
||||
var/directwired = 1 // by default, power machines are connected by a cable in a neighbouring turf
|
||||
// if set to 0, requires a 0-X cable on this turf
|
||||
use_power = 0
|
||||
@@ -43,7 +42,7 @@
|
||||
if(!A || !isarea(A) || !A.master)
|
||||
return 0 // if not, then not powered
|
||||
|
||||
return A.master.powered(power_channel) // return power status of the area
|
||||
return A.master.powered(chan) // return power status of the area
|
||||
|
||||
// increment the power usage stats for an area
|
||||
|
||||
@@ -72,263 +71,213 @@
|
||||
// rebuild all power networks from scratch
|
||||
|
||||
/proc/makepowernets()
|
||||
|
||||
var/netcount = 0
|
||||
powernets = list()
|
||||
for(var/datum/powernet/PN in powernets)
|
||||
del(PN)
|
||||
powernets.Cut()
|
||||
|
||||
for(var/obj/structure/cable/PC in cable_list)
|
||||
PC.netnum = 0
|
||||
for(var/obj/machinery/power/M in machines)
|
||||
if(M.netnum >=0)
|
||||
M.netnum = 0
|
||||
|
||||
|
||||
for(var/obj/structure/cable/PC in cable_list)
|
||||
if(!PC.netnum)
|
||||
PC.netnum = ++netcount
|
||||
|
||||
if(Debug) world.log << "Starting mpn at [PC.x],[PC.y] ([PC.d1]/[PC.d2]) #[netcount]"
|
||||
powernet_nextlink(PC, PC.netnum)
|
||||
|
||||
if(Debug) world.log << "[netcount] powernets found"
|
||||
|
||||
for(var/L = 1 to netcount)
|
||||
var/datum/powernet/PN = new()
|
||||
powernets += PN
|
||||
PN.number = L
|
||||
if(!PC.powernet)
|
||||
PC.powernet = new()
|
||||
powernets += PC.powernet
|
||||
// if(Debug) world.log << "Starting mpn at [PC.x],[PC.y] ([PC.d1]/[PC.d2])"
|
||||
powernet_nextlink(PC,PC.powernet)
|
||||
|
||||
// if(Debug) world.log << "[powernets.len] powernets found"
|
||||
|
||||
for(var/obj/structure/cable/C in cable_list)
|
||||
var/datum/powernet/PN = powernets[C.netnum]
|
||||
PN.cables += C
|
||||
if(!C.powernet) continue
|
||||
C.powernet.cables += C
|
||||
|
||||
for(var/obj/machinery/power/M in machines)
|
||||
if(M.netnum<=0) // APCs have netnum=-1 so they don't count as network nodes directly
|
||||
continue
|
||||
|
||||
M.powernet = powernets[M.netnum]
|
||||
if(!M.powernet) continue // APCs have powernet=0 so they don't count as network nodes directly
|
||||
M.powernet.nodes += M
|
||||
|
||||
|
||||
// returns a list of all power-related objects (nodes, cable, junctions) in turf,
|
||||
// excluding source, that match the direction d
|
||||
// if unmarked==1, only return those with netnum==0
|
||||
|
||||
// if unmarked==1, only return those with no powernet
|
||||
/proc/power_list(var/turf/T, var/source, var/d, var/unmarked=0)
|
||||
var/list/result = list()
|
||||
var/fdir = (!d)? 0 : turn(d, 180) // the opposite direction to d (or 0 if d==0)
|
||||
. = list()
|
||||
var/fdir = (!d)? 0 : turn(d, 180) // the opposite direction to d (or 0 if d==0)
|
||||
// world.log << "d=[d] fdir=[fdir]"
|
||||
for(var/AM in T)
|
||||
if(AM == source) continue //we don't want to return source
|
||||
|
||||
for(var/obj/machinery/power/P in T)
|
||||
if(P.netnum < 0) // exclude APCs
|
||||
continue
|
||||
if(istype(AM,/obj/machinery/power))
|
||||
var/obj/machinery/power/P = AM
|
||||
if(P.powernet == 0) continue // exclude APCs which have powernet=0
|
||||
|
||||
if(P.directwired) // true if this machine covers the whole turf (so can be joined to a cable on neighbour turf)
|
||||
if(!unmarked || !P.netnum)
|
||||
result += P
|
||||
else if(d == 0) // otherwise, need a 0-X cable on same turf to connect
|
||||
if(!unmarked || !P.netnum)
|
||||
result += P
|
||||
if(!unmarked || !P.powernet) //if unmarked=1 we only return things with no powernet
|
||||
if(P.directwired || (d == 0))
|
||||
. += P
|
||||
|
||||
else if(istype(AM,/obj/structure/cable))
|
||||
var/obj/structure/cable/C = AM
|
||||
|
||||
for(var/obj/structure/cable/C in T)
|
||||
if(C.d1 == fdir || C.d2 == fdir)
|
||||
if(!unmarked || !C.netnum)
|
||||
result += C
|
||||
|
||||
result -= source
|
||||
|
||||
return result
|
||||
if(!unmarked || !C.powernet)
|
||||
if(C.d1 == fdir || C.d2 == fdir)
|
||||
. += C
|
||||
return .
|
||||
|
||||
|
||||
/obj/structure/cable/proc/get_connections()
|
||||
. = list() // this will be a list of all connected power objects
|
||||
var/turf/T = loc
|
||||
|
||||
var/list/res = list() // this will be a list of all connected power objects
|
||||
|
||||
var/turf/T
|
||||
if(!d1)
|
||||
T = src.loc // if d1=0, same turf as src
|
||||
else
|
||||
T = get_step(src, d1)
|
||||
|
||||
res += power_list(T, src , d1, 1)
|
||||
if(d1) T = get_step(src, d1)
|
||||
if(T) . += power_list(T, src, d1, 1)
|
||||
|
||||
T = get_step(src, d2)
|
||||
if(T) . += power_list(T, src, d2, 1)
|
||||
|
||||
res += power_list(T, src, d2, 1)
|
||||
|
||||
return res
|
||||
return .
|
||||
|
||||
|
||||
/obj/machinery/power/proc/get_connections()
|
||||
if(!directwired) return get_indirect_connections()
|
||||
|
||||
if(!directwired)
|
||||
return get_indirect_connections()
|
||||
|
||||
var/list/res = list()
|
||||
. = list()
|
||||
var/cdir
|
||||
|
||||
for(var/turf/T in orange(1, src))
|
||||
|
||||
cdir = get_dir(T, src)
|
||||
for(var/card in cardinal)
|
||||
var/turf/T = get_step(loc,card)
|
||||
cdir = get_dir(T,loc)
|
||||
|
||||
for(var/obj/structure/cable/C in T)
|
||||
|
||||
if(C.netnum)
|
||||
continue
|
||||
|
||||
if(C.powernet) continue
|
||||
if(C.d1 == cdir || C.d2 == cdir)
|
||||
res += C
|
||||
|
||||
return res
|
||||
. += C
|
||||
return .
|
||||
|
||||
/obj/machinery/power/proc/get_indirect_connections()
|
||||
|
||||
var/list/res = list()
|
||||
|
||||
for(var/obj/structure/cable/C in src.loc)
|
||||
|
||||
if(C.netnum)
|
||||
continue
|
||||
|
||||
. = list()
|
||||
for(var/obj/structure/cable/C in loc)
|
||||
if(C.powernet) continue
|
||||
if(C.d1 == 0)
|
||||
res += C
|
||||
|
||||
return res
|
||||
. += C
|
||||
return .
|
||||
|
||||
|
||||
/proc/powernet_nextlink(var/obj/O, var/num)
|
||||
|
||||
/proc/powernet_nextlink(var/obj/O, var/datum/powernet/PN)
|
||||
var/list/P
|
||||
|
||||
//world.log << "start: [O] at [O.x].[O.y]"
|
||||
|
||||
|
||||
while(1)
|
||||
|
||||
if( istype(O, /obj/structure/cable) )
|
||||
if( istype(O,/obj/structure/cable) )
|
||||
var/obj/structure/cable/C = O
|
||||
|
||||
C.netnum = num
|
||||
C.powernet = PN
|
||||
P = C.get_connections()
|
||||
|
||||
else if( istype(O, /obj/machinery/power) )
|
||||
|
||||
else if( istype(O,/obj/machinery/power) )
|
||||
var/obj/machinery/power/M = O
|
||||
|
||||
M.netnum = num
|
||||
M.powernet = PN
|
||||
P = M.get_connections()
|
||||
|
||||
if(P.len == 0)
|
||||
//world.log << "end1"
|
||||
return
|
||||
if(P.len == 0) return
|
||||
|
||||
O = P[1]
|
||||
|
||||
|
||||
for(var/L = 2 to P.len)
|
||||
|
||||
powernet_nextlink(P[L], num)
|
||||
|
||||
//world.log << "next: [O] at [O.x].[O.y]"
|
||||
powernet_nextlink(P[L], PN)
|
||||
|
||||
|
||||
// cut a powernet at this cable object
|
||||
|
||||
/datum/powernet/proc/cut_cable(var/obj/structure/cable/C)
|
||||
|
||||
var/turf/T1 = C.loc
|
||||
if(C.d1)
|
||||
T1 = get_step(C, C.d1)
|
||||
if(!T1) return
|
||||
|
||||
var/turf/T2
|
||||
if(C.d2) T2 = get_step(T1, C.d2)
|
||||
if(C.d1) T1 = get_step(T1, C.d1)
|
||||
|
||||
var/turf/T2 = get_step(C, C.d2)
|
||||
|
||||
var/list/P1 = power_list(T1, C, C.d1) // what joins on to cut cable in dir1
|
||||
|
||||
var/list/P2 = power_list(T2, C, C.d2) // what joins on to cut cable in dir2
|
||||
|
||||
if(Debug)
|
||||
for(var/obj/O in P1)
|
||||
world.log << "P1: [O] at [O.x] [O.y] : [istype(O, /obj/structure/cable) ? "[O:d1]/[O:d2]" : null] "
|
||||
for(var/obj/O in P2)
|
||||
world.log << "P2: [O] at [O.x] [O.y] : [istype(O, /obj/structure/cable) ? "[O:d1]/[O:d2]" : null] "
|
||||
// if(Debug)
|
||||
// for(var/obj/O in P1)
|
||||
// world.log << "P1: [O] at [O.x] [O.y] : [istype(O, /obj/structure/cable) ? "[O:d1]/[O:d2]" : null] "
|
||||
// for(var/obj/O in P2)
|
||||
// world.log << "P2: [O] at [O.x] [O.y] : [istype(O, /obj/structure/cable) ? "[O:d1]/[O:d2]" : null] "
|
||||
|
||||
|
||||
|
||||
if(P1.len == 0 || P2.len ==0) // if nothing in either list, then the cable was an endpoint
|
||||
// no need to rebuild the powernet, just remove cut cable from the list
|
||||
cables -= C
|
||||
if(Debug) world.log << "Was end of cable"
|
||||
if(P1.len == 0 || P2.len == 0)//if nothing in either list, then the cable was an endpoint no need to rebuild the powernet,
|
||||
cables -= C //just remove cut cable from the list
|
||||
// if(Debug) world.log << "Was end of cable"
|
||||
return
|
||||
|
||||
// zero the netnum of all cables & nodes in this powernet
|
||||
|
||||
for(var/obj/structure/cable/OC in cables)
|
||||
OC.netnum = 0
|
||||
for(var/obj/machinery/power/OM in nodes)
|
||||
OM.netnum = 0
|
||||
|
||||
//null the powernet reference of all cables & nodes in this powernet
|
||||
var/i=1
|
||||
while(i<=cables.len)
|
||||
var/obj/structure/cable/Cable = cables[i]
|
||||
if(Cable)
|
||||
Cable.powernet = null
|
||||
if(Cable == C)
|
||||
cables.Cut(i,i+1)
|
||||
continue
|
||||
i++
|
||||
i=1
|
||||
while(i<=nodes.len)
|
||||
var/obj/machinery/power/Node = nodes[i]
|
||||
if(Node) Node.powernet = null
|
||||
i++
|
||||
|
||||
// remove the cut cable from the network
|
||||
C.netnum = -1
|
||||
// C.netnum = -1
|
||||
C.loc = null
|
||||
cables -= C
|
||||
|
||||
|
||||
|
||||
powernet_nextlink(P1[1], number) // propagate network from 1st side of cable, using current netnum
|
||||
powernet_nextlink(P1[1], src) // propagate network from 1st side of cable, using current netnum //TODO?
|
||||
|
||||
// now test to see if propagation reached to the other side
|
||||
// if so, then there's a loop in the network
|
||||
|
||||
var/notlooped = 0
|
||||
for(var/obj/O in P2)
|
||||
for(var/O in P2)
|
||||
if( istype(O, /obj/machinery/power) )
|
||||
var/obj/machinery/power/OM = O
|
||||
if(OM.netnum != number)
|
||||
var/obj/machinery/power/Machine = O
|
||||
if(Machine.powernet != src)
|
||||
notlooped = 1
|
||||
break
|
||||
else if( istype(O, /obj/structure/cable) )
|
||||
var/obj/structure/cable/OC = O
|
||||
if(OC.netnum != number)
|
||||
var/obj/structure/cable/Cable = O
|
||||
if(Cable.powernet != src)
|
||||
notlooped = 1
|
||||
break
|
||||
|
||||
if(notlooped)
|
||||
|
||||
// not looped, so make a new powernet
|
||||
|
||||
var/datum/powernet/PN = new()
|
||||
powernets += PN
|
||||
PN.number = powernets.len
|
||||
|
||||
if(Debug) world.log << "Was not looped: spliting PN#[number] ([cables.len];[nodes.len])"
|
||||
// if(Debug) world.log << "Was not looped: spliting PN#[number] ([cables.len];[nodes.len])"
|
||||
|
||||
for(var/obj/structure/cable/OC in cables)
|
||||
i=1
|
||||
while(i<=cables.len)
|
||||
var/obj/structure/cable/Cable = cables[i]
|
||||
if(Cable && !Cable.powernet) // non-connected cables will have powernet=null, since they weren't reached by propagation
|
||||
Cable.powernet = PN
|
||||
cables.Cut(i,i+1) // remove from old network & add to new one
|
||||
PN.cables += Cable
|
||||
continue
|
||||
i++
|
||||
|
||||
if(!OC.netnum) // non-connected cables will have netnum==0, since they weren't reached by propagation
|
||||
i=1
|
||||
while(i<=nodes.len)
|
||||
var/obj/machinery/power/Node = nodes[i]
|
||||
if(Node && !Node.powernet)
|
||||
Node.powernet = PN
|
||||
nodes.Cut(i,i+1)
|
||||
PN.nodes += Node
|
||||
continue
|
||||
i++
|
||||
|
||||
OC.netnum = PN.number
|
||||
cables -= OC
|
||||
PN.cables += OC // remove from old network & add to new one
|
||||
|
||||
for(var/obj/machinery/power/OM in nodes)
|
||||
if(!OM.netnum)
|
||||
OM.netnum = PN.number
|
||||
OM.powernet = PN
|
||||
nodes -= OM
|
||||
PN.nodes += OM // same for power machines
|
||||
|
||||
if(Debug)
|
||||
world.log << "Old PN#[number] : ([cables.len];[nodes.len])"
|
||||
world.log << "New PN#[PN.number] : ([PN.cables.len];[PN.nodes.len])"
|
||||
|
||||
else
|
||||
if(Debug)
|
||||
world.log << "Was looped."
|
||||
//there is a loop, so nothing to be done
|
||||
return
|
||||
|
||||
return
|
||||
// if(Debug)
|
||||
// world.log << "Old PN#[number] : ([cables.len];[nodes.len])"
|
||||
// world.log << "New PN#[PN.number] : ([PN.cables.len];[PN.nodes.len])"
|
||||
//
|
||||
// else
|
||||
// if(Debug)
|
||||
// world.log << "Was looped."
|
||||
// //there is a loop, so nothing to be done
|
||||
// return
|
||||
|
||||
|
||||
|
||||
@@ -379,52 +328,57 @@
|
||||
return min(rand(10,20),rand(10,20))*/
|
||||
if (1000000 to INFINITY)
|
||||
return min(rand(50,160),rand(50,160))
|
||||
if (200000 to 1000000-1)
|
||||
if (200000 to 1000000)
|
||||
return min(rand(25,80),rand(25,80))
|
||||
if (100000 to 200000-1)//Ave powernet
|
||||
if (100000 to 200000)//Ave powernet
|
||||
return min(rand(20,60),rand(20,60))
|
||||
if (50000 to 100000-1)
|
||||
if (50000 to 100000)
|
||||
return min(rand(15,40),rand(15,40))
|
||||
if (1000 to 50000-1)
|
||||
if (1000 to 50000)
|
||||
return min(rand(10,20),rand(10,20))
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/powernet/proc/merge_powernets(var/datum/powernet/P)
|
||||
// The powernet that calls this proc will consume the other powernet - Rockdtben
|
||||
//The powernet that calls this proc will consume the other powernet - Rockdtben
|
||||
//TODO: rewrite so the larger net absorbs the smaller net
|
||||
/proc/merge_powernets(var/datum/powernet/net1, var/datum/powernet/net2)
|
||||
if(!net1 || !net2) return
|
||||
if(net1 == net2) return
|
||||
|
||||
if(src == P)
|
||||
return
|
||||
//We assume net1 is larger. If net2 is in fact larger we are just going to make them switch places to reduce on code.
|
||||
if(net1.cables.len < net2.cables.len) //net2 is larger than net1. Let's switch them around
|
||||
var/temp = net1
|
||||
net1 = net2
|
||||
net2 = temp
|
||||
|
||||
if(nodes.len >= P.nodes.len)
|
||||
nodes += P.nodes
|
||||
else
|
||||
P.nodes += nodes
|
||||
nodes = P.nodes
|
||||
for(var/obj/machinery/power/M in nodes)
|
||||
M.netnum = number
|
||||
M.powernet = powernets[M.netnum] // Thanks to Derp__
|
||||
for(var/i=1,i<=net2.nodes.len,i++) //merge net2 into net1
|
||||
var/obj/machinery/power/Node = net2.nodes[i]
|
||||
if(Node)
|
||||
Node.powernet = net1
|
||||
net1.nodes += Node
|
||||
|
||||
for(var/i=1,i<=net2.cables.len,i++)
|
||||
var/obj/structure/cable/Cable = net2.cables[i]
|
||||
if(Cable)
|
||||
Cable.powernet = net1
|
||||
net1.cables += Cable
|
||||
|
||||
del(net2)
|
||||
return net1
|
||||
|
||||
if(cables.len >= P.cables.len)
|
||||
cables += P.cables
|
||||
else
|
||||
P.cables += cables
|
||||
cables = P.cables
|
||||
for(var/obj/structure/cable/C in cables)
|
||||
C.netnum = number
|
||||
del P
|
||||
|
||||
/obj/machinery/power/proc/connect_to_network()
|
||||
var/turf/T = src.loc
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if (!C || !C.netnum)
|
||||
return
|
||||
makepowernets() //TODO: find fast way
|
||||
if(!C || !C.powernet) return
|
||||
// makepowernets() //TODO: find fast way //EWWWW what are you doing!?
|
||||
powernet = C.powernet
|
||||
powernet.nodes += src
|
||||
|
||||
/obj/machinery/power/proc/disconnect_from_network()
|
||||
//TODO: dunno how to do that
|
||||
return
|
||||
if(!powernet) return
|
||||
powernet.nodes -= src
|
||||
powernet = null
|
||||
|
||||
/turf/proc/get_cable_node()
|
||||
if(!istype(src, /turf/simulated/floor))
|
||||
@@ -447,31 +401,29 @@
|
||||
//source is an object caused electrocuting (airlock, grille, etc)
|
||||
//No animations will be performed by this proc.
|
||||
/proc/electrocute_mob(mob/living/carbon/M as mob, var/power_source, var/obj/source, var/siemens_coeff = 1.0)
|
||||
if(istype(M.loc,/obj/mecha))
|
||||
return 0
|
||||
if(istype(M.loc,/obj/mecha)) return 0 //feckin mechs are dumb
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
var/siem_coef = G.siemens_coefficient
|
||||
if(siem_coef == 0) //to avoid spamming with insulated glvoes on
|
||||
return 0
|
||||
if(G.siemens_coefficient == 0) return 0 //to avoid spamming with insulated glvoes on
|
||||
|
||||
var/area/source_area
|
||||
if (istype(power_source,/area))
|
||||
if(istype(power_source,/area))
|
||||
source_area = power_source
|
||||
power_source = source_area.get_apc()
|
||||
if (istype(power_source,/obj/structure/cable))
|
||||
var/obj/structure/cable/tmp = power_source
|
||||
power_source = powernets[tmp.netnum]
|
||||
if(istype(power_source,/obj/structure/cable))
|
||||
var/obj/structure/cable/Cable = power_source
|
||||
power_source = Cable.powernet
|
||||
|
||||
var/datum/powernet/PN
|
||||
var/obj/item/weapon/cell/cell
|
||||
|
||||
if (istype(power_source,/datum/powernet))
|
||||
if(istype(power_source,/datum/powernet))
|
||||
PN = power_source
|
||||
else if (istype(power_source,/obj/item/weapon/cell))
|
||||
else if(istype(power_source,/obj/item/weapon/cell))
|
||||
cell = power_source
|
||||
else if (istype(power_source,/obj/machinery/power/apc))
|
||||
else if(istype(power_source,/obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/apc = power_source
|
||||
cell = apc.cell
|
||||
if (apc.terminal)
|
||||
@@ -506,4 +458,5 @@
|
||||
PN.newload+=drained_power
|
||||
else if (istype(power_source, /obj/item/weapon/cell))
|
||||
cell.use(drained_energy)
|
||||
return drained_energy
|
||||
return drained_energy
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//After it knows this it creates the number of cables from the center to each of the cables attempting to conenct. These cables cannot be removed
|
||||
//with wirecutters. When the switch is turned off it removes all the cables on the tile it's on.
|
||||
//The switch uses a 5s delay to prevent powernet change spamming.
|
||||
|
||||
/*
|
||||
/obj/structure/powerswitch
|
||||
name = "power switch"
|
||||
desc = "A switch that controls power."
|
||||
@@ -81,4 +81,5 @@
|
||||
else
|
||||
icon_state = icon_state_off
|
||||
for(var/obj/structure/cable/C in src.loc)
|
||||
del(C)
|
||||
del(C)
|
||||
*/
|
||||
@@ -58,6 +58,15 @@ should be listed in the changelog upon commit though. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">6 September 2012</h2>
|
||||
<h3 class="author">Giacom updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">AIs can now move around their holograms. I am also experimenting by making them area dependant, instead of depending on the range between the holopad and the hologram.</li>
|
||||
<li class="tweak">Removed cameras from bots. They weren't working well with freelook and I felt that since they weren't used at all, they wouldn't be missed.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">3 September 2012</h2>
|
||||
<h3 class="author">Giacom updated:</h3>
|
||||
|
||||
+6627
-6629
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user