Tg patch branch to master (#192)

* code nitpicking

* Midnight oil

More like 6am oil.  Still having issues with actually eating anyone.

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* missed commit

* Noms

* specific release doesn't work

* Tg modernization patch (#115)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* port from cactus did

* fix format error

* Update preferences.dm

unfuck

* Revert "port from cactus did"

* unfuck

* more sprite work

* vore

* disabled roundstart xenos for now

* admin QOL

needs callback porting, TBD

* Mentor system initial port

I'm sure I've missed a fuckton of shit

* test merge

* Jesus tits did this finally fix compile issues?

* Tg modern (#149)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* Tg modernization patch (#115)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* port from cactus did

* fix format error

* Update preferences.dm

unfuck

* Revert "port from cactus did"

* unfuck

* more sprite work

* vore

* disabled roundstart xenos for now

* test merge

* Jesus tits did this finally fix compile issues?

* Initial test compiles. hooray.

* Admin ticket fixes

* I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum

* who list wip

also ahelps are broken again. fuck if I know why

* discord bot basics

* maybe tickets work now & bot framework done

* ahelp callback readd

* Mentor system, Tickets, and discord (#151)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* Tg modernization patch (#115)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* port from cactus did

* fix format error

* Update preferences.dm

unfuck

* Revert "port from cactus did"

* unfuck

* more sprite work

* vore

* disabled roundstart xenos for now

* admin QOL

needs callback porting, TBD

* Mentor system initial port

I'm sure I've missed a fuckton of shit

* test merge

* Jesus tits did this finally fix compile issues?

* Initial test compiles. hooray.

* Admin ticket fixes

* I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum

* who list wip

also ahelps are broken again. fuck if I know why

* discord bot basics

* maybe tickets work now & bot framework done

* ahelp callback readd

* vore tweaks

* progress

* dirtier fix than a korean hooker in the 60s

* The release your hooker will always fake

* you could save that hookers number but wouldn't you rather just vore the hooker instead

* Save system is literal black magic

* great googly moogly it's all gone to shit

* We May 2015 save code now

* fiddling with digestion code now

* fuck if I know anymore. I'm going to bed

* OWN UP YOUR OWN DIGESTION

* UNREGULATED GUTS ARE NON COMPLIANT

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* BELLIES MUST COMPLY WITH USER OWNERSHIP

* Removed debug messages

* Unneeded verb additions

* file change tweaks

* WATCH YOUR SPACING, DRIVER

* Changelog and devourment for some mobs.

Because I knew people were gunna ask.

NO YOU CANNOT EAT THE FUCKING LEGION

* Vore code sync (#157)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Escape and Devourable

For the normies who play here yet complain about it.

* Things that should be committed

* unneeded files

* Sizeray works now

* tweaks and bed time going

* IT WORKS mostly

Need to get multiple guts and saving working tho

* save tweaks

* item hotfix

* gut examine message

* damifino

* save system works

also ensured some mobs have vore controls, so silicons can't even
remotely do vore things.

* code nitpicking

* Midnight oil

More like 6am oil.  Still having issues with actually eating anyone.

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* missed commit

* Noms

* specific release doesn't work

* Tg modernization patch (#115)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* port from cactus did

* fix format error

* Update preferences.dm

unfuck

* Revert "port from cactus did"

* unfuck

* more sprite work

* vore

* disabled roundstart xenos for now

* admin QOL

needs callback porting, TBD

* Mentor system initial port

I'm sure I've missed a fuckton of shit

* test merge

* Jesus tits did this finally fix compile issues?

* Initial test compiles. hooray.

* Admin ticket fixes

* I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum

* who list wip

also ahelps are broken again. fuck if I know why

* discord bot basics

* maybe tickets work now & bot framework done

* ahelp callback readd

* vore tweaks

* progress

* dirtier fix than a korean hooker in the 60s

* The release your hooker will always fake

* you could save that hookers number but wouldn't you rather just vore the hooker instead

* Save system is literal black magic

* great googly moogly it's all gone to shit

* We May 2015 save code now

* fiddling with digestion code now

* fuck if I know anymore. I'm going to bed

* OWN UP YOUR OWN DIGESTION

* UNREGULATED GUTS ARE NON COMPLIANT

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* BELLIES MUST COMPLY WITH USER OWNERSHIP

* Removed debug messages

* Unneeded verb additions

* file change tweaks

* WATCH YOUR SPACING, DRIVER

* Changelog and devourment for some mobs.

Because I knew people were gunna ask.

NO YOU CANNOT EAT THE FUCKING LEGION

* title screen change from Crow's PR.

* More of Crow's title screen stuff

* mode tweaks.... again

* gamemode voting in lobby via TalkingCactus
disabled ashwalkers as roundstart
Verk's species tweak
paralax starts disabled by default

* LOOC

* index sync problem (#158)

* digifix

* things

* furry races.dm

* actually deletes species_types

* maps

* tgui and stuff

* Sounds

* icon updates

* Defines and helpers

* global vars and on click

* controllers

* datums

* game folder

* fixes invisible flan mobs

* some modules

* dropbomb verb enhanced

* moar

* moar

* moar

* even more again

* and finally these for modules

* Some compile tweaks

* silly dme get updated you scrub

* compiles cleanly now

* various open PR fixes from TG

as of 0800 Texas Standard Time

* also fancy cryopods before I forget again

* headslug gold core fix

* edgy code of the modernization (#164)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Escape and Devourable

For the normies who play here yet complain about it.

* Things that should be committed

* unneeded files

* Sizeray works now

* tweaks and bed time going

* IT WORKS mostly

Need to get multiple guts and saving working tho

* save tweaks

* item hotfix

* gut examine message

* damifino

* save system works

also ensured some mobs have vore controls, so silicons can't even
remotely do vore things.

* code nitpicking

* Midnight oil

More like 6am oil.  Still having issues with actually eating anyone.

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* missed commit

* Noms

* specific release doesn't work

* Tg modernization patch (#115)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* port from cactus did

* fix format error

* Update preferences.dm

unfuck

* Revert "port from cactus did"

* unfuck

* more sprite work

* vore

* disabled roundstart xenos for now

* admin QOL

needs callback porting, TBD

* Mentor system initial port

I'm sure I've missed a fuckton of shit

* test merge

* Jesus tits did this finally fix compile issues?

* Initial test compiles. hooray.

* Admin ticket fixes

* I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum

* who list wip

also ahelps are broken again. fuck if I know why

* discord bot basics

* maybe tickets work now & bot framework done

* ahelp callback readd

* vore tweaks

* progress

* Small fixes for dogborgs and sprite accessories:
-Ported the hidden snippets of the dogborg code.
-Reset module now resets pixel offset and icon directory again. (broke shit when reseting from dogborg)
-Medihound belly fixed.
-Husky body marking tweaked to not overlap arms in side view.
-Added husky ears that are basically wolf ears that use secondary color instead.

* dirtier fix than a korean hooker in the 60s

* The release your hooker will always fake

* you could save that hookers number but wouldn't you rather just vore the hooker instead

* Save system is literal black magic

* great googly moogly it's all gone to shit

* We May 2015 save code now

* fiddling with digestion code now

* fuck if I know anymore. I'm going to bed

* OWN UP YOUR OWN DIGESTION

* UNREGULATED GUTS ARE NON COMPLIANT

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* BELLIES MUST COMPLY WITH USER OWNERSHIP

* Removed debug messages

* Unneeded verb additions

* file change tweaks

* WATCH YOUR SPACING, DRIVER

* Changelog and devourment for some mobs.

Because I knew people were gunna ask.

NO YOU CANNOT EAT THE FUCKING LEGION

* title screen change from Crow's PR.

* More of Crow's title screen stuff

* mode tweaks.... again

* gamemode voting in lobby via TalkingCactus
disabled ashwalkers as roundstart
Verk's species tweak
paralax starts disabled by default

* LOOC

* index sync problem (#158)

* digifix

* things

* furry races.dm

* actually deletes species_types

* maps

* tgui and stuff

* Sounds

* icon updates

* Defines and helpers

* global vars and on click

* controllers

* datums

* game folder

* fixes invisible flan mobs

* some modules

* dropbomb verb enhanced

* moar

* moar

* moar

* even more again

* and finally these for modules

* Some compile tweaks

* silly dme get updated you scrub

* compiles cleanly now

* various open PR fixes from TG

as of 0800 Texas Standard Time

* also fancy cryopods before I forget again

* headslug gold core fix

* some species and DNA tweaks

* Digest already damn you

* suddenly sound and resist works. wtf

* Minor tweaks, cryopod noise change

* Vore tested working, species working

* Merge test onto bleeding edgy (#165)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Escape and Devourable

For the normies who play here yet complain about it.

* Things that should be committed

* unneeded files

* Sizeray works now

* tweaks and bed time going

* IT WORKS mostly

Need to get multiple guts and saving working tho

* save tweaks

* item hotfix

* gut examine message

* damifino

* save system works

also ensured some mobs have vore controls, so silicons can't even
remotely do vore things.

* code nitpicking

* Midnight oil

More like 6am oil.  Still having issues with actually eating anyone.

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* missed commit

* Noms

* specific release doesn't work

* Tg modernization patch (#115)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* port from cactus did

* fix format error

* Update preferences.dm

unfuck

* Revert "port from cactus did"

* unfuck

* more sprite work

* vore

* disabled roundstart xenos for now

* admin QOL

needs callback porting, TBD

* Mentor system initial port

I'm sure I've missed a fuckton of shit

* test merge

* Jesus tits did this finally fix compile issues?

* Initial test compiles. hooray.

* Admin ticket fixes

* I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum

* who list wip

also ahelps are broken again. fuck if I know why

* discord bot basics

* maybe tickets work now & bot framework done

* ahelp callback readd

* vore tweaks

* progress

* Small fixes for dogborgs and sprite accessories:
-Ported the hidden snippets of the dogborg code.
-Reset module now resets pixel offset and icon directory again. (broke shit when reseting from dogborg)
-Medihound belly fixed.
-Husky body marking tweaked to not overlap arms in side view.
-Added husky ears that are basically wolf ears that use secondary color instead.

* dirtier fix than a korean hooker in the 60s

* The release your hooker will always fake

* you could save that hookers number but wouldn't you rather just vore the hooker instead

* Save system is literal black magic

* great googly moogly it's all gone to shit

* We May 2015 save code now

* fiddling with digestion code now

* fuck if I know anymore. I'm going to bed

* OWN UP YOUR OWN DIGESTION

* UNREGULATED GUTS ARE NON COMPLIANT

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* BELLIES MUST COMPLY WITH USER OWNERSHIP

* Removed debug messages

* Unneeded verb additions

* file change tweaks

* WATCH YOUR SPACING, DRIVER

* Changelog and devourment for some mobs.

Because I knew people were gunna ask.

NO YOU CANNOT EAT THE FUCKING LEGION

* title screen change from Crow's PR.

* More of Crow's title screen stuff

* mode tweaks.... again

* gamemode voting in lobby via TalkingCactus
disabled ashwalkers as roundstart
Verk's species tweak
paralax starts disabled by default

* LOOC

* index sync problem (#158)

* digifix

* things

* furry races.dm

* actually deletes species_types

* maps

* tgui and stuff

* Sounds

* icon updates

* Defines and helpers

* global vars and on click

* controllers

* datums

* game folder

* fixes invisible flan mobs

* some modules

* dropbomb verb enhanced

* moar

* moar

* moar

* even more again

* and finally these for modules

* Some compile tweaks

* silly dme get updated you scrub

* compiles cleanly now

* various open PR fixes from TG

as of 0800 Texas Standard Time

* also fancy cryopods before I forget again

* headslug gold core fix

* some species and DNA tweaks

* Digest already damn you

* suddenly sound and resist works. wtf

* Minor tweaks, cryopod noise change

* Vore tested working, species working

* travis map updates

* updates

* pool's closed due to lag

* datum pools are closed too

* Initializing new pool's closed

* Pool's closed and initializing shit is done

* sprite updates

* chattering is okay to do now.

* bleeblin edgy 1/23 (#166)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Escape and Devourable

For the normies who play here yet complain about it.

* Things that should be committed

* unneeded files

* Sizeray works now

* tweaks and bed time going

* IT WORKS mostly

Need to get multiple guts and saving working tho

* save tweaks

* item hotfix

* gut examine message

* damifino

* save system works

also ensured some mobs have vore controls, so silicons can't even
remotely do vore things.

* code nitpicking

* Midnight oil

More like 6am oil.  Still having issues with actually eating anyone.

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* missed commit

* Noms

* specific release doesn't work

* Tg modernization patch (#115)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes

* port from cactus did

* fix format error

* Update preferences.dm

unfuck

* Revert "port from cactus did"

* unfuck

* more sprite work

* vore

* disabled roundstart xenos for now

* admin QOL

needs callback porting, TBD

* Mentor system initial port

I'm sure I've missed a fuckton of shit

* test merge

* Jesus tits did this finally fix compile issues?

* Initial test compiles. hooray.

* Admin ticket fixes

* I'll give you a bad argument you piece of shit dream maker I fucking swear on my mum

* who list wip

also ahelps are broken again. fuck if I know why

* discord bot basics

* maybe tickets work now & bot framework done

* ahelp callback readd

* vore tweaks

* progress

* Small fixes for dogborgs and sprite accessories:
-Ported the hidden snippets of the dogborg code.
-Reset module now resets pixel offset and icon directory again. (broke shit when reseting from dogborg)
-Medihound belly fixed.
-Husky body marking tweaked to not overlap arms in side view.
-Added husky ears that are basically wolf ears that use secondary color instead.

* dirtier fix than a korean hooker in the 60s

* The release your hooker will always fake

* you could save that hookers number but wouldn't you rather just vore the hooker instead

* Save system is literal black magic

* great googly moogly it's all gone to shit

* We May 2015 save code now

* fiddling with digestion code now

* fuck if I know anymore. I'm going to bed

* OWN UP YOUR OWN DIGESTION

* UNREGULATED GUTS ARE NON COMPLIANT

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* BELLIES MUST COMPLY WITH USER OWNERSHIP

* Removed debug messages

* Unneeded verb additions

* file change tweaks

* WATCH YOUR SPACING, DRIVER

* Changelog and devourment for some mobs.

Because I knew people were gunna ask.

NO YOU CANNOT EAT THE FUCKING LEGION

* title screen change from Crow's PR.

* More of Crow's title screen stuff

* mode tweaks.... again

* gamemode voting in lobby via TalkingCactus
disabled ashwalkers as roundstart
Verk's species tweak
paralax starts disabled by default

* LOOC

* index sync problem (#158)

* digifix

* things

* furry races.dm

* actually deletes species_types

* maps

* tgui and stuff

* Sounds

* icon updates

* Defines and helpers

* global vars and on click

* controllers

* datums

* game folder

* fixes invisible flan mobs

* some modules

* dropbomb verb enhanced

* moar

* moar

* moar

* even more again

* and finally these for modules

* Some compile tweaks

* silly dme get updated you scrub

* compiles cleanly now

* various open PR fixes from TG

as of 0800 Texas Standard Time

* also fancy cryopods before I forget again

* headslug gold core fix

* some species and DNA tweaks

* Digest already damn you

* suddenly sound and resist works. wtf

* Minor tweaks, cryopod noise change

* Vore tested working, species working

* travis map updates

* updates

* pool's closed due to lag

* datum pools are closed too

* Initializing new pool's closed

* Pool's closed and initializing shit is done

* sprite updates

* chattering is okay to do now.

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Revert "Modern modern"

* Revert "Revert "Modern modern""

* fix it fix it fix it fix it

* fixes title screen - thanks crow

* Riding code reverted

* possible tgui fix?

* who the fuck even knows if this is the problem

* adds moths and sharks (no colors yet, not greyscaled)
adds LOOC back

* "fixes" missing items in some machinery.

* slight tweaks to abductor spawns
borer event enabled (max 1)

* Update .travis.yml

* fixes shuttle purchase from comms

* fixes and QoL

* Polymorphing all is dangerous too

* re-fixes ahelp ticket system again

* metagaming check proving to be spamlicious

* Fixes not being able to see devoured mob poses

* fix for vehicle buckling

* ahelp timer runtime fix (#178)

* controller and game updates 1/29

* Defines, helpers, datums 1/29

* world.dm updates

* modules/admin tweaks

* everything in modules not a mob

* modules/mob fixes and such

No more PAIs ventcrawling

* icons, maps, tools, etc.

* compiler fixes

* round type vote fixed

* hardsuit cargo pack

* reduce ion and electric storm chance

* perms access for travis

* fix helmet to the suit
removes CE from crate

* changelog

* fuck

* perms for travis... again

* Update tgstation.dme

* Update tgstation.dme

* Donation race

* redpanda

* red panda

* size play work

* Size chemical basics

Needs testing/refining

* some fixing ports before I just fucking ported it anyway

* It's been a fucking week.

* commiting moar changes because github

* admins.txt lol

* icons

* defines and such

* globalvars and onclick

* Controllers

* datums

* game folder

* oh look, HoG is back

* modules pt 1

* client things

* more modules

* everything not mob code

* some mob stuff

* more mob things

* silicon mobs

* ayylims and monkeys

* human updates

* huh

* housekeeping is fired.

* last minute fixes

* more last minute things

* human parts double check'd

* more paper

* Icons are fixed

* double check of thermal protection code. (#191)
This commit is contained in:
TalkingCactus
2017-02-03 06:56:14 -05:00
committed by Poojawa
parent 7735dec0ec
commit f7c09077d2
2489 changed files with 830965 additions and 416701 deletions
+224 -201
View File
@@ -4,6 +4,8 @@
name = "\improper AI core"
icon = 'icons/mob/AI.dmi'
icon_state = "0"
obj_integrity = 500
max_integrity = 500
var/state = 0
var/datum/ai_laws/laws = new()
var/obj/item/weapon/circuitboard/circuit = null
@@ -13,209 +15,230 @@
..()
laws.set_laws_config()
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You start wrenching the frame into place...</span>"
if(do_after(user, 20/P.toolspeed, target = src))
user << "<span class='notice'>You wrench the frame into place.</span>"
anchored = 1
state = 1
return
if(istype(P, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = P
if(!WT.isOn())
user << "<span class='warning'>The welder must be on for this task!</span>"
return
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
user << "<span class='notice'>You start to deconstruct the frame...</span>"
if(do_after(user, 20/P.toolspeed, target = src))
if(!src || !WT.remove_fuel(0, user)) return
user << "<span class='notice'>You deconstruct the frame.</span>"
new /obj/item/stack/sheet/plasteel( loc, 4)
qdel(src)
return
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You start to unfasten the frame...</span>"
if(do_after(user, 20/P.toolspeed, target = src))
user << "<span class='notice'>You unfasten the frame.</span>"
anchored = 0
state = 0
return
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
if(!user.drop_item())
return
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You place the circuit board inside the frame.</span>"
icon_state = "1"
circuit = P
P.loc = src
return
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You screw the circuit board into place.</span>"
state = 2
icon_state = "2"
return
if(istype(P, /obj/item/weapon/crowbar) && circuit)
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You remove the circuit board.</span>"
state = 1
icon_state = "0"
circuit.loc = loc
circuit = null
return
if(2)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You unfasten the circuit board.</span>"
state = 1
icon_state = "1"
return
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to add cables to the frame...</span>"
if(do_after(user, 20, target = src))
if (C.get_amount() >= 5 && state == 2)
C.use(5)
user << "<span class='notice'>You add cables to the frame.</span>"
state = 3
icon_state = "3"
else
user << "<span class='warning'>You need five lengths of cable to wire the AI core!</span>"
return
if(3)
if(istype(P, /obj/item/weapon/wirecutters))
if (brain)
user << "<span class='warning'>Get that brain out of there first!</span>"
else
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You remove the cables.</span>"
state = 2
icon_state = "2"
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
A.amount = 5
return
if(istype(P, /obj/item/stack/sheet/rglass))
var/obj/item/stack/sheet/rglass/G = P
if(G.get_amount() >= 2)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to put in the glass panel...</span>"
if(do_after(user, 20, target = src))
if (G.get_amount() >= 2 && state == 3)
G.use(2)
user << "<span class='notice'>You put in the glass panel.</span>"
state = 4
icon_state = "4"
else
user << "<span class='warning'>You need two sheets of reinforced glass to insert them into AI core!</span>"
return
if(istype(P, /obj/item/weapon/aiModule))
var/obj/item/weapon/aiModule/module = P
module.install(laws, user)
return
if(istype(P, /obj/item/device/mmi))
var/obj/item/device/mmi/M = P
if(!M.brainmob)
user << "<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose!</span>"
return
if(M.brainmob.stat == DEAD)
user << "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"
return
if(!M.brainmob.client)
user << "<span class='warning'>Sticking an inactive brain into the frame would sort of defeat the purpose.</span>"
return
if((config) && (!config.allow_ai))
user << "<span class='warning'>This MMI does not seem to fit!</span>"
return
if(jobban_isbanned(M.brainmob, "AI"))
user << "<span class='warning'>This MMI does not seem to fit!</span>"
return
if(M.hacked || M.clockwork)
user << "<span class='warning'>This MMI does not seem to fit!</span>"
return
if(!M.brainmob.mind)
user << "<span class='warning'>This MMI is mindless!</span>"
return
if(!user.drop_item())
return
ticker.mode.remove_antag_for_borging(M.brainmob.mind)
M.loc = src
brain = M
user << "<span class='notice'>Added a brain.</span>"
icon_state = "3b"
return
if(istype(P, /obj/item/weapon/crowbar) && brain)
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You remove the brain.</span>"
brain.loc = loc
brain = null
icon_state = "3"
return
if(4)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You remove the glass panel.</span>"
state = 3
if (brain)
icon_state = "3b"
else
icon_state = "3"
new /obj/item/stack/sheet/rglass(loc, 2)
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You connect the monitor.</span>"
new /mob/living/silicon/ai (loc, laws, brain)
feedback_inc("cyborg_ais_created",1)
qdel(src)
return
/obj/structure/AIcore/Destroy()
if(circuit)
qdel(circuit)
circuit = null
if(brain)
qdel(brain)
brain = null
return ..()
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/wrench))
return default_unfasten_wrench(user, P, 20)
if(!anchored)
if(istype(P, /obj/item/weapon/weldingtool))
if(state != EMPTY_CORE)
user << "<span class='warning'>The core must be empty to deconstruct it!</span>"
return
var/obj/item/weapon/weldingtool/WT = P
if(!WT.isOn())
user << "<span class='warning'>The welder must be on for this task!</span>"
return
playsound(loc, WT.usesound, 50, 1)
user << "<span class='notice'>You start to deconstruct the frame...</span>"
if(do_after(user, 20*P.toolspeed, target = src) && src && state == EMPTY_CORE && WT && WT.remove_fuel(0, user))
user << "<span class='notice'>You deconstruct the frame.</span>"
deconstruct(TRUE)
return
else
switch(state)
if(EMPTY_CORE)
if(istype(P, /obj/item/weapon/circuitboard/aicore))
if(!user.drop_item())
return
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You place the circuit board inside the frame.</span>"
update_icon()
state = CIRCUIT_CORE
circuit = P
P.forceMove(src)
return
if(CIRCUIT_CORE)
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You screw the circuit board into place.</span>"
state = SCREWED_CORE
update_icon()
return
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You remove the circuit board.</span>"
state = EMPTY_CORE
update_icon()
circuit.forceMove(loc)
circuit = null
return
if(SCREWED_CORE)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You unfasten the circuit board.</span>"
state = CIRCUIT_CORE
update_icon()
return
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to add cables to the frame...</span>"
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
user << "<span class='notice'>You add cables to the frame.</span>"
state = CABLED_CORE
update_icon()
else
user << "<span class='warning'>You need five lengths of cable to wire the AI core!</span>"
return
if(CABLED_CORE)
if(istype(P, /obj/item/weapon/wirecutters))
if(brain)
user << "<span class='warning'>Get that [brain.name] out of there first!</span>"
else
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You remove the cables.</span>"
state = SCREWED_CORE
update_icon()
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
A.amount = 5
return
if(istype(P, /obj/item/stack/sheet/rglass))
var/obj/item/stack/sheet/rglass/G = P
if(G.get_amount() >= 2)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to put in the glass panel...</span>"
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
user << "<span class='notice'>You put in the glass panel.</span>"
state = GLASS_CORE
update_icon()
else
user << "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>"
return
if(istype(P, /obj/item/weapon/aiModule))
if(brain && brain.laws.id != DEFAULT_AI_LAWID)
user << "<span class='warning'>The installed [brain.name] already has set laws!</span>"
return
var/obj/item/weapon/aiModule/module = P
module.install(laws, user)
return
if(istype(P, /obj/item/device/mmi) && !brain)
var/obj/item/device/mmi/M = P
if(!M.brainmob)
user << "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>"
return
if(M.brainmob.stat == DEAD)
user << "<span class='warning'>Sticking a dead [M.name] into the frame would sort of defeat the purpose!</span>"
return
if(!M.brainmob.client)
user << "<span class='warning'>Sticking an inactive [M.name] into the frame would sort of defeat the purpose.</span>"
return
if((config) && (!config.allow_ai) || jobban_isbanned(M.brainmob, "AI"))
user << "<span class='warning'>This [M.name] does not seem to fit!</span>"
return
if(!M.brainmob.mind)
user << "<span class='warning'>This [M.name] is mindless!</span>"
return
if(!user.drop_item())
return
M.forceMove(src)
brain = M
user << "<span class='notice'>You add [M.name] to the frame.</span>"
update_icon()
return
if(istype(P, /obj/item/weapon/crowbar) && brain)
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You remove the brain.</span>"
brain.forceMove(loc)
brain = null
update_icon()
return
if(GLASS_CORE)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You remove the glass panel.</span>"
state = CABLED_CORE
update_icon()
new /obj/item/stack/sheet/rglass(loc, 2)
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You connect the monitor.</span>"
if(brain)
ticker.mode.remove_antag_for_borging(brain.brainmob.mind)
if(!istype(brain.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(brain.brainmob, TRUE)
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
if(brain.force_replace_ai_name)
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
feedback_inc("cyborg_ais_created",1)
qdel(src)
else
state = AI_READY_CORE
update_icon()
return
if(AI_READY_CORE)
if(istype(P, /obj/item/device/aicard))
P.transfer_ai("INACTIVE", "AICARD", src, user)
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You disconnect the monitor.</span>"
state = GLASS_CORE
update_icon()
return
return ..()
/obj/structure/AIcore/update_icon()
switch(state)
if(EMPTY_CORE)
icon_state = "0"
if(CIRCUIT_CORE)
icon_state = "1"
if(SCREWED_CORE)
icon_state = "2"
if(CABLED_CORE)
if(brain)
icon_state = "3b"
else
icon_state = "3"
if(GLASS_CORE)
icon_state = "4"
if(AI_READY_CORE)
icon_state = "ai-empty"
/obj/structure/AIcore/deconstruct(disassembled = TRUE)
if(state == GLASS_CORE)
new /obj/item/stack/sheet/rglass(loc, 2)
if(state >= CABLED_CORE)
new /obj/item/stack/cable_coil(loc, 5)
if(circuit)
circuit.forceMove(loc)
circuit = null
new /obj/item/stack/sheet/plasteel(loc, 4)
qdel(src)
/obj/structure/AIcore/deactivated
name = "inactive AI"
icon = 'icons/mob/AI.dmi'
icon_state = "ai-empty"
anchored = 1
state = 20//So it doesn't interact based on the above. Not really necessary.
state = AI_READY_CORE
/obj/structure/AIcore/deactivated/New()
..()
circuit = new(src)
/obj/structure/AIcore/deactivated/attackby(obj/item/A, mob/user, params)
if(istype(A, /obj/item/device/aicard))//Is it?
A.transfer_ai("INACTIVE","AICARD",src,user)
else if(istype(A, /obj/item/weapon/wrench))
playsound(loc, A.usesound, 50, 1)
user.visible_message("[user] [anchored ? "fastens" : "unfastens"] [src].", \
"<span class='notice'>You start to [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor...</span>")
switch(anchored)
if(0)
if(do_after(user, 20, target = src))
user << "<span class='notice'>You fasten the core into place.</span>"
anchored = 1
if(1)
if(do_after(user, 20, target = src))
user << "<span class='notice'>You unfasten the core.</span>"
anchored = 0
else
return ..()
/*
This is a good place for AI-related object verbs so I'm sticking it here.
@@ -225,7 +248,7 @@ That prevents a few funky behaviors.
//The type of interaction, the player performing the operation, the AI itself, and the card object, if any.
atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
/atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
if(istype(card))
if(card.flush)
user << "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol."
@@ -233,14 +256,14 @@ atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/
return 1
/obj/structure/AIcore/deactivated/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
if(!..())
/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
if(state != AI_READY_CORE || !..())
return
//Transferring a carded AI to a core.
if(interaction == AI_TRANS_FROM_CARD)
AI.control_disabled = 0
AI.radio_enabled = 1
AI.loc = loc//To replace the terminal.
AI.forceMove(loc) // to replace the terminal.
AI << "You have been uploaded to a stationary terminal. Remote device connection restored."
user << "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
card.AI = null
@@ -250,5 +273,5 @@ atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/
/obj/item/weapon/circuitboard/aicore
name = "circuit board (AI core)"
name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
origin_tech = "programming=3"
+90 -118
View File
@@ -9,41 +9,44 @@
/obj/structure/alien
icon = 'icons/mob/alien.dmi'
var/health = 100
obj_integrity = 100
max_integrity = 100
/obj/structure/alien/attacked_by(obj/item/I, mob/user)
..()
var/damage = I.force
switch(I.damtype)
if(BRUTE)
damage *= 0.25
if(BURN)
damage *= 2
else
damage = 0 //stamina damage does no damage
take_damage(damage, I.damtype)
/obj/structure/alien/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee")
switch(damage_type)
if(BRUTE)
damage_amount *= 0.25
if(BURN)
damage_amount *= 2
. = ..()
/obj/structure/alien/proc/take_damage(amount, damage_type = BRUTE, sound_effect = 1)
/obj/structure/alien/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(sound_effect)
if(damage_amount)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
if(sound_effect)
if(damage_amount)
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
else
return
health = max(health - amount, 0)
if(!health)
Break()
/obj/structure/alien/proc/Break()
/*
* Generic alien stuff, not related to the purple lizards but still alien-like
*/
/obj/structure/alien/gelpod
name = "gelatinous mound"
desc = "A mound of jelly-like substance encasing something inside."
icon = 'icons/obj/fluff.dmi'
icon_state = "gelmound"
/obj/structure/alien/gelpod/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new/obj/effect/mob_spawn/human/corpse/damaged(get_turf(src))
qdel(src)
/obj/structure/alien/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type)
/*
* Resin
*/
@@ -56,10 +59,11 @@
opacity = 1
anchored = 1
canSmoothWith = list(/obj/structure/alien/resin)
health = 200
obj_integrity = 200
max_integrity = 200
smooth = SMOOTH_TRUE
var/resintype = null
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/structure/alien/resin/New(location)
@@ -72,9 +76,6 @@
..()
move_update_air(T)
/obj/structure/alien/resin/CanAtmosPass()
return !density
/obj/structure/alien/resin/wall
name = "resin wall"
desc = "Thick resin solidified into a wall."
@@ -92,55 +93,15 @@
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
icon_state = "membrane0"
opacity = 0
health = 160
obj_integrity = 160
max_integrity = 160
resintype = "membrane"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
/obj/structure/alien/resin/ex_act(severity, target)
switch(severity)
if(1)
take_damage(150, BRUTE, 0)
if(2)
take_damage(100, BRUTE, 0)
if(3)
take_damage(50, BRUTE, 0)
/obj/structure/alien/blob_act(obj/effect/blob/B)
take_damage(50, BRUTE, 0)
/obj/structure/alien/resin/hitby(atom/movable/AM)
..()
var/tforce = 0
if(!isobj(AM))
tforce = 10
else
var/obj/O = AM
tforce = O.throwforce
take_damage(tforce)
/obj/structure/alien/resin/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
take_damage(200)
/obj/structure/alien/resin/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/alien/resin/attack_alien(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
take_damage(50)
/obj/structure/alien/resin/attack_animal(mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
if(!M.melee_damage_upper)
return
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>")
take_damage(M.melee_damage_upper, M.melee_damage_type)
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target, height=0)
return !density
@@ -159,17 +120,24 @@
density = 0
layer = TURF_LAYER
icon_state = "weeds"
health = 15
var/obj/structure/alien/weeds/node/linked_node = null
obj_integrity = 15
max_integrity = 15
canSmoothWith = list(/obj/structure/alien/weeds, /turf/closed/wall)
smooth = SMOOTH_MORE
var/last_expand = 0 //last world.time this weed expanded
var/growth_cooldown_low = 150
var/growth_cooldown_high = 200
var/static/list/blacklisted_turfs = typecacheof(list(
/turf/open/space,
/turf/open/chasm,
/turf/open/floor/plating/lava))
/obj/structure/alien/weeds/New(pos, node)
/obj/structure/alien/weeds/New()
pixel_x = -4
pixel_y = -4 //so the sprites line up right in the map editor
..()
if(!luminosity) //weed nodes have luminosity, but normal weeds don't!
last_expand = world.time + rand(growth_cooldown_low, growth_cooldown_high)
if(icon == initial(icon))
switch(rand(1,3))
if(1)
icon = 'icons/obj/smooth_structures/alien/weeds1.dmi'
@@ -177,43 +145,26 @@
icon = 'icons/obj/smooth_structures/alien/weeds2.dmi'
if(3)
icon = 'icons/obj/smooth_structures/alien/weeds3.dmi'
linked_node = node
if(istype(loc, /turf/open/space))
qdel(src)
return
addtimer(src, "Life", rand(150, 200))
/obj/structure/alien/weeds/Destroy()
linked_node = null
return ..()
/obj/structure/alien/weeds/proc/Life()
set background = BACKGROUND_ENABLED
/obj/structure/alien/weeds/proc/expand()
var/turf/U = get_turf(src)
if(istype(U, /turf/open/space))
if(is_type_in_typecache(U, blacklisted_turfs))
qdel(src)
return
if(!linked_node || get_dist(linked_node, src) > linked_node.node_range)
return
return FALSE
for(var/turf/T in U.GetAtmosAdjacentTurfs())
if (locate(/obj/structure/alien/weeds) in T || istype(T, /turf/open/space))
if(locate(/obj/structure/alien/weeds) in T)
continue
new /obj/structure/alien/weeds(T, linked_node)
/obj/structure/alien/weeds/ex_act(severity, target)
qdel(src)
if(is_type_in_typecache(T, blacklisted_turfs))
continue
new /obj/structure/alien/weeds(T)
return TRUE
/obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
take_damage(5, BURN, 0)
take_damage(5, BURN, 0, 0)
//Weed nodes
/obj/structure/alien/weeds/node
@@ -223,10 +174,23 @@
luminosity = 1
var/node_range = NODERANGE
/obj/structure/alien/weeds/node/New()
icon = 'icons/obj/smooth_structures/alien/weednode.dmi'
..(loc, src)
..()
var/obj/structure/alien/weeds/W = locate(/obj/structure/alien/weeds) in loc
if(W && W != src)
qdel(W)
START_PROCESSING(SSobj, src)
/obj/structure/alien/weeds/node/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/structure/alien/weeds/node/process()
for(var/obj/structure/alien/weeds/W in range(node_range, src))
if(W.last_expand <= world.time)
if(W.expand())
W.last_expand = world.time + rand(growth_cooldown_low, growth_cooldown_high)
#undef NODERANGE
@@ -249,7 +213,8 @@
icon_state = "egg_growing"
density = 0
anchored = 1
health = 100
obj_integrity = 100
max_integrity = 100
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
layer = MOB_LAYER
@@ -257,15 +222,18 @@
/obj/structure/alien/egg/New()
new /obj/item/clothing/mask/facehugger(src)
..()
addtimer(src, "Grow", rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
addtimer(CALLBACK(src, .proc/Grow), rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
/obj/structure/alien/egg/Destroy()
remove_from_proximity_list(src, 1)
..()
return ..()
/obj/structure/alien/egg/attack_paw(mob/living/user)
return attack_hand(user)
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
return attack_hand(user)
/obj/structure/alien/egg/attack_hand(mob/living/user)
if(user.getorgan(/obj/item/organ/alien/plasmavessel))
switch(status)
@@ -313,20 +281,24 @@
child.Attach(M)
break
/obj/structure/alien/egg/Move()
remove_from_proximity_list(src, 1)
..()
/obj/structure/alien/egg/Break()
if(status != BURST && status != BURSTING)
Burst()
else if(status == BURST)
qdel(src) //Remove the egg after it has been hit after bursting.
/obj/structure/alien/egg/Moved(oldloc)
remove_from_proximity_list(oldloc, 1)
if(status == GROWN)
add_to_proximity_list(src, 1)
return ..()
/obj/structure/alien/egg/deconstruct()
if(!(flags & NODECONSTRUCT))
if(status != BURST && status != BURSTING)
Burst()
else if(status == BURST)
qdel(src) //Remove the egg after it has been hit after bursting.
else
qdel(src)
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500)
take_damage(5, BURN, 0)
take_damage(5, BURN, 0, 0)
/obj/structure/alien/egg/HasProximity(atom/movable/AM)
+5 -4
View File
@@ -9,8 +9,9 @@
icon = 'icons/obj/artstuff.dmi'
icon_state = "easel"
density = 1
burn_state = FLAMMABLE
burntime = 15
resistance_flags = FLAMMABLE
obj_integrity = 60
max_integrity = 60
var/obj/item/weapon/canvas/painting = null
@@ -18,7 +19,7 @@
/obj/structure/easel/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/canvas))
var/obj/item/weapon/canvas/C = I
user.unEquip(C)
user.dropItemToGround(C)
painting = C
C.loc = get_turf(src)
C.layer = layer+0.1
@@ -51,7 +52,7 @@ var/global/list/globalBlankCanvases[AMT_OF_CANVASES]
desc = "draw out your soul on this canvas!"
icon = 'icons/obj/artstuff.dmi'
icon_state = "11x11"
burn_state = FLAMMABLE
resistance_flags = FLAMMABLE
var/whichGlobalBackup = 1 //List index
/obj/item/weapon/canvas/nineteenXnineteen
+34 -25
View File
@@ -4,9 +4,13 @@
icon = 'icons/obj/barsigns.dmi'
icon_state = "empty"
req_access = list(access_bar)
obj_integrity = 500
max_integrity = 500
integrity_failure = 250
armor = list(melee = 20, bullet = 20, laser = 20, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
buildable_sign = 0
var/list/barsigns=list()
var/list/hiddensigns
var/broken = 0
var/emagged = 0
var/state = 0
var/prev_sign = ""
@@ -43,6 +47,22 @@
/obj/structure/sign/barsign/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
broken = 1
/obj/structure/sign/barsign/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 2)
new /obj/item/stack/cable_coil (loc, 2)
qdel(src)
/obj/structure/sign/barsign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
if(BURN)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/sign/barsign/attack_ai(mob/user)
return src.attack_hand(user)
@@ -145,61 +165,73 @@
icon = "maltesefalcon"
desc = "The Maltese Falcon, Space Bar and Grill."
/datum/barsign/thebark
name = "The Bark"
icon = "thebark"
desc = "Ian's bar of choice."
/datum/barsign/harmbaton
name = "The Harmbaton"
icon = "theharmbaton"
desc = "A great dining experience for both security members and assistants."
/datum/barsign/thesingulo
name = "The Singulo"
icon = "thesingulo"
desc = "Where people go that'd rather not be called by their name."
/datum/barsign/thedrunkcarp
name = "The Drunk Carp"
icon = "thedrunkcarp"
desc = "Don't drink and swim."
/datum/barsign/scotchservinwill
name = "Scotch Servin Willy's"
icon = "scotchservinwill"
desc = "Willy sure moved up in the world from clown to bartender."
/datum/barsign/officerbeersky
name = "Officer Beersky's"
icon = "officerbeersky"
desc = "Man eat a dong, these drinks are great."
/datum/barsign/thecavern
name = "The Cavern"
icon = "thecavern"
desc = "Fine drinks while listening to some fine tunes."
/datum/barsign/theouterspess
name = "The Outer Spess"
icon = "theouterspess"
desc = "This bar isn't actually located in outer space."
/datum/barsign/slipperyshots
name = "Slippery Shots"
icon = "slipperyshots"
desc = "Slippery slope to drunkeness with our shots!"
/datum/barsign/thegreytide
name = "The Grey Tide"
icon = "thegreytide"
desc = "Abandon your toolboxing ways and enjoy a lazy beer!"
/datum/barsign/honkednloaded
name = "Honked 'n' Loaded"
icon = "honkednloaded"
desc = "Honk."
/datum/barsign/thenest
name = "The Nest"
icon = "thenest"
@@ -267,30 +299,6 @@
icon = "thenet"
desc = "You just seem to get caught up in it for hours."
/datum/barsign/thenumberone
name = "The Number One"
icon = "thenumberone"
desc = "Known for the bartender's trickery, this place is going down in history."
/datum/barsign/thesnowflake
name = "The Snowflake"
icon = "thesnowflake"
desc = "The drinks around here always seem to be overly unique."
/datum/barsign/thehalflife
name = "The Half-Life"
icon = "thehalflife"
desc = "They say it's dedicated to a brave scientist who killed a hundred xenos with only a crowbar."
/datum/barsign/topmen
name = "Top Men"
icon = "topmen"
desc = "They've got top men working here right now. Top. Men."
/datum/barsign/thesun
name = "The Sun"
icon = "thesun"
desc = "The hottest bar in the galaxy!"
/datum/barsign/hiddensigns
hidden = 1
@@ -318,3 +326,4 @@
name = "Bar Sign"
icon = "empty"
desc = "This sign doesn't seem to be on."
@@ -5,7 +5,8 @@
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
icon = 'icons/obj/smooth_structures/alien/nest.dmi'
icon_state = "nest"
var/health = 100
obj_integrity = 120
max_integrity = 120
smooth = SMOOTH_TRUE
can_be_unanchored = 0
canSmoothWith = null
@@ -81,22 +82,15 @@
M.layer = initial(M.layer)
overlays -= nest_overlay
/obj/structure/bed/nest/attacked_by(obj/item/I, mob/user)
..()
take_damage(I.force, I.damtype)
/obj/structure/bed/nest/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
/obj/structure/bed/nest/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(sound_effect)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
if(BURN)
if(sound_effect)
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
else
return
health -= damage
if(health <=0)
density = 0
qdel(src)
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user)
if(user.a_intent != INTENT_HARM)
return attack_hand(user)
else
return ..()
+60 -55
View File
@@ -15,41 +15,26 @@
anchored = 1
can_buckle = 1
buckle_lying = 1
burn_state = FLAMMABLE
burntime = 30
resistance_flags = FLAMMABLE
obj_integrity = 100
max_integrity = 100
integrity_failure = 30
var/buildstacktype = /obj/item/stack/sheet/metal
var/buildstackamount = 2
/obj/structure/bed/deconstruct()
if(buildstacktype)
new buildstacktype(loc,buildstackamount)
/obj/structure/bed/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(buildstacktype)
new buildstacktype(loc,buildstackamount)
..()
/obj/structure/bed/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/bed/attack_animal(mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever
if(M.environment_smash)
deconstruct()
/obj/structure/bed/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
return
if(2)
if(prob(70))
deconstruct()
return
if(3)
if(prob(50))
deconstruct()
return
/obj/structure/bed/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
deconstruct()
playsound(src.loc, W.usesound, 50, 1)
deconstruct(TRUE)
else
return ..()
@@ -61,21 +46,43 @@
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
anchored = 0
burn_state = FIRE_PROOF
resistance_flags = 0
var/foldabletype = /obj/item/roller
/obj/structure/bed/roller/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W,/obj/item/roller/robo))
var/obj/item/roller/robo/R = W
if(R.loaded)
user << "<span class='warning'>You already have a roller bed docked!</span>"
return
if(has_buckled_mobs())
if(buckled_mobs.len > 1)
unbuckle_all_mobs()
user.visible_message("<span class='notice'>[user] unbuckles all creatures from [src].</span>")
else
user_unbuckle_mob(buckled_mobs[1],user)
else
R.loaded = src
forceMove(R)
user.visible_message("[user] collects [src].", "<span class='notice'>You collect [src].</span>")
return 1
else
return ..()
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
. = ..()
if(over_object == usr && Adjacent(usr))
if(!ishuman(usr))
return 0
if(buckled_mobs.len)
if(has_buckled_mobs())
return 0
if(usr.incapacitated())
usr << "<span class='warning'>You can't do that right now!</span>"
return 0
usr.visible_message("[usr] collapses \the [src.name].", "<span class='notice'>You collapse \the [src.name].</span>")
new foldabletype(get_turf(src))
var/obj/structure/bed/roller/B = new foldabletype(get_turf(src))
usr.put_in_hands(B)
qdel(src)
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
@@ -95,11 +102,31 @@
desc = "A collapsed roller bed that can be carried around."
icon = 'icons/obj/rollerbed.dmi'
icon_state = "folded"
w_class = 4 // Can't be put in backpacks.
w_class = WEIGHT_CLASS_BULKY // Can't be put in backpacks.
/obj/item/roller/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/roller/robo))
var/obj/item/roller/robo/R = I
if(R.loaded)
user << "<span class='warning'>[R] already has a roller bed loaded!</span>"
return
user.visible_message("<span class='notice'>[user] loads [src].</span>", "<span class='notice'>You load [src] into [R].</span>")
R.loaded = new/obj/structure/bed/roller(R)
qdel(src) //"Load"
return
else return ..()
/obj/item/roller/attack_self(mob/user)
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
deploy_roller(user, user.loc)
/obj/item/roller/afterattack(obj/target, mob/user , proximity)
if(!proximity)
return
if(isopenturf(target))
deploy_roller(user, target)
/obj/item/roller/proc/deploy_roller(mob/user, atom/location)
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(location)
R.add_fingerprint(user)
qdel(src)
@@ -116,37 +143,15 @@
..()
user << "The dock is [loaded ? "loaded" : "empty"]"
/obj/item/roller/robo/attack_self(mob/user)
/obj/item/roller/robo/deploy_roller(mob/user, atom/location)
if(loaded)
var/obj/structure/bed/roller/R = loaded
R.loc = user.loc
R.loc = location
user.visible_message("[user] deploys [loaded].", "<span class='notice'>You deploy [loaded].</span>")
loaded = null
else
user << "<span class='warning'>The dock is empty!</span>"
/obj/item/roller/robo/afterattack(obj/target, mob/user , proximity)
if(istype(target,/obj/structure/bed/roller))
if(!proximity)
return
if(loaded)
user << "<span class='warning'>You already have a roller bed docked!</span>"
return
var/obj/structure/bed/roller/R = target
if(R.has_buckled_mobs())
if(R.buckled_mobs.len > 1)
R.unbuckle_all_mobs()
user.visible_message("<span class='notice'>[user] unbuckles all creatures from [R].</span>")
else
R.user_unbuckle_mob(R.buckled_mobs[1],user)
loaded = target
target.loc = src
user.visible_message("[user] collects [loaded].", "<span class='notice'>You collect [loaded].</span>")
..()
//Dog bed
/obj/structure/bed/dogbed
@@ -161,4 +166,4 @@
/obj/structure/bed/alien
name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
icon_state = "abed"
icon_state = "abed"
@@ -6,14 +6,14 @@
anchored = 1
can_buckle = 1
buckle_lying = 0 //you sit in a chair, not lay
burn_state = FIRE_PROOF
resistance_flags = 0
obj_integrity = 250
max_integrity = 250
integrity_failure = 25
var/buildstacktype = /obj/item/stack/sheet/metal
var/buildstackamount = 1
var/item_chair = /obj/item/chair // if null it can't be picked up
/obj/structure/chair/New()
..()
handle_layer()
layer = OBJ_LAYER
/obj/structure/chair/deconstruct()
// If we have materials, and don't have the NOCONSTRUCT flag
@@ -24,24 +24,6 @@
/obj/structure/chair/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/chair/attack_animal(mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever
if(M.environment_smash)
deconstruct()
/obj/structure/chair/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
return
if(2)
if(prob(70))
deconstruct()
return
if(3)
if(prob(50))
deconstruct()
return
/obj/structure/chair/narsie_act()
if(prob(20))
var/obj/structure/chair/wood/W = new/obj/structure/chair/wood(get_turf(src))
@@ -50,7 +32,7 @@
/obj/structure/chair/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
deconstruct()
else if(istype(W, /obj/item/assembly/shock_kit))
if(!user.drop_item())
@@ -71,7 +53,6 @@
..()
else
rotate()
return
/obj/structure/chair/proc/handle_rotation(direction)
handle_layer()
@@ -81,11 +62,15 @@
buckled_mob.setDir(direction)
/obj/structure/chair/proc/handle_layer()
if(dir == NORTH)
if(has_buckled_mobs() && dir == NORTH)
layer = ABOVE_ALL_MOB_LAYER
else
layer = OBJ_LAYER
/obj/structure/chair/post_buckle_mob(mob/living/M)
..()
handle_layer()
/obj/structure/chair/proc/spin()
setDir(turn(dir, 90))
@@ -122,8 +107,9 @@
icon_state = "wooden_chair"
name = "wooden chair"
desc = "Old is never too old to not be in fashion."
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
buildstacktype = /obj/item/stack/sheet/mineral/wood
buildstackamount = 3
item_chair = /obj/item/chair/wood
@@ -143,8 +129,9 @@
desc = "It looks comfy.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
icon_state = "comfychair"
color = rgb(255,255,255)
burn_state = FLAMMABLE
burntime = 30
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
buildstackamount = 2
var/image/armrest = null
item_chair = null
@@ -152,10 +139,10 @@
/obj/structure/chair/comfy/New()
armrest = image("icons/obj/chairs.dmi", "comfychair_armrest")
armrest.layer = ABOVE_MOB_LAYER
return ..()
/obj/structure/chair/comfy/post_buckle_mob(mob/living/M)
..()
if(has_buckled_mobs())
add_overlay(armrest)
else
@@ -204,7 +191,7 @@
/obj/structure/chair/MouseDrop(over_object, src_location, over_location)
. = ..()
if(over_object == usr && Adjacent(usr))
if(!item_chair || !ishuman(usr) || has_buckled_mobs() || src.flags & NODECONSTRUCT)
if(!item_chair || !usr.can_hold_items() || has_buckled_mobs() || src.flags & NODECONSTRUCT)
return
if(usr.incapacitated())
usr << "<span class='warning'>You can't do that right now!</span>"
@@ -226,7 +213,7 @@
icon = 'icons/obj/chairs.dmi'
icon_state = "chair_toppled"
item_state = "chair"
w_class = 5
w_class = WEIGHT_CLASS_HUGE
force = 8
throwforce = 10
throw_range = 3
@@ -267,7 +254,6 @@
if(remaining_mats)
for(var/M=1 to remaining_mats)
new stack_type(get_turf(loc))
user.unEquip(src,1) //Even NODROP chairs are destroyed.
qdel(src)
@@ -312,8 +298,9 @@
name = "wooden chair"
icon_state = "wooden_chair_toppled"
item_state = "woodenchair"
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
hitsound = 'sound/weapons/genhit1.ogg'
origin_type = /obj/structure/chair/wood
break_chance = 50
+19 -16
View File
@@ -10,14 +10,14 @@ LINEN BINS
icon = 'icons/obj/bedsheets.dmi'
icon_state = "sheetwhite"
item_state = "bedsheet"
slot_flags = SLOT_BACK
slot_flags = SLOT_NECK
layer = MOB_LAYER
throwforce = 0
throw_speed = 1
throw_range = 2
w_class = 1
w_class = WEIGHT_CLASS_TINY
item_color = "white"
burn_state = FLAMMABLE
resistance_flags = FLAMMABLE
dog_fashion = /datum/dog_fashion/head/ghost
@@ -38,7 +38,7 @@ LINEN BINS
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wirecutters) || I.is_sharp())
var/obj/item/stack/sheet/cloth/C = new (loc, 3)
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
transfer_fingerprints_to(C)
C.add_fingerprint(user)
qdel(src)
@@ -174,10 +174,17 @@ LINEN BINS
icon_state = "sheetwiz"
item_color = "wiz"
/obj/item/weapon/bedsheet/nanotrasen
name = "nanotrasen bedsheet"
desc = "It has the Nanotrasen logo on it and has an aura of duty."
icon_state = "sheetNT"
item_color = "nanotrasen"
/obj/item/weapon/bedsheet/ian
icon_state = "sheetian"
item_color = "ian"
/obj/item/weapon/bedsheet/random
icon_state = "sheetrainbow"
item_color = "rainbow"
@@ -198,8 +205,9 @@ LINEN BINS
icon = 'icons/obj/structures.dmi'
icon_state = "linenbin-full"
anchored = 1
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
var/amount = 10
var/list/sheets = list()
var/obj/item/hidden = null
@@ -224,17 +232,12 @@ LINEN BINS
else
icon_state = "linenbin-full"
/obj/structure/bedsheetbin/fire_act()
if(!amount)
return
/obj/structure/bedsheetbin/fire_act(exposed_temperature, exposed_volume)
if(amount)
amount = 0
update_icon()
..()
/obj/structure/bedsheetbin/burn()
amount = 0
extinguish()
update_icon()
return
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/bedsheet))
if(!user.drop_item())
@@ -244,7 +247,7 @@ LINEN BINS
amount++
user << "<span class='notice'>You put [I] in [src].</span>"
update_icon()
else if(amount && !hidden && I.w_class < 4) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
if(!user.drop_item())
user << "<span class='warning'>\The [I] is stuck to your hand, you cannot hide it among the sheets!</span>"
return
@@ -10,10 +10,12 @@
var/opened = FALSE
var/welded = FALSE
var/locked = FALSE
var/broken = FALSE
var/large = TRUE
var/wall_mounted = 0 //never solid (You can always pass over it)
var/health = 100
obj_integrity = 200
max_integrity = 200
integrity_failure = 50
armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 60)
var/breakout_time = 2
var/lastbang
var/can_weld_shut = TRUE
@@ -29,16 +31,15 @@
var/close_sound = 'sound/machines/click.ogg'
var/cutting_sound = 'sound/items/Welder.ogg'
var/material_drop = /obj/item/stack/sheet/metal
var/obj/item/device/boobytrap/trap = null
var/material_drop_amount = 2
var/delivery_icon = "deliverycloset" //which icon to use when packagewrapped. null to be unwrappable.
/obj/structure/closet/New()
..()
update_icon()
/obj/structure/closet/initialize()
/obj/structure/closet/Initialize(mapload)
..()
if(!opened) // if closed, any item at the crate's loc is put in the contents
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
take_contents()
update_icon()
/obj/structure/closet/Destroy()
dump_contents()
@@ -70,15 +71,12 @@
/obj/structure/closet/examine(mob/user)
..()
if(anchored)
user << "It is anchored to the ground."
if(broken)
user << "<span class='notice'>It appears to be broken.</span>"
else if(secure && !opened)
user << "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>"
if(trap && in_range(user, src))
user << "<span class='warning'>Something seems to be wired to the inside of the closet!</span>"
/obj/structure/closet/alter_health()
return get_turf(src)
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
if(height == 0 || wall_mounted)
@@ -133,17 +131,6 @@
climb_time *= 0.5 //it's faster to climb onto an open thing
dump_contents()
update_icon()
if(trap)
visible_message("<span class='warning'>[src] blows up in a spray of deadly shrapnel!</span>")
trap.loc = get_turf(src)
trap.blow()
trap = null
for(var/mob/living/carbon/human/H in orange(2,src))
H.Paralyse(8)
H.adjust_fire_stacks(1)
H.IgniteMob()
qdel(src)
return ..()
return 1
/obj/structure/closet/proc/insert(atom/movable/AM)
@@ -202,112 +189,69 @@
else
return open(user)
/obj/structure/closet/ex_act(severity, target)
contents_explosion(severity, target)
if(loc && ispath(material_drop) && !(flags & NODECONSTRUCT))
new material_drop(loc)
/obj/structure/closet/deconstruct(disassembled = TRUE)
if(ispath(material_drop) && material_drop_amount && !(flags & NODECONSTRUCT))
new material_drop(loc, material_drop_amount)
qdel(src)
..()
/obj/structure/closet/bullet_act(obj/item/projectile/P)
..()
if(P.damage_type == BRUTE || P.damage_type == BURN)
health -= P.damage
if(health <= 0)
qdel(src)
/obj/structure/closet/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] destroys \the [src].</span>")
qdel(src)
/obj/structure/closet/blob_act(obj/effect/blob/B)
if(prob(75))
qdel(src)
/obj/structure/closet/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
bust_open()
/obj/structure/closet/attackby(obj/item/weapon/W, mob/user, params)
if(user in src)
return
if(opened)
if(istype(W, /obj/item/device/boobytrap))
if(trap)
user << "<span class='warning'>There's already a booby trap hooked up to this closet!</span>"
..()
user << "<span class='warning'>You apply [W]. Next time someone opens the closet, it will explode.</span>"
W.loc = src
trap = W
qdel(W)
..()
if(istype(W, cutting_tool))
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0, user))
return
user << "<span class='notice'>You begin cutting \the [src] apart...</span>"
playsound(loc, cutting_sound, 40, 1)
if(do_after(user, 40/WT.toolspeed, 1, target = src))
if(!opened || !WT.isOn())
return
playsound(loc, cutting_sound, 50, 1)
visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
"<span class='italics'>You hear welding.</span>")
var/turf/T = get_turf(src)
new material_drop(T)
qdel(src)
if(WT.remove_fuel(0, user))
user << "<span class='notice'>You begin cutting \the [src] apart...</span>"
playsound(loc, cutting_sound, 40, 1)
if(do_after(user, 40*WT.toolspeed, 1, target = src))
if(!opened || !WT.isOn())
return
playsound(loc, cutting_sound, 50, 1)
user.visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
"<span class='italics'>You hear welding.</span>")
deconstruct(TRUE)
return 0
else if(user.drop_item())
else // for example cardboard box is cut with wirecutters
user.visible_message("<span class='notice'>[user] cut apart \the [src].</span>", \
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")
deconstruct(TRUE)
return 0
if(user.drop_item()) // so we put in unlit welder too
W.forceMove(loc)
return 1
if(!opened && istype(W, /obj/item/device/boobytrap))
user << "<span class='warning'>You must open the closet first!</span>"
..()
else if(istype(W, /obj/item/weapon/weldingtool) && can_weld_shut)
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0, user))
return
user << "<span class='notice'>You begin [welded ? "unwelding":"welding"] \the [src]...</span>"
playsound(loc, 'sound/items/Welder2.ogg', 40, 1)
if(do_after(user, 40/WT.toolspeed, 1, target = src))
if(do_after(user, 40*WT.toolspeed, 1, target = src))
if(opened || !WT.isOn())
return
playsound(loc, 'sound/items/welder.ogg', 50, 1)
playsound(loc, WT.usesound, 50, 1)
welded = !welded
visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unweldeds"] \the [src].</span>",
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unweldeds"] \the [src].</span>",
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [WT].</span>",
"<span class='italics'>You hear welding.</span>")
update_icon()
else if(istype(W, /obj/item/weapon/wirecutters) && !opened && trap)
user << "<span class='notice'>You begin attempting to disarm the booby trap...</span>"
visible_message("<span class='warning'>[user] begins attempting to disarm the booby trap.</span>")
if(do_after(user, 80, target = src))
if(prob(75))
user << "<span class='notice'>You disarm the booby trap, destroying it in the process.</span>"
visible_message("<span class='notice'>[user] disarms the booby trap!</span>")
trap = null
else
user << "<span class='warning'>You accidentally bump the sensor and set off the booby trap!</span>"
visible_message("<span class='warning'>[user] fails to disarm the booby trap!</span>")
visible_message("<span class='warning'>[src] blows up in a spray of deadly shrapnel!</span>")
trap.loc = get_turf(src)
trap.blow()
trap = null
for(var/mob/living/carbon/human/H in orange(2,src))
H.Paralyse(8)
H.adjust_fire_stacks(1)
H.IgniteMob()
qdel(src)
else if(user.a_intent != "harm" && !(W.flags & NOBLUDGEON))
else if(istype(W, /obj/item/weapon/wrench))
if(isinspace() && !anchored)
return
anchored = !anchored
playsound(src.loc, W.usesound, 75, 1)
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
else if(user.a_intent != INTENT_HARM && !(W.flags & NOBLUDGEON))
if(W.GetID() || !toggle(user))
togglelock(user)
return 1
else
return ..()
@@ -371,9 +315,9 @@
togglelock(user)
return
/obj/structure/closet/attack_alien(mob/living/user)
return attack_hand(user)
/obj/structure/closet/attack_robot(mob/user)
if(user.Adjacent(src))
return attack_hand(user)
// tk grab then use on self
/obj/structure/closet/attack_self_tk(mob/user)
@@ -387,7 +331,7 @@
if(!usr.canmove || usr.stat || usr.restrained())
return
if(iscarbon(usr) || issilicon(usr))
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
attack_hand(usr)
else
usr << "<span class='warning'>This mob type can't use this verb.</span>"
@@ -423,16 +367,19 @@
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
return
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
welded = 0 //applies to all lockers lockers
locked = 0 //applies to critter crates and secure lockers only
broken = 1 //applies to secure lockers only
user.visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>",
"<span class='notice'>You successfully break out of [src]!</span>")
open()
bust_open()
else
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
user << "<span class='warning'>You fail to break out of [src]!</span>"
/obj/structure/closet/proc/bust_open()
welded = 0 //applies to all lockers
locked = 0 //applies to critter crates and secure lockers only
broken = 1 //applies to secure lockers only
open()
/obj/structure/closet/AltClick(mob/user)
..()
if(!user.canUseTopic(src, be_close=TRUE))
@@ -446,7 +393,8 @@
/obj/structure/closet/proc/togglelock(mob/living/user)
if(secure && !broken)
if(allowed(user))
add_fingerprint(user)
if(iscarbon(user))
add_fingerprint(user)
locked = !locked
user.visible_message("<span class='notice'>[user] [locked ? null : "un"]locks [src].</span>",
"<span class='notice'>You [locked ? null : "un"]lock [src].</span>")
@@ -484,3 +432,9 @@
req_access = list()
req_access += pick(get_all_accesses())
..()
/obj/structure/closet/contents_explosion(severity, target)
for(var/atom/A in contents)
A.ex_act(severity, target)
CHECK_TICK
@@ -0,0 +1,92 @@
/obj/structure/closet/body_bag
name = "body bag"
desc = "A plastic bag designed for the storage and transportation of cadavers."
icon = 'icons/obj/bodybag.dmi'
icon_state = "bodybag"
density = 0
mob_storage_capacity = 2
open_sound = 'sound/items/zip.ogg'
close_sound = 'sound/items/zip.ogg'
integrity_failure = 0
material_drop = /obj/item/stack/sheet/cloth
delivery_icon = null //unwrappable
var/foldedbag_path = /obj/item/bodybag
var/tagged = 0 // so closet code knows to put the tag overlay back
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/toy/crayon))
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
if(user.get_active_held_item() != I)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "body bag - [t]"
tagged = 1
update_icon()
else
name = "body bag"
return
else if(istype(I, /obj/item/weapon/wirecutters))
user << "<span class='notice'>You cut the tag off [src].</span>"
name = "body bag"
tagged = 0
update_icon()
/obj/structure/closet/body_bag/update_icon()
..()
if (tagged)
add_overlay("bodybag_label")
/obj/structure/closet/body_bag/close()
if(..())
density = 0
return 1
return 0
/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
..()
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
if(!ishuman(usr))
return 0
if(opened)
return 0
if(contents.len)
return 0
visible_message("<span class='notice'>[usr] folds up [src].</span>")
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
usr.put_in_hands(B)
qdel(src)
/obj/structure/closet/body_bag/bluespace
name = "bluespace body bag"
desc = "A bluespace body bag designed for the storage and transportation of cadavers."
icon = 'icons/obj/bodybag.dmi'
icon_state = "bluebodybag"
foldedbag_path = /obj/item/bodybag/bluespace
mob_storage_capacity = 15
max_mob_size = MOB_SIZE_LARGE
/obj/structure/closet/body_bag/bluespace/MouseDrop(over_object, src_location, over_location)
..()
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
if(!ishuman(usr))
return 0
if(opened)
return 0
if(contents.len >= mob_storage_capacity / 2)
usr << "<span class='warning'>There are too many things inside of [src] to fold it up!</span>"
return 0
for(var/obj/item/bodybag/bluespace/B in src)
usr << "<span class='warning'>You can't recursively fold bluespace body bags!</span>" //Nice try
return 0
visible_message("<span class='notice'>[usr] folds up [src].</span>")
var/obj/item/bodybag/B = new foldedbag_path(get_turf(src))
usr.put_in_hands(B)
for(var/atom/movable/A in contents)
A.forceMove(B)
if(isliving(A))
A << "<span class='userdanger'>You're suddenly forced into a tiny, compressed space!</span>"
qdel(src)
@@ -1,16 +1,19 @@
#define SNAKE_SPAM_TICKS 600 //how long between cardboard box openings that trigger the '!'
/obj/structure/closet/cardboard
name = "large cardboard box"
desc = "Just a box..."
icon_state = "cardboard"
health = 10
mob_storage_capacity = 1
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
integrity_failure = 0
can_weld_shut = 0
cutting_tool = /obj/item/weapon/wirecutters
open_sound = 'sound/effects/rustle2.ogg'
open_sound = "rustle"
cutting_sound = 'sound/items/poster_ripped.ogg'
material_drop = /obj/item/stack/sheet/cardboard
delivery_icon = "deliverybox"
var/move_speed_multiplier = 1
var/move_delay = 0
var/egged = 0
@@ -28,29 +31,27 @@
/obj/structure/closet/cardboard/open()
if(opened || !can_open())
return 0
if(!egged)
var/list/alerted = null
if(egged < world.time)
var/mob/living/Snake = null
for(var/mob/living/L in src.contents)
Snake = L
break
if(Snake)
var/list/alerted = viewers(7,src)
if(alerted)
for(var/mob/living/L in alerted)
if(!L.stat)
L.do_alert_animation(L)
egged = 1
alerted << sound('sound/machines/chime.ogg')
alerted = viewers(7,src)
..()
if(LAZYLEN(alerted))
egged = world.time + SNAKE_SPAM_TICKS
for(var/mob/living/L in alerted)
if(!L.stat)
if(!L.incapacitated(ignore_restraints = 1))
L.face_atom(src)
L.do_alert_animation(L)
playsound(loc, 'sound/machines/chime.ogg', 50, FALSE, -5)
/mob/living/proc/do_alert_animation(atom/A)
var/image/I
I = image('icons/obj/closet.dmi', A, "cardboard_special", A.layer+1)
var/list/viewing = list()
for(var/mob/M in viewers(A))
if(M.client)
viewing |= M.client
flick_overlay(I,viewing,8)
var/image/I = image('icons/obj/closet.dmi', A, "cardboard_special", A.layer+1)
flick_overlay_view(I, A, 8)
I.alpha = 0
animate(I, pixel_z = 32, alpha = 255, time = 5, easing = ELASTIC_EASING)
@@ -59,11 +60,12 @@
name = "large metal box"
desc = "THE COWARDS! THE FOOLS!"
icon_state = "metalbox"
health = 500
obj_integrity = 500
mob_storage_capacity = 5
burn_state = FIRE_PROOF
resistance_flags = 0
move_speed_multiplier = 2
cutting_tool = /obj/item/weapon/weldingtool
open_sound = 'sound/machines/click.ogg'
cutting_sound = 'sound/items/Welder.ogg'
material_drop = /obj/item/stack/sheet/plasteel
material_drop = /obj/item/stack/sheet/plasteel
#undef SNAKE_SPAM_TICKS
@@ -11,6 +11,8 @@
new /obj/item/clothing/under/shorts/red(src)
new /obj/item/clothing/under/shorts/blue(src)
new /obj/item/clothing/under/shorts/green(src)
if(prob(3))
new /obj/item/clothing/under/jabroni(src)
/obj/structure/closet/boxinggloves
@@ -2,8 +2,9 @@
name = "cabinet"
desc = "Old will forever be in fashion."
icon_state = "cabinet"
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
/obj/structure/closet/acloset
name = "strange closet"
@@ -72,7 +73,7 @@
new /obj/item/weapon/storage/box/flashbangs(src)
for(var/i in 1 to 3)
new /obj/item/clothing/head/helmet/thunderdome(src)
/obj/structure/closet/thunderdome/tdgreen
name = "green-team Thunderdome closet"
icon_door = "green"
@@ -91,7 +92,7 @@
new /obj/item/weapon/storage/box/flashbangs(src)
for(var/i in 1 to 3)
new /obj/item/clothing/head/helmet/thunderdome(src)
/obj/structure/closet/malf/suits
desc = "It's a storage unit for operational gear."
icon_state = "syndicate"
@@ -63,6 +63,7 @@
new /obj/item/weapon/cartridge/janitor(src)
new /obj/item/clothing/gloves/color/black(src)
new /obj/item/clothing/head/soft/purple(src)
new /obj/item/weapon/paint/paint_remover(src)
new /obj/item/device/flashlight(src)
for(var/i in 1 to 3)
new /obj/item/weapon/caution(src)
@@ -93,6 +94,8 @@
new /obj/item/clothing/suit/toggle/lawyer/black(src)
new /obj/item/clothing/shoes/laceup(src)
new /obj/item/clothing/shoes/laceup(src)
new /obj/item/clothing/tie/lawyers_badge(src)
new /obj/item/clothing/tie/lawyers_badge(src)
/obj/structure/closet/wardrobe/chaplain_black
name = "chapel wardrobe"
@@ -106,6 +109,10 @@
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/suit/nun(src)
new /obj/item/clothing/head/nun_hood(src)
new /obj/item/clothing/suit/studentuni(src)
new /obj/item/clothing/head/cage(src)
new /obj/item/clothing/suit/witchhunter(src)
new /obj/item/clothing/head/witchunter_hat(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/clothing/suit/holidaypriest(src)
new /obj/item/weapon/storage/backpack/cultpack (src)
@@ -119,8 +126,11 @@
name = "coffin"
desc = "It's a burial receptacle for the dearly departed."
icon_state = "coffin"
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
horizontal = TRUE
delivery_icon = "deliverycrate"
/obj/structure/closet/wardrobe/red
name = "security wardrobe"
@@ -131,7 +141,7 @@
contents = list()
new /obj/item/clothing/suit/hooded/wintercoat/security(src)
new /obj/item/weapon/storage/backpack/security(src)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/weapon/storage/backpack/satchel/sec(src)
new /obj/item/weapon/storage/backpack/dufflebag/sec(src)
new /obj/item/weapon/storage/backpack/dufflebag/sec(src)
for(var/i in 1 to 3)
@@ -173,7 +183,7 @@
..()
contents = list()
new /obj/item/weapon/storage/backpack/dufflebag/engineering(src)
new /obj/item/weapon/storage/backpack/satchel_eng(src)
new /obj/item/weapon/storage/backpack/satchel/eng(src)
new /obj/item/weapon/storage/backpack/industrial(src)
for(var/i in 1 to 3)
new /obj/item/clothing/suit/hooded/wintercoat/engineering/atmos(src)
@@ -192,7 +202,7 @@
contents = list()
new /obj/item/weapon/storage/backpack/dufflebag/engineering(src)
new /obj/item/weapon/storage/backpack/industrial(src)
new /obj/item/weapon/storage/backpack/satchel_eng(src)
new /obj/item/weapon/storage/backpack/satchel/eng(src)
new /obj/item/clothing/suit/hooded/wintercoat/engineering(src)
for(var/i in 1 to 3)
new /obj/item/clothing/under/rank/engineer(src)
@@ -212,7 +222,7 @@
contents = list()
new /obj/item/weapon/storage/backpack/dufflebag/med(src)
new /obj/item/weapon/storage/backpack/medic(src)
new /obj/item/weapon/storage/backpack/satchel_med(src)
new /obj/item/weapon/storage/backpack/satchel/med(src)
new /obj/item/clothing/suit/hooded/wintercoat/medical(src)
new /obj/item/clothing/under/rank/nursesuit (src)
new /obj/item/clothing/head/nursehat (src)
@@ -272,8 +282,8 @@
new /obj/item/clothing/suit/toggle/labcoat/chemist(src)
new /obj/item/weapon/storage/backpack/chemistry(src)
new /obj/item/weapon/storage/backpack/chemistry(src)
new /obj/item/weapon/storage/backpack/satchel_chem(src)
new /obj/item/weapon/storage/backpack/satchel_chem(src)
new /obj/item/weapon/storage/backpack/satchel/chem(src)
new /obj/item/weapon/storage/backpack/satchel/chem(src)
new /obj/item/weapon/storage/bag/chemistry(src)
new /obj/item/weapon/storage/bag/chemistry(src)
return
@@ -294,8 +304,8 @@
new /obj/item/clothing/suit/toggle/labcoat/genetics(src)
new /obj/item/weapon/storage/backpack/genetics(src)
new /obj/item/weapon/storage/backpack/genetics(src)
new /obj/item/weapon/storage/backpack/satchel_gen(src)
new /obj/item/weapon/storage/backpack/satchel_gen(src)
new /obj/item/weapon/storage/backpack/satchel/gen(src)
new /obj/item/weapon/storage/backpack/satchel/gen(src)
return
@@ -316,8 +326,8 @@
new /obj/item/clothing/mask/surgical(src)
new /obj/item/weapon/storage/backpack/virology(src)
new /obj/item/weapon/storage/backpack/virology(src)
new /obj/item/weapon/storage/backpack/satchel_vir(src)
new /obj/item/weapon/storage/backpack/satchel_vir(src)
new /obj/item/weapon/storage/backpack/satchel/vir(src)
new /obj/item/weapon/storage/backpack/satchel/vir(src)
return
/obj/structure/closet/wardrobe/science_white
@@ -329,8 +339,8 @@
contents = list()
new /obj/item/weapon/storage/backpack/science(src)
new /obj/item/weapon/storage/backpack/science(src)
new /obj/item/weapon/storage/backpack/satchel_tox(src)
new /obj/item/weapon/storage/backpack/satchel_tox(src)
new /obj/item/weapon/storage/backpack/satchel/tox(src)
new /obj/item/weapon/storage/backpack/satchel/tox(src)
new /obj/item/clothing/suit/hooded/wintercoat/science(src)
for(var/i in 1 to 3)
new /obj/item/clothing/under/rank/scientist(src)
@@ -353,8 +363,8 @@
contents = list()
new /obj/item/weapon/storage/backpack/botany(src)
new /obj/item/weapon/storage/backpack/botany(src)
new /obj/item/weapon/storage/backpack/satchel_hyd(src)
new /obj/item/weapon/storage/backpack/satchel_hyd(src)
new /obj/item/weapon/storage/backpack/satchel/hyd(src)
new /obj/item/weapon/storage/backpack/satchel/hyd(src)
new /obj/item/clothing/suit/hooded/wintercoat/hydro(src)
new /obj/item/clothing/suit/apron(src)
new /obj/item/clothing/suit/apron(src)
@@ -2,8 +2,9 @@
name = "booze storage"
req_access = list(access_bar)
icon_state = "cabinet"
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
/obj/structure/closet/secure_closet/bar/New()
..()
@@ -5,7 +5,7 @@
/obj/structure/closet/secure_closet/quartermaster/New()
..()
new /obj/item/clothing/suit/cloak/qm(src)
new /obj/item/clothing/neck/cloak/qm(src)
new /obj/item/clothing/under/rank/cargo(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/device/radio/headset/headset_cargo(src)
@@ -5,19 +5,18 @@
/obj/structure/closet/secure_closet/engineering_chief/New()
..()
new /obj/item/clothing/suit/cloak/ce(src)
new /obj/item/clothing/neck/cloak/ce(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/head/hardhat/white(src)
new /obj/item/clothing/head/welding(src)
new /obj/item/clothing/gloves/color/yellow(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/hardsuit_jetpack(src)
new /obj/item/weapon/tank/jetpack/suit(src)
new /obj/item/weapon/cartridge/ce(src)
new /obj/item/device/radio/headset/heads/ce(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/device/megaphone/command(src)
new /obj/item/weapon/storage/box/permits(src)
new /obj/item/areaeditor/blueprints(src)
new /obj/item/weapon/airlock_painter(src)
new /obj/item/weapon/holosign_creator/engineering(src)
@@ -54,7 +54,7 @@
/obj/structure/closet/secure_closet/CMO/New()
..()
new /obj/item/clothing/suit/cloak/cmo(src)
new /obj/item/clothing/neck/cloak/cmo(src)
new /obj/item/weapon/storage/backpack/dufflebag/med(src)
new /obj/item/clothing/suit/bio_suit/cmo(src)
new /obj/item/clothing/head/bio_hood/cmo(src)
@@ -13,11 +13,11 @@
if(prob(50))
new /obj/item/ammo_box/magazine/m50(src)
new /obj/item/ammo_box/magazine/m50(src)
new /obj/item/weapon/gun/projectile/automatic/pistol/deagle(src)
new /obj/item/weapon/gun/ballistic/automatic/pistol/deagle(src)
else
new /obj/item/ammo_box/a357(src)
new /obj/item/ammo_box/a357(src)
new /obj/item/weapon/gun/projectile/revolver/mateba(src)
new /obj/item/weapon/gun/ballistic/revolver/mateba(src)
/obj/structure/closet/secure_closet/ertSec
name = "security closet"
@@ -11,7 +11,7 @@
if(prob(50))
new /obj/item/weapon/storage/backpack(src)
else
new /obj/item/weapon/storage/backpack/satchel_norm(src)
new /obj/item/weapon/storage/backpack/satchel(src)
new /obj/item/device/radio/headset( src )
/obj/structure/closet/secure_closet/personal/patient
@@ -25,13 +25,14 @@
/obj/structure/closet/secure_closet/personal/cabinet
icon_state = "cabinet"
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
/obj/structure/closet/secure_closet/personal/cabinet/New()
..()
contents = list()
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
new /obj/item/weapon/storage/backpack/satchel/leather/withwallet( src )
new /obj/item/device/radio/headset( src )
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W, mob/user, params)
@@ -53,21 +54,4 @@
else
user << "<span class='danger'>Access Denied.</span>"
else
return ..()
/obj/structure/closet/secure_closet/personal/verb/verb_resetlock()//personal locker ownership reset.
set src in oview(1)
set category = "Object"
set name = "Reset Lock"
if(opened)
if(broken)
usr << "<span class='danger'>The lock appears to be broken.</span>"
return
else
registered_name = null
usr << "<span class='danger'>You successfully reset the lock.</span>"
desc = initial(desc)
add_fingerprint(usr)
else
usr << "<span class='danger'>\the [src.name] must be open!</span>"
return ..()
@@ -5,7 +5,7 @@
/obj/structure/closet/secure_closet/RD/New()
..()
new /obj/item/clothing/suit/cloak/rd(src)
new /obj/item/clothing/neck/cloak/rd(src)
new /obj/item/clothing/suit/bio_suit/scientist(src)
new /obj/item/clothing/head/bio_hood/scientist(src)
new /obj/item/clothing/suit/toggle/labcoat(src)
@@ -22,4 +22,5 @@
new /obj/item/clothing/suit/armor/reactive/teleport(src)
new /obj/item/device/assembly/flash/handheld(src)
new /obj/item/device/laser_pointer(src)
new /obj/item/weapon/door_remote/research_director(src)
new /obj/item/weapon/door_remote/research_director(src)
new /obj/item/weapon/storage/box/firingpins(src)
@@ -3,5 +3,12 @@
desc = "It's a card-locked storage unit."
locked = 1
icon_state = "secure"
health = 200
obj_integrity = 250
max_integrity = 250
armor = list(melee = 30, bullet = 50, laser = 50, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80)
secure = 1
/obj/structure/closet/secure_closet/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 20)
return 0
. = ..()
@@ -9,9 +9,10 @@
if(prob(50))
new /obj/item/weapon/storage/backpack/captain(src)
else
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/clothing/suit/cloak/cap(src)
new /obj/item/weapon/storage/backpack/satchel/cap(src)
new /obj/item/clothing/neck/cloak/cap(src)
new /obj/item/weapon/storage/backpack/dufflebag/captain(src)
new /obj/item/clothing/head/crown/fancy(src)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/under/captainparade(src)
new /obj/item/clothing/head/caphat/parade(src)
@@ -25,7 +26,8 @@
new /obj/item/clothing/glasses/sunglasses/gar/supergar(src)
new /obj/item/clothing/gloves/color/captain(src)
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/storage/belt/sabre(src)
new /obj/item/weapon/gun/energy/e_gun(src)
new /obj/item/weapon/door_remote/captain(src)
/obj/structure/closet/secure_closet/hop
@@ -35,6 +37,7 @@
/obj/structure/closet/secure_closet/hop/New()
..()
new /obj/item/clothing/neck/cloak/hop(src)
new /obj/item/clothing/under/rank/head_of_personnel(src)
new /obj/item/clothing/head/hopcap(src)
new /obj/item/weapon/cartridge/hop(src)
@@ -47,8 +50,8 @@
new /obj/item/device/assembly/flash/handheld(src)
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/tie/petcollar(src)
new /obj/item/weapon/gun/energy/e_gun(src)
new /obj/item/clothing/neck/petcollar(src)
new /obj/item/weapon/door_remote/civillian(src)
/obj/structure/closet/secure_closet/hos
@@ -58,7 +61,7 @@
/obj/structure/closet/secure_closet/hos/New()
..()
new /obj/item/clothing/suit/cloak/hos(src)
new /obj/item/clothing/neck/cloak/hos(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
new /obj/item/clothing/under/hosparadefem(src)
@@ -76,7 +79,7 @@
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/shield/riot/tele(src)
new /obj/item/weapon/storage/belt/security/full(src)
new /obj/item/weapon/gun/energy/gun/hos(src)
new /obj/item/weapon/gun/energy/e_gun/hos(src)
new /obj/item/device/flashlight/seclite(src)
new /obj/item/weapon/pinpointer(src)
@@ -100,8 +103,9 @@
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/belt/security/full(src)
new /obj/item/device/flashlight/seclite(src)
new /obj/item/clothing/gloves/color/black/krav_maga/sec(src)
new /obj/item/clothing/gloves/krav_maga/sec(src)
new /obj/item/weapon/door_remote/head_of_security(src)
new /obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube(src)
/obj/structure/closet/secure_closet/security
name = "security officer's locker"
@@ -155,8 +159,9 @@
name = "\proper detective's cabinet"
req_access = list(access_forensics_lockers)
icon_state = "cabinet"
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
/obj/structure/closet/secure_closet/detective/New()
..()
@@ -172,13 +177,14 @@
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/detective_scanner(src)
new /obj/item/device/flashlight/seclite(src)
new /obj/item/weapon/holosign_creator/security(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/clothing/suit/armor/vest/det_suit(src)
new /obj/item/ammo_box/c38(src)
new /obj/item/ammo_box/c38(src)
new /obj/item/weapon/storage/belt/holster(src)
new /obj/item/weapon/gun/projectile/revolver/detective(src)
new /obj/item/weapon/gun/ballistic/revolver/detective(src)
/obj/structure/closet/secure_closet/injection
name = "lethal injections"
@@ -187,7 +193,7 @@
/obj/structure/closet/secure_closet/injection/New()
..()
for(var/i in 1 to 5)
new /obj/item/weapon/reagent_containers/syringe/lethal/choral(src)
new /obj/item/weapon/reagent_containers/syringe/lethal/execution(src)
/obj/structure/closet/secure_closet/brig
name = "brig locker"
@@ -240,7 +246,7 @@
for(var/i in 1 to 3)
new /obj/item/weapon/storage/box/rubbershot(src)
for(var/i in 1 to 3)
new /obj/item/weapon/gun/projectile/shotgun/riot(src)
new /obj/item/weapon/gun/ballistic/shotgun/riot(src)
/obj/structure/closet/secure_closet/armory3
name = "armory energy gun locker"
@@ -252,7 +258,7 @@
new /obj/item/weapon/storage/box/firingpins(src)
new /obj/item/weapon/gun/energy/ionrifle(src)
for(var/i in 1 to 3)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/e_gun(src)
for(var/i in 1 to 3)
new /obj/item/weapon/gun/energy/laser(src)
@@ -263,7 +269,7 @@
/obj/structure/closet/secure_closet/tac/New()
..()
new /obj/item/weapon/gun/projectile/automatic/wt550(src)
new /obj/item/weapon/gun/ballistic/automatic/wt550(src)
new /obj/item/clothing/head/helmet/alt(src)
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/clothing/suit/armor/bulletproof(src)
@@ -1,162 +1,107 @@
/obj/structure/closet/statue
/obj/structure/statue/petrified
name = "statue"
desc = "An incredibly lifelike marble carving."
icon = 'icons/obj/statue.dmi'
icon_state = "human_male"
density = 1
anchored = 1
health = 0 //destroying the statue kills the mob within
var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock
var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils.
var/intialBrute = 0
var/intialOxy = 0
obj_integrity = 200
max_integrity = 200
var/timer = 240 //eventually the person will be freed
var/mob/living/petrified_mob
/obj/structure/closet/statue/New(loc, var/mob/living/L)
if(ishuman(L) || ismonkey(L) || iscorgi(L))
/obj/structure/statue/petrified/New(loc, mob/living/L, statue_timer)
if(statue_timer)
timer = statue_timer
if(L)
petrified_mob = L
if(L.buckled)
L.buckled.unbuckle_mob(L,force=1)
L.reset_perspective(src)
L.loc = src
L.disabilities += MUTE
L.faction += "mimic" //Stops mimics from instaqdeling people in statues
L.visible_message("<span class='warning'>[L]'s skin rapidly turns to marble!</span>", "<span class='userdanger'>Your body freezes up! Can't... move... can't... think...</span>")
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
intialFire = L.getFireLoss()
intialBrute = L.getBruteLoss()
intialOxy = L.getOxyLoss()
if(ishuman(L))
var/mob/living/carbon/human/H = L
name = "statue of [H.name]"
H.bleedsuppress = 1
if(H.gender == "female")
icon_state = "human_female"
else if(ismonkey(L))
name = "statue of a monkey"
icon_state = "monkey"
else if(iscorgi(L))
name = "statue of a corgi"
icon_state = "corgi"
desc = "If it takes forever, I will wait for you..."
if(health == 0) //meaning if the statue didn't find a valid target
qdel(src)
return
START_PROCESSING(SSobj, src)
L.forceMove(src)
L.disabilities |= MUTE
L.faction += "mimic" //Stops mimics from instaqdeling people in statues
L.status_flags |= GODMODE
obj_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
max_integrity = obj_integrity
START_PROCESSING(SSobj, src)
..()
icon = L.icon
icon_state = L.icon_state
overlays = L.overlays
color = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
/obj/structure/closet/statue/process()
/obj/structure/statue/petrified/process()
if(!petrified_mob)
STOP_PROCESSING(SSobj, src)
timer--
for(var/mob/living/M in src) //Go-go gadget stasis field
M.setToxLoss(intialTox)
M.adjustFireLoss(intialFire - M.getFireLoss())
M.adjustBruteLoss(intialBrute - M.getBruteLoss())
M.setOxyLoss(intialOxy)
M.Stun(1) //So they can't do anything while petrified
petrified_mob.Stun(2) //So they can't do anything while petrified
if(timer <= 0)
dump_contents()
STOP_PROCESSING(SSobj, src)
qdel(src)
/obj/structure/closet/statue/dump_contents()
/obj/structure/statue/petrified/contents_explosion(severity, target)
return
/obj/structure/statue/petrified/handle_atom_del(atom/A)
if(A == petrified_mob)
petrified_mob = null
/obj/structure/statue/petrified/Destroy()
if(istype(src.loc, /mob/living/simple_animal/hostile/statue))
var/mob/living/simple_animal/hostile/statue/S = src.loc
src.loc = S.loc
forceMove(S.loc)
if(S.mind)
for(var/mob/M in contents)
S.mind.transfer_to(M)
M.Weaken(5)
M << "<span class='notice'>You slowly come back to your senses. You are in control of yourself again!</span>"
break
if(petrified_mob)
S.mind.transfer_to(petrified_mob)
petrified_mob.Weaken(5)
petrified_mob << "<span class='notice'>You slowly come back to your senses. You are in control of yourself again!</span>"
qdel(S)
for(var/obj/O in src)
O.loc = src.loc
O.forceMove(loc)
for(var/mob/living/M in src)
M.loc = src.loc
M.disabilities -= MUTE
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
M.faction -= "mimic"
M.reset_perspective(null)
if(petrified_mob)
petrified_mob.status_flags &= ~GODMODE
petrified_mob.forceMove(loc)
petrified_mob.disabilities &= ~MUTE
petrified_mob.take_overall_damage((petrified_mob.health - obj_integrity + 100)) //any new damage the statue incurred is transfered to the mob
petrified_mob.faction -= "mimic"
petrified_mob = null
return ..()
/obj/structure/closet/statue/take_contents()
return
/obj/structure/closet/statue/open()
return
/obj/structure/closet/statue/take_contents()
return
/obj/structure/closet/statue/open()
return
/obj/structure/closet/statue/insert()
return
/obj/structure/closet/statue/close()
return
/obj/structure/closet/statue/toggle()
return
/obj/structure/closet/statue/bullet_act(obj/item/projectile/Proj)
health -= Proj.damage
if(health <= 0)
shatter()
/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
shatter()
/obj/structure/closet/statue/blob_act(obj/effect/blob/B)
shatter()
/obj/structure/closet/statue/attacked_by(obj/item/I, mob/living/user)
if(I.damtype != STAMINA)
health -= I.force
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
if(health <= 0)
shatter()
/obj/structure/closet/statue/MouseDrop_T()
return
/obj/structure/closet/statue/relaymove()
return
/obj/structure/closet/statue/attack_hand()
return
/obj/structure/closet/statue/verb_toggleopen()
return
/obj/structure/closet/statue/update_icon()
return
/obj/structure/closet/statue/proc/shatter()
for(var/mob/living/M in src)
M.dust()
dump_contents()
/obj/structure/statue/petrified/deconstruct(disassembled = TRUE)
if(!disassembled)
if(petrified_mob)
petrified_mob.dust()
visible_message("<span class='danger'>[src] shatters!.</span>")
qdel(src)
/obj/structure/closet/statue/container_resist()
return
/mob/living/proc/petrify()
if(istype(loc, /obj/structure/closet/statue)) //If they're already petrified
/mob/proc/petrify(statue_timer)
/mob/living/carbon/human/petrify(statue_timer)
if(!isturf(loc))
return 0
new /obj/structure/closet/statue(get_turf(src), src)
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
S.name = "statue of [name]"
bleedsuppress = 1
S.icon = icon
S.icon_state = icon_state
S.overlays = overlays
var/newcolor = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
S.add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
return 1
/mob/living/carbon/monkey/petrify(statue_timer)
if(!isturf(loc))
return 0
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
S.name = "statue of a monkey"
S.icon_state = "monkey"
return 1
/mob/living/simple_animal/pet/dog/corgi/petrify(statue_timer)
if(!isturf(loc))
return 0
var/obj/structure/statue/petrified/S = new (loc, src, statue_timer)
S.name = "statue of a corgi"
S.icon_state = "corgi"
S.desc = "If it takes forever, I will wait for you..."
return 1
@@ -78,6 +78,14 @@
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
//Titanium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/titanium(src, rand(rare_min, rare_max))
//Plastitanium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/plastitanium(src, rand(rare_min, rare_max))
//Diamond (rare HONK)
if(pickednum >= 45)
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
@@ -104,6 +112,8 @@
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/mineral/bananium,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/sheet/mineral/titanium,
/obj/item/stack/sheet/mineral/plastitanium,
/obj/item/stack/rods
)
@@ -12,6 +12,7 @@
climbable = TRUE
climb_time = 10 //real fast, because let's be honest stepping into or onto a crate is easy
climb_stun = 0 //climbing onto crates isn't hard, guys
delivery_icon = "deliverycrate"
var/obj/item/weapon/paper/manifest/manifest
/obj/structure/closet/crate/New()
@@ -41,11 +42,20 @@
return
..()
/obj/structure/closet/crate/open(mob/living/user)
. = ..()
if(. && manifest)
user << "<span class='notice'>The manifest is torn off [src].</span>"
playsound(src, 'sound/items/poster_ripped.ogg', 75, 1)
manifest.forceMove(get_turf(src))
manifest = null
update_icon()
/obj/structure/closet/crate/proc/tear_manifest(mob/user)
user << "<span class='notice'>You tear the manifest off of the crate.</span>"
user << "<span class='notice'>You tear the manifest off of [src].</span>"
playsound(src, 'sound/items/poster_ripped.ogg', 75, 1)
manifest.loc = loc
manifest.forceMove(loc)
if(ishuman(user))
user.put_in_hands(manifest)
manifest = null
@@ -6,6 +6,7 @@
close_sound = 'sound/effects/bin_close.ogg'
anchored = TRUE
horizontal = FALSE
delivery_icon = null
/obj/structure/closet/crate/bin/New()
..()
@@ -32,7 +33,7 @@
do_animate()
else if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src.loc, W.usesound, 75, 1)
else
return ..()
@@ -6,6 +6,8 @@
allow_objects = FALSE
breakout_time = 1
material_drop = /obj/item/stack/sheet/mineral/wood
material_drop_amount = 4
delivery_icon = "deliverybox"
var/obj/item/weapon/tank/internals/emergency_oxygen/tank
/obj/structure/closet/crate/critter/New()
@@ -14,11 +16,9 @@
/obj/structure/closet/crate/critter/Destroy()
var/turf/T = get_turf(src)
tank.loc = T
tank = null
for(var/i in 1 to rand(2, 5))
new material_drop(T)
if(tank)
tank.forceMove(T)
tank = null
return ..()
@@ -4,6 +4,7 @@
icon_state = "largecrate"
density = 1
material_drop = /obj/item/stack/sheet/mineral/wood
delivery_icon = "deliverybox"
/obj/structure/closet/crate/large/attack_hand(mob/user)
add_fingerprint(user)
@@ -4,7 +4,15 @@
icon_state = "securecrate"
secure = 1
locked = 1
health = 1000
obj_integrity = 500
max_integrity = 500
armor = list(melee = 30, bullet = 50, laser = 50, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80)
var/tamperproof = 0
/obj/structure/closet/crate/secure/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 25)
return 0
. = ..()
/obj/structure/closet/crate/secure/update_icon()
..()
@@ -15,6 +23,24 @@
else
add_overlay("securecrateg")
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
if(prob(tamperproof))
boom()
..()
/obj/structure/closet/crate/secure/proc/boom(mob/user)
if(user)
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
var/message = "[ADMIN_LOOKUPFLW(user)] has detonated [src.name]."
bombers += message
message_admins(message)
log_game("[key_name(user)] has detonated [src.name].")
for(var/atom/movable/AM in src)
qdel(AM)
explosion(get_turf(src), 0, 1, 5, 5)
qdel(src)
/obj/structure/closet/crate/secure/weapon
desc = "A secure weapons crate."
name = "weapons crate"
@@ -0,0 +1,18 @@
/obj/structure/destructible //a base for destructible structures
max_integrity = 100
obj_integrity = 100
var/break_message = "<span class='warning'>The strange, admin-y structure breaks!</span>" //The message shown when a structure breaks
var/break_sound = 'sound/magic/clockwork/invoke_general.ogg' //The sound played when a structure breaks
var/list/debris = null //Parts left behind when a structure breaks, takes the form of list(path = amount_to_spawn)
/obj/structure/destructible/deconstruct(disassembled = TRUE)
if(!disassembled)
if(!(flags & NODECONSTRUCT))
if(islist(debris))
for(var/I in debris)
for(var/i in 1 to debris[I])
new I (get_turf(src))
visible_message(break_message)
playsound(src, break_sound, 50, 1)
qdel(src)
return 1
+79 -88
View File
@@ -5,9 +5,11 @@
desc = "A display case for prized possessions."
density = 1
anchored = 1
unacidable = 1//Dissolving the case would also delete the gun.
var/health = 30
var/destroyed = 0
resistance_flags = ACID_PROOF
armor = list(melee = 30, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 100)
obj_integrity = 200
max_integrity = 200
integrity_failure = 50
var/obj/item/showpiece = null
var/alert = 0
var/open = 0
@@ -20,16 +22,14 @@
showpiece = new start_showpiece_type (src)
update_icon()
/obj/structure/displaycase/ex_act(severity, target)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
dump()
qdel(src)
if (2)
take_damage(rand(10,20), BRUTE, 0)
if (3)
take_damage(5, BRUTE, 0)
/obj/structure/displaycase/Destroy()
if(electronics)
qdel(electronics)
electronics = null
if(showpiece)
qdel(showpiece)
showpiece = null
return ..()
/obj/structure/displaycase/examine(mob/user)
..()
@@ -39,51 +39,45 @@
user << "<span class='notice'>Hooked up with an anti-theft system.</span>"
/obj/structure/displaycase/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type, 0)
/obj/structure/displaycase/proc/dump()
if (showpiece)
showpiece.loc = src.loc
showpiece.forceMove(loc)
showpiece = null
/obj/structure/displaycase/blob_act(obj/effect/blob/B)
if (prob(75))
new /obj/item/weapon/shard( src.loc )
dump()
qdel(src)
/obj/structure/displaycase/hitby(atom/movable/AM)
..()
if(isobj(AM))
var/obj/item/I = AM
take_damage(I.throwforce * 0.2)
/obj/structure/displaycase/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(sound_effect)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
if(BURN)
if(sound_effect)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
else
return
health = max( health - damage, 0)
if(!health && !destroyed)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/displaycase/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
dump()
if(!disassembled)
new /obj/item/weapon/shard( src.loc )
trigger_alarm()
qdel(src)
/obj/structure/displaycase/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
density = 0
destroyed = 1
broken = 1
new /obj/item/weapon/shard( src.loc )
playsound(src, "shatter", 70, 1)
update_icon()
trigger_alarm()
//Activate Anti-theft
if(alert)
var/area/alarmed = get_area(src)
alarmed.burglaralert(src)
playsound(src, "sound/effects/alert.ogg", 50, 1)
/obj/structure/displaycase/proc/trigger_alarm()
//Activate Anti-theft
if(alert)
var/area/alarmed = get_area(src)
alarmed.burglaralert(src)
playsound(src, "sound/effects/alert.ogg", 50, 1)
/*
*/
/obj/structure/displaycase/proc/is_directional(atom/A)
try
@@ -91,6 +85,7 @@
catch
return 0
return 1
/obj/structure/displaycase/proc/get_flat_icon_directional(atom/A)
//Get flatIcon even if dir is mismatched for directionless icons
//SLOW
@@ -110,7 +105,7 @@
I = icon('icons/obj/stationobjs.dmi',"glassbox_open")
else
I = icon('icons/obj/stationobjs.dmi',"glassbox0")
if(destroyed)
if(broken)
I = icon('icons/obj/stationobjs.dmi',"glassboxb0")
if(showpiece)
var/icon/S = get_flat_icon_directional(showpiece)
@@ -120,15 +115,27 @@
return
/obj/structure/displaycase/attackby(obj/item/weapon/W, mob/user, params)
if(W.GetID() && electronics && !destroyed)
if(W.GetID() && !broken)
if(allowed(user))
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
open = !open
update_icon()
toggle_lock(user)
else
user << "<span class='warning'>Access denied.</span>"
else if(!alert && istype(W,/obj/item/weapon/crowbar))
if(destroyed)
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP && !broken)
var/obj/item/weapon/weldingtool/WT = W
if(obj_integrity < max_integrity && WT.remove_fuel(5, user))
user << "<span class='notice'>You begin repairing [src].</span>"
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40*W.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
update_icon()
user << "<span class='notice'>You repair [src].</span>"
else
user << "<span class='warning'>[src] is already in good condition!</span>"
return
else if(!alert && istype(W,/obj/item/weapon/crowbar)) //Only applies to the lab cage and player made display cases
if(broken)
if(showpiece)
user << "<span class='notice'>Remove the displayed object first.</span>"
else
@@ -136,55 +143,39 @@
qdel(src)
else
user << "<span class='notice'>You start to [open ? "close":"open"] the [src]</span>"
if(do_after(user, 20/W.toolspeed, target = src))
if(do_after(user, 20*W.toolspeed, target = src))
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
open = !open
update_icon()
toggle_lock(user)
else if(open && !showpiece)
if(user.drop_item())
W.loc = src
showpiece = W
user << "<span class='notice'>You put [W] on display</span>"
update_icon()
else if(istype(W, /obj/item/stack/sheet/glass) && destroyed)
else if(istype(W, /obj/item/stack/sheet/glass) && broken)
var/obj/item/stack/sheet/glass/G = W
if(G.get_amount() < 2)
user << "<span class='warning'>You need two glass sheets to fix the case!</span>"
return
user << "<span class='notice'>You start fixing the [src]...</span>"
user << "<span class='notice'>You start fixing [src]...</span>"
if(do_after(user, 20, target = src))
G.use(2)
destroyed = 0
health = initial(health)
broken = 0
obj_integrity = max_integrity
update_icon()
else
return ..()
/obj/structure/displaycase/attacked_by(obj/item/weapon/W, mob/living/user)
..()
take_damage(W.force, W.damtype)
/obj/structure/displaycase/proc/toggle_lock(mob/user)
open = !open
update_icon()
/obj/structure/displaycase/attack_paw(mob/user)
return src.attack_hand(user)
/obj/structure/displaycase/attack_alien(mob/living/carbon/alien/humanoid/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
take_damage(20, BRUTE, 0)
/obj/structure/displaycase/attack_animal(mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
if(M.melee_damage_upper > 0)
M.visible_message("<span class='danger'>[M.name] smashes against \the [src.name].</span>",\
"<span class='danger'>You smash against the [src.name].</span>")
take_damage(M.melee_damage_upper, M.melee_damage_type, 1)
/obj/structure/displaycase/attack_hand(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
if (showpiece && (destroyed || open))
if (showpiece && (broken || open))
dump()
user << "<span class='notice'>You deactivate the hover field built into the case.</span>"
src.add_fingerprint(user)
@@ -194,9 +185,8 @@
//prevents remote "kicks" with TK
if (!Adjacent(user))
return
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] kicks the display case.</span>", \
"<span class='notice'>You kick the display case.</span>")
user.visible_message("<span class='danger'>[user] kicks the display case.</span>", null, null, COMBAT_MESSAGE_RANGE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
take_damage(2)
@@ -212,19 +202,18 @@
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench))
if(istype(I, /obj/item/weapon/wrench)) //The player can only deconstruct the wooden frame
user << "<span class='notice'>You start disassembling [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30/I.toolspeed, target = src))
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30*I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
qdel(src)
else if(istype(I, /obj/item/weapon/electronics/airlock))
user << "<span class='notice'>You start installing the electronics into [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(user.unEquip(I) && do_after(user, 30, target = src))
I.loc = src
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30, target = src) && user.transferItemToLoc(I,src))
electronics = I
user << "<span class='notice'>You install the airlock electronics.</span>"
@@ -248,13 +237,15 @@
else
return ..()
//The captains display case requiring specops ID access is intentional.
//The lab cage and captains display case do not spawn with electronics, which is why req_access is needed.
/obj/structure/displaycase/captain
alert = 1
start_showpiece_type = /obj/item/weapon/gun/energy/laser/captain
req_access = list(access_cent_specops)
/obj/structure/displaycase/labcage
name = "lab cage"
desc = "A glass lab container for storing interesting creatures."
start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
req_access = list(access_rd)
+46
View File
@@ -0,0 +1,46 @@
/obj/structure/sacrificealtar
name = "sacrificial altar"
desc = "An altar designed to perform blood sacrifice for a deity."
icon = 'icons/obj/hand_of_god_structures.dmi'
icon_state = "sacrificealtar"
anchored = 1
density = 0
can_buckle = 1
/obj/structure/sacrificealtar/attack_hand(mob/living/user)
..()
if(!has_buckled_mobs())
return
var/mob/living/L = locate() in buckled_mobs
if(!L)
return
user << "<span class='notice'>You attempt to sacrifice [L] by invoking the sacrificial ritual.</span>"
L.gib()
message_admins("[key_name_admin(user)] has sacrificed [key_name_admin(L)] on the sacrifical altar.")
/obj/structure/healingfountain
name = "healing fountain"
desc = "A fountain containing the waters of life."
icon = 'icons/obj/hand_of_god_structures.dmi'
icon_state = "fountain"
anchored = 1
density = 1
var/time_between_uses = 1800
var/last_process = 0
/obj/structure/healingfountain/attack_hand(mob/living/user)
if(last_process + time_between_uses > world.time)
user << "<span class='notice'>The fountain appears to be empty.</span>"
return
last_process = world.time
user << "<span class='notice'>The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards.</span>"
user.reagents.add_reagent("godblood",20)
update_icons()
addtimer(CALLBACK(src, .proc/update_icons), time_between_uses)
/obj/structure/healingfountain/proc/update_icons()
if(last_process + time_between_uses > world.time)
icon_state = "fountain"
else
icon_state = "fountain-red"
+51 -21
View File
@@ -5,6 +5,8 @@
var/overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
anchored = 0
density = 1
obj_integrity = 200
max_integrity = 200
var/state = 0
var/mineral = null
var/typetext = ""
@@ -18,6 +20,7 @@
/obj/structure/door_assembly/New()
update_icon()
..()
/obj/structure/door_assembly/door_assembly_0
name = "airlock assembly"
@@ -262,6 +265,22 @@
state = 1
mineral = "sandstone"
/obj/structure/door_assembly/door_assembly_titanium
name = "titanium airlock assembly"
icon = 'icons/obj/doors/airlocks/shuttle/shuttle.dmi'
overlays_file = 'icons/obj/doors/airlocks/shuttle/overlays.dmi'
typetext = "titanium"
icontext = "titanium"
glass_type = /obj/machinery/door/airlock/glass_titanium
airlock_type = /obj/machinery/door/airlock/titanium
anchored = 1
state = 1
mineral = "titanium"
/obj/structure/door_assembly/door_assembly_titanium/glass
mineral = "glass"
material = "glass"
/obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
name = "high security airlock assembly"
icon = 'icons/obj/doors/airlocks/highsec/highsec.dmi'
@@ -491,22 +510,11 @@
"You start to disassemble the airlock assembly...")
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if( !WT.isOn() )
return
user << "<span class='notice'>You disassemble the airlock assembly.</span>"
new /obj/item/stack/sheet/metal(get_turf(src), 4)
if (mineral)
if (mineral == "glass")
if (heat_proof_finished)
new /obj/item/stack/sheet/rglass(get_turf(src))
else
new /obj/item/stack/sheet/glass(get_turf(src))
else
var/M = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new M(get_turf(src))
new M(get_turf(src))
qdel(src)
deconstruct(TRUE)
else if(istype(W, /obj/item/weapon/wrench))
if(!anchored )
@@ -522,7 +530,7 @@
"<span class='notice'>You start to secure the airlock assembly to the floor...</span>", \
"<span class='italics'>You hear wrenching.</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if( src.anchored )
return
user << "<span class='notice'>You secure the airlock assembly.</span>"
@@ -536,7 +544,7 @@
user.visible_message("[user] unsecures the airlock assembly from the floor.", \
"<span class='notice'>You start to unsecure the airlock assembly from the floor...</span>", \
"<span class='italics'>You hear wrenching.</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(!anchored )
return
user << "<span class='notice'>You unsecure the airlock assembly.</span>"
@@ -562,7 +570,7 @@
user.visible_message("[user] cuts the wires from the airlock assembly.", \
"<span class='notice'>You start to cut the wires from the airlock assembly...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if( src.state != 1 )
return
user << "<span class='notice'>You cut the wires from the airlock assembly.</span>"
@@ -592,7 +600,7 @@
user.visible_message("[user] removes the electronics from the airlock assembly.", \
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if( src.state != 2 )
return
user << "<span class='notice'>You remove the airlock electronics.</span>"
@@ -610,7 +618,7 @@
if(G)
if(G.get_amount() >= 1)
if(istype(G, /obj/item/stack/sheet/rglass) || istype(G, /obj/item/stack/sheet/glass))
playsound(src.loc, W.usesound, 100, 1)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
if(do_after(user, 40, target = src))
@@ -638,7 +646,7 @@
else if(istype(G, /obj/item/stack/sheet/mineral))
var/M = G.sheettype
if(G.get_amount() >= 2)
playsound(src.loc, W.usesound, 100, 1)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
if(do_after(user, 40, target = src))
@@ -655,7 +663,7 @@
user.visible_message("[user] finishes the airlock.", \
"<span class='notice'>You start finishing the airlock...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(src.loc && state == 2)
user << "<span class='notice'>You finish the airlock.</span>"
var/obj/machinery/door/airlock/door
@@ -684,4 +692,26 @@
add_overlay(get_airlock_overlay("fill_construction", icon))
else
add_overlay(get_airlock_overlay("[material]_construction", overlays_file))
add_overlay(get_airlock_overlay("panel_c[state+1]", overlays_file))
add_overlay(get_airlock_overlay("panel_c[state+1]", overlays_file))
/obj/structure/door_assembly/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
var/turf/T = get_turf(src)
var/metal_amt = 4
if(!disassembled)
metal_amt = rand(2,4)
new /obj/item/stack/sheet/metal(T, metal_amt)
if(mineral)
if (mineral == "glass")
if(disassembled)
if (heat_proof_finished)
new /obj/item/stack/sheet/rglass(T)
else
new /obj/item/stack/sheet/glass(T)
else
new /obj/item/weapon/shard(T)
else
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new mineral_path(T, 2)
qdel(src)
@@ -13,7 +13,7 @@
/obj/structure/chair/e_chair/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/chair/C = new /obj/structure/chair(loc)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
C.setDir(dir)
part.loc = loc
part.master = null
@@ -44,4 +44,4 @@
buckled_mob << "<span class='userdanger'>You feel a deep shock course through your body!</span>"
spawn(1)
buckled_mob.electrocute_act(85, src, 1)
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='italics'>You hear a deep sharp shock!</span>")
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='italics'>You hear a deep sharp shock!</span>")
+81 -45
View File
@@ -5,7 +5,10 @@
icon_state = "extinguisher_closed"
anchored = 1
density = 0
var/obj/item/weapon/extinguisher/has_extinguisher
obj_integrity = 200
max_integrity = 200
integrity_failure = 50
var/obj/item/weapon/extinguisher/stored_extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/New(loc, ndir, building)
@@ -17,94 +20,127 @@
opened = 1
icon_state = "extinguisher_empty"
else
has_extinguisher = new /obj/item/weapon/extinguisher(src)
stored_extinguisher = new /obj/item/weapon/extinguisher(src)
/obj/structure/extinguisher_cabinet/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
return
if(2)
if(prob(50))
if(has_extinguisher)
has_extinguisher.loc = src.loc
qdel(src)
return
if(3)
return
/obj/structure/extinguisher_cabinet/Destroy()
if(stored_extinguisher)
qdel(stored_extinguisher)
stored_extinguisher = null
return ..()
/obj/structure/extinguisher_cabinet/contents_explosion(severity, target)
if(stored_extinguisher)
stored_extinguisher.ex_act(severity, target)
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
if(A == stored_extinguisher)
stored_extinguisher = null
update_icon()
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench) && !has_extinguisher)
if(istype(I, /obj/item/weapon/wrench) && !stored_extinguisher)
user << "<span class='notice'>You start unsecuring [name]...</span>"
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 60/I.toolspeed, target = src))
playsound(loc, I.usesound, 50, 1)
if(do_after(user, 60*I.toolspeed, target = src))
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You unsecure [name].</span>"
new /obj/item/wallframe/extinguisher_cabinet(loc)
qdel(src)
deconstruct(TRUE)
return
if(isrobot(user) || isalien(user))
if(iscyborg(user) || isalien(user))
return
if(istype(I, /obj/item/weapon/extinguisher))
if(!has_extinguisher && opened)
if(!stored_extinguisher && opened)
if(!user.drop_item())
return
contents += I
has_extinguisher = I
stored_extinguisher = I
user << "<span class='notice'>You place [I] in [src].</span>"
update_icon()
else
opened = !opened
toggle_cabinet(user)
else if(user.a_intent != INTENT_HARM)
toggle_cabinet(user)
else
opened = !opened
update_icon()
return ..()
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(isrobot(user) || isalien(user))
if(iscyborg(user) || isalien(user))
return
if(has_extinguisher)
user.put_in_hands(has_extinguisher)
user << "<span class='notice'>You take [has_extinguisher] from [src].</span>"
has_extinguisher = null
opened = 1
if(stored_extinguisher)
user.put_in_hands(stored_extinguisher)
user << "<span class='notice'>You take [stored_extinguisher] from [src].</span>"
stored_extinguisher = null
if(!opened)
opened = 1
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
update_icon()
else
opened = !opened
update_icon()
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
if(has_extinguisher)
has_extinguisher.loc = loc
user << "<span class='notice'>You telekinetically remove [has_extinguisher] from [src].</span>"
has_extinguisher = null
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
user << "<span class='notice'>You telekinetically remove [stored_extinguisher] from [src].</span>"
stored_extinguisher = null
opened = 1
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
update_icon()
else
opened = !opened
update_icon()
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
attack_hand(user)
return
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
if(user.incapacitated() || !Adjacent(user) || !istype(user))
return
opened = !opened
update_icon()
toggle_cabinet(user)
/obj/structure/extinguisher_cabinet/proc/toggle_cabinet(mob/user)
if(opened && broken)
user << "<span class='warning'>[src] is broken open.</span>"
else
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/update_icon()
if(!opened)
icon_state = "extinguisher_closed"
return
if(has_extinguisher)
if(istype(has_extinguisher, /obj/item/weapon/extinguisher/mini))
if(stored_extinguisher)
if(istype(stored_extinguisher, /obj/item/weapon/extinguisher/mini))
icon_state = "extinguisher_mini"
else
icon_state = "extinguisher_full"
else
icon_state = "extinguisher_empty"
/obj/structure/extinguisher_cabinet/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
broken = 1
opened = 1
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
stored_extinguisher = null
update_icon()
/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(disassembled)
new /obj/item/wallframe/extinguisher_cabinet(loc)
else
new /obj/item/stack/sheet/metal (loc, 2)
if(stored_extinguisher)
stored_extinguisher.forceMove(loc)
stored_extinguisher = null
qdel(src)
/obj/item/wallframe/extinguisher_cabinet
name = "extinguisher cabinet frame"
desc = "Used for building wall-mounted extinguisher cabinets."
+106 -66
View File
@@ -7,21 +7,28 @@
anchored = 1
icon = 'icons/turf/walls/wall.dmi'
icon_state = "wall"
var/mineral = "metal"
var/walltype = "metal"
var/mineral = /obj/item/stack/sheet/metal
var/mineral_amount = 2
var/walltype = /turf/closed/wall
var/girder_type = /obj/structure/girder/displaced
var/opening = 0
density = 1
opacity = 1
obj_integrity = 100
max_integrity = 100
canSmoothWith = list(
/turf/closed/wall,
/turf/closed/wall/r_wall,
/obj/structure/falsewall,
/obj/structure/falsewall/brass,
/obj/structure/falsewall/reinforced,
/turf/closed/wall/rust,
/turf/closed/wall/r_wall/rust)
/turf/closed/wall/r_wall/rust,
/turf/closed/wall/clockwork)
smooth = SMOOTH_TRUE
can_be_unanchored = 0
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/structure/falsewall/New(loc)
..()
@@ -32,8 +39,9 @@
air_update_turf(1)
return ..()
/obj/structure/falsewall/CanAtmosPass(turf/T)
return !density
/obj/structure/falsewall/ratvar_act()
new /obj/structure/falsewall/brass(loc)
qdel(src)
/obj/structure/falsewall/attack_hand(mob/user)
if(opening)
@@ -45,7 +53,7 @@
sleep(5)
if(!qdeleted(src))
density = 0
set_opacity(0)
SetOpacity(0)
update_icon()
else
var/srcturf = get_turf(src)
@@ -56,19 +64,11 @@
density = 1
sleep(5)
if(!qdeleted(src))
set_opacity(1)
SetOpacity(1)
update_icon()
air_update_turf(1)
opening = 0
/obj/structure/falsewall/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
qdel(src)
/obj/structure/falsewall/proc/do_the_flick()
if(density)
smooth = SMOOTH_FALSE
@@ -81,16 +81,13 @@
if(density)
smooth = SMOOTH_TRUE
queue_smooth(src)
icon_state = "wall"
icon_state = initial(icon_state)
else
icon_state = "fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
if(!walltype || walltype == "metal")
T.ChangeTurf(/turf/closed/wall)
else
T.ChangeTurf(text2path("/turf/closed/wall/mineral/[walltype]"))
T.ChangeTurf(walltype)
if(delete)
qdel(src)
return T
@@ -106,7 +103,7 @@
if(T.density)
user << "<span class='warning'>[src] is blocked!</span>"
return
if(!istype(T, /turf/open/floor))
if(!isfloorturf(T))
user << "<span class='warning'>[src] bolts must be tightened on the floor!</span>"
return
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='notice'>You tighten the bolts on the wall.</span>")
@@ -117,36 +114,36 @@
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
dismantle(user)
dismantle(user, TRUE)
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
dismantle(user)
dismantle(user, TRUE)
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
D.playDigSound()
dismantle(user)
dismantle(user, TRUE)
else
return ..()
/obj/structure/falsewall/proc/dismantle(mob/user)
/obj/structure/falsewall/proc/dismantle(mob/user, disassembled = TRUE)
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='notice'>You dismantle the false wall.</span>")
new /obj/structure/girder/displaced(loc)
if(mineral == "metal")
if(istype(src, /obj/structure/falsewall/reinforced))
new /obj/item/stack/sheet/plasteel(loc)
new /obj/item/stack/sheet/plasteel(loc)
else
new /obj/item/stack/sheet/metal(loc)
new /obj/item/stack/sheet/metal(loc)
else
var/P = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new P(loc)
new P(loc)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
deconstruct(disassembled)
/obj/structure/falsewall/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(disassembled)
new girder_type(loc)
if(mineral_amount)
for(var/i in 1 to mineral_amount)
new mineral(loc)
qdel(src)
/obj/structure/falsewall/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
return 0
/obj/structure/falsewall/examine_status(mob/user) //So you can't detect falsewalls by examine.
return null
/*
* False R-Walls
*/
@@ -156,14 +153,8 @@
desc = "A huge chunk of reinforced metal used to separate rooms."
icon = 'icons/turf/walls/reinforced_wall.dmi'
icon_state = "r_wall"
walltype = "rwall"
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/closed/wall/r_wall)
if(delete)
qdel(src)
return T
walltype = /turf/closed/wall/r_wall
mineral = /obj/item/stack/sheet/plasteel
/*
* Uranium Falsewalls
@@ -174,8 +165,8 @@
desc = "A wall with uranium plating. This is probably a bad idea."
icon = 'icons/turf/walls/uranium_wall.dmi'
icon_state = "uranium"
mineral = "uranium"
walltype = "uranium"
mineral = /obj/item/stack/sheet/mineral/uranium
walltype = /turf/closed/wall/mineral/uranium
var/active = null
var/last_event = 0
canSmoothWith = list(/obj/structure/falsewall/uranium, /turf/closed/wall/mineral/uranium)
@@ -208,8 +199,8 @@
desc = "A wall with gold plating. Swag!"
icon = 'icons/turf/walls/gold_wall.dmi'
icon_state = "gold"
mineral = "gold"
walltype = "gold"
mineral = /obj/item/stack/sheet/mineral/gold
walltype = /turf/closed/wall/mineral/gold
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/closed/wall/mineral/gold)
/obj/structure/falsewall/silver
@@ -217,8 +208,8 @@
desc = "A wall with silver plating. Shiny."
icon = 'icons/turf/walls/silver_wall.dmi'
icon_state = "silver"
mineral = "silver"
walltype = "silver"
mineral = /obj/item/stack/sheet/mineral/silver
walltype = /turf/closed/wall/mineral/silver
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/closed/wall/mineral/silver)
/obj/structure/falsewall/diamond
@@ -226,17 +217,19 @@
desc = "A wall with diamond plating. You monster."
icon = 'icons/turf/walls/diamond_wall.dmi'
icon_state = "diamond"
mineral = "diamond"
walltype = "diamond"
mineral = /obj/item/stack/sheet/mineral/diamond
walltype = /turf/closed/wall/mineral/diamond
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/closed/wall/mineral/diamond)
obj_integrity = 800
max_integrity = 800
/obj/structure/falsewall/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definitely a bad idea."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = "plasma"
mineral = "plasma"
walltype = "plasma"
mineral = /obj/item/stack/sheet/mineral/plasma
walltype = /turf/closed/wall/mineral/plasma
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/closed/wall/mineral/plasma)
/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user, params)
@@ -262,8 +255,8 @@
desc = "A wall with bananium plating. Honk!"
icon = 'icons/turf/walls/bananium_wall.dmi'
icon_state = "bananium"
mineral = "bananium"
walltype = "bananium"
mineral = /obj/item/stack/sheet/mineral/bananium
walltype = /turf/closed/wall/mineral/clown
canSmoothWith = list(/obj/structure/falsewall/clown, /turf/closed/wall/mineral/clown)
@@ -272,8 +265,8 @@
desc = "A wall with sandstone plating. Rough."
icon = 'icons/turf/walls/sandstone_wall.dmi'
icon_state = "sandstone"
mineral = "sandstone"
walltype = "sandstone"
mineral = /obj/item/stack/sheet/mineral/sandstone
walltype = /turf/closed/wall/mineral/sandstone
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/closed/wall/mineral/sandstone)
/obj/structure/falsewall/wood
@@ -281,8 +274,8 @@
desc = "A wall with wooden plating. Stiff."
icon = 'icons/turf/walls/wood_wall.dmi'
icon_state = "wood"
mineral = "wood"
walltype = "wood"
mineral = /obj/item/stack/sheet/mineral/wood
walltype = /turf/closed/wall/mineral/wood
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/closed/wall/mineral/wood)
/obj/structure/falsewall/iron
@@ -290,14 +283,61 @@
desc = "A wall with rough metal plating."
icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = "iron"
mineral = "metal"
walltype = "iron"
mineral = /obj/item/stack/rods
walltype = /turf/closed/wall/mineral/iron
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/closed/wall/mineral/iron)
/obj/structure/falsewall/abductor
name = "alien wall"
desc = "A wall with alien alloy plating."
icon = 'icons/turf/walls/abductor_wall.dmi'
icon_state = "abductor"
mineral = "abductor"
walltype = "abductor"
canSmoothWith = list(/obj/structure/falsewall/abductor, /turf/closed/wall/mineral/abductor)
mineral = /obj/item/stack/sheet/mineral/abductor
walltype = /turf/closed/wall/mineral/abductor
canSmoothWith = list(/obj/structure/falsewall/abductor, /turf/closed/wall/mineral/abductor)
/obj/structure/falsewall/titanium
name = "wall"
desc = "A light-weight titanium wall used in shuttles."
icon = 'icons/turf/walls/shuttle_wall.dmi'
icon_state = "shuttle"
mineral = /obj/item/stack/sheet/mineral/titanium
walltype = /turf/closed/wall/mineral/titanium
smooth = SMOOTH_MORE
canSmoothWith = list(/turf/closed/wall/mineral/titanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock/, /turf/closed/wall/shuttle, /obj/structure/window/shuttle, /obj/structure/shuttle/engine, /obj/structure/shuttle/engine/heater, )
/obj/structure/falsewall/plastitanium
name = "wall"
desc = "An evil wall of plasma and titanium."
icon = 'icons/turf/shuttle.dmi'
icon_state = "wall3"
mineral = /obj/item/stack/sheet/mineral/plastitanium
walltype = /turf/closed/wall/mineral/plastitanium
smooth = SMOOTH_FALSE
/obj/structure/falsewall/brass
name = "clockwork wall"
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
icon = 'icons/turf/walls/clockwork_wall.dmi'
icon_state = "clockwork_wall"
resistance_flags = FIRE_PROOF | ACID_PROOF
mineral_amount = 1
canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass)
girder_type = /obj/structure/destructible/clockwork/wall_gear/displaced
walltype = /turf/closed/wall/clockwork
mineral = /obj/item/stack/tile/brass
/obj/structure/falsewall/brass/New(loc)
..()
var/turf/T = get_turf(src)
new /obj/effect/overlay/temp/ratvar/wall/false(T)
new /obj/effect/overlay/temp/ratvar/beam/falsewall(T)
change_construction_value(4)
/obj/structure/falsewall/brass/Destroy()
change_construction_value(-4)
return ..()
/obj/structure/falsewall/brass/ratvar_act()
if(ratvar_awakens)
obj_integrity = max_integrity
+88 -69
View File
@@ -6,19 +6,50 @@
icon_state = "fireaxe"
anchored = 1
density = 0
armor = list(melee = 50, bullet = 20, laser = 0, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 90, acid = 50)
var/locked = 1
var/open = 0
var/health = 60
obj_integrity = 150
max_integrity = 150
integrity_failure = 50
/obj/structure/fireaxecabinet/New()
..()
update_icon()
/obj/structure/fireaxecabinet/Destroy()
if(fireaxe)
qdel(fireaxe)
fireaxe = null
return ..()
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
if(isrobot(user) || istype(I,/obj/item/device/multitool))
if(iscyborg(user) || istype(I,/obj/item/device/multitool))
toggle_lock(user)
else if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP && !broken)
var/obj/item/weapon/weldingtool/WT = I
if(obj_integrity < max_integrity && WT.remove_fuel(2, user))
user << "<span class='notice'>You begin repairing [src].</span>"
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40*I.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
update_icon()
user << "<span class='notice'>You repair [src].</span>"
else
user << "<span class='warning'>[src] is already in good condition!</span>"
return
if(open || health <= 0)
else if(istype(I, /obj/item/stack/sheet/glass) && broken)
var/obj/item/stack/sheet/glass/G = I
if(G.get_amount() < 2)
user << "<span class='warning'>You need two glass sheets to fix [src]!</span>"
return
user << "<span class='notice'>You start fixing [src]...</span>"
if(do_after(user, 20, target = src) && G.use(2))
broken = 0
obj_integrity = max_integrity
update_icon()
else if(open || broken)
if(istype(I, /obj/item/weapon/twohanded/fireaxe) && !fireaxe)
var/obj/item/weapon/twohanded/fireaxe/F = I
if(F.wielded)
@@ -27,68 +58,56 @@
if(!user.drop_item())
return
fireaxe = F
src.contents += F
F.forceMove(src)
user << "<span class='caution'>You place the [F.name] back in the [name].</span>"
update_icon()
return
else if(health > 0)
else if(!broken)
toggle_open()
else
return ..()
/obj/structure/fireaxecabinet/attacked_by(obj/item/I, mob/living/user)
..()
take_damage(I.force, I.damtype)
/obj/structure/fireaxecabinet/proc/take_damage(damage, damage_type, sound_effect = 1)
if(open)
return
/obj/structure/fireaxecabinet/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(sound_effect)
if(health <= 0)
playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, 1)
else
playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1)
if(BURN)
if(sound_effect)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
else
return
if(damage < 10)
return
if(health > 0)
health -= damage
update_icon()
if(health <= 0)
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1)
/obj/structure/fireaxecabinet/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
if(2)
if(prob(50) && fireaxe)
fireaxe.loc = src.loc
qdel(src)
if(broken)
playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, 1)
else
take_damage(rand(30,70), BRUTE, 0)
if(3)
take_damage(rand(10,30), BRUTE, 0)
playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1)
if(BURN)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/fireaxecabinet/bullet_act(obj/item/projectile/P)
/obj/structure/fireaxecabinet/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
if(open)
return
. = ..()
take_damage(P.damage, P.damage_type, 0)
if(.)
update_icon()
/obj/structure/fireaxecabinet/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
update_icon()
broken = TRUE
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1)
new /obj/item/weapon/shard(loc)
new /obj/item/weapon/shard(loc)
/obj/structure/fireaxecabinet/blob_act(obj/effect/blob/B)
/obj/structure/fireaxecabinet/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(fireaxe && loc)
fireaxe.forceMove(loc)
fireaxe = null
new /obj/item/stack/sheet/metal(loc, 2)
qdel(src)
/obj/structure/fireaxecabinet/blob_act(obj/structure/blob/B)
if(fireaxe)
fireaxe.loc = src.loc
fireaxe.forceMove(loc)
fireaxe = null
qdel(src)
/obj/structure/fireaxecabinet/attack_hand(mob/user)
if(open || health <= 0)
if(open || broken)
if(fireaxe)
user.put_in_hands(fireaxe)
fireaxe = null
@@ -107,37 +126,37 @@
/obj/structure/fireaxecabinet/attack_paw(mob/living/user)
attack_hand(user)
/obj/structure/fireaxecabinet/attack_alien(mob/living/user)
user.visible_message("<span class='warning'>[user] slashes [src].</span>")
take_damage(20)
/obj/structure/fireaxecabinet/attack_animal(mob/living/simple_animal/M)
if(!M.melee_damage_upper)
return
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
"<span class='danger'>You smash against [src].</span>")
take_damage(M.melee_damage_upper, M.melee_damage_type)
/obj/structure/fireaxecabinet/attack_ai(mob/user)
toggle_lock(user)
return
/obj/structure/fireaxecabinet/attack_tk(mob/user)
if(locked)
user <<"<span class='warning'> The [name] won't budge!</span>"
return
else
open = !open
update_icon()
return
/obj/structure/fireaxecabinet/update_icon()
cut_overlays()
if(fireaxe)
add_overlay("axe")
if(!open)
switch(health)
if(-INFINITY to 0)
add_overlay("glass4")
if(1 to 20)
add_overlay("glass3")
if(21 to 40)
add_overlay("glass2")
if(41 to 59)
add_overlay("glass1")
if(60)
add_overlay("glass")
var/hp_percent = obj_integrity/max_integrity * 100
if(broken)
add_overlay("glass4")
else
switch(hp_percent)
if(-INFINITY to 40)
add_overlay("glass3")
if(40 to 60)
add_overlay("glass2")
if(60 to 80)
add_overlay("glass1")
if(80 to INFINITY)
add_overlay("glass")
if(locked)
add_overlay("locked")
else
+153
View File
@@ -0,0 +1,153 @@
#define LOG_BURN_TIMER 150
#define PAPER_BURN_TIMER 5
#define MAXIMUM_BURN_TIMER 3000
/obj/structure/fireplace
name = "fireplace"
desc = "A large stone brick fireplace."
icon = 'icons/obj/fireplace.dmi'
icon_state = "fireplace"
density = FALSE
anchored = TRUE
pixel_x = -16
resistance_flags = FIRE_PROOF
var/lit = FALSE
var/fuel_added = 0
var/flame_expiry_timer
/obj/structure/fireplace/New()
..()
START_PROCESSING(SSobj, src)
/obj/structure/fireplace/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/structure/fireplace/proc/try_light(obj/item/O, mob/user)
if(lit)
user << "<span class='warning'>It's already lit!</span>"
return FALSE
if(!fuel_added)
user << "<span class='warning'>[src] needs some fuel to burn!</span>"
return FALSE
var/msg = O.ignition_effect(src, user)
if(msg)
visible_message(msg)
ignite()
return TRUE
/obj/structure/fireplace/attackby(obj/item/T, mob/user)
if(istype(T,/obj/item/stack/sheet/mineral/wood))
var/obj/item/stack/sheet/mineral/wood/wood = T
var/space_remaining = MAXIMUM_BURN_TIMER - burn_time_remaining()
var/space_for_logs = round(space_remaining / LOG_BURN_TIMER)
if(space_for_logs < 1)
user << "<span class='warning'>You can't fit any more of [T] in \
[src]!</span>"
return
var/logs_used = min(space_for_logs, wood.amount)
wood.use(logs_used)
adjust_fuel_timer(LOG_BURN_TIMER * logs_used)
user.visible_message("<span class='notice'>[user] tosses some \
wood into [src].</span>", "<span class='notice'>You add \
some fuel to [src].</span>")
else if(istype(T, /obj/item/weapon/paper_bin))
var/obj/item/weapon/paper_bin/paper_bin = T
user.visible_message("<span class='notice'>[user] throws [T] into \
[src].</span>", "<span class='notice'>You add [T] to [src].\
</span>")
adjust_fuel_timer(PAPER_BURN_TIMER * paper_bin.total_paper)
qdel(paper_bin)
else if(istype(T, /obj/item/weapon/paper))
user.visible_message("<span class='notice'>[user] throws [T] into \
[src].</span>", "<span class='notice'>You throw [T] into [src].\
</span>")
adjust_fuel_timer(PAPER_BURN_TIMER)
qdel(T)
else if(try_light(T,user))
return
else
. = ..()
/obj/structure/fireplace/update_icon()
cut_overlays()
if(lit)
switch(burn_time_remaining())
if(0 to 500)
add_overlay("fireplace_fire0")
if(500 to 1000)
add_overlay("fireplace_fire1")
if(1000 to 1500)
add_overlay("fireplace_fire2")
if(1500 to 2000)
add_overlay("fireplace_fire3")
if(2000 to MAXIMUM_BURN_TIMER)
add_overlay("fireplace_fire4")
add_overlay("fireplace_glow")
/obj/structure/fireplace/proc/adjust_light()
if(!lit)
SetLuminosity(0)
return
switch(burn_time_remaining())
if(0 to 500)
SetLuminosity(1)
if(500 to 1000)
SetLuminosity(2)
if(1000 to 1500)
SetLuminosity(3)
if(1500 to 2000)
SetLuminosity(4)
if(2000 to MAXIMUM_BURN_TIMER)
SetLuminosity(6)
/obj/structure/fireplace/process()
if(!lit)
return
if(world.time > flame_expiry_timer)
put_out()
return
playsound(src, 'sound/effects/comfyfire.ogg',50,0, 0, 1)
var/turf/T = get_turf(src)
T.hotspot_expose(700, 5)
update_icon()
adjust_light()
/obj/structure/fireplace/extinguish()
if(lit)
var/fuel = burn_time_remaining()
flame_expiry_timer = 0
put_out()
adjust_fuel_timer(fuel)
. = ..()
/obj/structure/fireplace/proc/adjust_fuel_timer(amount)
if(lit)
flame_expiry_timer += amount
if(burn_time_remaining() < MAXIMUM_BURN_TIMER)
flame_expiry_timer = world.time + MAXIMUM_BURN_TIMER
else
fuel_added = Clamp(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
/obj/structure/fireplace/proc/burn_time_remaining()
if(lit)
return max(0, flame_expiry_timer - world.time)
else
return max(0, fuel_added)
/obj/structure/fireplace/proc/ignite()
lit = TRUE
desc = "A large stone brick fireplace, warm and cozy."
flame_expiry_timer = world.time + fuel_added
fuel_added = 0
update_icon()
adjust_light()
/obj/structure/fireplace/proc/put_out()
lit = FALSE
update_icon()
adjust_light()
desc = initial(desc)
+24 -12
View File
@@ -1,11 +1,12 @@
/obj/structure/flora
burn_state = FLAMMABLE
burntime = 30
resistance_flags = FLAMMABLE
obj_integrity = 150
max_integrity = 150
anchored = 1
//trees
/obj/structure/flora/tree
name = "tree"
anchored = 1
density = 1
pixel_x = -16
layer = FLY_LAYER
@@ -17,14 +18,17 @@
if(W.sharpness && W.force > 0)
if(W.hitsound)
playsound(get_turf(src), W.hitsound, 100, 0, 0)
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "You hear the sound of cutting a tree.")
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "You hear the sound of sawing.")
if(do_after(user, 1000/W.force, target = user)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
if(cut)
return
user.visible_message("<span class='notice'>[user] falls [src] with the [W].</span>","<span class='notice'>You fall [src] with the [W].</span>", "You hear the sound of a tree falling.")
user.visible_message("<span class='notice'>[user] fells [src] with the [W].</span>","<span class='notice'>You fell [src] with the [W].</span>", "You hear the sound of a tree falling.")
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0)
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "tree_stump"
name = "stump"
density = 0
pixel_x = -16
name += " stump"
cut = TRUE
for(var/i=1 to log_amount)
new /obj/item/weapon/grown/log/tree(get_turf(src))
@@ -56,6 +60,15 @@
icon = 'icons/obj/flora/deadtrees.dmi'
icon_state = "tree_1"
/obj/structure/flora/tree/palm
icon = 'icons/misc/beach2.dmi'
icon_state = "palm1"
/obj/structure/flora/tree/palm/New()
..()
icon_state = pick("palm1","palm2")
pixel_x = 0
/obj/structure/festivus
name = "festivus pole"
icon = 'icons/obj/flora/pinetrees.dmi'
@@ -71,7 +84,6 @@
/obj/structure/flora/grass
name = "grass"
icon = 'icons/obj/flora/snowflora.dmi'
anchored = 1
gender = PLURAL //"this is grass" not "this is a grass"
/obj/structure/flora/grass/brown
@@ -114,7 +126,6 @@
name = "bush"
icon = 'icons/obj/flora/ausflora.dmi'
icon_state = "firstbush_1"
anchored = 1
/obj/structure/flora/ausbushes/New()
if(icon_state == "firstbush_1")
@@ -230,16 +241,18 @@
name = "potted plant"
icon = 'icons/obj/flora/plants.dmi'
icon_state = "plant-01"
w_class = 5
layer = ABOVE_MOB_LAYER
w_class = WEIGHT_CLASS_HUGE
force = 10
throwforce = 13
throw_speed = 2
throw_range = 4
/obj/item/weapon/twohanded/flora/kirbyplants/equipped(mob/living/user)
/obj/item/weapon/twohanded/required/kirbyplants/equipped(mob/living/user)
var/image/I = image(icon = 'icons/obj/flora/plants.dmi' , icon_state = src.icon_state, loc = user)
I.override = 1
user.add_alt_appearance("sneaking_mission", I, player_list)
..()
/obj/item/weapon/twohanded/required/kirbyplants/dropped(mob/living/user)
..()
@@ -279,8 +292,7 @@
icon_state = "basalt"
desc = "A volcanic rock"
icon = 'icons/obj/flora/rocks.dmi'
anchored = 1
burn_state = FIRE_PROOF
resistance_flags = FIRE_PROOF
density = 1
/obj/structure/flora/rock/New()
+109 -4
View File
@@ -8,11 +8,12 @@
anchored = TRUE
density = FALSE
opacity = 0
var/deconstructible = TRUE
/obj/structure/fluff/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/weapon/wrench))
if(istype(I, /obj/item/weapon/wrench) && deconstructible)
user.visible_message("<span class='notice'>[user] starts disassembling [src]...</span>", "<span class='notice'>You start disassembling [src]...</span>")
playsound(user, 'sound/items/Ratchet.ogg', 50, 1)
playsound(user, I.usesound, 50, 1)
if(!do_after(user, 50, target = src))
return 0
user.visible_message("<span class='notice'>[user] disassembles [src]!</span>", "<span class='notice'>You break down [src] into scrap metal.</span>")
@@ -37,7 +38,7 @@
/obj/structure/fluff/empty_sleeper/nanotrasen
name = "broken hypersleep chamber"
desc = "A NanoTrasen hypersleep chamber - this one appears broken. \
desc = "A Nanotrasen hypersleep chamber - this one appears broken. \
There are exposed bolts for easy disassembly using a wrench."
icon_state = "sleeper-o"
@@ -52,6 +53,110 @@
/obj/structure/fluff/broken_flooring
name = "broken tiling"
desc = "A segment of broken flooring"
desc = "A segment of broken flooring."
icon = 'icons/obj/brokentiling.dmi'
icon_state = "corner"
/obj/structure/fluff/drake_statue //Ash drake status spawn on either side of the necropolis gate in lavaland.
name = "drake statue"
desc = "A towering basalt sculpture of a proud and regal drake. Its eyes are six glowing gemstones."
icon = 'icons/effects/64x64.dmi'
icon_state = "drake_statue"
pixel_x = -16
density = TRUE
deconstructible = FALSE
/obj/structure/fluff/drake_statue/falling //A variety of statue in disrepair; parts are broken off and a gemstone is missing
desc = "A towering basalt sculpture of a drake. Cracks run down its surface and parts of it have fallen off."
icon_state = "drake_statue_falling"
/obj/structure/fluff/bus
name = "bus"
desc = "GO TO SCHOOL. READ A BOOK."
icon = 'icons/obj/bus.dmi'
density = TRUE
anchored = TRUE
deconstructible = FALSE
/obj/structure/fluff/bus/dense
name = "bus"
icon_state = "backwall"
/obj/structure/fluff/bus/passable
name = "bus"
icon_state = "frontwalltop"
density = 0
layer = ABOVE_ALL_MOB_LAYER //except for the stairs tile, which should be set to OBJ_LAYER aka 3.
/obj/structure/fluff/bus/passable/seat
name = "seat"
desc = "Buckle up! ...What do you mean, there's no seatbelts?!"
icon_state = "backseat"
pixel_y = 17
layer = OBJ_LAYER
/obj/structure/fluff/bus/passable/seat/driver
name = "driver's seat"
desc = "Space Jesus is my copilot."
icon_state = "driverseat"
/obj/structure/fluff/bus/passable/seat/driver/attack_hand(mob/user)
playsound(src.loc, 'sound/items/carhorn.ogg', 50, 1)
/obj/structure/fluff/paper
name = "dense lining of papers"
desc = "A lining of paper scattered across the bottom of a wall."
icon = 'icons/obj/fluff.dmi'
icon_state = "paper"
deconstructible = FALSE
/obj/structure/fluff/paper/corner
icon_state = "papercorner"
/obj/structure/fluff/paper/stack
name = "dense stack of papers"
desc = "A stack of various papers, childish scribbles scattered across each page."
icon_state = "paperstack"
/obj/structure/fluff/divine
name = "Miracle"
icon = 'icons/obj/hand_of_god_structures.dmi'
anchored = 1
density = 1
/obj/structure/fluff/divine/nexus
name = "nexus"
desc = "It anchors a deity to this world. It radiates an unusual aura. It looks well protected from explosive shock."
icon_state = "nexus"
/obj/structure/fluff/divine/conduit
name = "conduit"
desc = "It allows a deity to extend their reach. Their powers are just as potent near a conduit as a nexus."
icon_state = "conduit"
/obj/structure/fluff/divine/convertaltar
name = "conversion altar"
desc = "An altar dedicated to a deity."
icon_state = "convertaltar"
density = 0
can_buckle = 1
/obj/structure/fluff/divine/powerpylon
name = "power pylon"
desc = "A pylon which increases the deity's rate it can influence the world."
icon_state = "powerpylon"
can_buckle = 1
/obj/structure/fluff/divine/defensepylon
name = "defense pylon"
desc = "A pylon which is blessed to withstand many blows, and fire strong bolts at nonbelievers. A god can toggle it."
icon_state = "defensepylon"
/obj/structure/fluff/divine/shrine
name = "shrine"
desc = "A shrine dedicated to a deity."
icon_state = "shrine"
@@ -16,8 +16,8 @@
for contact from your creators. Estimated time of last contact: Deployment, 5x10^3 millennia ago.</b>"
/obj/effect/mob_spawn/human/seed_vault/special(mob/living/new_spawn)
var/plant_name = pick("Tomato", "Potato", "Brocolli", "Carrot", "Ambrosia", "Pumpkin", "Ivy", "Kudzu", "Bannana", "Moss", "Flower", "Bloom", "Root", "Bark", "Glowshroom", "Petal", "Leaf", \
"Venus", "Sprout","Cocao", "Strawberry", "Citrus", "Oak", "Cactus", "Pepper", "Juniper")
var/plant_name = pick("Tomato", "Potato", "Broccoli", "Carrot", "Ambrosia", "Pumpkin", "Ivy", "Kudzu", "Banana", "Moss", "Flower", "Bloom", "Root", "Bark", "Glowshroom", "Petal", "Leaf", \
"Venus", "Sprout","Cocoa", "Strawberry", "Citrus", "Oak", "Cactus", "Pepper", "Juniper")
new_spawn.real_name = plant_name
if(ishuman(new_spawn))
var/mob/living/carbon/human/H = new_spawn
@@ -37,7 +37,7 @@
icon_state = "large_egg"
mob_species = /datum/species/lizard/ashwalker
helmet = /obj/item/clothing/head/helmet/gladiator
uniform = /obj/item/clothing/under/gladiator
uniform = /obj/item/clothing/under/gladiator/ash_walker
roundstart = FALSE
death = FALSE
anchored = 0
@@ -101,15 +101,23 @@
death = FALSE
anchored = 0
density = 0
var/mob/living/owner = null //golem's owner if it has one
flavour_text = "<font size=3><b>Y</b></font><b>ou are a Free Golem. Your family worships <span class='danger'>The Liberator</span>. In his infinite and divine wisdom, he set your clan free to \
travel the stars with a single declaration: \"Yeah go do whatever.\" Though you are bound to the one who created you, it is customary in your society to repeat those same words to newborn \
golems, so that no golem may ever be forced to serve again.</b>"
/obj/effect/mob_spawn/human/golem/New()
/obj/effect/mob_spawn/human/golem/New(loc, datum/species/golem/species = null, has_owner = FALSE, mob/creator = null)
..()
if(species)
name += " ([initial(species.id)])"
mob_species = species
var/area/A = get_area(src)
if(A)
notify_ghosts("A golem shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK)
notify_ghosts("\A [initial(species.id)] golem shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK)
if(has_owner && creator)
flavour_text = "You are a golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. \
Serve [creator], and assist [creator.p_them()] in completing [creator.p_their()] goals at any cost."
owner = creator
/obj/effect/mob_spawn/human/golem/special(mob/living/new_spawn)
var/golem_surname = pick(golem_names)
@@ -118,7 +126,7 @@
if(prob(3))
golem_surname = pick(last_names)
var/datum/species/X = mob_species
var/datum/species/golem/X = mob_species
var/golem_forename = initial(X.id)
// The id of golem species is either their material "diamond","gold",
@@ -132,12 +140,18 @@
// also a tiny chance of being called "Plasma Meme"
// which is clearly a feature
new_spawn << "Build golem shells in the autolathe, and feed refined mineral sheets to the shells to bring them to life! You are generally a peaceful group unless provoked."
new_spawn << "[initial(X.info_text)]"
if(!owner)
new_spawn << "Build golem shells in the autolathe, and feed refined mineral sheets to the shells to bring them to life! You are generally a peaceful group unless provoked."
else
new_spawn.mind.store_memory("<b>Serve [owner.real_name], your creator.</b>")
new_spawn.mind.enslave_mind_to_creator(owner)
log_game("[key_name(new_spawn)] possessed a golem shell enslaved to [key_name(owner)].")
log_admin("[key_name(new_spawn)] possessed a golem shell enslaved to [key_name(owner)].")
if(ishuman(new_spawn))
var/mob/living/carbon/human/H = new_spawn
H.set_cloned_appearance()
/obj/effect/mob_spawn/human/golem/adamantine
name = "dust-caked golem shell"
desc = "A humanoid shape, empty, lifeless, and full of potential."
@@ -148,8 +162,8 @@
//Malfunctioning cryostasis sleepers: Spawns in makeshift shelters in lavaland. Ghosts become hermits with knowledge of how they got to where they are now.
/obj/effect/mob_spawn/human/hermit
name = "malfunctiong cryostasis sleeper"
desc = "A humming sleeper with a silhoutted occupant inside. Its stasis function is broken and it's likely being used as a bed."
name = "malfunctioning cryostasis sleeper"
desc = "A humming sleeper with a silhouetted occupant inside. Its stasis function is broken and it's likely being used as a bed."
mob_name = "a stranded hermit"
icon = 'icons/obj/lavaland/spawners.dmi'
icon_state = "cryostasis_sleeper"
@@ -237,3 +251,50 @@
/obj/effect/mob_spawn/human/prisoner_transport/Destroy()
new/obj/structure/fluff/empty_sleeper/syndicate(get_turf(src))
..()
//Space Hotel Staff
/obj/effect/mob_spawn/human/hotel_staff //not free antag u little shits
name = "staff sleeper"
desc = "A sleeper designed for long-term stasis between guest visits."
mob_name = "hotel staff member"
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "sleeper_s"
uniform = /obj/item/clothing/under/assistantformal
shoes = /obj/item/clothing/shoes/laceup
pocket1 = /obj/item/device/radio/off
back = /obj/item/weapon/storage/backpack
objectives = "Cater to visiting guests with your fellow staff. Do not leave your assigned hotel and always remember: The customer is always right!"
implants = list(/obj/item/weapon/implant/mindshield)
death = FALSE
roundstart = FALSE
random = TRUE
flavour_text = "You are a staff member of a top-of-the-line space hotel! Cater to guests and <font size=6><b>DON'T</b></font> leave the hotel, lest the manager fire you for\
dereliction of duty!"
/obj/effect/mob_spawn/human/hotel_staff/security
name = "hotel security sleeper"
mob_name = "hotel security memeber"
uniform = /obj/item/clothing/under/rank/security/blueshirt
shoes = /obj/item/clothing/shoes/jackboots
suit = /obj/item/clothing/suit/armor/vest/blueshirt
helmet = /obj/item/clothing/head/helmet/blueshirt
back = /obj/item/weapon/storage/backpack/security
belt = /obj/item/weapon/storage/belt/security/full
flavour_text = "You are a peacekeeper assigned to this hotel to protect the intrests of the company while keeping the peace between \
guests and the staff.Do <font size=6><b>NOT</b></font> leave the hotel, as that is grounds for contract termination."
objectives = "Do not leave your assigned hotel. Try and keep the peace between staff and guests, non-lethal force heavily advised if possible."
/obj/effect/mob_spawn/human/hotel_staff/Destroy()
new/obj/structure/fluff/empty_sleeper/syndicate(get_turf(src))
..()
/obj/effect/mob_spawn/derelict_drone
name = "dust-caked drone shell"
desc = "A long-forgotten drone shell."
flavour_text = "This station sure is a mess. It's time to get to work."
mob_name = "a derelict drone"
mob_type = /mob/living/simple_animal/drone
icon = 'icons/mob/drone.dmi'
icon_state = "drone_maint_hat"
death = FALSE
roundstart = FALSE
+88 -89
View File
@@ -1,9 +1,3 @@
#define GIRDER_NORMAL 0
#define GIRDER_REINF_STRUTS 1
#define GIRDER_REINF 2
#define GIRDER_DISPLACED 3
#define GIRDER_DISASSEMBLED 4
/obj/structure/girder
name = "girder"
icon_state = "girder"
@@ -13,6 +7,23 @@
var/state = GIRDER_NORMAL
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
var/can_displace = TRUE //If the girder can be moved around by wrenching it
obj_integrity = 200
max_integrity = 200
/obj/structure/girder/examine(mob/user)
. = ..()
switch(state)
if(GIRDER_REINF)
user << "<span class='notice'>The support struts are <b>screwed</b> in place.</span>"
if(GIRDER_REINF_STRUTS)
user << "<span class='notice'>The support struts are <i>unscrewed</i> and the inner <b>grille</b> is intact.</span>"
if(GIRDER_NORMAL)
if(can_displace)
user << "<span class='notice'>The bolts are <b>wrenched</b> in place.</span>"
if(GIRDER_DISPLACED)
user << "<span class='notice'>The bolts are <i>loosened</i>, but the <b>screws</b> are holding [src] together.</span>"
if(GIRDER_DISASSEMBLED)
user << "<span class='notice'>[src] is disassembled! You probably shouldn't be able to see this examine message.</span>"
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
@@ -21,7 +32,7 @@
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("<span class='warning'>[user] disassembles the girder.</span>", \
"<span class='notice'>You start to disassemble the girder...</span>", "You hear clanking and banging noises.")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(state != GIRDER_DISPLACED)
return
state = GIRDER_DISASSEMBLED
@@ -32,20 +43,28 @@
else if(state == GIRDER_REINF)
playsound(src.loc, W.usesound, 100, 1)
user << "<span class='notice'>You start unsecuring support struts...</span>"
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(state != GIRDER_REINF)
return
user << "<span class='notice'>You unsecure the support struts.</span>"
state = GIRDER_REINF_STRUTS
else if(state == GIRDER_REINF_STRUTS)
playsound(src.loc, W.usesound, 100, 1)
user << "<span class='notice'>You start securing support struts...</span>"
if(do_after(user, 40*W.toolspeed, target = src))
if(state != GIRDER_REINF_STRUTS)
return
user << "<span class='notice'>You secure the support struts.</span>"
state = GIRDER_REINF
else if(istype(W, /obj/item/weapon/wrench))
if(state == GIRDER_DISPLACED)
if(!istype(loc, /turf/open/floor))
if(!isfloorturf(loc))
user << "<span class='warning'>A floor must be present to secure the girder!</span>"
return
playsound(src.loc, W.usesound, 100, 1)
user << "<span class='notice'>You start securing the girder...</span>"
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
user << "<span class='notice'>You secure the girder.</span>"
var/obj/structure/girder/G = new (loc)
transfer_fingerprints_to(G)
@@ -53,7 +72,7 @@
else if(state == GIRDER_NORMAL && can_displace)
playsound(src.loc, W.usesound, 100, 1)
user << "<span class='notice'>You start unsecuring the girder...</span>"
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
user << "<span class='notice'>You unsecure the girder.</span>"
var/obj/structure/girder/displaced/D = new (loc)
transfer_fingerprints_to(D)
@@ -62,7 +81,7 @@
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
user << "<span class='notice'>You start slicing apart the girder...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 30, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
user << "<span class='notice'>You slice apart the girder.</span>"
var/obj/item/stack/sheet/metal/M = new (loc, 2)
M.add_fingerprint(user)
@@ -77,19 +96,19 @@
else if(istype(W, /obj/item/weapon/wirecutters) && state == GIRDER_REINF_STRUTS)
playsound(src.loc, W.usesound, 100, 1)
user << "<span class='notice'>You start removing support struts...</span>"
if(do_after(user, 40/W.toolspeed, target = src))
user << "<span class='notice'>You remove the support struts.</span>"
user << "<span class='notice'>You start removing the inner grille...</span>"
if(do_after(user, 40*W.toolspeed, target = src))
user << "<span class='notice'>You remove the inner grille.</span>"
new /obj/item/stack/sheet/plasteel(get_turf(src))
var/obj/structure/girder/G = new (loc)
transfer_fingerprints_to(G)
qdel(src)
else if(istype(W, /obj/item/stack))
if (istype(src.loc, /turf/closed/wall))
if(iswallturf(loc))
user << "<span class='warning'>There is already a wall present!</span>"
return
if (!istype(src.loc, /turf/open/floor))
if(!isfloorturf(src.loc))
user << "<span class='warning'>A floor must be present to build a false wall!</span>"
return
if (locate(/obj/structure/falsewall) in src.loc.contents)
@@ -99,12 +118,12 @@
if(istype(W,/obj/item/stack/rods))
var/obj/item/stack/rods/S = W
if(state == GIRDER_DISPLACED)
if(S.amount < 2)
if(S.get_amount() < 2)
user << "<span class='warning'>You need at least two rods to create a false wall!</span>"
return
user << "<span class='notice'>You start building a reinforced false wall...</span>"
if(do_after(user, 20, target = src))
if(!src.loc || !S || S.amount < 2)
if(!src.loc || !S || S.get_amount() < 2)
return
S.use(2)
user << "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>"
@@ -112,12 +131,12 @@
transfer_fingerprints_to(FW)
qdel(src)
else
if(S.amount < 5)
if(S.get_amount() < 5)
user << "<span class='warning'>You need at least five rods to add plating!</span>"
return
user << "<span class='notice'>You start adding plating...</span>"
if (do_after(user, 40, target = src))
if(!src.loc || !S || S.amount < 5)
if(!src.loc || !S || S.get_amount() < 5)
return
S.use(5)
user << "<span class='notice'>You add the plating.</span>"
@@ -163,12 +182,12 @@
if(istype(S,/obj/item/stack/sheet/plasteel))
if(state == GIRDER_DISPLACED)
if(S.amount < 2)
if(S.get_amount() < 2)
user << "<span class='warning'>You need at least two sheets to create a false wall!</span>"
return
user << "<span class='notice'>You start building a reinforced false wall...</span>"
if(do_after(user, 20, target = src))
if(!src.loc || !S || S.amount < 2)
if(!src.loc || !S || S.get_amount() < 2)
return
S.use(2)
user << "<span class='notice'>You create a reinforced false wall. Push on it to open or close the passage.</span>"
@@ -177,11 +196,11 @@
qdel(src)
else
if(state == GIRDER_REINF)
if(S.amount < 1)
if(S.get_amount() < 1)
return
user << "<span class='notice'>You start finalizing the reinforced wall...</span>"
if(do_after(user, 50, target = src))
if(!src.loc || !S || S.amount < 1)
if(!src.loc || !S || S.get_amount() < 1)
return
S.use(1)
user << "<span class='notice'>You fully reinforce the wall.</span>"
@@ -191,11 +210,11 @@
qdel(src)
return
else
if(S.amount < 1)
if(S.get_amount() < 1)
return
user << "<span class='notice'>You start reinforcing the girder...</span>"
if (do_after(user, 60, target = src))
if(!src.loc || !S || S.amount < 1)
if(!src.loc || !S || S.get_amount() < 1)
return
S.use(1)
user << "<span class='notice'>You reinforce the girder.</span>"
@@ -207,22 +226,25 @@
if(S.sheettype)
var/M = S.sheettype
if(state == GIRDER_DISPLACED)
if(S.amount < 2)
if(S.get_amount() < 2)
user << "<span class='warning'>You need at least two sheets to create a false wall!</span>"
return
S.use(2)
user << "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>"
var/F = text2path("/obj/structure/falsewall/[M]")
var/obj/structure/FW = new F (loc)
transfer_fingerprints_to(FW)
qdel(src)
if(do_after(user, 20, target = src))
if(!src.loc || !S || S.get_amount() < 2)
return
S.use(2)
user << "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>"
var/F = text2path("/obj/structure/falsewall/[M]")
var/obj/structure/FW = new F (loc)
transfer_fingerprints_to(FW)
qdel(src)
else
if(S.amount < 2)
if(S.get_amount() < 2)
user << "<span class='warning'>You need at least two sheets to add plating!</span>"
return
user << "<span class='notice'>You start adding plating...</span>"
if (do_after(user, 40, target = src))
if(!src.loc || !S || S.amount < 2)
if(!src.loc || !S || S.get_amount() < 2)
return
S.use(2)
user << "<span class='notice'>You add the plating.</span>"
@@ -261,24 +283,18 @@
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
/obj/structure/girder/blob_act(obj/effect/blob/B)
if(prob(40))
qdel(src)
/obj/structure/girder/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
new remains(loc)
qdel(src)
/obj/structure/girder/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
if(2)
if (prob(70))
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
new remains(loc)
qdel(src)
if(3)
if (prob(40))
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
new remains(loc)
qdel(src)
/obj/structure/girder/ratvar_act()
if(anchored)
new /obj/structure/destructible/clockwork/wall_gear(loc)
else
new /obj/structure/destructible/clockwork/wall_gear/displaced(loc)
qdel(src)
/obj/structure/girder/narsie_act()
if(prob(25))
@@ -291,27 +307,17 @@
anchored = 0
state = GIRDER_DISPLACED
girderpasschance = 25
obj_integrity = 120
max_integrity = 120
/obj/structure/girder/reinforced
name = "reinforced girder"
icon_state = "reinforced"
state = GIRDER_REINF
girderpasschance = 0
obj_integrity = 350
max_integrity = 350
/obj/structure/girder/reinforced/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
if(2)
if (prob(50))
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
new remains(loc)
qdel(src)
if(3)
if (prob(20))
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
new remains(loc)
qdel(src)
//////////////////////////////////////////// cult girder //////////////////////////////////////////////
@@ -336,7 +342,7 @@
if(WT.remove_fuel(0,user))
playsound(src.loc, W.usesound, 50, 1)
user << "<span class='notice'>You start slicing apart the girder...</span>"
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if( !WT.isOn() )
return
user << "<span class='notice'>You slice apart the girder.</span>"
@@ -348,7 +354,7 @@
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
user << "<span class='notice'>You start slicing apart the girder...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 30, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
user << "<span class='notice'>You slice apart the girder.</span>"
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
R.amount = 1
@@ -366,17 +372,18 @@
else if(istype(W, /obj/item/stack/sheet/runed_metal))
var/obj/item/stack/sheet/runed_metal/R = W
if(R.amount < 1)
if(R.get_amount() < 1)
user << "<span class='warning'>You need at least one sheet of runed metal to construct a runed wall!</span>"
return 0
user.visible_message("<span class='notice'>[user] begins laying runed metal on [src]...</span>", "<span class='notice'>You begin constructing a runed wall...</span>")
if(!do_after(user, 50, target = src))
return 0
user.visible_message("<span class='notice'>[user] plates [src] with runed metal.</span>", "<span class='notice'>You construct a runed wall.</span>")
R.use(1)
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/closed/wall/mineral/cult)
qdel(src)
if(do_after(user, 50, target = src))
if(R.get_amount() < 1 || !R)
return
user.visible_message("<span class='notice'>[user] plates [src] with runed metal.</span>", "<span class='notice'>You construct a runed wall.</span>")
R.use(1)
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/closed/wall/mineral/cult)
qdel(src)
else
return ..()
@@ -384,15 +391,7 @@
/obj/structure/girder/cult/narsie_act()
return
/obj/structure/girder/cult/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
if(2)
if(prob(30))
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
qdel(src)
if(3)
if(prob(5))
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
qdel(src)
/obj/structure/girder/cult/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
qdel(src)
+95 -150
View File
@@ -8,31 +8,21 @@
flags = CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = BELOW_OBJ_LAYER
var/health = 10
var/destroyed = 0
var/obj/item/stack/rods/stored
/obj/structure/grille/New()
..()
stored = new/obj/item/stack/rods(src)
stored.amount = 2
/obj/structure/grille/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
else
take_damage(rand(5,10), BRUTE, 0)
armor = list(melee = 50, bullet = 70, laser = 70, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 0, acid = 0)
obj_integrity = 50
max_integrity = 50
integrity_failure = 20
var/rods_type = /obj/item/stack/rods
var/rods_amount = 2
var/rods_broken = 1
var/grille_type = null
var/broken_type = /obj/structure/grille/broken
/obj/structure/grille/ratvar_act()
if(prob(20))
if(destroyed)
new /obj/structure/grille/ratvar/broken(src.loc)
else
new /obj/structure/grille/ratvar(src.loc)
qdel(src)
/obj/structure/grille/blob_act(obj/effect/blob/B)
if(broken)
new /obj/structure/grille/ratvar/broken(src.loc)
else
new /obj/structure/grille/ratvar(src.loc)
qdel(src)
/obj/structure/grille/Bumped(atom/user)
@@ -43,54 +33,29 @@
/obj/structure/grille/attack_paw(mob/user)
attack_hand(user)
/obj/structure/grille/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
shock(user, 70)
take_damage(5)
/obj/structure/grille/hulk_damage()
return 60
/obj/structure/grille/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == INTENT_HARM)
if(!shock(user, 70))
..(user, 1)
return 1
/obj/structure/grille/attack_hand(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
user.visible_message("<span class='warning'>[user] hits [src].</span>", \
"<span class='danger'>You hit [src].</span>", \
"<span class='italics'>You hear twisting metal.</span>")
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
user.visible_message("<span class='warning'>[user] hits [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
if(!shock(user, 70))
take_damage(rand(1,2))
take_damage(rand(5,10), BRUTE, "melee", 1)
/obj/structure/grille/attack_alien(mob/living/user)
user.do_attack_animation(src)
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
"<span class='danger'>You mangle [src].</span>", \
"<span class='italics'>You hear twisting metal.</span>")
user.visible_message("<span class='warning'>[user] mangles [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
if(!shock(user, 70))
take_damage(5)
take_damage(20, BRUTE, "melee", 1)
/obj/structure/grille/attack_slime(mob/living/simple_animal/slime/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(!user.is_adult)
return
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
"<span class='danger'>You smash against [src].</span>", \
"<span class='italics'>You hear twisting metal.</span>")
take_damage(rand(1,2))
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
return
M.do_attack_animation(src)
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
"<span class='danger'>You smash against [src].</span>", \
"<span class='italics'>You hear twisting metal.</span>")
take_damage(M.melee_damage_upper, M.melee_damage_type)
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
if(..())
take_damage(M.force * 0.5, M.damtype)
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
@@ -108,57 +73,33 @@
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
. = ..()
take_damage(Proj.damage*0.3, Proj.damage_type)
/obj/structure/grille/Deconstruct()
if(!loc) //if already qdel'd somehow, we do nothing
return
if(!(flags&NODECONSTRUCT))
transfer_fingerprints_to(stored)
var/turf/T = loc
stored.loc = T
..()
/obj/structure/grille/proc/Break()
icon_state = "broken[initial(icon_state)]"
density = 0
destroyed = 1
stored.amount = 1
if(!(flags&NODECONSTRUCT))
var/obj/item/stack/rods/newrods = new(loc)
transfer_fingerprints_to(newrods)
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
if(istype(W, /obj/item/weapon/wirecutters))
if(!shock(user, 100))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
Deconstruct()
else if((istype(W, /obj/item/weapon/screwdriver)) && (istype(loc, /turf) || anchored))
playsound(loc, W.usesound, 100, 1)
deconstruct()
else if((istype(W, /obj/item/weapon/screwdriver)) && (isturf(loc) || anchored))
if(!shock(user, 90))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
anchored = !anchored
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
return
else if(istype(W, /obj/item/stack/rods) && destroyed)
else if(istype(W, /obj/item/stack/rods) && broken)
var/obj/item/stack/rods/R = W
if(!shock(user, 90))
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
"<span class='notice'>You rebuild the broken grille.</span>")
health = 10
density = 1
destroyed = 0
icon_state = initial(icon_state)
new grille_type(src.loc)
R.use(1)
qdel(src)
return
//window placing begin
else if(istype(W, /obj/item/stack/sheet/rglass) || istype(W, /obj/item/stack/sheet/glass))
if (!destroyed)
if (!broken)
var/obj/item/stack/ST = W
if (ST.get_amount() < 2)
user << "<span class='warning'>You need at least two sheets of glass for that!</span>"
@@ -172,7 +113,7 @@
return
user << "<span class='notice'>You start placing the window...</span>"
if(do_after(user,20, target = src))
if(!src.loc || !anchored) //Grille destroyed or unanchored while waiting
if(!src.loc || !anchored) //Grille broken or unanchored while waiting
return
for(var/obj/structure/window/WINDOW in loc) //Another window already installed on grille
return
@@ -193,38 +134,39 @@
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
return ..()
/obj/structure/grille/attacked_by(obj/item/I, mob/living/user)
..()
take_damage(I.force * 0.3, I.damtype)
/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
/obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BURN)
if(sound_effect)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
if(BRUTE)
if(sound_effect)
if(damage)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
else
return
health -= damage
if(health <= 0)
if(!destroyed)
Break()
else
if(health <= -6)
Deconstruct()
if(damage_amount)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
/obj/structure/grille/deconstruct(disassembled = TRUE)
if(!loc) //if already qdel'd somehow, we do nothing
return
if(!(flags&NODECONSTRUCT))
var/obj/R = new rods_type(src.loc, rods_amount)
transfer_fingerprints_to(R)
qdel(src)
..()
/obj/structure/grille/obj_break()
if(!broken && !(flags & NODECONSTRUCT))
new broken_type(src.loc)
var/obj/R = new rods_type(src.loc, rods_broken)
transfer_fingerprints_to(R)
qdel(src)
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
/obj/structure/grille/proc/shock(mob/user, prb)
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
if(!anchored || broken) // anchored/broken grilles are never connected
return 0
if(!prob(prb))
return 0
@@ -233,7 +175,7 @@
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
if(electrocute_mob(user, C, src))
if(electrocute_mob(user, C, src, 1, TRUE))
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
@@ -243,52 +185,53 @@
return 0
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!destroyed)
if(!broken)
if(exposed_temperature > T0C + 1500)
take_damage(1)
take_damage(1, BURN, 0, 0)
..()
/obj/structure/grille/hitby(AM as mob|obj)
..()
var/tforce = 0
if(ismob(AM))
tforce = 5
else if(isobj(AM))
if(prob(50))
var/obj/item/I = AM
tforce = max(0, I.throwforce * 0.5)
else if(anchored && !destroyed)
if(isobj(AM))
if(prob(50) && anchored && !broken)
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src.loc, 'sound/magic/LightningShock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 3, C.powernet.avail * 0.08) //ZAP for 1/5000 of the amount of power, which is from 15-25 with 200000W
take_damage(tforce)
tesla_zap(src, 3, C.powernet.avail * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
return ..()
/obj/structure/grille/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
return 0
/obj/structure/grille/broken // Pre-broken grilles for map placement
density = 0
health = 0
destroyed = 1
/obj/structure/grille/broken/New()
..()
stored.amount = 1
icon_state = "brokengrille"
density = 0
obj_integrity = 20
broken = 1
rods_amount = 1
rods_broken = 0
grille_type = /obj/structure/grille
broken_type = null
/obj/structure/grille/ratvar
icon_state = "ratvargrille"
desc = "A strangely-shaped grille."
broken_type = /obj/structure/grille/ratvar/broken
/obj/structure/grille/ratvar/New()
..()
if(destroyed)
PoolOrNew(/obj/effect/overlay/temp/ratvar/grille/broken, get_turf(src))
change_construction_value(1)
if(broken)
new /obj/effect/overlay/temp/ratvar/grille/broken(get_turf(src))
else
PoolOrNew(/obj/effect/overlay/temp/ratvar/grille, get_turf(src))
PoolOrNew(/obj/effect/overlay/temp/ratvar/beam/grille, get_turf(src))
new /obj/effect/overlay/temp/ratvar/grille(get_turf(src))
new /obj/effect/overlay/temp/ratvar/beam/grille(get_turf(src))
/obj/structure/grille/ratvar/Destroy()
change_construction_value(-1)
return ..()
/obj/structure/grille/ratvar/narsie_act()
take_damage(rand(1, 3), BRUTE)
@@ -296,16 +239,18 @@
var/previouscolor = color
color = "#960000"
animate(src, color = previouscolor, time = 8)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
/obj/structure/grille/ratvar/ratvar_act()
return
/obj/structure/grille/ratvar/broken
density = 0
health = 0
destroyed = 1
/obj/structure/grille/ratvar/broken/New()
..()
stored.amount = 1
icon_state = "brokenratvargrille"
density = 0
obj_integrity = 20
broken = 1
rods_amount = 1
rods_broken = 0
grille_type = /obj/structure/grille/ratvar
broken_type = null
+25 -20
View File
@@ -12,17 +12,14 @@
var/open = 1
var/capacity = 4
/obj/structure/guncase/New()
/obj/structure/guncase/Initialize(mapload)
..()
update_icon()
/obj/structure/guncase/initialize()
..()
for(var/obj/item/I in loc.contents)
if(istype(I, gun_category))
I.loc = src
if(contents.len >= capacity)
break
if(mapload)
for(var/obj/item/I in loc.contents)
if(istype(I, gun_category))
I.loc = src
if(contents.len >= capacity)
break
update_icon()
/obj/structure/guncase/update_icon()
@@ -35,7 +32,7 @@
add_overlay("[icon_state]_door")
/obj/structure/guncase/attackby(obj/item/I, mob/user, params)
if(isrobot(user) || isalien(user))
if(iscyborg(user) || isalien(user))
return
if(istype(I, gun_category))
if(contents.len < capacity && open)
@@ -46,14 +43,14 @@
update_icon()
return
else if(user.a_intent != "harm")
else if(user.a_intent != INTENT_HARM)
open = !open
update_icon()
else
return ..()
/obj/structure/guncase/attack_hand(mob/user)
if(isrobot(user) || isalien(user))
if(iscyborg(user) || isalien(user))
return
if(contents.len && open)
ShowWindow(user)
@@ -76,25 +73,33 @@
/obj/structure/guncase/Topic(href, href_list)
if(href_list["retrieve"])
var/obj/item/O = locate(href_list["retrieve"])
var/obj/item/O = locate(href_list["retrieve"]) in contents
if(!O || !istype(O))
return
if(!usr.canUseTopic(src))
return
if(ishuman(usr))
if(!usr.get_active_hand())
usr.put_in_hands(O)
else
O.loc = get_turf(src)
if(!usr.put_in_hands(O))
O.forceMove(get_turf(src))
update_icon()
/obj/structure/guncase/handle_atom_del(atom/A)
update_icon()
/obj/structure/guncase/contents_explosion(severity, target)
for(var/atom/A in contents)
A.ex_act(severity++, target)
CHECK_TICK
/obj/structure/guncase/shotgun
name = "shotgun locker"
desc = "A locker that holds shotguns."
case_type = "shotgun"
gun_category = /obj/item/weapon/gun/projectile/shotgun
gun_category = /obj/item/weapon/gun/ballistic/shotgun
/obj/structure/guncase/ecase
name = "energy gun locker"
desc = "A locker that holds energy guns."
icon_state = "ecase"
case_type = "egun"
gun_category = /obj/item/weapon/gun/energy/gun
gun_category = /obj/item/weapon/gun/energy/e_gun
+1 -1
View File
@@ -15,7 +15,7 @@
smoke.start()
visible_message("<span class='boldannounce'>The [src] warps in!</span>")
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
addtimer(src, "warpbots", rand(10, 600))
addtimer(CALLBACK(src, .proc/warpbots), rand(10, 600))
/obj/structure/hivebot_beacon/proc/warpbots()
icon_state = "def_radar"
+110
View File
@@ -0,0 +1,110 @@
//holographic signs and barriers
/obj/structure/holosign
name = "holo sign"
icon = 'icons/effects/effects.dmi'
anchored = 1
obj_integrity = 1
max_integrity = 1
armor = list(melee = 0, bullet = 50, laser = 50, energy = 50, bomb = 0, bio = 0, rad = 0, fire = 20, acid = 20)
var/obj/item/weapon/holosign_creator/projector
/obj/structure/holosign/New(loc, source_projector)
if(source_projector)
projector = source_projector
projector.signs += src
..()
/obj/structure/holosign/Destroy()
if(projector)
projector.signs -= src
projector = null
return ..()
/obj/structure/holosign/attack_hand(mob/living/user)
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
user.changeNext_move(CLICK_CD_MELEE)
take_damage(5 , BRUTE, "melee", 1)
/obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
if(BURN)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
/obj/structure/holosign/wetsign
name = "wet floor sign"
desc = "The words flicker as if they mean nothing."
icon = 'icons/effects/effects.dmi'
icon_state = "holosign"
/obj/structure/holosign/barrier
name = "holo barrier"
desc = "A short holographic barrier which can only be passed by walking."
icon_state = "holosign_sec"
pass_flags = LETPASSTHROW
density = 1
obj_integrity = 20
max_integrity = 20
var/allow_walk = 1 //can we pass through it on walk intent
/obj/structure/holosign/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(!density)
return 1
if(air_group || (height==0))
return 1
if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE))
return 1
if(iscarbon(mover))
var/mob/living/carbon/C = mover
if(allow_walk && C.m_intent == MOVE_INTENT_WALK)
return 1
/obj/structure/holosign/barrier/engineering
icon_state = "holosign_engi"
/obj/structure/holosign/barrier/cyborg
name = "Energy Field"
desc = "A fragile energy field that blocks movement. Excels at blocking lethal projectiles."
density = 1
obj_integrity = 10
max_integrity = 10
allow_walk = 0
/obj/structure/holosign/barrier/cyborg/bullet_act(obj/item/projectile/P)
take_damage((P.damage / 5) , BRUTE, "melee", 1) //Doesn't really matter what damage flag it is.
if(istype(P, /obj/item/projectile/energy/electrode))
take_damage(10, BRUTE, "melee", 1) //Tasers aren't harmful.
if(istype(P, /obj/item/projectile/beam/disabler))
take_damage(5, BRUTE, "melee", 1) //Disablers aren't harmful.
/obj/structure/holosign/barrier/cyborg/hacked
name = "Charged Energy Field"
desc = "A powerful energy field that blocks movement. Energy arcs off it"
obj_integrity = 20
max_integrity = 20
var/shockcd = 0
/obj/structure/holosign/barrier/cyborg/hacked/bullet_act(obj/item/projectile/P)
take_damage(P.damage, BRUTE, "melee", 1) //Yeah no this doesn't get projectile resistance.
/obj/structure/holosign/barrier/cyborg/hacked/proc/cooldown()
shockcd = FALSE
/obj/structure/holosign/barrier/cyborg/hacked/attack_hand(mob/living/user)
if(!shockcd)
if(ismob(user))
var/mob/living/M = user
M.electrocute_act(15,"Energy Barrier", safety=1)
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
/obj/structure/holosign/barrier/cyborg/hacked/Bumped(atom/user)
if(!shockcd)
if(ismob(user))
var/mob/living/M = user
M.electrocute_act(15,"Energy Barrier", safety=1)
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
+3 -2
View File
@@ -5,7 +5,7 @@
icon_state = "cart"
anchored = 0
density = 1
flags = OPENCONTAINER
container_type = OPENCONTAINER
//copypaste sorry
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
var/obj/item/weapon/storage/bag/trash/mybag = null
@@ -18,6 +18,7 @@
/obj/structure/janitorialcart/New()
create_reagents(100)
..()
/obj/structure/janitorialcart/proc/wet_mop(obj/item/weapon/mop, mob/user)
@@ -82,7 +83,7 @@
mybag.attackby(I, user)
else if(istype(I, /obj/item/weapon/crowbar))
user.visible_message("[user] begins to empty the contents of [src].", "<span class='notice'>You begin to empty the contents of [src]...</span>")
if(do_after(user, 30/I.toolspeed, target = src))
if(do_after(user, 30*I.toolspeed, target = src))
usr << "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>"
reagents.reaction(src.loc)
src.reagents.clear_reagents()
+40 -9
View File
@@ -1,4 +1,5 @@
//////Kitchen Spike
#define VIABLE_MOB_CHECK(X) (isliving(X) && !issilicon(X) && !isbot(X))
/obj/structure/kitchenspike_frame
name = "meatspike frame"
@@ -7,6 +8,8 @@
desc = "The frame of a meat spike."
density = 1
anchored = 0
obj_integrity = 200
max_integrity = 200
/obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
@@ -17,9 +20,25 @@
if(R.get_amount() >= 4)
R.use(4)
user << "<span class='notice'>You add spikes to the frame.</span>"
var/obj/F = new /obj/structure/kitchenspike(src.loc,)
var/obj/F = new /obj/structure/kitchenspike(src.loc)
transfer_fingerprints_to(F)
qdel(src)
else if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(!WT.remove_fuel(0, user))
return
user << "<span class='notice'>You begin cutting \the [src] apart...</span>"
playsound(src.loc, WT.usesound, 40, 1)
if(do_after(user, 40*WT.toolspeed, 1, target = src))
if(!WT.isOn())
return
playsound(src.loc, WT.usesound, 50, 1)
visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
"<span class='italics'>You hear welding.</span>")
new /obj/item/stack/sheet/metal(src.loc, 4)
qdel(src)
return
else
return ..()
@@ -32,6 +51,8 @@
anchored = 1
buckle_lying = 0
can_buckle = 1
obj_integrity = 250
max_integrity = 250
/obj/structure/kitchenspike/attack_paw(mob/user)
@@ -41,20 +62,17 @@
/obj/structure/kitchenspike/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/crowbar))
if(!has_buckled_mobs())
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
if(do_after(user, 20/I.toolspeed, target = src))
playsound(loc, I.usesound, 100, 1)
if(do_after(user, 20*I.toolspeed, target = src))
user << "<span class='notice'>You pry the spikes out of the frame.</span>"
new /obj/item/stack/rods(loc, 4)
var/obj/F = new /obj/structure/kitchenspike_frame(src.loc,)
transfer_fingerprints_to(F)
qdel(src)
deconstruct(TRUE)
else
user << "<span class='notice'>You can't do that while something's on the spike!</span>"
else
return ..()
/obj/structure/kitchenspike/attack_hand(mob/user)
if(isliving(user.pulling) && user.a_intent == "grab" && !has_buckled_mobs())
if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs())
var/mob/living/L = user.pulling
if(do_mob(user, src, 120))
if(has_buckled_mobs()) //to prevent spam/queing up attacks
@@ -67,13 +85,15 @@
L.emote("scream")
L.add_splatter_floor()
L.adjustBruteLoss(30)
L.buckled = src
L.setDir(2)
buckle_mob(L, force=1)
var/matrix/m180 = matrix(L.transform)
m180.Turn(180)
animate(L, transform = m180, time = 3)
L.pixel_y = L.get_standard_pixel_y_offset(180)
else if (has_buckled_mobs())
for(var/mob/living/L in buckled_mobs)
user_unbuckle_mob(L, user)
else
..()
@@ -118,3 +138,14 @@
unbuckle_mob(M,force=1)
M.emote("scream")
M.AdjustWeakened(10)
/obj/structure/kitchenspike/deconstruct(disassembled = TRUE)
if(disassembled)
var/obj/F = new /obj/structure/kitchenspike_frame(src.loc)
transfer_fingerprints_to(F)
else
new /obj/item/stack/sheet/metal(src.loc, 4)
new /obj/item/stack/rods(loc, 4)
qdel(src)
#undef VIABLE_MOB_CHECK
+2
View File
@@ -66,6 +66,8 @@
go_up(user,is_ghost)
else if(down)
go_down(user,is_ghost)
else
user << "<span class='warning'>[src] doesn't seem to lead anywhere!</span>"
if(!is_ghost)
add_fingerprint(user)
+61 -24
View File
@@ -5,6 +5,9 @@
icon_state = "lattice"
density = 0
anchored = 1
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 50)
obj_integrity = 50
max_integrity = 50
layer = LATTICE_LAYER //under pipes
var/obj/item/stack/rods/stored
canSmoothWith = list(/obj/structure/lattice,
@@ -16,8 +19,6 @@
/obj/structure/lattice/New()
..()
if(!(istype(src.loc, /turf/open/space)))
qdel(src)
for(var/obj/structure/lattice/LAT in src.loc)
if(LAT != src)
qdel(LAT)
@@ -28,40 +29,57 @@
stored = null
return ..()
/obj/structure/lattice/blob_act(obj/effect/blob/B)
/obj/structure/lattice/blob_act(obj/structure/blob/B)
return
/obj/structure/lattice/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
return
if(2)
qdel(src)
return
if(3)
return
else
return
/obj/structure/lattice/ratvar_act()
if(IsEven(x + y))
new/obj/structure/lattice/clockwork(loc)
else
new/obj/structure/lattice/clockwork/large(loc)
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = C
if(WT.remove_fuel(0, user))
user << "<span class='notice'>Slicing [name] joints ...</span>"
Deconstruct()
deconstruct()
else
var/turf/T = get_turf(src)
return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc)
/obj/structure/lattice/Deconstruct()
stored.loc = get_turf(src)
stored = null
..()
/obj/structure/lattice/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
stored.forceMove(get_turf(src))
stored = null
qdel(src)
/obj/structure/lattice/singularity_pull(S, current_size)
if(current_size >= STAGE_FOUR)
Deconstruct()
deconstruct()
/obj/structure/lattice/clockwork
name = "clockwork lattice"
desc = "A lightweight support lattice. These hold the Justicar's station together."
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
/obj/structure/lattice/clockwork/New()
..()
ratvar_act()
/obj/structure/lattice/clockwork/ratvar_act()
if(IsOdd(x+y))
new/obj/structure/lattice/clockwork/large(loc)
/obj/structure/lattice/clockwork/large/New()
..()
icon = 'icons/obj/smooth_structures/lattice_clockwork_large.dmi'
pixel_x = -9
pixel_y = -9
/obj/structure/lattice/clockwork/large/ratvar_act()
if(IsEven(x + y))
new/obj/structure/lattice/clockwork(loc)
/obj/structure/lattice/catwalk
name = "catwalk"
@@ -71,15 +89,34 @@
smooth = SMOOTH_TRUE
canSmoothWith = null
/obj/structure/lattice/catwalk/New()
..()
stored.amount++
stored.update_icon()
/obj/structure/lattice/catwalk/ratvar_act()
new/obj/structure/lattice/catwalk/clockwork(loc)
/obj/structure/lattice/catwalk/Move()
var/turf/T = loc
for(var/obj/structure/cable/C in T)
C.Deconstruct()
C.deconstruct()
..()
/obj/structure/lattice/catwalk/Deconstruct()
/obj/structure/lattice/catwalk/deconstruct()
var/turf/T = loc
for(var/obj/structure/cable/C in T)
C.Deconstruct()
C.deconstruct()
..()
/obj/structure/lattice/catwalk/clockwork
name = "clockwork catwalk"
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
/obj/structure/lattice/catwalk/clockwork/New()
..()
new /obj/effect/overlay/temp/ratvar/floor/catwalk(loc)
new /obj/effect/overlay/temp/ratvar/beam/catwalk(loc)
/obj/structure/lattice/catwalk/clockwork/ratvar_act()
return
+68 -103
View File
@@ -2,7 +2,7 @@
//machineryness
/obj/structure/mineral_door
name = "mineral door"
name = "metal door"
density = 1
anchored = 1
opacity = 1
@@ -10,21 +10,23 @@
icon = 'icons/obj/doors/mineral_doors.dmi'
icon_state = "metal"
var/mineralType = "metal"
var/initial_state
var/state = 0 //closed, 1 == open
var/isSwitchingStates = 0
var/close_delay = -1 //-1 if does not auto close.
var/hardness = 1
var/oreAmount = 7
obj_integrity = 200
max_integrity = 200
armor = list(melee = 10, bullet = 0, laser = 0, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 50, acid = 50)
var/sheetType = /obj/item/stack/sheet/metal
var/sheetAmount = 7
var/openSound = 'sound/effects/stonedoor_openclose.ogg'
var/closeSound = 'sound/effects/stonedoor_openclose.ogg'
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/structure/mineral_door/New(location)
..()
icon_state = mineralType
name = "[mineralType] door"
initial_state = icon_state
air_update_turf(1)
return
/obj/structure/mineral_door/Destroy()
density = 0
@@ -40,12 +42,11 @@
..()
if(!state)
return TryToSwitchState(user)
return
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
if(isAI(user)) //so the AI can't open it
return
else if(isrobot(user)) //but cyborgs can
else if(iscyborg(user)) //but cyborgs can
if(get_dist(user,src) <= 1) //not remotely though
return TryToSwitchState(user)
@@ -60,14 +61,13 @@
return !opacity
return !density
/obj/structure/mineral_door/CanAtmosPass()
return !density
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(isSwitchingStates)
return
if(isliving(user))
var/mob/living/M = user
if(world.time - M.last_bumped <= 60) return //NOTE do we really need that?
if(world.time - M.last_bumped <= 60)
return //NOTE do we really need that?
if(M.client)
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -87,7 +87,7 @@
/obj/structure/mineral_door/proc/Open()
isSwitchingStates = 1
playsound(loc, openSound, 100, 1)
flick("[mineralType]opening",src)
flick("[initial_state]opening",src)
sleep(10)
density = 0
opacity = 0
@@ -97,17 +97,17 @@
isSwitchingStates = 0
if(close_delay != -1)
spawn(close_delay)
if(!isSwitchingStates && state == 1)
Close()
addtimer(CALLBACK(src, .proc/Close), close_delay)
/obj/structure/mineral_door/proc/Close()
if(isSwitchingStates || state != 1)
return
var/turf/T = get_turf(src)
for(var/mob/living/L in T)
return
isSwitchingStates = 1
playsound(loc, closeSound, 100, 1)
flick("[mineralType]closing",src)
flick("[initial_state]closing",src)
sleep(10)
density = 1
opacity = 1
@@ -118,96 +118,61 @@
/obj/structure/mineral_door/update_icon()
if(state)
icon_state = "[mineralType]open"
icon_state = "[initial_state]open"
else
icon_state = mineralType
icon_state = initial_state
/obj/structure/mineral_door/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
user << "<span class='notice'>You start digging the [name]...</span>"
if(do_after(user,digTool.digspeed*hardness, target = src) && src)
if(do_after(user,digTool.digspeed*(1+round(max_integrity*0.01)), target = src) && src)
user << "<span class='notice'>You finish digging.</span>"
Dismantle()
else if(user.a_intent != "harm")
deconstruct(TRUE)
else if(user.a_intent != INTENT_HARM)
attack_hand(user)
else
return ..()
/obj/structure/mineral_door/attacked_by(obj/item/I, mob/user)
..()
if(I.damtype != STAMINA)
hardness -= I.force/100
CheckHardness()
/obj/structure/mineral_door/bullet_act(obj/item/projectile/Proj)
hardness -= Proj.damage
..()
CheckHardness()
return
/obj/structure/mineral_door/proc/CheckHardness()
if(hardness <= 0)
Dismantle(1)
/obj/structure/mineral_door/proc/Dismantle(devastated = 0)
if(!devastated)
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
/obj/structure/mineral_door/deconstruct(disassembled = TRUE)
var/turf/T = get_turf(src)
if(disassembled)
new sheetType(T, sheetAmount)
else
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
new sheetType(T, max(sheetAmount - 2, 1))
qdel(src)
/obj/structure/mineral_door/ex_act(severity = 1)
switch(severity)
if(1)
Dismantle(1)
if(2)
if(prob(20))
Dismantle(1)
else
hardness--
CheckHardness()
if(3)
hardness -= 0.1
CheckHardness()
return
/obj/structure/mineral_door/iron
mineralType = "metal"
hardness = 3
name = "iron door"
obj_integrity = 300
max_integrity = 300
/obj/structure/mineral_door/silver
mineralType = "silver"
hardness = 3
name = "silver door"
icon_state = "silver"
sheetType = /obj/item/stack/sheet/mineral/silver
obj_integrity = 300
max_integrity = 300
/obj/structure/mineral_door/gold
mineralType = "gold"
name = "gold door"
icon_state = "gold"
sheetType = /obj/item/stack/sheet/mineral/gold
/obj/structure/mineral_door/uranium
mineralType = "uranium"
hardness = 3
name = "uranium door"
icon_state = "uranium"
sheetType = /obj/item/stack/sheet/mineral/uranium
obj_integrity = 300
max_integrity = 300
luminosity = 2
/obj/structure/mineral_door/sandstone
mineralType = "sandstone"
hardness = 0.5
name = "sandstone door"
icon_state = "sandstone"
sheetType = /obj/item/stack/sheet/mineral/sandstone
obj_integrity = 100
max_integrity = 100
/obj/structure/mineral_door/transparent
opacity = 0
@@ -217,39 +182,39 @@
opacity = 0
/obj/structure/mineral_door/transparent/plasma
mineralType = "plasma"
name = "plasma door"
icon_state = "plasma"
sheetType = /obj/item/stack/sheet/mineral/plasma
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/weapon/W, mob/user, params)
if(W.is_hot())
message_admins("Plasma mineral door ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma mineral door ignited by [key_name(user)] in ([x],[y],[z])")
TemperatureAct(100)
TemperatureAct()
else
return ..()
/obj/structure/mineral_door/transparent/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
TemperatureAct()
/obj/structure/mineral_door/transparent/plasma/proc/TemperatureAct(temperature)
/obj/structure/mineral_door/transparent/plasma/proc/TemperatureAct()
atmos_spawn_air("plasma=500;TEMP=1000")
hardness = 0
CheckHardness()
deconstruct(FALSE)
/obj/structure/mineral_door/transparent/diamond
mineralType = "diamond"
hardness = 10
name = "diamond door"
icon_state = "diamond"
sheetType = /obj/item/stack/sheet/mineral/diamond
obj_integrity = 1000
max_integrity = 1000
/obj/structure/mineral_door/wood
mineralType = "wood"
hardness = 1
name = "wood door"
icon_state = "wood"
openSound = 'sound/effects/doorcreaky.ogg'
closeSound = 'sound/effects/doorcreaky.ogg'
burn_state = FLAMMABLE
burntime = 30
/obj/structure/mineral_door/wood/Dismantle(devastated = 0)
if(!devastated)
for(var/i = 1, i <= oreAmount, i++)
new/obj/item/stack/sheet/mineral/wood(get_turf(src))
qdel(src)
sheetType = /obj/item/stack/sheet/mineral/wood
resistance_flags = FLAMMABLE
obj_integrity = 200
max_integrity = 200
+27 -58
View File
@@ -6,11 +6,13 @@
icon_state = "mirror"
density = 0
anchored = 1
var/shattered = 0
obj_integrity = 200
max_integrity = 200
integrity_failure = 100
/obj/structure/mirror/attack_hand(mob/user)
if(shattered || !Adjacent(user))
if(broken || !Adjacent(user))
return
if(ishuman(user))
@@ -40,82 +42,49 @@
H.update_hair()
/obj/structure/mirror/examine_status(mob/user)
if(broken)
return // no message spam
..()
/obj/structure/mirror/proc/shatter()
icon_state = "mirror_broke"
playsound(src, "shatter", 70, 1)
desc = "Oh no, seven years of bad luck!"
shattered = 1
/obj/structure/mirror/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type, 0)
/obj/structure/mirror/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
icon_state = "mirror_broke"
playsound(src, "shatter", 70, 1)
desc = "Oh no, seven years of bad luck!"
broken = 1
/obj/structure/mirror/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!disassembled)
new /obj/item/weapon/shard( src.loc )
qdel(src)
/obj/structure/mirror/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
var/obj/item/weapon/weldingtool/WT = I
if(shattered)
if(broken)
user.changeNext_move(CLICK_CD_MELEE)
if(WT.remove_fuel(0, user))
user << "<span class='notice'>You begin repairing [src]...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 10/I.toolspeed, target = src))
if(do_after(user, 10*I.toolspeed, target = src))
if(!user || !WT || !WT.isOn())
return
user << "<span class='notice'>You repair [src].</span>"
shattered = 0
broken = 0
icon_state = initial(icon_state)
desc = initial(desc)
else
return ..()
/obj/structure/mirror/attacked_by(obj/item/I, mob/living/user)
..()
take_damage(I.force, I.damtype)
/obj/structure/mirror/ex_act(severity)
switch(severity)
if(1)
qdel(src)
if(2)
if(prob(50))
qdel(src)
else
take_damage(5)
if(3)
if(prob(75))
take_damage(5)
/obj/structure/mirror/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
if(BURN)
else
return
if(!shattered)
if(damage)
shatter()
else if(sound_effect)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
/obj/structure/mirror/proc/attack_generic(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
take_damage(5)
/obj/structure/mirror/attack_alien(mob/living/user)
attack_generic(user)
/obj/structure/mirror/attack_animal(mob/living/simple_animal/M)
if(M.melee_damage_upper <= 0)
return
attack_generic(M)
/obj/structure/mirror/attack_slime(mob/living/user)
attack_generic(user)
/obj/structure/mirror/magic
name = "magic mirror"
@@ -186,7 +155,7 @@
H.skin_tone = new_s_tone
H.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
if(MUTCOLORS in H.dna.species.specflags)
if(MUTCOLORS in H.dna.species.species_traits)
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change") as color|null
if(new_mutantcolor)
var/temp_hsv = RGBtoHSV(new_mutantcolor)
+2 -1
View File
@@ -4,12 +4,13 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "mopbucket"
density = 1
flags = OPENCONTAINER
container_type = OPENCONTAINER
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
/obj/structure/mopbucket/New()
create_reagents(100)
..()
/obj/structure/mopbucket/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/mop))
+36 -9
View File
@@ -17,6 +17,8 @@
icon_state = "morgue1"
density = 1
anchored = 1
obj_integrity = 400
max_integrity = 400
var/obj/structure/tray/connected = null
var/locked = 0
@@ -38,9 +40,6 @@
/obj/structure/bodycontainer/update_icon()
return
/obj/structure/bodycontainer/alter_health()
return src.loc
/obj/structure/bodycontainer/relaymove(mob/user)
if(user.stat || !isturf(loc))
return
@@ -62,11 +61,16 @@
close()
add_fingerprint(user)
/obj/structure/bodycontainer/attack_robot(mob/user)
if(!user.Adjacent(src))
return
return attack_hand(user)
/obj/structure/bodycontainer/attackby(obj/P, mob/user, params)
add_fingerprint(user)
if(istype(P, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
if (user.get_active_hand() != P)
if (user.get_active_held_item() != P)
return
if ((!in_range(src, usr) && src.loc != user))
return
@@ -77,9 +81,17 @@
else
return ..()
/obj/structure/bodycontainer/container_resist()
/obj/structure/bodycontainer/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 5)
qdel(src)
/obj/structure/bodycontainer/container_resist(mob/living/user)
open()
/obj/structure/bodycontainer/relay_container_resist(mob/living/user, obj/O)
user << "<span class='notice'>You slam yourself into the side of [O].</span>"
container_resist(user)
/obj/structure/bodycontainer/proc/open()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
var/turf/T = get_step(src, opendir)
@@ -124,10 +136,14 @@
icon_state = "morgue3"
return
for(var/mob/living/M in compiled)
if(M.client)
if(M.client && !M.suiciding)
icon_state = "morgue4" // Cloneable
break
/obj/item/weapon/paper/morguereminder
name = "morgue memo"
info = "<font size='2'>Since this station's medbay never seems to fail to be staffed by the mindless monkeys meant for genetics experiments, I'm leaving a reminder here for anyone handling the pile of cadavers the quacks are sure to leave.</font><BR><BR><font size='4'><font color=red>Red lights mean there's a plain ol' dead body inside.</font><BR><BR><font color=orange>Yellow lights mean there's non-body objects inside.</font><BR><font size='2'>Probably stuff pried off a corpse someone grabbed, or if you're lucky it's stashed booze.</font><BR><BR><font color=green>Green lights mean the morgue system detects the body may be able to be cloned.</font></font><BR><font size='2'>I don't know how that works, but keep it away from the kitchen and go yell at the geneticists.</font><BR><BR>- Centcom medical inspector"
/*
* Crematorium
*/
@@ -139,6 +155,10 @@ var/global/list/crematoriums = new/list()
opendir = SOUTH
var/id = 1
/obj/structure/bodycontainer/crematorium/attack_robot(mob/user) //Borgs can't use crematoriums without help
user << "<span class='warning'>[src] is locked against you.</span>"
return
/obj/structure/bodycontainer/crematorium/Destroy()
crematoriums.Remove(src)
return ..()
@@ -198,9 +218,10 @@ var/global/list/crematoriums = new/list()
new /obj/effect/decal/cleanable/ash(src)
sleep(30)
locked = 0
update_icon()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people
if(!qdeleted(src))
locked = 0
update_icon()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people
/*
@@ -215,6 +236,8 @@ var/global/list/crematoriums = new/list()
var/obj/structure/bodycontainer/connected = null
anchored = 1
pass_flags = LETPASSTHROW
obj_integrity = 350
max_integrity = 350
/obj/structure/tray/Destroy()
if(connected)
@@ -223,6 +246,10 @@ var/global/list/crematoriums = new/list()
connected = null
return ..()
/obj/structure/tray/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 2)
qdel(src)
/obj/structure/tray/attack_paw(mob/user)
return src.attack_hand(user)
+9 -9
View File
@@ -1,4 +1,4 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/datum/song
var/name = "Untitled"
@@ -113,8 +113,6 @@
else
sleep(tempo)
repeat--
if(repeat >= 0) // don't show the last -1 repeat
updateDialog(user)
playing = 0
repeat = 0
updateDialog(user)
@@ -308,6 +306,7 @@
/obj/structure/piano/New()
..()
song = new("piano", src)
if(prob(50))
@@ -324,9 +323,10 @@
song = null
return ..()
/obj/structure/piano/initialize()
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
/obj/structure/piano/Initialize(mapload)
..()
if(mapload)
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
/obj/structure/piano/attack_hand(mob/user)
if(!user.IsAdvancedToolUser())
@@ -347,18 +347,18 @@
/obj/structure/piano/attackby(obj/item/O, mob/user, params)
if (istype(O, /obj/item/weapon/wrench))
if (!anchored && !isinspace())
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, O.usesound, 50, 1)
user << "<span class='notice'> You begin to tighten \the [src] to the floor...</span>"
if (do_after(user, 20/O.toolspeed, target = src))
if (do_after(user, 20*O.toolspeed, target = src))
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'>You tighten \the [src]'s casters. Now it can be played again.</span>", \
"<span class='italics'>You hear ratchet.</span>")
anchored = 1
else if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, O.usesound, 50, 1)
user << "<span class='notice'> You begin to loosen \the [src]'s casters...</span>"
if (do_after(user, 40/O.toolspeed, target = src))
if (do_after(user, 40*O.toolspeed, target = src))
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'>You loosen \the [src]. Now it can be pulled somewhere else.</span>", \
+83 -37
View File
@@ -5,9 +5,16 @@
icon_state = "nboard00"
density = 0
anchored = 1
obj_integrity = 150
max_integrity = 150
var/notices = 0
/obj/structure/noticeboard/initialize()
/obj/structure/noticeboard/Initialize(mapload)
..()
if(!mapload)
return
for(var/obj/item/I in loc)
if(notices > 4) break
if(istype(I, /obj/item/weapon/paper))
@@ -17,66 +24,105 @@
//attaching papers!!
/obj/structure/noticeboard/attackby(obj/item/weapon/O, mob/user, params)
if(istype(O, /obj/item/weapon/paper))
if(istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo))
if(!allowed(user))
user << "<span class='info'>You are not authorized to add notices</span>"
return
if(notices < 5)
if(!user.drop_item())
if(!user.transferItemToLoc(O, src))
return
O.add_fingerprint(user)
add_fingerprint(user)
O.loc = src
notices++
icon_state = "nboard0[notices]" //update sprite
user << "<span class='notice'>You pin the paper to the noticeboard.</span>"
icon_state = "nboard0[notices]"
user << "<span class='notice'>You pin the [O] to the noticeboard.</span>"
else
user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>"
user << "<span class='notice'>The notice board is full</span>"
else
return ..()
/obj/structure/noticeboard/attack_hand(mob/user)
var/dat = "<B>Noticeboard</B><BR>"
for(var/obj/item/weapon/paper/P in src)
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> <A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A><BR>"
var/auth = allowed(user)
var/dat = "<B>[name]</B><BR>"
for(var/obj/item/P in src)
if(istype(P, /obj/item/weapon/paper))
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> [auth ? "<A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A>" : ""]<BR>"
else
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> [auth ? "<A href='?src=\ref[src];remove=\ref[P]'>Remove</A>" : ""]<BR>"
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
onclose(user, "noticeboard")
/obj/structure/noticeboard/Topic(href, href_list)
..()
usr.set_machine(src)
if(href_list["remove"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return
var/obj/item/P = locate(href_list["remove"])
if((P && P.loc == src))
P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck
P.add_fingerprint(usr)
add_fingerprint(usr)
var/obj/item/I = locate(href_list["remove"]) in contents
if(istype(I) && I.loc == src)
I.loc = usr.loc
usr.put_in_hands(I)
notices--
icon_state = "nboard0[notices]"
if(href_list["write"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return
var/obj/item/P = locate(href_list["write"])
if((P && P.loc == src)) //ifthe paper's on the board
if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
var/obj/item/P = locate(href_list["write"]) in contents
if(istype(P) && P.loc == src)
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/weapon/pen)
if(I)
add_fingerprint(usr)
P.attackby(usr.r_hand, usr) //then do ittttt
P.attackby(I, usr)
else
if(istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
add_fingerprint(usr)
P.attackby(usr.l_hand, usr)
else
usr << "<span class='notice'>You'll need something to write with!</span>"
usr << "<span class='notice'>You'll need something to write with!</span>"
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if((P && P.loc == src))
if(!( istype(usr, /mob/living/carbon/human) ))
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[stars(P.info)]</TT></BODY></HTML>", "window=[P.name]")
onclose(usr, "[P.name]")
else
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[P.info]</TT></BODY></HTML>", "window=[P.name]")
onclose(usr, "[P.name]")
return
var/obj/item/I = locate(href_list["read"]) in contents
if(istype(I) && I.loc == src)
usr.examinate(I)
/obj/structure/noticeboard/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal (loc, 1)
qdel(src)
// Notice boards for the heads of staff (plus the qm)
/obj/structure/noticeboard/captain
name = "Captain's Notice Board"
desc = "Important notices from the Captain."
req_access = list(access_captain)
/obj/structure/noticeboard/hop
name = "Head of Personnel's Notice Board"
desc = "Important notices from the Head of Personnel."
req_access = list(access_hop)
/obj/structure/noticeboard/ce
name = "Chief Engineer's Notice Board"
desc = "Important notices from the Chief Engineer."
req_access = list(access_ce)
/obj/structure/noticeboard/hos
name = "Head of Security's Notice Board"
desc = "Important notices from the Head of Security."
req_access = list(access_hos)
/obj/structure/noticeboard/cmo
name = "Chief Medical Officer's Notice Board"
desc = "Important notices from the Chief Medical Officer."
req_access = list(access_cmo)
/obj/structure/noticeboard/rd
name = "Research Director's Notice Board"
desc = "Important notices from the Research Director."
req_access = list(access_rd)
/obj/structure/noticeboard/qm
name = "Quartermaster's Notice Board"
desc = "Important notices from the Quartermaster."
req_access = list(access_qm)
/obj/structure/noticeboard/staff
name = "Staff Notice Board"
desc = "Important notices from the heads of staff."
req_access = list(access_heads)
+22 -31
View File
@@ -1,15 +1,16 @@
/obj/structure/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY
/obj/structure/plasticflaps
name = "plastic flaps"
desc = "Definitely can't get past those. No way."
icon = 'icons/obj/stationobjs.dmi' //Change this.
icon = 'icons/obj/stationobjs.dmi'
icon_state = "plasticflaps"
armor = list(melee = 100, bullet = 80, laser = 80, energy = 100, bomb = 50, bio = 100, rad = 100, fire = 50, acid = 50)
density = 0
anchored = 1
layer = ABOVE_MOB_LAYER
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
if(istype(caller, /mob/living))
if(istype(caller,/mob/living/simple_animal/bot))
if(isliving(caller))
if(isbot(caller))
return 1
var/mob/living/M = caller
@@ -23,17 +24,21 @@
return prob(60)
var/obj/structure/bed/B = A
if (istype(A, /obj/structure/bed) && (B.has_buckled_mobs() || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
if(istype(A, /obj/structure/bed) && (B.has_buckled_mobs() || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
return 0
if (istype(A, /obj/structure/closet/cardboard))
if(istype(A, /obj/structure/closet/cardboard))
var/obj/structure/closet/cardboard/C = A
if(C.move_delay)
return 0
else if(istype(A, /mob/living)) // You Shall Not Pass!
if(istype(A, /obj/mecha))
return 0
else if(isliving(A)) // You Shall Not Pass!
var/mob/living/M = A
if(istype(A,/mob/living/simple_animal/bot)) //Bots understand the secrets
if(isbot(A)) //Bots understand the secrets
return 1
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return 1
@@ -41,31 +46,17 @@
return 0
return ..()
/obj/structure/plasticflaps/ex_act(severity)
..()
switch(severity)
if (1)
qdel(src)
if (2)
if (prob(50))
qdel(src)
if (3)
if (prob(5))
qdel(src)
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
name = "airtight plastic flaps"
desc = "Heavy duty, airtight, plastic flaps."
CanAtmosPass = ATMOS_PASS_NO
/obj/structure/plasticflaps/mining/New() //set the turf below the flaps to block air
var/turf/T = get_turf(loc)
if(T)
T.blocks_air = 1
..()
/obj/structure/plasticflaps/mining/New()
air_update_turf(1)
. = ..()
/obj/structure/plasticflaps/mining/Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor //wow this is terrible
var/turf/T = get_turf(loc)
if(T)
if(istype(T, /turf/open/floor))
T.blocks_air = 0
return ..()
/obj/structure/plasticflaps/mining/Destroy()
var/atom/oldloc = loc
. = ..()
if (oldloc)
oldloc.air_update_turf(1)
+4 -4
View File
@@ -44,8 +44,8 @@
if(istype(W, /obj/item/weapon/wrench))
if(anchored)
user << "Unweld the [src] first!"
if(do_after(user, 80/W.toolspeed, target = src))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 80*W.toolspeed, target = src))
playsound(src.loc, W.usesound, 50, 1)
user << "You dismantle the [src]."
new framebuildstacktype(loc, framebuildstackamount)
new buildstacktype(loc, buildstackamount)
@@ -59,7 +59,7 @@
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if (do_after(user,20/W.toolspeed, target = src))
if (do_after(user,20*W.toolspeed, target = src))
if(!src || !WT.isOn())
return
anchored = 1
@@ -70,7 +70,7 @@
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if (do_after(user,20/W.toolspeed, target = src))
if (do_after(user,20*W.toolspeed, target = src))
if(!src || !WT.isOn())
return
anchored = 0
+20 -9
View File
@@ -12,6 +12,7 @@ FLOOR SAFES
icon_state = "safe"
anchored = 1
density = 1
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/open = 0 //is the safe open?
var/tumbler_1_pos //the tumbler position- from 0 to 72
var/tumbler_1_open //the tumbler position to open at- 0 to 72
@@ -23,6 +24,7 @@ FLOOR SAFES
/obj/structure/safe/New()
..()
tumbler_1_pos = rand(0, 71)
tumbler_1_open = rand(0, 71)
@@ -30,7 +32,12 @@ FLOOR SAFES
tumbler_2_open = rand(0, 71)
/obj/structure/safe/initialize()
/obj/structure/safe/Initialize(mapload)
..()
if(!mapload)
return
for(var/obj/item/I in loc)
if(space >= maxspace)
return
@@ -91,7 +98,7 @@ FLOOR SAFES
var/mob/living/carbon/human/user = usr
var/canhear = 0
if(istype(user.l_hand, /obj/item/clothing/tie/stethoscope) || istype(user.r_hand, /obj/item/clothing/tie/stethoscope))
if(user.is_holding_item_of_type(/obj/item/clothing/neck/stethoscope))
canhear = 1
if(href_list["open"])
@@ -151,23 +158,26 @@ FLOOR SAFES
if(!user.drop_item())
user << "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>"
return
I.loc = src
I.forceMove(src)
user << "<span class='notice'>You put [I] in [src].</span>"
updateUsrDialog()
return
else
user << "<span class='notice'>[I] won't fit in [src].</span>"
return
else if(istype(I, /obj/item/clothing/tie/stethoscope))
else if(istype(I, /obj/item/clothing/neck/stethoscope))
user << "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>"
else
return ..()
obj/structure/safe/blob_act(obj/effect/blob/B)
/obj/structure/safe/handle_atom_del(atom/A)
updateUsrDialog()
/obj/structure/safe/blob_act(obj/structure/blob/B)
return
obj/structure/safe/ex_act(severity, target)
/obj/structure/safe/ex_act(severity, target)
return
@@ -180,10 +190,11 @@ obj/structure/safe/ex_act(severity, target)
layer = LOW_OBJ_LAYER
/obj/structure/safe/floor/initialize()
/obj/structure/safe/floor/Initialize(mapload)
..()
var/turf/T = loc
hide(T.intact)
if(mapload)
var/turf/T = loc
hide(T.intact)
/obj/structure/safe/floor/hide(var/intact)
+2 -2
View File
@@ -53,7 +53,7 @@
deconstruction_state = SHOWCASE_SCREWDRIVERED
if(istype(W, /obj/item/weapon/crowbar) && deconstruction_state == SHOWCASE_SCREWDRIVERED)
if(do_after(user, 20/W.toolspeed, target = src))
if(do_after(user, 20*W.toolspeed, target = src))
playsound(loc, W.usesound, 100, 1)
user << "<span class='notice'>You start to crowbar the showcase apart...</span>"
new /obj/item/stack/sheet/metal (get_turf(src), 4)
@@ -73,4 +73,4 @@
if(SHOWCASE_SCREWDRIVERED)
user << "The showcase has its screws loosened."
else
user << "If you see this, something is wrong."
user << "If you see this, something is wrong."
+33 -23
View File
@@ -4,25 +4,32 @@
opacity = 0
density = 0
layer = SIGN_LAYER
obj_integrity = 100
max_integrity = 100
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
var/buildable_sign = 1 //unwrenchable and modifiable
/obj/structure/sign/basic
name = "blank sign"
desc = "How can signs be real if our eyes aren't real?"
icon_state = "backing"
/obj/structure/sign/ex_act(severity, target)
qdel(src)
/obj/structure/sign/blob_act(obj/effect/blob/B)
qdel(src)
return
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
/obj/structure/sign/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/wrench))
if(istype(O, /obj/item/weapon/wrench) && buildable_sign)
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
"<span class='notice'>You start unfastening [src].</span>")
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
if(!do_after(user, 30/O.toolspeed, target = src))
playsound(src, O.usesound, 50, 1)
if(!do_after(user, 30*O.toolspeed, target = src))
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] unfastens [src].</span>", \
@@ -31,7 +38,7 @@
SB.icon_state = icon_state
SB.sign_path = type
qdel(src)
else if(istype(O, /obj/item/weapon/pen))
else if(istype(O, /obj/item/weapon/pen) && buildable_sign)
var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \
"Hydroponics", "Xenobiology")
var/obj/structure/sign/sign_type
@@ -87,15 +94,15 @@
desc = "A sign with adhesive backing."
icon = 'icons/obj/decals.dmi'
icon_state = "backing"
w_class = 3
burn_state = FLAMMABLE
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FLAMMABLE
var/sign_path = /obj/structure/sign/basic //the type of sign that will be created when placed on a turf
/obj/item/sign_backing/afterattack(atom/target, mob/user, proximity)
if(isturf(target) && proximity)
var/turf/T = target
user.visible_message("<span class='notice'>[user] fastens [src] to [T].</span>", \
"<span class='notice'>You attach a blank sign to [T].</span>")
"<span class='notice'>You attach the sign to [T].</span>")
playsound(T, 'sound/items/Deconstruct.ogg', 50, 1)
new sign_path(T)
user.drop_item()
@@ -106,18 +113,26 @@
/obj/structure/sign/map
name = "station map"
desc = "A framed picture of the station."
obj_integrity = 500
max_integrity = 500
/obj/structure/sign/map/left
icon_state = "map-left"
/obj/structure/sign/map/left/dream
icon_state = "map-left-DS"
desc = "A framed picture of the station.\nClockwise from the top, you see Engineering(<b>yellow</b>), Arrivals(<b>blue and white</b>), Atmospherics(<b>yellow</b>), Security(<b>red</b>), \
Cargo(<b>brown</b>), Science(<b>purple</b>), Escape(<b>red and white</b>), and Medbay(<b>blue</b>).\nIn the center of the station, you see the Bridge(<b>dark blue</b>).\n\
Around those, you see Hallways/Entrances(<b>light grey</b>), Public Areas(<b>grey</b>), and Maintenance(<b>dark grey</b>)."
/obj/structure/sign/map/right
icon_state = "map-right"
/obj/structure/sign/map/right/dream
icon_state = "map-right-DS"
desc = "A framed picture of the station.\nClockwise from the top, you see Engineering(<b>yellow</b>), Arrivals(<b>blue and white</b>), Atmospherics(<b>yellow</b>), Security(<b>red</b>), \
Cargo(<b>brown</b>), Science(<b>purple</b>), Escape(<b>red and white</b>), and Medbay(<b>blue</b>).\nIn the center of the station, you see the Bridge(<b>dark blue</b>).\n\
Around those, you see Hallways/Entrances(<b>light grey</b>), Public Areas(<b>grey</b>), and Maintenance(<b>dark grey</b>)."
/obj/structure/sign/securearea
name = "\improper SECURE AREA"
@@ -201,15 +216,10 @@
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
icon_state = "atmosplaque"
/obj/structure/sign/maltesefalcon //The sign is 64x32, so it needs two tiles. ;3
name = "The Maltese Falcon"
desc = "The Maltese Falcon, Space Bar and Grill."
/obj/structure/sign/maltesefalcon/left
icon_state = "maltesefalcon-left"
/obj/structure/sign/maltesefalcon/right
icon_state = "maltesefalcon-right"
/obj/structure/sign/nanotrasen
name = "\improper NanoTrasen Logo "
desc = "A sign with the Nanotrasen Logo on it. Glory to Nanotrasen!"
icon_state = "nanotrasen"
/obj/structure/sign/science //These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
name = "\improper SCIENCE"
@@ -228,7 +238,7 @@
/obj/structure/sign/xenobio
name = "\improper XENOBIOLOGY"
desc = "A sign labelling an area as a place where xenobiological entites are researched."
desc = "A sign labelling an area as a place where xenobiological entities are researched."
icon_state = "xenobio"
/obj/structure/sign/directions/science
+11 -12
View File
@@ -6,7 +6,7 @@
density = 1
anchored = 0
var/virgin = 1
var/cooldown = 0
var/next_use = 0
var/planchette = "A"
var/lastuser = null
@@ -32,16 +32,15 @@
virgin = 0
notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!", source = src)
planchette = input("Choose the letter.", "Seance!") in list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
planchette = input("Choose the letter.", "Seance!") as null|anything in list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
if(!planchette || !Adjacent(M) || next_use > world.time)
return
add_logs(M, src, "picked a letter on", " which was \"[planchette]\".")
cooldown = world.time
next_use = world.time + rand(30,50)
lastuser = M.ckey
var/turf/T = loc
sleep(rand(20,30))
if(T == loc)
visible_message("<span class='notice'>The planchette slowly moves... and stops at the letter \"[planchette]\".</span>")
//blind message is the same because not everyone brings night vision to seances
var/msg = "<span class='notice'>The planchette slowly moves... and stops at the letter \"[planchette]\".</span>"
visible_message(msg,"",msg)
/obj/structure/spirit_board/proc/spirit_board_checks(mob/M)
//cooldown
@@ -49,7 +48,7 @@
if(M.ckey == lastuser)
bonus = 10 //Give some other people a chance, hog.
if(cooldown > world.time - (30 + bonus))
if(next_use - bonus > world.time )
return 0 //No feedback here, hiding the cooldown a little makes it harder to tell who's really picking letters.
//lighting check
@@ -58,7 +57,7 @@
light_amount = T.get_lumcount()
if(light_amount > 0.2)
if(light_amount > 2)
M << "<span class='warning'>It's too bright here to use [src.name]!</span>"
return 0
@@ -75,4 +74,4 @@
M << "<span class='warning'>There aren't enough people to use the [src.name]!</span>"
return 0
return 1
return 1
+65 -108
View File
@@ -2,42 +2,40 @@
/obj/structure/statue
name = "Statue"
name = "statue"
desc = "Placeholder. Yell at Firecage if you SOMEHOW see this."
icon = 'icons/obj/statue.dmi'
icon_state = ""
density = 1
anchored = 0
var/health = 100
obj_integrity = 100
max_integrity = 100
var/oreAmount = 7
var/mineralType = "metal"
/obj/structure/statue/Destroy()
density = 0
return ..()
var/material_drop_type = /obj/item/stack/sheet/metal
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/structure/statue/attackby(obj/item/weapon/W, mob/living/user, params)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
if(istype(W, /obj/item/weapon/wrench))
if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] is loosening the [name]'s bolts.", \
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
if(do_after(user,40/W.toolspeed, target = src))
if(do_after(user,40*W.toolspeed, target = src))
if(!src.loc || !anchored)
return
user.visible_message("[user] loosened the [name]'s bolts!", \
"<span class='notice'>You loosen the [name]'s bolts!</span>")
anchored = 0
else
if (!istype(src.loc, /turf/open/floor))
if(!isfloorturf(src.loc))
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] is securing the [name]'s bolts...", \
"<span class='notice'>You are securing the [name]'s bolts...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(!src.loc || anchored)
return
user.visible_message("[user] has secured the [name]'s bolts.", \
@@ -48,12 +46,12 @@
playsound(src, 'sound/items/Welder.ogg', 100, 1)
user.visible_message("[user] is slicing apart the [name]...", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user,30, target = src))
if(do_after(user,40*W.toolspeed, target = src))
if(!src.loc)
return
user.visible_message("[user] slices apart the [name].", \
"<span class='notice'>You slice apart the [name].</span>")
Dismantle(1)
deconstruct(TRUE)
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
@@ -65,95 +63,47 @@
qdel(src)
else if(istype(W, /obj/item/weapon/weldingtool) && !anchored)
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
playsound(loc, W.usesound, 40, 1)
user.visible_message("[user] is slicing apart the [name].", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(!src.loc)
return
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("[user] slices apart the [name].", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(1)
deconstruct(TRUE)
else
return ..()
/obj/structure/statue/attacked_by(obj/item/I, mob/living/user)
..()
take_damage(I.force, I.damtype)
/obj/structure/statue/attack_hand(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
user.visible_message("[user] rubs some dust off from the [name]'s surface.", \
"<span class='notice'>You rub some dust off from the [name]'s surface.</span>")
/obj/structure/statue/CanAtmosPass()
return !density
/obj/structure/statue/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type, 0)
/obj/structure/statue/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
switch(damage_type)
if(BRUTE)
if(sound_effect)
if(damage)
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
if(sound_effect)
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
else
return
health -= damage
if(health <= 0)
Dismantle(1)
/obj/structure/statue/proc/Dismantle(devastated = 0)
if(!devastated)
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
/obj/structure/statue/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(material_drop_type)
var/drop_amt = oreAmount
if(!disassembled)
drop_amt -= 2
if(drop_amt > 0)
new material_drop_type(get_turf(src), drop_amt)
qdel(src)
/obj/structure/statue/ex_act(severity = 1)
switch(severity)
if(1)
Dismantle(1)
if(2)
take_damage(rand(60,110), BRUTE, 0)
if(3)
take_damage(10, BRUTE, 0)
//////////////////////////////////////STATUES/////////////////////////////////////////////////////////////
////////////////////////uranium///////////////////////////////////
/obj/structure/statue/uranium
health = 300
obj_integrity = 300
luminosity = 2
mineralType = "uranium"
material_drop_type = /obj/item/stack/sheet/mineral/uranium
var/last_event = 0
var/active = null
/obj/structure/statue/uranium/nuke
name = "Statue of a Nuclear Fission Explosive"
name = "statue of a nuclear fission explosive"
desc = "This is a grand statue of a Nuclear Explosive. It has a sickening green colour."
icon_state = "nuke"
@@ -191,12 +141,12 @@
////////////////////////////plasma///////////////////////////////////////////////////////////////////////
/obj/structure/statue/plasma
health = 200
mineralType = "plasma"
obj_integrity = 200
material_drop_type = /obj/item/stack/sheet/mineral/plasma
desc = "This statue is suitably made from plasma."
/obj/structure/statue/plasma/scientist
name = "Statue of a Scientist"
name = "statue of a scientist"
icon_state = "sci"
/obj/structure/statue/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -231,7 +181,7 @@
/obj/structure/statue/plasma/proc/PlasmaBurn()
atmos_spawn_air("plasma=400;TEMP=1000")
Dismantle(1)
deconstruct(FALSE)
/obj/structure/statue/plasma/proc/ignite(exposed_temperature)
if(exposed_temperature > 300)
@@ -240,86 +190,86 @@
//////////////////////gold///////////////////////////////////////
/obj/structure/statue/gold
health = 300
mineralType = "gold"
obj_integrity = 300
material_drop_type = /obj/item/stack/sheet/mineral/gold
desc = "This is a highly valuable statue made from gold."
/obj/structure/statue/gold/hos
name = "Statue of the Head of Security"
name = "statue of the head of security"
icon_state = "hos"
/obj/structure/statue/gold/hop
name = "Statue of the Head of Personnel"
name = "statue of the head of personnel"
icon_state = "hop"
/obj/structure/statue/gold/cmo
name = "Statue of the Chief Medical Officer"
name = "statue of the chief medical officer"
icon_state = "cmo"
/obj/structure/statue/gold/ce
name = "Statue of the Chief Engineer"
name = "statue of the chief engineer"
icon_state = "ce"
/obj/structure/statue/gold/rd
name = "Statue of the Research Director"
name = "statue of the research director"
icon_state = "rd"
//////////////////////////silver///////////////////////////////////////
/obj/structure/statue/silver
health = 300
mineralType = "silver"
obj_integrity = 300
material_drop_type = /obj/item/stack/sheet/mineral/silver
desc = "This is a valuable statue made from silver."
/obj/structure/statue/silver/md
name = "Statue of a Medical Officer"
name = "statue of a medical officer"
icon_state = "md"
/obj/structure/statue/silver/janitor
name = "Statue of a Janitor"
name = "statue of a janitor"
icon_state = "jani"
/obj/structure/statue/silver/sec
name = "Statue of a Security Officer"
name = "statue of a security officer"
icon_state = "sec"
/obj/structure/statue/silver/secborg
name = "Statue of a Security Cyborg"
name = "statue of a security cyborg"
icon_state = "secborg"
/obj/structure/statue/silver/medborg
name = "Statue of a Medical Cyborg"
name = "statue of a medical cyborg"
icon_state = "medborg"
/////////////////////////diamond/////////////////////////////////////////
/obj/structure/statue/diamond
health = 1000
mineralType = "diamond"
obj_integrity = 1000
material_drop_type = /obj/item/stack/sheet/mineral/diamond
desc = "This is a very expensive diamond statue"
/obj/structure/statue/diamond/captain
name = "Statue of THE Captain."
name = "statue of THE captain."
icon_state = "cap"
/obj/structure/statue/diamond/ai1
name = "Statue of the AI hologram."
name = "statue of the AI hologram."
icon_state = "ai1"
/obj/structure/statue/diamond/ai2
name = "Statue of the AI core."
name = "statue of the AI core."
icon_state = "ai2"
////////////////////////bananium///////////////////////////////////////
/obj/structure/statue/bananium
health = 300
mineralType = "bananium"
obj_integrity = 300
material_drop_type = /obj/item/stack/sheet/mineral/bananium
desc = "A bananium statue with a small engraving:'HOOOOOOONK'."
var/spam_flag = 0
/obj/structure/statue/bananium/clown
name = "Statue of a clown"
name = "statue of a clown"
icon_state = "clown"
/obj/structure/statue/bananium/Bumped(atom/user)
@@ -348,21 +298,28 @@
/////////////////////sandstone/////////////////////////////////////////
/obj/structure/statue/sandstone
health = 50
mineralType = "sandstone"
obj_integrity = 50
material_drop_type = /obj/item/stack/sheet/mineral/sandstone
/obj/structure/statue/sandstone/assistant
name = "Statue of an assistant"
name = "statue of an assistant"
desc = "A cheap statue of sandstone for a greyshirt."
icon_state = "assist"
/obj/structure/statue/sandstone/venus //call me when we add marble i guess
name = "statue of a pure maiden"
desc = "An ancient marble statue. The subject is depicted with a floor-length braid and is wielding a toolbox. By Jove, it's easily the most gorgeous depiction of a woman you've ever seen. The artist must truly be a master of his craft. Shame about the broken arm, though."
icon = 'icons/obj/statuelarge.dmi'
icon_state = "venus"
/////////////////////snow/////////////////////////////////////////
/obj/structure/statue/snow
health = 50
mineralType = "snow"
obj_integrity = 50
material_drop_type = /obj/item/stack/sheet/mineral/snow
/obj/structure/statue/snow/snowman
name = "snowman"
desc = "Several lumps of snow put together to form a snowman."
icon_state = "snowman"
icon_state = "snowman"
+63 -35
View File
@@ -17,71 +17,80 @@
density = 0
anchored = 0
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
obj_integrity = 100
max_integrity = 100
var/framestack = /obj/item/stack/rods
var/framestackamount = 2
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You start disassembling [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30/I.toolspeed, target = src))
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30*I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
for(var/i = 1, i <= framestackamount, i++)
new framestack(get_turf(src))
qdel(src)
deconstruct(TRUE)
else if(istype(I, /obj/item/stack/sheet/plasteel))
var/obj/item/stack/sheet/plasteel/P = I
if(P.get_amount() < 1)
user << "<span class='warning'>You need one plasteel sheet to do this!</span>"
return
user << "<span class='notice'>You start adding [P] to [src]...</span>"
if(do_after(user, 50, target = src))
P.use(1)
new /obj/structure/table/reinforced(src.loc)
qdel(src)
if(do_after(user, 50, target = src) && P.use(1))
make_new_table(/obj/structure/table/reinforced)
else if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(M.get_amount() < 1)
user << "<span class='warning'>You need one metal sheet to do this!</span>"
return
user << "<span class='notice'>You start adding [M] to [src]...</span>"
if(do_after(user, 20, target = src))
M.use(1)
new /obj/structure/table(src.loc)
qdel(src)
if(do_after(user, 20, target = src) && M.use(1))
make_new_table(/obj/structure/table)
else if(istype(I, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = I
if(G.get_amount() < 1)
user << "<span class='warning'>You need one glass sheet to do this!</span>"
return
user << "<span class='notice'>You start adding [G] to [src]...</span>"
if(do_after(user, 20, target = src))
G.use(1)
new /obj/structure/table/glass(src.loc)
qdel(src)
if(do_after(user, 20, target = src) && G.use(1))
make_new_table(/obj/structure/table/glass)
else if(istype(I, /obj/item/stack/sheet/mineral/silver))
var/obj/item/stack/sheet/mineral/silver/S = I
if(S.get_amount() < 1)
user << "<span class='warning'>You need one silver sheet to do this!</span>"
return
user << "<span class='notice'>You start adding [S] to [src]...</span>"
if(do_after(user, 20, target = src))
S.use(1)
new /obj/structure/table/optable(src.loc)
qdel(src)
if(do_after(user, 20, target = src) && S.use(1))
make_new_table(/obj/structure/table/optable)
else if(istype(I, /obj/item/stack/tile/carpet))
var/obj/item/stack/tile/carpet/C = I
if(C.get_amount() < 1)
user << "<span class='warning'>You need one carpet sheet to do this!</span>"
return
user << "<span class='notice'>You start adding [C] to [src]...</span>"
if(do_after(user, 20, target = src) && C.use(1))
make_new_table(/obj/structure/table/wood/fancy)
else
return ..()
/obj/structure/table_frame/proc/make_new_table(table_type) //makes sure the new table made retains what we had as a frame
var/obj/structure/table/T = new table_type(loc)
T.frame = type
T.framestack = framestack
T.framestackamount = framestackamount
qdel(src)
/obj/structure/table_frame/deconstruct(disassembled = TRUE)
new framestack(get_turf(src), framestackamount)
qdel(src)
/obj/structure/table_frame/narsie_act()
if(prob(20))
new /obj/structure/table_frame/wood(src.loc)
qdel(src)
/obj/structure/table_frame/ratvar_act()
if(prob(20))
new /obj/structure/table_frame/brass(src.loc)
qdel(src)
new /obj/structure/table_frame/brass(src.loc)
qdel(src)
/*
* Wooden Frames
@@ -93,7 +102,7 @@
icon_state = "wood_frame"
framestack = /obj/item/stack/sheet/mineral/wood
framestackamount = 2
burn_state = FLAMMABLE
resistance_flags = FLAMMABLE
/obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stack/sheet/mineral/wood))
@@ -102,10 +111,8 @@
user << "<span class='warning'>You need one wood sheet to do this!</span>"
return
user << "<span class='notice'>You start adding [W] to [src]...</span>"
if(do_after(user, 20, target = src))
W.use(1)
new /obj/structure/table/wood(src.loc)
qdel(src)
if(do_after(user, 20, target = src) && W.use(1))
make_new_table(/obj/structure/table/wood)
return
else if(istype(I, /obj/item/stack/tile/carpet))
var/obj/item/stack/tile/carpet/C = I
@@ -113,10 +120,8 @@
user << "<span class='warning'>You need one carpet sheet to do this!</span>"
return
user << "<span class='notice'>You start adding [C] to [src]...</span>"
if(do_after(user, 20, target = src))
C.use(1)
new /obj/structure/table/wood/poker(src.loc)
qdel(src)
if(do_after(user, 20, target = src) && C.use(1))
make_new_table(/obj/structure/table/wood/poker)
else
return ..()
@@ -124,7 +129,29 @@
name = "brass table frame"
desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch."
icon_state = "brass_frame"
framestackamount = 0
resistance_flags = FIRE_PROOF | ACID_PROOF
framestack = /obj/item/stack/tile/brass
framestackamount = 1
/obj/structure/table_frame/brass/New()
change_construction_value(1)
..()
/obj/structure/table_frame/brass/Destroy()
change_construction_value(-1)
return ..()
/obj/structure/table_frame/brass/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stack/tile/brass))
var/obj/item/stack/tile/brass/W = I
if(W.get_amount() < 1)
user << "<span class='warning'>You need one brass sheet to do this!</span>"
return
user << "<span class='notice'>You start adding [W] to [src]...</span>"
if(do_after(user, 20, target = src) && W.use(1))
make_new_table(/obj/structure/table/reinforced/brass)
else
return ..()
/obj/structure/table_frame/brass/narsie_act()
..()
@@ -132,3 +159,4 @@
var/previouscolor = color
color = "#960000"
animate(src, color = previouscolor, time = 8)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
+107 -247
View File
@@ -29,7 +29,9 @@
var/buildstackamount = 1
var/framestackamount = 2
var/deconstruction_ready = 1
var/health = 100
obj_integrity = 100
max_integrity = 100
integrity_failure = 30
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
@@ -44,65 +46,19 @@
queue_smooth(src)
queue_smooth_neighbors(src)
/obj/structure/table/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
if(2)
take_damage(rand(80,120), BRUTE, 0)
if(3)
take_damage(rand(40,80), BRUTE, 0)
/obj/structure/table/blob_act(obj/effect/blob/B)
if(prob(75))
qdel(src)
/obj/structure/table/narsie_act()
if(prob(20))
new /obj/structure/table/wood(src.loc)
/obj/structure/table/ratvar_act()
if(prob(20))
new /obj/structure/table/reinforced/brass(src.loc)
/obj/structure/table/mech_melee_attack(obj/mecha/M)
playsound(src.loc, 'sound/weapons/punch4.ogg', 50, 1)
visible_message("<span class='danger'>[M.name] smashes [src]!</span>")
take_damage(200, M.damtype, 0)
/obj/structure/table/attack_alien(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(src.loc, 'sound/weapons/bladeslice.ogg', 50, 1)
visible_message("<span class='danger'>[user] slices [src]!</span>")
take_damage(100, BRUTE, 0)
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(user.melee_damage_upper)
var/dmg_dealt = user.melee_damage_upper
if(user.environment_smash)
dmg_dealt = 100
visible_message("<span class='warning'>[user] smashes [src]!</span>")
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
take_damage(dmg_dealt, user.melee_damage_type, 0)
new /obj/structure/table/reinforced/brass(src.loc)
/obj/structure/table/attack_paw(mob/user)
attack_hand(user)
/obj/structure/table/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
visible_message("<span class='danger'>[user] smashes [src]!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
take_damage(rand(180,280), BRUTE, 0)
return 1
/obj/structure/table/attack_hand(mob/living/user)
if(user.a_intent == "grab" && user.pulling && isliving(user.pulling))
if(user.a_intent == INTENT_GRAB && user.pulling && isliving(user.pulling))
var/mob/living/pushed_mob = user.pulling
if(pushed_mob.buckled)
user << "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>"
@@ -115,13 +71,6 @@
else
..()
/obj/structure/table/attack_tk() // no telehulk sorry
return
/obj/structure/table/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type, 0)
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return 1
@@ -151,11 +100,18 @@
/obj/structure/table/attackby(obj/item/I, mob/user, params)
if(!(flags & NODECONSTRUCT))
if(istype(I, /obj/item/weapon/screwdriver) && deconstruction_ready)
table_deconstruct(user, 1)
user << "<span class='notice'>You start disassembling [src]...</span>"
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 20*I.toolspeed, target = src))
deconstruct(TRUE)
return
if(istype(I, /obj/item/weapon/wrench) && deconstruction_ready)
table_deconstruct(user, 0)
user << "<span class='notice'>You start deconstructing [src]...</span>"
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 40*I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
deconstruct(TRUE, 1)
return
if(istype(I, /obj/item/weapon/storage/bag/tray))
@@ -171,7 +127,7 @@
return
// If the tray IS empty, continue on (tray will be placed on the table like other items)
if(user.a_intent != "harm" && !(I.flags & ABSTRACT))
if(user.a_intent != INTENT_HARM && !(I.flags & ABSTRACT))
if(user.drop_item())
I.Move(loc)
var/list/click_params = params2list(params)
@@ -185,62 +141,18 @@
else
return ..()
/obj/structure/table/attacked_by(obj/item/I, mob/living/user)
..()
take_damage(I.force, I.damtype)
/obj/structure/table/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
switch(damage_type)
if(BRUTE)
if(sound_effect)
if(damage)
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
if(sound_effect)
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
else
return
health -= damage
if(health <= 0)
table_destroy()
/*
* TABLE DESTRUCTION/DECONSTRUCTION
*/
/obj/structure/table/proc/table_destroy()
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
if(!(flags & NODECONSTRUCT))
var/turf/T = get_turf(src)
for(var/i = 1, i <= framestackamount, i++)
new framestack(T)
for(var/i = 1, i <= buildstackamount, i++)
new buildstack(T)
new buildstack(T, buildstackamount)
if(!wrench_disassembly)
new frame(T)
else
new framestack(T, framestackamount)
qdel(src)
/obj/structure/table/proc/table_deconstruct(mob/user, disassembling = 0)
if(flags & NODECONSTRUCT)
return
if(disassembling)
user << "<span class='notice'>You start disassembling [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20, target = src))
new frame(src.loc)
for(var/i = 1, i <= buildstackamount, i++)
new buildstack(get_turf(src))
qdel(src)
else
user << "<span class='notice'>You start deconstructing [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 40, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
table_destroy()
/*
* Glass tables
*/
@@ -251,7 +163,10 @@
icon_state = "glass_table"
buildstack = /obj/item/stack/sheet/glass
canSmoothWith = null
health = 50
obj_integrity = 70
max_integrity = 70
resistance_flags = ACID_PROOF
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 100)
var/list/debris = list()
/obj/structure/table/glass/New()
@@ -272,15 +187,16 @@
return
// Don't break if they're just flying past
if(AM.throwing)
spawn(5)
// Check again in a bit though
if(AM.loc == get_turf(src))
check_break(AM)
addtimer(CALLBACK(src, .proc/throw_check, AM), 5)
else
check_break(AM)
/obj/structure/table/glass/proc/throw_check(mob/living/M)
if(M.loc == get_turf(src))
check_break(M)
/obj/structure/table/glass/proc/check_break(mob/living/M)
if(has_gravity(M) && M.mob_size > MOB_SIZE_SMALL)
if(M.has_gravity() && M.mob_size > MOB_SIZE_SMALL)
table_shatter(M)
/obj/structure/table/glass/proc/table_shatter(mob/M)
@@ -297,32 +213,25 @@
M.Weaken(5)
qdel(src)
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
if(!(flags & NODECONSTRUCT))
if(disassembled)
..()
return
else
var/turf/T = get_turf(src)
playsound(T, "shatter", 50, 1)
for(var/X in debris)
var/atom/movable/AM = X
AM.forceMove(T)
debris -= AM
qdel(src)
/obj/structure/table/glass/narsie_act()
color = NARSIE_WINDOW_COLOUR
for(var/obj/item/weapon/shard/S in debris)
S.color = NARSIE_WINDOW_COLOUR
/*
/obj/structure/table/glass/attack_hand(mob/living/carbon/human/M, mob/living/user)
var/mob/living/carbon/human/H = M
if (ishuman(M) && (M.a_intent == "harm"))
// if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.specflags))
//if (istype(H.w_uniform, /obj/item/clothing/under/misc/lawyer))
src.visible_message("<span style=\"color:red\"><b>[H] slams their palms against [src]!</b></span>")
visible_message("<span class='warning'>[src] breaks!</span>")
playsound(src.loc, "shatter", 50, 1)
new frame(src.loc)
new /obj/item/weapon/shard(src.loc)
qdel(src)
H << "<span class='warning'>[src] cuts into your hand!</span>"
var/organ = (H.hand ? "l_" : "r_") + "arm"
var/obj/item/bodypart/affecting = H.get_bodypart(organ)
if(affecting && affecting.take_damage(force / 2))
H.update_damage_overlays(0)
else if(ismonkey(user))
M << "<span class='warning'>[src] cuts into your hand!</span>"
M.adjustBruteLoss(force / 2) */
/*
* Wooden tables
*/
@@ -335,8 +244,9 @@
frame = /obj/structure/table_frame/wood
framestack = /obj/item/stack/sheet/mineral/wood
buildstack = /obj/item/stack/sheet/mineral/wood
burn_state = FLAMMABLE
burntime = 20
resistance_flags = FLAMMABLE
obj_integrity = 70
max_integrity = 70
canSmoothWith = list(/obj/structure/table/wood,
/obj/structure/table/wood/poker,
/obj/structure/table/wood/bar)
@@ -354,17 +264,19 @@
/obj/structure/table/wood/poker/narsie_act()
new /obj/structure/table/wood(src.loc)
/*
/obj/structure/table/attack_hand(mob/living/carbon/human/M, mob/living/user)
if (ishuman(M) && (M.a_intent == "harm"))
var/mob/living/carbon/human/H = M
//if (istype(H.w_uniform, /obj/item/clothing/under/misc/lawyer))
src.visible_message("<span style=\"color:red\"><b>[H] slams their palms against [src]!</b></span>")
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 50, 1)*/
//for (var/mob/M in AIviewers(usr, null))
// if (M.client)
// shake_camera(M, 4, 1, 0.5)
return
/obj/structure/table/wood/fancy
name = "fancy table"
desc = "A standard metal table frame covered with an amazingly fancy, patterned cloth."
icon = 'icons/obj/structures.dmi'
icon_state = "fancy_table"
frame = /obj/structure/table_frame
framestack = /obj/item/stack/rods
buildstack = /obj/item/stack/tile/carpet
canSmoothWith = list(/obj/structure/table/wood/fancy)
/obj/structure/table/wood/fancy/New()
icon = 'icons/obj/smooth_structures/fancy_table.dmi' //so that the tables place correctly in the map editor
..()
/*
* Reinforced tables
@@ -377,7 +289,10 @@
deconstruction_ready = 0
buildstack = /obj/item/stack/sheet/plasteel
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
health = 200
obj_integrity = 200
max_integrity = 200
integrity_failure = 50
armor = list(melee = 10, bullet = 30, laser = 30, energy = 100, bomb = 20, bio = 0, rad = 0, fire = 80, acid = 70)
/obj/structure/table/reinforced/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/weldingtool))
@@ -386,32 +301,40 @@
playsound(src.loc, W.usesound, 50, 1)
if(deconstruction_ready)
user << "<span class='notice'>You start strengthening the reinforced table...</span>"
if (do_after(user, 50/W.toolspeed, target = src))
if (do_after(user, 50*W.toolspeed, target = src))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You strengthen the table.</span>"
deconstruction_ready = 0
else
user << "<span class='notice'>You start weakening the reinforced table...</span>"
if (do_after(user, 50/W.toolspeed, target = src))
if (do_after(user, 50*W.toolspeed, target = src))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You weaken the table.</span>"
deconstruction_ready = 1
else
return ..()
. = ..()
/obj/structure/table/reinforced/brass
name = "brass table"
desc = "A solid, slightly beveled brass table."
icon = 'icons/obj/smooth_structures/brass_table.dmi'
icon_state = "brass_table"
resistance_flags = FIRE_PROOF | ACID_PROOF
frame = /obj/structure/table_frame/brass
framestackamount = 0
buildstackamount = 0
framestack = /obj/item/stack/tile/brass
buildstack = /obj/item/stack/tile/brass
framestackamount = 1
buildstackamount = 1
canSmoothWith = list(/obj/structure/table/reinforced/brass)
/obj/structure/table/reinforced/brass/table_destroy()
new frame(src.loc)
qdel(src)
/obj/structure/table/reinforced/brass/New()
change_construction_value(2)
..()
/obj/structure/table/reinforced/brass/Destroy()
change_construction_value(-2)
return ..()
/obj/structure/table/reinforced/brass/narsie_act()
take_damage(rand(15, 45), BRUTE)
@@ -419,9 +342,10 @@
var/previouscolor = color
color = "#960000"
animate(src, color = previouscolor, time = 8)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
/obj/structure/table/reinforced/brass/ratvar_act()
health = initial(health)
obj_integrity = max_integrity
/*
* Surgery Tables
@@ -478,30 +402,8 @@
density = 1
anchored = 1
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.
var/health = 20
/obj/structure/rack/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
if(2)
if(prob(50))
rack_destroy()
else
qdel(src)
if(3)
take_damage(rand(5,25), BRUTE, 0)
/obj/structure/rack/blob_act(obj/effect/blob/B)
if(prob(75))
qdel(src)
else
rack_destroy()
/obj/structure/rack/mech_melee_attack(obj/mecha/M)
if(..())
take_damage(M.force*2)
obj_integrity = 20
max_integrity = 20
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
@@ -519,7 +421,7 @@
. = . || mover.checkpass(PASSTABLE)
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O))
return
if(!user.drop_item())
return
@@ -530,83 +432,41 @@
/obj/structure/rack/attackby(obj/item/weapon/W, mob/user, params)
if (istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
playsound(src.loc, W.usesound, 50, 1)
rack_destroy()
deconstruct(TRUE)
return
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
return ..()
if(user.drop_item())
W.Move(loc)
return 1
/obj/structure/rack/attacked_by(obj/item/I, mob/living/user)
..()
take_damage(I.force, I.damtype)
/obj/structure/rack/attack_paw(mob/living/user)
attack_hand(user)
/obj/structure/rack/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
rack_destroy()
return 1
/obj/structure/rack/attack_hand(mob/living/user)
if(user.weakened || user.resting || user.lying || user.get_num_legs() < 2)
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='danger'>You kick [src].</span>")
take_damage(rand(4,8), BRUTE)
/obj/structure/rack/attack_alien(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(src.loc, 'sound/weapons/bladeslice.ogg', 50, 1)
visible_message("<span class='warning'>[user] slices [src] apart.</span>")
rack_destroy()
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
user.visible_message("<span class='danger'>[user] kicks [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
take_damage(rand(4,8), BRUTE, "melee", 1)
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(user.melee_damage_upper)
if(user.environment_smash)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
visible_message("<span class='warning'>[user] smashes [src] apart.</span>")
rack_destroy()
else
take_damage(user.melee_damage_upper, user.melee_damage_type)
/obj/structure/rack/attack_tk() // no telehulk sorry
return
/obj/structure/rack/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type, 0)
/obj/structure/rack/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(sound_effect)
if(damage)
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(damage_amount)
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
if(sound_effect)
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
else
return
health -= damage
if(health <= 0)
rack_destroy()
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
/*
* Rack destruction
*/
/obj/structure/rack/proc/rack_destroy()
/obj/structure/rack/deconstruct(disassembled = TRUE)
if(!(flags&NODECONSTRUCT))
density = 0
var/obj/item/weapon/rack_parts/newparts = new(loc)
@@ -628,18 +488,18 @@
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W, mob/user, params)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( user.loc )
new /obj/item/stack/sheet/metal(user.loc)
qdel(src)
return
else
return ..()
. = ..()
/obj/item/weapon/rack_parts/attack_self(mob/user)
user << "<span class='notice'>You start constructing rack...</span>"
if (do_after(user, 50, target = src))
user << "<span class='notice'>You start constructing a rack...</span>"
if(do_after(user, 50, target = src, progress=TRUE))
if(!user.drop_item())
return
var/obj/structure/rack/R = new /obj/structure/rack( user.loc )
var/obj/structure/rack/R = new /obj/structure/rack(user.loc)
user.visible_message("<span class='notice'>[user] assembles \a [R].\
</span>", "<span class='notice'>You assemble \a [R].</span>")
R.add_fingerprint(user)
qdel(src)
return
+19 -5
View File
@@ -7,6 +7,8 @@
icon_state = "dispenser"
density = 1
anchored = 1
obj_integrity = 300
max_integrity = 300
var/oxygentanks = TANK_DISPENSER_CAPACITY
var/plasmatanks = TANK_DISPENSER_CAPACITY
@@ -22,7 +24,7 @@
for(var/i in 1 to plasmatanks)
new /obj/item/weapon/tank/internals/plasma(src)
update_icon()
..()
/obj/structure/tank_dispenser/update_icon()
cut_overlays()
switch(oxygentanks)
@@ -48,13 +50,16 @@
oxygentanks++
else
full = TRUE
else if(user.a_intent != "harm")
else if(istype(I, /obj/item/weapon/wrench))
default_unfasten_wrench(user, I, time = 20)
return
else if(user.a_intent != INTENT_HARM)
user << "<span class='notice'>[I] does not fit into [src].</span>"
return
else
return ..()
if(full)
user << "<span class='notice'>[src] can't hold anymore of [I].</span>"
user << "<span class='notice'>[src] can't hold any more of [I].</span>"
return
if(!user.drop_item())
@@ -83,16 +88,25 @@
switch(action)
if("plasma")
var/obj/item/weapon/tank/internals/plasma/tank = locate() in src
if(tank)
if(tank && Adjacent(usr))
usr.put_in_hands(tank)
plasmatanks--
. = TRUE
if("oxygen")
var/obj/item/weapon/tank/internals/oxygen/tank = locate() in src
if(tank)
if(tank && Adjacent(usr))
usr.put_in_hands(tank)
oxygentanks--
. = TRUE
update_icon()
/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
for(var/X in src)
var/obj/item/I = X
I.forceMove(loc)
new /obj/item/stack/sheet/metal (loc, 2)
qdel(src)
#undef TANK_DISPENSER_CAPACITY
+1 -1
View File
@@ -41,7 +41,7 @@
pinned_target.nullPinnedLoc()
nullPinnedTarget()
if(ishuman(user))
if(!user.get_active_hand())
if(!user.get_active_held_item())
user.put_in_hands(pinned_target)
user << "<span class='notice'>You take the target out of the stake.</span>"
else
@@ -2,17 +2,21 @@
// A place where tube pods stop, and people can get in or out.
// Mappers: use "Generate Instances from Directions" for this
// one.
/obj/structure/transit_tube/station
name = "station tube station"
icon = 'icons/obj/atmospherics/pipes/transit_tube_station.dmi'
icon_state = "closed"
icon_state = "closed_station0"
exit_delay = 1
enter_delay = 2
tube_construction = /obj/structure/c_transit_tube/station
var/open_status = STATION_TUBE_CLOSED
var/pod_moving = 0
var/cooldown_delay = 50
var/launch_cooldown = 0
var/reverse_launch = 0
var/base_icon = "station0"
var/boarding_dir //from which direction you can board the tube
var/const/OPEN_DURATION = 6
var/const/CLOSE_DURATION = 6
@@ -25,19 +29,15 @@
STOP_PROCESSING(SSobj, src)
return ..()
// Stations which will send the tube in the opposite direction after their stop.
/obj/structure/transit_tube/station/reverse
tube_construction = /obj/structure/c_transit_tube/station/reverse
reverse_launch = 1
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
return 1
/obj/structure/transit_tube/station/Bumped(mob/AM as mob|obj)
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
/obj/structure/transit_tube/station/Bumped(atom/movable/AM)
if(!pod_moving && open_status == STATION_TUBE_OPEN && ismob(AM) && AM.dir == boarding_dir)
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving && pod.dir in directions())
AM.loc = pod
if(!pod.moving)
AM.forceMove(pod)
pod.update_icon()
return
@@ -49,19 +49,18 @@
return
for(var/obj/structure/transit_tube_pod/pod in loc)
return //no fun allowed
var/obj/structure/transit_tube_pod/T = new/obj/structure/transit_tube_pod(src)
R.transfer_fingerprints_to(T)
T.add_fingerprint(user)
T.loc = src.loc
T.setDir(turn(src.dir, -90))
user.visible_message("[user] inserts the [R].", "<span class='notice'>You insert the [R].</span>")
var/obj/structure/transit_tube_pod/TP = new(loc)
R.transfer_fingerprints_to(TP)
TP.add_fingerprint(user)
TP.setDir(turn(src.dir, -90))
user.visible_message("[user] inserts [R].", "<span class='notice'>You insert [R].</span>")
qdel(R)
/obj/structure/transit_tube/station/attack_hand(mob/user)
if(!pod_moving)
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(icon_state == "open")
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
if(open_status == STATION_TUBE_OPEN)
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
if(GM.buckled || GM.has_buckled_mobs())
@@ -70,26 +69,23 @@
for(var/obj/structure/transit_tube_pod/pod in loc)
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
if(do_after(user, 15, target = src))
if(GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
if(open_status == STATION_TUBE_OPEN && GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
GM.Weaken(5)
src.Bumped(GM)
break
else
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving && pod.dir in directions())
if(icon_state == "closed")
if(!pod.moving && (pod.dir in tube_dirs))
if(open_status == STATION_TUBE_CLOSED)
open_animation()
else if(icon_state == "open")
else if(open_status == STATION_TUBE_OPEN)
if(pod.contents.len && user.loc != pod)
user.visible_message("[user] starts emptying [pod]'s contents onto the floor.", "<span class='notice'>You start emptying [pod]'s contents onto the floor...</span>")
if(do_after(user, 10, target = src)) //So it doesn't default to close_animation() on fail
if(pod.loc == loc)
if(pod && pod.loc == loc)
for(var/atom/movable/AM in pod)
AM.loc = get_turf(user)
if(ismob(AM))
var/mob/M = AM
M.Weaken(5)
AM.forceMove(get_turf(user))
else
close_animation()
@@ -98,46 +94,41 @@
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/crowbar))
for(var/obj/structure/transit_tube_pod/pod in loc)
if(pod.contents)
user << "<span class='warning'>Empty the pod first!</span>"
return
user.visible_message("[user] removes the [pod].", "<span class='notice'>You remove the [pod].</span>")
var/obj/structure/c_transit_tube_pod/R = new/obj/structure/c_transit_tube_pod(src.loc)
pod.transfer_fingerprints_to(R)
R.add_fingerprint(user)
qdel(pod)
for(var/obj/structure/transit_tube_pod/P in loc)
P.deconstruct(FALSE, user)
else
return ..()
/obj/structure/transit_tube/station/proc/open_animation()
if(icon_state == "closed")
icon_state = "opening"
if(open_status == STATION_TUBE_CLOSED)
icon_state = "opening_[base_icon]"
open_status = STATION_TUBE_OPENING
spawn(OPEN_DURATION)
if(icon_state == "opening")
icon_state = "open"
if(open_status == STATION_TUBE_OPENING)
icon_state = "open_[base_icon]"
open_status = STATION_TUBE_OPEN
/obj/structure/transit_tube/station/proc/close_animation()
if(icon_state == "open")
icon_state = "closing"
if(open_status == STATION_TUBE_OPEN)
icon_state = "closing_[base_icon]"
open_status = STATION_TUBE_CLOSING
spawn(CLOSE_DURATION)
if(icon_state == "closing")
icon_state = "closed"
if(open_status == STATION_TUBE_CLOSING)
icon_state = "closed_[base_icon]"
open_status = STATION_TUBE_CLOSED
/obj/structure/transit_tube/station/proc/launch_pod()
if(launch_cooldown >= world.time)
return
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving && turn(pod.dir, (reverse_launch ? 180 : 0)) in directions())
if(!pod.moving)
pod_moving = 1
close_animation()
sleep(CLOSE_DURATION + 2)
if(icon_state == "closed" && pod)
pod.follow_tube(reverse_launch)
if(open_status == STATION_TUBE_CLOSED && pod && pod.loc == loc)
pod.follow_tube()
pod_moving = 0
return 1
return 0
@@ -149,13 +140,63 @@
/obj/structure/transit_tube/station/pod_stopped(obj/structure/transit_tube_pod/pod, from_dir)
pod_moving = 1
spawn(5)
if(reverse_launch)
pod.setDir(tube_dirs[1]) //turning the pod around for next launch.
launch_cooldown = world.time + cooldown_delay
open_animation()
sleep(OPEN_DURATION + 2)
pod_moving = 0
pod.mix_air()
if(!qdeleted(pod))
pod.air_contents.share(loc.return_air()) //mix the pod's gas mixture with the tile it's on
/obj/structure/transit_tube/station/init_tube_dirs()
switch(dir)
if(NORTH)
tube_dirs = list(EAST, WEST)
if(SOUTH)
tube_dirs = list(EAST, WEST)
if(EAST)
tube_dirs = list(NORTH, SOUTH)
if(WEST)
tube_dirs = list(NORTH, SOUTH)
boarding_dir = turn(dir, 180)
/obj/structure/transit_tube/station/flipped
icon_state = "closed_station1"
base_icon = "station1"
tube_construction = /obj/structure/c_transit_tube/station/flipped
/obj/structure/transit_tube/station/flipped/init_tube_dirs()
..()
boarding_dir = dir
// Stations which will send the tube in the opposite direction after their stop.
/obj/structure/transit_tube/station/reverse
tube_construction = /obj/structure/c_transit_tube/station/reverse
reverse_launch = 1
icon_state = "closed_terminus0"
base_icon = "terminus0"
/obj/structure/transit_tube/station/reverse/init_tube_dirs()
switch(dir)
if(NORTH)
tube_dirs = list(EAST)
if(SOUTH)
tube_dirs = list(WEST)
if(EAST)
tube_dirs = list(SOUTH)
if(WEST)
tube_dirs = list(NORTH)
boarding_dir = turn(dir, 180)
/obj/structure/transit_tube/station/reverse/flipped
icon_state = "closed_terminus1"
base_icon = "terminus1"
tube_construction = /obj/structure/c_transit_tube/station/reverse/flipped
/obj/structure/transit_tube/station/reverse/flipped/init_tube_dirs()
..()
boarding_dir = dir
// Tube station directions are simply 90 to either side of
// the exit.
/obj/structure/transit_tube/station/init_dirs()
tube_dirs = list(turn(dir, 90), turn(dir, -90))
@@ -1,58 +1,52 @@
// Basic transit tubes. Straight pieces, curved sections,
// and basic splits/joins (no routing logic).
// Mappers: you can use "Generate Instances from Icon-states"
// to get the different pieces.
/obj/structure/transit_tube
name = "transit tube"
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "E-W"
icon_state = "straight"
density = 1
layer = ABOVE_OBJ_LAYER
layer = LOW_ITEM_LAYER
anchored = 1
climbable = 1
var/tube_construction = /obj/structure/c_transit_tube
var/list/tube_dirs = null
var/list/tube_dirs //list of directions this tube section can connect to.
var/exit_delay = 1
var/enter_delay = 0
// alldirs in global.dm is the same list of directions, but since
// the specific order matters to get a usable icon_state, it is
// copied here so that, in the unlikely case that alldirs is changed,
// this continues to work.
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
/obj/structure/transit_tube/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
return !density
// When destroyed by explosions, properly handle contents.
obj/structure/transit_tube/ex_act(severity, target)
if(3 - severity >= 0)
var/oldloc = loc
..(severity + 1)
for(var/atom/movable/AM in contents)
AM.loc = oldloc
/obj/structure/transit_tube/New(loc)
/obj/structure/transit_tube/New(loc, newdirection)
..(loc)
if(newdirection)
setDir(newdirection)
init_tube_dirs()
generate_tube_overlays()
if(tube_dirs == null)
init_dirs()
/obj/structure/transit_tube/Destroy()
for(var/obj/structure/transit_tube_pod/P in loc)
P.deconstruct(FALSE)
return ..()
/obj/structure/transit_tube/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
deconstruct(FALSE)
/obj/structure/transit_tube/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(copytext(icon_state, 1, 3) != "D-") //decorative diagonals cannot be unwrenched directly
if(tube_construction)
for(var/obj/structure/transit_tube_pod/pod in src.loc)
user << "<span class='warning'>Remove the pod first!</span>"
return
user.visible_message("[user] starts to deattach \the [src].", "<span class='notice'>You start to deattach the [name]...</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 35/W.toolspeed, target = src))
playsound(src.loc, W.usesound, 50, 1)
if(do_after(user, 35*W.toolspeed, target = src))
user << "<span class='notice'>You deattach the [name].</span>"
var/obj/structure/R = new tube_construction(src.loc)
R.icon_state = src.icon_state
src.transfer_fingerprints_to(R)
var/obj/structure/c_transit_tube/R = new tube_construction(loc)
R.setDir(dir)
transfer_fingerprints_to(R)
R.add_fingerprint(user)
src.destroy_diagonals()
qdel(src)
else if(istype(W, /obj/item/weapon/crowbar))
for(var/obj/structure/transit_tube_pod/pod in src.loc)
@@ -60,21 +54,6 @@ obj/structure/transit_tube/ex_act(severity, target)
else
return ..()
//destroys disconnected decorative diagonals
/obj/structure/transit_tube/proc/destroy_diagonals()
for(var/obj/structure/transit_tube/D in orange(1, src))
if(copytext(D.icon_state, 1, 3) == "D-") //is diagonal
var/my_dir = text2dir_extended(copytext(D.icon_state, 3, 5))
var/is_connecting = 0
for(var/obj/structure/transit_tube/N in orange(1,D))
if( (( get_dir(D,N) == turn(my_dir, -45) && D.has_exit(turn(my_dir, 90)) ) || \
( get_dir(D,N) == turn(my_dir, 45) && D.has_exit(turn(my_dir, -90))) ) && \
D != src )
is_connecting = 1
break
if(!is_connecting)
qdel(D)
// Called to check if a pod should stop upon entering this tube.
/obj/structure/transit_tube/proc/should_stop_pod(pod, from_dir)
return 0
@@ -83,18 +62,11 @@ obj/structure/transit_tube/ex_act(severity, target)
/obj/structure/transit_tube/proc/pod_stopped(pod, from_dir)
return
// Returns a /list of directions this tube section can connect to.
// Tubes that have some sort of logic or changing direction might
// override it with additional logic.
/obj/structure/transit_tube/proc/directions()
return tube_dirs
/obj/structure/transit_tube/proc/has_entrance(from_dir)
from_dir = turn(from_dir, 180)
for(var/direction in directions())
for(var/direction in tube_dirs)
if(direction == from_dir)
return 1
@@ -103,7 +75,7 @@ obj/structure/transit_tube/ex_act(severity, target)
/obj/structure/transit_tube/proc/has_exit(in_dir)
for(var/direction in directions())
for(var/direction in tube_dirs)
if(direction == in_dir)
return 1
@@ -118,7 +90,7 @@ obj/structure/transit_tube/ex_act(severity, target)
var/in_dir_cw = turn(in_dir, -45)
var/in_dir_ccw = turn(in_dir, 45)
for(var/direction in directions())
for(var/direction in tube_dirs)
if(direction == in_dir)
return direction
@@ -143,143 +115,154 @@ obj/structure/transit_tube/ex_act(severity, target)
return enter_delay
// Parse the icon_state into a list of directions.
// This means that mappers can use Dream Maker's built in
// "Generate Instances from Icon-states" option to get all
// variations. Additionally, as a separate proc, sub-types
// can handle it more intelligently.
/obj/structure/transit_tube/proc/init_dirs()
if(icon_state == "auto")
// Additional delay, for map loading.
spawn(1)
init_dirs_automatic()
else
tube_dirs = parse_dirs(icon_state)
if(copytext(icon_state, 1, 3) == "D-" || findtextEx(icon_state, "Pass"))
density = 0
/obj/structure/transit_tube/proc/init_tube_dirs()
switch(dir)
if(NORTH)
tube_dirs = list(NORTH, SOUTH)
if(SOUTH)
tube_dirs = list(NORTH, SOUTH)
if(EAST)
tube_dirs = list(EAST, WEST)
if(WEST)
tube_dirs = list(EAST, WEST)
// Initialize dirs by searching for tubes that do/might connect
// on nearby turfs. Create corner pieces if nessecary.
// Pick two directions, preferring tubes that already connect
// to loc, or other auto tubes if there aren't enough connections.
/obj/structure/transit_tube/proc/init_dirs_automatic()
var/list/connected = list()
var/list/connected_auto = list()
for(var/direction in tube_dir_list)
var/location = get_step(loc, direction)
for(var/obj/structure/transit_tube/tube in location)
if(tube.directions() == null && tube.icon_state == "auto")
connected_auto += direction
break
else if(turn(direction, 180) in tube.directions())
connected += direction
break
connected += connected_auto
tube_dirs = select_automatic_dirs(connected)
if(length(tube_dirs) == 2 && tube_dir_list.Find(tube_dirs[1]) > tube_dir_list.Find(tube_dirs[2]))
tube_dirs.Swap(1, 2)
generate_automatic_corners(tube_dirs)
select_automatic_icon_state(tube_dirs)
// Given a list of directions, look a pair that forms a 180 or
// 135 degree angle, and return a list containing the pair.
// If none exist, return list(connected[1], turn(connected[1], 180)
/obj/structure/transit_tube/proc/select_automatic_dirs(connected)
if(length(connected) < 1)
return list()
for(var/i = 1, i <= length(connected), i++)
for(var/j = i + 1, j <= length(connected), j++)
var/d1 = connected[i]
var/d2 = connected[j]
if(d1 == turn(d2, 135) || d1 == turn(d2, 180) || d1 == turn(d2, 225))
return list(d1, d2)
return list(connected[1], turn(connected[1], 180))
/obj/structure/transit_tube/proc/select_automatic_icon_state(directions)
if(length(directions) == 2)
icon_state = "[dir2text_short(directions[1])]-[dir2text_short(directions[2])]"
// Look for diagonal directions, generate the decorative corners in each.
/obj/structure/transit_tube/proc/generate_automatic_corners(directions)
for(var/direction in directions)
if(direction == 5 || direction == 6 || direction == 9 || direction == 10)
/obj/structure/transit_tube/proc/generate_tube_overlays()
for(var/direction in tube_dirs)
if(direction in diagonals)
if(direction & NORTH)
create_automatic_decorative_corner(get_step(loc, NORTH), direction ^ 3)
create_tube_overlay(direction ^ 3, NORTH)
else
create_automatic_decorative_corner(get_step(loc, SOUTH), direction ^ 3)
if(direction & EAST)
create_tube_overlay(direction ^ 12, EAST)
if(direction & EAST)
create_automatic_decorative_corner(get_step(loc, EAST), direction ^ 12)
else
create_tube_overlay(direction ^ 12, WEST)
else
create_tube_overlay(direction)
else
create_automatic_decorative_corner(get_step(loc, WEST), direction ^ 12)
/obj/structure/transit_tube/proc/create_tube_overlay(direction, shift_dir)
var/image/I
if(shift_dir)
I = image(loc = src, icon_state = "decorative_diag", dir = direction)
switch(shift_dir)
if(NORTH)
I.pixel_y = 32
if(SOUTH)
I.pixel_y = -32
if(EAST)
I.pixel_x = 32
if(WEST)
I.pixel_x = -32
else
I = image(loc = src, icon_state = "decorative", dir = direction)
add_overlay(I)
// Generate a corner, if one doesn't exist for the direction on the turf.
/obj/structure/transit_tube/proc/create_automatic_decorative_corner(location, direction)
var/state = "D-[dir2text_short(direction)]"
for(var/obj/structure/transit_tube/tube in location)
if(tube.icon_state == state)
return
var/obj/structure/transit_tube/tube = new(location)
tube.icon_state = state
tube.init_dirs()
//Some of these are mostly for mapping use
/obj/structure/transit_tube/horizontal
dir = WEST
/obj/structure/transit_tube/diagonal
icon_state = "diagonal"
tube_construction = /obj/structure/c_transit_tube/diagonal
// Uses a list() to cache return values. Since they should
// never be edited directly, all tubes with a certain
// icon_state can just reference the same list. In theory,
// reduces memory usage, and improves CPU cache usage.
// In reality, I don't know if that is quite how BYOND works,
// but it is probably safer to assume the existence of, and
// rely on, a sufficiently smart compiler/optimizer.
/obj/structure/transit_tube/proc/parse_dirs(text)
var/global/list/direction_table = list()
/obj/structure/transit_tube/diagonal/init_tube_dirs()
switch(dir)
if(NORTH)
tube_dirs = list(NORTHEAST, SOUTHWEST)
if(SOUTH)
tube_dirs = list(NORTHEAST, SOUTHWEST)
if(EAST)
tube_dirs = list(NORTHWEST, SOUTHEAST)
if(WEST)
tube_dirs = list(NORTHWEST, SOUTHEAST)
if(text in direction_table)
return direction_table[text]
//mostly for mapping use
/obj/structure/transit_tube/diagonal/topleft
dir = WEST
var/list/split_text = splittext(text, "-")
/obj/structure/transit_tube/diagonal/crossing
density = 0
icon_state = "diagonal_crossing"
tube_construction = /obj/structure/c_transit_tube/diagonal/crossing
// If the first token is D, the icon_state represents
// a purely decorative tube, and doesn't actually
// connect to anything.
if(split_text[1] == "D")
direction_table[text] = list()
return null
//mostly for mapping use
/obj/structure/transit_tube/diagonal/crossing/topleft
dir = WEST
var/list/directions = list()
for(var/text_part in split_text)
var/direction = text2dir_extended(text_part)
/obj/structure/transit_tube/curved
icon_state = "curved0"
tube_construction = /obj/structure/c_transit_tube/curved
if(direction > 0)
directions += direction
/obj/structure/transit_tube/curved/init_tube_dirs()
switch(dir)
if(NORTH)
tube_dirs = list(NORTH, SOUTHWEST)
if(SOUTH)
tube_dirs = list(SOUTH, NORTHEAST)
if(EAST)
tube_dirs = list(EAST, NORTHWEST)
if(WEST)
tube_dirs = list(SOUTHEAST, WEST)
direction_table[text] = directions
return directions
/obj/structure/transit_tube/curved/flipped
icon_state = "curved1"
tube_construction = /obj/structure/c_transit_tube/curved/flipped
/obj/structure/transit_tube/curved/flipped/init_tube_dirs()
switch(dir)
if(NORTH)
tube_dirs = list(NORTH, SOUTHEAST)
if(SOUTH)
tube_dirs = list(SOUTH, NORTHWEST)
if(EAST)
tube_dirs = list(EAST, SOUTHWEST)
if(WEST)
tube_dirs = list(NORTHEAST, WEST)
/obj/structure/transit_tube/junction
icon_state = "junction0"
tube_construction = /obj/structure/c_transit_tube/junction
/obj/structure/transit_tube/junction/init_tube_dirs()
switch(dir)
if(NORTH)
tube_dirs = list(NORTH, SOUTHEAST, SOUTHWEST)//ending with the prefered direction
if(SOUTH)
tube_dirs = list(SOUTH, NORTHWEST, NORTHEAST)
if(EAST)
tube_dirs = list(EAST, SOUTHWEST, NORTHWEST)
if(WEST)
tube_dirs = list(WEST, NORTHEAST, SOUTHEAST)
/obj/structure/transit_tube/junction/flipped
icon_state = "junction1"
tube_construction = /obj/structure/c_transit_tube/junction/flipped
/obj/structure/transit_tube/junction/flipped/init_tube_dirs()
switch(dir)
if(NORTH)
tube_dirs = list(NORTH, SOUTHWEST, SOUTHEAST)//ending with the prefered direction
if(SOUTH)
tube_dirs = list(SOUTH, NORTHEAST, NORTHWEST)
if(EAST)
tube_dirs = list(EAST, NORTHWEST, SOUTHWEST)
if(WEST)
tube_dirs = list(WEST, SOUTHEAST, NORTHEAST)
/obj/structure/transit_tube/crossing
icon_state = "crossing"
tube_construction = /obj/structure/c_transit_tube/crossing
density = 0
//mostly for mapping use
/obj/structure/transit_tube/crossing/horizontal
dir = WEST
@@ -4,58 +4,44 @@
/obj/structure/c_transit_tube
name = "unattached transit tube"
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "E-W" //icon_state decides which tube will be built
icon_state = "straight"
density = 0
layer = ABOVE_OBJ_LAYER //same as the built tube
layer = LOW_ITEM_LAYER //same as the built tube
anchored = 0
var/flipped = 0
var/build_type = /obj/structure/transit_tube
var/flipped_build_type
var/base_icon
/obj/structure/c_transit_tube/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
//wrapper for turn that changes the transit tube formatted icon_state instead of the dir
/obj/structure/c_transit_tube/proc/tube_turn(angle)
var/list/badtubes = list("W-E", "W-E-Pass", "S-N", "S-N-Pass", "SW-NE", "SE-NW")
var/list/split_text = splittext(icon_state, "-")
for(var/i=1; i<=split_text.len; i++)
var/curdir = text2dir_extended(split_text[i]) //0 if not a valid direction (e.g. Pass, Block)
if(curdir)
split_text[i] = dir2text_short(turn(curdir, angle))
var/newdir = jointext(split_text, "-")
if(badtubes.Find(newdir))
split_text.Swap(1,2)
newdir = jointext(split_text, "-")
icon_state = newdir
/obj/structure/c_transit_tube/proc/tube_rotate()
setDir(turn(dir, -90))
/obj/structure/c_transit_tube/proc/tube_flip()
var/list/split_text = splittext(icon_state, "-")
//skip straight pipes
if(length(split_text[2]) < 2)
return
//for junctions, just swap the diagonals with each other
if(split_text.len == 3 && split_text[3] != "Pass")
split_text.Swap(2,3)
else if(length(split_text[1]) == 2 && length(split_text[2]) == 2) //diagonals
split_text[1] = copytext(split_text[1],1,2) + copytext(split_text[2],2,3)
split_text[2] = copytext(split_text[2],1,2) + ((copytext(split_text[2],2,3) == "E") ? "W" : "E")
//for curves, swap the diagonal direction that is not in the same axis as the cardinal direction
else
if(split_text[1] == "N" || split_text[1] == "S")
split_text[2] = copytext(split_text[2],1,2) + ((copytext(split_text[2],2,3) == "E") ? "W" : "E")
if(flipped_build_type)
flipped = !flipped
var/cur_flip = initial(flipped) ? !flipped : flipped
if(cur_flip)
build_type = flipped_build_type
else
split_text[2] = ((copytext(split_text[2],1,2) == "N") ? "S" : "N") + copytext(split_text[2],2,3)
icon_state = jointext(split_text, "-")
build_type = initial(build_type)
icon_state = "[base_icon][flipped]"
else
setDir(turn(dir, 180))
// disposals-style flip and rotate verbs
/obj/structure/c_transit_tube/verb/rotate()
set name = "Rotate Tube CW"
set name = "Rotate Tube"
set category = "Object"
set src in view(1)
if(usr.incapacitated())
return
tube_turn(-90)
tube_rotate()
/obj/structure/c_transit_tube/AltClick(mob/user)
..()
@@ -64,18 +50,7 @@
return
if(!in_range(src, user))
return
else
rotate()
/obj/structure/c_transit_tube/verb/rotate_ccw()
set name = "Rotate Tube CCW"
set category = "Object"
set src in view(1)
if(usr.incapacitated())
return
tube_turn(90)
tube_rotate()
/obj/structure/c_transit_tube/verb/flip()
set name = "Flip"
@@ -84,25 +59,20 @@
if(usr.incapacitated())
return
tube_flip()
/obj/structure/c_transit_tube/proc/buildtube()
var/obj/structure/transit_tube/R = new/obj/structure/transit_tube(src.loc)
R.icon_state = src.icon_state
R.init_dirs()
R.generate_automatic_corners(R.tube_dirs)
return R
/obj/structure/c_transit_tube/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You start attaching the [name]...</span>"
src.add_fingerprint(user)
if(do_after(user, 40/I.toolspeed, target = src))
if(!src) return
add_fingerprint(user)
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 40*I.toolspeed, target = src))
if(qdeleted(src))
return
user << "<span class='notice'>You attach the [name].</span>"
var/obj/structure/transit_tube/R = src.buildtube()
src.transfer_fingerprints_to(R)
var/obj/structure/transit_tube/R = new build_type(loc, dir)
transfer_fingerprints_to(R)
qdel(src)
else
return ..()
@@ -110,51 +80,79 @@
// transit tube station
/obj/structure/c_transit_tube/station
name = "unattached through station"
icon = 'icons/obj/atmospherics/pipes/transit_tube_station.dmi'
icon_state = "closed"
icon_state = "closed_station0"
build_type = /obj/structure/transit_tube/station
flipped_build_type = /obj/structure/transit_tube/station/flipped
base_icon = "closed_station"
/obj/structure/c_transit_tube/station/tube_turn(var/angle)
src.setDir(turn(src.dir, angle))
/obj/structure/c_transit_tube/station/flipped
icon_state = "closed_station1"
flipped = 1
build_type = /obj/structure/transit_tube/station/flipped
flipped_build_type = /obj/structure/transit_tube/station
/obj/structure/c_transit_tube/station/tube_flip()
src.tube_turn(180)
/obj/structure/c_transit_tube/station/buildtube()
var/obj/structure/transit_tube/station/R = new/obj/structure/transit_tube/station(src.loc)
R.setDir(src.dir)
R.init_dirs()
return R
// reverser station, used for the terminus
/obj/structure/c_transit_tube/station/reverse
name = "unattached terminus station"
icon_state = "closed_terminus0"
build_type = /obj/structure/transit_tube/station/reverse
flipped_build_type = /obj/structure/transit_tube/station/reverse/flipped
base_icon = "closed_terminus"
/obj/structure/c_transit_tube/station/reverse/buildtube()
var/obj/structure/transit_tube/station/reverse/R = new/obj/structure/transit_tube/station/reverse(src.loc)
R.setDir(src.dir)
R.init_dirs()
return R
/obj/structure/c_transit_tube/station/reverse/flipped
icon_state = "closed_terminus1"
flipped = 1
build_type = /obj/structure/transit_tube/station/reverse/flipped
flipped_build_type = /obj/structure/transit_tube/station/reverse
// block, used after the terminus of a transit tube station, decorative only
// code-wise they're normal tubes but they're ~speshul~ because they care about the dir instead of the icon_state
// in that sense they're the same as stations and can reuse their flip and rotate verbs
/obj/structure/c_transit_tube/station/block
name = "unattached tube blocker"
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "Block"
/obj/structure/c_transit_tube/station/block/buildtube()
var/obj/structure/transit_tube/R = new/obj/structure/transit_tube(src.loc)
R.icon_state = src.icon_state
R.setDir(src.dir)
R.init_dirs()
return R
/obj/structure/c_transit_tube/crossing
icon_state = "crossing"
build_type = /obj/structure/transit_tube/crossing
/obj/structure/c_transit_tube/diagonal
icon_state = "diagonal"
build_type = /obj/structure/transit_tube/diagonal
/obj/structure/c_transit_tube/diagonal/crossing
icon_state = "diagonal_crossing"
build_type = /obj/structure/transit_tube/diagonal/crossing
/obj/structure/c_transit_tube/curved
icon_state = "curved0"
build_type = /obj/structure/transit_tube/curved
flipped_build_type = /obj/structure/transit_tube/curved/flipped
base_icon = "curved"
/obj/structure/c_transit_tube/curved/flipped
icon_state = "curved1"
build_type = /obj/structure/transit_tube/curved/flipped
flipped_build_type = /obj/structure/transit_tube/curved
flipped = 1
/obj/structure/c_transit_tube/junction
icon_state = "junction0"
build_type = /obj/structure/transit_tube/junction
flipped_build_type = /obj/structure/transit_tube/junction/flipped
base_icon = "junction"
/obj/structure/c_transit_tube/junction/flipped
icon_state = "junction1"
flipped = 1
build_type = /obj/structure/transit_tube/junction/flipped
flipped_build_type = /obj/structure/transit_tube/junction
//transit tube pod
//see station.dm for the logic
/obj/structure/c_transit_tube_pod
name = "unattached transit tube pod"
icon = 'icons/obj/atmospherics/pipes/transit_tube_pod.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "pod"
anchored = 0
density = 0
@@ -1,85 +1,104 @@
/obj/structure/transit_tube_pod
icon = 'icons/obj/atmospherics/pipes/transit_tube_pod.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "pod"
animate_movement = FORWARD_STEPS
anchored = 1
density = 1
layer = BELOW_OBJ_LAYER
var/moving = 0
var/datum/gas_mixture/air_contents = new()
/obj/structure/transit_tube_pod/New(loc)
..(loc)
..()
air_contents.assert_gases("o2", "n2")
air_contents.gases["o2"][MOLES] = MOLES_O2STANDARD * 2
air_contents.gases["n2"][MOLES] = MOLES_N2STANDARD
air_contents.temperature = T20C
// Give auto tubes time to align before trying to start moving
spawn(5)
follow_tube()
/obj/structure/transit_tube_pod/Destroy()
for(var/atom/movable/AM in contents)
AM.loc = loc
empty_pod()
return ..()
/obj/structure/transit_tube_pod/update_icon()
if(contents.len)
icon_state = "pod_occupied"
else
icon_state = "pod"
/obj/structure/transit_tube_pod/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/crowbar))
if(!moving)
for(var/obj/structure/transit_tube/station/T in loc)
return
if(src.contents.len)
playsound(src.loc, I.usesound, 50, 1)
if(contents.len)
user.visible_message("[user] empties \the [src].", "<span class='notice'>You empty \the [src].</span>")
src.empty()
return
empty_pod()
else
user << "<span class='notice'>You free \the [src].</span>"
var/obj/structure/c_transit_tube_pod/R = new/obj/structure/c_transit_tube_pod(src.loc)
src.transfer_fingerprints_to(R)
R.add_fingerprint(user)
qdel(src)
deconstruct(TRUE, user)
else
return ..()
/obj/structure/transit_tube_pod/container_resist()
var/mob/living/user = usr
/obj/structure/transit_tube_pod/deconstruct(disassembled = TRUE, mob/user)
if(!(flags & NODECONSTRUCT))
var/atom/location = get_turf(src)
if(user)
location = user.loc
add_fingerprint(user)
user.visible_message("[user] removes [src].", "<span class='notice'>You remove [src].</span>")
var/obj/structure/c_transit_tube_pod/R = new/obj/structure/c_transit_tube_pod(location)
transfer_fingerprints_to(R)
R.setDir(dir)
empty_pod(location)
qdel(src)
/obj/structure/transit_tube_pod/ex_act(severity, target)
..()
if(!qdeleted(src))
empty_pod()
/obj/structure/transit_tube_pod/contents_explosion(severity, target)
for(var/atom/movable/AM in contents)
AM.ex_act(severity, target)
/obj/structure/transit_tube_pod/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
deconstruct(FALSE)
/obj/structure/transit_tube_pod/container_resist(mob/living/user)
if(!moving)
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
user << "<span class='notice'>You start trying to escape from the pod...</span>"
if(do_after(user, 600, target = src))
user << "<span class='notice'>You manage to open the pod.</span>"
src.empty()
empty_pod()
/obj/structure/transit_tube_pod/proc/empty()
for(var/atom/movable/M in src.contents)
M.loc = src.loc
/obj/structure/transit_tube_pod/proc/empty_pod(atom/location)
if(!location)
location = get_turf(src)
for(var/atom/movable/M in contents)
M.forceMove(location)
update_icon()
/obj/structure/transit_tube_pod/Process_Spacemove()
if(moving) //No drifting while moving in the tubes
return 1
else return ..()
/obj/structure/transit_tube_pod/proc/follow_tube(reverse_launch)
/obj/structure/transit_tube_pod/proc/follow_tube()
set waitfor = 0
if(moving)
return
moving = 1
var/obj/structure/transit_tube/current_tube = null
var/next_dir
var/next_loc
var/last_delay = 0
var/exit_delay
if(reverse_launch)
setDir(turn(dir, 180) )// Back it up
for(var/obj/structure/transit_tube/tube in loc)
if(tube.has_exit(dir))
current_tube = tube
@@ -122,90 +141,38 @@
density = 1
moving = 0
var/obj/structure/transit_tube/TT = locate(/obj/structure/transit_tube) in loc
if(!TT || (!(dir in TT.tube_dirs) && !(turn(dir,180) in TT.tube_dirs))) //landed on a turf without transit tube or not in our direction
deconstruct(FALSE) //we automatically deconstruct the pod
// Should I return a copy here? If the caller edits or del()s the returned
// datum, there might be problems if I don't...
/obj/structure/transit_tube_pod/return_air()
var/datum/gas_mixture/GM = new()
GM.copy_from(air_contents)
return GM
return air_contents
// For now, copying what I found in an unused FEA file (and almost identical in a
// used ZAS file). Means that assume_air and remove_air don't actually alter the
// air contents.
/obj/structure/transit_tube_pod/assume_air(datum/gas_mixture/giver)
return air_contents.merge(giver)
/obj/structure/transit_tube_pod/remove_air(amount)
return air_contents.remove(amount)
// Called when a pod arrives at, and before a pod departs from a station,
// giving it a chance to mix its internal air supply with the turf it is
// currently on.
/obj/structure/transit_tube_pod/proc/mix_air()
var/datum/gas_mixture/environment = loc.return_air()
var/env_pressure = environment.return_pressure()
var/int_pressure = air_contents.return_pressure()
var/total_pressure = env_pressure + int_pressure
if(total_pressure == 0)
return
// Math here: Completely made up, not based on realistic equasions.
// Goal is to balance towards equal pressure, but ensure some gas
// transfer in both directions regardless.
// Feel free to rip this out and replace it with something better,
// I don't really know muhch about how gas transfer rates work in
// SS13.
var/transfer_in = max(0.1, 0.5 * (env_pressure - int_pressure) / total_pressure)
var/transfer_out = max(0.1, 0.3 * (int_pressure - env_pressure) / total_pressure)
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles() * transfer_in)
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles() * transfer_out)
loc.assume_air(from_int)
air_contents.merge(from_env)
// When the player moves, check if the pos is currently stopped at a station.
// if it is, check the direction. If the direction matches the direction of
// the station, try to exit. If the direction matches one of the station's
// tube directions, launch the pod in that direction.
/obj/structure/transit_tube_pod/relaymove(mob/mob, direction)
if(istype(mob, /mob) && mob.client)
// If the pod is not in a tube at all, you can get out at any time.
if(!(locate(/obj/structure/transit_tube) in loc))
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_perspective(null)
//if(moving && istype(loc, /turf/open/space))
// Todo: If you get out of a moving pod in space, you should move as well.
// Same direction as pod? Direcion you moved? Halfway between?
if(istype(mob) && mob.client)
if(!moving)
for(var/obj/structure/transit_tube/station/station in loc)
if(dir in station.directions())
if(!station.pod_moving)
if(direction == station.dir)
if(station.icon_state == "open")
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_perspective(null)
if(!station.pod_moving)
if(direction == turn(station.boarding_dir,180))
if(station.open_status == STATION_TUBE_OPEN)
mob.forceMove(loc)
update_icon()
else
station.open_animation()
else
station.open_animation()
else if(direction in station.directions())
setDir(direction)
station.launch_pod()
return
for(var/obj/structure/transit_tube/tube in loc)
if(dir in tube.directions())
if(tube.has_exit(direction))
else if(direction in station.tube_dirs)
setDir(direction)
return
station.launch_pod()
return
for(var/obj/structure/transit_tube/TT in loc)
if(dir in TT.tube_dirs)
if(TT.has_exit(direction))
setDir(direction)
return
+99
View File
@@ -0,0 +1,99 @@
/obj/structure/trap
name = "IT'S A TARP"
desc = "stepping on me is a guaranteed bad day"
icon = 'icons/obj/hand_of_god_structures.dmi'
icon_state = "trap"
density = 0
alpha = 30 //initially quite hidden when not "recharging"
var/last_trigger = 0
var/time_between_triggers = 600 //takes a minute to recharge
/obj/structure/trap/Crossed(atom/movable/AM)
if(last_trigger + time_between_triggers > world.time)
return
alpha = initial(alpha)
if(isliving(AM))
var/mob/living/L = AM
last_trigger = world.time
alpha = 200
trap_effect(L)
animate(src, alpha = initial(alpha), time = time_between_triggers)
/obj/structure/trap/examine(mob/user)
..()
if(!isliving(user)) //bad ghosts, stop trying to powergame from beyond the grave
return
user << "You reveal a trap!"
alpha = 200
animate(src, alpha = initial(alpha), time = time_between_triggers)
/obj/structure/trap/proc/trap_effect(mob/living/L)
return
/obj/structure/trap/stun
name = "shock trap"
desc = "A trap that will shock you, it will burn your flesh and render you immobile, You'd better avoid it."
icon_state = "trap-shock"
/obj/structure/trap/stun/trap_effect(mob/living/L)
L << "<span class='danger'><B>You are paralyzed from the intense shock!</B></span>"
L.Weaken(5)
var/turf/Lturf = get_turf(L)
new /obj/effect/particle_effect/sparks/electricity(Lturf)
new /obj/effect/particle_effect/sparks(Lturf)
/obj/structure/trap/fire
name = "flame trap"
desc = "A trap that will set you ablaze. You'd better avoid it."
icon_state = "trap-fire"
/obj/structure/trap/fire/trap_effect(mob/living/L)
L << "<span class='danger'><B>Spontaneous combustion!</B></span>"
L.Weaken(1)
var/turf/Lturf = get_turf(L)
new /obj/effect/hotspot(Lturf)
new /obj/effect/particle_effect/sparks(Lturf)
/obj/structure/trap/chill
name = "frost trap"
desc = "A trap that will chill you to the bone. You'd better avoid it."
icon_state = "trap-frost"
/obj/structure/trap/chill/trap_effect(mob/living/L)
L << "<span class='danger'><B>You're frozen solid!</B></span>"
L.Weaken(1)
L.bodytemperature -= 300
new /obj/effect/particle_effect/sparks(get_turf(L))
/obj/structure/trap/damage
name = "earth trap"
desc = "A trap that will summon a small earthquake, just for you. You'd better avoid it."
icon_state = "trap-earth"
/obj/structure/trap/damage/trap_effect(mob/living/L)
L << "<span class='danger'><B>The ground quakes beneath your feet!</B></span>"
L.Weaken(5)
L.adjustBruteLoss(35)
var/turf/Lturf = get_turf(L)
new /obj/effect/particle_effect/sparks(Lturf)
new /obj/structure/flora/rock(Lturf)
/obj/structure/trap/ward
name = "divine ward"
desc = "A divine barrier, It looks like you could destroy it with enough effort, or wait for it to dissipate..."
icon_state = "ward"
density = 1
time_between_triggers = 1200 //Exists for 2 minutes
/obj/structure/trap/ward/New()
..()
QDEL_IN(src, time_between_triggers)
+41 -19
View File
@@ -14,6 +14,7 @@
/obj/structure/toilet/New()
open = round(rand(0, 1))
update_icon()
..()
/obj/structure/toilet/attack_hand(mob/living/user)
@@ -23,7 +24,7 @@
swirlie.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='userdanger'>[user] slams the toilet seat onto your head!</span>", "<span class='italics'>You hear reverberating porcelain.</span>")
swirlie.adjustBruteLoss(5)
else if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
else if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
user.changeNext_move(CLICK_CD_MELEE)
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
@@ -74,17 +75,17 @@
if(istype(I, /obj/item/weapon/crowbar))
user << "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...</span>"
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30/I.toolspeed, target = src))
if(do_after(user, 30*I.toolspeed, target = src))
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "<span class='italics'>You hear grinding porcelain.</span>")
cistern = !cistern
update_icon()
else if(cistern)
if(user.a_intent != "harm")
if(I.w_class > 3)
if(user.a_intent != INTENT_HARM)
if(I.w_class > WEIGHT_CLASS_NORMAL)
user << "<span class='warning'>[I] does not fit!</span>"
return
if(w_items + I.w_class > 5)
if(w_items + I.w_class > WEIGHT_CLASS_HUGE)
user << "<span class='warning'>The cistern is full!</span>"
return
if(!user.drop_item())
@@ -118,7 +119,7 @@
hiddenitem = new /obj/item/weapon/reagent_containers/food/urinalcake
/obj/structure/urinal/attack_hand(mob/user)
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
if(GM.loc != get_turf(src))
@@ -139,7 +140,7 @@
else
hiddenitem.forceMove(get_turf(src))
user << "<span class='notice'>You fish [hiddenitem] out of the drain enclosure.</span>"
src.hiddenitem = null
hiddenitem = null
else
..()
@@ -147,7 +148,7 @@
if(istype(I, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You start to [exposed ? "screw the cap back into place" : "unscrew the cap to the drain protector"]...</span>"
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 20/I.toolspeed, target = src))
if(do_after(user, 20*I.toolspeed, target = src))
user.visible_message("[user] [exposed ? "screws the cap back into place" : "unscrew the cap to the drain protector"]!", "<span class='notice'>You [exposed ? "screw the cap back into place" : "unscrew the cap on the drain"]!</span>", "<span class='italics'>You hear metal and squishing noises.</span>")
exposed = !exposed
else if(exposed)
@@ -170,7 +171,7 @@
desc = "The noble urinal cake, protecting the station's pipes from the station's pee. Do not eat."
icon = 'icons/obj/items.dmi'
icon_state = "urinalcake"
w_class = 1
w_class = WEIGHT_CLASS_TINY
list_reagents = list("chlorine" = 3, "ammonia" = 1)
/obj/machinery/shower
@@ -209,7 +210,7 @@
else
wash_obj(G)
else
if(istype(loc, /turf/open))
if(isopenturf(loc))
var/turf/open/tile = loc
tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
@@ -219,7 +220,7 @@
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I]...</span>"
if(do_after(user, 50/I.toolspeed, target = src))
if(do_after(user, 50*I.toolspeed, target = src))
switch(watertemp)
if("normal")
watertemp = "freezing"
@@ -275,6 +276,7 @@
if(istype(O,/obj/item))
var/obj/item/I = O
I.acid_level = 0
I.extinguish()
@@ -295,10 +297,8 @@
var/mob/living/carbon/M = L
. = 1
check_heat(M)
if(M.r_hand)
M.r_hand.clean_blood()
if(M.l_hand)
M.l_hand.clean_blood()
for(var/obj/item/I in M.held_items)
I.clean_blood()
if(M.back)
if(M.back.clean_blood())
M.update_inv_back(0)
@@ -335,7 +335,7 @@
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform()
if(washgloves)
clean_blood()
H.clean_blood()
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes()
@@ -374,6 +374,9 @@
else
wash_obj(G)
/obj/machinery/shower/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 3)
qdel(src)
/obj/machinery/shower/proc/check_heat(mob/living/carbon/C)
if(watertemp == "freezing")
@@ -451,7 +454,7 @@
if(istype(O, /obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RG = O
if(RG.flags & OPENCONTAINER)
if(RG.container_type & OPENCONTAINER)
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
user << "<span class='notice'>You fill [RG] from [src].</span>"
return 1
@@ -489,7 +492,7 @@
if(O.flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
return
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
user << "<span class='notice'>You start washing [O]...</span>"
busy = 1
if(!do_after(user, 40, target = src))
@@ -497,12 +500,18 @@
return 1
busy = 0
O.clean_blood()
O.acid_level = 0
user.visible_message("<span class='notice'>[user] washes [O] using [src].</span>", \
"<span class='notice'>You wash [O] using [src].</span>")
return 1
else
return ..()
/obj/structure/sink/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 3)
qdel(src)
/obj/structure/sink/kitchen
name = "kitchen sink"
@@ -541,7 +550,6 @@
density = 0
var/open = TRUE
/obj/structure/curtain/proc/toggle()
open = !open
update_icon()
@@ -563,3 +571,17 @@
playsound(loc, 'sound/effects/curtain.ogg', 50, 1)
toggle()
..()
/obj/structure/curtain/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/cloth (loc, 3)
qdel(src)
/obj/structure/curtain/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
@@ -16,7 +16,7 @@
icon_state = "l_windoor_assembly01"
anchored = 0
density = 0
setDir(NORTH)
dir = NORTH
var/ini_dir
var/obj/item/weapon/electronics/airlock/electronics = null
@@ -26,13 +26,16 @@
var/facing = "l" //Does the windoor open to the left or right?
var/secure = 0 //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed
CanAtmosPass = ATMOS_PASS_PROC
/obj/structure/windoor_assembly/examine(mob/user)
..()
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
/obj/structure/windoor_assembly/New(dir=NORTH)
/obj/structure/windoor_assembly/New(loc, set_dir)
..()
if(set_dir)
dir = set_dir
ini_dir = dir
air_update_turf(1)
@@ -44,6 +47,7 @@
/obj/structure/windoor_assembly/Move()
var/turf/T = loc
..()
setDir(ini_dir)
move_update_air(T)
/obj/structure/windoor_assembly/update_icon()
@@ -54,8 +58,17 @@
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
return !density
else
return 1
if(istype(mover, /obj/structure/window))
var/obj/structure/window/W = mover
if(!valid_window_location(loc, W.ini_dir))
return FALSE
else if(istype(mover, /obj/structure/windoor_assembly))
var/obj/structure/windoor_assembly/W = mover
if(!valid_window_location(loc, W.ini_dir))
return FALSE
else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir))
return FALSE
return 1
/obj/structure/windoor_assembly/CanAtmosPass(turf/T)
if(get_dir(loc, T) == dir)
@@ -83,7 +96,7 @@
user.visible_message("[user] disassembles the windoor assembly.", "<span class='notice'>You start to disassemble the windoor assembly...</span>")
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You disassemble the windoor assembly.</span>"
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
@@ -104,7 +117,7 @@
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] secures the windoor assembly to the floor.", "<span class='notice'>You start to secure the windoor assembly to the floor...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(!src || anchored)
return
for(var/obj/machinery/door/window/WD in loc)
@@ -123,7 +136,7 @@
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] unsecures the windoor assembly to the floor.", "<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(!src || !anchored)
return
user << "<span class='notice'>You unsecure the windoor assembly.</span>"
@@ -136,13 +149,13 @@
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
else if(istype(W, /obj/item/stack/sheet/plasteel) && !secure)
var/obj/item/stack/sheet/plasteel/P = W
if(P.amount < 2)
if(P.get_amount() < 2)
user << "<span class='warning'>You need more plasteel to do this!</span>"
return
user << "<span class='notice'>You start to reinforce the windoor with plasteel...</span>"
if(do_after(user,40, target = src))
if(!src || secure)
if(!src || secure || P.get_amount() < 2)
return
P.use(2)
@@ -180,7 +193,7 @@
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "<span class='notice'>You start to cut the wires from airlock assembly...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(!src || state != "02")
return
@@ -218,7 +231,7 @@
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "<span class='notice'>You start to uninstall electronics from the airlock assembly...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(!src || !electronics)
return
user << "<span class='notice'>You remove the airlock electronics.</span>"
@@ -248,7 +261,7 @@
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "<span class='notice'>You start prying the windoor into the frame...</span>")
if(do_after(user, 40/W.toolspeed, target = src))
if(do_after(user, 40*W.toolspeed, target = src))
if(loc && electronics)
@@ -312,20 +325,21 @@
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
return
if (anchored)
if(anchored)
usr << "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>"
return 0
//if(state != "01")
//update_nearby_tiles(need_rebuild=1) //Compel updates before
return FALSE
setDir(turn(dir, 270))
var/target_dir = turn(dir, 270)
//if(state != "01")
//update_nearby_tiles(need_rebuild=1)
if(!valid_window_location(loc, target_dir))
usr << "<span class='warning'>[src] cannot be rotated in that direction!</span>"
return FALSE
setDir(target_dir)
ini_dir = dir
update_icon()
return
return TRUE
/obj/structure/windoor_assembly/AltClick(mob/user)
..()
+175 -178
View File
@@ -7,18 +7,21 @@
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1 //initially is 0 for tile smoothing
flags = ON_BORDER
var/maxhealth = 25
var/health = 0
max_integrity = 25
obj_integrity = 25
var/ini_dir = null
var/state = 0
var/reinf = 0
var/wtype = "glass"
var/fulltile = 0
// var/silicate = 0 // number of units of silicate
// var/icon/silicateIcon = null // the silicated icon
var/glass_type = /obj/item/stack/sheet/glass
var/glass_amount = 1
var/image/crack_overlay
var/list/debris = list()
can_be_unanchored = 1
resistance_flags = ACID_PROOF
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 100)
CanAtmosPass = ATMOS_PASS_PROC
/obj/structure/window/examine(mob/user)
..()
@@ -26,7 +29,7 @@
/obj/structure/window/New(Loc,re=0)
..()
health = maxhealth
obj_integrity = max_integrity
if(re)
reinf = re
if(reinf)
@@ -40,6 +43,7 @@
var/shards = 1
if(fulltile)
shards++
setDir()
var/rods = 0
if(reinf)
rods++
@@ -51,50 +55,46 @@
if(rods)
debris += new /obj/item/stack/rods(src, rods)
/obj/structure/window/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage, P.damage_type, 0)
/obj/structure/window/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
if(2)
shatter()
if(3)
take_damage(rand(25,75), BRUTE, 0)
/obj/structure/window/blob_act(obj/effect/blob/B)
shatter()
/obj/structure/window/narsie_act()
color = NARSIE_WINDOW_COLOUR
add_atom_colour(NARSIE_WINDOW_COLOUR, FIXED_COLOUR_PRIORITY)
for(var/obj/item/weapon/shard/shard in debris)
shard.color = NARSIE_WINDOW_COLOUR
shard.add_atom_colour(NARSIE_WINDOW_COLOUR, FIXED_COLOUR_PRIORITY)
/obj/structure/window/ratvar_act()
if(prob(20))
if(!fulltile)
new/obj/structure/window/reinforced/clockwork(get_turf(src), dir)
else
new/obj/structure/window/reinforced/clockwork/fulltile(get_turf(src))
qdel(src)
if(!fulltile)
new/obj/structure/window/reinforced/clockwork(get_turf(src), dir)
else
new/obj/structure/window/reinforced/clockwork/fulltile(get_turf(src))
qdel(src)
/obj/structure/window/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
shatter()
deconstruct(FALSE)
/obj/structure/window/setDir(direct)
if(!fulltile)
..()
else
..(FULLTILE_WINDOW_DIR)
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
if(dir == FULLTILE_WINDOW_DIR)
return 0 //full tile window, you can't move into it!
if(get_dir(loc, target) == dir)
return !density
else
return 1
if(istype(mover, /obj/structure/window))
var/obj/structure/window/W = mover
if(!valid_window_location(loc, W.ini_dir))
return FALSE
else if(istype(mover, /obj/structure/windoor_assembly))
var/obj/structure/windoor_assembly/W = mover
if(!valid_window_location(loc, W.ini_dir))
return FALSE
else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir))
return FALSE
return 1
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target)
if(istype(O) && O.checkpass(PASSGLASS))
@@ -103,35 +103,16 @@
return 0
return 1
/obj/structure/window/hitby(AM as mob|obj)
..()
var/tforce = 0
if(ismob(AM))
tforce = 40
else if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce
if(reinf)
tforce *= 0.25
take_damage(tforce)
/obj/structure/window/attack_tk(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
/obj/structure/window/attack_hulk(mob/living/carbon/human/user)
/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(!can_be_reached(user))
return
..(user, 1)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
add_fingerprint(user)
take_damage(50)
return 1
return 1
. = ..()
/obj/structure/window/attack_hand(mob/user)
if(!can_be_reached(user))
@@ -145,42 +126,24 @@
return attack_hand(user)
/obj/structure/window/proc/attack_generic(mob/user, damage = 0, damage_type = BRUTE) //used by attack_alien, attack_animal, and attack_slime
/obj/structure/window/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime
if(!can_be_reached(user))
return
user.do_attack_animation(src)
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
take_damage(damage, damage_type)
/obj/structure/window/attack_alien(mob/living/user)
attack_generic(user, 15)
/obj/structure/window/attack_animal(mob/living/simple_animal/M)
if(!M.melee_damage_upper)
return
attack_generic(M, M.melee_damage_upper, M.melee_damage_type)
/obj/structure/window/attack_slime(mob/living/simple_animal/slime/user)
if(!user.is_adult)
return
attack_generic(user, rand(10, 15))
..()
/obj/structure/window/attackby(obj/item/I, mob/living/user, params)
if(!can_be_reached(user))
return 1 //skip the afterattack
add_fingerprint(user)
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == "help")
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP)
var/obj/item/weapon/weldingtool/WT = I
if(health < maxhealth)
if(obj_integrity < max_integrity)
if(WT.remove_fuel(0,user))
user << "<span class='notice'>You begin repairing [src]...</span>"
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
if(do_after(user, 40/I.toolspeed, target = src))
health = maxhealth
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40*I.toolspeed, target = src))
obj_integrity = max_integrity
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
update_nearby_icons()
user << "<span class='notice'>You repair [src].</span>"
@@ -199,7 +162,7 @@
else if(!reinf)
user << (anchored ? "<span class='notice'>You begin to unscrew the window from the floor...</span>" : "<span class='notice'>You begin to screw the window to the floor...</span>")
if(do_after(user, 30/I.toolspeed, target = src))
if(do_after(user, 30*I.toolspeed, target = src))
if(reinf && (state == 1 || state == 2))
//If state was unfastened, fasten it, else do the reverse
state = (state == 1 ? 2 : 1)
@@ -217,7 +180,7 @@
else if (istype(I, /obj/item/weapon/crowbar) && reinf && (state == 0 || state == 1))
user << (state == 0 ? "<span class='notice'>You begin to lever the window into the frame...</span>" : "<span class='notice'>You begin to lever the window out of the frame...</span>")
playsound(loc, I.usesound, 75, 1)
if(do_after(user, 40/I.toolspeed, target = src))
if(do_after(user, 40*I.toolspeed, target = src))
//If state was out of frame, put into frame, else do the reverse
state = (state == 0 ? 1 : 0)
user << (state == 1 ? "<span class='notice'>You pry the window into the frame.</span>" : "<span class='notice'>You pry the window out of the frame.</span>")
@@ -226,23 +189,12 @@
else if(istype(I, /obj/item/weapon/wrench) && !anchored)
playsound(loc, I.usesound, 75, 1)
user << "<span class='notice'> You begin to disassemble [src]...</span>"
if(do_after(user, 40/I.toolspeed, target = src))
if(do_after(user, 40*I.toolspeed, target = src))
if(qdeleted(src))
return
if(reinf)
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
RG.add_fingerprint(user)
if(fulltile) //fulltiles drop two panes
RG = new (user.loc)
RG.add_fingerprint(user)
else
var/obj/item/stack/sheet/glass/G = new (user.loc)
G.add_fingerprint(user)
if(fulltile)
G = new (user.loc)
G.add_fingerprint(user)
var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
G.add_fingerprint(user)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You successfully disassemble [src].</span>"
@@ -250,14 +202,10 @@
return
return ..()
/obj/structure/window/attacked_by(obj/item/I, mob/living/user)
..()
take_damage(I.force, I.damtype)
/obj/structure/window/mech_melee_attack(obj/mecha/M)
if(..())
take_damage(M.force, M.damtype)
if(!can_be_reached())
return
..()
/obj/structure/window/proc/can_be_reached(mob/user)
@@ -268,35 +216,35 @@
return 0
return 1
/obj/structure/window/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
if(reinf)
damage *= 0.5
/obj/structure/window/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
. = ..()
if(.) //received damage
update_nearby_icons()
/obj/structure/window/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1)
if(damage_amount)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
if(sound_effect)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
else
return
health -= damage
update_nearby_icons()
if(health <= 0)
shatter()
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/window/proc/shatter()
/obj/structure/window/deconstruct(disassembled = TRUE)
if(qdeleted(src))
return
playsound(src, "shatter", 70, 1)
var/turf/T = loc
if(!disassembled)
playsound(src, "shatter", 70, 1)
var/turf/T = loc
if(!(flags & NODECONSTRUCT))
for(var/i in debris)
var/obj/item/I = i
if(!(flags & NODECONSTRUCT))
for(var/i in debris)
var/obj/item/I = i
I.loc = T
transfer_fingerprints_to(I)
I.loc = T
transfer_fingerprints_to(I)
qdel(src)
update_nearby_icons()
@@ -310,14 +258,19 @@
if(anchored)
usr << "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>"
return 0
return FALSE
setDir(turn(dir, 90))
// updateSilicate()
var/target_dir = turn(dir, 90)
if(!valid_window_location(loc, target_dir))
usr << "<span class='warning'>[src] cannot be rotated in that direction!</span>"
return FALSE
setDir(target_dir)
air_update_turf(1)
ini_dir = dir
add_fingerprint(usr)
return
return TRUE
/obj/structure/window/verb/revrotate()
@@ -330,14 +283,19 @@
if(anchored)
usr << "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>"
return 0
return FALSE
setDir(turn(dir, 270))
// updateSilicate()
var/target_dir = turn(dir, 270)
if(!valid_window_location(loc, target_dir))
usr << "<span class='warning'>[src] cannot be rotated in that direction!</span>"
return FALSE
setDir(target_dir)
air_update_turf(1)
ini_dir = dir
add_fingerprint(usr)
return
return TRUE
/obj/structure/window/AltClick(mob/user)
..()
@@ -349,21 +307,6 @@
else
revrotate()
/*
/obj/structure/window/proc/updateSilicate() what do you call a syndicate silicon?
if(silicateIcon && silicate)
icon = initial(icon)
var/icon/I = icon(icon,icon_state,dir)
var/r = (silicate / 100) + 1
var/g = (silicate / 70) + 1
var/b = (silicate / 50) + 1
I.SetIntensity(r,g,b)
icon = I
silicateIcon = I
*/
/obj/structure/window/Destroy()
density = 0
air_update_turf(1)
@@ -380,7 +323,7 @@
/obj/structure/window/CanAtmosPass(turf/T)
if(get_dir(loc, T) == dir)
return !density
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
if(dir == FULLTILE_WINDOW_DIR)
return !density
return 1
@@ -396,7 +339,7 @@
if(!fulltile)
return
var/ratio = health / maxhealth
var/ratio = obj_integrity / max_integrity
ratio = Ceiling(ratio*4) * 25
if(smooth)
@@ -410,7 +353,7 @@
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + (reinf ? 1600 : 800))
take_damage(round(exposed_volume / 100), BURN, 0)
take_damage(round(exposed_volume / 100), BURN, 0, 0)
..()
/obj/structure/window/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
@@ -419,17 +362,25 @@
/obj/structure/window/CanAStarPass(ID, to_dir)
if(!density)
return 1
if((dir == SOUTHWEST) || (dir == to_dir))
if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir))
return 0
return 1
/obj/structure/window/unanchored
anchored = FALSE
/obj/structure/window/reinforced
name = "reinforced window"
icon_state = "rwindow"
reinf = 1
maxhealth = 50
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
max_integrity = 50
explosion_block = 1
glass_type = /obj/item/stack/sheet/rglass
/obj/structure/window/reinforced/unanchored
anchored = FALSE
/obj/structure/window/reinforced/tinted
name = "tinted window"
@@ -441,60 +392,73 @@
icon_state = "fwindow"
/* Full Tile Windows (more health) */
/* Full Tile Windows (more obj_integrity) */
/obj/structure/window/fulltile
icon = 'icons/obj/smooth_structures/window.dmi'
icon_state = "window"
dir = NORTHEAST
maxhealth = 50
dir = FULLTILE_WINDOW_DIR
max_integrity = 50
fulltile = 1
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
glass_amount = 2
/obj/structure/window/fulltile/unanchored
anchored = FALSE
/obj/structure/window/reinforced/fulltile
icon = 'icons/obj/smooth_structures/reinforced_window.dmi'
icon_state = "r_window"
dir = NORTHEAST
maxhealth = 100
dir = FULLTILE_WINDOW_DIR
max_integrity = 100
fulltile = 1
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
level = 3
glass_amount = 2
/obj/structure/window/reinforced/fulltile/unanchored
anchored = FALSE
/obj/structure/window/reinforced/tinted/fulltile
icon = 'icons/obj/smooth_structures/tinted_window.dmi'
icon_state = "tinted_window"
dir = NORTHEAST
dir = FULLTILE_WINDOW_DIR
fulltile = 1
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile/)
level = 3
glass_amount = 2
/obj/structure/window/reinforced/fulltile/ice
icon = 'icons/obj/smooth_structures/rice_window.dmi'
icon_state = "ice_window"
maxhealth = 150
max_integrity = 150
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/reinforced/fulltile/ice)
level = 3
glass_amount = 2
/obj/structure/window/shuttle
name = "shuttle window"
desc = "A reinforced, air-locked pod window."
icon = 'icons/obj/smooth_structures/shuttle_window.dmi'
icon_state = "shuttle_window"
dir = NORTHEAST
maxhealth = 100
dir = FULLTILE_WINDOW_DIR
max_integrity = 100
wtype = "shuttle"
fulltile = 1
reinf = 1
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
smooth = SMOOTH_TRUE
canSmoothWith = null
explosion_block = 1
level = 3
glass_type = /obj/item/stack/sheet/rglass
glass_amount = 2
/obj/structure/window/shuttle/narsie_act()
color = "#3C3434"
add_atom_colour("#3C3434", FIXED_COLOUR_PRIORITY)
/obj/structure/window/shuttle/tinted
opacity = TRUE
@@ -504,27 +468,50 @@
desc = "A paper-thin pane of translucent yet reinforced brass."
icon = 'icons/obj/smooth_structures/clockwork_window.dmi'
icon_state = "clockwork_window_single"
maxhealth = 100
resistance_flags = FIRE_PROOF | ACID_PROOF
max_integrity = 80
armor = list(melee = 60, bullet = 25, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
glass_type = /obj/item/stack/tile/brass
glass_amount = 1
var/made_glow = FALSE
/obj/structure/window/reinforced/clockwork/New(loc, direct)
..()
if(!fulltile)
var/obj/effect/E = PoolOrNew(/obj/effect/overlay/temp/ratvar/window/single, get_turf(src))
if(direct)
setDir(direct)
E.setDir(direct)
else
PoolOrNew(/obj/effect/overlay/temp/ratvar/window, get_turf(src))
for(var/obj/item/I in debris)
debris -= I
qdel(I)
debris += new/obj/item/clockwork/component/vanguard_cogwheel(src)
var/amount_of_gears = 2
if(!fulltile)
if(direct)
var/obj/effect/E = new /obj/effect/overlay/temp/ratvar/window/single(get_turf(src))
setDir(direct)
ini_dir = direct
E.setDir(direct)
made_glow = TRUE
else
new /obj/effect/overlay/temp/ratvar/window(get_turf(src))
made_glow = TRUE
amount_of_gears = 4
for(var/i in 1 to amount_of_gears)
debris += new/obj/item/clockwork/alloy_shards/medium/gear_bit()
change_construction_value(fulltile ? 2 : 1)
/obj/structure/window/reinforced/clockwork/setDir(direct)
if(!made_glow)
var/obj/effect/E = new /obj/effect/overlay/temp/ratvar/window/single(get_turf(src))
E.setDir(direct)
made_glow = TRUE
..()
/obj/structure/window/reinforced/clockwork/Destroy()
change_construction_value(fulltile ? -2 : -1)
return ..()
/obj/structure/window/reinforced/clockwork/ratvar_act()
health = maxhealth
update_icon()
return 0
if(ratvar_awakens)
obj_integrity = max_integrity
update_icon()
/obj/structure/window/reinforced/clockwork/narsie_act()
take_damage(rand(25, 75), BRUTE)
@@ -532,11 +519,21 @@
var/previouscolor = color
color = "#960000"
animate(src, color = previouscolor, time = 8)
addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8)
/obj/structure/window/reinforced/clockwork/unanchored
anchored = FALSE
/obj/structure/window/reinforced/clockwork/fulltile
icon_state = "clockwork_window"
smooth = SMOOTH_TRUE
canSmoothWith = null
fulltile = 1
dir = NORTHEAST
maxhealth = 150
dir = FULLTILE_WINDOW_DIR
max_integrity = 120
level = 3
glass_amount = 2
made_glow = TRUE
/obj/structure/window/reinforced/clockwork/fulltile/unanchored
anchored = FALSE