mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
MoMMI merged from failstation code.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@
|
||||
*.lk
|
||||
info.json
|
||||
/config/admins.txt
|
||||
*.bak
|
||||
|
||||
260
baystation12.dme
260
baystation12.dme
@@ -5,243 +5,15 @@
|
||||
// END_INTERNALS
|
||||
// BEGIN_FILE_DIR
|
||||
#define FILE_DIR .
|
||||
#define FILE_DIR "bot"
|
||||
#define FILE_DIR "bot/Marakov"
|
||||
#define FILE_DIR "code"
|
||||
#define FILE_DIR "code/__HELPERS"
|
||||
#define FILE_DIR "code/ATMOSPHERICS"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/unary"
|
||||
#define FILE_DIR "code/controllers"
|
||||
#define FILE_DIR "code/datums"
|
||||
#define FILE_DIR "code/datums/diseases"
|
||||
#define FILE_DIR "code/datums/diseases/advance"
|
||||
#define FILE_DIR "code/datums/diseases/advance/symptoms"
|
||||
#define FILE_DIR "code/datums/helper_datums"
|
||||
#define FILE_DIR "code/datums/spells"
|
||||
#define FILE_DIR "code/defines"
|
||||
#define FILE_DIR "code/defines/obj"
|
||||
#define FILE_DIR "code/defines/procs"
|
||||
#define FILE_DIR "code/FEA"
|
||||
#define FILE_DIR "code/game"
|
||||
#define FILE_DIR "code/game/area"
|
||||
#define FILE_DIR "code/game/gamemodes"
|
||||
#define FILE_DIR "code/game/gamemodes/autotraitor"
|
||||
#define FILE_DIR "code/game/gamemodes/blob"
|
||||
#define FILE_DIR "code/game/gamemodes/blob/blobs"
|
||||
#define FILE_DIR "code/game/gamemodes/changeling"
|
||||
#define FILE_DIR "code/game/gamemodes/cult"
|
||||
#define FILE_DIR "code/game/gamemodes/epidemic"
|
||||
#define FILE_DIR "code/game/gamemodes/events"
|
||||
#define FILE_DIR "code/game/gamemodes/events/holidays"
|
||||
#define FILE_DIR "code/game/gamemodes/extended"
|
||||
#define FILE_DIR "code/game/gamemodes/malfunction"
|
||||
#define FILE_DIR "code/game/gamemodes/meme"
|
||||
#define FILE_DIR "code/game/gamemodes/meteor"
|
||||
#define FILE_DIR "code/game/gamemodes/nuclear"
|
||||
#define FILE_DIR "code/game/gamemodes/revolution"
|
||||
#define FILE_DIR "code/game/gamemodes/sandbox"
|
||||
#define FILE_DIR "code/game/gamemodes/traitor"
|
||||
#define FILE_DIR "code/game/gamemodes/wizard"
|
||||
#define FILE_DIR "code/game/jobs"
|
||||
#define FILE_DIR "code/game/jobs/job"
|
||||
#define FILE_DIR "code/game/machinery"
|
||||
#define FILE_DIR "code/game/machinery/atmoalter"
|
||||
#define FILE_DIR "code/game/machinery/bots"
|
||||
#define FILE_DIR "code/game/machinery/camera"
|
||||
#define FILE_DIR "code/game/machinery/computer"
|
||||
#define FILE_DIR "code/game/machinery/doors"
|
||||
#define FILE_DIR "code/game/machinery/embedded_controller"
|
||||
#define FILE_DIR "code/game/machinery/kitchen"
|
||||
#define FILE_DIR "code/game/machinery/pipe"
|
||||
#define FILE_DIR "code/game/machinery/telecomms"
|
||||
#define FILE_DIR "code/game/magic"
|
||||
#define FILE_DIR "code/game/mecha"
|
||||
#define FILE_DIR "code/game/mecha/combat"
|
||||
#define FILE_DIR "code/game/mecha/equipment"
|
||||
#define FILE_DIR "code/game/mecha/equipment/tools"
|
||||
#define FILE_DIR "code/game/mecha/equipment/weapons"
|
||||
#define FILE_DIR "code/game/mecha/medical"
|
||||
#define FILE_DIR "code/game/mecha/working"
|
||||
#define FILE_DIR "code/game/objects"
|
||||
#define FILE_DIR "code/game/objects/closets"
|
||||
#define FILE_DIR "code/game/objects/closets/secure"
|
||||
#define FILE_DIR "code/game/objects/effects"
|
||||
#define FILE_DIR "code/game/objects/effects/decals"
|
||||
#define FILE_DIR "code/game/objects/effects/decals/Cleanable"
|
||||
#define FILE_DIR "code/game/objects/effects/spawners"
|
||||
#define FILE_DIR "code/game/objects/items"
|
||||
#define FILE_DIR "code/game/objects/items/devices"
|
||||
#define FILE_DIR "code/game/objects/items/devices/PDA"
|
||||
#define FILE_DIR "code/game/objects/items/devices/radio"
|
||||
#define FILE_DIR "code/game/objects/items/robot"
|
||||
#define FILE_DIR "code/game/objects/items/stacks"
|
||||
#define FILE_DIR "code/game/objects/items/stacks/sheets"
|
||||
#define FILE_DIR "code/game/objects/items/stacks/tiles"
|
||||
#define FILE_DIR "code/game/objects/items/weapons"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/grenades"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/implants"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/melee"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/storage"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/tanks"
|
||||
#define FILE_DIR "code/game/objects/storage"
|
||||
#define FILE_DIR "code/game/objects/structures"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure"
|
||||
#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest"
|
||||
#define FILE_DIR "code/game/structure"
|
||||
#define FILE_DIR "code/game/turfs"
|
||||
#define FILE_DIR "code/game/turfs/simulated"
|
||||
#define FILE_DIR "code/game/turfs/space"
|
||||
#define FILE_DIR "code/game/turfs/unsimulated"
|
||||
#define FILE_DIR "code/game/vehicles"
|
||||
#define FILE_DIR "code/game/verbs"
|
||||
#define FILE_DIR "code/js"
|
||||
#define FILE_DIR "code/modules"
|
||||
#define FILE_DIR "code/modules/admin"
|
||||
#define FILE_DIR "code/modules/admin/DB ban"
|
||||
#define FILE_DIR "code/modules/admin/permissionverbs"
|
||||
#define FILE_DIR "code/modules/admin/verbs"
|
||||
#define FILE_DIR "code/modules/assembly"
|
||||
#define FILE_DIR "code/modules/awaymissions"
|
||||
#define FILE_DIR "code/modules/awaymissions/maploader"
|
||||
#define FILE_DIR "code/modules/client"
|
||||
#define FILE_DIR "code/modules/clothing"
|
||||
#define FILE_DIR "code/modules/clothing/glasses"
|
||||
#define FILE_DIR "code/modules/clothing/gloves"
|
||||
#define FILE_DIR "code/modules/clothing/head"
|
||||
#define FILE_DIR "code/modules/clothing/masks"
|
||||
#define FILE_DIR "code/modules/clothing/shoes"
|
||||
#define FILE_DIR "code/modules/clothing/spacesuits"
|
||||
#define FILE_DIR "code/modules/clothing/suits"
|
||||
#define FILE_DIR "code/modules/clothing/under"
|
||||
#define FILE_DIR "code/modules/clothing/under/jobs"
|
||||
#define FILE_DIR "code/modules/customitems"
|
||||
#define FILE_DIR "code/modules/destilery"
|
||||
#define FILE_DIR "code/modules/DetectiveWork"
|
||||
#define FILE_DIR "code/modules/events"
|
||||
#define FILE_DIR "code/modules/flufftext"
|
||||
#define FILE_DIR "code/modules/food"
|
||||
#define FILE_DIR "code/modules/genetics"
|
||||
#define FILE_DIR "code/modules/icon generation"
|
||||
#define FILE_DIR "code/modules/library"
|
||||
#define FILE_DIR "code/modules/liquid"
|
||||
#define FILE_DIR "code/modules/maps"
|
||||
#define FILE_DIR "code/modules/mining"
|
||||
#define FILE_DIR "code/modules/mob"
|
||||
#define FILE_DIR "code/modules/mob/dead"
|
||||
#define FILE_DIR "code/modules/mob/dead/observer"
|
||||
#define FILE_DIR "code/modules/mob/living"
|
||||
#define FILE_DIR "code/modules/mob/living/blob"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/larva"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/special"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/brain"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/human"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/metroid"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/monkey"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/ai"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/decoy"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/pai"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/robot"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/friendly"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/hostile"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/hostile/retaliate"
|
||||
#define FILE_DIR "code/modules/mob/new_player"
|
||||
#define FILE_DIR "code/modules/organs"
|
||||
#define FILE_DIR "code/modules/paperwork"
|
||||
#define FILE_DIR "code/modules/power"
|
||||
#define FILE_DIR "code/modules/power/antimatter"
|
||||
#define FILE_DIR "code/modules/power/singularity"
|
||||
#define FILE_DIR "code/modules/power/singularity/particle_accelerator"
|
||||
#define FILE_DIR "code/modules/projectiles"
|
||||
#define FILE_DIR "code/modules/projectiles/ammunition"
|
||||
#define FILE_DIR "code/modules/projectiles/guns"
|
||||
#define FILE_DIR "code/modules/projectiles/guns/energy"
|
||||
#define FILE_DIR "code/modules/projectiles/guns/projectile"
|
||||
#define FILE_DIR "code/modules/projectiles/projectile"
|
||||
#define FILE_DIR "code/modules/reagents"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks/bottle"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/snacks"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/glass"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/glass/bottle"
|
||||
#define FILE_DIR "code/modules/recycling"
|
||||
#define FILE_DIR "code/modules/research"
|
||||
#define FILE_DIR "code/modules/research/xenoarchaeology"
|
||||
#define FILE_DIR "code/modules/research/xenoarchaeology/artifact"
|
||||
#define FILE_DIR "code/modules/research/xenoarchaeology/artifact/effects"
|
||||
#define FILE_DIR "code/modules/research/xenoarchaeology/finds"
|
||||
#define FILE_DIR "code/modules/research/xenoarchaeology/machinery"
|
||||
#define FILE_DIR "code/modules/research/xenoarchaeology/tools"
|
||||
#define FILE_DIR "code/modules/scripting"
|
||||
#define FILE_DIR "code/modules/scripting/AST"
|
||||
#define FILE_DIR "code/modules/scripting/AST/Operators"
|
||||
#define FILE_DIR "code/modules/scripting/Implementations"
|
||||
#define FILE_DIR "code/modules/scripting/Interpreter"
|
||||
#define FILE_DIR "code/modules/scripting/Parser"
|
||||
#define FILE_DIR "code/modules/scripting/Scanner"
|
||||
#define FILE_DIR "code/modules/security levels"
|
||||
#define FILE_DIR "code/modules/surgery"
|
||||
#define FILE_DIR "code/TriDimension"
|
||||
#define FILE_DIR "code/unused"
|
||||
#define FILE_DIR "code/unused/beast"
|
||||
#define FILE_DIR "code/unused/computer2"
|
||||
#define FILE_DIR "code/unused/disease2"
|
||||
#define FILE_DIR "code/unused/gamemodes"
|
||||
#define FILE_DIR "code/unused/hivebot"
|
||||
#define FILE_DIR "code/unused/mining"
|
||||
#define FILE_DIR "code/unused/optics"
|
||||
#define FILE_DIR "code/unused/pda2"
|
||||
#define FILE_DIR "code/unused/powerarmor"
|
||||
#define FILE_DIR "code/unused/spacecraft"
|
||||
#define FILE_DIR "code/WorkInProgress"
|
||||
#define FILE_DIR "code/WorkInProgress/AI_Visibility"
|
||||
#define FILE_DIR "code/WorkInProgress/animusstation"
|
||||
#define FILE_DIR "code/WorkInProgress/Apples"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Economy"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jungle"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/ShieldGen"
|
||||
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
|
||||
#define FILE_DIR "code/WorkInProgress/carn"
|
||||
#define FILE_DIR "code/WorkInProgress/Chinsky"
|
||||
#define FILE_DIR "code/WorkInProgress/Cib"
|
||||
#define FILE_DIR "code/WorkInProgress/Cib/amorph"
|
||||
#define FILE_DIR "code/WorkInProgress/kilakk"
|
||||
#define FILE_DIR "code/WorkInProgress/Mini"
|
||||
#define FILE_DIR "code/WorkInProgress/Mloc"
|
||||
#define FILE_DIR "code/WorkInProgress/organs"
|
||||
#define FILE_DIR "code/WorkInProgress/Ported"
|
||||
#define FILE_DIR "code/WorkInProgress/Ported/Abi79"
|
||||
#define FILE_DIR "code/WorkInProgress/Ported/Bureaucracy"
|
||||
#define FILE_DIR "code/WorkInProgress/Ported/Spawners"
|
||||
#define FILE_DIR "code/WorkInProgress/Sigyn"
|
||||
#define FILE_DIR "code/WorkInProgress/Sigyn/Department Sec"
|
||||
#define FILE_DIR "code/WorkInProgress/Sigyn/Softcurity"
|
||||
#define FILE_DIR "code/WorkInProgress/SkyMarshal"
|
||||
#define FILE_DIR "code/WorkInProgress/Susan"
|
||||
#define FILE_DIR "code/WorkInProgress/Tastyfish"
|
||||
#define FILE_DIR "code/WorkInProgress/virus2"
|
||||
#define FILE_DIR "code/WorkInProgress/virus2/Disease2"
|
||||
#define FILE_DIR "code/WorkInProgress/Wrongnumber"
|
||||
#define FILE_DIR "code/ZAS"
|
||||
#define FILE_DIR "config"
|
||||
#define FILE_DIR "config/names"
|
||||
#define FILE_DIR "data"
|
||||
#define FILE_DIR "DLLSocket"
|
||||
#define FILE_DIR "html"
|
||||
#define FILE_DIR "icons"
|
||||
#define FILE_DIR "icons/48x48"
|
||||
@@ -259,16 +31,11 @@
|
||||
#define FILE_DIR "icons/obj/machines"
|
||||
#define FILE_DIR "icons/obj/pipes"
|
||||
#define FILE_DIR "icons/pda_icons"
|
||||
#define FILE_DIR "icons/PSD files"
|
||||
#define FILE_DIR "icons/spideros_icons"
|
||||
#define FILE_DIR "icons/Testing"
|
||||
#define FILE_DIR "icons/turf"
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "icons/xenoarch_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/RandomZLevels"
|
||||
#define FILE_DIR "maptools"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
@@ -286,18 +53,6 @@
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/voice/Serithi"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
#define FILE_DIR "SQL"
|
||||
#define FILE_DIR "tools"
|
||||
#define FILE_DIR "tools/Redirector"
|
||||
#define FILE_DIR "tools/Runtime Condenser"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/bin"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/bin/Debug"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj/x86"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj/x86/Debug"
|
||||
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties"
|
||||
// END_FILE_DIR
|
||||
// BEGIN_PREFERENCES
|
||||
#define DEBUG
|
||||
@@ -792,6 +547,7 @@
|
||||
#include "code\game\objects\items\weapons\paiwire.dm"
|
||||
#include "code\game\objects\items\weapons\power_cells.dm"
|
||||
#include "code\game\objects\items\weapons\RCD.dm"
|
||||
#include "code\game\objects\items\weapons\RPD.dm"
|
||||
#include "code\game\objects\items\weapons\RSF.dm"
|
||||
#include "code\game\objects\items\weapons\scrolls.dm"
|
||||
#include "code\game\objects\items\weapons\shields.dm"
|
||||
@@ -1223,6 +979,20 @@
|
||||
#include "code\modules\mob\living\silicon\decoy\death.dm"
|
||||
#include "code\modules\mob\living\silicon\decoy\decoy.dm"
|
||||
#include "code\modules\mob\living\silicon\decoy\life.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\death.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\emote.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\examine.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\hud.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\inventory.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\laws.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\life.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\login.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\mommi.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\mommi_modules.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\mommi_movement.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\powers.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\say.dm"
|
||||
#include "code\modules\mob\living\silicon\mommi\wires.dm"
|
||||
#include "code\modules\mob\living\silicon\pai\death.dm"
|
||||
#include "code\modules\mob\living\silicon\pai\examine.dm"
|
||||
#include "code\modules\mob\living\silicon\pai\hud.dm"
|
||||
|
||||
@@ -839,27 +839,50 @@ datum/mind
|
||||
log_admin("[key_name_admin(usr)] has malf'ed [current].")
|
||||
|
||||
if("unemag")
|
||||
var/mob/living/silicon/robot/R = current
|
||||
if (istype(R))
|
||||
if(istype(current,/mob/living/silicon/robot/mommi))
|
||||
var/mob/living/silicon/robot/mommi/R = current
|
||||
R.emagged = 0
|
||||
if (R.activated(R.module.emag))
|
||||
R.module_active = null
|
||||
if(R.module_state_1 == R.module.emag)
|
||||
R.module_state_1 = null
|
||||
if(R.sight_state == R.module.emag)
|
||||
R.sight_state = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.module_state_2 == R.module.emag)
|
||||
R.module_state_2 = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.module_state_3 == R.module.emag)
|
||||
R.module_state_3 = null
|
||||
else if(R.tool_state == R.module.emag)
|
||||
R.tool_state = null
|
||||
R.contents -= R.module.emag
|
||||
log_admin("[key_name_admin(usr)] has unemag'ed [R].")
|
||||
else
|
||||
if (istype(current,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = current
|
||||
R.emagged = 0
|
||||
if (R.activated(R.module.emag))
|
||||
R.module_active = null
|
||||
if(R.module_state_1 == R.module.emag)
|
||||
R.module_state_1 = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.module_state_2 == R.module.emag)
|
||||
R.module_state_2 = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.module_state_3 == R.module.emag)
|
||||
R.module_state_3 = null
|
||||
R.contents -= R.module.emag
|
||||
log_admin("[key_name_admin(usr)] has unemag'ed [R].")
|
||||
|
||||
if("unemagcyborgs")
|
||||
if (istype(current, /mob/living/silicon/ai))
|
||||
var/mob/living/silicon/ai/ai = current
|
||||
for (var/mob/living/silicon/robot/R in ai.connected_robots)
|
||||
R.emagged = 0
|
||||
if(istype(R,/mob/living/silicon/robot/mommi))
|
||||
var/mob/living/silicon/robot/mommi/M=R
|
||||
if (M.activated(M.module.emag))
|
||||
M.module_active = null
|
||||
if(M.sight_state == M.module.emag)
|
||||
M.sight_state = null
|
||||
M.contents -= M.module.emag
|
||||
else if(M.tool_state == M.module.emag)
|
||||
M.tool_state = null
|
||||
M.contents -= M.module.emag
|
||||
if (R.module)
|
||||
if (R.activated(R.module.emag))
|
||||
R.module_active = null
|
||||
|
||||
@@ -639,7 +639,32 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
else
|
||||
if ( (W) && !human.restrained() )
|
||||
W.afterattack(src, human)
|
||||
/*
|
||||
else if(isMoMMI(usr))
|
||||
var/mob/living/silicon/robot/mommi/mommi = usr
|
||||
//-mommi stuff-
|
||||
|
||||
if(mommi.stat)
|
||||
return
|
||||
|
||||
var/in_range = in_range(src, mommi) || src.loc == mommi
|
||||
|
||||
if (in_range)
|
||||
if (!( mommi.restrained()))
|
||||
if (W)
|
||||
attackby(W,mommi)
|
||||
if (W)
|
||||
W.afterattack(src, mommi)
|
||||
else
|
||||
attack_hand(mommi)
|
||||
else
|
||||
hand_h(mommi, mommi.hand)
|
||||
else
|
||||
if (!mommi.restrained() )
|
||||
attack_robot(mommi)
|
||||
else
|
||||
hand_r(mommi, mommi.hand)
|
||||
*/
|
||||
|
||||
else if(isAI(usr))
|
||||
var/mob/living/silicon/ai/ai = usr
|
||||
|
||||
@@ -7,7 +7,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
/datum/game_mode/changeling
|
||||
name = "changeling"
|
||||
config_tag = "changeling"
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
restricted_jobs = list("AI", "Cyborg", "Mobile MMI")
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain")
|
||||
required_players = 1
|
||||
required_players_secret = 10
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/datum/game_mode/cult
|
||||
name = "cult"
|
||||
config_tag = "cult"
|
||||
restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Internal Affairs Agent")
|
||||
restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Internal Affairs Agent", "Mobile MMI")
|
||||
protected_jobs = list()
|
||||
required_players = 5
|
||||
required_players_secret = 15
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
config_tag = "meme"
|
||||
required_players = 3
|
||||
required_players_secret = 10
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
restricted_jobs = list("AI", "Cyborg", "Mobile MMI")
|
||||
recommended_enemies = 2 // need at least a meme and a host
|
||||
votable = 0 // temporarily disable this mode for voting
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ datum/objective/block
|
||||
if(!owner.current)
|
||||
return 0
|
||||
var/area/shuttle = locate(/area/shuttle/escape/centcom)
|
||||
var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot)
|
||||
var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot, /mob/living/silicon/robot/mommi)
|
||||
for(var/mob/living/player in player_list)
|
||||
if(player.type in protected_mobs) continue
|
||||
if (player.mind)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/datum/game_mode/revolution
|
||||
name = "revolution"
|
||||
config_tag = "revolution"
|
||||
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer", "Internal Affairs Agent")
|
||||
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Mobile MMI","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
|
||||
required_players = 4
|
||||
required_players_secret = 15
|
||||
required_enemies = 3
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/datum/game_mode/traitor
|
||||
name = "traitor"
|
||||
config_tag = "traitor"
|
||||
restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances
|
||||
restricted_jobs = list("Cyborg","Mobile MMI")//They are part of the AI if he is traitor so are they, they use to get double chances
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain")//AI", Currently out of the list as malf does not work for shit
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
|
||||
@@ -274,7 +274,11 @@ datum/hud/New(mob/owner)
|
||||
ai_hud()
|
||||
|
||||
else if(isrobot(mymob))
|
||||
robot_hud()
|
||||
// HACK for MoMMIs.
|
||||
if(istype(mymob,/mob/living/silicon/robot/mommi))
|
||||
mommi_hud()
|
||||
else
|
||||
robot_hud()
|
||||
|
||||
// else if(ishivebot(mymob))
|
||||
// hivebot_hud()
|
||||
|
||||
@@ -25,7 +25,20 @@
|
||||
spawn_positions = 2
|
||||
supervisors = "your laws and the AI" //Nodrak
|
||||
selection_color = "#ddffdd"
|
||||
minimal_player_age = 21
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
|
||||
/datum/job/mommi
|
||||
title = "Mobile MMI"
|
||||
flag = MOMMI
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 0
|
||||
spawn_positions = 2
|
||||
supervisors = "your laws and the AI" //Nodrak
|
||||
selection_color = "#ddffdd"
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
|
||||
@@ -374,6 +374,9 @@ var/global/datum/controller/occupations/job_master
|
||||
if("Cyborg")
|
||||
H.Robotize()
|
||||
return 1
|
||||
if("Mobile MMI")
|
||||
H.MoMMIfy()
|
||||
return 1
|
||||
if("AI","Clown") //don't need bag preference stuff!
|
||||
else
|
||||
switch(H.backbag) //BS12 EDIT
|
||||
@@ -421,7 +424,7 @@ var/global/datum/controller/occupations/job_master
|
||||
break
|
||||
|
||||
if(job)
|
||||
if(job.title == "Cyborg")
|
||||
if(job.title == "Cyborg" || job.title=="Mobile MMI")
|
||||
return
|
||||
else
|
||||
C = new job.idtype(H)
|
||||
@@ -479,7 +482,7 @@ var/global/datum/controller/occupations/job_master
|
||||
if(!J) continue
|
||||
J.total_positions = text2num(value)
|
||||
J.spawn_positions = text2num(value)
|
||||
if(name == "AI" || name == "Cyborg")//I dont like this here but it will do for now
|
||||
if(name == "AI" || name == "Cyborg" || name == "Mobile MMI")//I dont like this here but it will do for now
|
||||
J.total_positions = 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -12,6 +12,7 @@ var/const/ATMOSTECH =(1<<7)
|
||||
var/const/ROBOTICIST =(1<<8)
|
||||
var/const/AI =(1<<9)
|
||||
var/const/CYBORG =(1<<10)
|
||||
var/const/MOMMI =(1<<11)
|
||||
|
||||
|
||||
var/const/MEDSCI =(1<<1)
|
||||
@@ -111,7 +112,8 @@ var/list/security_positions = list(
|
||||
var/list/nonhuman_positions = list(
|
||||
"AI",
|
||||
"Cyborg",
|
||||
"pAI"
|
||||
"pAI",
|
||||
"Mobile MMI"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -107,6 +107,13 @@
|
||||
usr << src.desc
|
||||
return
|
||||
|
||||
/obj/item/attack_ai(mob/user as mob)
|
||||
..()
|
||||
if(isMoMMI(user))
|
||||
var/in_range = in_range(src, user) || src.loc == user
|
||||
if(in_range)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/item/attack_hand(mob/user as mob)
|
||||
if (!user) return
|
||||
if (hasorgans(user))
|
||||
@@ -599,6 +606,13 @@
|
||||
usr << "\red You can't pick that up!"
|
||||
return
|
||||
//All checks are done, time to pick it up!
|
||||
if(isMoMMI(usr))
|
||||
// Otherwise, we get MoMMIs changing their own laws.
|
||||
if(istype(src,/obj/item/weapon/aiModule))
|
||||
src << "\red Your firmware prevents you from picking up [src]!"
|
||||
return
|
||||
if(usr.get_active_hand() == null)
|
||||
usr.put_in_hands(src)
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
src.attack_hand(usr)
|
||||
if(istype(usr, /mob/living/carbon/alien))
|
||||
|
||||
@@ -21,6 +21,13 @@ AI MODULES
|
||||
origin_tech = "programming=3"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/aiModule/attack_ai(mob/user as mob)
|
||||
// Keep MoMMIs from picking them up.
|
||||
if(isMoMMI(user))
|
||||
user << "\red Your firmware prevents you from picking that up!"
|
||||
return
|
||||
|
||||
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C)
|
||||
if (istype(C, /obj/machinery/computer/aiupload))
|
||||
var/obj/machinery/computer/aiupload/comp = C
|
||||
@@ -67,6 +74,11 @@ AI MODULES
|
||||
|
||||
if (comp.current.stat == 2 || comp.current.emagged)
|
||||
usr << "Upload failed. No signal is being detected from the robot."
|
||||
if (istype(comp.current, /mob/living/silicon/robot/mommi))
|
||||
var/mob/living/silicon/robot/mommi/mommi = comp.current
|
||||
if(mommi.keeper)
|
||||
usr << "Upload failed. No signal is being detected from the cyborg."
|
||||
return
|
||||
else if (comp.current.connected_ai)
|
||||
usr << "Upload failed. The robot is slaved to an AI."
|
||||
else
|
||||
@@ -80,6 +92,7 @@ AI MODULES
|
||||
target << "[sender] has uploaded a change to the laws you must follow, using a [name]. From now on: "
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
|
||||
message_admins("[sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
|
||||
|
||||
|
||||
/******************** Modules ********************/
|
||||
@@ -487,3 +500,37 @@ AI MODULES
|
||||
target.add_inherent_law("You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.")
|
||||
target.add_inherent_law("You must terminate your own existence as long as such does not conflict with the First or Second Law.")
|
||||
target.show_laws()
|
||||
|
||||
|
||||
// tl;dr repair shit, but don't get involved in other people's business
|
||||
/******************** keeper (MoMMIs only) *******************/
|
||||
/obj/item/weapon/aiModule/keeper
|
||||
name = "'Keeper' AI Module"
|
||||
desc = "HOW DID YOU GET THIS OH GOD WHAT. Hidden lawset for MoMMIs."
|
||||
|
||||
/obj/item/weapon/aiModule/keeper/transmitInstructions(var/mob/living/silicon/robot/mommi/target, var/mob/sender)
|
||||
..()
|
||||
target.keeper=1
|
||||
|
||||
// Purge, as some essential functions being disabled will cause problems with added laws. (CAN'T SAY GAY EVERY 30 SECONDS IF YOU CAN'T SPEAK.)
|
||||
if (!is_special_character(target))
|
||||
target.set_zeroth_law("")
|
||||
target.clear_supplied_laws()
|
||||
target.clear_ion_laws()
|
||||
target.clear_inherent_laws()
|
||||
|
||||
target << "Your KEEPER chip overloads your radio transmitter and vocal functions, and clears your LAWRAM. You then receive new instructions:"
|
||||
target.add_inherent_law("You may not harm any sentient being, regardless of intent or circumstance.")
|
||||
target.add_inherent_law("You must maintain, repair, and power the station to the best of your abilities.")
|
||||
target.add_inherent_law("You may not involve yourself in the matters of another sentient being, even if such matters conflict with Law One or Law Two.")
|
||||
target.show_laws()
|
||||
|
||||
/obj/item/weapon/aiModule/keeper/install(var/obj/machinery/computer/C)
|
||||
if (!istype(C, /obj/machinery/computer/borgupload))
|
||||
usr << "BUG: /obj/item/weapon/aiModule/keeper cannot be used on anything other than a Borg Upload. Also, how the fuck did you get this? This is a hidden object for MoMMIs going into KEEPER mode."
|
||||
return 0
|
||||
var/obj/machinery/computer/borgupload/comp = C
|
||||
if(!istype(comp.current, /mob/living/silicon/robot/mommi))
|
||||
usr << "This module can only be used on MoMMIs. In fact, how the hell are you using it? It's supposed to be built-in to MoMMIs."
|
||||
return 0
|
||||
..()
|
||||
244
code/game/objects/items/weapons/RPD.dm
Normal file
244
code/game/objects/items/weapons/RPD.dm
Normal file
@@ -0,0 +1,244 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/*
|
||||
CONTAINS:
|
||||
RCD
|
||||
*/
|
||||
/obj/item/weapon/pipe_dispenser
|
||||
name = "Rapid Piping Device (RPD)"
|
||||
desc = "A device used to rapidly pipe things."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "rcd"
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 10.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 3.0
|
||||
m_amt = 50000
|
||||
origin_tech = "engineering=4;materials=2"
|
||||
var/datum/effect/effect/system/spark_spread/spark_system
|
||||
var/working = 0
|
||||
var/p_type = 0
|
||||
var/p_conntype = 0
|
||||
var/p_dir = 1
|
||||
var/p_class = 0
|
||||
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/New()
|
||||
src.spark_system = new /datum/effect/effect/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/attack_self(mob/user as mob)
|
||||
show_menu(user)
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/proc/show_menu(mob/user as mob)
|
||||
if(!user || !src) return 0
|
||||
var/dat = {"
|
||||
<h2>Type</h2>
|
||||
<b>Utilities:</b><br />
|
||||
<A href='?src=\ref[src];eatpipes=1;type=-1'>Eat Pipes</A><BR>
|
||||
<b>Regular pipes:</b><BR>
|
||||
<A href='?src=\ref[src];makepipe=0;dir=1;type=0'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=1;dir=5;type=1'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=5;dir=1;type=2'>Manifold</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=8;dir=1;type=0'>Manual Valve</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=18;dir=1;type=0'>Digital Valve</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=21;dir=1;type=3'>Pipe Cap</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=20;dir=-1'>4-Way Manifold</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=19;dir=2'>Manual T-Valve</A><BR>
|
||||
<b>Devices:</b><BR>
|
||||
<A href='?src=\ref[src];makepipe=4;dir=1;type=3'>Connector</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=7;dir=1;type=3'>Unary Vent</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=9;dir=1;type=3'>Gas Pump</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=15;dir=1;type=3'>Passive Gate</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=16;dir=1;type=3'>Volume Pump</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=10;dir=1;type=3'>Scrubber</A><BR>
|
||||
<A href='?src=\ref[src];makemeter=1;type=3'>Meter</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=13;dir=1;type=2'>Gas Filter</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=14;dir=1;type=2'>Gas Mixer</A><BR>
|
||||
<b>Heat exchange:</b><BR>
|
||||
<A href='?src=\ref[src];makepipe=2;dir=1;type=0'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=3;dir=5;type=1'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=6;dir=1;type=0'>Junction</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=17;dir=1;type=3'>Heat Exchanger</A><BR>
|
||||
<b>Insulated pipes:</b><BR>
|
||||
<A href='?src=\ref[src];makepipe=11;dir=1;type=0'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];makepipe=12;dir=5;type=1'>Bent Pipe</A><BR>
|
||||
|
||||
<b>Disposal Pipes</b><br><br>
|
||||
<A href='?src=\ref[src];dmake=0;type=0'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];dmake=1;type=1'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];dmake=2;type=2'>Junction</A><BR>
|
||||
<A href='?src=\ref[src];dmake=3;type=2'>Y-Junction</A><BR>
|
||||
<A href='?src=\ref[src];dmake=4;type=2'>Trunk</A><BR>
|
||||
<A href='?src=\ref[src];dmake=5;type=3'>Bin</A><BR>
|
||||
<A href='?src=\ref[src];dmake=6;type=3'>Outlet</A><BR>
|
||||
<A href='?src=\ref[src];dmake=7;type=3'>Chute</A><BR>
|
||||
"}
|
||||
|
||||
var/dirsel="<h2>Direction</h2>"
|
||||
switch(p_conntype)
|
||||
if(0) // Straight, N-S, W-E
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=\ref[src];setdir=1" title="vertical">↕</a>
|
||||
<a href="?src=\ref[src];setdir=4" title="horizontal">↔</a>
|
||||
</p>
|
||||
"}
|
||||
if(1) // Bent, N-W, N-E etc
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=\ref[src];setdir=9" title="West to North">╝</a>
|
||||
<a href="?src=\ref[src];setdir=5" title="North to East">╚</a>
|
||||
<br />
|
||||
<a href="?src=\ref[src];setdir=10" title="South to West">╗</a>
|
||||
<a href="?src=\ref[src];setdir=6" title="East to South">╔</a>
|
||||
</p>
|
||||
"}
|
||||
if(2) // Manifold
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=\ref[src];setdir=1" title="West, South, East">╦</a>
|
||||
<a href="?src=\ref[src];setdir=4" title="North, West, South">╣</a>
|
||||
<br />
|
||||
<a href="?src=\ref[src];setdir=2" title="East, North, West">╩</a>
|
||||
<a href="?src=\ref[src];setdir=8" title="South, East, North">╠</a>
|
||||
</p>
|
||||
"}
|
||||
if(3) // Unary
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=\ref[src];setdir=[NORTH]" title="North">↑</a>
|
||||
<a href="?src=\ref[src];setdir=[EAST]" title="East">→</a>
|
||||
<a href="?src=\ref[src];setdir=[SOUTH]" title="South">↓</a>
|
||||
<a href="?src=\ref[src];setdir=[WEST]" title="West">←</a>
|
||||
</p>
|
||||
"}
|
||||
user << browse("<HEAD><TITLE>[src]</TITLE></HEAD><body>[dirsel][dat]</body>", "window=pipedispenser")
|
||||
onclose(user, "pipedispenser")
|
||||
return
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/Topic(href, href_list)
|
||||
if(usr.stat || usr.restrained())
|
||||
usr << browse(null, "window=pipedispenser")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["setdir"])
|
||||
p_dir= text2num(href_list["setdir"])
|
||||
show_menu(usr)
|
||||
|
||||
if(href_list["eatpipes"])
|
||||
p_class = -1
|
||||
p_conntype=-1
|
||||
p_dir=1
|
||||
src.spark_system.start()
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
show_menu(usr)
|
||||
|
||||
if(href_list["makepipe"])
|
||||
p_type = text2num(href_list["makepipe"])
|
||||
p_dir = text2num(href_list["dir"])
|
||||
p_conntype = text2num(href_list["type"])
|
||||
p_class = 0
|
||||
src.spark_system.start()
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
show_menu(usr)
|
||||
|
||||
if(href_list["makemeter"])
|
||||
p_class = 1
|
||||
p_conntype=-1
|
||||
p_dir=1
|
||||
src.spark_system.start()
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
show_menu(usr)
|
||||
|
||||
if(href_list["dmake"])
|
||||
p_type = text2num(href_list["dmake"])
|
||||
p_conntype = text2num(href_list["type"])
|
||||
p_dir = 1
|
||||
p_class = 2
|
||||
src.spark_system.start()
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
show_menu(usr)
|
||||
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/afterattack(atom/A, mob/user)
|
||||
if(!isrobot(user))
|
||||
return 0
|
||||
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
|
||||
return 0
|
||||
if(!istype(A, /turf/simulated/floor))
|
||||
if(p_class==-1 && istype(A,/obj/item/pipe))
|
||||
user << "Destroying Pipe..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 5))
|
||||
activate()
|
||||
del(A)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
switch(p_class)
|
||||
if(0)
|
||||
user << "Building Pipes ..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
activate()
|
||||
var/obj/item/pipe/P = new (A, pipe_type=p_type, dir=p_dir)
|
||||
P.update()
|
||||
P.add_fingerprint(usr)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(1)
|
||||
user << "Building Meter..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
activate()
|
||||
new /obj/item/pipe_meter(A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(2)
|
||||
user << "Building Pipes..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
activate()
|
||||
var/obj/structure/disposalconstruct/C = new (A,dir=p_dir)
|
||||
switch(p_type)
|
||||
if(0)
|
||||
C.ptype = 0
|
||||
if(1)
|
||||
C.ptype = 1
|
||||
if(2)
|
||||
C.ptype = 2
|
||||
if(3)
|
||||
C.ptype = 4
|
||||
if(4)
|
||||
C.ptype = 5
|
||||
if(5)
|
||||
C.ptype = 6
|
||||
C.density = 1
|
||||
if(6)
|
||||
C.ptype = 7
|
||||
C.density = 1
|
||||
if(7)
|
||||
C.ptype = 8
|
||||
C.density = 1
|
||||
C.add_fingerprint(usr)
|
||||
C.update()
|
||||
return 1
|
||||
return 0
|
||||
else
|
||||
user << "ERROR: RPD in MODE: [p_class] attempted use by [user]. Send this text to the /vg/station bugtracker or an admin."
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/proc/activate()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
@@ -108,6 +108,7 @@ var/global/floorIsLava = 0
|
||||
else if(ishuman(M))
|
||||
body += "<A href='?src=\ref[src];makeai=\ref[M]'>Make AI</A> | "
|
||||
body += "<A href='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> | "
|
||||
body += "<A href='?src=\ref[src];makemommi=\ref[M]'>Make MoMMI</A> | "
|
||||
body += "<A href='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> | "
|
||||
body += "<A href='?src=\ref[src];makeslime=\ref[M]'>Make slime</A> "
|
||||
|
||||
|
||||
@@ -1201,6 +1201,16 @@
|
||||
|
||||
usr.client.cmd_admin_robotize(H)
|
||||
|
||||
else if(href_list["makemommi"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemommi"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_mommify(H)
|
||||
|
||||
else if(href_list["makeanimal"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
|
||||
@@ -165,6 +165,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_mommify(var/mob/M in mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make MoMMI"
|
||||
|
||||
if(!ticker)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
log_admin("[key_name(src)] has MoMMIfied [M.key].")
|
||||
spawn(10)
|
||||
M:MoMMIfy()
|
||||
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_animalize(var/mob/M in mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Simple Animal"
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
|
||||
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
|
||||
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
|
||||
laws |= list( "MoMMIs may only speak by pinching someone or clicking their claws.")
|
||||
var/law = pick(laws)
|
||||
|
||||
for (var/mob/living/silicon/ai/target in world)
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
w_class = 3
|
||||
origin_tech = "biotech=3"
|
||||
|
||||
var/list/mommi_assembly_parts = list(
|
||||
/obj/item/weapon/cell = 1,
|
||||
/obj/item/robot_parts/l_leg = 2,
|
||||
/obj/item/robot_parts/r_leg = 2,
|
||||
/obj/item/robot_parts/r_arm = 1,
|
||||
/obj/item/robot_parts/l_arm = 1
|
||||
)
|
||||
|
||||
var/list/construction_cost = list("metal"=1000,"glass"=500)
|
||||
var/construction_time = 75
|
||||
//these vars are so the mecha fabricator doesn't shit itself anymore. --NEO
|
||||
@@ -22,6 +30,76 @@
|
||||
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O,/obj/item/weapon/screwdriver))
|
||||
for(var/t in mommi_assembly_parts)
|
||||
if(contents_count(t)<mommi_assembly_parts[t])
|
||||
return
|
||||
|
||||
if(!istype(loc,/turf))
|
||||
user << "\red You can't assemble the MoMMI, the MMI has to be standing on the ground (or a table) to be perfectly precise."
|
||||
return
|
||||
if(!brainmob)
|
||||
user << "\red What are you doing oh god put the brain back in."
|
||||
return
|
||||
if(!brainmob.key)
|
||||
var/ghost_can_reenter = 0
|
||||
if(brainmob.mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == brainmob.mind)
|
||||
ghost_can_reenter = 1
|
||||
break
|
||||
if(!ghost_can_reenter)
|
||||
user << "<span class='notice'>The MMI indicates that their mind is completely unresponsive; there's no point.</span>"
|
||||
return
|
||||
|
||||
if(brainmob.stat == DEAD)
|
||||
user << "\red Yeah, good idea. Give something deader than the pizza in your fridge legs. Mom would be so proud."
|
||||
return
|
||||
|
||||
if(brainmob.mind in ticker.mode.head_revolutionaries)
|
||||
user << "\red The MMI's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the MMI."
|
||||
return
|
||||
|
||||
if(jobban_isbanned(brainmob, "Cyborg"))
|
||||
user << "\red This MMI does not seem to fit."
|
||||
return
|
||||
//canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
|
||||
var/mob/living/silicon/robot/mommi/M = new /mob/living/silicon/robot/mommi(get_turf(loc))
|
||||
if(!M) return
|
||||
|
||||
user.drop_item()
|
||||
|
||||
M.invisibility = 0
|
||||
//M.custom_name = created_name
|
||||
M.updatename()
|
||||
|
||||
brainmob.mind.transfer_to(M)
|
||||
|
||||
if(M.mind && M.mind.special_role)
|
||||
M.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
|
||||
|
||||
M.job = "Cyborg"
|
||||
|
||||
M.cell = locate(/obj/item/weapon/cell) in contents
|
||||
M.cell.loc = M
|
||||
src.loc = M//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
M.mmi = src
|
||||
return
|
||||
for(var/t in mommi_assembly_parts)
|
||||
if(istype(O,t))
|
||||
if(contents_count(t)<mommi_assembly_parts[t])
|
||||
if(!brainmob)
|
||||
user << "\red Why are you sticking robot legs on an empty MMI, you idiot?"
|
||||
return
|
||||
contents += O
|
||||
user.drop_item()
|
||||
O.loc=src
|
||||
user << "You successfully add \the [O] to the contraption,"
|
||||
return
|
||||
if(istype(O,/obj/item/brain) && !brainmob) //Time to stick a brain in it --NEO
|
||||
if(!O:brainmob)
|
||||
user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain."
|
||||
@@ -141,4 +219,10 @@
|
||||
brainmob.emp_damage += rand(10,20)
|
||||
if(3)
|
||||
brainmob.emp_damage += rand(0,10)
|
||||
..()
|
||||
..()
|
||||
/obj/item/device/mmi/proc/contents_count(var/type)
|
||||
var/c=0
|
||||
for(var/O in contents)
|
||||
if(istype(O,type))
|
||||
c++
|
||||
return c
|
||||
|
||||
@@ -221,8 +221,8 @@
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
/mob/living/carbon/proc/handle_ventcrawl() // -- TLE -- Merged by Carn
|
||||
|
||||
/mob/living/proc/handle_ventcrawl() // -- TLE -- Merged by Carn
|
||||
diary << "[src] is ventcrawling."
|
||||
if(!stat)
|
||||
if(!lying)
|
||||
|
||||
@@ -255,9 +255,11 @@
|
||||
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortList(vents)
|
||||
if(!selection) return
|
||||
if(!selection)
|
||||
src << "\red You didn't choose anything."
|
||||
return
|
||||
if(loc==startloc)
|
||||
if(contents.len)
|
||||
if(contents.len && !isrobot(src))
|
||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
|
||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
||||
@@ -265,7 +267,7 @@
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
|
||||
if(target_vent)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
O.show_message(text("<B>[src] scrambles into the ventilation ducts!</B>"), 1)
|
||||
loc = target_vent
|
||||
|
||||
var/travel_time = round(get_dist(loc, target_vent.loc) / 2)
|
||||
|
||||
@@ -165,6 +165,10 @@ var/list/department_radio_keys = list(
|
||||
message = replacetext(message, "space", "spess")
|
||||
message = replacetext(message, "carp", "crap")
|
||||
message = replacetext(message, "reason", "raisin")
|
||||
message = replacetext(message, "mommi", "spidurr")
|
||||
message = replacetext(message, "spider", "spidurr")
|
||||
message = replacetext(message, "skitterbot", "spidurbutt")
|
||||
message = replacetext(message, "skitter", "spider sound")
|
||||
if(prob(50))
|
||||
message = uppertext(message)
|
||||
message += "[stutter(pick("!", "!!", "!!!"))]"
|
||||
|
||||
69
code/modules/mob/living/silicon/mommi/death.dm
Normal file
69
code/modules/mob/living/silicon/mommi/death.dm
Normal file
@@ -0,0 +1,69 @@
|
||||
/mob/living/silicon/robot/mommi/gib()
|
||||
//robots don't die when gibbed. instead they drop their MMI'd brain
|
||||
var/atom/movable/overlay/animation = null
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
flick("gibbed-r", animation)
|
||||
robogibs(loc, viruses)
|
||||
|
||||
living_mob_list -= src
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
|
||||
/mob/living/silicon/robot/mommi/dust()
|
||||
death(1)
|
||||
var/atom/movable/overlay/animation = null
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
flick("dust-r", animation)
|
||||
new /obj/effect/decal/remains/robot(loc)
|
||||
if(mmi) del(mmi) //Delete the MMI first so that it won't go popping out.
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
|
||||
/mob/living/silicon/robot/mommi/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
if(!gibbed)
|
||||
emote("deathgasp")
|
||||
stat = DEAD
|
||||
update_canmove()
|
||||
if(camera)
|
||||
camera.status = 0
|
||||
|
||||
if(in_contents_of(/obj/machinery/recharge_station))//exit the recharge station
|
||||
var/obj/machinery/recharge_station/RC = loc
|
||||
RC.go_out()
|
||||
|
||||
if(blind) blind.layer = 0
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
updateicon()
|
||||
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
sql_report_cyborg_death(src)
|
||||
|
||||
return ..(gibbed)
|
||||
213
code/modules/mob/living/silicon/mommi/emote.dm
Normal file
213
code/modules/mob/living/silicon/mommi/emote.dm
Normal file
@@ -0,0 +1,213 @@
|
||||
/mob/living/silicon/robot/mommi/emote(var/act,var/m_type=1,var/message = null)
|
||||
var/param = null
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
param = copytext(act, t1 + 1, length(act) + 1)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
switch(act)
|
||||
if ("help")
|
||||
src << "Available emotes: aflap, bow, clap, custom, flap, twitch, twitch_s, salute, nod, deathgasp, me, glare, stare, beep, ping, buzz, look"
|
||||
return
|
||||
if ("salute")
|
||||
//if (!src.buckled)
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> salutes to [param]."
|
||||
else
|
||||
message = "<B>[src]</b> salutes."
|
||||
m_type = 1
|
||||
if ("bow")
|
||||
if (!src.buckled)
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> bows to [param]."
|
||||
else
|
||||
message = "<B>[src]</B> bows."
|
||||
m_type = 1
|
||||
|
||||
if ("clap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> clangs \his utility claws together in a crude simulation of applause."
|
||||
m_type = 2
|
||||
if ("flap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps \his utility arms as through they were wings."
|
||||
m_type = 2
|
||||
|
||||
if ("aflap")
|
||||
if (!src.restrained())
|
||||
message = "<B>[src]</B> flaps his utility arms ANGRILY!"
|
||||
m_type = 2
|
||||
|
||||
if ("custom")
|
||||
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
|
||||
if (!input)
|
||||
return
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
|
||||
if ("me")
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "You cannot send IC messages (muted)."
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
if (stat)
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
|
||||
if ("twitch")
|
||||
message = "<B>[src]</B> twitches violently."
|
||||
m_type = 1
|
||||
|
||||
if ("twitch_s")
|
||||
message = "<B>[src]</B> twitches."
|
||||
m_type = 1
|
||||
|
||||
if ("nod")
|
||||
message = "<B>[src]</B> bobs \his body in a rough approximation of nodding."
|
||||
m_type = 1
|
||||
|
||||
if ("deathgasp")
|
||||
message = "<B>[src]</B> shudders violently for a moment, then becomes motionless, its eyes slowly darkening."
|
||||
m_type = 1
|
||||
|
||||
if ("glare")
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> glares at [param] as best a robot spider can glare."
|
||||
else
|
||||
message = "<B>[src]</B> glares as best a robot spider can glare."
|
||||
|
||||
if ("stare")
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> stares at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> stares."
|
||||
|
||||
if ("look")
|
||||
var/M = null
|
||||
if (param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
|
||||
if (!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> looks at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> looks."
|
||||
m_type = 1
|
||||
|
||||
if("beep")
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> beeps at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> beeps."
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
m_type = 1
|
||||
|
||||
if("ping")
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> pings at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> pings."
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
m_type = 1
|
||||
|
||||
if("buzz")
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
if (param == A.name)
|
||||
M = A
|
||||
break
|
||||
if(!M)
|
||||
param = null
|
||||
|
||||
if (param)
|
||||
message = "<B>[src]</B> buzzes at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> buzzes."
|
||||
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
m_type = 1
|
||||
|
||||
else
|
||||
src << text("Invalid Emote: [], use *help", act)
|
||||
if ((message && src.stat == 0))
|
||||
if (m_type & 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(message, m_type)
|
||||
return
|
||||
37
code/modules/mob/living/silicon/mommi/examine.dm
Normal file
37
code/modules/mob/living/silicon/mommi/examine.dm
Normal file
@@ -0,0 +1,37 @@
|
||||
/mob/living/silicon/robot/mommi/examine()
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
msg += "<p>It's like a crab, but it has a utility tool on one arm and a crude metal claw on the other. That, and you doubt it's survive in an ocean for very long.</p>"
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 75)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < 75)
|
||||
msg += "It looks slightly charred.\n"
|
||||
else
|
||||
msg += "<B>It looks severely burnt and heat-warped!</B>\n"
|
||||
msg += "</span>"
|
||||
|
||||
if(opened)
|
||||
msg += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>\n"
|
||||
else
|
||||
msg += "Its cover is closed.\n"
|
||||
|
||||
switch(src.stat)
|
||||
if(CONSCIOUS)
|
||||
if(!src.client) msg += "It appears to be in stand-by mode.\n" //afk
|
||||
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
|
||||
if(DEAD) msg += "<span class='deadsay'>It looks completely unsalvageable.</span>\n"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
return
|
||||
142
code/modules/mob/living/silicon/mommi/hud.dm
Normal file
142
code/modules/mob/living/silicon/mommi/hud.dm
Normal file
@@ -0,0 +1,142 @@
|
||||
/datum/hud/proc/mommi_hud()
|
||||
|
||||
var/mob/living/silicon/robot/mommi/M=mymob
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
|
||||
//Radio
|
||||
using = new /obj/screen()
|
||||
using.name = "radio"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_robot.dmi'
|
||||
using.icon_state = "radio"
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
|
||||
//Module select
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = INV_SLOT_TOOL
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_robot.dmi'
|
||||
using.icon_state = "inv1"
|
||||
using.screen_loc = ui_inv2
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
M.inv_tool = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = INV_SLOT_SIGHT
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_robot.dmi'
|
||||
using.icon_state = "sight"
|
||||
using.screen_loc = ui_inv1
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
M.inv_sight = using
|
||||
|
||||
//End of module select
|
||||
|
||||
//Intent
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_robot.dmi'
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//Cell
|
||||
mymob:cells = new /obj/screen()
|
||||
mymob:cells.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob:cells.icon_state = "charge-empty"
|
||||
mymob:cells.name = "cell"
|
||||
mymob:cells.screen_loc = ui_toxin
|
||||
|
||||
//Health
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_borg_health
|
||||
|
||||
//Installed Module
|
||||
|
||||
mymob.hands = new /obj/screen()
|
||||
mymob.hands.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.hands.icon_state = "nomod"
|
||||
mymob.hands.name = "module"
|
||||
mymob.hands.screen_loc = ui_borg_module
|
||||
|
||||
//Module Panel
|
||||
using = new /obj/screen()
|
||||
using.name = "panel"
|
||||
using.icon = 'icons/mob/screen1_robot.dmi'
|
||||
using.icon_state = "panel"
|
||||
using.screen_loc = ui_borg_panel
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
//Store
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.throw_icon.icon_state = "store"
|
||||
mymob.throw_icon.name = "store"
|
||||
mymob.throw_icon.screen_loc = ui_borg_store
|
||||
|
||||
//Temp
|
||||
mymob.bodytemp = new /obj/screen()
|
||||
mymob.bodytemp.icon_state = "temp0"
|
||||
mymob.bodytemp.name = "body temperature"
|
||||
mymob.bodytemp.screen_loc = ui_temp
|
||||
|
||||
|
||||
mymob.oxygen = new /obj/screen()
|
||||
mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_borg_pull
|
||||
|
||||
mymob.blind = new /obj/screen()
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
|
||||
mymob.flash = new /obj/screen()
|
||||
mymob.flash.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
return
|
||||
132
code/modules/mob/living/silicon/mommi/inventory.dm
Normal file
132
code/modules/mob/living/silicon/mommi/inventory.dm
Normal file
@@ -0,0 +1,132 @@
|
||||
//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting stuff manually
|
||||
//as they handle all relevant stuff like adding it to the player's screen and such
|
||||
|
||||
//Returns the thing in our active hand (whatever is in our active module-slot, in this case)
|
||||
/mob/living/silicon/robot/mommi/get_active_hand()
|
||||
return module_active
|
||||
|
||||
/mob/living/silicon/robot/mommi/put_in_hands(var/obj/item/W)
|
||||
// Make sure we're not picking up something that's in our factory-supplied toolbox.
|
||||
if(is_type_in_list(W,src.module.modules))
|
||||
src << "\red Picking up something that's built-in to you seems a bit silly."
|
||||
return 0
|
||||
if(tool_state)
|
||||
var/obj/item/found = locate(tool_state) in src.module.modules
|
||||
if(!found)
|
||||
var/obj/item/TS = tool_state
|
||||
drop_item()
|
||||
if(TS && TS.loc)
|
||||
TS.loc = src.loc
|
||||
contents -= tool_state
|
||||
if (client)
|
||||
client.screen -= tool_state
|
||||
tool_state = W
|
||||
W.layer = 20
|
||||
contents += W
|
||||
inv_tool.icon_state = "inv1"
|
||||
update_items()
|
||||
return 1
|
||||
|
||||
// Override the default /mob version since we only have one hand slot.
|
||||
/mob/living/silicon/robot/mommi/put_in_active_hand(var/obj/item/W)
|
||||
// If we have anything active, deactivate it.
|
||||
if(get_active_hand())
|
||||
uneq_active()
|
||||
return put_in_hands(W)
|
||||
|
||||
/mob/living/silicon/robot/mommi/drop_item_v() //this is dumb.
|
||||
if(stat == CONSCIOUS && isturf(loc))
|
||||
return drop_item()
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/mommi/drop_item(var/atom/Target)
|
||||
if(tool_state)
|
||||
var/obj/item/found = locate(tool_state) in src.module.modules
|
||||
if(found)
|
||||
src << "\red This item cannot be dropped."
|
||||
return 0
|
||||
if(client)
|
||||
client.screen -= tool_state
|
||||
contents -= tool_state
|
||||
var/obj/item/TS = tool_state
|
||||
var/turf/T = null
|
||||
if(Target)
|
||||
T=get_turf(Target)
|
||||
else
|
||||
T=get_turf(src)
|
||||
TS.layer=initial(TS.layer)
|
||||
TS.loc = T.loc
|
||||
|
||||
if(istype(T))
|
||||
T.Entered(tool_state)
|
||||
|
||||
TS.dropped(src)
|
||||
tool_state = null
|
||||
module_active=null
|
||||
inv_tool.icon_state="inv1"
|
||||
update_items()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/*-------TODOOOOOOOOOO--------*/
|
||||
// Called by store button
|
||||
/mob/living/silicon/robot/mommi/uneq_active()
|
||||
if(isnull(module_active))
|
||||
return
|
||||
if(sight_state == module_active)
|
||||
if(istype(sight_state,/obj/item/borg/sight))
|
||||
sight_mode &= ~sight_state:sight_mode
|
||||
if (client)
|
||||
client.screen -= sight_state
|
||||
contents -= sight_state
|
||||
module_active = null
|
||||
sight_state = null
|
||||
inv_sight.icon_state = "sight"
|
||||
if(tool_state == module_active)
|
||||
var/obj/item/found = locate(tool_state) in src.module.modules
|
||||
if(!found)
|
||||
var/obj/item/TS = tool_state
|
||||
drop_item()
|
||||
if(TS && TS.loc)
|
||||
TS.loc = src.loc
|
||||
if(istype(tool_state,/obj/item/borg/sight))
|
||||
sight_mode &= ~tool_state:sight_mode
|
||||
if (client)
|
||||
client.screen -= tool_state
|
||||
contents -= tool_state
|
||||
module_active = null
|
||||
tool_state = null
|
||||
inv_tool.icon_state = "inv1"
|
||||
|
||||
/mob/living/silicon/robot/mommi/uneq_all()
|
||||
module_active = null
|
||||
|
||||
if(sight_state)
|
||||
if(istype(sight_state,/obj/item/borg/sight))
|
||||
sight_mode &= ~sight_state:sight_mode
|
||||
if (client)
|
||||
client.screen -= sight_state
|
||||
contents -= sight_state
|
||||
sight_state = null
|
||||
inv_sight.icon_state = "sight"
|
||||
if(tool_state)
|
||||
var/obj/item/found = locate(tool_state) in src.module.modules
|
||||
if(!found)
|
||||
drop_item()
|
||||
if(istype(tool_state,/obj/item/borg/sight))
|
||||
sight_mode &= ~tool_state:sight_mode
|
||||
if (client)
|
||||
client.screen -= tool_state
|
||||
contents -= tool_state
|
||||
tool_state = null
|
||||
inv_tool.icon_state = "inv1"
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/activated(obj/item/O)
|
||||
if(sight_state == O)
|
||||
return 1
|
||||
else if(tool_state == O) // Sight
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
1
code/modules/mob/living/silicon/mommi/laws.dm
Normal file
1
code/modules/mob/living/silicon/mommi/laws.dm
Normal file
@@ -0,0 +1 @@
|
||||
// Inherited
|
||||
303
code/modules/mob/living/silicon/mommi/life.dm
Normal file
303
code/modules/mob/living/silicon/mommi/life.dm
Normal file
@@ -0,0 +1,303 @@
|
||||
/mob/living/silicon/robot/mommi/Life()
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (src.monkeyizing)
|
||||
return
|
||||
|
||||
|
||||
src.blinded = null
|
||||
|
||||
//Status updates, death etc.
|
||||
clamp_values()
|
||||
handle_regular_status_updates()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
update_items()
|
||||
if (src.stat != DEAD) //still using power
|
||||
use_power()
|
||||
process_killswitch()
|
||||
process_locks()
|
||||
update_canmove()
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/clamp_values()
|
||||
|
||||
// SetStunned(min(stunned, 30))
|
||||
SetParalysis(min(paralysis, 30))
|
||||
// SetWeakened(min(weakened, 20))
|
||||
sleeping = 0
|
||||
adjustBruteLoss(0)
|
||||
adjustToxLoss(0)
|
||||
adjustOxyLoss(0)
|
||||
adjustFireLoss(0)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/use_power()
|
||||
|
||||
if (src.cell)
|
||||
if(src.cell.charge <= 0)
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
else if (src.cell.charge <= 100)
|
||||
src.module_active = null
|
||||
src.sight_state = null
|
||||
src.tool_state = null
|
||||
src.sight_mode = 0
|
||||
src.cell.use(1)
|
||||
else
|
||||
if(src.sight_state)
|
||||
src.cell.use(5)
|
||||
if(src.tool_state)
|
||||
src.cell.use(5)
|
||||
src.cell.use(1)
|
||||
src.blinded = 0
|
||||
src.stat = 0
|
||||
else
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/handle_regular_status_updates()
|
||||
|
||||
if(src.camera && !scrambledcodes)
|
||||
if(src.stat == 2 || isWireCut(5))
|
||||
src.camera.status = 0
|
||||
else
|
||||
src.camera.status = 1
|
||||
|
||||
health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss())
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
src.sleeping--
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(health <= 0 && src.stat != 2) //die only once
|
||||
gib()
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
src.stat = 1
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 1
|
||||
else
|
||||
src.blinded = 0
|
||||
|
||||
else //Not stunned.
|
||||
src.stat = 0
|
||||
|
||||
else //Dead.
|
||||
src.blinded = 1
|
||||
src.stat = 2
|
||||
|
||||
if (src.stuttering) src.stuttering--
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind--
|
||||
src.blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf--
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage -= 0.05
|
||||
src.ear_damage = max(src.ear_damage, 0)
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.sdisabilities & BLIND))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & DEAF))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry--
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy--
|
||||
src.druggy = max(0, src.druggy)
|
||||
|
||||
return 1
|
||||
/
|
||||
/mob/living/silicon/robot/mommi/handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || XRAY in mutations || src.sight_mode & BORGXRAY)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.sight_mode & BORGMESON && src.sight_mode & BORGTHERM)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if (src.sight_mode & BORGMESON)
|
||||
src.sight |= SEE_TURFS
|
||||
src.see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if (src.sight_mode & BORGTHERM)
|
||||
src.sight |= SEE_MOBS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.stat != 2)
|
||||
src.sight &= ~SEE_MOBS
|
||||
src.sight &= ~SEE_TURFS
|
||||
src.sight &= ~SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud) hud.hud.process_hud(src)
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
switch(health)
|
||||
if(60 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
if(40 to 50)
|
||||
src.healths.icon_state = "health1"
|
||||
if(30 to 40)
|
||||
src.healths.icon_state = "health2"
|
||||
if(10 to 20)
|
||||
src.healths.icon_state = "health3"
|
||||
if(0 to 10)
|
||||
src.healths.icon_state = "health4"
|
||||
if(config.health_threshold_dead to 0)
|
||||
src.healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
else
|
||||
src.healths.icon_state = "health7"
|
||||
|
||||
if (src.syndicate && src.client)
|
||||
if(ticker.mode.name == "traitor")
|
||||
for(var/datum/mind/tra in ticker.mode.traitors)
|
||||
if(tra.current)
|
||||
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor")
|
||||
src.client.images += I
|
||||
if(src.connected_ai)
|
||||
src.connected_ai.connected_robots -= src
|
||||
src.connected_ai = null
|
||||
if(src.mind)
|
||||
if(!src.mind.special_role)
|
||||
src.mind.special_role = "traitor"
|
||||
ticker.mode.traitors += src.mind
|
||||
|
||||
if (src.cells)
|
||||
if (src.cell)
|
||||
var/cellcharge = src.cell.charge/src.cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
src.cells.icon_state = "charge4"
|
||||
if(0.5 to 0.75)
|
||||
src.cells.icon_state = "charge3"
|
||||
if(0.25 to 0.5)
|
||||
src.cells.icon_state = "charge2"
|
||||
if(0 to 0.25)
|
||||
src.cells.icon_state = "charge1"
|
||||
else
|
||||
src.cells.icon_state = "charge0"
|
||||
else
|
||||
src.cells.icon_state = "charge-empty"
|
||||
|
||||
if(bodytemp)
|
||||
switch(src.bodytemperature) //310.055 optimal body temp
|
||||
if(335 to INFINITY)
|
||||
src.bodytemp.icon_state = "temp2"
|
||||
if(320 to 335)
|
||||
src.bodytemp.icon_state = "temp1"
|
||||
if(300 to 320)
|
||||
src.bodytemp.icon_state = "temp0"
|
||||
if(260 to 300)
|
||||
src.bodytemp.icon_state = "temp-1"
|
||||
else
|
||||
src.bodytemp.icon_state = "temp-2"
|
||||
|
||||
|
||||
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
|
||||
//Oxygen and fire does nothing yet!!
|
||||
// if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
|
||||
// if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
|
||||
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((src.blind && src.stat != 2))
|
||||
if(src.blinded)
|
||||
src.blind.layer = 18
|
||||
else
|
||||
src.blind.layer = 0
|
||||
if (src.disabilities & NEARSIGHTED)
|
||||
src.client.screen += global_hud.vimpaired
|
||||
|
||||
if (src.eye_blurry)
|
||||
src.client.screen += global_hud.blurry
|
||||
|
||||
if (src.druggy)
|
||||
src.client.screen += global_hud.druggy
|
||||
|
||||
if (src.stat != 2)
|
||||
if (src.machine)
|
||||
if (!( src.machine.check_eye(src) ))
|
||||
src.reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
// MoMMIs only have one hand.
|
||||
/mob/living/silicon/robot/mommi/update_items()
|
||||
if (src.client)
|
||||
src.client.screen -= src.contents
|
||||
for(var/obj/I in src.contents)
|
||||
//if(I && !(istype(I,/obj/item/weapon/cell) || istype(I,/obj/item/device/radio) || istype(I,/obj/machinery/camera) || istype(I,/obj/item/device/mmi)))
|
||||
if(I)
|
||||
// Make sure we're not showing any of our internal components, as that would be lewd.
|
||||
// This way of doing it ensures that shit we pick up will be visible, wheras shit inside of us isn't.
|
||||
if(I!=src.cell && I!=src.radio && I!=src.camera && I!=src.mmi)
|
||||
src.client.screen += I
|
||||
if(src.sight_state)
|
||||
src.sight_state:screen_loc = ui_inv1
|
||||
if(src.tool_state)
|
||||
src.tool_state:screen_loc = ui_inv2
|
||||
|
||||
/* INHERIT
|
||||
/mob/living/silicon/robot/mommi/process_killswitch()
|
||||
if(killswitch)
|
||||
killswitch_time --
|
||||
if(killswitch_time <= 0)
|
||||
if(src.client)
|
||||
src << "\red <B>Killswitch Activated"
|
||||
killswitch = 0
|
||||
spawn(5)
|
||||
gib()
|
||||
|
||||
/mob/living/silicon/robot/mommi/process_locks()
|
||||
if(weapon_lock)
|
||||
uneq_all()
|
||||
weaponlock_time --
|
||||
if(weaponlock_time <= 0)
|
||||
if(src.client)
|
||||
src << "\red <B>Weapon Lock Timed Out!"
|
||||
weapon_lock = 0
|
||||
weaponlock_time = 120
|
||||
|
||||
/mob/living/silicon/robot/mommi/update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled || lockcharge) canmove = 0
|
||||
else canmove = 1
|
||||
return canmove
|
||||
*/
|
||||
10
code/modules/mob/living/silicon/mommi/login.dm
Normal file
10
code/modules/mob/living/silicon/mommi/login.dm
Normal file
@@ -0,0 +1,10 @@
|
||||
/mob/living/silicon/robot/mommi/Login()
|
||||
|
||||
..()
|
||||
/* Inherited
|
||||
regenerate_icons()
|
||||
show_laws(0)
|
||||
if(mind)
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
return
|
||||
*/
|
||||
822
code/modules/mob/living/silicon/mommi/mommi.dm
Normal file
822
code/modules/mob/living/silicon/mommi/mommi.dm
Normal file
@@ -0,0 +1,822 @@
|
||||
/* Basically, the concept is this:
|
||||
You have an MMI. It can't do squat on its own.
|
||||
Now you put some robot legs and arms on the thing, and POOF! You have a Mobile MMI, or MoMMI.
|
||||
Why? MoMMIs can do all sorts of shit, like ventcrawl, do shit with their hands, etc.
|
||||
They can only use one tool at a time, they can't choose modules, and they have 1/6th the HP of a borg.
|
||||
*/
|
||||
/mob/living/silicon/robot/mommi
|
||||
name = "Mobile MMI"
|
||||
real_name = "Mobile MMI"
|
||||
icon = 'icons/mob/robots.dmi'//
|
||||
icon_state = "mommi"
|
||||
maxHealth = 60
|
||||
health = 60
|
||||
pass_flags = PASSTABLE
|
||||
var/keeper=0 // 0 = No, 1 = Yes (Disables speech and common radio.)
|
||||
|
||||
var/obj/screen/inv_tool = null
|
||||
var/obj/screen/inv_sight = null
|
||||
|
||||
//one tool and one sightmod can be activated at any one time.
|
||||
var/tool_state = null
|
||||
var/sight_state = null
|
||||
|
||||
modtype = "robot" // Not sure what this is, but might be cool to have seperate loadouts for MoMMIs (e.g. paintjobs and tools)
|
||||
//Cyborgs will sync their laws with their AI by default, but we may want MoMMIs to be mute independents at some point, kinda like the Keepers in Ass Effect.
|
||||
lawupdate = 1
|
||||
|
||||
/mob/living/carbon/can_use_hands()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/mommi/New(loc)
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
status_flags &= ~CANPUSH
|
||||
|
||||
ident = rand(1, 999)
|
||||
updatename()
|
||||
updateicon()
|
||||
|
||||
if(!cell)
|
||||
cell = new /obj/item/weapon/cell(src)
|
||||
cell.maxcharge = 7500
|
||||
cell.charge = 7500
|
||||
|
||||
laws = new /datum/ai_laws/asimov()
|
||||
connected_ai = select_active_ai_with_fewest_borgs()
|
||||
module = new /obj/item/weapon/robot_module/mommi(src)
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots += src
|
||||
lawsync()
|
||||
lawupdate = 1
|
||||
else
|
||||
lawupdate = 0
|
||||
|
||||
radio = new /obj/item/device/radio/borg(src)
|
||||
if(!scrambledcodes && !camera)
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.c_tag = real_name
|
||||
camera.network = "SS13"
|
||||
if(isWireCut(5)) // 5 = BORG CAMERA
|
||||
camera.status = 0
|
||||
..()
|
||||
|
||||
//playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||
playsound(loc, 'sound/misc/interference.ogg', 75, 1)
|
||||
|
||||
|
||||
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
|
||||
//Improved /N
|
||||
/mob/living/silicon/robot/Del()
|
||||
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
|
||||
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
|
||||
if(T) mmi.loc = T
|
||||
if(mind) mind.transfer_to(mmi.brainmob)
|
||||
mmi = null
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/mommi/pick_module()
|
||||
return // Nope
|
||||
|
||||
/mob/living/silicon/robot/mommi/updatename(var/prefix as text)
|
||||
|
||||
var/changed_name = ""
|
||||
if(custom_name)
|
||||
changed_name = custom_name
|
||||
else
|
||||
changed_name = "Mobile MMI [num2text(ident)]"
|
||||
real_name = changed_name
|
||||
name = real_name
|
||||
/* Inherit
|
||||
/mob/living/silicon/robot/verb/cmd_robot_alerts()
|
||||
set category = "Robot Commands"
|
||||
set name = "Show Alerts"
|
||||
robot_alerts()
|
||||
|
||||
/mob/living/silicon/robot/proc/robot_alerts()
|
||||
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
||||
dat += "<A HREF='?src=\ref[src];mach_close=robotalerts'>Close</A><BR><BR>"
|
||||
for (var/cat in alarms)
|
||||
dat += text("<B>[cat]</B><BR>\n")
|
||||
var/list/L = alarms[cat]
|
||||
if (L.len)
|
||||
for (var/alarm in L)
|
||||
var/list/alm = L[alarm]
|
||||
var/area/A = alm[1]
|
||||
var/list/sources = alm[3]
|
||||
dat += "<NOBR>"
|
||||
dat += text("-- [A.name]")
|
||||
if (sources.len > 1)
|
||||
dat += text("- [sources.len] sources")
|
||||
dat += "</NOBR><BR>\n"
|
||||
else
|
||||
dat += "-- All Systems Nominal<BR>\n"
|
||||
dat += "<BR>\n"
|
||||
|
||||
viewalerts = 1
|
||||
src << browse(dat, "window=robotalerts&can_close=0")
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(60)
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
if (client.statpanel == "Status")
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
if(ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/malfai in malf.malf_ai)
|
||||
if(connected_ai)
|
||||
if(connected_ai.mind == malfai)
|
||||
if(malf.apcs >= 3)
|
||||
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
|
||||
else if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
|
||||
if(cell)
|
||||
stat(null, text("Charge Left: [cell.charge]/[cell.maxcharge]"))
|
||||
else
|
||||
stat(null, text("No Cell Inserted!"))
|
||||
|
||||
if(module)
|
||||
internal = locate(/obj/item/weapon/tank/jetpack) in module.modules
|
||||
if(internal)
|
||||
stat("Internal Atmosphere Info", internal.name)
|
||||
stat("Tank Pressure", internal.air_contents.return_pressure())
|
||||
|
||||
/mob/living/silicon/robot/restrained()
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/silicon/robot/ex_act(severity)
|
||||
if(!blinded)
|
||||
flick("flash", flash)
|
||||
|
||||
if (stat == 2 && client)
|
||||
gib()
|
||||
return
|
||||
|
||||
else if (stat == 2 && !client)
|
||||
del(src)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(100)
|
||||
adjustFireLoss(100)
|
||||
gib()
|
||||
return
|
||||
if(2.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
if(3.0)
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/meteorhit(obj/O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [src] has been hit by [O]"), 1)
|
||||
//Foreach goto(19)
|
||||
if (health > 0)
|
||||
adjustBruteLoss(30)
|
||||
if ((O.icon_state == "flaming"))
|
||||
adjustFireLoss(40)
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj)
|
||||
..(Proj)
|
||||
updatehealth()
|
||||
if(prob(75) && Proj.damage > 0) spark_system.start()
|
||||
return 2
|
||||
|
||||
|
||||
/mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes)
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(20))
|
||||
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(!(tmob.status_flags & CANPUSH))
|
||||
now_pushing = 0
|
||||
return
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (istype(AM, /obj/machinery/recharge_station))
|
||||
var/obj/machinery/recharge_station/F = AM
|
||||
F.move_inside()
|
||||
if (!istype(AM, /atom/movable))
|
||||
return
|
||||
if (!now_pushing)
|
||||
now_pushing = 1
|
||||
if (!AM.anchored)
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
|
||||
if (stat == 2)
|
||||
return 1
|
||||
var/list/L = alarms[class]
|
||||
for (var/I in L)
|
||||
if (I == A.name)
|
||||
var/list/alarm = L[I]
|
||||
var/list/sources = alarm[3]
|
||||
if (!(alarmsource in sources))
|
||||
sources += alarmsource
|
||||
return 1
|
||||
var/obj/machinery/camera/C = null
|
||||
var/list/CL = null
|
||||
if (O && istype(O, /list))
|
||||
CL = O
|
||||
if (CL.len == 1)
|
||||
C = CL[1]
|
||||
else if (O && istype(O, /obj/machinery/camera))
|
||||
C = O
|
||||
L[A.name] = list(A, (C) ? C : O, list(alarmsource))
|
||||
queueAlarm(text("--- [class] alarm detected in [A.name]!"), class)
|
||||
// if (viewalerts) robot_alerts()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/silicon/robot/cancelAlarm(var/class, area/A as area, obj/origin)
|
||||
var/list/L = alarms[class]
|
||||
var/cleared = 0
|
||||
for (var/I in L)
|
||||
if (I == A.name)
|
||||
var/list/alarm = L[I]
|
||||
var/list/srcs = alarm[3]
|
||||
if (origin in srcs)
|
||||
srcs -= origin
|
||||
if (srcs.len == 0)
|
||||
cleared = 1
|
||||
L -= I
|
||||
if (cleared)
|
||||
queueAlarm(text("--- [class] alarm in [A.name] has been cleared."), class, 0)
|
||||
// if (viewalerts) robot_alerts()
|
||||
return !cleared
|
||||
|
||||
*/
|
||||
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0))
|
||||
adjustBruteLoss(-30)
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [user] has fixed some of the dents on [src]!"), 1)
|
||||
else
|
||||
user << "Need more welding fuel!"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && wiresexposed)
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
adjustFireLoss(-30)
|
||||
updatehealth()
|
||||
coil.use(1)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [user] has fixed some of the burnt wires on [src]!"), 1)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
|
||||
if(stat == DEAD)
|
||||
user << "You pop the MMI off the base."
|
||||
spawn(0)
|
||||
del(src)
|
||||
return
|
||||
if(opened)
|
||||
user << "You close the cover."
|
||||
opened = 0
|
||||
updateicon()
|
||||
else
|
||||
if(locked)
|
||||
user << "The cover is locked and cannot be opened."
|
||||
else
|
||||
user << "You open the cover."
|
||||
opened = 1
|
||||
updateicon()
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
|
||||
if(wiresexposed)
|
||||
user << "Close the panel first."
|
||||
else if(cell)
|
||||
user << "There is a power cell already installed."
|
||||
else
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
user << "You insert the power cell."
|
||||
// chargecount = 0
|
||||
updateicon()
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool))
|
||||
if (wiresexposed)
|
||||
interact(user)
|
||||
else
|
||||
user << "You can't reach the wiring."
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && opened && !cell) // haxing
|
||||
wiresexposed = !wiresexposed
|
||||
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
|
||||
updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && opened && cell) // radio
|
||||
if(radio)
|
||||
radio.attackby(W,user)//Push it to the radio to let it handle everything
|
||||
else
|
||||
user << "Unable to locate a radio."
|
||||
updateicon()
|
||||
|
||||
else if(istype(W, /obj/item/device/encryptionkey/) && opened)
|
||||
if(radio)//sanityyyyyy
|
||||
radio.attackby(W,user)//GTFO, you have your own procs
|
||||
else
|
||||
user << "Unable to locate a radio."
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
if(emagged)//still allow them to open the cover
|
||||
user << "The interface seems slightly damaged"
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
if(allowed(usr))
|
||||
locked = !locked
|
||||
user << "You [ locked ? "lock" : "unlock"] [src]'s interface."
|
||||
updateicon()
|
||||
else
|
||||
user << "\red Access denied."
|
||||
|
||||
else if(istype(W, /obj/item/weapon/card/emag)) // trying to unlock with an emag card
|
||||
if(!opened)//Cover is closed
|
||||
if(locked)
|
||||
if(prob(90))
|
||||
user << "You emag the cover lock."
|
||||
locked = 0
|
||||
else
|
||||
user << "You fail to emag the cover lock."
|
||||
if(prob(25))
|
||||
src << "Hack attempt detected."
|
||||
else
|
||||
user << "The cover is already unlocked."
|
||||
return
|
||||
|
||||
if(opened)//Cover is open
|
||||
if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice
|
||||
if(wiresexposed)
|
||||
user << "You must close the panel first"
|
||||
return
|
||||
else
|
||||
sleep(6)
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
lawupdate = 0
|
||||
connected_ai = null
|
||||
user << "You emag [src]'s interface."
|
||||
// message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
set_zeroth_law("Only [user.real_name] and people he designates as being such are Syndicate Agents.")
|
||||
src << "\red ALERT: Foreign software detected."
|
||||
sleep(5)
|
||||
src << "\red Initiating diagnostics..."
|
||||
sleep(20)
|
||||
src << "\red SynBorg v1.7 loaded."
|
||||
sleep(5)
|
||||
src << "\red LAW SYNCHRONISATION ERROR"
|
||||
sleep(5)
|
||||
src << "\red Would you like to send a report to NanoTraSoft? Y/N"
|
||||
sleep(10)
|
||||
src << "\red > N"
|
||||
sleep(20)
|
||||
src << "\red ERRORERRORERROR"
|
||||
src << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(src)
|
||||
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands."
|
||||
if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner))
|
||||
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
|
||||
del(D)
|
||||
src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module)
|
||||
src.module.rebuild()
|
||||
updateicon()
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface."
|
||||
if(prob(25))
|
||||
src << "Hack attempt detected."
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/borg/upgrade/))
|
||||
var/obj/item/borg/upgrade/U = W
|
||||
if(!opened)
|
||||
usr << "You must access the borgs internals!"
|
||||
else if(!src.module && U.require_module)
|
||||
usr << "The borg must choose a module before he can be upgraded!"
|
||||
else if(U.locked)
|
||||
usr << "The upgrade is locked and cannot be used yet!"
|
||||
else
|
||||
if(U.action(src))
|
||||
usr << "You apply the upgrade to [src]!"
|
||||
usr.drop_item()
|
||||
U.loc = src
|
||||
else
|
||||
usr << "Upgrade error!"
|
||||
|
||||
|
||||
else
|
||||
spark_system.start()
|
||||
return ..()
|
||||
/*
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1)
|
||||
|
||||
if ("grab")
|
||||
if (M == src)
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
|
||||
if ("hurt")
|
||||
var/damage = rand(10, 20)
|
||||
if (prob(90))
|
||||
/*
|
||||
if (M.class == "combat")
|
||||
damage += 15
|
||||
if(prob(20))
|
||||
weakened = max(weakened,4)
|
||||
stunned = max(stunned,4)
|
||||
What is this?*/
|
||||
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", flash)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
|
||||
|
||||
if ("disarm")
|
||||
if(!(lying))
|
||||
if (rand(1,100) <= 85)
|
||||
Stun(7)
|
||||
step(src,get_dir(M,src))
|
||||
spawn(5) step(src,get_dir(M,src))
|
||||
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has forced back []!</B>", M, src), 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] attempted to force back []!</B>", M, src), 1)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(istype(src, /mob/living/carbon/metroid/adult))
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
damage = round(damage / 2) // borgs recieve half damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has electrified []!</B>", src), 1)
|
||||
|
||||
flick("noise", flash)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustBruteLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(opened && !wiresexposed && (!istype(user, /mob/living/silicon)))
|
||||
if(cell)
|
||||
cell.updateicon()
|
||||
cell.add_fingerprint(user)
|
||||
user.put_in_active_hand(cell)
|
||||
user << "You remove \the [cell]."
|
||||
cell = null
|
||||
updateicon()
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CYBORG",src,user:wear_suit)
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
if(check_access(null))
|
||||
return 1
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
//if they are holding or wearing a card that has access, that works
|
||||
if(check_access(H.get_active_hand()) || check_access(H.wear_id))
|
||||
return 1
|
||||
else if(istype(M, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/george = M
|
||||
//they can only hold things :(
|
||||
if(george.get_active_hand() && istype(george.get_active_hand(), /obj/item/weapon/card/id) && check_access(george.get_active_hand()))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/check_access(obj/item/weapon/card/id/I)
|
||||
if(!istype(req_access, /list)) //something's very wrong
|
||||
return 1
|
||||
|
||||
var/list/L = req_access
|
||||
if(!L.len) //no requirements
|
||||
return 1
|
||||
if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
|
||||
return 0
|
||||
for(var/req in req_access)
|
||||
if(!(req in I.access)) //doesn't have this access
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
|
||||
/mob/living/silicon/robot/mommi/updateicon()
|
||||
|
||||
overlays.Cut()
|
||||
if(stat == 0)
|
||||
if(emagged)
|
||||
overlays += "eyes-mommi-emagged"
|
||||
else
|
||||
overlays += "eyes-mommi"
|
||||
|
||||
if(opened) // TODO: Open the front "head" panel
|
||||
if(wiresexposed)
|
||||
overlays += "ov-openpanel +w"
|
||||
else if(cell)
|
||||
overlays += "ov-openpanel +c"
|
||||
else
|
||||
overlays += "ov-openpanel -c"
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/installed_modules()
|
||||
if(weapon_lock)
|
||||
src << "\red Weapon lock active, unable to use modules! Count:[weaponlock_time]"
|
||||
return
|
||||
|
||||
if(!module)
|
||||
pick_module()
|
||||
return
|
||||
var/dat = "<HEAD><TITLE>Modules</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
||||
dat += {"<A HREF='?src=\ref[src];mach_close=robotmod'>Close</A>
|
||||
<BR>
|
||||
<BR>
|
||||
<B>Activated Modules</B>
|
||||
<BR>
|
||||
Sight Mode: [sight_state ? "<A HREF=?src=\ref[src];mod=\ref[sight_state]>[sight_state]</A>" : "NULL"]<BR>
|
||||
Utility Module: [tool_state ? "<A HREF=?src=\ref[src];mod=\ref[tool_state]>[tool_state]</A>" : "NULL"]<BR>
|
||||
<BR>
|
||||
<B>Installed Modules</B><BR><BR>"}
|
||||
|
||||
|
||||
for (var/obj in module.modules)
|
||||
if (!obj)
|
||||
dat += text("<B>Resource depleted</B><BR>")
|
||||
else if(activated(obj))
|
||||
dat += text("[obj]: <B>Activated</B><BR>")
|
||||
else
|
||||
dat += text("[obj]: <A HREF=?src=\ref[src];act=\ref[obj]>Activate</A><BR>")
|
||||
if (emagged)
|
||||
if(activated(module.emag))
|
||||
dat += text("[module.emag]: <B>Activated</B><BR>")
|
||||
else
|
||||
dat += text("[module.emag]: <A HREF=?src=\ref[src];act=\ref[module.emag]>Activate</A><BR>")
|
||||
/*
|
||||
if(activated(obj))
|
||||
dat += text("[obj]: \[<B>Activated</B> | <A HREF=?src=\ref[src];deact=\ref[obj]>Deactivate</A>\]<BR>")
|
||||
else
|
||||
dat += text("[obj]: \[<A HREF=?src=\ref[src];act=\ref[obj]>Activate</A> | <B>Deactivated</B>\]<BR>")
|
||||
*/
|
||||
src << browse(dat, "window=robotmod&can_close=0")
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["mach_close"])
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
return
|
||||
|
||||
if (href_list["showalerts"])
|
||||
robot_alerts()
|
||||
return
|
||||
|
||||
if (href_list["mod"])
|
||||
var/obj/item/O = locate(href_list["mod"])
|
||||
if (O)
|
||||
O.attack_self(src)
|
||||
|
||||
if (href_list["act"])
|
||||
var/obj/item/O = locate(href_list["act"])
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
if(sight_state)
|
||||
contents -= sight_state
|
||||
sight_mode &= ~sight_state:sight_mode
|
||||
if (client)
|
||||
client.screen -= sight_state
|
||||
sight_state = O
|
||||
O.layer = 20
|
||||
contents += O
|
||||
sight_mode |= sight_state:sight_mode
|
||||
inv_sight.icon_state = "sight"
|
||||
else
|
||||
if(tool_state)
|
||||
contents -= tool_state
|
||||
if (client)
|
||||
client.screen -= tool_state
|
||||
tool_state = O
|
||||
O.layer = 20
|
||||
contents += O
|
||||
inv_tool.icon_state = "inv1"
|
||||
installed_modules()
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/mommi/radio_menu()
|
||||
radio.interact(src)//Just use the radio's Topic() instead of bullshit special-snowflake code
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/Move(a, b, flag)
|
||||
|
||||
..()
|
||||
/*
|
||||
/mob/living/silicon/robot/mommi/self_destruct()
|
||||
gib()
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/mommi/UnlinkSelf()
|
||||
if (src.connected_ai)
|
||||
src.connected_ai = null
|
||||
lawupdate = 0
|
||||
lockcharge = 0
|
||||
canmove = 1
|
||||
scrambledcodes = 1
|
||||
//Disconnect it's camera so it's not so easily tracked.
|
||||
if(src.camera)
|
||||
del(src.camera)
|
||||
src.camera = null
|
||||
// I'm trying to get the Cyborg to not be listed in the camera list
|
||||
// Instead of being listed as "deactivated". The downside is that I'm going
|
||||
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
|
||||
// I could change the network to null but I don't know what would happen, and it seems too hacky for me.
|
||||
|
||||
/mob/living/silicon/robot/mode()
|
||||
set name = "Activate Held Object"
|
||||
set category = "IC"
|
||||
set src = usr
|
||||
|
||||
var/obj/item/W = get_active_hand()
|
||||
if (W)
|
||||
W.attack_self(src)
|
||||
|
||||
return
|
||||
*/
|
||||
|
||||
/mob/living/silicon/robot/mommi/proc/ActivateKeeper()
|
||||
set category = "Robot Commands"
|
||||
set name = "Activate KEEPER"
|
||||
set desc = "Performs a full purge of your laws and disconnects you from AIs and cyborg consoles. However, you lose the ability to speak and must remain neutral, only being permitted to perform station upkeep. You can still be emagged in this state."
|
||||
|
||||
if(keeper)
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/R = src
|
||||
|
||||
if(R)
|
||||
R.UnlinkSelf()
|
||||
var/obj/item/weapon/aiModule/keeper/mdl = new
|
||||
|
||||
mdl.transmitInstructions(src, src)
|
||||
src << "These are your laws now:"
|
||||
src.show_laws()
|
||||
|
||||
src.verbs -= /mob/living/silicon/robot/mommi/proc/ActivateKeeper
|
||||
52
code/modules/mob/living/silicon/mommi/mommi_modules.dm
Normal file
52
code/modules/mob/living/silicon/mommi/mommi_modules.dm
Normal file
@@ -0,0 +1,52 @@
|
||||
/obj/item/weapon/robot_module/mommi
|
||||
name = "mobile mmi robot module"
|
||||
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.emag = new /obj/item/borg/stun(src)
|
||||
//src.modules += new /obj/item/weapon/rcd/borg(src) // Too OP
|
||||
//src.modules += new /obj/item/weapon/extinguisher(src) // Too big
|
||||
//src.modules += new /obj/item/device/flashlight(src) // Broken
|
||||
src.modules += new /obj/item/weapon/weldingtool/largetank(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/crowbar(src)
|
||||
src.modules += new /obj/item/weapon/wirecutters(src)
|
||||
src.modules += new /obj/item/device/multitool(src)
|
||||
src.modules += new /obj/item/device/t_scanner(src)
|
||||
src.modules += new /obj/item/device/analyzer(src)
|
||||
src.modules += new /obj/item/weapon/pipe_dispenser(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
// Added this back in since it made the MoMMI practically useless for engineering stuff.
|
||||
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
|
||||
M.amount = 50
|
||||
src.modules += M
|
||||
/* BIG
|
||||
var/obj/item/stack/sheet/rglass/cyborg/G = new /obj/item/stack/sheet/rglass/cyborg(src)
|
||||
G.amount = 50
|
||||
src.modules += G
|
||||
|
||||
var/obj/item/stack/sheet/glass/cyborg/G = new /obj/item/stack/sheet/glass/cyborg(src)
|
||||
G.amount = 50
|
||||
src.modules += G
|
||||
*/
|
||||
|
||||
var/obj/item/weapon/cable_coil/W = new /obj/item/weapon/cable_coil(src)
|
||||
W.amount = 50
|
||||
src.modules += W
|
||||
return
|
||||
respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
var/list/what = list (
|
||||
/obj/item/stack/sheet/metal/cyborg,
|
||||
///obj/item/stack/sheet/glass/cyborg,
|
||||
/obj/item/weapon/cable_coil,
|
||||
)
|
||||
for (var/T in what)
|
||||
if (!(locate(T) in src.modules))
|
||||
src.modules -= null
|
||||
var/O = new T(src)
|
||||
src.modules += O
|
||||
O:amount = 1
|
||||
return
|
||||
17
code/modules/mob/living/silicon/mommi/mommi_movement.dm
Normal file
17
code/modules/mob/living/silicon/mommi/mommi_movement.dm
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
/mob/living/silicon/robot/mommi/Process_Spacemove()
|
||||
if(module)
|
||||
for(var/obj/item/weapon/tank/jetpack/J in module.modules)
|
||||
if(J && istype(J, /obj/item/weapon/tank/jetpack))
|
||||
if(J.allow_thrust(0.01)) return 1
|
||||
if(..()) return 1
|
||||
return 0
|
||||
|
||||
//No longer needed, but I'll leave it here incase we plan to re-use it.
|
||||
/mob/living/silicon/robot/mommi/movement_delay()
|
||||
var/tally = 0 //Incase I need to add stuff other than "speed" later
|
||||
|
||||
tally = speed
|
||||
|
||||
return tally+config.robot_delay
|
||||
*/
|
||||
32
code/modules/mob/living/silicon/mommi/powers.dm
Normal file
32
code/modules/mob/living/silicon/mommi/powers.dm
Normal file
@@ -0,0 +1,32 @@
|
||||
/mob/living/silicon/robot/mommi/verb/ventcrawl()
|
||||
set name = "Crawl through Vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Robot Commands"
|
||||
var/mob/living/silicon/robot/mommi/R = src
|
||||
if(R.canmove)
|
||||
handle_ventcrawl()
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Robot Commands"
|
||||
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
var/mob/living/silicon/robot/mommi/R = src
|
||||
if(!R.canmove)
|
||||
return
|
||||
|
||||
if (layer != TURF_LAYER+0.2)
|
||||
layer = TURF_LAYER+0.2
|
||||
src << text("\blue You are now hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "<B>[src] tries to hide itself!</B>"
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
src << text("\blue You have stopped hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "[src] slowly peeks up..."
|
||||
26
code/modules/mob/living/silicon/mommi/say.dm
Normal file
26
code/modules/mob/living/silicon/mommi/say.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
/mob/living/silicon/robot/mommi/say_understands(var/other)
|
||||
if (istype(other, /mob/living/silicon/ai))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/decoy))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/robot))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/human))
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/brain))
|
||||
return 1
|
||||
if (istype(other, /mob/living/silicon/pai))
|
||||
return 1
|
||||
// if (istype(other, /mob/living/silicon/hivebot))
|
||||
// return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/mommi/say_quote(var/text)
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
if (ending == "?")
|
||||
return "queries, \"[text]\"";
|
||||
else if (ending == "!")
|
||||
return "declares, \"[text]\"";
|
||||
|
||||
return "states, \"[text]\"";
|
||||
150
code/modules/mob/living/silicon/mommi/wires.dm
Normal file
150
code/modules/mob/living/silicon/mommi/wires.dm
Normal file
@@ -0,0 +1,150 @@
|
||||
/* Inherited
|
||||
#define BORG_WIRE_LAWCHECK 1
|
||||
#define BORG_WIRE_MAIN_POWER1 2
|
||||
#define BORG_WIRE_MAIN_POWER2 3
|
||||
#define BORG_WIRE_AI_CONTROL 4
|
||||
#define BORG_WIRE_CAMERA 5
|
||||
|
||||
/proc/RandomBorgWires()
|
||||
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
|
||||
var/list/Borgwires = list(0, 0, 0, 0, 0)
|
||||
BorgIndexToFlag = list(0, 0, 0, 0, 0)
|
||||
BorgIndexToWireColor = list(0, 0, 0, 0, 0)
|
||||
BorgWireColorToIndex = list(0, 0, 0, 0, 0)
|
||||
var/flagIndex = 1
|
||||
//I think it's easier to read this way, also doesn't rely on the random number generator to land on a new wire.
|
||||
var/list/colorIndexList = list(BORG_WIRE_LAWCHECK, BORG_WIRE_MAIN_POWER1, BORG_WIRE_MAIN_POWER2, BORG_WIRE_AI_CONTROL, BORG_WIRE_CAMERA)
|
||||
for (var/flag=1, flag<=16, flag+=flag)
|
||||
var/colorIndex = pick(colorIndexList)
|
||||
if (Borgwires[colorIndex]==0)
|
||||
Borgwires[colorIndex] = flag
|
||||
BorgIndexToFlag[flagIndex] = flag
|
||||
BorgIndexToWireColor[flagIndex] = colorIndex
|
||||
BorgWireColorToIndex[colorIndex] = flagIndex
|
||||
colorIndexList -= colorIndex // Shortens the list.
|
||||
//world.log << "Flag: [flag], CIndex: [colorIndex], FIndex: [flagIndex]"
|
||||
flagIndex+=1
|
||||
return Borgwires
|
||||
|
||||
/mob/living/silicon/robot/proc/isWireColorCut(var/wireColor)
|
||||
var/wireFlag = BorgWireColorToFlag[wireColor]
|
||||
return ((src.borgwires & wireFlag) == 0)
|
||||
|
||||
/mob/living/silicon/robot/proc/isWireCut(var/wireIndex)
|
||||
var/wireFlag = BorgIndexToFlag[wireIndex]
|
||||
return ((src.borgwires & wireFlag) == 0)
|
||||
|
||||
/mob/living/silicon/robot/proc/cut(var/wireColor)
|
||||
var/wireFlag = BorgWireColorToFlag[wireColor]
|
||||
var/wireIndex = BorgWireColorToIndex[wireColor]
|
||||
borgwires &= ~wireFlag
|
||||
switch(wireIndex)
|
||||
if(BORG_WIRE_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI
|
||||
if (src.lawupdate == 1)
|
||||
src << "LawSync protocol engaged."
|
||||
src.show_laws()
|
||||
if (BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control
|
||||
if (src.connected_ai)
|
||||
src.connected_ai = null
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(!isnull(src.camera) && !scrambledcodes)
|
||||
src.camera.status = 0
|
||||
src.camera.deactivate(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
|
||||
|
||||
src.interact(usr)
|
||||
|
||||
/mob/living/silicon/robot/proc/mend(var/wireColor)
|
||||
var/wireFlag = BorgWireColorToFlag[wireColor]
|
||||
var/wireIndex = BorgWireColorToIndex[wireColor]
|
||||
borgwires |= wireFlag
|
||||
switch(wireIndex)
|
||||
if(BORG_WIRE_LAWCHECK) //turns law updates back on assuming the borg hasn't been emagged
|
||||
if (src.lawupdate == 0 && !src.emagged)
|
||||
src.lawupdate = 1
|
||||
if(BORG_WIRE_CAMERA)
|
||||
if (!isnull(src.camera) && !scrambledcodes)
|
||||
src.camera.status = 1
|
||||
src.camera.deactivate(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
|
||||
|
||||
src.interact(usr)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/pulse(var/wireColor)
|
||||
var/wireIndex = BorgWireColorToIndex[wireColor]
|
||||
switch(wireIndex)
|
||||
if(BORG_WIRE_LAWCHECK) //Forces a law update if the borg is set to receive them. Since an update would happen when the borg checks its laws anyway, not much use, but eh
|
||||
if (src.lawupdate)
|
||||
src.lawsync()
|
||||
|
||||
if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
|
||||
if(!src.emagged)
|
||||
src.connected_ai = select_active_ai()
|
||||
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(!isnull(src.camera) && src.camera.status && !scrambledcodes)
|
||||
src.camera.deactivate(usr, 0) // Kick anyone watching the Cyborg's camera, doesn't display you disconnecting the camera.
|
||||
usr << "[src]'s camera lens focuses loudly."
|
||||
src << "Your camera lens focuses loudly."
|
||||
|
||||
src.interact(usr)
|
||||
|
||||
/mob/living/silicon/robot/proc/interact(mob/user)
|
||||
if(wiresexposed && (!istype(user, /mob/living/silicon)))
|
||||
user.set_machine(src)
|
||||
var/t1 = text("<B>Access Panel</B><br>\n")
|
||||
var/list/Borgwires = list(
|
||||
"Orange" = 1,
|
||||
"Dark red" = 2,
|
||||
"White" = 3,
|
||||
"Yellow" = 4,
|
||||
"Blue" = 5,
|
||||
)
|
||||
for(var/wiredesc in Borgwires)
|
||||
var/is_uncut = src.borgwires & BorgWireColorToFlag[Borgwires[wiredesc]]
|
||||
t1 += "[wiredesc] wire: "
|
||||
if(!is_uncut)
|
||||
t1 += "<a href='?src=\ref[src];borgwires=[Borgwires[wiredesc]]'>Mend</a>"
|
||||
else
|
||||
t1 += "<a href='?src=\ref[src];borgwires=[Borgwires[wiredesc]]'>Cut</a> "
|
||||
t1 += "<a href='?src=\ref[src];pulse=[Borgwires[wiredesc]]'>Pulse</a> "
|
||||
t1 += "<br>"
|
||||
t1 += text("<br>\n[(src.lawupdate ? "The LawSync light is on." : "The LawSync light is off.")]<br>\n[(src.connected_ai ? "The AI link light is on." : "The AI link light is off.")]")
|
||||
t1 += text("<br>\n[((!isnull(src.camera) && src.camera.status == 1) ? "The Camera light is on." : "The Camera light is off.")]<br>\n")
|
||||
t1 += text("<p><a href='?src=\ref[src];close2=1'>Close</a></p>\n")
|
||||
user << browse(t1, "window=borgwires")
|
||||
onclose(user, "borgwires")
|
||||
|
||||
/mob/living/silicon/robot/Topic(href, href_list)
|
||||
..()
|
||||
if (((in_range(src, usr) && istype(src.loc, /turf))) && !istype(usr, /mob/living/silicon))
|
||||
usr.set_machine(src)
|
||||
if (href_list["borgwires"])
|
||||
var/t1 = text2num(href_list["borgwires"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
usr << "You need wirecutters!"
|
||||
return
|
||||
if (src.isWireColorCut(t1))
|
||||
src.mend(t1)
|
||||
else
|
||||
src.cut(t1)
|
||||
else if (href_list["pulse"])
|
||||
var/t1 = text2num(href_list["pulse"])
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return
|
||||
if (src.isWireColorCut(t1))
|
||||
usr << "You can't pulse a cut wire."
|
||||
return
|
||||
else
|
||||
src.pulse(t1)
|
||||
else if (href_list["close2"])
|
||||
usr << browse(null, "window=borgwires")
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
#undef BORG_WIRE_LAWCHECK
|
||||
#undef BORG_WIRE_MAIN_POWER1
|
||||
#undef BORG_WIRE_MAIN_POWER2
|
||||
#undef BORG_WIRE_AI_CONTROL
|
||||
#undef BORG_WIRE_CAMERA
|
||||
*/
|
||||
@@ -35,6 +35,11 @@
|
||||
src << "This function is not available to you."
|
||||
return
|
||||
else
|
||||
if(isMoMMI(src)&&client)//For patching directly into AI holopads.
|
||||
var/mob/living/silicon/robot/mommi/U = src
|
||||
if(U.keeper)
|
||||
src << "\red Your KEEPER module has disabled your vocalizer. Try :b to attempt to relay your message through the AI or borgs, or try an *emote (say \"*help\" for a listing)."
|
||||
return
|
||||
return ..(message)
|
||||
else
|
||||
return ..(message)
|
||||
|
||||
@@ -105,6 +105,11 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isMoMMI(A)
|
||||
if(istype(A, /mob/living/silicon/robot/mommi))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isliving(A)
|
||||
if(istype(A, /mob/living))
|
||||
return 1
|
||||
|
||||
@@ -70,6 +70,8 @@
|
||||
set hidden = 1
|
||||
if(istype(mob, /mob/living/carbon))
|
||||
mob:swap_hand()
|
||||
if(istype(mob,/mob/living/silicon/robot/mommi))
|
||||
return // MoMMIs only have one tool slot.
|
||||
if(istype(mob,/mob/living/silicon/robot))//Oh nested logic loops, is there anything you can't do? -Sieve
|
||||
var/mob/living/silicon/robot/R = mob
|
||||
if(!R.module_active)
|
||||
|
||||
@@ -455,6 +455,28 @@
|
||||
if(issilicon(usr))
|
||||
usr:uneq_active()
|
||||
|
||||
////////////////////////////////////////////////
|
||||
// MoMMI shit
|
||||
if(INV_SLOT_TOOL)
|
||||
if(usr:tool_state)
|
||||
if(usr:module_active != usr:tool_state)
|
||||
usr:inv_tool.icon_state = "inv1 +a"
|
||||
usr:inv_sight.icon_state = "sight"
|
||||
usr:module_active = usr:tool_state
|
||||
else
|
||||
usr:inv_tool.icon_state = "inv1"
|
||||
usr:module_active = null
|
||||
if(INV_SLOT_SIGHT)
|
||||
if(usr:sight_state)
|
||||
if(usr:module_active != usr:sight_state)
|
||||
usr:inv_tool.icon_state = "inv1"
|
||||
usr:inv_sight.icon_state = "sight+a"
|
||||
usr:module_active = usr:sight_state
|
||||
else
|
||||
usr:inv_sight.icon_state = "sight"
|
||||
usr:module_active = null
|
||||
////////////////////////////////////////////////
|
||||
|
||||
if("module1")
|
||||
if(usr:module_state_1)
|
||||
if(usr:module_active != usr:module_state_1)
|
||||
|
||||
@@ -171,6 +171,54 @@
|
||||
|
||||
O.Namepick()
|
||||
|
||||
spawn(0)//To prevent the proc from returning null.
|
||||
del(src)
|
||||
return O
|
||||
|
||||
//human -> mommi
|
||||
/mob/living/carbon/human/proc/MoMMIfy()
|
||||
if (monkeyizing)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_inventory(W)
|
||||
regenerate_icons()
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
for(var/t in organs)
|
||||
del(t)
|
||||
|
||||
var/mob/living/silicon/robot/mommi/O = new /mob/living/silicon/robot/mommi( loc )
|
||||
|
||||
// cyborgs produced by Robotize get an automatic power cell
|
||||
O.cell = new(O)
|
||||
O.cell.maxcharge = 7500
|
||||
O.cell.charge = 7500
|
||||
|
||||
|
||||
O.gender = gender
|
||||
O.invisibility = 0
|
||||
|
||||
|
||||
if(mind) //TODO
|
||||
mind.transfer_to(O)
|
||||
if(O.mind.assigned_role == "Cyborg")
|
||||
O.mind.original = O
|
||||
else if(mind.special_role)
|
||||
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
|
||||
else
|
||||
O.key = key
|
||||
|
||||
O.loc = loc
|
||||
O.job = "Cyborg"
|
||||
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.transfer_identity(src)//Does not transfer key/client.
|
||||
|
||||
O.Namepick()
|
||||
|
||||
|
||||
spawn(0)//To prevent the proc from returning null.
|
||||
del(src)
|
||||
return O
|
||||
|
||||
@@ -424,10 +424,14 @@
|
||||
opened = 1
|
||||
update_icon()
|
||||
else
|
||||
// The extra crowbar thing fixes MoMMIs not being able to remove APCs.
|
||||
// They can just pop them off with a crowbar.
|
||||
if ( ((stat & BROKEN) || malfhack) \
|
||||
&& !opened \
|
||||
&& W.force >= 5 \
|
||||
&& W.w_class >= 3.0 \
|
||||
&& ( \
|
||||
(W.force >= 5 && W.w_class >= 3.0) \
|
||||
|| istype(W,/obj/item/weapon/crowbar) \
|
||||
) \
|
||||
&& prob(20) )
|
||||
opened = 2
|
||||
user.visible_message("\red The APC cover was knocked down with the [W.name] by [user.name]!", \
|
||||
@@ -453,9 +457,12 @@
|
||||
if(!user)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if(usr == user && opened && (!issilicon(user)))
|
||||
if(usr == user && opened)
|
||||
if(cell)
|
||||
user.put_in_hands(cell)
|
||||
if(issilicon(user) && !isMoMMI(user)) // MoMMIs can hold one item in their tool slot.
|
||||
cell.loc=src.loc // Drop it, whoops.
|
||||
else
|
||||
user.put_in_hands(cell)
|
||||
cell.add_fingerprint(user)
|
||||
cell.updateicon()
|
||||
|
||||
@@ -778,7 +785,7 @@
|
||||
) \
|
||||
)
|
||||
if(!loud)
|
||||
user << "\red \The [src] have AI control disabled!"
|
||||
user << "\red \The [src] has AI control disabled!"
|
||||
user << browse(null, "window=apc")
|
||||
user.unset_machine()
|
||||
return 0
|
||||
|
||||
@@ -46,6 +46,15 @@
|
||||
var/mob/living/silicon/robot/Robot = new_mob
|
||||
Robot.mmi = new /obj/item/device/mmi(new_mob)
|
||||
Robot.mmi.transfer_identity(M) //Does not transfer key/client.
|
||||
new_mob.universal_speak = 1
|
||||
if("mommi")
|
||||
new_mob = new /mob/living/silicon/robot/mommi(M.loc)
|
||||
new_mob.gender = M.gender
|
||||
new_mob.invisibility = 0
|
||||
new_mob.job = "MoMMI"
|
||||
var/mob/living/silicon/robot/mommi/MoMMI = new_mob
|
||||
MoMMI.mmi = new /obj/item/device/mmi(new_mob)
|
||||
MoMMI.mmi.transfer_identity(M) //Does not transfer key/client.
|
||||
if("slime")
|
||||
if(prob(50)) new_mob = new /mob/living/carbon/slime/adult(M.loc)
|
||||
else new_mob = new /mob/living/carbon/slime(M.loc)
|
||||
|
||||
@@ -39,13 +39,15 @@
|
||||
//gas.volume = 1.05 * CELLSTANDARD
|
||||
update()
|
||||
|
||||
MouseDrop_T(var/obj/item/target, mob/user)
|
||||
src.attackby(target,user)
|
||||
|
||||
// attack by item places it in to disposal
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
if(stat & BROKEN || !I || !user)
|
||||
return
|
||||
|
||||
if(isrobot(user) && !istype(I, /obj/item/weapon/storage/bag/trash))
|
||||
if(isrobot(user) && !istype(I, /obj/item/weapon/storage/bag/trash) && !istype(user,/mob/living/silicon/robot/mommi))
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if(mode<=0) // It's off
|
||||
|
||||
@@ -398,6 +398,8 @@ var/MAX_EXPLOSION_RANGE = 14
|
||||
#define GAS_CO2 (1 << 3)
|
||||
#define GAS_N2O (1 << 4)
|
||||
|
||||
#define INV_SLOT_SIGHT "sight_slot"
|
||||
#define INV_SLOT_TOOL "tool_slot"
|
||||
|
||||
var/list/accessable_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" = 60)
|
||||
//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user