mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Part two of MMI update: you can now beat on them to damage and/or kill the brain within. Health analyzers can check the health of the brain. I haven't tested, but theoretically bruise packs and ointment can be applied to heal it.
It is currently impossible to apply reagents to the MMIbrain, nor can it be placed into anything yet. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1294 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -9,24 +9,41 @@
|
||||
var/mob/living/carbon/brain/brainmob = null
|
||||
var/mob/living/silicon/robot = null
|
||||
var/obj/mecha = null
|
||||
|
||||
var/locked = 0
|
||||
req_access = list(access_robotics)
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O,/obj/item/brain) && !brain)
|
||||
if(istype(O,/obj/item/brain) && !brain) //Time to stick a brain in it --NEO
|
||||
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message(text("\blue [user] sticks \a [O] into \the [src]."))
|
||||
src.brain = O
|
||||
brain = O
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
icon_state = "mmi_full"
|
||||
|
||||
//Adding the actual mob the brain's player gets moved to. --NEO
|
||||
brainmob = new /mob/living/carbon/brain
|
||||
brainmob.loc = src
|
||||
brainmob.name = brain.owner.real_name
|
||||
brainmob.real_name = brain.owner.real_name
|
||||
brainmob.container = src
|
||||
brain.owner.mind.transfer_to(brainmob)
|
||||
src.brainmob.client.screen.len = null
|
||||
src.name = "Man-Machine Interface:[brainmob.real_name]"
|
||||
brainmob.client.screen.len = null
|
||||
|
||||
name = "Man-Machine Interface:[brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
locked = 1
|
||||
return
|
||||
if((istype(O,/obj/item/weapon/card/id)||istype(O,/obj/item/device/pda)) && brain)
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
user << "\blue You [locked ? "lock" : "unlock"] the brain holder."
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
if(brain)
|
||||
O.attack(brainmob, user)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
/mob/living/carbon/brain
|
||||
var/obj/item/device/mmi/container = null
|
||||
|
||||
New()
|
||||
spawn(1)
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
say_understands(var/other)
|
||||
if (istype(other, /mob/living/silicon/ai))
|
||||
return 1
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/mob/living/carbon/brain/death(gibbed)
|
||||
var/cancel
|
||||
if (!gibbed)
|
||||
for(var/mob/O in viewers(src.container, null))
|
||||
O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2)
|
||||
src.container.icon_state = "mmi_dead"
|
||||
src.stat = 2
|
||||
|
||||
if(src.blind)
|
||||
src.blind.layer = 0
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
|
||||
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
store_memory("Time of death: [tod]", 0)
|
||||
|
||||
for(var/mob/M in world)
|
||||
if ((M.client && !( M.stat )))
|
||||
cancel = 1
|
||||
break
|
||||
if (!( cancel ))
|
||||
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
|
||||
spawn( 300 )
|
||||
log_game("Rebooting because of no live players")
|
||||
world.Reboot()
|
||||
return
|
||||
if (src.client)
|
||||
spawn(50)
|
||||
if(src.client && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
return ..(gibbed)
|
||||
@@ -73,10 +73,10 @@
|
||||
stunned = max(stunned,0)
|
||||
paralysis = max(paralysis, 0)
|
||||
weakened = max(weakened, 0)
|
||||
bruteloss = min(bruteloss, 0)
|
||||
fireloss = min(fireloss, 0)
|
||||
oxyloss = min(oxyloss, 0)
|
||||
toxloss = min(toxloss, 0)
|
||||
bruteloss = max(bruteloss, 0)
|
||||
fireloss = max(fireloss, 0)
|
||||
oxyloss = max(oxyloss, 0)
|
||||
toxloss = max(toxloss, 0)
|
||||
|
||||
handle_disabilities()
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
if(src.resting)
|
||||
src.weakened = max(src.weakened, 5)
|
||||
|
||||
if(health < -100)
|
||||
if(health < -100 && stat != 2)
|
||||
death()
|
||||
else if(src.health < 0)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
if(!client)
|
||||
if(!client && !stat)
|
||||
if(prob(33) && canmove && isturf(loc))
|
||||
step(src, pick(cardinal))
|
||||
if(prob(1))
|
||||
|
||||
Reference in New Issue
Block a user