diff --git a/code/WorkInProgress/Chemistry-Reagents.dm b/code/WorkInProgress/Chemistry-Reagents.dm index 9bfe70cbb9a..adc445368e1 100644 --- a/code/WorkInProgress/Chemistry-Reagents.dm +++ b/code/WorkInProgress/Chemistry-Reagents.dm @@ -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 diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index 5f1bed407dd..bb6d681c39e 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -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 \ No newline at end of file diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 04cedb08fec..d7f02d2bba9 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -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 diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 75939cbe0e0..03e43827ffb 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -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() diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm new file mode 100644 index 00000000000..47648fee4ad --- /dev/null +++ b/code/game/mecha/combat/phazon.dm @@ -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 = {"
+
Special
+ +
+ "} + 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 \ No newline at end of file diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 447464f9886..121de383e68 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -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("[user] hits [chassis] with [W].") user.visible_message("[user] hits [chassis] with [W].", "You hit [src] with [W].") - 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 diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 3e6ff9ce57f..a563c3bd437 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -339,7 +339,7 @@ temp += "Return" src.updateUsrDialog() if(i || tech_output) - src.visible_message("[src] beeps, \"Succesfully synchronized with R&D server. New data processed.\".") + src.visible_message("[src] 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) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 67bb0ac3e8e..a7ed396a53a 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -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"} for(var/obj/item/mecha_parts/mecha_equipment/W in equipment) output += "[W.name] Detach
" + output += "Available equipment slots: [max_equip-equipment.len]" output += "" return output diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index eff19191c94..388c655f807 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -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" diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index 7b947651a1c..bc63f86c9bd 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -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" diff --git a/icons/mob/mecha.dmi b/icons/mob/mecha.dmi index 94e481ba92f..fc92cde6bb7 100644 Binary files a/icons/mob/mecha.dmi and b/icons/mob/mecha.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 2f784f9d69f..302564413d1 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"