- You can now stick MMI-ied brains inside mechs, if you want.

- Other small fixes and tweaks.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1316 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
panurgomatic
2011-03-31 02:39:58 +00:00
parent 1c8a3539c4
commit 7048badff4
10 changed files with 118 additions and 47 deletions
+4 -2
View File
@@ -807,9 +807,11 @@
brainmob.loc = src
brainmob.name = owner.real_name
brainmob.real_name = owner.real_name
src.owner.mind.transfer_to(brainmob)
if(src.owner.mind)
src.owner.mind.transfer_to(brainmob)
brainmob.death() //the brain is dead until stuffed into an MMI. In which case it might still be dead if it's been beat up.
brainmob.client.screen.len = null //clear the hud
if(brainmob.client)
brainmob.client.screen.len = null //clear the hud
brainmob << "\blue You might feel slightly disoriented. That's normal when your brain gets cut out."
/obj/item/brain/Del()
+3 -6
View File
@@ -1,5 +1,5 @@
/obj/mecha/combat
var/force = 25
var/force = 30
var/damtype = "brute"
var/melee_cooldown = 10
var/melee_can_hit = 1
@@ -101,9 +101,6 @@
if(istype(target, target_type) && hascall(target, "attackby"))
src.occupant_message("You hit [target].")
src.visible_message("<font color='red'><b>[src.name] hits [target]</b></font>")
for (var/mob/V in viewers(src))
if(V.client && !(V.blinded))
V.show_message("[src.name] hits [target].", 1)
if(!istype(target, /turf/simulated/wall))
target:attackby(src,src.occupant)
else if(prob(5))
@@ -147,8 +144,8 @@
/obj/mecha/combat/moved_inside(var/mob/living/carbon/human/H as mob)
if(..())
if(usr.client)
usr.client.mouse_pointer_icon = file("icons/misc/mecha_mouse.dmi")
if(H.client)
H.client.mouse_pointer_icon = file("icons/misc/mecha_mouse.dmi")
return 1
else
return 0
+2 -2
View File
@@ -3,11 +3,11 @@
name = "Durand"
icon_state = "durand"
step_in = 6
health = 350
health = 400
deflect_chance = 20
max_temperature = 3000
infra_luminosity = 8
force = 35
force = 40
var/defence = 0
var/defence_deflect = 35
wreckage = "/obj/decal/mecha_wreckage/durand"
+2 -1
View File
@@ -3,7 +3,7 @@
name = "Marauder"
icon_state = "marauder"
step_in = 7
health = 400
health = 500
deflect_chance = 25
max_temperature = 5000
infra_luminosity = 3
@@ -17,6 +17,7 @@
wreckage = "/obj/decal/mecha_wreckage/marauder"
add_req_access = 0
internal_damage_threshold = 25
force = 45
/obj/mecha/combat/marauder/New()
+3
View File
@@ -267,6 +267,7 @@
/obj/item/mecha_parts/mecha_equipment/teleporter
name = "Teleporter"
desc = "An exosuit module that allows exosuits to teleport to any position in view."
icon_state = "mecha_teleport"
equip_cooldown = 300
energy_drain = 1000
@@ -286,6 +287,7 @@
/obj/item/mecha_parts/mecha_equipment/wormhole_generator
name = "Wormhole Generator"
desc = "An exosuit module that allows generating of small quasi-stable wormholes."
icon_state = "mecha_wholegen"
equip_cooldown = 50
energy_drain = 300
@@ -334,6 +336,7 @@
/obj/item/mecha_parts/mecha_equipment/gravcatapult
name = "Gravitational Catapult"
desc = "An exosuit mounted Gravitational Catapult."
icon_state = "mecha_teleport"
equip_cooldown = 10
energy_drain = 200
+2 -2
View File
@@ -11,7 +11,7 @@
return 0
/obj/item/mecha_parts/mecha_equipment/weapon/laser
equip_cooldown = 10
equip_cooldown = 7
name = "CH-PS \"Immolator\" Laser"
icon_state = "mecha_laser"
energy_drain = 30
@@ -84,7 +84,7 @@
name = "PBT \"Pacifier\" Mounted Taser"
icon_state = "mecha_taser"
energy_drain = 20
equip_cooldown = 7
equip_cooldown = 6
action(target)
if(!action_checks(target)) return
+2 -2
View File
@@ -104,7 +104,7 @@
/datum/global_iterator/mech_bay_recharger
delay = 20
var/max_charge = 30
var/max_charge = 45
process(var/obj/machinery/mech_bay_recharge_port/port, var/obj/mecha/mecha)
if(mecha in port.recharge_floor)
@@ -129,7 +129,7 @@
icon = 'mech_bay.dmi'
icon_state = "recharge_comp"
var/autostart = 1
var/voltage = 30
var/voltage = 45
var/turf/simulated/floor/mech_bay_recharge_floor/recharge_floor
var/obj/machinery/mech_bay_recharge_port/recharge_port
+89 -25
View File
@@ -19,7 +19,7 @@
layer = MOB_LAYER //icon draw layer
infra_luminosity = 15
var/can_move = 1
var/mob/living/carbon/human/occupant = null
var/mob/living/carbon/occupant = null
var/step_in = 10 //make a step in step_in/10 sec.
var/step_energy_drain = 10
var/health = 300 //health is health
@@ -61,7 +61,6 @@
var/obj/item/mecha_parts/mecha_equipment/selected
var/max_equip = 2
/obj/mecha/New()
..()
src.icon_state += "-open"
@@ -406,7 +405,8 @@
var/list/r_equipment = src.equipment
src = null
del(mecha)
explosion(T, 0, 0, 1, 3)
if(prob(40))
explosion(T, 0, 0, 1, 3)
spawn(0)
if(wreckage)
var/obj/decal/mecha_wreckage/WR = new wreckage(T)
@@ -631,13 +631,12 @@
return
/obj/mecha/proc/moved_inside(var/mob/living/carbon/human/H as mob)
if(H && H in range(1))
if(H && H.client && H in range(1))
H.client.eye = src
H.client.perspective = EYE_PERSPECTIVE
H.pulling = null
src.occupant = H
H.loc = src
if(H.client)
H.client.eye = src
H.client.perspective = EYE_PERSPECTIVE
src.add_fingerprint(H)
src.Entered(H)
src.Move(src.loc)
@@ -650,6 +649,49 @@
else
return 0
/obj/mecha/proc/mmi_move_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
if(!mmi_as_oc.brain || !mmi_as_oc.brain.brainmob || !mmi_as_oc.brain.brainmob.client)
user << "Consciousness matrix not detected."
return 0
if(mmi_as_oc.brain.brainmob.stat)
user << "Beta-rhythm below acceptable level."
return 0
if(src.occupant)
return 0
if(do_after(20))
if(!src.occupant)
return mmi_moved_inside(mmi_as_oc,user)
return 0
/obj/mecha/proc/mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
if(mmi_as_oc && user in range(1))
if(!mmi_as_oc.brain || !mmi_as_oc.brain.brainmob || !mmi_as_oc.brain.brainmob.client)
user << "Consciousness matrix not detected."
return 0
if(mmi_as_oc.brain.brainmob.stat)
user << "Beta-rhythm below acceptable level."
return 0
user.drop_from_slot(mmi_as_oc)
var/mob/brainmob = mmi_as_oc.brain.brainmob
brainmob.client.eye = src
brainmob.client.perspective = EYE_PERSPECTIVE
src.occupant = brainmob
brainmob.loc = src //should allow relaymove
brainmob.canmove = 1
mmi_as_oc.loc = src
mmi_as_oc.mecha = src
src.verbs -= /obj/mecha/verb/eject
src.Entered(mmi_as_oc)
src.Move(src.loc)
src.icon_state = initial(icon_state)
src.log_message("[mmi_as_oc] moved in as pilot.")
if(!internal_damage)
src.occupant << sound('nominal.ogg',volume=50)
return 1
else
return 0
/obj/mecha/verb/view_stats()
set name = "View Stats"
@@ -660,6 +702,15 @@
pr_update_stats.start()
return
/*
/obj/mecha/verb/force_eject()
set category = "Object"
set name = "Force Eject"
set src in view(5)
src.go_out()
return
*/
/obj/mecha/verb/eject()
set name = "Eject"
set category = "Exosuit Interface"
@@ -673,13 +724,28 @@
/obj/mecha/proc/go_out()
if(!src.occupant) return
if(src.occupant.Move(src.loc))
src.log_message("[src.occupant] moved out.")
src.Exited(src.occupant)
if (src.occupant.client)
var/atom/movable/mob_container
if(ishuman(src.occupant))
mob_container = src.occupant
else if(istype(src.occupant, /mob/living/carbon/brain))
var/mob/living/carbon/brain/brain = src.occupant
mob_container = brain.container
else
return
if(mob_container.Move(src.loc))//ejecting mob container
src.log_message("[mob_container] moved out.")
src.Exited(mob_container)
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant << browse(null, "window=exosuit")
if(istype(mob_container, /obj/item/device/mmi))
var/obj/item/device/mmi/mmi = mob_container
if(mmi.brain)
src.occupant.loc = mmi.brain
mmi.mecha = null
src.occupant.canmove = 0
src.verbs += /obj/mecha/verb/eject
src.occupant = null
src.pr_update_stats.stop()
src.icon_state = initial(icon_state)+"-open"
@@ -770,6 +836,14 @@
/obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/mmi))
if(src.mmi_move_inside(W,user))
user << "[src]-MMI interface initialized successfuly"
else
user << "[src]-MMI interface initialization failed."
return
if(istype(W, /obj/item/mecha_parts/mecha_equipment))
var/obj/item/mecha_parts/mecha_equipment/E = W
spawn()
@@ -920,8 +994,9 @@
[(/obj/mecha/verb/connect_to_port in src.verbs)?"<a href='?src=\ref[src];port_connect=1'>Connect to port</a><br>":null]
<a href='?src=\ref[src];unlock_id_upload=1'>Unlock ID upload panel</a><br>
<a href='?src=\ref[src];view_log=1'>View internal log</a><br>
<a href='?src=\ref[src];eject=1'>Eject</a><br>
"}
if(/obj/mecha/verb/eject in src.verbs)
output += "<a href='?src=\ref[src];eject=1'>Eject</a><br>"
return output
/obj/mecha/Topic(href, href_list)
@@ -1042,26 +1117,15 @@
user << browse(output, "window=mecha_attack_ai")
return
*/
/* //it seems this is not needed anymore...
/obj/mecha/hear_talk(mob/M as mob, text)
src.log_message("Heard talk from [M]")
if(occupant && M)
if(!occupant.say_understands(M))
text = stars(text)
var/rendered = "<span class='game say'><span class='name'>[M.name]</span> <span class='message'>[M.say_quote(text)]</span></span>"
occupant.show_message(rendered, 2)
return
/*
if ("binary")
if(src.robot_talk_understand || src.binarycheck())
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
src.robot_talk(message)
return
if ("alientalk")
if(src.alien_talk_understand || src.hivecheck())
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
src.alien_talk(message)
return
*/
/obj/mecha/proc/get_charge()//returns null if no powercell, else returns cell.charge
if(!src.cell) return
+6 -6
View File
@@ -422,8 +422,8 @@ datum
build_path = "/obj/item/mecha_parts/circuitboard/gygax/targeting"
durand_main
name = "Circuit Design (\"Gygax\" Central Control module)"
desc = "Allows for the construction of a \"Gygax\" Central Control module."
name = "Circuit Design (\"Durand\" Central Control module)"
desc = "Allows for the construction of a \"Durand\" Central Control module."
id = "durand_main"
req_tech = list("programming" = 4, "materials" = 2)
build_type = IMPRINTER
@@ -431,8 +431,8 @@ datum
build_path = "/obj/item/mecha_parts/circuitboard/durand/main"
durand_peri
name = "Circuit Design (\"Gygax\" Peripherals Control module)"
desc = "Allows for the construction of a \"Gygax\" Peripheral Control module."
name = "Circuit Design (\"Durand\" Peripherals Control module)"
desc = "Allows for the construction of a \"Durand\" Peripheral Control module."
id = "durand_peri"
req_tech = list("programming" = 4, "materials" = 2)
build_type = IMPRINTER
@@ -440,8 +440,8 @@ datum
build_path = "/obj/item/mecha_parts/circuitboard/durand/peripherals"
durand_targ
name = "Circuit Design (\"Gygax\" Weapons & Targeting Control module)"
desc = "Allows for the construction of a \"Gygax\" Weapons & Targeting Control module."
name = "Circuit Design (\"Durand\" Weapons & Targeting Control module)"
desc = "Allows for the construction of a \"Durand\" Weapons & Targeting Control module."
id = "durand_targ"
req_tech = list("programming" = 4, "materials" = 2)
build_type = IMPRINTER
+5 -1
View File
@@ -122,7 +122,11 @@
get_breath_from_internal(volume_needed)
update_canmove()
canmove = 0
if(src.in_contents_of(/obj/mecha))
canmove = 1
else
canmove = 0
return
handle_breath(datum/gas_mixture/breath)