- Started work on Phazon alien exosuit

- Lowered cost of Durand parts.
- Some helper procs.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1573 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
panurgomatic
2011-05-12 12:08:14 +00:00
parent 36ce234621
commit 346ca5c362
12 changed files with 149 additions and 17 deletions
+2 -3
View File
@@ -987,9 +987,8 @@ datum
M:jitteriness = 0
M.virus.spread = "Remissive"
M.virus.stage--
if(M.virus.stage <= 0)
M.resistances += M.virus.type
M.virus = null
if(M.virus.stage < 1)
M.virus.cure()
..()
return
+15
View File
@@ -930,4 +930,19 @@ proc/listgetindex(var/list/list,index)
return list[index]
else if(index in list)
return list[index]
return
proc/islist(list/list)
if(istype(list))
return 1
return 0
proc/isemptylist(list/list)
if(istype(list) && !list.len)
return 1
return 0
proc/clearlist(list/list)
if(istype(list))
list.len = 0
return
+7
View File
@@ -37,6 +37,13 @@
open()
sleep(50)
close()
else if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density)
if(mecha.occupant && src.allowed(mecha.occupant))
open()
sleep(50)
close()
return
if (!( ticker ))
return
+10 -2
View File
@@ -65,7 +65,11 @@
if("fire")
temp.take_damage(0, rand(force/2, force))
if("tox")
H.toxloss += rand(force/2, force)
if(H.reagents)
if(H.reagents.get_reagent_amount("carpotoxin") + force < force*2)
H.reagents.add_reagent("carpotoxin", force)
if(H.reagents.get_reagent_amount("cryptobiolin") + force < force*2)
H.reagents.add_reagent("cryptobiolin", force)
else
return
H.UpdateDamageIcon()
@@ -79,7 +83,11 @@
if("fire")
M.take_overall_damage(0, rand(force/2, force))
if("tox")
M.toxloss += rand(force/2, force)
if(M.reagents)
if(M.reagents.get_reagent_amount("carpotoxin") + force < force*2)
M.reagents.add_reagent("carpotoxin", force)
if(M.reagents.get_reagent_amount("cryptobiolin") + force < force*2)
M.reagents.add_reagent("cryptobiolin", force)
else
return
M.updatehealth()
+86
View File
@@ -0,0 +1,86 @@
/obj/mecha/combat/phazon
desc = "An exosuit which can only be described as 'WTF?'."
name = "Phazon"
icon_state = "phazon"
step_in = 2
step_energy_drain = 3
health = 200
deflect_chance = 30
max_temperature = 1000
infra_luminosity = 3
wreckage = "/obj/decal/mecha_wreckage/phazon"
add_req_access = 1
internal_damage_threshold = 25
force = 15
var/phasing = 0
var/phasing_energy_drain = 300
max_equip = 3
/obj/mecha/combat/phazon/New()
..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/rcd
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/gravcatapult
ME.attach(src)
return
/obj/mecha/combat/phazon/Bump(var/atom/obstacle)
if(phasing && get_charge()>=phasing_energy_drain)
spawn()
if(can_move)
can_move = 0
flick("phazon-phase", src)
src.loc = get_step(src,src.dir)
src.cell.use(phasing_energy_drain)
sleep(step_in)
can_move = 1
else
. = ..()
return
/obj/mecha/combat/phazon/click_action(atom/target,mob/user)
if(phasing)
src.occupant_message("Unable to interact with objects while phasing")
return
else
return ..()
/obj/mecha/combat/phazon/verb/switch_damtype()
set category = "Exosuit Interface"
set name = "Change melee damage type"
set src in view(0)
if(usr!=src.occupant)
return
var/new_damtype = alert(src.occupant,"Melee Damage Type",null,"Brute","Fire","Toxic")
switch(new_damtype)
if("Brute")
damtype = "brute"
if("Fire")
damtype = "fire"
if("Toxic")
damtype = "tox"
src.occupant_message("Melee damage type switched to [new_damtype ]")
return
/obj/mecha/combat/phazon/get_commands()
var/output = {"<div class='wr'>
<div class='header'>Special</div>
<div class='links'>
<a href='?src=\ref[src];phasing=1'><span id="phasing_command">[phasing?"Dis":"En"]able phasing</span></a><br>
<a href='?src=\ref[src];switch_damtype=1'>Change melee damage type</a><br>
</div>
</div>
"}
output += ..()
return output
/obj/mecha/combat/phazon/Topic(href, href_list)
..()
if (href_list["switch_damtype"])
src.switch_damtype()
if (href_list["phasing"])
phasing = !phasing
send_byjax(src.occupant,"exosuit.browser","phasing_command","[phasing?"Dis":"En"]able phasing")
src.occupant_message()
return
+4 -4
View File
@@ -268,7 +268,7 @@
desc = "An exosuit module that allows exosuits to teleport to any position in view."
icon_state = "mecha_teleport"
origin_tech = "bluespace=10"
equip_cooldown = 300
equip_cooldown = 150
energy_drain = 1000
range = RANGED
@@ -427,13 +427,13 @@
if(!action_checks(user))
return chassis.dynattackby(W,user)
chassis.log_message("Attacked by [W]. Attacker - [user]")
if(prob(chassis.deflect_chance*src.deflect_coeff))
if(prob(chassis.deflect_chance*deflect_coeff))
user << "\red The [W] bounces off [chassis] armor."
chassis.log_append_to_last("Armor saved.")
else
chassis.occupant_message("<font color='red'><b>[user] hits [chassis] with [W].</b></font>")
user.visible_message("<font color='red'><b>[user] hits [chassis] with [W].</b></font>", "<font color='red'><b>You hit [src] with [W].</b></font>")
chassis.take_damage(round(W.force*0.8),W.damtype)
chassis.take_damage(round(W.force*damage_coeff),W.damtype)
chassis.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
set_ready_state(0)
chassis.cell.use(energy_drain)
@@ -526,7 +526,7 @@
equip_cooldown = 20
energy_drain = 20
range = RANGED
construction_cost = list("metal"=10000,"gold"=5000,"silver"=5000,"glass"=10000)
construction_cost = list("metal"=10000,"gold"=1000,"silver"=2000,"glass"=5000)
var/health_boost = 2
var/datum/global_iterator/pr_repair_droid
var/icon/droid_overlay
+1 -1
View File
@@ -339,7 +339,7 @@
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
src.updateUsrDialog()
if(i || tech_output)
src.visible_message("<b>[src]</b> beeps, \"Succesfully synchronized with R&D server. New data processed.\".")
src.visible_message("<b>[src]</b> beeps, \"Succesfully synchronized with R&D server. New data processed.\"")
return
proc/get_resource_cost_w_coeff(var/obj/item/mecha_parts/part as obj,var/resource as text, var/roundto=1)
+5 -2
View File
@@ -509,7 +509,9 @@
return src.internal_tank.air_contents.remove(amount)
else
var/turf/T = get_turf(src)
return T.remove_air(amount)
if(T)
return T.remove_air(amount)
return
/obj/mecha/return_air()
if(src.internal_tank)
@@ -996,7 +998,7 @@
return
if(src.health<initial(src.health))
user << "\blue You repair some damage to [src.name]."
src.health += min(20, initial(src.health)-src.health)
src.health += min(10, initial(src.health)-src.health)
else
user << "The [src.name] is at full integrity"
return
@@ -1120,6 +1122,7 @@
<div class='links'>"}
for(var/obj/item/mecha_parts/mecha_equipment/W in equipment)
output += "[W.name] <a href='?src=\ref[W];detach=1'>Detach</a><br>"
output += "<b>Available equipment slots:</b> [max_equip-equipment.len]"
output += "</div></div>"
return output
+14 -5
View File
@@ -39,6 +39,7 @@
/obj/item/mecha_parts/part/ripley_torso
name="Ripley Torso"
desc="A torso part of Ripley APLU. Contains power unit, processing core and life support systems."
icon_state = "ripley_harness"
origin_tech = "programming=2;materials=3;biotech=2"
construction_time = 300
@@ -46,6 +47,7 @@
/obj/item/mecha_parts/part/ripley_left_arm
name="Ripley Left Arm"
desc="A Ripley APLU left arm. Data and power sockets are compatible with most exosuit tools."
icon_state = "ripley_l_arm"
origin_tech = "programming=2;materials=3"
construction_time = 200
@@ -53,6 +55,7 @@
/obj/item/mecha_parts/part/ripley_right_arm
name="Ripley Right Arm"
desc="A Ripley APLU right arm. Data and power sockets are compatible with most exosuit tools."
icon_state = "ripley_r_arm"
origin_tech = "programming=2;materials=3"
construction_time = 200
@@ -60,6 +63,7 @@
/obj/item/mecha_parts/part/ripley_left_leg
name="Ripley Left Leg"
desc="A Ripley APLU left leg. Contains somewhat complex servodrives and balance maintaining systems."
icon_state = "ripley_l_leg"
origin_tech = "programming=2;materials=3"
construction_time = 200
@@ -67,6 +71,7 @@
/obj/item/mecha_parts/part/ripley_right_leg
name="Ripley Right Leg"
desc="A Ripley APLU right leg. Contains somewhat complex servodrives and balance maintaining systems."
icon_state = "ripley_r_leg"
origin_tech = "programming=2;materials=3"
construction_time = 200
@@ -84,6 +89,7 @@
/obj/item/mecha_parts/part/gygax_torso
name="Gygax Torso"
desc="A torso part of Gygax. Contains power unit, processing core and life support systems. Has an additional equipment slot."
icon_state = "gygax_harness"
origin_tech = "programming=2;materials=5;biotech=3"
construction_time = 300
@@ -91,6 +97,7 @@
/obj/item/mecha_parts/part/gygax_head
name="Gygax Head"
desc="A Gygax head. Houses advanced surveilance and targeting sensors."
icon_state = "gygax_head"
origin_tech = "programming=2;materials=5;magnets=3"
construction_time = 200
@@ -98,6 +105,7 @@
/obj/item/mecha_parts/part/gygax_left_arm
name="Gygax Left Arm"
desc="A Gygax left arm. Data and power sockets are compatible with most exosuit tools and weapons."
icon_state = "gygax_l_arm"
origin_tech = "programming=2;materials=5"
construction_time = 200
@@ -105,6 +113,7 @@
/obj/item/mecha_parts/part/gygax_right_arm
name="Gygax Right Arm"
desc="A Gygax right arm. Data and power sockets are compatible with most exosuit tools and weapons."
icon_state = "gygax_r_arm"
origin_tech = "programming=2;materials=5"
construction_time = 200
@@ -154,35 +163,35 @@
icon_state = "durand_head"
origin_tech = "programming=2;materials=5;magnets=3"
construction_time = 200
construction_cost = list("metal"=25000,"glass"=10000,"silver"=5000)
construction_cost = list("metal"=25000,"glass"=10000,"silver"=3000)
/obj/item/mecha_parts/part/durand_left_arm
name="Durand Left Arm"
icon_state = "durand_l_arm"
origin_tech = "programming=2;materials=5"
construction_time = 200
construction_cost = list("metal"=35000,"silver"=5000)
construction_cost = list("metal"=35000,"silver"=3000)
/obj/item/mecha_parts/part/durand_right_arm
name="Durand Right Arm"
icon_state = "durand_r_arm"
origin_tech = "programming=2;materials=5"
construction_time = 200
construction_cost = list("metal"=35000,"silver"=5000)
construction_cost = list("metal"=35000,"silver"=3000)
/obj/item/mecha_parts/part/durand_left_leg
name="Durand Left Leg"
icon_state = "durand_l_leg"
origin_tech = "programming=2;materials=5"
construction_time = 200
construction_cost = list("metal"=40000,"silver"=5000)
construction_cost = list("metal"=40000,"silver"=3000)
/obj/item/mecha_parts/part/durand_right_leg
name="Durand Right Leg"
icon_state = "durand_r_leg"
origin_tech = "programming=2;materials=5"
construction_time = 200
construction_cost = list("metal"=40000,"silver"=5000)
construction_cost = list("metal"=40000,"silver"=3000)
/obj/item/mecha_parts/part/durand_armour
name="Durand Armour Plates"
+4
View File
@@ -101,3 +101,7 @@
/obj/decal/mecha_wreckage/durand
name = "Durand wreckage"
icon_state = "durand-broken"
/obj/decal/mecha_wreckage/phazon
name = "Phazon wreckage"
icon_state = "phazon-broken"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 80 KiB

+1
View File
@@ -448,6 +448,7 @@
#include "code\game\mecha\combat\gygax.dm"
#include "code\game\mecha\combat\honker.dm"
#include "code\game\mecha\combat\marauder.dm"
#include "code\game\mecha\combat\phazon.dm"
#include "code\game\mecha\equipment\mecha_equipment.dm"
#include "code\game\mecha\equipment\tools\tools.dm"
#include "code\game\mecha\equipment\weapons\weapons.dm"