Newmap - SMC, Openturf, Arrivals Controller, and Mine Turf Improvements (#1958)

* Replace SSingulo with SScalamity; processing cleanup
- SScalamity now handles blobs as well as singularity-types.
- Processing subtypes have been simplified to not require a stop_processing definition.

* this is probably important

* Remove cascade disabling SSgarbage

* Fixed a bug where dust() did not qdel the target mob

* Misc fixes

* Fix decals surviving break-to-plating

* Subsystem flag tweaks

* Apparently subsystems are new'd before config is.

* Fix paper icons

* Speculative fix for insane lag

* Better machinery stat

* Make organs not use SSoverlay

* Misc bugfixes & tweaks

* Nightmode fixes

* Changelog for SMC

* Port /tg/'s improved MC crash handling

* Add some more SS Recover() procs

* supply_controller -> SScargo

* More New() -> Initialize()

* pAI and robot construction overlays

* Fix cargo unit tests

* Merge the DMM Suite's atom/New() into atoms_init

* Lighting pre-baking

* Lighting initialization logging

* Fix some bad SS init orders

* Fix SSlighting logging; rename Processes to MC

* Speculative fix for insane GC lag

* Prebaked openturf/icon_smooth & fix lighting prebake

* SS init status; SSatoms LATEQDEL

* Fix bug with MC init stat panel

* Fix parallax

* Misc

* Ignore SS_NO_DISPLAY during init

* apparently this is important

* REEEEEE

* Image GC fixes; broadcaster radio-new sanity

* RCON Cleanup

* Move pAI recruiter into subsystem

* Move global solars list into sun subsystem

* Make chickens not use a global

* Demote SSdisposals to SS_BACKGROUND; garbage-debug cleanup

* Speed up space init a little

* Fix bad timer flags on floor drying

* Subsystem panic-restart verb for mins

* Explosion speedup

* Minor subsystem & MC logging tweaks

* SSopenturf improvements

* Make pipenet actually initialize (whoops)

* Minor tweaks

* Implement lighting rounding

* comments are hard okay

* Minor lattice tweaks

* Fix some timer issues & better closet init

* Timer sanity

* Request console tweaks + Storage init sanity

* Minor SSmachiner RCON improvements

* Further reduce world-start timer count

* Standardize subsystem logging

* Garbage hard delete profiling from /tg/

* Timer hang detection & recovery

* Log machines that sleep in process() and fuck up SSmachinery

* Fix an issue with external airlocks sleeping in process()

* Failsafe logging

* Minor tweaks

* Revert "Request console tweaks + Storage init sanity"

This reverts commit 98d3579e35.

* Re-implement RC changes

* Fix SQL FT saving

* Fix SSmachinery sleep in disposals

* Minor SS tweaks

* Paper fixes

* Blood drying fixes

* Merge gameticker and SSticker

* Minor global list init cleanup

* Lagcheck biogenerator & bags

* Tweak SScargo init order; RIG Initialize()

* Caching tweaks

* Remove rogue comma

* Initialize fixes

* Lighting destroy cleanup

* Fix emagging airlocks

* Initial SSicon implementation

* Tweaks & Fixes

* Fire + Air alarm queued icon updates

* Overlays + Queued icon cleanup

* Runtime & background fixes

* Kill some meaningless set statements

* Kill some image qdels

* Bump up lighting rounding val

* Fix adv. scanner destroy runtimes

* Remove unneeded icon update limiting

* Move icon smoothing into helpers

* Show a warning if DM 510 compiles without memory leak hack enabled

* Re-organize subsystems & MC defines a little

* Airlock SFX

* Log of Changes

* Make SSicon_update disable itself when not doing anything

* Fix respawn verb runtime when used early in server-init

* Add more information to MC's stat_entry()

* Replace direct refernces to gcDestroyed with QDEL* macros

* plant_controller -> SSplants

* More plant tweaks

* Add more humor to changelog

* Move parallax globals into SSparallax

* Lighting responsiveness tweaks

* Fix parallax init order & better MC init panel stat

* Make mobs GC

* More overlays + Remove intercom spawn()

* SSfast_process; make pinpointers not use spawn-recursion to process
Also made the SM Cascade beach process with SSprocessing instead of a spawn loop.

* Update changelog

* Mob GC tweaks

* Del() cleanup

* Fix insomniac ZAS connection edges

* Minor pAI cleanup

* Convert more things to SSoverlay; fix duplicated overlay in field gens

* SM Bluespace turf tweaks

* Update SSgarbage debug globals list

* Human-type qdel tweaks

* Subsystem suspension; stat_entry improvements

* SQL Statistics cleanup

* Fix runtimes with ambrosia

* More disable() -> suspend(); fix nightmode again

* Human qdel fix; minor tweaks

* Update turbolift to work with StonedMC

* Make lifts use timers instead of a subsystem

* Make SSassets start earlier

* Convert the radio controller into a subsystem

* Fix some missing CHECK_TICKs in asteroid generation

* MC stat tweaks; make shouldnt_see a typecache

* Kill some redundant debug-controller entries

* radio_controller -> SSradio

* Better SSgarbage hard-del logging from /tg/ upstream

* Logging tweaks + GELF

* Misc client caching improvements

* Slime SSoverlay

* Oven icon fixes

* Implant fixes
- Death implants will no longer spam Common on death of user.
- Death implants should handle a deleted user better.

* Holder tweaks + Welding tool Initialize()

* Fix some bad subsystem logging

* Fix suit cooling units spawning without cells

* Starlight tweaks

* Gibber infinite gib fix

* More SSoverlay stuff

* Make crates use CUT_OVERLAY_IN

* Make SSarrivals suspend instead of disable

* Make openturf use split/phased tick checks

* Speculative fix for unwet timer runtimes

* Blood overlay tweaks/fixes

* Update crusher to play nice with SMC + SSoverlay

* Openturf improvements and fixes

* Minor turbolift tweaks

* Lighting performance improvements + ChangeTurf tweaks

* this is probably important

* Fix wall weld noises on changeturf

* More ChangeTurf tweaks

* Explosion tweaks

* Pre-game lobby tweaks

* Openturf tweaks

* Prevent admins from starting the game before init finishes

* Fix Travis

* Kill an unused var

* Fix ChangeTurf runtimes on openturfs

* Fixes

* Browser datum fixes, asset caching

* Update changelog

* Changelog

* Lobby tweaks

* Ticker tweaks; kill ticker var

* Further lobby tweaks

* Cascade tweaks

* air_master -> SSair

* Reduce overhead from radio autosay

* alarm_manager -> SSalarm

* bomb_processor -> SSexplosives

* corp_regs -> SSlaw

* ZAS overlay fixes

* Small wall icon optimization

* Fix effects master

* Assembly tweaks

* Megavend fixes

* Shuttle fixes

* Camera alert performance improvements

* Fix some world.log spam from lighting overlays

* Fix some Initialize() procs

* Openspace responsiveness tweaks

* Make HE pipes animate through openturfs

* Kill a spawn
This commit is contained in:
Lohikar
2017-05-02 14:40:40 -04:00
committed by LordFowl
parent 9dbf27a0f4
commit f6dc33a465
872 changed files with 17767 additions and 13417 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
/obj/structure/alien/egg/Destroy()
processing_objects -= src
..()
return ..()
/obj/structure/alien/egg/CanUseTopic(var/mob/user)
return isobserver(user) ? STATUS_INTERACTIVE : STATUS_CLOSE
+2 -2
View File
@@ -11,9 +11,9 @@
/obj/structure/alien/node/Destroy()
processing_objects -= src
..()
return ..()
/obj/structure/alien/node/process()
if(locate(/obj/effect/plant) in loc)
return
new /obj/effect/plant(get_turf(src), plant_controller.seeds["xenomorph"])
new /obj/effect/plant(get_turf(src), SSplants.seeds["xenomorph"])
+2 -2
View File
@@ -28,7 +28,7 @@
/obj/structure/alien/resin/Destroy()
var/turf/T = get_turf(src)
T.thermal_conductivity = initial(T.thermal_conductivity)
..()
return ..()
/obj/structure/alien/resin/attack_hand(var/mob/user)
if (HULK in user.mutations)
@@ -47,4 +47,4 @@
// Todo check attack datums.
health -= rand(5,10)
healthcheck()
return
return
+4 -4
View File
@@ -43,10 +43,10 @@
return 1
/obj/structure/coatrack/update_icon()
overlays.Cut()
cut_overlays()
if (istype(coat, /obj/item/clothing/suit/storage/toggle/labcoat))
overlays += image(icon, icon_state = "coat_lab")
add_overlay("coat_lab")
if (istype(coat, /obj/item/clothing/suit/storage/toggle/labcoat/cmo))
overlays += image(icon, icon_state = "coat_cmo")
add_overlay("coat_cmo")
if (istype(coat, /obj/item/clothing/suit/storage/det_trench))
overlays += image(icon, icon_state = "coat_det")
add_overlay("coat_det")
@@ -24,21 +24,30 @@
var/const/default_mob_size = 15
/obj/structure/closet/initialize()
..()
if(!opened) // if closed, any item at the crate's loc is put in the contents
var/obj/I
for(I in src.loc)
if (!istype(I, /obj/item) && !istype(I, /obj/random))continue
if(I.density || I.anchored || I == src) continue
I.forceMove(src)
// adjust locker size to hold all items with 5 units of free store room
var/content_size = 0
for(I in src.contents)
content_size += Ceiling(I.w_class/2)
if(content_size > storage_capacity-5)
storage_capacity = content_size + 5
/obj/structure/closet/LateInitialize()
if (opened) // if closed, any item at the crate's loc is put in the contents
return
var/obj/I
for(I in src.loc)
if (!istype(I, /obj/item) && !istype(I, /obj/random))
continue
if (I.density || I.anchored || I == src)
continue
I.forceMove(src)
// adjust locker size to hold all items with 5 units of free store room
var/content_size = 0
for(I in src.contents)
content_size += Ceiling(I.w_class/2)
if(content_size > storage_capacity-5)
storage_capacity = content_size + 5
/obj/structure/closet/Initialize(mapload)
..()
fill()
return mapload ? INITIALIZE_HINT_LATELOAD : INITIALIZE_HINT_NORMAL
// Fill lockers with this.
/obj/structure/closet/proc/fill()
/obj/structure/closet/examine(mob/user)
if(..(user, 1) && !opened)
@@ -203,8 +212,6 @@
..()
damage(proj_damage)
return
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
@@ -314,11 +321,11 @@
usr << "<span class='warning'>This mob type can't use this verb.</span>"
/obj/structure/closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
overlays.Cut()
cut_overlays()
if(!opened)
icon_state = icon_closed
if(welded)
overlays += "welded"
add_overlay("welded")
else
icon_state = icon_opened
@@ -334,7 +341,7 @@
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
dump_contents()
spawn(1) qdel(src)
QDEL_IN(src, 1)
return 1
/obj/structure/closet/proc/req_breakout()
@@ -4,8 +4,7 @@
icon_state = "mixed"
icon_closed = "mixed"
/obj/structure/closet/athletic_mixed/New()
..()
/obj/structure/closet/athletic_mixed/fill()
new /obj/item/clothing/under/shorts/grey(src)
new /obj/item/clothing/under/shorts/black(src)
new /obj/item/clothing/under/shorts/red(src)
@@ -27,8 +26,7 @@
name = "boxing gloves"
desc = "It's a storage unit for gloves for use in the boxing ring."
/obj/structure/closet/boxinggloves/New()
..()
/obj/structure/closet/boxinggloves/fill()
new /obj/item/clothing/gloves/boxing/blue(src)
new /obj/item/clothing/gloves/boxing/green(src)
new /obj/item/clothing/gloves/boxing/yellow(src)
@@ -39,8 +37,7 @@
name = "mask closet"
desc = "IT'S A STORAGE UNIT FOR FIGHTER MASKS OLE!"
/obj/structure/closet/masks/New()
..()
/obj/structure/closet/masks/fill()
new /obj/item/clothing/mask/luchador(src)
new /obj/item/clothing/mask/luchador/rudos(src)
new /obj/item/clothing/mask/luchador/tecnicos(src)
@@ -52,8 +49,7 @@
icon_state = "red"
icon_closed = "red"
/obj/structure/closet/lasertag/red/New()
..()
/obj/structure/closet/lasertag/red/fill()
new /obj/item/weapon/gun/energy/lasertag/red(src)
new /obj/item/weapon/gun/energy/lasertag/red(src)
new /obj/item/clothing/suit/redtag(src)
@@ -66,8 +62,7 @@
icon_state = "blue"
icon_closed = "blue"
/obj/structure/closet/lasertag/blue/New()
..()
/obj/structure/closet/lasertag/blue/fill()
new /obj/item/weapon/gun/energy/lasertag/blue(src)
new /obj/item/weapon/gun/energy/lasertag/blue(src)
new /obj/item/clothing/suit/bluetag(src)
@@ -35,8 +35,7 @@
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
/obj/structure/closet/gimmick/russian/New()
..()
/obj/structure/closet/gimmick/russian/fill()
new /obj/item/clothing/head/ushanka(src)
new /obj/item/clothing/head/ushanka(src)
new /obj/item/clothing/head/ushanka(src)
@@ -56,8 +55,7 @@
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
/obj/structure/closet/gimmick/tacticool/New()
..()
/obj/structure/closet/gimmick/tacticool/fill()
new /obj/item/clothing/glasses/eyepatch(src)
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/gloves/swat(src)
@@ -82,14 +80,10 @@
icon_opened = "syndicateopen"
anchored = 1
/obj/structure/closet/thunderdome/New()
..()
/obj/structure/closet/thunderdome/tdred
name = "red-team Thunderdome closet"
/obj/structure/closet/thunderdome/tdred/New()
..()
/obj/structure/closet/thunderdome/tdred/fill()
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)
@@ -115,8 +109,7 @@
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
/obj/structure/closet/thunderdome/tdgreen/New()
..()
/obj/structure/closet/thunderdome/tdgreen/fill()
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)
@@ -14,8 +14,7 @@
icon_state = "black"
icon_closed = "black"
/obj/structure/closet/gmcloset/New()
..()
/obj/structure/closet/gmcloset/fill()
new /obj/item/clothing/head/that(src)
new /obj/item/clothing/head/that(src)
new /obj/item/device/radio/headset/headset_service(src)
@@ -40,8 +39,7 @@
icon_state = "black"
icon_closed = "black"
/obj/structure/closet/chefcloset/New()
..()
/obj/structure/closet/chefcloset/fill()
new /obj/item/clothing/under/sundress(src)
new /obj/item/clothing/under/waiter(src)
new /obj/item/clothing/under/waiter(src)
@@ -62,8 +60,7 @@
icon_state = "mixed"
icon_closed = "mixed"
/obj/structure/closet/jcloset/New()
..()
/obj/structure/closet/jcloset/fill()
new /obj/item/clothing/under/rank/janitor(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/weapon/cartridge/janitor(src)
@@ -94,8 +91,7 @@
icon_state = "blue"
icon_closed = "blue"
/obj/structure/closet/lawcloset/New()
..()
/obj/structure/closet/lawcloset/fill()
new /obj/item/clothing/under/lawyer/female(src)
new /obj/item/clothing/under/lawyer/black(src)
new /obj/item/clothing/under/lawyer/red(src)
@@ -10,8 +10,7 @@
icon_closed = "bio_general"
icon_opened = "bio_generalopen"
/obj/structure/closet/l3closet/general/New()
..()
/obj/structure/closet/l3closet/general/fill()
new /obj/item/clothing/suit/bio_suit/general( src )
new /obj/item/clothing/head/bio_hood/general( src )
@@ -21,8 +20,7 @@
icon_closed = "bio_virology"
icon_opened = "bio_virologyopen"
/obj/structure/closet/l3closet/virology/New()
..()
/obj/structure/closet/l3closet/virology/fill()
new /obj/item/clothing/suit/bio_suit/virology( src )
new /obj/item/clothing/head/bio_hood/virology( src )
new /obj/item/clothing/mask/breath(src)
@@ -34,8 +32,7 @@
icon_closed = "bio_security"
icon_opened = "bio_securityopen"
/obj/structure/closet/l3closet/security/New()
..()
/obj/structure/closet/l3closet/security/fill()
new /obj/item/clothing/suit/bio_suit/security( src )
new /obj/item/clothing/head/bio_hood/security( src )
@@ -45,8 +42,7 @@
icon_closed = "bio_janitor"
icon_opened = "bio_janitoropen"
/obj/structure/closet/l3closet/janitor/New()
..()
/obj/structure/closet/l3closet/janitor/fill()
new /obj/item/clothing/suit/bio_suit/janitor( src )
new /obj/item/clothing/head/bio_hood/janitor( src )
@@ -56,7 +52,6 @@
icon_closed = "bio_scientist"
icon_opened = "bio_scientistopen"
/obj/structure/closet/l3closet/scientist/New()
..()
/obj/structure/closet/l3closet/scientist/fill()
new /obj/item/clothing/suit/bio_suit/scientist( src )
new /obj/item/clothing/head/bio_hood/scientist( src )
@@ -4,8 +4,7 @@
icon_closed = "syndicate"
icon_opened = "syndicateopen"
/obj/structure/closet/malf/suits/New()
..()
/obj/structure/closet/malf/suits/fill()
new /obj/item/weapon/tank/jetpack/void(src)
new /obj/item/clothing/mask/breath(src)
new /obj/item/clothing/head/helmet/space/void(src)
@@ -10,8 +10,7 @@
storage_capacity = 45 //such a big closet deserves a little more capacity
New()
..()
fill()
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
@@ -22,7 +21,6 @@
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
return
/obj/structure/closet/secure_closet/bar/update_icon()
if(broken)
@@ -8,7 +8,7 @@
icon_broken = "securecargobroken"
icon_off = "securecargooff"
New()
fill()
..()
new /obj/item/clothing/under/rank/cargotech(src)
new /obj/item/clothing/shoes/black(src)
@@ -16,7 +16,6 @@
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/soft(src)
// new /obj/item/weapon/cartridge/quartermaster(src)
return
/obj/structure/closet/secure_closet/quartermaster
name = "quartermaster's locker"
@@ -28,8 +27,7 @@
icon_broken = "secureqmbroken"
icon_off = "secureqmoff"
New()
..()
fill()
new /obj/item/clothing/under/rank/cargo(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/device/radio/headset/headset_cargo(src)
@@ -40,4 +38,3 @@
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/clothing/head/soft(src)
return
@@ -9,8 +9,7 @@
icon_off = "secureceoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/industrial(src)
else
@@ -33,7 +32,6 @@
new /obj/item/device/multitool(src)
new /obj/item/device/flash(src)
new /obj/item/taperoll/engineering(src)
return
/obj/structure/closet/secure_closet/engineering_chief2
name = "chief engineer's attire"
@@ -46,8 +44,7 @@
icon_off = "secureceoff"
New()
..()
fill()
new /obj/item/weapon/storage/backpack/industrial(src)
new /obj/item/weapon/storage/backpack/satchel_eng(src)
new /obj/item/clothing/accessory/storage/brown_vest(src)
@@ -55,7 +52,6 @@
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/device/radio/headset/heads/ce(src)
return
/obj/structure/closet/secure_closet/engineering_electrical
@@ -69,8 +65,7 @@
icon_off = "secureengelecoff"
New()
..()
fill()
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/weapon/storage/toolbox/electrical(src)
@@ -82,9 +77,6 @@
new /obj/item/device/multitool(src)
new /obj/item/device/multitool(src)
new /obj/item/device/multitool(src)
return
/obj/structure/closet/secure_closet/engineering_welding
name = "welding supplies"
@@ -96,9 +88,7 @@
icon_broken = "secureengweldbroken"
icon_off = "secureengweldoff"
New()
..()
fill()
new /obj/item/clothing/head/welding(src)
new /obj/item/clothing/head/welding(src)
new /obj/item/clothing/head/welding(src)
@@ -108,9 +98,6 @@
new /obj/item/weapon/weldpack(src)
new /obj/item/weapon/weldpack(src)
new /obj/item/weapon/weldpack(src)
return
/obj/structure/closet/secure_closet/engineering_personal
name = "engineer's locker"
@@ -122,9 +109,7 @@
icon_broken = "secureengbroken"
icon_off = "secureengoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/industrial(src)
else
@@ -140,7 +125,7 @@
new /obj/item/clothing/glasses/meson(src)
new /obj/item/weapon/cartridge/engineering(src)
new /obj/item/taperoll/engineering(src)
return
/obj/structure/closet/secure_closet/atmos_personal
name = "technician's locker"
req_access = list(access_atmospherics)
@@ -152,8 +137,7 @@
icon_off = "secureatmoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/industrial(src)
else
@@ -171,4 +155,3 @@
new /obj/item/clothing/mask/gas(src)
new /obj/item/weapon/cartridge/atmos(src)
new /obj/item/taperoll/engineering(src)
return
@@ -16,19 +16,14 @@
name = "kitchen cabinet"
req_access = list(access_kitchen)
New()
..()
fill()
for(var/i = 0, i < 2, i++)
new /obj/item/weapon/reagent_containers/food/condiment/flour(src)
new /obj/item/weapon/reagent_containers/food/condiment/sugar(src)
return
/obj/structure/closet/secure_closet/freezer/kitchen/mining
req_access = list()
/obj/structure/closet/secure_closet/freezer/meat
name = "meat fridge"
icon_state = "fridge1"
@@ -39,13 +34,10 @@
icon_off = "fridge1"
New()
fill()
..()
for(var/i = 0, i < 8, i++)
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src)
return
/obj/structure/closet/secure_closet/freezer/fridge
name = "refrigerator"
@@ -57,7 +49,7 @@
icon_off = "fridge1"
New()
fill()
..()
for(var/i = 0, i < 5, i++)
new /obj/item/weapon/reagent_containers/food/drinks/milk(src)
@@ -65,8 +57,6 @@
new /obj/item/weapon/reagent_containers/food/drinks/soymilk(src)
for(var/i = 0, i < 2, i++)
new /obj/item/weapon/storage/fancy/egg_box(src)
return
/obj/structure/closet/secure_closet/freezer/money
@@ -80,7 +70,7 @@
req_access = list(access_heads_vault)
New()
fill()
..()
for(var/i = 0, i < 3, i++)
new /obj/item/weapon/spacecash/c1000(src)
@@ -88,4 +78,3 @@
new /obj/item/weapon/spacecash/c500(src)
for(var/i = 0, i < 6, i++)
new /obj/item/weapon/spacecash/c200(src)
return
@@ -9,8 +9,8 @@
icon_closed ="base"
icon_opened = "base"
/obj/structure/closet/secure_closet/guncabinet/New()
..()
/obj/structure/closet/secure_closet/guncabinet/Initialize()
. = ..()
update_icon()
/obj/structure/closet/secure_closet/guncabinet/toggle()
@@ -18,9 +18,9 @@
update_icon()
/obj/structure/closet/secure_closet/guncabinet/update_icon()
overlays.Cut()
cut_overlays()
if(opened)
overlays += icon(icon,"door_open")
add_overlay("door_open")
else
var/lazors = 0
var/shottas = 0
@@ -41,13 +41,13 @@
gun.icon_state = "projectile"
gun.pixel_x = i*4
overlays += gun
overlays += icon(src.icon,"door")
add_overlay(gun)
add_overlay("door")
if(broken)
overlays += icon(src.icon,"broken")
add_overlay("broken")
else if (locked)
overlays += icon(src.icon,"locked")
add_overlay("locked")
else
overlays += icon(src.icon,"open")
add_overlay("open")
@@ -8,8 +8,7 @@
icon_broken = "hydrosecurebroken"
icon_off = "hydrosecureoff"
New()
fill()
..()
switch(rand(1,2))
if(1)
@@ -26,4 +25,3 @@
new /obj/item/weapon/wirecutters/clippers(src)
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
return
@@ -9,8 +9,7 @@
icon_off = "medicaloff"
req_access = list(access_medical_equip)
New()
fill()
..()
new /obj/item/weapon/storage/box/autoinjectors(src)
new /obj/item/weapon/storage/box/syringes(src)
@@ -22,9 +21,6 @@
new /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline(src)
new /obj/item/weapon/reagent_containers/glass/bottle/antitoxin(src)
new /obj/item/weapon/reagent_containers/glass/bottle/antitoxin(src)
return
/obj/structure/closet/secure_closet/medical2
name = "anesthetics closet"
@@ -37,18 +33,13 @@
icon_off = "medicaloff"
req_access = list(access_surgery)
New()
..()
fill()
new /obj/item/weapon/tank/anesthetic(src)
new /obj/item/weapon/tank/anesthetic(src)
new /obj/item/weapon/tank/anesthetic(src)
new /obj/item/clothing/mask/breath/medical(src)
new /obj/item/clothing/mask/breath/medical(src)
new /obj/item/clothing/mask/breath/medical(src)
return
/obj/structure/closet/secure_closet/medical3
name = "medical doctor's locker"
@@ -60,8 +51,7 @@
icon_broken = "securemedbroken"
icon_off = "securemedoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/medic(src)
else
@@ -96,8 +86,6 @@
new /obj/item/clothing/shoes/white(src)
// new /obj/item/weapon/cartridge/medical(src)
new /obj/item/device/radio/headset/headset_med(src)
return
/obj/structure/closet/secure_closet/CMO
@@ -110,8 +98,11 @@
icon_broken = "cmosecurebroken"
icon_off = "cmosecureoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/medic(src)
else
new /obj/item/weapon/storage/backpack/satchel_med(src)
new /obj/item/clothing/suit/bio_suit/cmo(src)
new /obj/item/clothing/head/bio_hood/cmo(src)
new /obj/item/clothing/shoes/white(src)
@@ -120,7 +111,6 @@
new /obj/item/device/radio/headset/heads/cmo(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/reagent_containers/hypospray(src)
return
/obj/structure/closet/secure_closet/CMO2
name = "chief medical officer's attire"
@@ -132,8 +122,7 @@
icon_broken = "cmosecurebroken"
icon_off = "cmosecureoff"
New()
..()
fill()
new /obj/item/weapon/storage/backpack/medic(src)
new /obj/item/weapon/storage/backpack/satchel_med(src)
new /obj/item/clothing/under/rank/medical/blue(src)
@@ -147,7 +136,6 @@
new /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt(src)
new /obj/item/clothing/shoes/brown (src)
new /obj/item/device/radio/headset/heads/cmo(src)
return
/obj/structure/closet/secure_closet/animal
@@ -155,14 +143,12 @@
req_access = list(access_surgery)
New()
fill()
..()
new /obj/item/device/assembly/signaler(src)
new /obj/item/device/radio/electropack(src)
new /obj/item/device/radio/electropack(src)
new /obj/item/device/radio/electropack(src)
return
/obj/structure/closet/secure_closet/chemical
@@ -176,14 +162,13 @@
icon_off = "medicaloff"
req_access = list(access_chemistry)
New()
fill()
..()
new /obj/item/weapon/storage/box/pillbottles(src)
new /obj/item/weapon/storage/box/pillbottles(src)
new /obj/item/weapon/storage/box/spraybottles(src)
new /obj/item/weapon/storage/box/spraybottles(src)
return
/obj/structure/closet/secure_closet/medical_wall
name = "first aid closet"
@@ -4,30 +4,19 @@
req_access = list(access_all_personal_lockers)
var/registered_name = null
/obj/structure/closet/secure_closet/personal/New()
..()
spawn(2)
if(prob(50))
new /obj/item/weapon/storage/backpack(src)
else
new /obj/item/weapon/storage/backpack/satchel_norm(src)
new /obj/item/device/radio/headset( src )
return
/obj/structure/closet/secure_closet/personal/fill()
if(prob(50))
new /obj/item/weapon/storage/backpack(src)
else
new /obj/item/weapon/storage/backpack/satchel_norm(src)
new /obj/item/device/radio/headset( src )
/obj/structure/closet/secure_closet/personal/patient
name = "patient's closet"
/obj/structure/closet/secure_closet/personal/patient/New()
..()
spawn(4)
// Not really the best way to do this, but it's better than "contents = list()"!
for(var/atom/movable/AM in contents)
qdel(AM)
new /obj/item/clothing/under/color/white( src )
new /obj/item/clothing/shoes/white( src )
return
/obj/structure/closet/secure_closet/personal/patient/fill()
new /obj/item/clothing/under/color/white( src )
new /obj/item/clothing/shoes/white( src )
/obj/structure/closet/secure_closet/personal/cabinet
@@ -50,15 +39,10 @@
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/personal/cabinet/New()
..()
spawn(4)
// Not really the best way to do this, but it's better than "contents = list()"!
for(var/atom/movable/AM in contents)
qdel(AM)
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
new /obj/item/device/radio/headset( src )
return
/obj/structure/closet/secure_closet/personal/cabinet/fill()
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
new /obj/item/device/radio/headset( src )
/obj/structure/closet/secure_closet/personal/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (src.opened)
@@ -8,8 +8,7 @@
icon_broken = "secureresbroken"
icon_off = "secureresoff"
New()
..()
fill()
new /obj/item/clothing/under/rank/scientist(src)
//new /obj/item/clothing/suit/labcoat/science(src)
new /obj/item/clothing/suit/storage/toggle/labcoat(src)
@@ -18,8 +17,6 @@
new /obj/item/device/radio/headset/headset_sci(src)
new /obj/item/weapon/tank/air(src)
new /obj/item/clothing/mask/gas(src)
return
/obj/structure/closet/secure_closet/RD
@@ -32,8 +29,7 @@
icon_broken = "rdsecurebroken"
icon_off = "rdsecureoff"
New()
..()
fill()
new /obj/item/clothing/suit/bio_suit/scientist(src)
new /obj/item/clothing/head/bio_hood/scientist(src)
new /obj/item/clothing/under/rank/research_director(src)
@@ -48,7 +44,6 @@
new /obj/item/weapon/tank/air(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/flash(src)
return
/obj/structure/closet/secure_closet/RD2
name = "research director's attire"
@@ -60,8 +55,7 @@
icon_broken = "rdsecurebroken"
icon_off = "rdsecureoff"
New()
..()
fill()
new /obj/item/clothing/under/rank/research_director(src)
new /obj/item/clothing/under/rank/research_director/rdalt(src)
new /obj/item/clothing/under/rank/research_director/dress_rd(src)
@@ -70,4 +64,3 @@
new /obj/item/clothing/shoes/leather(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/device/radio/headset/heads/rd(src)
return
@@ -126,14 +126,14 @@
usr << "<span class='warning'>This mob type can't use this verb.</span>"
/obj/structure/closet/secure_closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
overlays.Cut()
cut_overlays()
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
if(welded)
overlays += "welded"
add_overlay("welded")
else
icon_state = icon_opened
@@ -8,8 +8,7 @@
icon_broken = "capsecurebroken"
icon_off = "capsecureoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/captain(src)
else
@@ -30,7 +29,6 @@
new /obj/item/clothing/under/dress/dress_cap(src)
new /obj/item/clothing/head/caphat/formal(src)
new /obj/item/clothing/under/captainformal(src)
return
/obj/structure/closet/secure_closet/captains2
name = "captain's attire"
@@ -42,8 +40,7 @@
icon_broken = "capsecurebroken"
icon_off = "capsecureoff"
New()
..()
fill()
new /obj/item/weapon/storage/backpack/captain(src)
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/clothing/suit/captunic(src)
@@ -56,7 +53,7 @@
new /obj/item/clothing/under/dress/dress_cap(src)
new /obj/item/clothing/head/helmet/formalcaptain(src)
new /obj/item/clothing/under/captainformal(src)
return
/obj/structure/closet/secure_closet/hop
@@ -69,7 +66,7 @@
icon_broken = "hopsecurebroken"
icon_off = "hopsecureoff"
New()
fill()
..()
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/suit/storage/vest(src)
@@ -81,7 +78,6 @@
new /obj/item/weapon/gun/energy/pistol(src)
new /obj/item/weapon/gun/projectile/sec/flash(src)
new /obj/item/device/flash(src)
return
/obj/structure/closet/secure_closet/hop2
name = "head of personnel's attire"
@@ -93,7 +89,7 @@
icon_broken = "hopsecurebroken"
icon_off = "hopsecureoff"
New()
fill()
..()
new /obj/item/clothing/under/rank/head_of_personnel(src)
new /obj/item/clothing/under/dress/dress_hop(src)
@@ -108,9 +104,6 @@
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src)
new /obj/item/clothing/head/caphat/hop(src)
return
/obj/structure/closet/secure_closet/hos
name = "head of security's locker"
@@ -122,10 +115,11 @@
icon_broken = "hossecurebroken"
icon_off = "hossecureoff"
New()
fill()
..()
new /obj/item/weapon/storage/backpack/security(src)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/head/helmet/HoS(src)
new /obj/item/clothing/suit/storage/vest/hos(src)
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
@@ -149,7 +143,6 @@
new /obj/item/clothing/accessory/badge/hos(src)
new /obj/item/ammo_magazine/tranq(src)
new /obj/item/device/holowarrant(src)
return
/obj/structure/closet/secure_closet/hos2
name = "head of security's attire"
@@ -161,8 +154,7 @@
icon_broken = "hossecurebroken"
icon_off = "hossecureoff"
New()
..()
fill()
new /obj/item/weapon/storage/backpack/security(src)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/head/helmet/HoS(src)
@@ -174,9 +166,6 @@
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/clothing/head/beret/sec/hos(src)
return
/obj/structure/closet/secure_closet/warden
name = "warden's locker"
@@ -189,8 +178,7 @@
icon_off = "wardensecureoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/security(src)
else
@@ -217,7 +205,7 @@
new /obj/item/clothing/accessory/badge/warden(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/weapon/storage/box/ids(src)
return
/obj/structure/closet/secure_closet/security_cadet
name = "security cadet's locker"
@@ -229,8 +217,7 @@
icon_broken = "seccadetbroken"
icon_off = "seccadetoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/security(src)
else
@@ -246,8 +233,6 @@
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/device/holowarrant(src)
new /obj/item/device/flashlight/flare(src)
return
/obj/structure/closet/secure_closet/security
name = "security officer's locker"
@@ -259,8 +244,7 @@
icon_broken = "secbroken"
icon_off = "secoff"
New()
..()
fill()
if(prob(50))
new /obj/item/weapon/storage/backpack/security(src)
else
@@ -283,40 +267,34 @@
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/device/holowarrant(src)
new /obj/item/device/flashlight/flare(src)
return
/obj/structure/closet/secure_closet/security/cargo
New()
fill()
..()
new /obj/item/clothing/accessory/armband/cargo(src)
new /obj/item/device/encryptionkey/headset_cargo(src)
return
/obj/structure/closet/secure_closet/security/engine
New()
fill()
..()
new /obj/item/clothing/accessory/armband/engine(src)
new /obj/item/device/encryptionkey/headset_eng(src)
return
/obj/structure/closet/secure_closet/security/science
New()
fill()
..()
new /obj/item/clothing/accessory/armband/science(src)
new /obj/item/device/encryptionkey/headset_sci(src)
return
/obj/structure/closet/secure_closet/security/med
New()
fill()
..()
new /obj/item/clothing/accessory/armband/medgreen(src)
new /obj/item/device/encryptionkey/headset_med(src)
return
/obj/structure/closet/secure_closet/detective
@@ -330,8 +308,7 @@
icon_off = "cabinetdetective_broken"
storage_capacity = 45 //such a big closet deserves a little more capacity
New()
..()
fill()
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/under/det/black(src)
new /obj/item/clothing/under/det/slob(src)
@@ -351,7 +328,6 @@
new /obj/item/taperoll/police(src)
new /obj/item/weapon/gun/projectile/revolver/detective(src)
new /obj/item/clothing/accessory/holster/armpit(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()
if(broken)
@@ -369,13 +345,9 @@
name = "lethal injections locker"
req_access = list(access_captain)
New()
..()
fill()
new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src)
new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src)
return
/obj/structure/closet/secure_closet/brig
@@ -384,19 +356,15 @@
anchored = 1
var/id = null
New()
..()
fill()
new /obj/item/clothing/under/color/orange( src )
new /obj/item/clothing/shoes/orange( src )
return
/obj/structure/closet/secure_closet/courtroom
name = "courtroom locker"
req_access = list(access_lawyer)
New()
fill()
..()
new /obj/item/clothing/shoes/brown(src)
new /obj/item/weapon/paper/Court (src)
@@ -406,7 +374,6 @@
new /obj/item/clothing/suit/judgerobe (src)
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"
@@ -9,8 +9,7 @@
/obj/structure/closet/syndicate/personal
desc = "It's a storage unit for operative gear."
/obj/structure/closet/syndicate/personal/New()
..()
/obj/structure/closet/syndicate/personal/fill()
new /obj/item/weapon/tank/jetpack/oxygen(src)
new /obj/item/clothing/mask/gas/syndicate(src)
new /obj/item/clothing/under/syndicate(src)
@@ -27,8 +26,7 @@
/obj/structure/closet/syndicate/suit
desc = "It's a storage unit for voidsuits."
/obj/structure/closet/syndicate/suit/New()
..()
/obj/structure/closet/syndicate/suit/fill()
new /obj/item/weapon/tank/jetpack/oxygen(src)
new /obj/item/clothing/shoes/magboots(src)
new /obj/item/clothing/suit/space/void/merc(src)
@@ -39,9 +37,7 @@
/obj/structure/closet/syndicate/nuclear
desc = "It's a storage unit for nuclear-operative gear."
/obj/structure/closet/syndicate/nuclear/New()
..()
/obj/structure/closet/syndicate/nuclear/fill()
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
@@ -67,15 +63,12 @@
/obj/structure/closet/syndicate/resources/
desc = "An old, dusty locker."
New()
..()
fill()
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
var/pickednum = rand(1, 50)
//Sad trombone
@@ -125,17 +118,17 @@
/obj/structure/closet/syndicate/resources/everything
desc = "It's an emergency storage closet for repairs."
New()
fill()
var/list/resources = list(
/obj/item/stack/material/steel,
/obj/item/stack/material/glass,
/obj/item/stack/material/gold,
/obj/item/stack/material/silver,
/obj/item/stack/material/phoron,
/obj/item/stack/material/uranium,
/obj/item/stack/material/diamond,
/obj/item/stack/material/plasteel,
/obj/item/stack/rods
/obj/item/stack/material/steel,
/obj/item/stack/material/glass,
/obj/item/stack/material/gold,
/obj/item/stack/material/silver,
/obj/item/stack/material/phoron,
/obj/item/stack/material/uranium,
/obj/item/stack/material/diamond,
/obj/item/stack/material/plasteel,
/obj/item/stack/rods
)
@@ -143,5 +136,3 @@
for(var/res in resources)
var/obj/item/stack/R = new res(src)
R.amount = R.max_amount
return
@@ -19,9 +19,7 @@
icon_closed = "emergency"
icon_opened = "emergencyopen"
/obj/structure/closet/emcloset/New()
..()
/obj/structure/closet/emcloset/fill()
switch (pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10)))
if ("small")
new /obj/item/weapon/tank/emergency_oxygen(src)
@@ -52,7 +50,7 @@
new /obj/item/clothing/head/helmet/space/emergency(src)
new /obj/item/clothing/head/helmet/space/emergency(src)
/obj/structure/closet/emcloset/legacy/New()
/obj/structure/closet/emcloset/legacy/fill()
..()
new /obj/item/weapon/tank/oxygen(src)
new /obj/item/clothing/mask/gas(src)
@@ -67,20 +65,14 @@
icon_closed = "firecloset"
icon_opened = "fireclosetopen"
/obj/structure/closet/firecloset/New()
..()
/obj/structure/closet/firecloset/fill()
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()
/obj/structure/closet/firecloset/full/fill()
new /obj/item/clothing/suit/fire/firefighter(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/flashlight(src)
@@ -105,8 +97,7 @@
icon_closed = "toolcloset"
icon_opened = "toolclosetopen"
/obj/structure/closet/toolcloset/New()
..()
/obj/structure/closet/toolcloset/fill()
if(prob(40))
new /obj/item/clothing/suit/storage/hazardvest(src)
if(prob(70))
@@ -149,8 +140,7 @@
icon_opened = "toolclosetopen"
icon_closed = "radsuitcloset"
/obj/structure/closet/radiation/New()
..()
/obj/structure/closet/radiation/fill()
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
new /obj/item/clothing/suit/radiation(src)
@@ -166,8 +156,7 @@
icon_closed = "bombsuit"
icon_opened = "bombsuitopen"
/obj/structure/closet/bombcloset/New()
..()
/obj/structure/closet/bombcloset/fill()
new /obj/item/clothing/suit/bomb_suit( src )
new /obj/item/clothing/under/color/black( src )
new /obj/item/clothing/shoes/black( src )
@@ -181,8 +170,7 @@
icon_closed = "bombsuitsec"
icon_opened = "bombsuitsecopen"
/obj/structure/closet/bombclosetsecurity/New()
..()
/obj/structure/closet/bombclosetsecurity/fill()
new /obj/item/clothing/suit/bomb_suit/security( src )
new /obj/item/clothing/under/rank/security( src )
new /obj/item/clothing/shoes/brown( src )
@@ -201,8 +189,7 @@
density = 0
wall_mounted = 1
/obj/structure/closet/hydrant/New()
..()
/obj/structure/closet/hydrant/fill()
new /obj/item/clothing/suit/fire/firefighter(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/flashlight(src)
@@ -251,13 +251,6 @@
set_tablestatus(1)
/*
=====================
Secure Crates
@@ -279,14 +272,14 @@
var/locked = 1
health = 200
/obj/structure/closet/crate/secure/New()
..()
/obj/structure/closet/crate/secure/Initialize()
. = ..()
if(locked)
overlays.Cut()
overlays += redlight
cut_overlays()
add_overlay(redlight)
else
overlays.Cut()
overlays += greenlight
cut_overlays()
add_overlay(greenlight)
/obj/structure/closet/crate/secure/can_open()
if (..())
@@ -312,8 +305,8 @@
if(user)
for(var/mob/O in viewers(user, 3))
O.show_message( "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>", 1)
overlays.Cut()
overlays += locked ? redlight : greenlight
cut_overlays()
add_overlay(locked ? redlight : greenlight)
/obj/structure/closet/crate/secure/verb/verb_togglelock()
set src in oview(1) // One square distance
@@ -348,10 +341,10 @@
/obj/structure/closet/crate/secure/emag_act(var/remaining_charges, var/mob/user)
if(!broken)
overlays.Cut()
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
cut_overlays()
add_overlay(emag)
add_overlay(sparks)
CUT_OVERLAY_IN(sparks, 6)
playsound(src.loc, "sparks", 60, 1)
src.locked = 0
src.broken = 1
@@ -364,13 +357,13 @@
if(!broken && !opened && prob(50/severity))
if(!locked)
src.locked = 1
overlays.Cut()
overlays += redlight
cut_overlays()
add_overlay(redlight)
else
overlays.Cut()
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
cut_overlays()
add_overlay(emag)
add_overlay(sparks)
CUT_OVERLAY_IN(sparks, 6)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
src.locked = 0
if(!opened && prob(20/severity))
@@ -432,8 +425,7 @@
icon_opened = "crateopen"
icon_closed = "crate"
/obj/structure/closet/crate/rcd/New()
..()
/obj/structure/closet/crate/rcd/fill()
new /obj/item/weapon/rcd_ammo(src)
new /obj/item/weapon/rcd_ammo(src)
new /obj/item/weapon/rcd_ammo(src)
@@ -442,8 +434,7 @@
/obj/structure/closet/crate/solar
name = "solar pack crate"
/obj/structure/closet/crate/solar/New()
..()
/obj/structure/closet/crate/solar/fill()
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
@@ -491,13 +482,12 @@
newgas.temperature = target_temp
return newgas
/obj/structure/closet/crate/freezer/rations //Fpr use in the escape shuttle
/obj/structure/closet/crate/freezer/rations //For use in the escape shuttle
name = "emergency rations"
desc = "A crate of emergency rations."
/obj/structure/closet/crate/freezer/rations/New()
..()
/obj/structure/closet/crate/freezer/rations/fill()
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
@@ -517,8 +507,7 @@
icon_opened = "radiationopen"
icon_closed = "radiation"
/obj/structure/closet/crate/radiation/New()
..()
/obj/structure/closet/crate/radiation/fill()
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
new /obj/item/clothing/suit/radiation(src)
@@ -640,8 +629,7 @@
/obj/structure/closet/crate/hydroponics/prespawned
//This exists so the prespawned hydro crates spawn with their contents.
New()
..()
fill()
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
new /obj/item/weapon/material/minihoe(src)
@@ -677,18 +665,20 @@
"trashcart" = "trashcartopen",
"critter" = "critteropen",
"largemetal" = "largemetalopen",
"medicalcrate" = "medicalcrateopen")
"medicalcrate" = "medicalcrateopen"
)
/obj/structure/closet/crate/loot/New(var/location, var/_rarity = 1, var/_quantity = 10)
/obj/structure/closet/crate/loot/Initialize(mapload, var/_rarity = 1, var/_quantity = 10)
. = ..()
rarity = _rarity
quantity = _quantity
..(location)
/obj/structure/closet/crate/loot/initialize()
spawntypes = list("1" = STOCK_RARE_PROB*rarity, "2" = STOCK_UNCOMMON_PROB*rarity, "3" = (100 - ((STOCK_RARE_PROB*rarity) + (STOCK_UNCOMMON_PROB*rarity))))
spawntypes = list(
"1" = STOCK_RARE_PROB * rarity,
"2" = STOCK_UNCOMMON_PROB * rarity,
"3" = (100 - ((STOCK_RARE_PROB * rarity) + (STOCK_UNCOMMON_PROB * rarity)))
)
icon_closed = pick(iconchoices)
icon_opened = iconchoices[icon_closed]
@@ -49,8 +49,8 @@
var/held_count = 1
var/held_type
/obj/structure/largecrate/animal/New()
..()
/obj/structure/largecrate/animal/Initialize()
. = ..()
for(var/i = 1;i<=held_count;i++)
new held_type(src)
@@ -27,13 +27,13 @@
update_icon()
/obj/structure/fireaxecabinet/update_icon()
overlays.Cut()
cut_overlays()
if(fireaxe)
overlays += image(icon, "fireaxe_item")
add_overlay("fireaxe_item")
if(shattered)
overlays += image(icon, "fireaxe_window_broken")
add_overlay("fireaxe_window_broken")
else if(!open)
overlays += image(icon, "fireaxe_window")
add_overlay("fireaxe_window")
/obj/structure/fireaxecabinet/New()
..()
+3 -4
View File
@@ -11,7 +11,6 @@
var/health = 10
var/destroyed = 0
/obj/structure/grille/ex_act(severity)
qdel(src)
@@ -96,7 +95,7 @@
if(iswirecutter(W))
if(!shock(user, 100))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
getFromPool(/obj/item/stack/rods, get_turf(src), destroyed ? 1 : 2)
new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2)
qdel(src)
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
@@ -179,11 +178,11 @@
density = 0
destroyed = 1
update_icon()
getFromPool(/obj/item/stack/rods, get_turf(src))
new /obj/item/stack/rods(get_turf(src))
else
if(health <= -6)
getFromPool(/obj/item/stack/rods, get_turf(src))
new /obj/item/stack/rods(get_turf(src))
qdel(src)
return
return
+1 -1
View File
@@ -49,7 +49,7 @@
/obj/structure/inflatable/Destroy()
update_nearby_tiles()
..()
return ..()
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
return 0
+8 -8
View File
@@ -280,28 +280,28 @@
/obj/structure/janitorialcart/update_icon()
overlays = null
cut_overlays()
has_items = 0
if(mybucket)
overlays += "cart_bucket"
add_overlay("cart_bucket")
has_items = 1
if(mybag)
overlays += "cart_garbage"
add_overlay("cart_garbage")
has_items = 1
if(mymop)
overlays += "cart_mop"
add_overlay("cart_mop")
has_items = 1
if(myspray)
overlays += "cart_spray"
add_overlay("cart_spray")
has_items = 1
if(myreplacer)
if (istype(myreplacer, /obj/item/device/lightreplacer/advanced))
overlays += "cart_adv_lightreplacer"
add_overlay("cart_adv_lightreplacer")
else
overlays += "cart_replacer"
add_overlay("cart_replacer")
has_items = 1
if(signs)
overlays += "cart_sign[signs]"
add_overlay("cart_sign[signs]")
has_items = 1
+16 -40
View File
@@ -1,39 +1,33 @@
/obj/structure/lattice
name = "lattice"
desc = "A lightweight support lattice."
icon = 'icons/obj/structures.dmi'
icon_state = "latticefull"
icon = 'icons/obj/smooth/lattice.dmi'
icon_state = "lattice"
density = 0
anchored = 1.0
w_class = 3
layer = 2.3 //under pipes
// flags = CONDUCT
smooth = SMOOTH_MORE
canSmoothWith = list(
/obj/structure/lattice,
/turf/simulated/wall,
/turf/simulated/floor,
/turf/simulated/mineral,
/turf/unsimulated/wall,
/turf/unsimulated/floor,
/obj/structure/grille
)
/obj/structure/lattice/initialize()
..()
/obj/structure/lattice/Initialize()
. = ..()
///// Z-Level Stuff
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open) || istype(src.loc, /turf/simulated/floor/asteroid)))
///// Z-Level Stuff
qdel(src)
return INITIALIZE_HINT_QDEL
for(var/obj/structure/lattice/LAT in src.loc)
if(LAT != src)
qdel(LAT)
icon = 'icons/obj/smoothlattice.dmi'
icon_state = "latticeblank"
updateOverlays()
for (var/dir in cardinal)
var/obj/structure/lattice/L
if(locate(/obj/structure/lattice, get_step(src, dir)))
L = locate(/obj/structure/lattice, get_step(src, dir))
L.updateOverlays()
/obj/structure/lattice/Destroy()
for (var/dir in cardinal)
var/obj/structure/lattice/L
if(locate(/obj/structure/lattice, get_step(src, dir)))
L = locate(/obj/structure/lattice, get_step(src, dir))
L.updateOverlays()
..()
/obj/structure/lattice/ex_act(severity)
switch(severity)
@@ -53,23 +47,5 @@
var/obj/item/weapon/weldingtool/WT = C
if(WT.remove_fuel(0, user))
user << "<span class='notice'>Slicing lattice joints ...</span>"
getFromPool(/obj/item/stack/rods, src.loc)
new /obj/item/stack/rods(src.loc)
qdel(src)
return
/obj/structure/lattice/proc/updateOverlays()
spawn(1)
overlays = list()
var/dir_sum = 0
for (var/direction in cardinal)
if(locate(/obj/structure/lattice, get_step(src, direction)))
dir_sum += direction
else
if(!(istype(get_step(src, direction), /turf/space)))
dir_sum += direction
icon_state = "lattice[dir_sum]"
return
+2 -2
View File
@@ -69,7 +69,7 @@
var/datum/nano_module/appearance_changer/AC = ui_users[user]
qdel(AC)
ui_users.Cut()
..()
return ..()
// The following mirror is ~special~.
/obj/structure/mirror/raider
@@ -121,4 +121,4 @@
var/datum/nano_module/appearance_changer/AC = ui_users[user]
qdel(AC)
ui_users.Cut()
..()
return ..()
+2 -2
View File
@@ -189,8 +189,8 @@
var/_wifi_id
var/datum/wifi/receiver/button/crematorium/wifi_receiver
/obj/structure/crematorium/initialize()
..()
/obj/structure/crematorium/Initialize()
. = ..()
if(_wifi_id)
wifi_receiver = new(_wifi_id, src)
+2 -1
View File
@@ -7,7 +7,8 @@
anchored = 1
var/notices = 0
/obj/structure/noticeboard/initialize()
/obj/structure/noticeboard/Initialize()
. = ..()
for(var/obj/item/I in loc)
if(notices > 4) break
if(istype(I, /obj/item/weapon/paper))
+3 -3
View File
@@ -61,7 +61,7 @@
if(T)
if(istype(T, /turf/simulated/floor))
T.blocks_air = 0
..()
return ..()
//Airtight plastic flaps made for the kitchen freezer, blocks atmos but not movement
@@ -81,7 +81,7 @@
if(T)
if(istype(T, /turf/simulated/floor))
T.blocks_air = 0
..()
return ..()
/obj/structure/plasticflaps/airtight/CanPass(atom/A, turf/T)
return 1//Blocks nothing except air
return 1//Blocks nothing except air
+6 -7
View File
@@ -30,7 +30,8 @@ FLOOR SAFES
tumbler_2_open = rand(0, 72)
/obj/structure/safe/initialize()
/obj/structure/safe/Initialize()
. = ..()
for(var/obj/item/I in loc)
if(space >= maxspace)
return
@@ -171,8 +172,8 @@ obj/structure/safe/ex_act(severity)
level = 1 //underfloor
layer = 2.5
/obj/structure/safe/floor/initialize()
..()
/obj/structure/safe/floor/Initialize()
. = ..()
var/turf/T = loc
if(istype(T) && !T.is_plating())
hide(1)
@@ -188,11 +189,9 @@ obj/structure/safe/ex_act(severity)
/obj/structure/safe/station
name = "corporate safe"
/obj/structure/safe/station/New()
..()
/obj/structure/safe/station/Initialize()
. = ..()
new /obj/random/highvalue(src)
new /obj/random/highvalue(src)
new /obj/random/highvalue(src)
new /obj/random/highvalue(src)
return
+2 -2
View File
@@ -42,7 +42,7 @@
/obj/structure/simple_door/Destroy()
processing_objects -= src
update_nearby_tiles()
..()
return ..()
/obj/structure/simple_door/get_material()
return material
@@ -196,4 +196,4 @@
..(newloc, "wood")
/obj/structure/simple_door/resin/New(var/newloc,var/material_name)
..(newloc, "resin")
..(newloc, "resin")
@@ -20,8 +20,8 @@
var/material/padding_material
var/base_icon = "bed"
/obj/structure/bed/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc)
/obj/structure/bed/Initialize(mapload, var/new_material, var/new_padding_material)
. = ..()
color = null
if(!new_material)
new_material = DEFAULT_WALL_MATERIAL
@@ -92,32 +92,32 @@
desc = "It's a chair. It looks comfy."
icon_state = "comfychair_preview"
/obj/structure/bed/chair/comfy/brown/New(var/newloc,var/newmaterial)
..(newloc,"steel","leather")
/obj/structure/bed/chair/comfy/brown/Initialize(mapload,var/newmaterial)
. = ..(mapload,"steel","leather")
/obj/structure/bed/chair/comfy/red/New(var/newloc,var/newmaterial)
..(newloc,"steel","carpet")
/obj/structure/bed/chair/comfy/red/Initialize(var/mapload,var/newmaterial)
. = ..(mapload,"steel","carpet")
/obj/structure/bed/chair/comfy/teal/New(var/newloc,var/newmaterial)
..(newloc,"steel","teal")
/obj/structure/bed/chair/comfy/teal/Initialize(var/mapload,var/newmaterial)
. = ..(mapload,"steel","teal")
/obj/structure/bed/chair/comfy/black/New(var/newloc,var/newmaterial)
..(newloc,"steel","black")
/obj/structure/bed/chair/comfy/black/Initialize(var/mapload,var/newmaterial)
. = ..(mapload,"steel","black")
/obj/structure/bed/chair/comfy/green/New(var/newloc,var/newmaterial)
..(newloc,"steel","green")
/obj/structure/bed/chair/comfy/green/Initialize(var/mapload,var/newmaterial)
. = ..(mapload,"steel","green")
/obj/structure/bed/chair/comfy/purp/New(var/newloc,var/newmaterial)
..(newloc,"steel","purple")
/obj/structure/bed/chair/comfy/purp/Initialize(var/mapload,var/newmaterial)
. = ..(mapload,"steel","purple")
/obj/structure/bed/chair/comfy/blue/New(var/newloc,var/newmaterial)
..(newloc,"steel","blue")
/obj/structure/bed/chair/comfy/blue/Initialize(var/mapload,var/newmaterial)
. = ..(mapload,"steel","blue")
/obj/structure/bed/chair/comfy/beige/New(var/newloc,var/newmaterial)
..(newloc,"steel","beige")
/obj/structure/bed/chair/comfy/beige/Initialize(var/mapload,var/newmaterial)
. = ..(mapload,"steel","beige")
/obj/structure/bed/chair/comfy/lime/New(var/newloc,var/newmaterial)
..(newloc,"steel","lime")
/obj/structure/bed/chair/comfy/lime/Initialize(var/mapload,var/newmaterial)
. = ..(mapload,"steel","lime")
/obj/structure/bed/chair/office
anchored = 0
@@ -183,8 +183,8 @@
icon_state = "bridge"
anchored = 1
/obj/structure/bed/chair/office/New()
..()
/obj/structure/bed/chair/office/Initialize()
. = ..()
var/image/I = image(icon, "[icon_state]_over")
I.layer = FLY_LAYER
overlays += I
@@ -203,8 +203,8 @@
return
..()
/obj/structure/bed/chair/wood/New(var/newloc)
..(newloc, "wood")
/obj/structure/bed/chair/wood/Initialize(mapload)
. = ..(mapload, "wood")
var/image/I = image(icon, "[icon_state]_over")
I.layer = FLY_LAYER
overlays += I
+11 -9
View File
@@ -11,26 +11,28 @@
var/list/oxytanks = list() //sorry for the similar var names
var/list/platanks = list()
/obj/structure/dispenser/oxygen
phorontanks = 0
/obj/structure/dispenser/phoron
oxygentanks = 0
/obj/structure/dispenser/New()
/obj/structure/dispenser/Initialize()
. = ..()
update_icon()
/obj/structure/dispenser/update_icon()
overlays.Cut()
cut_overlays()
switch(oxygentanks)
if(1 to 3) overlays += "oxygen-[oxygentanks]"
if(4 to INFINITY) overlays += "oxygen-4"
if(1 to 3)
add_overlay("oxygen-[oxygentanks]")
if(4 to INFINITY)
add_overlay("oxygen-4")
switch(phorontanks)
if(1 to 4) overlays += "phoron-[phorontanks]"
if(5 to INFINITY) overlays += "phoron-5"
if(1 to 4)
add_overlay("phoron-[phorontanks]")
if(5 to INFINITY)
add_overlay("phoron-5")
/obj/structure/dispenser/attack_ai(mob/user as mob)
if(user.Adjacent(src))
@@ -51,7 +51,7 @@
for(var/atom/movable/AM in contents)
AM.loc = loc
..()
return ..()
+9 -7
View File
@@ -182,17 +182,19 @@
spawn(50)
if(src && on)
ismist = 1
mymist = getFromPool(/obj/effect/mist,loc)
mymist = new /obj/effect/mist(loc)
else
ismist = 1
mymist = getFromPool(/obj/effect/mist,loc)
mymist = new /obj/effect/mist(loc)
else if(ismist)
ismist = 1
mymist = getFromPool(/obj/effect/mist,loc)
spawn(250)
if(src && !on)
qdel(mymist)
ismist = 0
mymist = new /obj/effect/mist(loc)
addtimer(CALLBACK(src, .proc/clear_mist), 250, TIMER_OVERRIDE)
/obj/machinery/shower/proc/clear_mist()
if (!on)
QDEL_NULL(mymist)
ismist = FALSE
/obj/machinery/shower/Crossed(atom/movable/O)
..()
@@ -42,7 +42,7 @@ obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
obj/structure/windoor_assembly/Destroy()
density = 0
update_nearby_tiles()
..()
return ..()
/obj/structure/windoor_assembly/update_icon()
icon_state = "[facing]_[secure]windoor_assembly[state]"
@@ -80,7 +80,7 @@ obj/structure/windoor_assembly/Destroy()
user << "<span class='notice'>You dissasembled the windoor assembly!</span>"
new /obj/item/stack/material/glass/reinforced(get_turf(src), 5)
if(secure)
getFromPool(/obj/item/stack/rods, get_turf(src), 4)
new /obj/item/stack/rods(get_turf(src), 4)
qdel(src)
else
user << "<span class='notice'>You need more welding fuel to dissassemble the windoor assembly.</span>"
+7 -6
View File
@@ -91,15 +91,16 @@
index = 0
while(index < 2)
new shardtype(loc) //todo pooling?
if(reinf) getFromPool(/obj/item/stack/rods, loc)
if(reinf)
new /obj/item/stack/rods(loc)
index++
else
new shardtype(loc) //todo pooling?
if(reinf) getFromPool(/obj/item/stack/rods, loc)
if(reinf)
new /obj/item/stack/rods(loc)
qdel(src)
return
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
var/proj_damage = Proj.get_structure_damage()
@@ -325,8 +326,8 @@
update_nearby_tiles(need_rebuild=1)
return
/obj/structure/window/New(Loc, start_dir=null, constructed=0)
..()
/obj/structure/window/Initialize(mapload, start_dir = null, constructed=0)
. = ..()
//player-constructed windows
if (constructed)
@@ -351,7 +352,7 @@
for(var/obj/structure/window/W in orange(location, 1))
W.update_icon()
loc = location
..()
return ..()
/obj/structure/window/Move()
@@ -25,12 +25,15 @@
/obj/effect/wingrille_spawn/attack_generic()
activate()
/obj/effect/wingrille_spawn/initialize()
/obj/effect/wingrille_spawn/Initialize(mapload)
if (!win_path)
return INITIALIZE_HINT_QDEL
..()
if(!win_path)
return
if(ticker && ticker.current_state < GAME_STATE_PLAYING)
activate()
activate()
return INITIALIZE_HINT_LATEQDEL
/obj/effect/wingrille_spawn/proc/activate()
if(activated) return
@@ -55,9 +58,6 @@
else
neighbours |= other
activated = 1
for(var/obj/effect/wingrille_spawn/other in neighbours)
if(!other.activated) other.activate()
qdel(src)
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
return