- Buildable Ripley mech. Quartermaster can order the crate with parts. Manual sucks, I know.

- Fixed H.O.N.K. sound issue.
- Various mech fixes and tweaks.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@913 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
panurgomatic
2011-01-25 06:25:05 +00:00
parent 5192516c0e
commit b39f5656d6
12 changed files with 360 additions and 60 deletions
+17
View File
@@ -313,6 +313,23 @@
containername = "Robotics Assembly"
access = access_robotics
/datum/supply_packs/mecha_ripley
name = "APLU \"Ripley\" Exosuit Assembly Crate"
contains = list("/obj/mecha_chassis/ripley",
"/obj/item/mecha_parts/part/ripley_torso",
"/obj/item/mecha_parts/part/ripley_left_arm",
"/obj/item/mecha_parts/part/ripley_right_arm",
"/obj/item/mecha_parts/part/ripley_left_leg",
"/obj/item/mecha_parts/part/ripley_right_leg",
"/obj/item/weapon/disk/circuit_disk/mecha/ripley/main",
"/obj/item/weapon/disk/circuit_disk/mecha/ripley/peripherals",
"/obj/item/weapon/book/manual/ripley_build_and_repair")
cost = 40
containertype = "/obj/crate/secure"
containername = "ARLU \"Ripley\" Exosuit Assembly"
access = access_heads
/datum/supply_packs/hydroponics // -- Skie
name = "Hydroponics Supply Crate"
contains = list("/obj/item/weapon/plantbgone",
+20 -1
View File
@@ -472,4 +472,23 @@ Operations Highlights:
blueprint = "/obj/item/weapon/aiModule/tyrant"
circuit = "'T.Y.R.A.N.T.' AI Core Module"
department = "Command and Control"
security = "ULTRA'"
security = "ULTRA'"
///////////////////////////////////
//////////Mecha Module Disks///////
///////////////////////////////////
/obj/item/weapon/disk/circuit_disk/mecha/ripley/main
name = "Circuit Design (APLU \"Ripley\" Central Control module)"
blueprint = "/obj/item/mecha_parts/circuitboard/ripley/main"
circuit = "Circuit Board (APLU \"Ripley\" Central Control module)"
department = "Engineering"
security = "MEDIUM"
/obj/item/weapon/disk/circuit_disk/mecha/ripley/peripherals
name = "Circuit Design (APLU \"Ripley\" Peripherals Control module)"
blueprint = "/obj/item/mecha_parts/circuitboard/ripley/peripherals"
circuit = "Circuit Board (APLU \"Ripley\" Peripherals Control module)"
department = "Engineering"
security = "MEDIUM"
+2 -3
View File
@@ -74,14 +74,13 @@
return result
/*obj/mecha/combat/honker/Topic(href, href_list)
obj/mecha/combat/honker/Topic(href, href_list)
..()
if (href_list["play_sound"])
switch(href_list["play_sound"])
if("sadtrombone")
// playsound(src, 'sadtrombone.ogg', 50)
playsound(src, 'sadtrombone.ogg', 50)
return
*/
proc/rand_hex_color()
var/list/colors = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f")
+30 -41
View File
@@ -13,13 +13,11 @@
proc/next_step()
steps.len--
if(!steps.len && result)
new result(get_turf(holder))
spawn()
del holder
if(!steps.len)
spawn_result()
return
proc/check_step(used_atom,user as mob)
proc/check_step(atom/used_atom,mob/user as mob) //check last step only
var/valid_step = is_right_key(used_atom)
if(valid_step)
if(custom_action(valid_step, used_atom, user))
@@ -27,51 +25,42 @@
return 1
return 0
proc/is_right_key(used_atom) // returns current step num if used_atom is of the right type.
proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type.
var/list/L = steps[steps.len]
if(istype(used_atom, text2path(L["key"])))
return steps.len
return 0
proc/custom_action(used_atom, user)
proc/custom_action(step, used_atom, user)
return 1
/datum/construction/mecha/gygax
result = "/obj/mecha/combat/gygax"
steps = list(list("key"="/obj/item/weapon/wrench"),//1
list("key"="/obj/item/weapon/weldingtool"),//2
list("key"="/obj/item/weapon/screwdriver"),//3
list("key"="/obj/item/stack/sheet/metal")//4
)
custom_action(step, used_atom, mob/user)
switch(step)
if(4)
var/obj/item/stack/sheet/metal/metal = used_atom
if(metal.amount < 1)
del metal
return 0
metal.use(1)
playsound(holder, 'bang.ogg', 50, 1)
user.visible_message("[user] has added [used_atom] to [holder].", "You add [used_atom] to [holder]")
if(3)
holder.icon_state = "gygax"
user.visible_message("[user] screwed the metal sheet in place.", "You screw the metal sheet in place")
if(2)
var/obj/item/weapon/weldingtool/W = used_atom
if(!W.welding)
return 0
if(W.get_fuel() < 2)
user << ("You need more fuel to complete current task")
return 0
W.use_fuel(1)
playsound(holder, 'Welder.ogg', 50, 1)
user.visible_message("[user] welded the metal sheet to [holder].", "You weld the metal sheet to [holder].")
proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
var/list/L = steps[i];
if(istype(used_atom, text2path(L["key"])))
if(custom_action(i, used_atom, user))
steps[i]=null;//stupid byond list from list removal...
clear_nulls(steps);
if(!steps.len)
spawn_result()
return 1
return 0
proc/spawn_result()
if(result)
new result(get_turf(holder))
spawn()
del holder
return
proc/clear_nulls(list/L)
while(null in L)
L -= null
return
return 1
+9 -1
View File
@@ -370,6 +370,12 @@
src.check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST),1)
return
/obj/mecha/blob_act()
return
/obj/mecha/meteorhit()
return ex_act(rand(1,3))//should do for now
/////////////////////////////////////
//////// Atmospheric stuff ////////
/////////////////////////////////////
@@ -644,7 +650,6 @@
/obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob)
src.log_message("Attacked by [W].")
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(src.internals_access_allowed(usr))
if(state==0)
@@ -716,6 +721,7 @@
return
else
src.log_message("Attacked by [W]. Attacker - [user]")
if(prob(src.deflect_chance))
user << "\red The [W] bounces off [src.name] armor."
src.log_append_to_last("Armor saved.")
@@ -725,6 +731,8 @@
V.show_message("The [W] bounces off [src.name] armor.", 1)
*/
else
src.occupant_message("[user] hits [src] with [W].")
user.visible_message("[user] hits [src] with [W].", "You hit [src] with [W]")
src.take_damage(W.force,W.damtype)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
return
+277
View File
@@ -0,0 +1,277 @@
///////////////////////////
////// Mecha Chassis //////
///////////////////////////
/obj/mecha_chassis
name="Mecha Chassis"
icon = 'mech_construct.dmi'
icon_state = "mecha_chassis"
var/datum/construction/construct
flags = FPRINT | CONDUCT
/obj/mecha_chassis/ripley
name = "Ripley Chassis Frame"
New()
..()
construct = new /datum/construction/mecha/ripley_chassis(src)
attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/mecha_parts))
if(construct)
construct.check_all_steps(W, user)
else
..()
return
/obj/mecha_chassis/ripley_full
name = "Ripley Chassis"
icon_state = "ripley_chassis"
New()
..()
construct = new /datum/construction/mecha/ripley(src)
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!construct || !construct.check_step(W, user))
..()
return
/////////////////////////
////// Mecha Parts //////
/////////////////////////
/obj/item/mecha_parts
name = "mecha part"
icon = 'mech_construct.dmi'
icon_state = "mecha_chassis"
w_class = 20
flags = FPRINT | TABLEPASS | CONDUCT
/obj/item/mecha_parts/part/ripley_torso
name="Ripley Torso"
icon_state = "ripley_torso"
/obj/item/mecha_parts/part/ripley_left_arm
name="Ripley Left Arm"
icon_state = "ripley_left_arm"
/obj/item/mecha_parts/part/ripley_right_arm
name="Ripley Right Arm"
icon_state = "ripley_right_arm"
/obj/item/mecha_parts/part/ripley_left_leg
name="Ripley Left Leg"
icon_state = "ripley_left_leg"
/obj/item/mecha_parts/part/ripley_right_leg
name="Ripley Right Leg"
icon_state = "ripley_right_leg"
/obj/item/mecha_parts/circuitboard
name = "Exosuit Circuit board"
icon = 'module.dmi'
icon_state = "std_mod"
item_state = "electronic"
flags = FPRINT | TABLEPASS| CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
throw_speed = 3
throw_range = 15
ripley/peripherals
name = "Circuit board (Ripley Peripherals Control module)"
ripley/main
name = "Circuit board (Ripley Central Control module)"
icon_state = "mainboard"
////////////////////////////////
///// Construction datums //////
////////////////////////////////
/datum/construction/mecha/ripley_chassis
result = "/obj/mecha_chassis/ripley_full"
steps = list(list("key"="/obj/item/mecha_parts/part/ripley_torso"),//1
list("key"="/obj/item/mecha_parts/part/ripley_left_arm"),//2
list("key"="/obj/item/mecha_parts/part/ripley_right_arm"),//3
list("key"="/obj/item/mecha_parts/part/ripley_left_leg"),//4
list("key"="/obj/item/mecha_parts/part/ripley_right_leg")//5
)
custom_action(step, atom/used_atom, mob/user)
/*
switch(step)
if(5)
if(4)
if(3)
if(2)
if(1)
*/
user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]")
holder.overlays += used_atom.icon_state
del used_atom
return 1
/datum/construction/mecha/ripley
result = "/obj/mecha/working/ripley"
steps = list(list("key"="/obj/item/weapon/weldingtool"),//1
list("key"="/obj/item/weapon/wrench"),//2
list("key"="/obj/item/stack/sheet/r_metal"),//3
list("key"="/obj/item/weapon/weldingtool"),//4
list("key"="/obj/item/weapon/wrench"),//5
list("key"="/obj/item/stack/sheet/metal"),//6
list("key"="/obj/item/weapon/screwdriver"),//7
list("key"="/obj/item/mecha_parts/circuitboard/ripley/peripherals"),//8
list("key"="/obj/item/weapon/screwdriver"),//9
list("key"="/obj/item/mecha_parts/circuitboard/ripley/main"),//10
list("key"="/obj/item/weapon/wirecutters"),//11
list("key"="/obj/item/weapon/cable_coil"),//12
list("key"="/obj/item/weapon/screwdriver"),//13
list("key"="/obj/item/weapon/wrench")//14
)
custom_action(step, atom/used_atom, mob/user)
if(istype(used_atom, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = used_atom
if(W.get_fuel() < 2)
user << ("You need more fuel to complete current task")
return 0
else
W.use_fuel(1)
playsound(holder, 'Welder.ogg', 50, 1)
else if(istype(used_atom, /obj/item/weapon/wrench))
playsound(holder, 'Ratchet.ogg', 50, 1)
else if(istype(used_atom, /obj/item/weapon/wirecutters))
playsound(holder, 'Wirecutter.ogg', 50, 1)
else if(istype(used_atom, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/C = used_atom
if(C.amount<3)
user << ("There's not enough cable to finish the task.")
return 0
else
C.use(4)
else if(istype(used_atom, /obj/item/stack))
var/obj/item/stack/S = used_atom
if(S.amount < 5)
user << ("There's not enough material in this stack.")
return 0
else
S.use(5)
//TODO: better messages.
switch(step)
if(14)
user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.")
if(13)
user.visible_message("[user] adjusts [holder] hydraulic systems.", "You adjust [holder] hydraulic systems.")
if(12)
user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].")
if(11)
user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].")
if(10)
user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].")
del used_atom
if(9)
user.visible_message("[user] secures the mainboard.", "You secure the mainboard.")
if(8)
user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].")
del used_atom
if(7)
user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.")
if(6)
user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].")
if(5)
user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.")
if(4)
user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].")
if(3)
user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].")
if(2)
user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.")
if(1)
user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].")
return 1
////////////////// misc ////////////////
/obj/item/weapon/book/manual/ripley_build_and_repair
name = "APLU \"Ripley\" Construction and Operation Manual"
icon = 'library.dmi'
icon_state ="book"
due_date = 0 // Game time in 1/10th seconds
author = "Weyland-Yutani Corp" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
//big pile of shit below.
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<center>
<b style='font-size: 12px;'>Weyland-Yutani - Building Better Worlds</b>
<h1>Autonomous Power Loader Unit \"Ripley\"</h1>
</center>
<h2>Specifications:</h2>
<ul>
<li><b>Class:</b> Autonomous Power Loader</li>
<li><b>Scope:</b> Logistics and Construction</li>
<li><b>Weight:</b> 820kg (without operator and with empty cargo compartment)</li>
<li><b>Height:</b> 2.5m</li>
<li><b>Width:</b> 1.8m</li>
<li><b>Top speed:</b> 5km/hour</li>
<li><b>Operation in vacuum/hostile environment:</b> Possible</b>
<li><b>Airtank Volume:</b> 500liters</li>
<li><b>Devices:</b>
<ul>
<li>Hydraulic Clamp</li>
<li>High-speed Drill</li>
</ul>
</li>
<li><b>Propulsion Device:</b> Powercell-powered electro-hydraulic system.</li>
<li><b>Powercell capacity:</b> Varies.</li>
</ul>
<h2>Construction:</h2>
<ol>
<li>Connect all exosuit parts to the chassis frame</li>
<li>Connect all hydraulic fittings and tighten them up with a wrench</li>
<li>Adjust the servohydraulics with a screwdriver</li>
<li>Wire the chassis. (Cable is not included.)</li>
<li>Use the wirecutters to remove the excess cable if needed.</li>
<li>Install the central control module (Not included. Use supplied datadisk to create one).</li>
<li>Secure the mainboard with a screwdriver.</li>
<li>Install the peripherals control module (Not included. Use supplied datadisk to create one).</li>
<li>Secure the mainboard with a screwdriver</li>
<li>Install the internal armor plating (Not included due to Nanotrasen regulations.)</li>
<li>Secure the internal armor plating with a wrench</li>
<li>Weld the internal armor plating to the chassis</li>
<li>Install the external reinforced armor plating (Not included due to Nanotrasen regulations.)</li>
<li>Secure the external reinforced armor plating with a wrench</li>
<li>Weld the external reinforced armor plating to the chassis</li>
</ol>
</body>
</html>
<h2>Operation</h2>
Coming soon...
"}
-14
View File
@@ -74,18 +74,6 @@
name = "Gygax wreckage"
icon_state = "gygax-broken"
var/datum/construction/construct
New()
..()
construct = new /datum/construction/mecha/gygax(src)
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!construct.check_step(W, user))
..()
return
/obj/decal/mecha_wreckage/marauder
name = "Marauder wreckage"
@@ -97,8 +85,6 @@
icon_state = "ripley-broken"
/obj/decal/mecha_wreckage/durand
name = "Durand wreckage"
icon_state = "durand-broken"
+4
View File
@@ -139,6 +139,10 @@
if(T == chassis.loc && src == chassis.selected_tool)
if(istype(target, /turf/simulated/wall/r_wall))
chassis.occupant_message("<font color='red'>[target] is too durable to drill through.</font>")
else if(istype(target, /turf/simulated/mineral))
var/turf/simulated/mineral/M = target
chassis.log_message("Drilled through [target]")
M.gets_drilled()
else
chassis.log_message("Drilled through [target]")
target.ex_act(2)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.
+1
View File
@@ -425,6 +425,7 @@
#include "code\game\mecha\global_iterator.dm"
#include "code\game\mecha\mech_bay.dm"
#include "code\game\mecha\mecha.dm"
#include "code\game\mecha\mecha_construction.dm"
#include "code\game\mecha\mecha_wreckage.dm"
#include "code\game\mecha\combat\combat.dm"
#include "code\game\mecha\combat\gygax.dm"