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:
@@ -1,3 +1,6 @@
|
||||
/*ALL DNA, SPECIES, AND GENETICS-RELATED DEFINES GO HERE*/
|
||||
|
||||
#define CHECK_DNA_AND_SPECIES(C) if((!(C.dna)) || (!(C.dna.species))) return
|
||||
|
||||
//Defines copying names of mutations in all cases, make sure to change this if you change mutation's name
|
||||
#define HULK "Hulk"
|
||||
@@ -61,23 +64,25 @@
|
||||
#define DNA_HAIR_COLOR_BLOCK 1
|
||||
#define DNA_FACIAL_HAIR_COLOR_BLOCK 2
|
||||
#define DNA_SKIN_TONE_BLOCK 3
|
||||
#define DNA_EYE_COLOR_TWO_BLOCK 4
|
||||
#define DNA_EYE_COLOR_SWITCH_BLOCK 5
|
||||
#define DNA_EYE_COLOR_BLOCK 6
|
||||
#define DNA_GENDER_BLOCK 7
|
||||
#define DNA_FACIAL_HAIR_STYLE_BLOCK 8
|
||||
#define DNA_HAIR_STYLE_BLOCK 9
|
||||
#define DNA_COLOR_ONE_BLOCK 10
|
||||
#define DNA_COLOR_TWO_BLOCK 11
|
||||
#define DNA_COLOR_THR_BLOCK 12
|
||||
#define DNA_COLOR_SWITCH_BLOCK 13
|
||||
#define DNA_EYE_COLOR_BLOCK 4
|
||||
#define DNA_GENDER_BLOCK 5
|
||||
#define DNA_FACIAL_HAIR_STYLE_BLOCK 6
|
||||
#define DNA_HAIR_STYLE_BLOCK 7
|
||||
#define DNA_EYE_COLOR_TWO_BLOCK 8
|
||||
#define DNA_EYE_COLOR_SWITCH_BLOCK 9
|
||||
#define DNA_EYE_COLOR_BLOCK 10
|
||||
#define DNA_COLOR_ONE_BLOCK 11
|
||||
#define DNA_COLOR_TWO_BLOCK 12
|
||||
#define DNA_COLOR_THR_BLOCK 13
|
||||
#define DNA_COLOR_SWITCH_BLOCK 14
|
||||
#define DNA_COLOR_SWITCH_MAX 7 //must be (2^(n+1))-1
|
||||
#define DNA_COCK_BLOCK 14
|
||||
#define DNA_MUTANTRACE_BLOCK 15
|
||||
#define DNA_MUTANTTAIL_BLOCK 16
|
||||
#define DNA_MUTANTWING_BLOCK 17
|
||||
#define DNA_WINGCOLOR_BLOCK 18
|
||||
#define DNA_TAUR_BLOCK 19
|
||||
#define DNA_COCK_BLOCK 15
|
||||
#define DNA_MUTANTRACE_BLOCK 16
|
||||
#define DNA_MUTANTTAIL_BLOCK 17
|
||||
#define DNA_MUTANTWING_BLOCK 18
|
||||
#define DNA_WINGCOLOR_BLOCK 19
|
||||
//#define DNA_SUBSPECIES_BLOCK 20
|
||||
//#define DNA_TAUR_BLOCK 21 //Taurs will be tails for now, easier - Pooj
|
||||
|
||||
#define DNA_STRUC_ENZYMES_BLOCKS 19
|
||||
#define DNA_UNIQUE_ENZYMES_LEN 32
|
||||
@@ -93,26 +98,36 @@
|
||||
#define TR_KEEPSRC 128
|
||||
#define TR_KEEPORGANS 256
|
||||
|
||||
//Organ stuff, It's here because "Genetics" is the most relevant file for organs and bodyparts
|
||||
#define ORGAN_ORGANIC 1
|
||||
#define ORGAN_ROBOTIC 2
|
||||
|
||||
//Nutrition levels for humans. No idea where else to put it
|
||||
#define NUTRITION_LEVEL_FAT 600
|
||||
#define NUTRITION_LEVEL_FULL 550
|
||||
#define NUTRITION_LEVEL_WELL_FED 450
|
||||
#define NUTRITION_LEVEL_FED 350
|
||||
#define NUTRITION_LEVEL_HUNGRY 250
|
||||
#define NUTRITION_LEVEL_STARVING 150
|
||||
|
||||
#define CLONER_FRESH_CLONE "fresh"
|
||||
#define CLONER_MATURE_CLONE "mature"
|
||||
|
||||
//Blood levels
|
||||
#define BLOOD_VOLUME_MAXIMUM 2000
|
||||
#define BLOOD_VOLUME_SLIME_SPLIT 1120
|
||||
#define BLOOD_VOLUME_NORMAL 560
|
||||
#define BLOOD_VOLUME_SAFE 501
|
||||
#define BLOOD_VOLUME_OKAY 336
|
||||
#define BLOOD_VOLUME_BAD 224
|
||||
#define BLOOD_VOLUME_SURVIVE 122
|
||||
//species traits for mutantraces
|
||||
#define MUTCOLORS 1
|
||||
#define HAIR 2
|
||||
#define FACEHAIR 3
|
||||
#define EYECOLOR 4
|
||||
#define LIPS 5
|
||||
#define RESISTHOT 6
|
||||
#define RESISTCOLD 7
|
||||
#define RESISTPRESSURE 8
|
||||
#define RADIMMUNE 9
|
||||
#define NOBREATH 10
|
||||
#define NOGUNS 11
|
||||
#define NOBLOOD 12
|
||||
#define NOFIRE 13
|
||||
#define VIRUSIMMUNE 14
|
||||
#define PIERCEIMMUNE 15
|
||||
#define NOTRANSSTING 16
|
||||
#define MUTCOLORS_PARTSONLY 17 //Used if we want the mutant colour to be only used by mutant bodyparts. Don't combine this with MUTCOLORS, or it will be useless.
|
||||
#define NODISMEMBER 18
|
||||
#define NOHUNGER 19
|
||||
#define NOCRITDAMAGE 20
|
||||
#define NOZOMBIE 21
|
||||
#define EASYDISMEMBER 22
|
||||
#define EASYLIMBATTACHMENT 23
|
||||
#define TOXINLOVER 24
|
||||
#define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi)
|
||||
#define MUTCOLORS2 26
|
||||
#define MUTCOLORS3 27
|
||||
//#define SUBSPECIES 28
|
||||
@@ -1,12 +1,12 @@
|
||||
#define MC_TICK_CHECK ( world.tick_usage > CURRENT_TICKLIMIT ? pause() : 0 )
|
||||
#define MC_TICK_CHECK ( ( world.tick_usage > CURRENT_TICKLIMIT || src.state != SS_RUNNING ) ? pause() : 0 )
|
||||
// Used to smooth out costs to try and avoid oscillation.
|
||||
#define MC_AVERAGE_FAST(average, current) (0.7 * (average) + 0.3 * (current))
|
||||
#define MC_AVERAGE(average, current) (0.8 * (average) + 0.2 * (current))
|
||||
#define MC_AVERAGE_SLOW(average, current) (0.9 * (average) + 0.1 * (current))
|
||||
#define NEW_SS_GLOBAL(varname) if(varname != src){if(istype(varname)){Recover();qdel(varname);}varname = src;}
|
||||
|
||||
#define START_PROCESSING(Processor, Datum) if (!Datum.isprocessing) Datum.isprocessing = 1;Processor.processing += Datum
|
||||
#define STOP_PROCESSING(Processor, Datum) if (Datum.isprocessing) Datum.isprocessing = 0;Processor.processing -= Datum
|
||||
#define START_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = 1;Processor.processing += Datum}
|
||||
#define STOP_PROCESSING(Processor, Datum) Datum.isprocessing = 0;Processor.processing -= Datum
|
||||
|
||||
//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)
|
||||
|
||||
@@ -44,6 +44,23 @@
|
||||
// This flag overrides SS_KEEP_TIMING
|
||||
#define SS_POST_FIRE_TIMING 128
|
||||
|
||||
//SUBSYSTEM STATES
|
||||
#define SS_IDLE 0 //aint doing shit.
|
||||
#define SS_QUEUED 1 //queued to run
|
||||
#define SS_RUNNING 2 //actively running
|
||||
#define SS_PAUSED 3 //paused by mc_tick_check
|
||||
#define SS_SLEEPING 4 //fire() slept.
|
||||
#define SS_PAUSING 5 //in the middle of pausing
|
||||
|
||||
|
||||
//Timing subsystem
|
||||
#define GLOBAL_PROC "some_magic_bullshit"
|
||||
//Don't run if there is an identical unique timer active
|
||||
#define TIMER_UNIQUE 0x1
|
||||
//For unique timers: Replace the old timer rather then not start this one
|
||||
#define TIMER_OVERRIDE 0x2
|
||||
//Timing should be based on how timing progresses on clients, not the sever.
|
||||
// tracking this is more expensive,
|
||||
// should only be used in conjuction with things that have to progress client side, such as animate() or sound()
|
||||
#define TIMER_CLIENT_TIME 0x4
|
||||
//Timer can be stopped using deltimer()
|
||||
#define TIMER_STOPPABLE 0x8
|
||||
+20
-1
@@ -14,7 +14,7 @@
|
||||
#define BANTYPE_JOB_PERMA 3
|
||||
#define BANTYPE_JOB_TEMP 4
|
||||
#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
|
||||
#define BANTYPE_APPEARANCE 6
|
||||
|
||||
#define BANTYPE_ADMIN_PERMA 7
|
||||
#define BANTYPE_ADMIN_TEMP 8
|
||||
#define BANTYPE_ANY_JOB 9 //used to remove jobbans
|
||||
@@ -36,3 +36,22 @@
|
||||
#define R_SPAWN 4096
|
||||
|
||||
#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
|
||||
|
||||
#define ADMIN_QUE(user) "(<a href='?_src_=holder;adminmoreinfo=\ref[user]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;adminplayeropts=\ref[user]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;Vars=\ref[atom]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;subtlemessage=\ref[user]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;traitor=\ref[user]'>TP</a>)"
|
||||
#define ADMIN_BSA(user) "(<a href='?_src_=holder;BlueSpaceArtillery=\ref[user]'>BSA</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;boot2=\ref[user]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;CentcommReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;SyndicateReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;adminspawncookie=\ref[user]'>SC</a>)"
|
||||
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
|
||||
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
|
||||
#define ADMIN_SET_SD_CODE "(<a href='?_src_=holder;set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]"
|
||||
#define ADMIN_JMP(src) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
|
||||
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
|
||||
@@ -163,3 +163,10 @@
|
||||
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
|
||||
#define TANK_MIN_RELEASE_PRESSURE 0
|
||||
#define TANK_DEFAULT_RELEASE_PRESSURE 16
|
||||
|
||||
|
||||
#define ATMOS_PASS_YES 1
|
||||
#define ATMOS_PASS_NO 0
|
||||
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
|
||||
#define ATMOS_PASS_DENSITY -2 //just check density
|
||||
#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
|
||||
@@ -0,0 +1,46 @@
|
||||
// for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list
|
||||
// note: if you add more HUDs, even for non-human atoms, make sure to use unique numbers for the defines!
|
||||
// /datum/atom_hud expects these to be unique
|
||||
// these need to be strings in order to make them associative lists
|
||||
#define HEALTH_HUD "1" // dead, alive, sick, health status
|
||||
#define STATUS_HUD "2" // a simple line rounding the mob's number health
|
||||
#define ID_HUD "3" // the job asigned to your ID
|
||||
#define WANTED_HUD "4" // wanted, released, parroled, security status
|
||||
#define IMPLOYAL_HUD "5" // loyality implant
|
||||
#define IMPCHEM_HUD "6" // chemical implant
|
||||
#define IMPTRACK_HUD "7" // tracking implant
|
||||
#define DIAG_STAT_HUD "8" // Silicon/Mech Status
|
||||
#define DIAG_HUD "9" // Silicon health bar
|
||||
#define DIAG_BATT_HUD "10"// Borg/Mech power meter
|
||||
#define DIAG_MECH_HUD "11"// Mech health bar
|
||||
#define DIAG_BOT_HUD "12"// Bot HUDs
|
||||
#define DIAG_TRACK_HUD "13"// Mech tracking beacon
|
||||
//for antag huds. these are used at the /mob level
|
||||
#define ANTAG_HUD "14"
|
||||
|
||||
//data HUD (medhud, sechud) defines
|
||||
//Don't forget to update human/New() if you change these!
|
||||
#define DATA_HUD_SECURITY_BASIC 1
|
||||
#define DATA_HUD_SECURITY_ADVANCED 2
|
||||
#define DATA_HUD_MEDICAL_BASIC 3
|
||||
#define DATA_HUD_MEDICAL_ADVANCED 4
|
||||
#define DATA_HUD_DIAGNOSTIC 5
|
||||
//antag HUD defines
|
||||
#define ANTAG_HUD_CULT 6
|
||||
#define ANTAG_HUD_REV 7
|
||||
#define ANTAG_HUD_OPS 8
|
||||
#define ANTAG_HUD_WIZ 9
|
||||
#define ANTAG_HUD_SHADOW 10
|
||||
#define ANTAG_HUD_TRAITOR 11
|
||||
#define ANTAG_HUD_NINJA 12
|
||||
#define ANTAG_HUD_CHANGELING 13
|
||||
#define ANTAG_HUD_ABDUCTOR 14
|
||||
#define ANTAG_HUD_DEVIL 15
|
||||
#define ANTAG_HUD_SINTOUCHED 16
|
||||
#define ANTAG_HUD_SOULLESS 17
|
||||
#define ANTAG_HUD_CLOCKWORK 18
|
||||
|
||||
// Notification action types
|
||||
#define NOTIFY_JUMP "jump"
|
||||
#define NOTIFY_ATTACK "attack"
|
||||
#define NOTIFY_ORBIT "orbit"
|
||||
@@ -0,0 +1,4 @@
|
||||
#define GLOBAL_PROC "some_magic_bullshit"
|
||||
|
||||
#define CALLBACK new /datum/callback
|
||||
#define INVOKE_ASYNC ImmediateInvokeAsync
|
||||
@@ -0,0 +1,95 @@
|
||||
//component id defines
|
||||
#define BELLIGERENT_EYE "belligerent_eye"
|
||||
#define VANGUARD_COGWHEEL "vanguard_cogwheel"
|
||||
#define GEIS_CAPACITOR "geis_capacitor"
|
||||
#define REPLICANT_ALLOY "replicant_alloy"
|
||||
#define HIEROPHANT_ANSIBLE "hierophant_ansible"
|
||||
|
||||
var/global/clockwork_construction_value = 0 //The total value of all structures built by the clockwork cult
|
||||
var/global/clockwork_caches = 0 //How many clockwork caches exist in the world (not each individual)
|
||||
var/global/clockwork_daemons = 0 //How many daemons exist in the world
|
||||
var/global/list/clockwork_generals_invoked = list("nezbere" = FALSE, "sevtug" = FALSE, "nzcrentr" = FALSE, "inath-neq" = FALSE) //How many generals have been recently invoked
|
||||
var/global/list/all_clockwork_objects = list() //All clockwork items, structures, and effects in existence
|
||||
var/global/list/all_clockwork_mobs = list() //All clockwork SERVANTS (not creatures) in existence
|
||||
var/global/list/clockwork_component_cache = list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 0, HIEROPHANT_ANSIBLE = 0) //The pool of components that caches draw from
|
||||
var/global/ratvar_awakens = 0 //If Ratvar has been summoned; not a boolean, for proper handling of multiple ratvars
|
||||
var/global/clockwork_gateway_activated = FALSE //if a gateway to the celestial derelict has ever been successfully activated
|
||||
var/global/list/all_scripture = list() //a list containing scripture instances; not used to track existing scripture
|
||||
|
||||
//Scripture tiers and requirements; peripherals should never be used
|
||||
#define SCRIPTURE_PERIPHERAL "Peripheral"
|
||||
#define SCRIPTURE_DRIVER "Driver"
|
||||
#define SCRIPTURE_SCRIPT "Script"
|
||||
#define SCRIPT_SERVANT_REQ 5
|
||||
#define SCRIPT_CACHE_REQ 1
|
||||
#define SCRIPTURE_APPLICATION "Application"
|
||||
#define APPLICATION_SERVANT_REQ 8
|
||||
#define APPLICATION_CACHE_REQ 3
|
||||
#define APPLICATION_CV_REQ 100
|
||||
#define SCRIPTURE_REVENANT "Revenant"
|
||||
#define REVENANT_SERVANT_REQ 10
|
||||
#define REVENANT_CACHE_REQ 4
|
||||
#define REVENANT_CV_REQ 200
|
||||
#define SCRIPTURE_JUDGEMENT "Judgement"
|
||||
#define JUDGEMENT_SERVANT_REQ 12
|
||||
#define JUDGEMENT_CACHE_REQ 5
|
||||
#define JUDGEMENT_CV_REQ 300
|
||||
|
||||
//general component/cooldown things
|
||||
#define SLAB_PRODUCTION_TIME 900 //how long(deciseconds) slabs require to produce a single component; defaults to 1 minute 30 seconds
|
||||
|
||||
#define SLAB_SERVANT_SLOWDOWN 300 //how much each servant above 5 slows down slab-based generation; defaults to 30 seconds per sevant
|
||||
|
||||
#define SLAB_SLOWDOWN_MAXIMUM 2700 //maximum slowdown from additional servants; defaults to 4 minutes 30 seconds
|
||||
|
||||
#define CACHE_PRODUCTION_TIME 900 //how long(deciseconds) caches require to produce a component; defaults to 1 minute 30 seconds
|
||||
|
||||
#define LOWER_PROB_PER_COMPONENT 10 //how much each component in the cache reduces the weight of getting another of that component type
|
||||
|
||||
#define MAX_COMPONENTS_BEFORE_RAND (10*LOWER_PROB_PER_COMPONENT) //the number of each component, times LOWER_PROB_PER_COMPONENT, you need to have before component generation will become random
|
||||
|
||||
#define CLOCKWORK_GENERAL_COOLDOWN 3000 //how long clockwork generals go on cooldown after use, defaults to 5 minutes
|
||||
|
||||
//clockcult power defines
|
||||
#define MIN_CLOCKCULT_POWER 25 //the minimum amount of power clockcult machines will handle gracefully
|
||||
|
||||
#define CLOCKCULT_POWER_UNIT (MIN_CLOCKCULT_POWER*100) //standard power amount for clockwork proselytizer costs
|
||||
|
||||
#define POWER_STANDARD (CLOCKCULT_POWER_UNIT*0.2) //how much power is in anything else; doesn't matter as much as the following
|
||||
|
||||
#define POWER_FLOOR (CLOCKCULT_POWER_UNIT*0.1) //how much power is in a clockwork floor, determines the cost of clockwork floor production
|
||||
|
||||
#define POWER_WALL_MINUS_FLOOR (CLOCKCULT_POWER_UNIT*0.4) //how much power is in a clockwork wall, determines the cost of clockwork wall production
|
||||
|
||||
#define POWER_GEAR (CLOCKCULT_POWER_UNIT*0.3) //how much power is in a wall gear, minus the brass from the wall
|
||||
|
||||
#define POWER_WALL_TOTAL (POWER_WALL_MINUS_FLOOR+POWER_FLOOR) //how much power is in a clockwork wall and the floor under it
|
||||
|
||||
#define POWER_ROD (CLOCKCULT_POWER_UNIT*0.01) //how much power is in one rod
|
||||
|
||||
#define POWER_METAL (CLOCKCULT_POWER_UNIT*0.02) //how much power is in one sheet of metal
|
||||
|
||||
#define POWER_PLASTEEL (CLOCKCULT_POWER_UNIT*0.05) //how much power is in one sheet of plasteel
|
||||
|
||||
#define RATVAR_POWER_CHECK "ratvar?" //when passed into can_use_power(), converts it into a check for if ratvar has woken/the proselytizer is debug
|
||||
|
||||
//Ark defines
|
||||
#define GATEWAY_SUMMON_RATE 1 //the time amount the Gateway to the Celestial Derelict gets each process tick; defaults to 1 per tick
|
||||
|
||||
#define GATEWAY_REEBE_FOUND 119 //when progress is at or above this, the gateway finds reebe and begins drawing power
|
||||
|
||||
#define GATEWAY_RATVAR_COMING 239 //when progress is at or above this, ratvar has entered and is coming through the gateway
|
||||
|
||||
#define GATEWAY_RATVAR_ARRIVAL 300 //when progress is at or above this, game over ratvar's here everybody go home
|
||||
|
||||
//Objective defines
|
||||
#define CLOCKCULT_GATEWAY "gateway"
|
||||
|
||||
#define CLOCKCULT_ESCAPE "escape"
|
||||
|
||||
#define CLOCKCULT_SILICONS "silicons"
|
||||
|
||||
//misc clockcult stuff
|
||||
#define MARAUDER_EMERGE_THRESHOLD 65 //marauders cannot emerge unless host is at this% or less health
|
||||
|
||||
#define SIGIL_ACCESS_RANGE 2 //range at which transmission sigils can access power
|
||||
+78
-27
@@ -1,5 +1,8 @@
|
||||
//Damage things //TODO: merge these down to reduce on defines
|
||||
//Way to waste perfectly good damagetype names (BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc...
|
||||
/*ALL DEFINES RELATED TO COMBAT GO HERE*/
|
||||
|
||||
//Damage and status effect defines
|
||||
|
||||
//Damage defines //TODO: merge these down to reduce on defines
|
||||
#define BRUTE "brute"
|
||||
#define BURN "fire"
|
||||
#define TOX "tox"
|
||||
@@ -7,6 +10,13 @@
|
||||
#define CLONE "clone"
|
||||
#define STAMINA "stamina"
|
||||
|
||||
//bitflag damage defines used for suicide_act
|
||||
#define BRUTELOSS 1
|
||||
#define FIRELOSS 2
|
||||
#define TOXLOSS 4
|
||||
#define OXYLOSS 8
|
||||
#define SHAME 16
|
||||
|
||||
#define STUN "stun"
|
||||
#define WEAKEN "weaken"
|
||||
#define PARALYZE "paralize"
|
||||
@@ -17,13 +27,6 @@
|
||||
#define DROWSY "drowsy"
|
||||
#define JITTER "jitter"
|
||||
|
||||
//I hate adding defines like this but I'd much rather deal with bitflags than lists and string searches
|
||||
#define BRUTELOSS 1
|
||||
#define FIRELOSS 2
|
||||
#define TOXLOSS 4
|
||||
#define OXYLOSS 8
|
||||
#define SHAME 16
|
||||
|
||||
//Bitflags defining which status effects could be or are inflicted on a mob
|
||||
#define CANSTUN 1
|
||||
#define CANWEAKEN 2
|
||||
@@ -37,6 +40,25 @@
|
||||
#define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system
|
||||
#define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy.
|
||||
|
||||
//Health Defines
|
||||
#define HEALTH_THRESHOLD_CRIT 0
|
||||
#define HEALTH_THRESHOLD_DEAD -100
|
||||
|
||||
//Actual combat defines
|
||||
|
||||
//click cooldowns, in tenths of a second, used for various combat actions
|
||||
#define CLICK_CD_MELEE 8
|
||||
#define CLICK_CD_RANGE 4
|
||||
#define CLICK_CD_RAPID 2
|
||||
#define CLICK_CD_CLICK_ABILITY 6
|
||||
#define CLICK_CD_BREAKOUT 100
|
||||
#define CLICK_CD_HANDCUFFED 10
|
||||
#define CLICK_CD_RESIST 20
|
||||
#define CLICK_CD_GRABBING 10
|
||||
|
||||
//Cuff resist speeds
|
||||
#define FAST_CUFFBREAK 1
|
||||
#define INSTANT_CUFFBREAK 2
|
||||
|
||||
//Grab levels
|
||||
#define GRAB_PASSIVE 0
|
||||
@@ -44,12 +66,38 @@
|
||||
#define GRAB_NECK 2
|
||||
#define GRAB_KILL 3
|
||||
|
||||
//Attack types for checking shields/hit reactions
|
||||
#define MELEE_ATTACK 1
|
||||
#define UNARMED_ATTACK 2
|
||||
#define PROJECTILE_ATTACK 3
|
||||
#define THROWN_PROJECTILE_ATTACK 4
|
||||
#define LEAP_ATTACK 5
|
||||
|
||||
//Hostile Mob AI Status
|
||||
#define AI_ON 1
|
||||
#define AI_IDLE 2
|
||||
#define AI_OFF 3
|
||||
//attack visual effects
|
||||
#define ATTACK_EFFECT_PUNCH "punch"
|
||||
#define ATTACK_EFFECT_KICK "kick"
|
||||
#define ATTACK_EFFECT_SMASH "smash"
|
||||
#define ATTACK_EFFECT_CLAW "claw"
|
||||
#define ATTACK_EFFECT_DISARM "disarm"
|
||||
#define ATTACK_EFFECT_BITE "bite"
|
||||
#define ATTACK_EFFECT_MECHFIRE "mech_fire"
|
||||
#define ATTACK_EFFECT_MECHTOXIN "mech_toxin"
|
||||
#define ATTACK_EFFECT_BOOP "boop" //Honk
|
||||
|
||||
//intent defines
|
||||
#define INTENT_HELP "help"
|
||||
#define INTENT_GRAB "grab"
|
||||
#define INTENT_DISARM "disarm"
|
||||
#define INTENT_HARM "harm"
|
||||
//NOTE: INTENT_HOTKEY_* defines are not actual intents!
|
||||
//they are here to support hotkeys
|
||||
#define INTENT_HOTKEY_LEFT "left"
|
||||
#define INTENT_HOTKEY_RIGHT "right"
|
||||
|
||||
//the define for visible message range in combat
|
||||
#define COMBAT_MESSAGE_RANGE 3
|
||||
|
||||
//Combat object defines
|
||||
|
||||
//Embedded objects
|
||||
#define EMBEDDED_PAIN_CHANCE 15 //Chance for embedded objects to cause pain (damage user)
|
||||
@@ -62,19 +110,22 @@
|
||||
#define EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER 8 //Coefficient of multiplication for the damage the item does when removed without a surgery (this*item.w_class)
|
||||
#define EMBEDDED_UNSAFE_REMOVAL_TIME 30 //A Time in ticks, total removal time = (this*item.w_class)
|
||||
|
||||
|
||||
//Attack types for checking shields/hit reactions
|
||||
|
||||
#define MELEE_ATTACK 1
|
||||
#define UNARMED_ATTACK 2
|
||||
#define PROJECTILE_ATTACK 3
|
||||
#define THROWN_PROJECTILE_ATTACK 4
|
||||
|
||||
|
||||
//Gun Stuff
|
||||
#define SAWN_INTACT 0
|
||||
#define SAWN_OFF 1
|
||||
#define SAWN_INTACT 0
|
||||
#define SAWN_OFF 1
|
||||
//Gun weapon weight
|
||||
#define WEAPON_DUAL_WIELD 0
|
||||
#define WEAPON_LIGHT 1
|
||||
#define WEAPON_MEDIUM 2
|
||||
#define WEAPON_HEAVY 3
|
||||
//Gun trigger guards
|
||||
#define TRIGGER_GUARD_ALLOW_ALL -1
|
||||
#define TRIGGER_GUARD_NONE 0
|
||||
#define TRIGGER_GUARD_NORMAL 1
|
||||
|
||||
//Object/Item sharpness
|
||||
#define IS_BLUNT 0
|
||||
#define IS_SHARP 1
|
||||
#define IS_SHARP_ACCURATE 2
|
||||
|
||||
|
||||
#define WEAPON_LIGHT 0
|
||||
#define WEAPON_MEDIUM 1
|
||||
#define WEAPON_HEAVY 2
|
||||
@@ -0,0 +1,100 @@
|
||||
/*ALL DEFINES RELATED TO CONSTRUCTION, CONSTRUCTING THINGS, OR CONSTRUCTED OBJECTS GO HERE*/
|
||||
|
||||
//Defines for construction states
|
||||
|
||||
//girder construction states
|
||||
#define GIRDER_NORMAL 0
|
||||
#define GIRDER_REINF_STRUTS 1
|
||||
#define GIRDER_REINF 2
|
||||
#define GIRDER_DISPLACED 3
|
||||
#define GIRDER_DISASSEMBLED 4
|
||||
|
||||
//rwall construction states
|
||||
#define INTACT 0
|
||||
#define SUPPORT_LINES 1
|
||||
#define COVER 2
|
||||
#define CUT_COVER 3
|
||||
#define BOLTS 4
|
||||
#define SUPPORT_RODS 5
|
||||
#define SHEATH 6
|
||||
|
||||
//default_unfasten_wrench() return defines
|
||||
#define CANT_UNFASTEN 0
|
||||
#define FAILED_UNFASTEN 1
|
||||
#define SUCCESSFUL_UNFASTEN 2
|
||||
|
||||
//disposal unit mode defines, which do double time as the construction defines
|
||||
#define PRESSURE_OFF 0
|
||||
#define PRESSURE_ON 1
|
||||
#define PRESSURE_MAXED 2
|
||||
#define SCREWS_OUT -1
|
||||
|
||||
//ai core defines
|
||||
#define EMPTY_CORE 0
|
||||
#define CIRCUIT_CORE 1
|
||||
#define SCREWED_CORE 2
|
||||
#define CABLED_CORE 3
|
||||
#define GLASS_CORE 4
|
||||
#define AI_READY_CORE 5
|
||||
|
||||
//field generator construction defines
|
||||
#define FG_UNSECURED 0
|
||||
#define FG_SECURED 1
|
||||
#define FG_WELDED 2
|
||||
|
||||
//emitter construction defines
|
||||
#define EM_UNSECURED 0
|
||||
#define EM_SECURED 1
|
||||
#define EM_WELDED 2
|
||||
|
||||
//Construction defines for the pinion airlock
|
||||
#define GEAR_SECURE 1
|
||||
#define GEAR_UNFASTENED 2
|
||||
#define GEAR_LOOSE 3
|
||||
|
||||
//other construction-related things
|
||||
|
||||
//windows affected by nar-sie turn this color.
|
||||
#define NARSIE_WINDOW_COLOUR "#7D1919"
|
||||
|
||||
//let's just pretend fulltile windows being children of border windows is fine
|
||||
#define FULLTILE_WINDOW_DIR NORTHEAST
|
||||
|
||||
//Material defines, for determining how much of a given material an item contains
|
||||
#define MAT_METAL "$metal"
|
||||
#define MAT_GLASS "$glass"
|
||||
#define MAT_SILVER "$silver"
|
||||
#define MAT_GOLD "$gold"
|
||||
#define MAT_DIAMOND "$diamond"
|
||||
#define MAT_URANIUM "$uranium"
|
||||
#define MAT_PLASMA "$plasma"
|
||||
#define MAT_BANANIUM "$bananium"
|
||||
#define MAT_TITANIUM "$titanium"
|
||||
#define MAT_BIOMASS "$biomass"
|
||||
//The amount of materials you get from a sheet of mineral like iron/diamond/glass etc
|
||||
#define MINERAL_MATERIAL_AMOUNT 2000
|
||||
//The maximum size of a stack object.
|
||||
#define MAX_STACK_SIZE 50
|
||||
//maximum amount of cable in a coil
|
||||
#define MAXCOIL 30
|
||||
|
||||
//tablecrafting defines
|
||||
#define CAT_NONE ""
|
||||
#define CAT_WEAPON "Weaponry"
|
||||
#define CAT_AMMO "Ammunition"
|
||||
#define CAT_ROBOT "Robots"
|
||||
#define CAT_MISC "Misc"
|
||||
#define CAT_PRIMAL "Tribal"
|
||||
#define CAT_BREAD "Breads"
|
||||
#define CAT_BURGER "Burgers"
|
||||
#define CAT_CAKE "Cakes"
|
||||
#define CAT_EGG "Egg-Based Food"
|
||||
#define CAT_MEAT "Meats"
|
||||
#define CAT_MISCFOOD "Misc. Food"
|
||||
#define CAT_PASTRY "Pastries"
|
||||
#define CAT_PIE "Pies"
|
||||
#define CAT_PIZZA "Pizzas"
|
||||
#define CAT_SALAD "Salads"
|
||||
#define CAT_SANDWICH "Sandwiches"
|
||||
#define CAT_SOUP "Soups"
|
||||
#define CAT_SPAGHETTI "Spaghettis"
|
||||
@@ -15,7 +15,8 @@
|
||||
#define BANE_TOOLBOX "toolbox"
|
||||
|
||||
#define OBLIGATION_FOOD "food"
|
||||
#define OBLIGATION_DRINK "drink"
|
||||
#define OBLIGATION_FIDDLE "fiddle"
|
||||
#define OBLIGATION_DANCEOFF "danceoff"
|
||||
#define OBLIGATION_GREET "greet"
|
||||
#define OBLIGATION_PRESENCEKNOWN "presenceknown"
|
||||
#define OBLIGATION_SAYNAME "sayname"
|
||||
|
||||
+7
-28
@@ -23,7 +23,6 @@
|
||||
|
||||
#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc (NOTE: flag shared with THICKMATERIAL for external suits and helmet)
|
||||
|
||||
#define OPENCONTAINER 4096 // is an open container for chemistry purposes
|
||||
#define HEADBANGPROTECT 4096
|
||||
|
||||
// BLOCK_GAS_SMOKE_EFFECT only used in masks at the moment.
|
||||
@@ -34,6 +33,9 @@
|
||||
|
||||
//turf-only flags
|
||||
#define NOJAUNT 1
|
||||
#define UNUSED_TRANSIT_TURF 2
|
||||
#define CAN_BE_DIRTY 4 //If a turf can be made dirty at roundstart. This is also used in areas.
|
||||
#define NO_DEATHRATTLE 16 // Do not notify deadchat about any deaths that occur on this turf.
|
||||
|
||||
/*
|
||||
These defines are used specifically with the atom/pass_flags bitmask
|
||||
@@ -47,34 +49,12 @@
|
||||
#define PASSMOB 16
|
||||
#define LETPASSTHROW 32
|
||||
|
||||
//flags for species
|
||||
|
||||
#define MUTCOLORS 1
|
||||
#define HAIR 2
|
||||
#define FACEHAIR 3
|
||||
#define EYECOLOR 4
|
||||
#define LIPS 5
|
||||
#define RESISTTEMP 6
|
||||
#define RADIMMUNE 7
|
||||
#define NOBREATH 8
|
||||
#define NOGUNS 9
|
||||
#define NOBLOOD 10
|
||||
#define NOFIRE 11
|
||||
#define VIRUSIMMUNE 12
|
||||
#define PIERCEIMMUNE 13
|
||||
#define NOTRANSSTING 14
|
||||
#define MUTCOLORS_PARTSONLY 15 //Used if we want the mutant colour to be only used by mutant bodyparts. Don't combine this with MUTCOLORS, or it will be useless.
|
||||
#define NODISMEMBER 16
|
||||
#define NOHUNGER 17
|
||||
#define NOCRITDAMAGE 18
|
||||
#define NOZOMBIE 19
|
||||
#define EASYDISMEMBER 20
|
||||
#define EASYLIMBATTACHMENT 21
|
||||
#define TOXINLOVER 22
|
||||
#define MUTCOLORS2 23
|
||||
#define MUTCOLORS3 24
|
||||
//Movement Types
|
||||
#define IMMOBILE 0
|
||||
#define GROUND 1
|
||||
#define FLYING 2
|
||||
|
||||
#define FLYING 65536
|
||||
|
||||
/*
|
||||
These defines are used specifically with the atom/movable/languages bitmask.
|
||||
@@ -88,7 +68,6 @@
|
||||
#define DRONE 32
|
||||
#define SWARMER 64
|
||||
#define RATVAR 128
|
||||
#define YAUTJA 256
|
||||
|
||||
// Flags for reagents
|
||||
#define REAGENT_NOREACT 1
|
||||
|
||||
+5
-46
@@ -1,47 +1,6 @@
|
||||
// for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list
|
||||
// note: if you add more HUDs, even for non-human atoms, make sure to use unique numbers for the defines!
|
||||
// /datum/atom_hud expects these to be unique
|
||||
// these need to be strings in order to make them associative lists
|
||||
#define HEALTH_HUD "1" // dead, alive, sick, health status
|
||||
#define STATUS_HUD "2" // a simple line rounding the mob's number health
|
||||
#define ID_HUD "3" // the job asigned to your ID
|
||||
#define WANTED_HUD "4" // wanted, released, parroled, security status
|
||||
#define IMPLOYAL_HUD "5" // loyality implant
|
||||
#define IMPCHEM_HUD "6" // chemical implant
|
||||
#define IMPTRACK_HUD "7" // tracking implant
|
||||
#define DIAG_STAT_HUD "8" // Silicon/Mech Status
|
||||
#define DIAG_HUD "9" // Silicon health bar
|
||||
#define DIAG_BATT_HUD "10"// Borg/Mech power meter
|
||||
#define DIAG_MECH_HUD "11"// Mech health bar
|
||||
#define DIAG_BOT_HUD "12"// Bot HUDs
|
||||
//for antag huds. these are used at the /mob level
|
||||
#define ANTAG_HUD "13"
|
||||
//HUD styles. Index order defines how they are cycled in F12.
|
||||
#define HUD_STYLE_STANDARD 1 //Standard hud
|
||||
#define HUD_STYLE_REDUCED 2 //Reduced hud (just hands and intent switcher)
|
||||
#define HUD_STYLE_NOHUD 3 //No hud (for screenshots)
|
||||
|
||||
//data HUD (medhud, sechud) defines
|
||||
//Don't forget to update human/New() if you change these!
|
||||
#define DATA_HUD_SECURITY_BASIC 1
|
||||
#define DATA_HUD_SECURITY_ADVANCED 2
|
||||
#define DATA_HUD_MEDICAL_BASIC 3
|
||||
#define DATA_HUD_MEDICAL_ADVANCED 4
|
||||
#define DATA_HUD_DIAGNOSTIC 5
|
||||
//antag HUD defines
|
||||
#define ANTAG_HUD_CULT 6
|
||||
#define ANTAG_HUD_REV 7
|
||||
#define ANTAG_HUD_OPS 8
|
||||
#define ANTAG_HUD_WIZ 9
|
||||
#define ANTAG_HUD_SHADOW 10
|
||||
#define ANTAG_HUD_HOG_BLUE 11
|
||||
#define ANTAG_HUD_HOG_RED 12
|
||||
#define ANTAG_HUD_TRAITOR 13
|
||||
#define ANTAG_HUD_NINJA 14
|
||||
#define ANTAG_HUD_CHANGELING 15
|
||||
#define ANTAG_HUD_ABDUCTOR 16
|
||||
#define ANTAG_HUD_DEVIL 17
|
||||
#define ANTAG_HUD_SINTOUCHED 18
|
||||
#define ANTAG_HUD_SOULLESS 19
|
||||
#define ANTAG_HUD_CLOCKWORK 20
|
||||
|
||||
// Notification action types
|
||||
#define NOTIFY_JUMP "jump"
|
||||
#define NOTIFY_ATTACK "attack"
|
||||
#define NOTIFY_ORBIT "orbit"
|
||||
#define HUD_VERSIONS 3 //Used in show_hud(); Please ensure this is the same as the maximum index.
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*ALL DEFINES RELATED TO INVENTORY OBJECTS, MANAGEMENT, ETC, GO HERE*/
|
||||
|
||||
//ITEM INVENTORY WEIGHT, FOR w_class
|
||||
#define WEIGHT_CLASS_TINY 1 //Usually items smaller then a human hand, ex: Playing Cards, Lighter, Scalpel, Coins/Money
|
||||
#define WEIGHT_CLASS_SMALL 2 //Pockets can hold small and tiny items, ex: Flashlight, Multitool, Grenades, GPS Device
|
||||
#define WEIGHT_CLASS_NORMAL 3 //Standard backpacks can carry tiny, small & normal items, ex: Fire extinguisher, Stunbaton, Gas Mask, Metal Sheets
|
||||
#define WEIGHT_CLASS_BULKY 4 //Items that can be weilded or equipped but not stored in an inventory, ex: Defibrillator, Backpack, Space Suits
|
||||
#define WEIGHT_CLASS_HUGE 5 //Usually represents objects that require two hands to operate, ex: Shotgun, Two Handed Melee Weapons
|
||||
#define WEIGHT_CLASS_GIGANTIC 6 //Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe
|
||||
|
||||
//Inventory depth: limits how many nested storage items you can access directly.
|
||||
//1: stuff in mob, 2: stuff in backpack, 3: stuff in box in backpack, etc
|
||||
#define INVENTORY_DEPTH 3
|
||||
#define STORAGE_VIEW_DEPTH 2
|
||||
|
||||
//ITEM INVENTORY SLOT BITMASKS
|
||||
#define SLOT_OCLOTHING 1
|
||||
#define SLOT_ICLOTHING 2
|
||||
@@ -10,20 +25,22 @@
|
||||
#define SLOT_ID 256
|
||||
#define SLOT_BELT 512
|
||||
#define SLOT_BACK 1024
|
||||
#define SLOT_POCKET 2048 //this is to allow items with a w_class of 3 or 4 to fit in pockets.
|
||||
#define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets.
|
||||
#define SLOT_POCKET 2048 // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets.
|
||||
#define SLOT_DENYPOCKET 4096 // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets.
|
||||
#define SLOT_NECK 8192
|
||||
|
||||
//SLOTS
|
||||
#define slot_back 1
|
||||
#define slot_wear_mask 2
|
||||
#define slot_handcuffed 3
|
||||
#define slot_l_hand 4
|
||||
#define slot_r_hand 5
|
||||
#define slot_belt 6
|
||||
#define slot_wear_id 7
|
||||
#define slot_ears 8
|
||||
#define slot_glasses 9
|
||||
#define slot_gloves 10
|
||||
#define slot_hands 4 //wherever you provide a slot for hands you provide slot_hands
|
||||
//slot_hands as a slot will pick ANY available hand
|
||||
#define slot_belt 5
|
||||
#define slot_wear_id 6
|
||||
#define slot_ears 7
|
||||
#define slot_glasses 8
|
||||
#define slot_gloves 9
|
||||
#define slot_neck 10
|
||||
#define slot_head 11
|
||||
#define slot_shoes 12
|
||||
#define slot_wear_suit 13
|
||||
@@ -33,7 +50,7 @@
|
||||
#define slot_s_store 17
|
||||
#define slot_in_backpack 18
|
||||
#define slot_legcuffed 19
|
||||
#define slot_drone_storage 20
|
||||
#define slot_generic_dextrous_storage 20
|
||||
|
||||
#define slots_amt 20 // Keep this up to date!
|
||||
|
||||
@@ -45,6 +62,8 @@
|
||||
. = SLOT_BACK
|
||||
if(slot_wear_mask)
|
||||
. = SLOT_MASK
|
||||
if(slot_neck)
|
||||
. = SLOT_NECK
|
||||
if(slot_belt)
|
||||
. = SLOT_BELT
|
||||
if(slot_wear_id)
|
||||
@@ -78,11 +97,9 @@
|
||||
#define HIDEFACE 128 // Whether we appear as unknown.
|
||||
#define HIDEHAIR 256
|
||||
#define HIDEFACIALHAIR 512
|
||||
#define HIDENECK 1024
|
||||
|
||||
|
||||
//Cant seem to find a mob bitflags area other than the powers one
|
||||
|
||||
// bitflags for clothing parts - also used for limbs
|
||||
//bitflags for clothing coverage - also used for limbs
|
||||
#define HEAD 1
|
||||
#define CHEST 2
|
||||
#define GROIN 4
|
||||
@@ -98,7 +115,8 @@
|
||||
#define HAND_LEFT 512
|
||||
#define HAND_RIGHT 1024
|
||||
#define HANDS 1536
|
||||
#define FULL_BODY 2047
|
||||
#define NECK 2048
|
||||
#define FULL_BODY 4095
|
||||
|
||||
// bitflags for the percentual amount of protection a piece of clothing which covers the body part offers.
|
||||
// Used with human/proc/get_heat_protection() and human/proc/get_cold_protection()
|
||||
@@ -117,11 +135,22 @@
|
||||
#define THERMAL_PROTECTION_HAND_RIGHT 0.025
|
||||
|
||||
//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird
|
||||
|
||||
#define NO_FEMALE_UNIFORM 0
|
||||
#define FEMALE_UNIFORM_FULL 1
|
||||
#define FEMALE_UNIFORM_TOP 2
|
||||
|
||||
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
|
||||
#define NORMAL_STYLE 0
|
||||
#define ALT_STYLE 1
|
||||
#define DIGITIGRADE_STYLE 2
|
||||
|
||||
//flags for outfits that have mutantrace variants (try not to use this): Currently only needed if you're trying to add tight fitting bootyshorts
|
||||
#define NO_MUTANTRACE_VARIATION 0
|
||||
#define MUTANTRACE_VARIATION 1
|
||||
|
||||
#define NOT_DIGITIGRADE 0
|
||||
#define FULL_DIGITIGRADE 1
|
||||
#define SQUISHED_DIGITIGRADE 2
|
||||
|
||||
//flags for covering body parts
|
||||
#define GLASSESCOVERSEYES 1
|
||||
@@ -4,13 +4,32 @@
|
||||
|
||||
#define in_range(source, user) (get_dist(source, user) <= 1)
|
||||
|
||||
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable
|
||||
#define ismovableatom(A) (istype(A, /atom/movable))
|
||||
|
||||
// MOB HELPERS
|
||||
//Turfs
|
||||
#define isopenturf(A) (istype(A, /turf/open))
|
||||
|
||||
#define isspaceturf(A) (istype(A, /turf/open/space))
|
||||
|
||||
#define isfloorturf(A) (istype(A, /turf/open/floor))
|
||||
|
||||
#define isclosedturf(A) (istype(A, /turf/closed))
|
||||
|
||||
#define iswallturf(A) (istype(A, /turf/closed/wall))
|
||||
|
||||
#define ismineralturf(A) (istype(A, /turf/closed/mineral))
|
||||
|
||||
//Mobs
|
||||
#define isliving(A) (istype(A, /mob/living))
|
||||
|
||||
#define isbrain(A) (istype(A, /mob/living/brain))
|
||||
|
||||
//Carbon mobs
|
||||
#define iscarbon(A) (istype(A, /mob/living/carbon))
|
||||
|
||||
#define ishuman(A) (istype(A, /mob/living/carbon/human))
|
||||
|
||||
// Human sub-species
|
||||
//Human sub-species
|
||||
#define isabductor(A) (is_species(A, /datum/species/abductor))
|
||||
#define isgolem(A) (is_species(A, /datum/species/golem))
|
||||
#define islizard(A) (is_species(A, /datum/species/lizard))
|
||||
@@ -22,80 +41,94 @@
|
||||
#define iszombie(A) (is_species(A, /datum/species/zombie))
|
||||
#define ishumanbasic(A) (is_species(A, /datum/species/human))
|
||||
|
||||
//more carbon mobs
|
||||
#define ismonkey(A) (istype(A, /mob/living/carbon/monkey))
|
||||
|
||||
#define isbrain(A) (istype(A, /mob/living/carbon/brain))//We didn't port the /mob/living/brain update, yet.
|
||||
|
||||
#define isalien(A) (istype(A, /mob/living/carbon/alien))
|
||||
|
||||
#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid))
|
||||
|
||||
#define islarva(A) (istype(A, /mob/living/carbon/alien/larva))
|
||||
|
||||
#define isslime(A) (istype(A, /mob/living/simple_animal/slime))
|
||||
#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid))
|
||||
|
||||
#define isrobot(A) (istype(A, /mob/living/silicon/robot))
|
||||
#define isdevil(A) (istype(A, /mob/living/carbon/true_devil))
|
||||
|
||||
#define isanimal(A) (istype(A, /mob/living/simple_animal))
|
||||
//Silicon mobs
|
||||
#define issilicon(A) (istype(A, /mob/living/silicon))
|
||||
|
||||
#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi))
|
||||
|
||||
#define iscrab(A) (istype(A, /mob/living/simple_animal/crab))
|
||||
|
||||
#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat))
|
||||
|
||||
#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse))
|
||||
|
||||
#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct))
|
||||
|
||||
#define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork))
|
||||
|
||||
#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna))
|
||||
|
||||
#define isshade(A) (istype(A, /mob/living/simple_animal/shade))
|
||||
|
||||
#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear))
|
||||
|
||||
#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp))
|
||||
|
||||
#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
|
||||
#define iscyborg(A) (istype(A, /mob/living/silicon/robot))
|
||||
|
||||
#define isAI(A) (istype(A, /mob/living/silicon/ai))
|
||||
|
||||
#define ispAI(A) (istype(A, /mob/living/silicon/pai))
|
||||
|
||||
#define iscarbon(A) (istype(A, /mob/living/carbon))
|
||||
//Simple animals
|
||||
#define isanimal(A) (istype(A, /mob/living/simple_animal))
|
||||
|
||||
#define issilicon(A) (istype(A, /mob/living/silicon))
|
||||
#define isrevenant(A) (istype(A, /mob/living/simple_animal/revenant))
|
||||
|
||||
#define iscyborg(A) (istype(A, /mob/living/silicon/robot))
|
||||
#define isborer(A) (istype(A, /mob/living/simple_animal/borer))
|
||||
|
||||
#define isliving(A) (istype(A, /mob/living))
|
||||
#define isbot(A) (istype(A, /mob/living/simple_animal/bot))
|
||||
|
||||
#define iscrab(A) (istype(A, /mob/living/simple_animal/crab))
|
||||
|
||||
#define isshade(A) (istype(A, /mob/living/simple_animal/shade))
|
||||
|
||||
#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse))
|
||||
|
||||
#define isslime(A) (istype(A, /mob/living/simple_animal/slime))
|
||||
|
||||
#define isdrone(A) (istype(A, /mob/living/simple_animal/drone))
|
||||
|
||||
#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat))
|
||||
|
||||
#define isdog(A) (istype(A, /mob/living/simple_animal/pet/dog))
|
||||
|
||||
#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi))
|
||||
|
||||
#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile))
|
||||
|
||||
#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear))
|
||||
|
||||
#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp))
|
||||
|
||||
#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer))
|
||||
|
||||
#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian))
|
||||
|
||||
#define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork))
|
||||
|
||||
#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct))
|
||||
|
||||
#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna))
|
||||
|
||||
#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
|
||||
|
||||
//Misc mobs
|
||||
#define isobserver(A) (istype(A, /mob/dead/observer))
|
||||
|
||||
#define isnewplayer(A) (istype(A, /mob/new_player))
|
||||
|
||||
#define isovermind(A) (istype(A, /mob/camera/blob))
|
||||
|
||||
#define isdrone(A) (istype(A, /mob/living/simple_animal/drone))
|
||||
|
||||
#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer))
|
||||
|
||||
#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian))
|
||||
|
||||
#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile))
|
||||
//Objects
|
||||
#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs
|
||||
|
||||
#define islimb(A) (istype(A, /obj/item/bodypart))
|
||||
|
||||
#define isbot(A) (istype(A, /mob/living/simple_animal/bot))
|
||||
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable
|
||||
|
||||
#define ismovableatom(A) (istype(A, /atom/movable))
|
||||
#define isorgan(A) (istype(A, /obj/item/organ))
|
||||
|
||||
#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs
|
||||
var/list/static/global/pointed_types = typecacheof(list(
|
||||
/obj/item/weapon/pen,
|
||||
/obj/item/weapon/screwdriver,
|
||||
/obj/item/weapon/reagent_containers/syringe,
|
||||
/obj/item/weapon/kitchen/fork))
|
||||
|
||||
// ASSEMBLY HELPERS
|
||||
#define is_pointed(W) (is_type_in_typecache(W, pointed_types))
|
||||
|
||||
//Assemblies
|
||||
#define isassembly(O) (istype(O, /obj/item/device/assembly))
|
||||
|
||||
#define isigniter(O) (istype(O, /obj/item/device/assembly/igniter))
|
||||
@@ -106,4 +139,4 @@
|
||||
|
||||
#define issignaler(O) (istype(O, /obj/item/device/assembly/signaler))
|
||||
|
||||
#define istimer(O) (istype(O, /obj/item/device/assembly/timer))
|
||||
#define istimer(O) (istype(O, /obj/item/device/assembly/timer))
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
//Defines for atom layers
|
||||
//Defines for atom layers and planes
|
||||
//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE
|
||||
|
||||
#define CLICKCATCHER_PLANE -99
|
||||
|
||||
#define PLANE_SPACE -95
|
||||
#define PLANE_SPACE_PARALLAX -90
|
||||
|
||||
#define GAME_PLANE 0
|
||||
//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
|
||||
#define ABOVE_OPEN_TURF_LAYER 2.01
|
||||
#define MID_TURF_LAYER 2.02
|
||||
#define HIGH_TURF_LAYER 2.03
|
||||
#define ABOVE_OPEN_TURF_LAYER 2.04
|
||||
#define CLOSED_TURF_LAYER 2.05
|
||||
#define ABOVE_NORMAL_TURF_LAYER 2.08
|
||||
#define LATTICE_LAYER 2.2
|
||||
@@ -24,7 +32,8 @@
|
||||
#define ABOVE_OBJ_LAYER 3.2
|
||||
#define ABOVE_WINDOW_LAYER 3.3
|
||||
#define SIGN_LAYER 3.4
|
||||
#define HIGH_OBJ_LAYER 3.5
|
||||
#define NOT_HIGH_OBJ_LAYER 3.5
|
||||
#define HIGH_OBJ_LAYER 3.6
|
||||
|
||||
#define BELOW_MOB_LAYER 3.7
|
||||
#define LYING_MOB_LAYER 3.8
|
||||
@@ -45,13 +54,20 @@
|
||||
#define AREA_LAYER 10
|
||||
#define MASSIVE_OBJ_LAYER 11
|
||||
#define POINT_LAYER 12
|
||||
|
||||
#define LIGHTING_PLANE 15
|
||||
#define LIGHTING_LAYER 15
|
||||
|
||||
//HUD layer defines
|
||||
#define FLASH_LAYER 17.9
|
||||
#define FULLSCREEN_LAYER 18
|
||||
#define UI_DAMAGE_LAYER 18.1
|
||||
#define BLIND_LAYER 18.2
|
||||
#define CRIT_LAYER 18.3
|
||||
|
||||
#define FULLSCREEN_PLANE 18
|
||||
#define FLASH_LAYER 18
|
||||
#define FULLSCREEN_LAYER 18.1
|
||||
#define UI_DAMAGE_LAYER 18.2
|
||||
#define BLIND_LAYER 18.3
|
||||
#define CRIT_LAYER 18.4
|
||||
|
||||
#define HUD_PLANE 19
|
||||
#define HUD_LAYER 19
|
||||
#define ABOVE_HUD_LAYER 19.1
|
||||
#define ABOVE_HUD_PLANE 20
|
||||
#define ABOVE_HUD_LAYER 20
|
||||
|
||||
+15
-77
@@ -1,79 +1,17 @@
|
||||
#define DYNAMIC_LIGHTING_DISABLED 0 //dynamic lighting disabled (area stays at full brightness)
|
||||
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
|
||||
#define DYNAMIC_LIGHTING_IFSTARLIGHT 2 //dynamic lighting enabled only if starlight is.
|
||||
#define IS_DYNAMIC_LIGHTING(A) ( A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT ? config.starlight : A.dynamic_lighting )
|
||||
//Arbitrary lighting related stuff
|
||||
|
||||
#define LIGHTING_CIRCULAR 1 //Comment this out to use old square lighting effects.
|
||||
#define LIGHTING_CAP 10 //The lumcount level at which alpha is 0 and we're fully lit.
|
||||
#define LIGHTING_CAP_FRAC (255/LIGHTING_CAP) //A precal'd variable we'll use in turf/redraw_lighting()
|
||||
#define LIGHTING_ICON 'icons/effects/alphacolors.dmi'
|
||||
#define LIGHTING_ICON_STATE ""
|
||||
#define LIGHTING_ANIMATE_TIME 2 //Time to animate() any lighting change. Actual number pulled out of my ass
|
||||
#define LIGHTING_MIN_ALPHA_DELTA_TO_ANIMATE 20 //How much does the alpha have to change to warrent an animation.
|
||||
#define LIGHTING_DARKEST_VISIBLE_ALPHA 250 //Anything darker than this is so dark, we'll just consider the whole tile unlit
|
||||
#define LIGHTING_LUM_FOR_FULL_BRIGHT 6 //Anything who's lum is lower then this starts off less bright.
|
||||
#define LIGHTING_MIN_RADIUS 4 //Lowest radius a light source can effect.
|
||||
|
||||
|
||||
//Bay lighting engine shit, not in /code/modules/lighting because BYOND is being shit about it
|
||||
#define LIGHTING_INTERVAL 5 // frequency, in 1/10ths of a second, of the lighting process
|
||||
|
||||
#ifndef LIGHTING_INSTANT_UPDATES
|
||||
#define LIGHTING_INTERVAL 5 // Frequency, in 1/10ths of a second, of the lighting process.
|
||||
#include "../controllers/subsystem/lighting.dm"
|
||||
#endif
|
||||
|
||||
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
|
||||
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
|
||||
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
|
||||
#define LIGHTING_ROUND_VALUE 1 / 128 //Value used to round lumcounts, values smaller than 1/255 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
|
||||
|
||||
#define LIGHTING_ICON 'icons/effects/lighting_overlay.png' // icon used for lighting shading effects
|
||||
|
||||
#define LIGHTING_SOFT_THRESHOLD 0.05 // If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting overlays.
|
||||
|
||||
// If I were you I'd leave this alone.
|
||||
#define LIGHTING_BASE_MATRIX \
|
||||
list \
|
||||
( \
|
||||
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
|
||||
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
|
||||
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
|
||||
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
|
||||
0, 0, 0, 1 \
|
||||
) \
|
||||
|
||||
// Helpers so we can (more easily) control the colour matrices.
|
||||
#define CL_MATRIX_RR 1
|
||||
#define CL_MATRIX_RG 2
|
||||
#define CL_MATRIX_RB 3
|
||||
#define CL_MATRIX_RA 4
|
||||
#define CL_MATRIX_GR 5
|
||||
#define CL_MATRIX_GG 6
|
||||
#define CL_MATRIX_GB 7
|
||||
#define CL_MATRIX_GA 8
|
||||
#define CL_MATRIX_BR 9
|
||||
#define CL_MATRIX_BG 10
|
||||
#define CL_MATRIX_BB 11
|
||||
#define CL_MATRIX_BA 12
|
||||
#define CL_MATRIX_AR 13
|
||||
#define CL_MATRIX_AG 14
|
||||
#define CL_MATRIX_AB 15
|
||||
#define CL_MATRIX_AA 16
|
||||
#define CL_MATRIX_CR 17
|
||||
#define CL_MATRIX_CG 18
|
||||
#define CL_MATRIX_CB 19
|
||||
#define CL_MATRIX_CA 20
|
||||
|
||||
//Some defines to generalise colours used in lighting.
|
||||
//Important note on colors. Colors can end up significantly different from the basic html picture, especially when saturated
|
||||
#define LIGHT_COLOR_RED "#FA8282" //Warm but extremely diluted red. rgb(250, 130, 130)
|
||||
#define LIGHT_COLOR_GREEN "#64C864" //Bright but quickly dissipating neon green. rgb(100, 200, 100)
|
||||
#define LIGHT_COLOR_BLUE "#6496FA" //Cold, diluted blue. rgb(100, 150, 250)
|
||||
|
||||
#define LIGHT_COLOR_CYAN "#7DE1E1" //Diluted cyan. rgb(125, 225, 225)
|
||||
#define LIGHT_COLOR_PINK "#E17DE1" //Diluted, mid-warmth pink. rgb(225, 125, 225)
|
||||
#define LIGHT_COLOR_YELLOW "#E1E17D" //Dimmed yellow, leaning kaki. rgb(225, 225, 125)
|
||||
#define LIGHT_COLOR_BROWN "#966432" //Clear brown, mostly dim. rgb(150, 100, 50)
|
||||
#define LIGHT_COLOR_ORANGE "#FA9632" //Mostly pure orange. rgb(250, 150, 50)
|
||||
|
||||
//These ones aren't a direct colour like the ones above, because nothing would fit
|
||||
#define LIGHT_COLOR_FIRE "#FAA019" //Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
|
||||
#define LIGHT_COLOR_FLARE "#FA644B" //Bright, non-saturated red. Leaning slightly towards pink for visibility. rgb(250, 100, 75)
|
||||
#define LIGHT_COLOR_SLIME_LAMP "#AFC84B" //Weird color, between yellow and green, very slimy. rgb(175, 200, 75)
|
||||
#define LIGHT_COLOR_TUNGSTEN "#FAE1AF" //Extremely diluted yellow, close to skin color (for some reason). rgb(250, 225, 175)
|
||||
#define LIGHT_COLOR_HALOGEN "#F0FAFA" //Barely visible cyan-ish hue, as the doctor prescribed. rgb(240, 250, 250)
|
||||
|
||||
#define FOR_DVIEW(type, range, center, invis_flags) \
|
||||
dview_mob.forceMove(center); \
|
||||
dview_mob.see_invisible = invis_flags; \
|
||||
for(type in view(range, dview_mob))
|
||||
//different modes that lights can operate in
|
||||
#define LIGHTING_REGULAR 1 //Apply all effects additively
|
||||
#define LIGHTING_STARLIGHT 2 //Track all starlight but only apply brightest
|
||||
|
||||
@@ -21,4 +21,45 @@
|
||||
#define AUTOLATHE 4 //Uses glass/metal only.
|
||||
#define CRAFTLATHE 8 //Uses fuck if I know. For use eventually.
|
||||
#define MECHFAB 16 //Remember, objects utilising this flag should have construction_time and construction_cost vars.
|
||||
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
|
||||
#define BIOGENERATOR 32 //Uses biomass
|
||||
#define LIMBGROWER 64 //Uses synthetic flesh
|
||||
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
|
||||
|
||||
//Modular computer/NTNet defines
|
||||
|
||||
//Modular computer part defines
|
||||
#define MC_CPU "CPU"
|
||||
#define MC_HDD "HDD"
|
||||
#define MC_SDD "SDD"
|
||||
#define MC_CARD "CARD"
|
||||
#define MC_NET "NET"
|
||||
#define MC_PRINT "PRINT"
|
||||
#define MC_CELL "CELL"
|
||||
#define MC_CHARGE "CHARGE"
|
||||
#define MC_AI "AI"
|
||||
|
||||
//NTNet stuff, for modular computers
|
||||
// NTNet module-configuration values. Do not change these. If you need to add another use larger number (5..6..7 etc)
|
||||
#define NTNET_SOFTWAREDOWNLOAD 1 // Downloads of software from NTNet
|
||||
#define NTNET_PEERTOPEER 2 // P2P transfers of files between devices
|
||||
#define NTNET_COMMUNICATION 3 // Communication (messaging)
|
||||
#define NTNET_SYSTEMCONTROL 4 // Control of various systems, RCon, air alarm control, etc.
|
||||
|
||||
//NTNet transfer speeds, used when downloading/uploading a file/program.
|
||||
#define NTNETSPEED_LOWSIGNAL 0.5 // GQ/s transfer speed when the device is wirelessly connected and on Low signal
|
||||
#define NTNETSPEED_HIGHSIGNAL 1 // GQ/s transfer speed when the device is wirelessly connected and on High signal
|
||||
#define NTNETSPEED_ETHERNET 2 // GQ/s transfer speed when the device is using wired connection
|
||||
|
||||
//Caps for NTNet logging. Less than 10 would make logging useless anyway, more than 500 may make the log browser too laggy. Defaults to 100 unless user changes it.
|
||||
#define MAX_NTNET_LOGS 300
|
||||
#define MIN_NTNET_LOGS 10
|
||||
|
||||
//Program bitflags
|
||||
#define PROGRAM_ALL 7
|
||||
#define PROGRAM_CONSOLE 1
|
||||
#define PROGRAM_LAPTOP 2
|
||||
#define PROGRAM_TABLET 4
|
||||
//Program states
|
||||
#define PROGRAM_STATE_KILLED 0
|
||||
#define PROGRAM_STATE_BACKGROUND 1
|
||||
#define PROGRAM_STATE_ACTIVE 2
|
||||
|
||||
@@ -14,4 +14,11 @@
|
||||
//percent_of_tick_used * (ticklag * 100(to convert to ms)) / 100(percent ratio)
|
||||
//collapsed to percent_of_tick_used * tick_lag
|
||||
#define TICK_DELTA_TO_MS(percent_of_tick_used) ((percent_of_tick_used) * world.tick_lag)
|
||||
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(world.tick_usage-starting_tickusage))
|
||||
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(world.tick_usage-starting_tickusage))
|
||||
|
||||
#define PERCENT(val) (round(val*100, 0.1))
|
||||
|
||||
//time of day but automatically adjusts to the server going into the next day within the same round.
|
||||
//for when you need a reliable time number that doesn't depend on byond time.
|
||||
#define REALTIMEOFDAY (world.timeofday + (MIDNIGHT_ROLLOVER * MIDNIGHT_ROLLOVER_CHECK))
|
||||
#define MIDNIGHT_ROLLOVER_CHECK ( rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : midnight_rollovers )
|
||||
|
||||
+85
-162
@@ -1,3 +1,10 @@
|
||||
// Byond direction defines, because I want to put them somewhere.
|
||||
// #define NORTH 1
|
||||
// #define SOUTH 2
|
||||
// #define EAST 4
|
||||
// #define WEST 8
|
||||
|
||||
|
||||
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
|
||||
|
||||
#define JANUARY 1
|
||||
@@ -20,6 +27,7 @@
|
||||
#define EASTER "Easter"
|
||||
#define HALLOWEEN "Halloween"
|
||||
#define CHRISTMAS "Christmas"
|
||||
#define FESTIVE_SEASON "Festive Season"
|
||||
#define FRIDAY_13TH "Friday the 13th"
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
@@ -39,14 +47,14 @@
|
||||
#define GLASSES_LAYER 13
|
||||
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 11
|
||||
#define BACK_LAYER 10
|
||||
#define HAIR_LAYER 9 //TODO: make part of head layer?
|
||||
#define FACEMASK_LAYER 8
|
||||
#define HEAD_LAYER 7
|
||||
#define HANDCUFF_LAYER 6
|
||||
#define LEGCUFF_LAYER 5
|
||||
#define L_HAND_LAYER 4
|
||||
#define R_HAND_LAYER 3 //Having the two hands seperate seems rather silly, merge them together? It'll allow for code to be reused on mobs with arbitarily many hands
|
||||
#define NECK_LAYER 10
|
||||
#define BACK_LAYER 9
|
||||
#define HAIR_LAYER 8 //TODO: make part of head layer?
|
||||
#define FACEMASK_LAYER 7
|
||||
#define HEAD_LAYER 6
|
||||
#define HANDCUFF_LAYER 5
|
||||
#define LEGCUFF_LAYER 4
|
||||
#define HANDS_LAYER 3
|
||||
#define BODY_FRONT_LAYER 2
|
||||
#define FIRE_LAYER 1 //If you're on fire
|
||||
#define TOTAL_LAYERS 26 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
|
||||
@@ -75,8 +83,7 @@
|
||||
#define UNDER_HEAD_LAYER HEAD_LAYER+1
|
||||
#define UNDER_HANDCUFF_LAYER HANDCUFF_LAYER+1
|
||||
#define UNDER_LEGCUFF_LAYER LEGCUFF_LAYER+1
|
||||
#define UNDER_L_HAND_LAYER L_HAND_LAYER+1
|
||||
#define UNDER_R_HAND_LAYER R_HAND_LAYER+1
|
||||
#define UNDER_HANDS_LAYER HANDS_LAYER+1
|
||||
#define UNDER_BODY_FRONT_LAYER BODY_FRONT_LAYER+1
|
||||
#define UNDER_FIRE_LAYER FIRE_LAYER+1
|
||||
|
||||
@@ -102,8 +109,7 @@
|
||||
#define ABOVE_HEAD_LAYER HEAD_LAYER-1
|
||||
#define ABOVE_HANDCUFF_LAYER HANDCUFF_LAYER-1
|
||||
#define ABOVE_LEGCUFF_LAYER LEGCUFF_LAYER-1
|
||||
#define ABOVE_L_HAND_LAYER L_HAND_LAYER-1
|
||||
#define ABOVE_R_HAND_LAYER R_HAND_LAYER-1
|
||||
#define ABOVE_HANDS_LAYER HANDS_LAYER-1
|
||||
#define ABOVE_BODY_FRONT_LAYER BODY_FRONT_LAYER-1
|
||||
#define ABOVE_FIRE_LAYER FIRE_LAYER-1
|
||||
|
||||
@@ -125,53 +131,10 @@
|
||||
|
||||
#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level
|
||||
|
||||
|
||||
|
||||
//HUD styles. Please ensure HUD_VERSIONS is the same as the maximum index. Index order defines how they are cycled in F12.
|
||||
#define HUD_STYLE_STANDARD 1
|
||||
#define HUD_STYLE_REDUCED 2
|
||||
#define HUD_STYLE_NOHUD 3
|
||||
|
||||
|
||||
#define HUD_VERSIONS 3 //used in show_hud()
|
||||
//1 = standard hud
|
||||
//2 = reduced hud (just hands and intent switcher)
|
||||
//3 = no hud (for screenshots)
|
||||
|
||||
#define MINERAL_MATERIAL_AMOUNT 2000
|
||||
//The amount of materials you get from a sheet of mineral like iron/diamond/glass etc
|
||||
#define MAX_STACK_SIZE 50
|
||||
//The maximum size of a stack object.
|
||||
|
||||
#define CLICK_CD_MELEE 8
|
||||
#define CLICK_CD_RANGE 4
|
||||
#define CLICK_CD_CLICK_ABILITY 6
|
||||
#define CLICK_CD_BREAKOUT 100
|
||||
#define CLICK_CD_HANDCUFFED 10
|
||||
#define CLICK_CD_RESIST 20
|
||||
#define CLICK_CD_GRABBING 10
|
||||
|
||||
//click cooldowns, in tenths of a second
|
||||
|
||||
|
||||
#define BE_CLOSE 1 //in the case of a silicon, to select if they need to be next to the atom
|
||||
#define NO_DEXTERY 1 //if other mobs (monkeys, aliens, etc) can use this
|
||||
//used by canUseTopic()
|
||||
|
||||
//Sizes of mobs, used by mob/living/var/mob_size
|
||||
#define MOB_SIZE_TINY 0
|
||||
#define MOB_SIZE_SMALL 1
|
||||
#define MOB_SIZE_HUMAN 2
|
||||
#define MOB_SIZE_LARGE 3
|
||||
|
||||
//Cuff resist speeds
|
||||
|
||||
#define FAST_CUFFBREAK 1
|
||||
#define INSTANT_CUFFBREAK 2
|
||||
|
||||
//Slime evolution threshold. Controls how fast slimes can split/grow
|
||||
#define SLIME_EVOLUTION_THRESHOLD 10
|
||||
|
||||
//singularity defines
|
||||
#define STAGE_ONE 1
|
||||
#define STAGE_TWO 3
|
||||
@@ -209,36 +172,6 @@
|
||||
#define CRAYON_FONT "Comic Sans MS"
|
||||
#define SIGNFONT "Times New Roman"
|
||||
|
||||
|
||||
//NPC DEFINES
|
||||
#define INTERACTING 2
|
||||
#define TRAVEL 4
|
||||
#define FIGHTING 8
|
||||
|
||||
//TRAITS
|
||||
|
||||
#define TRAIT_ROBUST 2
|
||||
#define TRAIT_UNROBUST 4
|
||||
#define TRAIT_SMART 8
|
||||
#define TRAIT_DUMB 16
|
||||
#define TRAIT_MEAN 32
|
||||
#define TRAIT_FRIENDLY 64
|
||||
#define TRAIT_THIEVING 128
|
||||
|
||||
//SNPC defines
|
||||
#define MAX_RANGE_FIND 32
|
||||
#define MIN_RANGE_FIND 16
|
||||
#define FUZZY_CHANCE_HIGH 85
|
||||
#define FUZZY_CHANCE_LOW 50
|
||||
#define CHANCE_TALK 1
|
||||
|
||||
#define SNPC_BRUTE 1
|
||||
#define SNPC_STEALTH 2
|
||||
#define SNPC_MARTYR 3
|
||||
#define SNPC_PSYCHO 4
|
||||
|
||||
|
||||
#define MAXCOIL 30
|
||||
#define RESIZE_DEFAULT_SIZE 1
|
||||
|
||||
//transfer_ai() defines. Main proc in ai_core.dm
|
||||
@@ -246,19 +179,6 @@
|
||||
#define AI_TRANS_FROM_CARD 2 //Uploading AI from InteliCard
|
||||
#define AI_MECH_HACK 3 //Malfunctioning AI hijacking mecha
|
||||
|
||||
//Material defines
|
||||
#define MAT_METAL "$metal"
|
||||
#define MAT_GLASS "$glass"
|
||||
#define MAT_SILVER "$silver"
|
||||
#define MAT_GOLD "$gold"
|
||||
#define MAT_DIAMOND "$diamond"
|
||||
#define MAT_URANIUM "$uranium"
|
||||
#define MAT_PLASMA "$plasma"
|
||||
#define MAT_BANANIUM "$bananium"
|
||||
#define MAT_TITANIUM "$titanium"
|
||||
#define MAT_BIOMASS "$biomass"
|
||||
|
||||
|
||||
//check_target_facings() return defines
|
||||
#define FACING_FAILED 0
|
||||
#define FACING_SAME_DIR 1
|
||||
@@ -295,11 +215,6 @@ var/list/bloody_footprints_cache = list()
|
||||
//Maximum amount of time, (in approx. seconds.) a tile can be wet for.
|
||||
#define MAXIMUM_WET_TIME 300
|
||||
|
||||
//Object/Item sharpness
|
||||
#define IS_BLUNT 0
|
||||
#define IS_SHARP 1
|
||||
#define IS_SHARP_ACCURATE 2
|
||||
|
||||
//unmagic-strings for types of polls
|
||||
#define POLLTYPE_OPTION "OPTION"
|
||||
#define POLLTYPE_TEXT "TEXT"
|
||||
@@ -307,32 +222,28 @@ var/list/bloody_footprints_cache = list()
|
||||
#define POLLTYPE_MULTI "MULTICHOICE"
|
||||
#define POLLTYPE_IRV "IRV"
|
||||
|
||||
|
||||
|
||||
//lighting area defines
|
||||
#define DYNAMIC_LIGHTING_DISABLED 0 //dynamic lighting disabled (area stays at full brightness)
|
||||
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
|
||||
#define DYNAMIC_LIGHTING_IFSTARLIGHT 2 //dynamic lighting enabled only if starlight is.
|
||||
#define IS_DYNAMIC_LIGHTING(A) ( A.lighting_use_dynamic == DYNAMIC_LIGHTING_IFSTARLIGHT ? config.starlight : A.lighting_use_dynamic )
|
||||
|
||||
//subtypesof(), typesof() without the parent path
|
||||
#define subtypesof(typepath) ( typesof(typepath) - typepath )
|
||||
|
||||
//Gets the turf this atom inhabits
|
||||
#define get_turf(A) (get_step(A, 0))
|
||||
|
||||
//Bot types
|
||||
#define SEC_BOT 1 // Secutritrons (Beepsky) and ED-209s
|
||||
#define MULE_BOT 2 // MULEbots
|
||||
#define FLOOR_BOT 4 // Floorbots
|
||||
#define CLEAN_BOT 8 // Cleanbots
|
||||
#define MED_BOT 16 // Medibots
|
||||
|
||||
//Sentience types
|
||||
#define SENTIENCE_ORGANIC 1
|
||||
#define SENTIENCE_ARTIFICIAL 2
|
||||
#define SENTIENCE_OTHER 3
|
||||
#define SENTIENCE_MINEBOT 4
|
||||
#define SENTIENCE_BOSS 5
|
||||
|
||||
//Fire stuff, for burn_state
|
||||
#define LAVA_PROOF -2
|
||||
#define FIRE_PROOF -1
|
||||
#define FLAMMABLE 0
|
||||
#define ON_FIRE 1
|
||||
|
||||
//Fire and Acid stuff, for resistance_flags
|
||||
#define LAVA_PROOF 1
|
||||
#define FIRE_PROOF 2 //100% immune to fire damage (but not necessarily to lava or heat)
|
||||
#define FLAMMABLE 4
|
||||
#define ON_FIRE 8
|
||||
#define UNACIDABLE 16 //acid can't even appear on it, let alone melt it.
|
||||
#define ACID_PROOF 32 //acid stuck on it doesn't melt it.
|
||||
#define INDESTRUCTIBLE 64 //doesn't take damage
|
||||
|
||||
//Ghost orbit types:
|
||||
#define GHOST_ORBIT_CIRCLE "circle"
|
||||
@@ -364,11 +275,11 @@ var/global/list/ghost_accs_options = list(GHOST_ACCS_NONE, GHOST_ACCS_DIR, GHOST
|
||||
|
||||
#define GHOST_OTHERS_DEFAULT_OPTION GHOST_OTHERS_THEIR_SETTING
|
||||
|
||||
var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DEFAULT_SPRITE, GHOST_OTHERS_THEIR_SETTING) //Same as ghost_accs_options.
|
||||
#define GHOST_MAX_VIEW_RANGE_DEFAULT 10
|
||||
#define GHOST_MAX_VIEW_RANGE_MEMBER 14
|
||||
|
||||
//Bloodcrawling
|
||||
#define BLOODCRAWL 1
|
||||
#define BLOODCRAWL_EAT 2
|
||||
|
||||
var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DEFAULT_SPRITE, GHOST_OTHERS_THEIR_SETTING) //Same as ghost_accs_options.
|
||||
|
||||
//Color Defines
|
||||
#define OOC_COLOR "#002eb8"
|
||||
@@ -404,17 +315,6 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
//Just space
|
||||
#define SPACE_ICON_STATE "[((x + y) ^ ~(x * y) + z) % 25]"
|
||||
|
||||
//Gun trigger guards
|
||||
#define TRIGGER_GUARD_ALLOW_ALL -1
|
||||
#define TRIGGER_GUARD_NONE 0
|
||||
#define TRIGGER_GUARD_NORMAL 1
|
||||
|
||||
// Plant types
|
||||
#define PLANT_NORMAL 0
|
||||
#define PLANT_WEED 1
|
||||
#define PLANT_MUSHROOM 2
|
||||
#define PLANT_ALIEN 3
|
||||
|
||||
// Maploader bounds indices
|
||||
#define MAP_MINX 1
|
||||
#define MAP_MINY 2
|
||||
@@ -423,11 +323,6 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define MAP_MAXY 5
|
||||
#define MAP_MAXZ 6
|
||||
|
||||
#define CHECK_DNA_AND_SPECIES(C) if((!(C.dna)) || (!(C.dna.species))) return
|
||||
|
||||
// Evil narsie colour
|
||||
#define NARSIE_WINDOW_COLOUR "#7D1919"
|
||||
|
||||
// Defib stats
|
||||
#define DEFIB_TIME_LIMIT 120
|
||||
#define DEFIB_TIME_LOSS 60
|
||||
@@ -436,15 +331,6 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define FIRST_DIAG_STEP 1
|
||||
#define SECOND_DIAG_STEP 2
|
||||
|
||||
//Slime commands defines
|
||||
#define SLIME_FRIENDSHIP_FOLLOW 3 //Min friendship to order it to follow
|
||||
#define SLIME_FRIENDSHIP_STOPEAT 5 //Min friendship to order it to stop eating someone
|
||||
#define SLIME_FRIENDSHIP_STOPEAT_NOANGRY 7 //Min friendship to order it to stop eating someone without it losing friendship
|
||||
#define SLIME_FRIENDSHIP_STOPCHASE 4 //Min friendship to order it to stop chasing someone (their target)
|
||||
#define SLIME_FRIENDSHIP_STOPCHASE_NOANGRY 6 //Min friendship to order it to stop chasing someone (their target) without it losing friendship
|
||||
#define SLIME_FRIENDSHIP_STAY 3 //Min friendship to order it to stay
|
||||
#define SLIME_FRIENDSHIP_ATTACK 8 //Min friendship to order it to attack
|
||||
|
||||
#define DEADCHAT_ARRIVALRATTLE "arrivalrattle"
|
||||
#define DEADCHAT_DEATHRATTLE "deathrattle"
|
||||
#define DEADCHAT_REGULAR "regular-deadchat"
|
||||
@@ -463,24 +349,61 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define COORD(A) "([A.x],[A.y],[A.z])"
|
||||
#define INCREMENT_TALLY(L, stat) if(L[stat]){L[stat]++}else{L[stat] = 1}
|
||||
|
||||
// Inventory depth: limits how many nested storage items you can access directly.
|
||||
// 1: stuff in mob, 2: stuff in backpack, 3: stuff in box in backpack, etc
|
||||
#define INVENTORY_DEPTH 3
|
||||
#define STORAGE_VIEW_DEPTH 2
|
||||
|
||||
|
||||
|
||||
// Medal names
|
||||
|
||||
#define BOSS_KILL_MEDAL "Killer"
|
||||
|
||||
#define ALL_KILL_MEDAL "Exterminator" //Killing all of x type
|
||||
|
||||
// Score names
|
||||
|
||||
#define LEGION_SCORE "Legion Killed"
|
||||
#define COLOSSUS_SCORE "Colossus Killed"
|
||||
#define BUBBLEGUM_SCORE "Bubblegum Killed"
|
||||
#define DRAKE_SCORE "Drakes Killed"
|
||||
#define BIRD_SCORE "Hierophants Killed"
|
||||
#define SWARMER_BEACON_SCORE "Swarmer Beacons Killed"
|
||||
#define BOSS_SCORE "Bosses Killed"
|
||||
#define TENDRIL_CLEAR_SCORE "Tendrils Killed"
|
||||
|
||||
//TODO Move to a pref
|
||||
#define STATION_GOAL_BUDGET 1
|
||||
|
||||
//Luma coefficients suggested for HDTVs. If you change these, make sure they add up to 1.
|
||||
#define LUMA_R 0.213
|
||||
#define LUMA_G 0.715
|
||||
#define LUMA_B 0.072
|
||||
|
||||
//different types of atom colorations
|
||||
#define ADMIN_COLOUR_PRIORITY 1 //only used by rare effects like greentext coloring mobs and when admins varedit color
|
||||
#define TEMPORARY_COLOUR_PRIORITY 2 //e.g. purple effect of the revenant on a mob, black effect when mob electrocuted
|
||||
#define WASHABLE_COLOUR_PRIORITY 3 //color splashed onto an atom (e.g. paint on turf)
|
||||
#define FIXED_COLOUR_PRIORITY 4 //color inherent to the atom (e.g. blob color)
|
||||
#define COLOUR_PRIORITY_AMOUNT 4 //how many priority levels there are.
|
||||
|
||||
//Endgame Results
|
||||
#define NUKE_NEAR_MISS 1
|
||||
#define NUKE_MISS_STATION 2
|
||||
#define NUKE_SYNDICATE_BASE 3
|
||||
#define STATION_DESTROYED_NUKE 4
|
||||
#define STATION_EVACUATED 5
|
||||
#define GANG_LOSS 6
|
||||
#define GANG_TAKEOVER 7
|
||||
#define BLOB_WIN 8
|
||||
#define BLOB_NUKE 9
|
||||
#define BLOB_DESTROYED 10
|
||||
#define CULT_ESCAPE 11
|
||||
#define CULT_FAILURE 12
|
||||
#define CULT_SUMMON 13
|
||||
#define NUKE_MISS 14
|
||||
#define OPERATIVES_KILLED 15
|
||||
#define OPERATIVE_SKIRMISH 16
|
||||
#define REVS_WIN 17
|
||||
#define REVS_LOSE 18
|
||||
#define WIZARD_KILLED 19
|
||||
#define STATION_NUKED 20
|
||||
#define CLOCK_SUMMON 21
|
||||
#define CLOCK_SILICONS 22
|
||||
#define CLOCK_PROSELYTIZATION 23
|
||||
#define SHUTTLE_HIJACK 24
|
||||
|
||||
#define TURF_DECAL_PAINT "paint"
|
||||
#define TURF_DECAL_DAMAGE "damage"
|
||||
#define TURF_DECAL_DIRT "dirt"
|
||||
@@ -0,0 +1,103 @@
|
||||
/*ALL MOB-RELATED DEFINES THAT DON'T BELONG IN ANOTHER FILE GO HERE*/
|
||||
|
||||
//Misc mob defines
|
||||
|
||||
//movement intent defines for the m_intent var
|
||||
#define MOVE_INTENT_WALK "walk"
|
||||
#define MOVE_INTENT_RUN "run"
|
||||
|
||||
//Blood levels
|
||||
#define BLOOD_VOLUME_MAXIMUM 2000
|
||||
#define BLOOD_VOLUME_SLIME_SPLIT 1120
|
||||
#define BLOOD_VOLUME_NORMAL 560
|
||||
#define BLOOD_VOLUME_SAFE 501
|
||||
#define BLOOD_VOLUME_OKAY 336
|
||||
#define BLOOD_VOLUME_BAD 224
|
||||
#define BLOOD_VOLUME_SURVIVE 122
|
||||
|
||||
//Sizes of mobs, used by mob/living/var/mob_size
|
||||
#define MOB_SIZE_TINY 0
|
||||
#define MOB_SIZE_SMALL 1
|
||||
#define MOB_SIZE_HUMAN 2
|
||||
#define MOB_SIZE_LARGE 3
|
||||
|
||||
//Ventcrawling defines
|
||||
#define VENTCRAWLER_NONE 0
|
||||
#define VENTCRAWLER_NUDE 1
|
||||
#define VENTCRAWLER_ALWAYS 2
|
||||
|
||||
//Bloodcrawling defines
|
||||
#define BLOODCRAWL 1
|
||||
#define BLOODCRAWL_EAT 2
|
||||
|
||||
//Organ defines for carbon mobs
|
||||
#define ORGAN_ORGANIC 1
|
||||
#define ORGAN_ROBOTIC 2
|
||||
|
||||
#define BODYPART_ORGANIC 1
|
||||
#define BODYPART_ROBOTIC 2
|
||||
|
||||
#define MONKEY_BODYPART "monkey"
|
||||
#define ALIEN_BODYPART "alien"
|
||||
#define LARVA_BODYPART "larva"
|
||||
#define DEVIL_BODYPART "devil"
|
||||
/*see __DEFINES/inventory.dm for bodypart bitflag defines*/
|
||||
|
||||
//Nutrition levels for humans
|
||||
#define NUTRITION_LEVEL_FAT 600
|
||||
#define NUTRITION_LEVEL_FULL 550
|
||||
#define NUTRITION_LEVEL_WELL_FED 450
|
||||
#define NUTRITION_LEVEL_FED 350
|
||||
#define NUTRITION_LEVEL_HUNGRY 250
|
||||
#define NUTRITION_LEVEL_STARVING 150
|
||||
|
||||
//Slime evolution threshold. Controls how fast slimes can split/grow
|
||||
#define SLIME_EVOLUTION_THRESHOLD 10
|
||||
|
||||
//Slime commands defines
|
||||
#define SLIME_FRIENDSHIP_FOLLOW 3 //Min friendship to order it to follow
|
||||
#define SLIME_FRIENDSHIP_STOPEAT 5 //Min friendship to order it to stop eating someone
|
||||
#define SLIME_FRIENDSHIP_STOPEAT_NOANGRY 7 //Min friendship to order it to stop eating someone without it losing friendship
|
||||
#define SLIME_FRIENDSHIP_STOPCHASE 4 //Min friendship to order it to stop chasing someone (their target)
|
||||
#define SLIME_FRIENDSHIP_STOPCHASE_NOANGRY 6 //Min friendship to order it to stop chasing someone (their target) without it losing friendship
|
||||
#define SLIME_FRIENDSHIP_STAY 3 //Min friendship to order it to stay
|
||||
#define SLIME_FRIENDSHIP_ATTACK 8 //Min friendship to order it to attack
|
||||
|
||||
//Sentience types, to prevent things like sentience potions from giving bosses sentience
|
||||
#define SENTIENCE_ORGANIC 1
|
||||
#define SENTIENCE_ARTIFICIAL 2
|
||||
#define SENTIENCE_OTHER 3
|
||||
#define SENTIENCE_MINEBOT 4
|
||||
#define SENTIENCE_BOSS 5
|
||||
|
||||
//Mob AI Status
|
||||
|
||||
//Hostile simple animals
|
||||
#define AI_ON 1
|
||||
#define AI_IDLE 2
|
||||
#define AI_OFF 3
|
||||
|
||||
//SNPCs
|
||||
//AI defines
|
||||
#define INTERACTING 2
|
||||
#define TRAVEL 4
|
||||
#define FIGHTING 8
|
||||
//Trait defines
|
||||
#define TRAIT_ROBUST 2
|
||||
#define TRAIT_UNROBUST 4
|
||||
#define TRAIT_SMART 8
|
||||
#define TRAIT_DUMB 16
|
||||
#define TRAIT_MEAN 32
|
||||
#define TRAIT_FRIENDLY 64
|
||||
#define TRAIT_THIEVING 128
|
||||
//Range/chance defines
|
||||
#define MAX_RANGE_FIND 32
|
||||
#define MIN_RANGE_FIND 16
|
||||
#define FUZZY_CHANCE_HIGH 85
|
||||
#define FUZZY_CHANCE_LOW 50
|
||||
#define CHANCE_TALK 1
|
||||
//Traitor type defines
|
||||
#define SNPC_BRUTE 1
|
||||
#define SNPC_STEALTH 2
|
||||
#define SNPC_MARTYR 3
|
||||
#define SNPC_PSYCHO 4
|
||||
@@ -0,0 +1,38 @@
|
||||
//Monkey defines, placed here so they can be read by other things!
|
||||
|
||||
//Mode defines
|
||||
#define MONKEY_IDLE 0 // idle
|
||||
#define MONKEY_HUNT 1 // found target, hunting
|
||||
#define MONKEY_FLEE 2 // free from enemies
|
||||
#define MONKEY_DISPOSE 3 // dump body in disposals
|
||||
|
||||
#define MONKEY_FLEE_HEALTH 50 // below this health value the monkey starts to flee from enemies
|
||||
#define MONKEY_ENEMY_VISION 9 // how close an enemy must be to trigger aggression
|
||||
#define MONKEY_FLEE_VISION 4 // how close an enemy must be before it triggers flee
|
||||
#define MONKEY_ITEM_SNATCH_DELAY 25 // How long does it take the item to be taken from a mobs hand
|
||||
#define MONKEY_CUFF_RETALIATION_PROB 20 // Probability monkey will aggro when cuffed
|
||||
#define MONKEY_SYRINGE_RETALIATION_PROB 20 // Probability monkey will aggro when syringed
|
||||
|
||||
// Probability per Life tick that the monkey will:
|
||||
#define MONKEY_RESIST_PROB 50 // resist out of restraints
|
||||
// when the monkey is idle
|
||||
#define MONKEY_PULL_AGGRO_PROB 5 // aggro against the mob pulling it
|
||||
#define MONKEY_PICKUP_PROB 5 // if not currently getting an item, pickup an item around it
|
||||
#define MONKEY_STEAL_PROB 5 // if not currently getting an item, steal an item from someone around it
|
||||
// when the monkey is hunting
|
||||
#define MONKEY_ATTACK_DISARM_PROB 50 // disarm an armed attacker
|
||||
#define MONKEY_WEAPON_PROB 20 // if not currently getting an item, search for a weapon around it
|
||||
#define MONKEY_RECRUIT_PROB 25 // recruit a monkey near it
|
||||
#define MONKEY_SWITCH_TARGET_PROB 25 // switch targets if it sees another enemy
|
||||
|
||||
#define MONKEY_RETALIATE_HARM_PROB 95 // probability for the monkey to aggro when attacked with harm intent
|
||||
#define MONKEY_RETALIATE_DISARM_PROB 20 // probability for the monkey to aggro when attacked with disarm intent
|
||||
|
||||
#define MONKEY_HATRED_AMOUNT 4 // amount of aggro to add to an enemy when they attack user
|
||||
#define MONKEY_HATRED_REDUCTION_PROB 25 // probability of reducing aggro by one when the monkey attacks
|
||||
|
||||
// how many Life ticks the monkey will fail to:
|
||||
#define MONKEY_HUNT_FRUSTRATION_LIMIT 8 // Chase after an enemy before giving up
|
||||
#define MONKEY_DISPOSE_FRUSTRATION_LIMIT 16 // Dispose of a body before giving up
|
||||
|
||||
#define MONKEY_AGGRESSIVE_MVM_PROB 1 // If you mass edit monkies to be aggressive. there is a small chance of in-fighting
|
||||
@@ -0,0 +1,7 @@
|
||||
//I would rather have these in pinpointer.dm, but Malf_Modules.dm is loaded before that file so they need to be here.
|
||||
#define TRACK_NUKE_DISK 1 //We track the nuclear authentication disk, either to protect it or steal it
|
||||
#define TRACK_MALF_AI 2 //We track the malfunctioning AI, so we can prevent it from blowing us all up
|
||||
#define TRACK_INFILTRATOR 3 //We track the Syndicate infiltrator, so we can get back to ship when the nuke's armed
|
||||
#define TRACK_OPERATIVES 4 //We track the closest operative, so we can regroup when we need to
|
||||
#define TRACK_ATOM 5 //We track a specified atom, so admins can make us function for events
|
||||
#define TRACK_COORDINATES 6 //We point towards the specified coordinates on our z-level, so we can navigate
|
||||
@@ -38,4 +38,21 @@ Construction breaks otherwise
|
||||
#define DISP_END_OUTLET 7
|
||||
#define DISP_END_CHUTE 8
|
||||
#define DISP_SORTJUNCTION 9
|
||||
#define DISP_SORTJUNCTION_FLIP 10
|
||||
#define DISP_SORTJUNCTION_FLIP 10
|
||||
|
||||
//Transit tubes
|
||||
#define TRANSIT_TUBE_STRAIGHT 0
|
||||
#define TRANSIT_TUBE_STRAIGHT_CROSSING 1
|
||||
#define TRANSIT_TUBE_CURVED 2
|
||||
#define TRANSIT_TUBE_DIAGONAL 3
|
||||
#define TRANSIT_TUBE_DIAGONAL_CROSSING 4
|
||||
#define TRANSIT_TUBE_JUNCTION 5
|
||||
#define TRANSIT_TUBE_STATION 6
|
||||
#define TRANSIT_TUBE_TERMINUS 7
|
||||
#define TRANSIT_TUBE_POD 8
|
||||
|
||||
//the open status of the transit tube station
|
||||
#define STATION_TUBE_OPEN 0
|
||||
#define STATION_TUBE_OPENING 1
|
||||
#define STATION_TUBE_CLOSED 2
|
||||
#define STATION_TUBE_CLOSING 3
|
||||
@@ -1,18 +0,0 @@
|
||||
//List of all preclaimed planes
|
||||
//Generally 'arbitrary' planes should be given a constant number
|
||||
//Planes that are dependent upon another plane value should be defined with that plane
|
||||
#define PLANE_SPACE_BACKGROUND -10
|
||||
#define PLANE_SPACE_PARALLAX (PLANE_SPACE_BACKGROUND + 1)
|
||||
#define PLANE_SPACE_DUST (PLANE_SPACE_PARALLAX + 1)
|
||||
|
||||
#define PLANE_TURF -6
|
||||
#define PLANE_NOIR_BLOOD -5
|
||||
#define PLANE_OBJ -4
|
||||
#define PLANE_MOB -3
|
||||
#define PLANE_EFFECTS -2
|
||||
#define PLANE_LIGHTING -1
|
||||
|
||||
#define PLANE_BASE 0
|
||||
|
||||
#define PLANE_STATIC 1
|
||||
#define PLANE_HUD 2
|
||||
@@ -28,7 +28,22 @@
|
||||
#define CHAT_GHOSTWHISPER 128
|
||||
#define CHAT_GHOSTPDA 256
|
||||
#define CHAT_GHOSTRADIO 512
|
||||
#define CHAT_LOOC 1024
|
||||
|
||||
#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO|CHAT_LOOC)
|
||||
#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO)
|
||||
|
||||
#define PARALLAX_INSANE -1 //for show offs
|
||||
#define PARALLAX_HIGH 0 //default.
|
||||
#define PARALLAX_MED 1
|
||||
#define PARALLAX_LOW 2
|
||||
#define PARALLAX_DISABLE 3 //this option must be the highest number
|
||||
|
||||
#define PARALLAX_DELAY_DEFAULT world.tick_lag
|
||||
#define PARALLAX_DELAY_MED 1
|
||||
#define PARALLAX_DELAY_LOW 2
|
||||
|
||||
#define SEC_DEPT_NONE "None"
|
||||
#define SEC_DEPT_RANDOM "Random"
|
||||
#define SEC_DEPT_ENGINEERING "Engineering"
|
||||
#define SEC_DEPT_MEDICAL "Medical"
|
||||
#define SEC_DEPT_SCIENCE "Science"
|
||||
#define SEC_DEPT_SUPPLY "Supply"
|
||||
@@ -6,10 +6,10 @@
|
||||
#define QDEL_HINT_IWILLGC 2 //functionally the same as the above. qdel should assume the object will gc on its own, and not check it.
|
||||
#define QDEL_HINT_HARDDEL 3 //qdel should assume this object won't gc, and queue a hard delete using a hard reference.
|
||||
#define QDEL_HINT_HARDDEL_NOW 4 //qdel should assume this object won't gc, and hard del it post haste.
|
||||
#define QDEL_HINT_PUTINPOOL 5 //qdel will put this object in the atom pool.
|
||||
#define QDEL_HINT_FINDREFERENCE 6 //functionally identical to QDEL_HINT_QUEUE if TESTING is not enabled in _compiler_options.dm.
|
||||
#define QDEL_HINT_FINDREFERENCE 5 //functionally identical to QDEL_HINT_QUEUE if TESTING is not enabled in _compiler_options.dm.
|
||||
//if TESTING is enabled, qdel will call this object's find_references() verb.
|
||||
//defines for the gc_destroyed var
|
||||
|
||||
#define GC_QUEUED_FOR_QUEUING -1
|
||||
#define GC_QUEUED_FOR_HARD_DEL -2
|
||||
#define GC_QUEUED_FOR_HARD_DEL -2
|
||||
#define GC_CURRENTLY_BEING_QDELETED -3
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define SOLID 1
|
||||
#define LIQUID 2
|
||||
#define GAS 3
|
||||
#define GAS 3
|
||||
|
||||
#define OPENCONTAINER 4096 // is an open container for chemistry purposes
|
||||
#define TRANSPARENT 8192 //Used for non-open containers which you still want to be able to see the reagents off.
|
||||
@@ -1,5 +1,8 @@
|
||||
//Bot defines, placed here so they can be read by other things!
|
||||
/*ALL DEFINES FOR AIS, CYBORGS, AND SIMPLE ANIMAL BOTS*/
|
||||
|
||||
#define DEFAULT_AI_LAWID "default"
|
||||
|
||||
//Bot defines, placed here so they can be read by other things!
|
||||
#define BOT_STEP_DELAY 4 //Delay between movemements
|
||||
#define BOT_STEP_MAX_RETRIES 5 //Maximum times a bot will retry to step from its position
|
||||
|
||||
@@ -23,4 +26,11 @@
|
||||
#define BOT_BLOCKED 14 // blocked
|
||||
#define BOT_NAV 15 // computing navigation
|
||||
#define BOT_WAIT_FOR_NAV 16 // waiting for nav computation
|
||||
#define BOT_NO_ROUTE 17 // no destination beacon found (or no route)
|
||||
#define BOT_NO_ROUTE 17 // no destination beacon found (or no route)
|
||||
|
||||
//Bot types
|
||||
#define SEC_BOT 1 // Secutritrons (Beepsky) and ED-209s
|
||||
#define MULE_BOT 2 // MULEbots
|
||||
#define FLOOR_BOT 4 // Floorbots
|
||||
#define CLEAN_BOT 8 // Cleanbots
|
||||
#define MED_BOT 16 // Medibots
|
||||
@@ -21,10 +21,9 @@
|
||||
#define ROLE_GANG "gangster"
|
||||
#define ROLE_ABDUCTOR "abductor"
|
||||
#define ROLE_REVENANT "revenant"
|
||||
#define ROLE_HOG_GOD "hand of god: god"
|
||||
#define ROLE_HOG_CULTIST "hand of god: cultist"
|
||||
#define ROLE_DEVIL "devil"
|
||||
#define ROLE_SERVANT_OF_RATVAR "servant of Ratvar"
|
||||
#define ROLE_BORER "borer"
|
||||
|
||||
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
|
||||
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
|
||||
@@ -45,8 +44,12 @@ var/global/list/special_roles = list(
|
||||
ROLE_GANG = /datum/game_mode/gang,
|
||||
ROLE_REVENANT,
|
||||
ROLE_ABDUCTOR = /datum/game_mode/abduction,
|
||||
ROLE_HOG_GOD = /datum/game_mode/hand_of_god,
|
||||
ROLE_HOG_CULTIST = /datum/game_mode/hand_of_god,
|
||||
ROLE_DEVIL = /datum/game_mode/devil,
|
||||
ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult,
|
||||
ROLE_BORER,
|
||||
)
|
||||
|
||||
//Job defines for what happens when you fail to qualify for any job during job selection
|
||||
#define BEASSISTANT 1
|
||||
#define BERANDOMJOB 2
|
||||
#define RETURNTOLOBBY 3
|
||||
@@ -15,6 +15,7 @@
|
||||
#define MODE_ALIEN "alientalk"
|
||||
#define MODE_HOLOPAD "holopad"
|
||||
#define MODE_CHANGELING "changeling"
|
||||
#define MODE_VOCALCORDS "cords"
|
||||
|
||||
//Spans. Robot speech, italics, etc. Applied in compose_message().
|
||||
#define SPAN_ROBOT "robot"
|
||||
@@ -24,6 +25,7 @@
|
||||
#define SPAN_PAPYRUS "papyrus"
|
||||
#define SPAN_REALLYBIG "reallybig"
|
||||
#define SPAN_COMMAND "command_headset"
|
||||
#define SPAN_CLOWN "clown"
|
||||
|
||||
//bitflag #defines for return value of the radio() proc.
|
||||
#define ITALICS 1
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
//shuttle mode defines
|
||||
#define SHUTTLE_IDLE 0
|
||||
#define SHUTTLE_RECALL 1
|
||||
#define SHUTTLE_CALL 2
|
||||
#define SHUTTLE_DOCKED 3
|
||||
#define SHUTTLE_STRANDED 4
|
||||
#define SHUTTLE_ESCAPE 5
|
||||
#define SHUTTLE_ENDGAME 6
|
||||
#define SHUTTLE_IDLE "idle"
|
||||
#define SHUTTLE_IGNITING "igniting"
|
||||
#define SHUTTLE_RECALL "recall"
|
||||
#define SHUTTLE_CALL "call"
|
||||
#define SHUTTLE_DOCKED "docked"
|
||||
#define SHUTTLE_STRANDED "stranded"
|
||||
#define SHUTTLE_ESCAPE "escape"
|
||||
#define SHUTTLE_ENDGAME "endgame: game over"
|
||||
|
||||
#define EMERGENCY_IDLE_OR_RECALLED (SSshuttle.emergency && ((SSshuttle.emergency.mode == SHUTTLE_IDLE) || (SSshuttle.emergency.mode == SHUTTLE_RECALL)))
|
||||
#define EMERGENCY_ESCAPED_OR_ENDGAMED (SSshuttle.emergency && ((SSshuttle.emergency.mode == SHUTTLE_ESCAPE) || (SSshuttle.emergency.mode == SHUTTLE_ENDGAME)))
|
||||
#define EMERGENCY_AT_LEAST_DOCKED (SSshuttle.emergency && SSshuttle.emergency.mode != SHUTTLE_IDLE && SSshuttle.emergency.mode != SHUTTLE_RECALL && SSshuttle.emergency.mode != SHUTTLE_CALL)
|
||||
|
||||
// Shuttle return values
|
||||
#define SHUTTLE_CAN_DOCK "can_dock"
|
||||
#define SHUTTLE_NOT_A_DOCKING_PORT "not_a_docking_port"
|
||||
#define SHUTTLE_DWIDTH_TOO_LARGE "docking_width_too_large"
|
||||
#define SHUTTLE_WIDTH_TOO_LARGE "width_too_large"
|
||||
@@ -29,3 +31,11 @@
|
||||
// Ripples, effects that signal a shuttle's arrival
|
||||
#define SHUTTLE_RIPPLE_TIME 100
|
||||
#define SHUTTLE_RIPPLE_FADEIN 50
|
||||
|
||||
#define TRANSIT_REQUEST 1
|
||||
#define TRANSIT_READY 2
|
||||
#define TRANSIT_FULL 3
|
||||
|
||||
#define SHUTTLE_TRANSIT_BORDER 8
|
||||
|
||||
#define PARALLAX_LOOP_TIME 25
|
||||
@@ -20,8 +20,14 @@
|
||||
|
||||
#define INVISIBILITY_ABSTRACT 101 //only used for abstract objects (e.g. spacevine_controller), things that are not really there.
|
||||
|
||||
|
||||
#define BORGMESON 1
|
||||
#define BORGTHERM 2
|
||||
#define BORGXRAY 4
|
||||
#define BORGMATERIAL 8
|
||||
|
||||
//for clothing visor toggles, these determine which vars to toggle
|
||||
#define VISOR_FLASHPROTECT 1
|
||||
#define VISOR_TINT 2
|
||||
#define VISOR_VISIONFLAGS 4 //all following flags only matter for glasses
|
||||
#define VISOR_DARKNESSVIEW 8
|
||||
#define VISOR_INVISVIEW 16
|
||||
|
||||
@@ -24,3 +24,8 @@
|
||||
#define POWEROFF 4 // tbd
|
||||
#define MAINT 8 // under maintaince
|
||||
#define EMPED 16 // temporary broken by EMP pulse
|
||||
|
||||
//ai power requirement defines
|
||||
#define POWER_REQ_NONE 0
|
||||
#define POWER_REQ_ALL 1
|
||||
#define POWER_REQ_CLOCKCULT 2
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
//These are all the different status effects. Use the paths for each effect in the defines.
|
||||
|
||||
#define BASIC_STATUS_EFFECT /datum/status_effect //Has no effect.
|
||||
|
||||
///////////
|
||||
// BUFFS //
|
||||
///////////
|
||||
|
||||
#define STATUS_EFFECT_SHADOW_MEND /datum/status_effect/shadow_mend //Quick, powerful heal that deals damage afterwards. Heals 15 brute/burn every second for 3 seconds.
|
||||
#define STATUS_EFFECT_VOID_PRICE /datum/status_effect/void_price //The price of healing yourself with void energy. Deals 3 brute damage every 3 seconds for 30 seconds.
|
||||
|
||||
#define STATUS_EFFECT_VANGUARD /datum/status_effect/vanguard_shield //Grants temporary stun absorption, but will stun the user based on how many stuns they absorbed.
|
||||
#define STATUS_EFFECT_INATHNEQS_ENDOWMENT /datum/status_effect/inathneqs_endowment //A 15-second invulnerability and stun absorption, granted by Inath-neq.
|
||||
#define STATUS_EFFECT_WRAITHSPECS /datum/status_effect/wraith_spectacles
|
||||
|
||||
#define STATUS_EFFECT_POWERREGEN /datum/status_effect/cyborg_power_regen //Regenerates power on a given cyborg over time
|
||||
|
||||
/////////////
|
||||
// DEBUFFS //
|
||||
/////////////
|
||||
|
||||
#define STATUS_EFFECT_SIGILMARK /datum/status_effect/sigil_mark
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
#define CAT_NONE ""
|
||||
#define CAT_WEAPON "Weaponry"
|
||||
#define CAT_AMMO "Ammunition"
|
||||
#define CAT_ROBOT "Robots"
|
||||
#define CAT_FOOD "Food"
|
||||
#define CAT_MISC "Misc"
|
||||
#define CAT_PRIMAL "Tribal"
|
||||
@@ -1,7 +1,7 @@
|
||||
#define TICK_LIMIT_RUNNING 85
|
||||
#define TICK_LIMIT_TO_RUN 80
|
||||
#define TICK_LIMIT_MC 84
|
||||
#define TICK_LIMIT_MC_INIT 100
|
||||
#define TICK_LIMIT_RUNNING 80
|
||||
#define TICK_LIMIT_TO_RUN 78
|
||||
#define TICK_LIMIT_MC 70
|
||||
#define TICK_LIMIT_MC_INIT_DEFAULT 98
|
||||
|
||||
#define TICK_CHECK ( world.tick_usage > CURRENT_TICKLIMIT ? stoplag() : 0 )
|
||||
#define CHECK_TICK if (world.tick_usage > CURRENT_TICKLIMIT) stoplag()
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//Byond type ids
|
||||
#define TYPEID_NULL "0"
|
||||
#define TYPEID_NORMAL_LIST "f"
|
||||
//helper macros
|
||||
#define GET_TYPEID(ref) ( ( (lentext(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, lentext(ref)-6) ) )
|
||||
#define IS_NORMAL_LIST(L) (GET_TYPEID("\ref[L]") == TYPEID_NORMAL_LIST)
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define DM_HOLD "Hold"
|
||||
#define DM_DIGEST "Digest"
|
||||
#define DM_HEAL "Heal"
|
||||
#define DM_ABSORB "Absorb"
|
||||
#define DM_DIGESTF "Fast Digest"
|
||||
|
||||
#define VORE_STRUGGLE_EMOTE_CHANCE 40
|
||||
@@ -11,8 +10,8 @@
|
||||
#define HOSTILE_STANCE_EATING 99
|
||||
|
||||
|
||||
var/global/list/player_sizes_list = list("Macro" = RESIZE_HUGE, "Big" = RESIZE_BIG, "Normal" = RESIZE_NORMAL, "Small" = RESIZE_SMALL, "Tiny" = RESIZE_TINY)
|
||||
|
||||
var/global/list/player_sizes_list = list("Macro" = SIZESCALE_HUGE, "Big" = SIZESCALE_BIG, "Normal" = SIZESCALE_NORMAL, "Small" = SIZESCALE_SMALL, "Tiny" = SIZESCALE_TINY)
|
||||
/* // moved to sound.dm
|
||||
|
||||
var/global/list/digestion_sounds = list(
|
||||
'sound/vore/digest1.ogg',
|
||||
@@ -38,7 +37,7 @@ var/global/list/death_sounds = list(
|
||||
'sound/vore/death7.ogg',
|
||||
'sound/vore/death8.ogg',
|
||||
'sound/vore/death9.ogg',
|
||||
'sound/vore/death10.ogg')
|
||||
'sound/vore/death10.ogg') */
|
||||
|
||||
var/global/list/vore_sounds = list(
|
||||
"Gulp" = 'sound/vore/gulp.ogg',
|
||||
@@ -51,13 +50,13 @@ var/global/list/vore_sounds = list(
|
||||
"Squish2" = 'sound/vore/squish2.ogg',
|
||||
"Squish3" = 'sound/vore/squish3.ogg',
|
||||
"Squish4" = 'sound/vore/squish4.ogg')
|
||||
|
||||
/* also moved to sound.dmi
|
||||
var/global/list/struggle_sounds = list(
|
||||
"Squish1" = 'sound/vore/squish1.ogg',
|
||||
"Squish2" = 'sound/vore/squish2.ogg',
|
||||
"Squish3" = 'sound/vore/squish3.ogg',
|
||||
"Squish4" = 'sound/vore/squish4.ogg')
|
||||
|
||||
*/
|
||||
//Species listing
|
||||
|
||||
#define iscanine(A) (is_species(A, /datum/species/canine))
|
||||
@@ -66,101 +65,8 @@ var/global/list/struggle_sounds = list(
|
||||
#define isrodent(A) (is_species(A, /datum/species/rodent))
|
||||
#define isherbivorous(A) (is_species(A, /datum/species/herbivorous))
|
||||
#define isexotic(A) (is_species(A, /datum/species/exotic))
|
||||
|
||||
/*
|
||||
var/list/canine_species = list (
|
||||
anubis,
|
||||
corgi,
|
||||
coyote,
|
||||
dalmatian,
|
||||
fennec,
|
||||
fox,
|
||||
husky,
|
||||
wolf,
|
||||
sheperd,
|
||||
lab,
|
||||
otusian
|
||||
)
|
||||
|
||||
var/list/feline_species = list (
|
||||
panther,
|
||||
tajaran,
|
||||
smilodon
|
||||
)
|
||||
|
||||
var/list/avian_species = list (
|
||||
corvid,
|
||||
hawk
|
||||
)
|
||||
|
||||
var/list/lizard_species = list (
|
||||
crocodile,
|
||||
drake,
|
||||
gria,
|
||||
lizard,
|
||||
naga,
|
||||
turtle,
|
||||
shark
|
||||
)
|
||||
|
||||
var/list/rodent_species = list (
|
||||
aramdillo,
|
||||
beaver,
|
||||
jackalope,
|
||||
leporid,
|
||||
murid,
|
||||
otter,
|
||||
porcupine,
|
||||
possum,
|
||||
raccoon,
|
||||
roorat,
|
||||
skunk,
|
||||
squirrel
|
||||
)
|
||||
|
||||
var/list/herbivorous_species = list (
|
||||
boar,
|
||||
capra,
|
||||
cow,
|
||||
deer,
|
||||
hippo,
|
||||
kangaroo,
|
||||
pig
|
||||
)
|
||||
|
||||
var/list/exotic_species = list (
|
||||
alien,
|
||||
carp,
|
||||
drider,
|
||||
glowfen,
|
||||
jelly,
|
||||
moth,
|
||||
plant,
|
||||
seaslug,
|
||||
slime,
|
||||
)
|
||||
|
||||
var/list/taur = list (
|
||||
panther,
|
||||
tajaran,
|
||||
horse,
|
||||
lab,
|
||||
sheperd,
|
||||
fox,
|
||||
cow,
|
||||
husky,
|
||||
naga,
|
||||
wolf,
|
||||
dirder,
|
||||
drake,
|
||||
otie
|
||||
)
|
||||
|
||||
//Mutant Human bits
|
||||
var/global/list/tails_list_human = list()
|
||||
var/global/list/animated_tails_list_human = list()
|
||||
// var/global/list/ears_list = list()
|
||||
var/global/list/wings_list = list()
|
||||
|
||||
/proc/log_debug(text)
|
||||
if (config.log_debug)
|
||||
diary << "\[[time_stamp()]]DEBUG: [text][log_end]"
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#define VV_NUM "Number"
|
||||
#define VV_TEXT "Text"
|
||||
#define VV_MESSAGE "Mutiline Text"
|
||||
#define VV_ICON "Icon"
|
||||
#define VV_ATOM_REFERENCE "Atom Reference"
|
||||
#define VV_DATUM_REFERENCE "Datum Reference"
|
||||
#define VV_MOB_REFERENCE "Mob Reference"
|
||||
#define VV_CLIENT "Client"
|
||||
#define VV_ATOM_TYPE "Atom Typepath"
|
||||
#define VV_DATUM_TYPE "Datum Typepath"
|
||||
#define VV_TYPE "Custom Typepath"
|
||||
#define VV_FILE "File"
|
||||
#define VV_LIST "List"
|
||||
#define VV_NEW_ATOM "New Atom"
|
||||
#define VV_NEW_DATUM "New Datum"
|
||||
#define VV_NEW_TYPE "New Custom Typepath"
|
||||
#define VV_NEW_LIST "New List"
|
||||
#define VV_NULL "NULL"
|
||||
#define VV_RESTORE_DEFAULT "Restore to Default"
|
||||
#define VV_MARKED_DATUM "Marked Datum"
|
||||
|
||||
+45
-44
@@ -1,44 +1,45 @@
|
||||
#define WIRE_ACTIVATE "activate"
|
||||
#define WIRE_AI "ai"
|
||||
#define WIRE_ALARM "alarm"
|
||||
#define WIRE_AVOIDANCE "avoidance"
|
||||
#define WIRE_BACKUP1 "backup1"
|
||||
#define WIRE_BACKUP2 "backup2"
|
||||
#define WIRE_BEACON "beacon"
|
||||
#define WIRE_BOLTS "bolts"
|
||||
#define WIRE_BOOM "boom"
|
||||
#define WIRE_CAMERA "camera"
|
||||
#define WIRE_CONTRABAND "contraband"
|
||||
#define WIRE_DELAY "delay"
|
||||
#define WIRE_DISABLE "disable"
|
||||
#define WIRE_DISARM "disarm"
|
||||
#define WIRE_ELECTRIFY "electrify"
|
||||
#define WIRE_HACK "hack"
|
||||
#define WIRE_IDSCAN "idscan"
|
||||
#define WIRE_INTERFACE "interface"
|
||||
#define WIRE_LAWSYNC "lawsync"
|
||||
#define WIRE_LIGHT "light"
|
||||
#define WIRE_LIMIT "limit"
|
||||
#define WIRE_LOADCHECK "loadcheck"
|
||||
#define WIRE_LOCKDOWN "lockdown"
|
||||
#define WIRE_MOTOR1 "motor1"
|
||||
#define WIRE_MOTOR2 "motor2"
|
||||
#define WIRE_OPEN "open"
|
||||
#define WIRE_PANIC "panic"
|
||||
#define WIRE_POWER "power"
|
||||
#define WIRE_POWER1 "power1"
|
||||
#define WIRE_POWER2 "power2"
|
||||
#define WIRE_PROCEED "proceed"
|
||||
#define WIRE_RX "recieve"
|
||||
#define WIRE_SAFETY "safety"
|
||||
#define WIRE_SHOCK "shock"
|
||||
#define WIRE_SIGNAL "signal"
|
||||
#define WIRE_SPEAKER "speaker"
|
||||
#define WIRE_STRENGTH "strength"
|
||||
#define WIRE_THROW "throw"
|
||||
#define WIRE_TIMING "timing"
|
||||
#define WIRE_TX "transmit"
|
||||
#define WIRE_UNBOLT "unbolt"
|
||||
#define WIRE_ZAP "zap"
|
||||
#define WIRE_ZAP1 "zap1"
|
||||
#define WIRE_ZAP2 "zap2"
|
||||
#define WIRE_DUD_PREFIX "__dud"
|
||||
#define WIRE_ACTIVATE "Activate"
|
||||
#define WIRE_AI "AI Connection"
|
||||
#define WIRE_ALARM "Alarm"
|
||||
#define WIRE_AVOIDANCE "Avoidance"
|
||||
#define WIRE_BACKUP1 "Auxillary Power 1"
|
||||
#define WIRE_BACKUP2 "Auxillary Power 2"
|
||||
#define WIRE_BEACON "Beacon"
|
||||
#define WIRE_BOLTS "Bolts"
|
||||
#define WIRE_BOOM "Boom"
|
||||
#define WIRE_CAMERA "Camera"
|
||||
#define WIRE_CONTRABAND "Contraband"
|
||||
#define WIRE_DELAY "Delay"
|
||||
#define WIRE_DISABLE "Disable"
|
||||
#define WIRE_DISARM "Disarm"
|
||||
#define WIRE_HACK "Hack"
|
||||
#define WIRE_IDSCAN "ID Scan"
|
||||
#define WIRE_INTERFACE "Interface"
|
||||
#define WIRE_LAWSYNC "AI Law Synchronization"
|
||||
#define WIRE_LIGHT "Bolt Lights"
|
||||
#define WIRE_LIMIT "Limiter"
|
||||
#define WIRE_LOADCHECK "Load Check"
|
||||
#define WIRE_LOCKDOWN "Lockdown"
|
||||
#define WIRE_MOTOR1 "Motor 1"
|
||||
#define WIRE_MOTOR2 "Motor 2"
|
||||
#define WIRE_OPEN "Open"
|
||||
#define WIRE_PANIC "Panic Siphon"
|
||||
#define WIRE_POWER "Power"
|
||||
#define WIRE_POWER1 "Main Power 1"
|
||||
#define WIRE_POWER2 "Main Power 2"
|
||||
#define WIRE_PROCEED "Proceed"
|
||||
#define WIRE_RX "Recieve"
|
||||
#define WIRE_RESET_MODULE "Reset Module"
|
||||
#define WIRE_SAFETY "Safety"
|
||||
#define WIRE_SHOCK "High Voltage Ground"
|
||||
#define WIRE_SIGNAL "Signal"
|
||||
#define WIRE_SPEAKER "Speaker"
|
||||
#define WIRE_STRENGTH "Strength"
|
||||
#define WIRE_THROW "Throw"
|
||||
#define WIRE_TIMING "Timing"
|
||||
#define WIRE_TX "Transmit"
|
||||
#define WIRE_UNBOLT "Unbolt"
|
||||
#define WIRE_ZAP "High Voltage Circuit"
|
||||
#define WIRE_ZAP1 "High Voltage Circuit 1"
|
||||
#define WIRE_ZAP2 "High Voltage Circuit 2"
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
/proc/notice(msg)
|
||||
world.log << "## NOTICE: [msg]"
|
||||
|
||||
//print a testing-mode debug message to world.log
|
||||
/proc/testing(msg)
|
||||
//print a testing-mode debug message to world.log and world
|
||||
#ifdef TESTING
|
||||
world.log << "## TESTING: [msg]"
|
||||
#define testing(msg) world.log << "## TESTING: [msg]"; world << "## TESTING: [msg]"
|
||||
#else
|
||||
#define testing(msg)
|
||||
#endif
|
||||
|
||||
/proc/log_admin(text)
|
||||
@@ -19,10 +20,14 @@
|
||||
if (config.log_admin)
|
||||
diary << "\[[time_stamp()]]ADMIN: [text]"
|
||||
|
||||
/proc/log_mentor(text)
|
||||
mentor_log.Add(text)
|
||||
diary << "\[[time_stamp()]]MENTOR: [text]"
|
||||
|
||||
/proc/log_adminsay(text)
|
||||
if (config.log_adminchat)
|
||||
log_admin("ASAY: [text]")
|
||||
|
||||
|
||||
/proc/log_dsay(text)
|
||||
if (config.log_adminchat)
|
||||
log_admin("DSAY: [text]")
|
||||
@@ -76,3 +81,6 @@
|
||||
//reusing the PDA option because I really don't think news comments are worth a config option
|
||||
diary << "\[[time_stamp()]]COMMENT: [text]"
|
||||
|
||||
/proc/log_chat(text)
|
||||
if (config.log_pda)
|
||||
diary << "\[[time_stamp()]]CHAT: [text]"
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
if(query.NextRow())
|
||||
var/diff = text2num(query.item[1])
|
||||
if(config.use_account_age_for_jobs)
|
||||
player_age = max(0,diff) //So job code soesn't freak out if they are time traveling.
|
||||
if(diff < YOUNG)
|
||||
var/msg = "(IP: [address], ID: [computer_id]) is a new BYOND account made on [y]-[m]-[d]."
|
||||
if(diff < 0)
|
||||
|
||||
@@ -40,5 +40,12 @@ var/cmp_field = "name"
|
||||
/proc/cmp_subsystem_priority(datum/subsystem/a, datum/subsystem/b)
|
||||
return a.priority - b.priority
|
||||
|
||||
/proc/cmp_timer(datum/timedevent/a, datum/timedevent/b)
|
||||
return a.timeToRun - b.timeToRun
|
||||
|
||||
/proc/cmp_clientcolour_priority(datum/client_colour/A, datum/client_colour/B)
|
||||
return B.priority - A.priority
|
||||
return B.priority - A.priority
|
||||
|
||||
/proc/cmp_clockscripture_priority(datum/clockwork_scripture/A, datum/clockwork_scripture/B)
|
||||
return initial(A.sort_priority) - initial(B.sort_priority)
|
||||
|
||||
|
||||
+73
-31
@@ -13,13 +13,17 @@
|
||||
for(A, A && !isarea(A), A=A.loc); //semicolon is for the empty statement
|
||||
return A
|
||||
|
||||
/proc/get_area_name(atom/X)
|
||||
var/area/Y = get_area(X)
|
||||
return Y.name
|
||||
|
||||
/proc/get_area_master(O)
|
||||
var/area/A = get_area(O)
|
||||
if(A && A.master)
|
||||
A = A.master
|
||||
return A
|
||||
|
||||
/proc/get_area_name(N) //get area by its name
|
||||
/proc/get_area_by_name(N) //get area by its name
|
||||
for(var/area/A in world)
|
||||
if(A.name == N)
|
||||
return A
|
||||
@@ -315,24 +319,22 @@
|
||||
O.screen_loc = screen_loc
|
||||
return O
|
||||
|
||||
/proc/Show2Group4Delay(obj/O, list/group, delay=0)
|
||||
if(!isobj(O))
|
||||
return
|
||||
if(!group)
|
||||
group = clients
|
||||
for(var/client/C in group)
|
||||
C.screen += O
|
||||
if(delay)
|
||||
spawn(delay)
|
||||
for(var/client/C in group)
|
||||
C.screen -= O
|
||||
/proc/remove_images_from_clients(image/I, list/show_to)
|
||||
for(var/client/C in show_to)
|
||||
C.images -= I
|
||||
|
||||
/proc/flick_overlay(image/I, list/show_to, duration)
|
||||
for(var/client/C in show_to)
|
||||
C.images += I
|
||||
spawn(duration)
|
||||
for(var/client/C in show_to)
|
||||
C.images -= I
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /.proc/remove_images_from_clients, I, show_to), duration)
|
||||
|
||||
/proc/flick_overlay_view(image/I, atom/target, duration) //wrapper for the above, flicks to everyone who can see the target atom
|
||||
var/list/viewing = list()
|
||||
for(var/m in viewers(target))
|
||||
var/mob/M = m
|
||||
if(M.client)
|
||||
viewing += M.client
|
||||
flick_overlay(I, viewing, duration)
|
||||
|
||||
/proc/get_active_player_count(var/alive_check = 0, var/afk_check = 0, var/human_check = 0)
|
||||
// Get active players who are playing in the round
|
||||
@@ -344,9 +346,9 @@
|
||||
continue
|
||||
else if(afk_check && M.client.is_afk())
|
||||
continue
|
||||
else if(human_check && !istype(M, /mob/living/carbon/human))
|
||||
else if(human_check && !ishuman(M))
|
||||
continue
|
||||
else if(istype(M, /mob/new_player)) // exclude people in the lobby
|
||||
else if(isnewplayer(M)) // exclude people in the lobby
|
||||
continue
|
||||
else if(isobserver(M)) // Ghosts are fine if they were playing once (didn't start as observers)
|
||||
var/mob/dead/observer/O = M
|
||||
@@ -393,14 +395,35 @@
|
||||
|
||||
return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y)
|
||||
|
||||
/proc/pollCandidates(var/Question, var/jobbanType, var/datum/game_mode/gametypeCheck, var/be_special_flag = 0, var/poll_time = 300)
|
||||
/proc/showCandidatePollWindow(mob/dead/observer/G, poll_time, Question, list/candidates, ignore_category, time_passed)
|
||||
set waitfor = 0
|
||||
|
||||
G << 'sound/misc/notice2.ogg' //Alerting them to their consideration
|
||||
switch(ignore_category ? askuser(G,Question,"Please answer in [poll_time/10] seconds!","Yes","No","Never for this round", StealFocus=0, Timeout=poll_time) : askuser(G,Question,"Please answer in [poll_time/10] seconds!","Yes","No", StealFocus=0, Timeout=poll_time))
|
||||
if(1)
|
||||
G << "<span class='notice'>Choice registered: Yes.</span>"
|
||||
if((world.time-time_passed)>poll_time)
|
||||
G << "<span class='danger'>Sorry, you were too late for the consideration!</span>"
|
||||
G << 'sound/machines/buzz-sigh.ogg'
|
||||
else
|
||||
candidates += G
|
||||
if(2)
|
||||
G << "<span class='danger'>Choice registered: No.</span>"
|
||||
if(3)
|
||||
var/list/L = poll_ignore[ignore_category]
|
||||
if(!L)
|
||||
poll_ignore[ignore_category] = list()
|
||||
poll_ignore[ignore_category] += G.ckey
|
||||
G << "<span class='danger'>Choice registered: Never for this round.</span>"
|
||||
|
||||
/proc/pollCandidates(var/Question, var/jobbanType, var/datum/game_mode/gametypeCheck, var/be_special_flag = 0, var/poll_time = 300, var/ignore_category = null)
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/time_passed = world.time
|
||||
if (!Question)
|
||||
Question = "Would you like to be a special role?"
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!G.key || !G.client)
|
||||
if(!G.key || !G.client || (ignore_category && poll_ignore[ignore_category] && G.ckey in poll_ignore[ignore_category]))
|
||||
continue
|
||||
if(be_special_flag)
|
||||
if(!(G.client.prefs) || !(be_special_flag in G.client.prefs.be_special))
|
||||
@@ -411,18 +434,8 @@
|
||||
if (jobbanType)
|
||||
if(jobban_isbanned(G, jobbanType) || jobban_isbanned(G, "Syndicate"))
|
||||
continue
|
||||
spawn(0)
|
||||
G << 'sound/misc/notice2.ogg' //Alerting them to their consideration
|
||||
switch(askuser(G,Question,"Please answer in [poll_time/10] seconds!","Yes","No", StealFocus=0, Timeout=poll_time))
|
||||
if(1)
|
||||
G << "<span class='notice'>Choice registered: Yes.</span>"
|
||||
if((world.time-time_passed)>poll_time)
|
||||
G << "<span class='danger'>Sorry, you were too late for the consideration!</span>"
|
||||
G << 'sound/machines/buzz-sigh.ogg'
|
||||
else
|
||||
candidates += G
|
||||
if(2)
|
||||
G << "<span class='danger'>Choice registered: No.</span>"
|
||||
|
||||
showCandidatePollWindow(G, poll_time, Question, candidates, ignore_category, time_passed)
|
||||
sleep(poll_time)
|
||||
|
||||
//Check all our candidates, to make sure they didn't log off during the wait period.
|
||||
@@ -430,8 +443,27 @@
|
||||
if(!G.key || !G.client)
|
||||
candidates.Remove(G)
|
||||
|
||||
listclearnulls(candidates)
|
||||
|
||||
return candidates
|
||||
|
||||
/proc/pollCandidatesForMob(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, mob/M, ignore_category = null)
|
||||
var/list/L = pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category)
|
||||
if(!M || qdeleted(M) || !M.loc)
|
||||
return list()
|
||||
return L
|
||||
|
||||
/proc/pollCandidatesForMobs(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, list/mobs, ignore_category = null)
|
||||
var/list/L = pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category)
|
||||
var/i=1
|
||||
for(var/v in mobs)
|
||||
var/atom/A = v
|
||||
if(!A || qdeleted(A) || !A.loc)
|
||||
mobs.Cut(i,i+1)
|
||||
else
|
||||
++i
|
||||
return L
|
||||
|
||||
/proc/makeBody(mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character
|
||||
if(!G_found || !G_found.key)
|
||||
return
|
||||
@@ -444,3 +476,13 @@
|
||||
new_character.key = G_found.key
|
||||
|
||||
return new_character
|
||||
|
||||
/proc/send_to_playing_players(thing) //sends a whatever to all playing players; use instead of world << where needed
|
||||
for(var/M in player_list)
|
||||
if(M && !isnewplayer(M))
|
||||
M << thing
|
||||
|
||||
/proc/window_flash(var/client_or_usr)
|
||||
if (!client_or_usr)
|
||||
return
|
||||
winset(client_or_usr, "mainwindow", "flash=5")
|
||||
|
||||
@@ -23,12 +23,19 @@
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/lizard, animated_tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/human, animated_tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns, horns_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, wings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, wings_open_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, frills_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, animated_spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, legs_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, r_wings_list,roundstart = TRUE)
|
||||
|
||||
//mammal bodyparts (fucking furries)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, mam_body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, mam_tails_list)
|
||||
@@ -65,6 +72,11 @@
|
||||
var/datum/tech/D = new path()
|
||||
tech_list[D.id] = D
|
||||
|
||||
//Emotes
|
||||
for(var/path in subtypesof(/datum/emote))
|
||||
var/datum/emote/E = new path()
|
||||
emote_list[E.key] = E
|
||||
|
||||
init_subtypes(/datum/crafting_recipe, crafting_recipes)
|
||||
|
||||
/* // Uncomment to debug chemical reaction list.
|
||||
|
||||
@@ -108,39 +108,39 @@
|
||||
|
||||
return adjacencies
|
||||
|
||||
//do not use, use queue_smooth(atom)
|
||||
/proc/smooth_icon(atom/A)
|
||||
if(!A || !A.smooth || !A.z)
|
||||
return
|
||||
if(qdeleted(A))
|
||||
return
|
||||
if(!A || !A.smooth)
|
||||
return
|
||||
spawn(0)
|
||||
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
|
||||
var/adjacencies = calculate_adjacencies(A)
|
||||
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
|
||||
var/adjacencies = calculate_adjacencies(A)
|
||||
|
||||
if(A.smooth & SMOOTH_DIAGONAL)
|
||||
A.diagonal_smooth(adjacencies)
|
||||
else
|
||||
cardinal_smooth(A, adjacencies)
|
||||
if(A.smooth & SMOOTH_DIAGONAL)
|
||||
A.diagonal_smooth(adjacencies)
|
||||
else
|
||||
cardinal_smooth(A, adjacencies)
|
||||
|
||||
/atom/proc/diagonal_smooth(adjacencies)
|
||||
switch(adjacencies)
|
||||
if(N_NORTH|N_WEST)
|
||||
replace_smooth_overlays("d1-se-0","d2-se","d3-se","d4-se")
|
||||
replace_smooth_overlays("d-se","d-se-0")
|
||||
if(N_NORTH|N_EAST)
|
||||
replace_smooth_overlays("d1-sw","d2-sw-0","d3-sw","d4-sw")
|
||||
replace_smooth_overlays("d-sw","d-sw-0")
|
||||
if(N_SOUTH|N_WEST)
|
||||
replace_smooth_overlays("d1-ne","d2-ne","d3-ne-0","d4-ne")
|
||||
replace_smooth_overlays("d-ne","d-ne-0")
|
||||
if(N_SOUTH|N_EAST)
|
||||
replace_smooth_overlays("d1-nw","d2-nw","d3-nw","d4-nw-0")
|
||||
replace_smooth_overlays("d-nw","d-nw-0")
|
||||
|
||||
if(N_NORTH|N_WEST|N_NORTHWEST)
|
||||
replace_smooth_overlays("d1-se-1","d2-se","d3-se","d4-se")
|
||||
replace_smooth_overlays("d-se","d-se-1")
|
||||
if(N_NORTH|N_EAST|N_NORTHEAST)
|
||||
replace_smooth_overlays("d1-sw","d2-sw-1","d3-sw","d4-sw")
|
||||
replace_smooth_overlays("d-sw","d-sw-1")
|
||||
if(N_SOUTH|N_WEST|N_SOUTHWEST)
|
||||
replace_smooth_overlays("d1-ne","d2-ne","d3-ne-1","d4-ne")
|
||||
replace_smooth_overlays("d-ne","d-ne-1")
|
||||
if(N_SOUTH|N_EAST|N_SOUTHEAST)
|
||||
replace_smooth_overlays("d1-nw","d2-nw","d3-nw","d4-nw-1")
|
||||
replace_smooth_overlays("d-nw","d-nw-1")
|
||||
|
||||
else
|
||||
cardinal_smooth(src, adjacencies)
|
||||
@@ -153,25 +153,33 @@
|
||||
/turf/closed/wall/diagonal_smooth(adjacencies)
|
||||
adjacencies = reverse_ndir(..())
|
||||
if(adjacencies)
|
||||
underlays.Cut()
|
||||
var/list/U = list()
|
||||
if(fixed_underlay)
|
||||
if(fixed_underlay["space"])
|
||||
underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=src.layer)
|
||||
var/image/I = image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
|
||||
I.plane = PLANE_SPACE
|
||||
U += I
|
||||
else
|
||||
underlays += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=src.layer)
|
||||
U += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER)
|
||||
else
|
||||
var/turf/T = get_step(src, turn(adjacencies, 180))
|
||||
if(T && T.density)
|
||||
if(T && (T.density || T.smooth))
|
||||
T = get_step(src, turn(adjacencies, 135))
|
||||
if(T && T.density)
|
||||
if(T && (T.density || T.smooth))
|
||||
T = get_step(src, turn(adjacencies, 225))
|
||||
|
||||
if(istype(T, /turf/open/space))
|
||||
underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=src.layer)
|
||||
if(isspaceturf(T) && !istype(T, /turf/open/space/transit))
|
||||
var/image/I = image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
|
||||
I.plane = PLANE_SPACE
|
||||
U += I
|
||||
else if(T && !T.density && !T.smooth)
|
||||
underlays += T
|
||||
U += T
|
||||
else if(baseturf && !initial(baseturf.density) && !initial(baseturf.smooth))
|
||||
U += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER)
|
||||
else
|
||||
underlays += DEFAULT_UNDERLAY_IMAGE
|
||||
U += DEFAULT_UNDERLAY_IMAGE
|
||||
underlays = U
|
||||
|
||||
|
||||
/proc/cardinal_smooth(atom/A, adjacencies)
|
||||
//NW CORNER
|
||||
@@ -226,25 +234,31 @@
|
||||
else if(adjacencies & N_EAST)
|
||||
se = "4-e"
|
||||
|
||||
var/list/New = list()
|
||||
|
||||
if(A.top_left_corner != nw)
|
||||
A.overlays -= A.top_left_corner
|
||||
A.top_left_corner = nw
|
||||
A.add_overlay(nw)
|
||||
New += nw
|
||||
|
||||
if(A.top_right_corner != ne)
|
||||
A.overlays -= A.top_right_corner
|
||||
A.top_right_corner = ne
|
||||
A.add_overlay(ne)
|
||||
New += ne
|
||||
|
||||
if(A.bottom_right_corner != sw)
|
||||
A.overlays -= A.bottom_right_corner
|
||||
A.bottom_right_corner = sw
|
||||
A.add_overlay(sw)
|
||||
New += sw
|
||||
|
||||
if(A.bottom_left_corner != se)
|
||||
A.overlays -= A.bottom_left_corner
|
||||
A.bottom_left_corner = se
|
||||
A.add_overlay(se)
|
||||
New += se
|
||||
|
||||
if(New.len)
|
||||
A.add_overlay(New)
|
||||
|
||||
|
||||
/proc/find_type_in_direction(atom/source, direction)
|
||||
var/turf/target_turf = get_step(source, direction)
|
||||
@@ -305,14 +319,16 @@
|
||||
|
||||
/atom/proc/replace_smooth_overlays(nw, ne, sw, se)
|
||||
clear_smooth_overlays()
|
||||
var/list/O = list()
|
||||
top_left_corner = nw
|
||||
add_overlay(nw)
|
||||
O += nw
|
||||
top_right_corner = ne
|
||||
add_overlay(ne)
|
||||
O += ne
|
||||
bottom_left_corner = sw
|
||||
add_overlay(sw)
|
||||
O += sw
|
||||
bottom_right_corner = se
|
||||
add_overlay(se)
|
||||
O += se
|
||||
add_overlay(O)
|
||||
|
||||
/proc/reverse_ndir(ndir)
|
||||
switch(ndir)
|
||||
@@ -351,19 +367,6 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
//SSicon_smooth
|
||||
/proc/ss_smooth_icon(atom/A)
|
||||
if(qdeleted(A))
|
||||
return
|
||||
if(!istype(A) || (A && !A.smooth))
|
||||
return
|
||||
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
|
||||
var/adjacencies = calculate_adjacencies(A)
|
||||
if(A.smooth & SMOOTH_DIAGONAL)
|
||||
A.diagonal_smooth(adjacencies)
|
||||
else
|
||||
cardinal_smooth(A, adjacencies)
|
||||
|
||||
//SSicon_smooth
|
||||
/proc/queue_smooth_neighbors(atom/A)
|
||||
for(var/V in orange(1,A))
|
||||
@@ -384,6 +387,5 @@
|
||||
name = "smooth wall"
|
||||
icon = 'icons/turf/smooth_wall.dmi'
|
||||
icon_state = "smooth"
|
||||
walltype = "shuttle"
|
||||
smooth = SMOOTH_TRUE|SMOOTH_DIAGONAL|SMOOTH_BORDER
|
||||
canSmoothWith = null
|
||||
|
||||
+31
-3
@@ -199,7 +199,7 @@ mob
|
||||
getFlatIcon(src)
|
||||
Browse_Icon()
|
||||
|
||||
obj/effect/overlayTest
|
||||
/obj/effect/overlayTest
|
||||
icon = 'old_or_unused.dmi'
|
||||
icon_state = "blue"
|
||||
pixel_x = -24
|
||||
@@ -948,9 +948,8 @@ var/global/list/friendly_animal_types = list()
|
||||
overlays += priority_overlays
|
||||
|
||||
/atom/proc/add_overlay(image, priority = 0)
|
||||
if(image in overlays)
|
||||
return
|
||||
var/list/new_overlays = overlays.Copy()
|
||||
new_overlays -= image
|
||||
if(priority)
|
||||
if(!priority_overlays)
|
||||
priority_overlays = list()
|
||||
@@ -1007,3 +1006,32 @@ var/global/list/humanoid_icon_cache = list()
|
||||
//Lame.
|
||||
/image/proc/setDir(newdir)
|
||||
dir = newdir
|
||||
|
||||
// Used to make the frozen item visuals for Freon.
|
||||
var/list/freeze_item_icons = list()
|
||||
|
||||
/atom/proc/freeze_icon_index()
|
||||
return "\ref[initial(icon)]-[initial(icon_state)]"
|
||||
|
||||
/obj/proc/make_frozen_visual()
|
||||
if(!is_frozen && (initial(icon) && initial(icon_state)))
|
||||
var/index = freeze_icon_index()
|
||||
var/icon/IC
|
||||
var/icon/P = freeze_item_icons[index]
|
||||
if(!P)
|
||||
P = new /icon
|
||||
for(var/iconstate in icon_states(icon))
|
||||
var/icon/O = new('icons/effects/freeze.dmi', "ice_cube")
|
||||
IC = new(icon, iconstate)
|
||||
O.Blend(IC, ICON_ADD)
|
||||
P.Insert(O, iconstate)
|
||||
freeze_item_icons[index] = P
|
||||
icon = P
|
||||
name = "frozen [name]"
|
||||
is_frozen = TRUE
|
||||
|
||||
//Assumes already frozed
|
||||
obj/proc/make_unfrozen()
|
||||
icon = initial(icon)
|
||||
name = replacetext(name, "frozen ", "")
|
||||
is_frozen = FALSE
|
||||
|
||||
+64
-11
@@ -76,9 +76,13 @@
|
||||
. += A
|
||||
|
||||
//Like typesof() or subtypesof(), but returns a typecache instead of a list
|
||||
/proc/typecacheof(path, ignore_root_path)
|
||||
/proc/typecacheof(path, ignore_root_path, only_root_path = FALSE)
|
||||
if(ispath(path))
|
||||
var/list/types = ignore_root_path ? subtypesof(path) : typesof(path)
|
||||
var/list/types = list()
|
||||
if(only_root_path)
|
||||
types = list(path)
|
||||
else
|
||||
types = ignore_root_path ? subtypesof(path) : typesof(path)
|
||||
var/list/L = list()
|
||||
for(var/T in types)
|
||||
L[T] = TRUE
|
||||
@@ -92,8 +96,11 @@
|
||||
L[T] = TRUE
|
||||
else
|
||||
for(var/P in pathlist)
|
||||
for(var/T in typesof(P))
|
||||
L[T] = TRUE
|
||||
if(only_root_path)
|
||||
L[P] = TRUE
|
||||
else
|
||||
for(var/T in typesof(P))
|
||||
L[T] = TRUE
|
||||
return L
|
||||
|
||||
//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
|
||||
@@ -104,13 +111,8 @@
|
||||
|
||||
//Removes any null entries from the list
|
||||
/proc/listclearnulls(list/L)
|
||||
if(istype(L))
|
||||
var/i=1
|
||||
for(var/thing in L)
|
||||
if(thing != null)
|
||||
++i
|
||||
continue
|
||||
L.Cut(i,i+1)
|
||||
var/list/N = new(L.len)
|
||||
L -= N
|
||||
|
||||
/*
|
||||
* Returns list containing all the entries from first list that are not present in second.
|
||||
@@ -228,12 +230,30 @@
|
||||
|
||||
return L
|
||||
|
||||
//same, but returns nothing and acts on list in place
|
||||
/proc/shuffle_inplace(list/L)
|
||||
if(!L)
|
||||
return
|
||||
|
||||
for(var/i=1, i<L.len, ++i)
|
||||
L.Swap(i,rand(i,L.len))
|
||||
|
||||
//Return a list with no duplicate entries
|
||||
/proc/uniqueList(list/L)
|
||||
. = list()
|
||||
for(var/i in L)
|
||||
. |= i
|
||||
|
||||
//same, but returns nothing and acts on list in place (also handles associated values properly)
|
||||
/proc/uniqueList_inplace(list/L)
|
||||
var/temp = L.Copy()
|
||||
L.len = 0
|
||||
for(var/key in temp)
|
||||
if (isnum(key))
|
||||
L |= key
|
||||
else
|
||||
L[key] = temp[key]
|
||||
|
||||
//for sorting clients or mobs by ckey
|
||||
/proc/sortKey(list/L, order=1)
|
||||
return sortTim(L, order >= 0 ? /proc/cmp_ckey_asc : /proc/cmp_ckey_dsc)
|
||||
@@ -392,5 +412,38 @@
|
||||
if(islist(.[i]))
|
||||
.[i] = .(.[i])
|
||||
|
||||
//takes an input_key, as text, and the list of keys already used, outputting a replacement key in the format of "[input_key] ([number_of_duplicates])" if it finds a duplicate
|
||||
//use this for lists of things that might have the same name, like mobs or objects, that you plan on giving to a player as input
|
||||
/proc/avoid_assoc_duplicate_keys(input_key, list/used_key_list)
|
||||
if(!input_key || !istype(used_key_list))
|
||||
return
|
||||
if(used_key_list[input_key])
|
||||
used_key_list[input_key]++
|
||||
input_key = "[input_key] ([used_key_list[input_key]])"
|
||||
else
|
||||
used_key_list[input_key] = 1
|
||||
return input_key
|
||||
|
||||
#if DM_VERSION > 512
|
||||
#error Remie said that lummox was adding a way to get a lists
|
||||
#error contents via list.values, if that is true remove this
|
||||
#error otherwise, update the version and bug lummox
|
||||
#elseif
|
||||
//Flattens a keyed list into a list of it's contents
|
||||
/proc/flatten_list(list/key_list)
|
||||
if(!islist(key_list))
|
||||
return null
|
||||
. = list()
|
||||
for(var/key in key_list)
|
||||
. |= key_list[key]
|
||||
|
||||
//Picks from the list, with some safeties, and returns the "default" arg if it fails
|
||||
#define DEFAULTPICK(L, default) ((istype(L, /list) && L:len) ? pick(L) : default)
|
||||
|
||||
#define LAZYINITLIST(L) if (!L) L = list()
|
||||
|
||||
#define UNSETEMPTY(L) if (L && !L.len) L = null
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!L.len) { L = null; } }
|
||||
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= L.len ? L[I] : null) : L[I]) : null)
|
||||
#define LAZYLEN(L) length(L)
|
||||
|
||||
@@ -20,8 +20,10 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
|
||||
/proc/Ceiling(x, y=1)
|
||||
return -round(-x / y) * y
|
||||
|
||||
/proc/Floor(x, y=1)
|
||||
return round(x / y) * y
|
||||
|
||||
#define Clamp(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
|
||||
#define CLAMP01(x) (Clamp(x,0,1))
|
||||
|
||||
// cotangent
|
||||
/proc/Cot(x)
|
||||
|
||||
+82
-77
@@ -63,91 +63,96 @@
|
||||
|
||||
// Color matrices:
|
||||
|
||||
//Luma coefficients suggested for HDTVs. If you change these, make sure they add up to 1.
|
||||
#define LUMR 0.2126
|
||||
#define LUMG 0.7152
|
||||
#define LUMB 0.0722
|
||||
/* Documenting a couple of potentially useful color matrices here to inspire ideas
|
||||
// Greyscale - indentical to saturation @ 0
|
||||
list(LUMA_R,LUMA_R,LUMA_R,0, LUMA_G,LUMA_G,LUMA_G,0, LUMA_B,LUMA_B,LUMA_B,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
//Still need color matrix addition, negation, and multiplication.
|
||||
// Color inversion
|
||||
list(-1,0,0,0, 0,-1,0,0, 0,0,-1,0, 0,0,0,1, 1,1,1,0)
|
||||
|
||||
//Returns an identity color matrix which does nothing
|
||||
/proc/color_identity()
|
||||
return list(1,0,0, 0,1,0, 0,0,1)
|
||||
// Sepiatone
|
||||
list(0.393,0.349,0.272,0, 0.769,0.686,0.534,0, 0.189,0.168,0.131,0, 0,0,0,1, 0,0,0,0)
|
||||
*/
|
||||
|
||||
//Moves all colors angle degrees around the color wheel while maintaining intensity of the color and not affecting whites
|
||||
//TODO: Need a version that only affects one color (ie shift red to blue but leave greens and blues alone)
|
||||
/proc/color_rotation(angle)
|
||||
if(angle == 0)
|
||||
return color_identity()
|
||||
angle = Clamp(angle, -180, 180)
|
||||
var/cos = cos(angle)
|
||||
//Does nothing
|
||||
/proc/color_matrix_identity()
|
||||
return list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
//Adds/subtracts overall lightness
|
||||
//0 is identity, 1 makes everything white, -1 makes everything black
|
||||
/proc/color_matrix_lightness(power)
|
||||
return list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1, power,power,power,0)
|
||||
|
||||
//Changes distance hues have from grey while maintaining the overall lightness. Greys are unaffected.
|
||||
//1 is identity, 0 is greyscale, >1 oversaturates colors
|
||||
/proc/color_matrix_saturation(value)
|
||||
var/inv = 1 - value
|
||||
var/R = round(LUMA_R * inv, 0.001)
|
||||
var/G = round(LUMA_G * inv, 0.001)
|
||||
var/B = round(LUMA_B * inv, 0.001)
|
||||
|
||||
return list(R + value,R,R,0, G,G + value,G,0, B,B,B + value,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
//Changes distance colors have from rgb(127,127,127) grey
|
||||
//1 is identity. 0 makes everything grey >1 blows out colors and greys
|
||||
/proc/color_matrix_contrast(value)
|
||||
var/add = (1 - value) / 2
|
||||
return list(value,0,0,0, 0,value,0,0, 0,0,value,0, 0,0,0,1, add,add,add,0)
|
||||
|
||||
//Moves all colors angle degrees around the color wheel while maintaining intensity of the color and not affecting greys
|
||||
//0 is identity, 120 moves reds to greens, 240 moves reds to blues
|
||||
/proc/color_matrix_rotate_hue(angle)
|
||||
var/sin = sin(angle)
|
||||
|
||||
var/constA = 0.143
|
||||
var/constB = 0.140
|
||||
var/constC = -0.283
|
||||
var/cos = cos(angle)
|
||||
var/cos_inv_third = 0.333*(1-cos)
|
||||
var/sqrt3_sin = sqrt(3)*sin
|
||||
return list(
|
||||
LUMR + cos * (1-LUMR) + sin * -LUMR, LUMR + cos * -LUMR + sin * constA, LUMR + cos * -LUMR + sin * -(1-LUMR),
|
||||
LUMG + cos * -LUMG + sin * -LUMG, LUMG + cos * (1-LUMG) + sin * constB, LUMG + cos * -LUMG + sin * LUMG,
|
||||
LUMB + cos * -LUMB + sin * (1-LUMB), LUMB + cos * -LUMB + sin * constC, LUMB + cos * (1-LUMB) + sin * LUMB
|
||||
)
|
||||
round(cos+cos_inv_third, 0.001), round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), 0,
|
||||
round(cos_inv_third-sqrt3_sin, 0.001), round(cos+cos_inv_third, 0.001), round(cos_inv_third+sqrt3_sin, 0.001), 0,
|
||||
round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), round(cos+cos_inv_third, 0.001), 0,
|
||||
0,0,0,1,
|
||||
0,0,0,0)
|
||||
|
||||
//Makes everything brighter or darker without regard to existing color or brightness
|
||||
/proc/color_brightness(power)
|
||||
power = Clamp(power, -255, 255)
|
||||
power = power/255
|
||||
//These next three rotate values about one axis only
|
||||
//x is the red axis, y is the green axis, z is the blue axis.
|
||||
/proc/color_matrix_rotate_x(angle)
|
||||
var/sinval = round(sin(angle), 0.001); var/cosval = round(cos(angle), 0.001)
|
||||
return list(1,0,0,0, 0,cosval,sinval,0, 0,-sinval,cosval,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
return list(1,0,0, 0,1,0, 0,0,1, power,power,power)
|
||||
/proc/color_matrix_rotate_y(angle)
|
||||
var/sinval = round(sin(angle), 0.001); var/cosval = round(cos(angle), 0.001)
|
||||
return list(cosval,0,-sinval,0, 0,1,0,0, sinval,0,cosval,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
/var/list/delta_index = list(
|
||||
0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11,
|
||||
0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24,
|
||||
0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42,
|
||||
0.44, 0.46, 0.48, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, 0.68,
|
||||
0.71, 0.74, 0.77, 0.80, 0.83, 0.86, 0.89, 0.92, 0.95, 0.98,
|
||||
1.0, 1.06, 1.12, 1.18, 1.24, 1.30, 1.36, 1.42, 1.48, 1.54,
|
||||
1.60, 1.66, 1.72, 1.78, 1.84, 1.90, 1.96, 2.0, 2.12, 2.25,
|
||||
2.37, 2.50, 2.62, 2.75, 2.87, 3.0, 3.2, 3.4, 3.6, 3.8,
|
||||
4.0, 4.3, 4.7, 4.9, 5.0, 5.5, 6.0, 6.5, 6.8, 7.0,
|
||||
7.3, 7.5, 7.8, 8.0, 8.4, 8.7, 9.0, 9.4, 9.6, 9.8,
|
||||
10.0)
|
||||
/proc/color_matrix_rotate_z(angle)
|
||||
var/sinval = round(sin(angle), 0.001); var/cosval = round(cos(angle), 0.001)
|
||||
return list(cosval,sinval,0,0, -sinval,cosval,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
//Exxagerates or removes brightness
|
||||
/proc/color_contrast(value)
|
||||
value = Clamp(value, -100, 100)
|
||||
if(value == 0)
|
||||
return color_identity()
|
||||
|
||||
var/x = 0
|
||||
if (value < 0)
|
||||
x = 127 + value / 100 * 127;
|
||||
else
|
||||
x = value % 1
|
||||
if(x == 0)
|
||||
x = delta_index[value]
|
||||
else
|
||||
x = delta_index[value] * (1-x) + delta_index[value+1] * x//use linear interpolation for more granularity.
|
||||
x = x * 127 + 127
|
||||
//Returns a matrix addition of A with B
|
||||
/proc/color_matrix_add(list/A, list/B)
|
||||
if(!istype(A) || !istype(B))
|
||||
return color_matrix_identity()
|
||||
if(A.len != 20 || B.len != 20)
|
||||
return color_matrix_identity()
|
||||
var/list/output = list()
|
||||
output.len = 20
|
||||
for(var/value in 1 to 20)
|
||||
output[value] = A[value] + B[value]
|
||||
return output
|
||||
|
||||
var/mult = x / 127
|
||||
var/add = 0.5 * (127-x) / 255
|
||||
return list(mult,0,0, 0,mult,0, 0,0,mult, add,add,add)
|
||||
|
||||
//Exxagerates or removes colors
|
||||
/proc/color_saturation(value as num)
|
||||
if(value == 0)
|
||||
return color_identity()
|
||||
value = Clamp(value, -100, 100)
|
||||
if(value > 0)
|
||||
value *= 3
|
||||
var/x = 1 + value / 100
|
||||
var/inv = 1 - x
|
||||
var/R = LUMR * inv
|
||||
var/G = LUMG * inv
|
||||
var/B = LUMB * inv
|
||||
|
||||
return list(R + x,R,R, G,G + x,G, B,B,B + x)
|
||||
|
||||
#undef LUMR
|
||||
#undef LUMG
|
||||
#undef LUMB
|
||||
//Returns a matrix multiplication of A with B
|
||||
/proc/color_matrix_multiply(list/A, list/B)
|
||||
if(!istype(A) || !istype(B))
|
||||
return color_matrix_identity()
|
||||
if(A.len != 20 || B.len != 20)
|
||||
return color_matrix_identity()
|
||||
var/list/output = list()
|
||||
output.len = 20
|
||||
var/x = 1
|
||||
var/y = 1
|
||||
var/offset = 0
|
||||
for(y in 1 to 5)
|
||||
offset = (y-1)*4
|
||||
for(x in 1 to 4)
|
||||
output[offset+x] = round(A[offset+1]*B[x] + A[offset+2]*B[x+4] + A[offset+3]*B[x+8] + A[offset+4]*B[x+12]+(y==5?B[x+16]:0), 0.001)
|
||||
return output
|
||||
+70
-27
@@ -62,13 +62,15 @@
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, frills_list)
|
||||
if(!spines_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, spines_list)
|
||||
if(!legs_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, legs_list)
|
||||
if(!body_markings_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, body_markings_list)
|
||||
if(!wings_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, wings_list)
|
||||
|
||||
//For now we will always return none for tail_human and ears.
|
||||
return(list("mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "tail_lizard" = pick(tails_list_lizard), "tail_human" = "None", "wings" = "None", "snout" = pick(snouts_list), "horns" = pick(horns_list), "ears" = "None", "frills" = pick(frills_list), "spines" = pick(spines_list), "body_markings" = pick(body_markings_list)))
|
||||
return(list("mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "tail_lizard" = pick(tails_list_lizard), "tail_human" = "None", "wings" = "None", "snout" = pick(snouts_list), "horns" = pick(horns_list), "ears" = "None", "frills" = pick(frills_list), "spines" = pick(spines_list), "body_markings" = pick(body_markings_list), "legs" = "Normal Legs"))
|
||||
|
||||
/proc/random_hair_style(gender)
|
||||
switch(gender)
|
||||
@@ -105,6 +107,13 @@
|
||||
if(i != attempts_to_find_unique_name && !findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_plasmaman_name(attempts_to_find_unique_name=10)
|
||||
for(var/i=1, i<=attempts_to_find_unique_name, i++)
|
||||
. = capitalize(plasmaman_name())
|
||||
|
||||
if(i != attempts_to_find_unique_name && !findname(.))
|
||||
break
|
||||
|
||||
/proc/random_skin_tone()
|
||||
return pick(skin_tones)
|
||||
|
||||
@@ -161,24 +170,30 @@ Proc for attack log creation, because really why not
|
||||
*/
|
||||
|
||||
/proc/add_logs(mob/user, mob/target, what_done, object=null, addition=null)
|
||||
var/newhealthtxt = ""
|
||||
var/coordinates = ""
|
||||
var/turf/attack_location = get_turf(target)
|
||||
if(attack_location)
|
||||
coordinates = "([attack_location.x],[attack_location.y],[attack_location.z])"
|
||||
if(target && isliving(target))
|
||||
var/mob/living/L = target
|
||||
newhealthtxt = " (NEWHP: [L.health])"
|
||||
if(user && ismob(user))
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][newhealthtxt][coordinates]</font>")
|
||||
if(user.mind)
|
||||
user.mind.attack_log += text("\[[time_stamp()]\] <font color='red'>[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] has [what_done] [target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][newhealthtxt][coordinates]</font>")
|
||||
if(target && ismob(target))
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][newhealthtxt][coordinates]</font>")
|
||||
if(target.mind)
|
||||
target.mind.attack_log += text("\[[time_stamp()]\] <font color='orange'>[target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] has been [what_done] by [user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][newhealthtxt][coordinates]</font>")
|
||||
log_attack("[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][newhealthtxt][coordinates]")
|
||||
|
||||
var/is_mob_user = user && typecache_mob[user.type]
|
||||
var/is_mob_target = target && typecache_mob[target.type]
|
||||
|
||||
var/mob/living/living_target
|
||||
|
||||
|
||||
if(target && isliving(target))
|
||||
living_target = target
|
||||
|
||||
if(is_mob_user)
|
||||
var/message = "\[[time_stamp()]\] <font color='red'>[user ? "[user.name][(user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] has [what_done] [target ? "[target.name][(is_mob_target && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][(living_target) ? " (NEWHP: [living_target.health])" : ""][(attack_location) ? "([attack_location.x],[attack_location.y],[attack_location.z])" : ""]</font>"
|
||||
user.attack_log += message
|
||||
if(user.mind)
|
||||
user.mind.attack_log += message
|
||||
|
||||
if(is_mob_target)
|
||||
var/message = "\[[time_stamp()]\] <font color='orange'>[target ? "[target.name][(target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] has been [what_done] by [user ? "[user.name][(is_mob_user && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][(living_target) ? " (NEWHP: [living_target.health])" : ""][(attack_location) ? "([attack_location.x],[attack_location.y],[attack_location.z])" : ""]</font>"
|
||||
target.attack_log += message
|
||||
if(target.mind)
|
||||
target.mind.attack_log += message
|
||||
|
||||
log_attack("[user ? "[user.name][(is_mob_user && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(is_mob_target && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][(living_target) ? " (NEWHP: [living_target.health])" : ""][(attack_location) ? "([attack_location.x],[attack_location.y],[attack_location.z])" : ""]")
|
||||
|
||||
|
||||
/proc/do_mob(mob/user , mob/target, time = 30, uninterruptible = 0, progress = 1)
|
||||
@@ -192,7 +207,7 @@ Proc for attack log creation, because really why not
|
||||
|
||||
var/target_loc = target.loc
|
||||
|
||||
var/holding = user.get_active_hand()
|
||||
var/holding = user.get_active_held_item()
|
||||
var/datum/progressbar/progbar
|
||||
if (progress)
|
||||
progbar = new(user, time, target)
|
||||
@@ -214,7 +229,7 @@ Proc for attack log creation, because really why not
|
||||
drifting = 0
|
||||
user_loc = user.loc
|
||||
|
||||
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying )
|
||||
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_held_item() != holding || user.incapacitated() || user.lying )
|
||||
. = 0
|
||||
break
|
||||
if (progress)
|
||||
@@ -234,7 +249,7 @@ Proc for attack log creation, because really why not
|
||||
if(!user.Process_Spacemove(0) && user.inertia_dir)
|
||||
drifting = 1
|
||||
|
||||
var/holding = user.get_active_hand()
|
||||
var/holding = user.get_active_held_item()
|
||||
|
||||
var/holdingnull = 1 //User's hand started out empty, check for an empty hand
|
||||
if(holding)
|
||||
@@ -261,8 +276,9 @@ Proc for attack log creation, because really why not
|
||||
break
|
||||
|
||||
if(Tloc && (!target || Tloc != target.loc))
|
||||
. = 0
|
||||
break
|
||||
if((Uloc != Tloc || Tloc != user) && !drifting)
|
||||
. = 0
|
||||
break
|
||||
|
||||
if(needhand)
|
||||
//This might seem like an odd check, but you can still need a hand even when it's empty
|
||||
@@ -271,7 +287,7 @@ Proc for attack log creation, because really why not
|
||||
if(!holding)
|
||||
. = 0
|
||||
break
|
||||
if(user.get_active_hand() != holding)
|
||||
if(user.get_active_held_item() != holding)
|
||||
. = 0
|
||||
break
|
||||
if (progress)
|
||||
@@ -292,7 +308,7 @@ Proc for attack log creation, because really why not
|
||||
for(var/atom/target in targets)
|
||||
originalloc[target] = target.loc
|
||||
|
||||
var/holding = user.get_active_hand()
|
||||
var/holding = user.get_active_held_item()
|
||||
var/datum/progressbar/progbar
|
||||
if(progress)
|
||||
progbar = new(user, time, targets[1])
|
||||
@@ -316,7 +332,7 @@ Proc for attack log creation, because really why not
|
||||
user_loc = user.loc
|
||||
|
||||
for(var/atom/target in targets)
|
||||
if((!drifting && user_loc != user.loc) || originalloc[target] != target.loc || user.get_active_hand() != holding || user.incapacitated() || user.lying )
|
||||
if((!drifting && user_loc != user.loc) || originalloc[target] != target.loc || user.get_active_held_item() != holding || user.incapacitated() || user.lying )
|
||||
. = 0
|
||||
break mainloop
|
||||
if(progbar)
|
||||
@@ -329,6 +345,33 @@ Proc for attack log creation, because really why not
|
||||
if(H.dna && istype(H.dna.species, species_datum))
|
||||
. = TRUE
|
||||
|
||||
/proc/spawn_atom_to_turf(spawn_type, target, amount, admin_spawn=FALSE)
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T)
|
||||
CRASH("attempt to spawn atom type: [spawn_type] in nullspace")
|
||||
|
||||
for(var/j in 1 to amount)
|
||||
var/atom/X = new spawn_type(T)
|
||||
X.admin_spawned = admin_spawn
|
||||
|
||||
/proc/spawn_and_random_walk(spawn_type, target, amount, walk_chance=100, max_walk=3, always_max_walk=FALSE, admin_spawn=FALSE)
|
||||
var/turf/T = get_turf(target)
|
||||
var/step_count = 0
|
||||
if(!T)
|
||||
CRASH("attempt to spawn atom type: [spawn_type] in nullspace")
|
||||
|
||||
for(var/j in 1 to amount)
|
||||
var/atom/movable/X = new spawn_type(T)
|
||||
X.admin_spawned = admin_spawn
|
||||
|
||||
if(always_max_walk || prob(walk_chance))
|
||||
if(always_max_walk)
|
||||
step_count = max_walk
|
||||
else
|
||||
step_count = rand(1, max_walk)
|
||||
|
||||
for(var/i in 1 to step_count)
|
||||
step(X, pick(NORTH, SOUTH, EAST, WEST))
|
||||
|
||||
/proc/deadchat_broadcast(message, mob/follow_target=null, speaker_key=null, message_type=DEADCHAT_REGULAR)
|
||||
for(var/mob/M in player_list)
|
||||
@@ -341,7 +384,7 @@ Proc for attack log creation, because really why not
|
||||
var/adminoverride = 0
|
||||
if(M.client && M.client.holder && (prefs.chat_toggles & CHAT_DEAD))
|
||||
adminoverride = 1
|
||||
if(istype(M, /mob/new_player) && !adminoverride)
|
||||
if(isnewplayer(M) && !adminoverride)
|
||||
continue
|
||||
if(M.stat != DEAD && !adminoverride)
|
||||
continue
|
||||
@@ -356,7 +399,7 @@ Proc for attack log creation, because really why not
|
||||
if(prefs.toggles & DISABLE_ARRIVALRATTLE)
|
||||
continue
|
||||
|
||||
if(istype(M, /mob/dead/observer) && follow_target)
|
||||
if(isobserver(M) && follow_target)
|
||||
var/link = FOLLOW_LINK(M, follow_target)
|
||||
M << "[link] [message]"
|
||||
else
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
else
|
||||
return "[pick(lizard_names_female)]-[pick(lizard_names_female)]"
|
||||
|
||||
/proc/plasmaman_name()
|
||||
return "[pick(plasmaman_names)] \Roman[rand(1,99)]"
|
||||
|
||||
var/church_name = null
|
||||
/proc/church_name()
|
||||
@@ -100,7 +102,7 @@ var/religion_name = null
|
||||
if(2)
|
||||
new_station_name += pick(greek_letters)
|
||||
if(3)
|
||||
new_station_name += pick(roman_numerals)
|
||||
new_station_name += "\Roman[rand(1,99)]"
|
||||
if(4)
|
||||
new_station_name += pick(phonetic_alphabet)
|
||||
if(5)
|
||||
@@ -170,7 +172,7 @@ var/syndicate_code_response//Code response for traitors.
|
||||
|
||||
var/safety[] = list(1,2,3)//Tells the proc which options to remove later on.
|
||||
var/nouns[] = list("love","hate","anger","peace","pride","sympathy","bravery","loyalty","honesty","integrity","compassion","charity","success","courage","deceit","skill","beauty","brilliance","pain","misery","beliefs","dreams","justice","truth","faith","liberty","knowledge","thought","information","culture","trust","dedication","progress","education","hospitality","leisure","trouble","friendships", "relaxation")
|
||||
var/drinks[] = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequila sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
|
||||
var/drinks[] = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island iced tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequila sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
|
||||
var/locations[] = teleportlocs.len ? teleportlocs : drinks//if null, defaults to drinks instead.
|
||||
|
||||
var/names[] = list()
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
//pronoun procs, for getting pronouns without using the text macros that only work in certain positions
|
||||
//datums don't have gender, but most of their subtypes do!
|
||||
/datum/proc/p_they(capitalized, temp_gender)
|
||||
. = "it"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/datum/proc/p_their(capitalized, temp_gender)
|
||||
. = "its"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/datum/proc/p_them(capitalized, temp_gender)
|
||||
. = "it"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/datum/proc/p_have(temp_gender)
|
||||
. = "has"
|
||||
|
||||
/datum/proc/p_are(temp_gender)
|
||||
. = "is"
|
||||
|
||||
/datum/proc/p_were(temp_gender)
|
||||
. = "was"
|
||||
|
||||
/datum/proc/p_do(temp_gender)
|
||||
. = "does"
|
||||
|
||||
/datum/proc/p_theyve(capitalized, temp_gender)
|
||||
. = p_they(capitalized, temp_gender) + "'" + copytext(p_have(temp_gender), 3)
|
||||
|
||||
/datum/proc/p_theyre(capitalized, temp_gender)
|
||||
. = p_they(capitalized, temp_gender) + "'" + copytext(p_are(temp_gender), 2)
|
||||
|
||||
/datum/proc/p_s(temp_gender) //is this a descriptive proc name, or what?
|
||||
. = "s"
|
||||
|
||||
//like clients, which do have gender.
|
||||
/client/p_they(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "they"
|
||||
switch(temp_gender)
|
||||
if(FEMALE)
|
||||
. = "she"
|
||||
if(MALE)
|
||||
. = "he"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/client/p_their(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "their"
|
||||
switch(temp_gender)
|
||||
if(FEMALE)
|
||||
. = "her"
|
||||
if(MALE)
|
||||
. = "his"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/client/p_them(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "them"
|
||||
switch(temp_gender)
|
||||
if(FEMALE)
|
||||
. = "her"
|
||||
if(MALE)
|
||||
. = "him"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/client/p_have(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "has"
|
||||
if(temp_gender == PLURAL || temp_gender == NEUTER)
|
||||
. = "have"
|
||||
|
||||
/client/p_are(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "is"
|
||||
if(temp_gender == PLURAL || temp_gender == NEUTER)
|
||||
. = "are"
|
||||
|
||||
/client/p_were(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "was"
|
||||
if(temp_gender == PLURAL || temp_gender == NEUTER)
|
||||
. = "were"
|
||||
|
||||
/client/p_do(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "does"
|
||||
if(temp_gender == PLURAL || temp_gender == NEUTER)
|
||||
. = "do"
|
||||
|
||||
/client/p_s(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
if(temp_gender != PLURAL && temp_gender != NEUTER)
|
||||
. = "s"
|
||||
|
||||
//mobs(and atoms but atoms don't really matter write your own proc overrides) also have gender!
|
||||
/mob/p_they(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "it"
|
||||
switch(temp_gender)
|
||||
if(FEMALE)
|
||||
. = "she"
|
||||
if(MALE)
|
||||
. = "he"
|
||||
if(PLURAL)
|
||||
. = "they"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/mob/p_their(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "its"
|
||||
switch(temp_gender)
|
||||
if(FEMALE)
|
||||
. = "her"
|
||||
if(MALE)
|
||||
. = "his"
|
||||
if(PLURAL)
|
||||
. = "their"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/mob/p_them(capitalized, temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "it"
|
||||
switch(temp_gender)
|
||||
if(FEMALE)
|
||||
. = "her"
|
||||
if(MALE)
|
||||
. = "him"
|
||||
if(PLURAL)
|
||||
. = "them"
|
||||
if(capitalized)
|
||||
. = capitalize(.)
|
||||
|
||||
/mob/p_have(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "has"
|
||||
if(temp_gender == PLURAL)
|
||||
. = "have"
|
||||
|
||||
/mob/p_are(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "is"
|
||||
if(temp_gender == PLURAL)
|
||||
. = "are"
|
||||
|
||||
/mob/p_were(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "was"
|
||||
if(temp_gender == PLURAL)
|
||||
. = "were"
|
||||
|
||||
/mob/p_do(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
. = "does"
|
||||
if(temp_gender == PLURAL)
|
||||
. = "do"
|
||||
|
||||
/mob/p_s(temp_gender)
|
||||
if(!temp_gender)
|
||||
temp_gender = gender
|
||||
if(temp_gender != PLURAL)
|
||||
. = "s"
|
||||
|
||||
//humans need special handling, because they can have their gender hidden
|
||||
/mob/living/carbon/human/p_they(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_their(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_them(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_have(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_are(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_were(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_do(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_s(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
+118
-55
@@ -206,6 +206,20 @@
|
||||
if(start)
|
||||
return findtextEx(text, suffix, start, null)
|
||||
|
||||
//Checks if any of a given list of needles is in the haystack
|
||||
/proc/text_in_list(haystack, list/needle_list, start=1, end=0)
|
||||
for(var/needle in needle_list)
|
||||
if(findtext(haystack, needle, start, end))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Like above, but case sensitive
|
||||
/proc/text_in_list_case(haystack, list/needle_list, start=1, end=0)
|
||||
for(var/needle in needle_list)
|
||||
if(findtextEx(haystack, needle, start, end))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Adds 'u' number of zeros ahead of the text 't'
|
||||
/proc/add_zero(t, u)
|
||||
while (length(t) < u)
|
||||
@@ -421,66 +435,115 @@ var/list/binary = list("0","1")
|
||||
|
||||
return t
|
||||
|
||||
/proc/char_split(t)
|
||||
. = list()
|
||||
for(var/x in 1 to length(t))
|
||||
. += copytext(t,x,x+1)
|
||||
#define string2charlist(string) (splittext(string, regex("(.)")) - splittext(string, ""))
|
||||
|
||||
var/list/rot13_lookup = list()
|
||||
/proc/rot13(text = "")
|
||||
var/list/textlist = string2charlist(text)
|
||||
var/list/result = list()
|
||||
for(var/c in textlist)
|
||||
var/ca = text2ascii(c)
|
||||
if(ca >= text2ascii("a") && ca <= text2ascii("m"))
|
||||
ca += 13
|
||||
else if(ca >= text2ascii("n") && ca <= text2ascii("z"))
|
||||
ca -= 13
|
||||
else if(ca >= text2ascii("A") && ca <= text2ascii("M"))
|
||||
ca += 13
|
||||
else if(ca >= text2ascii("N") && ca <= text2ascii("Z"))
|
||||
ca -= 13
|
||||
result += ascii2text(ca)
|
||||
return jointext(result, "")
|
||||
|
||||
/proc/generate_rot13_lookup()
|
||||
var/letters = alphabet.Copy()
|
||||
for(var/c in alphabet)
|
||||
letters += uppertext(c)
|
||||
//Takes a list of values, sanitizes it down for readability and character count,
|
||||
//then exports it as a json file at data/npc_saves/[filename].json.
|
||||
//As far as SS13 is concerned this is write only data. You can't change something
|
||||
//in the json file and have it be reflected in the in game item/mob it came from.
|
||||
//(That's what things like savefiles are for) Note that this list is not shuffled.
|
||||
/proc/twitterize(list/proposed, filename, cullshort = 1, storemax = 1000)
|
||||
if(!islist(proposed) || !filename || !config.log_twitter)
|
||||
return
|
||||
|
||||
for(var/char in letters)
|
||||
var/ascii_char = text2ascii(char, 1)
|
||||
//Regular expressions are, as usual, absolute magic
|
||||
var/regex/is_website = new("http|www.|\[a-z0-9_-]+.(com|org|net|mil|edu)+", "i")
|
||||
var/regex/is_email = new("\[a-z0-9_-]+@\[a-z0-9_-]+.\[a-z0-9_-]+", "i")
|
||||
var/regex/alphanumeric = new("\[a-z0-9]+", "i")
|
||||
var/regex/punctuation = new("\[.!?]+", "i")
|
||||
var/regex/all_invalid_symbols = new("\[^ -~]+")
|
||||
|
||||
var/index
|
||||
var/list/accepted = list()
|
||||
for(var/string in proposed)
|
||||
if(findtext(string,is_website) || findtext(string,is_email) || findtext(string,all_invalid_symbols) || !findtext(string,alphanumeric))
|
||||
continue
|
||||
var/buffer = ""
|
||||
var/early_culling = TRUE
|
||||
for(var/pos = 1, pos <= lentext(string), pos++)
|
||||
var/let = copytext(string, pos, (pos + 1) % lentext(string))
|
||||
if(early_culling && !findtext(let,alphanumeric))
|
||||
continue
|
||||
early_culling = FALSE
|
||||
buffer += let
|
||||
if(!findtext(buffer,alphanumeric))
|
||||
continue
|
||||
var/punctbuffer = ""
|
||||
var/cutoff = lentext(buffer)
|
||||
for(var/pos = lentext(buffer), pos >= 0, pos--)
|
||||
var/let = copytext(buffer, pos, (pos + 1) % lentext(buffer))
|
||||
if(findtext(let,alphanumeric))
|
||||
break
|
||||
if(findtext(let,punctuation))
|
||||
punctbuffer = let + punctbuffer //Note this isn't the same thing as using +=
|
||||
cutoff = pos
|
||||
if(punctbuffer) //We clip down excessive punctuation to get the letter count lower and reduce repeats. It's not perfect but it helps.
|
||||
var/exclaim = FALSE
|
||||
var/question = FALSE
|
||||
var/periods = 0
|
||||
for(var/pos = lentext(punctbuffer), pos >= 0, pos--)
|
||||
var/punct = copytext(punctbuffer, pos, (pos + 1) % lentext(punctbuffer))
|
||||
if(!exclaim && findtext(punct,"!"))
|
||||
exclaim = TRUE
|
||||
if(!question && findtext(punct,"?"))
|
||||
question = TRUE
|
||||
if(!exclaim && !question && findtext(punct,"."))
|
||||
periods += 1
|
||||
if(exclaim)
|
||||
if(question)
|
||||
punctbuffer = "?!"
|
||||
else
|
||||
punctbuffer = "!"
|
||||
else if(question)
|
||||
punctbuffer = "?"
|
||||
else if(periods)
|
||||
if(periods > 1)
|
||||
punctbuffer = "..."
|
||||
else
|
||||
punctbuffer = "" //Grammer nazis be damned
|
||||
buffer = copytext(buffer, 1, cutoff) + punctbuffer
|
||||
if(!findtext(buffer,alphanumeric))
|
||||
continue
|
||||
if(!buffer || lentext(buffer) > 140 || lentext(buffer) <= cullshort || buffer in accepted)
|
||||
continue
|
||||
|
||||
switch(ascii_char)
|
||||
// A - Z
|
||||
if(65 to 90)
|
||||
index = 65
|
||||
// a - z
|
||||
if(97 to 122)
|
||||
index = 97
|
||||
accepted += buffer
|
||||
|
||||
var/d = ascii_char - index
|
||||
d += 13
|
||||
if(d >= 26)
|
||||
d -= 26
|
||||
ascii_char = index + d
|
||||
var/translated_char = ascii2text(ascii_char)
|
||||
var/log = file("data/npc_saves/[filename].json") //If this line ever shows up as changed in a PR be very careful you aren't being memed on
|
||||
var/list/oldjson = list()
|
||||
var/list/oldentries = list()
|
||||
if(fexists(log))
|
||||
oldjson = json_decode(file2text(log))
|
||||
oldentries = oldjson["data"]
|
||||
if(!isemptylist(oldentries))
|
||||
for(var/string in accepted)
|
||||
for(var/old in oldentries)
|
||||
if(string == old)
|
||||
oldentries.Remove(old) //Line's position in line is "refreshed" until it falls off the in game radar
|
||||
break
|
||||
|
||||
rot13_lookup[char] = translated_char
|
||||
var/list/finalized = list()
|
||||
finalized = accepted.Copy() + oldentries.Copy() //we keep old and unreferenced phrases near the bottom for culling
|
||||
listclearnulls(finalized)
|
||||
if(!isemptylist(finalized) && length(finalized) > storemax)
|
||||
finalized.Cut(storemax + 1)
|
||||
fdel(log)
|
||||
|
||||
/proc/rot13(t_in)
|
||||
if(!rot13_lookup.len)
|
||||
generate_rot13_lookup()
|
||||
|
||||
var/t_out = ""
|
||||
|
||||
for(var/i in 1 to length(t_in))
|
||||
var/char = copytext(t_in, i, i + 1)
|
||||
if(char in rot13_lookup)
|
||||
t_out += rot13_lookup[char]
|
||||
else
|
||||
t_out += char
|
||||
|
||||
return t_out
|
||||
|
||||
//Used in preferences' SetFlavorText and human's set_flavor verb
|
||||
//Previews a string of len or less length
|
||||
|
||||
/proc/copytext_preserve_html(var/text, var/first, var/last)
|
||||
return html_encode(copytext(html_decode(text), first, last))
|
||||
|
||||
proc/TextPreview(var/string,var/len=40)
|
||||
if(lentext(string) <= len)
|
||||
if(!lentext(string))
|
||||
return "\[...\]"
|
||||
else
|
||||
return string
|
||||
else
|
||||
return "[copytext(string, 1, 37)]..."
|
||||
var/list/tosend = list()
|
||||
tosend["data"] = finalized
|
||||
log << json_encode(tosend)
|
||||
@@ -7,3 +7,12 @@
|
||||
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+5)
|
||||
index = findtext(t, char)
|
||||
return t
|
||||
|
||||
proc/TextPreview(var/string,var/len=40)
|
||||
if(lentext(string) <= len)
|
||||
if(!lentext(string))
|
||||
return "\[...\]"
|
||||
else
|
||||
return string
|
||||
else
|
||||
return "[copytext(string, 1, 37)]..."
|
||||
|
||||
+11
-2
@@ -6,7 +6,7 @@
|
||||
return time2text(world.timeofday, format)
|
||||
|
||||
/proc/gameTimestamp(format = "hh:mm:ss") // Get the game time in text
|
||||
return time2text(world.time - timezoneOffset + 432000, format)
|
||||
return time2text(world.time - timezoneOffset + 432000 - round_start_time, format)
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
/proc/isDay(month, day)
|
||||
@@ -22,4 +22,13 @@
|
||||
|
||||
//returns timestamp in a sql and ISO 8601 friendly format
|
||||
/proc/SQLtime()
|
||||
return time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
return time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
|
||||
|
||||
/var/midnight_rollovers = 0
|
||||
/var/rollovercheck_last_timeofday = 0
|
||||
/proc/update_midnight_rollover()
|
||||
if (world.timeofday < rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS!
|
||||
return midnight_rollovers++
|
||||
return midnight_rollovers
|
||||
|
||||
|
||||
+21
-71
@@ -225,6 +225,8 @@
|
||||
return 'icons/mob/screen_slimecore.dmi'
|
||||
if("Operative")
|
||||
return 'icons/mob/screen_operative.dmi'
|
||||
if("Clockwork")
|
||||
return 'icons/mob/screen_clockwork.dmi'
|
||||
else
|
||||
return 'icons/mob/screen_midnight.dmi'
|
||||
|
||||
@@ -347,55 +349,6 @@ for(var/t in test_times)
|
||||
/proc/isLeap(y)
|
||||
return ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
|
||||
|
||||
// A copy of text2dir, extended to accept one and two letter
|
||||
// directions, and to clearly return 0 otherwise.
|
||||
/proc/text2dir_extended(direction)
|
||||
switch(uppertext(direction))
|
||||
if("NORTH", "N")
|
||||
return 1
|
||||
if("SOUTH", "S")
|
||||
return 2
|
||||
if("EAST", "E")
|
||||
return 4
|
||||
if("WEST", "W")
|
||||
return 8
|
||||
if("NORTHEAST", "NE")
|
||||
return 5
|
||||
if("NORTHWEST", "NW")
|
||||
return 9
|
||||
if("SOUTHEAST", "SE")
|
||||
return 6
|
||||
if("SOUTHWEST", "SW")
|
||||
return 10
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
// A copy of dir2text, which returns the short one or two letter
|
||||
// directions used in tube icon states.
|
||||
/proc/dir2text_short(direction)
|
||||
switch(direction)
|
||||
if(1)
|
||||
return "N"
|
||||
if(2)
|
||||
return "S"
|
||||
if(4)
|
||||
return "E"
|
||||
if(8)
|
||||
return "W"
|
||||
if(5)
|
||||
return "NE"
|
||||
if(6)
|
||||
return "SE"
|
||||
if(9)
|
||||
return "NW"
|
||||
if(10)
|
||||
return "SW"
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
//Turns a Body_parts_covered bitfield into a list of organ/limb names.
|
||||
@@ -574,26 +527,23 @@ for(var/t in test_times)
|
||||
var/B = hex2num(copytext(A,6,0))
|
||||
return R+G+B
|
||||
|
||||
//get just one color
|
||||
/proc/GetRedPart(A)
|
||||
return hex2num(copytext(A,2,4))
|
||||
//word of warning: using a matrix like this as a color value will simplify it back to a string after being set
|
||||
/proc/color_hex2color_matrix(string)
|
||||
var/length = length(string)
|
||||
if(length != 7 && length != 9)
|
||||
return color_matrix_identity()
|
||||
var/r = hex2num(copytext(string, 2, 4))/255
|
||||
var/g = hex2num(copytext(string, 4, 6))/255
|
||||
var/b = hex2num(copytext(string, 6, 8))/255
|
||||
var/a = 1
|
||||
if(length == 9)
|
||||
a = hex2num(copytext(string, 8, 10))/255
|
||||
if(!isnum(r) || !isnum(g) || !isnum(b) || !isnum(a))
|
||||
return color_matrix_identity()
|
||||
return list(r,0,0,0, 0,g,0,0, 0,0,b,0, 0,0,0,a, 0,0,0,0)
|
||||
|
||||
/proc/GetGreenPart(A)
|
||||
return hex2num(copytext(A,4,6))
|
||||
|
||||
/proc/GetBluePart(A)
|
||||
return hex2num(copytext(A,6,0))
|
||||
|
||||
|
||||
//Converts a positive interger to its roman numeral equivilent. Ignores any decimals.
|
||||
//Numbers over 3999 will display with extra "M"s (don't tell the Romans) and can get comically long, so be careful.
|
||||
/proc/num2roman(A)
|
||||
var/list/values = list("M" = 1000, "CM" = 900, "D" = 500, "CD" = 400, "C" = 100, "XC" = 90, "L" = 50, "XL" = 40, "X" = 10, "IX" = 9, "V" = 5, "IV" = 4, "I" = 1)
|
||||
if(!A || !isnum(A))
|
||||
return 0
|
||||
while(A >= 1)
|
||||
for(var/i in values)
|
||||
if(A >= values[i])
|
||||
. += i
|
||||
A -= values[i]
|
||||
break
|
||||
//will drop all values not on the diagonal
|
||||
/proc/color_matrix2color_hex(list/the_matrix)
|
||||
if(!istype(the_matrix) || the_matrix.len != 20)
|
||||
return "#ffffffff"
|
||||
return rgb(the_matrix[1]*255, the_matrix[6]*255, the_matrix[11]*255, the_matrix[16]*255)
|
||||
+170
-280
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
|
||||
/*
|
||||
* A large number of misc global procs.
|
||||
@@ -283,27 +283,20 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
//Returns a list of all items of interest with their name
|
||||
/proc/getpois(mobs_only=0,skip_mindless=0)
|
||||
var/list/mobs = sortmobs()
|
||||
var/list/names = list()
|
||||
var/list/pois = list()
|
||||
var/list/namecounts = list()
|
||||
|
||||
var/list/pois = list()
|
||||
for(var/mob/M in mobs)
|
||||
if(skip_mindless && (!M.mind && !M.ckey))
|
||||
if(!isbot(M) && !istype(M, /mob/camera/))
|
||||
continue
|
||||
if(M.client && M.client.holder && M.client.holder.fakekey) //stealthmins
|
||||
continue
|
||||
var/name = M.name
|
||||
if (name in names)
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
if (M.real_name && M.real_name != M.name)
|
||||
var/name = avoid_assoc_duplicate_keys(M.name, namecounts)
|
||||
|
||||
if(M.real_name && M.real_name != M.name)
|
||||
name += " \[[M.real_name]\]"
|
||||
if (M.stat == 2)
|
||||
if(istype(M, /mob/dead/observer/))
|
||||
if(M.stat == DEAD)
|
||||
if(isobserver(M))
|
||||
name += " \[ghost\]"
|
||||
else
|
||||
name += " \[dead\]"
|
||||
@@ -313,14 +306,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
for(var/atom/A in poi_list)
|
||||
if(!A || !A.loc)
|
||||
continue
|
||||
var/name = A.name
|
||||
if (names.Find(name))
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
pois[name] = A
|
||||
pois[avoid_assoc_duplicate_keys(A.name, namecounts)] = A
|
||||
|
||||
return pois
|
||||
//Orders mobs by type then by name
|
||||
@@ -337,7 +323,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/human/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/brain/M in sortmob)
|
||||
for(var/mob/living/brain/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/alien/M in sortmob)
|
||||
moblist.Add(M)
|
||||
@@ -359,41 +345,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
moblist.Add(M)
|
||||
return moblist
|
||||
|
||||
/var/mob/dview/dview_mob = new
|
||||
|
||||
//Version of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant).
|
||||
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
|
||||
if(!center)
|
||||
return
|
||||
|
||||
dview_mob.forceMove(center)
|
||||
|
||||
dview_mob.see_invisible = invis_flags
|
||||
|
||||
. = view(range, dview_mob)
|
||||
dview_mob.forceMove(null)
|
||||
|
||||
/mob/dview
|
||||
invisibility = 101
|
||||
density = 0
|
||||
see_in_dark = 1e6
|
||||
anchored = 1
|
||||
|
||||
// Finds ALL mobs on turfs in line of sight. Similar to "in dview", but catches mobs that are not on a turf (e.g. inside a locker or such).
|
||||
/proc/get_all_mobs_in_dview(var/turf/T, var/range = world.view, var/list/ignore_types = list())
|
||||
. = list()
|
||||
var/list/can_see = dview(range, T)
|
||||
for(var/mob/M in can_see)
|
||||
if(is_type_in_list(M, ignore_types))
|
||||
continue
|
||||
. += M
|
||||
for(var/mob/M in mob_list) //Got the ones in vision, now let's go for the ones not on a turf.
|
||||
if(M.z == 0) //Mobs not on a turf will have XYZ = 0,0,0. They also won't show up in dview() so we're not checking anything twice.
|
||||
if(is_type_in_list(M, ignore_types))
|
||||
continue
|
||||
if(get_turf(M) in can_see) //Checking the mob's turf now, since those are it's "true" coordinates (plus dview() did pick up on turfs, so we can check using that).
|
||||
. += M
|
||||
|
||||
//E = MC^2
|
||||
/proc/convert2energy(M)
|
||||
var/E = M*(SPEED_OF_LIGHT_SQ)
|
||||
@@ -472,12 +423,15 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if(M.ckey == key)
|
||||
return M
|
||||
|
||||
// Returns the atom sitting on the turf.
|
||||
// For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
|
||||
/proc/get_atom_on_turf(atom/movable/M)
|
||||
//Returns the atom sitting on the turf.
|
||||
//For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
|
||||
//Optional arg 'type' to stop once it reaches a specific type instead of a turf.
|
||||
/proc/get_atom_on_turf(atom/movable/M, stop_type)
|
||||
var/atom/loc = M
|
||||
while(loc && loc.loc && !istype(loc.loc, /turf/))
|
||||
while(loc && loc.loc && !isturf(loc.loc))
|
||||
loc = loc.loc
|
||||
if(stop_type && istype(loc, stop_type))
|
||||
break
|
||||
return loc
|
||||
|
||||
// returns the turf located at the map edge in the specified direction relative to A
|
||||
@@ -531,25 +485,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/y=arcsin(x/sqrt(1+x*x))
|
||||
return y
|
||||
|
||||
|
||||
/proc/anim(turf/location,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
|
||||
//This proc throws up either an icon or an animation for a specified amount of time.
|
||||
//The variables should be apparent enough.
|
||||
var/atom/movable/overlay/animation = new(location)
|
||||
if(direction)
|
||||
animation.setDir(direction)
|
||||
animation.icon = a_icon
|
||||
animation.layer = target:layer+1
|
||||
if(a_icon_state)
|
||||
animation.icon_state = a_icon_state
|
||||
else
|
||||
animation.icon_state = "blank"
|
||||
animation.master = target
|
||||
flick(flick_anim, animation)
|
||||
sleep(max(sleeptime, 15))
|
||||
qdel(animation)
|
||||
|
||||
|
||||
/atom/proc/GetAllContents()
|
||||
var/list/processing_list = list(src)
|
||||
var/list/assembled = list()
|
||||
@@ -587,12 +522,12 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
return 1
|
||||
|
||||
/proc/is_blocked_turf(turf/T)
|
||||
/proc/is_blocked_turf(turf/T, exclude_mobs)
|
||||
if(T.density)
|
||||
return 1
|
||||
for(var/i in T)
|
||||
var/atom/A = i
|
||||
if(A.density)
|
||||
if(A.density && (!exclude_mobs || !ismob(A)))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -659,58 +594,60 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all areas of that type in the world.
|
||||
/proc/get_areas(areatype)
|
||||
if(!areatype)
|
||||
return null
|
||||
/proc/get_areas(areatype, subtypes=TRUE)
|
||||
if(istext(areatype))
|
||||
areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
else if(isarea(areatype))
|
||||
var/area/areatemp = areatype
|
||||
areatype = areatemp.type
|
||||
else if(!ispath(areatype))
|
||||
return null
|
||||
|
||||
var/list/areas = new/list()
|
||||
for(var/area/N in world)
|
||||
if(istype(N, areatype))
|
||||
areas += N
|
||||
var/list/areas = list()
|
||||
if(subtypes)
|
||||
var/list/cache = typecacheof(areatype)
|
||||
for(var/V in sortedAreas)
|
||||
var/area/A = V
|
||||
if(cache[A.type])
|
||||
areas += V
|
||||
else
|
||||
for(var/V in sortedAreas)
|
||||
var/area/A = V
|
||||
if(A.type == areatype)
|
||||
areas += V
|
||||
return areas
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all turfs in areas of that type of that type in the world.
|
||||
/proc/get_area_turfs(areatype, target_z = 0)
|
||||
if(!areatype)
|
||||
return null
|
||||
/proc/get_area_turfs(areatype, target_z = 0, subtypes=FALSE)
|
||||
if(istext(areatype))
|
||||
areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
else if(isarea(areatype))
|
||||
var/area/areatemp = areatype
|
||||
areatype = areatemp.type
|
||||
else if(!ispath(areatype))
|
||||
return null
|
||||
|
||||
var/list/turfs = new/list()
|
||||
for(var/area/N in world)
|
||||
if(istype(N, areatype))
|
||||
for(var/turf/T in N)
|
||||
var/list/turfs = list()
|
||||
if(subtypes)
|
||||
var/list/cache = typecacheof(areatype)
|
||||
for(var/V in sortedAreas)
|
||||
var/area/A = V
|
||||
if(!cache[A.type])
|
||||
continue
|
||||
for(var/turf/T in A)
|
||||
if(target_z == 0 || target_z == T.z)
|
||||
turfs += T
|
||||
else
|
||||
for(var/V in sortedAreas)
|
||||
var/area/A = V
|
||||
if(A.type != areatype)
|
||||
continue
|
||||
for(var/turf/T in A)
|
||||
if(target_z == 0 || target_z == T.z)
|
||||
turfs += T
|
||||
return turfs
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all atoms (objs, turfs, mobs) in areas of that type of that type in the world.
|
||||
/proc/get_area_all_atoms(areatype)
|
||||
if(!areatype)
|
||||
return null
|
||||
if(istext(areatype))
|
||||
areatype = text2path(areatype)
|
||||
if(isarea(areatype))
|
||||
var/area/areatemp = areatype
|
||||
areatype = areatemp.type
|
||||
|
||||
var/list/atoms = new/list()
|
||||
for(var/area/N in world)
|
||||
if(istype(N, areatype))
|
||||
for(var/atom/A in N)
|
||||
atoms += A
|
||||
return atoms
|
||||
|
||||
/proc/get_cardinal_dir(atom/A, atom/B)
|
||||
var/dx = abs(B.x - A.x)
|
||||
var/dy = abs(B.y - A.y)
|
||||
@@ -757,15 +694,18 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return zone
|
||||
|
||||
/*
|
||||
|
||||
Gets the turf this atom's *ICON* appears to inhabit
|
||||
It takes into account:
|
||||
* Pixel_x/y
|
||||
* Matrix x/y
|
||||
|
||||
NOTE: if your atom has non-standard bounds then this proc
|
||||
will handle it, but:
|
||||
* if the bounds are even, then there are an even amount of "middle" turfs, the one to the EAST, NORTH, or BOTH is picked
|
||||
(this may seem bad, but you're atleast as close to the center of the atom as possible, better than byond's default loc being all the way off)
|
||||
* if the bounds are odd, the true middle turf of the atom is returned
|
||||
|
||||
*/
|
||||
|
||||
/proc/get_turf_pixel(atom/movable/AM)
|
||||
@@ -815,53 +755,27 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
loc = loc.loc
|
||||
return null
|
||||
|
||||
//Quick type checks for some tools
|
||||
var/global/list/common_tools = list(
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/weapon/wrench,
|
||||
/obj/item/weapon/weldingtool,
|
||||
/obj/item/weapon/screwdriver,
|
||||
/obj/item/weapon/wirecutters,
|
||||
/obj/item/device/multitool,
|
||||
/obj/item/weapon/crowbar)
|
||||
|
||||
/proc/istool(O)
|
||||
if(O && is_type_in_list(O, common_tools))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/is_pointed(obj/item/W)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/syringe))
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/kitchen/fork))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
//For objects that should embed, but make no sense being is_sharp or is_pointed()
|
||||
//e.g: rods
|
||||
var/list/can_embed_types = typecacheof(list(
|
||||
/obj/item/stack/rods,
|
||||
/obj/item/pipe))
|
||||
|
||||
/proc/can_embed(obj/item/W)
|
||||
if(W.is_sharp())
|
||||
return 1
|
||||
if(is_pointed(W))
|
||||
return 1
|
||||
|
||||
var/list/embed_items = list(\
|
||||
/obj/item/stack/rods,\
|
||||
)
|
||||
|
||||
if(is_type_in_list(W, embed_items))
|
||||
if(is_type_in_typecache(W, can_embed_types))
|
||||
return 1
|
||||
|
||||
|
||||
/*
|
||||
Checks if that loc and dir has a item on the wall
|
||||
*/
|
||||
var/list/WALLITEMS = list(
|
||||
var/list/WALLITEMS = typecacheof(list(
|
||||
/obj/machinery/power/apc, /obj/machinery/airalarm, /obj/item/device/radio/intercom,
|
||||
/obj/structure/extinguisher_cabinet, /obj/structure/reagent_dispensers/peppertank,
|
||||
/obj/machinery/status_display, /obj/machinery/requests_console, /obj/machinery/light_switch, /obj/structure/sign,
|
||||
@@ -869,22 +783,22 @@ var/list/WALLITEMS = list(
|
||||
/obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio/simple_vent_controller,
|
||||
/obj/item/weapon/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth,
|
||||
/obj/structure/mirror, /obj/structure/fireaxecabinet, /obj/machinery/computer/security/telescreen/entertainment
|
||||
)
|
||||
))
|
||||
|
||||
var/list/WALLITEMS_EXTERNAL = list(
|
||||
/obj/machinery/camera, /obj/machinery/camera_assembly,
|
||||
/obj/machinery/light_construct, /obj/machinery/light)
|
||||
var/list/WALLITEMS_EXTERNAL = typecacheof(list(
|
||||
/obj/machinery/camera, /obj/structure/camera_assembly,
|
||||
/obj/structure/light_construct, /obj/machinery/light))
|
||||
|
||||
var/list/WALLITEMS_INVERSE = list(
|
||||
/obj/machinery/light_construct, /obj/machinery/light)
|
||||
var/list/WALLITEMS_INVERSE = typecacheof(list(
|
||||
/obj/structure/light_construct, /obj/machinery/light))
|
||||
|
||||
|
||||
/proc/gotwallitem(loc, dir, var/check_external = 0)
|
||||
var/locdir = get_step(loc, dir)
|
||||
for(var/obj/O in loc)
|
||||
if(is_type_in_list(O, WALLITEMS) && check_external != 2)
|
||||
if(is_type_in_typecache(O, WALLITEMS) && check_external != 2)
|
||||
//Direction works sometimes
|
||||
if(is_type_in_list(O, WALLITEMS_INVERSE))
|
||||
if(is_type_in_typecache(O, WALLITEMS_INVERSE))
|
||||
if(O.dir == turn(dir, 180))
|
||||
return 1
|
||||
else if(O.dir == dir)
|
||||
@@ -895,8 +809,8 @@ var/list/WALLITEMS_INVERSE = list(
|
||||
if(get_turf_pixel(O) == locdir)
|
||||
return 1
|
||||
|
||||
if(is_type_in_list(O, WALLITEMS_EXTERNAL) && check_external)
|
||||
if(is_type_in_list(O, WALLITEMS_INVERSE))
|
||||
if(is_type_in_typecache(O, WALLITEMS_EXTERNAL) && check_external)
|
||||
if(is_type_in_typecache(O, WALLITEMS_INVERSE))
|
||||
if(O.dir == turn(dir, 180))
|
||||
return 1
|
||||
else if(O.dir == dir)
|
||||
@@ -904,7 +818,7 @@ var/list/WALLITEMS_INVERSE = list(
|
||||
|
||||
//Some stuff is placed directly on the wallturf (signs)
|
||||
for(var/obj/O in locdir)
|
||||
if(is_type_in_list(O, WALLITEMS) && check_external != 2)
|
||||
if(is_type_in_typecache(O, WALLITEMS) && check_external != 2)
|
||||
if(O.pixel_x == 0 && O.pixel_y == 0)
|
||||
return 1
|
||||
return 0
|
||||
@@ -975,33 +889,34 @@ var/list/WALLITEMS_INVERSE = list(
|
||||
return "white"
|
||||
|
||||
/proc/params2turf(scr_loc, turf/origin)
|
||||
if(!scr_loc)
|
||||
return null
|
||||
var/tX = splittext(scr_loc, ",")
|
||||
var/tY = splittext(tX[2], ":")
|
||||
var/tZ = origin.z
|
||||
tY = tY[1]
|
||||
tX = splittext(tX[1], ":")
|
||||
tX = tX[1]
|
||||
tX = max(1, min(world.maxx, origin.x + (text2num(tX) - (world.view + 1))))
|
||||
tY = max(1, min(world.maxy, origin.y + (text2num(tY) - (world.view + 1))))
|
||||
tX = Clamp(origin.x + text2num(tX) - world.view - 1, 1, world.maxx)
|
||||
tY = Clamp(origin.y + text2num(tY) - world.view - 1, 1, world.maxy)
|
||||
return locate(tX, tY, tZ)
|
||||
|
||||
/proc/screen_loc2turf(text, turf/origin)
|
||||
if(!text)
|
||||
return null
|
||||
var/tZ = splittext(text, ",")
|
||||
var/tX = splittext(tZ[1], "-")
|
||||
var/tY = text2num(tX[2])
|
||||
tX = splittext(tZ[2], "-")
|
||||
tX = text2num(tX[2])
|
||||
tZ = origin.z
|
||||
tX = max(1, min(origin.x + 7 - tX, world.maxx))
|
||||
tY = max(1, min(origin.y + 7 - tY, world.maxy))
|
||||
tX = Clamp(origin.x + 7 - tX, 1, world.maxx)
|
||||
tY = Clamp(origin.y + 7 - tY, 1, world.maxy)
|
||||
return locate(tX, tY, tZ)
|
||||
|
||||
/proc/IsValidSrc(A)
|
||||
if(istype(A, /datum))
|
||||
var/datum/B = A
|
||||
return !qdeleted(B)
|
||||
if(istype(A, /client))
|
||||
return 1
|
||||
/proc/IsValidSrc(datum/D)
|
||||
if(istype(D))
|
||||
return !qdeleted(D)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -1023,7 +938,7 @@ var/list/WALLITEMS_INVERSE = list(
|
||||
/proc/is_A_facing_B(atom/A,atom/B)
|
||||
if(!istype(A) || !istype(B))
|
||||
return 0
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/LA = A
|
||||
if(LA.lying)
|
||||
return 0
|
||||
@@ -1038,6 +953,7 @@ var/list/WALLITEMS_INVERSE = list(
|
||||
|
||||
/*
|
||||
rough example of the "cone" made by the 3 dirs checked
|
||||
|
||||
B
|
||||
\
|
||||
\
|
||||
@@ -1053,68 +969,10 @@ B --><-- A
|
||||
/
|
||||
/
|
||||
B
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//This is just so you can stop an orbit.
|
||||
//orbit() can run without it (swap orbiting for A)
|
||||
//but then you can never stop it and that's just silly.
|
||||
/atom/movable/var/atom/orbiting = null
|
||||
|
||||
//A: atom to orbit
|
||||
//radius: range to orbit at, radius of the circle formed by orbiting
|
||||
//clockwise: whether you orbit clockwise or anti clockwise
|
||||
//rotation_speed: how fast to rotate
|
||||
//rotation_segments: the resolution of the orbit circle, less = a more block circle, this can be used to produce hexagons (6 segments) triangles (3 segments), and so on, 36 is the best default.
|
||||
//pre_rotation: Chooses to rotate src 90 degress towards the orbit dir (clockwise/anticlockwise), useful for things to go "head first" like ghosts
|
||||
//lockinorbit: Forces src to always be on A's turf, otherwise the orbit cancels when src gets too far away (eg: ghosts)
|
||||
|
||||
/atom/movable/proc/orbit(atom/A, radius = 10, clockwise = FALSE, rotation_speed = 20, rotation_segments = 36, pre_rotation = TRUE, lockinorbit = FALSE)
|
||||
if(!istype(A))
|
||||
return
|
||||
|
||||
if(orbiting)
|
||||
stop_orbit()
|
||||
|
||||
orbiting = A
|
||||
var/matrix/initial_transform = matrix(transform)
|
||||
var/lastloc = loc
|
||||
|
||||
//Head first!
|
||||
if(pre_rotation)
|
||||
var/matrix/M = matrix(transform)
|
||||
var/pre_rot = 90
|
||||
if(!clockwise)
|
||||
pre_rot = -90
|
||||
M.Turn(pre_rot)
|
||||
transform = M
|
||||
|
||||
var/matrix/shift = matrix(transform)
|
||||
shift.Translate(0,radius)
|
||||
transform = shift
|
||||
|
||||
SpinAnimation(rotation_speed, -1, clockwise, rotation_segments)
|
||||
|
||||
//we stack the orbits up client side, so we can assign this back to normal server side without it breaking the orbit
|
||||
transform = initial_transform
|
||||
while(orbiting && orbiting == A && A.loc)
|
||||
var/targetloc = get_turf(A)
|
||||
if(!lockinorbit && loc != lastloc && loc != targetloc)
|
||||
break
|
||||
loc = targetloc
|
||||
lastloc = loc
|
||||
stoplag()
|
||||
|
||||
if (orbiting == A) //make sure we haven't started orbiting something else.
|
||||
orbiting = null
|
||||
SpinAnimation(0,0)
|
||||
|
||||
|
||||
|
||||
/atom/movable/proc/stop_orbit()
|
||||
orbiting = null
|
||||
|
||||
|
||||
//Center's an image.
|
||||
//Requires:
|
||||
//The Image
|
||||
@@ -1289,17 +1147,22 @@ B --><-- A
|
||||
|
||||
/proc/add_to_proximity_list(atom/A, range)
|
||||
var/turf/T = get_turf(A)
|
||||
if(!T || !A.loc)
|
||||
throw EXCEPTION("Someone adding a prox sensor in nullspace")
|
||||
var/list/L = block(locate(T.x - range, T.y - range, T.z), locate(T.x + range, T.y + range, T.z))
|
||||
for(var/B in L)
|
||||
var/turf/C = B
|
||||
C.proximity_checkers |= A
|
||||
LAZYINITLIST(C.proximity_checkers)
|
||||
C.proximity_checkers[A] = TRUE
|
||||
return L
|
||||
|
||||
/proc/remove_from_proximity_list(atom/A, range)
|
||||
var/turf/T = get_turf(A)
|
||||
/proc/remove_from_proximity_list(atom/A, range, oldloc = null)
|
||||
var/turf/T = get_turf(oldloc ? oldloc : A)
|
||||
var/list/L = block(locate(T.x - range, T.y - range, T.z), locate(T.x + range, T.y + range, T.z))
|
||||
for(var/B in L)
|
||||
var/turf/C = B
|
||||
if (!C.proximity_checkers)
|
||||
continue
|
||||
C.proximity_checkers.Remove(A)
|
||||
|
||||
/proc/shift_proximity(atom/checker, atom/A, range, atom/B, newrange)
|
||||
@@ -1313,10 +1176,13 @@ B --><-- A
|
||||
var/list/O = M - L
|
||||
for(var/C in N)
|
||||
var/turf/D = C
|
||||
if (!D.proximity_checkers)
|
||||
continue
|
||||
D.proximity_checkers.Remove(checker)
|
||||
for(var/E in O)
|
||||
var/turf/F = E
|
||||
F.proximity_checkers |= checker
|
||||
LAZYINITLIST(F.proximity_checkers)
|
||||
F.proximity_checkers[checker] = TRUE
|
||||
return 1
|
||||
|
||||
/proc/flick_overlay_static(image/I, atom/A, duration)
|
||||
@@ -1329,13 +1195,13 @@ B --><-- A
|
||||
|
||||
/proc/get_areas_in_z(zlevel)
|
||||
. = list()
|
||||
var/validarea = 0
|
||||
var/validarea = FALSE
|
||||
for(var/V in sortedAreas)
|
||||
var/area/A = V
|
||||
validarea = 1
|
||||
validarea = TRUE
|
||||
for(var/turf/T in A)
|
||||
if(T.z != zlevel)
|
||||
validarea = 0
|
||||
validarea = FALSE
|
||||
break
|
||||
if(validarea)
|
||||
. += A
|
||||
@@ -1347,7 +1213,7 @@ B --><-- A
|
||||
if(!istype(A, type))
|
||||
continue
|
||||
var/distance = get_dist(source, A)
|
||||
if(!closest_distance)
|
||||
if(!closest_atom)
|
||||
closest_distance = distance
|
||||
closest_atom = A
|
||||
else
|
||||
@@ -1356,9 +1222,14 @@ B --><-- A
|
||||
closest_atom = A
|
||||
return closest_atom
|
||||
|
||||
proc/pick_closest_path(value)
|
||||
var/list/matches = get_fancy_list_of_types()
|
||||
if (!isnull(value) && value!="")
|
||||
|
||||
proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
|
||||
if (value == FALSE) //nothing should be calling us with a number, so this is safe
|
||||
value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
|
||||
if (isnull(value))
|
||||
return
|
||||
value = trim(value)
|
||||
if(!isnull(value) && value != "")
|
||||
matches = filter_fancy_list(matches, value)
|
||||
|
||||
if(matches.len==0)
|
||||
@@ -1368,7 +1239,7 @@ proc/pick_closest_path(value)
|
||||
if(matches.len==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
|
||||
chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in matches
|
||||
if(!chosen)
|
||||
return
|
||||
chosen = matches[chosen]
|
||||
@@ -1379,17 +1250,21 @@ proc/pick_closest_path(value)
|
||||
CRASH(msg)
|
||||
|
||||
//Key thing that stops lag. Cornerstone of performance in ss13, Just sitting here, in unsorted.dm.
|
||||
|
||||
//Increases delay as the server gets more overloaded,
|
||||
//as sleeps aren't cheap and sleeping only to wake up and sleep again is wasteful
|
||||
#define DELTA_CALC max(((max(world.tick_usage, world.cpu) / 100) * max(Master.sleep_delta,1)), 1)
|
||||
|
||||
/proc/stoplag()
|
||||
. = 1
|
||||
sleep(world.tick_lag)
|
||||
if (world.tick_usage > TICK_LIMIT_TO_RUN) //woke up, still not enough tick, sleep for more.
|
||||
. += 2
|
||||
sleep(world.tick_lag*2)
|
||||
if (world.tick_usage > TICK_LIMIT_TO_RUN) //woke up, STILL not enough tick, sleep for more.
|
||||
. += 4
|
||||
sleep(world.tick_lag*4)
|
||||
//you might be thinking of adding more steps to this, or making it use a loop and a counter var
|
||||
// not worth it.
|
||||
. = 0
|
||||
var/i = 1
|
||||
do
|
||||
. += round(i*DELTA_CALC)
|
||||
sleep(i*world.tick_lag*DELTA_CALC)
|
||||
i *= 2
|
||||
while (world.tick_usage > min(TICK_LIMIT_TO_RUN, CURRENT_TICKLIMIT))
|
||||
|
||||
#undef DELTA_CALC
|
||||
|
||||
/proc/flash_color(mob_or_client, flash_color="#960000", flash_time=20)
|
||||
var/client/C
|
||||
@@ -1406,31 +1281,11 @@ proc/pick_closest_path(value)
|
||||
return
|
||||
|
||||
C.color = flash_color
|
||||
spawn(0)
|
||||
animate(C, color = initial(C.color), time = flash_time)
|
||||
animate(C, color = initial(C.color), time = flash_time)
|
||||
|
||||
#define RANDOM_COLOUR (rgb(rand(0,255),rand(0,255),rand(0,255)))
|
||||
|
||||
#define QDEL_IN(item, time) addtimer(GLOBAL_PROC, "qdel", time, FALSE, item)
|
||||
|
||||
/proc/check_for_cleanbot_bug()
|
||||
var/static/admins_warned //bet you didn't know you could do this!
|
||||
var/icon/Icon_test = icon('icons/BadAss.dmi')
|
||||
if(!istype(Icon_test))
|
||||
var/msg = "Cleanbot bug detected in icons! Icons are mapping to [Icon_test]"
|
||||
if (!admins_warned)
|
||||
admins_warned = 1
|
||||
spawn(25)
|
||||
message_admins(msg)
|
||||
stack_trace(msg)
|
||||
var/sound/Sound_test = sound('sound/misc/null.ogg')
|
||||
if(!istype(Sound_test))
|
||||
var/msg = "Cleanbot bug detected in sounds! Sounds are mapping to [Sound_test]"
|
||||
if (!admins_warned)
|
||||
admins_warned = 1
|
||||
spawn(25)
|
||||
message_admins(msg)
|
||||
stack_trace(msg)
|
||||
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
|
||||
|
||||
/proc/random_nukecode()
|
||||
var/val = rand(0, 99999)
|
||||
@@ -1439,10 +1294,45 @@ proc/pick_closest_path(value)
|
||||
str = "0" + str
|
||||
. = str
|
||||
|
||||
/proc/trange(var/Dist = 0, var/turf/Center = null)
|
||||
if (isnull(Center))
|
||||
return
|
||||
/atom/proc/Shake(pixelshiftx = 15, pixelshifty = 15, duration = 250)
|
||||
var/initialpixelx = pixel_x
|
||||
var/initialpixely = pixel_y
|
||||
var/shiftx = rand(-pixelshiftx,pixelshiftx)
|
||||
var/shifty = rand(-pixelshifty,pixelshifty)
|
||||
animate(src, pixel_x = pixel_x + shiftx, pixel_y = pixel_y + shifty, time = 0.2, loop = duration)
|
||||
pixel_x = initialpixelx
|
||||
pixel_y = initialpixely
|
||||
|
||||
var/turf/x1y1 = locate(((Center.x - Dist) < 1 ? 1 : Center.x - Dist), ((Center.y - Dist) < 1 ? 1 : Center.y - Dist), Center.z)
|
||||
var/turf/x2y2 = locate(((Center.x + Dist) > world.maxx ? world.maxx : Center.x + Dist), ((Center.y + Dist) > world.maxy ? world.maxy : Center.y + Dist), Center.z)
|
||||
return block(x1y1, x2y2)
|
||||
/proc/weightclass2text(var/w_class)
|
||||
switch(w_class)
|
||||
if(WEIGHT_CLASS_TINY)
|
||||
. = "tiny"
|
||||
if(WEIGHT_CLASS_SMALL)
|
||||
. = "small"
|
||||
if(WEIGHT_CLASS_NORMAL)
|
||||
. = "normal-sized"
|
||||
if(WEIGHT_CLASS_BULKY)
|
||||
. = "bulky"
|
||||
if(WEIGHT_CLASS_HUGE)
|
||||
. = "huge"
|
||||
if(WEIGHT_CLASS_GIGANTIC)
|
||||
. = "gigantic"
|
||||
else
|
||||
. = ""
|
||||
|
||||
//can a window be here, or is there a window blocking it?
|
||||
/proc/valid_window_location(turf/T, dir_to_check)
|
||||
if(!T)
|
||||
return FALSE
|
||||
for(var/obj/O in T)
|
||||
if(istype(O, /obj/machinery/door/window) && (O.dir == dir_to_check || dir_to_check == FULLTILE_WINDOW_DIR))
|
||||
return FALSE
|
||||
if(istype(O, /obj/structure/windoor_assembly))
|
||||
var/obj/structure/windoor_assembly/W = O
|
||||
if(W.ini_dir == dir_to_check || dir_to_check == FULLTILE_WINDOW_DIR)
|
||||
return FALSE
|
||||
if(istype(O, /obj/structure/window))
|
||||
var/obj/structure/window/W = O
|
||||
if(W.ini_dir == dir_to_check || W.ini_dir == FULLTILE_WINDOW_DIR || dir_to_check == FULLTILE_WINDOW_DIR)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
|
||||
//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
|
||||
#define MAX_MESSAGE_LEN 1024
|
||||
#define MAX_NAME_LEN 26
|
||||
#define MAX_NAME_LEN 42
|
||||
#define MAX_BROADCAST_LEN 512
|
||||
#define MAX_CHARTER_LEN 50
|
||||
#define MAX_CHARTER_LEN 80
|
||||
|
||||
//MINOR TWEAKS/MISC
|
||||
#define AGE_MIN 17 //youngest a character can be
|
||||
|
||||
@@ -30,10 +30,16 @@ var/global/comms_allowed = 0 //By default, the server does not allow messages to
|
||||
var/global/cross_address = "byond://" //This needs to be global as the message sent contains the comms key.
|
||||
var/global/cross_allowed = 0 //Don't bother attempting to send if the address wasn't set.
|
||||
|
||||
var/global/medal_hub = null
|
||||
var/global/medal_pass = " "
|
||||
var/global/medals_enabled = TRUE //will be auto set to false if the game fails contacting the medal hub to prevent unneeded calls.
|
||||
|
||||
|
||||
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
|
||||
var/MAX_EX_DEVESTATION_RANGE = 3
|
||||
var/MAX_EX_HEAVY_RANGE = 7
|
||||
var/MAX_EX_LIGHT_RANGE = 14
|
||||
var/MAX_EX_FLASH_RANGE = 14
|
||||
var/MAX_EX_FLAME_RANGE = 14
|
||||
var/DYN_EX_SCALE = 0.5
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ var/global/list/undershirt_m = list() //stores only undershirt name
|
||||
var/global/list/undershirt_f = list() //stores only undershirt name
|
||||
//Socks
|
||||
var/global/list/socks_list = list() //stores /datum/sprite_accessory/socks indexed by name
|
||||
|
||||
//Lizard Bits (all datum lists indexed by name)
|
||||
var/global/list/body_markings_list = list()
|
||||
var/global/list/tails_list_lizard = list()
|
||||
@@ -25,6 +24,7 @@ var/global/list/snouts_list = list()
|
||||
var/global/list/horns_list = list()
|
||||
var/global/list/frills_list = list()
|
||||
var/global/list/spines_list = list()
|
||||
var/global/list/legs_list = list()
|
||||
var/global/list/animated_spines_list = list()
|
||||
|
||||
//Mutant Human bits
|
||||
@@ -35,27 +35,11 @@ var/global/list/wings_list = list()
|
||||
var/global/list/wings_open_list = list()
|
||||
var/global/list/r_wings_list = list()
|
||||
|
||||
//Mammal Species
|
||||
var/global/list/mam_body_markings_list = list()
|
||||
var/global/list/mam_ears_list = list()
|
||||
var/global/list/mam_tails_list = list()
|
||||
var/global/list/mam_tails_animated_list = list()
|
||||
|
||||
//Exotic Species
|
||||
var/global/list/exotic_tails_list = list()
|
||||
var/global/list/exotic_tails_animated_list = list()
|
||||
var/global/list/exotic_ears_list = list()
|
||||
var/global/list/exotic_head_list = list()
|
||||
var/global/list/exotic_back_list = list()
|
||||
|
||||
//Xenomorph Species
|
||||
var/global/list/xeno_head_list = list() //I forgot the ' = list()' part for the longest time and couldn't figure out what was wrong. *facepalm
|
||||
var/global/list/xeno_tail_list = list()
|
||||
var/global/list/xeno_dorsal_list = list()
|
||||
|
||||
var/global/list/ghost_forms_with_directions_list = list("ghost") //stores the ghost forms that support directional sprites
|
||||
var/global/list/ghost_forms_with_accessories_list = list("ghost") //stores the ghost forms that support hair and other such things
|
||||
|
||||
var/global/list/security_depts_prefs = list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)
|
||||
|
||||
//Backpacks
|
||||
#define GBACKPACK "Grey Backpack"
|
||||
#define GSATCHEL "Grey Satchel"
|
||||
@@ -65,6 +49,13 @@ var/global/list/ghost_forms_with_accessories_list = list("ghost") //stores the g
|
||||
#define DSATCHEL "Department Satchel"
|
||||
#define DDUFFLEBAG "Department Dufflebag"
|
||||
var/global/list/backbaglist = list(DBACKPACK, DSATCHEL, DDUFFLEBAG, GBACKPACK, GSATCHEL, GDUFFLEBAG, LSATCHEL)
|
||||
|
||||
//Uplink spawn loc
|
||||
#define UPLINK_PDA "PDA"
|
||||
#define UPLINK_RADIO "Radio"
|
||||
#define UPLINK_PEN "Pen" //like a real spy!
|
||||
var/global/list/uplink_spawn_loc_list = list(UPLINK_PDA, UPLINK_RADIO, UPLINK_PEN)
|
||||
|
||||
//Female Uniforms
|
||||
var/global/list/female_clothing_icons = list()
|
||||
|
||||
@@ -151,10 +142,6 @@ var/global/list/greek_letters = list("Alpha", "Beta", "Gamma", "Delta",
|
||||
"Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi",
|
||||
"Chi", "Psi", "Omega")
|
||||
|
||||
var/global/list/roman_numerals = list("I", "II", "III", "IV", "V", "VI",
|
||||
"VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI",
|
||||
"XVII", "XVIII", "XIX", "XX")
|
||||
|
||||
var/global/list/phonetic_alphabet = list("Alpha", "Bravo", "Charlie",
|
||||
"Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet",
|
||||
"Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec",
|
||||
@@ -170,6 +157,7 @@ var/global/list/numbers_as_words = list("One", "Two", "Three", "Four",
|
||||
var/list/L
|
||||
for(var/i in 1 to 99)
|
||||
L += "[i]"
|
||||
L += "\Roman[i]"
|
||||
return L
|
||||
|
||||
var/global/list/station_numerals = greek_letters + roman_numerals + phonetic_alphabet + numbers_as_words + generate_number_strings()
|
||||
var/global/list/station_numerals = greek_letters + phonetic_alphabet + numbers_as_words + generate_number_strings()
|
||||
|
||||
@@ -64,3 +64,5 @@ var/list/datum/map_template/lava_ruins_templates = list()
|
||||
|
||||
var/list/datum/map_template/shuttle_templates = list()
|
||||
var/list/datum/map_template/shelter_templates = list()
|
||||
|
||||
var/list/transit_markers = list()
|
||||
|
||||
@@ -2,7 +2,8 @@ var/list/clients = list() //all clients
|
||||
var/list/admins = list() //all clients whom are admins
|
||||
var/list/deadmins = list() //all clients who have used the de-admin verb.
|
||||
var/list/directory = list() //all ckeys with associated client
|
||||
var/list/stealthminID = list() //reference list with IDs that store ckeys, for stealthmins
|
||||
var/list/stealthminID = list() //reference list with IDs that store ckeys, for stealthmins
|
||||
var/global/list/current_watchlist = list() //stores players that are currently online and in the watchlist
|
||||
|
||||
//Since it didn't really belong in any other category, I'm putting this here
|
||||
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
|
||||
@@ -12,4 +13,5 @@ var/global/list/mob_list = list() //all mobs, including clientless
|
||||
var/global/list/living_mob_list = list() //all alive mobs, including clientless. Excludes /mob/new_player
|
||||
var/global/list/dead_mob_list = list() //all dead mobs, including clientless. Excludes /mob/new_player
|
||||
var/global/list/joined_player_list = list() //all clients that have joined the game at round-start or as a latejoin.
|
||||
var/global/list/silicon_mobs = list() //all silicon mobs
|
||||
var/global/list/silicon_mobs = list() //all silicon mobs
|
||||
var/global/list/pai_list = list()
|
||||
@@ -13,6 +13,7 @@ var/list/clown_names = file2list("config/names/clown.txt")
|
||||
var/list/mime_names = file2list("config/names/mime.txt")
|
||||
var/list/carp_names = file2list("config/names/carp.txt")
|
||||
var/list/golem_names = file2list("config/names/golem.txt")
|
||||
var/list/plasmaman_names = file2list("config/names/plasmaman.txt")
|
||||
|
||||
|
||||
var/list/verbs = file2list("config/names/verbs.txt")
|
||||
|
||||
@@ -6,10 +6,11 @@ var/global/list/shuttle_caller_list = list() //list of all communication cons
|
||||
var/global/list/machines = list() //NOTE: this is a list of ALL machines now. The processing machines list is SSmachine.processing !
|
||||
var/global/list/syndicate_shuttle_boards = list() //important to keep track of for managing nukeops war declarations.
|
||||
var/global/list/navbeacons = list() //list of all bot nagivation beacons, used for patrolling.
|
||||
var/global/list/teleportbeacons = list() //list of all tracking beacons used by teleporters
|
||||
var/global/list/deliverybeacons = list() //list of all MULEbot delivery beacons.
|
||||
var/global/list/deliverybeacontags = list() //list of all tags associated with delivery beacons.
|
||||
var/global/list/nuke_list = list()
|
||||
var/global/list/nuke_tiles = list() //list of all turfs that turn to animated red grids when a nuke is triggered
|
||||
var/global/list/alarmdisplay = list() //list of all machines or programs that can display station alerts
|
||||
|
||||
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
@@ -20,7 +21,8 @@ var/global/list/crafting_recipes = list() //list of all table craft recipes
|
||||
var/global/list/rcd_list = list() //list of Rapid Construction Devices.
|
||||
var/global/list/apcs_list = list() //list of all Area Power Controller machines, seperate from machines for powernet speeeeeeed.
|
||||
var/global/list/tracked_implants = list() //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
|
||||
var/global/list/tracked_chem_implants = list() //list of implants the prisoner console can track and send inject commands too
|
||||
var/global/list/poi_list = list() //list of points of interest for observe/follow
|
||||
var/global/list/pinpointer_list = list() //list of all pinpointers. Used to change stuff they are pointing to all at once.
|
||||
// A list of all zombie_infection organs, for any mass "animation"
|
||||
var/global/list/zombie_infection_list = list()
|
||||
var/global/list/zombie_infection_list = list() // A list of all zombie_infection organs, for any mass "animation"
|
||||
var/global/list/meteor_list = list() // List of all meteors.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
//Each lists stores ckeys for "Never for this round" option category
|
||||
|
||||
#define POLL_IGNORE_PAI "pai"
|
||||
#define POLL_IGNORE_SENTIENCE_POTION "sentience_potion"
|
||||
|
||||
var/list/poll_ignore = list()
|
||||
@@ -0,0 +1,9 @@
|
||||
//please store common type caches here.
|
||||
//type caches should only be stored here if used in mutiple places or likely to be used in mutiple places.
|
||||
|
||||
//Note: typecache can only replace istype if you know for sure the thing is at least a datum.
|
||||
|
||||
var/list/typecache_mob = typecacheof(list(/mob))
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ var/href_logfile = null
|
||||
|
||||
var/list/bombers = list( )
|
||||
var/list/admin_log = list ( )
|
||||
var/list/mentor_log = list ( )
|
||||
var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
|
||||
var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
|
||||
|
||||
|
||||
@@ -16,12 +16,7 @@ var/map_ready = 0
|
||||
initialize() is necessary because the map is instanced on a turf-by-turf basis
|
||||
i.e. all obj on a turf are instanced, then all mobs on that turf, before moving to the next turf (starting bottom-left)
|
||||
This means if we want to say, get any neighbouring objects in New(), only objects to the south and west will exist yet.
|
||||
Therefore, we'd need to use spawn() inside New() to wait for the surrounding turf contents to be instanced
|
||||
However, using lots of spawn() has a severe performance impact, and often results in spaghetti-code
|
||||
Therefore, we'd need to use spawn inside New() to wait for the surrounding turf contents to be instanced
|
||||
However, using lots of spawn has a severe performance impact, and often results in spaghetti-code
|
||||
map_ready will be set to 1 when world/New() is called (which happens just after the map is instanced)
|
||||
*/
|
||||
|
||||
//SPACE PARALLAX
|
||||
var/parallax_initialized = 0
|
||||
var/space_color = "#050505"
|
||||
var/list/parallax_icon[27]
|
||||
*/
|
||||
@@ -1 +0,0 @@
|
||||
#define CLICKCATCHER_PLANE -99
|
||||
+17
-9
@@ -34,6 +34,14 @@
|
||||
if(control_disabled || stat)
|
||||
return
|
||||
|
||||
var/turf/pixel_turf = get_turf_pixel(A)
|
||||
var/turf_visible = cameranet.checkTurfVis(pixel_turf)
|
||||
if(pixel_turf && !turf_visible)
|
||||
log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)])")
|
||||
message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))")
|
||||
send2admindiscord("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))")
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
@@ -57,13 +65,13 @@
|
||||
if(world.time <= next_move)
|
||||
return
|
||||
|
||||
if(aicamera.in_camera_mode)
|
||||
if(aicamera.in_camera_mode && pixel_turf && turf_visible)
|
||||
aicamera.camera_mode_off()
|
||||
aicamera.captureimage(A, usr)
|
||||
aicamera.captureimage(pixel_turf, usr)
|
||||
return
|
||||
if(waypoint_mode)
|
||||
set_waypoint(A)
|
||||
waypoint_mode = 0
|
||||
set_waypoint(A)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -128,7 +136,7 @@
|
||||
Topic("aiEnable=4", list("aiEnable"="4"), 1)// 1 meaning no window (consistency!)
|
||||
else
|
||||
Topic("aiDisable=4", list("aiDisable"="4"), 1)
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/AIAltClick() // Eletrifies doors.
|
||||
if(emagged)
|
||||
return
|
||||
@@ -138,7 +146,7 @@
|
||||
else
|
||||
// disable/6 is not in Topic; disable/5 disables both temporary and permenant shock
|
||||
Topic("aiDisable=5", list("aiDisable"="5"), 1)
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors!
|
||||
if(emagged)
|
||||
return
|
||||
@@ -146,7 +154,7 @@
|
||||
Topic("aiEnable=7", list("aiEnable"="7"), 1) // 1 meaning no window (consistency!)
|
||||
else
|
||||
Topic("aiDisable=7", list("aiDisable"="7"), 1)
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/AICtrlShiftClick() // Sets/Unsets Emergency Access Override
|
||||
if(emagged)
|
||||
return
|
||||
@@ -154,12 +162,12 @@
|
||||
Topic("aiEnable=11", list("aiEnable"="11"), 1) // 1 meaning no window (consistency!)
|
||||
else
|
||||
Topic("aiDisable=11", list("aiDisable"="11"), 1)
|
||||
return
|
||||
|
||||
/* APC */
|
||||
/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
|
||||
toggle_breaker()
|
||||
add_fingerprint(usr)
|
||||
if(can_use(usr, 1))
|
||||
toggle_breaker()
|
||||
add_fingerprint(usr)
|
||||
|
||||
/* AI Turrets */
|
||||
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/mob/living/carbon/CanMobAutoclick(atom/object, location, params)
|
||||
if(!object.IsAutoclickable())
|
||||
return
|
||||
var/obj/item/h = get_active_hand()
|
||||
var/obj/item/h = get_active_held_item()
|
||||
if(h)
|
||||
. = h.CanItemAutoclick(object, location, params)
|
||||
|
||||
|
||||
+62
-24
@@ -32,9 +32,13 @@
|
||||
*/
|
||||
/atom/Click(location,control,params)
|
||||
usr.ClickOn(src, params)
|
||||
|
||||
/atom/DblClick(location,control,params)
|
||||
usr.DblClickOn(src,params)
|
||||
|
||||
/atom/MouseWheel(delta_x,delta_y,location,control,params)
|
||||
usr.MouseWheelOn(src, delta_x, delta_y, params)
|
||||
|
||||
/*
|
||||
Standard mob ClickOn()
|
||||
Handles exceptions: Buildmode, middle click, modified clicks, mech actions
|
||||
@@ -53,7 +57,7 @@
|
||||
return
|
||||
next_click = world.time + 1
|
||||
|
||||
if(client.click_intercept)
|
||||
if(client && client.click_intercept)
|
||||
if(call(client.click_intercept, "InterceptClickOn")(src, params, A))
|
||||
return
|
||||
|
||||
@@ -98,24 +102,22 @@
|
||||
throw_item(A)
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_hand()
|
||||
var/obj/item/W = get_active_held_item()
|
||||
|
||||
|
||||
if(W == A)
|
||||
W.attack_self(src)
|
||||
if(hand)
|
||||
update_inv_l_hand(0)
|
||||
else
|
||||
update_inv_r_hand(0)
|
||||
update_inv_hands()
|
||||
return
|
||||
|
||||
// operate three levels deep here (item in backpack in src; item in box in backpack in src, not any deeper)
|
||||
if(!isturf(A) && A == loc || (A in contents) || (A.loc in contents) || (A.loc && (A.loc.loc in contents)))
|
||||
if(A.ClickAccessible(src, depth=INVENTORY_DEPTH))
|
||||
// No adjacency needed
|
||||
if(W)
|
||||
var/resolved = A.attackby(W,src)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params) // 1 indicates adjacency
|
||||
if(W.pre_attackby(A,src,params))
|
||||
var/resolved = A.attackby(W,src)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params) // 1 indicates adjacency
|
||||
else
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -129,10 +131,11 @@
|
||||
if(isturf(A) || isturf(A.loc) || (A.loc && isturf(A.loc.loc)))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
if(W)
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = A.attackby(W,src,params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
|
||||
if(W.pre_attackby(A,src,params))
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = A.attackby(W,src,params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
|
||||
else
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -222,6 +225,7 @@
|
||||
Ctrl click
|
||||
For most objects, pull
|
||||
*/
|
||||
|
||||
/mob/proc/CtrlClickOn(atom/A)
|
||||
A.CtrlClick(src)
|
||||
return
|
||||
@@ -231,6 +235,13 @@
|
||||
if(istype(ML))
|
||||
ML.pulled(src)
|
||||
|
||||
/mob/living/carbon/human/CtrlClick(mob/user)
|
||||
if(ishuman(user) && Adjacent(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.dna.species.grab(H, src, H.martial_art)
|
||||
H.next_click = world.time + CLICK_CD_MELEE
|
||||
else
|
||||
..()
|
||||
/*
|
||||
Alt click
|
||||
Unused except for AI
|
||||
@@ -274,6 +285,21 @@
|
||||
/atom/proc/CtrlShiftClick(mob/user)
|
||||
return
|
||||
|
||||
/*
|
||||
Helper to check can the mob click/access an item.
|
||||
Used by mob inventory and storage items.
|
||||
*/
|
||||
/atom/proc/ClickAccessible(mob/user, depth=1)
|
||||
if(src == user.loc || (src in user.contents))
|
||||
return TRUE
|
||||
|
||||
if(loc && depth > 1)
|
||||
return loc.ClickAccessible(user, depth-1)
|
||||
|
||||
/turf/ClickAccessible(mob/user, depth=1)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Misc helpers
|
||||
|
||||
@@ -334,15 +360,11 @@
|
||||
icon_state = "click_catcher"
|
||||
plane = CLICKCATCHER_PLANE
|
||||
mouse_opacity = 2
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
screen_loc = "CENTER"
|
||||
|
||||
/obj/screen/click_catcher/proc/MakeGreed()
|
||||
. = list()
|
||||
for(var/i = 0, i<15, i++)
|
||||
for(var/j = 0, j<15, j++)
|
||||
var/obj/screen/click_catcher/CC = new()
|
||||
CC.screen_loc = "NORTH-[i],EAST-[j]"
|
||||
. += CC
|
||||
/obj/screen/click_catcher/New()
|
||||
..()
|
||||
transform = matrix(200, 0, 0, 0, 200, 0)
|
||||
|
||||
/obj/screen/click_catcher/Click(location, control, params)
|
||||
var/list/modifiers = params2list(params)
|
||||
@@ -350,7 +372,23 @@
|
||||
var/mob/living/carbon/C = usr
|
||||
C.swap_hand()
|
||||
else
|
||||
var/turf/T = screen_loc2turf(screen_loc, get_turf(usr))
|
||||
var/turf/T = params2turf(modifiers["screen-loc"], get_turf(usr))
|
||||
if(T)
|
||||
T.Click(location, control, params)
|
||||
. = 1
|
||||
. = 1
|
||||
|
||||
|
||||
/* MouseWheelOn */
|
||||
|
||||
/mob/proc/MouseWheelOn(atom/A, delta_x, delta_y, params)
|
||||
return
|
||||
|
||||
/mob/dead/observer/MouseWheelOn(atom/A, delta_x, delta_y, params)
|
||||
var/list/modifier = params2list(params)
|
||||
if(modifier["shift"])
|
||||
var/view = 0
|
||||
if(delta_y > 0)
|
||||
view = -1
|
||||
else
|
||||
view = 1
|
||||
add_view_range(view)
|
||||
@@ -51,7 +51,7 @@
|
||||
aicamera.captureimage(A, usr)
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_hand()
|
||||
var/obj/item/W = get_active_held_item()
|
||||
|
||||
// Cyborgs have no range-checking unless there is item use
|
||||
if(!W)
|
||||
@@ -69,9 +69,10 @@
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
|
||||
if(A == loc || (A in loc) || (A in contents))
|
||||
// No adjacency checks
|
||||
var/resolved = A.attackby(W,src, params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params)
|
||||
if(W.pre_attackby(A,src,params))
|
||||
var/resolved = A.attackby(W,src, params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params)
|
||||
return
|
||||
|
||||
if(!isturf(loc))
|
||||
@@ -80,9 +81,10 @@
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
|
||||
if(isturf(A) || isturf(A.loc))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
var/resolved = A.attackby(W, src, params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A, src, 1, params)
|
||||
if(W.pre_attackby(A,src,params))
|
||||
var/resolved = A.attackby(W, src, params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A, src, 1, params)
|
||||
return
|
||||
else
|
||||
W.afterattack(A, src, 0, params)
|
||||
|
||||
@@ -17,53 +17,67 @@
|
||||
Therefore, the top right corner (except during admin shenanigans) is at "15,15"
|
||||
*/
|
||||
|
||||
//Lower left, persistant menu
|
||||
//Lower left, persistent menu
|
||||
#define ui_inventory "WEST:6,SOUTH:5"
|
||||
|
||||
//Middle left indicators
|
||||
#define ui_lingchemdisplay "WEST:6,CENTER-1:15"
|
||||
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
|
||||
#define ui_crafting "12:-10,1:5"
|
||||
#define ui_building "12:-10,1:21"
|
||||
|
||||
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
|
||||
|
||||
//Lower center, persistant menu
|
||||
//Lower center, persistent menu
|
||||
#define ui_sstore1 "CENTER-5:10,SOUTH:5"
|
||||
#define ui_id "CENTER-4:12,SOUTH:5"
|
||||
#define ui_belt "CENTER-3:14,SOUTH:5"
|
||||
#define ui_back "CENTER-2:14,SOUTH:5"
|
||||
#define ui_rhand "CENTER:-16,SOUTH:5"
|
||||
#define ui_lhand "CENTER: 16,SOUTH:5"
|
||||
#define ui_equip "CENTER:-16,SOUTH+1:5"
|
||||
#define ui_swaphand1 "CENTER:-16,SOUTH+1:5"
|
||||
#define ui_swaphand2 "CENTER: 16,SOUTH+1:5"
|
||||
|
||||
/proc/ui_hand_position(i) //values based on old hand ui positions (CENTER:-/+16,SOUTH:5)
|
||||
var/x_off = -(!(i % 2))
|
||||
var/y_off = round((i-1) / 2)
|
||||
return"CENTER+[x_off]:16,SOUTH+[y_off]:5"
|
||||
|
||||
/proc/ui_equip_position(mob/M)
|
||||
var/y_off = round((M.held_items.len-1) / 2) //values based on old equip ui position (CENTER: +/-16,SOUTH+1:5)
|
||||
return "CENTER:-16,SOUTH+[y_off+1]:5"
|
||||
|
||||
/proc/ui_swaphand_position(mob/M, which = 1) //values based on old swaphand ui positions (CENTER: +/-16,SOUTH+1:5)
|
||||
var/x_off = which == 1 ? -1 : 0
|
||||
var/y_off = round((M.held_items.len-1) / 2)
|
||||
return "CENTER+[x_off]:16,SOUTH+[y_off+1]:5"
|
||||
|
||||
#define ui_storage1 "CENTER+1:18,SOUTH:5"
|
||||
#define ui_storage2 "CENTER+2:20,SOUTH:5"
|
||||
|
||||
#define ui_borg_sensor "CENTER-3:16, SOUTH:5" //borgs
|
||||
#define ui_borg_lamp "CENTER-4:16, SOUTH:5" //borgies
|
||||
#define ui_borg_thrusters "CENTER-5:16, SOUTH:5"//borgies
|
||||
#define ui_inv1 "CENTER-2:16,SOUTH:5" //borgs
|
||||
#define ui_inv2 "CENTER-1 :16,SOUTH:5" //borgs
|
||||
#define ui_inv3 "CENTER :16,SOUTH:5" //borgs
|
||||
#define ui_borg_module "CENTER+1:16,SOUTH:5"
|
||||
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
|
||||
|
||||
#define ui_borg_camera "CENTER+3:21,SOUTH:5" //borgs
|
||||
#define ui_borg_album "CENTER+4:21,SOUTH:5" //borgs
|
||||
#define ui_borg_sensor "CENTER-3:16, SOUTH:5" //borgs
|
||||
#define ui_borg_lamp "CENTER-4:16, SOUTH:5" //borgs
|
||||
#define ui_borg_thrusters "CENTER-5:16, SOUTH:5" //borgs
|
||||
#define ui_inv1 "CENTER-2:16,SOUTH:5" //borgs
|
||||
#define ui_inv2 "CENTER-1 :16,SOUTH:5" //borgs
|
||||
#define ui_inv3 "CENTER :16,SOUTH:5" //borgs
|
||||
#define ui_borg_module "CENTER+1:16,SOUTH:5" //borgs
|
||||
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
|
||||
#define ui_borg_camera "CENTER+3:21,SOUTH:5" //borgs
|
||||
#define ui_borg_album "CENTER+4:21,SOUTH:5" //borgs
|
||||
#define ui_borg_talk_wheel "CENTER+4:21,SOUTH+1:5" //borgs
|
||||
|
||||
#define ui_monkey_head "CENTER-4:13,SOUTH:5" //monkey
|
||||
#define ui_monkey_mask "CENTER-3:14,SOUTH:5" //monkey
|
||||
#define ui_monkey_back "CENTER-2:15,SOUTH:5" //monkey
|
||||
#define ui_monkey_neck "CENTER-2:15,SOUTH:5" //monkey
|
||||
#define ui_monkey_back "CENTER-1:16,SOUTH:5" //monkey
|
||||
|
||||
#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien
|
||||
#define ui_alien_storage_r "CENTER+1:18,SOUTH:5"//alien
|
||||
#define ui_alien_talk_wheel "EAST-3:26,SOUTH:5" //alien
|
||||
|
||||
#define ui_drone_drop "CENTER+1:18,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_pull "CENTER+2:2,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_storage "CENTER-2:14,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_head "CENTER-3:14,SOUTH:5" //maintenance drones
|
||||
|
||||
//Lower right, persistant menu
|
||||
//Lower right, persistent menu
|
||||
#define ui_drop_throw "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_pull_resist "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_movi "EAST-2:26,SOUTH:5"
|
||||
@@ -94,6 +108,7 @@
|
||||
#define ui_borg_health "EAST-1:28,CENTER-1:15" //borgs have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alien_health "EAST-1:28,CENTER-1:15" //aliens have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alienplasmadisplay "EAST-1:28,CENTER-2:15"
|
||||
#define ui_alien_queen_finder "EAST-1:28,CENTER-3:15"
|
||||
|
||||
// AI
|
||||
|
||||
@@ -120,18 +135,19 @@
|
||||
#define ui_oclothing "WEST+1:8,SOUTH+1:7"
|
||||
#define ui_gloves "WEST+2:10,SOUTH+1:7"
|
||||
|
||||
#define ui_glasses "WEST:6,SOUTH+2:9"
|
||||
#define ui_glasses "WEST:6,SOUTH+3:11"
|
||||
#define ui_mask "WEST+1:8,SOUTH+2:9"
|
||||
#define ui_ears "WEST+2:10,SOUTH+2:9"
|
||||
|
||||
#define ui_neck "WEST:6,SOUTH+2:9"
|
||||
#define ui_head "WEST+1:8,SOUTH+3:11"
|
||||
|
||||
//Ghosts
|
||||
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:16"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:16"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:16"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:16"
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:24"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:24"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
|
||||
#define ui_ghost_pai "SOUTH: 6, CENTER+2:24"
|
||||
|
||||
//Hand of God, god
|
||||
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
#define ACTION_BUTTON_DEFAULT_BACKGROUND "default"
|
||||
|
||||
/obj/screen/movable/action_button
|
||||
var/datum/action/linked_action
|
||||
var/actiontooltipstyle = ""
|
||||
screen_loc = null
|
||||
|
||||
var/button_icon_state
|
||||
var/appearance_cache
|
||||
|
||||
/obj/screen/movable/action_button/Click(location,control,params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"])
|
||||
@@ -20,6 +25,9 @@
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_default"
|
||||
var/hidden = 0
|
||||
var/hide_icon = 'icons/mob/actions.dmi'
|
||||
var/hide_state = "hide"
|
||||
var/show_state = "show"
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
|
||||
var/list/modifiers = params2list(params)
|
||||
@@ -37,33 +45,44 @@
|
||||
usr.update_action_buttons()
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user)
|
||||
if(isalien(user))
|
||||
icon_state = "bg_alien"
|
||||
else
|
||||
icon_state = "bg_default"
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
|
||||
var settings = owner_hud.get_action_buttons_icons()
|
||||
icon = settings["bg_icon"]
|
||||
icon_state = settings["bg_state"]
|
||||
hide_icon = settings["toggle_icon"]
|
||||
hide_state = settings["toggle_hide"]
|
||||
show_state = settings["toggle_show"]
|
||||
UpdateIcon()
|
||||
return
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/UpdateIcon()
|
||||
cut_overlays()
|
||||
var/image/img = image(icon, src, hidden ? "show" : "hide")
|
||||
var/image/img = image(hide_icon, src, hidden ? show_state : hide_state)
|
||||
add_overlay(img)
|
||||
return
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/MouseEntered(location,control,params)
|
||||
openToolTip(usr,src,params,title = name,content = desc)
|
||||
openToolTip(usr,src,params,title = name,content = desc,theme = actiontooltipstyle)
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/MouseExited()
|
||||
closeToolTip(usr)
|
||||
|
||||
/datum/hud/proc/get_action_buttons_icons()
|
||||
. = list()
|
||||
.["bg_icon"] = ui_style_icon
|
||||
.["bg_state"] = "template"
|
||||
|
||||
//TODO : Make these fit theme
|
||||
.["toggle_icon"] = 'icons/mob/actions.dmi'
|
||||
.["toggle_hide"] = "hide"
|
||||
.["toggle_show"] = "show"
|
||||
|
||||
/mob/proc/update_action_buttons_icon()
|
||||
//see human and alien hud for specific implementations.
|
||||
|
||||
/mob/proc/update_action_buttons_icon(status_only = FALSE)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
A.UpdateButtonIcon(status_only)
|
||||
|
||||
//This is the proc used to update all the action buttons.
|
||||
/mob/proc/update_action_buttons(reload_screen)
|
||||
|
||||
+36
-5
@@ -1,11 +1,17 @@
|
||||
/obj/screen/ai
|
||||
icon = 'icons/mob/screen_ai.dmi'
|
||||
|
||||
/obj/screen/ai/Click()
|
||||
if(isobserver(usr))
|
||||
return 1
|
||||
|
||||
/obj/screen/ai/aicore
|
||||
name = "AI core"
|
||||
icon_state = "ai_core"
|
||||
|
||||
/obj/screen/ai/aicore/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.view_core()
|
||||
|
||||
@@ -23,6 +29,8 @@
|
||||
icon_state = "track"
|
||||
|
||||
/obj/screen/ai/camera_track/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
|
||||
AI.ai_camera_track(target_name)
|
||||
@@ -32,6 +40,8 @@
|
||||
icon_state = "camera_light"
|
||||
|
||||
/obj/screen/ai/camera_light/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.toggle_camera_light()
|
||||
|
||||
@@ -40,6 +50,8 @@
|
||||
icon_state = "crew_monitor"
|
||||
|
||||
/obj/screen/ai/crew_monitor/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
crewmonitor.show(AI)
|
||||
|
||||
@@ -48,6 +60,8 @@
|
||||
icon_state = "manifest"
|
||||
|
||||
/obj/screen/ai/crew_manifest/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_roster()
|
||||
|
||||
@@ -56,14 +70,18 @@
|
||||
icon_state = "alerts"
|
||||
|
||||
/obj/screen/ai/alerts/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_alerts()
|
||||
|
||||
/obj/screen/ai/announcement
|
||||
name = "Make Announcement"
|
||||
name = "Make Vox Announcement"
|
||||
icon_state = "announcement"
|
||||
|
||||
/obj/screen/ai/announcement/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.announcement()
|
||||
|
||||
@@ -72,6 +90,8 @@
|
||||
icon_state = "call_shuttle"
|
||||
|
||||
/obj/screen/ai/call_shuttle/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.ai_call_shuttle()
|
||||
|
||||
@@ -80,6 +100,8 @@
|
||||
icon_state = "state_laws"
|
||||
|
||||
/obj/screen/ai/state_laws/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.checklaws()
|
||||
|
||||
@@ -88,6 +110,8 @@
|
||||
icon_state = "pda_send"
|
||||
|
||||
/obj/screen/ai/pda_msg_send/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.cmd_send_pdamesg(usr)
|
||||
|
||||
@@ -96,6 +120,8 @@
|
||||
icon_state = "pda_receive"
|
||||
|
||||
/obj/screen/ai/pda_msg_show/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.cmd_show_message_log(usr)
|
||||
|
||||
@@ -107,7 +133,7 @@
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.aicamera.toggle_camera_mode()
|
||||
else if(isrobot(usr))
|
||||
else if(iscyborg(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.aicamera.toggle_camera_mode()
|
||||
|
||||
@@ -119,7 +145,7 @@
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.aicamera.viewpictures()
|
||||
else if(isrobot(usr))
|
||||
else if(iscyborg(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.aicamera.viewpictures()
|
||||
|
||||
@@ -128,11 +154,16 @@
|
||||
icon_state = "ai_sensor"
|
||||
|
||||
/obj/screen/ai/sensors/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/S = usr
|
||||
S.sensor_mode()
|
||||
|
||||
|
||||
/datum/hud/ai/New(mob/owner)
|
||||
/datum/hud/ai
|
||||
ui_style_icon = 'icons/mob/screen_ai.dmi'
|
||||
|
||||
/datum/hud/ai/New(mob/owner, ui_style = 'icons/mob/screen_ai.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
@@ -215,4 +246,4 @@
|
||||
|
||||
/mob/living/silicon/ai/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/ai(src)
|
||||
hud_used = new /datum/hud/ai(src)
|
||||
|
||||
+186
-6
@@ -33,13 +33,16 @@
|
||||
else //no need to update
|
||||
return 0
|
||||
else
|
||||
alert = PoolOrNew(type)
|
||||
alert = new type()
|
||||
|
||||
if(new_master)
|
||||
var/old_layer = new_master.layer
|
||||
var/old_plane = new_master.plane
|
||||
new_master.layer = FLOAT_LAYER
|
||||
new_master.plane = FLOAT_PLANE
|
||||
alert.overlays += new_master
|
||||
new_master.layer = old_layer
|
||||
new_master.plane = old_plane
|
||||
alert.icon_state = "template" // We'll set the icon to the client's ui pref in reorganize_alerts()
|
||||
alert.master = new_master
|
||||
else
|
||||
@@ -53,12 +56,14 @@
|
||||
animate(alert, transform = matrix(), time = 2.5, easing = CUBIC_EASING)
|
||||
|
||||
if(alert.timeout)
|
||||
spawn(alert.timeout)
|
||||
if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout)
|
||||
clear_alert(category)
|
||||
addtimer(CALLBACK(src, .proc/alert_timeout, alert, category), alert.timeout)
|
||||
alert.timeout = world.time + alert.timeout - world.tick_lag
|
||||
return alert
|
||||
|
||||
/mob/proc/alert_timeout(obj/screen/alert/alert, category)
|
||||
if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout)
|
||||
clear_alert(category)
|
||||
|
||||
// Proc to clear an existing alert.
|
||||
/mob/proc/clear_alert(category)
|
||||
var/obj/screen/alert/alert = alerts[category]
|
||||
@@ -240,6 +245,163 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
icon_state = "blobbernaut_nofactory"
|
||||
alerttooltipstyle = "blob"
|
||||
|
||||
// CLOCKCULT
|
||||
/obj/screen/alert/clockwork
|
||||
alerttooltipstyle = "clockcult"
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs
|
||||
name = "Next Tier Requirements"
|
||||
desc = "You shouldn't be seeing this description unless you're very fast. If you're very fast, good job!"
|
||||
icon_state = "no-servants-caches"
|
||||
var/static/list/scripture_states = list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE, SCRIPTURE_REVENANT = FALSE, SCRIPTURE_JUDGEMENT = FALSE)
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/New()
|
||||
..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
process()
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/process()
|
||||
if(clockwork_gateway_activated)
|
||||
qdel(src)
|
||||
return
|
||||
var/current_state
|
||||
scripture_states = scripture_unlock_check()
|
||||
for(var/i in scripture_states)
|
||||
if(!scripture_states[i])
|
||||
current_state = i
|
||||
break
|
||||
icon_state = "no"
|
||||
if(!current_state)
|
||||
name = "Current Objective"
|
||||
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
|
||||
var/area/gate_area = get_area(G)
|
||||
desc = "<b>Protect the Ark at [gate_area.map_name]!</b>"
|
||||
return
|
||||
desc = "<b>All tiers of Scripture are unlocked.<br>\
|
||||
Acquire components and summon the Ark.</b>"
|
||||
else
|
||||
name = "Next Tier Requirements"
|
||||
var/validservants = 0
|
||||
var/unconverted_ais_exist = FALSE
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
if(is_servant_of_ratvar(L) && (ishuman(L) || issilicon(L)))
|
||||
validservants++
|
||||
else if(isAI(L))
|
||||
unconverted_ais_exist++
|
||||
var/req_servants = 0
|
||||
var/req_caches = 0
|
||||
var/req_cv = 0
|
||||
var/req_ai = FALSE
|
||||
desc = "Requirements for <b>[current_state] Scripture:</b>"
|
||||
switch(current_state) //get our requirements based on the tier
|
||||
if(SCRIPTURE_SCRIPT)
|
||||
req_servants = SCRIPT_SERVANT_REQ
|
||||
req_caches = SCRIPT_CACHE_REQ
|
||||
if(SCRIPTURE_APPLICATION)
|
||||
req_servants = APPLICATION_SERVANT_REQ
|
||||
req_caches = APPLICATION_CACHE_REQ
|
||||
req_cv = APPLICATION_CV_REQ
|
||||
if(SCRIPTURE_REVENANT)
|
||||
req_servants = REVENANT_SERVANT_REQ
|
||||
req_caches = REVENANT_CACHE_REQ
|
||||
req_cv = REVENANT_CV_REQ
|
||||
if(SCRIPTURE_JUDGEMENT)
|
||||
req_servants = JUDGEMENT_SERVANT_REQ
|
||||
req_caches = JUDGEMENT_CACHE_REQ
|
||||
req_cv = JUDGEMENT_CV_REQ
|
||||
req_ai = TRUE
|
||||
desc += "<br><b>[validservants]/[req_servants]</b> Servants"
|
||||
if(validservants < req_servants)
|
||||
icon_state += "-servants" //in this manner, generate an icon key based on what we're missing
|
||||
else
|
||||
desc += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
|
||||
desc += "<br><b>[clockwork_caches]/[req_caches]</b> Tinkerer's Caches"
|
||||
if(clockwork_caches < req_caches)
|
||||
icon_state += "-caches"
|
||||
else
|
||||
desc += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
|
||||
if(req_cv) //cv only shows up if the tier requires it
|
||||
desc += "<br><b>[clockwork_construction_value]/[req_cv]</b> Construction Value"
|
||||
if(clockwork_construction_value < req_cv)
|
||||
icon_state += "-cv"
|
||||
else
|
||||
desc += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
|
||||
if(req_ai) //same for ai
|
||||
if(unconverted_ais_exist)
|
||||
if(unconverted_ais_exist > 1)
|
||||
desc += "<br><b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
|
||||
else
|
||||
desc += "<br><b>An unconverted AI exists!</b>"
|
||||
icon_state += "-ai"
|
||||
else
|
||||
desc += "<br>No unconverted AIs exist: <b><font color=#5A6068>\[CHECK\]</font></b>"
|
||||
|
||||
/obj/screen/alert/clockwork/infodump
|
||||
name = "Global Records"
|
||||
desc = "You shouldn't be seeing this description, because it should be dynamically generated."
|
||||
icon_state = "clockinfo"
|
||||
|
||||
/obj/screen/alert/clockwork/infodump/MouseEntered(location,control,params)
|
||||
if(ratvar_awakens)
|
||||
desc = "<font size=3><b>CHETR<br>NYY<br>HAGEHUGF-NAQ-UBABE<br>RATVAR.</b></font>"
|
||||
else
|
||||
var/servants = 0
|
||||
var/validservants = 0
|
||||
var/unconverted_ais_exist = FALSE
|
||||
var/list/scripture_states = scripture_unlock_check()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
if(is_servant_of_ratvar(L))
|
||||
servants++
|
||||
if(ishuman(L) || issilicon(L))
|
||||
validservants++
|
||||
else if(isAI(L))
|
||||
unconverted_ais_exist++
|
||||
if(servants > 1)
|
||||
if(validservants > 1)
|
||||
desc = "<b>[servants]</b> Servants, <b>[validservants]</b> of which count towards scripture.<br>"
|
||||
else
|
||||
desc = "<b>[servants]</b> Servants, [validservants ? "<b>[validservants]</b> of which counts":"none of which count"] towards scripture.<br>"
|
||||
else
|
||||
desc = "<b>[servants]</b> Servant, who [validservants ? "counts":"does not count"] towards scripture.<br>"
|
||||
desc += "<b>[clockwork_caches ? "[clockwork_caches]</b> Tinkerer's Caches.":"No Tinkerer's Caches, construct one!</b>"]<br>\
|
||||
<b>[clockwork_construction_value]</b> Construction Value.<br>"
|
||||
if(clockwork_daemons)
|
||||
desc += "<b>[clockwork_daemons]</b> Tinkerer's Daemons: <b>[servants * 0.2 < clockwork_daemons ? "DISABLED":"ACTIVE"]</b><br>"
|
||||
else
|
||||
desc += "No Tinkerer's Daemons.<br>"
|
||||
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
|
||||
var/area/gate_area = get_area(G)
|
||||
desc += "Ark Location: <b>[uppertext(gate_area.map_name)]</b><br>"
|
||||
if(G.ratvar_portal)
|
||||
desc += "Seconds until Ratvar's arrival: <b>[G.get_arrival_text(TRUE)]</b><br>"
|
||||
else
|
||||
desc += "Seconds until Proselytization: <b>[G.get_arrival_text(TRUE)]</b><br>"
|
||||
if(unconverted_ais_exist)
|
||||
if(unconverted_ais_exist > 1)
|
||||
desc += "<b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
|
||||
else
|
||||
desc += "<b>An unconverted AI exists!</b><br>"
|
||||
if(scripture_states[SCRIPTURE_REVENANT])
|
||||
var/inathneq_available = clockwork_generals_invoked["inath-neq"] <= world.time
|
||||
var/sevtug_available = clockwork_generals_invoked["sevtug"] <= world.time
|
||||
var/nezbere_available = clockwork_generals_invoked["nezbere"] <= world.time
|
||||
var/nezcrentr_available = clockwork_generals_invoked["nzcrentr"] <= world.time
|
||||
if(inathneq_available || sevtug_available || nezbere_available || nezcrentr_available)
|
||||
desc += "Generals available:<b>[inathneq_available ? "<br><font color=#1E8CE1>INATH-NEQ</font>":""][sevtug_available ? "<br><font color=#AF0AAF>SEVTUG</font>":""]\
|
||||
[nezbere_available ? "<br><font color=#5A6068>NEZBERE</font>":""][nezcrentr_available ? "<br><font color=#DAAA18>NZCRENTR</font>":""]</b><br>"
|
||||
else
|
||||
desc += "Generals available: <b>NONE</b><br>"
|
||||
else
|
||||
desc += "Generals available: <b>NONE</b><br>"
|
||||
for(var/i in scripture_states)
|
||||
if(i != SCRIPTURE_DRIVER) //ignore the always-unlocked stuff
|
||||
desc += "[i] Scripture: <b>[scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
|
||||
..()
|
||||
|
||||
//GUARDIANS
|
||||
|
||||
/obj/screen/alert/cancharge
|
||||
@@ -297,6 +459,23 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
icon_state = "newlaw"
|
||||
timeout = 300
|
||||
|
||||
/obj/screen/alert/hackingapc
|
||||
name = "Hacking APC"
|
||||
desc = "An Area Power Controller is being hacked. When the process is \
|
||||
complete, you will have exclusive control of it, and you will gain \
|
||||
additional processing time to unlock more malfunction abilities."
|
||||
icon_state = "hackingapc"
|
||||
timeout = 600
|
||||
var/atom/target = null
|
||||
|
||||
/obj/screen/alert/hackingapc/Click()
|
||||
if(!usr || !usr.client) return
|
||||
if(!target) return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/turf/T = get_turf(target)
|
||||
if(T)
|
||||
AI.eyeobj.setLoc(T)
|
||||
|
||||
//MECHS
|
||||
|
||||
/obj/screen/alert/low_mech_integrity
|
||||
@@ -359,6 +538,7 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
return L.resist()
|
||||
|
||||
// PRIVATE = only edit, use, or override these if you're editing the system as a whole
|
||||
|
||||
// Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there
|
||||
@@ -406,8 +586,8 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
return usr.client.Click(master, location, control, params)
|
||||
|
||||
/obj/screen/alert/Destroy()
|
||||
..()
|
||||
. = ..()
|
||||
severity = 0
|
||||
master = null
|
||||
screen_loc = ""
|
||||
return QDEL_HINT_PUTINPOOL //Don't destroy me, I have a family!
|
||||
|
||||
|
||||
+38
-37
@@ -21,50 +21,46 @@
|
||||
if(T)
|
||||
T.fire(A)
|
||||
|
||||
|
||||
/obj/screen/alien/plasma_display
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "power_display2"
|
||||
name = "plasma stored"
|
||||
screen_loc = ui_alienplasmadisplay
|
||||
|
||||
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner)
|
||||
|
||||
/obj/screen/alien/alien_queen_finder
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
icon_state = "queen_finder"
|
||||
name = "queen sense"
|
||||
desc = "Allows you to sense the general direction of your Queen."
|
||||
screen_loc = ui_alien_queen_finder
|
||||
|
||||
|
||||
/datum/hud/alien
|
||||
ui_style_icon = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner, ui_style = 'icons/mob/screen_alien.dmi')
|
||||
..()
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
//equippable shit
|
||||
|
||||
//hands
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = 'icons/mob/screen_alien.dmi'
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = 'icons/mob/screen_alien.dmi'
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
build_hand_slots(ui_style)
|
||||
|
||||
//begin buttons
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/act_intent/alien()
|
||||
@@ -78,23 +74,28 @@
|
||||
H.leap_icon.screen_loc = ui_alien_storage_r
|
||||
static_inventory += H.leap_icon
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_alien_talk_wheel
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = 'icons/mob/screen_alien.dmi'
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += using
|
||||
|
||||
throw_icon = new /obj/screen/throw_catch()
|
||||
throw_icon.icon = 'icons/mob/screen_alien.dmi'
|
||||
throw_icon.icon = ui_style
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
hotkeybuttons += throw_icon
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = 'icons/mob/screen_alien.dmi'
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
static_inventory += pull_icon
|
||||
@@ -110,6 +111,10 @@
|
||||
alien_plasma_display = new /obj/screen/alien/plasma_display()
|
||||
infodisplay += alien_plasma_display
|
||||
|
||||
if(!istype(mymob, /mob/living/carbon/alien/humanoid/royal/queen))
|
||||
alien_queen_finder = new /obj/screen/alien/alien_queen_finder
|
||||
infodisplay += alien_queen_finder
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
@@ -120,22 +125,18 @@
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/alien/persistant_inventory_update()
|
||||
/datum/hud/alien/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/alien/humanoid/H = mymob
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(H.r_hand)
|
||||
H.r_hand.screen_loc = ui_rhand
|
||||
H.client.screen += H.r_hand
|
||||
if(H.l_hand)
|
||||
H.l_hand.screen_loc = ui_lhand
|
||||
H.client.screen += H.l_hand
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.screen_loc = ui_hand_position(H.get_held_index_of_item(I))
|
||||
H.client.screen += I
|
||||
else
|
||||
if(H.r_hand)
|
||||
H.r_hand.screen_loc = null
|
||||
if(H.l_hand)
|
||||
H.l_hand.screen_loc = null
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.screen_loc = null
|
||||
H.client.screen -= I
|
||||
|
||||
/mob/living/carbon/alien/humanoid/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
|
||||
@@ -13,13 +13,19 @@
|
||||
nightvisionicon = new /obj/screen/alien/nightvision()
|
||||
nightvisionicon.screen_loc = ui_alien_nightvision
|
||||
infodisplay += nightvisionicon
|
||||
|
||||
alien_queen_finder = new /obj/screen/alien/alien_queen_finder()
|
||||
infodisplay += alien_queen_finder
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = 'icons/mob/screen_alien.dmi'
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += pull_icon
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_alien_talk_wheel
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
@@ -34,12 +34,15 @@
|
||||
desc = "Moves your camera to your blob core."
|
||||
|
||||
/obj/screen/blob/JumpToCore/MouseEntered(location,control,params)
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
if(hud && hud.mymob && isovermind(hud.mymob))
|
||||
var/mob/camera/blob/B = hud.mymob
|
||||
if(!B.placed)
|
||||
openToolTip(usr,src,params,title = "Place Blob Core",content = "Attempt to place your blob core at this location.", theme = "blob")
|
||||
name = "Place Blob Core"
|
||||
desc = "Attempt to place your blob core at this location."
|
||||
else
|
||||
..()
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
..()
|
||||
|
||||
/obj/screen/blob/JumpToCore/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -51,7 +54,7 @@
|
||||
/obj/screen/blob/Blobbernaut
|
||||
icon_state = "ui_blobbernaut"
|
||||
name = "Produce Blobbernaut (40)"
|
||||
desc = "Produces a strong, smart blobbernaut from a factory blob for 40 points.<br>The factory blob used will become fragile and unable to produce spores."
|
||||
desc = "Produces a strong, smart blobbernaut from a factory blob for 40 resources.<br>The factory blob used will become fragile and unable to produce spores."
|
||||
|
||||
/obj/screen/blob/Blobbernaut/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -61,7 +64,7 @@
|
||||
/obj/screen/blob/ResourceBlob
|
||||
icon_state = "ui_resource"
|
||||
name = "Produce Resource Blob (40)"
|
||||
desc = "Produces a resource blob for 40 points.<br>Resource blobs will give you points every few seconds."
|
||||
desc = "Produces a resource blob for 40 resources.<br>Resource blobs will give you resources every few seconds."
|
||||
|
||||
/obj/screen/blob/ResourceBlob/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -70,8 +73,8 @@
|
||||
|
||||
/obj/screen/blob/NodeBlob
|
||||
icon_state = "ui_node"
|
||||
name = "Produce Node Blob (60)"
|
||||
desc = "Produces a node blob for 60 points.<br>Node blobs will expand and activate nearby resource and factory blobs."
|
||||
name = "Produce Node Blob (50)"
|
||||
desc = "Produces a node blob for 50 resources.<br>Node blobs will expand and activate nearby resource and factory blobs."
|
||||
|
||||
/obj/screen/blob/NodeBlob/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -81,7 +84,7 @@
|
||||
/obj/screen/blob/FactoryBlob
|
||||
icon_state = "ui_factory"
|
||||
name = "Produce Factory Blob (60)"
|
||||
desc = "Produces a factory blob for 60 points.<br>Factory blobs will produce spores every few seconds."
|
||||
desc = "Produces a factory blob for 60 resources.<br>Factory blobs will produce spores every few seconds."
|
||||
|
||||
/obj/screen/blob/FactoryBlob/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -91,15 +94,18 @@
|
||||
/obj/screen/blob/ReadaptChemical
|
||||
icon_state = "ui_chemswap"
|
||||
name = "Readapt Chemical (40)"
|
||||
desc = "Randomly rerolls your chemical for 40 points."
|
||||
desc = "Randomly rerolls your chemical for 40 resources."
|
||||
|
||||
/obj/screen/blob/ReadaptChemical/MouseEntered(location,control,params)
|
||||
if(isovermind(usr))
|
||||
var/mob/camera/blob/B = usr
|
||||
if(hud && hud.mymob && isovermind(hud.mymob))
|
||||
var/mob/camera/blob/B = hud.mymob
|
||||
if(B.free_chem_rerolls)
|
||||
openToolTip(usr,src,params,title = "Readapt Chemical (FREE)",content = "Randomly rerolls your chemical for free.", theme = "blob")
|
||||
name = "Readapt Chemical (FREE)"
|
||||
desc = "Randomly rerolls your chemical for free."
|
||||
else
|
||||
..()
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
..()
|
||||
|
||||
/obj/screen/blob/ReadaptChemical/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -109,7 +115,7 @@
|
||||
/obj/screen/blob/RelocateCore
|
||||
icon_state = "ui_swap"
|
||||
name = "Relocate Core (80)"
|
||||
desc = "Swaps a node and your core for 80 points."
|
||||
desc = "Swaps a node and your core for 80 resources."
|
||||
|
||||
/obj/screen/blob/RelocateCore/Click()
|
||||
if(isovermind(usr))
|
||||
@@ -126,6 +132,7 @@
|
||||
blobpwrdisplay.screen_loc = ui_health
|
||||
blobpwrdisplay.mouse_opacity = 0
|
||||
blobpwrdisplay.layer = ABOVE_HUD_LAYER
|
||||
blobpwrdisplay.plane = ABOVE_HUD_PLANE
|
||||
infodisplay += blobpwrdisplay
|
||||
|
||||
healths = new /obj/screen/healths/blob()
|
||||
@@ -141,6 +148,7 @@
|
||||
|
||||
using = new /obj/screen/blob/JumpToCore()
|
||||
using.screen_loc = ui_zonesel
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/Blobbernaut()
|
||||
@@ -152,15 +160,16 @@
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/NodeBlob()
|
||||
using.screen_loc = ui_lhand
|
||||
using.screen_loc = ui_hand_position(2)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/FactoryBlob()
|
||||
using.screen_loc = ui_rhand
|
||||
using.screen_loc = ui_hand_position(1)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/ReadaptChemical()
|
||||
using.screen_loc = ui_storage1
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/blob/RelocateCore()
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/datum/hud/marauder
|
||||
var/obj/screen/hosthealth
|
||||
var/obj/screen/blockchance
|
||||
var/obj/screen/counterchance
|
||||
|
||||
/datum/hud/marauder/New(mob/living/simple_animal/hostile/guardian/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
healths = new /obj/screen/healths/clock()
|
||||
infodisplay += healths
|
||||
|
||||
hosthealth = new /obj/screen/healths/clock()
|
||||
hosthealth.screen_loc = ui_internal
|
||||
infodisplay += hosthealth
|
||||
|
||||
using = new /obj/screen/marauder/emerge()
|
||||
using.screen_loc = ui_zonesel
|
||||
static_inventory += using
|
||||
|
||||
/datum/hud/marauder/Destroy()
|
||||
blockchance = null
|
||||
counterchance = null
|
||||
hosthealth = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/marauder/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/marauder(src, ui_style2icon(client.prefs.UI_style))
|
||||
|
||||
/obj/screen/marauder
|
||||
icon = 'icons/mob/clockwork_mobs.dmi'
|
||||
|
||||
/obj/screen/marauder/emerge
|
||||
icon_state = "marauder_emerge"
|
||||
name = "Emerge/Return"
|
||||
desc = "Emerge or Return."
|
||||
|
||||
/obj/screen/marauder/emerge/Click()
|
||||
if(istype(usr, /mob/living/simple_animal/hostile/clockwork/marauder))
|
||||
var/mob/living/simple_animal/hostile/clockwork/marauder/M = usr
|
||||
if(M.is_in_host())
|
||||
M.try_emerge()
|
||||
else
|
||||
M.return_to_host()
|
||||
+12
-29
@@ -5,7 +5,6 @@
|
||||
/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
@@ -18,36 +17,24 @@
|
||||
pull_icon.screen_loc = ui_drone_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
build_hand_slots(ui_style)
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
using.layer = HUD_LAYER
|
||||
using.plane = HUD_PLANE
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
using.layer = HUD_LAYER
|
||||
using.plane = HUD_PLANE
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
@@ -59,23 +46,19 @@
|
||||
infodisplay += devilsouldisplay
|
||||
|
||||
|
||||
/datum/hud/devil/persistant_inventory_update()
|
||||
/datum/hud/devil/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/true_devil/D = mymob
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = ui_rhand
|
||||
D.client.screen += D.r_hand
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = ui_lhand
|
||||
D.client.screen += D.l_hand
|
||||
for(var/obj/item/I in D.held_items)
|
||||
I.screen_loc = ui_hand_position(D.get_held_index_of_item(I))
|
||||
D.client.screen += I
|
||||
else
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = null
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = null
|
||||
for(var/obj/item/I in D.held_items)
|
||||
I.screen_loc = null
|
||||
D.client.screen -= I
|
||||
|
||||
/mob/living/carbon/true_devil/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
|
||||
@@ -1,42 +1,14 @@
|
||||
/datum/hud/drone/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/dextrous/drone/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drone_drop
|
||||
static_inventory += using
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_drone_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "internal storage"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "suit_storage"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_drone_storage
|
||||
inv_box.slot_id = slot_drone_storage
|
||||
inv_box.slot_id = slot_generic_dextrous_storage
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -48,26 +20,6 @@
|
||||
inv_box.slot_id = slot_head
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m"
|
||||
using.screen_loc = ui_swaphand1
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
|
||||
using = new /obj/screen/inventory/craft
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
@@ -75,7 +27,7 @@
|
||||
inv.update_icon()
|
||||
|
||||
|
||||
/datum/hud/drone/persistant_inventory_update()
|
||||
/datum/hud/dextrous/drone/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/simple_animal/drone/D = mymob
|
||||
@@ -93,19 +45,4 @@
|
||||
if(D.head)
|
||||
D.head.screen_loc = null
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = ui_rhand
|
||||
D.client.screen += D.r_hand
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = ui_lhand
|
||||
D.client.screen += D.l_hand
|
||||
else
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = null
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = null
|
||||
|
||||
/mob/living/simple_animal/drone/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/drone(src, ui_style2icon(client.prefs.UI_style))
|
||||
..()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
else if(!severity || severity == screen.severity)
|
||||
return null
|
||||
else
|
||||
screen = PoolOrNew(type)
|
||||
screen = new type()
|
||||
|
||||
screen.icon_state = "[initial(screen.icon_state)][severity]"
|
||||
screen.severity = severity
|
||||
@@ -30,17 +30,18 @@
|
||||
screens -= category
|
||||
|
||||
if(animated)
|
||||
spawn(0)
|
||||
animate(screen, alpha = 0, time = animated)
|
||||
sleep(animated)
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
animate(screen, alpha = 0, time = animated)
|
||||
addtimer(CALLBACK(src, .proc/clear_fullscreen_after_animate, screen), animated, TIMER_CLIENT_TIME)
|
||||
else
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
|
||||
/mob/proc/clear_fullscreen_after_animate(obj/screen/fullscreen/screen)
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
|
||||
/mob/proc/clear_fullscreens()
|
||||
for(var/category in screens)
|
||||
clear_fullscreen(category)
|
||||
@@ -60,29 +61,33 @@
|
||||
icon_state = "default"
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
layer = FULLSCREEN_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
mouse_opacity = 0
|
||||
var/severity = 0
|
||||
|
||||
/obj/screen/fullscreen/Destroy()
|
||||
..()
|
||||
severity = 0
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
. = ..()
|
||||
|
||||
/obj/screen/fullscreen/brute
|
||||
icon_state = "brutedamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/oxy
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/crit
|
||||
icon_state = "passage"
|
||||
layer = CRIT_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/blind
|
||||
icon_state = "blackimageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/impaired
|
||||
icon_state = "impairedoverlay"
|
||||
@@ -97,7 +102,7 @@
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
|
||||
/obj/screen/fullscreen/flash/noise
|
||||
/obj/screen/fullscreen/flash/static
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "noise"
|
||||
@@ -106,3 +111,18 @@
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "druggy"
|
||||
|
||||
/obj/screen/fullscreen/color_vision
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
alpha = 80
|
||||
|
||||
/obj/screen/fullscreen/color_vision/green
|
||||
color = "#00ff00"
|
||||
|
||||
/obj/screen/fullscreen/color_vision/red
|
||||
color = "#ff0000"
|
||||
|
||||
/obj/screen/fullscreen/color_vision/blue
|
||||
color = "#0000ff"
|
||||
@@ -2,39 +2,54 @@
|
||||
/datum/hud/dextrous/New(mob/living/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drone_drop
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_drone_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
build_hand_slots(ui_style)
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
static_inventory += using
|
||||
|
||||
if(mymob.possible_a_intents)
|
||||
if(mymob.possible_a_intents.len == 4)
|
||||
// All possible intents - full intent selector
|
||||
action_intent = new /obj/screen/act_intent/segmented
|
||||
else
|
||||
action_intent = new /obj/screen/act_intent
|
||||
action_intent.icon = ui_style
|
||||
action_intent.icon_state = mymob.a_intent
|
||||
static_inventory += action_intent
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
using = new /obj/screen/craft
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/area_creator
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
mymob.client.screen = list()
|
||||
@@ -45,19 +60,24 @@
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/dextrous/persistant_inventory_update()
|
||||
/datum/hud/dextrous/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/D = mymob
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = ui_rhand
|
||||
D.client.screen += D.r_hand
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = ui_lhand
|
||||
D.client.screen += D.l_hand
|
||||
for(var/obj/item/I in D.held_items)
|
||||
I.screen_loc = ui_hand_position(D.get_held_index_of_item(I))
|
||||
D.client.screen += I
|
||||
else
|
||||
if(D.r_hand)
|
||||
D.r_hand.screen_loc = null
|
||||
if(D.l_hand)
|
||||
D.l_hand.screen_loc = null
|
||||
for(var/obj/item/I in D.held_items)
|
||||
I.screen_loc = null
|
||||
D.client.screen -= I
|
||||
|
||||
|
||||
//Dextrous simple mobs can use hands!
|
||||
/mob/living/simple_animal/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
if(dextrous)
|
||||
hud_used = new dextrous_hud_type(src, ui_style2icon(client.prefs.UI_style))
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -36,7 +36,15 @@
|
||||
var/mob/dead/observer/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/datum/hud/ghost/New(mob/owner)
|
||||
/obj/screen/ghost/pai
|
||||
name = "pAI Candidate"
|
||||
icon_state = "pai"
|
||||
|
||||
/obj/screen/ghost/pai/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.register_pai()
|
||||
|
||||
/datum/hud/ghost/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/mob/dead/observer/G = mymob
|
||||
if(!G.client.prefs.ghost_hud)
|
||||
@@ -61,15 +69,19 @@
|
||||
using.screen_loc = ui_ghost_teleport
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/pai()
|
||||
using.screen_loc = ui_ghost_pai
|
||||
static_inventory += using
|
||||
|
||||
|
||||
/datum/hud/ghost/show_hud()
|
||||
var/mob/dead/observer/G = mymob
|
||||
mymob.client.screen = list()
|
||||
if(!G.client.prefs.ghost_hud)
|
||||
return
|
||||
mymob.client.screen += static_inventory
|
||||
update_parallax_existence()
|
||||
create_parallax()
|
||||
if(G.client.prefs.ghost_hud)
|
||||
mymob.client.screen += static_inventory
|
||||
|
||||
|
||||
/mob/dead/observer/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/ghost(src)
|
||||
hud_used = new /datum/hud/ghost(src, ui_style2icon(client.prefs.UI_style))
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
infodisplay += healths
|
||||
|
||||
using = new /obj/screen/guardian/Manifest()
|
||||
using.screen_loc = ui_rhand
|
||||
using.screen_loc = ui_hand_position(2)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/Recall()
|
||||
using.screen_loc = ui_lhand
|
||||
using.screen_loc = ui_hand_position(1)
|
||||
static_inventory += using
|
||||
|
||||
using = new owner.toggle_button_type()
|
||||
@@ -29,8 +29,69 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/guardian(src)
|
||||
if(dextrous)
|
||||
..()
|
||||
else
|
||||
hud_used = new /datum/hud/guardian(src, ui_style2icon(client.prefs.UI_style))
|
||||
|
||||
/datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner, ui_style = 'icons/mob/screen_midnight.dmi') //for a dextrous guardian
|
||||
..()
|
||||
var/obj/screen/using
|
||||
if(istype(owner, /mob/living/simple_animal/hostile/guardian/dextrous))
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "internal storage"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "suit_storage"
|
||||
inv_box.screen_loc = ui_id
|
||||
inv_box.slot_id = slot_generic_dextrous_storage
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/guardian/Communicate()
|
||||
using.screen_loc = ui_sstore1
|
||||
static_inventory += using
|
||||
|
||||
else
|
||||
|
||||
using = new /obj/screen/guardian/Communicate()
|
||||
using.screen_loc = ui_id
|
||||
static_inventory += using
|
||||
|
||||
healths = new /obj/screen/healths/guardian()
|
||||
infodisplay += healths
|
||||
|
||||
using = new /obj/screen/guardian/Manifest()
|
||||
using.screen_loc = ui_belt
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/Recall()
|
||||
using.screen_loc = ui_back
|
||||
static_inventory += using
|
||||
|
||||
using = new owner.toggle_button_type()
|
||||
using.screen_loc = ui_storage2
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/guardian/ToggleLight()
|
||||
using.screen_loc = ui_inventory
|
||||
static_inventory += using
|
||||
|
||||
/datum/hud/dextrous/guardian/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
if(istype(mymob, /mob/living/simple_animal/hostile/guardian/dextrous))
|
||||
var/mob/living/simple_animal/hostile/guardian/dextrous/D = mymob
|
||||
|
||||
if(hud_shown)
|
||||
if(D.internal_storage)
|
||||
D.internal_storage.screen_loc = ui_id
|
||||
D.client.screen += D.internal_storage
|
||||
else
|
||||
if(D.internal_storage)
|
||||
D.internal_storage.screen_loc = null
|
||||
|
||||
..()
|
||||
|
||||
/obj/screen/guardian
|
||||
icon = 'icons/mob/guardian.dmi'
|
||||
|
||||
+101
-29
@@ -9,7 +9,7 @@
|
||||
|
||||
var/hud_shown = 1 //Used for the HUD toggle (F12)
|
||||
var/hud_version = 1 //Current displayed version of the HUD
|
||||
var/inventory_shown = 1 //the inventory
|
||||
var/inventory_shown = 0 //Equipped item inventory
|
||||
var/show_intent_icons = 0
|
||||
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
var/obj/screen/blobpwrdisplay
|
||||
|
||||
var/obj/screen/alien_plasma_display
|
||||
var/obj/screen/alien_queen_finder
|
||||
|
||||
var/obj/screen/devil/soul_counter/devilsouldisplay
|
||||
|
||||
@@ -32,12 +33,16 @@
|
||||
var/obj/screen/throw_icon
|
||||
var/obj/screen/module_store_icon
|
||||
|
||||
var/list/wheels = list() //list of the wheel screen objects
|
||||
|
||||
var/list/static_inventory = list() //the screen objects which are static
|
||||
var/list/toggleable_inventory = list() //the screen objects which can be hidden
|
||||
var/list/obj/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
|
||||
var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...)
|
||||
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
|
||||
var/list/inv_slots[slots_amt] // /obj/screen/inventory objects, ordered by their slot ID.
|
||||
var/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object
|
||||
var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
|
||||
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
@@ -46,10 +51,21 @@
|
||||
var/obj/screen/healthdoll
|
||||
var/obj/screen/internals
|
||||
|
||||
/datum/hud/New(mob/owner)
|
||||
var/ui_style_icon = 'icons/mob/screen_midnight.dmi'
|
||||
|
||||
/datum/hud/New(mob/owner , ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
mymob = owner
|
||||
|
||||
ui_style_icon = ui_style
|
||||
|
||||
hide_actions_toggle = new
|
||||
hide_actions_toggle.InitialiseIcon(mymob)
|
||||
hide_actions_toggle.InitialiseIcon(src)
|
||||
|
||||
hand_slots = list()
|
||||
|
||||
for(var/mytype in subtypesof(/obj/screen/plane_master))
|
||||
var/obj/screen/plane_master/instance = new mytype()
|
||||
plane_masters["[instance.plane]"] = instance
|
||||
|
||||
/datum/hud/Destroy()
|
||||
if(mymob.hud_used == src)
|
||||
@@ -61,6 +77,8 @@
|
||||
qdel(module_store_icon)
|
||||
module_store_icon = null
|
||||
|
||||
wheels = null //all wheels are also in static_inventory
|
||||
|
||||
if(static_inventory.len)
|
||||
for(var/thing in static_inventory)
|
||||
qdel(thing)
|
||||
@@ -96,10 +114,16 @@
|
||||
lingstingdisplay = null
|
||||
blobpwrdisplay = null
|
||||
alien_plasma_display = null
|
||||
alien_queen_finder = null
|
||||
deity_power_display = null
|
||||
deity_follower_display = null
|
||||
nightvisionicon = null
|
||||
|
||||
if(plane_masters.len)
|
||||
for(var/thing in plane_masters)
|
||||
qdel(plane_masters[thing])
|
||||
plane_masters.Cut()
|
||||
|
||||
if(screenoverlays.len)
|
||||
for(var/thing in screenoverlays)
|
||||
qdel(thing)
|
||||
@@ -112,13 +136,15 @@
|
||||
hud_used = new /datum/hud(src)
|
||||
|
||||
//Version denotes which style should be displayed. blank or 0 means "next version"
|
||||
/datum/hud/proc/show_hud(version = 0)
|
||||
/datum/hud/proc/show_hud(version = 0,mob/viewmob)
|
||||
if(!ismob(mymob))
|
||||
return 0
|
||||
if(!mymob.client)
|
||||
return 0
|
||||
|
||||
mymob.client.screen = list()
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
|
||||
screenmob.client.screen = list()
|
||||
|
||||
var/display_hud_version = version
|
||||
if(!display_hud_version) //If 0 or blank, display the next hud version
|
||||
@@ -130,13 +156,13 @@
|
||||
if(HUD_STYLE_STANDARD) //Default HUD
|
||||
hud_shown = 1 //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
mymob.client.screen += static_inventory
|
||||
if(toggleable_inventory.len && inventory_shown)
|
||||
mymob.client.screen += toggleable_inventory
|
||||
screenmob.client.screen += static_inventory
|
||||
if(toggleable_inventory.len && screenmob.hud_used && screenmob.hud_used.inventory_shown)
|
||||
screenmob.client.screen += toggleable_inventory
|
||||
if(hotkeybuttons.len && !hotkey_ui_hidden)
|
||||
mymob.client.screen += hotkeybuttons
|
||||
screenmob.client.screen += hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
mymob.client.screen += infodisplay
|
||||
screenmob.client.screen += infodisplay
|
||||
|
||||
mymob.client.screen += hide_actions_toggle
|
||||
|
||||
@@ -146,45 +172,48 @@
|
||||
if(HUD_STYLE_REDUCED) //Reduced HUD
|
||||
hud_shown = 0 //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
mymob.client.screen -= static_inventory
|
||||
screenmob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
mymob.client.screen -= toggleable_inventory
|
||||
screenmob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
mymob.client.screen -= hotkeybuttons
|
||||
screenmob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
mymob.client.screen += infodisplay
|
||||
screenmob.client.screen += infodisplay
|
||||
|
||||
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
|
||||
if(inv_slots[slot_l_hand])
|
||||
mymob.client.screen += inv_slots[slot_l_hand] //we want the hands to be visible
|
||||
if(inv_slots[slot_r_hand])
|
||||
mymob.client.screen += inv_slots[slot_r_hand] //we want the hands to be visible
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/hand = hand_slots[h]
|
||||
if(hand)
|
||||
screenmob.client.screen += hand
|
||||
if(action_intent)
|
||||
mymob.client.screen += action_intent //we want the intent switcher visible
|
||||
screenmob.client.screen += action_intent //we want the intent switcher visible
|
||||
action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
||||
|
||||
if(HUD_STYLE_NOHUD) //No HUD
|
||||
hud_shown = 0 //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
mymob.client.screen -= static_inventory
|
||||
screenmob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
mymob.client.screen -= toggleable_inventory
|
||||
screenmob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
mymob.client.screen -= hotkeybuttons
|
||||
screenmob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
mymob.client.screen -= infodisplay
|
||||
screenmob.client.screen -= infodisplay
|
||||
|
||||
if(plane_masters.len)
|
||||
for(var/thing in plane_masters)
|
||||
screenmob.client.screen += plane_masters[thing]
|
||||
hud_version = display_hud_version
|
||||
persistant_inventory_update()
|
||||
persistent_inventory_update(screenmob)
|
||||
mymob.update_action_buttons(1)
|
||||
reorganize_alerts()
|
||||
mymob.reload_fullscreen()
|
||||
update_parallax_existence()
|
||||
create_parallax()
|
||||
|
||||
|
||||
/datum/hud/human/show_hud(version = 0)
|
||||
/datum/hud/human/show_hud(version = 0,mob/viewmob)
|
||||
..()
|
||||
hidden_inventory_update()
|
||||
hidden_inventory_update(viewmob)
|
||||
|
||||
/datum/hud/robot/show_hud(version = 0)
|
||||
..()
|
||||
@@ -193,8 +222,19 @@
|
||||
/datum/hud/proc/hidden_inventory_update()
|
||||
return
|
||||
|
||||
/datum/hud/proc/persistant_inventory_update()
|
||||
return
|
||||
/datum/hud/proc/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/L = mymob
|
||||
|
||||
var/mob/screenmob = viewer || L
|
||||
|
||||
for(var/X in wheels)
|
||||
var/obj/screen/wheel/W = X
|
||||
if(W.toggled)
|
||||
screenmob.client.screen |= W.buttons_list
|
||||
else
|
||||
screenmob.client.screen -= W.buttons_list
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
@@ -206,3 +246,35 @@
|
||||
usr << "<span class ='info'>Switched HUD mode. Press F12 to toggle.</span>"
|
||||
else
|
||||
usr << "<span class ='warning'>This mob type does not use a HUD.</span>"
|
||||
|
||||
|
||||
//(re)builds the hand ui slots, throwing away old ones
|
||||
//not really worth jugglying existing ones so we just scrap+rebuild
|
||||
//9/10 this is only called once per mob and only for 2 hands
|
||||
/datum/hud/proc/build_hand_slots(ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/inventory/hand/H = hand_slots[h]
|
||||
if(H)
|
||||
static_inventory -= H
|
||||
hand_slots = list()
|
||||
var/obj/screen/inventory/hand/hand_box
|
||||
for(var/i in 1 to mymob.held_items.len)
|
||||
hand_box = new /obj/screen/inventory/hand()
|
||||
hand_box.name = mymob.get_held_index_name(i)
|
||||
hand_box.icon = ui_style
|
||||
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
|
||||
hand_box.screen_loc = ui_hand_position(i)
|
||||
hand_box.held_index = i
|
||||
hand_slots["[i]"] = hand_box
|
||||
hand_box.hud = src
|
||||
static_inventory += hand_box
|
||||
hand_box.update_icon()
|
||||
|
||||
var/i = 1
|
||||
for(var/obj/screen/swap_hand/SH in static_inventory)
|
||||
SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1)
|
||||
i++
|
||||
for(var/obj/screen/human/equip/E in static_inventory)
|
||||
E.screen_loc = ui_equip_position(mymob)
|
||||
if(mymob.hud_used)
|
||||
show_hud(HUD_STYLE_STANDARD,mymob)
|
||||
+115
-94
@@ -6,14 +6,22 @@
|
||||
icon_state = "toggle"
|
||||
|
||||
/obj/screen/human/toggle/Click()
|
||||
if(usr.hud_used.inventory_shown)
|
||||
|
||||
var/mob/targetmob = usr
|
||||
|
||||
if(isobserver(usr))
|
||||
if(ishuman(usr.client.eye) && (usr.client.eye != usr))
|
||||
var/mob/M = usr.client.eye
|
||||
targetmob = M
|
||||
|
||||
if(usr.hud_used.inventory_shown && targetmob.hud_used)
|
||||
usr.hud_used.inventory_shown = 0
|
||||
usr.client.screen -= usr.hud_used.toggleable_inventory
|
||||
usr.client.screen -= targetmob.hud_used.toggleable_inventory
|
||||
else
|
||||
usr.hud_used.inventory_shown = 1
|
||||
usr.client.screen += usr.hud_used.toggleable_inventory
|
||||
usr.client.screen += targetmob.hud_used.toggleable_inventory
|
||||
|
||||
usr.hud_used.hidden_inventory_update()
|
||||
targetmob.hud_used.hidden_inventory_update(usr)
|
||||
|
||||
/obj/screen/human/equip
|
||||
name = "equip"
|
||||
@@ -62,6 +70,8 @@
|
||||
screen_loc = ui_lingstingdisplay
|
||||
|
||||
/obj/screen/ling/sting/Click()
|
||||
if(isobserver(usr))
|
||||
return
|
||||
var/mob/living/carbon/U = usr
|
||||
U.unset_sting()
|
||||
|
||||
@@ -77,22 +87,29 @@
|
||||
|
||||
/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/inventory/craft
|
||||
using = new /obj/screen/craft
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/act_intent()
|
||||
using.icon_state = mymob.a_intent
|
||||
static_inventory += using
|
||||
action_intent = using
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/area_creator
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
action_intent = new /obj/screen/act_intent/segmented
|
||||
action_intent.icon_state = mymob.a_intent
|
||||
static_inventory += action_intent
|
||||
|
||||
using = new /obj/screen/mov_intent
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
@@ -119,32 +136,18 @@
|
||||
inv_box.screen_loc = ui_oclothing
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
build_hand_slots(ui_style)
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -165,6 +168,15 @@
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "neck"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "neck"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_neck
|
||||
inv_box.slot_id = slot_neck
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "back"
|
||||
inv_box.icon = ui_style
|
||||
@@ -213,7 +225,7 @@
|
||||
|
||||
using = new /obj/screen/human/equip()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_equip
|
||||
using.screen_loc = ui_equip_position(mymob)
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -304,102 +316,111 @@
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
inventory_shown = 0
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/human/hidden_inventory_update()
|
||||
/datum/hud/human/hidden_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/human/H = mymob
|
||||
if(inventory_shown && hud_shown)
|
||||
|
||||
var/mob/screenmob = viewer || H
|
||||
|
||||
if(screenmob.hud_used.inventory_shown && screenmob.hud_used.hud_shown)
|
||||
if(H.shoes)
|
||||
H.shoes.screen_loc = ui_shoes
|
||||
H.client.screen += H.shoes
|
||||
screenmob.client.screen += H.shoes
|
||||
if(H.gloves)
|
||||
H.gloves.screen_loc = ui_gloves
|
||||
H.client.screen += H.gloves
|
||||
screenmob.client.screen += H.gloves
|
||||
if(H.ears)
|
||||
H.ears.screen_loc = ui_ears
|
||||
H.client.screen += H.ears
|
||||
screenmob.client.screen += H.ears
|
||||
if(H.glasses)
|
||||
H.glasses.screen_loc = ui_glasses
|
||||
H.client.screen += H.glasses
|
||||
screenmob.client.screen += H.glasses
|
||||
if(H.w_uniform)
|
||||
H.w_uniform.screen_loc = ui_iclothing
|
||||
H.client.screen += H.w_uniform
|
||||
screenmob.client.screen += H.w_uniform
|
||||
if(H.wear_suit)
|
||||
H.wear_suit.screen_loc = ui_oclothing
|
||||
H.client.screen += H.wear_suit
|
||||
screenmob.client.screen += H.wear_suit
|
||||
if(H.wear_mask)
|
||||
H.wear_mask.screen_loc = ui_mask
|
||||
H.client.screen += H.wear_mask
|
||||
screenmob.client.screen += H.wear_mask
|
||||
if(H.wear_neck)
|
||||
H.wear_neck.screen_loc = ui_neck
|
||||
screenmob.client.screen += H.wear_neck
|
||||
if(H.head)
|
||||
H.head.screen_loc = ui_head
|
||||
H.client.screen += H.head
|
||||
screenmob.client.screen += H.head
|
||||
else
|
||||
if(H.shoes) H.shoes.screen_loc = null
|
||||
if(H.gloves) H.gloves.screen_loc = null
|
||||
if(H.ears) H.ears.screen_loc = null
|
||||
if(H.glasses) H.glasses.screen_loc = null
|
||||
if(H.w_uniform) H.w_uniform.screen_loc = null
|
||||
if(H.wear_suit) H.wear_suit.screen_loc = null
|
||||
if(H.wear_mask) H.wear_mask.screen_loc = null
|
||||
if(H.head) H.head.screen_loc = null
|
||||
if(H.shoes) screenmob.client.screen -= H.shoes
|
||||
if(H.gloves) screenmob.client.screen -= H.gloves
|
||||
if(H.ears) screenmob.client.screen -= H.ears
|
||||
if(H.glasses) screenmob.client.screen -= H.glasses
|
||||
if(H.w_uniform) screenmob.client.screen -= H.w_uniform
|
||||
if(H.wear_suit) screenmob.client.screen -= H.wear_suit
|
||||
if(H.wear_mask) screenmob.client.screen -= H.wear_mask
|
||||
if(H.wear_neck) screenmob.client.screen -= H.wear_neck
|
||||
if(H.head) screenmob.client.screen -= H.head
|
||||
|
||||
/datum/hud/human/persistant_inventory_update()
|
||||
|
||||
|
||||
/datum/hud/human/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
..()
|
||||
var/mob/living/carbon/human/H = mymob
|
||||
if(hud_shown)
|
||||
if(H.s_store)
|
||||
H.s_store.screen_loc = ui_sstore1
|
||||
H.client.screen += H.s_store
|
||||
if(H.wear_id)
|
||||
H.wear_id.screen_loc = ui_id
|
||||
H.client.screen += H.wear_id
|
||||
if(H.belt)
|
||||
H.belt.screen_loc = ui_belt
|
||||
H.client.screen += H.belt
|
||||
if(H.back)
|
||||
H.back.screen_loc = ui_back
|
||||
H.client.screen += H.back
|
||||
if(H.l_store)
|
||||
H.l_store.screen_loc = ui_storage1
|
||||
H.client.screen += H.l_store
|
||||
if(H.r_store)
|
||||
H.r_store.screen_loc = ui_storage2
|
||||
H.client.screen += H.r_store
|
||||
else
|
||||
if(H.s_store)
|
||||
H.s_store.screen_loc = null
|
||||
if(H.wear_id)
|
||||
H.wear_id.screen_loc = null
|
||||
if(H.belt)
|
||||
H.belt.screen_loc = null
|
||||
if(H.back)
|
||||
H.back.screen_loc = null
|
||||
if(H.l_store)
|
||||
H.l_store.screen_loc = null
|
||||
if(H.r_store)
|
||||
H.r_store.screen_loc = null
|
||||
|
||||
var/mob/screenmob = viewer || H
|
||||
|
||||
if(screenmob.hud_used)
|
||||
if(screenmob.hud_used.hud_shown)
|
||||
if(H.s_store)
|
||||
H.s_store.screen_loc = ui_sstore1
|
||||
screenmob.client.screen += H.s_store
|
||||
if(H.wear_id)
|
||||
H.wear_id.screen_loc = ui_id
|
||||
screenmob.client.screen += H.wear_id
|
||||
if(H.belt)
|
||||
H.belt.screen_loc = ui_belt
|
||||
screenmob.client.screen += H.belt
|
||||
if(H.back)
|
||||
H.back.screen_loc = ui_back
|
||||
screenmob.client.screen += H.back
|
||||
if(H.l_store)
|
||||
H.l_store.screen_loc = ui_storage1
|
||||
screenmob.client.screen += H.l_store
|
||||
if(H.r_store)
|
||||
H.r_store.screen_loc = ui_storage2
|
||||
screenmob.client.screen += H.r_store
|
||||
else
|
||||
if(H.s_store)
|
||||
screenmob.client.screen -= H.s_store
|
||||
if(H.wear_id)
|
||||
screenmob.client.screen -= H.wear_id
|
||||
if(H.belt)
|
||||
screenmob.client.screen -= H.belt
|
||||
if(H.back)
|
||||
screenmob.client.screen -= H.back
|
||||
if(H.l_store)
|
||||
screenmob.client.screen -= H.l_store
|
||||
if(H.r_store)
|
||||
screenmob.client.screen -= H.r_store
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(H.r_hand)
|
||||
H.r_hand.screen_loc = ui_rhand
|
||||
H.client.screen += H.r_hand
|
||||
if(H.l_hand)
|
||||
H.l_hand.screen_loc = ui_lhand
|
||||
H.client.screen += H.l_hand
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.screen_loc = ui_hand_position(H.get_held_index_of_item(I))
|
||||
screenmob.client.screen += I
|
||||
else
|
||||
if(H.r_hand)
|
||||
H.r_hand.screen_loc = null
|
||||
if(H.l_hand)
|
||||
H.l_hand.screen_loc = null
|
||||
for(var/obj/item/I in H.held_items)
|
||||
I.screen_loc = null
|
||||
screenmob.client.screen -= I
|
||||
|
||||
|
||||
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
|
||||
set category = "OOC"
|
||||
|
||||
+33
-35
@@ -3,50 +3,40 @@
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new /obj/screen/act_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = mymob.a_intent
|
||||
using.screen_loc = ui_acti
|
||||
static_inventory += using
|
||||
action_intent = using
|
||||
action_intent = new /obj/screen/act_intent()
|
||||
action_intent.icon = ui_style
|
||||
action_intent.icon_state = mymob.a_intent
|
||||
action_intent.screen_loc = ui_acti
|
||||
static_inventory += action_intent
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.icon = ui_style
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "right hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_r"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.name = "left hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "hand_l"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
static_inventory += inv_box
|
||||
build_hand_slots(ui_style)
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m" //extra wide!
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -58,6 +48,15 @@
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "neck"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "neck"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_neck
|
||||
inv_box.slot_id = slot_neck
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = ui_style
|
||||
@@ -118,7 +117,7 @@
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/monkey/persistant_inventory_update()
|
||||
/datum/hud/monkey/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/monkey/M = mymob
|
||||
@@ -130,6 +129,9 @@
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = ui_monkey_mask
|
||||
M.client.screen += M.wear_mask
|
||||
if(M.wear_neck)
|
||||
M.wear_neck.screen_loc = ui_monkey_neck
|
||||
M.client.screen += M.wear_neck
|
||||
if(M.head)
|
||||
M.head.screen_loc = ui_monkey_head
|
||||
M.client.screen += M.head
|
||||
@@ -142,17 +144,13 @@
|
||||
M.head.screen_loc = null
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
if(M.r_hand)
|
||||
M.r_hand.screen_loc = ui_rhand
|
||||
M.client.screen += M.r_hand
|
||||
if(M.l_hand)
|
||||
M.l_hand.screen_loc = ui_lhand
|
||||
M.client.screen += M.l_hand
|
||||
for(var/obj/item/I in M.held_items)
|
||||
I.screen_loc = ui_hand_position(M.get_held_index_of_item(I))
|
||||
M.client.screen += I
|
||||
else
|
||||
if(M.r_hand)
|
||||
M.r_hand.screen_loc = null
|
||||
if(M.l_hand)
|
||||
M.l_hand.screen_loc = null
|
||||
for(var/obj/item/I in M.held_items)
|
||||
I.screen_loc = null
|
||||
M.client.screen -= I
|
||||
|
||||
/mob/living/carbon/monkey/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
|
||||
@@ -7,35 +7,7 @@
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
/mob/living/carbon/brain/create_mob_hud()
|
||||
/mob/living/brain/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/brain(src)
|
||||
|
||||
/datum/hud/hog_god/New(mob/owner)
|
||||
..()
|
||||
healths = new /obj/screen/healths/deity()
|
||||
infodisplay += healths
|
||||
|
||||
deity_power_display = new /obj/screen/deity_power_display()
|
||||
infodisplay += deity_power_display
|
||||
|
||||
deity_follower_display = new /obj/screen/deity_follower_display()
|
||||
infodisplay += deity_follower_display
|
||||
|
||||
|
||||
/mob/camera/god/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/hog_god(src)
|
||||
|
||||
/obj/screen/deity_power_display
|
||||
name = "Faith"
|
||||
icon_state = "deity_power"
|
||||
screen_loc = ui_deitypower
|
||||
layer = HUD_LAYER
|
||||
|
||||
/obj/screen/deity_follower_display
|
||||
name = "Followers"
|
||||
icon_state = "deity_followers"
|
||||
screen_loc = ui_deityfollowers
|
||||
layer = HUD_LAYER
|
||||
|
||||
|
||||
+235
-220
@@ -1,254 +1,269 @@
|
||||
/*
|
||||
* This file handles all parallax-related business once the parallax itself is initialized with the rest of the HUD
|
||||
*/
|
||||
#define PARALLAX_IMAGE_WIDTH 15
|
||||
#define PARALLAX_IMAGE_TILES (PARALLAX_IMAGE_WIDTH**2)
|
||||
|
||||
var/list/parallax_on_clients = list()
|
||||
/client
|
||||
var/list/parallax_layers
|
||||
var/list/parallax_layers_cached
|
||||
var/static/list/parallax_static_layers_tail = newlist(/obj/screen/parallax_pmaster, /obj/screen/parallax_space_whitifier)
|
||||
var/atom/movable/movingmob
|
||||
var/turf/previous_turf
|
||||
var/dont_animate_parallax //world.time of when we can state animate()ing parallax again
|
||||
var/last_parallax_shift //world.time of last update
|
||||
var/parallax_throttle = 0 //ds between updates
|
||||
var/parallax_movedir = 0
|
||||
var/parallax_layers_max = 3
|
||||
var/parallax_animate_timer
|
||||
|
||||
/obj/screen/parallax
|
||||
var/base_offset_x = 0
|
||||
var/base_offset_y = 0
|
||||
mouse_opacity = 0
|
||||
icon = 'icons/turf/space.dmi'
|
||||
icon_state = "blank"
|
||||
name = "space parallax"
|
||||
screen_loc = "CENTER,CENTER"
|
||||
blend_mode = BLEND_ADD
|
||||
layer = AREA_LAYER
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
var/parallax_speed = 0
|
||||
|
||||
/obj/screen/plane_master
|
||||
appearance_flags = PLANE_MASTER
|
||||
screen_loc = "CENTER,CENTER"
|
||||
|
||||
/obj/screen/plane_master/parallax_master
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
color = list(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,0,
|
||||
0,0,0,1)
|
||||
|
||||
/obj/screen/plane_master/parallax_spacemaster //Turns space white, causing the parallax to only show in areas with opacity. Somehow
|
||||
plane = PLANE_SPACE_BACKGROUND
|
||||
color = list(
|
||||
0,0,0,0,
|
||||
0,0,0,0,
|
||||
0,0,0,0,
|
||||
1,1,1,1,
|
||||
0,0,0,0)
|
||||
|
||||
/obj/screen/plane_master/parallax_spacemaster/New()
|
||||
..()
|
||||
overlays += image(icon = 'icons/mob/screen1.dmi', icon_state = "blank")
|
||||
|
||||
/obj/screen/plane_master/parallax_dustmaster
|
||||
plane = PLANE_SPACE_DUST
|
||||
color = list(0,0,0,0)
|
||||
|
||||
/datum/hud/proc/update_parallax_existence()
|
||||
if(!parallax_initialized)
|
||||
return
|
||||
initialize_parallax()
|
||||
update_parallax()
|
||||
update_parallax_values()
|
||||
|
||||
/datum/hud/proc/initialize_parallax()
|
||||
/datum/hud/proc/create_parallax()
|
||||
var/client/C = mymob.client
|
||||
if (!apply_parallax_pref())
|
||||
return
|
||||
|
||||
if(!C.parallax_master)
|
||||
C.parallax_master = PoolOrNew(/obj/screen/plane_master/parallax_master)
|
||||
if(!C.parallax_spacemaster)
|
||||
C.parallax_spacemaster = PoolOrNew(/obj/screen/plane_master/parallax_spacemaster)
|
||||
if(!C.parallax_dustmaster)
|
||||
C.parallax_dustmaster = PoolOrNew(/obj/screen/plane_master/parallax_dustmaster)
|
||||
if(!length(C.parallax_layers_cached))
|
||||
C.parallax_layers_cached = list()
|
||||
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view)
|
||||
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view)
|
||||
|
||||
if(!C.parallax.len)
|
||||
for(var/obj/screen/parallax/bgobj in parallax_icon)
|
||||
var/obj/screen/parallax/parallax_layer = PoolOrNew(/obj/screen/parallax)
|
||||
parallax_layer.appearance = bgobj.appearance
|
||||
parallax_layer.base_offset_x = bgobj.base_offset_x
|
||||
parallax_layer.base_offset_y = bgobj.base_offset_y
|
||||
parallax_layer.parallax_speed = bgobj.parallax_speed
|
||||
parallax_layer.screen_loc = bgobj.screen_loc
|
||||
C.parallax += parallax_layer
|
||||
if(bgobj.parallax_speed)
|
||||
C.parallax_movable += parallax_layer
|
||||
C.parallax_layers = C.parallax_layers_cached.Copy()
|
||||
|
||||
if(!C.parallax_offset.len)
|
||||
C.parallax_offset["horizontal"] = 0
|
||||
C.parallax_offset["vertical"] = 0
|
||||
if (length(C.parallax_layers) > C.parallax_layers_max)
|
||||
C.parallax_layers.len = C.parallax_layers_max
|
||||
|
||||
C.screen |= C.parallax_dustmaster
|
||||
C.screen |= (C.parallax_layers + C.parallax_static_layers_tail)
|
||||
|
||||
/datum/hud/proc/remove_parallax()
|
||||
var/client/C = mymob.client
|
||||
C.screen -= (C.parallax_layers_cached + C.parallax_static_layers_tail)
|
||||
C.parallax_layers = null
|
||||
|
||||
/datum/hud/proc/apply_parallax_pref()
|
||||
var/client/C = mymob.client
|
||||
switch(C.prefs.parallax)
|
||||
if (PARALLAX_INSANE)
|
||||
C.parallax_throttle = FALSE
|
||||
C.parallax_layers_max = 4
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_MED)
|
||||
C.parallax_throttle = PARALLAX_DELAY_MED
|
||||
C.parallax_layers_max = 2
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_LOW)
|
||||
C.parallax_throttle = PARALLAX_DELAY_LOW
|
||||
C.parallax_layers_max = 1
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_DISABLE)
|
||||
return FALSE
|
||||
|
||||
else
|
||||
C.parallax_throttle = PARALLAX_DELAY_DEFAULT
|
||||
C.parallax_layers_max = 3
|
||||
return TRUE
|
||||
|
||||
/datum/hud/proc/update_parallax_pref()
|
||||
remove_parallax()
|
||||
create_parallax()
|
||||
|
||||
// This sets which way the current shuttle is moving (returns true if the shuttle has stopped moving so the caller can append their animation)
|
||||
/datum/hud/proc/set_parallax_movedir(new_parallax_movedir)
|
||||
. = FALSE
|
||||
var/client/C = mymob.client
|
||||
if(new_parallax_movedir == C.parallax_movedir)
|
||||
return
|
||||
var/animatedir = new_parallax_movedir
|
||||
if(new_parallax_movedir == FALSE)
|
||||
var/animate_time = 0
|
||||
for(var/thing in C.parallax_layers)
|
||||
var/obj/screen/parallax_layer/L = thing
|
||||
L.icon_state = initial(L.icon_state)
|
||||
L.update_o(C.view)
|
||||
var/T = PARALLAX_LOOP_TIME / L.speed
|
||||
if (T > animate_time)
|
||||
animate_time = T
|
||||
C.dont_animate_parallax = world.time + min(animate_time, PARALLAX_LOOP_TIME)
|
||||
animatedir = C.parallax_movedir
|
||||
|
||||
var/matrix/newtransform
|
||||
switch(animatedir)
|
||||
if(NORTH)
|
||||
newtransform = matrix(1, 0, 0, 0, 1, 480)
|
||||
if(SOUTH)
|
||||
newtransform = matrix(1, 0, 0, 0, 1,-480)
|
||||
if(EAST)
|
||||
newtransform = matrix(1, 0, 480, 0, 1, 0)
|
||||
if(WEST)
|
||||
newtransform = matrix(1, 0,-480, 0, 1, 0)
|
||||
|
||||
var/shortesttimer
|
||||
for(var/thing in C.parallax_layers)
|
||||
var/obj/screen/parallax_layer/L = thing
|
||||
|
||||
var/T = PARALLAX_LOOP_TIME / L.speed
|
||||
if (isnull(shortesttimer))
|
||||
shortesttimer = T
|
||||
if (T < shortesttimer)
|
||||
shortesttimer = T
|
||||
L.transform = newtransform
|
||||
animate(L, transform = matrix(), time = T, easing = QUAD_EASING | (new_parallax_movedir ? EASE_IN : EASE_OUT), flags = ANIMATION_END_NOW)
|
||||
if (new_parallax_movedir)
|
||||
L.transform = newtransform
|
||||
animate(transform = matrix(), time = T) //queue up another animate so lag doesn't create a shutter
|
||||
|
||||
C.parallax_movedir = new_parallax_movedir
|
||||
if (C.parallax_animate_timer)
|
||||
deltimer(C.parallax_animate_timer)
|
||||
C.parallax_animate_timer = addtimer(CALLBACK(src, .proc/update_parallax_motionblur, C, animatedir, new_parallax_movedir, newtransform), min(shortesttimer, PARALLAX_LOOP_TIME), TIMER_CLIENT_TIME|TIMER_STOPPABLE)
|
||||
|
||||
|
||||
/datum/hud/proc/update_parallax_motionblur(client/C, animatedir, new_parallax_movedir, matrix/newtransform)
|
||||
C.parallax_animate_timer = FALSE
|
||||
for(var/thing in C.parallax_layers)
|
||||
var/obj/screen/parallax_layer/L = thing
|
||||
if (!new_parallax_movedir)
|
||||
animate(L)
|
||||
continue
|
||||
|
||||
var/newstate = initial(L.icon_state)
|
||||
if (animatedir)
|
||||
if(animatedir == NORTH || animatedir == SOUTH)
|
||||
newstate += "_vertical"
|
||||
else
|
||||
newstate += "_horizontal"
|
||||
|
||||
var/T = PARALLAX_LOOP_TIME / L.speed
|
||||
|
||||
if (newstate in icon_states(L.icon))
|
||||
L.icon_state = newstate
|
||||
L.update_o(C.view)
|
||||
|
||||
L.transform = newtransform
|
||||
|
||||
animate(L, transform = matrix(), time = T, loop = -1, flags = ANIMATION_END_NOW)
|
||||
|
||||
/datum/hud/proc/update_parallax()
|
||||
var/client/C = mymob.client
|
||||
if(C.prefs.space_parallax)
|
||||
parallax_on_clients |= C
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
||||
C.screen |= bgobj
|
||||
C.screen |= C.parallax_master
|
||||
C.screen |= C.parallax_spacemaster
|
||||
if(C.prefs.space_dust)
|
||||
C.parallax_dustmaster.color = list(
|
||||
1,0,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1)
|
||||
else
|
||||
C.parallax_dustmaster.color = list(0,0,0,0)
|
||||
else
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
||||
C.screen -= bgobj
|
||||
parallax_on_clients -= C
|
||||
C.screen -= C.parallax_master
|
||||
C.screen -= C.parallax_spacemaster
|
||||
C.parallax_dustmaster.color = list(0,0,0,0)
|
||||
|
||||
/datum/hud/proc/update_parallax_values()
|
||||
var/client/C = mymob.client
|
||||
if(!parallax_initialized)
|
||||
return
|
||||
|
||||
if(!(locate(/turf/open/space) in trange(C.view,get_turf(C.eye))))
|
||||
return
|
||||
|
||||
//ACTUALLY MOVING THE PARALLAX
|
||||
var/turf/posobj = get_turf(C.eye)
|
||||
var/area/areaobj = posobj.loc
|
||||
|
||||
// Update the movement direction of the parallax if necessary (for shuttles)
|
||||
set_parallax_movedir(areaobj.parallax_movedir)
|
||||
|
||||
var/force
|
||||
if(!C.previous_turf || (C.previous_turf.z != posobj.z))
|
||||
C.previous_turf = posobj
|
||||
force = TRUE
|
||||
|
||||
if (!force && world.time < C.last_parallax_shift+C.parallax_throttle)
|
||||
return
|
||||
|
||||
//Doing it this way prevents parallax layers from "jumping" when you change Z-Levels.
|
||||
var/offsetx = C.parallax_offset["horizontal"] + posobj.x - C.previous_turf.x
|
||||
var/offsety = C.parallax_offset["vertical"] + posobj.y - C.previous_turf.y
|
||||
C.parallax_offset["horizontal"] = offsetx
|
||||
C.parallax_offset["vertical"] = offsety
|
||||
var/offset_x = posobj.x - C.previous_turf.x
|
||||
var/offset_y = posobj.y - C.previous_turf.y
|
||||
|
||||
if(!offset_x && !offset_y && !force)
|
||||
return
|
||||
|
||||
var/last_delay = world.time - C.last_parallax_shift
|
||||
last_delay = min(last_delay, C.parallax_throttle)
|
||||
C.previous_turf = posobj
|
||||
C.last_parallax_shift = world.time
|
||||
|
||||
var/maxoffset = 480 //480 = (15 tiles * 32 icon_size * 3 grid size / 2) - (15 tiles * 32 icon size / 2) for centering
|
||||
var/minoffset = -960 //960 = (15 tiles * 32 icon_size * 3 grid size / 2) + (15 tiles * 32 icon size / 2) for centering
|
||||
for(var/thing in C.parallax_layers)
|
||||
var/obj/screen/parallax_layer/L = thing
|
||||
if (L.view_sized != C.view)
|
||||
L.update_o(C.view)
|
||||
var/change_x = offset_x * L.speed
|
||||
L.offset_x -= change_x
|
||||
var/change_y = offset_y * L.speed
|
||||
L.offset_y -= change_y
|
||||
if(L.offset_x > 240)
|
||||
L.offset_x -= 480
|
||||
if(L.offset_x < -240)
|
||||
L.offset_x += 480
|
||||
if(L.offset_y > 240)
|
||||
L.offset_y -= 480
|
||||
if(L.offset_y < -240)
|
||||
L.offset_y += 480
|
||||
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax_movable)
|
||||
var/accumulated_offset_x = bgobj.base_offset_x - round(offsetx * bgobj.parallax_speed * C.prefs.parallax_speed)
|
||||
var/accumulated_offset_y = bgobj.base_offset_y - round(offsety * bgobj.parallax_speed * C.prefs.parallax_speed)
|
||||
|
||||
if(accumulated_offset_x > maxoffset)
|
||||
accumulated_offset_x -= 1440 //3x3 grid, 15 tiles * 32 icon_size * 3 grid size
|
||||
if(accumulated_offset_x < minoffset)
|
||||
accumulated_offset_x += 1440
|
||||
if(!areaobj.parallax_movedir && C.dont_animate_parallax <= world.time && (offset_x || offset_y) && abs(offset_x) <= max(C.parallax_throttle/world.tick_lag+1,1) && abs(offset_y) <= max(C.parallax_throttle/world.tick_lag+1,1) && (round(abs(change_x)) > 1 || round(abs(change_y)) > 1))
|
||||
L.transform = matrix(1, 0, offset_x*L.speed, 0, 1, offset_y*L.speed)
|
||||
animate(L, transform=matrix(), time = last_delay)
|
||||
|
||||
if(accumulated_offset_y > maxoffset)
|
||||
accumulated_offset_y -= 1440
|
||||
if(accumulated_offset_y < minoffset)
|
||||
accumulated_offset_y += 1440
|
||||
L.screen_loc = "CENTER-7:[round(L.offset_x,1)],CENTER-7:[round(L.offset_y,1)]"
|
||||
|
||||
bgobj.screen_loc = "CENTER:[accumulated_offset_x],CENTER:[accumulated_offset_y]"
|
||||
/atom/movable/proc/update_parallax_contents()
|
||||
if(length(client_mobs_in_contents))
|
||||
for(var/thing in client_mobs_in_contents)
|
||||
var/mob/M = thing
|
||||
if(M && M.client && M.hud_used && length(M.client.parallax_layers))
|
||||
M.hud_used.update_parallax()
|
||||
|
||||
//Parallax generation code below
|
||||
/obj/screen/parallax_layer
|
||||
icon = 'icons/effects/parallax.dmi'
|
||||
var/speed = 1
|
||||
var/offset_x = 0
|
||||
var/offset_y = 0
|
||||
var/view_sized
|
||||
blend_mode = BLEND_ADD
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
mouse_opacity = 0
|
||||
|
||||
#define PARALLAX4_ICON_NUMBER 20
|
||||
#define PARALLAX3_ICON_NUMBER 14
|
||||
#define PARALLAX2_ICON_NUMBER 10
|
||||
|
||||
/datum/subsystem/parallax/proc/create_global_parallax_icons()
|
||||
var/list/plane1 = list()
|
||||
var/list/plane2 = list()
|
||||
var/list/plane3 = list()
|
||||
var/list/pixel_x = list()
|
||||
var/list/pixel_y = list()
|
||||
var/index = 1
|
||||
for(var/i = 0 to (PARALLAX_IMAGE_TILES-1))
|
||||
for(var/j = 1 to 9)
|
||||
plane1 += rand(1,26)
|
||||
plane2 += rand(1,26)
|
||||
plane3 += rand(1,26)
|
||||
pixel_x += world.icon_size * (i%PARALLAX_IMAGE_WIDTH)
|
||||
pixel_y += world.icon_size * round(i/PARALLAX_IMAGE_WIDTH)
|
||||
/obj/screen/parallax_layer/New(view)
|
||||
..()
|
||||
if (!view)
|
||||
view = world.view
|
||||
update_o(view)
|
||||
|
||||
for(var/i in 0 to 8)
|
||||
var/obj/screen/parallax/parallax_layer = PoolOrNew(/obj/screen/parallax)
|
||||
/obj/screen/parallax_layer/proc/update_o(view)
|
||||
if (!view)
|
||||
view = world.view
|
||||
var/list/new_overlays = list()
|
||||
var/count = Ceiling(view/(480/world.icon_size))+1
|
||||
for(var/x in -count to count)
|
||||
for(var/y in -count to count)
|
||||
if(x == 0 && y == 0)
|
||||
continue
|
||||
var/image/I = image(icon, null, icon_state)
|
||||
I.transform = matrix(1, 0, x*480, 0, 1, y*480)
|
||||
new_overlays += I
|
||||
|
||||
var/list/L = list()
|
||||
for(var/j in 1 to PARALLAX_IMAGE_TILES)
|
||||
if(plane1[j+i*PARALLAX_IMAGE_TILES] <= PARALLAX4_ICON_NUMBER)
|
||||
var/image/I = image('icons/turf/space_parallax4.dmi',"[plane1[j+i*PARALLAX_IMAGE_TILES]]")
|
||||
I.pixel_x = pixel_x[j]
|
||||
I.pixel_y = pixel_y[j]
|
||||
L += I
|
||||
overlays = new_overlays
|
||||
view_sized = view
|
||||
|
||||
parallax_layer.overlays = L
|
||||
parallax_layer.parallax_speed = 0
|
||||
parallax_layer.calibrate_parallax(i+1)
|
||||
parallax_icon[index] = parallax_layer
|
||||
index++
|
||||
/obj/screen/parallax_layer/layer_1
|
||||
icon_state = "layer1"
|
||||
speed = 0.6
|
||||
layer = 1
|
||||
|
||||
for(var/i in 0 to 8)
|
||||
var/obj/screen/parallax/parallax_layer = PoolOrNew(/obj/screen/parallax)
|
||||
/obj/screen/parallax_layer/layer_2
|
||||
icon_state = "layer2"
|
||||
speed = 1
|
||||
layer = 2
|
||||
|
||||
var/list/L = list()
|
||||
for(var/j in 1 to PARALLAX_IMAGE_TILES)
|
||||
if(plane2[j+i*PARALLAX_IMAGE_TILES] <= PARALLAX3_ICON_NUMBER)
|
||||
var/image/I = image('icons/turf/space_parallax3.dmi',"[plane2[j+i*PARALLAX_IMAGE_TILES]]")
|
||||
I.pixel_x = pixel_x[j]
|
||||
I.pixel_y = pixel_y[j]
|
||||
L += I
|
||||
/obj/screen/parallax_pmaster
|
||||
appearance_flags = PLANE_MASTER
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
mouse_opacity = FALSE
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
|
||||
parallax_layer.overlays = L
|
||||
parallax_layer.parallax_speed = 0.5
|
||||
parallax_layer.calibrate_parallax(i+1)
|
||||
parallax_icon[index] = parallax_layer
|
||||
index++
|
||||
/obj/screen/parallax_space_whitifier
|
||||
appearance_flags = PLANE_MASTER
|
||||
plane = PLANE_SPACE
|
||||
color = list(
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
1, 1, 1, 1,
|
||||
0, 0, 0, 0
|
||||
)
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
|
||||
for(var/i in 0 to 8)
|
||||
var/obj/screen/parallax/parallax_layer = PoolOrNew(/obj/screen/parallax)
|
||||
var/list/L = list()
|
||||
for(var/j in 1 to PARALLAX_IMAGE_TILES)
|
||||
if(plane3[j+i*PARALLAX_IMAGE_TILES] <= PARALLAX2_ICON_NUMBER)
|
||||
var/image/I = image('icons/turf/space_parallax2.dmi',"[plane3[j+i*PARALLAX_IMAGE_TILES]]")
|
||||
I.pixel_x = pixel_x[j]
|
||||
I.pixel_y = pixel_y[j]
|
||||
L += I
|
||||
|
||||
parallax_layer.overlays = L
|
||||
parallax_layer.parallax_speed = 1
|
||||
parallax_layer.calibrate_parallax(i+1)
|
||||
parallax_icon[index] = parallax_layer
|
||||
index++
|
||||
|
||||
parallax_initialized = 1
|
||||
|
||||
/obj/screen/parallax/proc/calibrate_parallax(var/i)
|
||||
if(!i) return
|
||||
|
||||
/* Placement of screen objects
|
||||
1 2 3
|
||||
4 5 6
|
||||
7 8 9
|
||||
*/
|
||||
base_offset_x = -PARALLAX_IMAGE_WIDTH*world.icon_size/2
|
||||
base_offset_y = -PARALLAX_IMAGE_WIDTH*world.icon_size/2
|
||||
|
||||
switch(i)
|
||||
if(1,4,7)
|
||||
base_offset_x -= world.icon_size*PARALLAX_IMAGE_WIDTH
|
||||
if(3,6,9)
|
||||
base_offset_x += world.icon_size*PARALLAX_IMAGE_WIDTH
|
||||
switch(i)
|
||||
if(1,2,3)
|
||||
base_offset_y += world.icon_size*PARALLAX_IMAGE_WIDTH
|
||||
if(7,8,9)
|
||||
base_offset_y -= world.icon_size*PARALLAX_IMAGE_WIDTH
|
||||
|
||||
screen_loc = "CENTER:[base_offset_x],CENTER:[base_offset_y]"
|
||||
|
||||
#undef PARALLAX4_ICON_NUMBER
|
||||
#undef PARALLAX3_ICON_NUMBER
|
||||
#undef PARALLAX2_ICON_NUMBER
|
||||
#undef PARALLAX_IMAGE_WIDTH
|
||||
#undef PARALLAX_IMAGE_TILES
|
||||
#undef LOOP_NONE
|
||||
#undef LOOP_NORMAL
|
||||
#undef LOOP_REVERSE
|
||||
#undef LOOP_TIME
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/obj/screen/plane_master
|
||||
screen_loc = "CENTER"
|
||||
icon_state = "blank"
|
||||
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/obj/screen/plane_master/New()
|
||||
if(blend_mode == BLEND_MULTIPLY)
|
||||
//What is this? Read http://www.byond.com/forum/?post=2141928
|
||||
var/image/backdrop = image('icons/mob/screen_gen.dmi', "black")
|
||||
backdrop.transform = matrix(200, 0, 0, 0, 200, 0)
|
||||
backdrop.layer = BACKGROUND_LAYER
|
||||
backdrop.blend_mode = BLEND_OVERLAY
|
||||
overlays += backdrop
|
||||
..()
|
||||
|
||||
/obj/screen/plane_master/game_world
|
||||
name = "game world plane master"
|
||||
plane = GAME_PLANE
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/obj/screen/plane_master/lighting
|
||||
name = "lighting plane master"
|
||||
plane = LIGHTING_PLANE
|
||||
blend_mode = BLEND_OVERLAY
|
||||
// blend_mode = BLEND_MULTIPLY
|
||||
// color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0.1,0.1,0.1,0)
|
||||
mouse_opacity = 0
|
||||
+83
-49
@@ -5,9 +5,15 @@
|
||||
name = "cyborg module"
|
||||
icon_state = "nomod"
|
||||
|
||||
/obj/screen/robot/Click()
|
||||
if(isobserver(usr))
|
||||
return 1
|
||||
|
||||
/obj/screen/robot/module/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(R.module)
|
||||
if(R.module.type != /obj/item/weapon/robot_module)
|
||||
R.hud_used.toggle_show_robot_modules()
|
||||
return 1
|
||||
R.pick_module()
|
||||
@@ -17,6 +23,8 @@
|
||||
icon_state = "inv1"
|
||||
|
||||
/obj/screen/robot/module1/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(1)
|
||||
|
||||
@@ -25,6 +33,8 @@
|
||||
icon_state = "inv2"
|
||||
|
||||
/obj/screen/robot/module2/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(2)
|
||||
|
||||
@@ -33,6 +43,8 @@
|
||||
icon_state = "inv3"
|
||||
|
||||
/obj/screen/robot/module3/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(3)
|
||||
|
||||
@@ -41,6 +53,8 @@
|
||||
icon_state = "radio"
|
||||
|
||||
/obj/screen/robot/radio/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.radio.interact(R)
|
||||
|
||||
@@ -49,6 +63,8 @@
|
||||
icon_state = "store"
|
||||
|
||||
/obj/screen/robot/store/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.uneq_active()
|
||||
|
||||
@@ -57,6 +73,8 @@
|
||||
icon_state = "lamp0"
|
||||
|
||||
/obj/screen/robot/lamp/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.control_headlamp()
|
||||
|
||||
@@ -65,14 +83,24 @@
|
||||
icon_state = "ionpulse0"
|
||||
|
||||
/obj/screen/robot/thrusters/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_ionpulse()
|
||||
|
||||
/datum/hud/robot/New(mob/owner)
|
||||
/datum/hud/robot
|
||||
ui_style_icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
/datum/hud/robot/New(mob/owner, ui_style = 'icons/mob/screen_cyborg.dmi')
|
||||
..()
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_borg_talk_wheel
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
//Radio
|
||||
using = new /obj/screen/robot/radio()
|
||||
using.screen_loc = ui_borg_radio
|
||||
@@ -123,19 +151,18 @@
|
||||
mymobR.thruster_button = using
|
||||
|
||||
//Intent
|
||||
using = new /obj/screen/act_intent/robot()
|
||||
using.icon_state = mymob.a_intent
|
||||
static_inventory += using
|
||||
action_intent = using
|
||||
action_intent = new /obj/screen/act_intent/robot()
|
||||
action_intent.icon_state = mymob.a_intent
|
||||
static_inventory += action_intent
|
||||
|
||||
//Health
|
||||
healths = new /obj/screen/healths/robot()
|
||||
infodisplay += healths
|
||||
|
||||
//Installed Module
|
||||
mymob.hands = new /obj/screen/robot/module()
|
||||
mymob.hands.screen_loc = ui_borg_module
|
||||
static_inventory += mymob.hands
|
||||
mymobR.hands = new /obj/screen/robot/module()
|
||||
mymobR.hands.screen_loc = ui_borg_module
|
||||
static_inventory += mymobR.hands
|
||||
|
||||
//Store
|
||||
module_store_icon = new /obj/screen/robot/store()
|
||||
@@ -154,50 +181,53 @@
|
||||
|
||||
|
||||
/datum/hud/proc/toggle_show_robot_modules()
|
||||
if(!isrobot(mymob)) return
|
||||
if(!iscyborg(mymob)) return
|
||||
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
r.shown_robot_modules = !r.shown_robot_modules
|
||||
R.shown_robot_modules = !R.shown_robot_modules
|
||||
update_robot_modules_display()
|
||||
|
||||
/datum/hud/proc/update_robot_modules_display()
|
||||
if(!isrobot(mymob)) return
|
||||
/datum/hud/proc/update_robot_modules_display(mob/viewer)
|
||||
if(!iscyborg(mymob)) return
|
||||
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
if(!r.client)
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(!R.module)
|
||||
return
|
||||
|
||||
if(!r.module)
|
||||
if(!R.client)
|
||||
return
|
||||
|
||||
if(r.shown_robot_modules && hud_shown)
|
||||
if(R.shown_robot_modules && screenmob.hud_used.hud_shown)
|
||||
//Modules display is shown
|
||||
r.client.screen += module_store_icon //"store" icon
|
||||
screenmob.client.screen += module_store_icon //"store" icon
|
||||
|
||||
if(!r.module.modules)
|
||||
if(!R.module.modules)
|
||||
usr << "<span class='danger'>Selected module has no modules to select</span>"
|
||||
return
|
||||
|
||||
if(!r.robot_modules_background)
|
||||
if(!R.robot_modules_background)
|
||||
return
|
||||
|
||||
var/display_rows = Ceiling(length(r.module.get_inactive_modules()) / 8)
|
||||
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
r.client.screen += r.robot_modules_background
|
||||
var/display_rows = Ceiling(length(R.module.get_inactive_modules()) / 8)
|
||||
R.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
screenmob.client.screen += R.robot_modules_background
|
||||
|
||||
var/x = -4 //Start at CENTER-4,SOUTH+1
|
||||
var/y = 1
|
||||
|
||||
for(var/atom/movable/A in r.module.get_inactive_modules())
|
||||
for(var/atom/movable/A in R.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
r.client.screen += A
|
||||
screenmob.client.screen += A
|
||||
if(x < 0)
|
||||
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
|
||||
else
|
||||
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
|
||||
A.layer = ABOVE_HUD_LAYER
|
||||
A.plane = ABOVE_HUD_PLANE
|
||||
|
||||
x++
|
||||
if(x == 4)
|
||||
@@ -206,37 +236,41 @@
|
||||
|
||||
else
|
||||
//Modules display is hidden
|
||||
r.client.screen -= module_store_icon //"store" icon
|
||||
screenmob.client.screen -= module_store_icon //"store" icon
|
||||
|
||||
for(var/atom/A in r.module.get_inactive_modules())
|
||||
for(var/atom/A in R.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
r.client.screen -= A
|
||||
r.shown_robot_modules = 0
|
||||
r.client.screen -= r.robot_modules_background
|
||||
screenmob.client.screen -= A
|
||||
R.shown_robot_modules = 0
|
||||
screenmob.client.screen -= R.robot_modules_background
|
||||
|
||||
/mob/living/silicon/robot/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/robot(src)
|
||||
|
||||
|
||||
/datum/hud/robot/persistant_inventory_update()
|
||||
/datum/hud/robot/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
if(hud_shown)
|
||||
if(R.module_state_1)
|
||||
R.module_state_1.screen_loc = ui_inv1
|
||||
R.client.screen += R.module_state_1
|
||||
if(R.module_state_2)
|
||||
R.module_state_2.screen_loc = ui_inv2
|
||||
R.client.screen += R.module_state_2
|
||||
if(R.module_state_3)
|
||||
R.module_state_3.screen_loc = ui_inv3
|
||||
R.client.screen += R.module_state_3
|
||||
else
|
||||
if(R.module_state_1)
|
||||
R.module_state_1.screen_loc = null
|
||||
if(R.module_state_2)
|
||||
R.module_state_2.screen_loc = null
|
||||
if(R.module_state_3)
|
||||
R.module_state_3.screen_loc = null
|
||||
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(screenmob.hud_used)
|
||||
if(screenmob.hud_used.hud_shown)
|
||||
for(var/i in 1 to R.held_items.len)
|
||||
var/obj/item/I = R.held_items[i]
|
||||
if(I)
|
||||
switch(i)
|
||||
if(1)
|
||||
I.screen_loc = ui_inv1
|
||||
if(2)
|
||||
I.screen_loc = ui_inv2
|
||||
if(3)
|
||||
I.screen_loc = ui_inv3
|
||||
else
|
||||
return
|
||||
screenmob.client.screen += I
|
||||
else
|
||||
for(var/obj/item/I in R.held_items)
|
||||
screenmob.client.screen -= I
|
||||
|
||||
@@ -10,15 +10,24 @@
|
||||
name = ""
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
layer = ABOVE_HUD_LAYER
|
||||
unacidable = 1
|
||||
plane = ABOVE_HUD_PLANE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
appearance_flags = APPEARANCE_UI
|
||||
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
||||
var/datum/hud/hud = null // A reference to the owner HUD, if any.
|
||||
|
||||
/obj/screen/take_damage()
|
||||
return
|
||||
|
||||
/obj/screen/Destroy()
|
||||
master = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/examine(mob/user)
|
||||
return
|
||||
|
||||
/obj/screen/orbit()
|
||||
return
|
||||
|
||||
/obj/screen/text
|
||||
icon = null
|
||||
@@ -30,6 +39,7 @@
|
||||
|
||||
/obj/screen/swap_hand
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
name = "swap hand"
|
||||
|
||||
/obj/screen/swap_hand/Click()
|
||||
@@ -46,23 +56,41 @@
|
||||
M.swap_hand()
|
||||
return 1
|
||||
|
||||
/obj/screen/inventory/craft
|
||||
/obj/screen/craft
|
||||
name = "crafting menu"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "craft"
|
||||
screen_loc = ui_crafting
|
||||
|
||||
/obj/screen/inventory/craft/Click()
|
||||
/obj/screen/craft/Click()
|
||||
var/mob/living/M = usr
|
||||
if(isobserver(usr))
|
||||
return
|
||||
M.OpenCraftingMenu()
|
||||
|
||||
/obj/screen/area_creator
|
||||
name = "create new area"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "area_edit"
|
||||
screen_loc = ui_building
|
||||
|
||||
/obj/screen/area_creator/Click()
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
var/area/A = get_area(usr)
|
||||
if(!A.outdoors)
|
||||
usr << "<span class='warning'>There is already a defined structure here.</span>"
|
||||
return 1
|
||||
create_area(usr)
|
||||
|
||||
/obj/screen/inventory
|
||||
var/slot_id // The indentifier for the slot. It has nothing to do with ID cards.
|
||||
var/icon_empty // Icon when empty. For now used only by humans.
|
||||
var/icon_full // Icon when contains an item. For now used only by humans.
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/inventory/Click()
|
||||
/obj/screen/inventory/Click(location, control, params)
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
if(world.time <= usr.next_move)
|
||||
@@ -70,11 +98,16 @@
|
||||
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
|
||||
if(hud && hud.mymob && slot_id)
|
||||
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
|
||||
if(inv_item)
|
||||
return inv_item.Click(location, control, params)
|
||||
|
||||
if(usr.attack_ui(slot_id))
|
||||
usr.update_inv_l_hand(0)
|
||||
usr.update_inv_r_hand(0)
|
||||
usr.update_inv_hands()
|
||||
return 1
|
||||
|
||||
/obj/screen/inventory/update_icon()
|
||||
@@ -91,13 +124,15 @@
|
||||
var/image/active_overlay
|
||||
var/image/handcuff_overlay
|
||||
var/image/blocked_overlay
|
||||
var/held_index = 0
|
||||
|
||||
/obj/screen/inventory/hand/update_icon()
|
||||
..()
|
||||
|
||||
if(!active_overlay)
|
||||
active_overlay = image("icon"=icon, "icon_state"="hand_active")
|
||||
if(!handcuff_overlay)
|
||||
var/state = (slot_id == slot_r_hand) ? "markus" : "gabrielle"
|
||||
var/state = (!(held_index % 2)) ? "markus" : "gabrielle"
|
||||
handcuff_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"=state)
|
||||
if(!blocked_overlay)
|
||||
blocked_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"="blocked")
|
||||
@@ -109,19 +144,16 @@
|
||||
var/mob/living/carbon/C = hud.mymob
|
||||
if(C.handcuffed)
|
||||
add_overlay(handcuff_overlay)
|
||||
if(slot_id == slot_r_hand)
|
||||
if(!C.has_right_hand())
|
||||
add_overlay(blocked_overlay)
|
||||
else if(slot_id == slot_l_hand)
|
||||
if(!C.has_left_hand())
|
||||
|
||||
if(held_index)
|
||||
if(!C.has_hand_for_held_index(held_index))
|
||||
add_overlay(blocked_overlay)
|
||||
|
||||
if(slot_id == slot_l_hand && hud.mymob.hand)
|
||||
add_overlay(active_overlay)
|
||||
else if(slot_id == slot_r_hand && !hud.mymob.hand)
|
||||
if(held_index == hud.mymob.active_hand_index)
|
||||
add_overlay(active_overlay)
|
||||
|
||||
/obj/screen/inventory/hand/Click()
|
||||
|
||||
/obj/screen/inventory/hand/Click(location, control, params)
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
if(world.time <= usr.next_move)
|
||||
@@ -131,13 +163,12 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
|
||||
if(ismob(usr))
|
||||
var/mob/M = usr
|
||||
switch(name)
|
||||
if("right hand", "r_hand")
|
||||
M.activate_hand("r")
|
||||
if("left hand", "l_hand")
|
||||
M.activate_hand("l")
|
||||
if(hud.mymob.active_hand_index == held_index)
|
||||
var/obj/item/I = hud.mymob.get_active_held_item()
|
||||
if(I)
|
||||
I.Click(location, control, params)
|
||||
else
|
||||
hud.mymob.swap_hand(held_index)
|
||||
return 1
|
||||
|
||||
/obj/screen/close
|
||||
@@ -155,6 +186,7 @@
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_drop"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/drop/Click()
|
||||
usr.drop_item_v()
|
||||
@@ -165,25 +197,26 @@
|
||||
screen_loc = ui_acti
|
||||
|
||||
/obj/screen/act_intent/Click(location, control, params)
|
||||
if(ishuman(usr) && (usr.client.prefs.toggles & INTENT_STYLE))
|
||||
usr.a_intent_change(INTENT_HOTKEY_RIGHT)
|
||||
|
||||
/obj/screen/act_intent/segmented/Click(location, control, params)
|
||||
if(usr.client.prefs.toggles & INTENT_STYLE)
|
||||
var/_x = text2num(params2list(params)["icon-x"])
|
||||
var/_y = text2num(params2list(params)["icon-y"])
|
||||
|
||||
if(_x<=16 && _y<=16)
|
||||
usr.a_intent_change("harm")
|
||||
usr.a_intent_change(INTENT_HARM)
|
||||
|
||||
else if(_x<=16 && _y>=17)
|
||||
usr.a_intent_change("help")
|
||||
usr.a_intent_change(INTENT_HELP)
|
||||
|
||||
else if(_x>=17 && _y<=16)
|
||||
usr.a_intent_change("grab")
|
||||
usr.a_intent_change(INTENT_GRAB)
|
||||
|
||||
else if(_x>=17 && _y>=17)
|
||||
usr.a_intent_change("disarm")
|
||||
|
||||
usr.a_intent_change(INTENT_DISARM)
|
||||
else
|
||||
usr.a_intent_change("right")
|
||||
return ..()
|
||||
|
||||
/obj/screen/act_intent/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
@@ -222,12 +255,10 @@
|
||||
C << "<span class='warning'>You are not wearing an internals mask!</span>"
|
||||
return
|
||||
|
||||
if(istype(C.l_hand, /obj/item/weapon/tank))
|
||||
C << "<span class='notice'>You are now running on internals from the [C.l_hand] on your left hand.</span>"
|
||||
C.internal = C.l_hand
|
||||
else if(istype(C.r_hand, /obj/item/weapon/tank))
|
||||
C << "<span class='notice'>You are now running on internals from the [C.r_hand] on your right hand.</span>"
|
||||
C.internal = C.r_hand
|
||||
var/obj/item/I = C.is_holding_item_of_type(/obj/item/weapon/tank)
|
||||
if(I)
|
||||
C << "<span class='notice'>You are now running on internals from the [I] on your [C.get_held_index_name(C.get_held_index_of_item(I))].</span>"
|
||||
C.internal = I
|
||||
else if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(istype(H.s_store, /obj/item/weapon/tank))
|
||||
@@ -261,14 +292,19 @@
|
||||
icon_state = "running"
|
||||
|
||||
/obj/screen/mov_intent/Click()
|
||||
switch(usr.m_intent)
|
||||
toggle(usr)
|
||||
|
||||
/obj/screen/mov_intent/proc/toggle(mob/user)
|
||||
if(isobserver(user))
|
||||
return
|
||||
switch(user.m_intent)
|
||||
if("run")
|
||||
usr.m_intent = "walk"
|
||||
user.m_intent = MOVE_INTENT_WALK
|
||||
icon_state = "walking"
|
||||
if("walk")
|
||||
usr.m_intent = "run"
|
||||
user.m_intent = MOVE_INTENT_RUN
|
||||
icon_state = "running"
|
||||
usr.update_icons()
|
||||
user.update_icons()
|
||||
|
||||
/obj/screen/pull
|
||||
name = "stop pulling"
|
||||
@@ -276,6 +312,8 @@
|
||||
icon_state = "pull"
|
||||
|
||||
/obj/screen/pull/Click()
|
||||
if(isobserver(usr))
|
||||
return
|
||||
usr.stop_pulling()
|
||||
|
||||
/obj/screen/pull/update_icon(mob/mymob)
|
||||
@@ -290,6 +328,7 @@
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_resist"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/resist/Click()
|
||||
if(isliving(usr))
|
||||
@@ -307,7 +346,7 @@
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 1
|
||||
if(master)
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
var/obj/item/I = usr.get_active_held_item()
|
||||
if(I)
|
||||
master.attackby(I, usr, params)
|
||||
return 1
|
||||
@@ -329,55 +368,65 @@
|
||||
var/selecting = "chest"
|
||||
|
||||
/obj/screen/zone_sel/Click(location, control,params)
|
||||
if(isobserver(usr))
|
||||
return
|
||||
|
||||
var/list/PL = params2list(params)
|
||||
var/icon_x = text2num(PL["icon-x"])
|
||||
var/icon_y = text2num(PL["icon-y"])
|
||||
var/old_selecting = selecting //We're only going to update_icon() if there's been a change
|
||||
var/choice
|
||||
|
||||
switch(icon_y)
|
||||
if(1 to 9) //Legs
|
||||
switch(icon_x)
|
||||
if(10 to 15)
|
||||
selecting = "r_leg"
|
||||
choice = "r_leg"
|
||||
if(17 to 22)
|
||||
selecting = "l_leg"
|
||||
choice = "l_leg"
|
||||
else
|
||||
return 1
|
||||
if(10 to 13) //Hands and groin
|
||||
switch(icon_x)
|
||||
if(8 to 11)
|
||||
selecting = "r_arm"
|
||||
choice = "r_arm"
|
||||
if(12 to 20)
|
||||
selecting = "groin"
|
||||
choice = "groin"
|
||||
if(21 to 24)
|
||||
selecting = "l_arm"
|
||||
choice = "l_arm"
|
||||
else
|
||||
return 1
|
||||
if(14 to 22) //Chest and arms to shoulders
|
||||
switch(icon_x)
|
||||
if(8 to 11)
|
||||
selecting = "r_arm"
|
||||
choice = "r_arm"
|
||||
if(12 to 20)
|
||||
selecting = "chest"
|
||||
choice = "chest"
|
||||
if(21 to 24)
|
||||
selecting = "l_arm"
|
||||
choice = "l_arm"
|
||||
else
|
||||
return 1
|
||||
if(23 to 30) //Head, but we need to check for eye or mouth
|
||||
if(icon_x in 12 to 20)
|
||||
selecting = "head"
|
||||
choice = "head"
|
||||
switch(icon_y)
|
||||
if(23 to 24)
|
||||
if(icon_x in 15 to 17)
|
||||
selecting = "mouth"
|
||||
choice = "mouth"
|
||||
if(26) //Eyeline, eyes are on 15 and 17
|
||||
if(icon_x in 14 to 18)
|
||||
selecting = "eyes"
|
||||
choice = "eyes"
|
||||
if(25 to 27)
|
||||
if(icon_x in 15 to 17)
|
||||
selecting = "eyes"
|
||||
choice = "eyes"
|
||||
|
||||
if(old_selecting != selecting)
|
||||
return set_selected_zone(choice, usr)
|
||||
|
||||
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
|
||||
if(isobserver(user))
|
||||
return
|
||||
|
||||
if(choice != selecting)
|
||||
selecting = choice
|
||||
update_icon(usr)
|
||||
return 1
|
||||
|
||||
@@ -404,6 +453,7 @@
|
||||
blend_mode = BLEND_ADD
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
layer = FLASH_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/damageoverlay
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
@@ -413,6 +463,7 @@
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
mouse_opacity = 0
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/healths
|
||||
name = "health"
|
||||
@@ -455,6 +506,17 @@
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/healths/clock
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_clock"
|
||||
screen_loc = ui_health
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/healths/clock/gear
|
||||
icon = 'icons/mob/clockwork_mobs.dmi'
|
||||
icon_state = "bg_gear"
|
||||
screen_loc = ui_internal
|
||||
|
||||
/obj/screen/healths/revenant
|
||||
name = "essence"
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
@@ -465,3 +527,140 @@
|
||||
/obj/screen/healthdoll
|
||||
name = "health doll"
|
||||
screen_loc = ui_healthdoll
|
||||
|
||||
|
||||
|
||||
/obj/screen/wheel
|
||||
name = "wheel"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
icon_state = ""
|
||||
screen_loc = null //if you make a new wheel, remember to give it a screen_loc
|
||||
var/list/buttons_names = list() //list of the names for each button, its length is the amount of buttons.
|
||||
var/toggled = 0 //wheel is hidden/shown
|
||||
var/wheel_buttons_type //the type of buttons used with this wheel.
|
||||
var/list/buttons_list = list()
|
||||
|
||||
/obj/screen/wheel/New()
|
||||
..()
|
||||
build_options()
|
||||
|
||||
|
||||
//we create the buttons for the wheel and place them in a square spiral fashion.
|
||||
/obj/screen/wheel/proc/build_options()
|
||||
var/obj/screen/wheel_button/close_wheel/CW = new ()
|
||||
buttons_list += CW //the close option
|
||||
CW.wheel = src
|
||||
|
||||
var/list/offset_x_list = list()
|
||||
var/list/offset_y_list = list()
|
||||
var/num = 1
|
||||
var/N = 1
|
||||
var/M = 0
|
||||
var/sign = -1
|
||||
my_loop:
|
||||
while(offset_y_list.len < buttons_names.len)
|
||||
for(var/i=1, i<=num, i++)
|
||||
offset_y_list += N
|
||||
offset_x_list += M
|
||||
if(offset_y_list.len == buttons_names.len)
|
||||
break my_loop
|
||||
if(N != 0)
|
||||
N = 0
|
||||
M = -sign
|
||||
else
|
||||
N = sign
|
||||
M = 0
|
||||
sign = -sign
|
||||
num++
|
||||
|
||||
var/screenx = 8
|
||||
var/screeny = 8
|
||||
for(var/i = 1, i <= buttons_names.len, i++)
|
||||
var/obj/screen/wheel_button/WB = new wheel_buttons_type()
|
||||
WB.wheel = src
|
||||
buttons_list += WB
|
||||
screenx += offset_x_list[i]
|
||||
screeny += offset_y_list[i]
|
||||
WB.screen_loc = "[screenx], [screeny]"
|
||||
set_button(WB, i)
|
||||
|
||||
/obj/screen/wheel/proc/set_button(obj/screen/wheel_button/WB, button_number)
|
||||
WB.name = buttons_names[button_number]
|
||||
return
|
||||
|
||||
/obj/screen/wheel/Destroy()
|
||||
for(var/obj/screen/S in buttons_list)
|
||||
qdel(S)
|
||||
return ..()
|
||||
|
||||
/obj/screen/wheel/Click()
|
||||
if(world.time <= usr.next_move)
|
||||
return
|
||||
if(usr.stat)
|
||||
return
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
if(toggled)
|
||||
L.client.screen -= buttons_list
|
||||
else
|
||||
L.client.screen |= buttons_list
|
||||
toggled = !toggled
|
||||
|
||||
|
||||
/obj/screen/wheel/talk
|
||||
name = "talk wheel"
|
||||
icon_state = "talk_wheel"
|
||||
screen_loc = "11:6,2:-11"
|
||||
wheel_buttons_type = /obj/screen/wheel_button/talk
|
||||
buttons_names = list("help","hello","bye","stop","thanks","come","out", "yes", "no")
|
||||
var/list/word_messages = list(list("Help!","Help me!"), list("Hello.", "Hi."), list("Bye.", "Goodbye."),\
|
||||
list("Stop!", "Halt!"), list("Thanks.", "Thanks!", "Thank you."), \
|
||||
list("Come.", "Follow me."), list("Out!", "Go away!", "Get out!"), \
|
||||
list("Yes.", "Affirmative."), list("No.", "Negative"))
|
||||
|
||||
/obj/screen/wheel/talk/set_button(obj/screen/wheel_button/WB, button_number)
|
||||
..()
|
||||
var/obj/screen/wheel_button/talk/T = WB //we already know what type the button is exactly.
|
||||
T.icon_state = "talk_[T.name]"
|
||||
T.word_messages = word_messages[button_number]
|
||||
|
||||
|
||||
/obj/screen/wheel_button
|
||||
name = "default wheel button"
|
||||
screen_loc = "8,8"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
mouse_opacity = 2
|
||||
var/obj/screen/wheel/wheel
|
||||
|
||||
/obj/screen/wheel_button/Destroy()
|
||||
wheel = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/wheel_button/close_wheel
|
||||
name = "close wheel"
|
||||
icon_state = "x3"
|
||||
|
||||
/obj/screen/wheel_button/close_wheel/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.client.screen -= wheel.buttons_list
|
||||
wheel.toggled = !wheel.toggled
|
||||
|
||||
|
||||
/obj/screen/wheel_button/talk
|
||||
name = "talk option"
|
||||
icon_state = "talk_help"
|
||||
var/talk_cooldown = 0
|
||||
var/list/word_messages = list()
|
||||
|
||||
/obj/screen/wheel_button/talk/Click(location, control,params)
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
if(L.stat)
|
||||
return
|
||||
|
||||
if(word_messages.len && talk_cooldown < world.time)
|
||||
talk_cooldown = world.time + 10
|
||||
L.say(pick(word_messages))
|
||||
|
||||
@@ -68,11 +68,11 @@
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen/swarmer/FabricateTrap()
|
||||
using.screen_loc = ui_rhand
|
||||
using.screen_loc = ui_hand_position(2)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/Barricade()
|
||||
using.screen_loc = ui_lhand
|
||||
using.screen_loc = ui_hand_position(1)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swarmer/Replicate()
|
||||
|
||||
@@ -3,16 +3,22 @@
|
||||
/obj/item/proc/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/proc/pre_attackby(obj/O, mob/living/user, params) //do stuff before attackby!
|
||||
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
|
||||
|
||||
// No comment
|
||||
/atom/proc/attackby(obj/item/W, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/attackby(obj/item/I, mob/living/user, params)
|
||||
return I.attack_obj(src, user)
|
||||
if(unique_rename && istype(I, /obj/item/weapon/pen))
|
||||
rewrite(user)
|
||||
else
|
||||
return I.attack_obj(src, user)
|
||||
|
||||
/mob/living/attackby(obj/item/I, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(user.a_intent == "harm" && stat == DEAD && butcher_results) //can we butcher it?
|
||||
if(user.a_intent == INTENT_HARM && stat == DEAD && butcher_results) //can we butcher it?
|
||||
var/sharpness = I.is_sharp()
|
||||
if(sharpness)
|
||||
user << "<span class='notice'>You begin to butcher [src]...</span>"
|
||||
@@ -34,6 +40,7 @@
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
|
||||
user.do_attack_animation(M)
|
||||
M.attacked_by(src, user)
|
||||
|
||||
add_logs(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
@@ -48,29 +55,33 @@
|
||||
user.do_attack_animation(O)
|
||||
O.attacked_by(src, user)
|
||||
|
||||
|
||||
|
||||
/atom/movable/proc/attacked_by()
|
||||
return
|
||||
|
||||
/obj/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force)
|
||||
user.visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", "<span class='danger'>You hit [src] with [I]!</span>")
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
//only witnesses close by and the victim see a hit message.
|
||||
take_damage(I.force, I.damtype, "melee", 1)
|
||||
|
||||
/mob/living/attacked_by(obj/item/I, mob/living/user)
|
||||
if(user != src)
|
||||
user.do_attack_animation(src)
|
||||
if(send_item_attack_message(I, user))
|
||||
if(apply_damage(I.force, I.damtype))
|
||||
if(I.damtype == BRUTE)
|
||||
if(prob(33))
|
||||
I.add_mob_blood(src)
|
||||
var/turf/location = get_turf(src)
|
||||
add_splatter_floor(location)
|
||||
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
|
||||
user.add_mob_blood(src)
|
||||
return TRUE
|
||||
send_item_attack_message(I, user)
|
||||
if(I.force)
|
||||
apply_damage(I.force, I.damtype)
|
||||
if(I.damtype == BRUTE)
|
||||
if(prob(33))
|
||||
I.add_mob_blood(src)
|
||||
var/turf/location = get_turf(src)
|
||||
add_splatter_floor(location)
|
||||
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
|
||||
user.add_mob_blood(src)
|
||||
return TRUE //successful attack
|
||||
|
||||
/mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force < force_threshold || I.damtype == STAMINA)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
|
||||
// Click parameters is the params string from byond Click() code, see that documentation.
|
||||
@@ -87,27 +98,17 @@
|
||||
|
||||
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
|
||||
var/message_verb = "attacked"
|
||||
if(I.attack_verb.len)
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
message_verb = "[pick(I.attack_verb)]"
|
||||
else if(!I.force)
|
||||
return 0
|
||||
return
|
||||
var/message_hit_area = ""
|
||||
if(hit_area)
|
||||
message_hit_area = " in the [hit_area]"
|
||||
|
||||
var/attack_message = "[src] has been [message_verb][message_hit_area] with [I]."
|
||||
if(user in viewers(src, null))
|
||||
attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
|
||||
visible_message("<span class='danger'>[attack_message]</span>",
|
||||
"<span class='userdanger'>[attack_message]</span>")
|
||||
visible_message("<span class='danger'>[attack_message]</span>", \
|
||||
"<span class='userdanger'>[attack_message]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
|
||||
if(!I.force)
|
||||
user.visible_message("<span class='warning'>[user] gently taps [src] with [I].</span>",\
|
||||
"<span class='warning'>This weapon is ineffective, it does no damage!</span>")
|
||||
else if(I.force < force_threshold || I.damtype == STAMINA)
|
||||
visible_message("<span class='warning'>[I] bounces harmlessly off of [src].</span>",\
|
||||
"<span class='warning'>[I] bounces harmlessly off of [src]!</span>")
|
||||
else
|
||||
return ..()
|
||||
@@ -15,6 +15,7 @@
|
||||
// Otherwise jump
|
||||
else if(A.loc)
|
||||
loc = get_turf(A)
|
||||
update_parallax_contents()
|
||||
|
||||
/mob/dead/observer/ClickOn(var/atom/A, var/params)
|
||||
if(client.click_intercept)
|
||||
|
||||
+67
-10
@@ -20,7 +20,7 @@
|
||||
var/override = 0
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
override += HM.on_attack_hand(src, A)
|
||||
override += HM.on_attack_hand(src, A, proximity)
|
||||
|
||||
if(override)
|
||||
return
|
||||
@@ -50,9 +50,8 @@
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_ranged_attack(src, A)
|
||||
|
||||
var/turf/T = A
|
||||
if(istype(T) && get_dist(src,T) <= 1)
|
||||
src.Move_Pulled(T)
|
||||
if(isturf(A) && get_dist(src,A) <= 1)
|
||||
src.Move_Pulled(A)
|
||||
|
||||
/*
|
||||
Animals & All Unspecified
|
||||
@@ -60,10 +59,6 @@
|
||||
/mob/living/UnarmedAttack(atom/A)
|
||||
A.attack_animal(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
AttackingTarget()
|
||||
|
||||
/atom/proc/attack_animal(mob/user)
|
||||
return
|
||||
/mob/living/RestrainedClickOn(atom/A)
|
||||
@@ -87,7 +82,7 @@
|
||||
/mob/living/carbon/monkey/RestrainedClickOn(atom/A)
|
||||
if(..())
|
||||
return
|
||||
if(a_intent != "harm" || !ismob(A))
|
||||
if(a_intent != INTENT_HARM || !ismob(A))
|
||||
return
|
||||
if(is_muzzled())
|
||||
return
|
||||
@@ -115,7 +110,7 @@
|
||||
*/
|
||||
/mob/living/carbon/alien/UnarmedAttack(atom/A)
|
||||
A.attack_alien(src)
|
||||
/atom/proc/attack_alien(mob/user)
|
||||
/atom/proc/attack_alien(mob/living/carbon/alien/user)
|
||||
attack_paw(user)
|
||||
return
|
||||
/mob/living/carbon/alien/RestrainedClickOn(atom/A)
|
||||
@@ -139,6 +134,68 @@
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Drones
|
||||
*/
|
||||
/mob/living/simple_animal/drone/UnarmedAttack(atom/A)
|
||||
A.attack_drone(src)
|
||||
|
||||
/atom/proc/attack_drone(mob/living/simple_animal/drone/user)
|
||||
attack_hand(user) //defaults to attack_hand. Override it when you don't want drones to do same stuff as humans.
|
||||
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
True Devil
|
||||
*/
|
||||
|
||||
/mob/living/carbon/true_devil/UnarmedAttack(atom/A, proximity)
|
||||
A.attack_hand(src)
|
||||
|
||||
/*
|
||||
Brain
|
||||
*/
|
||||
|
||||
/mob/living/brain/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
pAI
|
||||
*/
|
||||
|
||||
/mob/living/silicon/pai/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Simple animals
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
|
||||
if(!dextrous)
|
||||
return ..()
|
||||
if(!ismob(A))
|
||||
A.attack_hand(src)
|
||||
update_inv_hands()
|
||||
|
||||
|
||||
/*
|
||||
Hostile animals
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
if(dextrous && !is_type_in_typecache(A, environment_target_typecache) && !ismob(A))
|
||||
..()
|
||||
else
|
||||
AttackingTarget()
|
||||
|
||||
|
||||
|
||||
/*
|
||||
New Players:
|
||||
Have no reason to click on anything at all.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user